markdown-flow-ui 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs8.js +1 -1
- package/dist/_virtual/index.cjs9.js +1 -1
- package/dist/_virtual/index.es8.js +2 -2
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/assets/markdown-flow-ui.css +1 -1
- package/dist/components/ContentRender/CodeBlock.cjs.js.map +1 -1
- package/dist/components/ContentRender/CodeBlock.d.ts +1 -1
- package/dist/components/ContentRender/CodeBlock.es.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.cjs.js.map +1 -1
- package/dist/components/ContentRender/ContentRender.es.js +6 -1
- package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +70 -0
- package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +70 -0
- package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +70 -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 +258 -254
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/diff-utils.cjs.js +4 -4
- package/dist/components/Slide/diff-utils.cjs.js.map +1 -1
- package/dist/components/Slide/diff-utils.es.js +49 -49
- package/dist/components/Slide/diff-utils.es.js.map +1 -1
- package/dist/components/Slide/types.d.ts +1 -0
- package/dist/components/ui/inputGroup/input-group.cjs.js +1 -1
- package/dist/components/ui/inputGroup/input-group.cjs.js.map +1 -1
- package/dist/components/ui/inputGroup/input-group.d.ts +21 -1
- package/dist/components/ui/inputGroup/input-group.es.js +19 -17
- package/dist/components/ui/inputGroup/input-group.es.js.map +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs.js.map +1 -1
- package/dist/components/ui/inputGroup/textarea.d.ts +2 -1
- package/dist/components/ui/inputGroup/textarea.es.js.map +1 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/classnames/index.cjs.js +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -1
- package/package.json +1 -1
- package/dist/components/ContentRender/ContentRender.stories.d.ts +0 -37
- package/dist/components/ContentRender/MarkdownFlowInput.stories.d.ts +0 -33
- package/dist/components/MarkdownFlow/MarkdownFlow.stories.d.ts +0 -31
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.stories.d.ts +0 -64
- package/dist/components/Slide/Slide.stories.d.ts +0 -2590
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { j as s } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { isSandboxInteractionMessage as
|
|
2
|
+
import { memo as xr, useMemo as u, useId as Ar, useRef as f, useCallback as r, useState as d, useEffect as c, useLayoutEffect as wr } from "react";
|
|
3
|
+
import { isSandboxInteractionMessage as Tr } from "../../lib/sandboxInteraction.es.js";
|
|
4
4
|
import { cn as ye } from "../../lib/utils.es.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import Er from "../ui/loading-overlay-card.es.js";
|
|
6
|
+
import Cr from "../ContentRender/ContentRender.es.js";
|
|
7
|
+
import hn from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
9
|
import "../ContentRender/contentRenderI18n.es.js";
|
|
10
|
-
import { isMobileDevice as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { PlayerKeyboardShortcutContext as
|
|
17
|
-
import { activatePlayerKeyboardShortcutOwner as
|
|
18
|
-
import { DEFAULT_MOBILE_VIEW_MODE as tt, resolveMobileViewModeState as
|
|
19
|
-
import { shouldRenderInteractionOverlay as
|
|
20
|
-
import { resolveMarkdownScalingMode as
|
|
10
|
+
import { isMobileDevice as Pr, isLandscapeViewport as gn, subscribeMobileDeviceChange as Rr } from "../../lib/mobileDevice.es.js";
|
|
11
|
+
import _r from "./Player.es.js";
|
|
12
|
+
import Or from "./MarkdownSlideScaling.es.js";
|
|
13
|
+
import Mr from "./SubtitleOverlay.es.js";
|
|
14
|
+
import kr from "./useSlide.es.js";
|
|
15
|
+
import Fr from "./useWakePlayerFromIframe.es.js";
|
|
16
|
+
import { PlayerKeyboardShortcutContext as Br } from "./utils/playerKeyboardShortcutContext.es.js";
|
|
17
|
+
import { activatePlayerKeyboardShortcutOwner as Nr } from "./utils/playerKeyboardShortcuts.es.js";
|
|
18
|
+
import { DEFAULT_MOBILE_VIEW_MODE as tt, resolveMobileViewModeState as Dr } from "./utils/mobileScreenMode.es.js";
|
|
19
|
+
import { shouldRenderInteractionOverlay as Lr, clampInteractionOverlayDragOffset as vn, shouldPresentInteractionOverlay as Vr } from "./utils/interactionPlayback.es.js";
|
|
20
|
+
import { resolveMarkdownScalingMode as jr } from "./utils/markdownScaling.es.js";
|
|
21
21
|
import { shouldWakePlayerControlsAfterNavigation as Et } from "./utils/playerNavigationContext.es.js";
|
|
22
|
-
import { shouldAutoAdvanceIntoAppendedMarker as
|
|
23
|
-
import { getPlaybackSequenceTransition as
|
|
24
|
-
import { hasResolvedInteractionElement as
|
|
25
|
-
import { resolvePlayerCustomActionElement as
|
|
26
|
-
import { createPlaybackTimeStore as
|
|
27
|
-
import { resolveSlideInteractionState as
|
|
28
|
-
import { shouldUseAutoAdvanceToggle as
|
|
29
|
-
import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as
|
|
30
|
-
import { resolveSilentStepAutoAdvanceBehavior as
|
|
31
|
-
import { resolveSlidePlayerVisibility as
|
|
32
|
-
import { getSlideLocaleTexts as
|
|
22
|
+
import { shouldAutoAdvanceIntoAppendedMarker as qr } from "./utils/appendedMarkerAdvance.es.js";
|
|
23
|
+
import { getPlaybackSequenceTransition as Kr, shouldStartDefaultAudioSequence as Ur } from "./utils/playbackSequence.es.js";
|
|
24
|
+
import { hasResolvedInteractionElement as Hr, canReachSubtitleJumpTarget as Sn } from "./utils/subtitleJumpNavigation.es.js";
|
|
25
|
+
import { resolvePlayerCustomActionElement as Yr, getPlayerCustomActionCount as Gr } from "./utils/playerCustomActions.es.js";
|
|
26
|
+
import { createPlaybackTimeStore as $r } from "./utils/playbackTimeStore.es.js";
|
|
27
|
+
import { resolveSlideInteractionState as zr } from "./utils/interactionResolution.es.js";
|
|
28
|
+
import { shouldUseAutoAdvanceToggle as Jr } from "./utils/playerToggleMode.es.js";
|
|
29
|
+
import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as Wr, areImageOnlyStepIframeVisualsReady as Xr } from "./utils/imageOnlyStepVisualReady.es.js";
|
|
30
|
+
import { resolveSilentStepAutoAdvanceBehavior as Qr } from "./utils/silentStepAutoAdvance.es.js";
|
|
31
|
+
import { resolveSlidePlayerVisibility as Zr } from "./utils/playerVisibility.es.js";
|
|
32
|
+
import { getSlideLocaleTexts as eo, DEFAULT_SLIDE_BUFFERING_TEXTS as to } from "./slideI18n.es.js";
|
|
33
33
|
/* empty css */
|
|
34
|
-
import
|
|
34
|
+
import Ct from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
|
|
35
35
|
import no from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
|
|
36
|
-
const ro = 2e3, oo = 300, io = 160, lo = 16,
|
|
36
|
+
const ro = 2e3, oo = 300, io = 160, lo = 16, In = 3e3, bn = {
|
|
37
37
|
x: 0,
|
|
38
38
|
y: 0
|
|
39
|
-
}, so = typeof window > "u" ? c :
|
|
39
|
+
}, so = typeof window > "u" ? c : wr, ao = [
|
|
40
40
|
"button",
|
|
41
41
|
"input",
|
|
42
42
|
"textarea",
|
|
43
43
|
'[contenteditable=""]',
|
|
44
44
|
'[contenteditable="true"]',
|
|
45
45
|
'[contenteditable="plaintext-only"]'
|
|
46
|
-
].join(", "),
|
|
46
|
+
].join(", "), Rt = "waitingForAudio", co = (m, h) => typeof m == "string" ? m : m[h] ?? m[Rt] ?? to[h], uo = (m, h) => typeof m == "string" ? m : {
|
|
47
47
|
...h,
|
|
48
48
|
...m
|
|
49
|
-
}, fo = (m, h) => h ? m !== "loadingAudio" : !1,
|
|
49
|
+
}, fo = (m, h) => h ? m !== "loadingAudio" : !1, xn = xr(
|
|
50
50
|
({
|
|
51
51
|
content: m,
|
|
52
52
|
title: h,
|
|
@@ -74,12 +74,16 @@ const ro = 2e3, oo = 300, io = 160, lo = 16, Sn = 3e3, In = {
|
|
|
74
74
|
onPointerDown: rt,
|
|
75
75
|
onPointerMove: ge,
|
|
76
76
|
onPointerUp: Le,
|
|
77
|
-
children: /* @__PURE__ */ s.
|
|
77
|
+
children: /* @__PURE__ */ s.jsxs("span", { className: "slide-player__interaction-drag-handle-icon", children: [
|
|
78
|
+
/* @__PURE__ */ s.jsx(Ct, { "aria-hidden": "true" }),
|
|
79
|
+
/* @__PURE__ */ s.jsx(Ct, { "aria-hidden": "true" }),
|
|
80
|
+
/* @__PURE__ */ s.jsx(Ct, { "aria-hidden": "true" })
|
|
81
|
+
] })
|
|
78
82
|
}
|
|
79
83
|
),
|
|
80
84
|
/* @__PURE__ */ s.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ s.jsx("p", { className: "slide-player__interaction-title", children: h }) }),
|
|
81
85
|
/* @__PURE__ */ s.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ s.jsx(
|
|
82
|
-
|
|
86
|
+
Cr,
|
|
83
87
|
{
|
|
84
88
|
content: m,
|
|
85
89
|
locale: H,
|
|
@@ -96,11 +100,11 @@ const ro = 2e3, oo = 300, io = 160, lo = 16, Sn = 3e3, In = {
|
|
|
96
100
|
) })
|
|
97
101
|
] })
|
|
98
102
|
);
|
|
99
|
-
|
|
103
|
+
xn.displayName = "InteractionOverlayCard";
|
|
100
104
|
const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
101
105
|
const Y = h[he];
|
|
102
106
|
return H.sequence_number === Y?.sequence_number && H.type === Y?.type && H.content === Y?.content;
|
|
103
|
-
}),
|
|
107
|
+
}), Pt = (m) => m instanceof HTMLElement && !!m.closest(ao), Xo = ({
|
|
104
108
|
elementList: m = [],
|
|
105
109
|
locale: h,
|
|
106
110
|
playerEnabled: H,
|
|
@@ -116,38 +120,38 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
116
120
|
playerAutoHideDelay: ge = 3e3,
|
|
117
121
|
markerAutoAdvanceDelay: Le = ro,
|
|
118
122
|
interactionDefaultValueOptions: Ve,
|
|
119
|
-
onSend:
|
|
123
|
+
onSend: _t,
|
|
120
124
|
onPlayerVisibilityChange: ot,
|
|
121
|
-
onMobileViewModeChange:
|
|
122
|
-
onStepChange:
|
|
125
|
+
onMobileViewModeChange: Ot,
|
|
126
|
+
onStepChange: Mt,
|
|
123
127
|
enableKeyboardShortcuts: ne = !0,
|
|
124
|
-
enableIframeScaling:
|
|
125
|
-
enableMarkdownScaling:
|
|
128
|
+
enableIframeScaling: An = !0,
|
|
129
|
+
enableMarkdownScaling: wn = !0,
|
|
126
130
|
disableLoadingOverlay: _ = !1,
|
|
127
|
-
className:
|
|
128
|
-
onPointerDown:
|
|
129
|
-
onFocusCapture:
|
|
130
|
-
...
|
|
131
|
+
className: Tn,
|
|
132
|
+
onPointerDown: kt,
|
|
133
|
+
onFocusCapture: Ft,
|
|
134
|
+
...En
|
|
131
135
|
}) => {
|
|
132
|
-
const $ = u(() =>
|
|
136
|
+
const $ = u(() => eo(h), [h]), Cn = u(
|
|
133
137
|
() => uo(
|
|
134
138
|
De,
|
|
135
139
|
$.bufferingText
|
|
136
140
|
),
|
|
137
141
|
[De, $.bufferingText]
|
|
138
142
|
), {
|
|
139
|
-
playerEnabled:
|
|
143
|
+
playerEnabled: Pn,
|
|
140
144
|
playerControlsVisibility: j
|
|
141
|
-
} =
|
|
145
|
+
} = Zr({
|
|
142
146
|
playerEnabled: H,
|
|
143
147
|
playerControlsVisibility: he
|
|
144
|
-
}), je =
|
|
148
|
+
}), je = Ar(), ve = f(null), it = f(null), qe = f(null), Bt = f(null), re = f(null), Ke = f(!1), Se = f(null), Ue = f(null), z = f(null), Ie = f(null), be = f(null), xe = f(null), Ae = f(null), Nt = f([]), we = f(!1), J = f(null), Te = f(null), Dt = f(0), Lt = f(null), Vt = f({
|
|
145
149
|
markerCount: 0,
|
|
146
150
|
currentIndex: -1,
|
|
147
151
|
canGoNext: !1
|
|
148
152
|
}), lt = f(!1), {
|
|
149
153
|
currentElementList: P,
|
|
150
|
-
stepElementLists:
|
|
154
|
+
stepElementLists: jt,
|
|
151
155
|
slideElementList: C,
|
|
152
156
|
currentIndex: a,
|
|
153
157
|
audioList: S,
|
|
@@ -155,12 +159,12 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
155
159
|
currentAudioSequenceIndexes: Ye,
|
|
156
160
|
currentStepHasSpeakableElement: I,
|
|
157
161
|
currentInteractionElement: p,
|
|
158
|
-
canGoPrev:
|
|
162
|
+
canGoPrev: Rn,
|
|
159
163
|
canGoNext: R,
|
|
160
|
-
handlePrev:
|
|
164
|
+
handlePrev: qt,
|
|
161
165
|
handleNext: O,
|
|
162
|
-
handleGoTo:
|
|
163
|
-
} =
|
|
166
|
+
handleGoTo: Kt
|
|
167
|
+
} = kr(m), Ee = u(() => {
|
|
164
168
|
if (!(a < 0))
|
|
165
169
|
return C[a];
|
|
166
170
|
}, [a, C]), oe = u(
|
|
@@ -168,61 +172,61 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
168
172
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
169
173
|
),
|
|
170
174
|
[P]
|
|
171
|
-
),
|
|
175
|
+
), _n = C.filter(
|
|
172
176
|
(e) => e.is_renderable !== !1
|
|
173
|
-
).length === 1, g =
|
|
177
|
+
).length === 1, g = Pn && (C.length > 0 || S.length > 0 || !!p), On = u(
|
|
174
178
|
() => ({
|
|
175
179
|
enabled: ne,
|
|
176
180
|
ownerId: je
|
|
177
181
|
}),
|
|
178
182
|
[ne, je]
|
|
179
183
|
), q = r(() => {
|
|
180
|
-
!ne || !g ||
|
|
184
|
+
!ne || !g || Nr(je);
|
|
181
185
|
}, [ne, je, g]), M = u(
|
|
182
186
|
() => Ye.map((e) => S[e]?.audioKey).filter((e) => !!e),
|
|
183
187
|
[S, Ye]
|
|
184
|
-
), [
|
|
185
|
-
|
|
188
|
+
), [Mn, Ce] = d(!0), [Ge, ie] = d(!1), [st, Ut] = d(!0), [Pe, Ht] = d(!0), [A, K] = d(null), [kn, Yt] = d(null), [Fn, b] = d(!1), [Bn, at] = d(Rt), [k, ct] = d(!1), [Nn, $e] = d(!1), [Gt, Dn] = d(!0), [ut, dt] = d(!1), [y, ft] = d(), [le, ze] = d(!1), [$t, Je] = d(!1), [x, mt] = d(
|
|
189
|
+
bn
|
|
186
190
|
), [pt, yt] = d(!1), [
|
|
187
|
-
|
|
191
|
+
Ln,
|
|
188
192
|
Re
|
|
189
|
-
] = d(0), [
|
|
193
|
+
] = d(0), [zt, Vn] = d(!1), L = u(() => Pr(), []), [We, ht] = d(
|
|
190
194
|
tt
|
|
191
|
-
), [
|
|
192
|
-
() => L ?
|
|
193
|
-
), se = u(() =>
|
|
195
|
+
), [Jt, gt] = d(!1), [jn, Wt] = d(
|
|
196
|
+
() => L ? gn() : !1
|
|
197
|
+
), se = u(() => $r(), []), {
|
|
194
198
|
effectiveMobileViewMode: ae,
|
|
195
199
|
isImmersiveMobileFullscreen: ce,
|
|
196
|
-
isNativeMobileFullscreen:
|
|
197
|
-
shouldRotateFullscreenViewport:
|
|
200
|
+
isNativeMobileFullscreen: Xt,
|
|
201
|
+
shouldRotateFullscreenViewport: qn
|
|
198
202
|
} = u(
|
|
199
|
-
() =>
|
|
200
|
-
hasManualMobileViewMode:
|
|
203
|
+
() => Dr({
|
|
204
|
+
hasManualMobileViewMode: Jt,
|
|
201
205
|
isMobileDevice: L,
|
|
202
206
|
mobileViewMode: We
|
|
203
207
|
}),
|
|
204
208
|
[
|
|
205
|
-
|
|
209
|
+
Jt,
|
|
206
210
|
L,
|
|
207
|
-
|
|
211
|
+
jn,
|
|
208
212
|
We
|
|
209
213
|
]
|
|
210
|
-
),
|
|
214
|
+
), Kn = f(ae), w = g && j !== "hidden" && (j === "visible" || Mn), Un = ce && w, Hn = ce && w, Yn = ce || Xt, Qt = zt && !L, Gn = r(
|
|
211
215
|
(e) => {
|
|
212
216
|
gt(!0), ht(e);
|
|
213
217
|
},
|
|
214
218
|
[]
|
|
215
|
-
),
|
|
219
|
+
), Zt = r(() => {
|
|
216
220
|
gt(!1), ht(tt);
|
|
217
|
-
}, []),
|
|
218
|
-
|
|
219
|
-
}, [G,
|
|
221
|
+
}, []), $n = r(() => {
|
|
222
|
+
Zt(), G?.onBack?.();
|
|
223
|
+
}, [G, Zt]), en = r((e) => {
|
|
220
224
|
dt(e);
|
|
221
|
-
}, []),
|
|
225
|
+
}, []), tn = r(() => {
|
|
222
226
|
dt((e) => !e);
|
|
223
|
-
}, []), { mountedStepStates:
|
|
227
|
+
}, []), { mountedStepStates: zn, currentMountedStateIndex: Jn } = u(() => {
|
|
224
228
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
225
|
-
return
|
|
229
|
+
return jt.forEach((o, i) => {
|
|
226
230
|
const l = e.findIndex(
|
|
227
231
|
(n) => mo(
|
|
228
232
|
n.elementList,
|
|
@@ -241,17 +245,17 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
241
245
|
mountedStepStates: e,
|
|
242
246
|
currentMountedStateIndex: a >= 0 ? t.get(a) ?? -1 : -1
|
|
243
247
|
};
|
|
244
|
-
}, [a,
|
|
248
|
+
}, [a, jt]), nn = u(() => String(a), [a]), T = u(() => A ? S.findIndex(
|
|
245
249
|
(e) => (e.audioKey ?? "") === A
|
|
246
250
|
) : -1, [S, A]), vt = u(
|
|
247
251
|
() => T >= 0 ? S[T] : void 0,
|
|
248
252
|
[S, T]
|
|
249
|
-
),
|
|
253
|
+
), Wn = vt?.element?.subtitle_cues ?? [], Xe = u(
|
|
250
254
|
() => M[0] ?? "none",
|
|
251
255
|
[M]
|
|
252
256
|
), St = u(
|
|
253
257
|
() => ({
|
|
254
|
-
currentElement:
|
|
258
|
+
currentElement: Yr({
|
|
255
259
|
currentAudioIndex: T,
|
|
256
260
|
currentAudioSequenceIndexes: Ye,
|
|
257
261
|
audioList: S,
|
|
@@ -261,8 +265,8 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
261
265
|
currentIndex: a,
|
|
262
266
|
currentStepElement: Ee,
|
|
263
267
|
isActive: ut,
|
|
264
|
-
setActive:
|
|
265
|
-
toggleActive:
|
|
268
|
+
setActive: en,
|
|
269
|
+
toggleActive: tn
|
|
266
270
|
}),
|
|
267
271
|
[
|
|
268
272
|
y,
|
|
@@ -272,16 +276,16 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
272
276
|
a,
|
|
273
277
|
Ee,
|
|
274
278
|
ut,
|
|
275
|
-
|
|
276
|
-
|
|
279
|
+
en,
|
|
280
|
+
tn
|
|
277
281
|
]
|
|
278
282
|
), It = u(
|
|
279
|
-
() =>
|
|
283
|
+
() => Gr(
|
|
280
284
|
Z,
|
|
281
285
|
St
|
|
282
286
|
),
|
|
283
287
|
[St, Z]
|
|
284
|
-
),
|
|
288
|
+
), Xn = u(
|
|
285
289
|
() => ({
|
|
286
290
|
"--slide-player-custom-action-count": String(It),
|
|
287
291
|
"--slide-player-mobile-control-count": String(
|
|
@@ -295,22 +299,22 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
295
299
|
x.y,
|
|
296
300
|
It
|
|
297
301
|
]
|
|
298
|
-
),
|
|
302
|
+
), rn = M.length > 0, on = u(() => p ? `${p.sequence_number ?? "none"}:${String(
|
|
299
303
|
p.content ?? ""
|
|
300
304
|
)}` : "none", [p]), _e = u(
|
|
301
|
-
() => [
|
|
302
|
-
[
|
|
303
|
-
),
|
|
305
|
+
() => [nn, on].join("|"),
|
|
306
|
+
[on, nn]
|
|
307
|
+
), Qn = u(
|
|
304
308
|
() => [
|
|
305
309
|
_e,
|
|
306
310
|
vt?.audioKey ?? "none",
|
|
307
311
|
String(T)
|
|
308
312
|
].join("|"),
|
|
309
313
|
[T, vt?.audioKey, _e]
|
|
310
|
-
),
|
|
314
|
+
), ln = !!u(() => !Xe || Xe === "none" ? "" : S.find(
|
|
311
315
|
(t) => t.audioKey === Xe
|
|
312
316
|
)?.audioUrl?.trim() ?? "", [S, Xe]), W = ee && !!Z && ut, Oe = u(
|
|
313
|
-
() =>
|
|
317
|
+
() => Jr({
|
|
314
318
|
canGoNext: R,
|
|
315
319
|
currentAudioIndex: T,
|
|
316
320
|
currentStepHasSpeakableElement: I,
|
|
@@ -322,8 +326,8 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
322
326
|
p,
|
|
323
327
|
I
|
|
324
328
|
]
|
|
325
|
-
),
|
|
326
|
-
() =>
|
|
329
|
+
), sn = u(
|
|
330
|
+
() => Qr({
|
|
327
331
|
currentElementList: P,
|
|
328
332
|
currentStepHasSpeakableElement: I,
|
|
329
333
|
currentInteractionElement: p,
|
|
@@ -335,10 +339,10 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
335
339
|
I,
|
|
336
340
|
Le
|
|
337
341
|
]
|
|
338
|
-
),
|
|
342
|
+
), an = sn.delayMs, Me = sn.usesImageOnlyDelay, bt = u(
|
|
339
343
|
() => `${a}:${oe.join("|")}`,
|
|
340
344
|
[a, oe]
|
|
341
|
-
), [
|
|
345
|
+
), [Zn, er] = d(null), cn = !Me || Zn === bt, V = r(() => {
|
|
342
346
|
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
343
347
|
}, []), F = r(() => {
|
|
344
348
|
z.current !== null && (window.clearTimeout(z.current), z.current = null);
|
|
@@ -350,7 +354,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
350
354
|
Ue.current !== null && (window.clearTimeout(Ue.current), Ue.current = null);
|
|
351
355
|
}, []), N = r(
|
|
352
356
|
(e = {}) => {
|
|
353
|
-
ue(), F(), B(), U(), K(null), se.reset(), b(!1), at(
|
|
357
|
+
ue(), F(), B(), U(), K(null), se.reset(), b(!1), at(Rt), ct(!1), $e(!1), Yt(null), e.preservePendingSubtitleJump || (Te.current = null), ft(void 0), ze(!1), Re(0);
|
|
354
358
|
},
|
|
355
359
|
[
|
|
356
360
|
ue,
|
|
@@ -361,9 +365,9 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
361
365
|
]
|
|
362
366
|
), Qe = r(
|
|
363
367
|
(e) => {
|
|
364
|
-
|
|
368
|
+
Dt.current += 1, Yt({
|
|
365
369
|
...e,
|
|
366
|
-
id:
|
|
370
|
+
id: Dt.current
|
|
367
371
|
});
|
|
368
372
|
},
|
|
369
373
|
[]
|
|
@@ -378,7 +382,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
378
382
|
B,
|
|
379
383
|
O,
|
|
380
384
|
de
|
|
381
|
-
]),
|
|
385
|
+
]), un = r(
|
|
382
386
|
(e) => {
|
|
383
387
|
if (B(), !e)
|
|
384
388
|
return;
|
|
@@ -414,16 +418,16 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
414
418
|
j,
|
|
415
419
|
g
|
|
416
420
|
]
|
|
417
|
-
), Fe = !!
|
|
418
|
-
|
|
421
|
+
), Fe = !!Hr(p), fe = !!p && !Fe, tr = r((e) => {
|
|
422
|
+
Ut(e);
|
|
419
423
|
}, []), me = r(
|
|
420
424
|
(e) => {
|
|
421
|
-
e &&
|
|
425
|
+
e && Ut(e.shouldContinuePlayback);
|
|
422
426
|
},
|
|
423
427
|
[]
|
|
424
428
|
);
|
|
425
429
|
c(() => {
|
|
426
|
-
|
|
430
|
+
Ht(st);
|
|
427
431
|
}, [a, st, ee]), c(() => {
|
|
428
432
|
ee && dt(!1);
|
|
429
433
|
}, [a, ee]), c(() => () => {
|
|
@@ -443,7 +447,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
443
447
|
const i = () => {
|
|
444
448
|
o?.(), o = null;
|
|
445
449
|
}, l = () => {
|
|
446
|
-
e || (i(), U(),
|
|
450
|
+
e || (i(), U(), er(bt));
|
|
447
451
|
}, n = () => {
|
|
448
452
|
if (e)
|
|
449
453
|
return;
|
|
@@ -456,7 +460,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
456
460
|
const D = Array.from(
|
|
457
461
|
E.querySelectorAll("iframe")
|
|
458
462
|
);
|
|
459
|
-
if (D.length === 0 ||
|
|
463
|
+
if (D.length === 0 || Xr(D)) {
|
|
460
464
|
l();
|
|
461
465
|
return;
|
|
462
466
|
}
|
|
@@ -486,7 +490,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
486
490
|
t = null, n();
|
|
487
491
|
}), Ue.current = window.setTimeout(() => {
|
|
488
492
|
l();
|
|
489
|
-
},
|
|
493
|
+
}, Wr), () => {
|
|
490
494
|
e = !0, i(), U(), t !== null && window.cancelAnimationFrame(t);
|
|
491
495
|
};
|
|
492
496
|
}, [
|
|
@@ -503,21 +507,21 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
503
507
|
L || We === tt || (gt(!1), ht(tt));
|
|
504
508
|
}, [L, We]), c(() => {
|
|
505
509
|
if (!L) {
|
|
506
|
-
|
|
510
|
+
Wt(!1);
|
|
507
511
|
return;
|
|
508
512
|
}
|
|
509
513
|
const e = () => {
|
|
510
|
-
|
|
514
|
+
Wt(gn());
|
|
511
515
|
};
|
|
512
|
-
return e(),
|
|
516
|
+
return e(), Rr(e);
|
|
513
517
|
}, [L]), c(() => {
|
|
514
|
-
|
|
515
|
-
}, [ae,
|
|
516
|
-
|
|
518
|
+
Ot?.(ae);
|
|
519
|
+
}, [ae, Ot]), c(() => {
|
|
520
|
+
Kn.current = ae;
|
|
517
521
|
}, [ae]), c(() => {
|
|
518
|
-
|
|
519
|
-
}, [a, Ee,
|
|
520
|
-
const e =
|
|
522
|
+
Mt?.(Ee, a);
|
|
523
|
+
}, [a, Ee, Mt]), c(() => {
|
|
524
|
+
const e = Vt.current, t = qr(
|
|
521
525
|
{
|
|
522
526
|
previousMarkerCount: e.markerCount,
|
|
523
527
|
nextMarkerCount: C.length,
|
|
@@ -533,7 +537,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
533
537
|
shouldUseSilentStepAutoAdvanceToggle: Oe
|
|
534
538
|
}
|
|
535
539
|
);
|
|
536
|
-
|
|
540
|
+
Vt.current = {
|
|
537
541
|
markerCount: C.length,
|
|
538
542
|
currentIndex: a,
|
|
539
543
|
canGoNext: R
|
|
@@ -570,12 +574,12 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
570
574
|
if (typeof window > "u")
|
|
571
575
|
return;
|
|
572
576
|
const e = (t) => {
|
|
573
|
-
t.origin === window.location.origin &&
|
|
577
|
+
t.origin === window.location.origin && Tr(t.data) && t.data.eventType === "click" && g && (q(), ie(!0), v(!0));
|
|
574
578
|
};
|
|
575
579
|
return window.addEventListener("message", e), () => {
|
|
576
580
|
window.removeEventListener("message", e);
|
|
577
581
|
};
|
|
578
|
-
}, [q, g, v]),
|
|
582
|
+
}, [q, g, v]), Fr({
|
|
579
583
|
sectionRef: ve,
|
|
580
584
|
enabled: g,
|
|
581
585
|
keyboardShortcutsEnabled: ne,
|
|
@@ -588,14 +592,14 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
588
592
|
N();
|
|
589
593
|
return;
|
|
590
594
|
}
|
|
591
|
-
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } =
|
|
592
|
-
previousResetKey:
|
|
595
|
+
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Kr({
|
|
596
|
+
previousResetKey: Lt.current,
|
|
593
597
|
nextResetKey: _e,
|
|
594
598
|
currentAudioKey: A,
|
|
595
599
|
hasCompletedCurrentStepAudio: k
|
|
596
600
|
});
|
|
597
|
-
|
|
598
|
-
const o = J.current === a && !!p, i =
|
|
601
|
+
Lt.current = _e;
|
|
602
|
+
const o = J.current === a && !!p, i = Vr({
|
|
599
603
|
hasInteraction: !!p,
|
|
600
604
|
shouldBlockPlaybackForInteraction: fe,
|
|
601
605
|
shouldOpenInteractionOverlayAfterAudio: o,
|
|
@@ -606,7 +610,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
606
610
|
if (e && N({
|
|
607
611
|
preservePendingSubtitleJump: n
|
|
608
612
|
}), !(P.length === 0 && !p) && !W) {
|
|
609
|
-
if (l?.slideIndex === a &&
|
|
613
|
+
if (l?.slideIndex === a && Sn({
|
|
610
614
|
currentIndex: a,
|
|
611
615
|
resolvedCurrentInteractionElement: y,
|
|
612
616
|
slideElementList: C,
|
|
@@ -619,7 +623,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
619
623
|
return;
|
|
620
624
|
}
|
|
621
625
|
if (p && ft(p), i) {
|
|
622
|
-
|
|
626
|
+
un(p);
|
|
623
627
|
return;
|
|
624
628
|
}
|
|
625
629
|
if (B(), J.current = null, !!t && !de()) {
|
|
@@ -631,10 +635,10 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
631
635
|
b(!0);
|
|
632
636
|
return;
|
|
633
637
|
}
|
|
634
|
-
if (R && !(Oe && !Pe) && !(Me && !
|
|
638
|
+
if (R && !(Oe && !Pe) && !(Me && !cn))
|
|
635
639
|
return Se.current = window.setTimeout(() => {
|
|
636
640
|
Se.current = null, O();
|
|
637
|
-
},
|
|
641
|
+
}, an), () => {
|
|
638
642
|
ue();
|
|
639
643
|
};
|
|
640
644
|
}
|
|
@@ -650,8 +654,8 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
650
654
|
_e,
|
|
651
655
|
I,
|
|
652
656
|
Me,
|
|
657
|
+
cn,
|
|
653
658
|
an,
|
|
654
|
-
sn,
|
|
655
659
|
O,
|
|
656
660
|
k,
|
|
657
661
|
_,
|
|
@@ -661,7 +665,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
661
665
|
B,
|
|
662
666
|
N,
|
|
663
667
|
Qe,
|
|
664
|
-
|
|
668
|
+
un,
|
|
665
669
|
g,
|
|
666
670
|
C,
|
|
667
671
|
de,
|
|
@@ -676,13 +680,13 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
676
680
|
b(!1);
|
|
677
681
|
return;
|
|
678
682
|
}
|
|
679
|
-
if (
|
|
683
|
+
if (rn) {
|
|
680
684
|
b(!1);
|
|
681
685
|
return;
|
|
682
686
|
}
|
|
683
687
|
at("waitingForAudio"), b(!0);
|
|
684
688
|
}, [
|
|
685
|
-
|
|
689
|
+
rn,
|
|
686
690
|
I,
|
|
687
691
|
k,
|
|
688
692
|
_,
|
|
@@ -690,7 +694,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
690
694
|
fe
|
|
691
695
|
]), c(() => {
|
|
692
696
|
const e = lt.current;
|
|
693
|
-
lt.current = !1,
|
|
697
|
+
lt.current = !1, Ur({
|
|
694
698
|
currentAudioKey: A,
|
|
695
699
|
currentAudioSequenceLength: M.length,
|
|
696
700
|
currentStepHasSpeakableElement: I,
|
|
@@ -713,22 +717,22 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
713
717
|
T >= 0 || se.reset();
|
|
714
718
|
}, [T, se]), c(() => {
|
|
715
719
|
$e(!1);
|
|
716
|
-
}, [
|
|
720
|
+
}, [Qn]);
|
|
717
721
|
const {
|
|
718
|
-
interactionDefaults:
|
|
719
|
-
interactionDefaultSelectedValues:
|
|
720
|
-
hasResolvedInteractionInput:
|
|
721
|
-
isInteractionReadonly:
|
|
722
|
-
shouldAutoContinueInteraction:
|
|
722
|
+
interactionDefaults: dn,
|
|
723
|
+
interactionDefaultSelectedValues: nr,
|
|
724
|
+
hasResolvedInteractionInput: fn,
|
|
725
|
+
isInteractionReadonly: rr,
|
|
726
|
+
shouldAutoContinueInteraction: mn
|
|
723
727
|
} = u(
|
|
724
|
-
() =>
|
|
728
|
+
() => zr(y, {
|
|
725
729
|
interactionDefaultValueOptions: Ve
|
|
726
730
|
}),
|
|
727
731
|
[y, Ve]
|
|
728
|
-
),
|
|
732
|
+
), or = !!y?.readonly || rr, Be = Lr({
|
|
729
733
|
hasActiveInteraction: !!y,
|
|
730
734
|
isInteractionOverlayOpen: le
|
|
731
|
-
}),
|
|
735
|
+
}), ir = r(
|
|
732
736
|
(e) => {
|
|
733
737
|
const o = [
|
|
734
738
|
...e.selectedValues ?? [],
|
|
@@ -738,13 +742,13 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
738
742
|
ft((i) => !i || !o ? i : {
|
|
739
743
|
...i,
|
|
740
744
|
user_input: o
|
|
741
|
-
}),
|
|
745
|
+
}), _t?.(e, y), ke();
|
|
742
746
|
},
|
|
743
|
-
[y, ke,
|
|
747
|
+
[y, ke, _t]
|
|
744
748
|
);
|
|
745
749
|
c(() => {
|
|
746
750
|
const e = () => {
|
|
747
|
-
|
|
751
|
+
Vn(document.fullscreenElement === ve.current);
|
|
748
752
|
};
|
|
749
753
|
return e(), document.addEventListener("fullscreenchange", e), () => {
|
|
750
754
|
document.removeEventListener("fullscreenchange", e);
|
|
@@ -752,7 +756,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
752
756
|
}, []), c(() => {
|
|
753
757
|
y && le || Je(!1);
|
|
754
758
|
}, [y, le]), c(() => {
|
|
755
|
-
mt(
|
|
759
|
+
mt(bn), yt(!1), Ae.current = null, xe.current = null;
|
|
756
760
|
}, [y]), c(() => {
|
|
757
761
|
if (!Be) {
|
|
758
762
|
Re(0);
|
|
@@ -779,29 +783,29 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
779
783
|
};
|
|
780
784
|
}, [Be]), c(() => {
|
|
781
785
|
if (F(), !!le) {
|
|
782
|
-
if (
|
|
786
|
+
if (mn)
|
|
783
787
|
return z.current = window.setTimeout(() => {
|
|
784
788
|
z.current = null, ke();
|
|
785
|
-
},
|
|
789
|
+
}, In), () => {
|
|
786
790
|
F();
|
|
787
791
|
};
|
|
788
|
-
if (!(
|
|
792
|
+
if (!($t || !fn))
|
|
789
793
|
return z.current = window.setTimeout(() => {
|
|
790
794
|
z.current = null, ke();
|
|
791
|
-
},
|
|
795
|
+
}, In), () => {
|
|
792
796
|
F();
|
|
793
797
|
};
|
|
794
798
|
}
|
|
795
799
|
}, [
|
|
796
800
|
F,
|
|
797
801
|
ke,
|
|
798
|
-
|
|
799
|
-
|
|
802
|
+
$t,
|
|
803
|
+
fn,
|
|
800
804
|
le,
|
|
801
|
-
|
|
805
|
+
mn
|
|
802
806
|
]);
|
|
803
|
-
const
|
|
804
|
-
|
|
807
|
+
const lr = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ s.jsx(
|
|
808
|
+
hn,
|
|
805
809
|
{
|
|
806
810
|
className: "content-render-iframe",
|
|
807
811
|
disableLoadingOverlay: _,
|
|
@@ -811,10 +815,10 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
811
815
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
812
816
|
type: "sandbox",
|
|
813
817
|
content: e.content,
|
|
814
|
-
enableScaling:
|
|
818
|
+
enableScaling: An
|
|
815
819
|
}
|
|
816
820
|
) : /* @__PURE__ */ s.jsx(
|
|
817
|
-
|
|
821
|
+
hn,
|
|
818
822
|
{
|
|
819
823
|
className: "content-render-iframe",
|
|
820
824
|
disableLoadingOverlay: _,
|
|
@@ -824,17 +828,17 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
824
828
|
type: "markdown",
|
|
825
829
|
content: e.content
|
|
826
830
|
}
|
|
827
|
-
) : null,
|
|
831
|
+
) : null, sr = (e = [], t = !1) => {
|
|
828
832
|
if (e.length === 0)
|
|
829
833
|
return null;
|
|
830
834
|
const o = e.filter(
|
|
831
835
|
(n) => n.is_renderable !== !1
|
|
832
|
-
).length, i = t &&
|
|
836
|
+
).length, i = t && wn ? jr(e) : "disabled", l = e.reduce(
|
|
833
837
|
(n, E, D) => E.is_renderable !== !1 ? D : n,
|
|
834
838
|
-1
|
|
835
839
|
);
|
|
836
840
|
return /* @__PURE__ */ s.jsx(
|
|
837
|
-
|
|
841
|
+
Or,
|
|
838
842
|
{
|
|
839
843
|
className: "slide-stage__content flex w-full flex-col gap-4",
|
|
840
844
|
mode: i,
|
|
@@ -843,14 +847,14 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
843
847
|
return /* @__PURE__ */ s.jsx(
|
|
844
848
|
"div",
|
|
845
849
|
{
|
|
846
|
-
ref: t && E === l ?
|
|
850
|
+
ref: t && E === l ? Bt : null,
|
|
847
851
|
"aria-hidden": D || void 0,
|
|
848
852
|
className: ye(
|
|
849
853
|
"w-full shrink-0",
|
|
850
854
|
o === 1 && n.is_renderable !== !1 && "slide-element--single",
|
|
851
855
|
D ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : n.is_renderable === !1 && "hidden"
|
|
852
856
|
),
|
|
853
|
-
children:
|
|
857
|
+
children: lr(n, {
|
|
854
858
|
replaceRootScreenHeightWithFull: o === 1 && n.type === "html" && n.is_renderable !== !1
|
|
855
859
|
})
|
|
856
860
|
},
|
|
@@ -859,7 +863,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
859
863
|
})
|
|
860
864
|
}
|
|
861
865
|
);
|
|
862
|
-
},
|
|
866
|
+
}, ar = r(() => {
|
|
863
867
|
const e = ve.current;
|
|
864
868
|
if (e) {
|
|
865
869
|
if (document.fullscreenElement === e) {
|
|
@@ -870,14 +874,14 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
870
874
|
e.requestFullscreen?.().catch(() => {
|
|
871
875
|
});
|
|
872
876
|
}
|
|
873
|
-
}, []),
|
|
877
|
+
}, []), pn = r(() => {
|
|
874
878
|
const e = qe.current;
|
|
875
879
|
e && e.scrollTo({
|
|
876
880
|
top: e.scrollHeight,
|
|
877
881
|
behavior: "smooth"
|
|
878
882
|
});
|
|
879
883
|
}, []), At = r(
|
|
880
|
-
(e) =>
|
|
884
|
+
(e) => Sn({
|
|
881
885
|
currentIndex: a,
|
|
882
886
|
resolvedCurrentInteractionElement: y,
|
|
883
887
|
slideElementList: C,
|
|
@@ -889,7 +893,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
889
893
|
a,
|
|
890
894
|
C
|
|
891
895
|
]
|
|
892
|
-
),
|
|
896
|
+
), cr = r(
|
|
893
897
|
(e, t) => {
|
|
894
898
|
const i = S[e.audioIndex]?.audioKey, l = He[e.audioIndex];
|
|
895
899
|
return !i || l == null || !At(e) ? !1 : (me(t), J.current = null, b(!1), ct(!1), $e(!1), Et(t) && (ie(!0), v(!0)), l === a ? (Te.current = null, N(), K(i), Qe(e), !0) : (we.current = !0, N(), Te.current = {
|
|
@@ -897,30 +901,30 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
897
901
|
audioKey: i,
|
|
898
902
|
slideIndex: l,
|
|
899
903
|
timeMs: e.timeMs
|
|
900
|
-
},
|
|
904
|
+
}, Kt(l), !0));
|
|
901
905
|
},
|
|
902
906
|
[
|
|
903
907
|
S,
|
|
904
908
|
He,
|
|
905
909
|
At,
|
|
906
910
|
a,
|
|
907
|
-
|
|
911
|
+
Kt,
|
|
908
912
|
Qe,
|
|
909
913
|
N,
|
|
910
914
|
v,
|
|
911
915
|
me
|
|
912
916
|
]
|
|
913
|
-
),
|
|
917
|
+
), ur = r(
|
|
914
918
|
(e) => {
|
|
915
|
-
me(e), we.current = !0, J.current = null, b(!1), Et(e) && (ie(!0), v(!0)), N(),
|
|
919
|
+
me(e), we.current = !0, J.current = null, b(!1), Et(e) && (ie(!0), v(!0)), N(), qt();
|
|
916
920
|
},
|
|
917
921
|
[
|
|
918
|
-
|
|
922
|
+
qt,
|
|
919
923
|
N,
|
|
920
924
|
v,
|
|
921
925
|
me
|
|
922
926
|
]
|
|
923
|
-
),
|
|
927
|
+
), dr = r(
|
|
924
928
|
(e) => {
|
|
925
929
|
me(e), we.current = !0, J.current = null, b(!1), Et(e) && (ie(!0), v(!0)), N(), O();
|
|
926
930
|
},
|
|
@@ -930,7 +934,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
930
934
|
v,
|
|
931
935
|
me
|
|
932
936
|
]
|
|
933
|
-
),
|
|
937
|
+
), fr = r(
|
|
934
938
|
({
|
|
935
939
|
loading: e,
|
|
936
940
|
reason: t
|
|
@@ -954,7 +958,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
954
958
|
c(() => {
|
|
955
959
|
_ && b(!1);
|
|
956
960
|
}, [_]);
|
|
957
|
-
const
|
|
961
|
+
const mr = r(
|
|
958
962
|
(e) => {
|
|
959
963
|
const t = S[e]?.audioKey;
|
|
960
964
|
if (!t || !A || t !== A)
|
|
@@ -973,7 +977,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
973
977
|
}
|
|
974
978
|
if (K(null), ct(!0), b(!1), R) {
|
|
975
979
|
const n = a + 1, E = C[n];
|
|
976
|
-
|
|
980
|
+
ln && E?.type === "interaction" && (J.current = n), O();
|
|
977
981
|
return;
|
|
978
982
|
}
|
|
979
983
|
},
|
|
@@ -984,14 +988,14 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
984
988
|
A,
|
|
985
989
|
M,
|
|
986
990
|
O,
|
|
987
|
-
|
|
991
|
+
ln,
|
|
988
992
|
C
|
|
989
993
|
]
|
|
990
|
-
),
|
|
994
|
+
), pr = r(() => {
|
|
991
995
|
y && ze((e) => !e);
|
|
992
|
-
}, [y]),
|
|
996
|
+
}, [y]), yr = r(() => {
|
|
993
997
|
Ke.current = !0, V(), g && Ce(!0);
|
|
994
|
-
}, [V, g]),
|
|
998
|
+
}, [V, g]), hr = r(() => {
|
|
995
999
|
Ke.current = !1, v(!0);
|
|
996
1000
|
}, [v]), wt = r(
|
|
997
1001
|
(e) => {
|
|
@@ -1030,7 +1034,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1030
1034
|
}, l = Ze(
|
|
1031
1035
|
e,
|
|
1032
1036
|
x
|
|
1033
|
-
), n = l ?
|
|
1037
|
+
), n = l ? vn(i, l) : i;
|
|
1034
1038
|
xe.current = {
|
|
1035
1039
|
left: o.left + n.x - x.x,
|
|
1036
1040
|
top: o.top + n.y - x.y
|
|
@@ -1043,7 +1047,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1043
1047
|
g,
|
|
1044
1048
|
Be
|
|
1045
1049
|
]);
|
|
1046
|
-
const
|
|
1050
|
+
const gr = r(
|
|
1047
1051
|
(e) => {
|
|
1048
1052
|
if (wt(e), e.button !== 0 || !e.currentTarget.isConnected || !be.current)
|
|
1049
1053
|
return;
|
|
@@ -1064,11 +1068,11 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1064
1068
|
x,
|
|
1065
1069
|
wt
|
|
1066
1070
|
]
|
|
1067
|
-
),
|
|
1071
|
+
), vr = r(
|
|
1068
1072
|
(e) => {
|
|
1069
1073
|
const t = Ae.current;
|
|
1070
1074
|
!t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), mt(
|
|
1071
|
-
|
|
1075
|
+
vn(
|
|
1072
1076
|
{
|
|
1073
1077
|
x: t.startOffset.x + e.clientX - t.startClientX,
|
|
1074
1078
|
y: t.startOffset.y + e.clientY - t.startClientY
|
|
@@ -1078,33 +1082,33 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1078
1082
|
));
|
|
1079
1083
|
},
|
|
1080
1084
|
[]
|
|
1081
|
-
),
|
|
1085
|
+
), yn = r(
|
|
1082
1086
|
(e) => {
|
|
1083
1087
|
const t = Ae.current;
|
|
1084
1088
|
!t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), Ae.current = null, yt(!1));
|
|
1085
1089
|
},
|
|
1086
1090
|
[]
|
|
1087
|
-
), vr = r(
|
|
1088
|
-
(e) => {
|
|
1089
|
-
q(), Mt?.(e);
|
|
1090
|
-
},
|
|
1091
|
-
[q, Mt]
|
|
1092
1091
|
), Sr = r(
|
|
1093
1092
|
(e) => {
|
|
1094
1093
|
q(), kt?.(e);
|
|
1095
1094
|
},
|
|
1096
1095
|
[q, kt]
|
|
1097
|
-
), Ir = r(
|
|
1096
|
+
), Ir = r(
|
|
1097
|
+
(e) => {
|
|
1098
|
+
q(), Ft?.(e);
|
|
1099
|
+
},
|
|
1100
|
+
[q, Ft]
|
|
1101
|
+
), br = r(() => {
|
|
1098
1102
|
ie(!0), v(!0);
|
|
1099
1103
|
}, [v]);
|
|
1100
1104
|
return c(() => {
|
|
1101
|
-
const e =
|
|
1105
|
+
const e = Nt.current, i = (e.length > 0 && e.length < oe.length && e.every((n, E) => n === oe[E]) ? P.slice(e.length) : []).some(
|
|
1102
1106
|
(n) => n.is_new === !1
|
|
1103
1107
|
);
|
|
1104
|
-
if (
|
|
1108
|
+
if (Nt.current = oe, !i)
|
|
1105
1109
|
return;
|
|
1106
1110
|
const l = window.requestAnimationFrame(() => {
|
|
1107
|
-
const n = qe.current, E =
|
|
1111
|
+
const n = qe.current, E = Bt.current;
|
|
1108
1112
|
if (!n || !E)
|
|
1109
1113
|
return;
|
|
1110
1114
|
const D = n.getBoundingClientRect(), et = E.getBoundingClientRect(), Ne = n.scrollTop + (et.top - D.top);
|
|
@@ -1120,29 +1124,29 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1120
1124
|
if (!we.current || (we.current = !1, P.length === 0))
|
|
1121
1125
|
return;
|
|
1122
1126
|
const e = window.requestAnimationFrame(() => {
|
|
1123
|
-
|
|
1127
|
+
pn();
|
|
1124
1128
|
});
|
|
1125
1129
|
return () => {
|
|
1126
1130
|
window.cancelAnimationFrame(e);
|
|
1127
1131
|
};
|
|
1128
|
-
}, [P,
|
|
1132
|
+
}, [P, pn]), /* @__PURE__ */ s.jsxs(
|
|
1129
1133
|
"section",
|
|
1130
1134
|
{
|
|
1131
1135
|
ref: ve,
|
|
1132
1136
|
className: ye(
|
|
1133
1137
|
"relative h-full w-full",
|
|
1134
1138
|
L && "slide--mobile-device",
|
|
1135
|
-
|
|
1139
|
+
Qt && "slide--browser-fullscreen",
|
|
1136
1140
|
ce && "slide--mobile-landscape",
|
|
1137
|
-
|
|
1138
|
-
|
|
1141
|
+
Xt && "slide--mobile-landscape-native",
|
|
1142
|
+
Tn
|
|
1139
1143
|
),
|
|
1140
|
-
onClick:
|
|
1141
|
-
onFocusCapture:
|
|
1142
|
-
onPointerDown:
|
|
1143
|
-
...
|
|
1144
|
+
onClick: br,
|
|
1145
|
+
onFocusCapture: Ir,
|
|
1146
|
+
onPointerDown: Sr,
|
|
1147
|
+
...En,
|
|
1144
1148
|
children: [
|
|
1145
|
-
|
|
1149
|
+
Yn ? /* @__PURE__ */ s.jsx(
|
|
1146
1150
|
"div",
|
|
1147
1151
|
{
|
|
1148
1152
|
"aria-hidden": "true",
|
|
@@ -1156,16 +1160,16 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1156
1160
|
className: ye(
|
|
1157
1161
|
"slide__viewport relative h-full min-h-0 w-full",
|
|
1158
1162
|
ce && "slide__viewport--mobile-landscape",
|
|
1159
|
-
ce && !
|
|
1163
|
+
ce && !qn && "slide__viewport--mobile-landscape-native"
|
|
1160
1164
|
),
|
|
1161
1165
|
children: [
|
|
1162
|
-
|
|
1166
|
+
Un ? /* @__PURE__ */ s.jsxs("div", { className: "slide-landscape-header", children: [
|
|
1163
1167
|
/* @__PURE__ */ s.jsx(
|
|
1164
1168
|
"button",
|
|
1165
1169
|
{
|
|
1166
1170
|
"aria-label": G?.backAriaLabel ?? $.fullscreenBackAriaLabel,
|
|
1167
1171
|
className: "slide-landscape-header__back",
|
|
1168
|
-
onClick:
|
|
1172
|
+
onClick: $n,
|
|
1169
1173
|
type: "button",
|
|
1170
1174
|
children: /* @__PURE__ */ s.jsx(
|
|
1171
1175
|
no,
|
|
@@ -1183,12 +1187,12 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1183
1187
|
{
|
|
1184
1188
|
className: ye(
|
|
1185
1189
|
"h-full min-h-0 w-full",
|
|
1186
|
-
|
|
1187
|
-
|
|
1190
|
+
Hn && "slide__viewport-content--with-header",
|
|
1191
|
+
_n ? "slide-content--single" : "grid gap-4"
|
|
1188
1192
|
),
|
|
1189
|
-
children: P.length > 0 ? /* @__PURE__ */ s.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ s.jsx("div", { ref: qe, className: "slide-stage__layer w-full", children:
|
|
1193
|
+
children: P.length > 0 ? /* @__PURE__ */ s.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ s.jsx("div", { ref: qe, className: "slide-stage__layer w-full", children: zn.map(
|
|
1190
1194
|
(e, t) => {
|
|
1191
|
-
const o = t ===
|
|
1195
|
+
const o = t === Jn;
|
|
1192
1196
|
return /* @__PURE__ */ s.jsx(
|
|
1193
1197
|
"div",
|
|
1194
1198
|
{
|
|
@@ -1196,7 +1200,7 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1196
1200
|
"aria-hidden": !o || void 0,
|
|
1197
1201
|
className: "w-full h-full",
|
|
1198
1202
|
style: { display: o ? void 0 : "none" },
|
|
1199
|
-
children:
|
|
1203
|
+
children: sr(
|
|
1200
1204
|
e.elementList,
|
|
1201
1205
|
o
|
|
1202
1206
|
)
|
|
@@ -1207,25 +1211,25 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1207
1211
|
) }) }) : null
|
|
1208
1212
|
}
|
|
1209
1213
|
),
|
|
1210
|
-
|
|
1211
|
-
|
|
1214
|
+
Fn ? /* @__PURE__ */ s.jsx(
|
|
1215
|
+
Er,
|
|
1212
1216
|
{
|
|
1213
1217
|
message: co(
|
|
1214
|
-
|
|
1215
|
-
|
|
1218
|
+
Cn,
|
|
1219
|
+
Bn
|
|
1216
1220
|
),
|
|
1217
1221
|
className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
|
|
1218
1222
|
}
|
|
1219
1223
|
) : null,
|
|
1220
1224
|
/* @__PURE__ */ s.jsx(
|
|
1221
|
-
|
|
1225
|
+
Mr,
|
|
1222
1226
|
{
|
|
1223
|
-
extraBottomOffset:
|
|
1227
|
+
extraBottomOffset: Ln,
|
|
1224
1228
|
hasPlayerGap: w,
|
|
1225
|
-
isEnabled:
|
|
1229
|
+
isEnabled: Gt && Nn,
|
|
1226
1230
|
isPlayerHidden: g && !w,
|
|
1227
1231
|
playbackTimeStore: se,
|
|
1228
|
-
subtitleCues:
|
|
1232
|
+
subtitleCues: Wn
|
|
1229
1233
|
}
|
|
1230
1234
|
),
|
|
1231
1235
|
Be ? /* @__PURE__ */ s.jsx(
|
|
@@ -1240,48 +1244,48 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1240
1244
|
),
|
|
1241
1245
|
onClick: wt,
|
|
1242
1246
|
onPointerDownCapture: (e) => {
|
|
1243
|
-
|
|
1247
|
+
Pt(e.target) && Je(!0);
|
|
1244
1248
|
},
|
|
1245
1249
|
onFocusCapture: (e) => {
|
|
1246
|
-
|
|
1250
|
+
Pt(e.target) && Je(!0);
|
|
1247
1251
|
},
|
|
1248
1252
|
onInputCapture: (e) => {
|
|
1249
|
-
|
|
1253
|
+
Pt(e.target) && Je(!0);
|
|
1250
1254
|
},
|
|
1251
|
-
style:
|
|
1255
|
+
style: Xn,
|
|
1252
1256
|
children: /* @__PURE__ */ s.jsx(
|
|
1253
|
-
|
|
1257
|
+
xn,
|
|
1254
1258
|
{
|
|
1255
1259
|
content: String(y?.content ?? ""),
|
|
1256
1260
|
locale: h,
|
|
1257
|
-
defaultButtonText:
|
|
1258
|
-
defaultInputText:
|
|
1259
|
-
defaultSelectedValues:
|
|
1261
|
+
defaultButtonText: dn.buttonText ?? "",
|
|
1262
|
+
defaultInputText: dn.inputText ?? "",
|
|
1263
|
+
defaultSelectedValues: nr,
|
|
1260
1264
|
confirmButtonText: te?.confirmButtonText ?? $.interactionTexts.confirmButtonText,
|
|
1261
1265
|
copyButtonText: te?.copyButtonText ?? $.interactionTexts.copyButtonText,
|
|
1262
1266
|
copiedButtonText: te?.copiedButtonText ?? $.interactionTexts.copiedButtonText,
|
|
1263
|
-
onSend:
|
|
1264
|
-
onDragHandlePointerCancel:
|
|
1265
|
-
onDragHandlePointerDown:
|
|
1266
|
-
onDragHandlePointerMove:
|
|
1267
|
-
onDragHandlePointerUp:
|
|
1268
|
-
readonly:
|
|
1267
|
+
onSend: ir,
|
|
1268
|
+
onDragHandlePointerCancel: yn,
|
|
1269
|
+
onDragHandlePointerDown: gr,
|
|
1270
|
+
onDragHandlePointerMove: vr,
|
|
1271
|
+
onDragHandlePointerUp: yn,
|
|
1272
|
+
readonly: or,
|
|
1269
1273
|
title: te?.title ?? nt ?? $.interactionTexts.title
|
|
1270
1274
|
}
|
|
1271
1275
|
)
|
|
1272
1276
|
}
|
|
1273
1277
|
) : null,
|
|
1274
1278
|
g ? /* @__PURE__ */ s.jsx(
|
|
1275
|
-
|
|
1279
|
+
Br.Provider,
|
|
1276
1280
|
{
|
|
1277
|
-
value:
|
|
1281
|
+
value: On,
|
|
1278
1282
|
children: /* @__PURE__ */ s.jsx(
|
|
1279
|
-
|
|
1283
|
+
_r,
|
|
1280
1284
|
{
|
|
1281
1285
|
audioList: S,
|
|
1282
1286
|
className: ye(
|
|
1283
1287
|
"absolute left-1/2 z-[2] -translate-x-1/2",
|
|
1284
|
-
|
|
1288
|
+
Qt ? "bottom-3" : "-bottom-3",
|
|
1285
1289
|
Y,
|
|
1286
1290
|
!w && "pointer-events-none opacity-0"
|
|
1287
1291
|
),
|
|
@@ -1293,34 +1297,34 @@ const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
|
1293
1297
|
locale: h,
|
|
1294
1298
|
hasInteraction: !!y,
|
|
1295
1299
|
isInteractionOpen: le,
|
|
1296
|
-
isSubtitleEnabled:
|
|
1297
|
-
onAutoAdvanceToggle:
|
|
1298
|
-
onLoadingChange:
|
|
1300
|
+
isSubtitleEnabled: Gt,
|
|
1301
|
+
onAutoAdvanceToggle: Ht,
|
|
1302
|
+
onLoadingChange: fr,
|
|
1299
1303
|
onPlaybackStarted: () => {
|
|
1300
1304
|
$e(!0);
|
|
1301
1305
|
},
|
|
1302
|
-
onPlaybackPreferenceChange:
|
|
1306
|
+
onPlaybackPreferenceChange: tr,
|
|
1303
1307
|
onPlaybackTimeChange: se.setTime,
|
|
1304
1308
|
onSubtitleToggle: () => {
|
|
1305
|
-
|
|
1309
|
+
Dn((e) => !e);
|
|
1306
1310
|
},
|
|
1307
1311
|
nextDisabled: !R,
|
|
1308
|
-
onEnded:
|
|
1309
|
-
onFullscreen:
|
|
1310
|
-
isFullscreen:
|
|
1312
|
+
onEnded: mr,
|
|
1313
|
+
onFullscreen: ar,
|
|
1314
|
+
isFullscreen: zt,
|
|
1311
1315
|
mobileViewMode: ae,
|
|
1312
1316
|
settingsPortalContainer: it.current,
|
|
1313
|
-
onMobileViewModeChange:
|
|
1314
|
-
onControlsPointerEnter:
|
|
1315
|
-
onControlsPointerLeave:
|
|
1316
|
-
onInteractionToggle:
|
|
1317
|
-
onNext:
|
|
1318
|
-
onPrev:
|
|
1319
|
-
onSubtitleJump:
|
|
1317
|
+
onMobileViewModeChange: Gn,
|
|
1318
|
+
onControlsPointerEnter: yr,
|
|
1319
|
+
onControlsPointerLeave: hr,
|
|
1320
|
+
onInteractionToggle: pr,
|
|
1321
|
+
onNext: dr,
|
|
1322
|
+
onPrev: ur,
|
|
1323
|
+
onSubtitleJump: cr,
|
|
1320
1324
|
canJumpToSubtitleTarget: At,
|
|
1321
|
-
prevDisabled: !
|
|
1325
|
+
prevDisabled: !Rn,
|
|
1322
1326
|
showControls: w,
|
|
1323
|
-
subtitleSeekRequest:
|
|
1327
|
+
subtitleSeekRequest: kn,
|
|
1324
1328
|
texts: rt,
|
|
1325
1329
|
customActionContext: St,
|
|
1326
1330
|
customActions: Z,
|