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