markdown-flow-ui 0.1.100-beta.47 → 0.1.100-beta.49

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.
Files changed (39) hide show
  1. package/dist/Documents/ai-shifu/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
  2. package/dist/Documents/ai-shifu/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
  3. package/dist/Documents/ai-shifu/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
  4. package/dist/Documents/ai-shifu/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
  5. package/dist/Documents/ai-shifu/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
  6. package/dist/Documents/ai-shifu/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
  7. package/dist/Documents/ai-shifu/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
  8. package/dist/Documents/ai-shifu/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
  9. package/dist/Documents/ai-shifu/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
  10. package/dist/Documents/ai-shifu/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
  11. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
  12. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
  13. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
  14. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
  15. package/dist/_virtual/index.cjs4.js +1 -1
  16. package/dist/_virtual/index.cjs5.js +1 -1
  17. package/dist/_virtual/index.cjs6.js +1 -1
  18. package/dist/_virtual/index.cjs7.js +1 -1
  19. package/dist/_virtual/index.es4.js +4 -4
  20. package/dist/_virtual/index.es5.js +4 -4
  21. package/dist/_virtual/index.es6.js +2 -5
  22. package/dist/_virtual/index.es6.js.map +1 -1
  23. package/dist/_virtual/index.es7.js +5 -2
  24. package/dist/_virtual/index.es7.js.map +1 -1
  25. package/dist/components/ContentRender/plugins/CustomVariable.cjs.js +1 -1
  26. package/dist/components/ContentRender/plugins/CustomVariable.cjs.js.map +1 -1
  27. package/dist/components/ContentRender/plugins/CustomVariable.es.js +109 -105
  28. package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
  29. package/dist/components/Slide/Slide.cjs.js +1 -1
  30. package/dist/components/Slide/Slide.cjs.js.map +1 -1
  31. package/dist/components/Slide/Slide.es.js +159 -151
  32. package/dist/components/Slide/Slide.es.js.map +1 -1
  33. package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
  34. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  35. package/dist/lib/interaction-defaults.cjs.js +1 -1
  36. package/dist/lib/interaction-defaults.cjs.js.map +1 -1
  37. package/dist/lib/interaction-defaults.es.js +84 -58
  38. package/dist/lib/interaction-defaults.es.js.map +1 -1
  39. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { j as n } from "../../_virtual/jsx-runtime.es.js";
2
- import { memo as lt, useRef as _, useMemo as c, useState as P, useCallback as i, useEffect as m } from "react";
2
+ import { memo as lt, useRef as _, useMemo as c, useState as R, useCallback as i, useEffect as m } from "react";
3
3
  import { isSandboxInteractionMessage as st } from "../../lib/sandboxInteraction.es.js";
4
4
  import { cn as Q } from "../../lib/utils.es.js";
5
5
  import it from "../ContentRender/ContentRender.es.js";
@@ -12,32 +12,32 @@ import ft from "./useWakePlayerFromIframe.es.js";
12
12
  import { getPlayerCustomActionCount as mt } from "./utils/playerCustomActions.es.js";
13
13
  /* empty css */
14
14
  import pt from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js";
15
- const ht = 1e3, Be = lt(
15
+ const ht = 1e3, Fe = lt(
16
16
  ({
17
- content: R,
18
- title: j,
17
+ content: B,
18
+ title: C,
19
19
  defaultButtonText: h,
20
20
  defaultInputText: z,
21
21
  defaultSelectedValues: I,
22
22
  confirmButtonText: se,
23
23
  copyButtonText: ie,
24
- copiedButtonText: N,
24
+ copiedButtonText: j,
25
25
  onSend: D,
26
- readonly: B = !1
26
+ readonly: N = !1
27
27
  }) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
28
- /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: j }) }),
28
+ /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: C }) }),
29
29
  /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
30
30
  it,
31
31
  {
32
- content: R,
32
+ content: B,
33
33
  defaultButtonText: h,
34
34
  defaultInputText: z,
35
35
  defaultSelectedValues: I,
36
36
  confirmButtonText: se,
37
37
  copyButtonText: ie,
38
- copiedButtonText: N,
38
+ copiedButtonText: j,
39
39
  onSend: D,
40
- readonly: B,
40
+ readonly: N,
41
41
  enableTypewriter: !1,
42
42
  sandboxMode: "content"
43
43
  }
@@ -45,63 +45,63 @@ const ht = 1e3, Be = lt(
45
45
  /* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-arrow" })
46
46
  ] })
47
47
  );
48
- Be.displayName = "InteractionOverlayCard";
49
- const gt = (R, j) => R.length === j.length && R.every((h, z) => {
50
- const I = j[z];
48
+ Fe.displayName = "InteractionOverlayCard";
49
+ const gt = (B, C) => B.length === C.length && B.every((h, z) => {
50
+ const I = C[z];
51
51
  return h.sequence_number === I?.sequence_number && h.type === I?.type && h.content === I?.content;
52
- }), Bt = ({
53
- elementList: R = [],
54
- showPlayer: j = !0,
52
+ }), Nt = ({
53
+ elementList: B = [],
54
+ showPlayer: C = !0,
55
55
  playerAlwaysVisible: h = !1,
56
56
  playerClassName: z,
57
57
  playerCustomActions: I,
58
58
  bufferingText: se = "Buffering...",
59
59
  interactionTitle: ie,
60
- interactionTexts: N,
60
+ interactionTexts: j,
61
61
  playerAutoHideDelay: D = 3e3,
62
- interactionDefaultValueOptions: B,
63
- onSend: fe,
62
+ interactionDefaultValueOptions: N,
63
+ onSend: me,
64
64
  onPlayerVisibilityChange: ue,
65
- onStepChange: me,
66
- className: Fe,
67
- onPointerDown: pe,
68
- ...Ke
65
+ onStepChange: pe,
66
+ className: Ke,
67
+ onPointerDown: he,
68
+ ...ke
69
69
  }) => {
70
- const ae = _(null), ce = _(null), he = _(null), V = _(null), W = _(null), G = _(null), ge = _([]), X = _(!1), F = _(null), {
70
+ const ae = _(null), ce = _(null), ge = _(null), V = _(null), W = _(null), G = _(null), xe = _([]), X = _(!1), F = _(null), {
71
71
  currentElementList: b,
72
- stepElementLists: xe,
72
+ stepElementLists: ye,
73
73
  slideElementList: K,
74
74
  currentIndex: d,
75
75
  audioList: y,
76
- currentAudioSequenceIndexes: ye,
76
+ currentAudioSequenceIndexes: ve,
77
77
  currentStepHasSpeakableElement: A,
78
78
  currentInteractionElement: u,
79
- canGoPrev: ke,
80
- canGoNext: E,
79
+ canGoPrev: qe,
80
+ canGoNext: P,
81
81
  handlePrev: Se,
82
82
  handleNext: T
83
- } = dt(R), ve = c(() => {
83
+ } = dt(B), Ie = c(() => {
84
84
  if (!(d < 0))
85
85
  return K[d];
86
- }, [d, K]), qe = K.filter(
86
+ }, [d, K]), Le = K.filter(
87
87
  (e) => e.is_renderable !== !1
88
- ).length === 1, S = j && (K.length > 0 || y.length > 0 || !!u), g = c(
89
- () => ye.map((e) => y[e]?.audioKey).filter((e) => !!e),
90
- [y, ye]
91
- ), [Ie, Z] = P(!0), [ee, Y] = P(!1), [v, k] = P(null), [Le, p] = P(!1), [q, be] = P(!1), [l, te] = P(), [ne, J] = P(!1), L = S && (h || Ie), we = c(
88
+ ).length === 1, v = C && (K.length > 0 || y.length > 0 || !!u), g = c(
89
+ () => ve.map((e) => y[e]?.audioKey).filter((e) => !!e),
90
+ [y, ve]
91
+ ), [be, Z] = R(!0), [ee, Y] = R(!1), [S, k] = R(null), [Oe, p] = R(!1), [q, we] = R(!1), [o, te] = R(), [ne, J] = R(!1), L = v && (h || be), _e = c(
92
92
  () => mt(I),
93
93
  [I]
94
94
  ), Me = c(
95
95
  () => ({
96
- "--slide-player-custom-action-count": String(we)
96
+ "--slide-player-custom-action-count": String(_e)
97
97
  }),
98
- [we]
99
- ), { mountedStepStates: Oe, currentMountedStateIndex: He } = c(() => {
98
+ [_e]
99
+ ), { mountedStepStates: He, currentMountedStateIndex: $e } = c(() => {
100
100
  const e = [], t = /* @__PURE__ */ new Map();
101
- return xe.forEach((s, a) => {
101
+ return ye.forEach((s, a) => {
102
102
  const r = e.findIndex(
103
- (o) => gt(
104
- o.elementList,
103
+ (l) => gt(
104
+ l.elementList,
105
105
  s
106
106
  )
107
107
  );
@@ -117,95 +117,95 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
117
117
  mountedStepStates: e,
118
118
  currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
119
119
  };
120
- }, [d, xe]), _e = c(() => String(d), [d]), de = c(() => v ? y.findIndex(
121
- (e) => (e.audioKey ?? "") === v
122
- ) : -1, [y, v]), re = c(
120
+ }, [d, ye]), Ae = c(() => String(d), [d]), de = c(() => S ? y.findIndex(
121
+ (e) => (e.audioKey ?? "") === S
122
+ ) : -1, [y, S]), re = c(
123
123
  () => g[0] ?? "none",
124
124
  [g]
125
- ), Ae = c(() => u ? `${u.sequence_number ?? "none"}:${String(
125
+ ), Te = c(() => u ? `${u.sequence_number ?? "none"}:${String(
126
126
  u.content ?? ""
127
- )}` : "none", [u]), $e = c(
128
- () => [_e, Ae].join("|"),
129
- [Ae, _e]
130
- ), M = !!c(() => !re || re === "none" ? "" : y.find(
127
+ )}` : "none", [u]), Ue = c(
128
+ () => [Ae, Te].join("|"),
129
+ [Te, Ae]
130
+ ), O = !!c(() => !re || re === "none" ? "" : y.find(
131
131
  (t) => t.audioKey === re
132
- )?.audioUrl?.trim() ?? "", [y, re]), C = i(() => {
132
+ )?.audioUrl?.trim() ?? "", [y, re]), E = i(() => {
133
133
  V.current !== null && (window.clearTimeout(V.current), V.current = null);
134
134
  }, []), w = i(() => {
135
135
  G.current !== null && (window.clearTimeout(G.current), G.current = null);
136
- }, []), O = i(() => {
136
+ }, []), M = i(() => {
137
137
  W.current !== null && (window.clearTimeout(W.current), W.current = null);
138
138
  }, []), H = i(() => {
139
- O(), w(), k(null), p(!1), be(!1), te(void 0), J(!1);
140
- }, [O, w]), $ = i(() => {
139
+ M(), w(), k(null), p(!1), we(!1), te(void 0), J(!1);
140
+ }, [M, w]), $ = i(() => {
141
141
  const e = g[0];
142
142
  return e ? (k(e), !0) : !1;
143
143
  }, [g]), oe = i(() => {
144
- w(), J(!1), !$() && E && T();
144
+ w(), J(!1), !$() && P && T();
145
145
  }, [
146
- E,
146
+ P,
147
147
  w,
148
148
  T,
149
149
  $
150
150
  ]), f = i(
151
151
  (e = ee) => {
152
- S && (Z(!0), C(), !(h || !e || D <= 0) && (V.current = window.setTimeout(() => {
152
+ v && (Z(!0), E(), !(h || !e || D <= 0) && (V.current = window.setTimeout(() => {
153
153
  Z(!1), V.current = null;
154
154
  }, D)));
155
155
  },
156
156
  [
157
- C,
157
+ E,
158
158
  ee,
159
159
  h,
160
160
  D,
161
- S
161
+ v
162
162
  ]
163
- ), Ue = !!(u?.readonly || u?.user_input?.trim()), U = !!u && !Ue;
163
+ ), fe = !!(u?.readonly || u?.user_input?.trim()), U = !!u && !fe;
164
164
  m(() => () => {
165
- O(), C(), w();
165
+ M(), E(), w();
166
166
  }, [
167
- O,
167
+ M,
168
168
  w,
169
- C
169
+ E
170
170
  ]), m(() => (ue?.(L), () => {
171
171
  ue?.(!1);
172
172
  }), [ue, L]), m(() => {
173
- me?.(ve, d);
174
- }, [d, ve, me]), m(() => {
175
- if (!S) {
176
- C(), Z(!1);
173
+ pe?.(Ie, d);
174
+ }, [d, Ie, pe]), m(() => {
175
+ if (!v) {
176
+ E(), Z(!1);
177
177
  return;
178
178
  }
179
179
  if (h) {
180
- C(), Z(!0);
180
+ E(), Z(!0);
181
181
  return;
182
182
  }
183
183
  ee || f(!0);
184
184
  }, [
185
- C,
185
+ E,
186
186
  ee,
187
187
  h,
188
- S,
188
+ v,
189
189
  f
190
190
  ]), m(() => {
191
191
  if (typeof window > "u")
192
192
  return;
193
193
  const e = (t) => {
194
- t.origin === window.location.origin && st(t.data) && S && (Y(!0), f(!0));
194
+ t.origin === window.location.origin && st(t.data) && v && (Y(!0), f(!0));
195
195
  };
196
196
  return window.addEventListener("message", e), () => {
197
197
  window.removeEventListener("message", e);
198
198
  };
199
- }, [S, f]), ft({
199
+ }, [v, f]), ft({
200
200
  sectionRef: ae,
201
- enabled: S,
201
+ enabled: v,
202
202
  onWake: () => {
203
203
  Y(!0), f(!0);
204
204
  }
205
205
  }), m(() => {
206
- const e = F.current === d && !!u;
206
+ const e = F.current === d && !!u, t = !!u && (U || e || fe);
207
207
  if (H(), !(b.length === 0 && !u)) {
208
- if (U || e) {
208
+ if (t) {
209
209
  te(u), J(!0), F.current = null;
210
210
  return;
211
211
  }
@@ -214,22 +214,23 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
214
214
  p(!0);
215
215
  return;
216
216
  }
217
- if (E)
217
+ if (P)
218
218
  return W.current = window.setTimeout(() => {
219
219
  W.current = null, T();
220
220
  }, ht), () => {
221
- O();
221
+ M();
222
222
  };
223
223
  }
224
224
  }
225
225
  }, [
226
- E,
227
- O,
226
+ P,
227
+ M,
228
228
  b.length,
229
229
  u,
230
- $e,
230
+ Ue,
231
231
  A,
232
232
  T,
233
+ fe,
233
234
  U,
234
235
  H,
235
236
  $
@@ -249,31 +250,38 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
249
250
  q,
250
251
  U
251
252
  ]), m(() => {
252
- v || g.length === 0 || !A || U || q || $();
253
+ S || g.length === 0 || !A || U || q || $();
253
254
  }, [
254
- v,
255
+ S,
255
256
  g,
256
257
  A,
257
258
  q,
258
259
  U,
259
260
  $
260
261
  ]), m(() => {
261
- !v || de >= 0 || k(null);
262
- }, [de, v]), m(() => {
263
- M && p(!1);
264
- }, [M]);
265
- const Te = c(() => l ? ut(
266
- typeof l.content == "string" ? l.content : void 0,
267
- l.user_input,
268
- B
269
- ) : {}, [l, B]), ze = c(() => {
270
- if (l)
271
- return at(
272
- typeof l.content == "string" ? l.content : void 0,
273
- l.user_input,
274
- B
275
- );
276
- }, [l, B]), Ee = !!l?.user_input?.trim(), Ce = !!l?.readonly || Ee, Pe = Ce || Ee, De = i(
262
+ !S || de >= 0 || k(null);
263
+ }, [de, S]), m(() => {
264
+ O && p(!1);
265
+ }, [O]);
266
+ const Pe = c(() => {
267
+ if (!o)
268
+ return {};
269
+ const e = !!o.user_input?.trim();
270
+ return ut(
271
+ typeof o.content == "string" ? o.content : void 0,
272
+ o.user_input,
273
+ e ? void 0 : N
274
+ );
275
+ }, [o, N]), ze = c(() => {
276
+ if (!o)
277
+ return;
278
+ const e = !!o.user_input?.trim();
279
+ return at(
280
+ typeof o.content == "string" ? o.content : void 0,
281
+ o.user_input,
282
+ e ? void 0 : N
283
+ );
284
+ }, [o, N]), Ee = !!o?.user_input?.trim(), Re = !!o?.readonly || Ee, Be = Re || Ee, De = i(
277
285
  (e) => {
278
286
  const s = [
279
287
  ...e.selectedValues ?? [],
@@ -283,12 +291,12 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
283
291
  te((a) => !a || !s ? a : {
284
292
  ...a,
285
293
  user_input: s
286
- }), fe?.(e, l), oe();
294
+ }), me?.(e, o), oe();
287
295
  },
288
- [l, oe, fe]
296
+ [o, oe, me]
289
297
  );
290
298
  m(() => {
291
- if (w(), !(!ne || !Pe))
299
+ if (w(), !(!ne || !Be))
292
300
  return G.current = window.setTimeout(() => {
293
301
  G.current = null, oe();
294
302
  }, 2e3), () => {
@@ -298,7 +306,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
298
306
  w,
299
307
  oe,
300
308
  ne,
301
- Pe
309
+ Be
302
310
  ]);
303
311
  const Ve = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
304
312
  Ne,
@@ -325,15 +333,15 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
325
333
  const s = e.filter(
326
334
  (r) => r.is_renderable !== !1
327
335
  ).length, a = e.reduce(
328
- (r, o, x) => o.is_renderable !== !1 ? x : r,
336
+ (r, l, x) => l.is_renderable !== !1 ? x : r,
329
337
  -1
330
338
  );
331
- return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((r, o) => {
339
+ return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((r, l) => {
332
340
  const x = r.type === "html" && r.is_renderable === !1;
333
341
  return /* @__PURE__ */ n.jsx(
334
342
  "div",
335
343
  {
336
- ref: t && o === a ? he : null,
344
+ ref: t && l === a ? ge : null,
337
345
  "aria-hidden": x || void 0,
338
346
  className: Q(
339
347
  "w-full shrink-0",
@@ -344,7 +352,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
344
352
  replaceRootScreenHeightWithFull: s === 1 && r.type === "html" && r.is_renderable !== !1
345
353
  })
346
354
  },
347
- r.sequence_number ?? `${r.type}-${o}`
355
+ r.sequence_number ?? `${r.type}-${l}`
348
356
  );
349
357
  }) });
350
358
  }, Ge = () => {
@@ -358,7 +366,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
358
366
  e.requestFullscreen?.().catch(() => {
359
367
  });
360
368
  }
361
- }, Re = i(() => {
369
+ }, Ce = i(() => {
362
370
  const e = ce.current;
363
371
  e && e.scrollTo({
364
372
  top: e.scrollHeight,
@@ -370,7 +378,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
370
378
  X.current = !0, F.current = null, Y(!0), p(!1), f(!0), H(), T();
371
379
  }, [T, H, f]), Qe = i(
372
380
  (e) => {
373
- if (M) {
381
+ if (O) {
374
382
  p(!1);
375
383
  return;
376
384
  }
@@ -383,15 +391,15 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
383
391
  [
384
392
  A,
385
393
  q,
386
- M
394
+ O
387
395
  ]
388
396
  ), Xe = i(
389
397
  (e) => {
390
398
  const t = y[e]?.audioKey;
391
- if (!t || !v || t !== v)
399
+ if (!t || !S || t !== S)
392
400
  return;
393
401
  const s = g.findIndex(
394
- (o) => o === t
402
+ (l) => l === t
395
403
  );
396
404
  if (s < 0) {
397
405
  k(null);
@@ -402,51 +410,51 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
402
410
  k(r);
403
411
  return;
404
412
  }
405
- if (k(null), be(!0), p(!1), E) {
406
- const o = d + 1, x = K[o];
407
- M && x?.type === "interaction" && (F.current = o), T();
413
+ if (k(null), we(!0), p(!1), P) {
414
+ const l = d + 1, x = K[l];
415
+ O && x?.type === "interaction" && (F.current = l), T();
408
416
  }
409
417
  },
410
418
  [
411
419
  y,
412
- E,
420
+ P,
413
421
  d,
414
- v,
422
+ S,
415
423
  g,
416
424
  T,
417
- M,
425
+ O,
418
426
  K
419
427
  ]
420
428
  ), Ze = i(() => {
421
- l && J((e) => !e);
422
- }, [l]), je = i(
429
+ o && J((e) => !e);
430
+ }, [o]), je = i(
423
431
  (e) => {
424
432
  e.stopPropagation(), L && f(!0);
425
433
  },
426
- [Ie, f]
434
+ [be, f]
427
435
  ), et = i(
428
436
  (e) => {
429
- pe?.(e), Y(!0), f(!0);
437
+ he?.(e), Y(!0), f(!0);
430
438
  },
431
- [pe, f]
432
- ), tt = !!l && ne, le = c(
439
+ [he, f]
440
+ ), tt = !!o && ne, le = c(
433
441
  () => b.map(
434
442
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
435
443
  ),
436
444
  [b]
437
445
  );
438
446
  return m(() => {
439
- const e = ge.current, a = (e.length > 0 && e.length < le.length && e.every((o, x) => o === le[x]) ? b.slice(e.length) : []).some(
440
- (o) => o.is_new === !1
447
+ const e = xe.current, a = (e.length > 0 && e.length < le.length && e.every((l, x) => l === le[x]) ? b.slice(e.length) : []).some(
448
+ (l) => l.is_new === !1
441
449
  );
442
- if (ge.current = le, !a)
450
+ if (xe.current = le, !a)
443
451
  return;
444
452
  const r = window.requestAnimationFrame(() => {
445
- const o = ce.current, x = he.current;
446
- if (!o || !x)
453
+ const l = ce.current, x = ge.current;
454
+ if (!l || !x)
447
455
  return;
448
- const nt = o.getBoundingClientRect(), rt = x.getBoundingClientRect(), ot = o.scrollTop + (rt.top - nt.top);
449
- o.scrollTo({
456
+ const nt = l.getBoundingClientRect(), rt = x.getBoundingClientRect(), ot = l.scrollTop + (rt.top - nt.top);
457
+ l.scrollTo({
450
458
  top: Math.max(ot, 0),
451
459
  behavior: "smooth"
452
460
  });
@@ -458,29 +466,29 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
458
466
  if (!X.current || (X.current = !1, b.length === 0))
459
467
  return;
460
468
  const e = window.requestAnimationFrame(() => {
461
- Re();
469
+ Ce();
462
470
  });
463
471
  return () => {
464
472
  window.cancelAnimationFrame(e);
465
473
  };
466
- }, [b, Re]), /* @__PURE__ */ n.jsxs(
474
+ }, [b, Ce]), /* @__PURE__ */ n.jsxs(
467
475
  "section",
468
476
  {
469
477
  ref: ae,
470
- className: Q("relative h-full w-full", Fe),
478
+ className: Q("relative h-full w-full", Ke),
471
479
  onPointerDown: et,
472
- ...Ke,
480
+ ...ke,
473
481
  children: [
474
482
  /* @__PURE__ */ n.jsx(
475
483
  "div",
476
484
  {
477
485
  className: Q(
478
486
  "h-full min-h-0 w-full",
479
- qe ? "slide-content--single" : "grid gap-4"
487
+ Le ? "slide-content--single" : "grid gap-4"
480
488
  ),
481
- children: b.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: ce, className: "slide-stage__layer w-full", children: Oe.map(
489
+ children: b.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: ce, className: "slide-stage__layer w-full", children: He.map(
482
490
  (e, t) => {
483
- const s = t === He;
491
+ const s = t === $e;
484
492
  return /* @__PURE__ */ n.jsx(
485
493
  "div",
486
494
  {
@@ -498,7 +506,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
498
506
  ) }) }) : null
499
507
  }
500
508
  ),
501
- Le ? /* @__PURE__ */ n.jsxs("div", { className: "pointer-events-none absolute left-1/2 top-1/2 z-[3] flex size-28 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center gap-2 rounded-2xl bg-foreground/65 px-3 py-4 text-center text-xs leading-4 font-medium text-background shadow-lg backdrop-blur-sm", children: [
509
+ Oe ? /* @__PURE__ */ n.jsxs("div", { className: "pointer-events-none absolute left-1/2 top-1/2 z-[3] flex size-28 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center gap-2 rounded-2xl bg-foreground/65 px-3 py-4 text-center text-xs leading-4 font-medium text-background shadow-lg backdrop-blur-sm", children: [
502
510
  /* @__PURE__ */ n.jsx(pt, { className: "size-5 animate-spin text-background" }),
503
511
  /* @__PURE__ */ n.jsx("span", { children: se })
504
512
  ] }) : null,
@@ -507,29 +515,29 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
507
515
  {
508
516
  className: Q(
509
517
  "slide-interaction-overlay",
510
- L && S ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
518
+ L && v ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
511
519
  ),
512
520
  onClick: je,
513
521
  onPointerDown: je,
514
522
  style: Me,
515
523
  children: /* @__PURE__ */ n.jsx(
516
- Be,
524
+ Fe,
517
525
  {
518
- content: String(l?.content ?? ""),
519
- defaultButtonText: Te.buttonText ?? "",
520
- defaultInputText: Te.inputText ?? "",
526
+ content: String(o?.content ?? ""),
527
+ defaultButtonText: Pe.buttonText ?? "",
528
+ defaultInputText: Pe.inputText ?? "",
521
529
  defaultSelectedValues: ze,
522
- confirmButtonText: N?.confirmButtonText,
523
- copyButtonText: N?.copyButtonText,
524
- copiedButtonText: N?.copiedButtonText,
530
+ confirmButtonText: j?.confirmButtonText,
531
+ copyButtonText: j?.copyButtonText,
532
+ copiedButtonText: j?.copiedButtonText,
525
533
  onSend: De,
526
- readonly: Ce,
527
- title: N?.title ?? ie ?? "Submit the content below to continue."
534
+ readonly: Re,
535
+ title: j?.title ?? ie ?? "Submit the content below to continue."
528
536
  }
529
537
  )
530
538
  }
531
539
  ) : null,
532
- S ? /* @__PURE__ */ n.jsx(
540
+ v ? /* @__PURE__ */ n.jsx(
533
541
  ct,
534
542
  {
535
543
  audioList: y,
@@ -540,16 +548,16 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
540
548
  ),
541
549
  currentAudioIndex: de,
542
550
  defaultPlaying: !0,
543
- hasInteraction: !!l,
551
+ hasInteraction: !!o,
544
552
  isInteractionOpen: ne,
545
553
  onLoadingChange: Qe,
546
- nextDisabled: !E,
554
+ nextDisabled: !P,
547
555
  onEnded: Xe,
548
556
  onFullscreen: Ge,
549
557
  onInteractionToggle: Ze,
550
558
  onNext: Je,
551
559
  onPrev: Ye,
552
- prevDisabled: !ke,
560
+ prevDisabled: !qe,
553
561
  showControls: L,
554
562
  customActions: I
555
563
  }
@@ -559,6 +567,6 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
559
567
  );
560
568
  };
561
569
  export {
562
- Bt as default
570
+ Nt as default
563
571
  };
564
572
  //# sourceMappingURL=Slide.es.js.map