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