markdown-flow-ui 0.1.115-beta.2 → 0.1.115-beta.4
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/Player.cjs.js.map +1 -1
- package/dist/components/Slide/Player.es.js.map +1 -1
- 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 +482 -478
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/utils/playbackSequence.cjs.js +1 -1
- package/dist/components/Slide/utils/playbackSequence.cjs.js.map +1 -1
- package/dist/components/Slide/utils/playbackSequence.d.ts +4 -0
- package/dist/components/Slide/utils/playbackSequence.es.js +20 -7
- package/dist/components/Slide/utils/playbackSequence.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { j as n } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { isSandboxInteractionMessage as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { memo as yn, useRef as p, useMemo as l, useState as m, useCallback as r, useEffect as s } from "react";
|
|
3
|
+
import { isSandboxInteractionMessage as gn } from "../../lib/sandboxInteraction.es.js";
|
|
4
|
+
import { cn as Q } from "../../lib/utils.es.js";
|
|
5
|
+
import Sn from "../ui/loading-overlay-card.es.js";
|
|
6
|
+
import bn from "../ContentRender/ContentRender.es.js";
|
|
7
|
+
import Et from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
|
-
import { getInteractionDefaultValues as
|
|
10
|
-
import { isMobileDevice as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { DEFAULT_MOBILE_VIEW_MODE as
|
|
16
|
-
import { shouldPresentInteractionOverlay as
|
|
17
|
-
import { shouldAutoAdvanceIntoAppendedMarker as
|
|
18
|
-
import { getPlaybackSequenceTransition as
|
|
19
|
-
import { resolvePlayerCustomActionElement as
|
|
20
|
-
import { createPlaybackTimeStore as
|
|
21
|
-
import { shouldUseAutoAdvanceToggle as
|
|
9
|
+
import { getInteractionDefaultValues as An, getInteractionDefaultSelectedValues as xn } from "../../lib/interaction-defaults.es.js";
|
|
10
|
+
import { isMobileDevice as wn, isLandscapeViewport as Tt, subscribeMobileDeviceChange as In } from "../../lib/mobileDevice.es.js";
|
|
11
|
+
import _n from "./Player.es.js";
|
|
12
|
+
import En from "./SubtitleOverlay.es.js";
|
|
13
|
+
import Tn from "./useSlide.es.js";
|
|
14
|
+
import Cn from "./useWakePlayerFromIframe.es.js";
|
|
15
|
+
import { DEFAULT_MOBILE_VIEW_MODE as Ie, resolveMobileViewModeState as Pn } from "./utils/mobileScreenMode.es.js";
|
|
16
|
+
import { shouldPresentInteractionOverlay as Rn } from "./utils/interactionPlayback.es.js";
|
|
17
|
+
import { shouldAutoAdvanceIntoAppendedMarker as Mn } from "./utils/appendedMarkerAdvance.es.js";
|
|
18
|
+
import { resolveNextPendingAudioKey as Fn, getPlaybackSequenceTransition as kn } from "./utils/playbackSequence.es.js";
|
|
19
|
+
import { resolvePlayerCustomActionElement as Bn, getPlayerCustomActionCount as Nn } from "./utils/playerCustomActions.es.js";
|
|
20
|
+
import { createPlaybackTimeStore as On } from "./utils/playbackTimeStore.es.js";
|
|
21
|
+
import { shouldUseAutoAdvanceToggle as jn } from "./utils/playerToggleMode.es.js";
|
|
22
22
|
/* empty css */
|
|
23
|
-
import
|
|
24
|
-
const
|
|
23
|
+
import Kn from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
|
|
24
|
+
const Ln = 2e3, Vn = 300, qn = 160, Dn = 16, De = "waitingForAudio", Ct = {
|
|
25
25
|
waitingForAudio: "Waiting for current slide audio...",
|
|
26
26
|
loadingAudio: "Loading current slide audio...",
|
|
27
27
|
waitingForMoreAudio: "Waiting for more current slide audio..."
|
|
28
|
-
},
|
|
28
|
+
}, Un = (S, w) => typeof S == "string" ? S : S[w] ?? S[De] ?? Ct[w], zn = (S, w) => w ? S !== "loadingAudio" : !1, Pt = yn(
|
|
29
29
|
({
|
|
30
30
|
content: S,
|
|
31
31
|
title: w,
|
|
32
32
|
defaultButtonText: I,
|
|
33
|
-
defaultInputText:
|
|
33
|
+
defaultInputText: Z,
|
|
34
34
|
defaultSelectedValues: _,
|
|
35
|
-
confirmButtonText:
|
|
36
|
-
copyButtonText:
|
|
37
|
-
copiedButtonText:
|
|
38
|
-
onSend:
|
|
35
|
+
confirmButtonText: q,
|
|
36
|
+
copyButtonText: ee,
|
|
37
|
+
copiedButtonText: _e,
|
|
38
|
+
onSend: Ee,
|
|
39
39
|
readonly: D = !1
|
|
40
40
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
41
41
|
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: w }) }),
|
|
42
42
|
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
|
|
43
|
-
|
|
43
|
+
bn,
|
|
44
44
|
{
|
|
45
45
|
content: S,
|
|
46
46
|
defaultButtonText: I,
|
|
47
|
-
defaultInputText:
|
|
47
|
+
defaultInputText: Z,
|
|
48
48
|
defaultSelectedValues: _,
|
|
49
|
-
confirmButtonText:
|
|
50
|
-
copyButtonText:
|
|
51
|
-
copiedButtonText:
|
|
52
|
-
onSend:
|
|
49
|
+
confirmButtonText: q,
|
|
50
|
+
copyButtonText: ee,
|
|
51
|
+
copiedButtonText: _e,
|
|
52
|
+
onSend: Ee,
|
|
53
53
|
readonly: D,
|
|
54
54
|
enableTypewriter: !1,
|
|
55
55
|
sandboxMode: "content"
|
|
@@ -57,104 +57,104 @@ const Nn = 2e3, On = 300, jn = 160, Ln = 16, Ve = "waitingForAudio", _t = {
|
|
|
57
57
|
) })
|
|
58
58
|
] })
|
|
59
59
|
);
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
const _ = w[
|
|
60
|
+
Pt.displayName = "InteractionOverlayCard";
|
|
61
|
+
const Gn = (S, w) => S.length === w.length && S.every((I, Z) => {
|
|
62
|
+
const _ = w[Z];
|
|
63
63
|
return I.sequence_number === _?.sequence_number && I.type === _?.type && I.content === _?.content;
|
|
64
|
-
}),
|
|
64
|
+
}), yr = ({
|
|
65
65
|
elementList: S = [],
|
|
66
66
|
showPlayer: w = !0,
|
|
67
67
|
playerAlwaysVisible: I = !1,
|
|
68
|
-
playerClassName:
|
|
68
|
+
playerClassName: Z,
|
|
69
69
|
fullscreenHeader: _,
|
|
70
|
-
playerCustomActions:
|
|
71
|
-
playerCustomActionPauseOnActive:
|
|
72
|
-
bufferingText:
|
|
73
|
-
interactionTitle:
|
|
70
|
+
playerCustomActions: q,
|
|
71
|
+
playerCustomActionPauseOnActive: ee = !0,
|
|
72
|
+
bufferingText: _e = Ct,
|
|
73
|
+
interactionTitle: Ee,
|
|
74
74
|
interactionTexts: D,
|
|
75
|
-
playerTexts:
|
|
76
|
-
playerAutoHideDelay:
|
|
77
|
-
markerAutoAdvanceDelay:
|
|
78
|
-
interactionDefaultValueOptions:
|
|
79
|
-
onSend:
|
|
80
|
-
onPlayerVisibilityChange:
|
|
81
|
-
onMobileViewModeChange:
|
|
82
|
-
onStepChange:
|
|
83
|
-
enableIframeScaling:
|
|
84
|
-
disableLoadingOverlay:
|
|
85
|
-
className:
|
|
86
|
-
onPointerDown:
|
|
87
|
-
...
|
|
75
|
+
playerTexts: Rt,
|
|
76
|
+
playerAutoHideDelay: Te = 3e3,
|
|
77
|
+
markerAutoAdvanceDelay: Ue = Ln,
|
|
78
|
+
interactionDefaultValueOptions: fe,
|
|
79
|
+
onSend: ze,
|
|
80
|
+
onPlayerVisibilityChange: Ce,
|
|
81
|
+
onMobileViewModeChange: Ge,
|
|
82
|
+
onStepChange: He,
|
|
83
|
+
enableIframeScaling: Mt = !0,
|
|
84
|
+
disableLoadingOverlay: C = !1,
|
|
85
|
+
className: Ft,
|
|
86
|
+
onPointerDown: We,
|
|
87
|
+
...kt
|
|
88
88
|
}) => {
|
|
89
|
-
const
|
|
89
|
+
const me = p(null), $e = p(null), Pe = p(null), Ye = p(null), te = p(null), ne = p(null), re = p(null), oe = p(null), Xe = p(null), Je = p([]), pe = p(!1), U = p(null), Qe = p(null), Ze = p({
|
|
90
90
|
markerCount: 0,
|
|
91
91
|
currentIndex: -1,
|
|
92
92
|
canGoNext: !1
|
|
93
93
|
}), {
|
|
94
|
-
currentElementList:
|
|
95
|
-
stepElementLists:
|
|
96
|
-
slideElementList:
|
|
94
|
+
currentElementList: F,
|
|
95
|
+
stepElementLists: et,
|
|
96
|
+
slideElementList: k,
|
|
97
97
|
currentIndex: d,
|
|
98
98
|
audioList: h,
|
|
99
|
-
currentAudioSequenceIndexes:
|
|
99
|
+
currentAudioSequenceIndexes: he,
|
|
100
100
|
currentStepHasSpeakableElement: b,
|
|
101
|
-
currentInteractionElement:
|
|
102
|
-
canGoPrev:
|
|
101
|
+
currentInteractionElement: a,
|
|
102
|
+
canGoPrev: Bt,
|
|
103
103
|
canGoNext: x,
|
|
104
|
-
handlePrev:
|
|
105
|
-
handleNext:
|
|
106
|
-
} =
|
|
104
|
+
handlePrev: tt,
|
|
105
|
+
handleNext: P
|
|
106
|
+
} = Tn(S), se = l(() => {
|
|
107
107
|
if (!(d < 0))
|
|
108
|
-
return
|
|
109
|
-
}, [d,
|
|
108
|
+
return k[d];
|
|
109
|
+
}, [d, k]), Nt = k.filter(
|
|
110
110
|
(e) => e.is_renderable !== !1
|
|
111
|
-
).length === 1, E = w && (
|
|
112
|
-
() =>
|
|
113
|
-
[h,
|
|
114
|
-
), [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
] = m(0), [
|
|
118
|
-
|
|
119
|
-
), [
|
|
120
|
-
() =>
|
|
121
|
-
),
|
|
122
|
-
effectiveMobileViewMode:
|
|
123
|
-
isImmersiveMobileFullscreen:
|
|
124
|
-
isNativeMobileFullscreen:
|
|
125
|
-
shouldRotateFullscreenViewport:
|
|
126
|
-
} =
|
|
127
|
-
() =>
|
|
128
|
-
hasManualMobileViewMode:
|
|
129
|
-
isMobileDevice:
|
|
130
|
-
mobileViewMode:
|
|
111
|
+
).length === 1, E = w && (k.length > 0 || h.length > 0 || !!a), O = l(
|
|
112
|
+
() => he.map((e) => h[e]?.audioKey).filter((e) => !!e),
|
|
113
|
+
[h, he]
|
|
114
|
+
), [nt, ve] = m(!0), [ye, ie] = m(!1), [le, rt] = m(!0), [v, z] = m(null), [Ot, y] = m(!1), [jt, Re] = m(De), [j, Me] = m(!1), [ot, st] = m(null), [Kt, Fe] = m(!1), [it, Lt] = m(!0), [ke, Be] = m(!1), [o, Ne] = m(), [ge, Se] = m(!1), [
|
|
115
|
+
Vt,
|
|
116
|
+
ce
|
|
117
|
+
] = m(0), [lt, qt] = m(!1), B = l(() => wn(), []), [be, Oe] = m(
|
|
118
|
+
Ie
|
|
119
|
+
), [ct, je] = m(!1), [Dt, ut] = m(
|
|
120
|
+
() => B ? Tt() : !1
|
|
121
|
+
), G = l(() => On(), []), {
|
|
122
|
+
effectiveMobileViewMode: H,
|
|
123
|
+
isImmersiveMobileFullscreen: W,
|
|
124
|
+
isNativeMobileFullscreen: at,
|
|
125
|
+
shouldRotateFullscreenViewport: Ut
|
|
126
|
+
} = l(
|
|
127
|
+
() => Pn({
|
|
128
|
+
hasManualMobileViewMode: ct,
|
|
129
|
+
isMobileDevice: B,
|
|
130
|
+
mobileViewMode: be
|
|
131
131
|
}),
|
|
132
132
|
[
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
ct,
|
|
134
|
+
B,
|
|
135
|
+
Dt,
|
|
136
|
+
be
|
|
137
137
|
]
|
|
138
|
-
),
|
|
138
|
+
), zt = p(H), R = E && (I || nt), Gt = W && R, Ht = W && R, Wt = W || at, dt = lt && !B, $t = r(
|
|
139
139
|
(e) => {
|
|
140
|
-
|
|
140
|
+
je(!0), Oe(e);
|
|
141
141
|
},
|
|
142
142
|
[]
|
|
143
|
-
),
|
|
144
|
-
|
|
145
|
-
}, []),
|
|
146
|
-
|
|
147
|
-
}, [_,
|
|
148
|
-
|
|
149
|
-
}, []),
|
|
150
|
-
|
|
151
|
-
}, []), { mountedStepStates:
|
|
143
|
+
), ft = r(() => {
|
|
144
|
+
je(!1), Oe(Ie);
|
|
145
|
+
}, []), Yt = r(() => {
|
|
146
|
+
ft(), _?.onBack?.();
|
|
147
|
+
}, [_, ft]), mt = r((e) => {
|
|
148
|
+
Be(e);
|
|
149
|
+
}, []), pt = r(() => {
|
|
150
|
+
Be((e) => !e);
|
|
151
|
+
}, []), { mountedStepStates: Xt, currentMountedStateIndex: Jt } = l(() => {
|
|
152
152
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
153
|
-
return
|
|
153
|
+
return et.forEach((c, f) => {
|
|
154
154
|
const i = e.findIndex(
|
|
155
|
-
(
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
(u) => Gn(
|
|
156
|
+
u.elementList,
|
|
157
|
+
c
|
|
158
158
|
)
|
|
159
159
|
);
|
|
160
160
|
if (i >= 0) {
|
|
@@ -162,218 +162,221 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
e.push({
|
|
165
|
-
elementList:
|
|
165
|
+
elementList: c,
|
|
166
166
|
sourceStepIndexes: [f]
|
|
167
167
|
}), t.set(f, e.length - 1);
|
|
168
168
|
}), {
|
|
169
169
|
mountedStepStates: e,
|
|
170
170
|
currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
|
|
171
171
|
};
|
|
172
|
-
}, [d,
|
|
172
|
+
}, [d, et]), ht = l(() => String(d), [d]), g = l(() => v ? h.findIndex(
|
|
173
173
|
(e) => (e.audioKey ?? "") === v
|
|
174
|
-
) : -1, [h, v]),
|
|
175
|
-
() =>
|
|
176
|
-
[h,
|
|
177
|
-
),
|
|
178
|
-
() =>
|
|
179
|
-
[
|
|
180
|
-
),
|
|
174
|
+
) : -1, [h, v]), Ke = l(
|
|
175
|
+
() => g >= 0 ? h[g] : void 0,
|
|
176
|
+
[h, g]
|
|
177
|
+
), Qt = Ke?.element?.subtitle_cues ?? [], Ae = l(
|
|
178
|
+
() => O[0] ?? "none",
|
|
179
|
+
[O]
|
|
180
|
+
), K = l(
|
|
181
|
+
() => Fn({
|
|
182
|
+
audioSequenceKeys: O,
|
|
183
|
+
lastCompletedAudioKey: ot
|
|
184
|
+
}),
|
|
185
|
+
[O, ot]
|
|
186
|
+
), Le = l(
|
|
181
187
|
() => ({
|
|
182
|
-
currentElement:
|
|
183
|
-
currentAudioIndex:
|
|
184
|
-
currentAudioSequenceIndexes:
|
|
188
|
+
currentElement: Bn({
|
|
189
|
+
currentAudioIndex: g,
|
|
190
|
+
currentAudioSequenceIndexes: he,
|
|
185
191
|
audioList: h,
|
|
186
192
|
currentInteractionElement: o,
|
|
187
|
-
currentStepElement:
|
|
193
|
+
currentStepElement: se
|
|
188
194
|
}),
|
|
189
195
|
currentIndex: d,
|
|
190
|
-
currentStepElement:
|
|
191
|
-
isActive:
|
|
192
|
-
setActive:
|
|
193
|
-
toggleActive:
|
|
196
|
+
currentStepElement: se,
|
|
197
|
+
isActive: ke,
|
|
198
|
+
setActive: mt,
|
|
199
|
+
toggleActive: pt
|
|
194
200
|
}),
|
|
195
201
|
[
|
|
196
202
|
o,
|
|
197
203
|
h,
|
|
198
|
-
|
|
199
|
-
|
|
204
|
+
g,
|
|
205
|
+
he,
|
|
200
206
|
d,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
se,
|
|
208
|
+
ke,
|
|
209
|
+
mt,
|
|
210
|
+
pt
|
|
205
211
|
]
|
|
206
|
-
),
|
|
207
|
-
() =>
|
|
208
|
-
|
|
209
|
-
|
|
212
|
+
), Ve = l(
|
|
213
|
+
() => Nn(
|
|
214
|
+
q,
|
|
215
|
+
Le
|
|
210
216
|
),
|
|
211
|
-
[
|
|
212
|
-
),
|
|
217
|
+
[Le, q]
|
|
218
|
+
), Zt = l(
|
|
213
219
|
() => ({
|
|
214
|
-
"--slide-player-custom-action-count": String(
|
|
220
|
+
"--slide-player-custom-action-count": String(Ve),
|
|
215
221
|
"--slide-player-mobile-control-count": String(
|
|
216
|
-
|
|
222
|
+
Ve + 4
|
|
217
223
|
)
|
|
218
224
|
}),
|
|
219
|
-
[
|
|
220
|
-
),
|
|
221
|
-
|
|
222
|
-
)}` : "none", [
|
|
223
|
-
() => [
|
|
224
|
-
[
|
|
225
|
-
),
|
|
225
|
+
[Ve]
|
|
226
|
+
), vt = O.length > 0, yt = l(() => a ? `${a.sequence_number ?? "none"}:${String(
|
|
227
|
+
a.content ?? ""
|
|
228
|
+
)}` : "none", [a]), ue = l(
|
|
229
|
+
() => [ht, yt].join("|"),
|
|
230
|
+
[yt, ht]
|
|
231
|
+
), en = l(
|
|
226
232
|
() => [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
String(
|
|
233
|
+
ue,
|
|
234
|
+
Ke?.audioKey ?? "none",
|
|
235
|
+
String(g)
|
|
230
236
|
].join("|"),
|
|
231
|
-
[
|
|
232
|
-
),
|
|
233
|
-
(t) => t.audioKey ===
|
|
234
|
-
)?.audioUrl?.trim() ?? "", [h,
|
|
235
|
-
() =>
|
|
237
|
+
[g, Ke?.audioKey, ue]
|
|
238
|
+
), gt = !!l(() => !Ae || Ae === "none" ? "" : h.find(
|
|
239
|
+
(t) => t.audioKey === Ae
|
|
240
|
+
)?.audioUrl?.trim() ?? "", [h, Ae]), L = ee && !!q && ke, ae = l(
|
|
241
|
+
() => jn({
|
|
236
242
|
canGoNext: x,
|
|
237
|
-
currentAudioIndex:
|
|
243
|
+
currentAudioIndex: g,
|
|
238
244
|
currentStepHasSpeakableElement: b,
|
|
239
|
-
hasInteraction: !!
|
|
245
|
+
hasInteraction: !!a
|
|
240
246
|
}),
|
|
241
247
|
[
|
|
242
248
|
x,
|
|
243
|
-
|
|
244
|
-
|
|
249
|
+
g,
|
|
250
|
+
a,
|
|
245
251
|
b
|
|
246
252
|
]
|
|
247
|
-
),
|
|
248
|
-
ee.current !== null && (window.clearTimeout(ee.current), ee.current = null);
|
|
249
|
-
}, []), j = r(() => {
|
|
250
|
-
ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
|
|
251
|
-
}, []), k = r(() => {
|
|
252
|
-
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
253
|
-
}, []), W = r(() => {
|
|
253
|
+
), V = r(() => {
|
|
254
254
|
te.current !== null && (window.clearTimeout(te.current), te.current = null);
|
|
255
|
+
}, []), N = r(() => {
|
|
256
|
+
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
257
|
+
}, []), M = r(() => {
|
|
258
|
+
oe.current !== null && (window.clearTimeout(oe.current), oe.current = null);
|
|
255
259
|
}, []), $ = r(() => {
|
|
256
|
-
|
|
260
|
+
ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
|
|
261
|
+
}, []), Y = r(() => {
|
|
262
|
+
$(), N(), M(), z(null), G.reset(), y(!1), Re(De), Me(!1), st(null), Fe(!1), Ne(void 0), Se(!1), ce(0);
|
|
257
263
|
}, [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
]),
|
|
263
|
-
|
|
264
|
-
return e ? (U(e), !0) : !1;
|
|
265
|
-
}, [P]), Ae = r(() => {
|
|
266
|
-
j(), k(), ye(!1), le(0), !Y() && x && C();
|
|
264
|
+
$,
|
|
265
|
+
N,
|
|
266
|
+
M,
|
|
267
|
+
G
|
|
268
|
+
]), X = r(() => K ? (Me(!1), z(K), !0) : !1, [K]), xe = r(() => {
|
|
269
|
+
N(), M(), Se(!1), ce(0), !X() && x && P();
|
|
267
270
|
}, [
|
|
268
271
|
x,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
]),
|
|
272
|
+
N,
|
|
273
|
+
M,
|
|
274
|
+
P,
|
|
275
|
+
X
|
|
276
|
+
]), St = r(
|
|
274
277
|
(e) => {
|
|
275
|
-
if (
|
|
278
|
+
if (M(), !e)
|
|
276
279
|
return;
|
|
277
280
|
const t = () => {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
),
|
|
281
|
+
oe.current = null, ce(
|
|
282
|
+
qn
|
|
283
|
+
), Se(!0), U.current = null;
|
|
281
284
|
};
|
|
282
|
-
|
|
285
|
+
oe.current = window.setTimeout(
|
|
283
286
|
t,
|
|
284
|
-
|
|
287
|
+
Vn
|
|
285
288
|
);
|
|
286
289
|
},
|
|
287
|
-
[
|
|
290
|
+
[M]
|
|
288
291
|
), A = r(
|
|
289
|
-
(e =
|
|
290
|
-
E && (
|
|
291
|
-
|
|
292
|
-
},
|
|
292
|
+
(e = ye) => {
|
|
293
|
+
E && (ve(!0), V(), !(I || !e || Te <= 0) && (te.current = window.setTimeout(() => {
|
|
294
|
+
ve(!1), te.current = null;
|
|
295
|
+
}, Te)));
|
|
293
296
|
},
|
|
294
297
|
[
|
|
295
|
-
|
|
296
|
-
|
|
298
|
+
V,
|
|
299
|
+
ye,
|
|
297
300
|
I,
|
|
298
|
-
|
|
301
|
+
Te,
|
|
299
302
|
E
|
|
300
303
|
]
|
|
301
|
-
),
|
|
304
|
+
), de = !!(a?.readonly || a?.user_input?.trim()), J = !!a && !de;
|
|
302
305
|
s(() => {
|
|
303
|
-
|
|
304
|
-
}, [d,
|
|
305
|
-
|
|
306
|
+
rt(!0), ee && Be(!1);
|
|
307
|
+
}, [d, ee]), s(() => () => {
|
|
308
|
+
$(), V(), N(), M();
|
|
306
309
|
}, [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
]), s(() => (
|
|
312
|
-
|
|
313
|
-
}), [
|
|
314
|
-
|
|
315
|
-
}, [
|
|
316
|
-
if (!
|
|
317
|
-
|
|
310
|
+
$,
|
|
311
|
+
N,
|
|
312
|
+
M,
|
|
313
|
+
V
|
|
314
|
+
]), s(() => (Ce?.(R), () => {
|
|
315
|
+
Ce?.(!1);
|
|
316
|
+
}), [Ce, R]), s(() => {
|
|
317
|
+
B || be === Ie || (je(!1), Oe(Ie));
|
|
318
|
+
}, [B, be]), s(() => {
|
|
319
|
+
if (!B) {
|
|
320
|
+
ut(!1);
|
|
318
321
|
return;
|
|
319
322
|
}
|
|
320
323
|
const e = () => {
|
|
321
|
-
|
|
324
|
+
ut(Tt());
|
|
322
325
|
};
|
|
323
|
-
return e(),
|
|
324
|
-
}, [
|
|
325
|
-
|
|
326
|
-
}, [
|
|
327
|
-
|
|
328
|
-
}, [
|
|
329
|
-
|
|
330
|
-
}, [d,
|
|
331
|
-
const e =
|
|
326
|
+
return e(), In(e);
|
|
327
|
+
}, [B]), s(() => {
|
|
328
|
+
Ge?.(H);
|
|
329
|
+
}, [H, Ge]), s(() => {
|
|
330
|
+
zt.current = H;
|
|
331
|
+
}, [H]), s(() => {
|
|
332
|
+
He?.(se, d);
|
|
333
|
+
}, [d, se, He]), s(() => {
|
|
334
|
+
const e = Ze.current, t = Mn(
|
|
332
335
|
{
|
|
333
336
|
previousMarkerCount: e.markerCount,
|
|
334
|
-
nextMarkerCount:
|
|
337
|
+
nextMarkerCount: k.length,
|
|
335
338
|
previousIndex: e.currentIndex,
|
|
336
339
|
previousCanGoNext: e.canGoNext,
|
|
337
340
|
nextCanGoNext: x,
|
|
338
341
|
currentAudioKey: v,
|
|
339
|
-
hasCompletedCurrentStepAudio:
|
|
340
|
-
hasResolvedCurrentInteraction:
|
|
342
|
+
hasCompletedCurrentStepAudio: j,
|
|
343
|
+
hasResolvedCurrentInteraction: de,
|
|
341
344
|
currentStepHasSpeakableElement: b,
|
|
342
|
-
currentInteractionElement:
|
|
343
|
-
isAutoAdvanceEnabled:
|
|
345
|
+
currentInteractionElement: a,
|
|
346
|
+
isAutoAdvanceEnabled: le,
|
|
344
347
|
shouldUseSilentStepAutoAdvanceToggle: ae
|
|
345
348
|
}
|
|
346
349
|
);
|
|
347
|
-
|
|
348
|
-
markerCount:
|
|
350
|
+
Ze.current = {
|
|
351
|
+
markerCount: k.length,
|
|
349
352
|
currentIndex: d,
|
|
350
353
|
canGoNext: x
|
|
351
|
-
}, t &&
|
|
354
|
+
}, t && P();
|
|
352
355
|
}, [
|
|
353
356
|
x,
|
|
354
357
|
v,
|
|
355
358
|
d,
|
|
356
|
-
|
|
359
|
+
a,
|
|
357
360
|
b,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
361
|
+
P,
|
|
362
|
+
j,
|
|
363
|
+
de,
|
|
364
|
+
le,
|
|
362
365
|
ae,
|
|
363
|
-
|
|
366
|
+
k.length
|
|
364
367
|
]), s(() => {
|
|
365
368
|
if (!E) {
|
|
366
|
-
|
|
369
|
+
V(), ve(!1);
|
|
367
370
|
return;
|
|
368
371
|
}
|
|
369
372
|
if (I) {
|
|
370
|
-
|
|
373
|
+
V(), ve(!0);
|
|
371
374
|
return;
|
|
372
375
|
}
|
|
373
|
-
|
|
376
|
+
ye || A(!0);
|
|
374
377
|
}, [
|
|
375
|
-
|
|
376
|
-
|
|
378
|
+
V,
|
|
379
|
+
ye,
|
|
377
380
|
I,
|
|
378
381
|
E,
|
|
379
382
|
A
|
|
@@ -381,242 +384,242 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
381
384
|
if (typeof window > "u")
|
|
382
385
|
return;
|
|
383
386
|
const e = (t) => {
|
|
384
|
-
t.origin === window.location.origin &&
|
|
387
|
+
t.origin === window.location.origin && gn(t.data) && t.data.eventType === "click" && E && (ie(!0), A(!0));
|
|
385
388
|
};
|
|
386
389
|
return window.addEventListener("message", e), () => {
|
|
387
390
|
window.removeEventListener("message", e);
|
|
388
391
|
};
|
|
389
|
-
}, [E, A]),
|
|
390
|
-
sectionRef:
|
|
392
|
+
}, [E, A]), Cn({
|
|
393
|
+
sectionRef: me,
|
|
391
394
|
enabled: E,
|
|
392
395
|
onWake: () => {
|
|
393
|
-
|
|
396
|
+
ie(!0), A(!0);
|
|
394
397
|
}
|
|
395
398
|
}), s(() => {
|
|
396
|
-
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } =
|
|
397
|
-
previousResetKey:
|
|
398
|
-
nextResetKey:
|
|
399
|
+
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = kn({
|
|
400
|
+
previousResetKey: Qe.current,
|
|
401
|
+
nextResetKey: ue,
|
|
399
402
|
currentAudioKey: v,
|
|
400
|
-
hasCompletedCurrentStepAudio:
|
|
403
|
+
hasCompletedCurrentStepAudio: j
|
|
401
404
|
});
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
hasInteraction: !!
|
|
405
|
-
shouldBlockPlaybackForInteraction:
|
|
406
|
-
shouldOpenInteractionOverlayAfterAudio:
|
|
405
|
+
Qe.current = ue;
|
|
406
|
+
const c = U.current === d && !!a, f = Rn({
|
|
407
|
+
hasInteraction: !!a,
|
|
408
|
+
shouldBlockPlaybackForInteraction: J,
|
|
409
|
+
shouldOpenInteractionOverlayAfterAudio: c,
|
|
407
410
|
hasPlaybackContextChanged: e,
|
|
408
|
-
hasResolvedCurrentInteraction:
|
|
411
|
+
hasResolvedCurrentInteraction: de,
|
|
409
412
|
currentStepHasSpeakableElement: b
|
|
410
413
|
});
|
|
411
|
-
if (e &&
|
|
412
|
-
if (
|
|
413
|
-
|
|
414
|
+
if (e && Y(), !(F.length === 0 && !a) && !L) {
|
|
415
|
+
if (a && Ne(a), f) {
|
|
416
|
+
St(a);
|
|
414
417
|
return;
|
|
415
418
|
}
|
|
416
|
-
if (
|
|
419
|
+
if (M(), U.current = null, !!t && !X()) {
|
|
417
420
|
if (b) {
|
|
418
|
-
if (
|
|
419
|
-
|
|
421
|
+
if (C) {
|
|
422
|
+
y(!1);
|
|
420
423
|
return;
|
|
421
424
|
}
|
|
422
|
-
|
|
425
|
+
y(!0);
|
|
423
426
|
return;
|
|
424
427
|
}
|
|
425
|
-
if (x && !(ae && !
|
|
426
|
-
return
|
|
427
|
-
|
|
428
|
-
},
|
|
429
|
-
|
|
428
|
+
if (x && !(ae && !le))
|
|
429
|
+
return ne.current = window.setTimeout(() => {
|
|
430
|
+
ne.current = null, P();
|
|
431
|
+
}, Ue), () => {
|
|
432
|
+
$();
|
|
430
433
|
};
|
|
431
434
|
}
|
|
432
435
|
}
|
|
433
436
|
}, [
|
|
434
437
|
x,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
+
$,
|
|
439
|
+
F.length,
|
|
440
|
+
a,
|
|
438
441
|
v,
|
|
439
|
-
|
|
442
|
+
ue,
|
|
440
443
|
b,
|
|
441
|
-
|
|
444
|
+
Ue,
|
|
445
|
+
P,
|
|
446
|
+
j,
|
|
442
447
|
C,
|
|
448
|
+
le,
|
|
449
|
+
de,
|
|
450
|
+
J,
|
|
443
451
|
M,
|
|
444
|
-
R,
|
|
445
|
-
ie,
|
|
446
|
-
ue,
|
|
447
|
-
X,
|
|
448
|
-
k,
|
|
449
|
-
$,
|
|
450
|
-
vt,
|
|
451
452
|
Y,
|
|
453
|
+
St,
|
|
454
|
+
X,
|
|
452
455
|
L,
|
|
453
456
|
ae
|
|
454
457
|
]), s(() => {
|
|
455
|
-
if (
|
|
456
|
-
|
|
458
|
+
if (C || L || !b || J) {
|
|
459
|
+
y(!1);
|
|
457
460
|
return;
|
|
458
461
|
}
|
|
459
|
-
if (
|
|
460
|
-
|
|
462
|
+
if (j && !K) {
|
|
463
|
+
y(!1);
|
|
461
464
|
return;
|
|
462
465
|
}
|
|
463
|
-
if (
|
|
464
|
-
|
|
466
|
+
if (vt) {
|
|
467
|
+
y(!1);
|
|
465
468
|
return;
|
|
466
469
|
}
|
|
467
|
-
|
|
470
|
+
Re("waitingForAudio"), y(!0);
|
|
468
471
|
}, [
|
|
469
|
-
|
|
472
|
+
vt,
|
|
470
473
|
b,
|
|
471
|
-
|
|
472
|
-
|
|
474
|
+
j,
|
|
475
|
+
K,
|
|
476
|
+
C,
|
|
473
477
|
L,
|
|
474
|
-
|
|
478
|
+
J
|
|
475
479
|
]), s(() => {
|
|
476
|
-
v ||
|
|
480
|
+
v || !K || L || !b || J || X();
|
|
477
481
|
}, [
|
|
478
482
|
v,
|
|
479
|
-
|
|
483
|
+
K,
|
|
480
484
|
b,
|
|
481
|
-
M,
|
|
482
485
|
L,
|
|
483
|
-
|
|
484
|
-
|
|
486
|
+
J,
|
|
487
|
+
X
|
|
485
488
|
]), s(() => {
|
|
486
|
-
!v ||
|
|
487
|
-
}, [
|
|
488
|
-
|
|
489
|
-
}, [
|
|
490
|
-
|
|
491
|
-
}, [
|
|
492
|
-
const
|
|
489
|
+
!v || g >= 0 || z(null);
|
|
490
|
+
}, [g, v]), s(() => {
|
|
491
|
+
g >= 0 || G.reset();
|
|
492
|
+
}, [g, G]), s(() => {
|
|
493
|
+
Fe(!1);
|
|
494
|
+
}, [en]);
|
|
495
|
+
const bt = l(() => {
|
|
493
496
|
if (!o)
|
|
494
497
|
return {};
|
|
495
498
|
const e = !!o.user_input?.trim();
|
|
496
|
-
return
|
|
499
|
+
return An(
|
|
497
500
|
typeof o.content == "string" ? o.content : void 0,
|
|
498
501
|
o.user_input,
|
|
499
|
-
e ? void 0 :
|
|
502
|
+
e ? void 0 : fe
|
|
500
503
|
);
|
|
501
|
-
}, [o,
|
|
504
|
+
}, [o, fe]), tn = l(() => {
|
|
502
505
|
if (!o)
|
|
503
506
|
return;
|
|
504
507
|
const e = !!o.user_input?.trim();
|
|
505
|
-
return
|
|
508
|
+
return xn(
|
|
506
509
|
typeof o.content == "string" ? o.content : void 0,
|
|
507
510
|
o.user_input,
|
|
508
|
-
e ? void 0 :
|
|
511
|
+
e ? void 0 : fe
|
|
509
512
|
);
|
|
510
|
-
}, [o,
|
|
513
|
+
}, [o, fe]), At = !!o?.user_input?.trim(), xt = !!o?.readonly || At, wt = xt || At, qe = !!o && ge, nn = r(
|
|
511
514
|
(e) => {
|
|
512
|
-
const
|
|
515
|
+
const c = [
|
|
513
516
|
...e.selectedValues ?? [],
|
|
514
517
|
e.inputText?.trim() ?? "",
|
|
515
518
|
e.buttonText?.trim() ?? ""
|
|
516
519
|
].filter(Boolean).join(", ");
|
|
517
|
-
|
|
520
|
+
Ne((f) => !f || !c ? f : {
|
|
518
521
|
...f,
|
|
519
|
-
user_input:
|
|
520
|
-
}),
|
|
522
|
+
user_input: c
|
|
523
|
+
}), ze?.(e, o), xe();
|
|
521
524
|
},
|
|
522
|
-
[o,
|
|
525
|
+
[o, xe, ze]
|
|
523
526
|
);
|
|
524
527
|
s(() => {
|
|
525
528
|
const e = () => {
|
|
526
|
-
|
|
529
|
+
qt(document.fullscreenElement === me.current);
|
|
527
530
|
};
|
|
528
531
|
return e(), document.addEventListener("fullscreenchange", e), () => {
|
|
529
532
|
document.removeEventListener("fullscreenchange", e);
|
|
530
533
|
};
|
|
531
534
|
}, []), s(() => {
|
|
532
|
-
if (!
|
|
533
|
-
|
|
535
|
+
if (!qe) {
|
|
536
|
+
ce(0);
|
|
534
537
|
return;
|
|
535
538
|
}
|
|
536
|
-
const e =
|
|
539
|
+
const e = Xe.current;
|
|
537
540
|
if (!e)
|
|
538
541
|
return;
|
|
539
542
|
const t = () => {
|
|
540
543
|
const f = Math.ceil(
|
|
541
544
|
e.getBoundingClientRect().height
|
|
542
545
|
);
|
|
543
|
-
|
|
544
|
-
f +
|
|
546
|
+
ce(
|
|
547
|
+
f + Dn
|
|
545
548
|
);
|
|
546
549
|
};
|
|
547
550
|
if (t(), typeof ResizeObserver > "u")
|
|
548
551
|
return;
|
|
549
|
-
const
|
|
552
|
+
const c = new ResizeObserver(() => {
|
|
550
553
|
t();
|
|
551
554
|
});
|
|
552
|
-
return
|
|
553
|
-
|
|
555
|
+
return c.observe(e), () => {
|
|
556
|
+
c.disconnect();
|
|
554
557
|
};
|
|
555
|
-
}, [
|
|
556
|
-
if (
|
|
557
|
-
return
|
|
558
|
-
|
|
558
|
+
}, [qe]), s(() => {
|
|
559
|
+
if (N(), !(!ge || !wt))
|
|
560
|
+
return re.current = window.setTimeout(() => {
|
|
561
|
+
re.current = null, xe();
|
|
559
562
|
}, 2e3), () => {
|
|
560
|
-
|
|
563
|
+
N();
|
|
561
564
|
};
|
|
562
565
|
}, [
|
|
563
|
-
|
|
564
|
-
|
|
566
|
+
N,
|
|
567
|
+
xe,
|
|
565
568
|
ge,
|
|
566
|
-
|
|
569
|
+
wt
|
|
567
570
|
]);
|
|
568
|
-
const
|
|
569
|
-
|
|
571
|
+
const rn = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
|
|
572
|
+
Et,
|
|
570
573
|
{
|
|
571
574
|
className: "content-render-iframe",
|
|
572
|
-
disableLoadingOverlay:
|
|
575
|
+
disableLoadingOverlay: C,
|
|
573
576
|
hideFullScreen: !0,
|
|
574
577
|
mode: "blackboard",
|
|
575
578
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
576
579
|
type: "sandbox",
|
|
577
580
|
content: e.content,
|
|
578
|
-
enableScaling:
|
|
581
|
+
enableScaling: Mt
|
|
579
582
|
}
|
|
580
583
|
) : /* @__PURE__ */ n.jsx(
|
|
581
|
-
|
|
584
|
+
Et,
|
|
582
585
|
{
|
|
583
586
|
className: "content-render-iframe",
|
|
584
|
-
disableLoadingOverlay:
|
|
587
|
+
disableLoadingOverlay: C,
|
|
585
588
|
hideFullScreen: !0,
|
|
586
589
|
mode: "blackboard",
|
|
587
590
|
type: "markdown",
|
|
588
591
|
content: e.content
|
|
589
592
|
}
|
|
590
|
-
) : null,
|
|
593
|
+
) : null, on = (e = [], t = !1) => {
|
|
591
594
|
if (e.length === 0)
|
|
592
595
|
return null;
|
|
593
|
-
const
|
|
596
|
+
const c = e.filter(
|
|
594
597
|
(i) => i.is_renderable !== !1
|
|
595
598
|
).length, f = e.reduce(
|
|
596
|
-
(i,
|
|
599
|
+
(i, u, T) => u.is_renderable !== !1 ? T : i,
|
|
597
600
|
-1
|
|
598
601
|
);
|
|
599
|
-
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((i,
|
|
602
|
+
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((i, u) => {
|
|
600
603
|
const T = i.type === "html" && i.is_renderable === !1;
|
|
601
604
|
return /* @__PURE__ */ n.jsx(
|
|
602
605
|
"div",
|
|
603
606
|
{
|
|
604
|
-
ref: t &&
|
|
607
|
+
ref: t && u === f ? Ye : null,
|
|
605
608
|
"aria-hidden": T || void 0,
|
|
606
|
-
className:
|
|
609
|
+
className: Q(
|
|
607
610
|
"w-full shrink-0",
|
|
608
|
-
|
|
611
|
+
c === 1 && i.is_renderable !== !1 && "slide-element--single",
|
|
609
612
|
T ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : i.is_renderable === !1 && "hidden"
|
|
610
613
|
),
|
|
611
|
-
children:
|
|
612
|
-
replaceRootScreenHeightWithFull:
|
|
614
|
+
children: rn(i, {
|
|
615
|
+
replaceRootScreenHeightWithFull: c === 1 && i.type === "html" && i.is_renderable !== !1
|
|
613
616
|
})
|
|
614
617
|
},
|
|
615
|
-
i.sequence_number ?? `${i.type}-${
|
|
618
|
+
i.sequence_number ?? `${i.type}-${u}`
|
|
616
619
|
);
|
|
617
620
|
}) });
|
|
618
|
-
},
|
|
619
|
-
const e =
|
|
621
|
+
}, sn = r(() => {
|
|
622
|
+
const e = me.current;
|
|
620
623
|
if (e) {
|
|
621
624
|
if (document.fullscreenElement === e) {
|
|
622
625
|
document.exitFullscreen().catch(() => {
|
|
@@ -626,60 +629,61 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
626
629
|
e.requestFullscreen?.().catch(() => {
|
|
627
630
|
});
|
|
628
631
|
}
|
|
629
|
-
}, []),
|
|
630
|
-
const e =
|
|
632
|
+
}, []), It = r(() => {
|
|
633
|
+
const e = Pe.current;
|
|
631
634
|
e && e.scrollTo({
|
|
632
635
|
top: e.scrollHeight,
|
|
633
636
|
behavior: "smooth"
|
|
634
637
|
});
|
|
635
|
-
}, []),
|
|
636
|
-
|
|
637
|
-
}, [
|
|
638
|
-
|
|
639
|
-
}, [
|
|
638
|
+
}, []), ln = r(() => {
|
|
639
|
+
pe.current = !0, U.current = null, ie(!0), y(!1), A(!0), Y(), tt();
|
|
640
|
+
}, [tt, Y, A]), cn = r(() => {
|
|
641
|
+
pe.current = !0, U.current = null, ie(!0), y(!1), A(!0), Y(), P();
|
|
642
|
+
}, [P, Y, A]), un = r(
|
|
640
643
|
({
|
|
641
644
|
loading: e,
|
|
642
645
|
reason: t
|
|
643
646
|
}) => {
|
|
644
|
-
if (
|
|
645
|
-
|
|
647
|
+
if (C) {
|
|
648
|
+
y(!1);
|
|
646
649
|
return;
|
|
647
650
|
}
|
|
648
|
-
if (!b ||
|
|
649
|
-
|
|
651
|
+
if (!b || j) {
|
|
652
|
+
y(!1);
|
|
650
653
|
return;
|
|
651
654
|
}
|
|
652
|
-
e && t &&
|
|
655
|
+
e && t && Re(t), y(zn(t, e));
|
|
653
656
|
},
|
|
654
657
|
[
|
|
655
658
|
b,
|
|
656
|
-
|
|
657
|
-
|
|
659
|
+
j,
|
|
660
|
+
C
|
|
658
661
|
]
|
|
659
662
|
);
|
|
660
663
|
s(() => {
|
|
661
|
-
|
|
662
|
-
}, [
|
|
663
|
-
const
|
|
664
|
+
C && y(!1);
|
|
665
|
+
}, [C]);
|
|
666
|
+
const an = r(
|
|
664
667
|
(e) => {
|
|
665
668
|
const t = h[e]?.audioKey;
|
|
666
669
|
if (!t || !v || t !== v)
|
|
667
670
|
return;
|
|
668
|
-
const
|
|
669
|
-
(
|
|
671
|
+
const c = O.findIndex(
|
|
672
|
+
(u) => u === t
|
|
670
673
|
);
|
|
671
|
-
if (
|
|
672
|
-
|
|
674
|
+
if (c < 0) {
|
|
675
|
+
z(null);
|
|
673
676
|
return;
|
|
674
677
|
}
|
|
675
|
-
const f =
|
|
678
|
+
const f = c + 1, i = O[f];
|
|
676
679
|
if (i) {
|
|
677
|
-
|
|
680
|
+
z(i);
|
|
678
681
|
return;
|
|
679
682
|
}
|
|
680
|
-
if (
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
+
if (z(null), st(t), Me(!0), y(!1), x) {
|
|
684
|
+
const u = d + 1, T = k[u];
|
|
685
|
+
gt && T?.type === "interaction" && (U.current = u), P();
|
|
686
|
+
return;
|
|
683
687
|
}
|
|
684
688
|
},
|
|
685
689
|
[
|
|
@@ -687,76 +691,76 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
687
691
|
x,
|
|
688
692
|
d,
|
|
689
693
|
v,
|
|
694
|
+
O,
|
|
690
695
|
P,
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
N
|
|
696
|
+
gt,
|
|
697
|
+
k
|
|
694
698
|
]
|
|
695
|
-
),
|
|
696
|
-
o &&
|
|
697
|
-
}, [o]),
|
|
699
|
+
), dn = r(() => {
|
|
700
|
+
o && Se((e) => !e);
|
|
701
|
+
}, [o]), _t = r(
|
|
698
702
|
(e) => {
|
|
699
|
-
e.stopPropagation(),
|
|
703
|
+
e.stopPropagation(), R && A(!0);
|
|
700
704
|
},
|
|
701
|
-
[
|
|
702
|
-
),
|
|
705
|
+
[nt, A]
|
|
706
|
+
), fn = r(
|
|
703
707
|
(e) => {
|
|
704
|
-
|
|
708
|
+
We?.(e);
|
|
705
709
|
},
|
|
706
|
-
[
|
|
707
|
-
),
|
|
708
|
-
|
|
709
|
-
}, [A]),
|
|
710
|
-
() =>
|
|
710
|
+
[We]
|
|
711
|
+
), mn = r(() => {
|
|
712
|
+
ie(!0), A(!0);
|
|
713
|
+
}, [A]), we = l(
|
|
714
|
+
() => F.map(
|
|
711
715
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
712
716
|
),
|
|
713
|
-
[
|
|
717
|
+
[F]
|
|
714
718
|
);
|
|
715
719
|
return s(() => {
|
|
716
|
-
const e =
|
|
717
|
-
(
|
|
720
|
+
const e = Je.current, f = (e.length > 0 && e.length < we.length && e.every((u, T) => u === we[T]) ? F.slice(e.length) : []).some(
|
|
721
|
+
(u) => u.is_new === !1
|
|
718
722
|
);
|
|
719
|
-
if (
|
|
723
|
+
if (Je.current = we, !f)
|
|
720
724
|
return;
|
|
721
725
|
const i = window.requestAnimationFrame(() => {
|
|
722
|
-
const
|
|
723
|
-
if (!
|
|
726
|
+
const u = Pe.current, T = Ye.current;
|
|
727
|
+
if (!u || !T)
|
|
724
728
|
return;
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
top: Math.max(
|
|
729
|
+
const pn = u.getBoundingClientRect(), hn = T.getBoundingClientRect(), vn = u.scrollTop + (hn.top - pn.top);
|
|
730
|
+
u.scrollTo({
|
|
731
|
+
top: Math.max(vn, 0),
|
|
728
732
|
behavior: "smooth"
|
|
729
733
|
});
|
|
730
734
|
});
|
|
731
735
|
return () => {
|
|
732
736
|
window.cancelAnimationFrame(i);
|
|
733
737
|
};
|
|
734
|
-
}, [
|
|
735
|
-
if (!
|
|
738
|
+
}, [F, we]), s(() => {
|
|
739
|
+
if (!pe.current || (pe.current = !1, F.length === 0))
|
|
736
740
|
return;
|
|
737
741
|
const e = window.requestAnimationFrame(() => {
|
|
738
|
-
|
|
742
|
+
It();
|
|
739
743
|
});
|
|
740
744
|
return () => {
|
|
741
745
|
window.cancelAnimationFrame(e);
|
|
742
746
|
};
|
|
743
|
-
}, [
|
|
747
|
+
}, [F, It]), /* @__PURE__ */ n.jsxs(
|
|
744
748
|
"section",
|
|
745
749
|
{
|
|
746
|
-
ref:
|
|
747
|
-
className:
|
|
750
|
+
ref: me,
|
|
751
|
+
className: Q(
|
|
748
752
|
"relative h-full w-full",
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
753
|
+
B && "slide--mobile-device",
|
|
754
|
+
dt && "slide--browser-fullscreen",
|
|
755
|
+
W && "slide--mobile-landscape",
|
|
756
|
+
at && "slide--mobile-landscape-native",
|
|
757
|
+
Ft
|
|
754
758
|
),
|
|
755
|
-
onClick:
|
|
756
|
-
onPointerDown:
|
|
757
|
-
...
|
|
759
|
+
onClick: mn,
|
|
760
|
+
onPointerDown: fn,
|
|
761
|
+
...kt,
|
|
758
762
|
children: [
|
|
759
|
-
|
|
763
|
+
Wt ? /* @__PURE__ */ n.jsx(
|
|
760
764
|
"div",
|
|
761
765
|
{
|
|
762
766
|
"aria-hidden": "true",
|
|
@@ -766,23 +770,23 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
766
770
|
/* @__PURE__ */ n.jsxs(
|
|
767
771
|
"div",
|
|
768
772
|
{
|
|
769
|
-
ref:
|
|
770
|
-
className:
|
|
773
|
+
ref: $e,
|
|
774
|
+
className: Q(
|
|
771
775
|
"slide__viewport relative h-full min-h-0 w-full",
|
|
772
|
-
|
|
773
|
-
|
|
776
|
+
W && "slide__viewport--mobile-landscape",
|
|
777
|
+
W && !Ut && "slide__viewport--mobile-landscape-native"
|
|
774
778
|
),
|
|
775
779
|
children: [
|
|
776
|
-
|
|
780
|
+
Gt ? /* @__PURE__ */ n.jsxs("div", { className: "slide-landscape-header", children: [
|
|
777
781
|
/* @__PURE__ */ n.jsx(
|
|
778
782
|
"button",
|
|
779
783
|
{
|
|
780
784
|
"aria-label": _?.backAriaLabel ?? "Back",
|
|
781
785
|
className: "slide-landscape-header__back",
|
|
782
|
-
onClick:
|
|
786
|
+
onClick: Yt,
|
|
783
787
|
type: "button",
|
|
784
788
|
children: /* @__PURE__ */ n.jsx(
|
|
785
|
-
|
|
789
|
+
Kn,
|
|
786
790
|
{
|
|
787
791
|
className: "slide-landscape-header__icon h-6 w-6",
|
|
788
792
|
strokeWidth: 2.25
|
|
@@ -795,23 +799,23 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
795
799
|
/* @__PURE__ */ n.jsx(
|
|
796
800
|
"div",
|
|
797
801
|
{
|
|
798
|
-
className:
|
|
802
|
+
className: Q(
|
|
799
803
|
"h-full min-h-0 w-full",
|
|
800
|
-
|
|
801
|
-
|
|
804
|
+
Ht && "slide__viewport-content--with-header",
|
|
805
|
+
Nt ? "slide-content--single" : "grid gap-4"
|
|
802
806
|
),
|
|
803
|
-
children:
|
|
807
|
+
children: F.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: Pe, className: "slide-stage__layer w-full", children: Xt.map(
|
|
804
808
|
(e, t) => {
|
|
805
|
-
const
|
|
809
|
+
const c = t === Jt;
|
|
806
810
|
return /* @__PURE__ */ n.jsx(
|
|
807
811
|
"div",
|
|
808
812
|
{
|
|
809
|
-
"aria-hidden": !
|
|
813
|
+
"aria-hidden": !c || void 0,
|
|
810
814
|
className: "w-full h-full",
|
|
811
|
-
style: { display:
|
|
812
|
-
children:
|
|
815
|
+
style: { display: c ? void 0 : "none" },
|
|
816
|
+
children: on(
|
|
813
817
|
e.elementList,
|
|
814
|
-
|
|
818
|
+
c
|
|
815
819
|
)
|
|
816
820
|
},
|
|
817
821
|
e.sourceStepIndexes[0] ?? t
|
|
@@ -820,96 +824,96 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
820
824
|
) }) }) : null
|
|
821
825
|
}
|
|
822
826
|
),
|
|
823
|
-
|
|
824
|
-
|
|
827
|
+
Ot ? /* @__PURE__ */ n.jsx(
|
|
828
|
+
Sn,
|
|
825
829
|
{
|
|
826
|
-
message:
|
|
827
|
-
|
|
828
|
-
|
|
830
|
+
message: Un(
|
|
831
|
+
_e,
|
|
832
|
+
jt
|
|
829
833
|
),
|
|
830
834
|
className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
|
|
831
835
|
}
|
|
832
836
|
) : null,
|
|
833
837
|
/* @__PURE__ */ n.jsx(
|
|
834
|
-
|
|
838
|
+
En,
|
|
835
839
|
{
|
|
836
|
-
extraBottomOffset:
|
|
837
|
-
hasPlayerGap:
|
|
838
|
-
isEnabled:
|
|
839
|
-
isPlayerHidden: E && !
|
|
840
|
-
playbackTimeStore:
|
|
841
|
-
subtitleCues:
|
|
840
|
+
extraBottomOffset: Vt,
|
|
841
|
+
hasPlayerGap: R,
|
|
842
|
+
isEnabled: it && Kt,
|
|
843
|
+
isPlayerHidden: E && !R,
|
|
844
|
+
playbackTimeStore: G,
|
|
845
|
+
subtitleCues: Qt
|
|
842
846
|
}
|
|
843
847
|
),
|
|
844
|
-
|
|
848
|
+
qe ? /* @__PURE__ */ n.jsx(
|
|
845
849
|
"div",
|
|
846
850
|
{
|
|
847
|
-
ref:
|
|
848
|
-
className:
|
|
851
|
+
ref: Xe,
|
|
852
|
+
className: Q(
|
|
849
853
|
"slide-interaction-overlay",
|
|
850
|
-
|
|
854
|
+
R && E ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
851
855
|
),
|
|
852
|
-
onClick:
|
|
853
|
-
onPointerDown:
|
|
854
|
-
style:
|
|
856
|
+
onClick: _t,
|
|
857
|
+
onPointerDown: _t,
|
|
858
|
+
style: Zt,
|
|
855
859
|
children: /* @__PURE__ */ n.jsx(
|
|
856
|
-
|
|
860
|
+
Pt,
|
|
857
861
|
{
|
|
858
862
|
content: String(o?.content ?? ""),
|
|
859
|
-
defaultButtonText:
|
|
860
|
-
defaultInputText:
|
|
861
|
-
defaultSelectedValues:
|
|
863
|
+
defaultButtonText: bt.buttonText ?? "",
|
|
864
|
+
defaultInputText: bt.inputText ?? "",
|
|
865
|
+
defaultSelectedValues: tn,
|
|
862
866
|
confirmButtonText: D?.confirmButtonText,
|
|
863
867
|
copyButtonText: D?.copyButtonText,
|
|
864
868
|
copiedButtonText: D?.copiedButtonText,
|
|
865
|
-
onSend:
|
|
866
|
-
readonly:
|
|
867
|
-
title: D?.title ??
|
|
869
|
+
onSend: nn,
|
|
870
|
+
readonly: xt,
|
|
871
|
+
title: D?.title ?? Ee ?? "Submit the content below to continue."
|
|
868
872
|
}
|
|
869
873
|
)
|
|
870
874
|
}
|
|
871
875
|
) : null,
|
|
872
876
|
E ? /* @__PURE__ */ n.jsx(
|
|
873
|
-
|
|
877
|
+
_n,
|
|
874
878
|
{
|
|
875
879
|
audioList: h,
|
|
876
|
-
className:
|
|
880
|
+
className: Q(
|
|
877
881
|
"absolute left-1/2 z-[2] -translate-x-1/2",
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
!
|
|
882
|
+
dt ? "bottom-3" : "-bottom-3",
|
|
883
|
+
Z,
|
|
884
|
+
!R && "pointer-events-none opacity-0"
|
|
881
885
|
),
|
|
882
|
-
currentAudioIndex:
|
|
886
|
+
currentAudioIndex: g,
|
|
883
887
|
defaultPlaying: !0,
|
|
884
888
|
isPlaybackPaused: L,
|
|
885
|
-
isAutoAdvanceEnabled:
|
|
889
|
+
isAutoAdvanceEnabled: le,
|
|
886
890
|
hasInteraction: !!o,
|
|
887
891
|
isInteractionOpen: ge,
|
|
888
|
-
isSubtitleEnabled:
|
|
889
|
-
onAutoAdvanceToggle:
|
|
890
|
-
onLoadingChange:
|
|
892
|
+
isSubtitleEnabled: it,
|
|
893
|
+
onAutoAdvanceToggle: rt,
|
|
894
|
+
onLoadingChange: un,
|
|
891
895
|
onPlaybackStarted: () => {
|
|
892
|
-
|
|
896
|
+
Fe(!0);
|
|
893
897
|
},
|
|
894
|
-
onPlaybackTimeChange:
|
|
898
|
+
onPlaybackTimeChange: G.setTime,
|
|
895
899
|
onSubtitleToggle: () => {
|
|
896
|
-
|
|
900
|
+
Lt((e) => !e);
|
|
897
901
|
},
|
|
898
902
|
nextDisabled: !x,
|
|
899
|
-
onEnded:
|
|
900
|
-
onFullscreen:
|
|
901
|
-
isFullscreen:
|
|
902
|
-
mobileViewMode:
|
|
903
|
-
settingsPortalContainer:
|
|
904
|
-
onMobileViewModeChange:
|
|
905
|
-
onInteractionToggle:
|
|
906
|
-
onNext:
|
|
907
|
-
onPrev:
|
|
908
|
-
prevDisabled: !
|
|
909
|
-
showControls:
|
|
910
|
-
texts:
|
|
911
|
-
customActionContext:
|
|
912
|
-
customActions:
|
|
903
|
+
onEnded: an,
|
|
904
|
+
onFullscreen: sn,
|
|
905
|
+
isFullscreen: lt,
|
|
906
|
+
mobileViewMode: H,
|
|
907
|
+
settingsPortalContainer: $e.current,
|
|
908
|
+
onMobileViewModeChange: $t,
|
|
909
|
+
onInteractionToggle: dn,
|
|
910
|
+
onNext: cn,
|
|
911
|
+
onPrev: ln,
|
|
912
|
+
prevDisabled: !Bt,
|
|
913
|
+
showControls: R,
|
|
914
|
+
texts: Rt,
|
|
915
|
+
customActionContext: Le,
|
|
916
|
+
customActions: q,
|
|
913
917
|
useAutoAdvanceToggle: ae
|
|
914
918
|
}
|
|
915
919
|
) : null
|
|
@@ -921,6 +925,6 @@ const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
|
921
925
|
);
|
|
922
926
|
};
|
|
923
927
|
export {
|
|
924
|
-
|
|
928
|
+
yr as default
|
|
925
929
|
};
|
|
926
930
|
//# sourceMappingURL=Slide.es.js.map
|