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