nam-rich-text-editor 9.2.3 → 9.2.5

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.
@@ -202,8 +202,8 @@ function Fn(h, m) {
202
202
  w.style[h] = m;
203
203
  const g = u.extractContents();
204
204
  w.appendChild(g), u.insertNode(w), p.removeAllRanges();
205
- const T = document.createRange();
206
- T.selectNodeContents(w), p.addRange(T), de(T);
205
+ const C = document.createRange();
206
+ C.selectNodeContents(w), p.addRange(C), de(C);
207
207
  return;
208
208
  }
209
209
  const v = document.createElement("span");
@@ -211,10 +211,10 @@ function Fn(h, m) {
211
211
  const y = document.createRange();
212
212
  y.setStart(v.firstChild, 0), y.setEnd(v.firstChild, 0), p.addRange(y), de(y);
213
213
  }
214
- function _o(h) {
214
+ function Ao(h) {
215
215
  Fn("color", h);
216
216
  }
217
- function Ao(h) {
217
+ function _o(h) {
218
218
  Fn("backgroundColor", h);
219
219
  }
220
220
  function Mo() {
@@ -246,7 +246,7 @@ function Ro() {
246
246
  p.setAttribute("role", "button"), p.tabIndex = 0, p.style.userSelect = "none", p.addEventListener("keydown", (y) => {
247
247
  (y.key === "Enter" || y.key === " ") && (y.preventDefault(), p.click());
248
248
  }), p.textContent = "A", p.style.color = "#000", p.style.fontSize = "16px", p.style.fontWeight = "bold", p.style.border = "1px solid #ccc", p.style.borderRadius = "4px", p.style.padding = "4px 8px", p.style.cursor = "pointer", p.style.backgroundColor = "#fff", p.title = "Text Color", p.onclick = () => m.click(), m.onchange = () => {
249
- Re(), _o(m.value), p.style.color = m.value;
249
+ Re(), Ao(m.value), p.style.color = m.value;
250
250
  }, h.appendChild(p), h.appendChild(m);
251
251
  const u = document.createElement("input");
252
252
  u.type = "color", u.style.display = "none", u.title = "Background Color";
@@ -254,7 +254,7 @@ function Ro() {
254
254
  return v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (y) => {
255
255
  (y.key === "Enter" || y.key === " ") && (y.preventDefault(), v.click());
256
256
  }), v.textContent = "BA", v.style.color = "#000", v.style.fontSize = "14px", v.style.fontWeight = "bold", v.style.border = "1px solid #ccc", v.style.borderRadius = "4px", v.style.padding = "4px 6px", v.style.cursor = "pointer", v.style.backgroundColor = "#fff", v.title = "Background Color", v.onclick = () => u.click(), u.onchange = () => {
257
- Re(), Ao(u.value), v.style.backgroundColor = u.value, v.style.color = "#000";
257
+ Re(), _o(u.value), v.style.backgroundColor = u.value, v.style.color = "#000";
258
258
  }, h.appendChild(v), h.appendChild(u), h;
259
259
  }
260
260
  function Io() {
@@ -296,14 +296,14 @@ function Io() {
296
296
  y.preventDefault(), y.stopPropagation();
297
297
  const g = u.closest(".editor-container")?.querySelector(".editor");
298
298
  if (!g) return;
299
- const T = window.__selectedImageContainer;
300
- if (console.log("Align clicked, selectedContainer:", T), T && g.contains(T)) {
301
- T.style.textAlign = p.align, console.log("Applied align:", p.align, "to container"), g.dispatchEvent(new Event("input", { bubbles: !0 }));
299
+ const C = window.__selectedImageContainer;
300
+ if (console.log("Align clicked, selectedContainer:", C), C && g.contains(C)) {
301
+ C.style.textAlign = p.align, console.log("Applied align:", p.align, "to container"), g.dispatchEvent(new Event("input", { bubbles: !0 }));
302
302
  return;
303
303
  }
304
- const A = window.getSelection();
305
- if (A && A.rangeCount > 0 && A.anchorNode) {
306
- let k = A.anchorNode;
304
+ const S = window.getSelection();
305
+ if (S && S.rangeCount > 0 && S.anchorNode) {
306
+ let k = S.anchorNode;
307
307
  for (; k && k.nodeType !== Node.ELEMENT_NODE; )
308
308
  k = k.parentNode;
309
309
  let _ = k;
@@ -327,7 +327,7 @@ function Po(h) {
327
327
  u && (u.tagName === "P" || u.tagName === "DIV" && !u.classList.contains("editor-image-container") && !u.classList.contains("editor-image-wrapper") && u !== h) && (u.parentNode?.insertBefore(p, u.nextSibling), !u.textContent?.trim() && !u.querySelector("img") && u.remove());
328
328
  });
329
329
  }
330
- function Oo() {
330
+ function Do() {
331
331
  const h = document.createDocumentFragment();
332
332
  return [
333
333
  { command: "insertUnorderedList", icon: fo, title: "Bullet List" },
@@ -349,7 +349,7 @@ function Oo() {
349
349
  }, h.appendChild(u);
350
350
  }), h;
351
351
  }
352
- function Do() {
352
+ function Oo() {
353
353
  const h = document.createDocumentFragment();
354
354
  return [
355
355
  { command: "indent", icon: uo, title: "Increase Indent" },
@@ -410,11 +410,11 @@ function zo() {
410
410
  else {
411
411
  v = w.getAttribute("style") || "", y = g && g.getAttribute("style") || "", w.style.position = "fixed", w.style.top = "0", w.style.left = "0", w.style.width = "100vw", w.style.height = "100vh", w.style.margin = "0", w.style.padding = "0";
412
412
  try {
413
- let T = 9998;
414
- document.querySelectorAll("body *").forEach((A) => {
415
- const k = window.getComputedStyle(A).getPropertyValue("z-index"), _ = parseInt(k, 10);
416
- !isNaN(_) && _ > 0 && (T = Math.max(T, _));
417
- }), w.style.zIndex = String(Math.max(T + 1, 9999));
413
+ let C = 9998;
414
+ document.querySelectorAll("body *").forEach((S) => {
415
+ const k = window.getComputedStyle(S).getPropertyValue("z-index"), _ = parseInt(k, 10);
416
+ !isNaN(_) && _ > 0 && (C = Math.max(C, _));
417
+ }), w.style.zIndex = String(Math.max(C + 1, 9999));
418
418
  } catch {
419
419
  w.style.zIndex = "9999";
420
420
  }
@@ -434,25 +434,25 @@ function Fo(h) {
434
434
  const w = document.createElement("div");
435
435
  w.style.display = "flex", w.style.gap = "10px", w.style.justifyContent = "flex-end";
436
436
  const g = document.createElement("div");
437
- g.setAttribute("role", "button"), g.tabIndex = 0, g.style.userSelect = "none", g.textContent = "Cancel", g.style.padding = "8px 16px", g.style.border = "1px solid #ccc", g.style.borderRadius = "4px", g.style.backgroundColor = "#f5f5f5", g.style.cursor = "pointer", g.addEventListener("keydown", (R) => {
438
- (R.key === "Enter" || R.key === " " || R.key === "Escape") && (R.preventDefault(), g.click());
437
+ g.setAttribute("role", "button"), g.tabIndex = 0, g.style.userSelect = "none", g.textContent = "Cancel", g.style.padding = "8px 16px", g.style.border = "1px solid #ccc", g.style.borderRadius = "4px", g.style.backgroundColor = "#f5f5f5", g.style.cursor = "pointer", g.addEventListener("keydown", (I) => {
438
+ (I.key === "Enter" || I.key === " " || I.key === "Escape") && (I.preventDefault(), g.click());
439
439
  }), g.onclick = () => {
440
- p.style.display = "none", y.value = "", T = null;
440
+ p.style.display = "none", y.value = "", C = null;
441
441
  };
442
- let T = null;
443
- const A = document.createElement("div");
444
- A.setAttribute("role", "button"), A.tabIndex = 0, A.style.userSelect = "none", A.textContent = "Insert", A.style.padding = "8px 16px", A.style.border = "none", A.style.borderRadius = "4px", A.style.backgroundColor = "#007bff", A.style.color = "#fff", A.style.cursor = "pointer", A.addEventListener("keydown", (R) => {
445
- (R.key === "Enter" || R.key === " ") && (R.preventDefault(), A.click());
446
- }), A.onclick = () => {
447
- const R = y.value.trim();
448
- if (R)
449
- if (T)
450
- T.setAttribute("href", R), T.setAttribute("target", "_blank"), T.setAttribute("rel", "noopener noreferrer"), T.setAttribute("tabindex", "0");
442
+ let C = null;
443
+ const S = document.createElement("div");
444
+ S.setAttribute("role", "button"), S.tabIndex = 0, S.style.userSelect = "none", S.textContent = "Insert", S.style.padding = "8px 16px", S.style.border = "none", S.style.borderRadius = "4px", S.style.backgroundColor = "#007bff", S.style.color = "#fff", S.style.cursor = "pointer", S.addEventListener("keydown", (I) => {
445
+ (I.key === "Enter" || I.key === " ") && (I.preventDefault(), S.click());
446
+ }), S.onclick = () => {
447
+ const I = y.value.trim();
448
+ if (I)
449
+ if (C)
450
+ C.setAttribute("href", I), C.setAttribute("target", "_blank"), C.setAttribute("rel", "noopener noreferrer"), C.setAttribute("tabindex", "0");
451
451
  else {
452
- Re(), document.execCommand("createLink", !1, R);
453
- const j = window.getSelection();
454
- if (j && j.rangeCount > 0) {
455
- let N = j.getRangeAt(0).startContainer;
452
+ Re(), document.execCommand("createLink", !1, I);
453
+ const W = window.getSelection();
454
+ if (W && W.rangeCount > 0) {
455
+ let N = W.getRangeAt(0).startContainer;
456
456
  for (; N && N.nodeType !== Node.ELEMENT_NODE; )
457
457
  N = N.parentNode;
458
458
  let P = N;
@@ -466,41 +466,41 @@ function Fo(h) {
466
466
  }
467
467
  }
468
468
  }
469
- p.style.display = "none", y.value = "", T = null;
470
- }, w.appendChild(g), w.appendChild(A), u.appendChild(v), u.appendChild(y), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), y.onkeydown = (R) => {
471
- R.key === "Enter" ? A.click() : R.key === "Escape" && g.click();
469
+ p.style.display = "none", y.value = "", C = null;
470
+ }, w.appendChild(g), w.appendChild(S), u.appendChild(v), u.appendChild(y), u.appendChild(w), p.appendChild(u), document.body.appendChild(p), y.onkeydown = (I) => {
471
+ I.key === "Enter" ? S.click() : I.key === "Escape" && g.click();
472
472
  };
473
473
  const k = document.createElement("div");
474
474
  k.setAttribute("role", "button"), k.tabIndex = 0, k.style.userSelect = "none";
475
475
  const _ = ye(lo, { width: 16, height: 16 });
476
476
  k.appendChild(_), k.title = "Insert Hyperlink", k.style.border = "1px solid #e1e1e1", k.style.backgroundColor = "#ffffff", k.style.padding = "6px 10px", k.style.borderRadius = "3px", k.style.cursor = "pointer", k.style.color = "#000000", k.onmouseover = () => k.style.backgroundColor = "#f0f0f0", k.onmouseout = () => k.style.backgroundColor = "#ffffff", k.onmousedown = () => {
477
- T = null;
478
- const R = window.getSelection();
479
- if (R && R.rangeCount > 0) {
480
- let N = R.getRangeAt(0).startContainer;
477
+ C = null;
478
+ const I = window.getSelection();
479
+ if (I && I.rangeCount > 0) {
480
+ let N = I.getRangeAt(0).startContainer;
481
481
  for (; N && N.nodeType !== Node.ELEMENT_NODE; )
482
482
  N = N.parentNode;
483
483
  let P = N;
484
484
  for (; P && P !== document.body; ) {
485
485
  if (P.tagName === "A") {
486
- T = P, y.value = T.getAttribute("href") || "";
486
+ C = P, y.value = C.getAttribute("href") || "";
487
487
  break;
488
488
  }
489
489
  P = P.parentElement;
490
490
  }
491
491
  }
492
492
  de();
493
- }, k.addEventListener("keydown", (R) => {
494
- (R.key === "Enter" || R.key === " ") && (R.preventDefault(), k.click());
493
+ }, k.addEventListener("keydown", (I) => {
494
+ (I.key === "Enter" || I.key === " ") && (I.preventDefault(), k.click());
495
495
  }), k.onclick = () => {
496
496
  p.style.display = "flex", y.focus();
497
497
  }, m.appendChild(k);
498
- const I = h.querySelector(".editor");
499
- return I && I.addEventListener("click", (R) => {
500
- const j = R.target;
501
- if (j.tagName === "A") {
502
- R.preventDefault();
503
- const N = j.getAttribute("href");
498
+ const O = h.querySelector(".editor");
499
+ return O && O.addEventListener("click", (I) => {
500
+ const W = I.target;
501
+ if (W.tagName === "A") {
502
+ I.preventDefault();
503
+ const N = W.getAttribute("href");
504
504
  N && window.open(N, "_blank");
505
505
  }
506
506
  }), m;
@@ -522,65 +522,65 @@ function jo() {
522
522
  w.textContent = "Insert Quote", w.className = "rte-modal-title";
523
523
  const g = document.createElement("div");
524
524
  g.setAttribute("role", "button"), g.tabIndex = 0, g.style.userSelect = "none", g.className = "rte-modal-close", g.innerHTML = "×", g.onclick = () => {
525
- u.style.display = "none", te = null;
525
+ u.style.display = "none", X = null;
526
526
  }, y.appendChild(w), y.appendChild(g);
527
- const T = document.createElement("div");
528
- T.className = "rte-modal-form";
529
- const A = document.createElement("label");
530
- A.textContent = "Title", A.className = "rte-label";
527
+ const C = document.createElement("div");
528
+ C.className = "rte-modal-form";
529
+ const S = document.createElement("label");
530
+ S.textContent = "Title", S.className = "rte-label";
531
531
  const k = document.createElement("input");
532
532
  k.type = "text", k.placeholder = "e.g., Article title or source", k.className = "rte-input";
533
533
  const _ = document.createElement("label");
534
534
  _.textContent = "Source URL", _.className = "rte-label";
535
- const I = document.createElement("input");
536
- I.type = "url", I.placeholder = "https://example.com", I.className = "rte-input";
537
- const R = document.createElement("div");
538
- R.className = "rte-preview-label", R.textContent = "Preview";
539
- const j = document.createElement("div");
540
- j.className = "rte-modal-preview";
535
+ const O = document.createElement("input");
536
+ O.type = "url", O.placeholder = "https://example.com", O.className = "rte-input";
537
+ const I = document.createElement("div");
538
+ I.className = "rte-preview-label", I.textContent = "Preview";
539
+ const W = document.createElement("div");
540
+ W.className = "rte-modal-preview";
541
541
  const N = document.createElement("div");
542
542
  N.className = "rte-blockquote-title";
543
543
  const P = document.createElement("div");
544
544
  P.className = "rte-blockquote-content";
545
545
  const H = document.createElement("div");
546
- H.className = "rte-blockquote-footer", j.appendChild(N), j.appendChild(P), j.appendChild(H), T.appendChild(A), T.appendChild(k), T.appendChild(_), T.appendChild(I), T.appendChild(R), T.appendChild(j);
547
- const L = document.createElement("div");
548
- L.className = "rte-modal-actions";
549
- const V = document.createElement("div");
550
- V.setAttribute("role", "button"), V.tabIndex = 0, V.style.userSelect = "none", V.className = "rte-btn-danger", V.textContent = "Remove", V.style.display = "none", V.onclick = () => {
551
- te && (te.remove(), te = null), u.style.display = "none";
546
+ H.className = "rte-blockquote-footer", W.appendChild(N), W.appendChild(P), W.appendChild(H), C.appendChild(S), C.appendChild(k), C.appendChild(_), C.appendChild(O), C.appendChild(I), C.appendChild(W);
547
+ const M = document.createElement("div");
548
+ M.className = "rte-modal-actions";
549
+ const F = document.createElement("div");
550
+ F.setAttribute("role", "button"), F.tabIndex = 0, F.style.userSelect = "none", F.className = "rte-btn-danger", F.textContent = "Remove", F.style.display = "none", F.onclick = () => {
551
+ X && (X.remove(), X = null), u.style.display = "none";
552
552
  };
553
- const Z = document.createElement("div");
554
- Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-muted", Z.textContent = "Cancel", Z.onclick = () => {
555
- u.style.display = "none", te = null;
553
+ const $ = document.createElement("div");
554
+ $.setAttribute("role", "button"), $.tabIndex = 0, $.style.userSelect = "none", $.className = "rte-btn-muted", $.textContent = "Cancel", $.onclick = () => {
555
+ u.style.display = "none", X = null;
556
556
  };
557
- const ie = document.createElement("div");
558
- ie.setAttribute("role", "button"), ie.tabIndex = 0, ie.style.userSelect = "none", ie.className = "rte-btn-primary", ie.textContent = "Apply", ie.onclick = () => {
557
+ const oe = document.createElement("div");
558
+ oe.setAttribute("role", "button"), oe.tabIndex = 0, oe.style.userSelect = "none", oe.className = "rte-btn-primary", oe.textContent = "Apply", oe.onclick = () => {
559
559
  const ne = k.value.trim();
560
- let W = I.value.trim();
561
- if (W && !/^https?:\/\//i.test(W) && (W = `https://${W}`), te) {
562
- const le = te.querySelector(
560
+ let B = O.value.trim();
561
+ if (B && !/^https?:\/\//i.test(B) && (B = `https://${B}`), X) {
562
+ const le = X.querySelector(
563
563
  ".rte-blockquote-title"
564
564
  );
565
565
  if (ne)
566
566
  if (le) le.textContent = ne;
567
567
  else {
568
- const J = document.createElement("div");
569
- J.className = "rte-blockquote-title", J.textContent = ne, te.insertBefore(J, te.firstChild);
568
+ const Z = document.createElement("div");
569
+ Z.className = "rte-blockquote-title", Z.textContent = ne, X.insertBefore(Z, X.firstChild);
570
570
  }
571
571
  else le && le.remove();
572
- const ce = te.querySelector(
572
+ const ce = X.querySelector(
573
573
  ".rte-blockquote-footer"
574
574
  );
575
- if (W)
575
+ if (B)
576
576
  if (ce) {
577
- const J = ce.querySelector("a");
578
- J.href = W, J.textContent = W;
577
+ const Z = ce.querySelector("a");
578
+ Z.href = B, Z.textContent = B;
579
579
  } else {
580
- const J = document.createElement("footer");
581
- J.className = "rte-blockquote-footer";
582
- const Q = document.createElement("cite"), X = document.createElement("a");
583
- X.href = W, X.textContent = W, X.target = "_blank", X.rel = "noopener noreferrer", Q.appendChild(X), J.appendChild(Q), te.appendChild(J);
580
+ const Z = document.createElement("footer");
581
+ Z.className = "rte-blockquote-footer";
582
+ const ee = document.createElement("cite"), K = document.createElement("a");
583
+ K.href = B, K.textContent = B, K.target = "_blank", K.rel = "noopener noreferrer", ee.appendChild(K), Z.appendChild(ee), X.appendChild(Z);
584
584
  }
585
585
  else ce && ce.remove();
586
586
  } else {
@@ -590,58 +590,58 @@ function jo() {
590
590
  u.style.display = "none";
591
591
  return;
592
592
  }
593
- const ce = le.getRangeAt(0), J = ce.extractContents(), Q = document.createElement("blockquote");
594
- if (Q.className = "rte-blockquote", ne) {
593
+ const ce = le.getRangeAt(0), Z = ce.extractContents(), ee = document.createElement("blockquote");
594
+ if (ee.className = "rte-blockquote", ne) {
595
595
  const re = document.createElement("div");
596
- re.className = "rte-blockquote-title", re.textContent = ne, Q.appendChild(re);
596
+ re.className = "rte-blockquote-title", re.textContent = ne, ee.appendChild(re);
597
597
  }
598
- const X = document.createElement("p");
599
- if (X.appendChild(J), Q.appendChild(X), W) {
598
+ const K = document.createElement("p");
599
+ if (K.appendChild(Z), ee.appendChild(K), B) {
600
600
  const re = document.createElement("footer");
601
601
  re.className = "rte-blockquote-footer";
602
602
  const se = document.createElement("cite"), pe = document.createElement("a");
603
- pe.href = W, pe.textContent = W, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), re.appendChild(se), Q.appendChild(re);
603
+ pe.href = B, pe.textContent = B, pe.target = "_blank", pe.rel = "noopener noreferrer", se.appendChild(pe), re.appendChild(se), ee.appendChild(re);
604
604
  }
605
- ce.insertNode(Q), le.removeAllRanges();
606
- const oe = document.createRange();
607
- oe.setStartAfter(Q), oe.collapse(!0), le.addRange(oe), de(oe);
605
+ ce.insertNode(ee), le.removeAllRanges();
606
+ const ie = document.createRange();
607
+ ie.setStartAfter(ee), ie.collapse(!0), le.addRange(ie), de(ie);
608
608
  }
609
- u.style.display = "none", k.value = "", I.value = "", te = null;
610
- }, L.appendChild(V), L.appendChild(Z), L.appendChild(ie), v.appendChild(y), v.appendChild(T), v.appendChild(L), u.appendChild(v), document.body.appendChild(u);
611
- let te = null, x = "";
609
+ u.style.display = "none", k.value = "", O.value = "", X = null;
610
+ }, M.appendChild(F), M.appendChild($), M.appendChild(oe), v.appendChild(y), v.appendChild(C), v.appendChild(M), u.appendChild(v), document.body.appendChild(u);
611
+ let X = null, b = "";
612
612
  return m.onmousedown = () => {
613
- te = null, x = "";
613
+ X = null, b = "";
614
614
  const ne = window.getSelection();
615
615
  if (ne && ne.rangeCount > 0) {
616
- const W = ne.getRangeAt(0), le = document.createElement("div");
617
- le.appendChild(W.cloneContents()), x = le.innerHTML || W.toString();
618
- let ce = W.startContainer;
616
+ const B = ne.getRangeAt(0), le = document.createElement("div");
617
+ le.appendChild(B.cloneContents()), b = le.innerHTML || B.toString();
618
+ let ce = B.startContainer;
619
619
  for (; ce && ce.nodeType !== Node.ELEMENT_NODE; )
620
620
  ce = ce.parentNode;
621
- let J = ce;
622
- for (; J && J !== document.body; ) {
623
- if (J.tagName === "BLOCKQUOTE") {
624
- te = J;
625
- const Q = te.querySelector(
621
+ let Z = ce;
622
+ for (; Z && Z !== document.body; ) {
623
+ if (Z.tagName === "BLOCKQUOTE") {
624
+ X = Z;
625
+ const ee = X.querySelector(
626
626
  ".rte-blockquote-title"
627
- ), X = te.querySelector(
627
+ ), K = X.querySelector(
628
628
  ".rte-blockquote-footer a"
629
629
  );
630
- k.value = Q && Q.textContent || "", I.value = X && X.href || "", V.style.display = "inline-block";
631
- const oe = te.querySelector("p");
632
- P.innerHTML = oe ? oe.innerHTML : te.innerHTML, N.textContent = Q && Q.textContent || "", H.innerHTML = X ? `<a href="${X.href}">${X.href}</a>` : "";
630
+ k.value = ee && ee.textContent || "", O.value = K && K.href || "", F.style.display = "inline-block";
631
+ const ie = X.querySelector("p");
632
+ P.innerHTML = ie ? ie.innerHTML : X.innerHTML, N.textContent = ee && ee.textContent || "", H.innerHTML = K ? `<a href="${K.href}">${K.href}</a>` : "";
633
633
  break;
634
634
  }
635
- J = J.parentElement;
635
+ Z = Z.parentElement;
636
636
  }
637
637
  }
638
- te || (P.innerHTML = x || "<em>Selected text will appear here</em>", N.textContent = "", H.innerHTML = "", V.style.display = "none"), de();
639
- }, k.oninput = () => N.textContent = k.value, I.oninput = () => {
640
- const ne = I.value.trim();
638
+ X || (P.innerHTML = b || "<em>Selected text will appear here</em>", N.textContent = "", H.innerHTML = "", F.style.display = "none"), de();
639
+ }, k.oninput = () => N.textContent = k.value, O.oninput = () => {
640
+ const ne = O.value.trim();
641
641
  if (!ne) H.innerHTML = "";
642
642
  else {
643
- const W = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
644
- H.innerHTML = `<a href="${W}" target="_blank" rel="noopener noreferrer">${W}</a>`;
643
+ const B = /^https?:\/\//i.test(ne) ? ne : `https://${ne}`;
644
+ H.innerHTML = `<a href="${B}" target="_blank" rel="noopener noreferrer">${B}</a>`;
645
645
  }
646
646
  }, m.onclick = () => {
647
647
  u.style.display = "flex", k.focus();
@@ -655,7 +655,7 @@ function Ho() {
655
655
  const p = ye(yo, { width: 16, height: 16 });
656
656
  return m.appendChild(p), m.title = "Remove Formatting", m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.padding = "6px 10px", m.style.borderRadius = "3px", m.style.cursor = "pointer", m.style.color = "#000000", m.onmouseover = () => m.style.backgroundColor = "#f0f0f0", m.onmouseout = () => m.style.backgroundColor = "#ffffff", m.onclick = () => document.execCommand("removeFormat"), h.appendChild(m), h;
657
657
  }
658
- function Bo(h) {
658
+ function Wo(h) {
659
659
  const m = document.createDocumentFragment(), p = document.createElement("div");
660
660
  p.className = "rte-modal-overlay", p.style.display = "none";
661
661
  const u = document.createElement("div");
@@ -668,66 +668,66 @@ function Bo(h) {
668
668
  w.setAttribute("role", "button"), w.tabIndex = 0, w.style.userSelect = "none", w.className = "rte-modal-close", w.innerHTML = "&times;", w.onclick = () => p.style.display = "none", v.appendChild(y), v.appendChild(w);
669
669
  const g = document.createElement("div");
670
670
  g.className = "rte-modal-form";
671
- const T = document.createElement("label");
672
- T.className = "rte-label", T.textContent = "Video URL";
673
- const A = document.createElement("input");
674
- A.type = "url", A.className = "rte-input", A.placeholder = "https://... or YouTube URL";
671
+ const C = document.createElement("label");
672
+ C.className = "rte-label", C.textContent = "Video URL";
673
+ const S = document.createElement("input");
674
+ S.type = "url", S.className = "rte-input", S.placeholder = "https://... or YouTube URL";
675
675
  const k = document.createElement("div");
676
676
  k.className = "rte-preview-label", k.textContent = "Preview";
677
677
  const _ = document.createElement("div");
678
678
  _.className = "rte-modal-preview";
679
+ const O = document.createElement("div");
680
+ O.className = "rte-form-left";
679
681
  const I = document.createElement("div");
680
- I.className = "rte-form-left";
681
- const R = document.createElement("div");
682
- R.className = "rte-form-right";
683
- const j = document.createElement("div");
684
- j.className = "rte-field", j.appendChild(T), j.appendChild(A);
682
+ I.className = "rte-form-right";
683
+ const W = document.createElement("div");
684
+ W.className = "rte-field", W.appendChild(C), W.appendChild(S);
685
685
  const N = document.createElement("div");
686
686
  N.className = "rte-dim-row";
687
687
  const P = document.createElement("div");
688
688
  P.style.display = "flex", P.style.flexDirection = "column";
689
689
  const H = document.createElement("label");
690
690
  H.className = "rte-label", H.textContent = "Width (px)";
691
- const L = document.createElement("input");
692
- L.type = "text", L.className = "rte-dim-input", L.placeholder = "e.g., 560", P.appendChild(H), P.appendChild(L);
693
- const V = document.createElement("div");
694
- V.style.display = "flex", V.style.flexDirection = "column";
695
- const Z = document.createElement("label");
696
- Z.className = "rte-label", Z.textContent = "Height (px)";
697
- const ie = document.createElement("input");
698
- ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", V.appendChild(Z), V.appendChild(ie), N.appendChild(P), N.appendChild(V), I.appendChild(j), I.appendChild(N), R.appendChild(k), R.appendChild(_), g.appendChild(I), g.appendChild(R);
699
- const te = document.createElement("div");
700
- te.className = "rte-modal-actions";
701
- const x = document.createElement("div");
702
- x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-btn-muted", x.textContent = "Cancel", x.onclick = () => p.style.display = "none";
691
+ const M = document.createElement("input");
692
+ M.type = "text", M.className = "rte-dim-input", M.placeholder = "e.g., 560", P.appendChild(H), P.appendChild(M);
693
+ const F = document.createElement("div");
694
+ F.style.display = "flex", F.style.flexDirection = "column";
695
+ const $ = document.createElement("label");
696
+ $.className = "rte-label", $.textContent = "Height (px)";
697
+ const oe = document.createElement("input");
698
+ oe.type = "text", oe.className = "rte-dim-input", oe.placeholder = "e.g., 315", F.appendChild($), F.appendChild(oe), N.appendChild(P), N.appendChild(F), O.appendChild(W), O.appendChild(N), I.appendChild(k), I.appendChild(_), g.appendChild(O), g.appendChild(I);
699
+ const X = document.createElement("div");
700
+ X.className = "rte-modal-actions";
701
+ const b = document.createElement("div");
702
+ b.setAttribute("role", "button"), b.tabIndex = 0, b.style.userSelect = "none", b.className = "rte-btn-muted", b.textContent = "Cancel", b.onclick = () => p.style.display = "none";
703
703
  const ne = document.createElement("div");
704
- ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-primary", ne.textContent = "Insert", te.appendChild(x), te.appendChild(ne), u.appendChild(v), u.appendChild(g), u.appendChild(te), p.appendChild(u), document.body.appendChild(p);
705
- const W = document.createElement("div");
706
- W.setAttribute("role", "button"), W.tabIndex = 0, W.style.userSelect = "none";
704
+ ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-primary", ne.textContent = "Insert", X.appendChild(b), X.appendChild(ne), u.appendChild(v), u.appendChild(g), u.appendChild(X), p.appendChild(u), document.body.appendChild(p);
705
+ const B = document.createElement("div");
706
+ B.setAttribute("role", "button"), B.tabIndex = 0, B.style.userSelect = "none";
707
707
  const le = ye(To, { width: 16, height: 16 });
708
- W.appendChild(le), W.title = "Insert Video", W.style.border = "1px solid #e1e1e1", W.style.backgroundColor = "#ffffff", W.style.padding = "6px 10px", W.style.borderRadius = "3px", W.style.cursor = "pointer", W.style.color = "#000000", W.onmouseover = () => W.style.backgroundColor = "#f0f0f0", W.onmouseout = () => W.style.backgroundColor = "#ffffff", W.onmousedown = () => de(), W.addEventListener("keydown", (Q) => {
709
- (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), W.click());
710
- }), W.onclick = () => {
711
- _.innerHTML = "<em>No URL entered</em>", A.value = "", p.style.display = "flex", A.focus();
708
+ B.appendChild(le), B.title = "Insert Video", B.style.border = "1px solid #e1e1e1", B.style.backgroundColor = "#ffffff", B.style.padding = "6px 10px", B.style.borderRadius = "3px", B.style.cursor = "pointer", B.style.color = "#000000", B.onmouseover = () => B.style.backgroundColor = "#f0f0f0", B.onmouseout = () => B.style.backgroundColor = "#ffffff", B.onmousedown = () => de(), B.addEventListener("keydown", (ee) => {
709
+ (ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), B.click());
710
+ }), B.onclick = () => {
711
+ _.innerHTML = "<em>No URL entered</em>", S.value = "", p.style.display = "flex", S.focus();
712
712
  };
713
713
  const ce = () => {
714
- const Q = A.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
715
- if (!Q) {
714
+ const ee = S.value.trim(), K = M && M.value.trim() || "", ie = oe && oe.value.trim() || "", re = parseInt(K, 10), se = parseInt(ie, 10);
715
+ if (!ee) {
716
716
  _.innerHTML = "<em>No preview</em>";
717
717
  return;
718
718
  }
719
- const pe = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
719
+ const pe = ee.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
720
720
  if (pe) {
721
- const E = pe[1], B = Number.isFinite(re) ? re : 320, Y = Number.isFinite(se) ? se : 180;
722
- _.innerHTML = `<iframe width="${B}" height="${Y}" src="https://www.youtube.com/embed/${E}" frameborder="0" allowfullscreen></iframe>`;
721
+ const E = pe[1], q = Number.isFinite(re) ? re : 320, V = Number.isFinite(se) ? se : 180;
722
+ _.innerHTML = `<iframe width="${q}" height="${V}" src="https://www.youtube.com/embed/${E}" frameborder="0" allowfullscreen></iframe>`;
723
723
  return;
724
724
  }
725
725
  const fe = Number.isFinite(re) ? `${re}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
726
- _.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${Q}"></video>`;
726
+ _.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${ee}"></video>`;
727
727
  };
728
- A.oninput = ce, typeof L < "u" && (L.oninput = ce), typeof ie < "u" && (ie.oninput = ce), ne.onclick = () => {
729
- const Q = A.value.trim(), X = L && L.value.trim() || "", oe = ie && ie.value.trim() || "", re = parseInt(X, 10), se = parseInt(oe, 10);
730
- if (!Q) {
728
+ S.oninput = ce, typeof M < "u" && (M.oninput = ce), typeof oe < "u" && (oe.oninput = ce), ne.onclick = () => {
729
+ const ee = S.value.trim(), K = M && M.value.trim() || "", ie = oe && oe.value.trim() || "", re = parseInt(K, 10), se = parseInt(ie, 10);
730
+ if (!ee) {
731
731
  p.style.display = "none";
732
732
  return;
733
733
  }
@@ -737,32 +737,32 @@ function Bo(h) {
737
737
  p.style.display = "none";
738
738
  return;
739
739
  }
740
- const fe = pe.getRangeAt(0), he = Q.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
740
+ const fe = pe.getRangeAt(0), he = ee.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
741
741
  let E;
742
742
  if (he) {
743
- const Y = he[1], G = document.createElement("div"), xe = Number.isFinite(re) ? re : 560, we = Number.isFinite(se) ? se : 315;
744
- G.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${Y}" frameborder="0" allowfullscreen></iframe>`, G.contentEditable = "false", G.className = "editor-video-wrapper", G.style.display = "block", G.style.maxWidth = "100%", G.style.width = "auto", G.style.height = "auto", G.style.boxSizing = "border-box", G.style.userSelect = "none", E = G;
743
+ const V = he[1], J = document.createElement("div"), xe = Number.isFinite(re) ? re : 560, we = Number.isFinite(se) ? se : 315;
744
+ J.innerHTML = `<iframe width="${xe}" height="${we}" src="https://www.youtube.com/embed/${V}" frameborder="0" allowfullscreen></iframe>`, J.contentEditable = "false", J.className = "editor-video-wrapper", J.style.display = "block", J.style.maxWidth = "100%", J.style.width = "auto", J.style.height = "auto", J.style.boxSizing = "border-box", J.style.userSelect = "none", E = J;
745
745
  } else {
746
- const Y = document.createElement("div"), G = document.createElement("video");
747
- G.controls = !0, G.src = Q, Number.isFinite(re) && (G.width = re), Number.isFinite(se) && (G.height = se), G.style.maxWidth = "100%", G.style.display = "block", Y.appendChild(G), Y.contentEditable = "false", Y.className = "editor-video-wrapper", Y.style.display = "block", Y.style.maxWidth = "100%", Y.style.width = "auto", Y.style.height = "auto", Y.style.boxSizing = "border-box", Y.style.userSelect = "none", E = Y;
746
+ const V = document.createElement("div"), J = document.createElement("video");
747
+ J.controls = !0, J.src = ee, Number.isFinite(re) && (J.width = re), Number.isFinite(se) && (J.height = se), J.style.maxWidth = "100%", J.style.display = "block", V.appendChild(J), V.contentEditable = "false", V.className = "editor-video-wrapper", V.style.display = "block", V.style.maxWidth = "100%", V.style.width = "auto", V.style.height = "auto", V.style.boxSizing = "border-box", V.style.userSelect = "none", E = V;
748
748
  }
749
749
  fe.insertNode(E), pe.removeAllRanges();
750
- const B = document.createRange();
751
- B.setStartAfter(E), B.collapse(!0), pe.addRange(B), de(B);
750
+ const q = document.createRange();
751
+ q.setStartAfter(E), q.collapse(!0), pe.addRange(q), de(q);
752
752
  try {
753
- const Y = J;
754
- Y && typeof Y.focus == "function" && (Y.focus(), Y.dispatchEvent(new Event("input", { bubbles: !0 })));
753
+ const V = Z;
754
+ V && typeof V.focus == "function" && (V.focus(), V.dispatchEvent(new Event("input", { bubbles: !0 })));
755
755
  } catch {
756
756
  }
757
- p.style.display = "none", A.value = "", _.innerHTML = "";
757
+ p.style.display = "none", S.value = "", _.innerHTML = "";
758
758
  };
759
- const J = h.querySelector(".editor");
760
- return J && J.addEventListener("click", (Q) => {
761
- const X = Q.target;
762
- X && X.tagName === "VIDEO" && X.focus();
763
- }), m.appendChild(W), m;
759
+ const Z = h.querySelector(".editor");
760
+ return Z && Z.addEventListener("click", (ee) => {
761
+ const K = ee.target;
762
+ K && K.tagName === "VIDEO" && K.focus();
763
+ }), m.appendChild(B), m;
764
764
  }
765
- function qo(h) {
765
+ function Bo(h) {
766
766
  const m = document.createElement("div");
767
767
  m.style.display = "flex", m.style.flexWrap = "wrap", m.style.gap = "8px", m.style.marginBottom = "10px", m.style.padding = "12px", m.style.border = "1px solid #e1e1e1", m.style.backgroundColor = "#ffffff", m.style.borderRadius = "4px", m.style.boxShadow = "0 1px 3px rgba(0,0,0,0.1)";
768
768
  const p = to();
@@ -781,24 +781,24 @@ function qo(h) {
781
781
  <option value="h3">Heading 3</option>
782
782
  <option value="h4">Heading 4</option>
783
783
  `, u.onchange = () => {
784
- const H = u.value, L = H === "p" ? "P" : H.toUpperCase();
785
- document.execCommand("formatBlock", !1, `<${L}>`);
784
+ const H = u.value, M = H === "p" ? "P" : H.toUpperCase();
785
+ document.execCommand("formatBlock", !1, `<${M}>`);
786
786
  }, m.appendChild(u), document.addEventListener("selectionchange", () => {
787
787
  try {
788
788
  const H = window.getSelection();
789
789
  if (!H || !H.anchorNode) return;
790
- let L = H.anchorNode;
791
- for (; L && L.nodeType !== Node.ELEMENT_NODE; )
792
- L = L.parentNode;
793
- if (!L) return;
794
- let V = L;
795
- for (; V && V !== document.body && V !== m.parentElement; ) {
796
- const Z = V.tagName?.toUpperCase?.();
797
- if (Z === "H1" || Z === "H2" || Z === "H3" || Z === "H4" || Z === "P") {
798
- u.value = Z === "P" ? "p" : Z.toLowerCase();
790
+ let M = H.anchorNode;
791
+ for (; M && M.nodeType !== Node.ELEMENT_NODE; )
792
+ M = M.parentNode;
793
+ if (!M) return;
794
+ let F = M;
795
+ for (; F && F !== document.body && F !== m.parentElement; ) {
796
+ const $ = F.tagName?.toUpperCase?.();
797
+ if ($ === "H1" || $ === "H2" || $ === "H3" || $ === "H4" || $ === "P") {
798
+ u.value = $ === "P" ? "p" : $.toLowerCase();
799
799
  return;
800
800
  }
801
- V = V.parentElement;
801
+ F = F.parentElement;
802
802
  }
803
803
  u.value = "p";
804
804
  } catch {
@@ -820,26 +820,26 @@ function qo(h) {
820
820
  m.appendChild(w);
821
821
  const g = Io();
822
822
  m.appendChild(g);
823
- const T = Oo();
824
- m.appendChild(T);
825
- const A = Do();
826
- m.appendChild(A);
823
+ const C = Do();
824
+ m.appendChild(C);
825
+ const S = Oo();
826
+ m.appendChild(S);
827
827
  const k = No();
828
828
  m.appendChild(k);
829
829
  const _ = Lo();
830
830
  m.appendChild(_);
831
- const I = Fo(h);
831
+ const O = Fo(h);
832
+ m.appendChild(O);
833
+ const I = jo();
832
834
  m.appendChild(I);
833
- const R = jo();
834
- m.appendChild(R);
835
- const j = Ho();
836
- m.appendChild(j);
837
- const N = Bo(h);
835
+ const W = Ho();
836
+ m.appendChild(W);
837
+ const N = Wo(h);
838
838
  m.appendChild(N);
839
839
  const P = zo();
840
840
  return m.appendChild(P), m;
841
841
  }
842
- function Wo(h) {
842
+ function qo(h) {
843
843
  return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
844
844
  }
845
845
  var Je = { exports: {} }, Yo = Je.exports, Pn;
@@ -862,7 +862,7 @@ function $o() {
862
862
  for (var e = 1; e < arguments.length; e++) {
863
863
  var n = arguments[e] != null ? arguments[e] : {};
864
864
  e % 2 ? p(Object(n), !0).forEach((function(r) {
865
- T(t, r, n[r]);
865
+ C(t, r, n[r]);
866
866
  })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach((function(r) {
867
867
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
868
868
  }));
@@ -888,10 +888,10 @@ function $o() {
888
888
  function g(t, e, n) {
889
889
  return e && w(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
890
890
  }
891
- function T(t, e, n) {
891
+ function C(t, e, n) {
892
892
  return (e = N(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
893
893
  }
894
- function A(t, e) {
894
+ function S(t, e) {
895
895
  if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
896
896
  t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _(t, e);
897
897
  }
@@ -905,11 +905,11 @@ function $o() {
905
905
  return n.__proto__ = r, n;
906
906
  }, _(t, e);
907
907
  }
908
- function I(t) {
908
+ function O(t) {
909
909
  if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
910
910
  return t;
911
911
  }
912
- function R(t) {
912
+ function I(t) {
913
913
  var e = (function() {
914
914
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
915
915
  if (typeof Proxy == "function") return !0;
@@ -929,12 +929,12 @@ function $o() {
929
929
  return (function(i, a) {
930
930
  if (a && (typeof a == "object" || typeof a == "function")) return a;
931
931
  if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
932
- return I(i);
932
+ return O(i);
933
933
  })(this, n);
934
934
  };
935
935
  }
936
- function j() {
937
- return j = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
936
+ function W() {
937
+ return W = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
938
938
  var r = (function(i, a) {
939
939
  for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = k(i)) !== null; ) ;
940
940
  return i;
@@ -943,7 +943,7 @@ function $o() {
943
943
  var o = Object.getOwnPropertyDescriptor(r, e);
944
944
  return o.get ? o.get.call(arguments.length < 3 ? t : n) : o.value;
945
945
  }
946
- }, j.apply(this, arguments);
946
+ }, W.apply(this, arguments);
947
947
  }
948
948
  function N(t) {
949
949
  var e = (function(n, r) {
@@ -960,25 +960,25 @@ function $o() {
960
960
  }
961
961
  var P = function(t) {
962
962
  return !(!t || !t.Window) && t instanceof t.Window;
963
- }, H = void 0, L = void 0;
964
- function V(t) {
963
+ }, H = void 0, M = void 0;
964
+ function F(t) {
965
965
  H = t;
966
966
  var e = t.document.createTextNode("");
967
- e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), L = t;
967
+ e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), M = t;
968
968
  }
969
- function Z(t) {
970
- return P(t) ? t : (t.ownerDocument || t).defaultView || L.window;
969
+ function $(t) {
970
+ return P(t) ? t : (t.ownerDocument || t).defaultView || M.window;
971
971
  }
972
- typeof window < "u" && window && V(window);
973
- var ie = function(t) {
972
+ typeof window < "u" && window && F(window);
973
+ var oe = function(t) {
974
974
  return !!t && v(t) === "object";
975
- }, te = function(t) {
975
+ }, X = function(t) {
976
976
  return typeof t == "function";
977
- }, x = { window: function(t) {
978
- return t === L || P(t);
977
+ }, b = { window: function(t) {
978
+ return t === M || P(t);
979
979
  }, docFrag: function(t) {
980
- return ie(t) && t.nodeType === 11;
981
- }, object: ie, func: te, number: function(t) {
980
+ return oe(t) && t.nodeType === 11;
981
+ }, object: oe, func: X, number: function(t) {
982
982
  return typeof t == "number";
983
983
  }, bool: function(t) {
984
984
  return typeof t == "boolean";
@@ -986,12 +986,12 @@ function $o() {
986
986
  return typeof t == "string";
987
987
  }, element: function(t) {
988
988
  if (!t || v(t) !== "object") return !1;
989
- var e = Z(t) || L;
989
+ var e = $(t) || M;
990
990
  return /object|function/.test(typeof Element > "u" ? "undefined" : v(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
991
991
  }, plainObject: function(t) {
992
- return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
992
+ return oe(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
993
993
  }, array: function(t) {
994
- return ie(t) && t.length !== void 0 && te(t.splice);
994
+ return oe(t) && t.length !== void 0 && X(t.splice);
995
995
  } };
996
996
  function ne(t) {
997
997
  var e = t.interaction;
@@ -1000,7 +1000,7 @@ function $o() {
1000
1000
  n === "x" ? (e.coords.cur.page.y = e.coords.start.page.y, e.coords.cur.client.y = e.coords.start.client.y, e.coords.velocity.client.y = 0, e.coords.velocity.page.y = 0) : n === "y" && (e.coords.cur.page.x = e.coords.start.page.x, e.coords.cur.client.x = e.coords.start.client.x, e.coords.velocity.client.x = 0, e.coords.velocity.page.x = 0);
1001
1001
  }
1002
1002
  }
1003
- function W(t) {
1003
+ function B(t) {
1004
1004
  var e = t.iEvent, n = t.interaction;
1005
1005
  if (n.prepared.name === "drag") {
1006
1006
  var r = n.prepared.axis;
@@ -1013,25 +1013,25 @@ function $o() {
1013
1013
  var le = { id: "actions/drag", install: function(t) {
1014
1014
  var e = t.actions, n = t.Interactable, r = t.defaults;
1015
1015
  n.prototype.draggable = le.draggable, e.map.drag = le, e.methodDict.drag = "draggable", r.actions.drag = le.defaults;
1016
- }, listeners: { "interactions:before-action-move": ne, "interactions:action-resume": ne, "interactions:action-move": W, "auto-start:check": function(t) {
1016
+ }, listeners: { "interactions:before-action-move": ne, "interactions:action-resume": ne, "interactions:action-move": B, "auto-start:check": function(t) {
1017
1017
  var e = t.interaction, n = t.interactable, r = t.buttons, o = n.options.drag;
1018
1018
  if (o && o.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (r & n.options.drag.mouseButtons) != 0)) return t.action = { name: "drag", axis: o.lockAxis === "start" ? o.startAxis : o.lockAxis }, !1;
1019
1019
  } }, draggable: function(t) {
1020
- return x.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : x.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
1021
- }, beforeMove: ne, move: W, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1020
+ return b.object(t) ? (this.options.drag.enabled = t.enabled !== !1, this.setPerAction("drag", t), this.setOnEvents("drag", t), /^(xy|x|y|start)$/.test(t.lockAxis) && (this.options.drag.lockAxis = t.lockAxis), /^(xy|x|y)$/.test(t.startAxis) && (this.options.drag.startAxis = t.startAxis), this) : b.bool(t) ? (this.options.drag.enabled = t, this) : this.options.drag;
1021
+ }, beforeMove: ne, move: B, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1022
1022
  return "move";
1023
1023
  }, filterEventType: function(t) {
1024
1024
  return t.search("drag") === 0;
1025
- } }, ce = le, J = { init: function(t) {
1025
+ } }, ce = le, Z = { init: function(t) {
1026
1026
  var e = t;
1027
- J.document = e.document, J.DocumentFragment = e.DocumentFragment || Q, J.SVGElement = e.SVGElement || Q, J.SVGSVGElement = e.SVGSVGElement || Q, J.SVGElementInstance = e.SVGElementInstance || Q, J.Element = e.Element || Q, J.HTMLElement = e.HTMLElement || J.Element, J.Event = e.Event, J.Touch = e.Touch || Q, J.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1027
+ Z.document = e.document, Z.DocumentFragment = e.DocumentFragment || ee, Z.SVGElement = e.SVGElement || ee, Z.SVGSVGElement = e.SVGSVGElement || ee, Z.SVGElementInstance = e.SVGElementInstance || ee, Z.Element = e.Element || ee, Z.HTMLElement = e.HTMLElement || Z.Element, Z.Event = e.Event, Z.Touch = e.Touch || ee, Z.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1028
1028
  }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
1029
- function Q() {
1029
+ function ee() {
1030
1030
  }
1031
- var X = J, oe = { init: function(t) {
1032
- var e = X.Element, n = t.navigator || {};
1033
- oe.supportsTouch = "ontouchstart" in t || x.func(t.DocumentTouch) && X.document instanceof t.DocumentTouch, oe.supportsPointerEvent = n.pointerEnabled !== !1 && !!X.PointerEvent, oe.isIOS = /iP(hone|od|ad)/.test(n.platform), oe.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), oe.isIe9 = /MSIE 9/.test(n.userAgent), oe.isOperaMobile = n.appName === "Opera" && oe.supportsTouch && /Presto/.test(n.userAgent), oe.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", oe.pEventTypes = oe.supportsPointerEvent ? X.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, oe.wheelEvent = X.document && "onmousewheel" in X.document ? "mousewheel" : "wheel";
1034
- }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, re = oe;
1031
+ var K = Z, ie = { init: function(t) {
1032
+ var e = K.Element, n = t.navigator || {};
1033
+ ie.supportsTouch = "ontouchstart" in t || b.func(t.DocumentTouch) && K.document instanceof t.DocumentTouch, ie.supportsPointerEvent = n.pointerEnabled !== !1 && !!K.PointerEvent, ie.isIOS = /iP(hone|od|ad)/.test(n.platform), ie.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), ie.isIe9 = /MSIE 9/.test(n.userAgent), ie.isOperaMobile = n.appName === "Opera" && ie.supportsTouch && /Presto/.test(n.userAgent), ie.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", ie.pEventTypes = ie.supportsPointerEvent ? K.PointerEvent === t.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, ie.wheelEvent = K.document && "onmousewheel" in K.document ? "mousewheel" : "wheel";
1034
+ }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, re = ie;
1035
1035
  function se(t, e) {
1036
1036
  if (t.contains) return t.contains(e);
1037
1037
  for (; e; ) {
@@ -1041,7 +1041,7 @@ function $o() {
1041
1041
  return !1;
1042
1042
  }
1043
1043
  function pe(t, e) {
1044
- for (; x.element(t); ) {
1044
+ for (; b.element(t); ) {
1045
1045
  if (he(t, e)) return t;
1046
1046
  t = fe(t);
1047
1047
  }
@@ -1049,40 +1049,40 @@ function $o() {
1049
1049
  }
1050
1050
  function fe(t) {
1051
1051
  var e = t.parentNode;
1052
- if (x.docFrag(e)) {
1053
- for (; (e = e.host) && x.docFrag(e); ) ;
1052
+ if (b.docFrag(e)) {
1053
+ for (; (e = e.host) && b.docFrag(e); ) ;
1054
1054
  return e;
1055
1055
  }
1056
1056
  return e;
1057
1057
  }
1058
1058
  function he(t, e) {
1059
- return L !== H && (e = e.replace(/\/deep\//g, " ")), t[re.prefixedMatchesSelector](e);
1059
+ return M !== H && (e = e.replace(/\/deep\//g, " ")), t[re.prefixedMatchesSelector](e);
1060
1060
  }
1061
1061
  var E = function(t) {
1062
1062
  return t.parentNode || t.host;
1063
1063
  };
1064
- function B(t, e) {
1064
+ function q(t, e) {
1065
1065
  for (var n, r = [], o = t; (n = E(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
1066
1066
  return r;
1067
1067
  }
1068
- function Y(t, e, n) {
1069
- for (; x.element(t); ) {
1068
+ function V(t, e, n) {
1069
+ for (; b.element(t); ) {
1070
1070
  if (he(t, e)) return !0;
1071
1071
  if ((t = fe(t)) === n) return he(t, e);
1072
1072
  }
1073
1073
  return !1;
1074
1074
  }
1075
- function G(t) {
1075
+ function J(t) {
1076
1076
  return t.correspondingUseElement || t;
1077
1077
  }
1078
1078
  function xe(t) {
1079
- var e = t instanceof X.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1079
+ var e = t instanceof K.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1080
1080
  return e && { left: e.left, right: e.right, top: e.top, bottom: e.bottom, width: e.width || e.right - e.left, height: e.height || e.bottom - e.top };
1081
1081
  }
1082
1082
  function we(t) {
1083
1083
  var e, n = xe(t);
1084
1084
  if (!re.isIOS7 && n) {
1085
- var r = { x: (e = (e = Z(t)) || L).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1085
+ var r = { x: (e = (e = $(t)) || M).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1086
1086
  n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
1087
1087
  }
1088
1088
  return n;
@@ -1092,7 +1092,7 @@ function $o() {
1092
1092
  return e;
1093
1093
  }
1094
1094
  function Ee(t) {
1095
- return !!x.string(t) && (X.document.querySelector(t), !0);
1095
+ return !!b.string(t) && (K.document.querySelector(t), !0);
1096
1096
  }
1097
1097
  function z(t, e) {
1098
1098
  for (var n in e) t[n] = e[n];
@@ -1103,7 +1103,7 @@ function $o() {
1103
1103
  }
1104
1104
  function Le(t, e, n, r) {
1105
1105
  var o = t;
1106
- return x.string(o) ? o = et(o, e, n) : x.func(o) && (o = o.apply(void 0, r)), x.element(o) && (o = we(o)), o;
1106
+ return b.string(o) ? o = et(o, e, n) : b.func(o) && (o = o.apply(void 0, r)), b.element(o) && (o = we(o)), o;
1107
1107
  }
1108
1108
  function tt(t) {
1109
1109
  return t && { x: "x" in t ? t.x : t.left, y: "y" in t ? t.y : t.top };
@@ -1122,21 +1122,21 @@ function $o() {
1122
1122
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(l) {
1123
1123
  return !0;
1124
1124
  }, r = arguments.length > 3 ? arguments[3] : void 0;
1125
- if (r = r || {}, x.string(t) && t.search(" ") !== -1 && (t = Bt(t)), x.array(t)) return t.forEach((function(l) {
1125
+ if (r = r || {}, b.string(t) && t.search(" ") !== -1 && (t = Wt(t)), b.array(t)) return t.forEach((function(l) {
1126
1126
  return Ie(l, e, n, r);
1127
1127
  })), r;
1128
- if (x.object(t) && (e = t, t = ""), x.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1129
- else if (x.array(e)) for (var o = 0, i = e; o < i.length; o++) {
1128
+ if (b.object(t) && (e = t, t = ""), b.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
1129
+ else if (b.array(e)) for (var o = 0, i = e; o < i.length; o++) {
1130
1130
  var a = i[o];
1131
1131
  Ie(t, a, n, r);
1132
1132
  }
1133
- else if (x.object(e)) for (var s in e)
1134
- Ie(Bt(s).map((function(l) {
1133
+ else if (b.object(e)) for (var s in e)
1134
+ Ie(Wt(s).map((function(l) {
1135
1135
  return "".concat(t).concat(l);
1136
1136
  })), e[s], n, r);
1137
1137
  return r;
1138
1138
  }
1139
- function Bt(t) {
1139
+ function Wt(t) {
1140
1140
  return t.trim().split(/ +/);
1141
1141
  }
1142
1142
  var Fe = function(t, e) {
@@ -1160,30 +1160,30 @@ function $o() {
1160
1160
  function ot(t, e) {
1161
1161
  t.page = t.page || {}, t.page.x = e.page.x, t.page.y = e.page.y, t.client = t.client || {}, t.client.x = e.client.x, t.client.y = e.client.y, t.timeStamp = e.timeStamp;
1162
1162
  }
1163
- function qt(t) {
1163
+ function Bt(t) {
1164
1164
  t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
1165
1165
  }
1166
- function Wt(t) {
1167
- return t instanceof X.Event || t instanceof X.Touch;
1166
+ function qt(t) {
1167
+ return t instanceof K.Event || t instanceof K.Touch;
1168
1168
  }
1169
1169
  function it(t, e, n) {
1170
1170
  return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
1171
1171
  }
1172
1172
  function Yt(t, e) {
1173
- return e = e || { x: 0, y: 0 }, re.isOperaMobile && Wt(t) ? (it("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : it("page", t, e), e;
1173
+ return e = e || { x: 0, y: 0 }, re.isOperaMobile && qt(t) ? (it("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : it("page", t, e), e;
1174
1174
  }
1175
1175
  function je(t) {
1176
- return x.number(t.pointerId) ? t.pointerId : t.identifier;
1176
+ return b.number(t.pointerId) ? t.pointerId : t.identifier;
1177
1177
  }
1178
1178
  function Hn(t, e, n) {
1179
1179
  var r = e.length > 1 ? $t(e) : e[0];
1180
1180
  Yt(r, t.page), (function(o, i) {
1181
- i = i || {}, re.isOperaMobile && Wt(o) ? it("screen", o, i) : it("client", o, i);
1181
+ i = i || {}, re.isOperaMobile && qt(o) ? it("screen", o, i) : it("client", o, i);
1182
1182
  })(r, t.client), t.timeStamp = n;
1183
1183
  }
1184
1184
  function yt(t) {
1185
1185
  var e = [];
1186
- return x.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
1186
+ return b.array(t) ? (e[0] = t[0], e[1] = t[1]) : t.type === "touchend" ? t.touches.length === 1 ? (e[0] = t.touches[0], e[1] = t.changedTouches[0]) : t.touches.length === 0 && (e[0] = t.changedTouches[0], e[1] = t.changedTouches[1]) : (e[0] = t.touches[0], e[1] = t.touches[1]), e;
1187
1187
  }
1188
1188
  function $t(t) {
1189
1189
  for (var e = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < t.length; n++) {
@@ -1207,11 +1207,11 @@ function $o() {
1207
1207
  return 180 * Math.atan2(a, i) / Math.PI;
1208
1208
  }
1209
1209
  function Vt(t) {
1210
- return x.string(t.pointerType) ? t.pointerType : x.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof X.Touch ? "touch" : "mouse";
1210
+ return b.string(t.pointerType) ? t.pointerType : b.number(t.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][t.pointerType] : /touch/.test(t.type || "") || t instanceof K.Touch ? "touch" : "mouse";
1211
1211
  }
1212
1212
  function Ut(t) {
1213
- var e = x.func(t.composedPath) ? t.composedPath() : t.path;
1214
- return [G(e ? e[0] : t.target), G(t.currentTarget)];
1213
+ var e = b.func(t.composedPath) ? t.composedPath() : t.path;
1214
+ return [J(e ? e[0] : t.target), J(t.currentTarget)];
1215
1215
  }
1216
1216
  var at = (function() {
1217
1217
  function t(e) {
@@ -1239,11 +1239,11 @@ function $o() {
1239
1239
  }, He = function(t, e) {
1240
1240
  for (var n = 0; n < t.length; n++) if (e(t[n], n, t)) return n;
1241
1241
  return -1;
1242
- }, Be = function(t, e) {
1242
+ }, We = function(t, e) {
1243
1243
  return t[He(t, e)];
1244
- }, De = (function(t) {
1245
- A(n, t);
1246
- var e = R(n);
1244
+ }, Oe = (function(t) {
1245
+ S(n, t);
1246
+ var e = I(n);
1247
1247
  function n(r, o, i) {
1248
1248
  var a;
1249
1249
  y(this, n), (a = e.call(this, o._interaction)).dropzone = void 0, a.dragEvent = void 0, a.relatedTarget = void 0, a.draggable = void 0, a.propagationStopped = !1, a.immediatePropagationStopped = !1;
@@ -1280,9 +1280,9 @@ function $o() {
1280
1280
  var c = d[l];
1281
1281
  if (c.options.drop.enabled) {
1282
1282
  var f = c.options.drop.accept;
1283
- if (!(x.element(f) && f !== a || x.string(f) && !he(a, f) || x.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var b = 0, S = c.getAllElements(); b < S.length; b++) {
1284
- var C = S[b];
1285
- C !== a && s.push({ dropzone: c, element: C, rect: c.getRect(C) });
1283
+ if (!(b.element(f) && f !== a || b.string(f) && !he(a, f) || b.func(f) && !f({ dropzone: c, draggableElement: a }))) for (var x = 0, A = c.getAllElements(); x < A.length; x++) {
1284
+ var T = A[x];
1285
+ T !== a && s.push({ dropzone: c, element: T, rect: c.getRect(T) });
1286
1286
  }
1287
1287
  }
1288
1288
  }
@@ -1295,42 +1295,42 @@ function $o() {
1295
1295
  }
1296
1296
  function Jt(t, e, n) {
1297
1297
  for (var r = t.dropState, o = t.interactable, i = t.element, a = [], s = 0, l = r.activeDrops; s < l.length; s++) {
1298
- var d = l[s], c = d.dropzone, f = d.element, b = d.rect, S = c.dropCheck(e, n, o, i, f, b);
1299
- a.push(S ? f : null);
1300
- }
1301
- var C = (function(M) {
1302
- for (var D, O, F, U = [], ee = 0; ee < M.length; ee++) {
1303
- var q = M[ee], K = M[D];
1304
- if (q && ee !== D) if (K) {
1305
- var ve = E(q), ae = E(K);
1306
- if (ve !== q.ownerDocument) if (ae !== q.ownerDocument) if (ve !== ae) {
1307
- U = U.length ? U : B(K);
1298
+ var d = l[s], c = d.dropzone, f = d.element, x = d.rect, A = c.dropCheck(e, n, o, i, f, x);
1299
+ a.push(A ? f : null);
1300
+ }
1301
+ var T = (function(R) {
1302
+ for (var L, D, j, G = [], te = 0; te < R.length; te++) {
1303
+ var Y = R[te], Q = R[L];
1304
+ if (Y && te !== L) if (Q) {
1305
+ var ve = E(Y), ae = E(Q);
1306
+ if (ve !== Y.ownerDocument) if (ae !== Y.ownerDocument) if (ve !== ae) {
1307
+ G = G.length ? G : q(Q);
1308
1308
  var ge = void 0;
1309
- if (K instanceof X.HTMLElement && q instanceof X.SVGElement && !(q instanceof X.SVGSVGElement)) {
1310
- if (q === ae) continue;
1311
- ge = q.ownerSVGElement;
1312
- } else ge = q;
1313
- for (var be = B(ge, K.ownerDocument), Se = 0; be[Se] && be[Se] === U[Se]; ) Se++;
1314
- var mt = [be[Se - 1], be[Se], U[Se]];
1309
+ if (Q instanceof K.HTMLElement && Y instanceof K.SVGElement && !(Y instanceof K.SVGSVGElement)) {
1310
+ if (Y === ae) continue;
1311
+ ge = Y.ownerSVGElement;
1312
+ } else ge = Y;
1313
+ for (var be = q(ge, Q.ownerDocument), Se = 0; be[Se] && be[Se] === G[Se]; ) Se++;
1314
+ var mt = [be[Se - 1], be[Se], G[Se]];
1315
1315
  if (mt[0]) for (var Ue = mt[0].lastChild; Ue; ) {
1316
1316
  if (Ue === mt[1]) {
1317
- D = ee, U = be;
1317
+ L = te, G = be;
1318
1318
  break;
1319
1319
  }
1320
1320
  if (Ue === mt[2]) break;
1321
1321
  Ue = Ue.previousSibling;
1322
1322
  }
1323
- } else F = K, (parseInt(Z(O = q).getComputedStyle(O).zIndex, 10) || 0) >= (parseInt(Z(F).getComputedStyle(F).zIndex, 10) || 0) && (D = ee);
1324
- else D = ee;
1325
- } else D = ee;
1323
+ } else j = Q, (parseInt($(D = Y).getComputedStyle(D).zIndex, 10) || 0) >= (parseInt($(j).getComputedStyle(j).zIndex, 10) || 0) && (L = te);
1324
+ else L = te;
1325
+ } else L = te;
1326
1326
  }
1327
- return D;
1327
+ return L;
1328
1328
  })(a);
1329
- return r.activeDrops[C] || null;
1329
+ return r.activeDrops[T] || null;
1330
1330
  }
1331
1331
  function kt(t, e, n) {
1332
1332
  var r = t.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
1333
- return n.type === "dragstart" && (o.activate = new De(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new De(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new De(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new De(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new De(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new De(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1333
+ return n.type === "dragstart" && (o.activate = new Oe(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new Oe(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new Oe(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new Oe(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new Oe(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new Oe(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1334
1334
  }
1335
1335
  function Ct(t, e) {
1336
1336
  var n = t.dropState, r = n.activeDrops, o = n.cur, i = n.prev;
@@ -1349,37 +1349,37 @@ function $o() {
1349
1349
  var e = t.actions, n = t.interactStatic, r = t.Interactable, o = t.defaults;
1350
1350
  t.usePlugin(ce), r.prototype.dropzone = function(i) {
1351
1351
  return (function(a, s) {
1352
- if (x.object(s)) {
1352
+ if (b.object(s)) {
1353
1353
  if (a.options.drop.enabled = s.enabled !== !1, s.listeners) {
1354
- var l = Ie(s.listeners), d = Object.keys(l).reduce((function(f, b) {
1355
- return f[/^(enter|leave)/.test(b) ? "drag".concat(b) : /^(activate|deactivate|move)/.test(b) ? "drop".concat(b) : b] = l[b], f;
1354
+ var l = Ie(s.listeners), d = Object.keys(l).reduce((function(f, x) {
1355
+ return f[/^(enter|leave)/.test(x) ? "drag".concat(x) : /^(activate|deactivate|move)/.test(x) ? "drop".concat(x) : x] = l[x], f;
1356
1356
  }), {}), c = a.options.drop.listeners;
1357
1357
  c && a.off(c), a.on(d), a.options.drop.listeners = d;
1358
1358
  }
1359
- return x.func(s.ondrop) && a.on("drop", s.ondrop), x.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), x.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), x.func(s.ondragenter) && a.on("dragenter", s.ondragenter), x.func(s.ondragleave) && a.on("dragleave", s.ondragleave), x.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : x.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
1359
+ return b.func(s.ondrop) && a.on("drop", s.ondrop), b.func(s.ondropactivate) && a.on("dropactivate", s.ondropactivate), b.func(s.ondropdeactivate) && a.on("dropdeactivate", s.ondropdeactivate), b.func(s.ondragenter) && a.on("dragenter", s.ondragenter), b.func(s.ondragleave) && a.on("dragleave", s.ondragleave), b.func(s.ondropmove) && a.on("dropmove", s.ondropmove), /^(pointer|center)$/.test(s.overlap) ? a.options.drop.overlap = s.overlap : b.number(s.overlap) && (a.options.drop.overlap = Math.max(Math.min(1, s.overlap), 0)), "accept" in s && (a.options.drop.accept = s.accept), "checker" in s && (a.options.drop.checker = s.checker), a;
1360
1360
  }
1361
- return x.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1361
+ return b.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1362
1362
  })(this, i);
1363
1363
  }, r.prototype.dropCheck = function(i, a, s, l, d, c) {
1364
- return (function(f, b, S, C, M, D, O) {
1365
- var F = !1;
1366
- if (!(O = O || f.getRect(D))) return !!f.options.drop.checker && f.options.drop.checker(b, S, F, f, D, C, M);
1367
- var U = f.options.drop.overlap;
1368
- if (U === "pointer") {
1369
- var ee = ze(C, M, "drag"), q = Yt(b);
1370
- q.x += ee.x, q.y += ee.y;
1371
- var K = q.x > O.left && q.x < O.right, ve = q.y > O.top && q.y < O.bottom;
1372
- F = K && ve;
1364
+ return (function(f, x, A, T, R, L, D) {
1365
+ var j = !1;
1366
+ if (!(D = D || f.getRect(L))) return !!f.options.drop.checker && f.options.drop.checker(x, A, j, f, L, T, R);
1367
+ var G = f.options.drop.overlap;
1368
+ if (G === "pointer") {
1369
+ var te = ze(T, R, "drag"), Y = Yt(x);
1370
+ Y.x += te.x, Y.y += te.y;
1371
+ var Q = Y.x > D.left && Y.x < D.right, ve = Y.y > D.top && Y.y < D.bottom;
1372
+ j = Q && ve;
1373
1373
  }
1374
- var ae = C.getRect(M);
1375
- if (ae && U === "center") {
1374
+ var ae = T.getRect(R);
1375
+ if (ae && G === "center") {
1376
1376
  var ge = ae.left + ae.width / 2, be = ae.top + ae.height / 2;
1377
- F = ge >= O.left && ge <= O.right && be >= O.top && be <= O.bottom;
1377
+ j = ge >= D.left && ge <= D.right && be >= D.top && be <= D.bottom;
1378
1378
  }
1379
- return ae && x.number(U) && (F = Math.max(0, Math.min(O.right, ae.right) - Math.max(O.left, ae.left)) * Math.max(0, Math.min(O.bottom, ae.bottom) - Math.max(O.top, ae.top)) / (ae.width * ae.height) >= U), f.options.drop.checker && (F = f.options.drop.checker(b, S, F, f, D, C, M)), F;
1379
+ return ae && b.number(G) && (j = Math.max(0, Math.min(D.right, ae.right) - Math.max(D.left, ae.left)) * Math.max(0, Math.min(D.bottom, ae.bottom) - Math.max(D.top, ae.top)) / (ae.width * ae.height) >= G), f.options.drop.checker && (j = f.options.drop.checker(x, A, j, f, L, T, R)), j;
1380
1380
  })(this, i, a, s, l, d, c);
1381
1381
  }, n.dynamicDrop = function(i) {
1382
- return x.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
1382
+ return b.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
1383
1383
  }, z(e.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), e.methodDict.drop = "dropzone", t.dynamicDrop = !1, o.actions.drop = Zt.defaults;
1384
1384
  }, listeners: { "interactions:before-action-start": function(t) {
1385
1385
  var e = t.interaction;
@@ -1409,7 +1409,7 @@ function $o() {
1409
1409
  }
1410
1410
  } }, getActiveDrops: Et, getDrop: Jt, getDropEvents: kt, fireDropEvents: Ct, filterEventType: function(t) {
1411
1411
  return t.search("drag") === 0 || t.search("drop") === 0;
1412
- }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Bn = Zt;
1412
+ }, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Wn = Zt;
1413
1413
  function St(t) {
1414
1414
  var e = t.interaction, n = t.iEvent, r = t.phase;
1415
1415
  if (e.prepared.name === "gesture") {
@@ -1421,13 +1421,13 @@ function $o() {
1421
1421
  var l = e.prevEvent;
1422
1422
  n.distance = l.distance, n.box = l.box, n.scale = l.scale, n.ds = 0, n.angle = l.angle, n.da = 0;
1423
1423
  } else n.distance = xt(o, s), n.box = bt(o), n.scale = n.distance / e.gesture.startDistance, n.angle = wt(o, s), n.ds = n.scale - e.gesture.scale, n.da = n.angle - e.gesture.angle;
1424
- e.gesture.distance = n.distance, e.gesture.angle = n.angle, x.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
1424
+ e.gesture.distance = n.distance, e.gesture.angle = n.angle, b.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (e.gesture.scale = n.scale);
1425
1425
  }
1426
1426
  }
1427
1427
  var Tt = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(t) {
1428
1428
  var e = t.actions, n = t.Interactable, r = t.defaults;
1429
1429
  n.prototype.gesturable = function(o) {
1430
- return x.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : x.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
1430
+ return b.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture", o), this.setOnEvents("gesture", o), this) : b.bool(o) ? (this.options.gesture.enabled = o, this) : this.options.gesture;
1431
1431
  }, e.map.gesture = Tt, e.methodDict.gesture = "gesturable", r.actions.gesture = Tt.defaults;
1432
1432
  }, listeners: { "interactions:action-start": St, "interactions:action-move": St, "interactions:action-end": St, "interactions:new": function(t) {
1433
1433
  t.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
@@ -1440,11 +1440,11 @@ function $o() {
1440
1440
  return "";
1441
1441
  }, filterEventType: function(t) {
1442
1442
  return t.search("gesture") === 0;
1443
- } }, qn = Tt;
1444
- function Wn(t, e, n, r, o, i, a) {
1443
+ } }, Bn = Tt;
1444
+ function qn(t, e, n, r, o, i, a) {
1445
1445
  if (!e) return !1;
1446
1446
  if (e === !0) {
1447
- var s = x.number(i.width) ? i.width : i.right - i.left, l = x.number(i.height) ? i.height : i.bottom - i.top;
1447
+ var s = b.number(i.width) ? i.width : i.right - i.left, l = b.number(i.height) ? i.height : i.bottom - i.top;
1448
1448
  if (a = Math.min(a, Math.abs((t === "left" || t === "right" ? s : l) / 2)), s < 0 && (t === "left" ? t = "right" : t === "right" && (t = "left")), l < 0 && (t === "top" ? t = "bottom" : t === "bottom" && (t = "top")), t === "left") {
1449
1449
  var d = s >= 0 ? i.left : i.right;
1450
1450
  return n.x < d + a;
@@ -1456,7 +1456,7 @@ function $o() {
1456
1456
  if (t === "right") return n.x > (s >= 0 ? i.right : i.left) - a;
1457
1457
  if (t === "bottom") return n.y > (l >= 0 ? i.bottom : i.top) - a;
1458
1458
  }
1459
- return !!x.element(r) && (x.element(e) ? e === r : Y(r, e, o));
1459
+ return !!b.element(r) && (b.element(e) ? e === r : V(r, e, o));
1460
1460
  }
1461
1461
  function en(t) {
1462
1462
  var e = t.iEvent, n = t.interaction;
@@ -1471,7 +1471,7 @@ function $o() {
1471
1471
  return i.isIe9 ? { x: "e-resize", y: "s-resize", xy: "se-resize", top: "n-resize", left: "w-resize", bottom: "s-resize", right: "e-resize", topleft: "se-resize", bottomright: "se-resize", topright: "ne-resize", bottomleft: "ne-resize" } : { x: "ew-resize", y: "ns-resize", xy: "nwse-resize", top: "ns-resize", left: "ew-resize", bottom: "ns-resize", right: "ew-resize", topleft: "nwse-resize", bottomright: "nwse-resize", topright: "nesw-resize", bottomleft: "nesw-resize" };
1472
1472
  })(n), Ce.defaultMargin = n.supportsTouch || n.supportsPointerEvent ? 20 : 10, r.prototype.resizable = function(i) {
1473
1473
  return (function(a, s, l) {
1474
- return x.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), x.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), x.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : x.bool(s.square) && (a.options.resize.square = s.square), a) : x.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1474
+ return b.object(s) ? (a.options.resize.enabled = s.enabled !== !1, a.setPerAction("resize", s), a.setOnEvents("resize", s), b.string(s.axis) && /^x$|^y$|^xy$/.test(s.axis) ? a.options.resize.axis = s.axis : s.axis === null && (a.options.resize.axis = l.defaults.actions.resize.axis), b.bool(s.preserveAspectRatio) ? a.options.resize.preserveAspectRatio = s.preserveAspectRatio : b.bool(s.square) && (a.options.resize.square = s.square), a) : b.bool(s) ? (a.options.resize.enabled = s, a) : a.options.resize;
1475
1475
  })(this, i, t);
1476
1476
  }, e.map.resize = Ce, e.methodDict.resize = "resizable", o.actions.resize = Ce.defaults;
1477
1477
  }, listeners: { "interactions:new": function(t) {
@@ -1488,20 +1488,20 @@ function $o() {
1488
1488
  (function(e) {
1489
1489
  var n = e.iEvent, r = e.interaction;
1490
1490
  if (r.prepared.name === "resize" && r.prepared.edges) {
1491
- var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, l = r._rects, d = l.start, c = l.corrected, f = l.delta, b = l.previous;
1492
- if (z(b, c), a) {
1491
+ var o = n, i = r.interactable.options.resize.invert, a = i === "reposition" || i === "negate", s = r.rect, l = r._rects, d = l.start, c = l.corrected, f = l.delta, x = l.previous;
1492
+ if (z(x, c), a) {
1493
1493
  if (z(c, s), i === "reposition") {
1494
1494
  if (c.top > c.bottom) {
1495
- var S = c.top;
1496
- c.top = c.bottom, c.bottom = S;
1495
+ var A = c.top;
1496
+ c.top = c.bottom, c.bottom = A;
1497
1497
  }
1498
1498
  if (c.left > c.right) {
1499
- var C = c.left;
1500
- c.left = c.right, c.right = C;
1499
+ var T = c.left;
1500
+ c.left = c.right, c.right = T;
1501
1501
  }
1502
1502
  }
1503
1503
  } else c.top = Math.min(s.top, d.bottom), c.bottom = Math.max(s.bottom, d.top), c.left = Math.min(s.left, d.right), c.right = Math.max(s.right, d.left);
1504
- for (var M in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[M] = c[M] - b[M];
1504
+ for (var R in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[R] = c[R] - x[R];
1505
1505
  o.edges = r.prepared.edges, o.rect = c, o.deltaRect = f;
1506
1506
  }
1507
1507
  })(t), en(t);
@@ -1516,9 +1516,9 @@ function $o() {
1516
1516
  if (o) {
1517
1517
  var a = z({}, e.coords.cur.page), s = n.options.resize;
1518
1518
  if (s && s.enabled && (!e.pointerIsDown || !/mouse|pointer/.test(e.pointerType) || (i & s.mouseButtons) != 0)) {
1519
- if (x.object(s.edges)) {
1519
+ if (b.object(s.edges)) {
1520
1520
  var l = { left: !1, right: !1, top: !1, bottom: !1 };
1521
- for (var d in l) l[d] = Wn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1521
+ for (var d in l) l[d] = qn(d, s.edges[d], a, e._latestPointer.eventTarget, r, o, s.margin || Ce.defaultMargin);
1522
1522
  l.left = l.left && !l.right, l.top = l.top && !l.bottom, (l.left || l.right || l.top || l.bottom) && (t.action = { name: "resize", edges: l });
1523
1523
  } else {
1524
1524
  var c = s.axis !== "y" && a.x > o.right - Ce.defaultMargin, f = s.axis !== "x" && a.y > o.bottom - Ce.defaultMargin;
@@ -1541,7 +1541,7 @@ function $o() {
1541
1541
  }, filterEventType: function(t) {
1542
1542
  return t.search("resize") === 0;
1543
1543
  }, defaultMargin: null }, Yn = Ce, $n = { id: "actions", install: function(t) {
1544
- t.usePlugin(qn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Bn);
1544
+ t.usePlugin(Bn), t.usePlugin(Yn), t.usePlugin(ce), t.usePlugin(Wn);
1545
1545
  } }, tn = 0, Te = { request: function(t) {
1546
1546
  return ke(t);
1547
1547
  }, cancel: function(t) {
@@ -1559,83 +1559,83 @@ function $o() {
1559
1559
  }, Pe = function(o) {
1560
1560
  return clearTimeout(o);
1561
1561
  });
1562
- } }, $ = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(t) {
1563
- $.isScrolling = !0, Te.cancel($.i), t.autoScroll = $, $.interaction = t, $.prevTime = $.now(), $.i = Te.request($.scroll);
1562
+ } }, U = { defaults: { enabled: !1, margin: 60, container: null, speed: 300 }, now: Date.now, interaction: null, i: 0, x: 0, y: 0, isScrolling: !1, prevTime: 0, margin: 0, speed: 0, start: function(t) {
1563
+ U.isScrolling = !0, Te.cancel(U.i), t.autoScroll = U, U.interaction = t, U.prevTime = U.now(), U.i = Te.request(U.scroll);
1564
1564
  }, stop: function() {
1565
- $.isScrolling = !1, $.interaction && ($.interaction.autoScroll = null), Te.cancel($.i);
1565
+ U.isScrolling = !1, U.interaction && (U.interaction.autoScroll = null), Te.cancel(U.i);
1566
1566
  }, scroll: function() {
1567
- var t = $.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = $.now(), s = (a - $.prevTime) / 1e3, l = o.speed * s;
1567
+ var t = U.interaction, e = t.interactable, n = t.element, r = t.prepared.name, o = e.options[r].autoScroll, i = nn(o.container, e, n), a = U.now(), s = (a - U.prevTime) / 1e3, l = o.speed * s;
1568
1568
  if (l >= 1) {
1569
- var d = { x: $.x * l, y: $.y * l };
1569
+ var d = { x: U.x * l, y: U.y * l };
1570
1570
  if (d.x || d.y) {
1571
1571
  var c = rn(i);
1572
- x.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1573
- var f = rn(i), b = { x: f.x - c.x, y: f.y - c.y };
1574
- (b.x || b.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: b, interaction: t, container: i });
1572
+ b.window(i) ? i.scrollBy(d.x, d.y) : i && (i.scrollLeft += d.x, i.scrollTop += d.y);
1573
+ var f = rn(i), x = { x: f.x - c.x, y: f.y - c.y };
1574
+ (x.x || x.y) && e.fire({ type: "autoscroll", target: n, interactable: e, delta: x, interaction: t, container: i });
1575
1575
  }
1576
- $.prevTime = a;
1576
+ U.prevTime = a;
1577
1577
  }
1578
- $.isScrolling && (Te.cancel($.i), $.i = Te.request($.scroll));
1578
+ U.isScrolling && (Te.cancel(U.i), U.i = Te.request(U.scroll));
1579
1579
  }, check: function(t, e) {
1580
1580
  var n;
1581
1581
  return (n = t.options[e].autoScroll) == null ? void 0 : n.enabled;
1582
1582
  }, onInteractionMove: function(t) {
1583
1583
  var e = t.interaction, n = t.pointer;
1584
- if (e.interacting() && $.check(e.interactable, e.prepared.name)) if (e.simulation) $.x = $.y = 0;
1584
+ if (e.interacting() && U.check(e.interactable, e.prepared.name)) if (e.simulation) U.x = U.y = 0;
1585
1585
  else {
1586
1586
  var r, o, i, a, s = e.interactable, l = e.element, d = e.prepared.name, c = s.options[d].autoScroll, f = nn(c.container, s, l);
1587
- if (x.window(f)) a = n.clientX < $.margin, r = n.clientY < $.margin, o = n.clientX > f.innerWidth - $.margin, i = n.clientY > f.innerHeight - $.margin;
1587
+ if (b.window(f)) a = n.clientX < U.margin, r = n.clientY < U.margin, o = n.clientX > f.innerWidth - U.margin, i = n.clientY > f.innerHeight - U.margin;
1588
1588
  else {
1589
- var b = xe(f);
1590
- a = n.clientX < b.left + $.margin, r = n.clientY < b.top + $.margin, o = n.clientX > b.right - $.margin, i = n.clientY > b.bottom - $.margin;
1589
+ var x = xe(f);
1590
+ a = n.clientX < x.left + U.margin, r = n.clientY < x.top + U.margin, o = n.clientX > x.right - U.margin, i = n.clientY > x.bottom - U.margin;
1591
1591
  }
1592
- $.x = o ? 1 : a ? -1 : 0, $.y = i ? 1 : r ? -1 : 0, $.isScrolling || ($.margin = c.margin, $.speed = c.speed, $.start(e));
1592
+ U.x = o ? 1 : a ? -1 : 0, U.y = i ? 1 : r ? -1 : 0, U.isScrolling || (U.margin = c.margin, U.speed = c.speed, U.start(e));
1593
1593
  }
1594
1594
  } };
1595
1595
  function nn(t, e, n) {
1596
- return (x.string(t) ? et(t, e, n) : t) || Z(n);
1596
+ return (b.string(t) ? et(t, e, n) : t) || $(n);
1597
1597
  }
1598
1598
  function rn(t) {
1599
- return x.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1599
+ return b.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
1600
1600
  }
1601
1601
  var Vn = { id: "auto-scroll", install: function(t) {
1602
1602
  var e = t.defaults, n = t.actions;
1603
- t.autoScroll = $, $.now = function() {
1603
+ t.autoScroll = U, U.now = function() {
1604
1604
  return t.now();
1605
- }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = $.defaults;
1605
+ }, n.phaselessTypes.autoscroll = !0, e.perAction.autoScroll = U.defaults;
1606
1606
  }, listeners: { "interactions:new": function(t) {
1607
1607
  t.interaction.autoScroll = null;
1608
1608
  }, "interactions:destroy": function(t) {
1609
- t.interaction.autoScroll = null, $.stop(), $.interaction && ($.interaction = null);
1610
- }, "interactions:stop": $.stop, "interactions:action-move": function(t) {
1611
- return $.onInteractionMove(t);
1609
+ t.interaction.autoScroll = null, U.stop(), U.interaction && (U.interaction = null);
1610
+ }, "interactions:stop": U.stop, "interactions:action-move": function(t) {
1611
+ return U.onInteractionMove(t);
1612
1612
  } } }, Un = Vn;
1613
- function qe(t, e) {
1613
+ function Be(t, e) {
1614
1614
  var n = !1;
1615
1615
  return function() {
1616
- return n || (L.console.warn(e), n = !0), t.apply(this, arguments);
1616
+ return n || (M.console.warn(e), n = !0), t.apply(this, arguments);
1617
1617
  };
1618
1618
  }
1619
- function _t(t, e) {
1619
+ function At(t, e) {
1620
1620
  return t.name = e.name, t.axis = e.axis, t.edges = e.edges, t;
1621
1621
  }
1622
1622
  function Xn(t) {
1623
- return x.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1623
+ return b.bool(t) ? (this.options.styleCursor = t, this) : t === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
1624
1624
  }
1625
1625
  function Gn(t) {
1626
- return x.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1626
+ return b.func(t) ? (this.options.actionChecker = t, this) : t === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
1627
1627
  }
1628
1628
  var Kn = { id: "auto-start/interactableMethods", install: function(t) {
1629
1629
  var e = t.Interactable;
1630
1630
  e.prototype.getAction = function(n, r, o, i) {
1631
1631
  var a = (function(s, l, d, c, f) {
1632
- var b = s.getRect(c), S = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], C = { action: null, interactable: s, interaction: d, element: c, rect: b, buttons: S };
1633
- return f.fire("auto-start:check", C), C.action;
1632
+ var x = s.getRect(c), A = l.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[l.button], T = { action: null, interactable: s, interaction: d, element: c, rect: x, buttons: A };
1633
+ return f.fire("auto-start:check", T), T.action;
1634
1634
  })(this, r, o, i, t);
1635
1635
  return this.options.actionChecker ? this.options.actionChecker(n, r, a, this, i, o) : a;
1636
- }, e.prototype.ignoreFrom = qe((function(n) {
1636
+ }, e.prototype.ignoreFrom = Be((function(n) {
1637
1637
  return this._backCompatOption("ignoreFrom", n);
1638
- }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = qe((function(n) {
1638
+ }), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), e.prototype.allowFrom = Be((function(n) {
1639
1639
  return this._backCompatOption("allowFrom", n);
1640
1640
  }), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), e.prototype.actionChecker = Gn, e.prototype.styleCursor = Xn;
1641
1641
  } };
@@ -1646,8 +1646,8 @@ function $o() {
1646
1646
  for (var s = 0, l = r.length; s < l; s++) {
1647
1647
  var d = r[s], c = o[s], f = d.getAction(e, n, t, c);
1648
1648
  if (f) {
1649
- var b = on(f, d, c, i, a);
1650
- if (b) return { action: b, interactable: d, element: c };
1649
+ var x = on(f, d, c, i, a);
1650
+ if (x) return { action: x, interactable: d, element: c };
1651
1651
  }
1652
1652
  }
1653
1653
  return { action: null, interactable: null, element: null };
@@ -1657,7 +1657,7 @@ function $o() {
1657
1657
  function l(c) {
1658
1658
  i.push(c), a.push(s);
1659
1659
  }
1660
- for (; x.element(s); ) {
1660
+ for (; b.element(s); ) {
1661
1661
  i = [], a = [], o.interactables.forEachMatch(s, l);
1662
1662
  var d = Jn(t, e, n, i, a, r, o);
1663
1663
  if (d.action && !d.interactable.options[d.action.name].manualStart) return d;
@@ -1667,22 +1667,22 @@ function $o() {
1667
1667
  }
1668
1668
  function sn(t, e, n) {
1669
1669
  var r = e.action, o = e.interactable, i = e.element;
1670
- r = r || { name: null }, t.interactable = o, t.element = i, _t(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, cn(t, n), n.fire("autoStart:prepared", { interaction: t });
1670
+ r = r || { name: null }, t.interactable = o, t.element = i, At(t.prepared, r), t.rect = o && r.name ? o.getRect(i) : null, cn(t, n), n.fire("autoStart:prepared", { interaction: t });
1671
1671
  }
1672
1672
  function st(t, e, n, r) {
1673
1673
  var o = t.options, i = o[n.name].max, a = o[n.name].maxPerElement, s = r.autoStart.maxInteractions, l = 0, d = 0, c = 0;
1674
1674
  if (!(i && a && s)) return !1;
1675
- for (var f = 0, b = r.interactions.list; f < b.length; f++) {
1676
- var S = b[f], C = S.prepared.name;
1677
- if (S.interacting() && (++l >= s || S.interactable === t && ((d += C === n.name ? 1 : 0) >= i || S.element === e && (c++, C === n.name && c >= a))))
1675
+ for (var f = 0, x = r.interactions.list; f < x.length; f++) {
1676
+ var A = x[f], T = A.prepared.name;
1677
+ if (A.interacting() && (++l >= s || A.interactable === t && ((d += T === n.name ? 1 : 0) >= i || A.element === e && (c++, T === n.name && c >= a))))
1678
1678
  return !1;
1679
1679
  }
1680
1680
  return s > 0;
1681
1681
  }
1682
1682
  function ln(t, e) {
1683
- return x.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1683
+ return b.number(t) ? (e.autoStart.maxInteractions = t, this) : e.autoStart.maxInteractions;
1684
1684
  }
1685
- function At(t, e, n) {
1685
+ function _t(t, e, n) {
1686
1686
  var r = n.autoStart.cursorElement;
1687
1687
  r && r !== t && (r.style.cursor = ""), t.ownerDocument.documentElement.style.cursor = e, t.style.cursor = e, n.autoStart.cursorElement = e ? t : null;
1688
1688
  }
@@ -1692,10 +1692,10 @@ function $o() {
1692
1692
  var i = "";
1693
1693
  if (o.name) {
1694
1694
  var a = n.options[o.name].cursorChecker;
1695
- i = x.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1695
+ i = b.func(a) ? a(o, n, r, t._interacting) : e.actions.map[o.name].getCursor(o);
1696
1696
  }
1697
- At(t.element, i || "", e);
1698
- } else e.autoStart.cursorElement && At(e.autoStart.cursorElement, "", e);
1697
+ _t(t.element, i || "", e);
1698
+ } else e.autoStart.cursorElement && _t(e.autoStart.cursorElement, "", e);
1699
1699
  }
1700
1700
  var Qn = { id: "auto-start/base", before: ["actions"], install: function(t) {
1701
1701
  var e = t.interactStatic, n = t.defaults;
@@ -1719,29 +1719,29 @@ function $o() {
1719
1719
  })(t, e);
1720
1720
  }, "interactions:stop": function(t, e) {
1721
1721
  var n = t.interaction, r = n.interactable;
1722
- r && r.options.styleCursor && At(n.element, "", e);
1722
+ r && r.options.styleCursor && _t(n.element, "", e);
1723
1723
  } }, maxInteractions: ln, withinInteractionLimit: st, validateAction: on }, Mt = Qn, Zn = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(t, e) {
1724
1724
  var n = t.interaction, r = t.eventTarget, o = t.dx, i = t.dy;
1725
1725
  if (n.prepared.name === "drag") {
1726
1726
  var a = Math.abs(o), s = Math.abs(i), l = n.interactable.options.drag, d = l.startAxis, c = a > s ? "x" : a < s ? "y" : "xy";
1727
1727
  if (n.prepared.axis = l.lockAxis === "start" ? c[0] : l.lockAxis, c !== "xy" && d !== "xy" && d !== c) {
1728
1728
  n.prepared.name = null;
1729
- for (var f = r, b = function(C) {
1730
- if (C !== n.interactable) {
1731
- var M = n.interactable.options.drag;
1732
- if (!M.manualStart && C.testIgnoreAllow(M, f, r)) {
1733
- var D = C.getAction(n.downPointer, n.downEvent, n, f);
1734
- if (D && D.name === "drag" && (function(O, F) {
1735
- if (!F) return !1;
1736
- var U = F.options.drag.startAxis;
1737
- return O === "xy" || U === "xy" || U === O;
1738
- })(c, C) && Mt.validateAction(D, C, f, r, e)) return C;
1729
+ for (var f = r, x = function(T) {
1730
+ if (T !== n.interactable) {
1731
+ var R = n.interactable.options.drag;
1732
+ if (!R.manualStart && T.testIgnoreAllow(R, f, r)) {
1733
+ var L = T.getAction(n.downPointer, n.downEvent, n, f);
1734
+ if (L && L.name === "drag" && (function(D, j) {
1735
+ if (!j) return !1;
1736
+ var G = j.options.drag.startAxis;
1737
+ return D === "xy" || G === "xy" || G === D;
1738
+ })(c, T) && Mt.validateAction(L, T, f, r, e)) return T;
1739
1739
  }
1740
1740
  }
1741
- }; x.element(f); ) {
1742
- var S = e.interactables.forEachMatch(f, b);
1743
- if (S) {
1744
- n.prepared.name = "drag", n.interactable = S, n.element = f;
1741
+ }; b.element(f); ) {
1742
+ var A = e.interactables.forEachMatch(f, x);
1743
+ if (A) {
1744
+ n.prepared.name = "drag", n.interactable = A, n.element = f;
1745
1745
  break;
1746
1746
  }
1747
1747
  f = fe(f);
@@ -1774,7 +1774,7 @@ function $o() {
1774
1774
  } }, getHoldDuration: Rt }, tr = er, nr = { id: "auto-start", install: function(t) {
1775
1775
  t.usePlugin(Mt), t.usePlugin(tr), t.usePlugin(Zn);
1776
1776
  } }, rr = function(t) {
1777
- return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : x.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1777
+ return /^(always|never|auto)$/.test(t) ? (this.options.preventDefault = t, this) : b.bool(t) ? (this.options.preventDefault = t ? "always" : "never", this) : this.options.preventDefault;
1778
1778
  };
1779
1779
  function or(t) {
1780
1780
  var e = t.interaction, n = t.event;
@@ -1787,10 +1787,10 @@ function $o() {
1787
1787
  var a = r.options.preventDefault;
1788
1788
  if (a !== "never") if (a !== "always") {
1789
1789
  if (o.events.supportsPassive && /^touch(start|move)$/.test(i.type)) {
1790
- var s = Z(i.target).document, l = o.getDocOptions(s);
1790
+ var s = $(i.target).document, l = o.getDocOptions(s);
1791
1791
  if (!l || !l.events || l.events.passive !== !1) return;
1792
1792
  }
1793
- /^(mouse|pointer|touch)*(down|start)/i.test(i.type) || x.element(i.target) && he(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
1793
+ /^(mouse|pointer|touch)*(down|start)/i.test(i.type) || b.element(i.target) && he(i.target, "input,select,textarea,[contenteditable=true],[contenteditable=true] *") || i.preventDefault();
1794
1794
  } else i.preventDefault();
1795
1795
  })(this, t, n);
1796
1796
  }, t.interactions.docEvents.push({ type: "dragstart", listener: function(n) {
@@ -1811,7 +1811,7 @@ function $o() {
1811
1811
  var e = {};
1812
1812
  for (var n in t) {
1813
1813
  var r = t[n];
1814
- x.plainObject(r) ? e[n] = Ne(r) : x.array(r) ? e[n] = Gt(r) : e[n] = r;
1814
+ b.plainObject(r) ? e[n] = Ne(r) : b.array(r) ? e[n] = Gt(r) : e[n] = r;
1815
1815
  }
1816
1816
  return e;
1817
1817
  }
@@ -1822,11 +1822,11 @@ function $o() {
1822
1822
  return g(t, [{ key: "start", value: function(e, n) {
1823
1823
  var r, o, i = e.phase, a = this.interaction, s = (function(d) {
1824
1824
  var c = d.interactable.options[d.prepared.name], f = c.modifiers;
1825
- return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(b) {
1826
- var S = c[b];
1827
- return S && S.enabled && { options: S, methods: S._methods };
1828
- })).filter((function(b) {
1829
- return !!b;
1825
+ return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(x) {
1826
+ var A = c[x];
1827
+ return A && A.enabled && { options: A, methods: A._methods };
1828
+ })).filter((function(x) {
1829
+ return !!x;
1830
1830
  }));
1831
1831
  })(a);
1832
1832
  this.prepareStates(s), this.startEdges = z({}, a.edges), this.edges = z({}, this.startEdges), this.startOffset = (r = a.rect, o = n, r ? { left: o.x - r.left, top: o.y - r.top, right: r.right - o.x, bottom: r.bottom - o.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
@@ -1844,25 +1844,25 @@ function $o() {
1844
1844
  var n = e.phase, r = e.preEnd, o = e.skipModifiers, i = e.rect, a = e.edges;
1845
1845
  e.coords = z({}, e.pageCoords), e.rect = z({}, i), e.edges = z({}, a);
1846
1846
  for (var s = o ? this.states.slice(o) : this.states, l = ct(e.coords, e.rect), d = 0; d < s.length; d++) {
1847
- var c, f = s[d], b = f.options, S = z({}, e.coords), C = null;
1848
- (c = f.methods) != null && c.set && this.shouldDo(b, r, n) && (e.state = f, C = f.methods.set(e), nt(e.edges, e.rect, { x: e.coords.x - S.x, y: e.coords.y - S.y })), l.eventProps.push(C);
1847
+ var c, f = s[d], x = f.options, A = z({}, e.coords), T = null;
1848
+ (c = f.methods) != null && c.set && this.shouldDo(x, r, n) && (e.state = f, T = f.methods.set(e), nt(e.edges, e.rect, { x: e.coords.x - A.x, y: e.coords.y - A.y })), l.eventProps.push(T);
1849
1849
  }
1850
1850
  z(this.edges, e.edges), l.delta.x = e.coords.x - e.pageCoords.x, l.delta.y = e.coords.y - e.pageCoords.y, l.rectDelta.left = e.rect.left - i.left, l.rectDelta.right = e.rect.right - i.right, l.rectDelta.top = e.rect.top - i.top, l.rectDelta.bottom = e.rect.bottom - i.bottom;
1851
- var M = this.result.coords, D = this.result.rect;
1852
- if (M && D) {
1853
- var O = l.rect.left !== D.left || l.rect.right !== D.right || l.rect.top !== D.top || l.rect.bottom !== D.bottom;
1854
- l.changed = O || M.x !== l.coords.x || M.y !== l.coords.y;
1851
+ var R = this.result.coords, L = this.result.rect;
1852
+ if (R && L) {
1853
+ var D = l.rect.left !== L.left || l.rect.right !== L.right || l.rect.top !== L.top || l.rect.bottom !== L.bottom;
1854
+ l.changed = D || R.x !== l.coords.x || R.y !== l.coords.y;
1855
1855
  }
1856
1856
  return l;
1857
1857
  } }, { key: "applyToInteraction", value: function(e) {
1858
1858
  var n = this.interaction, r = e.phase, o = n.coords.cur, i = n.coords.start, a = this.result, s = this.startDelta, l = a.delta;
1859
1859
  r === "start" && z(this.startDelta, a.delta);
1860
1860
  for (var d = 0, c = [[i, s], [o, l]]; d < c.length; d++) {
1861
- var f = c[d], b = f[0], S = f[1];
1862
- b.page.x += S.x, b.page.y += S.y, b.client.x += S.x, b.client.y += S.y;
1861
+ var f = c[d], x = f[0], A = f[1];
1862
+ x.page.x += A.x, x.page.y += A.y, x.client.x += A.x, x.client.y += A.y;
1863
1863
  }
1864
- var C = this.result.rectDelta, M = e.rect || n.rect;
1865
- M.left += C.left, M.right += C.right, M.top += C.top, M.bottom += C.bottom, M.width = M.right - M.left, M.height = M.bottom - M.top;
1864
+ var T = this.result.rectDelta, R = e.rect || n.rect;
1865
+ R.left += T.left, R.right += T.right, R.top += T.top, R.bottom += T.bottom, R.width = R.right - R.left, R.height = R.bottom - R.top;
1866
1866
  } }, { key: "setAndApply", value: function(e) {
1867
1867
  var n = this.interaction, r = e.phase, o = e.preEnd, i = e.skipModifiers, a = this.setAll(this.fillArg({ preEnd: o, phase: r, pageCoords: e.modifiedCoords || n.coords.cur.page }));
1868
1868
  if (this.result = a, !a.changed && (!i || i < this.states.length) && n.interacting()) return !1;
@@ -1905,8 +1905,8 @@ function $o() {
1905
1905
  var n = e.interaction, r = n.coords, o = n.rect, i = n.modification;
1906
1906
  if (i.result) {
1907
1907
  for (var a = i.startDelta, s = i.result, l = s.delta, d = s.rectDelta, c = 0, f = [[r.start, a], [r.cur, l]]; c < f.length; c++) {
1908
- var b = f[c], S = b[0], C = b[1];
1909
- S.page.x -= C.x, S.page.y -= C.y, S.client.x -= C.x, S.client.y -= C.y;
1908
+ var x = f[c], A = x[0], T = x[1];
1909
+ A.page.x -= T.x, A.page.y -= T.y, A.client.x -= T.x, A.client.y -= T.y;
1910
1910
  }
1911
1911
  o.left -= d.left, o.right -= d.right, o.top -= d.top, o.bottom -= d.bottom;
1912
1912
  }
@@ -1923,7 +1923,7 @@ function $o() {
1923
1923
  function ct(t, e) {
1924
1924
  return { rect: e, coords: t, delta: { x: 0, y: 0 }, rectDelta: { left: 0, right: 0, top: 0, bottom: 0 }, eventProps: [], changed: !0 };
1925
1925
  }
1926
- function _e(t, e) {
1926
+ function Ae(t, e) {
1927
1927
  var n = t.defaults, r = { start: t.start, set: t.set, beforeEnd: t.beforeEnd, stop: t.stop }, o = function(i) {
1928
1928
  var a = i || {};
1929
1929
  for (var s in a.enabled = a.enabled !== !1, n) s in a || (a[s] = n[s]);
@@ -1936,7 +1936,7 @@ function $o() {
1936
1936
  };
1937
1937
  return e && typeof e == "string" && (o._defaults = n, o._methods = r), o;
1938
1938
  }
1939
- function We(t) {
1939
+ function qe(t) {
1940
1940
  var e = t.iEvent, n = t.interaction.modification.result;
1941
1941
  n && (e.modifiers = n.eventProps);
1942
1942
  }
@@ -1954,20 +1954,20 @@ function $o() {
1954
1954
  }, "interactions:before-action-end": function(t) {
1955
1955
  var e = t.interaction, n = e.modification, r = n.beforeEnd(t);
1956
1956
  return e.edges = n.startEdges, r;
1957
- }, "interactions:action-start": We, "interactions:action-move": We, "interactions:action-end": We, "interactions:after-action-start": function(t) {
1957
+ }, "interactions:action-start": qe, "interactions:action-move": qe, "interactions:action-end": qe, "interactions:after-action-start": function(t) {
1958
1958
  return t.interaction.modification.restoreInteractionCoords(t);
1959
1959
  }, "interactions:after-action-move": function(t) {
1960
1960
  return t.interaction.modification.restoreInteractionCoords(t);
1961
1961
  }, "interactions:stop": function(t) {
1962
1962
  return t.interaction.modification.stop(t);
1963
1963
  } } }, dn = ir, pn = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Pt = (function(t) {
1964
- A(n, t);
1965
- var e = R(n);
1964
+ S(n, t);
1965
+ var e = I(n);
1966
1966
  function n(r, o, i, a, s, l, d) {
1967
1967
  var c;
1968
1968
  y(this, n), (c = e.call(this, r)).relatedTarget = null, c.screenX = void 0, c.screenY = void 0, c.button = void 0, c.buttons = void 0, c.ctrlKey = void 0, c.shiftKey = void 0, c.altKey = void 0, c.metaKey = void 0, c.page = void 0, c.client = void 0, c.delta = void 0, c.rect = void 0, c.x0 = void 0, c.y0 = void 0, c.t0 = void 0, c.dt = void 0, c.duration = void 0, c.clientX0 = void 0, c.clientY0 = void 0, c.velocity = void 0, c.speed = void 0, c.swipe = void 0, c.axes = void 0, c.preEnd = void 0, s = s || r.element;
1969
- var f = r.interactable, b = (f && f.options || pn).deltaSource, S = ze(f, s, i), C = a === "start", M = a === "end", D = C ? I(c) : r.prevEvent, O = C ? r.coords.start : M ? { page: D.page, client: D.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1970
- return c.page = z({}, O.page), c.client = z({}, O.client), c.rect = z({}, r.rect), c.timeStamp = O.timeStamp, M || (c.page.x -= S.x, c.page.y -= S.y, c.client.x -= S.x, c.client.y -= S.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = C ? r.pointers[r.pointers.length - 1].downTime : D.t0, c.x0 = r.coords.start.page.x - S.x, c.y0 = r.coords.start.page.y - S.y, c.clientX0 = r.coords.start.client.x - S.x, c.clientY0 = r.coords.start.client.y - S.y, c.delta = C || M ? { x: 0, y: 0 } : { x: c[b].x - D[b].x, y: c[b].y - D[b].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = z({}, r.coords.velocity[b]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = M || a === "inertiastart" ? c.getSwipe() : null, c;
1969
+ var f = r.interactable, x = (f && f.options || pn).deltaSource, A = ze(f, s, i), T = a === "start", R = a === "end", L = T ? O(c) : r.prevEvent, D = T ? r.coords.start : R ? { page: L.page, client: L.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
1970
+ return c.page = z({}, D.page), c.client = z({}, D.client), c.rect = z({}, r.rect), c.timeStamp = D.timeStamp, R || (c.page.x -= A.x, c.page.y -= A.y, c.client.x -= A.x, c.client.y -= A.y), c.ctrlKey = o.ctrlKey, c.altKey = o.altKey, c.shiftKey = o.shiftKey, c.metaKey = o.metaKey, c.button = o.button, c.buttons = o.buttons, c.target = s, c.currentTarget = s, c.preEnd = l, c.type = d || i + (a || ""), c.interactable = f, c.t0 = T ? r.pointers[r.pointers.length - 1].downTime : L.t0, c.x0 = r.coords.start.page.x - A.x, c.y0 = r.coords.start.page.y - A.y, c.clientX0 = r.coords.start.client.x - A.x, c.clientY0 = r.coords.start.client.y - A.y, c.delta = T || R ? { x: 0, y: 0 } : { x: c[x].x - L[x].x, y: c[x].y - L[x].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = z({}, r.coords.velocity[x]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = R || a === "inertiastart" ? c.getSwipe() : null, c;
1971
1971
  }
1972
1972
  return g(n, [{ key: "getSwipe", value: function() {
1973
1973
  var r = this._interaction;
@@ -2025,7 +2025,7 @@ function $o() {
2025
2025
  })({}), lr = 0, cr = (function() {
2026
2026
  function t(e) {
2027
2027
  var n = this, r = e.pointerType, o = e.scopeFire;
2028
- y(this, t), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = qe((function(c) {
2028
+ y(this, t), this.interactable = null, this.element = null, this.rect = null, this._rects = void 0, this.edges = null, this._scopeFire = void 0, this.prepared = { name: null, axis: null, edges: null }, this.pointerType = void 0, this.pointers = [], this.downEvent = null, this.downPointer = {}, this._latestPointer = { pointer: null, event: null, eventTarget: null }, this.prevEvent = null, this.pointerIsDown = !1, this.pointerWasMoved = !1, this._interacting = !1, this._ending = !1, this._stopped = !0, this._proxy = void 0, this.simulation = null, this.doMove = Be((function(c) {
2029
2029
  this.move(c);
2030
2030
  }), "The interaction.doMove() method has been renamed to interaction.move()"), this.coords = { start: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, prev: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, cur: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, delta: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }, velocity: { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 } }, this._id = lr++, this._scopeFire = o, this.pointerType = r;
2031
2031
  var i = this;
@@ -2050,7 +2050,7 @@ function $o() {
2050
2050
  var o = this.updatePointer(e, n, r, !0), i = this.pointers[o];
2051
2051
  this._scopeFire("interactions:down", { pointer: e, event: n, eventTarget: r, pointerIndex: o, pointerInfo: i, type: "down", interaction: this });
2052
2052
  } }, { key: "start", value: function(e, n, r) {
2053
- return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (_t(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? z({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
2053
+ return !(this.interacting() || !this.pointerIsDown || this.pointers.length < (e.name === "gesture" ? 2 : 1) || !n.options[e.name].enabled) && (At(this.prepared, e), this.interactable = n, this.element = r, this.rect = n.getRect(r), this.edges = this.prepared.edges ? z({}, this.prepared.edges) : { left: !0, right: !0, top: !0, bottom: !0 }, this._stopped = !1, this._interacting = this._doPhase({ interaction: this, event: this.downEvent, phase: "start" }) && !this._stopped, this._interacting);
2054
2054
  } }, { key: "pointerMove", value: function(e, n, r) {
2055
2055
  this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
2056
2056
  var o, i, a = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
@@ -2058,7 +2058,7 @@ function $o() {
2058
2058
  var s, l, d, c = this.getPointerIndex(e), f = { pointer: e, pointerIndex: c, pointerInfo: this.pointers[c], event: n, type: "move", eventTarget: r, dx: o, dy: i, duplicate: a, interaction: this };
2059
2059
  a || (s = this.coords.velocity, l = this.coords.delta, d = Math.max(l.timeStamp / 1e3, 1e-3), s.page.x = l.page.x / d, s.page.y = l.page.y / d, s.client.x = l.client.x / d, s.client.y = l.client.y / d, s.timeStamp = d), this._scopeFire("interactions:move", f), a || this.simulation || (this.interacting() && (f.type = null, this.move(f)), this.pointerWasMoved && ot(this.coords.prev, this.coords.cur));
2060
2060
  } }, { key: "move", value: function(e) {
2061
- e && e.event || qt(this.coords.delta), (e = z({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
2061
+ e && e.event || Bt(this.coords.delta), (e = z({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, e || {})).phase = "move", this._doPhase(e);
2062
2062
  } }, { key: "pointerUp", value: function(e, n, r, o) {
2063
2063
  var i = this.getPointerIndex(e);
2064
2064
  i === -1 && (i = this.updatePointer(e, n, r, !1));
@@ -2119,13 +2119,13 @@ function $o() {
2119
2119
  return !(!n.offset.pending.x && !n.offset.pending.y);
2120
2120
  })(t)) return !1;
2121
2121
  var e = t.offset.pending;
2122
- return Ot(t.coords.cur, e), Ot(t.coords.delta, e), nt(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2122
+ return Dt(t.coords.cur, e), Dt(t.coords.delta, e), nt(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2123
2123
  }
2124
2124
  function ur(t) {
2125
2125
  var e = t.x, n = t.y;
2126
2126
  this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
2127
2127
  }
2128
- function Ot(t, e) {
2128
+ function Dt(t, e) {
2129
2129
  var n = t.page, r = t.client, o = e.x, i = e.y;
2130
2130
  n.x += o, n.y += i, r.x += o, r.y += i;
2131
2131
  }
@@ -2136,7 +2136,7 @@ function $o() {
2136
2136
  t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
2137
2137
  }, "interactions:update-pointer": function(t) {
2138
2138
  return (function(e) {
2139
- e.pointerIsDown && (Ot(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2139
+ e.pointerIsDown && (Dt(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2140
2140
  })(t.interaction);
2141
2141
  }, "interactions:before-action-start": hn, "interactions:before-action-move": hn, "interactions:before-action-end": function(t) {
2142
2142
  var e = t.interaction;
@@ -2178,10 +2178,10 @@ function $o() {
2178
2178
  } }, { key: "inertiaTick", value: function() {
2179
2179
  var e, n, r, o, i, a, s, l = this, d = this.interaction, c = ut(d).resistance, f = (d._now() - this.t0) / 1e3;
2180
2180
  if (f < this.te) {
2181
- var b, S = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2182
- this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, b = { x: gn(s = S, e, r, i), y: gn(s, n, o, a) }) : b = { x: this.targetOffset.x * S, y: this.targetOffset.y * S };
2183
- var C = { x: b.x - this.currentOffset.x, y: b.y - this.currentOffset.y };
2184
- this.currentOffset.x += C.x, this.currentOffset.y += C.y, d.offsetBy(C), d.move(), this.onNextFrame((function() {
2181
+ var x, A = 1 - (Math.exp(-c * f) - this.lambda_v0) / this.one_ve_v0;
2182
+ this.isModified ? (e = 0, n = 0, r = this.targetOffset.x, o = this.targetOffset.y, i = this.modifiedOffset.x, a = this.modifiedOffset.y, x = { x: gn(s = A, e, r, i), y: gn(s, n, o, a) }) : x = { x: this.targetOffset.x * A, y: this.targetOffset.y * A };
2183
+ var T = { x: x.x - this.currentOffset.x, y: x.y - this.currentOffset.y };
2184
+ this.currentOffset.x += T.x, this.currentOffset.y += T.y, d.offsetBy(T), d.move(), this.onNextFrame((function() {
2185
2185
  return l.inertiaTick();
2186
2186
  }));
2187
2187
  } else d.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
@@ -2217,7 +2217,7 @@ function $o() {
2217
2217
  return (!e._interacting || e.simulation || !e.inertia.start(n)) && null;
2218
2218
  }, "interactions:down": function(t) {
2219
2219
  var e = t.interaction, n = t.eventTarget, r = e.inertia;
2220
- if (r.active) for (var o = n; x.element(o); ) {
2220
+ if (r.active) for (var o = n; b.element(o); ) {
2221
2221
  if (o === e.element) {
2222
2222
  r.resume(t);
2223
2223
  break;
@@ -2232,7 +2232,7 @@ function $o() {
2232
2232
  e.stop(t), e.start(t, t.interaction.coords.cur.page), e.applyToInteraction(t);
2233
2233
  }, "interactions:before-action-inertiastart": function(t) {
2234
2234
  return t.interaction.modification.setAndApply(t);
2235
- }, "interactions:action-resume": We, "interactions:action-inertiastart": We, "interactions:after-action-inertiastart": function(t) {
2235
+ }, "interactions:action-resume": qe, "interactions:action-inertiastart": qe, "interactions:after-action-inertiastart": function(t) {
2236
2236
  return t.interaction.modification.restoreInteractionCoords(t);
2237
2237
  }, "interactions:after-action-resume": function(t) {
2238
2238
  return t.interaction.modification.restoreInteractionCoords(t);
@@ -2287,93 +2287,93 @@ function $o() {
2287
2287
  } }]), t;
2288
2288
  })();
2289
2289
  function Ye(t) {
2290
- return x.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2290
+ return b.object(t) ? { capture: !!t.capture, passive: !!t.passive } : { capture: !!t, passive: !1 };
2291
2291
  }
2292
2292
  function dt(t, e) {
2293
2293
  return t === e || (typeof t == "boolean" ? !!e.capture === t && !e.passive : !!t.capture == !!e.capture && !!t.passive == !!e.passive);
2294
2294
  }
2295
2295
  var vr = { id: "events", install: function(t) {
2296
- var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, b, S, C) {
2297
- var M = Ye(C);
2298
- if (!r[b]) {
2299
- r[b] = [];
2300
- for (var D = 0; D < o.length; D++) {
2301
- var O = o[D];
2302
- a(O, b, l), a(O, b, d, !0);
2296
+ var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, x, A, T) {
2297
+ var R = Ye(T);
2298
+ if (!r[x]) {
2299
+ r[x] = [];
2300
+ for (var L = 0; L < o.length; L++) {
2301
+ var D = o[L];
2302
+ a(D, x, l), a(D, x, d, !0);
2303
2303
  }
2304
2304
  }
2305
- var F = r[b], U = Be(F, (function(ee) {
2306
- return ee.selector === c && ee.context === f;
2305
+ var j = r[x], G = We(j, (function(te) {
2306
+ return te.selector === c && te.context === f;
2307
2307
  }));
2308
- U || (U = { selector: c, context: f, listeners: [] }, F.push(U)), U.listeners.push({ func: S, options: M });
2309
- }, removeDelegate: function(c, f, b, S, C) {
2310
- var M, D = Ye(C), O = r[b], F = !1;
2311
- if (O)
2312
- for (M = O.length - 1; M >= 0; M--) {
2313
- var U = O[M];
2314
- if (U.selector === c && U.context === f) {
2315
- for (var ee = U.listeners, q = ee.length - 1; q >= 0; q--) {
2316
- var K = ee[q];
2317
- if (K.func === S && dt(K.options, D)) {
2318
- ee.splice(q, 1), ee.length || (O.splice(M, 1), s(f, b, l), s(f, b, d, !0)), F = !0;
2308
+ G || (G = { selector: c, context: f, listeners: [] }, j.push(G)), G.listeners.push({ func: A, options: R });
2309
+ }, removeDelegate: function(c, f, x, A, T) {
2310
+ var R, L = Ye(T), D = r[x], j = !1;
2311
+ if (D)
2312
+ for (R = D.length - 1; R >= 0; R--) {
2313
+ var G = D[R];
2314
+ if (G.selector === c && G.context === f) {
2315
+ for (var te = G.listeners, Y = te.length - 1; Y >= 0; Y--) {
2316
+ var Q = te[Y];
2317
+ if (Q.func === A && dt(Q.options, L)) {
2318
+ te.splice(Y, 1), te.length || (D.splice(R, 1), s(f, x, l), s(f, x, d, !0)), j = !0;
2319
2319
  break;
2320
2320
  }
2321
2321
  }
2322
- if (F) break;
2322
+ if (j) break;
2323
2323
  }
2324
2324
  }
2325
2325
  }, delegateListener: l, delegateUseCapture: d, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
2326
- function a(c, f, b, S) {
2326
+ function a(c, f, x, A) {
2327
2327
  if (c.addEventListener) {
2328
- var C = Ye(S), M = Be(n, (function(D) {
2329
- return D.eventTarget === c;
2328
+ var T = Ye(A), R = We(n, (function(L) {
2329
+ return L.eventTarget === c;
2330
2330
  }));
2331
- M || (M = { eventTarget: c, events: {} }, n.push(M)), M.events[f] || (M.events[f] = []), Be(M.events[f], (function(D) {
2332
- return D.func === b && dt(D.options, C);
2333
- })) || (c.addEventListener(f, b, i.supportsOptions ? C : C.capture), M.events[f].push({ func: b, options: C }));
2331
+ R || (R = { eventTarget: c, events: {} }, n.push(R)), R.events[f] || (R.events[f] = []), We(R.events[f], (function(L) {
2332
+ return L.func === x && dt(L.options, T);
2333
+ })) || (c.addEventListener(f, x, i.supportsOptions ? T : T.capture), R.events[f].push({ func: x, options: T }));
2334
2334
  }
2335
2335
  }
2336
- function s(c, f, b, S) {
2336
+ function s(c, f, x, A) {
2337
2337
  if (c.addEventListener && c.removeEventListener) {
2338
- var C = He(n, (function(ve) {
2338
+ var T = He(n, (function(ve) {
2339
2339
  return ve.eventTarget === c;
2340
- })), M = n[C];
2341
- if (M && M.events) if (f !== "all") {
2342
- var D = !1, O = M.events[f];
2343
- if (O) {
2344
- if (b === "all") {
2345
- for (var F = O.length - 1; F >= 0; F--) {
2346
- var U = O[F];
2347
- s(c, f, U.func, U.options);
2340
+ })), R = n[T];
2341
+ if (R && R.events) if (f !== "all") {
2342
+ var L = !1, D = R.events[f];
2343
+ if (D) {
2344
+ if (x === "all") {
2345
+ for (var j = D.length - 1; j >= 0; j--) {
2346
+ var G = D[j];
2347
+ s(c, f, G.func, G.options);
2348
2348
  }
2349
2349
  return;
2350
2350
  }
2351
- for (var ee = Ye(S), q = 0; q < O.length; q++) {
2352
- var K = O[q];
2353
- if (K.func === b && dt(K.options, ee)) {
2354
- c.removeEventListener(f, b, i.supportsOptions ? ee : ee.capture), O.splice(q, 1), O.length === 0 && (delete M.events[f], D = !0);
2351
+ for (var te = Ye(A), Y = 0; Y < D.length; Y++) {
2352
+ var Q = D[Y];
2353
+ if (Q.func === x && dt(Q.options, te)) {
2354
+ c.removeEventListener(f, x, i.supportsOptions ? te : te.capture), D.splice(Y, 1), D.length === 0 && (delete R.events[f], L = !0);
2355
2355
  break;
2356
2356
  }
2357
2357
  }
2358
2358
  }
2359
- D && !Object.keys(M.events).length && n.splice(C, 1);
2360
- } else for (f in M.events) M.events.hasOwnProperty(f) && s(c, f, "all");
2359
+ L && !Object.keys(R.events).length && n.splice(T, 1);
2360
+ } else for (f in R.events) R.events.hasOwnProperty(f) && s(c, f, "all");
2361
2361
  }
2362
2362
  }
2363
2363
  function l(c, f) {
2364
- for (var b = Ye(f), S = new mr(c), C = r[c.type], M = Ut(c)[0], D = M; x.element(D); ) {
2365
- for (var O = 0; O < C.length; O++) {
2366
- var F = C[O], U = F.selector, ee = F.context;
2367
- if (he(D, U) && se(ee, M) && se(ee, D)) {
2368
- var q = F.listeners;
2369
- S.currentTarget = D;
2370
- for (var K = 0; K < q.length; K++) {
2371
- var ve = q[K];
2372
- dt(ve.options, b) && ve.func(S);
2364
+ for (var x = Ye(f), A = new mr(c), T = r[c.type], R = Ut(c)[0], L = R; b.element(L); ) {
2365
+ for (var D = 0; D < T.length; D++) {
2366
+ var j = T[D], G = j.selector, te = j.context;
2367
+ if (he(L, G) && se(te, R) && se(te, L)) {
2368
+ var Y = j.listeners;
2369
+ A.currentTarget = L;
2370
+ for (var Q = 0; Q < Y.length; Q++) {
2371
+ var ve = Y[Q];
2372
+ dt(ve.options, x) && ve.func(A);
2373
2373
  }
2374
2374
  }
2375
2375
  }
2376
- D = fe(D);
2376
+ L = fe(L);
2377
2377
  }
2378
2378
  }
2379
2379
  function d(c) {
@@ -2384,9 +2384,9 @@ function $o() {
2384
2384
  }, get passive() {
2385
2385
  return i.supportsPassive = !0;
2386
2386
  } }), t.events = i, i;
2387
- } }, Dt = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2388
- for (var e = 0, n = Dt.methodOrder; e < n.length; e++) {
2389
- var r = n[e], o = Dt[r](t);
2387
+ } }, Ot = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2388
+ for (var e = 0, n = Ot.methodOrder; e < n.length; e++) {
2389
+ var r = n[e], o = Ot[r](t);
2390
2390
  if (o) return o;
2391
2391
  }
2392
2392
  return null;
@@ -2440,30 +2440,30 @@ function $o() {
2440
2440
  return n.id === e;
2441
2441
  }));
2442
2442
  }
2443
- var gr = Dt, Nt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2443
+ var gr = Ot, Nt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2444
2444
  function En(t, e) {
2445
2445
  return function(n) {
2446
2446
  var r = e.interactions.list, o = Vt(n), i = Ut(n), a = i[0], s = i[1], l = [];
2447
2447
  if (/^touch/.test(n.type)) {
2448
2448
  e.prevTouchTime = e.now();
2449
2449
  for (var d = 0, c = n.changedTouches; d < c.length; d++) {
2450
- var f = c[d], b = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, S = kn(b);
2451
- l.push([b.pointer, b.eventTarget, b.curEventTarget, S]);
2450
+ var f = c[d], x = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, A = kn(x);
2451
+ l.push([x.pointer, x.eventTarget, x.curEventTarget, A]);
2452
2452
  }
2453
2453
  } else {
2454
- var C = !1;
2454
+ var T = !1;
2455
2455
  if (!re.supportsPointerEvent && /mouse/.test(n.type)) {
2456
- for (var M = 0; M < r.length && !C; M++) C = r[M].pointerType !== "mouse" && r[M].pointerIsDown;
2457
- C = C || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2456
+ for (var R = 0; R < r.length && !T; R++) T = r[R].pointerType !== "mouse" && r[R].pointerIsDown;
2457
+ T = T || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2458
2458
  }
2459
- if (!C) {
2460
- var D = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, O = kn(D);
2461
- l.push([D.pointer, D.eventTarget, D.curEventTarget, O]);
2459
+ if (!T) {
2460
+ var L = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, D = kn(L);
2461
+ l.push([L.pointer, L.eventTarget, L.curEventTarget, D]);
2462
2462
  }
2463
2463
  }
2464
- for (var F = 0; F < l.length; F++) {
2465
- var U = l[F], ee = U[0], q = U[1], K = U[2];
2466
- U[3][t](ee, n, q, K);
2464
+ for (var j = 0; j < l.length; j++) {
2465
+ var G = l[j], te = G[0], Y = G[1], Q = G[2];
2466
+ G[3][t](te, n, Y, Q);
2467
2467
  }
2468
2468
  };
2469
2469
  }
@@ -2489,19 +2489,19 @@ function $o() {
2489
2489
  for (var s = 0, l = t.interactions.list; s < l.length; s++) {
2490
2490
  var d = l[s];
2491
2491
  if (d.pointerIsDown && d.pointerType === "touch" && !d._interacting) for (var c = function() {
2492
- var S = b[f];
2493
- t.documents.some((function(C) {
2494
- return se(C.doc, S.downTarget);
2495
- })) || d.removePointer(S.pointer, S.event);
2496
- }, f = 0, b = d.pointers; f < b.length; f++) c();
2492
+ var A = x[f];
2493
+ t.documents.some((function(T) {
2494
+ return se(T.doc, A.downTarget);
2495
+ })) || d.removePointer(A.pointer, A.event);
2496
+ }, f = 0, x = d.pointers; f < x.length; f++) c();
2497
2497
  }
2498
2498
  }
2499
- (o = X.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
2499
+ (o = K.PointerEvent ? [{ type: i.down, listener: a }, { type: i.down, listener: e.pointerDown }, { type: i.move, listener: e.pointerMove }, { type: i.up, listener: e.pointerUp }, { type: i.cancel, listener: e.pointerUp }] : [{ type: "mousedown", listener: e.pointerDown }, { type: "mousemove", listener: e.pointerMove }, { type: "mouseup", listener: e.pointerUp }, { type: "touchstart", listener: a }, { type: "touchstart", listener: e.pointerDown }, { type: "touchmove", listener: e.pointerMove }, { type: "touchend", listener: e.pointerUp }, { type: "touchcancel", listener: e.pointerUp }]).push({ type: "blur", listener: function(s) {
2500
2500
  for (var l = 0, d = t.interactions.list; l < d.length; l++)
2501
2501
  d[l].documentBlur(s);
2502
2502
  } }), t.prevTouchTime = 0, t.Interaction = (function(s) {
2503
- A(d, s);
2504
- var l = R(d);
2503
+ S(d, s);
2504
+ var l = I(d);
2505
2505
  function d() {
2506
2506
  return y(this, d), l.apply(this, arguments);
2507
2507
  }
@@ -2528,37 +2528,37 @@ function $o() {
2528
2528
  var o = e.interactions.list[r];
2529
2529
  o.interactable === n && (o.stop(), e.fire("interactions:destroy", { interaction: o }), o.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
2530
2530
  }
2531
- } }, onDocSignal: Lt, doOnInteractions: En, methodNames: Nt }, br = yr, Ae = (function(t) {
2531
+ } }, onDocSignal: Lt, doOnInteractions: En, methodNames: Nt }, br = yr, _e = (function(t) {
2532
2532
  return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2533
- })(Ae || {}), xr = (function() {
2533
+ })(_e || {}), xr = (function() {
2534
2534
  function t(e, n, r, o) {
2535
- y(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new xn(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || r, this._win = Z(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2535
+ y(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new xn(), this._context = void 0, this._win = void 0, this._doc = void 0, this._scopeEvents = void 0, this._actions = n.actions, this.target = e, this._context = n.context || r, this._win = $(Ee(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2536
2536
  }
2537
2537
  return g(t, [{ key: "_defaults", get: function() {
2538
2538
  return { base: {}, perAction: {}, actions: {} };
2539
2539
  } }, { key: "setOnEvents", value: function(e, n) {
2540
- return x.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), x.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), x.func(n.onend) && this.on("".concat(e, "end"), n.onend), x.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
2540
+ return b.func(n.onstart) && this.on("".concat(e, "start"), n.onstart), b.func(n.onmove) && this.on("".concat(e, "move"), n.onmove), b.func(n.onend) && this.on("".concat(e, "end"), n.onend), b.func(n.oninertiastart) && this.on("".concat(e, "inertiastart"), n.oninertiastart), this;
2541
2541
  } }, { key: "updatePerActionListeners", value: function(e, n, r) {
2542
2542
  var o, i = this, a = (o = this._actions.map[e]) == null ? void 0 : o.filterEventType, s = function(l) {
2543
2543
  return (a == null || a(l)) && lt(l, i._actions);
2544
2544
  };
2545
- (x.array(n) || x.object(n)) && this._onOff(Ae.Off, e, n, void 0, s), (x.array(r) || x.object(r)) && this._onOff(Ae.On, e, r, void 0, s);
2545
+ (b.array(n) || b.object(n)) && this._onOff(_e.Off, e, n, void 0, s), (b.array(r) || b.object(r)) && this._onOff(_e.On, e, r, void 0, s);
2546
2546
  } }, { key: "setPerAction", value: function(e, n) {
2547
2547
  var r = this._defaults;
2548
2548
  for (var o in n) {
2549
2549
  var i = o, a = this.options[e], s = n[i];
2550
- i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), x.array(s) ? a[i] = Gt(s) : x.plainObject(s) ? (a[i] = z(a[i] || {}, Ne(s)), x.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : x.bool(s) && x.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2550
+ i === "listeners" && this.updatePerActionListeners(e, a.listeners, s), b.array(s) ? a[i] = Gt(s) : b.plainObject(s) ? (a[i] = z(a[i] || {}, Ne(s)), b.object(r.perAction[i]) && "enabled" in r.perAction[i] && (a[i].enabled = s.enabled !== !1)) : b.bool(s) && b.object(r.perAction[i]) ? a[i].enabled = s : a[i] = s;
2551
2551
  }
2552
2552
  } }, { key: "getRect", value: function(e) {
2553
- return e = e || (x.element(this.target) ? this.target : null), x.string(this.target) && (e = e || this._context.querySelector(this.target)), we(e);
2553
+ return e = e || (b.element(this.target) ? this.target : null), b.string(this.target) && (e = e || this._context.querySelector(this.target)), we(e);
2554
2554
  } }, { key: "rectChecker", value: function(e) {
2555
2555
  var n = this;
2556
- return x.func(e) ? (this.getRect = function(r) {
2556
+ return b.func(e) ? (this.getRect = function(r) {
2557
2557
  var o = z({}, e.apply(n, r));
2558
2558
  return "width" in o || (o.width = o.right - o.left, o.height = o.bottom - o.top), o;
2559
2559
  }, this) : e === null ? (delete this.getRect, this) : this.getRect;
2560
2560
  } }, { key: "_backCompatOption", value: function(e, n) {
2561
- if (Ee(n) || x.object(n)) {
2561
+ if (Ee(n) || b.object(n)) {
2562
2562
  for (var r in this.options[e] = n, this._actions.map) this.options[r][e] = n;
2563
2563
  return this;
2564
2564
  }
@@ -2569,7 +2569,7 @@ function $o() {
2569
2569
  return e === "page" || e === "client" ? (this.options.deltaSource = e, this) : this.options.deltaSource;
2570
2570
  } }, { key: "getAllElements", value: function() {
2571
2571
  var e = this.target;
2572
- return x.string(e) ? Array.from(this._context.querySelectorAll(e)) : x.func(e) && e.getAllElements ? e.getAllElements() : x.element(e) ? [e] : [];
2572
+ return b.string(e) ? Array.from(this._context.querySelectorAll(e)) : b.func(e) && e.getAllElements ? e.getAllElements() : b.element(e) ? [e] : [];
2573
2573
  } }, { key: "context", value: function() {
2574
2574
  return this._context;
2575
2575
  } }, { key: "inContext", value: function(e) {
@@ -2577,36 +2577,36 @@ function $o() {
2577
2577
  } }, { key: "testIgnoreAllow", value: function(e, n, r) {
2578
2578
  return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
2579
2579
  } }, { key: "testAllow", value: function(e, n, r) {
2580
- return !e || !!x.element(r) && (x.string(e) ? Y(r, e, n) : !!x.element(e) && se(e, r));
2580
+ return !e || !!b.element(r) && (b.string(e) ? V(r, e, n) : !!b.element(e) && se(e, r));
2581
2581
  } }, { key: "testIgnore", value: function(e, n, r) {
2582
- return !(!e || !x.element(r)) && (x.string(e) ? Y(r, e, n) : !!x.element(e) && se(e, r));
2582
+ return !(!e || !b.element(r)) && (b.string(e) ? V(r, e, n) : !!b.element(e) && se(e, r));
2583
2583
  } }, { key: "fire", value: function(e) {
2584
2584
  return this.events.fire(e), this;
2585
2585
  } }, { key: "_onOff", value: function(e, n, r, o, i) {
2586
- x.object(n) && !x.array(n) && (o = r, r = null);
2586
+ b.object(n) && !b.array(n) && (o = r, r = null);
2587
2587
  var a = Ie(n, r, i);
2588
2588
  for (var s in a) {
2589
2589
  s === "wheel" && (s = re.wheelEvent);
2590
2590
  for (var l = 0, d = a[s]; l < d.length; l++) {
2591
2591
  var c = d[l];
2592
- lt(s, this._actions) ? this.events[e === Ae.On ? "on" : "off"](s, c) : x.string(this.target) ? this._scopeEvents[e === Ae.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === Ae.On ? "add" : "remove"](this.target, s, c, o);
2592
+ lt(s, this._actions) ? this.events[e === _e.On ? "on" : "off"](s, c) : b.string(this.target) ? this._scopeEvents[e === _e.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === _e.On ? "add" : "remove"](this.target, s, c, o);
2593
2593
  }
2594
2594
  }
2595
2595
  return this;
2596
2596
  } }, { key: "on", value: function(e, n, r) {
2597
- return this._onOff(Ae.On, e, n, r);
2597
+ return this._onOff(_e.On, e, n, r);
2598
2598
  } }, { key: "off", value: function(e, n, r) {
2599
- return this._onOff(Ae.Off, e, n, r);
2599
+ return this._onOff(_e.Off, e, n, r);
2600
2600
  } }, { key: "set", value: function(e) {
2601
2601
  var n = this._defaults;
2602
- for (var r in x.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2602
+ for (var r in b.object(e) || (e = {}), this.options = Ne(n.base), this._actions.methodDict) {
2603
2603
  var o = r, i = this._actions.methodDict[o];
2604
2604
  this.options[o] = {}, this.setPerAction(o, z(z({}, n.perAction), n.actions[o])), this[i](e[o]);
2605
2605
  }
2606
- for (var a in e) a !== "getRect" ? x.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2606
+ for (var a in e) a !== "getRect" ? b.func(this[a]) && this[a](e[a]) : this.rectChecker(e.getRect);
2607
2607
  return this;
2608
2608
  } }, { key: "unset", value: function() {
2609
- if (x.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2609
+ if (b.string(this.target)) for (var e in this._scopeEvents.delegatedEvents) for (var n = this._scopeEvents.delegatedEvents[e], r = n.length - 1; r >= 0; r--) {
2610
2610
  var o = n[r], i = o.selector, a = o.context, s = o.listeners;
2611
2611
  i === this.target && a === this._context && n.splice(r, 1);
2612
2612
  for (var l = s.length - 1; l >= 0; l--) this._scopeEvents.removeDelegate(this.target, this._context, e, s[l][0], s[l][1]);
@@ -2617,7 +2617,7 @@ function $o() {
2617
2617
  function t(e) {
2618
2618
  var n = this;
2619
2619
  y(this, t), this.list = [], this.selectorMap = {}, this.scope = void 0, this.scope = e, e.addListeners({ "interactable:unset": function(r) {
2620
- var o = r.interactable, i = o.target, a = x.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2620
+ var o = r.interactable, i = o.target, a = b.string(i) ? n.selectorMap[i] : i[n.scope.id], s = He(a, (function(l) {
2621
2621
  return l === o;
2622
2622
  }));
2623
2623
  a.splice(s, 1);
@@ -2626,16 +2626,16 @@ function $o() {
2626
2626
  return g(t, [{ key: "new", value: function(e, n) {
2627
2627
  n = z(n || {}, { actions: this.scope.actions });
2628
2628
  var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
2629
- return this.scope.addDocument(r._doc), this.list.push(r), x.string(e) ? (this.selectorMap[e] || (this.selectorMap[e] = []), this.selectorMap[e].push(r)) : (r.target[this.scope.id] || Object.defineProperty(e, this.scope.id, { value: [], configurable: !0 }), e[this.scope.id].push(r)), this.scope.fire("interactable:new", { target: e, options: n, interactable: r, win: this.scope._win }), r;
2629
+ return this.scope.addDocument(r._doc), this.list.push(r), b.string(e) ? (this.selectorMap[e] || (this.selectorMap[e] = []), this.selectorMap[e].push(r)) : (r.target[this.scope.id] || Object.defineProperty(e, this.scope.id, { value: [], configurable: !0 }), e[this.scope.id].push(r)), this.scope.fire("interactable:new", { target: e, options: n, interactable: r, win: this.scope._win }), r;
2630
2630
  } }, { key: "getExisting", value: function(e, n) {
2631
- var r = n && n.context || this.scope.document, o = x.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2632
- if (i) return Be(i, (function(a) {
2631
+ var r = n && n.context || this.scope.document, o = b.string(e), i = o ? this.selectorMap[e] : e[this.scope.id];
2632
+ if (i) return We(i, (function(a) {
2633
2633
  return a._context === r && (o || a.inContext(e));
2634
2634
  }));
2635
2635
  } }, { key: "forEachMatch", value: function(e, n) {
2636
2636
  for (var r = 0, o = this.list; r < o.length; r++) {
2637
2637
  var i = o[r], a = void 0;
2638
- if ((x.string(i.target) ? x.element(e) && he(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
2638
+ if ((b.string(i.target) ? b.element(e) && he(e, i.target) : e === i.target) && i.inContext(e) && (a = n(i)), a !== void 0) return a;
2639
2639
  }
2640
2640
  } }]), t;
2641
2641
  })(), Er = (function() {
@@ -2650,33 +2650,33 @@ function $o() {
2650
2650
  return this.scope.usePlugin(i, a), this;
2651
2651
  }, o.isSet = function(i, a) {
2652
2652
  return !!this.scope.interactables.get(i, a && a.context);
2653
- }, o.on = qe((function(i, a, s) {
2654
- if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2653
+ }, o.on = Be((function(i, a, s) {
2654
+ if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2655
2655
  for (var l = 0, d = i; l < d.length; l++) {
2656
2656
  var c = d[l];
2657
2657
  this.on(c, a, s);
2658
2658
  }
2659
2659
  return this;
2660
2660
  }
2661
- if (x.object(i)) {
2661
+ if (b.object(i)) {
2662
2662
  for (var f in i) this.on(f, i[f], a);
2663
2663
  return this;
2664
2664
  }
2665
2665
  return lt(i, this.scope.actions) ? this.globalEvents[i] ? this.globalEvents[i].push(a) : this.globalEvents[i] = [a] : this.scope.events.add(this.scope.document, i, a, { options: s }), this;
2666
- }), "The interact.on() method is being deprecated"), o.off = qe((function(i, a, s) {
2667
- if (x.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), x.array(i)) {
2666
+ }), "The interact.on() method is being deprecated"), o.off = Be((function(i, a, s) {
2667
+ if (b.string(i) && i.search(" ") !== -1 && (i = i.trim().split(/ +/)), b.array(i)) {
2668
2668
  for (var l = 0, d = i; l < d.length; l++) {
2669
2669
  var c = d[l];
2670
2670
  this.off(c, a, s);
2671
2671
  }
2672
2672
  return this;
2673
2673
  }
2674
- if (x.object(i)) {
2674
+ if (b.object(i)) {
2675
2675
  for (var f in i) this.off(f, i[f], a);
2676
2676
  return this;
2677
2677
  }
2678
- var b;
2679
- return lt(i, this.scope.actions) ? i in this.globalEvents && (b = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(b, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
2678
+ var x;
2679
+ return lt(i, this.scope.actions) ? i in this.globalEvents && (x = this.globalEvents[i].indexOf(a)) !== -1 && this.globalEvents[i].splice(x, 1) : this.scope.events.remove(this.scope.document, i, a, s), this;
2680
2680
  }), "The interact.off() method is being deprecated"), o.debug = function() {
2681
2681
  return this.scope;
2682
2682
  }, o.supportsTouch = function() {
@@ -2687,7 +2687,7 @@ function $o() {
2687
2687
  for (var i = 0, a = this.scope.interactions.list; i < a.length; i++) a[i].stop();
2688
2688
  return this;
2689
2689
  }, o.pointerMoveTolerance = function(i) {
2690
- return x.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2690
+ return b.number(i) ? (this.scope.interactions.pointerMoveTolerance = i, this) : this.scope.interactions.pointerMoveTolerance;
2691
2691
  }, o.addDocument = function(i, a) {
2692
2692
  this.scope.addDocument(i, a);
2693
2693
  }, o.removeDocument = function(i) {
@@ -2698,17 +2698,17 @@ function $o() {
2698
2698
  };
2699
2699
  var n = this;
2700
2700
  this.Interactable = (function(r) {
2701
- A(i, r);
2702
- var o = R(i);
2701
+ S(i, r);
2702
+ var o = I(i);
2703
2703
  function i() {
2704
2704
  return y(this, i), o.apply(this, arguments);
2705
2705
  }
2706
2706
  return g(i, [{ key: "_defaults", get: function() {
2707
2707
  return n.defaults;
2708
2708
  } }, { key: "set", value: function(a) {
2709
- return j(k(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2709
+ return W(k(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2710
2710
  } }, { key: "unset", value: function() {
2711
- j(k(i.prototype), "unset", this).call(this);
2711
+ W(k(i.prototype), "unset", this).call(this);
2712
2712
  var a = n.interactables.list.indexOf(this);
2713
2713
  a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
2714
2714
  } }]), i;
@@ -2723,7 +2723,7 @@ function $o() {
2723
2723
  }
2724
2724
  } }, { key: "init", value: function(e) {
2725
2725
  return this.isInitialized ? this : (function(n, r) {
2726
- return n.isInitialized = !0, x.window(r) && V(r), X.init(r), re.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(vr), n;
2726
+ return n.isInitialized = !0, b.window(r) && F(r), K.init(r), re.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(br), n.usePlugin(vr), n;
2727
2727
  })(this, e);
2728
2728
  } }, { key: "pluginIsInstalled", value: function(e) {
2729
2729
  var n = e.id;
@@ -2743,10 +2743,10 @@ function $o() {
2743
2743
  return this;
2744
2744
  } }, { key: "addDocument", value: function(e, n) {
2745
2745
  if (this.getDocIndex(e) !== -1) return !1;
2746
- var r = Z(e);
2746
+ var r = $(e);
2747
2747
  n = n ? z({}, n) : {}, this.documents.push({ doc: e, options: n }), this.events.documents.push(e), e !== this.document && this.events.add(r, "unload", this.onWindowUnload), this.fire("scope:add-document", { doc: e, window: r, scope: this, options: n });
2748
2748
  } }, { key: "removeDocument", value: function(e) {
2749
- var n = this.getDocIndex(e), r = Z(e), o = this.documents[n].options;
2749
+ var n = this.getDocIndex(e), r = $(e), o = this.documents[n].options;
2750
2750
  this.events.remove(r, "unload", this.onWindowUnload), this.documents.splice(n, 1), this.events.documents.splice(n, 1), this.fire("scope:remove-document", { doc: e, window: r, scope: this, options: o });
2751
2751
  } }, { key: "getDocIndex", value: function(e) {
2752
2752
  for (var n = 0; n < this.documents.length; n++) if (this.documents[n].doc === e) return n;
@@ -2771,8 +2771,8 @@ function $o() {
2771
2771
  return o in t || i in t;
2772
2772
  })), n = function(r, o) {
2773
2773
  for (var i = t.range, a = t.limits, s = a === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : a, l = t.offset, d = l === void 0 ? { x: 0, y: 0 } : l, c = { range: i, grid: t, x: null, y: null }, f = 0; f < e.length; f++) {
2774
- var b = e[f], S = b[0], C = b[1], M = Math.round((r - d.x) / t[S]), D = Math.round((o - d.y) / t[C]);
2775
- c[S] = Math.max(s.left, Math.min(s.right, M * t[S] + d.x)), c[C] = Math.max(s.top, Math.min(s.bottom, D * t[C] + d.y));
2774
+ var x = e[f], A = x[0], T = x[1], R = Math.round((r - d.x) / t[A]), L = Math.round((o - d.y) / t[T]);
2775
+ c[A] = Math.max(s.left, Math.min(s.right, R * t[A] + d.x)), c[T] = Math.max(s.top, Math.min(s.bottom, L * t[T] + d.y));
2776
2776
  }
2777
2777
  return c;
2778
2778
  };
@@ -2780,27 +2780,27 @@ function $o() {
2780
2780
  } }), Sr = { id: "snappers", install: function(t) {
2781
2781
  var e = t.interactStatic;
2782
2782
  e.snappers = z(e.snappers || {}, Cr), e.createSnapGrid = e.snappers.grid;
2783
- } }, Tr = Sr, _r = { start: function(t) {
2783
+ } }, Tr = Sr, Ar = { start: function(t) {
2784
2784
  var e = t.state, n = t.rect, r = t.edges, o = t.pageCoords, i = e.options, a = i.ratio, s = i.enabled, l = e.options, d = l.equalDelta, c = l.modifiers;
2785
2785
  a === "preserve" && (a = n.width / n.height), e.startCoords = z({}, o), e.startRect = z({}, n), e.ratio = a, e.equalDelta = d;
2786
2786
  var f = e.linkedEdges = { top: r.top || r.left && !r.bottom, left: r.left || r.top && !r.right, bottom: r.bottom || r.right && !r.top, right: r.right || r.bottom && !r.left };
2787
2787
  if (e.xIsPrimaryAxis = !(!r.left && !r.right), e.equalDelta) {
2788
- var b = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2789
- e.edgeSign = { x: b, y: b };
2788
+ var x = (f.left ? 1 : -1) * (f.top ? 1 : -1);
2789
+ e.edgeSign = { x, y: x };
2790
2790
  } else e.edgeSign = { x: f.left ? -1 : 1, y: f.top ? -1 : 1 };
2791
2791
  if (s !== !1 && z(r, f), c != null && c.length) {
2792
- var S = new It(t.interaction);
2793
- S.copyFrom(t.interaction.modification), S.prepareStates(c), e.subModification = S, S.startAll(u({}, t));
2792
+ var A = new It(t.interaction);
2793
+ A.copyFrom(t.interaction.modification), A.prepareStates(c), e.subModification = A, A.startAll(u({}, t));
2794
2794
  }
2795
2795
  }, set: function(t) {
2796
- var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = z({}, r), a = e.equalDelta ? Ar : Mr;
2796
+ var e = t.state, n = t.rect, r = t.coords, o = e.linkedEdges, i = z({}, r), a = e.equalDelta ? _r : Mr;
2797
2797
  if (z(t.edges, o), a(e, e.xIsPrimaryAxis, r, n), !e.subModification) return null;
2798
2798
  var s = z({}, n);
2799
2799
  nt(o, s, { x: r.x - i.x, y: r.y - i.y });
2800
2800
  var l = e.subModification.setAll(u(u({}, t), {}, { rect: s, edges: o, pageCoords: r, prevCoords: r, prevRect: s })), d = l.delta;
2801
2801
  return l.changed && (a(e, Math.abs(d.x) > Math.abs(d.y), l.coords, l.rect), z(r, l.coords)), l.eventProps;
2802
2802
  }, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
2803
- function Ar(t, e, n) {
2803
+ function _r(t, e, n) {
2804
2804
  var r = t.startCoords, o = t.edgeSign;
2805
2805
  e ? n.y = r.y + (n.x - r.x) * o.y : n.x = r.x + (n.y - r.y) * o.x;
2806
2806
  }
@@ -2814,17 +2814,17 @@ function $o() {
2814
2814
  n.x = i.x + (d - o.width) * s.x;
2815
2815
  }
2816
2816
  }
2817
- var Rr = _e(_r, "aspectRatio"), Tn = function() {
2817
+ var Rr = Ae(Ar, "aspectRatio"), Tn = function() {
2818
2818
  };
2819
2819
  Tn._defaults = {};
2820
2820
  var pt = Tn;
2821
- function Oe(t, e, n) {
2822
- return x.func(t) ? Le(t, e.interactable, e.element, [n.x, n.y, e]) : Le(t, e.interactable, e.element);
2821
+ function De(t, e, n) {
2822
+ return b.func(t) ? Le(t, e.interactable, e.element, [n.x, n.y, e]) : Le(t, e.interactable, e.element);
2823
2823
  }
2824
2824
  var ft = { start: function(t) {
2825
2825
  var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = z({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2826
2826
  if (e && s) {
2827
- var d = Oe(a.restriction, o, i);
2827
+ var d = De(a.restriction, o, i);
2828
2828
  if (d) {
2829
2829
  var c = d.right - d.left - e.width, f = d.bottom - d.top - e.height;
2830
2830
  c < 0 && (l.left += c, l.right += c), f < 0 && (l.top += f, l.bottom += f);
@@ -2833,14 +2833,14 @@ function $o() {
2833
2833
  }
2834
2834
  r.offset = l;
2835
2835
  }, set: function(t) {
2836
- var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Oe(o.restriction, n, e);
2836
+ var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = De(o.restriction, n, e);
2837
2837
  if (a) {
2838
2838
  var s = (function(l) {
2839
2839
  return !l || "left" in l && "top" in l || ((l = z({}, l)).left = l.x || 0, l.top = l.y || 0, l.right = l.right || l.left + l.width, l.bottom = l.bottom || l.top + l.height), l;
2840
2840
  })(a);
2841
2841
  e.x = Math.max(Math.min(s.right - i.right, e.x), s.left + i.left), e.y = Math.max(Math.min(s.bottom - i.bottom, e.y), s.top + i.top);
2842
2842
  }
2843
- }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(ft, "restrict"), _n = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, An = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2843
+ }, defaults: { restriction: null, elementRect: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = Ae(ft, "restrict"), An = { top: 1 / 0, left: 1 / 0, bottom: -1 / 0, right: -1 / 0 }, _n = { top: -1 / 0, left: -1 / 0, bottom: 1 / 0, right: 1 / 0 };
2844
2844
  function Mn(t, e) {
2845
2845
  for (var n = 0, r = ["top", "left", "bottom", "right"]; n < r.length; n++) {
2846
2846
  var o = r[n];
@@ -2848,30 +2848,30 @@ function $o() {
2848
2848
  }
2849
2849
  return t;
2850
2850
  }
2851
- var $e = { noInner: _n, noOuter: An, start: function(t) {
2851
+ var $e = { noInner: An, noOuter: _n, start: function(t) {
2852
2852
  var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
2853
- i && (e = tt(Oe(i.offset, n, n.coords.start.page))), e = e || { x: 0, y: 0 }, o.offset = { top: e.y + r.top, left: e.x + r.left, bottom: e.y - r.bottom, right: e.x - r.right };
2853
+ i && (e = tt(De(i.offset, n, n.coords.start.page))), e = e || { x: 0, y: 0 }, o.offset = { top: e.y + r.top, left: e.x + r.left, bottom: e.y - r.bottom, right: e.x - r.right };
2854
2854
  }, set: function(t) {
2855
2855
  var e = t.coords, n = t.edges, r = t.interaction, o = t.state, i = o.offset, a = o.options;
2856
2856
  if (n) {
2857
- var s = z({}, e), l = Oe(a.inner, r, s) || {}, d = Oe(a.outer, r, s) || {};
2858
- Mn(l, _n), Mn(d, An), n.top ? e.y = Math.min(Math.max(d.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(d.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(d.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(d.right + i.right, s.x), l.right + i.right));
2857
+ var s = z({}, e), l = De(a.inner, r, s) || {}, d = De(a.outer, r, s) || {};
2858
+ Mn(l, An), Mn(d, _n), n.top ? e.y = Math.min(Math.max(d.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(d.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(d.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(d.right + i.right, s.x), l.right + i.right));
2859
2859
  }
2860
- }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e($e, "restrictEdges"), Or = z({ get elementRect() {
2860
+ }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = Ae($e, "restrictEdges"), Dr = z({ get elementRect() {
2861
2861
  return { top: 0, left: 0, bottom: 1, right: 1 };
2862
2862
  }, set elementRect(t) {
2863
- } }, ft.defaults), Dr = _e({ start: ft.start, set: ft.set, defaults: Or }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, Lr = { width: 1 / 0, height: 1 / 0 }, zr = _e({ start: function(t) {
2863
+ } }, ft.defaults), Or = Ae({ start: ft.start, set: ft.set, defaults: Dr }, "restrictRect"), Nr = { width: -1 / 0, height: -1 / 0 }, Lr = { width: 1 / 0, height: 1 / 0 }, zr = Ae({ start: function(t) {
2864
2864
  return $e.start(t);
2865
2865
  }, set: function(t) {
2866
2866
  var e = t.interaction, n = t.state, r = t.rect, o = t.edges, i = n.options;
2867
2867
  if (o) {
2868
- var a = gt(Oe(i.min, e, t.coords)) || Nr, s = gt(Oe(i.max, e, t.coords)) || Lr;
2868
+ var a = gt(De(i.min, e, t.coords)) || Nr, s = gt(De(i.max, e, t.coords)) || Lr;
2869
2869
  n.options = { endOnly: i.endOnly, inner: z({}, $e.noInner), outer: z({}, $e.noOuter) }, o.top ? (n.options.inner.top = r.bottom - a.height, n.options.outer.top = r.bottom - s.height) : o.bottom && (n.options.inner.bottom = r.top + a.height, n.options.outer.bottom = r.top + s.height), o.left ? (n.options.inner.left = r.right - a.width, n.options.outer.left = r.right - s.width) : o.right && (n.options.inner.right = r.left + a.width, n.options.outer.right = r.left + s.width), $e.set(t), n.options = i;
2870
2870
  }
2871
2871
  }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), zt = { start: function(t) {
2872
- var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, l = a.options, d = l.offsetWithOrigin ? (function(b) {
2873
- var S = b.interaction.element, C = tt(Le(b.state.options.origin, null, null, [S])), M = C || ze(b.interactable, S, b.interaction.prepared.name);
2874
- return M;
2872
+ var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, l = a.options, d = l.offsetWithOrigin ? (function(x) {
2873
+ var A = x.interaction.element, T = tt(Le(x.state.options.origin, null, null, [A])), R = T || ze(x.interactable, A, x.interaction.prepared.name);
2874
+ return R;
2875
2875
  })(t) : { x: 0, y: 0 };
2876
2876
  if (l.offset === "startCoords") e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
2877
2877
  else {
@@ -2879,22 +2879,22 @@ function $o() {
2879
2879
  (e = tt(c) || { x: 0, y: 0 }).x += d.x, e.y += d.y;
2880
2880
  }
2881
2881
  var f = l.relativePoints;
2882
- a.offsets = i && f && f.length ? f.map((function(b, S) {
2883
- return { index: S, relativePoint: b, x: s.left - i.width * b.x + e.x, y: s.top - i.height * b.y + e.y };
2882
+ a.offsets = i && f && f.length ? f.map((function(x, A) {
2883
+ return { index: A, relativePoint: x, x: s.left - i.width * x.x + e.x, y: s.top - i.height * x.y + e.y };
2884
2884
  })) : [{ index: 0, relativePoint: null, x: e.x, y: e.y }];
2885
2885
  }, set: function(t) {
2886
2886
  var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = ze(e.interactable, e.element, e.prepared.name), s = z({}, n), l = [];
2887
2887
  o.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
2888
- for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], b = s.x - f.x, S = s.y - f.y, C = 0, M = o.targets.length; C < M; C++) {
2889
- var D = o.targets[C], O = void 0;
2890
- (O = x.func(D) ? D(b, S, e._proxy, f, C) : D) && l.push({ x: (x.number(O.x) ? O.x : b) + f.x, y: (x.number(O.y) ? O.y : S) + f.y, range: x.number(O.range) ? O.range : o.range, source: D, index: C, offset: f });
2888
+ for (var d = 0, c = i; d < c.length; d++) for (var f = c[d], x = s.x - f.x, A = s.y - f.y, T = 0, R = o.targets.length; T < R; T++) {
2889
+ var L = o.targets[T], D = void 0;
2890
+ (D = b.func(L) ? L(x, A, e._proxy, f, T) : L) && l.push({ x: (b.number(D.x) ? D.x : x) + f.x, y: (b.number(D.y) ? D.y : A) + f.y, range: b.number(D.range) ? D.range : o.range, source: L, index: T, offset: f });
2891
2891
  }
2892
- for (var F = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, U = 0; U < l.length; U++) {
2893
- var ee = l[U], q = ee.range, K = ee.x - s.x, ve = ee.y - s.y, ae = Fe(K, ve), ge = ae <= q;
2894
- q === 1 / 0 && F.inRange && F.range !== 1 / 0 && (ge = !1), F.target && !(ge ? F.inRange && q !== 1 / 0 ? ae / q < F.distance / F.range : q === 1 / 0 && F.range !== 1 / 0 || ae < F.distance : !F.inRange && ae < F.distance) || (F.target = ee, F.distance = ae, F.range = q, F.inRange = ge, F.delta.x = K, F.delta.y = ve);
2892
+ for (var j = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, G = 0; G < l.length; G++) {
2893
+ var te = l[G], Y = te.range, Q = te.x - s.x, ve = te.y - s.y, ae = Fe(Q, ve), ge = ae <= Y;
2894
+ Y === 1 / 0 && j.inRange && j.range !== 1 / 0 && (ge = !1), j.target && !(ge ? j.inRange && Y !== 1 / 0 ? ae / Y < j.distance / j.range : Y === 1 / 0 && j.range !== 1 / 0 || ae < j.distance : !j.inRange && ae < j.distance) || (j.target = te, j.distance = ae, j.range = Y, j.inRange = ge, j.delta.x = Q, j.delta.y = ve);
2895
2895
  }
2896
- return F.inRange && (n.x = F.target.x, n.y = F.target.y), r.closest = F, F;
2897
- }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = _e(zt, "snap"), ht = { start: function(t) {
2896
+ return j.inRange && (n.x = j.target.x, n.y = j.target.y), r.closest = j, j;
2897
+ }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Fr = Ae(zt, "snap"), ht = { start: function(t) {
2898
2898
  var e = t.state, n = t.edges, r = e.options;
2899
2899
  if (!n) return null;
2900
2900
  t.state = { options: { targets: null, relativePoints: [{ x: n.left ? 0 : 1, y: n.top ? 0 : 1 }], offset: r.offset || "self", origin: { x: 0, y: 0 }, range: r.range } }, e.targetFields = e.targetFields || [["width", "height"], ["x", "y"]], zt.start(t), e.offsets = t.state.offsets, t.state = e;
@@ -2903,20 +2903,20 @@ function $o() {
2903
2903
  n.options = z({}, o), n.options.targets = [];
2904
2904
  for (var s = 0, l = o.targets || []; s < l.length; s++) {
2905
2905
  var d = l[s], c = void 0;
2906
- if (c = x.func(d) ? d(a.x, a.y, e) : d) {
2907
- for (var f = 0, b = n.targetFields; f < b.length; f++) {
2908
- var S = b[f], C = S[0], M = S[1];
2909
- if (C in c || M in c) {
2910
- c.x = c[C], c.y = c[M];
2906
+ if (c = b.func(d) ? d(a.x, a.y, e) : d) {
2907
+ for (var f = 0, x = n.targetFields; f < x.length; f++) {
2908
+ var A = x[f], T = A[0], R = A[1];
2909
+ if (T in c || R in c) {
2910
+ c.x = c[T], c.y = c[R];
2911
2911
  break;
2912
2912
  }
2913
2913
  }
2914
2914
  n.options.targets.push(c);
2915
2915
  }
2916
2916
  }
2917
- var D = zt.set(t);
2918
- return n.options = o, D;
2919
- }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(ht, "snapSize"), Ft = { aspectRatio: Rr, restrictEdges: Pr, restrict: Ir, restrictRect: Dr, restrictSize: zr, snapEdges: _e({ start: function(t) {
2917
+ var L = zt.set(t);
2918
+ return n.options = o, L;
2919
+ }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = Ae(ht, "snapSize"), Ft = { aspectRatio: Rr, restrictEdges: Pr, restrict: Ir, restrictRect: Or, restrictSize: zr, snapEdges: Ae({ start: function(t) {
2920
2920
  var e = t.edges;
2921
2921
  return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], ht.start(t)) : null;
2922
2922
  }, set: ht.set, defaults: z(Ne(ht.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Fr, snapSize: jr, spring: pt, avoid: pt, transform: pt, rubberband: pt }, Hr = { id: "modifiers", install: function(t) {
@@ -2925,12 +2925,12 @@ function $o() {
2925
2925
  var r = Ft[n], o = r._defaults, i = r._methods;
2926
2926
  o._methods = i, t.defaults.perAction[n] = o;
2927
2927
  }
2928
- } }, Br = Hr, Rn = (function(t) {
2929
- A(n, t);
2930
- var e = R(n);
2928
+ } }, Wr = Hr, Rn = (function(t) {
2929
+ S(n, t);
2930
+ var e = I(n);
2931
2931
  function n(r, o, i, a, s, l) {
2932
2932
  var d;
2933
- if (y(this, n), rt(I(d = e.call(this, s)), i), i !== o && rt(I(d), o), d.timeStamp = l, d.originalEvent = i, d.type = r, d.pointerId = je(o), d.pointerType = Vt(o), d.target = a, d.currentTarget = null, r === "tap") {
2933
+ if (y(this, n), rt(O(d = e.call(this, s)), i), i !== o && rt(O(d), o), d.timeStamp = l, d.originalEvent = i, d.type = r, d.pointerId = je(o), d.pointerType = Vt(o), d.target = a, d.currentTarget = null, r === "tap") {
2934
2934
  var c = s.getPointerIndex(o);
2935
2935
  d.dt = d.timeStamp - s.pointers[c].downTime;
2936
2936
  var f = d.timeStamp - s.tapTime;
@@ -2960,18 +2960,18 @@ function $o() {
2960
2960
  t.duplicate || n.pointerIsDown && !n.pointerWasMoved || (n.pointerIsDown && jt(t), Me({ interaction: n, pointer: r, event: o, eventTarget: i, type: "move" }, e));
2961
2961
  }, "interactions:down": function(t, e) {
2962
2962
  (function(n, r) {
2963
- for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, l = n.pointerIndex, d = o.pointers[l].hold, c = ue(s), f = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: c, node: null }, b = 0; b < c.length; b++) {
2964
- var S = c[b];
2965
- f.node = S, r.fire("pointerEvents:collect-targets", f);
2963
+ for (var o = n.interaction, i = n.pointer, a = n.event, s = n.eventTarget, l = n.pointerIndex, d = o.pointers[l].hold, c = ue(s), f = { interaction: o, pointer: i, event: a, eventTarget: s, type: "hold", targets: [], path: c, node: null }, x = 0; x < c.length; x++) {
2964
+ var A = c[x];
2965
+ f.node = A, r.fire("pointerEvents:collect-targets", f);
2966
2966
  }
2967
2967
  if (f.targets.length) {
2968
- for (var C = 1 / 0, M = 0, D = f.targets; M < D.length; M++) {
2969
- var O = D[M].eventable.options.holdDuration;
2970
- O < C && (C = O);
2968
+ for (var T = 1 / 0, R = 0, L = f.targets; R < L.length; R++) {
2969
+ var D = L[R].eventable.options.holdDuration;
2970
+ D < T && (T = D);
2971
2971
  }
2972
- d.duration = C, d.timeout = setTimeout((function() {
2972
+ d.duration = T, d.timeout = setTimeout((function() {
2973
2973
  Me({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
2974
- }), C);
2974
+ }), T);
2975
2975
  }
2976
2976
  })(t, e), Me(t, e);
2977
2977
  }, "interactions:up": function(t, e) {
@@ -2986,14 +2986,14 @@ function $o() {
2986
2986
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = t.targets, l = s === void 0 ? In(t, e) : s, d = new Rn(a, r, o, i, n, e.now());
2987
2987
  e.fire("pointerEvents:new", { pointerEvent: d });
2988
2988
  for (var c = { interaction: n, pointer: r, event: o, eventTarget: i, targets: l, type: a, pointerEvent: d }, f = 0; f < l.length; f++) {
2989
- var b = l[f];
2990
- for (var S in b.props || {}) d[S] = b.props[S];
2991
- var C = ze(b.eventable, b.node);
2992
- if (d._subtractOrigin(C), d.eventable = b.eventable, d.currentTarget = b.node, b.eventable.fire(d), d._addOrigin(C), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
2989
+ var x = l[f];
2990
+ for (var A in x.props || {}) d[A] = x.props[A];
2991
+ var T = ze(x.eventable, x.node);
2992
+ if (d._subtractOrigin(T), d.eventable = x.eventable, d.currentTarget = x.node, x.eventable.fire(d), d._addOrigin(T), d.immediatePropagationStopped || d.propagationStopped && f + 1 < l.length && l[f + 1].node !== d.currentTarget) break;
2993
2993
  }
2994
2994
  if (e.fire("pointerEvents:fired", c), a === "tap") {
2995
- var M = d.double ? Me({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2996
- n.prevTap = M, n.tapTime = M.timeStamp;
2995
+ var R = d.double ? Me({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : d;
2996
+ n.prevTap = R, n.tapTime = R.timeStamp;
2997
2997
  }
2998
2998
  return d;
2999
2999
  }
@@ -3001,20 +3001,20 @@ function $o() {
3001
3001
  var n = t.interaction, r = t.pointer, o = t.event, i = t.eventTarget, a = t.type, s = n.getPointerIndex(r), l = n.pointers[s];
3002
3002
  if (a === "tap" && (n.pointerWasMoved || !l || l.downTarget !== i)) return [];
3003
3003
  for (var d = ue(i), c = { interaction: n, pointer: r, event: o, eventTarget: i, type: a, path: d, targets: [], node: null }, f = 0; f < d.length; f++) {
3004
- var b = d[f];
3005
- c.node = b, e.fire("pointerEvents:collect-targets", c);
3004
+ var x = d[f];
3005
+ c.node = x, e.fire("pointerEvents:collect-targets", c);
3006
3006
  }
3007
- return a === "hold" && (c.targets = c.targets.filter((function(S) {
3008
- var C, M;
3009
- return S.eventable.options.holdDuration === ((C = n.pointers[s]) == null || (M = C.hold) == null ? void 0 : M.duration);
3007
+ return a === "hold" && (c.targets = c.targets.filter((function(A) {
3008
+ var T, R;
3009
+ return A.eventable.options.holdDuration === ((T = n.pointers[s]) == null || (R = T.hold) == null ? void 0 : R.duration);
3010
3010
  }))), c.targets;
3011
3011
  }
3012
3012
  function jt(t) {
3013
3013
  var e = t.interaction, n = t.pointerIndex, r = e.pointers[n].hold;
3014
3014
  r && r.timeout && (clearTimeout(r.timeout), r.timeout = null);
3015
3015
  }
3016
- var qr = Object.freeze({ __proto__: null, default: Ve });
3017
- function Wr(t) {
3016
+ var Br = Object.freeze({ __proto__: null, default: Ve });
3017
+ function qr(t) {
3018
3018
  var e = t.interaction;
3019
3019
  e.holdIntervalHandle && (clearInterval(e.holdIntervalHandle), e.holdIntervalHandle = null);
3020
3020
  }
@@ -3023,7 +3023,7 @@ function $o() {
3023
3023
  var e = t.pointerEvents;
3024
3024
  e.defaults.holdRepeatInterval = 0, e.types.holdrepeat = t.actions.phaselessTypes.holdrepeat = !0;
3025
3025
  }, listeners: ["move", "up", "cancel", "endall"].reduce((function(t, e) {
3026
- return t["pointerEvents:".concat(e)] = Wr, t;
3026
+ return t["pointerEvents:".concat(e)] = qr, t;
3027
3027
  }), { "pointerEvents:new": function(t) {
3028
3028
  var e = t.pointerEvent;
3029
3029
  e.type === "hold" && (e.count = (e.count || 0) + 1);
@@ -3060,23 +3060,23 @@ function $o() {
3060
3060
  var n = t.interactable, r = t.options;
3061
3061
  z(n.events.options, e.pointerEvents.defaults), z(n.events.options, r.pointerEvents || {});
3062
3062
  } } }, Ur = Vr, Xr = { id: "pointer-events", install: function(t) {
3063
- t.usePlugin(qr), t.usePlugin($r), t.usePlugin(Ur);
3063
+ t.usePlugin(Br), t.usePlugin($r), t.usePlugin(Ur);
3064
3064
  } }, Gr = Xr, Kr = { id: "reflow", install: function(t) {
3065
3065
  var e = t.Interactable;
3066
3066
  t.actions.phases.reflow = !0, e.prototype.reflow = function(n) {
3067
3067
  return (function(r, o, i) {
3068
3068
  for (var a = r.getAllElements(), s = i.window.Promise, l = s ? [] : null, d = function() {
3069
- var f = a[c], b = r.getRect(f);
3070
- if (!b) return 1;
3071
- var S, C = Be(i.interactions.list, (function(O) {
3072
- return O.interacting() && O.interactable === r && O.element === f && O.prepared.name === o.name;
3069
+ var f = a[c], x = r.getRect(f);
3070
+ if (!x) return 1;
3071
+ var A, T = We(i.interactions.list, (function(D) {
3072
+ return D.interacting() && D.interactable === r && D.element === f && D.prepared.name === o.name;
3073
3073
  }));
3074
- if (C) C.move(), l && (S = C._reflowPromise || new s((function(O) {
3075
- C._reflowResolve = O;
3074
+ if (T) T.move(), l && (A = T._reflowPromise || new s((function(D) {
3075
+ T._reflowResolve = D;
3076
3076
  })));
3077
3077
  else {
3078
- var M = gt(b), D = /* @__PURE__ */ (function(O) {
3079
- return { coords: O, get page() {
3078
+ var R = gt(x), L = /* @__PURE__ */ (function(D) {
3079
+ return { coords: D, get page() {
3080
3080
  return this.coords.page;
3081
3081
  }, get client() {
3082
3082
  return this.coords.client;
@@ -3102,17 +3102,17 @@ function $o() {
3102
3102
  return this.coords.buttons;
3103
3103
  }, preventDefault: function() {
3104
3104
  } };
3105
- })({ page: { x: M.x, y: M.y }, client: { x: M.x, y: M.y }, timeStamp: i.now() });
3106
- S = (function(O, F, U, ee, q) {
3107
- var K = O.interactions.new({ pointerType: "reflow" }), ve = { interaction: K, event: q, pointer: q, eventTarget: U, phase: "reflow" };
3108
- K.interactable = F, K.element = U, K.prevEvent = q, K.updatePointer(q, q, U, !0), qt(K.coords.delta), _t(K.prepared, ee), K._doPhase(ve);
3109
- var ae = O.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3110
- K._reflowResolve = Se;
3105
+ })({ page: { x: R.x, y: R.y }, client: { x: R.x, y: R.y }, timeStamp: i.now() });
3106
+ A = (function(D, j, G, te, Y) {
3107
+ var Q = D.interactions.new({ pointerType: "reflow" }), ve = { interaction: Q, event: Y, pointer: Y, eventTarget: G, phase: "reflow" };
3108
+ Q.interactable = j, Q.element = G, Q.prevEvent = Y, Q.updatePointer(Y, Y, G, !0), Bt(Q.coords.delta), At(Q.prepared, te), Q._doPhase(ve);
3109
+ var ae = D.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3110
+ Q._reflowResolve = Se;
3111
3111
  })) : void 0;
3112
- return K._reflowPromise = be, K.start(ee, F, U), K._interacting ? (K.move(ve), K.end(q)) : (K.stop(), K._reflowResolve()), K.removePointer(q, q), be;
3113
- })(i, r, f, o, D);
3112
+ return Q._reflowPromise = be, Q.start(te, j, G), Q._interacting ? (Q.move(ve), Q.end(Y)) : (Q.stop(), Q._reflowResolve()), Q.removePointer(Y, Y), be;
3113
+ })(i, r, f, o, L);
3114
3114
  }
3115
- l && l.push(S);
3115
+ l && l.push(A);
3116
3116
  }, c = 0; c < a.length && !d(); c++) ;
3117
3117
  return l && s.all(l).then((function() {
3118
3118
  return r;
@@ -3125,7 +3125,7 @@ function $o() {
3125
3125
  r.splice(r.indexOf(o), 1);
3126
3126
  })(e.interactions.list, n));
3127
3127
  } } }, Jr = Kr;
3128
- if (me.use(un), me.use(vn), me.use(Gr), me.use(hr), me.use(Br), me.use(nr), me.use($n), me.use(Un), me.use(Jr), me.default = me, v(h) === "object" && h) try {
3128
+ if (me.use(un), me.use(vn), me.use(Gr), me.use(hr), me.use(Wr), me.use(nr), me.use($n), me.use(Un), me.use(Jr), me.default = me, v(h) === "object" && h) try {
3129
3129
  h.exports = me;
3130
3130
  } catch {
3131
3131
  }
@@ -3134,7 +3134,7 @@ function $o() {
3134
3134
  })(Je, Je.exports)), Je.exports;
3135
3135
  }
3136
3136
  var Vo = /* @__PURE__ */ $o();
3137
- const Ze = /* @__PURE__ */ Wo(Vo);
3137
+ const Ze = /* @__PURE__ */ qo(Vo);
3138
3138
  function Uo(h) {
3139
3139
  const p = new DOMParser().parseFromString(h, "text/html");
3140
3140
  return Array.from(p.querySelectorAll("img")).forEach((v) => {
@@ -3143,24 +3143,71 @@ function Uo(h) {
3143
3143
  if (!w) return;
3144
3144
  const g = document.createElement("img");
3145
3145
  g.src = w, v.alt && (g.alt = v.alt), v.title && (g.title = v.title), g.style.maxWidth = "100%", g.style.width = "100%", g.style.height = "auto", g.style.cursor = "pointer", g.draggable = !1;
3146
- const T = v.getAttribute("width") || v.style.width || (v.naturalWidth > 0 ? `${v.naturalWidth}px` : null), A = document.createElement("div");
3147
- A.className = "editor-image-wrapper", A.style.display = "inline-block", A.style.position = "relative", A.style.maxWidth = "100%", A.style.width = T && T !== "0px" ? T.includes("px") ? T : `${T}px` : "300px", A.style.height = "auto", A.contentEditable = "false", A.style.boxSizing = "border-box", A.style.touchAction = "none", A.style.userSelect = "none", A.appendChild(g);
3148
- const k = document.createElement("div");
3149
- k.className = "editor-image-container", k.style.margin = "10px 0", k.style.textAlign = "left", k.style.display = "block", k.appendChild(A);
3150
- let _ = v;
3151
- const I = v.closest("figure"), R = v.closest("picture");
3152
- if (I && p.body.contains(I))
3153
- _ = I;
3154
- else if (R && p.body.contains(R))
3155
- _ = R;
3146
+ const C = (M) => {
3147
+ if (!M || M.includes("%")) return null;
3148
+ const F = String(M).match(/(\d+(?:\.\d+)?)/);
3149
+ if (!F) return null;
3150
+ const $ = Math.round(Number(F[1]));
3151
+ return Number.isFinite($) && $ > 0 ? $ : null;
3152
+ };
3153
+ let S = null;
3154
+ if (S = C(v.getAttribute("width")), S || (S = C(v.style.width)), !S) {
3155
+ const F = (v.getAttribute("style") || "").match(
3156
+ /(?:^|;)\s*width:\s*(\d+(?:\.\d+)?px)/i
3157
+ );
3158
+ F && (S = C(F[1]));
3159
+ }
3160
+ if (S || (S = C(v.style.maxWidth)), !S) {
3161
+ const M = v.closest(
3162
+ ".editor-image-wrapper"
3163
+ );
3164
+ M && (S = C(M.style.width) || C(M.getAttribute("width")));
3165
+ }
3166
+ if (!S) {
3167
+ const M = v.closest("figure");
3168
+ M && (S = C(M.style.width) || C(M.getAttribute("width")));
3169
+ }
3170
+ if (!S) {
3171
+ const M = v.parentElement;
3172
+ M && M.tagName !== "BODY" && (S = C(M.style.width) || C(M.getAttribute("width")));
3173
+ }
3174
+ S || (S = C(v.getAttribute("data-width"))), !S && v.naturalWidth > 0 && (S = v.naturalWidth);
3175
+ const k = S ? `${S}px` : "700px";
3176
+ let _ = "left";
3177
+ const O = v.closest("[data-align]");
3178
+ if (O)
3179
+ _ = O.getAttribute("data-align") || "left";
3180
+ else {
3181
+ const M = v.closest("figure"), F = v.closest("p"), $ = v.closest("div"), oe = (X) => {
3182
+ if (!X) return null;
3183
+ if (X.style.textAlign) return X.style.textAlign;
3184
+ const ne = (X.getAttribute("style") || "").match(
3185
+ /text-align:\s*(left|center|right|justify)/i
3186
+ );
3187
+ if (ne) return ne[1].toLowerCase();
3188
+ const B = X.getAttribute("align");
3189
+ return B ? B.toLowerCase() : X.classList.contains("center") || X.classList.contains("text-center") || X.classList.contains("align-center") ? "center" : X.classList.contains("right") || X.classList.contains("text-right") || X.classList.contains("align-right") ? "right" : null;
3190
+ };
3191
+ _ = oe(M) || oe($) || oe(F) || "left", (v.style.margin === "auto" || v.style.margin === "0 auto" || v.style.marginLeft === "auto" && v.style.marginRight === "auto") && (_ = "center"), v.style.display === "block" && (v.style.marginLeft === "auto" || v.style.marginRight === "auto") && (_ = "center");
3192
+ }
3193
+ const I = document.createElement("div");
3194
+ I.className = "editor-image-wrapper", I.style.display = "inline-block", I.style.position = "relative", I.style.maxWidth = "100%", I.style.width = k && k !== "0px" ? k.includes("px") ? k : `${k}px` : "700px", I.style.height = "auto", I.contentEditable = "false", I.style.boxSizing = "border-box", I.style.touchAction = "none", I.style.userSelect = "none", I.appendChild(g);
3195
+ const W = document.createElement("div");
3196
+ W.className = "editor-image-container", W.style.margin = "10px 0", W.style.textAlign = _, W.style.display = "block", W.appendChild(I);
3197
+ let N = v;
3198
+ const P = v.closest("figure"), H = v.closest("picture");
3199
+ if (P && p.body.contains(P))
3200
+ N = P;
3201
+ else if (H && p.body.contains(H))
3202
+ N = H;
3156
3203
  else {
3157
- let j = v.parentNode;
3158
- for (; j && j !== p.body && j.parentNode !== p.body && Array.from(j.childNodes).filter(
3159
- (P) => P.nodeType === Node.ELEMENT_NODE || P.nodeType === Node.TEXT_NODE && P.textContent?.trim()
3204
+ let M = v.parentNode;
3205
+ for (; M && M !== p.body && M.parentNode !== p.body && Array.from(M.childNodes).filter(
3206
+ ($) => $.nodeType === Node.ELEMENT_NODE || $.nodeType === Node.TEXT_NODE && $.textContent?.trim()
3160
3207
  ).length === 1; )
3161
- _ = j, j = j.parentNode;
3208
+ N = M, M = M.parentNode;
3162
3209
  }
3163
- _ && _.parentNode && p.body.contains(_) ? _.parentNode.replaceChild(k, _) : v.parentNode && p.body.contains(v) && v.parentNode.replaceChild(k, v);
3210
+ N && N.parentNode && p.body.contains(N) ? N.parentNode.replaceChild(W, N) : v.parentNode && p.body.contains(v) && v.parentNode.replaceChild(W, v);
3164
3211
  }), p.body.innerHTML;
3165
3212
  }
3166
3213
  function Xo(h, m) {
@@ -3184,34 +3231,34 @@ function Xo(h, m) {
3184
3231
  w.preventDefault(), w.stopPropagation();
3185
3232
  }), p.addEventListener("drop", (w) => {
3186
3233
  w.preventDefault(), w.stopPropagation();
3187
- const g = w.clientX, T = w.clientY;
3188
- let A = null;
3234
+ const g = w.clientX, C = w.clientY;
3235
+ let S = null;
3189
3236
  if (document.caretRangeFromPoint)
3190
- A = document.caretRangeFromPoint(g, T);
3237
+ S = document.caretRangeFromPoint(g, C);
3191
3238
  else if (document.caretPositionFromPoint) {
3192
- const _ = document.caretPositionFromPoint(g, T);
3193
- _ && (A = document.createRange(), A.setStart(_.offsetNode, _.offset));
3239
+ const _ = document.caretPositionFromPoint(g, C);
3240
+ _ && (S = document.createRange(), S.setStart(_.offsetNode, _.offset));
3194
3241
  }
3195
3242
  const k = w.dataTransfer?.files;
3196
3243
  if (k && k.length > 0)
3197
3244
  for (let _ = 0; _ < k.length; _++) {
3198
- const I = k[_];
3199
- if (I.type.startsWith("image/")) {
3200
- const R = new FileReader();
3201
- R.onload = (j) => {
3245
+ const O = k[_];
3246
+ if (O.type.startsWith("image/")) {
3247
+ const I = new FileReader();
3248
+ I.onload = (W) => {
3202
3249
  const N = document.createElement("img");
3203
- N.src = j.target?.result, N.style.maxWidth = "100%", N.style.width = "100%", N.style.height = "auto", N.style.cursor = "pointer", N.draggable = !1;
3250
+ N.src = W.target?.result, N.style.maxWidth = "100%", N.style.width = "100%", N.style.height = "auto", N.style.cursor = "pointer", N.draggable = !1;
3204
3251
  const P = document.createElement("div");
3205
3252
  P.className = "editor-image-wrapper", P.style.display = "inline-block", P.style.position = "relative", P.style.maxWidth = "100%", P.style.width = "auto", P.style.height = "auto", P.contentEditable = "false", P.style.userSelect = "none", P.style.boxSizing = "border-box", P.style.touchAction = "none", P.appendChild(N);
3206
3253
  const H = document.createElement("div");
3207
- if (H.className = "editor-image-container", H.style.margin = "10px 0", H.style.textAlign = "left", H.style.display = "block", H.appendChild(P), A)
3254
+ if (H.className = "editor-image-container", H.style.margin = "10px 0", H.style.textAlign = "left", H.style.display = "block", H.appendChild(P), S)
3208
3255
  try {
3209
- A.insertNode(H);
3210
- const L = window.getSelection();
3211
- if (L) {
3212
- L.removeAllRanges();
3213
- const V = document.createRange();
3214
- V.setStartAfter(H), V.collapse(!0), L.addRange(V), de(V);
3256
+ S.insertNode(H);
3257
+ const M = window.getSelection();
3258
+ if (M) {
3259
+ M.removeAllRanges();
3260
+ const F = document.createRange();
3261
+ F.setStartAfter(H), F.collapse(!0), M.addRange(F), de(F);
3215
3262
  }
3216
3263
  } catch {
3217
3264
  p.appendChild(H);
@@ -3219,76 +3266,78 @@ function Xo(h, m) {
3219
3266
  else
3220
3267
  p.appendChild(H);
3221
3268
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
3222
- }, R.readAsDataURL(I);
3269
+ }, I.readAsDataURL(O);
3223
3270
  }
3224
3271
  }
3225
3272
  }), p.addEventListener("copy", (w) => {
3226
3273
  const g = window.getSelection();
3227
3274
  if (!g || g.rangeCount === 0) return;
3228
- const A = g.getRangeAt(0).cloneContents(), k = document.createElement("div");
3229
- k.appendChild(A), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3275
+ const S = g.getRangeAt(0).cloneContents(), k = document.createElement("div");
3276
+ k.appendChild(S), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3230
3277
  const P = N.querySelector("img");
3231
3278
  if (P) {
3232
- const H = P, L = N;
3233
- L.style.width && H.setAttribute(
3234
- "width",
3235
- parseInt(L.style.width).toString()
3236
- );
3279
+ const H = P, M = N;
3280
+ if (M.style.width) {
3281
+ const F = parseInt(M.style.width).toString();
3282
+ H.setAttribute("width", F), H.setAttribute("data-width", F);
3283
+ }
3284
+ M.style.width && M.setAttribute("data-wrapper-width", M.style.width);
3237
3285
  }
3238
3286
  }), k.querySelectorAll(".editor-image-container").forEach((N) => {
3239
3287
  const P = N;
3240
3288
  P.style.textAlign && P.setAttribute("data-align", P.style.textAlign);
3241
3289
  });
3242
- const R = k.innerHTML, j = g.toString();
3243
- w.clipboardData?.setData("text/html", R), w.clipboardData?.setData("text/plain", j), w.preventDefault();
3290
+ const I = k.innerHTML, W = g.toString();
3291
+ w.clipboardData?.setData("text/html", I), w.clipboardData?.setData("text/plain", W), w.preventDefault();
3244
3292
  }), p.addEventListener("cut", (w) => {
3245
3293
  const g = window.getSelection();
3246
3294
  if (!g || g.rangeCount === 0) return;
3247
- const T = g.getRangeAt(0), A = T.cloneContents(), k = document.createElement("div");
3248
- k.appendChild(A), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3295
+ const C = g.getRangeAt(0), S = C.cloneContents(), k = document.createElement("div");
3296
+ k.appendChild(S), k.querySelectorAll(".editor-image-wrapper").forEach((N) => {
3249
3297
  const P = N.querySelector("img");
3250
3298
  if (P) {
3251
- const H = P, L = N;
3252
- L.style.width && H.setAttribute(
3253
- "width",
3254
- parseInt(L.style.width).toString()
3255
- );
3299
+ const H = P, M = N;
3300
+ if (M.style.width) {
3301
+ const F = parseInt(M.style.width).toString();
3302
+ H.setAttribute("width", F), H.setAttribute("data-width", F);
3303
+ }
3304
+ M.style.width && M.setAttribute("data-wrapper-width", M.style.width);
3256
3305
  }
3257
3306
  }), k.querySelectorAll(".editor-image-container").forEach((N) => {
3258
3307
  const P = N;
3259
3308
  P.style.textAlign && P.setAttribute("data-align", P.style.textAlign);
3260
3309
  });
3261
- const R = k.innerHTML, j = g.toString();
3262
- w.clipboardData?.setData("text/html", R), w.clipboardData?.setData("text/plain", j), w.preventDefault(), T.deleteContents(), p.dispatchEvent(new Event("input", { bubbles: !0 }));
3310
+ const I = k.innerHTML, W = g.toString();
3311
+ w.clipboardData?.setData("text/html", I), w.clipboardData?.setData("text/plain", W), w.preventDefault(), C.deleteContents(), p.dispatchEvent(new Event("input", { bubbles: !0 }));
3263
3312
  }), p.addEventListener("paste", async (w) => {
3264
3313
  w.preventDefault();
3265
3314
  const g = w.clipboardData;
3266
3315
  if (!g) return;
3267
- const A = Array.from(g.items).filter((I) => I.type.startsWith("image/"));
3268
- if (A.length > 0) {
3269
- for (const I of A) {
3270
- const R = I.getAsFile();
3271
- if (R) {
3272
- const j = new FileReader();
3273
- j.onload = (N) => {
3316
+ const S = Array.from(g.items).filter((O) => O.type.startsWith("image/"));
3317
+ if (S.length > 0) {
3318
+ for (const O of S) {
3319
+ const I = O.getAsFile();
3320
+ if (I) {
3321
+ const W = new FileReader();
3322
+ W.onload = (N) => {
3274
3323
  const P = N.target?.result;
3275
3324
  if (P) {
3276
3325
  const H = document.createElement("img");
3277
3326
  H.src = P, H.style.maxWidth = "100%", H.style.width = "100%", H.style.height = "auto", H.style.cursor = "pointer", H.draggable = !1;
3278
- const L = document.createElement("div");
3279
- L.className = "editor-image-wrapper", L.style.display = "inline-block", L.style.position = "relative", L.style.maxWidth = "100%", L.style.width = "auto", L.style.height = "auto", L.contentEditable = "false", L.style.boxSizing = "border-box", L.style.touchAction = "none", L.style.userSelect = "none", L.appendChild(H);
3280
- const V = document.createElement("div");
3281
- V.className = "editor-image-container", V.style.margin = "10px 0", V.style.textAlign = "left", V.style.display = "block", V.appendChild(L);
3282
- const Z = window.getSelection();
3283
- if (Z && Z.rangeCount > 0) {
3284
- Z.getRangeAt(0).insertNode(V), Z.removeAllRanges();
3285
- const te = document.createRange();
3286
- te.setStartAfter(V), te.collapse(!0), Z.addRange(te);
3327
+ const M = document.createElement("div");
3328
+ M.className = "editor-image-wrapper", M.style.display = "inline-block", M.style.position = "relative", M.style.maxWidth = "100%", M.style.width = "700px", M.style.height = "500px", M.contentEditable = "false", M.style.boxSizing = "border-box", M.style.touchAction = "none", M.style.userSelect = "none", M.appendChild(H);
3329
+ const F = document.createElement("div");
3330
+ F.className = "editor-image-container", F.style.margin = "10px 0", F.style.textAlign = "left", F.style.display = "block", F.appendChild(M);
3331
+ const $ = window.getSelection();
3332
+ if ($ && $.rangeCount > 0) {
3333
+ $.getRangeAt(0).insertNode(F), $.removeAllRanges();
3334
+ const X = document.createRange();
3335
+ X.setStartAfter(F), X.collapse(!0), $.addRange(X);
3287
3336
  } else
3288
- p.appendChild(V);
3337
+ p.appendChild(F);
3289
3338
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3290
3339
  }
3291
- }, j.readAsDataURL(R);
3340
+ }, W.readAsDataURL(I);
3292
3341
  }
3293
3342
  }
3294
3343
  return;
@@ -3297,38 +3346,38 @@ function Xo(h, m) {
3297
3346
  k ? k = Uo(k) : k = g.getData("text/plain");
3298
3347
  const _ = window.getSelection();
3299
3348
  if (_ && _.rangeCount > 0) {
3300
- const I = _.getRangeAt(0), R = document.createElement("div");
3301
- R.innerHTML = k;
3302
- const j = document.createDocumentFragment();
3303
- for (; R.firstChild; )
3304
- j.appendChild(R.firstChild);
3305
- I.deleteContents(), I.insertNode(j), I.collapse(!1), _.removeAllRanges(), _.addRange(I);
3349
+ const O = _.getRangeAt(0), I = document.createElement("div");
3350
+ I.innerHTML = k;
3351
+ const W = document.createDocumentFragment();
3352
+ for (; I.firstChild; )
3353
+ W.appendChild(I.firstChild);
3354
+ O.deleteContents(), O.insertNode(W), O.collapse(!1), _.removeAllRanges(), _.addRange(O);
3306
3355
  } else {
3307
- const I = document.createElement("div");
3308
- for (I.innerHTML = k; I.firstChild; )
3309
- p.appendChild(I.firstChild);
3356
+ const O = document.createElement("div");
3357
+ for (O.innerHTML = k; O.firstChild; )
3358
+ p.appendChild(O.firstChild);
3310
3359
  }
3311
3360
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), de();
3312
3361
  }), p.addEventListener("click", (w) => {
3313
3362
  const g = w.target;
3314
- let T = null;
3315
- if (g.tagName === "IMG" ? T = g.parentElement : g.classList.contains("editor-image-wrapper") && (T = g), T && T.classList.contains("editor-image-wrapper")) {
3363
+ let C = null;
3364
+ if (g.tagName === "IMG" ? C = g.parentElement : g.classList.contains("editor-image-wrapper") && (C = g), C && C.classList.contains("editor-image-wrapper")) {
3316
3365
  w.preventDefault(), w.stopPropagation(), p.querySelectorAll(".editor-image-wrapper").forEach((_) => {
3317
- if (_ !== T && _.classList.contains("resizable")) {
3318
- const I = _, R = I.getBoundingClientRect(), j = Math.round(R.width) + "px", N = Math.round(R.height) + "px";
3319
- Ze(I).unset(), I.classList.remove("resizable"), I.style.border = "none", I.style.transform = "", I.dataset.x = "", I.dataset.y = "", I.style.width = j, I.style.height = N, I.contentEditable = "false";
3320
- const P = I.querySelector("img");
3366
+ if (_ !== C && _.classList.contains("resizable")) {
3367
+ const O = _, I = O.getBoundingClientRect(), W = Math.round(I.width) + "px", N = Math.round(I.height) + "px";
3368
+ Ze(O).unset(), O.classList.remove("resizable"), O.style.border = "none", O.style.transform = "", O.dataset.x = "", O.dataset.y = "", O.style.width = W, O.style.height = N, O.contentEditable = "false";
3369
+ const P = O.querySelector("img");
3321
3370
  P && (P.style.width = "100%", P.style.height = "100%");
3322
3371
  }
3323
- }), m(T);
3324
- const k = T.parentElement;
3372
+ }), m(C);
3373
+ const k = C.parentElement;
3325
3374
  k && (k.classList.contains("editor-image-container") || k.tagName === "DIV" || k.tagName === "P") && (window.__selectedImageContainer = k, console.log("Selected image container:", k));
3326
3375
  } else
3327
3376
  window.__selectedImageContainer = null, p.querySelectorAll(
3328
3377
  ".editor-image-wrapper.resizable"
3329
3378
  ).forEach((k) => {
3330
- const _ = k, I = _.getBoundingClientRect(), R = Math.round(I.width) + "px", j = Math.round(I.height) + "px";
3331
- Ze(_).unset(), _.classList.remove("resizable"), _.style.border = "none", _.style.transform = "", _.dataset.x = "", _.dataset.y = "", _.style.width = R, _.style.height = j, _.contentEditable = "false";
3379
+ const _ = k, O = _.getBoundingClientRect(), I = Math.round(O.width) + "px", W = Math.round(O.height) + "px";
3380
+ Ze(_).unset(), _.classList.remove("resizable"), _.style.border = "none", _.style.transform = "", _.dataset.x = "", _.dataset.y = "", _.style.width = I, _.style.height = W, _.contentEditable = "false";
3332
3381
  const N = _.querySelector("img");
3333
3382
  N && (N.style.width = "100%", N.style.height = "100%");
3334
3383
  }), de();
@@ -3352,13 +3401,13 @@ function Xo(h, m) {
3352
3401
  const w = Array.from(p.childNodes);
3353
3402
  for (const g of w)
3354
3403
  if (g.nodeType === Node.TEXT_NODE && g.textContent?.trim()) {
3355
- const T = window.getSelection();
3356
- let A = null;
3357
- T && T.rangeCount > 0 && (A = T.getRangeAt(0).cloneRange());
3404
+ const C = window.getSelection();
3405
+ let S = null;
3406
+ C && C.rangeCount > 0 && (S = C.getRangeAt(0).cloneRange());
3358
3407
  const k = document.createElement("p");
3359
- if (g.parentNode?.insertBefore(k, g), k.appendChild(g), A && T)
3408
+ if (g.parentNode?.insertBefore(k, g), k.appendChild(g), S && C)
3360
3409
  try {
3361
- T.removeAllRanges(), T.addRange(A);
3410
+ C.removeAllRanges(), C.addRange(S);
3362
3411
  } catch {
3363
3412
  }
3364
3413
  }
@@ -3368,7 +3417,7 @@ function Xo(h, m) {
3368
3417
  y && clearTimeout(y), y = setTimeout(() => v(), 100);
3369
3418
  }), !p.innerHTML || p.innerHTML.trim() === "" ? p.innerHTML = "<p><br></p>" : v(), p;
3370
3419
  }
3371
- function On(h) {
3420
+ function Dn(h) {
3372
3421
  const m = document.createElement("input");
3373
3422
  m.type = "file", m.accept = "image/*", m.onchange = (p) => {
3374
3423
  const u = p.target.files?.[0];
@@ -3378,20 +3427,20 @@ function On(h) {
3378
3427
  const w = document.createElement("img");
3379
3428
  w.src = y.target?.result, w.style.maxWidth = "100%", w.style.width = "100%", w.style.height = "auto", w.style.cursor = "pointer", w.draggable = !1;
3380
3429
  const g = document.createElement("div");
3381
- g.className = "editor-image-wrapper", g.style.display = "inline-block", g.style.position = "relative", g.style.maxWidth = "100%", g.style.width = "auto", g.style.height = "auto", g.contentEditable = "false", g.style.boxSizing = "border-box", g.style.touchAction = "none", g.style.userSelect = "none", g.appendChild(w);
3382
- const T = document.createElement("div");
3383
- T.className = "editor-image-container", T.style.margin = "10px 0", T.style.textAlign = "left", T.style.display = "block", T.appendChild(g);
3430
+ g.className = "editor-image-wrapper", g.style.display = "inline-block", g.style.position = "relative", g.style.maxWidth = "100%", g.style.width = "700px", g.style.height = "500px", g.contentEditable = "false", g.style.boxSizing = "border-box", g.style.touchAction = "none", g.style.userSelect = "none", g.appendChild(w);
3431
+ const C = document.createElement("div");
3432
+ C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block", C.appendChild(g);
3384
3433
  try {
3385
3434
  Re();
3386
- const A = window.getSelection();
3387
- if (A && A.rangeCount > 0) {
3388
- A.getRangeAt(0).insertNode(T), A.removeAllRanges();
3435
+ const S = window.getSelection();
3436
+ if (S && S.rangeCount > 0) {
3437
+ S.getRangeAt(0).insertNode(C), S.removeAllRanges();
3389
3438
  const _ = document.createRange();
3390
- _.setStartAfter(T), _.collapse(!0), A.addRange(_), de(_);
3439
+ _.setStartAfter(C), _.collapse(!0), S.addRange(_), de(_);
3391
3440
  } else
3392
- h.appendChild(T), h.focus(), de();
3441
+ h.appendChild(C), h.focus(), de();
3393
3442
  } catch {
3394
- h.appendChild(T), h.focus(), de();
3443
+ h.appendChild(C), h.focus(), de();
3395
3444
  }
3396
3445
  h.dispatchEvent(new Event("input", { bubbles: !0 })), h.focus();
3397
3446
  }, v.readAsDataURL(u);
@@ -3441,13 +3490,13 @@ class Ko {
3441
3490
  editor;
3442
3491
  constructor() {
3443
3492
  this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Xo(
3444
- () => On(this.editor),
3493
+ () => Dn(this.editor),
3445
3494
  (p) => Go(p)
3446
- ), this.toolbar = qo(this.container);
3495
+ ), this.toolbar = Bo(this.container);
3447
3496
  const m = this.toolbar.querySelector(
3448
3497
  '[role="button"][title="Insert Image"]'
3449
3498
  );
3450
- m && (m.addEventListener("mousedown", () => de()), m.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3499
+ m && (m.addEventListener("mousedown", () => de()), m.onclick = () => Dn(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3451
3500
  }
3452
3501
  getElement() {
3453
3502
  return this.container;
@@ -3474,30 +3523,30 @@ class Ko {
3474
3523
  y.style.maxWidth = "100%", y.style.width = "100%", y.style.height = "auto", y.style.cursor = "pointer", y.draggable = !1;
3475
3524
  const w = (_) => {
3476
3525
  if (!_) return null;
3477
- const I = String(_).match(/(\d+(?:\.\d+)?)/);
3478
- if (!I) return null;
3479
- const R = Math.round(Number(I[1]));
3480
- return Number.isFinite(R) && R > 0 ? R : null;
3526
+ const O = String(_).match(/(\d+(?:\.\d+)?)/);
3527
+ if (!O) return null;
3528
+ const I = Math.round(Number(O[1]));
3529
+ return Number.isFinite(I) && I > 0 ? I : null;
3481
3530
  }, g = w(y.getAttribute("width")) ?? w(y.style.width) ?? w(y.getAttribute("style"));
3482
3531
  g ? v.style.width = `${g}px` : y.onload = () => {
3483
- const _ = this.editor.clientWidth || 0, I = y.naturalWidth || 0;
3484
- if (I > 0) {
3485
- const R = _ > 0 ? Math.min(I, _) : I;
3486
- v.style.width = `${R}px`;
3532
+ const _ = this.editor.clientWidth || 0, O = y.naturalWidth || 0;
3533
+ if (O > 0) {
3534
+ const I = _ > 0 ? Math.min(O, _) : O;
3535
+ v.style.width = `${I}px`;
3487
3536
  }
3488
3537
  };
3489
- const T = document.createElement("div");
3490
- T.className = "editor-image-container", T.style.margin = "10px 0", T.style.textAlign = "left", T.style.display = "block";
3491
- const A = y.closest("figure") ?? y.closest(".se-image-container") ?? y, k = A.parentNode;
3492
- k && this.editor.contains(A) && k.contains(A) && (v.appendChild(y), T.appendChild(v), k.replaceChild(T, A));
3538
+ const C = document.createElement("div");
3539
+ C.className = "editor-image-container", C.style.margin = "10px 0", C.style.textAlign = "left", C.style.display = "block";
3540
+ const S = y.closest("figure") ?? y.closest(".se-image-container") ?? y, k = S.parentNode;
3541
+ k && this.editor.contains(S) && k.contains(S) && (v.appendChild(y), C.appendChild(v), k.replaceChild(C, S));
3493
3542
  }), this.editor.dispatchEvent(new Event("input", { bubbles: !0 }));
3494
3543
  }
3495
3544
  }
3496
3545
  var vt = { exports: {} }, Ge = {};
3497
- var Dn;
3546
+ var On;
3498
3547
  function Jo() {
3499
- if (Dn) return Ge;
3500
- Dn = 1;
3548
+ if (On) return Ge;
3549
+ On = 1;
3501
3550
  var h = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
3502
3551
  function p(u, v, y) {
3503
3552
  var w = null;
@@ -3528,13 +3577,13 @@ function Qo() {
3528
3577
  switch (E) {
3529
3578
  case P:
3530
3579
  return "Fragment";
3531
- case L:
3580
+ case M:
3532
3581
  return "Profiler";
3533
3582
  case H:
3534
3583
  return "StrictMode";
3535
- case te:
3584
+ case X:
3536
3585
  return "Suspense";
3537
- case x:
3586
+ case b:
3538
3587
  return "SuspenseList";
3539
3588
  case le:
3540
3589
  return "Activity";
@@ -3545,19 +3594,19 @@ function Qo() {
3545
3594
  ), E.$$typeof) {
3546
3595
  case N:
3547
3596
  return "Portal";
3548
- case Z:
3597
+ case $:
3549
3598
  return E.displayName || "Context";
3550
- case V:
3599
+ case F:
3551
3600
  return (E._context.displayName || "Context") + ".Consumer";
3552
- case ie:
3553
- var B = E.render;
3554
- return E = E.displayName, E || (E = B.displayName || B.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3601
+ case oe:
3602
+ var q = E.render;
3603
+ return E = E.displayName, E || (E = q.displayName || q.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
3555
3604
  case ne:
3556
- return B = E.displayName || null, B !== null ? B : h(E.type) || "Memo";
3557
- case W:
3558
- B = E._payload, E = E._init;
3605
+ return q = E.displayName || null, q !== null ? q : h(E.type) || "Memo";
3606
+ case B:
3607
+ q = E._payload, E = E._init;
3559
3608
  try {
3560
- return h(E(B));
3609
+ return h(E(q));
3561
3610
  } catch {
3562
3611
  }
3563
3612
  }
@@ -3569,74 +3618,74 @@ function Qo() {
3569
3618
  function p(E) {
3570
3619
  try {
3571
3620
  m(E);
3572
- var B = !1;
3621
+ var q = !1;
3573
3622
  } catch {
3574
- B = !0;
3623
+ q = !0;
3575
3624
  }
3576
- if (B) {
3577
- B = console;
3578
- var Y = B.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3579
- return Y.call(
3580
- B,
3625
+ if (q) {
3626
+ q = console;
3627
+ var V = q.error, J = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
3628
+ return V.call(
3629
+ q,
3581
3630
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3582
- G
3631
+ J
3583
3632
  ), m(E);
3584
3633
  }
3585
3634
  }
3586
3635
  function u(E) {
3587
3636
  if (E === P) return "<>";
3588
- if (typeof E == "object" && E !== null && E.$$typeof === W)
3637
+ if (typeof E == "object" && E !== null && E.$$typeof === B)
3589
3638
  return "<...>";
3590
3639
  try {
3591
- var B = h(E);
3592
- return B ? "<" + B + ">" : "<...>";
3640
+ var q = h(E);
3641
+ return q ? "<" + q + ">" : "<...>";
3593
3642
  } catch {
3594
3643
  return "<...>";
3595
3644
  }
3596
3645
  }
3597
3646
  function v() {
3598
- var E = J.A;
3647
+ var E = Z.A;
3599
3648
  return E === null ? null : E.getOwner();
3600
3649
  }
3601
3650
  function y() {
3602
3651
  return Error("react-stack-top-frame");
3603
3652
  }
3604
3653
  function w(E) {
3605
- if (Q.call(E, "key")) {
3606
- var B = Object.getOwnPropertyDescriptor(E, "key").get;
3607
- if (B && B.isReactWarning) return !1;
3654
+ if (ee.call(E, "key")) {
3655
+ var q = Object.getOwnPropertyDescriptor(E, "key").get;
3656
+ if (q && q.isReactWarning) return !1;
3608
3657
  }
3609
3658
  return E.key !== void 0;
3610
3659
  }
3611
- function g(E, B) {
3612
- function Y() {
3660
+ function g(E, q) {
3661
+ function V() {
3613
3662
  re || (re = !0, console.error(
3614
3663
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
3615
- B
3664
+ q
3616
3665
  ));
3617
3666
  }
3618
- Y.isReactWarning = !0, Object.defineProperty(E, "key", {
3619
- get: Y,
3667
+ V.isReactWarning = !0, Object.defineProperty(E, "key", {
3668
+ get: V,
3620
3669
  configurable: !0
3621
3670
  });
3622
3671
  }
3623
- function T() {
3672
+ function C() {
3624
3673
  var E = h(this.type);
3625
3674
  return se[E] || (se[E] = !0, console.error(
3626
3675
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
3627
3676
  )), E = this.props.ref, E !== void 0 ? E : null;
3628
3677
  }
3629
- function A(E, B, Y, G, xe, we) {
3630
- var ue = Y.ref;
3678
+ function S(E, q, V, J, xe, we) {
3679
+ var ue = V.ref;
3631
3680
  return E = {
3632
- $$typeof: j,
3681
+ $$typeof: W,
3633
3682
  type: E,
3634
- key: B,
3635
- props: Y,
3636
- _owner: G
3683
+ key: q,
3684
+ props: V,
3685
+ _owner: J
3637
3686
  }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(E, "ref", {
3638
3687
  enumerable: !1,
3639
- get: T
3688
+ get: C
3640
3689
  }) : Object.defineProperty(E, "ref", { enumerable: !1, value: null }), E._store = {}, Object.defineProperty(E._store, "validated", {
3641
3690
  configurable: !1,
3642
3691
  enumerable: !1,
@@ -3659,91 +3708,91 @@ function Qo() {
3659
3708
  value: we
3660
3709
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
3661
3710
  }
3662
- function k(E, B, Y, G, xe, we) {
3663
- var ue = B.children;
3711
+ function k(E, q, V, J, xe, we) {
3712
+ var ue = q.children;
3664
3713
  if (ue !== void 0)
3665
- if (G)
3666
- if (X(ue)) {
3667
- for (G = 0; G < ue.length; G++)
3668
- _(ue[G]);
3714
+ if (J)
3715
+ if (K(ue)) {
3716
+ for (J = 0; J < ue.length; J++)
3717
+ _(ue[J]);
3669
3718
  Object.freeze && Object.freeze(ue);
3670
3719
  } else
3671
3720
  console.error(
3672
3721
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
3673
3722
  );
3674
3723
  else _(ue);
3675
- if (Q.call(B, "key")) {
3724
+ if (ee.call(q, "key")) {
3676
3725
  ue = h(E);
3677
- var Ee = Object.keys(B).filter(function(et) {
3726
+ var Ee = Object.keys(q).filter(function(et) {
3678
3727
  return et !== "key";
3679
3728
  });
3680
- G = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + G] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3729
+ J = 0 < Ee.length ? "{key: someKey, " + Ee.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + J] || (Ee = 0 < Ee.length ? "{" + Ee.join(": ..., ") + ": ...}" : "{}", console.error(
3681
3730
  `A props object containing a "key" prop is being spread into JSX:
3682
3731
  let props = %s;
3683
3732
  <%s {...props} />
3684
3733
  React keys must be passed directly to JSX without using spread:
3685
3734
  let props = %s;
3686
3735
  <%s key={someKey} {...props} />`,
3687
- G,
3736
+ J,
3688
3737
  ue,
3689
3738
  Ee,
3690
3739
  ue
3691
- ), he[ue + G] = !0);
3740
+ ), he[ue + J] = !0);
3692
3741
  }
3693
- if (ue = null, Y !== void 0 && (p(Y), ue = "" + Y), w(B) && (p(B.key), ue = "" + B.key), "key" in B) {
3694
- Y = {};
3695
- for (var z in B)
3696
- z !== "key" && (Y[z] = B[z]);
3697
- } else Y = B;
3742
+ if (ue = null, V !== void 0 && (p(V), ue = "" + V), w(q) && (p(q.key), ue = "" + q.key), "key" in q) {
3743
+ V = {};
3744
+ for (var z in q)
3745
+ z !== "key" && (V[z] = q[z]);
3746
+ } else V = q;
3698
3747
  return ue && g(
3699
- Y,
3748
+ V,
3700
3749
  typeof E == "function" ? E.displayName || E.name || "Unknown" : E
3701
- ), A(
3750
+ ), S(
3702
3751
  E,
3703
3752
  ue,
3704
- Y,
3753
+ V,
3705
3754
  v(),
3706
3755
  xe,
3707
3756
  we
3708
3757
  );
3709
3758
  }
3710
3759
  function _(E) {
3711
- I(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === W && (E._payload.status === "fulfilled" ? I(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
3760
+ O(E) ? E._store && (E._store.validated = 1) : typeof E == "object" && E !== null && E.$$typeof === B && (E._payload.status === "fulfilled" ? O(E._payload.value) && E._payload.value._store && (E._payload.value._store.validated = 1) : E._store && (E._store.validated = 1));
3712
3761
  }
3713
- function I(E) {
3714
- return typeof E == "object" && E !== null && E.$$typeof === j;
3762
+ function O(E) {
3763
+ return typeof E == "object" && E !== null && E.$$typeof === W;
3715
3764
  }
3716
- var R = Qr, j = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), H = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), J = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, X = Array.isArray, oe = console.createTask ? console.createTask : function() {
3765
+ var I = Qr, W = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), H = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), oe = Symbol.for("react.forward_ref"), X = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), ne = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), Z = I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, K = Array.isArray, ie = console.createTask ? console.createTask : function() {
3717
3766
  return null;
3718
3767
  };
3719
- R = {
3768
+ I = {
3720
3769
  react_stack_bottom_frame: function(E) {
3721
3770
  return E();
3722
3771
  }
3723
3772
  };
3724
- var re, se = {}, pe = R.react_stack_bottom_frame.bind(
3725
- R,
3773
+ var re, se = {}, pe = I.react_stack_bottom_frame.bind(
3774
+ I,
3726
3775
  y
3727
- )(), fe = oe(u(y)), he = {};
3728
- Ke.Fragment = P, Ke.jsx = function(E, B, Y) {
3729
- var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3776
+ )(), fe = ie(u(y)), he = {};
3777
+ Ke.Fragment = P, Ke.jsx = function(E, q, V) {
3778
+ var J = 1e4 > Z.recentlyCreatedOwnerStacks++;
3730
3779
  return k(
3731
3780
  E,
3732
- B,
3733
- Y,
3781
+ q,
3782
+ V,
3734
3783
  !1,
3735
- G ? Error("react-stack-top-frame") : pe,
3736
- G ? oe(u(E)) : fe
3784
+ J ? Error("react-stack-top-frame") : pe,
3785
+ J ? ie(u(E)) : fe
3737
3786
  );
3738
- }, Ke.jsxs = function(E, B, Y) {
3739
- var G = 1e4 > J.recentlyCreatedOwnerStacks++;
3787
+ }, Ke.jsxs = function(E, q, V) {
3788
+ var J = 1e4 > Z.recentlyCreatedOwnerStacks++;
3740
3789
  return k(
3741
3790
  E,
3742
- B,
3743
- Y,
3791
+ q,
3792
+ V,
3744
3793
  !0,
3745
- G ? Error("react-stack-top-frame") : pe,
3746
- G ? oe(u(E)) : fe
3794
+ J ? Error("react-stack-top-frame") : pe,
3795
+ J ? ie(u(E)) : fe
3747
3796
  );
3748
3797
  };
3749
3798
  })()), Ke;
@@ -3758,25 +3807,25 @@ const ni = Zr(({ onChange: h, initialValue: m }, p) => {
3758
3807
  return Ht(() => {
3759
3808
  w.current = h;
3760
3809
  }, [h]), eo(p, () => ({
3761
- setHTML: (T) => {
3762
- u.current && u.current.setHTML(T);
3810
+ setHTML: (C) => {
3811
+ u.current && u.current.setHTML(C);
3763
3812
  },
3764
3813
  getHTML: () => u.current?.getHTML() || ""
3765
3814
  })), Ht(() => {
3766
3815
  if (v.current && !u.current) {
3767
3816
  u.current = new Ko(), v.current.appendChild(u.current.getElement()), m && (u.current.setHTML(m), y.current = m), g.current = !0;
3768
- const T = u.current.getElement(), A = T.querySelector(
3817
+ const C = u.current.getElement(), S = C.querySelector(
3769
3818
  ".editor"
3770
3819
  ), k = () => {
3771
3820
  const _ = u.current?.getHTML() || "";
3772
3821
  w.current?.(_);
3773
3822
  };
3774
- A ? (A.addEventListener("input", k), A.addEventListener("paste", k)) : (T.addEventListener("input", k), T.addEventListener("paste", k));
3823
+ S ? (S.addEventListener("input", k), S.addEventListener("paste", k)) : (C.addEventListener("input", k), C.addEventListener("paste", k));
3775
3824
  }
3776
3825
  }, []), Ht(() => {
3777
3826
  if (g.current && u.current && m !== void 0 && m !== y.current) {
3778
- const T = u.current.getHTML();
3779
- m !== T && (u.current.setHTML(m), y.current = m);
3827
+ const C = u.current.getHTML();
3828
+ m !== C && (u.current.setHTML(m), y.current = m);
3780
3829
  }
3781
3830
  }, [m]), /* @__PURE__ */ ei.jsx("div", { ref: v });
3782
3831
  });