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