markdown-flow-ui 0.2.3-dev.1 → 0.2.3-dev.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.
@@ -1,638 +1,651 @@
1
- import { j as l } from "../../_virtual/jsx-runtime.es.js";
2
- import { memo as rr, useMemo as c, useId as or, useRef as f, useCallback as n, useState as m, useEffect as a } from "react";
3
- import { isSandboxInteractionMessage as lr } from "../../lib/sandboxInteraction.es.js";
4
- import { cn as fe } from "../../lib/utils.es.js";
5
- import ir from "../ui/loading-overlay-card.es.js";
6
- import sr from "../ContentRender/ContentRender.es.js";
7
- import tn from "../ContentRender/IframeSandbox.es.js";
1
+ import { j as i } from "../../_virtual/jsx-runtime.es.js";
2
+ import { memo as fr, useMemo as c, useId as mr, useRef as p, useCallback as n, useState as f, useEffect as s } from "react";
3
+ import { isSandboxInteractionMessage as pr } from "../../lib/sandboxInteraction.es.js";
4
+ import { cn as pe } from "../../lib/utils.es.js";
5
+ import hr from "../ui/loading-overlay-card.es.js";
6
+ import yr from "../ContentRender/ContentRender.es.js";
7
+ import an from "../ContentRender/IframeSandbox.es.js";
8
8
  import "../ui/inputGroup/input-group.es.js";
9
9
  import "../ContentRender/contentRenderI18n.es.js";
10
- import { isMobileDevice as ar, isLandscapeViewport as nn, subscribeMobileDeviceChange as ur } from "../../lib/mobileDevice.es.js";
11
- import cr from "./Player.es.js";
12
- import dr from "./MarkdownSlideScaling.es.js";
13
- import fr from "./SubtitleOverlay.es.js";
14
- import mr from "./useSlide.es.js";
15
- import pr from "./useWakePlayerFromIframe.es.js";
16
- import { PlayerKeyboardShortcutContext as hr } from "./utils/playerKeyboardShortcutContext.es.js";
17
- import { activatePlayerKeyboardShortcutOwner as yr } from "./utils/playerKeyboardShortcuts.es.js";
18
- import { DEFAULT_MOBILE_VIEW_MODE as He, resolveMobileViewModeState as Sr } from "./utils/mobileScreenMode.es.js";
19
- import { shouldRenderInteractionOverlay as vr, shouldPresentInteractionOverlay as br } from "./utils/interactionPlayback.es.js";
20
- import { resolveMarkdownScalingMode as gr } from "./utils/markdownScaling.es.js";
21
- import { shouldWakePlayerControlsAfterNavigation as ft } from "./utils/playerNavigationContext.es.js";
22
- import { shouldAutoAdvanceIntoAppendedMarker as Ar } from "./utils/appendedMarkerAdvance.es.js";
23
- import { getPlaybackSequenceTransition as Ir, shouldStartDefaultAudioSequence as xr } from "./utils/playbackSequence.es.js";
24
- import { hasResolvedInteractionElement as wr, canReachSubtitleJumpTarget as rn } from "./utils/subtitleJumpNavigation.es.js";
25
- import { resolvePlayerCustomActionElement as Er, getPlayerCustomActionCount as Tr } from "./utils/playerCustomActions.es.js";
26
- import { createPlaybackTimeStore as Pr } from "./utils/playbackTimeStore.es.js";
27
- import { resolveSlideInteractionState as Cr } from "./utils/interactionResolution.es.js";
28
- import { shouldUseAutoAdvanceToggle as Rr } from "./utils/playerToggleMode.es.js";
29
- import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as _r, areImageOnlyStepIframeVisualsReady as kr } from "./utils/imageOnlyStepVisualReady.es.js";
30
- import { resolveSilentStepAutoAdvanceBehavior as Mr } from "./utils/silentStepAutoAdvance.es.js";
31
- import { resolveSlidePlayerVisibility as Fr } from "./utils/playerVisibility.es.js";
32
- import { getSlideLocaleTexts as Br, DEFAULT_SLIDE_BUFFERING_TEXTS as Or } from "./slideI18n.es.js";
10
+ import { isMobileDevice as Sr, isLandscapeViewport as un, subscribeMobileDeviceChange as vr } from "../../lib/mobileDevice.es.js";
11
+ import br from "./Player.es.js";
12
+ import Ir from "./MarkdownSlideScaling.es.js";
13
+ import gr from "./SubtitleOverlay.es.js";
14
+ import Ar from "./useSlide.es.js";
15
+ import xr from "./useWakePlayerFromIframe.es.js";
16
+ import { PlayerKeyboardShortcutContext as wr } from "./utils/playerKeyboardShortcutContext.es.js";
17
+ import { activatePlayerKeyboardShortcutOwner as Tr } from "./utils/playerKeyboardShortcuts.es.js";
18
+ import { DEFAULT_MOBILE_VIEW_MODE as $e, resolveMobileViewModeState as Er } from "./utils/mobileScreenMode.es.js";
19
+ import { shouldRenderInteractionOverlay as Cr, shouldPresentInteractionOverlay as Rr } from "./utils/interactionPlayback.es.js";
20
+ import { resolveMarkdownScalingMode as Pr } from "./utils/markdownScaling.es.js";
21
+ import { shouldWakePlayerControlsAfterNavigation as yt } from "./utils/playerNavigationContext.es.js";
22
+ import { shouldAutoAdvanceIntoAppendedMarker as _r } from "./utils/appendedMarkerAdvance.es.js";
23
+ import { getPlaybackSequenceTransition as kr, shouldStartDefaultAudioSequence as Mr } from "./utils/playbackSequence.es.js";
24
+ import { hasResolvedInteractionElement as Fr, canReachSubtitleJumpTarget as cn } from "./utils/subtitleJumpNavigation.es.js";
25
+ import { resolvePlayerCustomActionElement as Or, getPlayerCustomActionCount as Br } from "./utils/playerCustomActions.es.js";
26
+ import { createPlaybackTimeStore as Nr } from "./utils/playbackTimeStore.es.js";
27
+ import { resolveSlideInteractionState as Lr } from "./utils/interactionResolution.es.js";
28
+ import { shouldUseAutoAdvanceToggle as Vr } from "./utils/playerToggleMode.es.js";
29
+ import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as jr, areImageOnlyStepIframeVisualsReady as Dr } from "./utils/imageOnlyStepVisualReady.es.js";
30
+ import { resolveSilentStepAutoAdvanceBehavior as qr } from "./utils/silentStepAutoAdvance.es.js";
31
+ import { resolveSlidePlayerVisibility as Kr } from "./utils/playerVisibility.es.js";
32
+ import { getSlideLocaleTexts as Ur, DEFAULT_SLIDE_BUFFERING_TEXTS as Hr } from "./slideI18n.es.js";
33
33
  /* empty css */
34
- import Nr from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
35
- const Lr = 2e3, Vr = 300, jr = 160, qr = 16, mt = "waitingForAudio", Kr = (y, p) => typeof y == "string" ? y : y[p] ?? y[mt] ?? Or[p], Dr = (y, p) => typeof y == "string" ? y : {
36
- ...p,
37
- ...y
38
- }, Ur = (y, p) => p ? y !== "loadingAudio" : !1, on = rr(
34
+ import Gr from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
35
+ const $r = 2e3, zr = 300, Jr = 160, Wr = 16, dn = 3e3, Yr = [
36
+ "button",
37
+ "input",
38
+ "textarea",
39
+ '[contenteditable=""]',
40
+ '[contenteditable="true"]',
41
+ '[contenteditable="plaintext-only"]'
42
+ ].join(", "), vt = "waitingForAudio", Xr = (d, h) => typeof d == "string" ? d : d[h] ?? d[vt] ?? Hr[h], Qr = (d, h) => typeof d == "string" ? d : {
43
+ ...h,
44
+ ...d
45
+ }, Zr = (d, h) => h ? d !== "loadingAudio" : !1, mn = fr(
39
46
  ({
40
- content: y,
41
- title: p,
47
+ content: d,
48
+ title: h,
42
49
  locale: U,
43
- defaultButtonText: me,
44
- defaultInputText: G,
45
- defaultSelectedValues: H,
46
- confirmButtonText: Q,
47
- copyButtonText: Z,
48
- copiedButtonText: Re,
49
- onSend: $e,
50
- readonly: ee = !1
51
- }) => /* @__PURE__ */ l.jsxs("div", { className: "slide-player__interaction-card", children: [
52
- /* @__PURE__ */ l.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ l.jsx("p", { className: "slide-player__interaction-title", children: p }) }),
53
- /* @__PURE__ */ l.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ l.jsx(
54
- sr,
50
+ defaultButtonText: he,
51
+ defaultInputText: H,
52
+ defaultSelectedValues: G,
53
+ confirmButtonText: Z,
54
+ copyButtonText: ee,
55
+ copiedButtonText: ke,
56
+ onSend: ze,
57
+ readonly: te = !1
58
+ }) => /* @__PURE__ */ i.jsxs("div", { className: "slide-player__interaction-card", children: [
59
+ /* @__PURE__ */ i.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ i.jsx("p", { className: "slide-player__interaction-title", children: h }) }),
60
+ /* @__PURE__ */ i.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ i.jsx(
61
+ yr,
55
62
  {
56
- content: y,
63
+ content: d,
57
64
  locale: U,
58
- defaultButtonText: me,
59
- defaultInputText: G,
60
- defaultSelectedValues: H,
61
- confirmButtonText: Q,
62
- copyButtonText: Z,
63
- copiedButtonText: Re,
64
- onSend: $e,
65
- readonly: ee,
65
+ defaultButtonText: he,
66
+ defaultInputText: H,
67
+ defaultSelectedValues: G,
68
+ confirmButtonText: Z,
69
+ copyButtonText: ee,
70
+ copiedButtonText: ke,
71
+ onSend: ze,
72
+ readonly: te,
66
73
  sandboxMode: "content"
67
74
  }
68
75
  ) })
69
76
  ] })
70
77
  );
71
- on.displayName = "InteractionOverlayCard";
72
- const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
73
- const G = p[me];
74
- return U.sequence_number === G?.sequence_number && U.type === G?.type && U.content === G?.content;
75
- }), Co = ({
76
- elementList: y = [],
77
- locale: p,
78
+ mn.displayName = "InteractionOverlayCard";
79
+ const eo = (d, h) => d.length === h.length && d.every((U, he) => {
80
+ const H = h[he];
81
+ return U.sequence_number === H?.sequence_number && U.type === H?.type && U.content === H?.content;
82
+ }), St = (d) => d instanceof HTMLElement && d.matches(Yr), to = [
83
+ 'input:not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"])',
84
+ "textarea",
85
+ '[contenteditable=""]',
86
+ '[contenteditable="true"]',
87
+ '[contenteditable="plaintext-only"]'
88
+ ].join(", "), fn = (d) => d instanceof HTMLElement && d.matches(to), jo = ({
89
+ elementList: d = [],
90
+ locale: h,
78
91
  playerEnabled: U,
79
- playerControlsVisibility: me,
80
- playerClassName: G,
81
- fullscreenHeader: H,
82
- playerCustomActions: Q,
83
- playerCustomActionPauseOnActive: Z = !0,
84
- bufferingText: Re,
85
- interactionTitle: $e,
86
- interactionTexts: ee,
87
- playerTexts: ln,
88
- playerAutoHideDelay: ze = 3e3,
89
- markerAutoAdvanceDelay: pt = Lr,
90
- interactionDefaultValueOptions: ht,
91
- onSend: yt,
92
- onPlayerVisibilityChange: Je,
93
- onMobileViewModeChange: St,
94
- onStepChange: vt,
95
- enableKeyboardShortcuts: te = !0,
96
- enableIframeScaling: sn = !0,
97
- enableMarkdownScaling: an = !0,
98
- disableLoadingOverlay: R = !1,
99
- className: un,
100
- onPointerDown: bt,
101
- onFocusCapture: gt,
102
- ...cn
92
+ playerControlsVisibility: he,
93
+ playerClassName: H,
94
+ fullscreenHeader: G,
95
+ playerCustomActions: Z,
96
+ playerCustomActionPauseOnActive: ee = !0,
97
+ bufferingText: ke,
98
+ interactionTitle: ze,
99
+ interactionTexts: te,
100
+ playerTexts: pn,
101
+ playerAutoHideDelay: Je = 3e3,
102
+ markerAutoAdvanceDelay: bt = $r,
103
+ interactionDefaultValueOptions: It,
104
+ onSend: gt,
105
+ onPlayerVisibilityChange: We,
106
+ onMobileViewModeChange: At,
107
+ onStepChange: xt,
108
+ enableKeyboardShortcuts: ne = !0,
109
+ enableIframeScaling: hn = !0,
110
+ enableMarkdownScaling: yn = !0,
111
+ disableLoadingOverlay: P = !1,
112
+ className: Sn,
113
+ onPointerDown: wt,
114
+ onFocusCapture: Tt,
115
+ ...vn
103
116
  }) => {
104
- const $ = c(() => Br(p), [p]), dn = c(
105
- () => Dr(
106
- Re,
117
+ const $ = c(() => Ur(h), [h]), bn = c(
118
+ () => Qr(
119
+ ke,
107
120
  $.bufferingText
108
121
  ),
109
- [Re, $.bufferingText]
122
+ [ke, $.bufferingText]
110
123
  ), {
111
- playerEnabled: fn,
124
+ playerEnabled: In,
112
125
  playerControlsVisibility: j
113
- } = Fr({
126
+ } = Kr({
114
127
  playerEnabled: U,
115
- playerControlsVisibility: me
116
- }), _e = or(), pe = f(null), At = f(null), ke = f(null), It = f(null), ne = f(null), Me = f(!1), he = f(null), Fe = f(null), ye = f(null), Se = f(null), xt = f(null), wt = f([]), ve = f(!1), z = f(null), be = f(null), Et = f(0), Tt = f(null), Pt = f({
128
+ playerControlsVisibility: he
129
+ }), Me = mr(), ye = p(null), Et = p(null), Fe = p(null), Ct = p(null), re = p(null), Oe = p(!1), Se = p(null), Be = p(null), z = p(null), ve = p(null), Ye = p(null), Rt = p([]), be = p(!1), J = p(null), Ie = p(null), Pt = p(0), _t = p(null), kt = p({
117
130
  markerCount: 0,
118
131
  currentIndex: -1,
119
132
  canGoNext: !1
120
- }), We = f(!1), {
121
- currentElementList: P,
122
- stepElementLists: Ct,
123
- slideElementList: T,
133
+ }), Xe = p(!1), {
134
+ currentElementList: C,
135
+ stepElementLists: Mt,
136
+ slideElementList: E,
124
137
  currentIndex: o,
125
- audioList: v,
126
- audioSlideIndexes: Be,
127
- currentAudioSequenceIndexes: Oe,
128
- currentStepHasSpeakableElement: b,
129
- currentInteractionElement: d,
130
- canGoPrev: mn,
131
- canGoNext: C,
132
- handlePrev: Rt,
138
+ audioList: b,
139
+ audioSlideIndexes: Ne,
140
+ currentAudioSequenceIndexes: Le,
141
+ currentStepHasSpeakableElement: I,
142
+ currentInteractionElement: m,
143
+ canGoPrev: gn,
144
+ canGoNext: R,
145
+ handlePrev: Ft,
133
146
  handleNext: _,
134
- handleGoTo: _t
135
- } = mr(y), ge = c(() => {
147
+ handleGoTo: Ot
148
+ } = Ar(d), ge = c(() => {
136
149
  if (!(o < 0))
137
- return T[o];
138
- }, [o, T]), re = c(
139
- () => P.map(
150
+ return E[o];
151
+ }, [o, E]), oe = c(
152
+ () => C.map(
140
153
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
141
154
  ),
142
- [P]
143
- ), pn = T.filter(
155
+ [C]
156
+ ), An = E.filter(
144
157
  (e) => e.is_renderable !== !1
145
- ).length === 1, h = fn && (T.length > 0 || v.length > 0 || !!d), hn = c(
158
+ ).length === 1, y = In && (E.length > 0 || b.length > 0 || !!m), xn = c(
146
159
  () => ({
147
- enabled: te,
148
- ownerId: _e
160
+ enabled: ne,
161
+ ownerId: Me
149
162
  }),
150
- [te, _e]
151
- ), q = n(() => {
152
- !te || !h || yr(_e);
153
- }, [te, _e, h]), k = c(
154
- () => Oe.map((e) => v[e]?.audioKey).filter((e) => !!e),
155
- [v, Oe]
156
- ), [yn, Ae] = m(!0), [Ne, oe] = m(!1), [Ye, kt] = m(!0), [Ie, Mt] = m(!0), [I, K] = m(null), [Sn, Ft] = m(null), [vn, g] = m(!1), [bn, Xe] = m(mt), [M, Qe] = m(!1), [gn, Le] = m(!1), [Bt, An] = m(!0), [Ze, et] = m(!1), [A, tt] = m(), [Ve, je] = m(!1), [
157
- In,
158
- xe
159
- ] = m(0), [Ot, xn] = m(!1), N = c(() => ar(), []), [qe, nt] = m(
160
- He
161
- ), [Nt, rt] = m(!1), [wn, Lt] = m(
162
- () => N ? nn() : !1
163
- ), le = c(() => Pr(), []), {
164
- effectiveMobileViewMode: ie,
165
- isImmersiveMobileFullscreen: se,
166
- isNativeMobileFullscreen: Vt,
167
- shouldRotateFullscreenViewport: En
163
+ [ne, Me]
164
+ ), D = n(() => {
165
+ !ne || !y || Tr(Me);
166
+ }, [ne, Me, y]), k = c(
167
+ () => Le.map((e) => b[e]?.audioKey).filter((e) => !!e),
168
+ [b, Le]
169
+ ), [wn, Ae] = f(!0), [Ve, ie] = f(!1), [Qe, Bt] = f(!0), [xe, Nt] = f(!0), [A, q] = f(null), [Tn, Lt] = f(null), [En, g] = f(!1), [Cn, Ze] = f(vt), [M, et] = f(!1), [Rn, je] = f(!1), [Vt, Pn] = f(!0), [tt, nt] = f(!1), [S, rt] = f(), [le, De] = f(!1), [jt, qe] = f(!1), [_n, ot] = f(!1), [
170
+ kn,
171
+ we
172
+ ] = f(0), [Dt, Mn] = f(!1), L = c(() => Sr(), []), [Ke, it] = f(
173
+ $e
174
+ ), [qt, lt] = f(!1), [Fn, Kt] = f(
175
+ () => L ? un() : !1
176
+ ), se = c(() => Nr(), []), {
177
+ effectiveMobileViewMode: ae,
178
+ isImmersiveMobileFullscreen: ue,
179
+ isNativeMobileFullscreen: Ut,
180
+ shouldRotateFullscreenViewport: On
168
181
  } = c(
169
- () => Sr({
170
- hasManualMobileViewMode: Nt,
171
- isMobileDevice: N,
172
- mobileViewMode: qe
182
+ () => Er({
183
+ hasManualMobileViewMode: qt,
184
+ isMobileDevice: L,
185
+ mobileViewMode: Ke
173
186
  }),
174
187
  [
175
- Nt,
176
- N,
177
- wn,
178
- qe
188
+ qt,
189
+ L,
190
+ Fn,
191
+ Ke
179
192
  ]
180
- ), Tn = f(ie), x = h && j !== "hidden" && (j === "visible" || yn), Pn = se && x, Cn = se && x, Rn = se || Vt, jt = Ot && !N, _n = n(
193
+ ), Bn = p(ae), x = y && j !== "hidden" && (j === "visible" || wn), Nn = ue && x, Ln = ue && x, Vn = ue || Ut, Ht = Dt && !L, jn = n(
181
194
  (e) => {
182
- rt(!0), nt(e);
195
+ lt(!0), it(e);
183
196
  },
184
197
  []
185
- ), qt = n(() => {
186
- rt(!1), nt(He);
187
- }, []), kn = n(() => {
188
- qt(), H?.onBack?.();
189
- }, [H, qt]), Kt = n((e) => {
190
- et(e);
191
- }, []), Dt = n(() => {
192
- et((e) => !e);
193
- }, []), { mountedStepStates: Mn, currentMountedStateIndex: Fn } = c(() => {
198
+ ), Gt = n(() => {
199
+ lt(!1), it($e);
200
+ }, []), Dn = n(() => {
201
+ Gt(), G?.onBack?.();
202
+ }, [G, Gt]), $t = n((e) => {
203
+ nt(e);
204
+ }, []), zt = n(() => {
205
+ nt((e) => !e);
206
+ }, []), { mountedStepStates: qn, currentMountedStateIndex: Kn } = c(() => {
194
207
  const e = [], t = /* @__PURE__ */ new Map();
195
- return Ct.forEach((i, s) => {
208
+ return Mt.forEach((l, a) => {
196
209
  const u = e.findIndex(
197
- (r) => Gr(
210
+ (r) => eo(
198
211
  r.elementList,
199
- i
212
+ l
200
213
  )
201
214
  );
202
215
  if (u >= 0) {
203
- e[u]?.sourceStepIndexes.push(s), t.set(s, u);
216
+ e[u]?.sourceStepIndexes.push(a), t.set(a, u);
204
217
  return;
205
218
  }
206
219
  e.push({
207
- elementList: i,
208
- sourceStepIndexes: [s]
209
- }), t.set(s, e.length - 1);
220
+ elementList: l,
221
+ sourceStepIndexes: [a]
222
+ }), t.set(a, e.length - 1);
210
223
  }), {
211
224
  mountedStepStates: e,
212
225
  currentMountedStateIndex: o >= 0 ? t.get(o) ?? -1 : -1
213
226
  };
214
- }, [o, Ct]), Ut = c(() => String(o), [o]), w = c(() => I ? v.findIndex(
215
- (e) => (e.audioKey ?? "") === I
216
- ) : -1, [v, I]), ot = c(
217
- () => w >= 0 ? v[w] : void 0,
218
- [v, w]
219
- ), Bn = ot?.element?.subtitle_cues ?? [], Ke = c(
227
+ }, [o, Mt]), Jt = c(() => String(o), [o]), w = c(() => A ? b.findIndex(
228
+ (e) => (e.audioKey ?? "") === A
229
+ ) : -1, [b, A]), st = c(
230
+ () => w >= 0 ? b[w] : void 0,
231
+ [b, w]
232
+ ), Un = st?.element?.subtitle_cues ?? [], Ue = c(
220
233
  () => k[0] ?? "none",
221
234
  [k]
222
- ), lt = c(
235
+ ), at = c(
223
236
  () => ({
224
- currentElement: Er({
237
+ currentElement: Or({
225
238
  currentAudioIndex: w,
226
- currentAudioSequenceIndexes: Oe,
227
- audioList: v,
228
- currentInteractionElement: A,
239
+ currentAudioSequenceIndexes: Le,
240
+ audioList: b,
241
+ currentInteractionElement: S,
229
242
  currentStepElement: ge
230
243
  }),
231
244
  currentIndex: o,
232
245
  currentStepElement: ge,
233
- isActive: Ze,
234
- setActive: Kt,
235
- toggleActive: Dt
246
+ isActive: tt,
247
+ setActive: $t,
248
+ toggleActive: zt
236
249
  }),
237
250
  [
238
- A,
239
- v,
251
+ S,
252
+ b,
240
253
  w,
241
- Oe,
254
+ Le,
242
255
  o,
243
256
  ge,
244
- Ze,
245
- Kt,
246
- Dt
257
+ tt,
258
+ $t,
259
+ zt
247
260
  ]
248
- ), it = c(
249
- () => Tr(
250
- Q,
251
- lt
261
+ ), ut = c(
262
+ () => Br(
263
+ Z,
264
+ at
252
265
  ),
253
- [lt, Q]
254
- ), On = c(
266
+ [at, Z]
267
+ ), Hn = c(
255
268
  () => ({
256
- "--slide-player-custom-action-count": String(it),
269
+ "--slide-player-custom-action-count": String(ut),
257
270
  "--slide-player-mobile-control-count": String(
258
- it + 4
271
+ ut + 4
259
272
  )
260
273
  }),
261
- [it]
262
- ), Gt = k.length > 0, Ht = c(() => d ? `${d.sequence_number ?? "none"}:${String(
263
- d.content ?? ""
264
- )}` : "none", [d]), we = c(
265
- () => [Ut, Ht].join("|"),
266
- [Ht, Ut]
267
- ), Nn = c(
274
+ [ut]
275
+ ), Wt = k.length > 0, Yt = c(() => m ? `${m.sequence_number ?? "none"}:${String(
276
+ m.content ?? ""
277
+ )}` : "none", [m]), Te = c(
278
+ () => [Jt, Yt].join("|"),
279
+ [Yt, Jt]
280
+ ), Gn = c(
268
281
  () => [
269
- we,
270
- ot?.audioKey ?? "none",
282
+ Te,
283
+ st?.audioKey ?? "none",
271
284
  String(w)
272
285
  ].join("|"),
273
- [w, ot?.audioKey, we]
274
- ), $t = !!c(() => !Ke || Ke === "none" ? "" : v.find(
275
- (t) => t.audioKey === Ke
276
- )?.audioUrl?.trim() ?? "", [v, Ke]), J = Z && !!Q && Ze, Ee = c(
277
- () => Rr({
278
- canGoNext: C,
286
+ [w, st?.audioKey, Te]
287
+ ), Xt = !!c(() => !Ue || Ue === "none" ? "" : b.find(
288
+ (t) => t.audioKey === Ue
289
+ )?.audioUrl?.trim() ?? "", [b, Ue]), W = ee && !!Z && tt, Ee = c(
290
+ () => Vr({
291
+ canGoNext: R,
279
292
  currentAudioIndex: w,
280
- currentStepHasSpeakableElement: b,
281
- hasInteraction: !!d
293
+ currentStepHasSpeakableElement: I,
294
+ hasInteraction: !!m
282
295
  }),
283
296
  [
284
- C,
297
+ R,
285
298
  w,
286
- d,
287
- b
299
+ m,
300
+ I
288
301
  ]
289
- ), zt = c(
290
- () => Mr({
291
- currentElementList: P,
292
- currentStepHasSpeakableElement: b,
293
- currentInteractionElement: d,
294
- markerAutoAdvanceDelay: pt
302
+ ), Qt = c(
303
+ () => qr({
304
+ currentElementList: C,
305
+ currentStepHasSpeakableElement: I,
306
+ currentInteractionElement: m,
307
+ markerAutoAdvanceDelay: bt
295
308
  }),
296
309
  [
297
- P,
298
- d,
299
- b,
300
- pt
310
+ C,
311
+ m,
312
+ I,
313
+ bt
301
314
  ]
302
- ), Jt = zt.delayMs, Te = zt.usesImageOnlyDelay, st = c(
303
- () => `${o}:${re.join("|")}`,
304
- [o, re]
305
- ), [Ln, Vn] = m(null), Wt = !Te || Ln === st, L = n(() => {
306
- ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
307
- }, []), V = n(() => {
308
- ye.current !== null && (window.clearTimeout(ye.current), ye.current = null);
315
+ ), Zt = Qt.delayMs, Ce = Qt.usesImageOnlyDelay, ct = c(
316
+ () => `${o}:${oe.join("|")}`,
317
+ [o, oe]
318
+ ), [$n, zn] = f(null), en = !Ce || $n === ct, V = n(() => {
319
+ re.current !== null && (window.clearTimeout(re.current), re.current = null);
309
320
  }, []), F = n(() => {
321
+ z.current !== null && (window.clearTimeout(z.current), z.current = null);
322
+ }, []), O = n(() => {
323
+ ve.current !== null && (window.clearTimeout(ve.current), ve.current = null);
324
+ }, []), ce = n(() => {
310
325
  Se.current !== null && (window.clearTimeout(Se.current), Se.current = null);
311
- }, []), ae = n(() => {
312
- he.current !== null && (window.clearTimeout(he.current), he.current = null);
313
- }, []), D = n(() => {
314
- Fe.current !== null && (window.clearTimeout(Fe.current), Fe.current = null);
326
+ }, []), K = n(() => {
327
+ Be.current !== null && (window.clearTimeout(Be.current), Be.current = null);
315
328
  }, []), B = n(
316
329
  (e = {}) => {
317
- ae(), V(), F(), D(), K(null), le.reset(), g(!1), Xe(mt), Qe(!1), Le(!1), Ft(null), e.preservePendingSubtitleJump || (be.current = null), tt(void 0), je(!1), xe(0);
330
+ ce(), F(), O(), K(), q(null), se.reset(), g(!1), Ze(vt), et(!1), je(!1), Lt(null), e.preservePendingSubtitleJump || (Ie.current = null), rt(void 0), De(!1), we(0);
318
331
  },
319
332
  [
320
- ae,
321
- D,
322
- V,
333
+ ce,
334
+ K,
323
335
  F,
324
- le
336
+ O,
337
+ se
325
338
  ]
326
- ), De = n(
339
+ ), He = n(
327
340
  (e) => {
328
- Et.current += 1, Ft({
341
+ Pt.current += 1, Lt({
329
342
  ...e,
330
- id: Et.current
343
+ id: Pt.current
331
344
  });
332
345
  },
333
346
  []
334
- ), ue = n(() => {
347
+ ), de = n(() => {
335
348
  const e = k[0];
336
- return e ? (K(e), !0) : !1;
337
- }, [k]), Ue = n(() => {
338
- V(), F(), je(!1), xe(0), !ue() && C && _();
349
+ return e ? (q(e), !0) : !1;
350
+ }, [k]), Re = n(() => {
351
+ F(), O(), De(!1), we(0), !de() && R && _();
339
352
  }, [
340
- C,
341
- V,
353
+ R,
342
354
  F,
355
+ O,
343
356
  _,
344
- ue
345
- ]), Yt = n(
357
+ de
358
+ ]), tn = n(
346
359
  (e) => {
347
- if (F(), !e)
360
+ if (O(), !e)
348
361
  return;
349
362
  const t = () => {
350
- Se.current = null, xe(
351
- jr
352
- ), je(!0), z.current = null;
363
+ ve.current = null, we(
364
+ Jr
365
+ ), De(!0), J.current = null;
353
366
  };
354
- Se.current = window.setTimeout(
367
+ ve.current = window.setTimeout(
355
368
  t,
356
- Vr
369
+ zr
357
370
  );
358
371
  },
359
- [F]
360
- ), at = n(
361
- () => Me.current || !!pe.current?.querySelector(".slide-player__controls:hover"),
372
+ [O]
373
+ ), dt = n(
374
+ () => Oe.current || !!ye.current?.querySelector(".slide-player__controls:hover"),
362
375
  []
363
- ), S = n(
364
- (e = Ne) => {
365
- !h || j === "hidden" || (Ae(!0), L(), !(j === "visible" || !e || ze <= 0 || at()) && (ne.current = window.setTimeout(() => {
366
- if (at()) {
367
- ne.current = null;
376
+ ), v = n(
377
+ (e = Ve) => {
378
+ !y || j === "hidden" || (Ae(!0), V(), !(j === "visible" || !e || Je <= 0 || dt()) && (re.current = window.setTimeout(() => {
379
+ if (dt()) {
380
+ re.current = null;
368
381
  return;
369
382
  }
370
- Ae(!1), ne.current = null;
371
- }, ze)));
383
+ Ae(!1), re.current = null;
384
+ }, Je)));
372
385
  },
373
386
  [
374
- L,
375
- Ne,
376
- at,
377
- ze,
387
+ V,
388
+ Ve,
389
+ dt,
390
+ Je,
378
391
  j,
379
- h
392
+ y
380
393
  ]
381
- ), Pe = !!wr(d), W = !!d && !Pe, jn = n((e) => {
382
- kt(e);
383
- }, []), ce = n(
394
+ ), Pe = !!Fr(m), Y = !!m && !Pe, Jn = n((e) => {
395
+ Bt(e);
396
+ }, []), fe = n(
384
397
  (e) => {
385
- e && kt(e.shouldContinuePlayback);
398
+ e && Bt(e.shouldContinuePlayback);
386
399
  },
387
400
  []
388
401
  );
389
- a(() => {
390
- Mt(Ye);
391
- }, [o, Ye, Z]), a(() => {
392
- Z && et(!1);
393
- }, [o, Z]), a(() => () => {
394
- ae(), D(), L(), V(), F();
402
+ s(() => {
403
+ Nt(Qe);
404
+ }, [o, Qe, ee]), s(() => {
405
+ ee && nt(!1);
406
+ }, [o, ee]), s(() => () => {
407
+ ce(), K(), V(), F(), O();
395
408
  }, [
396
- ae,
397
- D,
398
- V,
409
+ ce,
410
+ K,
399
411
  F,
400
- L
401
- ]), a(() => {
402
- if (!Te) {
403
- D();
412
+ O,
413
+ V
414
+ ]), s(() => {
415
+ if (!Ce) {
416
+ K();
404
417
  return;
405
418
  }
406
- let e = !1, t = null, i = null;
407
- const s = () => {
408
- i?.(), i = null;
419
+ let e = !1, t = null, l = null;
420
+ const a = () => {
421
+ l?.(), l = null;
409
422
  }, u = () => {
410
- e || (s(), D(), Vn(st));
423
+ e || (a(), K(), zn(ct));
411
424
  }, r = () => {
412
425
  if (e)
413
426
  return;
414
- s();
415
- const E = ke.current?.querySelector(
427
+ a();
428
+ const T = Fe.current?.querySelector(
416
429
  '[data-active-step="true"]'
417
430
  );
418
- if (!E)
431
+ if (!T)
419
432
  return;
420
- const O = Array.from(
421
- E.querySelectorAll("iframe")
433
+ const N = Array.from(
434
+ T.querySelectorAll("iframe")
422
435
  );
423
- if (O.length === 0 || kr(O)) {
436
+ if (N.length === 0 || Dr(N)) {
424
437
  u();
425
438
  return;
426
439
  }
427
- const Ge = [], Ce = () => {
440
+ const Ge = [], _e = () => {
428
441
  e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
429
442
  t = null, r();
430
443
  }));
431
- }, dt = (Y, de, X) => {
432
- Y.addEventListener(de, X, { once: !0 }), Ge.push(
433
- () => Y.removeEventListener(de, X)
444
+ }, ht = (X, me, Q) => {
445
+ X.addEventListener(me, Q, { once: !0 }), Ge.push(
446
+ () => X.removeEventListener(me, Q)
434
447
  );
435
448
  };
436
- O.forEach((Y) => {
437
- const de = Y.contentDocument;
438
- if (!de || de.readyState !== "complete") {
439
- dt(Y, "load", Ce);
449
+ N.forEach((X) => {
450
+ const me = X.contentDocument;
451
+ if (!me || me.readyState !== "complete") {
452
+ ht(X, "load", _e);
440
453
  return;
441
454
  }
442
- Array.from(de.images).filter((X) => !X.complete).forEach((X) => {
443
- dt(X, "load", Ce), dt(X, "error", Ce);
455
+ Array.from(me.images).filter((Q) => !Q.complete).forEach((Q) => {
456
+ ht(Q, "load", _e), ht(Q, "error", _e);
444
457
  });
445
- }), i = () => {
446
- Ge.forEach((Y) => Y());
458
+ }), l = () => {
459
+ Ge.forEach((X) => X());
447
460
  };
448
461
  };
449
462
  return t = window.requestAnimationFrame(() => {
450
463
  t = null, r();
451
- }), Fe.current = window.setTimeout(() => {
464
+ }), Be.current = window.setTimeout(() => {
452
465
  u();
453
- }, _r), () => {
454
- e = !0, s(), D(), t !== null && window.cancelAnimationFrame(t);
466
+ }, jr), () => {
467
+ e = !0, a(), K(), t !== null && window.cancelAnimationFrame(t);
455
468
  };
456
469
  }, [
457
- D,
458
- P,
470
+ K,
471
+ C,
459
472
  o,
460
- st,
461
- Te
462
- ]), a(() => (Je?.(x), () => {
463
- Je?.(!1);
464
- }), [Je, x]), a(() => {
465
- x || (Me.current = !1);
466
- }, [x]), a(() => {
467
- N || qe === He || (rt(!1), nt(He));
468
- }, [N, qe]), a(() => {
469
- if (!N) {
470
- Lt(!1);
473
+ ct,
474
+ Ce
475
+ ]), s(() => (We?.(x), () => {
476
+ We?.(!1);
477
+ }), [We, x]), s(() => {
478
+ x || (Oe.current = !1);
479
+ }, [x]), s(() => {
480
+ L || Ke === $e || (lt(!1), it($e));
481
+ }, [L, Ke]), s(() => {
482
+ if (!L) {
483
+ Kt(!1);
471
484
  return;
472
485
  }
473
486
  const e = () => {
474
- Lt(nn());
487
+ Kt(un());
475
488
  };
476
- return e(), ur(e);
477
- }, [N]), a(() => {
478
- St?.(ie);
479
- }, [ie, St]), a(() => {
480
- Tn.current = ie;
481
- }, [ie]), a(() => {
482
- vt?.(ge, o);
483
- }, [o, ge, vt]), a(() => {
484
- const e = Pt.current, t = Ar(
489
+ return e(), vr(e);
490
+ }, [L]), s(() => {
491
+ At?.(ae);
492
+ }, [ae, At]), s(() => {
493
+ Bn.current = ae;
494
+ }, [ae]), s(() => {
495
+ xt?.(ge, o);
496
+ }, [o, ge, xt]), s(() => {
497
+ const e = kt.current, t = _r(
485
498
  {
486
499
  previousMarkerCount: e.markerCount,
487
- nextMarkerCount: T.length,
500
+ nextMarkerCount: E.length,
488
501
  previousIndex: e.currentIndex,
489
502
  previousCanGoNext: e.canGoNext,
490
- nextCanGoNext: C,
491
- currentAudioKey: I,
503
+ nextCanGoNext: R,
504
+ currentAudioKey: A,
492
505
  hasCompletedCurrentStepAudio: M,
493
506
  hasResolvedCurrentInteraction: Pe,
494
- currentStepHasSpeakableElement: b,
495
- currentInteractionElement: d,
496
- isAutoAdvanceEnabled: Ie,
507
+ currentStepHasSpeakableElement: I,
508
+ currentInteractionElement: m,
509
+ isAutoAdvanceEnabled: xe,
497
510
  shouldUseSilentStepAutoAdvanceToggle: Ee
498
511
  }
499
512
  );
500
- Pt.current = {
501
- markerCount: T.length,
513
+ kt.current = {
514
+ markerCount: E.length,
502
515
  currentIndex: o,
503
- canGoNext: C
516
+ canGoNext: R
504
517
  }, t && _();
505
518
  }, [
506
- C,
507
- I,
519
+ R,
520
+ A,
508
521
  o,
509
- d,
510
- b,
522
+ m,
523
+ I,
511
524
  _,
512
525
  M,
513
526
  Pe,
514
- Ie,
527
+ xe,
515
528
  Ee,
516
- T.length
517
- ]), a(() => {
518
- if (!h || j === "hidden") {
519
- L(), Ae(!1);
529
+ E.length
530
+ ]), s(() => {
531
+ if (!y || j === "hidden") {
532
+ V(), Ae(!1);
520
533
  return;
521
534
  }
522
535
  if (j === "visible") {
523
- L(), Ae(!0);
536
+ V(), Ae(!0);
524
537
  return;
525
538
  }
526
- Ne || S(!0);
539
+ Ve || v(!0);
527
540
  }, [
528
- L,
529
- Ne,
541
+ V,
542
+ Ve,
530
543
  j,
531
- h,
532
- S
533
- ]), a(() => {
544
+ y,
545
+ v
546
+ ]), s(() => {
534
547
  if (typeof window > "u")
535
548
  return;
536
549
  const e = (t) => {
537
- t.origin === window.location.origin && lr(t.data) && t.data.eventType === "click" && h && (q(), oe(!0), S(!0));
550
+ t.origin === window.location.origin && pr(t.data) && t.data.eventType === "click" && y && (D(), ie(!0), v(!0));
538
551
  };
539
552
  return window.addEventListener("message", e), () => {
540
553
  window.removeEventListener("message", e);
541
554
  };
542
- }, [q, h, S]), pr({
543
- sectionRef: pe,
544
- enabled: h,
545
- keyboardShortcutsEnabled: te,
546
- onKeyboardShortcut: q,
555
+ }, [D, y, v]), xr({
556
+ sectionRef: ye,
557
+ enabled: y,
558
+ keyboardShortcutsEnabled: ne,
559
+ onKeyboardShortcut: D,
547
560
  onWake: () => {
548
- q(), oe(!0), S(!0);
561
+ D(), ie(!0), v(!0);
549
562
  }
550
- }), a(() => {
551
- if (!h) {
563
+ }), s(() => {
564
+ if (!y) {
552
565
  B();
553
566
  return;
554
567
  }
555
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Ir({
556
- previousResetKey: Tt.current,
557
- nextResetKey: we,
558
- currentAudioKey: I,
568
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = kr({
569
+ previousResetKey: _t.current,
570
+ nextResetKey: Te,
571
+ currentAudioKey: A,
559
572
  hasCompletedCurrentStepAudio: M
560
573
  });
561
- Tt.current = we;
562
- const i = z.current === o && !!d, s = br({
563
- hasInteraction: !!d,
564
- shouldBlockPlaybackForInteraction: W,
565
- shouldOpenInteractionOverlayAfterAudio: i,
574
+ _t.current = Te;
575
+ const l = J.current === o && !!m, a = Rr({
576
+ hasInteraction: !!m,
577
+ shouldBlockPlaybackForInteraction: Y,
578
+ shouldOpenInteractionOverlayAfterAudio: l,
566
579
  hasPlaybackContextChanged: e,
567
580
  hasResolvedCurrentInteraction: Pe,
568
- currentStepHasSpeakableElement: b
569
- }), u = be.current, r = u?.slideIndex === o;
581
+ currentStepHasSpeakableElement: I
582
+ }), u = Ie.current, r = u?.slideIndex === o;
570
583
  if (e && B({
571
584
  preservePendingSubtitleJump: r
572
- }), !(P.length === 0 && !d) && !J) {
573
- if (u?.slideIndex === o && rn({
585
+ }), !(C.length === 0 && !m) && !W) {
586
+ if (u?.slideIndex === o && cn({
574
587
  currentIndex: o,
575
- resolvedCurrentInteractionElement: A,
576
- slideElementList: T,
588
+ resolvedCurrentInteractionElement: S,
589
+ slideElementList: E,
577
590
  targetSlideIndex: u.slideIndex
578
591
  })) {
579
- be.current = null, We.current = !0, K(u.audioKey), De({
592
+ Ie.current = null, Xe.current = !0, q(u.audioKey), He({
580
593
  audioIndex: u.audioIndex,
581
594
  timeMs: u.timeMs
582
595
  });
583
596
  return;
584
597
  }
585
- if (d && tt(d), s) {
586
- Yt(d);
598
+ if (m && rt(m), a) {
599
+ tn(m);
587
600
  return;
588
601
  }
589
- if (F(), z.current = null, !!t && !ue()) {
590
- if (b) {
591
- if (R) {
602
+ if (O(), J.current = null, !!t && !de()) {
603
+ if (I) {
604
+ if (P) {
592
605
  g(!1);
593
606
  return;
594
607
  }
595
608
  g(!0);
596
609
  return;
597
610
  }
598
- if (C && !(Ee && !Ie) && !(Te && !Wt))
599
- return he.current = window.setTimeout(() => {
600
- he.current = null, _();
601
- }, Jt), () => {
602
- ae();
611
+ if (R && !(Ee && !xe) && !(Ce && !en))
612
+ return Se.current = window.setTimeout(() => {
613
+ Se.current = null, _();
614
+ }, Zt), () => {
615
+ ce();
603
616
  };
604
617
  }
605
618
  }
606
619
  }, [
607
- A,
608
- C,
609
- ae,
610
- P.length,
620
+ S,
621
+ R,
622
+ ce,
623
+ C.length,
611
624
  o,
612
- d,
613
- I,
614
- we,
615
- b,
625
+ m,
626
+ A,
616
627
  Te,
617
- Wt,
618
- Jt,
628
+ I,
629
+ Ce,
630
+ en,
631
+ Zt,
619
632
  _,
620
633
  M,
621
- R,
622
- Ie,
634
+ P,
635
+ xe,
623
636
  Pe,
624
- W,
625
- F,
637
+ Y,
638
+ O,
626
639
  B,
627
- De,
628
- Yt,
629
- h,
630
- T,
631
- ue,
632
- J,
640
+ He,
641
+ tn,
642
+ y,
643
+ E,
644
+ de,
645
+ W,
633
646
  Ee
634
- ]), a(() => {
635
- if (R || J || !b || W) {
647
+ ]), s(() => {
648
+ if (P || W || !I || Y) {
636
649
  g(!1);
637
650
  return;
638
651
  }
@@ -640,179 +653,193 @@ const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
640
653
  g(!1);
641
654
  return;
642
655
  }
643
- if (Gt) {
656
+ if (Wt) {
644
657
  g(!1);
645
658
  return;
646
659
  }
647
- Xe("waitingForAudio"), g(!0);
660
+ Ze("waitingForAudio"), g(!0);
648
661
  }, [
649
- Gt,
650
- b,
662
+ Wt,
663
+ I,
651
664
  M,
652
- R,
653
- J,
654
- W
655
- ]), a(() => {
656
- const e = We.current;
657
- We.current = !1, xr({
658
- currentAudioKey: I,
665
+ P,
666
+ W,
667
+ Y
668
+ ]), s(() => {
669
+ const e = Xe.current;
670
+ Xe.current = !1, Mr({
671
+ currentAudioKey: A,
659
672
  currentAudioSequenceLength: k.length,
660
- currentStepHasSpeakableElement: b,
673
+ currentStepHasSpeakableElement: I,
661
674
  hasCompletedCurrentStepAudio: M,
662
- shouldBlockPlaybackForInteraction: W,
663
- shouldPausePlaybackForCustomAction: J,
675
+ shouldBlockPlaybackForInteraction: Y,
676
+ shouldPausePlaybackForCustomAction: W,
664
677
  shouldSkipDefaultAudioStart: e
665
- }) && ue();
678
+ }) && de();
666
679
  }, [
667
- I,
680
+ A,
668
681
  k,
669
- b,
682
+ I,
670
683
  M,
671
- J,
672
684
  W,
673
- ue
674
- ]), a(() => {
675
- !I || w >= 0 || K(null);
676
- }, [w, I]), a(() => {
677
- w >= 0 || le.reset();
678
- }, [w, le]), a(() => {
679
- Le(!1);
680
- }, [Nn]);
685
+ Y,
686
+ de
687
+ ]), s(() => {
688
+ !A || w >= 0 || q(null);
689
+ }, [w, A]), s(() => {
690
+ w >= 0 || se.reset();
691
+ }, [w, se]), s(() => {
692
+ je(!1);
693
+ }, [Gn]);
681
694
  const {
682
- interactionDefaults: Xt,
683
- interactionDefaultSelectedValues: qn,
684
- isInteractionReadonly: Kn,
685
- shouldAutoContinueInteraction: Qt
695
+ interactionDefaults: nn,
696
+ interactionDefaultSelectedValues: Wn,
697
+ hasResolvedInteractionInput: ft,
698
+ isInteractionReadonly: Yn,
699
+ shouldAutoContinueInteraction: rn
686
700
  } = c(
687
- () => Cr(A, {
688
- interactionDefaultValueOptions: ht
701
+ () => Lr(S, {
702
+ interactionDefaultValueOptions: It
689
703
  }),
690
- [A, ht]
691
- ), ut = vr({
692
- hasActiveInteraction: !!A,
693
- isInteractionOverlayOpen: Ve,
694
- shouldBlockPlaybackForInteraction: W,
704
+ [S, It]
705
+ ), on = !!S?.readonly || Yn, mt = Cr({
706
+ hasActiveInteraction: !!S,
707
+ isInteractionOverlayOpen: le,
708
+ shouldBlockPlaybackForInteraction: Y && !on && !ft,
695
709
  playerControlsVisible: x,
696
- shouldMountPlayer: h
697
- }), Dn = n(
710
+ shouldMountPlayer: y,
711
+ hasFocusedTextInput: _n
712
+ }), Xn = n(
698
713
  (e) => {
699
- const i = [
714
+ const l = [
700
715
  ...e.selectedValues ?? [],
701
716
  e.inputText?.trim() ?? "",
702
717
  e.buttonText?.trim() ?? ""
703
718
  ].filter(Boolean).join(", ");
704
- tt((s) => !s || !i ? s : {
705
- ...s,
706
- user_input: i
707
- }), yt?.(e, A), Ue();
719
+ rt((a) => !a || !l ? a : {
720
+ ...a,
721
+ user_input: l
722
+ }), gt?.(e, S), Re();
708
723
  },
709
- [A, Ue, yt]
724
+ [S, Re, gt]
710
725
  );
711
- a(() => {
726
+ s(() => {
712
727
  const e = () => {
713
- xn(document.fullscreenElement === pe.current);
728
+ Mn(document.fullscreenElement === ye.current);
714
729
  };
715
730
  return e(), document.addEventListener("fullscreenchange", e), () => {
716
731
  document.removeEventListener("fullscreenchange", e);
717
732
  };
718
- }, []), a(() => {
719
- if (!ut) {
720
- xe(0);
733
+ }, []), s(() => {
734
+ S && le || (qe(!1), ot(!1));
735
+ }, [S, le]), s(() => {
736
+ if (!mt) {
737
+ we(0);
721
738
  return;
722
739
  }
723
- const e = xt.current;
740
+ const e = Ye.current;
724
741
  if (!e)
725
742
  return;
726
743
  const t = () => {
727
- const s = Math.ceil(
744
+ const a = Math.ceil(
728
745
  e.getBoundingClientRect().height
729
746
  );
730
- xe(
731
- s + qr
747
+ we(
748
+ a + Wr
732
749
  );
733
750
  };
734
751
  if (t(), typeof ResizeObserver > "u")
735
752
  return;
736
- const i = new ResizeObserver(() => {
753
+ const l = new ResizeObserver(() => {
737
754
  t();
738
755
  });
739
- return i.observe(e), () => {
740
- i.disconnect();
756
+ return l.observe(e), () => {
757
+ l.disconnect();
741
758
  };
742
- }, [ut]), a(() => {
743
- if (V(), !(!Ve || !Qt))
744
- return ye.current = window.setTimeout(() => {
745
- ye.current = null, Ue();
746
- }, 2e3), () => {
747
- V();
748
- };
759
+ }, [mt]), s(() => {
760
+ if (F(), !!le) {
761
+ if (rn)
762
+ return z.current = window.setTimeout(() => {
763
+ z.current = null, Re();
764
+ }, dn), () => {
765
+ F();
766
+ };
767
+ if (!(jt || !ft))
768
+ return z.current = window.setTimeout(() => {
769
+ z.current = null, Re();
770
+ }, dn), () => {
771
+ F();
772
+ };
773
+ }
749
774
  }, [
750
- V,
751
- Ue,
752
- Ve,
753
- Qt
775
+ F,
776
+ Re,
777
+ jt,
778
+ ft,
779
+ le,
780
+ rn
754
781
  ]);
755
- const Un = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ l.jsx(l.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ l.jsx(
756
- tn,
782
+ const Qn = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ i.jsx(i.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ i.jsx(
783
+ an,
757
784
  {
758
785
  className: "content-render-iframe",
759
- disableLoadingOverlay: R,
786
+ disableLoadingOverlay: P,
760
787
  hideFullScreen: !0,
761
- locale: p,
788
+ locale: h,
762
789
  mode: "blackboard",
763
790
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
764
791
  type: "sandbox",
765
792
  content: e.content,
766
- enableScaling: sn
793
+ enableScaling: hn
767
794
  }
768
- ) : /* @__PURE__ */ l.jsx(
769
- tn,
795
+ ) : /* @__PURE__ */ i.jsx(
796
+ an,
770
797
  {
771
798
  className: "content-render-iframe",
772
- disableLoadingOverlay: R,
799
+ disableLoadingOverlay: P,
773
800
  hideFullScreen: !0,
774
- locale: p,
801
+ locale: h,
775
802
  mode: "blackboard",
776
803
  type: "markdown",
777
804
  content: e.content
778
805
  }
779
- ) : null, Gn = (e = [], t = !1) => {
806
+ ) : null, Zn = (e = [], t = !1) => {
780
807
  if (e.length === 0)
781
808
  return null;
782
- const i = e.filter(
809
+ const l = e.filter(
783
810
  (r) => r.is_renderable !== !1
784
- ).length, s = t && an ? gr(e) : "disabled", u = e.reduce(
785
- (r, E, O) => E.is_renderable !== !1 ? O : r,
811
+ ).length, a = t && yn ? Pr(e) : "disabled", u = e.reduce(
812
+ (r, T, N) => T.is_renderable !== !1 ? N : r,
786
813
  -1
787
814
  );
788
- return /* @__PURE__ */ l.jsx(
789
- dr,
815
+ return /* @__PURE__ */ i.jsx(
816
+ Ir,
790
817
  {
791
818
  className: "slide-stage__content flex w-full flex-col gap-4",
792
- mode: s,
793
- children: e.map((r, E) => {
794
- const O = r.type === "html" && r.is_renderable === !1;
795
- return /* @__PURE__ */ l.jsx(
819
+ mode: a,
820
+ children: e.map((r, T) => {
821
+ const N = r.type === "html" && r.is_renderable === !1;
822
+ return /* @__PURE__ */ i.jsx(
796
823
  "div",
797
824
  {
798
- ref: t && E === u ? It : null,
799
- "aria-hidden": O || void 0,
800
- className: fe(
825
+ ref: t && T === u ? Ct : null,
826
+ "aria-hidden": N || void 0,
827
+ className: pe(
801
828
  "w-full shrink-0",
802
- i === 1 && r.is_renderable !== !1 && "slide-element--single",
803
- O ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : r.is_renderable === !1 && "hidden"
829
+ l === 1 && r.is_renderable !== !1 && "slide-element--single",
830
+ N ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : r.is_renderable === !1 && "hidden"
804
831
  ),
805
- children: Un(r, {
806
- replaceRootScreenHeightWithFull: i === 1 && r.type === "html" && r.is_renderable !== !1
832
+ children: Qn(r, {
833
+ replaceRootScreenHeightWithFull: l === 1 && r.type === "html" && r.is_renderable !== !1
807
834
  })
808
835
  },
809
- r.sequence_number ?? `${r.type}-${E}`
836
+ r.sequence_number ?? `${r.type}-${T}`
810
837
  );
811
838
  })
812
839
  }
813
840
  );
814
- }, Hn = n(() => {
815
- const e = pe.current;
841
+ }, er = n(() => {
842
+ const e = ye.current;
816
843
  if (e) {
817
844
  if (document.fullscreenElement === e) {
818
845
  document.exitFullscreen().catch(() => {
@@ -822,219 +849,219 @@ const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
822
849
  e.requestFullscreen?.().catch(() => {
823
850
  });
824
851
  }
825
- }, []), Zt = n(() => {
826
- const e = ke.current;
852
+ }, []), ln = n(() => {
853
+ const e = Fe.current;
827
854
  e && e.scrollTo({
828
855
  top: e.scrollHeight,
829
856
  behavior: "smooth"
830
857
  });
831
- }, []), ct = n(
832
- (e) => rn({
858
+ }, []), pt = n(
859
+ (e) => cn({
833
860
  currentIndex: o,
834
- resolvedCurrentInteractionElement: A,
835
- slideElementList: T,
836
- targetSlideIndex: Be[e.audioIndex]
861
+ resolvedCurrentInteractionElement: S,
862
+ slideElementList: E,
863
+ targetSlideIndex: Ne[e.audioIndex]
837
864
  }),
838
865
  [
839
- A,
840
- Be,
866
+ S,
867
+ Ne,
841
868
  o,
842
- T
869
+ E
843
870
  ]
844
- ), $n = n(
871
+ ), tr = n(
845
872
  (e, t) => {
846
- const s = v[e.audioIndex]?.audioKey, u = Be[e.audioIndex];
847
- return !s || u == null || !ct(e) ? !1 : (ce(t), z.current = null, g(!1), Qe(!1), Le(!1), ft(t) && (oe(!0), S(!0)), u === o ? (be.current = null, B(), K(s), De(e), !0) : (ve.current = !0, B(), be.current = {
873
+ const a = b[e.audioIndex]?.audioKey, u = Ne[e.audioIndex];
874
+ return !a || u == null || !pt(e) ? !1 : (fe(t), J.current = null, g(!1), et(!1), je(!1), yt(t) && (ie(!0), v(!0)), u === o ? (Ie.current = null, B(), q(a), He(e), !0) : (be.current = !0, B(), Ie.current = {
848
875
  audioIndex: e.audioIndex,
849
- audioKey: s,
876
+ audioKey: a,
850
877
  slideIndex: u,
851
878
  timeMs: e.timeMs
852
- }, _t(u), !0));
879
+ }, Ot(u), !0));
853
880
  },
854
881
  [
855
- v,
856
- Be,
857
- ct,
882
+ b,
883
+ Ne,
884
+ pt,
858
885
  o,
859
- _t,
860
- De,
886
+ Ot,
887
+ He,
861
888
  B,
862
- S,
863
- ce
889
+ v,
890
+ fe
864
891
  ]
865
- ), zn = n(
892
+ ), nr = n(
866
893
  (e) => {
867
- ce(e), ve.current = !0, z.current = null, g(!1), ft(e) && (oe(!0), S(!0)), B(), Rt();
894
+ fe(e), be.current = !0, J.current = null, g(!1), yt(e) && (ie(!0), v(!0)), B(), Ft();
868
895
  },
869
896
  [
870
- Rt,
897
+ Ft,
871
898
  B,
872
- S,
873
- ce
899
+ v,
900
+ fe
874
901
  ]
875
- ), Jn = n(
902
+ ), rr = n(
876
903
  (e) => {
877
- ce(e), ve.current = !0, z.current = null, g(!1), ft(e) && (oe(!0), S(!0)), B(), _();
904
+ fe(e), be.current = !0, J.current = null, g(!1), yt(e) && (ie(!0), v(!0)), B(), _();
878
905
  },
879
906
  [
880
907
  _,
881
908
  B,
882
- S,
883
- ce
909
+ v,
910
+ fe
884
911
  ]
885
- ), Wn = n(
912
+ ), or = n(
886
913
  ({
887
914
  loading: e,
888
915
  reason: t
889
916
  }) => {
890
- if (R) {
917
+ if (P) {
891
918
  g(!1);
892
919
  return;
893
920
  }
894
- if (!b || M) {
921
+ if (!I || M) {
895
922
  g(!1);
896
923
  return;
897
924
  }
898
- e && t && Xe(t), g(Ur(t, e));
925
+ e && t && Ze(t), g(Zr(t, e));
899
926
  },
900
927
  [
901
- b,
928
+ I,
902
929
  M,
903
- R
930
+ P
904
931
  ]
905
932
  );
906
- a(() => {
907
- R && g(!1);
908
- }, [R]);
909
- const Yn = n(
933
+ s(() => {
934
+ P && g(!1);
935
+ }, [P]);
936
+ const ir = n(
910
937
  (e) => {
911
- const t = v[e]?.audioKey;
912
- if (!t || !I || t !== I)
938
+ const t = b[e]?.audioKey;
939
+ if (!t || !A || t !== A)
913
940
  return;
914
- const i = k.findIndex(
941
+ const l = k.findIndex(
915
942
  (r) => r === t
916
943
  );
917
- if (i < 0) {
918
- K(null);
944
+ if (l < 0) {
945
+ q(null);
919
946
  return;
920
947
  }
921
- const s = i + 1, u = k[s];
948
+ const a = l + 1, u = k[a];
922
949
  if (u) {
923
- K(u);
950
+ q(u);
924
951
  return;
925
952
  }
926
- if (K(null), Qe(!0), g(!1), C) {
927
- const r = o + 1, E = T[r];
928
- $t && E?.type === "interaction" && (z.current = r), _();
953
+ if (q(null), et(!0), g(!1), R) {
954
+ const r = o + 1, T = E[r];
955
+ Xt && T?.type === "interaction" && (J.current = r), _();
929
956
  return;
930
957
  }
931
958
  },
932
959
  [
933
- v,
934
- C,
960
+ b,
961
+ R,
935
962
  o,
936
- I,
963
+ A,
937
964
  k,
938
965
  _,
939
- $t,
940
- T
966
+ Xt,
967
+ E
941
968
  ]
942
- ), Xn = n(() => {
943
- A && je((e) => !e);
944
- }, [A]), Qn = n(() => {
945
- Me.current = !0, L(), h && Ae(!0);
946
- }, [L, h]), Zn = n(() => {
947
- Me.current = !1, S(!0);
948
- }, [S]), en = n(
969
+ ), lr = n(() => {
970
+ S && De((e) => !e);
971
+ }, [S]), sr = n(() => {
972
+ Oe.current = !0, V(), y && Ae(!0);
973
+ }, [V, y]), ar = n(() => {
974
+ Oe.current = !1, v(!0);
975
+ }, [v]), sn = n(
949
976
  (e) => {
950
- e.stopPropagation(), x && S(!0);
977
+ e.stopPropagation(), x && v(!0);
951
978
  },
952
- [x, S]
953
- ), er = n(
979
+ [x, v]
980
+ ), ur = n(
954
981
  (e) => {
955
- q(), bt?.(e);
982
+ D(), wt?.(e);
956
983
  },
957
- [q, bt]
958
- ), tr = n(
984
+ [D, wt]
985
+ ), cr = n(
959
986
  (e) => {
960
- q(), gt?.(e);
987
+ D(), Tt?.(e);
961
988
  },
962
- [q, gt]
963
- ), nr = n(() => {
964
- oe(!0), S(!0);
965
- }, [S]);
966
- return a(() => {
967
- const e = wt.current, s = (e.length > 0 && e.length < re.length && e.every((r, E) => r === re[E]) ? P.slice(e.length) : []).some(
989
+ [D, Tt]
990
+ ), dr = n(() => {
991
+ ie(!0), v(!0);
992
+ }, [v]);
993
+ return s(() => {
994
+ const e = Rt.current, a = (e.length > 0 && e.length < oe.length && e.every((r, T) => r === oe[T]) ? C.slice(e.length) : []).some(
968
995
  (r) => r.is_new === !1
969
996
  );
970
- if (wt.current = re, !s)
997
+ if (Rt.current = oe, !a)
971
998
  return;
972
999
  const u = window.requestAnimationFrame(() => {
973
- const r = ke.current, E = It.current;
974
- if (!r || !E)
1000
+ const r = Fe.current, T = Ct.current;
1001
+ if (!r || !T)
975
1002
  return;
976
- const O = r.getBoundingClientRect(), Ge = E.getBoundingClientRect(), Ce = r.scrollTop + (Ge.top - O.top);
1003
+ const N = r.getBoundingClientRect(), Ge = T.getBoundingClientRect(), _e = r.scrollTop + (Ge.top - N.top);
977
1004
  r.scrollTo({
978
- top: Math.max(Ce, 0),
1005
+ top: Math.max(_e, 0),
979
1006
  behavior: "smooth"
980
1007
  });
981
1008
  });
982
1009
  return () => {
983
1010
  window.cancelAnimationFrame(u);
984
1011
  };
985
- }, [P, re]), a(() => {
986
- if (!ve.current || (ve.current = !1, P.length === 0))
1012
+ }, [C, oe]), s(() => {
1013
+ if (!be.current || (be.current = !1, C.length === 0))
987
1014
  return;
988
1015
  const e = window.requestAnimationFrame(() => {
989
- Zt();
1016
+ ln();
990
1017
  });
991
1018
  return () => {
992
1019
  window.cancelAnimationFrame(e);
993
1020
  };
994
- }, [P, Zt]), /* @__PURE__ */ l.jsxs(
1021
+ }, [C, ln]), /* @__PURE__ */ i.jsxs(
995
1022
  "section",
996
1023
  {
997
- ref: pe,
998
- className: fe(
1024
+ ref: ye,
1025
+ className: pe(
999
1026
  "relative h-full w-full",
1000
- N && "slide--mobile-device",
1001
- jt && "slide--browser-fullscreen",
1002
- se && "slide--mobile-landscape",
1003
- Vt && "slide--mobile-landscape-native",
1004
- un
1027
+ L && "slide--mobile-device",
1028
+ Ht && "slide--browser-fullscreen",
1029
+ ue && "slide--mobile-landscape",
1030
+ Ut && "slide--mobile-landscape-native",
1031
+ Sn
1005
1032
  ),
1006
- onClick: nr,
1007
- onFocusCapture: tr,
1008
- onPointerDown: er,
1009
- ...cn,
1033
+ onClick: dr,
1034
+ onFocusCapture: cr,
1035
+ onPointerDown: ur,
1036
+ ...vn,
1010
1037
  children: [
1011
- Rn ? /* @__PURE__ */ l.jsx(
1038
+ Vn ? /* @__PURE__ */ i.jsx(
1012
1039
  "div",
1013
1040
  {
1014
1041
  "aria-hidden": "true",
1015
1042
  className: "pointer-events-none fixed left-0 top-0 z-[9999] h-[100vh] max-h-[100vh] w-[100vw]"
1016
1043
  }
1017
1044
  ) : null,
1018
- /* @__PURE__ */ l.jsxs(
1045
+ /* @__PURE__ */ i.jsxs(
1019
1046
  "div",
1020
1047
  {
1021
- ref: At,
1022
- className: fe(
1048
+ ref: Et,
1049
+ className: pe(
1023
1050
  "slide__viewport relative h-full min-h-0 w-full",
1024
- se && "slide__viewport--mobile-landscape",
1025
- se && !En && "slide__viewport--mobile-landscape-native"
1051
+ ue && "slide__viewport--mobile-landscape",
1052
+ ue && !On && "slide__viewport--mobile-landscape-native"
1026
1053
  ),
1027
1054
  children: [
1028
- Pn ? /* @__PURE__ */ l.jsxs("div", { className: "slide-landscape-header", children: [
1029
- /* @__PURE__ */ l.jsx(
1055
+ Nn ? /* @__PURE__ */ i.jsxs("div", { className: "slide-landscape-header", children: [
1056
+ /* @__PURE__ */ i.jsx(
1030
1057
  "button",
1031
1058
  {
1032
- "aria-label": H?.backAriaLabel ?? $.fullscreenBackAriaLabel,
1059
+ "aria-label": G?.backAriaLabel ?? $.fullscreenBackAriaLabel,
1033
1060
  className: "slide-landscape-header__back",
1034
- onClick: kn,
1061
+ onClick: Dn,
1035
1062
  type: "button",
1036
- children: /* @__PURE__ */ l.jsx(
1037
- Nr,
1063
+ children: /* @__PURE__ */ i.jsx(
1064
+ Gr,
1038
1065
  {
1039
1066
  className: "slide-landscape-header__icon h-6 w-6",
1040
1067
  strokeWidth: 2.25
@@ -1042,29 +1069,29 @@ const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
1042
1069
  )
1043
1070
  }
1044
1071
  ),
1045
- H?.content ? /* @__PURE__ */ l.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: H.content }) : null
1072
+ G?.content ? /* @__PURE__ */ i.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: G.content }) : null
1046
1073
  ] }) : null,
1047
- /* @__PURE__ */ l.jsx(
1074
+ /* @__PURE__ */ i.jsx(
1048
1075
  "div",
1049
1076
  {
1050
- className: fe(
1077
+ className: pe(
1051
1078
  "h-full min-h-0 w-full",
1052
- Cn && "slide__viewport-content--with-header",
1053
- pn ? "slide-content--single" : "grid gap-4"
1079
+ Ln && "slide__viewport-content--with-header",
1080
+ An ? "slide-content--single" : "grid gap-4"
1054
1081
  ),
1055
- children: P.length > 0 ? /* @__PURE__ */ l.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ l.jsx("div", { ref: ke, className: "slide-stage__layer w-full", children: Mn.map(
1082
+ children: C.length > 0 ? /* @__PURE__ */ i.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ i.jsx("div", { ref: Fe, className: "slide-stage__layer w-full", children: qn.map(
1056
1083
  (e, t) => {
1057
- const i = t === Fn;
1058
- return /* @__PURE__ */ l.jsx(
1084
+ const l = t === Kn;
1085
+ return /* @__PURE__ */ i.jsx(
1059
1086
  "div",
1060
1087
  {
1061
- "data-active-step": i ? "true" : void 0,
1062
- "aria-hidden": !i || void 0,
1088
+ "data-active-step": l ? "true" : void 0,
1089
+ "aria-hidden": !l || void 0,
1063
1090
  className: "w-full h-full",
1064
- style: { display: i ? void 0 : "none" },
1065
- children: Gn(
1091
+ style: { display: l ? void 0 : "none" },
1092
+ children: Zn(
1066
1093
  e.elementList,
1067
- i
1094
+ l
1068
1095
  )
1069
1096
  },
1070
1097
  e.sourceStepIndexes[0] ?? t
@@ -1073,110 +1100,125 @@ const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
1073
1100
  ) }) }) : null
1074
1101
  }
1075
1102
  ),
1076
- vn ? /* @__PURE__ */ l.jsx(
1077
- ir,
1103
+ En ? /* @__PURE__ */ i.jsx(
1104
+ hr,
1078
1105
  {
1079
- message: Kr(
1080
- dn,
1081
- bn
1106
+ message: Xr(
1107
+ bn,
1108
+ Cn
1082
1109
  ),
1083
1110
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
1084
1111
  }
1085
1112
  ) : null,
1086
- /* @__PURE__ */ l.jsx(
1087
- fr,
1113
+ /* @__PURE__ */ i.jsx(
1114
+ gr,
1088
1115
  {
1089
- extraBottomOffset: In,
1116
+ extraBottomOffset: kn,
1090
1117
  hasPlayerGap: x,
1091
- isEnabled: Bt && gn,
1092
- isPlayerHidden: h && !x,
1093
- playbackTimeStore: le,
1094
- subtitleCues: Bn
1118
+ isEnabled: Vt && Rn,
1119
+ isPlayerHidden: y && !x,
1120
+ playbackTimeStore: se,
1121
+ subtitleCues: Un
1095
1122
  }
1096
1123
  ),
1097
- ut ? /* @__PURE__ */ l.jsx(
1124
+ mt ? /* @__PURE__ */ i.jsx(
1098
1125
  "div",
1099
1126
  {
1100
- ref: xt,
1127
+ ref: Ye,
1101
1128
  "data-player-keyboard-shortcuts-ignore": "true",
1102
- className: fe(
1129
+ className: pe(
1103
1130
  "slide-interaction-overlay",
1104
- x && h ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
1131
+ x && y ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
1105
1132
  ),
1106
- onClick: en,
1107
- onPointerDown: en,
1108
- style: On,
1109
- children: /* @__PURE__ */ l.jsx(
1110
- on,
1133
+ onClick: sn,
1134
+ onPointerDown: sn,
1135
+ onPointerDownCapture: (e) => {
1136
+ St(e.target) && qe(!0);
1137
+ },
1138
+ onFocusCapture: (e) => {
1139
+ fn(e.target) && ot(!0), St(e.target) && qe(!0);
1140
+ },
1141
+ onBlurCapture: (e) => {
1142
+ if (!fn(e.target))
1143
+ return;
1144
+ const t = e.relatedTarget;
1145
+ t instanceof HTMLElement && Ye.current?.contains(t) || ot(!1);
1146
+ },
1147
+ onInputCapture: (e) => {
1148
+ St(e.target) && qe(!0);
1149
+ },
1150
+ style: Hn,
1151
+ children: /* @__PURE__ */ i.jsx(
1152
+ mn,
1111
1153
  {
1112
- content: String(A?.content ?? ""),
1113
- locale: p,
1114
- defaultButtonText: Xt.buttonText ?? "",
1115
- defaultInputText: Xt.inputText ?? "",
1116
- defaultSelectedValues: qn,
1117
- confirmButtonText: ee?.confirmButtonText ?? $.interactionTexts.confirmButtonText,
1118
- copyButtonText: ee?.copyButtonText ?? $.interactionTexts.copyButtonText,
1119
- copiedButtonText: ee?.copiedButtonText ?? $.interactionTexts.copiedButtonText,
1120
- onSend: Dn,
1121
- readonly: Kn,
1122
- title: ee?.title ?? $e ?? $.interactionTexts.title
1154
+ content: String(S?.content ?? ""),
1155
+ locale: h,
1156
+ defaultButtonText: nn.buttonText ?? "",
1157
+ defaultInputText: nn.inputText ?? "",
1158
+ defaultSelectedValues: Wn,
1159
+ confirmButtonText: te?.confirmButtonText ?? $.interactionTexts.confirmButtonText,
1160
+ copyButtonText: te?.copyButtonText ?? $.interactionTexts.copyButtonText,
1161
+ copiedButtonText: te?.copiedButtonText ?? $.interactionTexts.copiedButtonText,
1162
+ onSend: Xn,
1163
+ readonly: on,
1164
+ title: te?.title ?? ze ?? $.interactionTexts.title
1123
1165
  }
1124
1166
  )
1125
1167
  }
1126
1168
  ) : null,
1127
- h ? /* @__PURE__ */ l.jsx(
1128
- hr.Provider,
1169
+ y ? /* @__PURE__ */ i.jsx(
1170
+ wr.Provider,
1129
1171
  {
1130
- value: hn,
1131
- children: /* @__PURE__ */ l.jsx(
1132
- cr,
1172
+ value: xn,
1173
+ children: /* @__PURE__ */ i.jsx(
1174
+ br,
1133
1175
  {
1134
- audioList: v,
1135
- className: fe(
1176
+ audioList: b,
1177
+ className: pe(
1136
1178
  "absolute left-1/2 z-[2] -translate-x-1/2",
1137
- jt ? "bottom-3" : "-bottom-3",
1138
- G,
1179
+ Ht ? "bottom-3" : "-bottom-3",
1180
+ H,
1139
1181
  !x && "pointer-events-none opacity-0"
1140
1182
  ),
1141
1183
  currentAudioIndex: w,
1142
- defaultPlaying: Ye,
1143
- enableKeyboardShortcuts: te,
1144
- isPlaybackPaused: J,
1145
- isAutoAdvanceEnabled: Ie,
1146
- locale: p,
1147
- hasInteraction: !!A,
1148
- isInteractionOpen: Ve,
1149
- isSubtitleEnabled: Bt,
1150
- onAutoAdvanceToggle: Mt,
1151
- onLoadingChange: Wn,
1184
+ defaultPlaying: Qe,
1185
+ enableKeyboardShortcuts: ne,
1186
+ isPlaybackPaused: W,
1187
+ isAutoAdvanceEnabled: xe,
1188
+ locale: h,
1189
+ hasInteraction: !!S,
1190
+ isInteractionOpen: le,
1191
+ isSubtitleEnabled: Vt,
1192
+ onAutoAdvanceToggle: Nt,
1193
+ onLoadingChange: or,
1152
1194
  onPlaybackStarted: () => {
1153
- Le(!0);
1195
+ je(!0);
1154
1196
  },
1155
- onPlaybackPreferenceChange: jn,
1156
- onPlaybackTimeChange: le.setTime,
1197
+ onPlaybackPreferenceChange: Jn,
1198
+ onPlaybackTimeChange: se.setTime,
1157
1199
  onSubtitleToggle: () => {
1158
- An((e) => !e);
1200
+ Pn((e) => !e);
1159
1201
  },
1160
- nextDisabled: !C,
1161
- onEnded: Yn,
1162
- onFullscreen: Hn,
1163
- isFullscreen: Ot,
1164
- mobileViewMode: ie,
1165
- settingsPortalContainer: At.current,
1166
- onMobileViewModeChange: _n,
1167
- onControlsPointerEnter: Qn,
1168
- onControlsPointerLeave: Zn,
1169
- onInteractionToggle: Xn,
1170
- onNext: Jn,
1171
- onPrev: zn,
1172
- onSubtitleJump: $n,
1173
- canJumpToSubtitleTarget: ct,
1174
- prevDisabled: !mn,
1202
+ nextDisabled: !R,
1203
+ onEnded: ir,
1204
+ onFullscreen: er,
1205
+ isFullscreen: Dt,
1206
+ mobileViewMode: ae,
1207
+ settingsPortalContainer: Et.current,
1208
+ onMobileViewModeChange: jn,
1209
+ onControlsPointerEnter: sr,
1210
+ onControlsPointerLeave: ar,
1211
+ onInteractionToggle: lr,
1212
+ onNext: rr,
1213
+ onPrev: nr,
1214
+ onSubtitleJump: tr,
1215
+ canJumpToSubtitleTarget: pt,
1216
+ prevDisabled: !gn,
1175
1217
  showControls: x,
1176
- subtitleSeekRequest: Sn,
1177
- texts: ln,
1178
- customActionContext: lt,
1179
- customActions: Q,
1218
+ subtitleSeekRequest: Tn,
1219
+ texts: pn,
1220
+ customActionContext: at,
1221
+ customActions: Z,
1180
1222
  useAutoAdvanceToggle: Ee
1181
1223
  }
1182
1224
  )
@@ -1190,6 +1232,6 @@ const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
1190
1232
  );
1191
1233
  };
1192
1234
  export {
1193
- Co as default
1235
+ jo as default
1194
1236
  };
1195
1237
  //# sourceMappingURL=Slide.es.js.map