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