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