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