markdown-flow-ui 0.2.26-dev.5 → 0.2.26-dev.7

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.
@@ -16,7 +16,7 @@ import so from "./useSlide.es.js";
16
16
  import co from "./useWakePlayerFromIframe.es.js";
17
17
  import { PlayerKeyboardShortcutContext as uo } from "./utils/playerKeyboardShortcutContext.es.js";
18
18
  import { activatePlayerKeyboardShortcutOwner as fo } from "./utils/playerKeyboardShortcuts.es.js";
19
- import { DEFAULT_MOBILE_VIEW_MODE as gt, resolveMobileViewModeState as mo } from "./utils/mobileScreenMode.es.js";
19
+ import { DEFAULT_MOBILE_VIEW_MODE as vt, resolveMobileViewModeState as mo } from "./utils/mobileScreenMode.es.js";
20
20
  import { shouldRenderInteractionOverlay as po, clampInteractionOverlayDragOffset as Vn, shouldPresentInteractionOverlay as yo } from "./utils/interactionPlayback.es.js";
21
21
  import { resolveMarkdownScalingMode as ho } from "./utils/markdownScaling.es.js";
22
22
  import { shouldWakePlayerControlsAfterNavigation as $t } from "./utils/playerNavigationContext.es.js";
@@ -35,7 +35,7 @@ import { getSlideLocaleTexts as ko, DEFAULT_SLIDE_BUFFERING_TEXTS as Lo } from "
35
35
  /* empty css */
36
36
  import zt from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
37
37
  import Fo from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
38
- const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
38
+ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, St = {
39
39
  x: 0,
40
40
  y: 0
41
41
  }, Jt = 0.5, Ko = typeof window > "u" ? s : Wr, qo = [
@@ -58,33 +58,33 @@ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
58
58
  ({
59
59
  content: c,
60
60
  title: d,
61
- dragHandleAriaLabel: $,
61
+ dragHandleAriaLabel: z,
62
62
  locale: Ee,
63
- dir: z,
64
- lang: X,
63
+ dir: X,
64
+ lang: J,
65
65
  defaultButtonText: Ce,
66
- defaultInputText: se,
66
+ defaultInputText: ce,
67
67
  defaultSelectedValues: $e,
68
- confirmButtonText: St,
69
- copyButtonText: J,
70
- copiedButtonText: It,
68
+ confirmButtonText: It,
69
+ copyButtonText: W,
70
+ copiedButtonText: bt,
71
71
  onSend: Te,
72
72
  onDragHandlePointerCancel: ze,
73
- onDragHandlePointerDown: bt,
73
+ onDragHandlePointerDown: Xe,
74
74
  onDragHandlePointerMove: At,
75
- onDragHandlePointerUp: Xe,
76
- readonly: Je = !1
75
+ onDragHandlePointerUp: Je,
76
+ readonly: We = !1
77
77
  }) => /* @__PURE__ */ Ge("div", { className: "slide-player__interaction-card", children: [
78
78
  /* @__PURE__ */ u(
79
79
  "button",
80
80
  {
81
81
  type: "button",
82
82
  className: "slide-player__interaction-drag-handle",
83
- "aria-label": $,
83
+ "aria-label": z,
84
84
  onPointerCancel: ze,
85
- onPointerDown: bt,
85
+ onPointerDown: Xe,
86
86
  onPointerMove: At,
87
- onPointerUp: Xe,
87
+ onPointerUp: Je,
88
88
  children: /* @__PURE__ */ Ge("span", { className: "slide-player__interaction-drag-handle-icon", children: [
89
89
  /* @__PURE__ */ u(zt, { "aria-hidden": "true" }),
90
90
  /* @__PURE__ */ u(zt, { "aria-hidden": "true" }),
@@ -98,51 +98,51 @@ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
98
98
  {
99
99
  content: c,
100
100
  locale: Ee,
101
- dir: z,
102
- lang: X,
101
+ dir: X,
102
+ lang: J,
103
103
  defaultButtonText: Ce,
104
- defaultInputText: se,
104
+ defaultInputText: ce,
105
105
  defaultSelectedValues: $e,
106
- confirmButtonText: St,
107
- copyButtonText: J,
108
- copiedButtonText: It,
106
+ confirmButtonText: It,
107
+ copyButtonText: W,
108
+ copiedButtonText: bt,
109
109
  onSend: Te,
110
- readonly: Je,
110
+ readonly: We,
111
111
  sandboxMode: "content"
112
112
  }
113
113
  ) })
114
114
  ] })
115
115
  );
116
116
  Yn.displayName = "InteractionOverlayCard";
117
- const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
118
- const z = d[Ee];
119
- return $.sequence_number === z?.sequence_number && $.type === z?.type && $.content === z?.content;
117
+ const $o = (c, d) => c.length === d.length && c.every((z, Ee) => {
118
+ const X = d[Ee];
119
+ return z.sequence_number === X?.sequence_number && z.type === X?.type && z.content === X?.content;
120
120
  }), Xt = (c) => c instanceof HTMLElement && !!c.closest(qo), Oi = ({
121
121
  elementList: c = [],
122
122
  locale: d,
123
- playerEnabled: $,
123
+ playerEnabled: z,
124
124
  playerControlsVisibility: Ee,
125
- playerClassName: z,
126
- fullscreenHeader: X,
125
+ playerClassName: X,
126
+ fullscreenHeader: J,
127
127
  playerCustomActions: Ce,
128
- playerCustomActionPauseOnActive: se = !0,
128
+ playerCustomActionPauseOnActive: ce = !0,
129
129
  bufferingText: $e,
130
- interactionTitle: St,
131
- interactionTexts: J,
132
- playerTexts: It,
130
+ interactionTitle: It,
131
+ interactionTexts: W,
132
+ playerTexts: bt,
133
133
  playerAutoHideDelay: Te = 3e3,
134
134
  markerAutoAdvanceDelay: ze = No,
135
- showSlideProgress: bt = !1,
135
+ showSlideProgress: Xe = !1,
136
136
  isSlideProgressGenerating: At = !1,
137
- onSlideProgressNavigate: Xe,
138
- interactionDefaultValueOptions: Je,
137
+ onSlideProgressNavigate: Je,
138
+ interactionDefaultValueOptions: We,
139
139
  onSend: jt,
140
140
  onPlayerVisibilityChange: wt,
141
141
  onMobileViewModeChange: Qt,
142
142
  onStepChange: Zt,
143
143
  onPlaybackCheckpoint: Gn,
144
144
  playbackRestoreRequest: U = null,
145
- enableKeyboardShortcuts: ce = !0,
145
+ enableKeyboardShortcuts: ue = !0,
146
146
  enableIframeScaling: $n = !0,
147
147
  enableMarkdownScaling: zn = !0,
148
148
  disableLoadingOverlay: F = !1,
@@ -153,7 +153,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
153
153
  onFocusCapture: tn,
154
154
  ...jn
155
155
  }) => {
156
- const W = Jn ?? Zr(d), Re = Wn ?? eo(d), N = f(() => ko(d), [d]), Qn = f(
156
+ const j = Jn ?? Zr(d), Re = Wn ?? eo(d), N = f(() => ko(d), [d]), Qn = f(
157
157
  () => Yo(
158
158
  $e,
159
159
  N.bufferingText
@@ -161,11 +161,11 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
161
161
  [$e, N.bufferingText]
162
162
  ), {
163
163
  playerEnabled: Zn,
164
- playerControlsVisibility: j
164
+ playerControlsVisibility: Q
165
165
  } = Oo({
166
- playerEnabled: $,
166
+ playerEnabled: z,
167
167
  playerControlsVisibility: Ee
168
- }), We = Jr(), ue = m(null), { resolvedDirection: er } = Qr(ue, W), xt = m(null), je = m(null), nn = m(null), de = m(null), Qe = m(!1), _e = m(null), Ze = m(null), Q = m(null), Oe = m(null), Me = m(null), fe = m(null), ke = m(null), rn = m([]), me = m(!1), H = m(null), Le = m(null), on = m(0), Pt = m(null), ln = m({
168
+ }), je = Jr(), de = m(null), { resolvedDirection: er } = Qr(de, j), xt = m(null), Qe = m(null), nn = m(null), fe = m(null), Ze = m(!1), _e = m(null), et = m(null), Z = m(null), Oe = m(null), Me = m(null), me = m(null), ke = m(null), rn = m([]), pe = m(!1), H = m(null), Le = m(null), on = m(0), Pt = m(null), ln = m({
169
169
  markerCount: 0,
170
170
  currentIndex: -1,
171
171
  canGoNext: !1
@@ -175,95 +175,95 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
175
175
  slideElementList: S,
176
176
  currentIndex: a,
177
177
  audioList: y,
178
- audioSlideIndexes: Z,
179
- currentAudioSequenceIndexes: et,
178
+ audioSlideIndexes: ee,
179
+ currentAudioSequenceIndexes: tt,
180
180
  currentStepHasSpeakableElement: w,
181
181
  currentInteractionElement: h,
182
182
  canGoPrev: tr,
183
183
  canGoNext: R,
184
184
  handlePrev: sn,
185
185
  handleNext: D,
186
- handleGoTo: pe
186
+ handleGoTo: ye
187
187
  } = so(c), Fe = f(() => {
188
188
  if (!(a < 0))
189
189
  return S[a];
190
- }, [a, S]), ye = f(
190
+ }, [a, S]), he = f(
191
191
  () => T.map(
192
192
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
193
193
  ),
194
194
  [T]
195
195
  ), cn = S.length, nr = cn === 1, x = Zn && (S.length > 0 || y.length > 0 || !!h), rr = f(
196
196
  () => ({
197
- enabled: ce,
198
- ownerId: We
197
+ enabled: ue,
198
+ ownerId: je
199
199
  }),
200
- [ce, We]
200
+ [ue, je]
201
201
  ), Y = r(() => {
202
- !ce || !x || fo(We);
203
- }, [ce, We, x]), _ = f(
204
- () => et.map((e) => y[e]?.audioKey).filter((e) => !!e),
205
- [y, et]
206
- ), [or, Ne] = p(!0), [tt, ee] = p(!1), [Ct, Tt] = p(!0), [De, un] = p(!0), [P, B] = p(null), [nt, dn] = p(null), Be = m(
202
+ !ue || !x || fo(je);
203
+ }, [ue, je, x]), _ = f(
204
+ () => tt.map((e) => y[e]?.audioKey).filter((e) => !!e),
205
+ [y, tt]
206
+ ), [or, Ne] = p(!0), [nt, te] = p(!1), [Ct, Tt] = p(!0), [De, un] = p(!0), [P, B] = p(null), [rt, dn] = p(null), Be = m(
207
207
  null
208
- ), fn = m(null), [ir, mn] = p(null), [lr, I] = p(!1), [ar, Rt] = p(Wt), [O, rt] = p(!1), ot = m(/* @__PURE__ */ new Set()), [sr, it] = p(!1), [pn, cr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [he, lt] = p(!1), [yn, at] = p(!1), [E, kt] = p(
209
- vt
208
+ ), fn = m(null), [ir, mn] = p(null), [lr, I] = p(!1), [ar, Rt] = p(Wt), [O, ot] = p(!1), it = m(/* @__PURE__ */ new Set()), [sr, lt] = p(!1), [pn, cr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [ge, at] = p(!1), [yn, st] = p(!1), [E, kt] = p(
209
+ St
210
210
  ), [Lt, Ft] = p(!1), [
211
211
  ur,
212
- ge
213
- ] = p(0), [hn, dr] = p(!1), V = f(() => ro(), []), [st, Nt] = p(
214
- gt
212
+ ve
213
+ ] = p(0), [hn, dr] = p(!1), V = f(() => ro(), []), [ct, Nt] = p(
214
+ vt
215
215
  ), [gn, Dt] = p(!1), [fr, vn] = p(
216
216
  () => V ? Bn() : !1
217
- ), ve = f(() => Po(), []), {
218
- effectiveMobileViewMode: te,
219
- isImmersiveMobileFullscreen: Se,
217
+ ), Se = f(() => Po(), []), {
218
+ effectiveMobileViewMode: ne,
219
+ isImmersiveMobileFullscreen: Ie,
220
220
  isNativeMobileFullscreen: Sn,
221
221
  shouldRotateFullscreenViewport: mr
222
222
  } = f(
223
223
  () => mo({
224
224
  hasManualMobileViewMode: gn,
225
225
  isMobileDevice: V,
226
- mobileViewMode: st
226
+ mobileViewMode: ct
227
227
  }),
228
228
  [
229
229
  gn,
230
230
  V,
231
231
  fr,
232
- st
232
+ ct
233
233
  ]
234
- ), In = m(te), {
234
+ ), In = m(ne), {
235
235
  controlsVisible: K,
236
- layoutReserved: ct
236
+ layoutReserved: ut
237
237
  } = Mo({
238
238
  isAutoVisible: or,
239
- playerControlsVisibility: j,
239
+ playerControlsVisibility: Q,
240
240
  shouldMountPlayer: x
241
- }), pr = Se && K, yr = Se && ct, hr = Se || Sn, bn = hn && !V, gr = r(
241
+ }), pr = Ie && K, yr = Ie && ut, hr = Ie || Sn, bn = hn && !V, gr = r(
242
242
  (e) => {
243
243
  Dt(!0), Nt(e);
244
244
  },
245
245
  []
246
246
  ), An = r(() => {
247
- Dt(!1), Nt(gt);
247
+ Dt(!1), Nt(vt);
248
248
  }, []), vr = r(() => {
249
- An(), X?.onBack?.();
250
- }, [X, An]), M = r(() => {
251
- Q.current !== null && (window.clearTimeout(Q.current), Q.current = null);
249
+ An(), J?.onBack?.();
250
+ }, [J, An]), M = r(() => {
251
+ Z.current !== null && (window.clearTimeout(Z.current), Z.current = null);
252
252
  }, []), k = r(() => {
253
253
  Oe.current !== null && (window.clearTimeout(Oe.current), Oe.current = null);
254
- }, []), ut = r(() => {
255
- M(), k(), lt(!1), ge(0);
256
- }, [M, k]), dt = r(
254
+ }, []), dt = r(() => {
255
+ M(), k(), at(!1), ve(0);
256
+ }, [M, k]), ft = r(
257
257
  (e) => {
258
- e && ut(), Ot(e);
258
+ e && dt(), Ot(e);
259
259
  },
260
- [ut]
260
+ [dt]
261
261
  ), wn = r(() => {
262
- ut(), Ot((e) => !e);
263
- }, [ut]), ne = r(() => {
262
+ dt(), Ot((e) => !e);
263
+ }, [dt]), re = r(() => {
264
264
  kt(
265
- (e) => e.x === vt.x && e.y === vt.y ? e : vt
266
- ), Ft(!1), ke.current = null, fe.current = null;
265
+ (e) => e.x === St.x && e.y === St.y ? e : St
266
+ ), Ft(!1), ke.current = null, me.current = null;
267
267
  }, []), { mountedStepStates: Sr, currentMountedStateIndex: Ir } = f(() => {
268
268
  const e = [], t = /* @__PURE__ */ new Map();
269
269
  return an.forEach((n, i) => {
@@ -287,7 +287,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
287
287
  };
288
288
  }, [a, an]), xn = f(() => String(a), [a]), C = f(() => P ? y.findIndex(
289
289
  (e) => (e.audioKey ?? "") === P
290
- ) : -1, [y, P]), ft = f(
290
+ ) : -1, [y, P]), mt = f(
291
291
  () => C >= 0 ? y[C] : void 0,
292
292
  [y, C]
293
293
  );
@@ -299,23 +299,23 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
299
299
  );
300
300
  if (e < 0)
301
301
  return;
302
- const t = Z[e];
303
- t != null && (fn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, dn(U), a !== t && pe(t));
302
+ const t = ee[e];
303
+ t != null && (fn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, dn(U), a !== t && ye(t));
304
304
  }, [
305
305
  y,
306
- Z,
306
+ ee,
307
307
  a,
308
- pe,
308
+ ye,
309
309
  U
310
310
  ]);
311
- const br = ft?.element?.subtitle_cues ?? [], mt = f(
311
+ const br = mt?.element?.subtitle_cues ?? [], pt = f(
312
312
  () => _[0] ?? "none",
313
313
  [_]
314
314
  ), Bt = f(
315
315
  () => ({
316
316
  currentElement: wo({
317
317
  currentAudioIndex: C,
318
- currentAudioSequenceIndexes: et,
318
+ currentAudioSequenceIndexes: tt,
319
319
  audioList: y,
320
320
  currentInteractionElement: b,
321
321
  currentStepElement: Fe
@@ -323,31 +323,31 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
323
323
  currentIndex: a,
324
324
  currentStepElement: Fe,
325
325
  isActive: _t,
326
- setActive: dt,
326
+ setActive: ft,
327
327
  toggleActive: wn
328
328
  }),
329
329
  [
330
330
  b,
331
331
  y,
332
332
  C,
333
- et,
333
+ tt,
334
334
  a,
335
335
  Fe,
336
336
  _t,
337
- dt,
337
+ ft,
338
338
  wn
339
339
  ]
340
- ), pt = f(
340
+ ), yt = f(
341
341
  () => xo(
342
342
  Ce,
343
343
  Bt
344
344
  ),
345
345
  [Bt, Ce]
346
- ), Vt = pt > 0, Kt = Vt && _t, Ar = f(
346
+ ), Vt = yt > 0, Kt = Vt && _t, Ar = f(
347
347
  () => ({
348
- "--slide-player-custom-action-count": String(pt),
348
+ "--slide-player-custom-action-count": String(yt),
349
349
  "--slide-player-mobile-control-count": String(
350
- pt + 4
350
+ yt + 4
351
351
  ),
352
352
  "--slide-interaction-drag-x": `${E.x}px`,
353
353
  "--slide-interaction-drag-y": `${E.y}px`
@@ -355,23 +355,23 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
355
355
  [
356
356
  E.x,
357
357
  E.y,
358
- pt
358
+ yt
359
359
  ]
360
360
  ), Pn = _.length > 0, En = f(() => h ? `${h.sequence_number ?? "none"}:${String(
361
361
  h.content ?? ""
362
- )}` : "none", [h]), Ie = f(
362
+ )}` : "none", [h]), be = f(
363
363
  () => [xn, En].join("|"),
364
364
  [En, xn]
365
365
  ), wr = f(
366
366
  () => [
367
- Ie,
368
- ft?.audioKey ?? "none",
367
+ be,
368
+ mt?.audioKey ?? "none",
369
369
  String(C)
370
370
  ].join("|"),
371
- [C, ft?.audioKey, Ie]
372
- ), Cn = !!f(() => !mt || mt === "none" ? "" : y.find(
373
- (t) => t.audioKey === mt
374
- )?.audioUrl?.trim() ?? "", [y, mt]), re = se && Kt, Ve = f(
371
+ [C, mt?.audioKey, be]
372
+ ), Cn = !!f(() => !pt || pt === "none" ? "" : y.find(
373
+ (t) => t.audioKey === pt
374
+ )?.audioUrl?.trim() ?? "", [y, pt]), oe = ce && Kt, Ve = f(
375
375
  () => Co({
376
376
  canGoNext: R,
377
377
  currentAudioIndex: C,
@@ -398,26 +398,26 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
398
398
  ze
399
399
  ]
400
400
  ), Rn = Tn.delayMs, Ke = Tn.usesImageOnlyDelay, qt = f(
401
- () => `${a}:${ye.join("|")}`,
402
- [a, ye]
401
+ () => `${a}:${he.join("|")}`,
402
+ [a, he]
403
403
  ), [xr, Pr] = p(null), _n = !Ke || xr === qt, q = r(() => {
404
- de.current !== null && (window.clearTimeout(de.current), de.current = null);
405
- }, []), be = r(() => {
404
+ fe.current !== null && (window.clearTimeout(fe.current), fe.current = null);
405
+ }, []), Ae = r(() => {
406
406
  _e.current !== null && (window.clearTimeout(_e.current), _e.current = null);
407
407
  }, []), G = r(() => {
408
- Ze.current !== null && (window.clearTimeout(Ze.current), Ze.current = null);
408
+ et.current !== null && (window.clearTimeout(et.current), et.current = null);
409
409
  }, []), L = r(
410
410
  (e = {}) => {
411
- be(), M(), k(), G(), B(null), ve.reset(), I(!1), Rt(Wt), rt(!1), ot.current = /* @__PURE__ */ new Set(), it(!1), mn(null), e.preservePendingSubtitleJump || (Le.current = null), Mt(void 0), lt(!1), ge(0);
411
+ Ae(), M(), k(), G(), B(null), Se.reset(), I(!1), Rt(Wt), ot(!1), it.current = /* @__PURE__ */ new Set(), lt(!1), mn(null), e.preservePendingSubtitleJump || (Le.current = null), Mt(void 0), at(!1), ve(0);
412
412
  },
413
413
  [
414
- be,
414
+ Ae,
415
415
  G,
416
416
  M,
417
417
  k,
418
- ve
418
+ Se
419
419
  ]
420
- ), yt = r(
420
+ ), ht = r(
421
421
  (e) => {
422
422
  on.current += 1, mn({
423
423
  ...e,
@@ -425,28 +425,28 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
425
425
  });
426
426
  },
427
427
  []
428
- ), Ae = r(() => {
428
+ ), we = r(() => {
429
429
  const e = vo(
430
430
  _,
431
- ot.current
431
+ it.current
432
432
  );
433
433
  return e ? (B(e), !0) : !1;
434
434
  }, [_]), qe = r(() => {
435
- M(), k(), lt(!1), ge(0), !Ae() && R && D();
435
+ M(), k(), at(!1), ve(0), !we() && R && D();
436
436
  }, [
437
437
  R,
438
438
  M,
439
439
  k,
440
440
  D,
441
- Ae
441
+ we
442
442
  ]), On = r(
443
443
  (e) => {
444
444
  if (k(), !e)
445
445
  return;
446
446
  const t = () => {
447
- Oe.current = null, ge(
447
+ Oe.current = null, ve(
448
448
  Bo
449
- ), lt(!0), H.current = null;
449
+ ), at(!0), H.current = null;
450
450
  };
451
451
  Oe.current = window.setTimeout(
452
452
  t,
@@ -455,29 +455,29 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
455
455
  },
456
456
  [k]
457
457
  ), Ut = r(
458
- () => Qe.current || !!ue.current?.querySelector(".slide-player__controls:hover"),
458
+ () => Ze.current || !!de.current?.querySelector(".slide-player__controls:hover"),
459
459
  []
460
460
  ), g = r(
461
- (e = tt) => {
462
- !x || j === "hidden" || (Ne(!0), q(), !(j === "visible" || !e || Te <= 0 || Ut()) && (de.current = window.setTimeout(() => {
461
+ (e = nt) => {
462
+ !x || Q === "hidden" || (Ne(!0), q(), !(Q === "visible" || !e || Te <= 0 || Ut()) && (fe.current = window.setTimeout(() => {
463
463
  if (Ut()) {
464
- de.current = null;
464
+ fe.current = null;
465
465
  return;
466
466
  }
467
- Ne(!1), de.current = null;
467
+ Ne(!1), fe.current = null;
468
468
  }, Te)));
469
469
  },
470
470
  [
471
471
  q,
472
- tt,
472
+ nt,
473
473
  Ut,
474
474
  Te,
475
- j,
475
+ Q,
476
476
  x
477
477
  ]
478
- ), Ue = !!Ao(h), oe = !!h && !Ue, Er = r((e) => {
478
+ ), Ue = !!Ao(h), ie = !!h && !Ue, Er = r((e) => {
479
479
  Tt(e);
480
- }, []), we = r(
480
+ }, []), $ = r(
481
481
  (e) => {
482
482
  e && Tt(e.shouldContinuePlayback);
483
483
  },
@@ -485,18 +485,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
485
485
  );
486
486
  s(() => {
487
487
  un(Ct);
488
- }, [a, Ct, se]), s(() => {
489
- se && dt(!1);
488
+ }, [a, Ct, ce]), s(() => {
489
+ ce && ft(!1);
490
490
  }, [
491
491
  a,
492
- se,
493
- dt
492
+ ce,
493
+ ft
494
494
  ]), s(() => {
495
495
  Vt || Ot(!1);
496
496
  }, [Vt]), s(() => () => {
497
- be(), G(), q(), M(), k();
497
+ Ae(), G(), q(), M(), k();
498
498
  }, [
499
- be,
499
+ Ae,
500
500
  G,
501
501
  M,
502
502
  k,
@@ -515,7 +515,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
515
515
  if (e)
516
516
  return;
517
517
  i();
518
- const v = je.current?.querySelector(
518
+ const v = Qe.current?.querySelector(
519
519
  '[data-active-step="true"]'
520
520
  );
521
521
  if (!v)
@@ -527,31 +527,31 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
527
527
  l();
528
528
  return;
529
529
  }
530
- const ie = [], Ye = () => {
530
+ const le = [], Ye = () => {
531
531
  e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
532
532
  t = null, o();
533
533
  }));
534
- }, Gt = (le, xe, ae) => {
535
- le.addEventListener(xe, ae, { once: !0 }), ie.push(
536
- () => le.removeEventListener(xe, ae)
534
+ }, Gt = (ae, xe, se) => {
535
+ ae.addEventListener(xe, se, { once: !0 }), le.push(
536
+ () => ae.removeEventListener(xe, se)
537
537
  );
538
538
  };
539
- A.forEach((le) => {
540
- const xe = le.contentDocument;
539
+ A.forEach((ae) => {
540
+ const xe = ae.contentDocument;
541
541
  if (!xe || xe.readyState !== "complete") {
542
- Gt(le, "load", Ye);
542
+ Gt(ae, "load", Ye);
543
543
  return;
544
544
  }
545
- Array.from(xe.images).filter((ae) => !ae.complete).forEach((ae) => {
546
- Gt(ae, "load", Ye), Gt(ae, "error", Ye);
545
+ Array.from(xe.images).filter((se) => !se.complete).forEach((se) => {
546
+ Gt(se, "load", Ye), Gt(se, "error", Ye);
547
547
  });
548
548
  }), n = () => {
549
- ie.forEach((le) => le());
549
+ le.forEach((ae) => ae());
550
550
  };
551
551
  };
552
552
  return t = window.requestAnimationFrame(() => {
553
553
  t = null, o();
554
- }), Ze.current = window.setTimeout(() => {
554
+ }), et.current = window.setTimeout(() => {
555
555
  l();
556
556
  }, To), () => {
557
557
  e = !0, i(), G(), t !== null && window.cancelAnimationFrame(t);
@@ -565,18 +565,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
565
565
  ]), s(() => (wt?.(K), () => {
566
566
  wt?.(!1);
567
567
  }), [wt, K]), s(() => {
568
- K || (Qe.current = !1);
568
+ K || (Ze.current = !1);
569
569
  }, [K]), s(() => {
570
- V || st === gt || (Dt(!1), Nt(gt));
571
- }, [V, st]), s(() => {
570
+ V || ct === vt || (Dt(!1), Nt(vt));
571
+ }, [V, ct]), s(() => {
572
572
  if (!V) {
573
573
  vn(!1);
574
574
  return;
575
575
  }
576
576
  const e = () => {
577
- vn(Bn()), ne();
577
+ vn(Bn()), re();
578
578
  }, t = () => {
579
- ne();
579
+ re();
580
580
  };
581
581
  e(), window.addEventListener("orientationchange", t), window.screen?.orientation?.addEventListener?.(
582
582
  "change",
@@ -591,11 +591,11 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
591
591
  t
592
592
  );
593
593
  };
594
- }, [V, ne]), s(() => {
595
- Qt?.(te);
596
- }, [te, Qt]), s(() => {
597
- In.current !== te && ne(), In.current = te;
598
- }, [te, ne]), s(() => {
594
+ }, [V, re]), s(() => {
595
+ Qt?.(ne);
596
+ }, [ne, Qt]), s(() => {
597
+ In.current !== ne && re(), In.current = ne;
598
+ }, [ne, re]), s(() => {
599
599
  Zt?.(Fe, a);
600
600
  }, [a, Fe, Zt]), s(() => {
601
601
  const e = ln.current, t = go(
@@ -632,37 +632,37 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
632
632
  Ve,
633
633
  S.length
634
634
  ]), s(() => {
635
- if (!x || j === "hidden") {
635
+ if (!x || Q === "hidden") {
636
636
  q(), Ne(!1);
637
637
  return;
638
638
  }
639
- if (j === "visible") {
639
+ if (Q === "visible") {
640
640
  q(), Ne(!0);
641
641
  return;
642
642
  }
643
- tt || g(!0);
643
+ nt || g(!0);
644
644
  }, [
645
645
  q,
646
- tt,
647
- j,
646
+ nt,
647
+ Q,
648
648
  x,
649
649
  g
650
650
  ]), s(() => {
651
651
  if (typeof window > "u")
652
652
  return;
653
653
  const e = (t) => {
654
- t.origin === window.location.origin && jr(t.data) && t.data.eventType === "click" && x && (Y(), ee(!0), g(!0));
654
+ t.origin === window.location.origin && jr(t.data) && t.data.eventType === "click" && x && (Y(), te(!0), g(!0));
655
655
  };
656
656
  return window.addEventListener("message", e), () => {
657
657
  window.removeEventListener("message", e);
658
658
  };
659
659
  }, [Y, x, g]), co({
660
- sectionRef: ue,
660
+ sectionRef: de,
661
661
  enabled: x,
662
- keyboardShortcutsEnabled: ce,
662
+ keyboardShortcutsEnabled: ue,
663
663
  onKeyboardShortcut: Y,
664
664
  onWake: () => {
665
- Y(), ee(!0), g(!0);
665
+ Y(), te(!0), g(!0);
666
666
  }
667
667
  }), s(() => {
668
668
  if (!x) {
@@ -670,19 +670,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
670
670
  return;
671
671
  }
672
672
  if (Be.current) {
673
- Pt.current = Ie;
673
+ Pt.current = be;
674
674
  return;
675
675
  }
676
676
  const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Io({
677
677
  previousResetKey: Pt.current,
678
- nextResetKey: Ie,
678
+ nextResetKey: be,
679
679
  currentAudioKey: P,
680
680
  hasCompletedCurrentStepAudio: O
681
681
  });
682
- Pt.current = Ie;
682
+ Pt.current = be;
683
683
  const n = H.current === a && !!h, i = yo({
684
684
  hasInteraction: !!h,
685
- shouldBlockPlaybackForInteraction: oe,
685
+ shouldBlockPlaybackForInteraction: ie,
686
686
  shouldOpenInteractionOverlayAfterAudio: n,
687
687
  hasPlaybackContextChanged: e,
688
688
  hasResolvedCurrentInteraction: Ue,
@@ -691,14 +691,14 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
691
691
  }), l = Le.current, o = l?.slideIndex === a;
692
692
  if (e && L({
693
693
  preservePendingSubtitleJump: o
694
- }), !(T.length === 0 && !h) && !re) {
694
+ }), !(T.length === 0 && !h) && !oe) {
695
695
  if (l?.slideIndex === a && Kn({
696
696
  currentIndex: a,
697
697
  resolvedCurrentInteractionElement: b,
698
698
  slideElementList: S,
699
699
  targetSlideIndex: l.slideIndex
700
700
  })) {
701
- Le.current = null, Et.current = !0, B(l.audioKey), yt({
701
+ Le.current = null, Et.current = !0, B(l.audioKey), ht({
702
702
  audioIndex: l.audioIndex,
703
703
  timeMs: l.timeMs
704
704
  });
@@ -708,7 +708,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
708
708
  On(h);
709
709
  return;
710
710
  }
711
- if (k(), H.current = null, !oe && t && !Ae()) {
711
+ if (k(), H.current = null, !ie && t && !we()) {
712
712
  if (w) {
713
713
  if (F) {
714
714
  I(!1);
@@ -721,19 +721,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
721
721
  return _e.current = window.setTimeout(() => {
722
722
  _e.current = null, D();
723
723
  }, Rn), () => {
724
- be();
724
+ Ae();
725
725
  };
726
726
  }
727
727
  }
728
728
  }, [
729
729
  b,
730
730
  R,
731
- be,
731
+ Ae,
732
732
  T.length,
733
733
  a,
734
734
  h,
735
735
  P,
736
- Ie,
736
+ be,
737
737
  w,
738
738
  Ke,
739
739
  _n,
@@ -744,18 +744,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
744
744
  De,
745
745
  Ue,
746
746
  Kt,
747
- oe,
747
+ ie,
748
748
  k,
749
749
  L,
750
- yt,
750
+ ht,
751
751
  On,
752
752
  x,
753
753
  S,
754
- Ae,
755
- re,
754
+ we,
755
+ oe,
756
756
  Ve
757
757
  ]), s(() => {
758
- if (F || re || !w || oe) {
758
+ if (F || oe || !w || ie) {
759
759
  I(!1);
760
760
  return;
761
761
  }
@@ -773,13 +773,13 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
773
773
  w,
774
774
  O,
775
775
  F,
776
- re,
777
- oe
776
+ oe,
777
+ ie
778
778
  ]), s(() => {
779
779
  O && So(
780
780
  _,
781
- ot.current
782
- ) && rt(!1);
781
+ it.current
782
+ ) && ot(!1);
783
783
  }, [_, O]), s(() => {
784
784
  if (Be.current)
785
785
  return;
@@ -789,24 +789,24 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
789
789
  currentAudioSequenceLength: _.length,
790
790
  currentStepHasSpeakableElement: w,
791
791
  hasCompletedCurrentStepAudio: O,
792
- shouldBlockPlaybackForInteraction: oe,
793
- shouldPausePlaybackForCustomAction: re,
792
+ shouldBlockPlaybackForInteraction: ie,
793
+ shouldPausePlaybackForCustomAction: oe,
794
794
  shouldSkipDefaultAudioStart: e
795
- }) && Ae();
795
+ }) && we();
796
796
  }, [
797
797
  P,
798
798
  _,
799
799
  w,
800
800
  O,
801
- re,
802
801
  oe,
803
- Ae
802
+ ie,
803
+ we
804
804
  ]), s(() => {
805
805
  !P || C >= 0 || B(null);
806
806
  }, [C, P]), s(() => {
807
- C >= 0 || ve.reset();
808
- }, [C, ve]), s(() => {
809
- it(!1);
807
+ C >= 0 || Se.reset();
808
+ }, [C, Se]), s(() => {
809
+ lt(!1);
810
810
  }, [wr]);
811
811
  const {
812
812
  interactionDefaults: Mn,
@@ -816,12 +816,12 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
816
816
  shouldAutoContinueInteraction: Ln
817
817
  } = f(
818
818
  () => Eo(b, {
819
- interactionDefaultValueOptions: Je
819
+ interactionDefaultValueOptions: We
820
820
  }),
821
- [b, Je]
821
+ [b, We]
822
822
  ), Rr = !!b?.readonly || Tr, He = po({
823
823
  hasActiveInteraction: !!b,
824
- isInteractionOverlayOpen: he
824
+ isInteractionOverlayOpen: ge
825
825
  }), _r = r(
826
826
  (e) => {
827
827
  const n = [
@@ -838,18 +838,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
838
838
  );
839
839
  s(() => {
840
840
  const e = () => {
841
- dr(document.fullscreenElement === ue.current);
841
+ dr(document.fullscreenElement === de.current);
842
842
  };
843
843
  return e(), document.addEventListener("fullscreenchange", e), () => {
844
844
  document.removeEventListener("fullscreenchange", e);
845
845
  };
846
846
  }, []), s(() => {
847
- b && he || at(!1);
848
- }, [b, he]), s(() => {
849
- ne();
850
- }, [b, ne]), s(() => {
847
+ b && ge || st(!1);
848
+ }, [b, ge]), s(() => {
849
+ re();
850
+ }, [b, re]), s(() => {
851
851
  if (!He) {
852
- ge(0);
852
+ ve(0);
853
853
  return;
854
854
  }
855
855
  const e = Me.current;
@@ -859,7 +859,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
859
859
  const i = Math.ceil(
860
860
  e.getBoundingClientRect().height
861
861
  );
862
- ge(
862
+ ve(
863
863
  i + Vo
864
864
  );
865
865
  };
@@ -872,16 +872,16 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
872
872
  n.disconnect();
873
873
  };
874
874
  }, [He]), s(() => {
875
- if (M(), !!he) {
875
+ if (M(), !!ge) {
876
876
  if (Ln)
877
- return Q.current = window.setTimeout(() => {
878
- Q.current = null, qe();
877
+ return Z.current = window.setTimeout(() => {
878
+ Z.current = null, qe();
879
879
  }, qn), () => {
880
880
  M();
881
881
  };
882
882
  if (!(yn || !kn))
883
- return Q.current = window.setTimeout(() => {
884
- Q.current = null, qe();
883
+ return Z.current = window.setTimeout(() => {
884
+ Z.current = null, qe();
885
885
  }, qn), () => {
886
886
  M();
887
887
  };
@@ -891,7 +891,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
891
891
  qe,
892
892
  yn,
893
893
  kn,
894
- he,
894
+ ge,
895
895
  Ln
896
896
  ]);
897
897
  const Or = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u(zr, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
@@ -901,7 +901,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
901
901
  disableLoadingOverlay: F,
902
902
  hideFullScreen: !0,
903
903
  locale: d,
904
- dir: W,
904
+ dir: j,
905
905
  lang: Re,
906
906
  mode: "blackboard",
907
907
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
@@ -916,7 +916,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
916
916
  disableLoadingOverlay: F,
917
917
  hideFullScreen: !0,
918
918
  locale: d,
919
- dir: W,
919
+ dir: j,
920
920
  lang: Re,
921
921
  mode: "blackboard",
922
922
  type: "markdown",
@@ -958,7 +958,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
958
958
  }
959
959
  );
960
960
  }, kr = r(() => {
961
- const e = ue.current;
961
+ const e = de.current;
962
962
  if (e) {
963
963
  if (document.fullscreenElement === e) {
964
964
  document.exitFullscreen().catch(() => {
@@ -969,7 +969,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
969
969
  });
970
970
  }
971
971
  }, []), Fn = r(() => {
972
- const e = je.current;
972
+ const e = Qe.current;
973
973
  e && e.scrollTo({
974
974
  top: e.scrollHeight,
975
975
  behavior: "smooth"
@@ -979,66 +979,67 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
979
979
  currentIndex: a,
980
980
  resolvedCurrentInteractionElement: b,
981
981
  slideElementList: S,
982
- targetSlideIndex: Z[e.audioIndex]
982
+ targetSlideIndex: ee[e.audioIndex]
983
983
  }),
984
984
  [
985
985
  b,
986
- Z,
986
+ ee,
987
987
  a,
988
988
  S
989
989
  ]
990
990
  ), Lr = r(
991
991
  (e, t) => {
992
- const i = y[e.audioIndex]?.audioKey, l = Z[e.audioIndex];
993
- return !i || l == null || !Ht(e) ? !1 : (we(t), H.current = null, I(!1), rt(!1), it(!1), $t(t) && (ee(!0), g(!0)), l === a ? (Le.current = null, L(), B(i), yt(e), !0) : (me.current = !0, L(), Le.current = {
992
+ const i = y[e.audioIndex]?.audioKey, l = ee[e.audioIndex];
993
+ return !i || l == null || !Ht(e) ? !1 : ($(t), H.current = null, I(!1), ot(!1), lt(!1), $t(t) && (te(!0), g(!0)), l === a ? (Le.current = null, L(), B(i), ht(e), !0) : (pe.current = !0, L(), Le.current = {
994
994
  audioIndex: e.audioIndex,
995
995
  audioKey: i,
996
996
  slideIndex: l,
997
997
  timeMs: e.timeMs
998
- }, pe(l), !0));
998
+ }, ye(l), !0));
999
999
  },
1000
1000
  [
1001
1001
  y,
1002
- Z,
1002
+ ee,
1003
1003
  Ht,
1004
1004
  a,
1005
- pe,
1006
- yt,
1005
+ ye,
1006
+ ht,
1007
1007
  L,
1008
1008
  g,
1009
- we
1009
+ $
1010
1010
  ]
1011
1011
  ), Fr = r(
1012
1012
  (e) => {
1013
- we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), L(), sn();
1013
+ $(e), pe.current = !0, H.current = null, I(!1), $t(e) && (te(!0), g(!0)), L(), sn();
1014
1014
  },
1015
1015
  [
1016
1016
  sn,
1017
1017
  L,
1018
1018
  g,
1019
- we
1019
+ $
1020
1020
  ]
1021
1021
  ), Nr = r(
1022
1022
  (e) => {
1023
- we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), L(), D();
1023
+ $(e), pe.current = !0, H.current = null, I(!1), $t(e) && (te(!0), g(!0)), L(), D();
1024
1024
  },
1025
1025
  [
1026
1026
  D,
1027
1027
  L,
1028
1028
  g,
1029
- we
1029
+ $
1030
1030
  ]
1031
1031
  ), Dr = r(
1032
- (e) => {
1033
- e < 0 || e >= S.length || e === a || (me.current = !0, H.current = null, I(!1), ee(!0), g(!0), L(), pe(e), Xe?.(S[e], e));
1032
+ (e, t) => {
1033
+ e < 0 || e >= S.length || e === a || ($(t), pe.current = !0, H.current = null, I(!1), te(!0), g(!0), L(), ye(e), Je?.(S[e], e));
1034
1034
  },
1035
1035
  [
1036
1036
  a,
1037
- pe,
1038
- Xe,
1037
+ ye,
1038
+ Je,
1039
1039
  L,
1040
1040
  g,
1041
- S
1041
+ S,
1042
+ $
1042
1043
  ]
1043
1044
  ), Br = r(
1044
1045
  ({
@@ -1069,7 +1070,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1069
1070
  const t = y[e]?.audioKey;
1070
1071
  if (!t || !P || t !== P)
1071
1072
  return;
1072
- ot.current.add(t);
1073
+ it.current.add(t);
1073
1074
  const n = _.findIndex(
1074
1075
  (o) => o === t
1075
1076
  );
@@ -1082,7 +1083,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1082
1083
  B(l);
1083
1084
  return;
1084
1085
  }
1085
- if (B(null), rt(!0), I(!1), R) {
1086
+ if (B(null), ot(!0), I(!1), R) {
1086
1087
  const o = a + 1, v = S[o];
1087
1088
  Cn && v?.type === "interaction" && (H.current = o), D();
1088
1089
  return;
@@ -1099,15 +1100,15 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1099
1100
  S
1100
1101
  ]
1101
1102
  ), Kr = r(() => {
1102
- Qe.current = !0, q(), x && Ne(!0);
1103
+ Ze.current = !0, q(), x && Ne(!0);
1103
1104
  }, [q, x]), qr = r(() => {
1104
- Qe.current = !1, g(!0);
1105
+ Ze.current = !1, g(!0);
1105
1106
  }, [g]), Yt = r(
1106
1107
  (e) => {
1107
1108
  e.stopPropagation(), K && g(!0);
1108
1109
  },
1109
1110
  [K, g]
1110
- ), ht = r(
1111
+ ), gt = r(
1111
1112
  (e, t) => {
1112
1113
  const n = xt.current;
1113
1114
  if (!n)
@@ -1125,12 +1126,12 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1125
1126
  Ko(() => {
1126
1127
  const e = Me.current;
1127
1128
  if (!He || !e) {
1128
- fe.current = null;
1129
+ me.current = null;
1129
1130
  return;
1130
1131
  }
1131
- const t = fe.current, n = e.getBoundingClientRect();
1132
+ const t = me.current, n = e.getBoundingClientRect();
1132
1133
  if (!t || Lt) {
1133
- fe.current = {
1134
+ me.current = {
1134
1135
  left: n.left,
1135
1136
  top: n.top
1136
1137
  };
@@ -1138,7 +1139,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1138
1139
  }
1139
1140
  const i = t.left - n.left, l = t.top - n.top;
1140
1141
  if (!Un(i) && !Un(l)) {
1141
- fe.current = {
1142
+ me.current = {
1142
1143
  left: n.left,
1143
1144
  top: n.top
1144
1145
  };
@@ -1147,33 +1148,33 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1147
1148
  const o = {
1148
1149
  x: E.x + i,
1149
1150
  y: E.y + l
1150
- }, v = ht(
1151
+ }, v = gt(
1151
1152
  e,
1152
1153
  E
1153
1154
  ), A = Uo(
1154
1155
  v ? Vn(o, v) : o
1155
1156
  );
1156
- fe.current = {
1157
+ me.current = {
1157
1158
  left: n.left + A.x - E.x,
1158
1159
  top: n.top + A.y - E.y
1159
1160
  }, Hn(
1160
1161
  A,
1161
1162
  E
1162
1163
  ) || kt(
1163
- (ie) => Hn(ie, A) ? ie : A
1164
+ (le) => Hn(le, A) ? le : A
1164
1165
  );
1165
1166
  }, [
1166
- ht,
1167
+ gt,
1167
1168
  E,
1168
1169
  Lt,
1169
- ct,
1170
+ ut,
1170
1171
  He
1171
1172
  ]);
1172
1173
  const Ur = r(
1173
1174
  (e) => {
1174
1175
  if (Yt(e), e.button !== 0 || !e.currentTarget.isConnected || !Me.current)
1175
1176
  return;
1176
- const t = ht(
1177
+ const t = gt(
1177
1178
  Me.current,
1178
1179
  E
1179
1180
  );
@@ -1186,7 +1187,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1186
1187
  }, Ft(!0));
1187
1188
  },
1188
1189
  [
1189
- ht,
1190
+ gt,
1190
1191
  E,
1191
1192
  Yt
1192
1193
  ]
@@ -1221,19 +1222,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1221
1222
  },
1222
1223
  [Y, tn]
1223
1224
  ), $r = r(() => {
1224
- ee(!0), g(!0);
1225
+ te(!0), g(!0);
1225
1226
  }, [g]);
1226
1227
  return s(() => {
1227
- const e = rn.current, i = (e.length > 0 && e.length < ye.length && e.every((o, v) => o === ye[v]) ? T.slice(e.length) : []).some(
1228
+ const e = rn.current, i = (e.length > 0 && e.length < he.length && e.every((o, v) => o === he[v]) ? T.slice(e.length) : []).some(
1228
1229
  (o) => o.is_new === !1
1229
1230
  );
1230
- if (rn.current = ye, !i)
1231
+ if (rn.current = he, !i)
1231
1232
  return;
1232
1233
  const l = window.requestAnimationFrame(() => {
1233
- const o = je.current, v = nn.current;
1234
+ const o = Qe.current, v = nn.current;
1234
1235
  if (!o || !v)
1235
1236
  return;
1236
- const A = o.getBoundingClientRect(), ie = v.getBoundingClientRect(), Ye = o.scrollTop + (ie.top - A.top);
1237
+ const A = o.getBoundingClientRect(), le = v.getBoundingClientRect(), Ye = o.scrollTop + (le.top - A.top);
1237
1238
  o.scrollTo({
1238
1239
  top: Math.max(Ye, 0),
1239
1240
  behavior: "smooth"
@@ -1242,8 +1243,8 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1242
1243
  return () => {
1243
1244
  window.cancelAnimationFrame(l);
1244
1245
  };
1245
- }, [T, ye]), s(() => {
1246
- if (!me.current || (me.current = !1, T.length === 0))
1246
+ }, [T, he]), s(() => {
1247
+ if (!pe.current || (pe.current = !1, T.length === 0))
1247
1248
  return;
1248
1249
  const e = window.requestAnimationFrame(() => {
1249
1250
  Fn();
@@ -1254,16 +1255,16 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1254
1255
  }, [T, Fn]), /* @__PURE__ */ Ge(
1255
1256
  "section",
1256
1257
  {
1257
- ref: ue,
1258
+ ref: de,
1258
1259
  className: Pe(
1259
1260
  "relative h-full w-full",
1260
1261
  V && "slide--mobile-device",
1261
1262
  bn && "slide--browser-fullscreen",
1262
- Se && "slide--mobile-landscape",
1263
+ Ie && "slide--mobile-landscape",
1263
1264
  Sn && "slide--mobile-landscape-native",
1264
1265
  Xn
1265
1266
  ),
1266
- dir: W,
1267
+ dir: j,
1267
1268
  lang: Re,
1268
1269
  onClick: $r,
1269
1270
  onFocusCapture: Gr,
@@ -1283,15 +1284,15 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1283
1284
  ref: xt,
1284
1285
  className: Pe(
1285
1286
  "slide__viewport relative h-full min-h-0 w-full",
1286
- Se && "slide__viewport--mobile-landscape",
1287
- Se && !mr && "slide__viewport--mobile-landscape-native"
1287
+ Ie && "slide__viewport--mobile-landscape",
1288
+ Ie && !mr && "slide__viewport--mobile-landscape-native"
1288
1289
  ),
1289
1290
  children: [
1290
1291
  pr ? /* @__PURE__ */ Ge("div", { className: "slide-landscape-header", children: [
1291
1292
  /* @__PURE__ */ u(
1292
1293
  "button",
1293
1294
  {
1294
- "aria-label": X?.backAriaLabel ?? N.fullscreenBackAriaLabel,
1295
+ "aria-label": J?.backAriaLabel ?? N.fullscreenBackAriaLabel,
1295
1296
  className: "slide-landscape-header__back",
1296
1297
  onClick: vr,
1297
1298
  type: "button",
@@ -1304,7 +1305,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1304
1305
  )
1305
1306
  }
1306
1307
  ),
1307
- X?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: X.content }) : null
1308
+ J?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: J.content }) : null
1308
1309
  ] }) : null,
1309
1310
  /* @__PURE__ */ u(
1310
1311
  "div",
@@ -1314,7 +1315,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1314
1315
  yr && "slide__viewport-content--with-header",
1315
1316
  nr ? "slide-content--single" : "grid gap-4"
1316
1317
  ),
1317
- children: T.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: je, className: "slide-stage__layer w-full", children: Sr.map(
1318
+ children: T.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: Qe, className: "slide-stage__layer w-full", children: Sr.map(
1318
1319
  (e, t) => {
1319
1320
  const n = t === Ir;
1320
1321
  return /* @__PURE__ */ u(
@@ -1349,9 +1350,9 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1349
1350
  ao,
1350
1351
  {
1351
1352
  extraBottomOffset: ur,
1352
- hasPlayerGap: ct,
1353
+ hasPlayerGap: ut,
1353
1354
  isEnabled: pn && sr,
1354
- playbackTimeStore: ve,
1355
+ playbackTimeStore: Se,
1355
1356
  subtitleCues: br
1356
1357
  }
1357
1358
  ),
@@ -1362,41 +1363,41 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1362
1363
  "data-player-keyboard-shortcuts-ignore": "true",
1363
1364
  className: Pe(
1364
1365
  "slide-interaction-overlay",
1365
- ct ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
1366
+ ut ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
1366
1367
  Lt && "slide-interaction-overlay--dragging"
1367
1368
  ),
1368
1369
  onClick: Yt,
1369
1370
  onPointerDownCapture: (e) => {
1370
- Xt(e.target) && at(!0);
1371
+ Xt(e.target) && st(!0);
1371
1372
  },
1372
1373
  onFocusCapture: (e) => {
1373
- Xt(e.target) && at(!0);
1374
+ Xt(e.target) && st(!0);
1374
1375
  },
1375
1376
  onInputCapture: (e) => {
1376
- Xt(e.target) && at(!0);
1377
+ Xt(e.target) && st(!0);
1377
1378
  },
1378
1379
  style: Ar,
1379
1380
  children: /* @__PURE__ */ u(
1380
1381
  Yn,
1381
1382
  {
1382
- dir: W,
1383
+ dir: j,
1383
1384
  lang: Re,
1384
1385
  content: String(b?.content ?? ""),
1385
- dragHandleAriaLabel: J?.dragHandleAriaLabel ?? N.interactionTexts.dragHandleAriaLabel,
1386
+ dragHandleAriaLabel: W?.dragHandleAriaLabel ?? N.interactionTexts.dragHandleAriaLabel,
1386
1387
  locale: d,
1387
1388
  defaultButtonText: Mn.buttonText ?? "",
1388
1389
  defaultInputText: Mn.inputText ?? "",
1389
1390
  defaultSelectedValues: Cr,
1390
- confirmButtonText: J?.confirmButtonText ?? N.interactionTexts.confirmButtonText,
1391
- copyButtonText: J?.copyButtonText ?? N.interactionTexts.copyButtonText,
1392
- copiedButtonText: J?.copiedButtonText ?? N.interactionTexts.copiedButtonText,
1391
+ confirmButtonText: W?.confirmButtonText ?? N.interactionTexts.confirmButtonText,
1392
+ copyButtonText: W?.copyButtonText ?? N.interactionTexts.copyButtonText,
1393
+ copiedButtonText: W?.copiedButtonText ?? N.interactionTexts.copiedButtonText,
1393
1394
  onSend: _r,
1394
1395
  onDragHandlePointerCancel: Nn,
1395
1396
  onDragHandlePointerDown: Ur,
1396
1397
  onDragHandlePointerMove: Hr,
1397
1398
  onDragHandlePointerUp: Nn,
1398
1399
  readonly: Rr,
1399
- title: J?.title ?? St ?? N.interactionTexts.title
1400
+ title: W?.title ?? It ?? N.interactionTexts.title
1400
1401
  }
1401
1402
  )
1402
1403
  }
@@ -1408,27 +1409,27 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1408
1409
  children: /* @__PURE__ */ u(
1409
1410
  io,
1410
1411
  {
1411
- dir: W === "auto" ? er : W,
1412
+ dir: j === "auto" ? er : j,
1412
1413
  lang: Re,
1413
1414
  audioList: y,
1414
1415
  className: Pe(
1415
1416
  "absolute left-1/2 z-[2] -translate-x-1/2",
1416
- bn ? "bottom-3" : "-bottom-3",
1417
- z,
1417
+ Xe ? "bottom-9" : bn ? "bottom-3" : "-bottom-3",
1418
+ X,
1418
1419
  !K && "pointer-events-none opacity-0"
1419
1420
  ),
1420
1421
  currentAudioIndex: C,
1421
1422
  defaultPlaying: Ct,
1422
- enableKeyboardShortcuts: ce,
1423
- isPlaybackPaused: re,
1423
+ enableKeyboardShortcuts: ue,
1424
+ isPlaybackPaused: oe,
1424
1425
  isAutoAdvanceEnabled: De,
1425
1426
  locale: d,
1426
- isInteractionOpen: he,
1427
+ isInteractionOpen: ge,
1427
1428
  isSubtitleEnabled: pn,
1428
1429
  onAutoAdvanceToggle: un,
1429
1430
  onLoadingChange: Br,
1430
1431
  onPlaybackStarted: () => {
1431
- it(!0);
1432
+ lt(!0);
1432
1433
  },
1433
1434
  onPlaybackCheckpoint: ({ audioKey: e, isComplete: t, timeMs: n }) => {
1434
1435
  const i = y.findIndex(
@@ -1438,12 +1439,12 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1438
1439
  audioKey: l.audioKey,
1439
1440
  element: l.element,
1440
1441
  isComplete: t,
1441
- stepIndex: Z[i] ?? a,
1442
+ stepIndex: ee[i] ?? a,
1442
1443
  timeMs: n
1443
1444
  });
1444
1445
  },
1445
1446
  onPlaybackPreferenceChange: Er,
1446
- onPlaybackTimeChange: ve.setTime,
1447
+ onPlaybackTimeChange: Se.setTime,
1447
1448
  onSubtitleToggle: () => {
1448
1449
  cr((e) => !e);
1449
1450
  },
@@ -1451,7 +1452,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1451
1452
  onEnded: Vr,
1452
1453
  onFullscreen: kr,
1453
1454
  isFullscreen: hn,
1454
- mobileViewMode: te,
1455
+ mobileViewMode: ne,
1455
1456
  settingsPortalContainer: xt.current,
1456
1457
  onMobileViewModeChange: gr,
1457
1458
  onControlsPointerEnter: Kr,
@@ -1462,7 +1463,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1462
1463
  canJumpToSubtitleTarget: Ht,
1463
1464
  prevDisabled: !tr,
1464
1465
  showControls: K,
1465
- slideProgress: bt ? {
1466
+ slideProgress: Xe ? {
1466
1467
  ariaLabel: N.slideProgressAriaLabel,
1467
1468
  currentIndex: a,
1468
1469
  generatingLabel: N.slideProgressGeneratingLabel,
@@ -1471,14 +1472,14 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1471
1472
  totalSteps: cn
1472
1473
  } : null,
1473
1474
  subtitleSeekRequest: ir,
1474
- playbackRestoreRequest: nt && nt.audioKey === ft?.audioKey ? {
1475
- id: nt.id,
1476
- timeMs: nt.timeMs
1475
+ playbackRestoreRequest: rt && rt.audioKey === mt?.audioKey ? {
1476
+ id: rt.id,
1477
+ timeMs: rt.timeMs
1477
1478
  } : null,
1478
1479
  onPlaybackRestoreComplete: (e) => {
1479
1480
  Be.current?.id === e && (Be.current = null, dn(null));
1480
1481
  },
1481
- texts: It,
1482
+ texts: bt,
1482
1483
  customActionContext: Bt,
1483
1484
  customActions: Ce,
1484
1485
  useAutoAdvanceToggle: Ve