markdown-flow-ui 0.1.109 → 0.1.112
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.cjs10.js +1 -1
- package/dist/_virtual/index.cjs4.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.cjs7.js +1 -1
- package/dist/_virtual/index.cjs9.js +1 -1
- package/dist/_virtual/index.es10.js +2 -2
- package/dist/_virtual/index.es4.js +4 -4
- package/dist/_virtual/index.es5.js +4 -4
- package/dist/_virtual/index.es6.js +5 -2
- package/dist/_virtual/index.es6.js.map +1 -1
- package/dist/_virtual/index.es7.js +2 -5
- package/dist/_virtual/index.es7.js.map +1 -1
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/assets/markdown-flow-ui.css +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.es.js +321 -317
- package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.js +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +48 -44
- package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.cjs.js +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.cjs.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.d.ts +1 -0
- package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.es.js +38 -28
- package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.js +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +28 -26
- package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/utils.cjs.js +1 -1
- package/dist/components/MarkdownFlowEditor/utils.cjs.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/utils.d.ts +8 -1
- package/dist/components/MarkdownFlowEditor/utils.es.js +59 -39
- package/dist/components/MarkdownFlowEditor/utils.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.es.js +522 -483
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/useSlide.cjs.js +1 -1
- package/dist/components/Slide/useSlide.cjs.js.map +1 -1
- package/dist/components/Slide/useSlide.es.js +106 -97
- package/dist/components/Slide/useSlide.es.js.map +1 -1
- package/dist/components/Slide/utils/appendedMarkerAdvance.cjs.js +2 -0
- package/dist/components/Slide/utils/appendedMarkerAdvance.cjs.js.map +1 -0
- package/dist/components/Slide/utils/appendedMarkerAdvance.d.ts +17 -0
- package/dist/components/Slide/utils/appendedMarkerAdvance.es.js +21 -0
- package/dist/components/Slide/utils/appendedMarkerAdvance.es.js.map +1 -0
- package/dist/components/Slide/utils/appendedMarkerAdvance.test.d.ts +1 -0
- package/dist/components/Slide/utils/streamingNavigation.cjs.js +2 -0
- package/dist/components/Slide/utils/streamingNavigation.cjs.js.map +1 -0
- package/dist/components/Slide/utils/streamingNavigation.d.ts +8 -0
- package/dist/components/Slide/utils/streamingNavigation.es.js +16 -0
- package/dist/components/Slide/utils/streamingNavigation.es.js.map +1 -0
- package/dist/components/Slide/utils/streamingNavigation.test.d.ts +1 -0
- package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js.map +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,535 +1,574 @@
|
|
|
1
1
|
import { j as n } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { isSandboxInteractionMessage as
|
|
2
|
+
import { memo as fn, useRef as p, useMemo as c, useState as m, useCallback as r, useEffect as i } from "react";
|
|
3
|
+
import { isSandboxInteractionMessage as mn } from "../../lib/sandboxInteraction.es.js";
|
|
4
4
|
import { cn as X } from "../../lib/utils.es.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import pn from "../ui/loading-overlay-card.es.js";
|
|
6
|
+
import hn from "../ContentRender/ContentRender.es.js";
|
|
7
|
+
import It from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
|
-
import { getInteractionDefaultValues as
|
|
10
|
-
import { isMobileDevice as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { DEFAULT_SLIDE_PLAYER_TEXTS as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { DEFAULT_MOBILE_VIEW_MODE as
|
|
18
|
-
import { shouldPresentInteractionOverlay as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
9
|
+
import { getInteractionDefaultValues as vn, getInteractionDefaultSelectedValues as yn } from "../../lib/interaction-defaults.es.js";
|
|
10
|
+
import { isMobileDevice as bn, isLandscapeViewport as At, subscribeMobileDeviceChange as gn } from "../../lib/mobileDevice.es.js";
|
|
11
|
+
import Sn from "./Player.es.js";
|
|
12
|
+
import xn from "./SubtitleOverlay.es.js";
|
|
13
|
+
import { DEFAULT_SLIDE_PLAYER_TEXTS as In } from "./constants.es.js";
|
|
14
|
+
import An from "./SlideFullscreenHint.es.js";
|
|
15
|
+
import wn from "./useSlide.es.js";
|
|
16
|
+
import _n from "./useWakePlayerFromIframe.es.js";
|
|
17
|
+
import { DEFAULT_MOBILE_VIEW_MODE as Ae, resolveMobileViewModeState as En } from "./utils/mobileScreenMode.es.js";
|
|
18
|
+
import { shouldPresentInteractionOverlay as Tn } from "./utils/interactionPlayback.es.js";
|
|
19
|
+
import { shouldAutoAdvanceIntoAppendedMarker as Cn } from "./utils/appendedMarkerAdvance.es.js";
|
|
20
|
+
import { getPlaybackSequenceTransition as Pn } from "./utils/playbackSequence.es.js";
|
|
21
|
+
import { resolvePlayerCustomActionElement as Mn, getPlayerCustomActionCount as Rn } from "./utils/playerCustomActions.es.js";
|
|
22
|
+
import { createPlaybackTimeStore as Fn } from "./utils/playbackTimeStore.es.js";
|
|
23
|
+
import { shouldUseAutoAdvanceToggle as kn } from "./utils/playerToggleMode.es.js";
|
|
23
24
|
/* empty css */
|
|
24
|
-
import
|
|
25
|
-
const
|
|
25
|
+
import On from "../../markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
|
|
26
|
+
const Nn = 2e3, Bn = 300, Ln = 160, jn = 16, wt = fn(
|
|
26
27
|
({
|
|
27
|
-
content:
|
|
28
|
-
title:
|
|
29
|
-
defaultButtonText:
|
|
28
|
+
content: j,
|
|
29
|
+
title: K,
|
|
30
|
+
defaultButtonText: x,
|
|
30
31
|
defaultInputText: J,
|
|
31
|
-
defaultSelectedValues:
|
|
32
|
-
confirmButtonText:
|
|
32
|
+
defaultSelectedValues: I,
|
|
33
|
+
confirmButtonText: V,
|
|
33
34
|
copyButtonText: Q,
|
|
34
|
-
copiedButtonText:
|
|
35
|
-
onSend:
|
|
36
|
-
readonly:
|
|
35
|
+
copiedButtonText: we,
|
|
36
|
+
onSend: _e,
|
|
37
|
+
readonly: q = !1
|
|
37
38
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
38
|
-
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children:
|
|
39
|
+
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: K }) }),
|
|
39
40
|
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
|
|
40
|
-
|
|
41
|
+
hn,
|
|
41
42
|
{
|
|
42
|
-
content:
|
|
43
|
-
defaultButtonText:
|
|
43
|
+
content: j,
|
|
44
|
+
defaultButtonText: x,
|
|
44
45
|
defaultInputText: J,
|
|
45
|
-
defaultSelectedValues:
|
|
46
|
-
confirmButtonText:
|
|
46
|
+
defaultSelectedValues: I,
|
|
47
|
+
confirmButtonText: V,
|
|
47
48
|
copyButtonText: Q,
|
|
48
|
-
copiedButtonText:
|
|
49
|
-
onSend:
|
|
50
|
-
readonly:
|
|
49
|
+
copiedButtonText: we,
|
|
50
|
+
onSend: _e,
|
|
51
|
+
readonly: q,
|
|
51
52
|
enableTypewriter: !1,
|
|
52
53
|
sandboxMode: "content"
|
|
53
54
|
}
|
|
54
55
|
) })
|
|
55
56
|
] })
|
|
56
57
|
);
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
}),
|
|
62
|
-
elementList:
|
|
63
|
-
showPlayer:
|
|
64
|
-
playerAlwaysVisible:
|
|
58
|
+
wt.displayName = "InteractionOverlayCard";
|
|
59
|
+
const Kn = (j, K) => j.length === K.length && j.every((x, J) => {
|
|
60
|
+
const I = K[J];
|
|
61
|
+
return x.sequence_number === I?.sequence_number && x.type === I?.type && x.content === I?.content;
|
|
62
|
+
}), mr = ({
|
|
63
|
+
elementList: j = [],
|
|
64
|
+
showPlayer: K = !0,
|
|
65
|
+
playerAlwaysVisible: x = !1,
|
|
65
66
|
playerClassName: J,
|
|
66
|
-
fullscreenHeader:
|
|
67
|
-
playerCustomActions:
|
|
67
|
+
fullscreenHeader: I,
|
|
68
|
+
playerCustomActions: V,
|
|
68
69
|
playerCustomActionPauseOnActive: Q = !0,
|
|
69
|
-
bufferingText:
|
|
70
|
-
interactionTitle:
|
|
71
|
-
interactionTexts:
|
|
70
|
+
bufferingText: we = "Buffering...",
|
|
71
|
+
interactionTitle: _e,
|
|
72
|
+
interactionTexts: q,
|
|
72
73
|
playerTexts: Ve,
|
|
73
|
-
playerAutoHideDelay:
|
|
74
|
-
markerAutoAdvanceDelay: qe =
|
|
75
|
-
interactionDefaultValueOptions:
|
|
74
|
+
playerAutoHideDelay: Ee = 3e3,
|
|
75
|
+
markerAutoAdvanceDelay: qe = Nn,
|
|
76
|
+
interactionDefaultValueOptions: ue,
|
|
76
77
|
onSend: He,
|
|
77
|
-
onPlayerVisibilityChange:
|
|
78
|
+
onPlayerVisibilityChange: Te,
|
|
78
79
|
onMobileViewModeChange: De,
|
|
79
80
|
onStepChange: Ue,
|
|
80
|
-
enableIframeScaling:
|
|
81
|
-
className:
|
|
81
|
+
enableIframeScaling: _t = !0,
|
|
82
|
+
className: Et,
|
|
82
83
|
onPointerDown: ze,
|
|
83
|
-
...
|
|
84
|
+
...Tt
|
|
84
85
|
}) => {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
86
|
+
const de = p(null), $e = p(null), Ce = p(null), Ge = p(null), Z = p(null), ee = p(null), te = p(null), ne = p(null), We = p(null), Ye = p([]), fe = p(!1), H = p(null), Xe = p(null), Je = p({
|
|
87
|
+
markerCount: 0,
|
|
88
|
+
currentIndex: -1,
|
|
89
|
+
canGoNext: !1
|
|
90
|
+
}), {
|
|
91
|
+
currentElementList: F,
|
|
92
|
+
stepElementLists: Qe,
|
|
93
|
+
slideElementList: k,
|
|
94
|
+
currentIndex: d,
|
|
95
|
+
audioList: h,
|
|
96
|
+
currentAudioSequenceIndexes: me,
|
|
97
|
+
currentStepHasSpeakableElement: b,
|
|
98
|
+
currentInteractionElement: u,
|
|
99
|
+
canGoPrev: Ct,
|
|
100
|
+
canGoNext: S,
|
|
101
|
+
handlePrev: Ze,
|
|
102
|
+
handleNext: E
|
|
103
|
+
} = wn(j), re = c(() => {
|
|
104
|
+
if (!(d < 0))
|
|
105
|
+
return k[d];
|
|
106
|
+
}, [d, k]), Pt = k.filter(
|
|
102
107
|
(e) => e.is_renderable !== !1
|
|
103
|
-
).length === 1,
|
|
104
|
-
() =>
|
|
105
|
-
[
|
|
106
|
-
), [
|
|
107
|
-
|
|
108
|
+
).length === 1, A = K && (k.length > 0 || h.length > 0 || !!u), T = c(
|
|
109
|
+
() => me.map((e) => h[e]?.audioKey).filter((e) => !!e),
|
|
110
|
+
[h, me]
|
|
111
|
+
), [et, pe] = m(!0), [he, oe] = m(!1), [se, tt] = m(!0), [v, D] = m(null), [Mt, w] = m(!1), [C, nt] = m(!1), [Rt, Pe] = m(!1), [rt, Ft] = m(!0), [Me, Re] = m(!1), [o, Fe] = m(), [ve, ye] = m(!1), [
|
|
112
|
+
kt,
|
|
108
113
|
le
|
|
109
|
-
] =
|
|
110
|
-
|
|
111
|
-
), [
|
|
112
|
-
() =>
|
|
113
|
-
), [
|
|
114
|
-
effectiveMobileViewMode:
|
|
114
|
+
] = m(0), [Ot, Nt] = m(!1), P = c(() => bn(), []), [be, ke] = m(
|
|
115
|
+
Ae
|
|
116
|
+
), [ot, Oe] = m(!1), [Ne, st] = m(
|
|
117
|
+
() => P ? At() : !1
|
|
118
|
+
), [Bt, ge] = m(!1), U = c(() => Fn(), []), {
|
|
119
|
+
effectiveMobileViewMode: N,
|
|
115
120
|
isImmersiveMobileFullscreen: z,
|
|
116
121
|
isNativeMobileFullscreen: lt,
|
|
117
|
-
shouldRotateFullscreenViewport:
|
|
118
|
-
} =
|
|
119
|
-
() =>
|
|
120
|
-
hasManualMobileViewMode:
|
|
121
|
-
isMobileDevice:
|
|
122
|
-
mobileViewMode:
|
|
122
|
+
shouldRotateFullscreenViewport: Lt
|
|
123
|
+
} = c(
|
|
124
|
+
() => En({
|
|
125
|
+
hasManualMobileViewMode: ot,
|
|
126
|
+
isMobileDevice: P,
|
|
127
|
+
mobileViewMode: be
|
|
123
128
|
}),
|
|
124
129
|
[
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
ot,
|
|
131
|
+
P,
|
|
132
|
+
Ne,
|
|
133
|
+
be
|
|
129
134
|
]
|
|
130
|
-
),
|
|
135
|
+
), it = p(N), M = A && (x || et), jt = z && M, Kt = z && M, Vt = z || lt, qt = Ve?.fullscreenHintText ?? In.fullscreenHintText, Ht = r(
|
|
131
136
|
(e) => {
|
|
132
|
-
|
|
137
|
+
Oe(!0), ke(e);
|
|
133
138
|
},
|
|
134
139
|
[]
|
|
135
|
-
),
|
|
136
|
-
|
|
137
|
-
}, []),
|
|
138
|
-
|
|
139
|
-
}, [
|
|
140
|
-
|
|
141
|
-
}, []),
|
|
142
|
-
|
|
143
|
-
}, []),
|
|
144
|
-
|
|
145
|
-
}, []), { mountedStepStates:
|
|
140
|
+
), ct = r(() => {
|
|
141
|
+
Oe(!1), ke(Ae);
|
|
142
|
+
}, []), Dt = r(() => {
|
|
143
|
+
ct(), I?.onBack?.();
|
|
144
|
+
}, [I, ct]), Ut = r(() => {
|
|
145
|
+
ge(!1);
|
|
146
|
+
}, []), at = r((e) => {
|
|
147
|
+
Re(e);
|
|
148
|
+
}, []), ut = r(() => {
|
|
149
|
+
Re((e) => !e);
|
|
150
|
+
}, []), { mountedStepStates: zt, currentMountedStateIndex: $t } = c(() => {
|
|
146
151
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
147
|
-
return
|
|
148
|
-
const
|
|
149
|
-
(a) =>
|
|
152
|
+
return Qe.forEach((s, f) => {
|
|
153
|
+
const l = e.findIndex(
|
|
154
|
+
(a) => Kn(
|
|
150
155
|
a.elementList,
|
|
151
|
-
|
|
156
|
+
s
|
|
152
157
|
)
|
|
153
158
|
);
|
|
154
|
-
if (
|
|
155
|
-
e[
|
|
159
|
+
if (l >= 0) {
|
|
160
|
+
e[l]?.sourceStepIndexes.push(f), t.set(f, l);
|
|
156
161
|
return;
|
|
157
162
|
}
|
|
158
163
|
e.push({
|
|
159
|
-
elementList:
|
|
160
|
-
sourceStepIndexes: [
|
|
161
|
-
}), t.set(
|
|
164
|
+
elementList: s,
|
|
165
|
+
sourceStepIndexes: [f]
|
|
166
|
+
}), t.set(f, e.length - 1);
|
|
162
167
|
}), {
|
|
163
168
|
mountedStepStates: e,
|
|
164
|
-
currentMountedStateIndex:
|
|
169
|
+
currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
|
|
165
170
|
};
|
|
166
|
-
}, [
|
|
167
|
-
(e) => (e.audioKey ?? "") ===
|
|
168
|
-
) : -1, [
|
|
169
|
-
() =>
|
|
170
|
-
[
|
|
171
|
-
),
|
|
172
|
-
() =>
|
|
173
|
-
[
|
|
174
|
-
),
|
|
171
|
+
}, [d, Qe]), dt = c(() => String(d), [d]), y = c(() => v ? h.findIndex(
|
|
172
|
+
(e) => (e.audioKey ?? "") === v
|
|
173
|
+
) : -1, [h, v]), Be = c(
|
|
174
|
+
() => y >= 0 ? h[y] : void 0,
|
|
175
|
+
[h, y]
|
|
176
|
+
), Gt = Be?.element?.subtitle_cues ?? [], Se = c(
|
|
177
|
+
() => T[0] ?? "none",
|
|
178
|
+
[T]
|
|
179
|
+
), Le = c(
|
|
175
180
|
() => ({
|
|
176
|
-
currentElement:
|
|
177
|
-
currentAudioIndex:
|
|
178
|
-
currentAudioSequenceIndexes:
|
|
179
|
-
audioList:
|
|
181
|
+
currentElement: Mn({
|
|
182
|
+
currentAudioIndex: y,
|
|
183
|
+
currentAudioSequenceIndexes: me,
|
|
184
|
+
audioList: h,
|
|
180
185
|
currentInteractionElement: o,
|
|
181
186
|
currentStepElement: re
|
|
182
187
|
}),
|
|
183
|
-
currentIndex:
|
|
188
|
+
currentIndex: d,
|
|
184
189
|
currentStepElement: re,
|
|
185
|
-
isActive:
|
|
186
|
-
setActive:
|
|
187
|
-
toggleActive:
|
|
190
|
+
isActive: Me,
|
|
191
|
+
setActive: at,
|
|
192
|
+
toggleActive: ut
|
|
188
193
|
}),
|
|
189
194
|
[
|
|
190
195
|
o,
|
|
191
|
-
p,
|
|
192
196
|
h,
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
y,
|
|
198
|
+
me,
|
|
199
|
+
d,
|
|
195
200
|
re,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
201
|
+
Me,
|
|
202
|
+
at,
|
|
203
|
+
ut
|
|
199
204
|
]
|
|
200
|
-
),
|
|
201
|
-
() =>
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
), je = c(
|
|
206
|
+
() => Rn(
|
|
207
|
+
V,
|
|
208
|
+
Le
|
|
204
209
|
),
|
|
205
|
-
[
|
|
206
|
-
), Wt =
|
|
210
|
+
[Le, V]
|
|
211
|
+
), Wt = c(
|
|
207
212
|
() => ({
|
|
208
|
-
"--slide-player-custom-action-count": String(
|
|
213
|
+
"--slide-player-custom-action-count": String(je),
|
|
209
214
|
"--slide-player-mobile-control-count": String(
|
|
210
|
-
|
|
215
|
+
je + 4
|
|
211
216
|
)
|
|
212
217
|
}),
|
|
213
|
-
[
|
|
214
|
-
),
|
|
215
|
-
|
|
216
|
-
)}` : "none", [
|
|
217
|
-
() => [
|
|
218
|
-
[
|
|
219
|
-
), Yt =
|
|
218
|
+
[je]
|
|
219
|
+
), ft = T.length > 0, mt = c(() => u ? `${u.sequence_number ?? "none"}:${String(
|
|
220
|
+
u.content ?? ""
|
|
221
|
+
)}` : "none", [u]), ie = c(
|
|
222
|
+
() => [dt, mt].join("|"),
|
|
223
|
+
[mt, dt]
|
|
224
|
+
), Yt = c(
|
|
220
225
|
() => [
|
|
221
|
-
|
|
226
|
+
ie,
|
|
222
227
|
Be?.audioKey ?? "none",
|
|
223
|
-
String(
|
|
228
|
+
String(y)
|
|
224
229
|
].join("|"),
|
|
225
|
-
[
|
|
226
|
-
),
|
|
227
|
-
(t) => t.audioKey ===
|
|
228
|
-
)?.audioUrl?.trim() ?? "", [
|
|
229
|
-
() =>
|
|
230
|
-
canGoNext:
|
|
231
|
-
currentAudioIndex:
|
|
232
|
-
currentStepHasSpeakableElement:
|
|
233
|
-
hasInteraction: !!
|
|
230
|
+
[y, Be?.audioKey, ie]
|
|
231
|
+
), pt = !!c(() => !Se || Se === "none" ? "" : h.find(
|
|
232
|
+
(t) => t.audioKey === Se
|
|
233
|
+
)?.audioUrl?.trim() ?? "", [h, Se]), B = Q && !!V && Me, ce = c(
|
|
234
|
+
() => kn({
|
|
235
|
+
canGoNext: S,
|
|
236
|
+
currentAudioIndex: y,
|
|
237
|
+
currentStepHasSpeakableElement: b,
|
|
238
|
+
hasInteraction: !!u
|
|
234
239
|
}),
|
|
235
240
|
[
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
241
|
+
S,
|
|
242
|
+
y,
|
|
243
|
+
u,
|
|
244
|
+
b
|
|
240
245
|
]
|
|
241
|
-
),
|
|
246
|
+
), L = r(() => {
|
|
242
247
|
Z.current !== null && (window.clearTimeout(Z.current), Z.current = null);
|
|
243
|
-
}, []),
|
|
248
|
+
}, []), O = r(() => {
|
|
244
249
|
te.current !== null && (window.clearTimeout(te.current), te.current = null);
|
|
245
|
-
}, []),
|
|
250
|
+
}, []), R = r(() => {
|
|
246
251
|
ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
|
|
247
252
|
}, []), $ = r(() => {
|
|
248
253
|
ee.current !== null && (window.clearTimeout(ee.current), ee.current = null);
|
|
249
|
-
}, []),
|
|
250
|
-
$(),
|
|
254
|
+
}, []), G = r(() => {
|
|
255
|
+
$(), O(), R(), D(null), U.reset(), w(!1), nt(!1), Pe(!1), Fe(void 0), ye(!1), le(0);
|
|
251
256
|
}, [
|
|
252
257
|
$,
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
O,
|
|
259
|
+
R,
|
|
255
260
|
U
|
|
256
|
-
]),
|
|
257
|
-
const e =
|
|
261
|
+
]), W = r(() => {
|
|
262
|
+
const e = T[0];
|
|
258
263
|
return e ? (D(e), !0) : !1;
|
|
259
|
-
}, [
|
|
260
|
-
|
|
264
|
+
}, [T]), xe = r(() => {
|
|
265
|
+
O(), R(), ye(!1), le(0), !W() && S && E();
|
|
261
266
|
}, [
|
|
267
|
+
S,
|
|
268
|
+
O,
|
|
262
269
|
R,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
Y
|
|
267
|
-
]), pt = r(
|
|
270
|
+
E,
|
|
271
|
+
W
|
|
272
|
+
]), ht = r(
|
|
268
273
|
(e) => {
|
|
269
|
-
if (
|
|
274
|
+
if (R(), !e)
|
|
270
275
|
return;
|
|
271
276
|
const t = () => {
|
|
272
277
|
ne.current = null, le(
|
|
273
|
-
|
|
274
|
-
),
|
|
278
|
+
Ln
|
|
279
|
+
), ye(!0), H.current = null;
|
|
275
280
|
};
|
|
276
281
|
ne.current = window.setTimeout(
|
|
277
282
|
t,
|
|
278
283
|
Bn
|
|
279
284
|
);
|
|
280
285
|
},
|
|
281
|
-
[
|
|
282
|
-
),
|
|
283
|
-
(e =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
},
|
|
286
|
+
[R]
|
|
287
|
+
), g = r(
|
|
288
|
+
(e = he) => {
|
|
289
|
+
A && (pe(!0), L(), !(x || !e || Ee <= 0) && (Z.current = window.setTimeout(() => {
|
|
290
|
+
pe(!1), Z.current = null;
|
|
291
|
+
}, Ee)));
|
|
287
292
|
},
|
|
288
293
|
[
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
+
L,
|
|
295
|
+
he,
|
|
296
|
+
x,
|
|
297
|
+
Ee,
|
|
298
|
+
A
|
|
294
299
|
]
|
|
295
|
-
),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}, [
|
|
299
|
-
$(),
|
|
300
|
+
), ae = !!(u?.readonly || u?.user_input?.trim()), Y = !!u && !ae;
|
|
301
|
+
i(() => {
|
|
302
|
+
tt(!0), Q && Re(!1);
|
|
303
|
+
}, [d, Q]), i(() => () => {
|
|
304
|
+
$(), L(), O(), R();
|
|
300
305
|
}, [
|
|
301
306
|
$,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
]),
|
|
306
|
-
|
|
307
|
-
}), [
|
|
308
|
-
|
|
309
|
-
}, [
|
|
310
|
-
if (!
|
|
311
|
-
|
|
307
|
+
O,
|
|
308
|
+
R,
|
|
309
|
+
L
|
|
310
|
+
]), i(() => (Te?.(M), () => {
|
|
311
|
+
Te?.(!1);
|
|
312
|
+
}), [Te, M]), i(() => {
|
|
313
|
+
P || be === Ae || (Oe(!1), ke(Ae));
|
|
314
|
+
}, [P, be]), i(() => {
|
|
315
|
+
if (!P) {
|
|
316
|
+
st(!1);
|
|
312
317
|
return;
|
|
313
318
|
}
|
|
314
319
|
const e = () => {
|
|
315
|
-
|
|
320
|
+
st(At());
|
|
316
321
|
};
|
|
317
|
-
return e(),
|
|
318
|
-
}, [
|
|
319
|
-
De?.(
|
|
320
|
-
}, [
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
323
|
-
|
|
322
|
+
return e(), gn(e);
|
|
323
|
+
}, [P]), i(() => {
|
|
324
|
+
De?.(N);
|
|
325
|
+
}, [N, De]), i(() => {
|
|
326
|
+
const s = it.current !== "fullscreen" && N === "fullscreen" && !Ne;
|
|
327
|
+
if (it.current = N, !P) {
|
|
328
|
+
ge(!1);
|
|
324
329
|
return;
|
|
325
330
|
}
|
|
326
|
-
if (
|
|
327
|
-
|
|
331
|
+
if (s) {
|
|
332
|
+
ge(!0);
|
|
328
333
|
return;
|
|
329
334
|
}
|
|
330
|
-
|
|
331
|
-
}, [
|
|
332
|
-
Ue?.(re,
|
|
333
|
-
}, [
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
N !== "fullscreen" && ge(!1);
|
|
336
|
+
}, [N, P, Ne]), i(() => {
|
|
337
|
+
Ue?.(re, d);
|
|
338
|
+
}, [d, re, Ue]), i(() => {
|
|
339
|
+
const e = Je.current, t = Cn(
|
|
340
|
+
{
|
|
341
|
+
previousMarkerCount: e.markerCount,
|
|
342
|
+
nextMarkerCount: k.length,
|
|
343
|
+
previousIndex: e.currentIndex,
|
|
344
|
+
previousCanGoNext: e.canGoNext,
|
|
345
|
+
nextCanGoNext: S,
|
|
346
|
+
currentAudioKey: v,
|
|
347
|
+
hasCompletedCurrentStepAudio: C,
|
|
348
|
+
hasResolvedCurrentInteraction: ae,
|
|
349
|
+
currentStepHasSpeakableElement: b,
|
|
350
|
+
currentInteractionElement: u,
|
|
351
|
+
isAutoAdvanceEnabled: se,
|
|
352
|
+
shouldUseSilentStepAutoAdvanceToggle: ce
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
Je.current = {
|
|
356
|
+
markerCount: k.length,
|
|
357
|
+
currentIndex: d,
|
|
358
|
+
canGoNext: S
|
|
359
|
+
}, t && E();
|
|
360
|
+
}, [
|
|
361
|
+
S,
|
|
362
|
+
v,
|
|
363
|
+
d,
|
|
364
|
+
u,
|
|
365
|
+
b,
|
|
366
|
+
E,
|
|
367
|
+
C,
|
|
368
|
+
ae,
|
|
369
|
+
se,
|
|
370
|
+
ce,
|
|
371
|
+
k.length
|
|
372
|
+
]), i(() => {
|
|
373
|
+
if (!A) {
|
|
374
|
+
L(), pe(!1);
|
|
336
375
|
return;
|
|
337
376
|
}
|
|
338
|
-
if (
|
|
339
|
-
|
|
377
|
+
if (x) {
|
|
378
|
+
L(), pe(!0);
|
|
340
379
|
return;
|
|
341
380
|
}
|
|
342
|
-
|
|
381
|
+
he || g(!0);
|
|
343
382
|
}, [
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
]),
|
|
383
|
+
L,
|
|
384
|
+
he,
|
|
385
|
+
x,
|
|
386
|
+
A,
|
|
387
|
+
g
|
|
388
|
+
]), i(() => {
|
|
350
389
|
if (typeof window > "u")
|
|
351
390
|
return;
|
|
352
391
|
const e = (t) => {
|
|
353
|
-
t.origin === window.location.origin &&
|
|
392
|
+
t.origin === window.location.origin && mn(t.data) && t.data.eventType === "click" && A && (oe(!0), g(!0));
|
|
354
393
|
};
|
|
355
394
|
return window.addEventListener("message", e), () => {
|
|
356
395
|
window.removeEventListener("message", e);
|
|
357
396
|
};
|
|
358
|
-
}, [
|
|
359
|
-
sectionRef:
|
|
360
|
-
enabled:
|
|
397
|
+
}, [A, g]), _n({
|
|
398
|
+
sectionRef: de,
|
|
399
|
+
enabled: A,
|
|
361
400
|
onWake: () => {
|
|
362
|
-
oe(!0),
|
|
401
|
+
oe(!0), g(!0);
|
|
363
402
|
}
|
|
364
|
-
}),
|
|
365
|
-
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } =
|
|
403
|
+
}), i(() => {
|
|
404
|
+
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Pn({
|
|
366
405
|
previousResetKey: Xe.current,
|
|
367
|
-
nextResetKey:
|
|
368
|
-
currentAudioKey:
|
|
369
|
-
hasCompletedCurrentStepAudio:
|
|
406
|
+
nextResetKey: ie,
|
|
407
|
+
currentAudioKey: v,
|
|
408
|
+
hasCompletedCurrentStepAudio: C
|
|
370
409
|
});
|
|
371
|
-
Xe.current =
|
|
372
|
-
const
|
|
373
|
-
hasInteraction: !!
|
|
374
|
-
shouldBlockPlaybackForInteraction:
|
|
375
|
-
shouldOpenInteractionOverlayAfterAudio:
|
|
410
|
+
Xe.current = ie;
|
|
411
|
+
const s = H.current === d && !!u, f = Tn({
|
|
412
|
+
hasInteraction: !!u,
|
|
413
|
+
shouldBlockPlaybackForInteraction: Y,
|
|
414
|
+
shouldOpenInteractionOverlayAfterAudio: s,
|
|
376
415
|
hasPlaybackContextChanged: e,
|
|
377
|
-
hasResolvedCurrentInteraction:
|
|
378
|
-
currentStepHasSpeakableElement:
|
|
416
|
+
hasResolvedCurrentInteraction: ae,
|
|
417
|
+
currentStepHasSpeakableElement: b
|
|
379
418
|
});
|
|
380
|
-
if (e &&
|
|
381
|
-
if (
|
|
382
|
-
|
|
419
|
+
if (e && G(), !(F.length === 0 && !u) && !B) {
|
|
420
|
+
if (u && Fe(u), f) {
|
|
421
|
+
ht(u);
|
|
383
422
|
return;
|
|
384
423
|
}
|
|
385
|
-
if (
|
|
386
|
-
if (
|
|
387
|
-
|
|
424
|
+
if (R(), H.current = null, !!t && !W()) {
|
|
425
|
+
if (b) {
|
|
426
|
+
w(!0);
|
|
388
427
|
return;
|
|
389
428
|
}
|
|
390
|
-
if (
|
|
429
|
+
if (S && !(ce && !se))
|
|
391
430
|
return ee.current = window.setTimeout(() => {
|
|
392
|
-
ee.current = null,
|
|
431
|
+
ee.current = null, E();
|
|
393
432
|
}, qe), () => {
|
|
394
433
|
$();
|
|
395
434
|
};
|
|
396
435
|
}
|
|
397
436
|
}
|
|
398
437
|
}, [
|
|
399
|
-
|
|
438
|
+
S,
|
|
400
439
|
$,
|
|
401
|
-
|
|
402
|
-
|
|
440
|
+
F.length,
|
|
441
|
+
u,
|
|
442
|
+
v,
|
|
443
|
+
ie,
|
|
403
444
|
b,
|
|
404
|
-
se,
|
|
405
|
-
x,
|
|
406
445
|
qe,
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
446
|
+
E,
|
|
447
|
+
C,
|
|
448
|
+
se,
|
|
449
|
+
ae,
|
|
450
|
+
Y,
|
|
451
|
+
R,
|
|
411
452
|
G,
|
|
412
|
-
|
|
453
|
+
ht,
|
|
413
454
|
W,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
if (N || !x || G) {
|
|
420
|
-
I(!1);
|
|
455
|
+
B,
|
|
456
|
+
ce
|
|
457
|
+
]), i(() => {
|
|
458
|
+
if (B || !b || Y) {
|
|
459
|
+
w(!1);
|
|
421
460
|
return;
|
|
422
461
|
}
|
|
423
|
-
if (
|
|
424
|
-
|
|
462
|
+
if (C) {
|
|
463
|
+
w(!1);
|
|
425
464
|
return;
|
|
426
465
|
}
|
|
427
|
-
if (
|
|
428
|
-
|
|
466
|
+
if (ft) {
|
|
467
|
+
w(!1);
|
|
429
468
|
return;
|
|
430
469
|
}
|
|
431
|
-
|
|
432
|
-
}, [
|
|
433
|
-
dt,
|
|
434
|
-
x,
|
|
435
|
-
O,
|
|
436
|
-
N,
|
|
437
|
-
G
|
|
438
|
-
]), c(() => {
|
|
439
|
-
b || _.length === 0 || N || !x || G || O || Y();
|
|
470
|
+
w(!0);
|
|
440
471
|
}, [
|
|
472
|
+
ft,
|
|
441
473
|
b,
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
O,
|
|
445
|
-
N,
|
|
446
|
-
G,
|
|
474
|
+
C,
|
|
475
|
+
B,
|
|
447
476
|
Y
|
|
448
|
-
]),
|
|
449
|
-
!b ||
|
|
450
|
-
}, [
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
477
|
+
]), i(() => {
|
|
478
|
+
v || T.length === 0 || B || !b || Y || C || W();
|
|
479
|
+
}, [
|
|
480
|
+
v,
|
|
481
|
+
T,
|
|
482
|
+
b,
|
|
483
|
+
C,
|
|
484
|
+
B,
|
|
485
|
+
Y,
|
|
486
|
+
W
|
|
487
|
+
]), i(() => {
|
|
488
|
+
!v || y >= 0 || D(null);
|
|
489
|
+
}, [y, v]), i(() => {
|
|
490
|
+
y >= 0 || U.reset();
|
|
491
|
+
}, [y, U]), i(() => {
|
|
492
|
+
Pe(!1);
|
|
454
493
|
}, [Yt]);
|
|
455
|
-
const
|
|
494
|
+
const vt = c(() => {
|
|
456
495
|
if (!o)
|
|
457
496
|
return {};
|
|
458
497
|
const e = !!o.user_input?.trim();
|
|
459
|
-
return
|
|
498
|
+
return vn(
|
|
460
499
|
typeof o.content == "string" ? o.content : void 0,
|
|
461
500
|
o.user_input,
|
|
462
|
-
e ? void 0 :
|
|
501
|
+
e ? void 0 : ue
|
|
463
502
|
);
|
|
464
|
-
}, [o,
|
|
503
|
+
}, [o, ue]), Xt = c(() => {
|
|
465
504
|
if (!o)
|
|
466
505
|
return;
|
|
467
506
|
const e = !!o.user_input?.trim();
|
|
468
|
-
return
|
|
507
|
+
return yn(
|
|
469
508
|
typeof o.content == "string" ? o.content : void 0,
|
|
470
509
|
o.user_input,
|
|
471
|
-
e ? void 0 :
|
|
510
|
+
e ? void 0 : ue
|
|
472
511
|
);
|
|
473
|
-
}, [o,
|
|
512
|
+
}, [o, ue]), yt = !!o?.user_input?.trim(), bt = !!o?.readonly || yt, gt = bt || yt, Ke = !!o && ve, Jt = r(
|
|
474
513
|
(e) => {
|
|
475
|
-
const
|
|
514
|
+
const s = [
|
|
476
515
|
...e.selectedValues ?? [],
|
|
477
516
|
e.inputText?.trim() ?? "",
|
|
478
517
|
e.buttonText?.trim() ?? ""
|
|
479
518
|
].filter(Boolean).join(", ");
|
|
480
|
-
|
|
481
|
-
...
|
|
482
|
-
user_input:
|
|
483
|
-
}), He?.(e, o),
|
|
519
|
+
Fe((f) => !f || !s ? f : {
|
|
520
|
+
...f,
|
|
521
|
+
user_input: s
|
|
522
|
+
}), He?.(e, o), xe();
|
|
484
523
|
},
|
|
485
|
-
[o,
|
|
524
|
+
[o, xe, He]
|
|
486
525
|
);
|
|
487
|
-
|
|
526
|
+
i(() => {
|
|
488
527
|
const e = () => {
|
|
489
|
-
|
|
528
|
+
Nt(document.fullscreenElement === de.current);
|
|
490
529
|
};
|
|
491
530
|
return e(), document.addEventListener("fullscreenchange", e), () => {
|
|
492
531
|
document.removeEventListener("fullscreenchange", e);
|
|
493
532
|
};
|
|
494
|
-
}, []),
|
|
533
|
+
}, []), i(() => {
|
|
495
534
|
if (!Ke) {
|
|
496
535
|
le(0);
|
|
497
536
|
return;
|
|
498
537
|
}
|
|
499
|
-
const e =
|
|
538
|
+
const e = We.current;
|
|
500
539
|
if (!e)
|
|
501
540
|
return;
|
|
502
541
|
const t = () => {
|
|
503
|
-
const
|
|
542
|
+
const f = Math.ceil(
|
|
504
543
|
e.getBoundingClientRect().height
|
|
505
544
|
);
|
|
506
545
|
le(
|
|
507
|
-
|
|
546
|
+
f + jn
|
|
508
547
|
);
|
|
509
548
|
};
|
|
510
549
|
if (t(), typeof ResizeObserver > "u")
|
|
511
550
|
return;
|
|
512
|
-
const
|
|
551
|
+
const s = new ResizeObserver(() => {
|
|
513
552
|
t();
|
|
514
553
|
});
|
|
515
|
-
return
|
|
516
|
-
|
|
554
|
+
return s.observe(e), () => {
|
|
555
|
+
s.disconnect();
|
|
517
556
|
};
|
|
518
|
-
}, [Ke]),
|
|
519
|
-
if (
|
|
557
|
+
}, [Ke]), i(() => {
|
|
558
|
+
if (O(), !(!ve || !gt))
|
|
520
559
|
return te.current = window.setTimeout(() => {
|
|
521
|
-
te.current = null,
|
|
560
|
+
te.current = null, xe();
|
|
522
561
|
}, 2e3), () => {
|
|
523
|
-
|
|
562
|
+
O();
|
|
524
563
|
};
|
|
525
564
|
}, [
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
565
|
+
O,
|
|
566
|
+
xe,
|
|
567
|
+
ve,
|
|
568
|
+
gt
|
|
530
569
|
]);
|
|
531
|
-
const
|
|
532
|
-
|
|
570
|
+
const Qt = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
|
|
571
|
+
It,
|
|
533
572
|
{
|
|
534
573
|
className: "content-render-iframe",
|
|
535
574
|
hideFullScreen: !0,
|
|
@@ -537,10 +576,10 @@ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
|
|
|
537
576
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
538
577
|
type: "sandbox",
|
|
539
578
|
content: e.content,
|
|
540
|
-
enableScaling:
|
|
579
|
+
enableScaling: _t
|
|
541
580
|
}
|
|
542
581
|
) : /* @__PURE__ */ n.jsx(
|
|
543
|
-
|
|
582
|
+
It,
|
|
544
583
|
{
|
|
545
584
|
className: "content-render-iframe",
|
|
546
585
|
hideFullScreen: !0,
|
|
@@ -548,36 +587,36 @@ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
|
|
|
548
587
|
type: "markdown",
|
|
549
588
|
content: e.content
|
|
550
589
|
}
|
|
551
|
-
) : null,
|
|
590
|
+
) : null, Zt = (e = [], t = !1) => {
|
|
552
591
|
if (e.length === 0)
|
|
553
592
|
return null;
|
|
554
|
-
const
|
|
555
|
-
(
|
|
556
|
-
).length,
|
|
557
|
-
(
|
|
593
|
+
const s = e.filter(
|
|
594
|
+
(l) => l.is_renderable !== !1
|
|
595
|
+
).length, f = e.reduce(
|
|
596
|
+
(l, a, _) => a.is_renderable !== !1 ? _ : l,
|
|
558
597
|
-1
|
|
559
598
|
);
|
|
560
|
-
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((
|
|
561
|
-
const
|
|
599
|
+
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((l, a) => {
|
|
600
|
+
const _ = l.type === "html" && l.is_renderable === !1;
|
|
562
601
|
return /* @__PURE__ */ n.jsx(
|
|
563
602
|
"div",
|
|
564
603
|
{
|
|
565
|
-
ref: t && a ===
|
|
566
|
-
"aria-hidden":
|
|
604
|
+
ref: t && a === f ? Ge : null,
|
|
605
|
+
"aria-hidden": _ || void 0,
|
|
567
606
|
className: X(
|
|
568
607
|
"w-full shrink-0",
|
|
569
|
-
|
|
570
|
-
|
|
608
|
+
s === 1 && l.is_renderable !== !1 && "slide-element--single",
|
|
609
|
+
_ ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : l.is_renderable === !1 && "hidden"
|
|
571
610
|
),
|
|
572
|
-
children:
|
|
573
|
-
replaceRootScreenHeightWithFull:
|
|
611
|
+
children: Qt(l, {
|
|
612
|
+
replaceRootScreenHeightWithFull: s === 1 && l.type === "html" && l.is_renderable !== !1
|
|
574
613
|
})
|
|
575
614
|
},
|
|
576
|
-
|
|
615
|
+
l.sequence_number ?? `${l.type}-${a}`
|
|
577
616
|
);
|
|
578
617
|
}) });
|
|
579
|
-
},
|
|
580
|
-
const e =
|
|
618
|
+
}, en = r(() => {
|
|
619
|
+
const e = de.current;
|
|
581
620
|
if (e) {
|
|
582
621
|
if (document.fullscreenElement === e) {
|
|
583
622
|
document.exitFullscreen().catch(() => {
|
|
@@ -587,121 +626,121 @@ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
|
|
|
587
626
|
e.requestFullscreen?.().catch(() => {
|
|
588
627
|
});
|
|
589
628
|
}
|
|
590
|
-
}, []),
|
|
591
|
-
const e =
|
|
629
|
+
}, []), St = r(() => {
|
|
630
|
+
const e = Ce.current;
|
|
592
631
|
e && e.scrollTo({
|
|
593
632
|
top: e.scrollHeight,
|
|
594
633
|
behavior: "smooth"
|
|
595
634
|
});
|
|
596
|
-
}, []),
|
|
597
|
-
|
|
598
|
-
}, [
|
|
599
|
-
|
|
600
|
-
}, [
|
|
635
|
+
}, []), tn = r(() => {
|
|
636
|
+
fe.current = !0, H.current = null, oe(!0), w(!1), g(!0), G(), Ze();
|
|
637
|
+
}, [Ze, G, g]), nn = r(() => {
|
|
638
|
+
fe.current = !0, H.current = null, oe(!0), w(!1), g(!0), G(), E();
|
|
639
|
+
}, [E, G, g]), rn = r(
|
|
601
640
|
(e) => {
|
|
602
|
-
if (!
|
|
603
|
-
|
|
641
|
+
if (!b || C) {
|
|
642
|
+
w(!1);
|
|
604
643
|
return;
|
|
605
644
|
}
|
|
606
|
-
|
|
645
|
+
w(e);
|
|
607
646
|
},
|
|
608
|
-
[
|
|
609
|
-
),
|
|
647
|
+
[b, C]
|
|
648
|
+
), on = r(
|
|
610
649
|
(e) => {
|
|
611
|
-
const t =
|
|
612
|
-
if (!t || !
|
|
650
|
+
const t = h[e]?.audioKey;
|
|
651
|
+
if (!t || !v || t !== v)
|
|
613
652
|
return;
|
|
614
|
-
const
|
|
653
|
+
const s = T.findIndex(
|
|
615
654
|
(a) => a === t
|
|
616
655
|
);
|
|
617
|
-
if (
|
|
656
|
+
if (s < 0) {
|
|
618
657
|
D(null);
|
|
619
658
|
return;
|
|
620
659
|
}
|
|
621
|
-
const
|
|
622
|
-
if (
|
|
623
|
-
D(
|
|
660
|
+
const f = s + 1, l = T[f];
|
|
661
|
+
if (l) {
|
|
662
|
+
D(l);
|
|
624
663
|
return;
|
|
625
664
|
}
|
|
626
|
-
if (D(null),
|
|
627
|
-
const a =
|
|
628
|
-
|
|
665
|
+
if (D(null), nt(!0), w(!1), S) {
|
|
666
|
+
const a = d + 1, _ = k[a];
|
|
667
|
+
pt && _?.type === "interaction" && (H.current = a), E();
|
|
629
668
|
}
|
|
630
669
|
},
|
|
631
670
|
[
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
671
|
+
h,
|
|
672
|
+
S,
|
|
673
|
+
d,
|
|
674
|
+
v,
|
|
675
|
+
T,
|
|
676
|
+
E,
|
|
677
|
+
pt,
|
|
678
|
+
k
|
|
640
679
|
]
|
|
641
|
-
),
|
|
642
|
-
o &&
|
|
643
|
-
}, [o]),
|
|
680
|
+
), sn = r(() => {
|
|
681
|
+
o && ye((e) => !e);
|
|
682
|
+
}, [o]), xt = r(
|
|
644
683
|
(e) => {
|
|
645
|
-
e.stopPropagation(),
|
|
684
|
+
e.stopPropagation(), M && g(!0);
|
|
646
685
|
},
|
|
647
|
-
[
|
|
686
|
+
[et, g]
|
|
648
687
|
), ln = r(
|
|
649
688
|
(e) => {
|
|
650
689
|
ze?.(e);
|
|
651
690
|
},
|
|
652
691
|
[ze]
|
|
653
|
-
),
|
|
654
|
-
oe(!0),
|
|
655
|
-
}, [
|
|
656
|
-
() =>
|
|
692
|
+
), cn = r(() => {
|
|
693
|
+
oe(!0), g(!0);
|
|
694
|
+
}, [g]), Ie = c(
|
|
695
|
+
() => F.map(
|
|
657
696
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
658
697
|
),
|
|
659
|
-
[
|
|
698
|
+
[F]
|
|
660
699
|
);
|
|
661
|
-
return
|
|
662
|
-
const e =
|
|
700
|
+
return i(() => {
|
|
701
|
+
const e = Ye.current, f = (e.length > 0 && e.length < Ie.length && e.every((a, _) => a === Ie[_]) ? F.slice(e.length) : []).some(
|
|
663
702
|
(a) => a.is_new === !1
|
|
664
703
|
);
|
|
665
|
-
if (
|
|
704
|
+
if (Ye.current = Ie, !f)
|
|
666
705
|
return;
|
|
667
|
-
const
|
|
668
|
-
const a =
|
|
669
|
-
if (!a || !
|
|
706
|
+
const l = window.requestAnimationFrame(() => {
|
|
707
|
+
const a = Ce.current, _ = Ge.current;
|
|
708
|
+
if (!a || !_)
|
|
670
709
|
return;
|
|
671
|
-
const
|
|
710
|
+
const an = a.getBoundingClientRect(), un = _.getBoundingClientRect(), dn = a.scrollTop + (un.top - an.top);
|
|
672
711
|
a.scrollTo({
|
|
673
|
-
top: Math.max(
|
|
712
|
+
top: Math.max(dn, 0),
|
|
674
713
|
behavior: "smooth"
|
|
675
714
|
});
|
|
676
715
|
});
|
|
677
716
|
return () => {
|
|
678
|
-
window.cancelAnimationFrame(
|
|
717
|
+
window.cancelAnimationFrame(l);
|
|
679
718
|
};
|
|
680
|
-
}, [
|
|
681
|
-
if (!
|
|
719
|
+
}, [F, Ie]), i(() => {
|
|
720
|
+
if (!fe.current || (fe.current = !1, F.length === 0))
|
|
682
721
|
return;
|
|
683
722
|
const e = window.requestAnimationFrame(() => {
|
|
684
|
-
|
|
723
|
+
St();
|
|
685
724
|
});
|
|
686
725
|
return () => {
|
|
687
726
|
window.cancelAnimationFrame(e);
|
|
688
727
|
};
|
|
689
|
-
}, [
|
|
728
|
+
}, [F, St]), /* @__PURE__ */ n.jsxs(
|
|
690
729
|
"section",
|
|
691
730
|
{
|
|
692
|
-
ref:
|
|
731
|
+
ref: de,
|
|
693
732
|
className: X(
|
|
694
733
|
"relative h-full w-full",
|
|
695
|
-
|
|
734
|
+
P && "slide--mobile-device",
|
|
696
735
|
z && "slide--mobile-landscape",
|
|
697
736
|
lt && "slide--mobile-landscape-native",
|
|
698
|
-
|
|
737
|
+
Et
|
|
699
738
|
),
|
|
700
|
-
onClick:
|
|
739
|
+
onClick: cn,
|
|
701
740
|
onPointerDown: ln,
|
|
702
|
-
...
|
|
741
|
+
...Tt,
|
|
703
742
|
children: [
|
|
704
|
-
|
|
743
|
+
Vt ? /* @__PURE__ */ n.jsx(
|
|
705
744
|
"div",
|
|
706
745
|
{
|
|
707
746
|
"aria-hidden": "true",
|
|
@@ -715,42 +754,42 @@ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
|
|
|
715
754
|
className: X(
|
|
716
755
|
"slide__viewport relative h-full min-h-0 w-full",
|
|
717
756
|
z && "slide__viewport--mobile-landscape",
|
|
718
|
-
z && !
|
|
757
|
+
z && !Lt && "slide__viewport--mobile-landscape-native"
|
|
719
758
|
),
|
|
720
759
|
children: [
|
|
721
|
-
|
|
760
|
+
jt ? /* @__PURE__ */ n.jsxs("div", { className: "slide-landscape-header", children: [
|
|
722
761
|
/* @__PURE__ */ n.jsx(
|
|
723
762
|
"button",
|
|
724
763
|
{
|
|
725
|
-
"aria-label":
|
|
764
|
+
"aria-label": I?.backAriaLabel ?? "Back",
|
|
726
765
|
className: "slide-landscape-header__back",
|
|
727
|
-
onClick:
|
|
766
|
+
onClick: Dt,
|
|
728
767
|
type: "button",
|
|
729
|
-
children: /* @__PURE__ */ n.jsx(
|
|
768
|
+
children: /* @__PURE__ */ n.jsx(On, { className: "h-6 w-6 text-white", strokeWidth: 2.25 })
|
|
730
769
|
}
|
|
731
770
|
),
|
|
732
|
-
|
|
771
|
+
I?.content ? /* @__PURE__ */ n.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: I.content }) : null
|
|
733
772
|
] }) : null,
|
|
734
773
|
/* @__PURE__ */ n.jsx(
|
|
735
774
|
"div",
|
|
736
775
|
{
|
|
737
776
|
className: X(
|
|
738
777
|
"h-full min-h-0 w-full",
|
|
739
|
-
|
|
778
|
+
Kt && "slide__viewport-content--with-header",
|
|
740
779
|
Pt ? "slide-content--single" : "grid gap-4"
|
|
741
780
|
),
|
|
742
|
-
children:
|
|
781
|
+
children: F.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: Ce, className: "slide-stage__layer w-full", children: zt.map(
|
|
743
782
|
(e, t) => {
|
|
744
|
-
const
|
|
783
|
+
const s = t === $t;
|
|
745
784
|
return /* @__PURE__ */ n.jsx(
|
|
746
785
|
"div",
|
|
747
786
|
{
|
|
748
|
-
"aria-hidden": !
|
|
787
|
+
"aria-hidden": !s || void 0,
|
|
749
788
|
className: "w-full h-full",
|
|
750
|
-
style: { display:
|
|
751
|
-
children:
|
|
789
|
+
style: { display: s ? void 0 : "none" },
|
|
790
|
+
children: Zt(
|
|
752
791
|
e.elementList,
|
|
753
|
-
|
|
792
|
+
s
|
|
754
793
|
)
|
|
755
794
|
},
|
|
756
795
|
e.sourceStepIndexes[0] ?? t
|
|
@@ -759,101 +798,101 @@ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
|
|
|
759
798
|
) }) }) : null
|
|
760
799
|
}
|
|
761
800
|
),
|
|
762
|
-
|
|
763
|
-
|
|
801
|
+
Mt ? /* @__PURE__ */ n.jsx(
|
|
802
|
+
pn,
|
|
764
803
|
{
|
|
765
|
-
message:
|
|
804
|
+
message: we,
|
|
766
805
|
className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
|
|
767
806
|
}
|
|
768
807
|
) : null,
|
|
769
808
|
/* @__PURE__ */ n.jsx(
|
|
770
|
-
|
|
809
|
+
An,
|
|
771
810
|
{
|
|
772
|
-
onClose:
|
|
773
|
-
open:
|
|
774
|
-
text:
|
|
811
|
+
onClose: Ut,
|
|
812
|
+
open: Bt,
|
|
813
|
+
text: qt
|
|
775
814
|
}
|
|
776
815
|
),
|
|
777
816
|
/* @__PURE__ */ n.jsx(
|
|
778
|
-
|
|
817
|
+
xn,
|
|
779
818
|
{
|
|
780
|
-
extraBottomOffset:
|
|
781
|
-
hasPlayerGap:
|
|
782
|
-
isEnabled:
|
|
783
|
-
isPlayerHidden:
|
|
819
|
+
extraBottomOffset: kt,
|
|
820
|
+
hasPlayerGap: M,
|
|
821
|
+
isEnabled: rt && Rt,
|
|
822
|
+
isPlayerHidden: A && !M,
|
|
784
823
|
playbackTimeStore: U,
|
|
785
|
-
subtitleCues:
|
|
824
|
+
subtitleCues: Gt
|
|
786
825
|
}
|
|
787
826
|
),
|
|
788
827
|
Ke ? /* @__PURE__ */ n.jsx(
|
|
789
828
|
"div",
|
|
790
829
|
{
|
|
791
|
-
ref:
|
|
830
|
+
ref: We,
|
|
792
831
|
className: X(
|
|
793
832
|
"slide-interaction-overlay",
|
|
794
|
-
|
|
833
|
+
M && A ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
795
834
|
),
|
|
796
|
-
onClick:
|
|
797
|
-
onPointerDown:
|
|
835
|
+
onClick: xt,
|
|
836
|
+
onPointerDown: xt,
|
|
798
837
|
style: Wt,
|
|
799
838
|
children: /* @__PURE__ */ n.jsx(
|
|
800
|
-
|
|
839
|
+
wt,
|
|
801
840
|
{
|
|
802
841
|
content: String(o?.content ?? ""),
|
|
803
|
-
defaultButtonText:
|
|
804
|
-
defaultInputText:
|
|
805
|
-
defaultSelectedValues:
|
|
806
|
-
confirmButtonText:
|
|
807
|
-
copyButtonText:
|
|
808
|
-
copiedButtonText:
|
|
809
|
-
onSend:
|
|
810
|
-
readonly:
|
|
811
|
-
title:
|
|
842
|
+
defaultButtonText: vt.buttonText ?? "",
|
|
843
|
+
defaultInputText: vt.inputText ?? "",
|
|
844
|
+
defaultSelectedValues: Xt,
|
|
845
|
+
confirmButtonText: q?.confirmButtonText,
|
|
846
|
+
copyButtonText: q?.copyButtonText,
|
|
847
|
+
copiedButtonText: q?.copiedButtonText,
|
|
848
|
+
onSend: Jt,
|
|
849
|
+
readonly: bt,
|
|
850
|
+
title: q?.title ?? _e ?? "Submit the content below to continue."
|
|
812
851
|
}
|
|
813
852
|
)
|
|
814
853
|
}
|
|
815
854
|
) : null,
|
|
816
|
-
|
|
817
|
-
|
|
855
|
+
A ? /* @__PURE__ */ n.jsx(
|
|
856
|
+
Sn,
|
|
818
857
|
{
|
|
819
|
-
audioList:
|
|
858
|
+
audioList: h,
|
|
820
859
|
className: X(
|
|
821
860
|
"absolute left-1/2 bottom-6 z-[2] -translate-x-1/2",
|
|
822
861
|
J,
|
|
823
|
-
!
|
|
862
|
+
!M && "pointer-events-none opacity-0"
|
|
824
863
|
),
|
|
825
|
-
currentAudioIndex:
|
|
864
|
+
currentAudioIndex: y,
|
|
826
865
|
defaultPlaying: !0,
|
|
827
|
-
isPlaybackPaused:
|
|
828
|
-
isAutoAdvanceEnabled:
|
|
866
|
+
isPlaybackPaused: B,
|
|
867
|
+
isAutoAdvanceEnabled: se,
|
|
829
868
|
hasInteraction: !!o,
|
|
830
|
-
isInteractionOpen:
|
|
831
|
-
isSubtitleEnabled:
|
|
832
|
-
onAutoAdvanceToggle:
|
|
833
|
-
onLoadingChange:
|
|
869
|
+
isInteractionOpen: ve,
|
|
870
|
+
isSubtitleEnabled: rt,
|
|
871
|
+
onAutoAdvanceToggle: tt,
|
|
872
|
+
onLoadingChange: rn,
|
|
834
873
|
onPlaybackStarted: () => {
|
|
835
|
-
|
|
874
|
+
Pe(!0);
|
|
836
875
|
},
|
|
837
876
|
onPlaybackTimeChange: U.setTime,
|
|
838
877
|
onSubtitleToggle: () => {
|
|
839
878
|
Ft((e) => !e);
|
|
840
879
|
},
|
|
841
|
-
nextDisabled: !
|
|
842
|
-
onEnded:
|
|
843
|
-
onFullscreen:
|
|
880
|
+
nextDisabled: !S,
|
|
881
|
+
onEnded: on,
|
|
882
|
+
onFullscreen: en,
|
|
844
883
|
isFullscreen: Ot,
|
|
845
|
-
mobileViewMode:
|
|
884
|
+
mobileViewMode: N,
|
|
846
885
|
settingsPortalContainer: $e.current,
|
|
847
|
-
onMobileViewModeChange:
|
|
848
|
-
onInteractionToggle:
|
|
849
|
-
onNext:
|
|
850
|
-
onPrev:
|
|
851
|
-
prevDisabled: !
|
|
852
|
-
showControls:
|
|
886
|
+
onMobileViewModeChange: Ht,
|
|
887
|
+
onInteractionToggle: sn,
|
|
888
|
+
onNext: nn,
|
|
889
|
+
onPrev: tn,
|
|
890
|
+
prevDisabled: !Ct,
|
|
891
|
+
showControls: M,
|
|
853
892
|
texts: Ve,
|
|
854
|
-
customActionContext:
|
|
855
|
-
customActions:
|
|
856
|
-
useAutoAdvanceToggle:
|
|
893
|
+
customActionContext: Le,
|
|
894
|
+
customActions: V,
|
|
895
|
+
useAutoAdvanceToggle: ce
|
|
857
896
|
}
|
|
858
897
|
) : null
|
|
859
898
|
]
|
|
@@ -864,6 +903,6 @@ const Ln = (L, j) => L.length === j.length && L.every((g, J) => {
|
|
|
864
903
|
);
|
|
865
904
|
};
|
|
866
905
|
export {
|
|
867
|
-
|
|
906
|
+
mr as default
|
|
868
907
|
};
|
|
869
908
|
//# sourceMappingURL=Slide.es.js.map
|