markdown-flow-ui 0.2.26-dev.2 → 0.2.26-dev.3

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