markdown-flow-ui 0.2.26-dev.4 → 0.2.26-dev.6

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,90 +1,90 @@
1
- import { jsxs as Ge, jsx as u, Fragment as $r } from "react/jsx-runtime";
2
- import { memo as zr, useMemo as f, useId as Xr, useRef as m, useCallback as r, useState as p, useEffect as s, useLayoutEffect as Jr } from "react";
3
- import { isSandboxInteractionMessage as Wr } from "../../lib/sandboxInteraction.es.js";
1
+ import { jsxs as Ge, jsx as u, Fragment as zr } from "react/jsx-runtime";
2
+ import { memo as Xr, useMemo as f, useId as Jr, useRef as m, useCallback as r, useState as p, useEffect as s, useLayoutEffect as Wr } from "react";
3
+ import { isSandboxInteractionMessage as jr } from "../../lib/sandboxInteraction.es.js";
4
4
  import { cn as Pe } from "../../lib/utils.es.js";
5
- import { useResolvedDirection as jr } from "../../lib/useResolvedDirection.es.js";
6
- import { getMarkdownFlowDirection as Qr, getMarkdownFlowLanguage as Zr } from "../../lib/locale.es.js";
7
- import eo from "../ui/loading-overlay-card.es.js";
8
- import to from "../ContentRender/ContentRender.es.js";
9
- import Nn from "../ContentRender/IframeSandbox.es.js";
5
+ import { useResolvedDirection as Qr } from "../../lib/useResolvedDirection.es.js";
6
+ import { getMarkdownFlowDirection as Zr, getMarkdownFlowLanguage as eo } from "../../lib/locale.es.js";
7
+ import to from "../ui/loading-overlay-card.es.js";
8
+ import no from "../ContentRender/ContentRender.es.js";
9
+ import Dn from "../ContentRender/IframeSandbox.es.js";
10
10
  import "../ui/inputGroup/input-group.es.js";
11
- import { isMobileDevice as no, isLandscapeViewport as Dn, subscribeMobileDeviceChange as ro } from "../../lib/mobileDevice.es.js";
12
- import oo from "./Player.es.js";
13
- import io from "./MarkdownSlideScaling.es.js";
14
- import lo from "./SubtitleOverlay.es.js";
15
- import ao from "./useSlide.es.js";
16
- import so from "./useWakePlayerFromIframe.es.js";
17
- import { PlayerKeyboardShortcutContext as co } from "./utils/playerKeyboardShortcutContext.es.js";
18
- import { activatePlayerKeyboardShortcutOwner as uo } from "./utils/playerKeyboardShortcuts.es.js";
19
- import { DEFAULT_MOBILE_VIEW_MODE as vt, resolveMobileViewModeState as fo } from "./utils/mobileScreenMode.es.js";
20
- import { shouldRenderInteractionOverlay as mo, clampInteractionOverlayDragOffset as Bn, shouldPresentInteractionOverlay as po } from "./utils/interactionPlayback.es.js";
21
- import { resolveMarkdownScalingMode as yo } from "./utils/markdownScaling.es.js";
11
+ import { isMobileDevice as ro, isLandscapeViewport as Bn, subscribeMobileDeviceChange as oo } from "../../lib/mobileDevice.es.js";
12
+ import io from "./Player.es.js";
13
+ import lo from "./MarkdownSlideScaling.es.js";
14
+ import ao from "./SubtitleOverlay.es.js";
15
+ import so from "./useSlide.es.js";
16
+ import co from "./useWakePlayerFromIframe.es.js";
17
+ import { PlayerKeyboardShortcutContext as uo } from "./utils/playerKeyboardShortcutContext.es.js";
18
+ import { activatePlayerKeyboardShortcutOwner as fo } from "./utils/playerKeyboardShortcuts.es.js";
19
+ import { DEFAULT_MOBILE_VIEW_MODE as gt, resolveMobileViewModeState as mo } from "./utils/mobileScreenMode.es.js";
20
+ import { shouldRenderInteractionOverlay as po, clampInteractionOverlayDragOffset as Vn, shouldPresentInteractionOverlay as yo } from "./utils/interactionPlayback.es.js";
21
+ import { resolveMarkdownScalingMode as ho } from "./utils/markdownScaling.es.js";
22
22
  import { shouldWakePlayerControlsAfterNavigation as $t } from "./utils/playerNavigationContext.es.js";
23
- import { shouldAutoAdvanceIntoAppendedMarker as ho } from "./utils/appendedMarkerAdvance.es.js";
24
- import { resolvePendingStepAudioKey as go, hasUnplayedStepAudio as vo } from "./utils/stepAudioProgress.es.js";
25
- import { getPlaybackSequenceTransition as So, shouldStartDefaultAudioSequence as Io } from "./utils/playbackSequence.es.js";
26
- import { hasResolvedInteractionElement as bo, canReachSubtitleJumpTarget as Vn } from "./utils/subtitleJumpNavigation.es.js";
27
- import { resolvePlayerCustomActionElement as Ao, getPlayerCustomActionCount as wo } from "./utils/playerCustomActions.es.js";
28
- import { createPlaybackTimeStore as xo } from "./utils/playbackTimeStore.es.js";
29
- import { resolveSlideInteractionState as Po } from "./utils/interactionResolution.es.js";
30
- import { shouldUseAutoAdvanceToggle as Eo } from "./utils/playerToggleMode.es.js";
31
- import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as Co, areImageOnlyStepIframeVisualsReady as To } from "./utils/imageOnlyStepVisualReady.es.js";
32
- import { resolveSilentStepAutoAdvanceBehavior as Ro } from "./utils/silentStepAutoAdvance.es.js";
33
- import { resolveSlidePlayerVisibility as _o, resolveSlidePlayerLayoutState as Oo } from "./utils/playerVisibility.es.js";
34
- import { getSlideLocaleTexts as Mo, DEFAULT_SLIDE_BUFFERING_TEXTS as ko } from "./slideI18n.es.js";
23
+ import { shouldAutoAdvanceIntoAppendedMarker as go } from "./utils/appendedMarkerAdvance.es.js";
24
+ import { resolvePendingStepAudioKey as vo, hasUnplayedStepAudio as So } from "./utils/stepAudioProgress.es.js";
25
+ import { getPlaybackSequenceTransition as Io, shouldStartDefaultAudioSequence as bo } from "./utils/playbackSequence.es.js";
26
+ import { hasResolvedInteractionElement as Ao, canReachSubtitleJumpTarget as Kn } from "./utils/subtitleJumpNavigation.es.js";
27
+ import { resolvePlayerCustomActionElement as wo, getPlayerCustomActionCount as xo } from "./utils/playerCustomActions.es.js";
28
+ import { createPlaybackTimeStore as Po } from "./utils/playbackTimeStore.es.js";
29
+ import { resolveSlideInteractionState as Eo } from "./utils/interactionResolution.es.js";
30
+ import { shouldUseAutoAdvanceToggle as Co } from "./utils/playerToggleMode.es.js";
31
+ import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as To, areImageOnlyStepIframeVisualsReady as Ro } from "./utils/imageOnlyStepVisualReady.es.js";
32
+ import { resolveSilentStepAutoAdvanceBehavior as _o } from "./utils/silentStepAutoAdvance.es.js";
33
+ import { resolveSlidePlayerVisibility as Oo, resolveSlidePlayerLayoutState as Mo } from "./utils/playerVisibility.es.js";
34
+ import { getSlideLocaleTexts as ko, DEFAULT_SLIDE_BUFFERING_TEXTS as Lo } from "./slideI18n.es.js";
35
35
  /* empty css */
36
36
  import zt from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
37
37
  import Fo from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
38
- const Lo = 2e3, No = 300, Do = 160, Bo = 16, Kn = 3e3, St = {
38
+ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
39
39
  x: 0,
40
40
  y: 0
41
- }, Jt = 0.5, Vo = typeof window > "u" ? s : Jr, Ko = [
41
+ }, Jt = 0.5, Ko = typeof window > "u" ? s : Wr, qo = [
42
42
  "button",
43
43
  "input",
44
44
  "textarea",
45
45
  '[contenteditable=""]',
46
46
  '[contenteditable="true"]',
47
47
  '[contenteditable="plaintext-only"]'
48
- ].join(", "), Wt = "waitingForAudio", qo = ({
48
+ ].join(", "), Wt = "waitingForAudio", Uo = ({
49
49
  x: c,
50
50
  y: d
51
51
  }) => ({
52
52
  x: Number(c.toFixed(2)),
53
53
  y: Number(d.toFixed(2))
54
- }), qn = (c) => Math.abs(c) >= Jt, Un = (c, d) => Math.abs(c.x - d.x) < Jt && Math.abs(c.y - d.y) < Jt, Uo = (c, d) => typeof c == "string" ? c : c[d] ?? c[Wt] ?? ko[d], Ho = (c, d) => typeof c == "string" ? c : {
54
+ }), Un = (c) => Math.abs(c) >= Jt, Hn = (c, d) => Math.abs(c.x - d.x) < Jt && Math.abs(c.y - d.y) < Jt, Ho = (c, d) => typeof c == "string" ? c : c[d] ?? c[Wt] ?? Lo[d], Yo = (c, d) => typeof c == "string" ? c : {
55
55
  ...d,
56
56
  ...c
57
- }, Yo = (c, d) => d ? c !== "loadingAudio" : !1, Hn = zr(
57
+ }, Go = (c, d) => d ? c !== "loadingAudio" : !1, Yn = Xr(
58
58
  ({
59
59
  content: c,
60
60
  title: d,
61
- dragHandleAriaLabel: $,
61
+ dragHandleAriaLabel: z,
62
62
  locale: Ee,
63
- dir: z,
64
- lang: X,
63
+ dir: X,
64
+ lang: J,
65
65
  defaultButtonText: Ce,
66
- defaultInputText: se,
66
+ defaultInputText: ce,
67
67
  defaultSelectedValues: $e,
68
- confirmButtonText: It,
69
- copyButtonText: J,
70
- copiedButtonText: bt,
68
+ confirmButtonText: St,
69
+ copyButtonText: W,
70
+ copiedButtonText: It,
71
71
  onSend: Te,
72
72
  onDragHandlePointerCancel: ze,
73
- onDragHandlePointerDown: At,
74
- onDragHandlePointerMove: Xe,
75
- onDragHandlePointerUp: Je,
76
- readonly: We = !1
73
+ onDragHandlePointerDown: bt,
74
+ onDragHandlePointerMove: At,
75
+ onDragHandlePointerUp: Xe,
76
+ readonly: Je = !1
77
77
  }) => /* @__PURE__ */ Ge("div", { className: "slide-player__interaction-card", children: [
78
78
  /* @__PURE__ */ u(
79
79
  "button",
80
80
  {
81
81
  type: "button",
82
82
  className: "slide-player__interaction-drag-handle",
83
- "aria-label": $,
83
+ "aria-label": z,
84
84
  onPointerCancel: ze,
85
- onPointerDown: At,
86
- onPointerMove: Xe,
87
- onPointerUp: Je,
85
+ onPointerDown: bt,
86
+ onPointerMove: At,
87
+ onPointerUp: Xe,
88
88
  children: /* @__PURE__ */ Ge("span", { className: "slide-player__interaction-drag-handle-icon", children: [
89
89
  /* @__PURE__ */ u(zt, { "aria-hidden": "true" }),
90
90
  /* @__PURE__ */ u(zt, { "aria-hidden": "true" }),
@@ -94,180 +94,181 @@ const Lo = 2e3, No = 300, Do = 160, Bo = 16, Kn = 3e3, St = {
94
94
  ),
95
95
  /* @__PURE__ */ u("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ u("p", { className: "slide-player__interaction-title", children: d }) }),
96
96
  /* @__PURE__ */ u("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ u(
97
- to,
97
+ no,
98
98
  {
99
99
  content: c,
100
100
  locale: Ee,
101
- dir: z,
102
- lang: X,
101
+ dir: X,
102
+ lang: J,
103
103
  defaultButtonText: Ce,
104
- defaultInputText: se,
104
+ defaultInputText: ce,
105
105
  defaultSelectedValues: $e,
106
- confirmButtonText: It,
107
- copyButtonText: J,
108
- copiedButtonText: bt,
106
+ confirmButtonText: St,
107
+ copyButtonText: W,
108
+ copiedButtonText: It,
109
109
  onSend: Te,
110
- readonly: We,
110
+ readonly: Je,
111
111
  sandboxMode: "content"
112
112
  }
113
113
  ) })
114
114
  ] })
115
115
  );
116
- Hn.displayName = "InteractionOverlayCard";
117
- const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
118
- const z = d[Ee];
119
- return $.sequence_number === z?.sequence_number && $.type === z?.type && $.content === z?.content;
120
- }), Xt = (c) => c instanceof HTMLElement && !!c.closest(Ko), _i = ({
116
+ Yn.displayName = "InteractionOverlayCard";
117
+ const $o = (c, d) => c.length === d.length && c.every((z, Ee) => {
118
+ const X = d[Ee];
119
+ return z.sequence_number === X?.sequence_number && z.type === X?.type && z.content === X?.content;
120
+ }), Xt = (c) => c instanceof HTMLElement && !!c.closest(qo), Oi = ({
121
121
  elementList: c = [],
122
122
  locale: d,
123
- playerEnabled: $,
123
+ playerEnabled: z,
124
124
  playerControlsVisibility: Ee,
125
- playerClassName: z,
126
- fullscreenHeader: X,
125
+ playerClassName: X,
126
+ fullscreenHeader: J,
127
127
  playerCustomActions: Ce,
128
- playerCustomActionPauseOnActive: se = !0,
128
+ playerCustomActionPauseOnActive: ce = !0,
129
129
  bufferingText: $e,
130
- interactionTitle: It,
131
- interactionTexts: J,
132
- playerTexts: bt,
130
+ interactionTitle: St,
131
+ interactionTexts: W,
132
+ playerTexts: It,
133
133
  playerAutoHideDelay: Te = 3e3,
134
- markerAutoAdvanceDelay: ze = Lo,
135
- showSlideProgress: At = !1,
134
+ markerAutoAdvanceDelay: ze = No,
135
+ showSlideProgress: bt = !1,
136
+ isSlideProgressGenerating: At = !1,
136
137
  onSlideProgressNavigate: Xe,
137
138
  interactionDefaultValueOptions: Je,
138
- onSend: We,
139
+ onSend: jt,
139
140
  onPlayerVisibilityChange: wt,
140
- onMobileViewModeChange: jt,
141
- onStepChange: Qt,
142
- onPlaybackCheckpoint: Yn,
141
+ onMobileViewModeChange: Qt,
142
+ onStepChange: Zt,
143
+ onPlaybackCheckpoint: Gn,
143
144
  playbackRestoreRequest: U = null,
144
- enableKeyboardShortcuts: ce = !0,
145
- enableIframeScaling: Gn = !0,
146
- enableMarkdownScaling: $n = !0,
147
- disableLoadingOverlay: L = !1,
148
- className: zn,
149
- dir: Xn,
150
- lang: Jn,
151
- onPointerDown: Zt,
152
- onFocusCapture: en,
153
- ...Wn
145
+ enableKeyboardShortcuts: ue = !0,
146
+ enableIframeScaling: $n = !0,
147
+ enableMarkdownScaling: zn = !0,
148
+ disableLoadingOverlay: F = !1,
149
+ className: Xn,
150
+ dir: Jn,
151
+ lang: Wn,
152
+ onPointerDown: en,
153
+ onFocusCapture: tn,
154
+ ...jn
154
155
  }) => {
155
- const W = Xn ?? Qr(d), Re = Jn ?? Zr(d), D = f(() => Mo(d), [d]), jn = f(
156
- () => Ho(
156
+ const j = Jn ?? Zr(d), Re = Wn ?? eo(d), N = f(() => ko(d), [d]), Qn = f(
157
+ () => Yo(
157
158
  $e,
158
- D.bufferingText
159
+ N.bufferingText
159
160
  ),
160
- [$e, D.bufferingText]
161
+ [$e, N.bufferingText]
161
162
  ), {
162
- playerEnabled: Qn,
163
- playerControlsVisibility: j
164
- } = _o({
165
- playerEnabled: $,
163
+ playerEnabled: Zn,
164
+ playerControlsVisibility: Q
165
+ } = Oo({
166
+ playerEnabled: z,
166
167
  playerControlsVisibility: Ee
167
- }), je = Xr(), ue = m(null), { resolvedDirection: Zn } = jr(ue, W), xt = m(null), Qe = m(null), tn = m(null), de = m(null), Ze = m(!1), _e = m(null), et = m(null), Q = m(null), Oe = m(null), Me = m(null), fe = m(null), ke = m(null), nn = m([]), me = m(!1), H = m(null), Fe = m(null), rn = m(0), Pt = m(null), on = m({
168
+ }), We = Jr(), de = m(null), { resolvedDirection: er } = Qr(de, j), xt = m(null), je = m(null), nn = m(null), fe = m(null), Qe = m(!1), _e = m(null), Ze = m(null), Z = m(null), Oe = m(null), Me = m(null), me = m(null), ke = m(null), rn = m([]), pe = m(!1), H = m(null), Le = m(null), on = m(0), Pt = m(null), ln = m({
168
169
  markerCount: 0,
169
170
  currentIndex: -1,
170
171
  canGoNext: !1
171
172
  }), Et = m(!1), {
172
173
  currentElementList: T,
173
- stepElementLists: ln,
174
+ stepElementLists: an,
174
175
  slideElementList: S,
175
176
  currentIndex: a,
176
177
  audioList: y,
177
- audioSlideIndexes: Z,
178
- currentAudioSequenceIndexes: tt,
178
+ audioSlideIndexes: ee,
179
+ currentAudioSequenceIndexes: et,
179
180
  currentStepHasSpeakableElement: w,
180
181
  currentInteractionElement: h,
181
- canGoPrev: er,
182
+ canGoPrev: tr,
182
183
  canGoNext: R,
183
- handlePrev: an,
184
- handleNext: N,
185
- handleGoTo: pe
186
- } = ao(c), Le = f(() => {
184
+ handlePrev: sn,
185
+ handleNext: D,
186
+ handleGoTo: ye
187
+ } = so(c), Fe = f(() => {
187
188
  if (!(a < 0))
188
189
  return S[a];
189
- }, [a, S]), ye = f(
190
+ }, [a, S]), he = f(
190
191
  () => T.map(
191
192
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
192
193
  ),
193
194
  [T]
194
- ), sn = S.length, tr = sn === 1, x = Qn && (S.length > 0 || y.length > 0 || !!h), nr = f(
195
+ ), cn = S.length, nr = cn === 1, x = Zn && (S.length > 0 || y.length > 0 || !!h), rr = f(
195
196
  () => ({
196
- enabled: ce,
197
- ownerId: je
197
+ enabled: ue,
198
+ ownerId: We
198
199
  }),
199
- [ce, je]
200
+ [ue, We]
200
201
  ), Y = r(() => {
201
- !ce || !x || uo(je);
202
- }, [ce, je, x]), _ = f(
203
- () => tt.map((e) => y[e]?.audioKey).filter((e) => !!e),
204
- [y, tt]
205
- ), [rr, Ne] = p(!0), [nt, ee] = p(!1), [Ct, Tt] = p(!0), [De, cn] = p(!0), [P, B] = p(null), [rt, un] = p(null), Be = m(
202
+ !ue || !x || fo(We);
203
+ }, [ue, We, x]), _ = f(
204
+ () => et.map((e) => y[e]?.audioKey).filter((e) => !!e),
205
+ [y, et]
206
+ ), [or, Ne] = p(!0), [tt, te] = p(!1), [Ct, Tt] = p(!0), [De, un] = p(!0), [P, B] = p(null), [nt, dn] = p(null), Be = m(
206
207
  null
207
- ), dn = m(null), [or, fn] = p(null), [ir, I] = p(!1), [lr, Rt] = p(Wt), [O, ot] = p(!1), it = m(/* @__PURE__ */ new Set()), [ar, lt] = p(!1), [mn, sr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [he, at] = p(!1), [pn, st] = p(!1), [E, kt] = p(
208
- St
209
- ), [Ft, Lt] = p(!1), [
210
- cr,
211
- ge
212
- ] = p(0), [yn, ur] = p(!1), V = f(() => no(), []), [ct, Nt] = p(
208
+ ), fn = m(null), [ir, mn] = p(null), [lr, I] = p(!1), [ar, Rt] = p(Wt), [O, rt] = p(!1), ot = m(/* @__PURE__ */ new Set()), [sr, it] = p(!1), [pn, cr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [ge, lt] = p(!1), [yn, at] = p(!1), [E, kt] = p(
213
209
  vt
214
- ), [hn, Dt] = p(!1), [dr, gn] = p(
215
- () => V ? Dn() : !1
216
- ), ve = f(() => xo(), []), {
217
- effectiveMobileViewMode: te,
218
- isImmersiveMobileFullscreen: Se,
219
- isNativeMobileFullscreen: vn,
220
- shouldRotateFullscreenViewport: fr
210
+ ), [Lt, Ft] = p(!1), [
211
+ ur,
212
+ ve
213
+ ] = p(0), [hn, dr] = p(!1), V = f(() => ro(), []), [st, Nt] = p(
214
+ gt
215
+ ), [gn, Dt] = p(!1), [fr, vn] = p(
216
+ () => V ? Bn() : !1
217
+ ), Se = f(() => Po(), []), {
218
+ effectiveMobileViewMode: ne,
219
+ isImmersiveMobileFullscreen: Ie,
220
+ isNativeMobileFullscreen: Sn,
221
+ shouldRotateFullscreenViewport: mr
221
222
  } = f(
222
- () => fo({
223
- hasManualMobileViewMode: hn,
223
+ () => mo({
224
+ hasManualMobileViewMode: gn,
224
225
  isMobileDevice: V,
225
- mobileViewMode: ct
226
+ mobileViewMode: st
226
227
  }),
227
228
  [
228
- hn,
229
+ gn,
229
230
  V,
230
- dr,
231
- ct
231
+ fr,
232
+ st
232
233
  ]
233
- ), Sn = m(te), {
234
+ ), In = m(ne), {
234
235
  controlsVisible: K,
235
- layoutReserved: ut
236
- } = Oo({
237
- isAutoVisible: rr,
238
- playerControlsVisibility: j,
236
+ layoutReserved: ct
237
+ } = Mo({
238
+ isAutoVisible: or,
239
+ playerControlsVisibility: Q,
239
240
  shouldMountPlayer: x
240
- }), mr = Se && K, pr = Se && ut, yr = Se || vn, In = yn && !V, hr = r(
241
+ }), pr = Ie && K, yr = Ie && ct, hr = Ie || Sn, bn = hn && !V, gr = r(
241
242
  (e) => {
242
243
  Dt(!0), Nt(e);
243
244
  },
244
245
  []
245
- ), bn = r(() => {
246
- Dt(!1), Nt(vt);
247
- }, []), gr = r(() => {
248
- bn(), X?.onBack?.();
249
- }, [X, bn]), M = r(() => {
250
- Q.current !== null && (window.clearTimeout(Q.current), Q.current = null);
246
+ ), An = r(() => {
247
+ Dt(!1), Nt(gt);
248
+ }, []), vr = r(() => {
249
+ An(), J?.onBack?.();
250
+ }, [J, An]), M = r(() => {
251
+ Z.current !== null && (window.clearTimeout(Z.current), Z.current = null);
251
252
  }, []), k = r(() => {
252
253
  Oe.current !== null && (window.clearTimeout(Oe.current), Oe.current = null);
253
- }, []), dt = r(() => {
254
- M(), k(), at(!1), ge(0);
255
- }, [M, k]), ft = r(
254
+ }, []), ut = r(() => {
255
+ M(), k(), lt(!1), ve(0);
256
+ }, [M, k]), dt = r(
256
257
  (e) => {
257
- e && dt(), Ot(e);
258
+ e && ut(), Ot(e);
258
259
  },
259
- [dt]
260
- ), An = r(() => {
261
- dt(), Ot((e) => !e);
262
- }, [dt]), ne = r(() => {
260
+ [ut]
261
+ ), wn = r(() => {
262
+ ut(), Ot((e) => !e);
263
+ }, [ut]), re = r(() => {
263
264
  kt(
264
- (e) => e.x === St.x && e.y === St.y ? e : St
265
- ), Lt(!1), ke.current = null, fe.current = null;
266
- }, []), { mountedStepStates: vr, currentMountedStateIndex: Sr } = f(() => {
265
+ (e) => e.x === vt.x && e.y === vt.y ? e : vt
266
+ ), Ft(!1), ke.current = null, me.current = null;
267
+ }, []), { mountedStepStates: Sr, currentMountedStateIndex: Ir } = f(() => {
267
268
  const e = [], t = /* @__PURE__ */ new Map();
268
- return ln.forEach((n, i) => {
269
+ return an.forEach((n, i) => {
269
270
  const l = e.findIndex(
270
- (o) => Go(
271
+ (o) => $o(
271
272
  o.elementList,
272
273
  n
273
274
  )
@@ -284,69 +285,69 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
284
285
  mountedStepStates: e,
285
286
  currentMountedStateIndex: a >= 0 ? t.get(a) ?? -1 : -1
286
287
  };
287
- }, [a, ln]), wn = f(() => String(a), [a]), C = f(() => P ? y.findIndex(
288
+ }, [a, an]), xn = f(() => String(a), [a]), C = f(() => P ? y.findIndex(
288
289
  (e) => (e.audioKey ?? "") === P
289
- ) : -1, [y, P]), mt = f(
290
+ ) : -1, [y, P]), ft = f(
290
291
  () => C >= 0 ? y[C] : void 0,
291
292
  [y, C]
292
293
  );
293
294
  s(() => {
294
- if (!U || U.id === dn.current)
295
+ if (!U || U.id === fn.current)
295
296
  return;
296
297
  const e = y.findIndex(
297
298
  (n) => n.audioKey === U.audioKey
298
299
  );
299
300
  if (e < 0)
300
301
  return;
301
- const t = Z[e];
302
- t != null && (dn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, un(U), a !== t && pe(t));
302
+ const t = ee[e];
303
+ t != null && (fn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, dn(U), a !== t && ye(t));
303
304
  }, [
304
305
  y,
305
- Z,
306
+ ee,
306
307
  a,
307
- pe,
308
+ ye,
308
309
  U
309
310
  ]);
310
- const Ir = mt?.element?.subtitle_cues ?? [], pt = f(
311
+ const br = ft?.element?.subtitle_cues ?? [], mt = f(
311
312
  () => _[0] ?? "none",
312
313
  [_]
313
314
  ), Bt = f(
314
315
  () => ({
315
- currentElement: Ao({
316
+ currentElement: wo({
316
317
  currentAudioIndex: C,
317
- currentAudioSequenceIndexes: tt,
318
+ currentAudioSequenceIndexes: et,
318
319
  audioList: y,
319
320
  currentInteractionElement: b,
320
- currentStepElement: Le
321
+ currentStepElement: Fe
321
322
  }),
322
323
  currentIndex: a,
323
- currentStepElement: Le,
324
+ currentStepElement: Fe,
324
325
  isActive: _t,
325
- setActive: ft,
326
- toggleActive: An
326
+ setActive: dt,
327
+ toggleActive: wn
327
328
  }),
328
329
  [
329
330
  b,
330
331
  y,
331
332
  C,
332
- tt,
333
+ et,
333
334
  a,
334
- Le,
335
+ Fe,
335
336
  _t,
336
- ft,
337
- An
337
+ dt,
338
+ wn
338
339
  ]
339
- ), yt = f(
340
- () => wo(
340
+ ), pt = f(
341
+ () => xo(
341
342
  Ce,
342
343
  Bt
343
344
  ),
344
345
  [Bt, Ce]
345
- ), Vt = yt > 0, Kt = Vt && _t, br = f(
346
+ ), Vt = pt > 0, Kt = Vt && _t, Ar = f(
346
347
  () => ({
347
- "--slide-player-custom-action-count": String(yt),
348
+ "--slide-player-custom-action-count": String(pt),
348
349
  "--slide-player-mobile-control-count": String(
349
- yt + 4
350
+ pt + 4
350
351
  ),
351
352
  "--slide-interaction-drag-x": `${E.x}px`,
352
353
  "--slide-interaction-drag-y": `${E.y}px`
@@ -354,24 +355,24 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
354
355
  [
355
356
  E.x,
356
357
  E.y,
357
- yt
358
+ pt
358
359
  ]
359
- ), xn = _.length > 0, Pn = f(() => h ? `${h.sequence_number ?? "none"}:${String(
360
+ ), Pn = _.length > 0, En = f(() => h ? `${h.sequence_number ?? "none"}:${String(
360
361
  h.content ?? ""
361
- )}` : "none", [h]), Ie = f(
362
- () => [wn, Pn].join("|"),
363
- [Pn, wn]
364
- ), Ar = f(
362
+ )}` : "none", [h]), be = f(
363
+ () => [xn, En].join("|"),
364
+ [En, xn]
365
+ ), wr = f(
365
366
  () => [
366
- Ie,
367
- mt?.audioKey ?? "none",
367
+ be,
368
+ ft?.audioKey ?? "none",
368
369
  String(C)
369
370
  ].join("|"),
370
- [C, mt?.audioKey, Ie]
371
- ), En = !!f(() => !pt || pt === "none" ? "" : y.find(
372
- (t) => t.audioKey === pt
373
- )?.audioUrl?.trim() ?? "", [y, pt]), re = se && Kt, Ve = f(
374
- () => Eo({
371
+ [C, ft?.audioKey, be]
372
+ ), Cn = !!f(() => !mt || mt === "none" ? "" : y.find(
373
+ (t) => t.audioKey === mt
374
+ )?.audioUrl?.trim() ?? "", [y, mt]), oe = ce && Kt, Ve = f(
375
+ () => Co({
375
376
  canGoNext: R,
376
377
  currentAudioIndex: C,
377
378
  currentStepHasSpeakableElement: w,
@@ -383,8 +384,8 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
383
384
  h,
384
385
  w
385
386
  ]
386
- ), Cn = f(
387
- () => Ro({
387
+ ), Tn = f(
388
+ () => _o({
388
389
  currentElementList: T,
389
390
  currentStepHasSpeakableElement: w,
390
391
  currentInteractionElement: h,
@@ -396,106 +397,106 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
396
397
  w,
397
398
  ze
398
399
  ]
399
- ), Tn = Cn.delayMs, Ke = Cn.usesImageOnlyDelay, qt = f(
400
- () => `${a}:${ye.join("|")}`,
401
- [a, ye]
402
- ), [wr, xr] = p(null), Rn = !Ke || wr === qt, q = r(() => {
403
- de.current !== null && (window.clearTimeout(de.current), de.current = null);
404
- }, []), be = r(() => {
400
+ ), Rn = Tn.delayMs, Ke = Tn.usesImageOnlyDelay, qt = f(
401
+ () => `${a}:${he.join("|")}`,
402
+ [a, he]
403
+ ), [xr, Pr] = p(null), _n = !Ke || xr === qt, q = r(() => {
404
+ fe.current !== null && (window.clearTimeout(fe.current), fe.current = null);
405
+ }, []), Ae = r(() => {
405
406
  _e.current !== null && (window.clearTimeout(_e.current), _e.current = null);
406
407
  }, []), G = r(() => {
407
- et.current !== null && (window.clearTimeout(et.current), et.current = null);
408
- }, []), F = r(
408
+ Ze.current !== null && (window.clearTimeout(Ze.current), Ze.current = null);
409
+ }, []), L = r(
409
410
  (e = {}) => {
410
- be(), M(), k(), G(), B(null), ve.reset(), I(!1), Rt(Wt), ot(!1), it.current = /* @__PURE__ */ new Set(), lt(!1), fn(null), e.preservePendingSubtitleJump || (Fe.current = null), Mt(void 0), at(!1), ge(0);
411
+ Ae(), M(), k(), G(), B(null), Se.reset(), I(!1), Rt(Wt), rt(!1), ot.current = /* @__PURE__ */ new Set(), it(!1), mn(null), e.preservePendingSubtitleJump || (Le.current = null), Mt(void 0), lt(!1), ve(0);
411
412
  },
412
413
  [
413
- be,
414
+ Ae,
414
415
  G,
415
416
  M,
416
417
  k,
417
- ve
418
+ Se
418
419
  ]
419
- ), ht = r(
420
+ ), yt = r(
420
421
  (e) => {
421
- rn.current += 1, fn({
422
+ on.current += 1, mn({
422
423
  ...e,
423
- id: rn.current
424
+ id: on.current
424
425
  });
425
426
  },
426
427
  []
427
- ), Ae = r(() => {
428
- const e = go(
428
+ ), we = r(() => {
429
+ const e = vo(
429
430
  _,
430
- it.current
431
+ ot.current
431
432
  );
432
433
  return e ? (B(e), !0) : !1;
433
434
  }, [_]), qe = r(() => {
434
- M(), k(), at(!1), ge(0), !Ae() && R && N();
435
+ M(), k(), lt(!1), ve(0), !we() && R && D();
435
436
  }, [
436
437
  R,
437
438
  M,
438
439
  k,
439
- N,
440
- Ae
441
- ]), _n = r(
440
+ D,
441
+ we
442
+ ]), On = r(
442
443
  (e) => {
443
444
  if (k(), !e)
444
445
  return;
445
446
  const t = () => {
446
- Oe.current = null, ge(
447
- Do
448
- ), at(!0), H.current = null;
447
+ Oe.current = null, ve(
448
+ Bo
449
+ ), lt(!0), H.current = null;
449
450
  };
450
451
  Oe.current = window.setTimeout(
451
452
  t,
452
- No
453
+ Do
453
454
  );
454
455
  },
455
456
  [k]
456
457
  ), Ut = r(
457
- () => Ze.current || !!ue.current?.querySelector(".slide-player__controls:hover"),
458
+ () => Qe.current || !!de.current?.querySelector(".slide-player__controls:hover"),
458
459
  []
459
460
  ), g = r(
460
- (e = nt) => {
461
- !x || j === "hidden" || (Ne(!0), q(), !(j === "visible" || !e || Te <= 0 || Ut()) && (de.current = window.setTimeout(() => {
461
+ (e = tt) => {
462
+ !x || Q === "hidden" || (Ne(!0), q(), !(Q === "visible" || !e || Te <= 0 || Ut()) && (fe.current = window.setTimeout(() => {
462
463
  if (Ut()) {
463
- de.current = null;
464
+ fe.current = null;
464
465
  return;
465
466
  }
466
- Ne(!1), de.current = null;
467
+ Ne(!1), fe.current = null;
467
468
  }, Te)));
468
469
  },
469
470
  [
470
471
  q,
471
- nt,
472
+ tt,
472
473
  Ut,
473
474
  Te,
474
- j,
475
+ Q,
475
476
  x
476
477
  ]
477
- ), Ue = !!bo(h), oe = !!h && !Ue, Pr = r((e) => {
478
+ ), Ue = !!Ao(h), ie = !!h && !Ue, Er = r((e) => {
478
479
  Tt(e);
479
- }, []), we = r(
480
+ }, []), $ = r(
480
481
  (e) => {
481
482
  e && Tt(e.shouldContinuePlayback);
482
483
  },
483
484
  []
484
485
  );
485
486
  s(() => {
486
- cn(Ct);
487
- }, [a, Ct, se]), s(() => {
488
- se && ft(!1);
487
+ un(Ct);
488
+ }, [a, Ct, ce]), s(() => {
489
+ ce && dt(!1);
489
490
  }, [
490
491
  a,
491
- se,
492
- ft
492
+ ce,
493
+ dt
493
494
  ]), s(() => {
494
495
  Vt || Ot(!1);
495
496
  }, [Vt]), s(() => () => {
496
- be(), G(), q(), M(), k();
497
+ Ae(), G(), q(), M(), k();
497
498
  }, [
498
- be,
499
+ Ae,
499
500
  G,
500
501
  M,
501
502
  k,
@@ -509,12 +510,12 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
509
510
  const i = () => {
510
511
  n?.(), n = null;
511
512
  }, l = () => {
512
- e || (i(), G(), xr(qt));
513
+ e || (i(), G(), Pr(qt));
513
514
  }, o = () => {
514
515
  if (e)
515
516
  return;
516
517
  i();
517
- const v = Qe.current?.querySelector(
518
+ const v = je.current?.querySelector(
518
519
  '[data-active-step="true"]'
519
520
  );
520
521
  if (!v)
@@ -522,37 +523,37 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
522
523
  const A = Array.from(
523
524
  v.querySelectorAll("iframe")
524
525
  );
525
- if (A.length === 0 || To(A)) {
526
+ if (A.length === 0 || Ro(A)) {
526
527
  l();
527
528
  return;
528
529
  }
529
- const ie = [], Ye = () => {
530
+ const le = [], Ye = () => {
530
531
  e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
531
532
  t = null, o();
532
533
  }));
533
- }, Gt = (le, xe, ae) => {
534
- le.addEventListener(xe, ae, { once: !0 }), ie.push(
535
- () => le.removeEventListener(xe, ae)
534
+ }, Gt = (ae, xe, se) => {
535
+ ae.addEventListener(xe, se, { once: !0 }), le.push(
536
+ () => ae.removeEventListener(xe, se)
536
537
  );
537
538
  };
538
- A.forEach((le) => {
539
- const xe = le.contentDocument;
539
+ A.forEach((ae) => {
540
+ const xe = ae.contentDocument;
540
541
  if (!xe || xe.readyState !== "complete") {
541
- Gt(le, "load", Ye);
542
+ Gt(ae, "load", Ye);
542
543
  return;
543
544
  }
544
- Array.from(xe.images).filter((ae) => !ae.complete).forEach((ae) => {
545
- Gt(ae, "load", Ye), Gt(ae, "error", Ye);
545
+ Array.from(xe.images).filter((se) => !se.complete).forEach((se) => {
546
+ Gt(se, "load", Ye), Gt(se, "error", Ye);
546
547
  });
547
548
  }), n = () => {
548
- ie.forEach((le) => le());
549
+ le.forEach((ae) => ae());
549
550
  };
550
551
  };
551
552
  return t = window.requestAnimationFrame(() => {
552
553
  t = null, o();
553
- }), et.current = window.setTimeout(() => {
554
+ }), Ze.current = window.setTimeout(() => {
554
555
  l();
555
- }, Co), () => {
556
+ }, To), () => {
556
557
  e = !0, i(), G(), t !== null && window.cancelAnimationFrame(t);
557
558
  };
558
559
  }, [
@@ -564,24 +565,24 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
564
565
  ]), s(() => (wt?.(K), () => {
565
566
  wt?.(!1);
566
567
  }), [wt, K]), s(() => {
567
- K || (Ze.current = !1);
568
+ K || (Qe.current = !1);
568
569
  }, [K]), s(() => {
569
- V || ct === vt || (Dt(!1), Nt(vt));
570
- }, [V, ct]), s(() => {
570
+ V || st === gt || (Dt(!1), Nt(gt));
571
+ }, [V, st]), s(() => {
571
572
  if (!V) {
572
- gn(!1);
573
+ vn(!1);
573
574
  return;
574
575
  }
575
576
  const e = () => {
576
- gn(Dn()), ne();
577
+ vn(Bn()), re();
577
578
  }, t = () => {
578
- ne();
579
+ re();
579
580
  };
580
581
  e(), window.addEventListener("orientationchange", t), window.screen?.orientation?.addEventListener?.(
581
582
  "change",
582
583
  t
583
584
  );
584
- const n = ro(
585
+ const n = oo(
585
586
  e
586
587
  );
587
588
  return () => {
@@ -590,14 +591,14 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
590
591
  t
591
592
  );
592
593
  };
593
- }, [V, ne]), s(() => {
594
- jt?.(te);
595
- }, [te, jt]), s(() => {
596
- Sn.current !== te && ne(), Sn.current = te;
597
- }, [te, ne]), s(() => {
598
- Qt?.(Le, a);
599
- }, [a, Le, Qt]), s(() => {
600
- const e = on.current, t = ho(
594
+ }, [V, re]), s(() => {
595
+ Qt?.(ne);
596
+ }, [ne, Qt]), s(() => {
597
+ In.current !== ne && re(), In.current = ne;
598
+ }, [ne, re]), s(() => {
599
+ Zt?.(Fe, a);
600
+ }, [a, Fe, Zt]), s(() => {
601
+ const e = ln.current, t = go(
601
602
  {
602
603
  previousMarkerCount: e.markerCount,
603
604
  nextMarkerCount: S.length,
@@ -613,148 +614,148 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
613
614
  shouldUseSilentStepAutoAdvanceToggle: Ve
614
615
  }
615
616
  );
616
- on.current = {
617
+ ln.current = {
617
618
  markerCount: S.length,
618
619
  currentIndex: a,
619
620
  canGoNext: R
620
- }, t && N();
621
+ }, t && D();
621
622
  }, [
622
623
  R,
623
624
  P,
624
625
  a,
625
626
  h,
626
627
  w,
627
- N,
628
+ D,
628
629
  O,
629
630
  Ue,
630
631
  De,
631
632
  Ve,
632
633
  S.length
633
634
  ]), s(() => {
634
- if (!x || j === "hidden") {
635
+ if (!x || Q === "hidden") {
635
636
  q(), Ne(!1);
636
637
  return;
637
638
  }
638
- if (j === "visible") {
639
+ if (Q === "visible") {
639
640
  q(), Ne(!0);
640
641
  return;
641
642
  }
642
- nt || g(!0);
643
+ tt || g(!0);
643
644
  }, [
644
645
  q,
645
- nt,
646
- j,
646
+ tt,
647
+ Q,
647
648
  x,
648
649
  g
649
650
  ]), s(() => {
650
651
  if (typeof window > "u")
651
652
  return;
652
653
  const e = (t) => {
653
- t.origin === window.location.origin && Wr(t.data) && t.data.eventType === "click" && x && (Y(), ee(!0), g(!0));
654
+ t.origin === window.location.origin && jr(t.data) && t.data.eventType === "click" && x && (Y(), te(!0), g(!0));
654
655
  };
655
656
  return window.addEventListener("message", e), () => {
656
657
  window.removeEventListener("message", e);
657
658
  };
658
- }, [Y, x, g]), so({
659
- sectionRef: ue,
659
+ }, [Y, x, g]), co({
660
+ sectionRef: de,
660
661
  enabled: x,
661
- keyboardShortcutsEnabled: ce,
662
+ keyboardShortcutsEnabled: ue,
662
663
  onKeyboardShortcut: Y,
663
664
  onWake: () => {
664
- Y(), ee(!0), g(!0);
665
+ Y(), te(!0), g(!0);
665
666
  }
666
667
  }), s(() => {
667
668
  if (!x) {
668
- F();
669
+ L();
669
670
  return;
670
671
  }
671
672
  if (Be.current) {
672
- Pt.current = Ie;
673
+ Pt.current = be;
673
674
  return;
674
675
  }
675
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = So({
676
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Io({
676
677
  previousResetKey: Pt.current,
677
- nextResetKey: Ie,
678
+ nextResetKey: be,
678
679
  currentAudioKey: P,
679
680
  hasCompletedCurrentStepAudio: O
680
681
  });
681
- Pt.current = Ie;
682
- const n = H.current === a && !!h, i = po({
682
+ Pt.current = be;
683
+ const n = H.current === a && !!h, i = yo({
683
684
  hasInteraction: !!h,
684
- shouldBlockPlaybackForInteraction: oe,
685
+ shouldBlockPlaybackForInteraction: ie,
685
686
  shouldOpenInteractionOverlayAfterAudio: n,
686
687
  hasPlaybackContextChanged: e,
687
688
  hasResolvedCurrentInteraction: Ue,
688
689
  currentStepHasSpeakableElement: w,
689
690
  isPlayerCustomActionActive: Kt
690
- }), l = Fe.current, o = l?.slideIndex === a;
691
- if (e && F({
691
+ }), l = Le.current, o = l?.slideIndex === a;
692
+ if (e && L({
692
693
  preservePendingSubtitleJump: o
693
- }), !(T.length === 0 && !h) && !re) {
694
- if (l?.slideIndex === a && Vn({
694
+ }), !(T.length === 0 && !h) && !oe) {
695
+ if (l?.slideIndex === a && Kn({
695
696
  currentIndex: a,
696
697
  resolvedCurrentInteractionElement: b,
697
698
  slideElementList: S,
698
699
  targetSlideIndex: l.slideIndex
699
700
  })) {
700
- Fe.current = null, Et.current = !0, B(l.audioKey), ht({
701
+ Le.current = null, Et.current = !0, B(l.audioKey), yt({
701
702
  audioIndex: l.audioIndex,
702
703
  timeMs: l.timeMs
703
704
  });
704
705
  return;
705
706
  }
706
707
  if (h && Mt(h), i) {
707
- _n(h);
708
+ On(h);
708
709
  return;
709
710
  }
710
- if (k(), H.current = null, !oe && t && !Ae()) {
711
+ if (k(), H.current = null, !ie && t && !we()) {
711
712
  if (w) {
712
- if (L) {
713
+ if (F) {
713
714
  I(!1);
714
715
  return;
715
716
  }
716
717
  I(!0);
717
718
  return;
718
719
  }
719
- if (R && !(Ve && !De) && !(Ke && !Rn))
720
+ if (R && !(Ve && !De) && !(Ke && !_n))
720
721
  return _e.current = window.setTimeout(() => {
721
- _e.current = null, N();
722
- }, Tn), () => {
723
- be();
722
+ _e.current = null, D();
723
+ }, Rn), () => {
724
+ Ae();
724
725
  };
725
726
  }
726
727
  }
727
728
  }, [
728
729
  b,
729
730
  R,
730
- be,
731
+ Ae,
731
732
  T.length,
732
733
  a,
733
734
  h,
734
735
  P,
735
- Ie,
736
+ be,
736
737
  w,
737
738
  Ke,
739
+ _n,
738
740
  Rn,
739
- Tn,
740
- N,
741
+ D,
741
742
  O,
742
- L,
743
+ F,
743
744
  De,
744
745
  Ue,
745
746
  Kt,
746
- oe,
747
+ ie,
747
748
  k,
748
- F,
749
- ht,
750
- _n,
749
+ L,
750
+ yt,
751
+ On,
751
752
  x,
752
753
  S,
753
- Ae,
754
- re,
754
+ we,
755
+ oe,
755
756
  Ve
756
757
  ]), s(() => {
757
- if (L || re || !w || oe) {
758
+ if (F || oe || !w || ie) {
758
759
  I(!1);
759
760
  return;
760
761
  }
@@ -762,66 +763,66 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
762
763
  I(!1);
763
764
  return;
764
765
  }
765
- if (xn) {
766
+ if (Pn) {
766
767
  I(!1);
767
768
  return;
768
769
  }
769
770
  Rt("waitingForAudio"), I(!0);
770
771
  }, [
771
- xn,
772
+ Pn,
772
773
  w,
773
774
  O,
774
- L,
775
- re,
776
- oe
775
+ F,
776
+ oe,
777
+ ie
777
778
  ]), s(() => {
778
- O && vo(
779
+ O && So(
779
780
  _,
780
- it.current
781
- ) && ot(!1);
781
+ ot.current
782
+ ) && rt(!1);
782
783
  }, [_, O]), s(() => {
783
784
  if (Be.current)
784
785
  return;
785
786
  const e = Et.current;
786
- Et.current = !1, Io({
787
+ Et.current = !1, bo({
787
788
  currentAudioKey: P,
788
789
  currentAudioSequenceLength: _.length,
789
790
  currentStepHasSpeakableElement: w,
790
791
  hasCompletedCurrentStepAudio: O,
791
- shouldBlockPlaybackForInteraction: oe,
792
- shouldPausePlaybackForCustomAction: re,
792
+ shouldBlockPlaybackForInteraction: ie,
793
+ shouldPausePlaybackForCustomAction: oe,
793
794
  shouldSkipDefaultAudioStart: e
794
- }) && Ae();
795
+ }) && we();
795
796
  }, [
796
797
  P,
797
798
  _,
798
799
  w,
799
800
  O,
800
- re,
801
801
  oe,
802
- Ae
802
+ ie,
803
+ we
803
804
  ]), s(() => {
804
805
  !P || C >= 0 || B(null);
805
806
  }, [C, P]), s(() => {
806
- C >= 0 || ve.reset();
807
- }, [C, ve]), s(() => {
808
- lt(!1);
809
- }, [Ar]);
807
+ C >= 0 || Se.reset();
808
+ }, [C, Se]), s(() => {
809
+ it(!1);
810
+ }, [wr]);
810
811
  const {
811
- interactionDefaults: On,
812
- interactionDefaultSelectedValues: Er,
813
- hasResolvedInteractionInput: Mn,
814
- isInteractionReadonly: Cr,
815
- shouldAutoContinueInteraction: kn
812
+ interactionDefaults: Mn,
813
+ interactionDefaultSelectedValues: Cr,
814
+ hasResolvedInteractionInput: kn,
815
+ isInteractionReadonly: Tr,
816
+ shouldAutoContinueInteraction: Ln
816
817
  } = f(
817
- () => Po(b, {
818
+ () => Eo(b, {
818
819
  interactionDefaultValueOptions: Je
819
820
  }),
820
821
  [b, Je]
821
- ), Tr = !!b?.readonly || Cr, He = mo({
822
+ ), Rr = !!b?.readonly || Tr, He = po({
822
823
  hasActiveInteraction: !!b,
823
- isInteractionOverlayOpen: he
824
- }), Rr = r(
824
+ isInteractionOverlayOpen: ge
825
+ }), _r = r(
825
826
  (e) => {
826
827
  const n = [
827
828
  ...e.selectedValues ?? [],
@@ -831,24 +832,24 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
831
832
  Mt((i) => !i || !n ? i : {
832
833
  ...i,
833
834
  user_input: n
834
- }), We?.(e, b), qe();
835
+ }), jt?.(e, b), qe();
835
836
  },
836
- [b, qe, We]
837
+ [b, qe, jt]
837
838
  );
838
839
  s(() => {
839
840
  const e = () => {
840
- ur(document.fullscreenElement === ue.current);
841
+ dr(document.fullscreenElement === de.current);
841
842
  };
842
843
  return e(), document.addEventListener("fullscreenchange", e), () => {
843
844
  document.removeEventListener("fullscreenchange", e);
844
845
  };
845
846
  }, []), s(() => {
846
- b && he || st(!1);
847
- }, [b, he]), s(() => {
848
- ne();
849
- }, [b, ne]), s(() => {
847
+ b && ge || at(!1);
848
+ }, [b, ge]), s(() => {
849
+ re();
850
+ }, [b, re]), s(() => {
850
851
  if (!He) {
851
- ge(0);
852
+ ve(0);
852
853
  return;
853
854
  }
854
855
  const e = Me.current;
@@ -858,8 +859,8 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
858
859
  const i = Math.ceil(
859
860
  e.getBoundingClientRect().height
860
861
  );
861
- ge(
862
- i + Bo
862
+ ve(
863
+ i + Vo
863
864
  );
864
865
  };
865
866
  if (t(), typeof ResizeObserver > "u")
@@ -871,67 +872,67 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
871
872
  n.disconnect();
872
873
  };
873
874
  }, [He]), s(() => {
874
- if (M(), !!he) {
875
- if (kn)
876
- return Q.current = window.setTimeout(() => {
877
- Q.current = null, qe();
878
- }, Kn), () => {
875
+ if (M(), !!ge) {
876
+ if (Ln)
877
+ return Z.current = window.setTimeout(() => {
878
+ Z.current = null, qe();
879
+ }, qn), () => {
879
880
  M();
880
881
  };
881
- if (!(pn || !Mn))
882
- return Q.current = window.setTimeout(() => {
883
- Q.current = null, qe();
884
- }, Kn), () => {
882
+ if (!(yn || !kn))
883
+ return Z.current = window.setTimeout(() => {
884
+ Z.current = null, qe();
885
+ }, qn), () => {
885
886
  M();
886
887
  };
887
888
  }
888
889
  }, [
889
890
  M,
890
891
  qe,
891
- pn,
892
- Mn,
893
- he,
894
- kn
892
+ yn,
893
+ kn,
894
+ ge,
895
+ Ln
895
896
  ]);
896
- const _r = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u($r, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
897
- Nn,
897
+ const Or = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u(zr, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
898
+ Dn,
898
899
  {
899
900
  className: "content-render-iframe",
900
- disableLoadingOverlay: L,
901
+ disableLoadingOverlay: F,
901
902
  hideFullScreen: !0,
902
903
  locale: d,
903
- dir: W,
904
+ dir: j,
904
905
  lang: Re,
905
906
  mode: "blackboard",
906
907
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
907
908
  type: "sandbox",
908
909
  content: e.content,
909
- enableScaling: Gn
910
+ enableScaling: $n
910
911
  }
911
912
  ) : /* @__PURE__ */ u(
912
- Nn,
913
+ Dn,
913
914
  {
914
915
  className: "content-render-iframe",
915
- disableLoadingOverlay: L,
916
+ disableLoadingOverlay: F,
916
917
  hideFullScreen: !0,
917
918
  locale: d,
918
- dir: W,
919
+ dir: j,
919
920
  lang: Re,
920
921
  mode: "blackboard",
921
922
  type: "markdown",
922
923
  content: e.content
923
924
  }
924
- ) : null, Or = (e = [], t = !1) => {
925
+ ) : null, Mr = (e = [], t = !1) => {
925
926
  if (e.length === 0)
926
927
  return null;
927
928
  const n = e.filter(
928
929
  (o) => o.is_renderable !== !1
929
- ).length, i = t && $n ? yo(e) : "disabled", l = e.reduce(
930
+ ).length, i = t && zn ? ho(e) : "disabled", l = e.reduce(
930
931
  (o, v, A) => v.is_renderable !== !1 ? A : o,
931
932
  -1
932
933
  );
933
934
  return /* @__PURE__ */ u(
934
- io,
935
+ lo,
935
936
  {
936
937
  className: "slide-stage__content flex w-full flex-col gap-4",
937
938
  mode: i,
@@ -940,14 +941,14 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
940
941
  return /* @__PURE__ */ u(
941
942
  "div",
942
943
  {
943
- ref: t && v === l ? tn : null,
944
+ ref: t && v === l ? nn : null,
944
945
  "aria-hidden": A || void 0,
945
946
  className: Pe(
946
947
  "w-full shrink-0",
947
948
  n === 1 && o.is_renderable !== !1 && "slide-element--single",
948
949
  A ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : o.is_renderable === !1 && "hidden"
949
950
  ),
950
- children: _r(o, {
951
+ children: Or(o, {
951
952
  replaceRootScreenHeightWithFull: n === 1 && o.type === "html" && o.is_renderable !== !1
952
953
  })
953
954
  },
@@ -956,8 +957,8 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
956
957
  })
957
958
  }
958
959
  );
959
- }, Mr = r(() => {
960
- const e = ue.current;
960
+ }, kr = r(() => {
961
+ const e = de.current;
961
962
  if (e) {
962
963
  if (document.fullscreenElement === e) {
963
964
  document.exitFullscreen().catch(() => {
@@ -968,83 +969,84 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
968
969
  });
969
970
  }
970
971
  }, []), Fn = r(() => {
971
- const e = Qe.current;
972
+ const e = je.current;
972
973
  e && e.scrollTo({
973
974
  top: e.scrollHeight,
974
975
  behavior: "smooth"
975
976
  });
976
977
  }, []), Ht = r(
977
- (e) => Vn({
978
+ (e) => Kn({
978
979
  currentIndex: a,
979
980
  resolvedCurrentInteractionElement: b,
980
981
  slideElementList: S,
981
- targetSlideIndex: Z[e.audioIndex]
982
+ targetSlideIndex: ee[e.audioIndex]
982
983
  }),
983
984
  [
984
985
  b,
985
- Z,
986
+ ee,
986
987
  a,
987
988
  S
988
989
  ]
989
- ), kr = r(
990
+ ), Lr = r(
990
991
  (e, t) => {
991
- const i = y[e.audioIndex]?.audioKey, l = Z[e.audioIndex];
992
- return !i || l == null || !Ht(e) ? !1 : (we(t), H.current = null, I(!1), ot(!1), lt(!1), $t(t) && (ee(!0), g(!0)), l === a ? (Fe.current = null, F(), B(i), ht(e), !0) : (me.current = !0, F(), Fe.current = {
992
+ const i = y[e.audioIndex]?.audioKey, l = ee[e.audioIndex];
993
+ return !i || l == null || !Ht(e) ? !1 : ($(t), H.current = null, I(!1), rt(!1), it(!1), $t(t) && (te(!0), g(!0)), l === a ? (Le.current = null, L(), B(i), yt(e), !0) : (pe.current = !0, L(), Le.current = {
993
994
  audioIndex: e.audioIndex,
994
995
  audioKey: i,
995
996
  slideIndex: l,
996
997
  timeMs: e.timeMs
997
- }, pe(l), !0));
998
+ }, ye(l), !0));
998
999
  },
999
1000
  [
1000
1001
  y,
1001
- Z,
1002
+ ee,
1002
1003
  Ht,
1003
1004
  a,
1004
- pe,
1005
- ht,
1006
- F,
1005
+ ye,
1006
+ yt,
1007
+ L,
1007
1008
  g,
1008
- we
1009
+ $
1009
1010
  ]
1010
1011
  ), Fr = r(
1011
1012
  (e) => {
1012
- we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), F(), an();
1013
+ $(e), pe.current = !0, H.current = null, I(!1), $t(e) && (te(!0), g(!0)), L(), sn();
1013
1014
  },
1014
1015
  [
1015
- an,
1016
- F,
1016
+ sn,
1017
+ L,
1017
1018
  g,
1018
- we
1019
+ $
1019
1020
  ]
1020
- ), Lr = r(
1021
+ ), Nr = r(
1021
1022
  (e) => {
1022
- we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), F(), N();
1023
+ $(e), pe.current = !0, H.current = null, I(!1), $t(e) && (te(!0), g(!0)), L(), D();
1023
1024
  },
1024
1025
  [
1025
- N,
1026
- F,
1026
+ D,
1027
+ L,
1027
1028
  g,
1028
- we
1029
+ $
1029
1030
  ]
1030
- ), Nr = r(
1031
- (e) => {
1032
- e < 0 || e >= S.length || e === a || (me.current = !0, H.current = null, I(!1), ee(!0), g(!0), F(), pe(e), Xe?.(S[e], e));
1031
+ ), Dr = r(
1032
+ (e, t) => {
1033
+ e < 0 || e >= S.length || e === a || ($(t), pe.current = !0, H.current = null, I(!1), te(!0), g(!0), L(), ye(e), Xe?.(S[e], e));
1033
1034
  },
1034
1035
  [
1035
1036
  a,
1036
- pe,
1037
+ ye,
1037
1038
  Xe,
1038
- F,
1039
+ L,
1039
1040
  g,
1040
- S
1041
+ S,
1042
+ $
1041
1043
  ]
1042
- ), Dr = r(
1044
+ ), Br = r(
1043
1045
  ({
1044
1046
  loading: e,
1045
1047
  reason: t
1046
1048
  }) => {
1047
- if (L) {
1049
+ if (F) {
1048
1050
  I(!1);
1049
1051
  return;
1050
1052
  }
@@ -1052,23 +1054,23 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1052
1054
  I(!1);
1053
1055
  return;
1054
1056
  }
1055
- e && t && Rt(t), I(Yo(t, e));
1057
+ e && t && Rt(t), I(Go(t, e));
1056
1058
  },
1057
1059
  [
1058
1060
  w,
1059
1061
  O,
1060
- L
1062
+ F
1061
1063
  ]
1062
1064
  );
1063
1065
  s(() => {
1064
- L && I(!1);
1065
- }, [L]);
1066
- const Br = r(
1066
+ F && I(!1);
1067
+ }, [F]);
1068
+ const Vr = r(
1067
1069
  (e) => {
1068
1070
  const t = y[e]?.audioKey;
1069
1071
  if (!t || !P || t !== P)
1070
1072
  return;
1071
- it.current.add(t);
1073
+ ot.current.add(t);
1072
1074
  const n = _.findIndex(
1073
1075
  (o) => o === t
1074
1076
  );
@@ -1081,9 +1083,9 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1081
1083
  B(l);
1082
1084
  return;
1083
1085
  }
1084
- if (B(null), ot(!0), I(!1), R) {
1086
+ if (B(null), rt(!0), I(!1), R) {
1085
1087
  const o = a + 1, v = S[o];
1086
- En && v?.type === "interaction" && (H.current = o), N();
1088
+ Cn && v?.type === "interaction" && (H.current = o), D();
1087
1089
  return;
1088
1090
  }
1089
1091
  },
@@ -1093,20 +1095,20 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1093
1095
  a,
1094
1096
  P,
1095
1097
  _,
1096
- N,
1097
- En,
1098
+ D,
1099
+ Cn,
1098
1100
  S
1099
1101
  ]
1100
- ), Vr = r(() => {
1101
- Ze.current = !0, q(), x && Ne(!0);
1102
- }, [q, x]), Kr = r(() => {
1103
- Ze.current = !1, g(!0);
1102
+ ), Kr = r(() => {
1103
+ Qe.current = !0, q(), x && Ne(!0);
1104
+ }, [q, x]), qr = r(() => {
1105
+ Qe.current = !1, g(!0);
1104
1106
  }, [g]), Yt = r(
1105
1107
  (e) => {
1106
1108
  e.stopPropagation(), K && g(!0);
1107
1109
  },
1108
1110
  [K, g]
1109
- ), gt = r(
1111
+ ), ht = r(
1110
1112
  (e, t) => {
1111
1113
  const n = xt.current;
1112
1114
  if (!n)
@@ -1121,23 +1123,23 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1121
1123
  },
1122
1124
  []
1123
1125
  );
1124
- Vo(() => {
1126
+ Ko(() => {
1125
1127
  const e = Me.current;
1126
1128
  if (!He || !e) {
1127
- fe.current = null;
1129
+ me.current = null;
1128
1130
  return;
1129
1131
  }
1130
- const t = fe.current, n = e.getBoundingClientRect();
1131
- if (!t || Ft) {
1132
- fe.current = {
1132
+ const t = me.current, n = e.getBoundingClientRect();
1133
+ if (!t || Lt) {
1134
+ me.current = {
1133
1135
  left: n.left,
1134
1136
  top: n.top
1135
1137
  };
1136
1138
  return;
1137
1139
  }
1138
1140
  const i = t.left - n.left, l = t.top - n.top;
1139
- if (!qn(i) && !qn(l)) {
1140
- fe.current = {
1141
+ if (!Un(i) && !Un(l)) {
1142
+ me.current = {
1141
1143
  left: n.left,
1142
1144
  top: n.top
1143
1145
  };
@@ -1146,33 +1148,33 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1146
1148
  const o = {
1147
1149
  x: E.x + i,
1148
1150
  y: E.y + l
1149
- }, v = gt(
1151
+ }, v = ht(
1150
1152
  e,
1151
1153
  E
1152
- ), A = qo(
1153
- v ? Bn(o, v) : o
1154
+ ), A = Uo(
1155
+ v ? Vn(o, v) : o
1154
1156
  );
1155
- fe.current = {
1157
+ me.current = {
1156
1158
  left: n.left + A.x - E.x,
1157
1159
  top: n.top + A.y - E.y
1158
- }, Un(
1160
+ }, Hn(
1159
1161
  A,
1160
1162
  E
1161
1163
  ) || kt(
1162
- (ie) => Un(ie, A) ? ie : A
1164
+ (le) => Hn(le, A) ? le : A
1163
1165
  );
1164
1166
  }, [
1165
- gt,
1167
+ ht,
1166
1168
  E,
1167
- Ft,
1168
- ut,
1169
+ Lt,
1170
+ ct,
1169
1171
  He
1170
1172
  ]);
1171
- const qr = r(
1173
+ const Ur = r(
1172
1174
  (e) => {
1173
1175
  if (Yt(e), e.button !== 0 || !e.currentTarget.isConnected || !Me.current)
1174
1176
  return;
1175
- const t = gt(
1177
+ const t = ht(
1176
1178
  Me.current,
1177
1179
  E
1178
1180
  );
@@ -1182,18 +1184,18 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1182
1184
  startClientY: e.clientY,
1183
1185
  startOffset: E,
1184
1186
  bounds: t
1185
- }, Lt(!0));
1187
+ }, Ft(!0));
1186
1188
  },
1187
1189
  [
1188
- gt,
1190
+ ht,
1189
1191
  E,
1190
1192
  Yt
1191
1193
  ]
1192
- ), Ur = r(
1194
+ ), Hr = r(
1193
1195
  (e) => {
1194
1196
  const t = ke.current;
1195
1197
  !t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), kt(
1196
- Bn(
1198
+ Vn(
1197
1199
  {
1198
1200
  x: t.startOffset.x + e.clientX - t.startClientX,
1199
1201
  y: t.startOffset.y + e.clientY - t.startClientY
@@ -1203,36 +1205,36 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1203
1205
  ));
1204
1206
  },
1205
1207
  []
1206
- ), Ln = r(
1208
+ ), Nn = r(
1207
1209
  (e) => {
1208
1210
  const t = ke.current;
1209
- !t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), ke.current = null, Lt(!1));
1211
+ !t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), ke.current = null, Ft(!1));
1210
1212
  },
1211
1213
  []
1212
- ), Hr = r(
1213
- (e) => {
1214
- Y(), Zt?.(e);
1215
- },
1216
- [Y, Zt]
1217
1214
  ), Yr = r(
1218
1215
  (e) => {
1219
1216
  Y(), en?.(e);
1220
1217
  },
1221
1218
  [Y, en]
1222
- ), Gr = r(() => {
1223
- ee(!0), g(!0);
1219
+ ), Gr = r(
1220
+ (e) => {
1221
+ Y(), tn?.(e);
1222
+ },
1223
+ [Y, tn]
1224
+ ), $r = r(() => {
1225
+ te(!0), g(!0);
1224
1226
  }, [g]);
1225
1227
  return s(() => {
1226
- const e = nn.current, i = (e.length > 0 && e.length < ye.length && e.every((o, v) => o === ye[v]) ? T.slice(e.length) : []).some(
1228
+ const e = rn.current, i = (e.length > 0 && e.length < he.length && e.every((o, v) => o === he[v]) ? T.slice(e.length) : []).some(
1227
1229
  (o) => o.is_new === !1
1228
1230
  );
1229
- if (nn.current = ye, !i)
1231
+ if (rn.current = he, !i)
1230
1232
  return;
1231
1233
  const l = window.requestAnimationFrame(() => {
1232
- const o = Qe.current, v = tn.current;
1234
+ const o = je.current, v = nn.current;
1233
1235
  if (!o || !v)
1234
1236
  return;
1235
- const A = o.getBoundingClientRect(), ie = v.getBoundingClientRect(), Ye = o.scrollTop + (ie.top - A.top);
1237
+ const A = o.getBoundingClientRect(), le = v.getBoundingClientRect(), Ye = o.scrollTop + (le.top - A.top);
1236
1238
  o.scrollTo({
1237
1239
  top: Math.max(Ye, 0),
1238
1240
  behavior: "smooth"
@@ -1241,8 +1243,8 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1241
1243
  return () => {
1242
1244
  window.cancelAnimationFrame(l);
1243
1245
  };
1244
- }, [T, ye]), s(() => {
1245
- if (!me.current || (me.current = !1, T.length === 0))
1246
+ }, [T, he]), s(() => {
1247
+ if (!pe.current || (pe.current = !1, T.length === 0))
1246
1248
  return;
1247
1249
  const e = window.requestAnimationFrame(() => {
1248
1250
  Fn();
@@ -1253,23 +1255,23 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1253
1255
  }, [T, Fn]), /* @__PURE__ */ Ge(
1254
1256
  "section",
1255
1257
  {
1256
- ref: ue,
1258
+ ref: de,
1257
1259
  className: Pe(
1258
1260
  "relative h-full w-full",
1259
1261
  V && "slide--mobile-device",
1260
- In && "slide--browser-fullscreen",
1261
- Se && "slide--mobile-landscape",
1262
- vn && "slide--mobile-landscape-native",
1263
- zn
1262
+ bn && "slide--browser-fullscreen",
1263
+ Ie && "slide--mobile-landscape",
1264
+ Sn && "slide--mobile-landscape-native",
1265
+ Xn
1264
1266
  ),
1265
- dir: W,
1267
+ dir: j,
1266
1268
  lang: Re,
1267
- onClick: Gr,
1268
- onFocusCapture: Yr,
1269
- onPointerDown: Hr,
1270
- ...Wn,
1269
+ onClick: $r,
1270
+ onFocusCapture: Gr,
1271
+ onPointerDown: Yr,
1272
+ ...jn,
1271
1273
  children: [
1272
- yr ? /* @__PURE__ */ u(
1274
+ hr ? /* @__PURE__ */ u(
1273
1275
  "div",
1274
1276
  {
1275
1277
  "aria-hidden": "true",
@@ -1282,17 +1284,17 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1282
1284
  ref: xt,
1283
1285
  className: Pe(
1284
1286
  "slide__viewport relative h-full min-h-0 w-full",
1285
- Se && "slide__viewport--mobile-landscape",
1286
- Se && !fr && "slide__viewport--mobile-landscape-native"
1287
+ Ie && "slide__viewport--mobile-landscape",
1288
+ Ie && !mr && "slide__viewport--mobile-landscape-native"
1287
1289
  ),
1288
1290
  children: [
1289
- mr ? /* @__PURE__ */ Ge("div", { className: "slide-landscape-header", children: [
1291
+ pr ? /* @__PURE__ */ Ge("div", { className: "slide-landscape-header", children: [
1290
1292
  /* @__PURE__ */ u(
1291
1293
  "button",
1292
1294
  {
1293
- "aria-label": X?.backAriaLabel ?? D.fullscreenBackAriaLabel,
1295
+ "aria-label": J?.backAriaLabel ?? N.fullscreenBackAriaLabel,
1294
1296
  className: "slide-landscape-header__back",
1295
- onClick: gr,
1297
+ onClick: vr,
1296
1298
  type: "button",
1297
1299
  children: /* @__PURE__ */ u(
1298
1300
  Fo,
@@ -1303,19 +1305,19 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1303
1305
  )
1304
1306
  }
1305
1307
  ),
1306
- X?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: X.content }) : null
1308
+ J?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: J.content }) : null
1307
1309
  ] }) : null,
1308
1310
  /* @__PURE__ */ u(
1309
1311
  "div",
1310
1312
  {
1311
1313
  className: Pe(
1312
1314
  "h-full min-h-0 w-full",
1313
- pr && "slide__viewport-content--with-header",
1314
- tr ? "slide-content--single" : "grid gap-4"
1315
+ yr && "slide__viewport-content--with-header",
1316
+ nr ? "slide-content--single" : "grid gap-4"
1315
1317
  ),
1316
- children: T.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: Qe, className: "slide-stage__layer w-full", children: vr.map(
1318
+ children: T.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: je, className: "slide-stage__layer w-full", children: Sr.map(
1317
1319
  (e, t) => {
1318
- const n = t === Sr;
1320
+ const n = t === Ir;
1319
1321
  return /* @__PURE__ */ u(
1320
1322
  "div",
1321
1323
  {
@@ -1323,7 +1325,7 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1323
1325
  "aria-hidden": !n || void 0,
1324
1326
  className: "w-full h-full",
1325
1327
  style: { display: n ? void 0 : "none" },
1326
- children: Or(
1328
+ children: Mr(
1327
1329
  e.elementList,
1328
1330
  n
1329
1331
  )
@@ -1334,24 +1336,24 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1334
1336
  ) }) }) : null
1335
1337
  }
1336
1338
  ),
1337
- ir ? /* @__PURE__ */ u(
1338
- eo,
1339
+ lr ? /* @__PURE__ */ u(
1340
+ to,
1339
1341
  {
1340
- message: Uo(
1341
- jn,
1342
- lr
1342
+ message: Ho(
1343
+ Qn,
1344
+ ar
1343
1345
  ),
1344
1346
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
1345
1347
  }
1346
1348
  ) : null,
1347
1349
  /* @__PURE__ */ u(
1348
- lo,
1350
+ ao,
1349
1351
  {
1350
- extraBottomOffset: cr,
1351
- hasPlayerGap: ut,
1352
- isEnabled: mn && ar,
1353
- playbackTimeStore: ve,
1354
- subtitleCues: Ir
1352
+ extraBottomOffset: ur,
1353
+ hasPlayerGap: ct,
1354
+ isEnabled: pn && sr,
1355
+ playbackTimeStore: Se,
1356
+ subtitleCues: br
1355
1357
  }
1356
1358
  ),
1357
1359
  He ? /* @__PURE__ */ u(
@@ -1361,121 +1363,123 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1361
1363
  "data-player-keyboard-shortcuts-ignore": "true",
1362
1364
  className: Pe(
1363
1365
  "slide-interaction-overlay",
1364
- ut ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
1365
- Ft && "slide-interaction-overlay--dragging"
1366
+ ct ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
1367
+ Lt && "slide-interaction-overlay--dragging"
1366
1368
  ),
1367
1369
  onClick: Yt,
1368
1370
  onPointerDownCapture: (e) => {
1369
- Xt(e.target) && st(!0);
1371
+ Xt(e.target) && at(!0);
1370
1372
  },
1371
1373
  onFocusCapture: (e) => {
1372
- Xt(e.target) && st(!0);
1374
+ Xt(e.target) && at(!0);
1373
1375
  },
1374
1376
  onInputCapture: (e) => {
1375
- Xt(e.target) && st(!0);
1377
+ Xt(e.target) && at(!0);
1376
1378
  },
1377
- style: br,
1379
+ style: Ar,
1378
1380
  children: /* @__PURE__ */ u(
1379
- Hn,
1381
+ Yn,
1380
1382
  {
1381
- dir: W,
1383
+ dir: j,
1382
1384
  lang: Re,
1383
1385
  content: String(b?.content ?? ""),
1384
- dragHandleAriaLabel: J?.dragHandleAriaLabel ?? D.interactionTexts.dragHandleAriaLabel,
1386
+ dragHandleAriaLabel: W?.dragHandleAriaLabel ?? N.interactionTexts.dragHandleAriaLabel,
1385
1387
  locale: d,
1386
- defaultButtonText: On.buttonText ?? "",
1387
- defaultInputText: On.inputText ?? "",
1388
- defaultSelectedValues: Er,
1389
- confirmButtonText: J?.confirmButtonText ?? D.interactionTexts.confirmButtonText,
1390
- copyButtonText: J?.copyButtonText ?? D.interactionTexts.copyButtonText,
1391
- copiedButtonText: J?.copiedButtonText ?? D.interactionTexts.copiedButtonText,
1392
- onSend: Rr,
1393
- onDragHandlePointerCancel: Ln,
1394
- onDragHandlePointerDown: qr,
1395
- onDragHandlePointerMove: Ur,
1396
- onDragHandlePointerUp: Ln,
1397
- readonly: Tr,
1398
- title: J?.title ?? It ?? D.interactionTexts.title
1388
+ defaultButtonText: Mn.buttonText ?? "",
1389
+ defaultInputText: Mn.inputText ?? "",
1390
+ defaultSelectedValues: Cr,
1391
+ confirmButtonText: W?.confirmButtonText ?? N.interactionTexts.confirmButtonText,
1392
+ copyButtonText: W?.copyButtonText ?? N.interactionTexts.copyButtonText,
1393
+ copiedButtonText: W?.copiedButtonText ?? N.interactionTexts.copiedButtonText,
1394
+ onSend: _r,
1395
+ onDragHandlePointerCancel: Nn,
1396
+ onDragHandlePointerDown: Ur,
1397
+ onDragHandlePointerMove: Hr,
1398
+ onDragHandlePointerUp: Nn,
1399
+ readonly: Rr,
1400
+ title: W?.title ?? St ?? N.interactionTexts.title
1399
1401
  }
1400
1402
  )
1401
1403
  }
1402
1404
  ) : null,
1403
1405
  x ? /* @__PURE__ */ u(
1404
- co.Provider,
1406
+ uo.Provider,
1405
1407
  {
1406
- value: nr,
1408
+ value: rr,
1407
1409
  children: /* @__PURE__ */ u(
1408
- oo,
1410
+ io,
1409
1411
  {
1410
- dir: W === "auto" ? Zn : W,
1412
+ dir: j === "auto" ? er : j,
1411
1413
  lang: Re,
1412
1414
  audioList: y,
1413
1415
  className: Pe(
1414
1416
  "absolute left-1/2 z-[2] -translate-x-1/2",
1415
- In ? "bottom-3" : "-bottom-3",
1416
- z,
1417
+ bn ? "bottom-3" : "-bottom-3",
1418
+ X,
1417
1419
  !K && "pointer-events-none opacity-0"
1418
1420
  ),
1419
1421
  currentAudioIndex: C,
1420
1422
  defaultPlaying: Ct,
1421
- enableKeyboardShortcuts: ce,
1422
- isPlaybackPaused: re,
1423
+ enableKeyboardShortcuts: ue,
1424
+ isPlaybackPaused: oe,
1423
1425
  isAutoAdvanceEnabled: De,
1424
1426
  locale: d,
1425
- isInteractionOpen: he,
1426
- isSubtitleEnabled: mn,
1427
- onAutoAdvanceToggle: cn,
1428
- onLoadingChange: Dr,
1427
+ isInteractionOpen: ge,
1428
+ isSubtitleEnabled: pn,
1429
+ onAutoAdvanceToggle: un,
1430
+ onLoadingChange: Br,
1429
1431
  onPlaybackStarted: () => {
1430
- lt(!0);
1432
+ it(!0);
1431
1433
  },
1432
1434
  onPlaybackCheckpoint: ({ audioKey: e, isComplete: t, timeMs: n }) => {
1433
1435
  const i = y.findIndex(
1434
1436
  (o) => o.audioKey === e
1435
1437
  ), l = i >= 0 ? y[i] : void 0;
1436
- !l?.audioKey || !l.element || Yn?.({
1438
+ !l?.audioKey || !l.element || Gn?.({
1437
1439
  audioKey: l.audioKey,
1438
1440
  element: l.element,
1439
1441
  isComplete: t,
1440
- stepIndex: Z[i] ?? a,
1442
+ stepIndex: ee[i] ?? a,
1441
1443
  timeMs: n
1442
1444
  });
1443
1445
  },
1444
- onPlaybackPreferenceChange: Pr,
1445
- onPlaybackTimeChange: ve.setTime,
1446
+ onPlaybackPreferenceChange: Er,
1447
+ onPlaybackTimeChange: Se.setTime,
1446
1448
  onSubtitleToggle: () => {
1447
- sr((e) => !e);
1449
+ cr((e) => !e);
1448
1450
  },
1449
1451
  nextDisabled: !R,
1450
- onEnded: Br,
1451
- onFullscreen: Mr,
1452
- isFullscreen: yn,
1453
- mobileViewMode: te,
1452
+ onEnded: Vr,
1453
+ onFullscreen: kr,
1454
+ isFullscreen: hn,
1455
+ mobileViewMode: ne,
1454
1456
  settingsPortalContainer: xt.current,
1455
- onMobileViewModeChange: hr,
1456
- onControlsPointerEnter: Vr,
1457
- onControlsPointerLeave: Kr,
1458
- onNext: Lr,
1457
+ onMobileViewModeChange: gr,
1458
+ onControlsPointerEnter: Kr,
1459
+ onControlsPointerLeave: qr,
1460
+ onNext: Nr,
1459
1461
  onPrev: Fr,
1460
- onSubtitleJump: kr,
1462
+ onSubtitleJump: Lr,
1461
1463
  canJumpToSubtitleTarget: Ht,
1462
- prevDisabled: !er,
1464
+ prevDisabled: !tr,
1463
1465
  showControls: K,
1464
- slideProgress: At ? {
1465
- ariaLabel: D.slideProgressAriaLabel,
1466
+ slideProgress: bt ? {
1467
+ ariaLabel: N.slideProgressAriaLabel,
1466
1468
  currentIndex: a,
1467
- onNavigate: Nr,
1468
- totalSteps: sn
1469
+ generatingLabel: N.slideProgressGeneratingLabel,
1470
+ isGenerating: At,
1471
+ onNavigate: Dr,
1472
+ totalSteps: cn
1469
1473
  } : null,
1470
- subtitleSeekRequest: or,
1471
- playbackRestoreRequest: rt && rt.audioKey === mt?.audioKey ? {
1472
- id: rt.id,
1473
- timeMs: rt.timeMs
1474
+ subtitleSeekRequest: ir,
1475
+ playbackRestoreRequest: nt && nt.audioKey === ft?.audioKey ? {
1476
+ id: nt.id,
1477
+ timeMs: nt.timeMs
1474
1478
  } : null,
1475
1479
  onPlaybackRestoreComplete: (e) => {
1476
- Be.current?.id === e && (Be.current = null, un(null));
1480
+ Be.current?.id === e && (Be.current = null, dn(null));
1477
1481
  },
1478
- texts: bt,
1482
+ texts: It,
1479
1483
  customActionContext: Bt,
1480
1484
  customActions: Ce,
1481
1485
  useAutoAdvanceToggle: Ve
@@ -1491,6 +1495,6 @@ const Go = (c, d) => c.length === d.length && c.every(($, Ee) => {
1491
1495
  );
1492
1496
  };
1493
1497
  export {
1494
- _i as default
1498
+ Oi as default
1495
1499
  };
1496
1500
  //# sourceMappingURL=Slide.es.js.map