markdown-flow-ui 0.1.115-beta.4 → 0.1.115-beta.5

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,55 +1,55 @@
1
1
  import { j as n } from "../../_virtual/jsx-runtime.es.js";
2
- import { memo as yn, useRef as p, useMemo as l, useState as m, useCallback as r, useEffect as s } from "react";
3
- import { isSandboxInteractionMessage as gn } from "../../lib/sandboxInteraction.es.js";
4
- import { cn as Q } from "../../lib/utils.es.js";
5
- import Sn from "../ui/loading-overlay-card.es.js";
6
- import bn from "../ContentRender/ContentRender.es.js";
7
- import Et from "../ContentRender/IframeSandbox.es.js";
2
+ import { memo as pn, useRef as p, useMemo as c, useState as m, useCallback as r, useEffect as s } from "react";
3
+ import { isSandboxInteractionMessage as hn } from "../../lib/sandboxInteraction.es.js";
4
+ import { cn as J } from "../../lib/utils.es.js";
5
+ import vn from "../ui/loading-overlay-card.es.js";
6
+ import gn from "../ContentRender/ContentRender.es.js";
7
+ import wt from "../ContentRender/IframeSandbox.es.js";
8
8
  import "../ui/inputGroup/input-group.es.js";
9
- import { getInteractionDefaultValues as An, getInteractionDefaultSelectedValues as xn } from "../../lib/interaction-defaults.es.js";
10
- import { isMobileDevice as wn, isLandscapeViewport as Tt, subscribeMobileDeviceChange as In } from "../../lib/mobileDevice.es.js";
11
- import _n from "./Player.es.js";
12
- import En from "./SubtitleOverlay.es.js";
13
- import Tn from "./useSlide.es.js";
14
- import Cn from "./useWakePlayerFromIframe.es.js";
15
- import { DEFAULT_MOBILE_VIEW_MODE as Ie, resolveMobileViewModeState as Pn } from "./utils/mobileScreenMode.es.js";
16
- import { shouldPresentInteractionOverlay as Rn } from "./utils/interactionPlayback.es.js";
17
- import { shouldAutoAdvanceIntoAppendedMarker as Mn } from "./utils/appendedMarkerAdvance.es.js";
18
- import { resolveNextPendingAudioKey as Fn, getPlaybackSequenceTransition as kn } from "./utils/playbackSequence.es.js";
19
- import { resolvePlayerCustomActionElement as Bn, getPlayerCustomActionCount as Nn } from "./utils/playerCustomActions.es.js";
20
- import { createPlaybackTimeStore as On } from "./utils/playbackTimeStore.es.js";
21
- import { shouldUseAutoAdvanceToggle as jn } from "./utils/playerToggleMode.es.js";
9
+ import { getInteractionDefaultValues as yn, getInteractionDefaultSelectedValues as Sn } from "../../lib/interaction-defaults.es.js";
10
+ import { isMobileDevice as bn, isLandscapeViewport as It, subscribeMobileDeviceChange as An } from "../../lib/mobileDevice.es.js";
11
+ import xn from "./Player.es.js";
12
+ import wn from "./SubtitleOverlay.es.js";
13
+ import In from "./useSlide.es.js";
14
+ import _n from "./useWakePlayerFromIframe.es.js";
15
+ import { DEFAULT_MOBILE_VIEW_MODE as we, resolveMobileViewModeState as En } from "./utils/mobileScreenMode.es.js";
16
+ import { shouldPresentInteractionOverlay as Tn } from "./utils/interactionPlayback.es.js";
17
+ import { shouldAutoAdvanceIntoAppendedMarker as Rn } from "./utils/appendedMarkerAdvance.es.js";
18
+ import { getPlaybackSequenceTransition as Cn } from "./utils/playbackSequence.es.js";
19
+ import { resolvePlayerCustomActionElement as Pn, getPlayerCustomActionCount as Mn } from "./utils/playerCustomActions.es.js";
20
+ import { createPlaybackTimeStore as Fn } from "./utils/playbackTimeStore.es.js";
21
+ import { shouldUseAutoAdvanceToggle as kn } from "./utils/playerToggleMode.es.js";
22
22
  /* empty css */
23
- import Kn from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
24
- const Ln = 2e3, Vn = 300, qn = 160, Dn = 16, De = "waitingForAudio", Ct = {
23
+ import Bn from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
24
+ const Nn = 2e3, On = 300, jn = 160, Ln = 16, Ve = "waitingForAudio", _t = {
25
25
  waitingForAudio: "Waiting for current slide audio...",
26
26
  loadingAudio: "Loading current slide audio...",
27
27
  waitingForMoreAudio: "Waiting for more current slide audio..."
28
- }, Un = (S, w) => typeof S == "string" ? S : S[w] ?? S[De] ?? Ct[w], zn = (S, w) => w ? S !== "loadingAudio" : !1, Pt = yn(
28
+ }, Kn = (S, w) => typeof S == "string" ? S : S[w] ?? S[Ve] ?? _t[w], Vn = (S, w) => w ? S !== "loadingAudio" : !1, Et = pn(
29
29
  ({
30
30
  content: S,
31
31
  title: w,
32
32
  defaultButtonText: I,
33
- defaultInputText: Z,
33
+ defaultInputText: Q,
34
34
  defaultSelectedValues: _,
35
- confirmButtonText: q,
36
- copyButtonText: ee,
37
- copiedButtonText: _e,
38
- onSend: Ee,
35
+ confirmButtonText: V,
36
+ copyButtonText: Z,
37
+ copiedButtonText: Ie,
38
+ onSend: _e,
39
39
  readonly: D = !1
40
40
  }) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
41
41
  /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: w }) }),
42
42
  /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
43
- bn,
43
+ gn,
44
44
  {
45
45
  content: S,
46
46
  defaultButtonText: I,
47
- defaultInputText: Z,
47
+ defaultInputText: Q,
48
48
  defaultSelectedValues: _,
49
- confirmButtonText: q,
50
- copyButtonText: ee,
51
- copiedButtonText: _e,
52
- onSend: Ee,
49
+ confirmButtonText: V,
50
+ copyButtonText: Z,
51
+ copiedButtonText: Ie,
52
+ onSend: _e,
53
53
  readonly: D,
54
54
  enableTypewriter: !1,
55
55
  sandboxMode: "content"
@@ -57,104 +57,104 @@ const Ln = 2e3, Vn = 300, qn = 160, Dn = 16, De = "waitingForAudio", Ct = {
57
57
  ) })
58
58
  ] })
59
59
  );
60
- Pt.displayName = "InteractionOverlayCard";
61
- const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
62
- const _ = w[Z];
60
+ Et.displayName = "InteractionOverlayCard";
61
+ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
62
+ const _ = w[Q];
63
63
  return I.sequence_number === _?.sequence_number && I.type === _?.type && I.content === _?.content;
64
- }), yr = ({
64
+ }), mr = ({
65
65
  elementList: S = [],
66
66
  showPlayer: w = !0,
67
67
  playerAlwaysVisible: I = !1,
68
- playerClassName: Z,
68
+ playerClassName: Q,
69
69
  fullscreenHeader: _,
70
- playerCustomActions: q,
71
- playerCustomActionPauseOnActive: ee = !0,
72
- bufferingText: _e = Ct,
73
- interactionTitle: Ee,
70
+ playerCustomActions: V,
71
+ playerCustomActionPauseOnActive: Z = !0,
72
+ bufferingText: Ie = _t,
73
+ interactionTitle: _e,
74
74
  interactionTexts: D,
75
- playerTexts: Rt,
76
- playerAutoHideDelay: Te = 3e3,
77
- markerAutoAdvanceDelay: Ue = Ln,
78
- interactionDefaultValueOptions: fe,
79
- onSend: ze,
80
- onPlayerVisibilityChange: Ce,
81
- onMobileViewModeChange: Ge,
82
- onStepChange: He,
83
- enableIframeScaling: Mt = !0,
84
- disableLoadingOverlay: C = !1,
85
- className: Ft,
86
- onPointerDown: We,
87
- ...kt
75
+ playerTexts: Tt,
76
+ playerAutoHideDelay: Ee = 3e3,
77
+ markerAutoAdvanceDelay: De = Nn,
78
+ interactionDefaultValueOptions: de,
79
+ onSend: qe,
80
+ onPlayerVisibilityChange: Te,
81
+ onMobileViewModeChange: Ue,
82
+ onStepChange: ze,
83
+ enableIframeScaling: Rt = !0,
84
+ disableLoadingOverlay: R = !1,
85
+ className: Ct,
86
+ onPointerDown: Ge,
87
+ ...Pt
88
88
  }) => {
89
- const me = p(null), $e = p(null), Pe = p(null), Ye = p(null), te = p(null), ne = p(null), re = p(null), oe = p(null), Xe = p(null), Je = p([]), pe = p(!1), U = p(null), Qe = p(null), Ze = p({
89
+ const fe = p(null), He = p(null), Re = p(null), We = p(null), ee = p(null), te = p(null), ne = p(null), re = p(null), $e = p(null), Ye = p([]), me = p(!1), q = p(null), Xe = p(null), Je = p({
90
90
  markerCount: 0,
91
91
  currentIndex: -1,
92
92
  canGoNext: !1
93
93
  }), {
94
- currentElementList: F,
95
- stepElementLists: et,
96
- slideElementList: k,
94
+ currentElementList: B,
95
+ stepElementLists: Qe,
96
+ slideElementList: N,
97
97
  currentIndex: d,
98
98
  audioList: h,
99
- currentAudioSequenceIndexes: he,
99
+ currentAudioSequenceIndexes: pe,
100
100
  currentStepHasSpeakableElement: b,
101
- currentInteractionElement: a,
102
- canGoPrev: Bt,
101
+ currentInteractionElement: u,
102
+ canGoPrev: Mt,
103
103
  canGoNext: x,
104
- handlePrev: tt,
105
- handleNext: P
106
- } = Tn(S), se = l(() => {
104
+ handlePrev: Ze,
105
+ handleNext: C
106
+ } = In(S), oe = c(() => {
107
107
  if (!(d < 0))
108
- return k[d];
109
- }, [d, k]), Nt = k.filter(
108
+ return N[d];
109
+ }, [d, N]), Ft = N.filter(
110
110
  (e) => e.is_renderable !== !1
111
- ).length === 1, E = w && (k.length > 0 || h.length > 0 || !!a), O = l(
112
- () => he.map((e) => h[e]?.audioKey).filter((e) => !!e),
113
- [h, he]
114
- ), [nt, ve] = m(!0), [ye, ie] = m(!1), [le, rt] = m(!0), [v, z] = m(null), [Ot, y] = m(!1), [jt, Re] = m(De), [j, Me] = m(!1), [ot, st] = m(null), [Kt, Fe] = m(!1), [it, Lt] = m(!0), [ke, Be] = m(!1), [o, Ne] = m(), [ge, Se] = m(!1), [
115
- Vt,
116
- ce
117
- ] = m(0), [lt, qt] = m(!1), B = l(() => wn(), []), [be, Oe] = m(
118
- Ie
119
- ), [ct, je] = m(!1), [Dt, ut] = m(
120
- () => B ? Tt() : !1
121
- ), G = l(() => On(), []), {
122
- effectiveMobileViewMode: H,
123
- isImmersiveMobileFullscreen: W,
124
- isNativeMobileFullscreen: at,
125
- shouldRotateFullscreenViewport: Ut
126
- } = l(
127
- () => Pn({
128
- hasManualMobileViewMode: ct,
129
- isMobileDevice: B,
130
- mobileViewMode: be
111
+ ).length === 1, E = w && (N.length > 0 || h.length > 0 || !!u), P = c(
112
+ () => pe.map((e) => h[e]?.audioKey).filter((e) => !!e),
113
+ [h, pe]
114
+ ), [et, he] = m(!0), [ve, se] = m(!1), [ie, tt] = m(!0), [v, U] = m(null), [kt, g] = m(!1), [Bt, Ce] = m(Ve), [M, nt] = m(!1), [Nt, Pe] = m(!1), [rt, Ot] = m(!0), [Me, Fe] = m(!1), [o, ke] = m(), [ge, ye] = m(!1), [
115
+ jt,
116
+ le
117
+ ] = m(0), [ot, Lt] = m(!1), O = c(() => bn(), []), [Se, Be] = m(
118
+ we
119
+ ), [st, Ne] = m(!1), [Kt, it] = m(
120
+ () => O ? It() : !1
121
+ ), z = c(() => Fn(), []), {
122
+ effectiveMobileViewMode: G,
123
+ isImmersiveMobileFullscreen: H,
124
+ isNativeMobileFullscreen: lt,
125
+ shouldRotateFullscreenViewport: Vt
126
+ } = c(
127
+ () => En({
128
+ hasManualMobileViewMode: st,
129
+ isMobileDevice: O,
130
+ mobileViewMode: Se
131
131
  }),
132
132
  [
133
- ct,
134
- B,
135
- Dt,
136
- be
133
+ st,
134
+ O,
135
+ Kt,
136
+ Se
137
137
  ]
138
- ), zt = p(H), R = E && (I || nt), Gt = W && R, Ht = W && R, Wt = W || at, dt = lt && !B, $t = r(
138
+ ), Dt = p(G), F = E && (I || et), qt = H && F, Ut = H && F, zt = H || lt, ct = ot && !O, Gt = r(
139
139
  (e) => {
140
- je(!0), Oe(e);
140
+ Ne(!0), Be(e);
141
141
  },
142
142
  []
143
- ), ft = r(() => {
144
- je(!1), Oe(Ie);
145
- }, []), Yt = r(() => {
146
- ft(), _?.onBack?.();
147
- }, [_, ft]), mt = r((e) => {
148
- Be(e);
149
- }, []), pt = r(() => {
150
- Be((e) => !e);
151
- }, []), { mountedStepStates: Xt, currentMountedStateIndex: Jt } = l(() => {
143
+ ), at = r(() => {
144
+ Ne(!1), Be(we);
145
+ }, []), Ht = r(() => {
146
+ at(), _?.onBack?.();
147
+ }, [_, at]), ut = r((e) => {
148
+ Fe(e);
149
+ }, []), dt = r(() => {
150
+ Fe((e) => !e);
151
+ }, []), { mountedStepStates: Wt, currentMountedStateIndex: $t } = c(() => {
152
152
  const e = [], t = /* @__PURE__ */ new Map();
153
- return et.forEach((c, f) => {
153
+ return Qe.forEach((l, f) => {
154
154
  const i = e.findIndex(
155
- (u) => Gn(
156
- u.elementList,
157
- c
155
+ (a) => Dn(
156
+ a.elementList,
157
+ l
158
158
  )
159
159
  );
160
160
  if (i >= 0) {
@@ -162,221 +162,218 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
162
162
  return;
163
163
  }
164
164
  e.push({
165
- elementList: c,
165
+ elementList: l,
166
166
  sourceStepIndexes: [f]
167
167
  }), t.set(f, e.length - 1);
168
168
  }), {
169
169
  mountedStepStates: e,
170
170
  currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
171
171
  };
172
- }, [d, et]), ht = l(() => String(d), [d]), g = l(() => v ? h.findIndex(
172
+ }, [d, Qe]), ft = c(() => String(d), [d]), y = c(() => v ? h.findIndex(
173
173
  (e) => (e.audioKey ?? "") === v
174
- ) : -1, [h, v]), Ke = l(
175
- () => g >= 0 ? h[g] : void 0,
176
- [h, g]
177
- ), Qt = Ke?.element?.subtitle_cues ?? [], Ae = l(
178
- () => O[0] ?? "none",
179
- [O]
180
- ), K = l(
181
- () => Fn({
182
- audioSequenceKeys: O,
183
- lastCompletedAudioKey: ot
184
- }),
185
- [O, ot]
186
- ), Le = l(
174
+ ) : -1, [h, v]), Oe = c(
175
+ () => y >= 0 ? h[y] : void 0,
176
+ [h, y]
177
+ ), Yt = Oe?.element?.subtitle_cues ?? [], be = c(
178
+ () => P[0] ?? "none",
179
+ [P]
180
+ ), je = c(
187
181
  () => ({
188
- currentElement: Bn({
189
- currentAudioIndex: g,
190
- currentAudioSequenceIndexes: he,
182
+ currentElement: Pn({
183
+ currentAudioIndex: y,
184
+ currentAudioSequenceIndexes: pe,
191
185
  audioList: h,
192
186
  currentInteractionElement: o,
193
- currentStepElement: se
187
+ currentStepElement: oe
194
188
  }),
195
189
  currentIndex: d,
196
- currentStepElement: se,
197
- isActive: ke,
198
- setActive: mt,
199
- toggleActive: pt
190
+ currentStepElement: oe,
191
+ isActive: Me,
192
+ setActive: ut,
193
+ toggleActive: dt
200
194
  }),
201
195
  [
202
196
  o,
203
197
  h,
204
- g,
205
- he,
198
+ y,
199
+ pe,
206
200
  d,
207
- se,
208
- ke,
209
- mt,
210
- pt
201
+ oe,
202
+ Me,
203
+ ut,
204
+ dt
211
205
  ]
212
- ), Ve = l(
213
- () => Nn(
214
- q,
215
- Le
206
+ ), Le = c(
207
+ () => Mn(
208
+ V,
209
+ je
216
210
  ),
217
- [Le, q]
218
- ), Zt = l(
211
+ [je, V]
212
+ ), Xt = c(
219
213
  () => ({
220
- "--slide-player-custom-action-count": String(Ve),
214
+ "--slide-player-custom-action-count": String(Le),
221
215
  "--slide-player-mobile-control-count": String(
222
- Ve + 4
216
+ Le + 4
223
217
  )
224
218
  }),
225
- [Ve]
226
- ), vt = O.length > 0, yt = l(() => a ? `${a.sequence_number ?? "none"}:${String(
227
- a.content ?? ""
228
- )}` : "none", [a]), ue = l(
229
- () => [ht, yt].join("|"),
230
- [yt, ht]
231
- ), en = l(
219
+ [Le]
220
+ ), mt = P.length > 0, pt = c(() => u ? `${u.sequence_number ?? "none"}:${String(
221
+ u.content ?? ""
222
+ )}` : "none", [u]), ce = c(
223
+ () => [ft, pt].join("|"),
224
+ [pt, ft]
225
+ ), Jt = c(
232
226
  () => [
233
- ue,
234
- Ke?.audioKey ?? "none",
235
- String(g)
227
+ ce,
228
+ Oe?.audioKey ?? "none",
229
+ String(y)
236
230
  ].join("|"),
237
- [g, Ke?.audioKey, ue]
238
- ), gt = !!l(() => !Ae || Ae === "none" ? "" : h.find(
239
- (t) => t.audioKey === Ae
240
- )?.audioUrl?.trim() ?? "", [h, Ae]), L = ee && !!q && ke, ae = l(
241
- () => jn({
231
+ [y, Oe?.audioKey, ce]
232
+ ), ht = !!c(() => !be || be === "none" ? "" : h.find(
233
+ (t) => t.audioKey === be
234
+ )?.audioUrl?.trim() ?? "", [h, be]), L = Z && !!V && Me, ae = c(
235
+ () => kn({
242
236
  canGoNext: x,
243
- currentAudioIndex: g,
237
+ currentAudioIndex: y,
244
238
  currentStepHasSpeakableElement: b,
245
- hasInteraction: !!a
239
+ hasInteraction: !!u
246
240
  }),
247
241
  [
248
242
  x,
249
- g,
250
- a,
243
+ y,
244
+ u,
251
245
  b
252
246
  ]
253
- ), V = r(() => {
254
- te.current !== null && (window.clearTimeout(te.current), te.current = null);
255
- }, []), N = r(() => {
247
+ ), K = r(() => {
248
+ ee.current !== null && (window.clearTimeout(ee.current), ee.current = null);
249
+ }, []), j = r(() => {
250
+ ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
251
+ }, []), k = r(() => {
256
252
  re.current !== null && (window.clearTimeout(re.current), re.current = null);
257
- }, []), M = r(() => {
258
- oe.current !== null && (window.clearTimeout(oe.current), oe.current = null);
253
+ }, []), W = r(() => {
254
+ te.current !== null && (window.clearTimeout(te.current), te.current = null);
259
255
  }, []), $ = r(() => {
260
- ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
261
- }, []), Y = r(() => {
262
- $(), N(), M(), z(null), G.reset(), y(!1), Re(De), Me(!1), st(null), Fe(!1), Ne(void 0), Se(!1), ce(0);
256
+ W(), j(), k(), U(null), z.reset(), g(!1), Ce(Ve), nt(!1), Pe(!1), ke(void 0), ye(!1), le(0);
263
257
  }, [
264
- $,
265
- N,
266
- M,
267
- G
268
- ]), X = r(() => K ? (Me(!1), z(K), !0) : !1, [K]), xe = r(() => {
269
- N(), M(), Se(!1), ce(0), !X() && x && P();
258
+ W,
259
+ j,
260
+ k,
261
+ z
262
+ ]), Y = r(() => {
263
+ const e = P[0];
264
+ return e ? (U(e), !0) : !1;
265
+ }, [P]), Ae = r(() => {
266
+ j(), k(), ye(!1), le(0), !Y() && x && C();
270
267
  }, [
271
268
  x,
272
- N,
273
- M,
274
- P,
275
- X
276
- ]), St = r(
269
+ j,
270
+ k,
271
+ C,
272
+ Y
273
+ ]), vt = r(
277
274
  (e) => {
278
- if (M(), !e)
275
+ if (k(), !e)
279
276
  return;
280
277
  const t = () => {
281
- oe.current = null, ce(
282
- qn
283
- ), Se(!0), U.current = null;
278
+ re.current = null, le(
279
+ jn
280
+ ), ye(!0), q.current = null;
284
281
  };
285
- oe.current = window.setTimeout(
282
+ re.current = window.setTimeout(
286
283
  t,
287
- Vn
284
+ On
288
285
  );
289
286
  },
290
- [M]
287
+ [k]
291
288
  ), A = r(
292
- (e = ye) => {
293
- E && (ve(!0), V(), !(I || !e || Te <= 0) && (te.current = window.setTimeout(() => {
294
- ve(!1), te.current = null;
295
- }, Te)));
289
+ (e = ve) => {
290
+ E && (he(!0), K(), !(I || !e || Ee <= 0) && (ee.current = window.setTimeout(() => {
291
+ he(!1), ee.current = null;
292
+ }, Ee)));
296
293
  },
297
294
  [
298
- V,
299
- ye,
295
+ K,
296
+ ve,
300
297
  I,
301
- Te,
298
+ Ee,
302
299
  E
303
300
  ]
304
- ), de = !!(a?.readonly || a?.user_input?.trim()), J = !!a && !de;
301
+ ), ue = !!(u?.readonly || u?.user_input?.trim()), X = !!u && !ue;
305
302
  s(() => {
306
- rt(!0), ee && Be(!1);
307
- }, [d, ee]), s(() => () => {
308
- $(), V(), N(), M();
303
+ tt(!0), Z && Fe(!1);
304
+ }, [d, Z]), s(() => () => {
305
+ W(), K(), j(), k();
309
306
  }, [
310
- $,
311
- N,
312
- M,
313
- V
314
- ]), s(() => (Ce?.(R), () => {
315
- Ce?.(!1);
316
- }), [Ce, R]), s(() => {
317
- B || be === Ie || (je(!1), Oe(Ie));
318
- }, [B, be]), s(() => {
319
- if (!B) {
320
- ut(!1);
307
+ W,
308
+ j,
309
+ k,
310
+ K
311
+ ]), s(() => (Te?.(F), () => {
312
+ Te?.(!1);
313
+ }), [Te, F]), s(() => {
314
+ O || Se === we || (Ne(!1), Be(we));
315
+ }, [O, Se]), s(() => {
316
+ if (!O) {
317
+ it(!1);
321
318
  return;
322
319
  }
323
320
  const e = () => {
324
- ut(Tt());
321
+ it(It());
325
322
  };
326
- return e(), In(e);
327
- }, [B]), s(() => {
328
- Ge?.(H);
329
- }, [H, Ge]), s(() => {
330
- zt.current = H;
331
- }, [H]), s(() => {
332
- He?.(se, d);
333
- }, [d, se, He]), s(() => {
334
- const e = Ze.current, t = Mn(
323
+ return e(), An(e);
324
+ }, [O]), s(() => {
325
+ Ue?.(G);
326
+ }, [G, Ue]), s(() => {
327
+ Dt.current = G;
328
+ }, [G]), s(() => {
329
+ ze?.(oe, d);
330
+ }, [d, oe, ze]), s(() => {
331
+ const e = Je.current, t = Rn(
335
332
  {
336
333
  previousMarkerCount: e.markerCount,
337
- nextMarkerCount: k.length,
334
+ nextMarkerCount: N.length,
338
335
  previousIndex: e.currentIndex,
339
336
  previousCanGoNext: e.canGoNext,
340
337
  nextCanGoNext: x,
341
338
  currentAudioKey: v,
342
- hasCompletedCurrentStepAudio: j,
343
- hasResolvedCurrentInteraction: de,
339
+ hasCompletedCurrentStepAudio: M,
340
+ hasResolvedCurrentInteraction: ue,
344
341
  currentStepHasSpeakableElement: b,
345
- currentInteractionElement: a,
346
- isAutoAdvanceEnabled: le,
342
+ currentInteractionElement: u,
343
+ isAutoAdvanceEnabled: ie,
347
344
  shouldUseSilentStepAutoAdvanceToggle: ae
348
345
  }
349
346
  );
350
- Ze.current = {
351
- markerCount: k.length,
347
+ Je.current = {
348
+ markerCount: N.length,
352
349
  currentIndex: d,
353
350
  canGoNext: x
354
- }, t && P();
351
+ }, t && C();
355
352
  }, [
356
353
  x,
357
354
  v,
358
355
  d,
359
- a,
356
+ u,
360
357
  b,
361
- P,
362
- j,
363
- de,
364
- le,
358
+ C,
359
+ M,
360
+ ue,
361
+ ie,
365
362
  ae,
366
- k.length
363
+ N.length
367
364
  ]), s(() => {
368
365
  if (!E) {
369
- V(), ve(!1);
366
+ K(), he(!1);
370
367
  return;
371
368
  }
372
369
  if (I) {
373
- V(), ve(!0);
370
+ K(), he(!0);
374
371
  return;
375
372
  }
376
- ye || A(!0);
373
+ ve || A(!0);
377
374
  }, [
378
- V,
379
- ye,
375
+ K,
376
+ ve,
380
377
  I,
381
378
  E,
382
379
  A
@@ -384,242 +381,242 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
384
381
  if (typeof window > "u")
385
382
  return;
386
383
  const e = (t) => {
387
- t.origin === window.location.origin && gn(t.data) && t.data.eventType === "click" && E && (ie(!0), A(!0));
384
+ t.origin === window.location.origin && hn(t.data) && t.data.eventType === "click" && E && (se(!0), A(!0));
388
385
  };
389
386
  return window.addEventListener("message", e), () => {
390
387
  window.removeEventListener("message", e);
391
388
  };
392
- }, [E, A]), Cn({
393
- sectionRef: me,
389
+ }, [E, A]), _n({
390
+ sectionRef: fe,
394
391
  enabled: E,
395
392
  onWake: () => {
396
- ie(!0), A(!0);
393
+ se(!0), A(!0);
397
394
  }
398
395
  }), s(() => {
399
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = kn({
400
- previousResetKey: Qe.current,
401
- nextResetKey: ue,
396
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Cn({
397
+ previousResetKey: Xe.current,
398
+ nextResetKey: ce,
402
399
  currentAudioKey: v,
403
- hasCompletedCurrentStepAudio: j
400
+ hasCompletedCurrentStepAudio: M
404
401
  });
405
- Qe.current = ue;
406
- const c = U.current === d && !!a, f = Rn({
407
- hasInteraction: !!a,
408
- shouldBlockPlaybackForInteraction: J,
409
- shouldOpenInteractionOverlayAfterAudio: c,
402
+ Xe.current = ce;
403
+ const l = q.current === d && !!u, f = Tn({
404
+ hasInteraction: !!u,
405
+ shouldBlockPlaybackForInteraction: X,
406
+ shouldOpenInteractionOverlayAfterAudio: l,
410
407
  hasPlaybackContextChanged: e,
411
- hasResolvedCurrentInteraction: de,
408
+ hasResolvedCurrentInteraction: ue,
412
409
  currentStepHasSpeakableElement: b
413
410
  });
414
- if (e && Y(), !(F.length === 0 && !a) && !L) {
415
- if (a && Ne(a), f) {
416
- St(a);
411
+ if (e && $(), !(B.length === 0 && !u) && !L) {
412
+ if (u && ke(u), f) {
413
+ vt(u);
417
414
  return;
418
415
  }
419
- if (M(), U.current = null, !!t && !X()) {
416
+ if (k(), q.current = null, !!t && !Y()) {
420
417
  if (b) {
421
- if (C) {
422
- y(!1);
418
+ if (R) {
419
+ g(!1);
423
420
  return;
424
421
  }
425
- y(!0);
422
+ g(!0);
426
423
  return;
427
424
  }
428
- if (x && !(ae && !le))
429
- return ne.current = window.setTimeout(() => {
430
- ne.current = null, P();
431
- }, Ue), () => {
432
- $();
425
+ if (x && !(ae && !ie))
426
+ return te.current = window.setTimeout(() => {
427
+ te.current = null, C();
428
+ }, De), () => {
429
+ W();
433
430
  };
434
431
  }
435
432
  }
436
433
  }, [
437
434
  x,
438
- $,
439
- F.length,
440
- a,
435
+ W,
436
+ B.length,
437
+ u,
441
438
  v,
442
- ue,
439
+ ce,
443
440
  b,
444
- Ue,
445
- P,
446
- j,
441
+ De,
447
442
  C,
448
- le,
449
- de,
450
- J,
451
443
  M,
452
- Y,
453
- St,
444
+ R,
445
+ ie,
446
+ ue,
454
447
  X,
448
+ k,
449
+ $,
450
+ vt,
451
+ Y,
455
452
  L,
456
453
  ae
457
454
  ]), s(() => {
458
- if (C || L || !b || J) {
459
- y(!1);
455
+ if (R || L || !b || X) {
456
+ g(!1);
460
457
  return;
461
458
  }
462
- if (j && !K) {
463
- y(!1);
459
+ if (M) {
460
+ g(!1);
464
461
  return;
465
462
  }
466
- if (vt) {
467
- y(!1);
463
+ if (mt) {
464
+ g(!1);
468
465
  return;
469
466
  }
470
- Re("waitingForAudio"), y(!0);
467
+ Ce("waitingForAudio"), g(!0);
471
468
  }, [
472
- vt,
469
+ mt,
473
470
  b,
474
- j,
475
- K,
476
- C,
471
+ M,
472
+ R,
477
473
  L,
478
- J
474
+ X
479
475
  ]), s(() => {
480
- v || !K || L || !b || J || X();
476
+ v || P.length === 0 || L || !b || X || M || Y();
481
477
  }, [
482
478
  v,
483
- K,
479
+ P,
484
480
  b,
481
+ M,
485
482
  L,
486
- J,
487
- X
483
+ X,
484
+ Y
488
485
  ]), s(() => {
489
- !v || g >= 0 || z(null);
490
- }, [g, v]), s(() => {
491
- g >= 0 || G.reset();
492
- }, [g, G]), s(() => {
493
- Fe(!1);
494
- }, [en]);
495
- const bt = l(() => {
486
+ !v || y >= 0 || U(null);
487
+ }, [y, v]), s(() => {
488
+ y >= 0 || z.reset();
489
+ }, [y, z]), s(() => {
490
+ Pe(!1);
491
+ }, [Jt]);
492
+ const gt = c(() => {
496
493
  if (!o)
497
494
  return {};
498
495
  const e = !!o.user_input?.trim();
499
- return An(
496
+ return yn(
500
497
  typeof o.content == "string" ? o.content : void 0,
501
498
  o.user_input,
502
- e ? void 0 : fe
499
+ e ? void 0 : de
503
500
  );
504
- }, [o, fe]), tn = l(() => {
501
+ }, [o, de]), Qt = c(() => {
505
502
  if (!o)
506
503
  return;
507
504
  const e = !!o.user_input?.trim();
508
- return xn(
505
+ return Sn(
509
506
  typeof o.content == "string" ? o.content : void 0,
510
507
  o.user_input,
511
- e ? void 0 : fe
508
+ e ? void 0 : de
512
509
  );
513
- }, [o, fe]), At = !!o?.user_input?.trim(), xt = !!o?.readonly || At, wt = xt || At, qe = !!o && ge, nn = r(
510
+ }, [o, de]), yt = !!o?.user_input?.trim(), St = !!o?.readonly || yt, bt = St || yt, Ke = !!o && ge, Zt = r(
514
511
  (e) => {
515
- const c = [
512
+ const l = [
516
513
  ...e.selectedValues ?? [],
517
514
  e.inputText?.trim() ?? "",
518
515
  e.buttonText?.trim() ?? ""
519
516
  ].filter(Boolean).join(", ");
520
- Ne((f) => !f || !c ? f : {
517
+ ke((f) => !f || !l ? f : {
521
518
  ...f,
522
- user_input: c
523
- }), ze?.(e, o), xe();
519
+ user_input: l
520
+ }), qe?.(e, o), Ae();
524
521
  },
525
- [o, xe, ze]
522
+ [o, Ae, qe]
526
523
  );
527
524
  s(() => {
528
525
  const e = () => {
529
- qt(document.fullscreenElement === me.current);
526
+ Lt(document.fullscreenElement === fe.current);
530
527
  };
531
528
  return e(), document.addEventListener("fullscreenchange", e), () => {
532
529
  document.removeEventListener("fullscreenchange", e);
533
530
  };
534
531
  }, []), s(() => {
535
- if (!qe) {
536
- ce(0);
532
+ if (!Ke) {
533
+ le(0);
537
534
  return;
538
535
  }
539
- const e = Xe.current;
536
+ const e = $e.current;
540
537
  if (!e)
541
538
  return;
542
539
  const t = () => {
543
540
  const f = Math.ceil(
544
541
  e.getBoundingClientRect().height
545
542
  );
546
- ce(
547
- f + Dn
543
+ le(
544
+ f + Ln
548
545
  );
549
546
  };
550
547
  if (t(), typeof ResizeObserver > "u")
551
548
  return;
552
- const c = new ResizeObserver(() => {
549
+ const l = new ResizeObserver(() => {
553
550
  t();
554
551
  });
555
- return c.observe(e), () => {
556
- c.disconnect();
552
+ return l.observe(e), () => {
553
+ l.disconnect();
557
554
  };
558
- }, [qe]), s(() => {
559
- if (N(), !(!ge || !wt))
560
- return re.current = window.setTimeout(() => {
561
- re.current = null, xe();
555
+ }, [Ke]), s(() => {
556
+ if (j(), !(!ge || !bt))
557
+ return ne.current = window.setTimeout(() => {
558
+ ne.current = null, Ae();
562
559
  }, 2e3), () => {
563
- N();
560
+ j();
564
561
  };
565
562
  }, [
566
- N,
567
- xe,
563
+ j,
564
+ Ae,
568
565
  ge,
569
- wt
566
+ bt
570
567
  ]);
571
- const rn = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
572
- Et,
568
+ const en = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
569
+ wt,
573
570
  {
574
571
  className: "content-render-iframe",
575
- disableLoadingOverlay: C,
572
+ disableLoadingOverlay: R,
576
573
  hideFullScreen: !0,
577
574
  mode: "blackboard",
578
575
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
579
576
  type: "sandbox",
580
577
  content: e.content,
581
- enableScaling: Mt
578
+ enableScaling: Rt
582
579
  }
583
580
  ) : /* @__PURE__ */ n.jsx(
584
- Et,
581
+ wt,
585
582
  {
586
583
  className: "content-render-iframe",
587
- disableLoadingOverlay: C,
584
+ disableLoadingOverlay: R,
588
585
  hideFullScreen: !0,
589
586
  mode: "blackboard",
590
587
  type: "markdown",
591
588
  content: e.content
592
589
  }
593
- ) : null, on = (e = [], t = !1) => {
590
+ ) : null, tn = (e = [], t = !1) => {
594
591
  if (e.length === 0)
595
592
  return null;
596
- const c = e.filter(
593
+ const l = e.filter(
597
594
  (i) => i.is_renderable !== !1
598
595
  ).length, f = e.reduce(
599
- (i, u, T) => u.is_renderable !== !1 ? T : i,
596
+ (i, a, T) => a.is_renderable !== !1 ? T : i,
600
597
  -1
601
598
  );
602
- return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((i, u) => {
599
+ return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((i, a) => {
603
600
  const T = i.type === "html" && i.is_renderable === !1;
604
601
  return /* @__PURE__ */ n.jsx(
605
602
  "div",
606
603
  {
607
- ref: t && u === f ? Ye : null,
604
+ ref: t && a === f ? We : null,
608
605
  "aria-hidden": T || void 0,
609
- className: Q(
606
+ className: J(
610
607
  "w-full shrink-0",
611
- c === 1 && i.is_renderable !== !1 && "slide-element--single",
608
+ l === 1 && i.is_renderable !== !1 && "slide-element--single",
612
609
  T ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : i.is_renderable === !1 && "hidden"
613
610
  ),
614
- children: rn(i, {
615
- replaceRootScreenHeightWithFull: c === 1 && i.type === "html" && i.is_renderable !== !1
611
+ children: en(i, {
612
+ replaceRootScreenHeightWithFull: l === 1 && i.type === "html" && i.is_renderable !== !1
616
613
  })
617
614
  },
618
- i.sequence_number ?? `${i.type}-${u}`
615
+ i.sequence_number ?? `${i.type}-${a}`
619
616
  );
620
617
  }) });
621
- }, sn = r(() => {
622
- const e = me.current;
618
+ }, nn = r(() => {
619
+ const e = fe.current;
623
620
  if (e) {
624
621
  if (document.fullscreenElement === e) {
625
622
  document.exitFullscreen().catch(() => {
@@ -629,60 +626,60 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
629
626
  e.requestFullscreen?.().catch(() => {
630
627
  });
631
628
  }
632
- }, []), It = r(() => {
633
- const e = Pe.current;
629
+ }, []), At = r(() => {
630
+ const e = Re.current;
634
631
  e && e.scrollTo({
635
632
  top: e.scrollHeight,
636
633
  behavior: "smooth"
637
634
  });
638
- }, []), ln = r(() => {
639
- pe.current = !0, U.current = null, ie(!0), y(!1), A(!0), Y(), tt();
640
- }, [tt, Y, A]), cn = r(() => {
641
- pe.current = !0, U.current = null, ie(!0), y(!1), A(!0), Y(), P();
642
- }, [P, Y, A]), un = r(
635
+ }, []), rn = r(() => {
636
+ me.current = !0, q.current = null, se(!0), g(!1), A(!0), $(), Ze();
637
+ }, [Ze, $, A]), on = r(() => {
638
+ me.current = !0, q.current = null, se(!0), g(!1), A(!0), $(), C();
639
+ }, [C, $, A]), sn = r(
643
640
  ({
644
641
  loading: e,
645
642
  reason: t
646
643
  }) => {
647
- if (C) {
648
- y(!1);
644
+ if (R) {
645
+ g(!1);
649
646
  return;
650
647
  }
651
- if (!b || j) {
652
- y(!1);
648
+ if (!b || M) {
649
+ g(!1);
653
650
  return;
654
651
  }
655
- e && t && Re(t), y(zn(t, e));
652
+ e && t && Ce(t), g(Vn(t, e));
656
653
  },
657
654
  [
658
655
  b,
659
- j,
660
- C
656
+ M,
657
+ R
661
658
  ]
662
659
  );
663
660
  s(() => {
664
- C && y(!1);
665
- }, [C]);
666
- const an = r(
661
+ R && g(!1);
662
+ }, [R]);
663
+ const ln = r(
667
664
  (e) => {
668
665
  const t = h[e]?.audioKey;
669
666
  if (!t || !v || t !== v)
670
667
  return;
671
- const c = O.findIndex(
672
- (u) => u === t
668
+ const l = P.findIndex(
669
+ (a) => a === t
673
670
  );
674
- if (c < 0) {
675
- z(null);
671
+ if (l < 0) {
672
+ U(null);
676
673
  return;
677
674
  }
678
- const f = c + 1, i = O[f];
675
+ const f = l + 1, i = P[f];
679
676
  if (i) {
680
- z(i);
677
+ U(i);
681
678
  return;
682
679
  }
683
- if (z(null), st(t), Me(!0), y(!1), x) {
684
- const u = d + 1, T = k[u];
685
- gt && T?.type === "interaction" && (U.current = u), P();
680
+ if (U(null), nt(!0), g(!1), x) {
681
+ const a = d + 1, T = N[a];
682
+ ht && T?.type === "interaction" && (q.current = a), C();
686
683
  return;
687
684
  }
688
685
  },
@@ -691,76 +688,76 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
691
688
  x,
692
689
  d,
693
690
  v,
694
- O,
695
691
  P,
696
- gt,
697
- k
692
+ C,
693
+ ht,
694
+ N
698
695
  ]
699
- ), dn = r(() => {
700
- o && Se((e) => !e);
701
- }, [o]), _t = r(
696
+ ), cn = r(() => {
697
+ o && ye((e) => !e);
698
+ }, [o]), xt = r(
702
699
  (e) => {
703
- e.stopPropagation(), R && A(!0);
700
+ e.stopPropagation(), F && A(!0);
704
701
  },
705
- [nt, A]
706
- ), fn = r(
702
+ [et, A]
703
+ ), an = r(
707
704
  (e) => {
708
- We?.(e);
705
+ Ge?.(e);
709
706
  },
710
- [We]
711
- ), mn = r(() => {
712
- ie(!0), A(!0);
713
- }, [A]), we = l(
714
- () => F.map(
707
+ [Ge]
708
+ ), un = r(() => {
709
+ se(!0), A(!0);
710
+ }, [A]), xe = c(
711
+ () => B.map(
715
712
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
716
713
  ),
717
- [F]
714
+ [B]
718
715
  );
719
716
  return s(() => {
720
- const e = Je.current, f = (e.length > 0 && e.length < we.length && e.every((u, T) => u === we[T]) ? F.slice(e.length) : []).some(
721
- (u) => u.is_new === !1
717
+ const e = Ye.current, f = (e.length > 0 && e.length < xe.length && e.every((a, T) => a === xe[T]) ? B.slice(e.length) : []).some(
718
+ (a) => a.is_new === !1
722
719
  );
723
- if (Je.current = we, !f)
720
+ if (Ye.current = xe, !f)
724
721
  return;
725
722
  const i = window.requestAnimationFrame(() => {
726
- const u = Pe.current, T = Ye.current;
727
- if (!u || !T)
723
+ const a = Re.current, T = We.current;
724
+ if (!a || !T)
728
725
  return;
729
- const pn = u.getBoundingClientRect(), hn = T.getBoundingClientRect(), vn = u.scrollTop + (hn.top - pn.top);
730
- u.scrollTo({
731
- top: Math.max(vn, 0),
726
+ const dn = a.getBoundingClientRect(), fn = T.getBoundingClientRect(), mn = a.scrollTop + (fn.top - dn.top);
727
+ a.scrollTo({
728
+ top: Math.max(mn, 0),
732
729
  behavior: "smooth"
733
730
  });
734
731
  });
735
732
  return () => {
736
733
  window.cancelAnimationFrame(i);
737
734
  };
738
- }, [F, we]), s(() => {
739
- if (!pe.current || (pe.current = !1, F.length === 0))
735
+ }, [B, xe]), s(() => {
736
+ if (!me.current || (me.current = !1, B.length === 0))
740
737
  return;
741
738
  const e = window.requestAnimationFrame(() => {
742
- It();
739
+ At();
743
740
  });
744
741
  return () => {
745
742
  window.cancelAnimationFrame(e);
746
743
  };
747
- }, [F, It]), /* @__PURE__ */ n.jsxs(
744
+ }, [B, At]), /* @__PURE__ */ n.jsxs(
748
745
  "section",
749
746
  {
750
- ref: me,
751
- className: Q(
747
+ ref: fe,
748
+ className: J(
752
749
  "relative h-full w-full",
753
- B && "slide--mobile-device",
754
- dt && "slide--browser-fullscreen",
755
- W && "slide--mobile-landscape",
756
- at && "slide--mobile-landscape-native",
757
- Ft
750
+ O && "slide--mobile-device",
751
+ ct && "slide--browser-fullscreen",
752
+ H && "slide--mobile-landscape",
753
+ lt && "slide--mobile-landscape-native",
754
+ Ct
758
755
  ),
759
- onClick: mn,
760
- onPointerDown: fn,
761
- ...kt,
756
+ onClick: un,
757
+ onPointerDown: an,
758
+ ...Pt,
762
759
  children: [
763
- Wt ? /* @__PURE__ */ n.jsx(
760
+ zt ? /* @__PURE__ */ n.jsx(
764
761
  "div",
765
762
  {
766
763
  "aria-hidden": "true",
@@ -770,23 +767,23 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
770
767
  /* @__PURE__ */ n.jsxs(
771
768
  "div",
772
769
  {
773
- ref: $e,
774
- className: Q(
770
+ ref: He,
771
+ className: J(
775
772
  "slide__viewport relative h-full min-h-0 w-full",
776
- W && "slide__viewport--mobile-landscape",
777
- W && !Ut && "slide__viewport--mobile-landscape-native"
773
+ H && "slide__viewport--mobile-landscape",
774
+ H && !Vt && "slide__viewport--mobile-landscape-native"
778
775
  ),
779
776
  children: [
780
- Gt ? /* @__PURE__ */ n.jsxs("div", { className: "slide-landscape-header", children: [
777
+ qt ? /* @__PURE__ */ n.jsxs("div", { className: "slide-landscape-header", children: [
781
778
  /* @__PURE__ */ n.jsx(
782
779
  "button",
783
780
  {
784
781
  "aria-label": _?.backAriaLabel ?? "Back",
785
782
  className: "slide-landscape-header__back",
786
- onClick: Yt,
783
+ onClick: Ht,
787
784
  type: "button",
788
785
  children: /* @__PURE__ */ n.jsx(
789
- Kn,
786
+ Bn,
790
787
  {
791
788
  className: "slide-landscape-header__icon h-6 w-6",
792
789
  strokeWidth: 2.25
@@ -799,23 +796,23 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
799
796
  /* @__PURE__ */ n.jsx(
800
797
  "div",
801
798
  {
802
- className: Q(
799
+ className: J(
803
800
  "h-full min-h-0 w-full",
804
- Ht && "slide__viewport-content--with-header",
805
- Nt ? "slide-content--single" : "grid gap-4"
801
+ Ut && "slide__viewport-content--with-header",
802
+ Ft ? "slide-content--single" : "grid gap-4"
806
803
  ),
807
- children: F.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: Pe, className: "slide-stage__layer w-full", children: Xt.map(
804
+ children: B.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: Re, className: "slide-stage__layer w-full", children: Wt.map(
808
805
  (e, t) => {
809
- const c = t === Jt;
806
+ const l = t === $t;
810
807
  return /* @__PURE__ */ n.jsx(
811
808
  "div",
812
809
  {
813
- "aria-hidden": !c || void 0,
810
+ "aria-hidden": !l || void 0,
814
811
  className: "w-full h-full",
815
- style: { display: c ? void 0 : "none" },
816
- children: on(
812
+ style: { display: l ? void 0 : "none" },
813
+ children: tn(
817
814
  e.elementList,
818
- c
815
+ l
819
816
  )
820
817
  },
821
818
  e.sourceStepIndexes[0] ?? t
@@ -824,96 +821,96 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
824
821
  ) }) }) : null
825
822
  }
826
823
  ),
827
- Ot ? /* @__PURE__ */ n.jsx(
828
- Sn,
824
+ kt ? /* @__PURE__ */ n.jsx(
825
+ vn,
829
826
  {
830
- message: Un(
831
- _e,
832
- jt
827
+ message: Kn(
828
+ Ie,
829
+ Bt
833
830
  ),
834
831
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
835
832
  }
836
833
  ) : null,
837
834
  /* @__PURE__ */ n.jsx(
838
- En,
835
+ wn,
839
836
  {
840
- extraBottomOffset: Vt,
841
- hasPlayerGap: R,
842
- isEnabled: it && Kt,
843
- isPlayerHidden: E && !R,
844
- playbackTimeStore: G,
845
- subtitleCues: Qt
837
+ extraBottomOffset: jt,
838
+ hasPlayerGap: F,
839
+ isEnabled: rt && Nt,
840
+ isPlayerHidden: E && !F,
841
+ playbackTimeStore: z,
842
+ subtitleCues: Yt
846
843
  }
847
844
  ),
848
- qe ? /* @__PURE__ */ n.jsx(
845
+ Ke ? /* @__PURE__ */ n.jsx(
849
846
  "div",
850
847
  {
851
- ref: Xe,
852
- className: Q(
848
+ ref: $e,
849
+ className: J(
853
850
  "slide-interaction-overlay",
854
- R && E ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
851
+ F && E ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
855
852
  ),
856
- onClick: _t,
857
- onPointerDown: _t,
858
- style: Zt,
853
+ onClick: xt,
854
+ onPointerDown: xt,
855
+ style: Xt,
859
856
  children: /* @__PURE__ */ n.jsx(
860
- Pt,
857
+ Et,
861
858
  {
862
859
  content: String(o?.content ?? ""),
863
- defaultButtonText: bt.buttonText ?? "",
864
- defaultInputText: bt.inputText ?? "",
865
- defaultSelectedValues: tn,
860
+ defaultButtonText: gt.buttonText ?? "",
861
+ defaultInputText: gt.inputText ?? "",
862
+ defaultSelectedValues: Qt,
866
863
  confirmButtonText: D?.confirmButtonText,
867
864
  copyButtonText: D?.copyButtonText,
868
865
  copiedButtonText: D?.copiedButtonText,
869
- onSend: nn,
870
- readonly: xt,
871
- title: D?.title ?? Ee ?? "Submit the content below to continue."
866
+ onSend: Zt,
867
+ readonly: St,
868
+ title: D?.title ?? _e ?? "Submit the content below to continue."
872
869
  }
873
870
  )
874
871
  }
875
872
  ) : null,
876
873
  E ? /* @__PURE__ */ n.jsx(
877
- _n,
874
+ xn,
878
875
  {
879
876
  audioList: h,
880
- className: Q(
877
+ className: J(
881
878
  "absolute left-1/2 z-[2] -translate-x-1/2",
882
- dt ? "bottom-3" : "-bottom-3",
883
- Z,
884
- !R && "pointer-events-none opacity-0"
879
+ ct ? "bottom-3" : "-bottom-3",
880
+ Q,
881
+ !F && "pointer-events-none opacity-0"
885
882
  ),
886
- currentAudioIndex: g,
883
+ currentAudioIndex: y,
887
884
  defaultPlaying: !0,
888
885
  isPlaybackPaused: L,
889
- isAutoAdvanceEnabled: le,
886
+ isAutoAdvanceEnabled: ie,
890
887
  hasInteraction: !!o,
891
888
  isInteractionOpen: ge,
892
- isSubtitleEnabled: it,
893
- onAutoAdvanceToggle: rt,
894
- onLoadingChange: un,
889
+ isSubtitleEnabled: rt,
890
+ onAutoAdvanceToggle: tt,
891
+ onLoadingChange: sn,
895
892
  onPlaybackStarted: () => {
896
- Fe(!0);
893
+ Pe(!0);
897
894
  },
898
- onPlaybackTimeChange: G.setTime,
895
+ onPlaybackTimeChange: z.setTime,
899
896
  onSubtitleToggle: () => {
900
- Lt((e) => !e);
897
+ Ot((e) => !e);
901
898
  },
902
899
  nextDisabled: !x,
903
- onEnded: an,
904
- onFullscreen: sn,
905
- isFullscreen: lt,
906
- mobileViewMode: H,
907
- settingsPortalContainer: $e.current,
908
- onMobileViewModeChange: $t,
909
- onInteractionToggle: dn,
910
- onNext: cn,
911
- onPrev: ln,
912
- prevDisabled: !Bt,
913
- showControls: R,
914
- texts: Rt,
915
- customActionContext: Le,
916
- customActions: q,
900
+ onEnded: ln,
901
+ onFullscreen: nn,
902
+ isFullscreen: ot,
903
+ mobileViewMode: G,
904
+ settingsPortalContainer: He.current,
905
+ onMobileViewModeChange: Gt,
906
+ onInteractionToggle: cn,
907
+ onNext: on,
908
+ onPrev: rn,
909
+ prevDisabled: !Mt,
910
+ showControls: F,
911
+ texts: Tt,
912
+ customActionContext: je,
913
+ customActions: V,
917
914
  useAutoAdvanceToggle: ae
918
915
  }
919
916
  ) : null
@@ -925,6 +922,6 @@ const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
925
922
  );
926
923
  };
927
924
  export {
928
- yr as default
925
+ mr as default
929
926
  };
930
927
  //# sourceMappingURL=Slide.es.js.map