bloom-player 2.20.2 → 2.21.0

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/lib/shared.es.js CHANGED
@@ -18,16 +18,16 @@ function Kt(s) {
18
18
  ei = s;
19
19
  }
20
20
  let Tr;
21
- function ra(s) {
21
+ function na(s) {
22
22
  Tr = s;
23
23
  }
24
24
  let Pn;
25
- function na(s) {
25
+ function oa(s) {
26
26
  Pn = s;
27
27
  }
28
28
  let Dn = () => {
29
29
  };
30
- function oa(s) {
30
+ function sa(s) {
31
31
  Dn = s ?? (() => {
32
32
  });
33
33
  }
@@ -35,7 +35,7 @@ let Sr = "";
35
35
  function as(s) {
36
36
  Sr = s;
37
37
  }
38
- function sa(s) {
38
+ function aa(s) {
39
39
  as(Mn(s));
40
40
  }
41
41
  function Mn(s) {
@@ -57,30 +57,30 @@ function cs(s) {
57
57
  }
58
58
  const us = "bloom-highlightSegment", zn = "ui-enableHighlight", Dr = "ui-disableHighlight", yr = "ui-suppressHighlight";
59
59
  let Di = 3;
60
- function aa(s) {
60
+ function la(s) {
61
61
  Di = s;
62
62
  }
63
63
  const Mi = "audio-sentence", In = "bloom-imageDescription";
64
- let Nt = null, di = 0;
64
+ let wt = null, di = 0;
65
65
  function fs(s) {
66
- s !== Nt && (di && clearTimeout(di), di = setTimeout(() => {
66
+ s !== wt && (di && clearTimeout(di), di = setTimeout(() => {
67
67
  di = 0;
68
- }, 3e3), Nt = s);
68
+ }, 3e3), wt = s);
69
69
  }
70
70
  function ds() {
71
- return Nt;
71
+ return wt;
72
72
  }
73
- let Mr, zi, Jt = "", Qe = [], Lt = [];
74
- const Ii = new mi(), Er = new mi(), Tn = new mi(), la = new mi(), Hi = new mi();
73
+ let Mr, zi, Jt = "", Qe = [], Nt = [];
74
+ const Ii = new mi(), Er = new mi(), Tn = new mi(), ca = new mi(), Hi = new mi();
75
75
  let pi = 0, Hn = !0;
76
- function ca(s) {
76
+ function ua(s) {
77
77
  Hn = s;
78
78
  }
79
79
  let Oi = null;
80
80
  function hs(s, c) {
81
- if (!s && !Nt)
81
+ if (!s && !wt)
82
82
  return;
83
- const d = s ?? Nt;
83
+ const d = s ?? wt;
84
84
  gi(Br(d, c), d);
85
85
  }
86
86
  function gi(s, c) {
@@ -192,7 +192,7 @@ function Rn() {
192
192
  _i();
193
193
  return;
194
194
  }
195
- Lt = [];
195
+ Nt = [];
196
196
  const d = c.getAttribute(
197
197
  "data-audioRecordingEndTimes"
198
198
  );
@@ -205,7 +205,7 @@ function Rn() {
205
205
  );
206
206
  for (let q = k - 1; q >= 0; --q) {
207
207
  const _ = Number(D[q]);
208
- isNaN(_) || Lt.push([
208
+ isNaN(_) || Nt.push([
209
209
  z.item(q),
210
210
  _
211
211
  ]);
@@ -237,10 +237,10 @@ function Wn(s, c) {
237
237
  });
238
238
  }
239
239
  function zr(s, c = 0) {
240
- const d = Lt.length;
240
+ const d = Nt.length;
241
241
  if (d <= 0)
242
242
  return;
243
- const h = Lt[d - 1], T = h[0], L = h[1];
243
+ const h = Nt[d - 1], T = h[0], L = h[1];
244
244
  Vn({
245
245
  newElement: T,
246
246
  shouldScrollToElement: !0,
@@ -258,7 +258,7 @@ function zr(s, c = 0) {
258
258
  function Fn(s) {
259
259
  if (s !== pi || ei === 5)
260
260
  return;
261
- const c = Lt.length;
261
+ const c = Nt.length;
262
262
  if (c <= 0)
263
263
  return;
264
264
  const d = document.getElementById(
@@ -266,7 +266,7 @@ function Fn(s) {
266
266
  );
267
267
  if (d.ended || d.error)
268
268
  return;
269
- const h = d.currentTime, L = Lt[c - 1][1];
269
+ const h = d.currentTime, L = Nt[c - 1][1];
270
270
  if (h && h < L) {
271
271
  const z = L - h;
272
272
  setTimeout(() => {
@@ -274,7 +274,7 @@ function Fn(s) {
274
274
  }, z * 1e3);
275
275
  return;
276
276
  }
277
- Lt.pop(), zr(s, L);
277
+ Nt.pop(), zr(s, L);
278
278
  }
279
279
  function Ir(s = document.body) {
280
280
  const c = Array.from(
@@ -395,9 +395,9 @@ function xs() {
395
395
  return s || (s = document.createElement("audio"), s.id = "bloom-audio-preload", document.body.appendChild(s)), s;
396
396
  }
397
397
  function Xn(s) {
398
- const c = $n(s), d = c ? c.id : s.id;
398
+ const c = $n(s) ?? s, d = c.id;
399
399
  if (Bi === d) return;
400
- const h = Un(d) + "?nocache=" + (/* @__PURE__ */ new Date()).getTime() + "&optional=true";
400
+ const h = Un(d, c) + "?nocache=" + (/* @__PURE__ */ new Date()).getTime() + "&optional=true";
401
401
  Bi = d, qi = h;
402
402
  const T = xs();
403
403
  T.src = h, T.load();
@@ -415,18 +415,22 @@ function Ts() {
415
415
  let d;
416
416
  Bi === Jt && qi ? (d = qi, Yn()) : d = c + "?nocache=" + (/* @__PURE__ */ new Date()).getTime() + "&optional=true", s.setAttribute("src", d);
417
417
  }
418
- function Un(s) {
419
- return Pr() + "/audio/" + s + ".mp3";
418
+ function Ss(s, c) {
419
+ return c?.getAttribute("data-audio-src") || s + ".mp3";
420
+ }
421
+ function Un(s, c) {
422
+ const d = c ?? wt?.querySelector(`[id="${s}"]`) ?? document.getElementById(s);
423
+ return Pr() + "/audio/" + Ss(s, d);
420
424
  }
421
425
  function Pt() {
422
- return Cs("bloom-audio-player", (c) => {
423
- c.addEventListener("ended", Ss), c.addEventListener("error", As);
426
+ return As("bloom-audio-player", (c) => {
427
+ c.addEventListener("ended", Es), c.addEventListener("error", ks);
424
428
  });
425
429
  }
426
- function Ss() {
430
+ function Es() {
427
431
  _i();
428
432
  }
429
- function ua() {
433
+ function fa() {
430
434
  ei === 4 && _i(!1);
431
435
  }
432
436
  function _i(s = !0) {
@@ -436,11 +440,11 @@ function _i(s = !0) {
436
440
  const h = Qe[d - 1];
437
441
  _n(h, !0), Rn();
438
442
  } else
439
- Es(), Ir(c), Pt().pause();
443
+ Cs(), Ir(c), Pt().pause();
440
444
  }
441
445
  }
442
- function Es() {
443
- Qe = [], Lt = [], Ir(), Ii?.raise(Nt), Er?.raise();
446
+ function Cs() {
447
+ Qe = [], Nt = [], Ir(), Ii?.raise(wt), Er?.raise();
444
448
  }
445
449
  function Hr() {
446
450
  if (!Oi || !Tr)
@@ -448,14 +452,14 @@ function Hr() {
448
452
  const c = ((/* @__PURE__ */ new Date()).getTime() - Oi) / 1e3;
449
453
  Tr(c);
450
454
  }
451
- function Cs(s, c) {
455
+ function As(s, c) {
452
456
  let d = document.querySelector(
453
457
  "#" + s
454
458
  );
455
459
  return d && !d.play && (d.remove(), d = null), d || (d = document.createElement("audio"), d.setAttribute("id", s), document.body.appendChild(d), c(d)), d;
456
460
  }
457
461
  let Cr = !1;
458
- function As() {
462
+ function ks() {
459
463
  if (Cr) {
460
464
  console.log("Already got error playing, not handling again");
461
465
  return;
@@ -470,27 +474,27 @@ function Or(s, c, d = !1) {
470
474
  );
471
475
  return d && c && c.matches(s) && h.push(c), Hn ? h : h.filter((T) => !jn(T));
472
476
  }
473
- function ks(s, c) {
477
+ function Ls(s, c) {
474
478
  var d = Or(".bloom-editable", s).filter(
475
479
  (h) => window.getComputedStyle(h).display !== "none"
476
480
  );
477
481
  return c && (d = d.filter((h) => !c.contains(h))), d;
478
482
  }
479
- function Ls(s, c) {
480
- return ks(s || Nt, c);
483
+ function Ns(s, c) {
484
+ return Ls(s || wt, c);
481
485
  }
482
486
  function Br(s, c) {
483
487
  return [].concat.apply(
484
488
  [],
485
- Ls(s, c).map(
489
+ Ns(s, c).map(
486
490
  (d) => Or(".audio-sentence", d, !0)
487
491
  )
488
492
  );
489
493
  }
490
- function fa(s) {
494
+ function da(s) {
491
495
  return !!Br(s).length;
492
496
  }
493
- function da() {
497
+ function ha() {
494
498
  if (ei !== 4) {
495
499
  if (Kt(
496
500
  4
@@ -503,27 +507,27 @@ function da() {
503
507
  hs(null);
504
508
  return;
505
509
  }
506
- Ii?.raise(Nt);
510
+ Ii?.raise(wt);
507
511
  }
508
512
  }
509
- function ha() {
510
- ei !== 5 && (Ns(), Kt(
513
+ function pa() {
514
+ ei !== 5 && (Ps(), Kt(
511
515
  5
512
516
  /* AudioPaused */
513
517
  ));
514
518
  }
515
- function Ns() {
519
+ function Ps() {
516
520
  const s = Pt();
517
521
  clearTimeout(Mr), zi && zi.length && s && (s.currentTime > 0 && !s.paused && !s.ended && Hr(), s.pause());
518
522
  }
519
- function pa(s) {
523
+ function ga(s) {
520
524
  let c = 0;
521
525
  return Br(s).forEach((d) => {
522
526
  const h = d.getAttribute("data-duration");
523
527
  h && (c += parseFloat(h));
524
528
  }), c < Di && (c = Di), c;
525
529
  }
526
- function ga() {
530
+ function ma() {
527
531
  clearTimeout(Mr), qr();
528
532
  }
529
533
  let Gt = 0, Zt;
@@ -531,14 +535,14 @@ const fi = /* @__PURE__ */ new WeakMap();
531
535
  function qr() {
532
536
  Gt++, Zt && (Zt.pause(), Zt.currentTime = 0, Zt = void 0);
533
537
  }
534
- function Ps(s) {
538
+ function Ds(s) {
535
539
  return s ? s.name === "AbortError" ? !0 : (typeof s.message == "string" && s.message || (typeof s.toString == "function" ? s.toString() : "")).includes("interrupted by a call to pause()") : !1;
536
540
  }
537
541
  const Li = /* @__PURE__ */ new WeakMap();
538
542
  function Rr(s) {
539
543
  Li.get(s)?.();
540
544
  }
541
- function Ds(s, c = () => !0, d = () => Gn(s)) {
545
+ function Ms(s, c = () => !0, d = () => Gn(s)) {
542
546
  if (!s.paused)
543
547
  return;
544
548
  Rr(s);
@@ -576,7 +580,7 @@ function jr(s, c) {
576
580
  const d = ++Gt;
577
581
  hi(s, c, d);
578
582
  }
579
- function Ms(s, c) {
583
+ function zs(s, c) {
580
584
  return s.networkState === HTMLMediaElement.NETWORK_NO_SOURCE && s.readyState === HTMLMediaElement.HAVE_NOTHING ? !0 : c ? c.name === "NotSupportedError" ? !0 : s.error?.code === (window.MediaError ? window.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED : 4) : !1;
581
585
  }
582
586
  function hi(s, c, d) {
@@ -587,10 +591,10 @@ function hi(s, c, d) {
587
591
  return;
588
592
  }
589
593
  const h = s[0];
590
- if (Zt = h, Ms(h))
594
+ if (Zt = h, zs(h))
591
595
  fi.delete(h), Sn(h), hi(s.slice(1), c, d);
592
596
  else {
593
- Is(h), Ri(h), Kt(
597
+ Hs(h), Ri(h), Kt(
594
598
  2
595
599
  /* VideoPlaying */
596
600
  ), Rr(h), h.currentTime = 0;
@@ -631,7 +635,7 @@ function hi(s, c, d) {
631
635
  return;
632
636
  }
633
637
  const G = fi.get(h) ?? 0;
634
- if (Ps(V) && G < 2) {
638
+ if (Ds(V) && G < 2) {
635
639
  fi.set(h, G + 1), window.setTimeout(() => {
636
640
  hi(s, c, d);
637
641
  }, 50);
@@ -641,12 +645,12 @@ function hi(s, c, d) {
641
645
  });
642
646
  }
643
647
  }
644
- const zs = "Sorry, this video cannot be played in this browser.";
648
+ const Is = "Sorry, this video cannot be played in this browser.";
645
649
  function Sn(s) {
646
650
  const c = s.parentElement;
647
651
  if (c && c.getElementsByClassName("video-error-message").length === 0) {
648
652
  const h = c.ownerDocument.createElement("div");
649
- h.className = "video-error-message normal-style", h.textContent = zs, h.style.display = "block", h.style.color = "black", h.style.backgroundColor = "rgba(255, 255, 255, 0.5)", h.style.position = "absolute", h.style.left = "10%", h.style.top = "10%", h.style.width = "80%", h.style.fontSize = "x-large", h.style.pointerEvents = "none", c.appendChild(h);
653
+ h.className = "video-error-message normal-style", h.textContent = Is, h.style.display = "block", h.style.color = "black", h.style.backgroundColor = "rgba(255, 255, 255, 0.5)", h.style.position = "absolute", h.style.left = "10%", h.style.top = "10%", h.style.width = "80%", h.style.fontSize = "x-large", h.style.pointerEvents = "none", c.appendChild(h);
650
654
  }
651
655
  }
652
656
  function Gn(s) {
@@ -655,7 +659,7 @@ function Gn(s) {
655
659
  function Ri(s) {
656
660
  (s.closest(".bloom-videoContainer") || s.parentElement)?.classList.remove("autoplayBlocked");
657
661
  }
658
- function Is(s) {
662
+ function Hs(s) {
659
663
  const c = s.parentElement;
660
664
  if (c) {
661
665
  const d = c.getElementsByClassName("video-error-message");
@@ -664,7 +668,7 @@ function Is(s) {
664
668
  }
665
669
  const ji = ".bloom-textOverPicture, .bloom-canvas-element";
666
670
  let Ar = [], Wi = /* @__PURE__ */ new Map(), pt, Zn, Fi = [];
667
- const Hs = (s) => {
671
+ const Os = (s) => {
668
672
  Fi = [], s.querySelectorAll("[data-draggable-id]").forEach((c) => {
669
673
  Fi.push({
670
674
  x: c.style.left,
@@ -677,7 +681,7 @@ const Hs = (s) => {
677
681
  s.elt.style.left = s.x, s.elt.style.top = s.y, s.elt.classList.remove("bloom-draggedToTarget");
678
682
  });
679
683
  };
680
- function Os(s) {
684
+ function Bs(s) {
681
685
  if (s.getAttribute("data-activity") !== "drag-letter-to-target")
682
686
  return;
683
687
  const c = Array.from(
@@ -695,11 +699,11 @@ function Os(s) {
695
699
  function Fr(s) {
696
700
  return s.closest("#page-scaling-container") !== null;
697
701
  }
698
- function ma(s, c) {
699
- pt = s, Os(s), Zn = c, vo(
702
+ function va(s, c) {
703
+ pt = s, Bs(s), Zn = c, vo(
700
704
  s.getAttribute("data-show-answers-in-targets") === "true" || s.getAttribute("data-show-target-as-shadow") === "true",
701
705
  s
702
- ), Hs(s), Array.from(
706
+ ), Os(s), Array.from(
703
707
  s.getElementsByClassName(
704
708
  "bloom-change-page-button"
705
709
  )
@@ -734,7 +738,7 @@ function ma(s, c) {
734
738
  }
735
739
  Wi.set(Q, { x: Q.offsetLeft, y: Q.offsetTop }), Q.style.touchAction = "none", Q.addEventListener("pointerdown", oo, { capture: !0 });
736
740
  }), Array.from(s.getElementsByTagName("video")).forEach((Q) => {
737
- Q.closest(ji)?.hasAttribute("data-draggable-id") && (Q.classList.add("bloom-ui-no-controls"), Q.addEventListener("pointerdown", Kn), Ds(Q));
741
+ Q.closest(ji)?.hasAttribute("data-draggable-id") && (Q.classList.add("bloom-ui-no-controls"), Q.addEventListener("pointerdown", Kn), Ms(Q));
738
742
  });
739
743
  const z = h.concat(T);
740
744
  Array.from(
@@ -770,9 +774,9 @@ function ma(s, c) {
770
774
  s.querySelectorAll("[data-sound]")
771
775
  ).forEach((Q) => {
772
776
  Q.addEventListener("click", Jn);
773
- }), Bs(s), Ws(s);
777
+ }), qs(s), Fs(s);
774
778
  }
775
- const Bs = (s) => {
779
+ const qs = (s) => {
776
780
  Array.from(
777
781
  s.getElementsByClassName(
778
782
  "drag-item-order-sentence"
@@ -783,7 +787,7 @@ const Bs = (s) => {
783
787
  "bloom-content1 bloom-visibility-code-on"
784
788
  )[0], h = d?.textContent?.trim();
785
789
  if (!h) return;
786
- const T = h.split(" "), L = Rs(T), z = s.ownerDocument.createElement("div");
790
+ const T = h.split(" "), L = js(T), z = s.ownerDocument.createElement("div");
787
791
  z.classList.add("drag-item-random-sentence"), z.setAttribute("data-answer", h), to(s, L, z, d, !0), z.style.left = c.style.left, z.style.top = c.style.top, z.style.width = c.style.width, c.parentElement?.insertBefore(z, c);
788
792
  }
789
793
  );
@@ -791,7 +795,7 @@ const Bs = (s) => {
791
795
  const c = s.currentTarget;
792
796
  Rr(c), c.play();
793
797
  };
794
- function va(s) {
798
+ function ya(s) {
795
799
  qr(), Wr(), Fi = [], Array.from(
796
800
  s.getElementsByClassName(
797
801
  "bloom-change-page-button"
@@ -840,7 +844,7 @@ function va(s) {
840
844
  )
841
845
  ).forEach((k) => {
842
846
  k.parentElement?.removeChild(k);
843
- }), js(s);
847
+ }), Ws(s);
844
848
  const D = s.closest(".swiper-slide") !== null;
845
849
  vo(!D, s);
846
850
  }
@@ -851,10 +855,10 @@ const Jn = (s) => {
851
855
  const c = s.currentTarget;
852
856
  eo(c);
853
857
  }, eo = (s) => {
854
- const c = qs(s);
858
+ const c = Rs(s);
855
859
  gi(c, s.closest(".bloom-page"));
856
860
  };
857
- function qs(s) {
861
+ function Rs(s) {
858
862
  const c = Vi(s);
859
863
  return _r(c);
860
864
  }
@@ -862,7 +866,7 @@ function to(s, c, d, h, T) {
862
866
  const L = Array.from(h?.classList)?.find((D) => D.endsWith("-style")) ?? "Normal-style", z = h?.getAttribute("lang");
863
867
  c.forEach((D) => {
864
868
  const k = s.ownerDocument.createElement("div");
865
- k.classList.add("drag-item-order-word"), k.textContent = D, d.appendChild(k), k.classList.add(L), z && k.setAttribute("lang", z), T && k.addEventListener("pointerdown", $s);
869
+ k.classList.add("drag-item-order-word"), k.textContent = D, d.appendChild(k), k.classList.add(L), z && k.setAttribute("lang", z), T && k.addEventListener("pointerdown", Xs);
866
870
  });
867
871
  }
868
872
  function io(s) {
@@ -871,7 +875,7 @@ function io(s) {
871
875
  );
872
876
  Zn?.(c);
873
877
  }
874
- function ya(s, c) {
878
+ function ba(s, c) {
875
879
  const d = (L) => {
876
880
  const z = L.closest(ji);
877
881
  return !(!z || z.classList.contains("draggable-text") || z.hasAttribute("data-draggable-id") || z.classList.contains("drag-item-order-sentence") || z.classList.contains("bloom-wordChoice") || z.classList.contains("drag-item-correct") || z.classList.contains("drag-item-wrong"));
@@ -886,7 +890,7 @@ function ya(s, c) {
886
890
  }
887
891
  let ro = (s, c) => {
888
892
  };
889
- function ba(s) {
893
+ function wa(s) {
890
894
  ro = s;
891
895
  }
892
896
  function _r(s) {
@@ -907,7 +911,7 @@ function Vi(s) {
907
911
  );
908
912
  return s.classList.contains("bloom-editable") && window.getComputedStyle(s).display !== "none" && c.push(s), c;
909
913
  }
910
- function Rs(s, c) {
914
+ function js(s, c) {
911
915
  c || (c = (D, k) => D === k);
912
916
  let d = !0;
913
917
  for (let D = 1; D < s.length; ++D)
@@ -934,7 +938,7 @@ function Rs(s, c) {
934
938
  for (let D = 0; D < s.length; ++D) s[D] = L[D];
935
939
  return s;
936
940
  }
937
- function wa(s, c) {
941
+ function xa(s, c) {
938
942
  return s.innerText.trim() === c.innerText.trim();
939
943
  }
940
944
  const no = (s) => {
@@ -1029,8 +1033,8 @@ const Yi = (s) => s.getBoundingClientRect().width / s.offsetWidth, oo = (s) => {
1029
1033
  Math.abs(T - d) < 0.6 && Math.abs(L - h) < 0.6
1030
1034
  );
1031
1035
  }, lo = (s) => {
1032
- const d = s.currentTarget.closest(".bloom-page"), h = Vs(d) && Xs(d);
1033
- return _s(d, h), ro(1, h ? 1 : 0), h;
1036
+ const d = s.currentTarget.closest(".bloom-page"), h = $s(d) && Ys(d);
1037
+ return Vs(d, h), ro(1, h ? 1 : 0), h;
1034
1038
  }, co = (s) => {
1035
1039
  const d = s.currentTarget.closest(".bloom-page");
1036
1040
  jt(d, "drag-activity-correct", !1), jt(d, "drag-activity-wrong", !1), jt(d, "drag-activity-solution", !1), Wr(), qr();
@@ -1038,18 +1042,18 @@ const Yi = (s) => s.getBoundingClientRect().width / s.offsetWidth, oo = (s) => {
1038
1042
  d ? s.parentElement?.classList.add(c) : s.parentElement?.classList.remove(c);
1039
1043
  };
1040
1044
  let Fe, fe, Vr, $r;
1041
- function xa(s, c) {
1045
+ function Ta(s, c) {
1042
1046
  Vr = s, $r = c;
1043
1047
  }
1044
1048
  const Xr = "data-preload-sound";
1045
- function js(s) {
1049
+ function Ws(s) {
1046
1050
  s.querySelectorAll(
1047
1051
  `audio[${Xr}]`
1048
1052
  ).forEach((c) => {
1049
1053
  c.src = "", c.remove();
1050
1054
  });
1051
1055
  }
1052
- function Ws(s) {
1056
+ function Fs(s) {
1053
1057
  const c = (d, h) => {
1054
1058
  const T = d !== null;
1055
1059
  if (d === null)
@@ -1072,15 +1076,15 @@ function Ws(s) {
1072
1076
  $r
1073
1077
  );
1074
1078
  }
1075
- function Fs(s, c, d) {
1079
+ function _s(s, c, d) {
1076
1080
  let h = s.getAttribute(
1077
1081
  c ? "data-correct-sound" : "data-wrong-sound"
1078
1082
  );
1079
1083
  const T = h !== null;
1080
1084
  h === null ? h = c ? Vr : $r : h === "none" && (h = void 0), h ? uo(s, h, T, d) : d?.();
1081
1085
  }
1082
- function _s(s, c) {
1083
- jt(s, "drag-activity-correct", c), jt(s, "drag-activity-wrong", !c), Fs(s, c, () => {
1086
+ function Vs(s, c) {
1087
+ jt(s, "drag-activity-correct", c), jt(s, "drag-activity-wrong", !c), _s(s, c, () => {
1084
1088
  if (!s.parentElement?.classList.contains(
1085
1089
  c ? "drag-activity-correct" : "drag-activity-wrong"
1086
1090
  ))
@@ -1123,7 +1127,7 @@ function uo(s, c, d = !0, h) {
1123
1127
  { once: !0 }
1124
1128
  );
1125
1129
  }
1126
- function Vs(s) {
1130
+ function $s(s) {
1127
1131
  let c = !0;
1128
1132
  const d = Array.from(
1129
1133
  s.querySelectorAll("[data-draggable-id]")
@@ -1146,7 +1150,7 @@ function Vs(s) {
1146
1150
  }
1147
1151
  let qe, Nr = 0;
1148
1152
  const fo = 5;
1149
- function $s(s) {
1153
+ function Xs(s) {
1150
1154
  if (s.button !== 0 || s.ctrlKey) return;
1151
1155
  fe = s.currentTarget, Nr = fe.offsetWidth;
1152
1156
  const c = fe.closest(".bloom-page"), d = Yi(c);
@@ -1232,7 +1236,7 @@ function wr(s) {
1232
1236
  };
1233
1237
  requestAnimationFrame(L);
1234
1238
  }
1235
- function Xs(s) {
1239
+ function Ys(s) {
1236
1240
  const c = s.getElementsByClassName("drag-item-random-sentence");
1237
1241
  for (let d = 0; d < c.length; d++) {
1238
1242
  const h = c[d], T = h.getAttribute("data-answer").split(" "), L = Array.from(h.children);
@@ -1245,12 +1249,12 @@ function Xs(s) {
1245
1249
  const vo = (s, c) => {
1246
1250
  const d = c.querySelectorAll(":scope [data-draggable-id]");
1247
1251
  s ? d.forEach((h) => {
1248
- Ys(h);
1249
- }) : d.forEach((h) => {
1250
1252
  Us(h);
1253
+ }) : d.forEach((h) => {
1254
+ Gs(h);
1251
1255
  });
1252
1256
  };
1253
- function Ys(s) {
1257
+ function Us(s) {
1254
1258
  const c = Yr(s);
1255
1259
  if (!c)
1256
1260
  return;
@@ -1296,18 +1300,18 @@ const Yr = (s) => {
1296
1300
  if (c)
1297
1301
  return s.closest(".bloom-page").querySelector(`[data-target-of="${c}"]`);
1298
1302
  };
1299
- function Us(s) {
1303
+ function Gs(s) {
1300
1304
  const c = Yr(s);
1301
1305
  c && (c.innerHTML = "");
1302
1306
  }
1303
- let Ta = !1;
1304
- function Sa(s) {
1307
+ let Sa = !1;
1308
+ function Ea(s) {
1305
1309
  }
1306
- function Gs(s) {
1310
+ function Zs(s) {
1307
1311
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
1308
1312
  }
1309
1313
  var Pi = { exports: {} };
1310
- var Zs = Pi.exports, An;
1314
+ var Ks = Pi.exports, An;
1311
1315
  function yo() {
1312
1316
  return An || (An = 1, (function(s) {
1313
1317
  (function(c, d) {
@@ -1316,7 +1320,7 @@ function yo() {
1316
1320
  throw new Error("jQuery requires a window with a document");
1317
1321
  return d(h);
1318
1322
  };
1319
- })(typeof window < "u" ? window : Zs, function(c, d) {
1323
+ })(typeof window < "u" ? window : Ks, function(c, d) {
1320
1324
  var h = [], T = Object.getPrototypeOf, L = h.slice, z = h.flat ? function(t) {
1321
1325
  return h.flat.call(t);
1322
1326
  } : function(t) {
@@ -1331,7 +1335,7 @@ function yo() {
1331
1335
  nonce: !0,
1332
1336
  noModule: !0
1333
1337
  };
1334
- function wt(t, i, r) {
1338
+ function xt(t, i, r) {
1335
1339
  r = r || U;
1336
1340
  var n, a, l = r.createElement("script");
1337
1341
  if (l.text = t, i)
@@ -1435,7 +1439,7 @@ function yo() {
1435
1439
  // Evaluates a script in a provided context; falls back to the global one
1436
1440
  // if not specified.
1437
1441
  globalEval: function(t, i, r) {
1438
- wt(t, { nonce: i && i.nonce }, r);
1442
+ xt(t, { nonce: i && i.nonce }, r);
1439
1443
  },
1440
1444
  each: function(t, i) {
1441
1445
  var r, n = 0;
@@ -1549,11 +1553,11 @@ function yo() {
1549
1553
  // For use in libraries implementing .is()
1550
1554
  // We use this for POS matching in `select`
1551
1555
  needsContext: new RegExp("^" + j + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + j + "*((?:-\\d)?\\d*)" + j + "*\\)|)(?=[^-]|$)", "i")
1552
- }, Ct = /^(?:input|select|textarea|button)$/i, At = /^h\d$/i, it = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, dr = /[+~]/, yt = new RegExp("\\\\[\\da-fA-F]{1,6}" + j + "?|\\\\([^\\r\\n\\f])", "g"), bt = function(p, b) {
1556
+ }, At = /^(?:input|select|textarea|button)$/i, kt = /^h\d$/i, it = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, dr = /[+~]/, yt = new RegExp("\\\\[\\da-fA-F]{1,6}" + j + "?|\\\\([^\\r\\n\\f])", "g"), bt = function(p, b) {
1553
1557
  var E = "0x" + p.slice(1) - 65536;
1554
1558
  return b || (E < 0 ? String.fromCharCode(E + 65536) : String.fromCharCode(E >> 10 | 55296, E & 1023 | 56320));
1555
1559
  }, Qo = function() {
1556
- kt();
1560
+ Lt();
1557
1561
  }, es = Si(
1558
1562
  function(p) {
1559
1563
  return p.disabled === !0 && me(p, "fieldset");
@@ -1585,7 +1589,7 @@ function yo() {
1585
1589
  var I, F, $, Y, X, se, te, re = b && b.ownerDocument, ae = b ? b.nodeType : 9;
1586
1590
  if (E = E || [], typeof p != "string" || !p || ae !== 1 && ae !== 9 && ae !== 11)
1587
1591
  return E;
1588
- if (!N && (kt(b), b = b || u, m)) {
1592
+ if (!N && (Lt(b), b = b || u, m)) {
1589
1593
  if (ae !== 11 && (X = it.exec(p)))
1590
1594
  if (I = X[1]) {
1591
1595
  if (ae === 9)
@@ -1669,7 +1673,7 @@ function yo() {
1669
1673
  function hr(p) {
1670
1674
  return p && typeof p.getElementsByTagName < "u" && p;
1671
1675
  }
1672
- function kt(p) {
1676
+ function Lt(p) {
1673
1677
  var b, E = p ? p.ownerDocument || p : g;
1674
1678
  return E == u || E.nodeType !== 9 || !E.documentElement || (u = E, y = u.documentElement, m = !o.isXMLDoc(u), P = y.matches || y.webkitMatchesSelector || y.msMatchesSelector, y.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
1675
1679
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
@@ -1736,7 +1740,7 @@ function yo() {
1736
1740
  be.matches = function(p, b) {
1737
1741
  return be(p, null, null, b);
1738
1742
  }, be.matchesSelector = function(p, b) {
1739
- if (kt(p), m && !Oe[b + " "] && (!w || !w.test(b)))
1743
+ if (Lt(p), m && !Oe[b + " "] && (!w || !w.test(b)))
1740
1744
  try {
1741
1745
  var E = P.call(p, b);
1742
1746
  if (E || V.disconnectedMatch || // As well, disconnected nodes are said to be in a document
@@ -1748,9 +1752,9 @@ function yo() {
1748
1752
  }
1749
1753
  return be(b, u, null, [p]).length > 0;
1750
1754
  }, be.contains = function(p, b) {
1751
- return (p.ownerDocument || p) != u && kt(p), o.contains(p, b);
1755
+ return (p.ownerDocument || p) != u && Lt(p), o.contains(p, b);
1752
1756
  }, be.attr = function(p, b) {
1753
- (p.ownerDocument || p) != u && kt(p);
1757
+ (p.ownerDocument || p) != u && Lt(p);
1754
1758
  var E = i.attrHandle[b.toLowerCase()], N = E && ye.call(i.attrHandle, b.toLowerCase()) ? E(p, b, !m) : void 0;
1755
1759
  return N !== void 0 ? N : p.getAttribute(b);
1756
1760
  }, be.error = function(p) {
@@ -1929,10 +1933,10 @@ function yo() {
1929
1933
  },
1930
1934
  // Element/input types
1931
1935
  header: function(p) {
1932
- return At.test(p.nodeName);
1936
+ return kt.test(p.nodeName);
1933
1937
  },
1934
1938
  input: function(p) {
1935
- return Ct.test(p.nodeName);
1939
+ return At.test(p.nodeName);
1936
1940
  },
1937
1941
  button: function(p) {
1938
1942
  return me(p, "input") && p.type === "button" || me(p, "button");
@@ -2132,7 +2136,7 @@ function yo() {
2132
2136
  var te, re, ae, J = 0, xe = "0", Ue = F && [], Be = [], rt = r, ht = F || N && i.find.TAG("*", se), Ut = A += rt == null ? 1 : Math.random() || 0.1, We = ht.length;
2133
2137
  for (se && (r = $ == u || $ || se); xe !== We && (te = ht[xe]) != null; xe++) {
2134
2138
  if (N && te) {
2135
- for (re = 0, !$ && te.ownerDocument != u && (kt(te), Y = !m); ae = p[re++]; )
2139
+ for (re = 0, !$ && te.ownerDocument != u && (Lt(te), Y = !m); ae = p[re++]; )
2136
2140
  if (ae(te, $ || u, Y)) {
2137
2141
  l.call(X, te);
2138
2142
  break;
@@ -2198,9 +2202,9 @@ function yo() {
2198
2202
  !b || dr.test(p) && hr(b.parentNode) || b
2199
2203
  ), E;
2200
2204
  }
2201
- V.sortStable = O.split("").sort(Pe).join("") === O, kt(), V.sortDetached = Yt(function(p) {
2205
+ V.sortStable = O.split("").sort(Pe).join("") === O, Lt(), V.sortDetached = Yt(function(p) {
2202
2206
  return p.compareDocumentPosition(u.createElement("fieldset")) & 1;
2203
- }), o.find = be, o.expr[":"] = o.expr.pseudos, o.unique = o.uniqueSort, be.compile = vr, be.select = xn, be.setDocument = kt, be.tokenize = ui, be.escape = o.escapeSelector, be.getText = o.text, be.isXML = o.isXMLDoc, be.selectors = o.expr, be.support = o.support, be.uniqueSort = o.uniqueSort;
2207
+ }), o.find = be, o.expr[":"] = o.expr.pseudos, o.unique = o.uniqueSort, be.compile = vr, be.select = xn, be.setDocument = Lt, be.tokenize = ui, be.escape = o.escapeSelector, be.getText = o.text, be.isXML = o.isXMLDoc, be.selectors = o.expr, be.support = o.support, be.uniqueSort = o.uniqueSort;
2204
2208
  })();
2205
2209
  var ge = function(t, i, r) {
2206
2210
  for (var n = [], a = r !== void 0; (t = t[i]) && t.nodeType !== 9; )
@@ -2258,12 +2262,12 @@ function yo() {
2258
2262
  ).length;
2259
2263
  }
2260
2264
  });
2261
- var Dt, xt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, Ft = o.fn.init = function(t, i, r) {
2265
+ var Dt, Tt = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, Ft = o.fn.init = function(t, i, r) {
2262
2266
  var n, a;
2263
2267
  if (!t)
2264
2268
  return this;
2265
2269
  if (r = r || Dt, typeof t == "string")
2266
- if (t[0] === "<" && t[t.length - 1] === ">" && t.length >= 3 ? n = [null, t, null] : n = xt.exec(t), n && (n[1] || !i))
2270
+ if (t[0] === "<" && t[t.length - 1] === ">" && t.length >= 3 ? n = [null, t, null] : n = Tt.exec(t), n && (n[1] || !i))
2267
2271
  if (n[1]) {
2268
2272
  if (i = i instanceof o ? i[0] : i, o.merge(this, o.parseHTML(
2269
2273
  n[1],
@@ -2339,7 +2343,7 @@ function yo() {
2339
2343
  );
2340
2344
  }
2341
2345
  });
2342
- function Tt(t, i) {
2346
+ function St(t, i) {
2343
2347
  for (; (t = t[i]) && t.nodeType !== 1; )
2344
2348
  ;
2345
2349
  return t;
@@ -2356,10 +2360,10 @@ function yo() {
2356
2360
  return ge(t, "parentNode", r);
2357
2361
  },
2358
2362
  next: function(t) {
2359
- return Tt(t, "nextSibling");
2363
+ return St(t, "nextSibling");
2360
2364
  },
2361
2365
  prev: function(t) {
2362
- return Tt(t, "previousSibling");
2366
+ return St(t, "previousSibling");
2363
2367
  },
2364
2368
  nextAll: function(t) {
2365
2369
  return ge(t, "nextSibling");
@@ -2669,10 +2673,10 @@ function yo() {
2669
2673
  (t === !0 ? --o.readyWait : o.isReady) || (o.isReady = !0, !(t !== !0 && --o.readyWait > 0) && It.resolveWith(U, [o]));
2670
2674
  }
2671
2675
  }), o.ready.then = It.then;
2672
- function St() {
2673
- U.removeEventListener("DOMContentLoaded", St), c.removeEventListener("load", St), o.ready();
2676
+ function Et() {
2677
+ U.removeEventListener("DOMContentLoaded", Et), c.removeEventListener("load", Et), o.ready();
2674
2678
  }
2675
- U.readyState === "complete" || U.readyState !== "loading" && !U.documentElement.doScroll ? c.setTimeout(o.ready) : (U.addEventListener("DOMContentLoaded", St), c.addEventListener("load", St));
2679
+ U.readyState === "complete" || U.readyState !== "loading" && !U.documentElement.doScroll ? c.setTimeout(o.ready) : (U.addEventListener("DOMContentLoaded", Et), c.addEventListener("load", Et));
2676
2680
  var et = function(t, i, r, n, a, l, u) {
2677
2681
  var y = 0, m = t.length, w = r == null;
2678
2682
  if (Ve(r) === "object") {
@@ -2853,10 +2857,10 @@ function yo() {
2853
2857
  return y(), a.promise(i);
2854
2858
  }
2855
2859
  });
2856
- var Vt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, Ht = new RegExp("^(?:([+-])=|)(" + Vt + ")([a-z%]*)$", "i"), Xe = ["Top", "Right", "Bottom", "Left"], lt = U.documentElement, Et = function(t) {
2860
+ var Vt = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, Ht = new RegExp("^(?:([+-])=|)(" + Vt + ")([a-z%]*)$", "i"), Xe = ["Top", "Right", "Bottom", "Left"], lt = U.documentElement, Ct = function(t) {
2857
2861
  return o.contains(t.ownerDocument, t);
2858
2862
  }, Ki = { composed: !0 };
2859
- lt.getRootNode && (Et = function(t) {
2863
+ lt.getRootNode && (Ct = function(t) {
2860
2864
  return o.contains(t.ownerDocument, t) || t.getRootNode(Ki) === t.ownerDocument;
2861
2865
  });
2862
2866
  var tt = function(t, i) {
@@ -2864,7 +2868,7 @@ function yo() {
2864
2868
  // Support: Firefox <=43 - 45
2865
2869
  // Disconnected elements can have computed display: none, so first confirm that elem is
2866
2870
  // in the document.
2867
- Et(t) && o.css(t, "display") === "none";
2871
+ Ct(t) && o.css(t, "display") === "none";
2868
2872
  };
2869
2873
  function ri(t, i, r, n) {
2870
2874
  var a, l, u = 20, y = n ? function() {
@@ -2950,7 +2954,7 @@ function yo() {
2950
2954
  a && a.push(l);
2951
2955
  continue;
2952
2956
  }
2953
- if (w = Et(l), u = Ce(O.appendChild(l), "script"), w && vt(u), r)
2957
+ if (w = Ct(l), u = Ce(O.appendChild(l), "script"), w && vt(u), r)
2954
2958
  for (P = 0; l = u[P++]; )
2955
2959
  Ke.test(l.type || "") && r.push(l);
2956
2960
  }
@@ -3306,13 +3310,13 @@ function yo() {
3306
3310
  for (w = u[u.length - 1].ownerDocument, o.map(u, Eo), P = 0; P < y; P++)
3307
3311
  m = u[P], Ke.test(m.type || "") && !M.access(m, "globalEval") && o.contains(w, m) && (m.src && (m.type || "").toLowerCase() !== "module" ? o._evalUrl && !m.noModule && o._evalUrl(m.src, {
3308
3312
  nonce: m.nonce || m.getAttribute("nonce")
3309
- }, w) : wt(m.textContent.replace(To, ""), m, w));
3313
+ }, w) : xt(m.textContent.replace(To, ""), m, w));
3310
3314
  }
3311
3315
  return t;
3312
3316
  }
3313
3317
  function Kr(t, i, r) {
3314
3318
  for (var n, a = i ? o.filter(i, t) : t, l = 0; (n = a[l]) != null; l++)
3315
- !r && n.nodeType === 1 && o.cleanData(Ce(n)), n.parentNode && (r && Et(n) && vt(Ce(n, "script")), n.parentNode.removeChild(n));
3319
+ !r && n.nodeType === 1 && o.cleanData(Ce(n)), n.parentNode && (r && Ct(n) && vt(Ce(n, "script")), n.parentNode.removeChild(n));
3316
3320
  return t;
3317
3321
  }
3318
3322
  o.extend({
@@ -3320,7 +3324,7 @@ function yo() {
3320
3324
  return t;
3321
3325
  },
3322
3326
  clone: function(t, i, r) {
3323
- var n, a, l, u, y = t.cloneNode(!0), m = Et(t);
3327
+ var n, a, l, u, y = t.cloneNode(!0), m = Ct(t);
3324
3328
  if (!V.noCloneChecked && (t.nodeType === 1 || t.nodeType === 11) && !o.isXMLDoc(t))
3325
3329
  for (u = Ce(y), l = Ce(t), n = 0, a = l.length; n < a; n++)
3326
3330
  Co(l[n], u[n]);
@@ -3488,7 +3492,7 @@ function yo() {
3488
3492
  })();
3489
3493
  function ni(t, i, r) {
3490
3494
  var n, a, l, u, y = er.test(i), m = t.style;
3491
- return r = r || yi(t), r && (u = r.getPropertyValue(i) || r[i], y && u && (u = u.replace(C, "$1") || void 0), u === "" && !Et(t) && (u = o.style(t, i)), !V.pixelBoxStyles() && Qi.test(u) && Ao.test(i) && (n = m.width, a = m.minWidth, l = m.maxWidth, m.minWidth = m.maxWidth = m.width = u, u = r.width, m.width = n, m.minWidth = a, m.maxWidth = l)), u !== void 0 ? (
3495
+ return r = r || yi(t), r && (u = r.getPropertyValue(i) || r[i], y && u && (u = u.replace(C, "$1") || void 0), u === "" && !Ct(t) && (u = o.style(t, i)), !V.pixelBoxStyles() && Qi.test(u) && Ao.test(i) && (n = m.width, a = m.minWidth, l = m.maxWidth, m.minWidth = m.maxWidth = m.width = u, u = r.width, m.width = n, m.minWidth = a, m.maxWidth = l)), u !== void 0 ? (
3492
3496
  // Support: IE <=9 - 11 only
3493
3497
  // IE returns zIndex value as an integer.
3494
3498
  u + ""
@@ -4524,9 +4528,9 @@ function yo() {
4524
4528
  }
4525
4529
  }
4526
4530
  function qt(he, Se, li, fr) {
4527
- var ft, ci, dt, Ct, At, it = Se;
4528
- m || (m = !0, u && c.clearTimeout(u), r = void 0, a = fr || "", ce.readyState = he > 0 ? 4 : 0, ft = he >= 200 && he < 300 || he === 304, li && (Ct = Yo(A, ce, li)), !ft && o.inArray("script", A.dataTypes) > -1 && o.inArray("json", A.dataTypes) < 0 && (A.converters["text script"] = function() {
4529
- }), Ct = Uo(A, Ct, ce, ft), ft ? (A.ifModified && (At = ce.getResponseHeader("Last-Modified"), At && (o.lastModified[n] = At), At = ce.getResponseHeader("etag"), At && (o.etag[n] = At)), he === 204 || A.type === "HEAD" ? it = "nocontent" : he === 304 ? it = "notmodified" : (it = Ct.state, ci = Ct.data, dt = Ct.error, ft = !dt)) : (dt = it, (he || !it) && (it = "error", he < 0 && (he = 0))), ce.status = he, ce.statusText = (Se || it) + "", ft ? de.resolveWith(R, [ci, it, ce]) : de.rejectWith(R, [ce, it, dt]), ce.statusCode(Oe), Oe = void 0, w && ie.trigger(
4531
+ var ft, ci, dt, At, kt, it = Se;
4532
+ m || (m = !0, u && c.clearTimeout(u), r = void 0, a = fr || "", ce.readyState = he > 0 ? 4 : 0, ft = he >= 200 && he < 300 || he === 304, li && (At = Yo(A, ce, li)), !ft && o.inArray("script", A.dataTypes) > -1 && o.inArray("json", A.dataTypes) < 0 && (A.converters["text script"] = function() {
4533
+ }), At = Uo(A, At, ce, ft), ft ? (A.ifModified && (kt = ce.getResponseHeader("Last-Modified"), kt && (o.lastModified[n] = kt), kt = ce.getResponseHeader("etag"), kt && (o.etag[n] = kt)), he === 204 || A.type === "HEAD" ? it = "nocontent" : he === 304 ? it = "notmodified" : (it = At.state, ci = At.data, dt = At.error, ft = !dt)) : (dt = it, (he || !it) && (it = "error", he < 0 && (he = 0))), ce.status = he, ce.statusText = (Se || it) + "", ft ? de.resolveWith(R, [ci, it, ce]) : de.rejectWith(R, [ce, it, dt]), ce.statusCode(Oe), Oe = void 0, w && ie.trigger(
4530
4534
  ft ? "ajaxSuccess" : "ajaxError",
4531
4535
  [ce, A, ft ? ci : dt]
4532
4536
  ), ne.fireWith(R, [ce, it]), w && (ie.trigger("ajaxComplete", [ce, A]), --o.active || o.event.trigger("ajaxStop")));
@@ -4914,10 +4918,10 @@ function yo() {
4914
4918
  });
4915
4919
  })(Pi)), Pi.exports;
4916
4920
  }
4917
- var Ks = yo();
4918
- const Qt = /* @__PURE__ */ Gs(Ks);
4921
+ var Js = yo();
4922
+ const Qt = /* @__PURE__ */ Zs(Js);
4919
4923
  var xr = { exports: {} }, kn;
4920
- function Js() {
4924
+ function Qs() {
4921
4925
  return kn || (kn = 1, (function(s, c) {
4922
4926
  (function(d) {
4923
4927
  s.exports = d(yo());
@@ -4950,7 +4954,7 @@ function Js() {
4950
4954
  }
4951
4955
  var U = _.MutationObserver || _.WebKitMutationObserver || !1, pe = Date.now || function() {
4952
4956
  return (/* @__PURE__ */ new Date()).getTime();
4953
- }, wt = {
4957
+ }, xt = {
4954
4958
  zindex: "auto",
4955
4959
  cursoropacitymin: 0,
4956
4960
  cursoropacitymax: 1,
@@ -5048,7 +5052,7 @@ function Js() {
5048
5052
  doc: Z,
5049
5053
  win: !1
5050
5054
  };
5051
- if (k.extend(g, wt), g.snapbackspeed = 80, j)
5055
+ if (k.extend(g, xt), g.snapbackspeed = 80, j)
5052
5056
  for (var De in g)
5053
5057
  j[De] !== void 0 && (g[De] = j[De]);
5054
5058
  if (g.disablemutationobserver && (U = !1), this.doc = g.doc, this.iddoc = this.doc && this.doc[0] && this.doc[0].id || "", this.ispage = /^BODY|HTML/.test(g.win ? g.win[0].nodeName : this.doc[0].nodeName), this.haswrapper = g.win !== !1, this.win = g.win || (this.ispage ? ye : this.doc), this.docscroll = this.ispage && !this.haswrapper ? ye : this.win, this.body = Z, this.viewport = !1, this.isfixed = !1, this.iframe = !1, this.isiframe = this.doc[0].nodeName == "IFRAME" && this.win[0].nodeName == "IFRAME", this.istextarea = this.win[0].nodeName == "TEXTAREA", this.forcescreen = !1, this.canshowonmouseevent = g.autohidemode != "scroll", this.onmousedown = !1, this.onmouseup = !1, this.onmousemove = !1, this.onmousewheel = !1, this.onkeypress = !1, this.ongesturezoom = !1, this.onclick = !1, this.onscrollstart = !1, this.onscrollend = !1, this.onscrollcancel = !1, this.onzoomin = !1, this.onzoomout = !1, this.view = !1, this.page = !1, this.scroll = {
@@ -5177,7 +5181,7 @@ function Js() {
5177
5181
  S = S.parentNode || !1;
5178
5182
  return S !== !1;
5179
5183
  };
5180
- function xt() {
5184
+ function Tt() {
5181
5185
  var f = e.win;
5182
5186
  if ("zIndex" in f) return f.zIndex();
5183
5187
  for (; f.length > 0; ) {
@@ -5259,7 +5263,7 @@ function Js() {
5259
5263
  if (e.saved.css = [], B.isoperamini || B.isandroid && !("hidden" in q)) return !0;
5260
5264
  g.emulatetouch = g.emulatetouch || g.touchbehavior, e.hasborderbox = _.getComputedStyle && _.getComputedStyle(q.body)["box-sizing"] === "border-box";
5261
5265
  var f = { "overflow-y": "hidden" };
5262
- if ((B.isie11 || B.isie10) && (f["-ms-overflow-style"] = "none"), e.ishwscroll && (this.doc.css(B.transitionstyle, B.prefixstyle + "transform 0ms ease-out"), B.transitionend && e.bind(e.doc, B.transitionend, e.onScrollTransitionEnd, !1)), e.zindex = "auto", !e.ispage && g.zindex == "auto" ? e.zindex = xt() || "auto" : e.zindex = g.zindex, !e.ispage && e.zindex != "auto" && e.zindex > D && (D = e.zindex), e.isie && e.zindex === 0 && g.zindex == "auto" && (e.zindex = "auto"), !e.ispage || !B.isieold) {
5266
+ if ((B.isie11 || B.isie10) && (f["-ms-overflow-style"] = "none"), e.ishwscroll && (this.doc.css(B.transitionstyle, B.prefixstyle + "transform 0ms ease-out"), B.transitionend && e.bind(e.doc, B.transitionend, e.onScrollTransitionEnd, !1)), e.zindex = "auto", !e.ispage && g.zindex == "auto" ? e.zindex = Tt() || "auto" : e.zindex = g.zindex, !e.ispage && e.zindex != "auto" && e.zindex > D && (D = e.zindex), e.isie && e.zindex === 0 && g.zindex == "auto" && (e.zindex = "auto"), !e.ispage || !B.isieold) {
5263
5267
  var v = e.docscroll;
5264
5268
  e.ispage && (v = e.haswrapper ? e.win : e.doc), e.css(v, f), e.ispage && (B.isie11 || B.isie) && e.css(k("html"), f), B.isios && !e.ispage && !e.haswrapper && e.css(Z, {
5265
5269
  "-webkit-overflow-scrolling": "touch"
@@ -5705,9 +5709,9 @@ function Js() {
5705
5709
  }), e.bind(_, "blur", function(x) {
5706
5710
  e.wheelprevented = !1;
5707
5711
  }), e.bind(_, "resize", e.onscreenresize), e.bind(_, "orientationchange", e.onscreenresize), e.bind(_, "load", e.lazyResize), B.ischrome && !e.ispage && !e.haswrapper) {
5708
- var Et = e.win.attr("style"), Ki = parseFloat(e.win.css("width")) + 1;
5712
+ var Ct = e.win.attr("style"), Ki = parseFloat(e.win.css("width")) + 1;
5709
5713
  e.win.css("width", Ki), e.synched("chromefix", function() {
5710
- e.win.attr("style", Et);
5714
+ e.win.attr("style", Ct);
5711
5715
  });
5712
5716
  }
5713
5717
  if (e.onAttributeChange = function(x) {
@@ -5868,7 +5872,7 @@ function Js() {
5868
5872
  e && e.resize(), Ie = 0;
5869
5873
  }, f), e;
5870
5874
  };
5871
- function Tt(f, v, S, H) {
5875
+ function St(f, v, S, H) {
5872
5876
  e._bind(f, v, function(W) {
5873
5877
  W = W || _.event;
5874
5878
  var M = {
@@ -5901,7 +5905,7 @@ function Js() {
5901
5905
  e._bind(H, "wheel", v, S || !1);
5902
5906
  else {
5903
5907
  var W = q.onmousewheel !== void 0 ? "mousewheel" : "DOMMouseScroll";
5904
- Tt(H, W, v, S || !1), W == "DOMMouseScroll" && Tt(H, "MozMousePixelScroll", v, S || !1);
5908
+ St(H, W, v, S || !1), W == "DOMMouseScroll" && St(H, "MozMousePixelScroll", v, S || !1);
5905
5909
  }
5906
5910
  };
5907
5911
  var He = !1;
@@ -6103,10 +6107,10 @@ function Js() {
6103
6107
  e.lastdeltax = 0, e.rail.drag || e.doScrollPos(Re, oe);
6104
6108
  });
6105
6109
  }
6106
- var St = !1;
6110
+ var Et = !1;
6107
6111
  function et(f, v, S) {
6108
6112
  var H, W;
6109
- if (!S && St) return !0;
6113
+ if (!S && Et) return !0;
6110
6114
  if (f.deltaMode === 0 ? (H = -(f.deltaX * (g.mousescrollstep / 54)) | 0, W = -(f.deltaY * (g.mousescrollstep / 54)) | 0) : f.deltaMode === 1 && (H = -(f.deltaX * g.mousescrollstep * 50 / 80) | 0, W = -(f.deltaY * g.mousescrollstep * 50 / 80) | 0), v && g.oneaxismousemode && H === 0 && W && (H = W, W = 0, S)) {
6111
6115
  var M = H < 0 ? e.getScrollLeft() >= e.page.maxw : e.getScrollLeft() <= 0;
6112
6116
  M && (W = H, H = 0);
@@ -6114,9 +6118,9 @@ function Js() {
6114
6118
  e.isrtlmode && (H = -H);
6115
6119
  var ee = It(H, W, S, !0);
6116
6120
  if (ee)
6117
- S && (St = !0);
6121
+ S && (Et = !0);
6118
6122
  else
6119
- return St = !1, f.stopImmediatePropagation(), f.preventDefault();
6123
+ return Et = !1, f.stopImmediatePropagation(), f.preventDefault();
6120
6124
  }
6121
6125
  if (this.onmousewheel = function(f) {
6122
6126
  if (e.wheelprevented || e.locked) return !1;
@@ -6310,19 +6314,19 @@ function Js() {
6310
6314
  (ge < 0 || ge > le || De < 0 || De > B) && (Te = !1);
6311
6315
  var Ge = C.speedy && Te ? C.speedy : !1, Dt = C.speedx && Te ? C.speedx : !1;
6312
6316
  if (Ge || Dt) {
6313
- var xt = Math.max(16, C.steptime);
6314
- if (xt > 50) {
6315
- var Ft = xt / 50;
6316
- C.speedx *= Ft, C.speedy *= Ft, xt = 50;
6317
+ var Tt = Math.max(16, C.steptime);
6318
+ if (Tt > 50) {
6319
+ var Ft = Tt / 50;
6320
+ C.speedx *= Ft, C.speedy *= Ft, Tt = 50;
6317
6321
  }
6318
6322
  C.demulxy = 0, C.lastscrollx = C.nc.getScrollLeft(), C.chkx = C.lastscrollx, C.lastscrolly = C.nc.getScrollTop(), C.chky = C.lastscrolly;
6319
- var ze = C.lastscrollx, Ie = C.lastscrolly, Tt = function() {
6323
+ var ze = C.lastscrollx, Ie = C.lastscrolly, St = function() {
6320
6324
  var He = pe() - Z > 600 ? 0.04 : 0.02;
6321
6325
  C.speedx && (ze = Math.floor(C.lastscrollx - C.speedx * (1 - C.demulxy)), C.lastscrollx = ze, (ze < 0 || ze > B) && (He = 0.1)), C.speedy && (Ie = Math.floor(C.lastscrolly - C.speedy * (1 - C.demulxy)), C.lastscrolly = Ie, (Ie < 0 || Ie > le) && (He = 0.1)), C.demulxy = Math.min(1, C.demulxy + He), C.nc.synched("domomentum2d", function() {
6322
6326
  C.speedx && (C.nc.getScrollLeft(), C.chkx = ze, C.nc.setScrollLeft(ze)), C.speedy && (C.nc.getScrollTop(), C.chky = Ie, C.nc.setScrollTop(Ie)), C.timer || (C.nc.hideCursor(), C.doSnapy(ze, Ie));
6323
- }), C.demulxy < 1 ? C.timer = setTimeout(Tt, xt) : (C.stop(), C.nc.hideCursor(), C.doSnapy(ze, Ie));
6327
+ }), C.demulxy < 1 ? C.timer = setTimeout(St, Tt) : (C.stop(), C.nc.hideCursor(), C.doSnapy(ze, Ie));
6324
6328
  };
6325
- Tt();
6329
+ St();
6326
6330
  } else
6327
6331
  C.doSnapy(C.nc.getScrollLeft(), C.nc.getScrollTop());
6328
6332
  };
@@ -6419,13 +6423,13 @@ function Js() {
6419
6423
  getjQuery: function() {
6420
6424
  return d;
6421
6425
  }
6422
- }, k.nicescroll || (k.nicescroll = new Wt(), k.nicescroll.options = wt);
6426
+ }, k.nicescroll || (k.nicescroll = new Wt(), k.nicescroll.options = xt);
6423
6427
  });
6424
6428
  })(xr)), xr.exports;
6425
6429
  }
6426
- Js();
6430
+ Qs();
6427
6431
  const Ur = ".bloom-translationGroup:not(.bloom-imageDescription) .bloom-editable.bloom-visibility-code-on, .scrollable";
6428
- function Ea(s, c) {
6432
+ function Ca(s, c) {
6429
6433
  if (s.classList.contains("cover"))
6430
6434
  return;
6431
6435
  const d = Fr(s);
@@ -6460,11 +6464,11 @@ function Ea(s, c) {
6460
6464
  Ee.forEach((pe) => {
6461
6465
  if (L++, U.unobserve(pe.target), !pe.target.parentElement)
6462
6466
  return;
6463
- const wt = !!pe.target.closest(
6467
+ const xt = !!pe.target.closest(
6464
6468
  ji
6465
6469
  );
6466
6470
  let Ve = pe.intersectionRatio < 0.999;
6467
- if (Ve && wt) {
6471
+ if (Ve && xt) {
6468
6472
  let $e = 0.6;
6469
6473
  (pe.target != pe.target.parentElement?.firstElementChild || pe.target != pe.target.parentElement.lastElementChild) && ($e /= 2);
6470
6474
  const ti = (1 - pe.intersectionRatio) * pe.target.clientHeight, o = window.getComputedStyle(
@@ -6495,7 +6499,7 @@ function Ea(s, c) {
6495
6499
  "bloom-vertical-align-bottom"
6496
6500
  ), d && $e.classList.add(
6497
6501
  "bloom-vertical-align-bottom-removed"
6498
- )), wt && pe.target.parentElement.classList.add(
6502
+ )), xt && pe.target.parentElement.classList.add(
6499
6503
  "scrolling-bubble"
6500
6504
  );
6501
6505
  }
@@ -6510,7 +6514,7 @@ function Ea(s, c) {
6510
6514
  cursoropacitymax: 0.1,
6511
6515
  cursorborderradius: V
6512
6516
  // Make the corner more rounded than the 5px default.
6513
- }), ea(
6517
+ }), ta(
6514
6518
  s,
6515
6519
  c
6516
6520
  ), h = []);
@@ -6522,7 +6526,7 @@ function Ea(s, c) {
6522
6526
  });
6523
6527
  }
6524
6528
  }
6525
- function Qs(s) {
6529
+ function ea(s) {
6526
6530
  for (var c = s && s.parentNode ? s.parentNode : null; c && c.nodeType === Node.ELEMENT_NODE && !/^BODY|HTML/.test(c.nodeName); ) {
6527
6531
  const d = window.getComputedStyle(c), h = d.getPropertyValue("position");
6528
6532
  if (/fixed|absolute/.test(h)) return c;
@@ -6538,7 +6542,7 @@ function bo(s, c) {
6538
6542
  const L = c.parentElement;
6539
6543
  if (!L || !L.classList.contains("bloom-translationGroup"))
6540
6544
  return { topAdjust: d, leftAdjust: h, thumbWidth: T };
6541
- if (Qs(c)) {
6545
+ if (ea(c)) {
6542
6546
  const D = window.getComputedStyle(L), k = D.getPropertyValue("padding-top") || "0", q = D.getPropertyValue("padding-left") || "0";
6543
6547
  d = parseFloat(k) * (s - 1), h = parseFloat(q) * (s - 1);
6544
6548
  } else {
@@ -6552,7 +6556,7 @@ function bo(s, c) {
6552
6556
  }
6553
6557
  return { topAdjust: d, leftAdjust: h, thumbWidth: T };
6554
6558
  }
6555
- function ea(s, c) {
6559
+ function ta(s, c) {
6556
6560
  if (s.removeEventListener(
6557
6561
  "pointerdown",
6558
6562
  Ln
@@ -6569,7 +6573,7 @@ function ea(s, c) {
6569
6573
  }
6570
6574
  );
6571
6575
  }
6572
- function Ca(s, c) {
6576
+ function Aa(s, c) {
6573
6577
  s.querySelectorAll(Ur).forEach(
6574
6578
  (d) => {
6575
6579
  const h = Qt(d).getNiceScroll();
@@ -6583,7 +6587,7 @@ function Ca(s, c) {
6583
6587
  function Ln(s) {
6584
6588
  s.target instanceof HTMLDivElement && s.target.classList.contains("nicescroll-cursors") && (s.target.setPointerCapture(s.pointerId), s.pointerType === "mouse" && s.stopPropagation());
6585
6589
  }
6586
- function Aa() {
6590
+ function ka() {
6587
6591
  Qt("div.bloom-page")[0]?.querySelectorAll(Ur).forEach((s) => {
6588
6592
  const c = Qt(
6589
6593
  s
@@ -6601,7 +6605,7 @@ function Aa() {
6601
6605
  ), d.classList.add("bloom-vertical-align-bottom")), s.style.overflow = "", s.style.outline = "", s.style.width = "");
6602
6606
  });
6603
6607
  }
6604
- class ta {
6608
+ class ia {
6605
6609
  static getActualUrlFromCSSPropertyValue(c) {
6606
6610
  const d = c.match(/.*url\((['"])(.*?)\1\).*/i);
6607
6611
  return d ? d[2] : "";
@@ -6706,7 +6710,7 @@ const gt = class gt {
6706
6710
  const h = gt.getAnimationCanvas(c);
6707
6711
  if (this.animationEngine && this.animationEngine.endAnimation(), h) {
6708
6712
  const T = h.getAttribute("data-initialrect"), L = h.getAttribute("data-finalrect");
6709
- this.animationEngine = new ia(
6713
+ this.animationEngine = new ra(
6710
6714
  T,
6711
6715
  L,
6712
6716
  this.animationDuration,
@@ -6732,7 +6736,7 @@ const gt = class gt {
6732
6736
  "data-aspectRatio",
6733
6737
  (z.naturalWidth / z.naturalHeight).toString()
6734
6738
  ), this.placeAnimationWrapper(d), this.createAndPlayAnimation(c, T);
6735
- }), z.src = ta.getActualUrlFromCSSPropertyValue(
6739
+ }), z.src = ia.getActualUrlFromCSSPropertyValue(
6736
6740
  h.style.backgroundImage
6737
6741
  );
6738
6742
  } else
@@ -6817,7 +6821,7 @@ const gt = class gt {
6817
6821
  };
6818
6822
  gt.wrapperClassName = "bloom-ui-animationWrapper";
6819
6823
  let Nn = gt;
6820
- class ia {
6824
+ class ra {
6821
6825
  //initial and final rect strings come in as space-separated "left top width height"
6822
6826
  // all four of these parameters are reperesented as fractions of the canvas
6823
6827
  //duration is the length of the animation in seconds
@@ -6878,73 +6882,75 @@ export {
6878
6882
  Ii as PageNarrationComplete,
6879
6883
  Er as PlayCompleted,
6880
6884
  Tn as PlayFailed,
6881
- la as PlayUnblocked,
6885
+ ca as PlayUnblocked,
6882
6886
  ss as PlaybackMode,
6883
6887
  Hi as ToggleImageDescription,
6884
- ia as TransformBasedAnimator,
6885
- ua as abortNarrationPlayback,
6886
- Ea as addScrollbarsToPage,
6887
- Os as adjustDraggablesForLanguage,
6888
+ ra as TransformBasedAnimator,
6889
+ fa as abortNarrationPlayback,
6890
+ Ca as addScrollbarsToPage,
6891
+ Bs as adjustDraggablesForLanguage,
6888
6892
  Rr as cancelVideoFirstFramePriming,
6889
6893
  jt as classSetter,
6890
- js as cleanupActivitySounds,
6891
- Aa as cleanupNiceScroll,
6892
- pa as computeDuration,
6893
- Ys as copyContentToTarget,
6894
+ Ws as cleanupActivitySounds,
6895
+ ka as cleanupNiceScroll,
6896
+ ga as computeDuration,
6897
+ Us as copyContentToTarget,
6898
+ Un as currentAudioUrl,
6894
6899
  ei as currentPlaybackMode,
6895
6900
  vo as doShowAnswersInTargets,
6896
- Ta as draggingSlider,
6901
+ Sa as draggingSlider,
6897
6902
  Tr as durationReporter,
6898
- Ca as fixNiceScrollOffsets,
6899
- qs as getAudioSentencesOfVisibleEditables,
6903
+ Aa as fixNiceScrollOffsets,
6904
+ Rs as getAudioSentencesOfVisibleEditables,
6900
6905
  ds as getCurrentNarrationPage,
6906
+ Ss as getNarrationFileName,
6901
6907
  Yr as getTarget,
6902
6908
  Mn as getUrlPrefixFromWindowHref,
6903
6909
  Ri as hideVideoAutoplayBlockedHint,
6904
- Is as hideVideoError,
6905
- ga as hidingPage,
6906
- Ms as isDefiniteVideoPlaybackSupportFailure,
6910
+ Hs as hideVideoError,
6911
+ ma as hidingPage,
6912
+ zs as isDefiniteVideoPlaybackSupportFailure,
6907
6913
  Pn as isSwipeInProgress,
6908
- wa as isTheTextInDraggablesTheSame,
6909
- Ps as isTransientVideoPlayFailure,
6914
+ xa as isTheTextInDraggablesTheSame,
6915
+ Ds as isTransientVideoPlayFailure,
6910
6916
  Mi as kAudioSentence,
6911
6917
  us as kHighlightSegmentClass,
6912
6918
  ji as kLegacyCanvasElementSelector,
6913
6919
  Ur as kSelectorForPotentialNiceScrollElements,
6914
- ra as listenForPlayDuration,
6920
+ na as listenForPlayDuration,
6915
6921
  Dn as logNarration,
6916
- fa as pageHasAudio,
6917
- ha as pauseNarration,
6922
+ da as pageHasAudio,
6923
+ pa as pauseNarration,
6918
6924
  lo as performCheck,
6919
6925
  co as performTryAgain,
6920
6926
  gi as playAllAudio,
6921
6927
  hs as playAllSentences,
6922
6928
  jr as playAllVideo,
6923
- Fs as playCorrectOrWrongSound,
6924
- ya as playInitialElements,
6925
- da as playNarration,
6929
+ _s as playCorrectOrWrongSound,
6930
+ ba as playInitialElements,
6931
+ ha as playNarration,
6926
6932
  Jn as playSoundOf,
6927
- Ws as preloadSoundsForActivity,
6928
- ma as prepareActivity,
6933
+ Fs as preloadSoundsForActivity,
6934
+ va as prepareActivity,
6929
6935
  fs as setCurrentPage,
6930
6936
  Kt as setCurrentPlaybackMode,
6931
- xa as setDefaultSoundUrls,
6932
- aa as setDurationOfPagesWithoutNarration,
6933
- ca as setIncludeImageDescriptions,
6934
- oa as setLogNarration,
6937
+ Ta as setDefaultSoundUrls,
6938
+ la as setDurationOfPagesWithoutNarration,
6939
+ ua as setIncludeImageDescriptions,
6940
+ sa as setLogNarration,
6935
6941
  as as setPlayerUrlPrefix,
6936
- sa as setPlayerUrlPrefixFromWindowLocationHref,
6937
- ba as setReportScore,
6938
- na as setTestIsSwipeInProgress,
6939
- ea as setupSpecialMouseTrackingForNiceScroll,
6940
- Sa as setupWordChooserSlider,
6942
+ aa as setPlayerUrlPrefixFromWindowLocationHref,
6943
+ wa as setReportScore,
6944
+ oa as setTestIsSwipeInProgress,
6945
+ ta as setupSpecialMouseTrackingForNiceScroll,
6946
+ Ea as setupWordChooserSlider,
6941
6947
  Gn as showVideoAutoplayBlockedHint,
6942
6948
  Sn as showVideoError,
6943
- Ds as showVideoFirstFrameWhenReady,
6944
- Rs as shuffle,
6949
+ Ms as showVideoFirstFrameWhenReady,
6950
+ js as shuffle,
6945
6951
  ls as sortAudioElements,
6946
6952
  qr as stopPlayAllVideoPlayback,
6947
- va as undoPrepareActivity,
6953
+ ya as undoPrepareActivity,
6948
6954
  Pr as urlPrefix
6949
6955
  };
6950
6956
  //# sourceMappingURL=shared.es.js.map