markdown-flow-ui 0.2.25-dev.1 → 0.2.25-dev.2

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