nam-rich-text-editor 9.1.6 → 9.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -214,12 +214,12 @@ function Ln(h, v) {
214
214
  if (!p || p.rangeCount === 0) return;
215
215
  const d = p.getRangeAt(0);
216
216
  if (!d.collapsed) {
217
- const x = document.createElement("span");
218
- x.style[h] = v;
219
- const E = d.extractContents();
220
- x.appendChild(E), d.insertNode(x), p.removeAllRanges();
221
- const T = document.createRange();
222
- T.selectNodeContents(x), p.addRange(T), pe(T);
217
+ const E = document.createElement("span");
218
+ E.style[h] = v;
219
+ const x = d.extractContents();
220
+ E.appendChild(x), d.insertNode(E), p.removeAllRanges();
221
+ const S = document.createRange();
222
+ S.selectNodeContents(E), p.addRange(S), pe(S);
223
223
  return;
224
224
  }
225
225
  const g = document.createElement("span");
@@ -287,41 +287,31 @@ function Ro() {
287
287
  d.appendChild(g), d.title = p.title, d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.padding = "6px 10px", d.style.borderRadius = "3px", d.style.cursor = "pointer", d.style.color = "#000000", d.onmouseover = () => d.style.backgroundColor = "#f0f0f0", d.onmouseout = () => d.style.backgroundColor = "#ffffff", d.onclick = () => {
288
288
  const m = window.getSelection();
289
289
  if (m && m.rangeCount > 0) {
290
- let E = m.anchorNode;
291
- for (; E && E.nodeType !== Node.ELEMENT_NODE; )
292
- E = E.parentNode;
293
- let T = E, M = null;
294
- for (; T && T !== document.body; ) {
295
- if (T.tagName === "P" && T.querySelector(".editor-image-wrapper")) {
296
- M = T;
290
+ let x = m.anchorNode;
291
+ for (; x && x.nodeType !== Node.ELEMENT_NODE; )
292
+ x = x.parentNode;
293
+ let S = x, _ = null;
294
+ for (; S && S !== document.body && !S.classList.contains("editor"); ) {
295
+ if ((S.tagName === "DIV" || S.tagName === "P") && S.querySelector(".editor-image-wrapper")) {
296
+ _ = S;
297
297
  break;
298
298
  }
299
- if (T.tagName === "P") {
300
- M = T;
299
+ if (S.tagName === "P") {
300
+ _ = S;
301
301
  break;
302
302
  }
303
- T = T.parentElement;
303
+ S = S.parentElement;
304
304
  }
305
- if (!M) {
306
- let _ = T;
307
- for (; _ && _ !== document.body; ) {
308
- if (_.tagName === "DIV" && _.querySelector(".editor-image-wrapper")) {
309
- M = _;
310
- break;
311
- }
312
- _ = _.parentElement;
313
- }
314
- }
315
- if (M) {
316
- M.style.textAlign = p.align;
317
- const _ = document.querySelector(".editor");
318
- _ && _.dispatchEvent(new Event("input", { bubbles: !0 }));
305
+ if (_) {
306
+ _.style.textAlign = p.align;
307
+ const A = document.querySelector(".editor");
308
+ A && A.dispatchEvent(new Event("input", { bubbles: !0 }));
319
309
  return;
320
310
  }
321
311
  }
322
312
  document.execCommand(p.command);
323
- const x = document.querySelector(".editor");
324
- x && x.dispatchEvent(new Event("input", { bubbles: !0 }));
313
+ const E = document.querySelector(".editor");
314
+ E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
325
315
  }, h.appendChild(d);
326
316
  }), h;
327
317
  }
@@ -339,7 +329,7 @@ function Ao() {
339
329
  d.appendChild(g), d.title = p.title, d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.padding = "6px 10px", d.style.borderRadius = "3px", d.style.cursor = "pointer", d.style.color = "#000000", d.onmouseover = () => d.style.backgroundColor = "#f0f0f0", d.onmouseout = () => d.style.backgroundColor = "#ffffff", d.onclick = () => document.execCommand(p.command), h.appendChild(d);
340
330
  }), h;
341
331
  }
342
- function Io() {
332
+ function Po() {
343
333
  const h = document.createDocumentFragment();
344
334
  return [
345
335
  { command: "indent", icon: lo, title: "Increase Indent" },
@@ -353,7 +343,7 @@ function Io() {
353
343
  d.appendChild(g), d.title = p.title, d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.padding = "6px 10px", d.style.borderRadius = "3px", d.style.cursor = "pointer", d.style.color = "#000000", d.onmouseover = () => d.style.backgroundColor = "#f0f0f0", d.onmouseout = () => d.style.backgroundColor = "#ffffff", d.onclick = () => document.execCommand(p.command), h.appendChild(d);
354
344
  }), h;
355
345
  }
356
- function Oo() {
346
+ function Io() {
357
347
  const h = document.createDocumentFragment();
358
348
  return [
359
349
  { command: "undo", icon: ko, title: "Undo" },
@@ -367,7 +357,7 @@ function Oo() {
367
357
  d.appendChild(g), d.title = p.title, d.style.border = "1px solid #e1e1e1", d.style.backgroundColor = "#ffffff", d.style.padding = "6px 10px", d.style.borderRadius = "3px", d.style.cursor = "pointer", d.style.color = "#000000", d.onmouseover = () => d.style.backgroundColor = "#f0f0f0", d.onmouseout = () => d.style.backgroundColor = "#ffffff", d.onclick = () => document.execCommand(p.command), h.appendChild(d);
368
358
  }), h;
369
359
  }
370
- function Po() {
360
+ function Oo() {
371
361
  const h = document.createElement("div");
372
362
  h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (p) => {
373
363
  (p.key === "Enter" || p.key === " ") && (p.preventDefault(), h.click());
@@ -377,8 +367,8 @@ function Po() {
377
367
  }
378
368
  function Do() {
379
369
  const h = document.createElement("div");
380
- h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (x) => {
381
- (x.key === "Enter" || x.key === " ") && (x.preventDefault(), h.click());
370
+ h.setAttribute("role", "button"), h.tabIndex = 0, h.style.userSelect = "none", h.addEventListener("keydown", (E) => {
371
+ (E.key === "Enter" || E.key === " ") && (E.preventDefault(), h.click());
382
372
  });
383
373
  const v = ye(po, {
384
374
  width: 16,
@@ -390,25 +380,25 @@ function Do() {
390
380
  h.appendChild(v), h.title = "Toggle Fullscreen", h.style.border = "1px solid #e1e1e1", h.style.backgroundColor = "#ffffff", h.style.padding = "6px 10px", h.style.borderRadius = "3px", h.style.cursor = "pointer", h.style.color = "#000000", h.onmouseover = () => h.style.backgroundColor = "#f0f0f0", h.onmouseout = () => h.style.backgroundColor = "#ffffff";
391
381
  let d = !1, g = "", m = "";
392
382
  return h.onclick = () => {
393
- const x = document.querySelector(
383
+ const E = document.querySelector(
394
384
  ".editor-container"
395
385
  );
396
- if (!x) return;
397
- const E = x.querySelector(".editor");
386
+ if (!E) return;
387
+ const x = E.querySelector(".editor");
398
388
  if (d)
399
- g ? x.setAttribute("style", g) : x.removeAttribute("style"), E && (m ? E.setAttribute("style", m) : E.removeAttribute("style")), h.replaceChild(v, p), d = !1;
389
+ g ? E.setAttribute("style", g) : E.removeAttribute("style"), x && (m ? x.setAttribute("style", m) : x.removeAttribute("style")), h.replaceChild(v, p), d = !1;
400
390
  else {
401
- g = x.getAttribute("style") || "", m = E && E.getAttribute("style") || "", x.style.position = "fixed", x.style.top = "0", x.style.left = "0", x.style.width = "100vw", x.style.height = "100vh", x.style.margin = "0", x.style.padding = "0";
391
+ g = E.getAttribute("style") || "", m = x && x.getAttribute("style") || "", E.style.position = "fixed", E.style.top = "0", E.style.left = "0", E.style.width = "100vw", E.style.height = "100vh", E.style.margin = "0", E.style.padding = "0";
402
392
  try {
403
- let T = 9998;
404
- document.querySelectorAll("body *").forEach((M) => {
405
- const _ = window.getComputedStyle(M).getPropertyValue("z-index"), D = parseInt(_, 10);
406
- !isNaN(D) && D > 0 && (T = Math.max(T, D));
407
- }), x.style.zIndex = String(Math.max(T + 1, 9999));
393
+ let S = 9998;
394
+ document.querySelectorAll("body *").forEach((_) => {
395
+ const A = window.getComputedStyle(_).getPropertyValue("z-index"), j = parseInt(A, 10);
396
+ !isNaN(j) && j > 0 && (S = Math.max(S, j));
397
+ }), E.style.zIndex = String(Math.max(S + 1, 9999));
408
398
  } catch {
409
- x.style.zIndex = "9999";
399
+ E.style.zIndex = "9999";
410
400
  }
411
- x.style.backgroundColor = "#ffffff", x.style.display = "flex", x.style.flexDirection = "column", x.style.boxSizing = "border-box", E && (E.style.flexGrow = "1", E.style.overflowY = "auto", E.style.border = "none", E.style.borderRadius = "0", E.style.boxShadow = "none", E.style.height = "auto", E.style.padding = "20px", E.style.boxSizing = "border-box"), h.replaceChild(p, v), d = !0;
401
+ E.style.backgroundColor = "#ffffff", E.style.display = "flex", E.style.flexDirection = "column", E.style.boxSizing = "border-box", x && (x.style.flex = "1 1 0", x.style.overflowY = "auto", x.style.border = "none", x.style.borderRadius = "0", x.style.boxShadow = "none", x.style.height = "", x.style.minHeight = "0", x.style.maxHeight = "none", x.style.padding = "20px", x.style.boxSizing = "border-box"), h.replaceChild(p, v), d = !0;
412
402
  }
413
403
  }, h;
414
404
  }
@@ -421,84 +411,84 @@ function No(h) {
421
411
  g.textContent = "Insert Hyperlink", g.style.margin = "0 0 15px 0", g.style.fontSize = "18px", g.style.fontWeight = "bold";
422
412
  const m = document.createElement("input");
423
413
  m.type = "url", m.placeholder = "Enter URL (e.g., https://example.com)", m.style.width = "100%", m.style.padding = "8px", m.style.border = "1px solid #ccc", m.style.borderRadius = "4px", m.style.marginBottom = "15px", m.style.boxSizing = "border-box";
424
- const x = document.createElement("div");
425
- x.style.display = "flex", x.style.gap = "10px", x.style.justifyContent = "flex-end";
426
414
  const E = document.createElement("div");
427
- E.setAttribute("role", "button"), E.tabIndex = 0, E.style.userSelect = "none", E.textContent = "Cancel", E.style.padding = "8px 16px", E.style.border = "1px solid #ccc", E.style.borderRadius = "4px", E.style.backgroundColor = "#f5f5f5", E.style.cursor = "pointer", E.addEventListener("keydown", (P) => {
428
- (P.key === "Enter" || P.key === " " || P.key === "Escape") && (P.preventDefault(), E.click());
429
- }), E.onclick = () => {
430
- p.style.display = "none", m.value = "", T = null;
415
+ E.style.display = "flex", E.style.gap = "10px", E.style.justifyContent = "flex-end";
416
+ const x = document.createElement("div");
417
+ x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.textContent = "Cancel", x.style.padding = "8px 16px", x.style.border = "1px solid #ccc", x.style.borderRadius = "4px", x.style.backgroundColor = "#f5f5f5", x.style.cursor = "pointer", x.addEventListener("keydown", (P) => {
418
+ (P.key === "Enter" || P.key === " " || P.key === "Escape") && (P.preventDefault(), x.click());
419
+ }), x.onclick = () => {
420
+ p.style.display = "none", m.value = "", S = null;
431
421
  };
432
- let T = null;
433
- const M = document.createElement("div");
434
- M.setAttribute("role", "button"), M.tabIndex = 0, M.style.userSelect = "none", M.textContent = "Insert", M.style.padding = "8px 16px", M.style.border = "none", M.style.borderRadius = "4px", M.style.backgroundColor = "#007bff", M.style.color = "#fff", M.style.cursor = "pointer", M.addEventListener("keydown", (P) => {
435
- (P.key === "Enter" || P.key === " ") && (P.preventDefault(), M.click());
436
- }), M.onclick = () => {
422
+ let S = null;
423
+ const _ = document.createElement("div");
424
+ _.setAttribute("role", "button"), _.tabIndex = 0, _.style.userSelect = "none", _.textContent = "Insert", _.style.padding = "8px 16px", _.style.border = "none", _.style.borderRadius = "4px", _.style.backgroundColor = "#007bff", _.style.color = "#fff", _.style.cursor = "pointer", _.addEventListener("keydown", (P) => {
425
+ (P.key === "Enter" || P.key === " ") && (P.preventDefault(), _.click());
426
+ }), _.onclick = () => {
437
427
  const P = m.value.trim();
438
428
  if (P)
439
- if (T)
440
- T.setAttribute("href", P), T.setAttribute("target", "_blank"), T.setAttribute("rel", "noopener noreferrer"), T.setAttribute("tabindex", "0");
429
+ if (S)
430
+ S.setAttribute("href", P), S.setAttribute("target", "_blank"), S.setAttribute("rel", "noopener noreferrer"), S.setAttribute("tabindex", "0");
441
431
  else {
442
432
  Ne(), document.execCommand("createLink", !1, P);
443
- const te = window.getSelection();
444
- if (te && te.rangeCount > 0) {
445
- let K = te.getRangeAt(0).startContainer;
446
- for (; K && K.nodeType !== Node.ELEMENT_NODE; )
447
- K = K.parentNode;
448
- let G = K;
449
- for (; G && G !== document.body; ) {
450
- if (G.tagName === "A") {
451
- const oe = G;
452
- oe.setAttribute("target", "_blank"), oe.setAttribute("rel", "noopener noreferrer"), oe.setAttribute("tabindex", "0");
433
+ const q = window.getSelection();
434
+ if (q && q.rangeCount > 0) {
435
+ let H = q.getRangeAt(0).startContainer;
436
+ for (; H && H.nodeType !== Node.ELEMENT_NODE; )
437
+ H = H.parentNode;
438
+ let U = H;
439
+ for (; U && U !== document.body; ) {
440
+ if (U.tagName === "A") {
441
+ const Q = U;
442
+ Q.setAttribute("target", "_blank"), Q.setAttribute("rel", "noopener noreferrer"), Q.setAttribute("tabindex", "0");
453
443
  break;
454
444
  }
455
- G = G.parentElement;
445
+ U = U.parentElement;
456
446
  }
457
447
  }
458
448
  }
459
- p.style.display = "none", m.value = "", T = null;
460
- }, x.appendChild(E), x.appendChild(M), d.appendChild(g), d.appendChild(m), d.appendChild(x), p.appendChild(d), document.body.appendChild(p), m.onkeydown = (P) => {
461
- P.key === "Enter" ? M.click() : P.key === "Escape" && E.click();
449
+ p.style.display = "none", m.value = "", S = null;
450
+ }, E.appendChild(x), E.appendChild(_), d.appendChild(g), d.appendChild(m), d.appendChild(E), p.appendChild(d), document.body.appendChild(p), m.onkeydown = (P) => {
451
+ P.key === "Enter" ? _.click() : P.key === "Escape" && x.click();
462
452
  };
463
- const _ = document.createElement("div");
464
- _.setAttribute("role", "button"), _.tabIndex = 0, _.style.userSelect = "none";
465
- const D = ye(ao, { width: 16, height: 16 });
466
- _.appendChild(D), _.title = "Insert Hyperlink", _.style.border = "1px solid #e1e1e1", _.style.backgroundColor = "#ffffff", _.style.padding = "6px 10px", _.style.borderRadius = "3px", _.style.cursor = "pointer", _.style.color = "#000000", _.onmouseover = () => _.style.backgroundColor = "#f0f0f0", _.onmouseout = () => _.style.backgroundColor = "#ffffff", _.onmousedown = () => {
467
- T = null;
453
+ const A = document.createElement("div");
454
+ A.setAttribute("role", "button"), A.tabIndex = 0, A.style.userSelect = "none";
455
+ const j = ye(ao, { width: 16, height: 16 });
456
+ A.appendChild(j), A.title = "Insert Hyperlink", A.style.border = "1px solid #e1e1e1", A.style.backgroundColor = "#ffffff", A.style.padding = "6px 10px", A.style.borderRadius = "3px", A.style.cursor = "pointer", A.style.color = "#000000", A.onmouseover = () => A.style.backgroundColor = "#f0f0f0", A.onmouseout = () => A.style.backgroundColor = "#ffffff", A.onmousedown = () => {
457
+ S = null;
468
458
  const P = window.getSelection();
469
459
  if (P && P.rangeCount > 0) {
470
- let K = P.getRangeAt(0).startContainer;
471
- for (; K && K.nodeType !== Node.ELEMENT_NODE; )
472
- K = K.parentNode;
473
- let G = K;
474
- for (; G && G !== document.body; ) {
475
- if (G.tagName === "A") {
476
- T = G, m.value = T.getAttribute("href") || "";
460
+ let H = P.getRangeAt(0).startContainer;
461
+ for (; H && H.nodeType !== Node.ELEMENT_NODE; )
462
+ H = H.parentNode;
463
+ let U = H;
464
+ for (; U && U !== document.body; ) {
465
+ if (U.tagName === "A") {
466
+ S = U, m.value = S.getAttribute("href") || "";
477
467
  break;
478
468
  }
479
- G = G.parentElement;
469
+ U = U.parentElement;
480
470
  }
481
471
  }
482
472
  pe();
483
- }, _.addEventListener("keydown", (P) => {
484
- (P.key === "Enter" || P.key === " ") && (P.preventDefault(), _.click());
485
- }), _.onclick = () => {
473
+ }, A.addEventListener("keydown", (P) => {
474
+ (P.key === "Enter" || P.key === " ") && (P.preventDefault(), A.click());
475
+ }), A.onclick = () => {
486
476
  p.style.display = "flex", m.focus();
487
- }, v.appendChild(_);
488
- const B = h.querySelector(".editor");
489
- return B && B.addEventListener("click", (P) => {
490
- const te = P.target;
491
- if (te.tagName === "A") {
477
+ }, v.appendChild(A);
478
+ const G = h.querySelector(".editor");
479
+ return G && G.addEventListener("click", (P) => {
480
+ const q = P.target;
481
+ if (q.tagName === "A") {
492
482
  P.preventDefault();
493
- const K = te.getAttribute("href");
494
- K && window.open(K, "_blank");
483
+ const H = q.getAttribute("href");
484
+ H && window.open(H, "_blank");
495
485
  }
496
486
  }), v;
497
487
  }
498
488
  function zo() {
499
489
  const h = document.createDocumentFragment(), v = document.createElement("div");
500
- v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (J) => {
501
- (J.key === "Enter" || J.key === " ") && (J.preventDefault(), v.click());
490
+ v.setAttribute("role", "button"), v.tabIndex = 0, v.style.userSelect = "none", v.addEventListener("keydown", (Z) => {
491
+ (Z.key === "Enter" || Z.key === " ") && (Z.preventDefault(), v.click());
502
492
  });
503
493
  const p = ye(ho, { width: 16, height: 16 });
504
494
  v.appendChild(p), v.title = "Insert Quote", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff";
@@ -508,69 +498,69 @@ function zo() {
508
498
  g.className = "rte-modal";
509
499
  const m = document.createElement("div");
510
500
  m.className = "rte-modal-header";
511
- const x = document.createElement("h3");
512
- x.textContent = "Insert Quote", x.className = "rte-modal-title";
513
- const E = document.createElement("div");
514
- E.setAttribute("role", "button"), E.tabIndex = 0, E.style.userSelect = "none", E.className = "rte-modal-close", E.innerHTML = "×", E.onclick = () => {
515
- d.style.display = "none", ee = null;
516
- }, m.appendChild(x), m.appendChild(E);
517
- const T = document.createElement("div");
518
- T.className = "rte-modal-form";
519
- const M = document.createElement("label");
520
- M.textContent = "Title", M.className = "rte-label";
521
- const _ = document.createElement("input");
522
- _.type = "text", _.placeholder = "e.g., Article title or source", _.className = "rte-input";
523
- const D = document.createElement("label");
524
- D.textContent = "Source URL", D.className = "rte-label";
525
- const B = document.createElement("input");
526
- B.type = "url", B.placeholder = "https://example.com", B.className = "rte-input";
501
+ const E = document.createElement("h3");
502
+ E.textContent = "Insert Quote", E.className = "rte-modal-title";
503
+ const x = document.createElement("div");
504
+ x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-modal-close", x.innerHTML = "×", x.onclick = () => {
505
+ d.style.display = "none", ne = null;
506
+ }, m.appendChild(E), m.appendChild(x);
507
+ const S = document.createElement("div");
508
+ S.className = "rte-modal-form";
509
+ const _ = document.createElement("label");
510
+ _.textContent = "Title", _.className = "rte-label";
511
+ const A = document.createElement("input");
512
+ A.type = "text", A.placeholder = "e.g., Article title or source", A.className = "rte-input";
513
+ const j = document.createElement("label");
514
+ j.textContent = "Source URL", j.className = "rte-label";
515
+ const G = document.createElement("input");
516
+ G.type = "url", G.placeholder = "https://example.com", G.className = "rte-input";
527
517
  const P = document.createElement("div");
528
518
  P.className = "rte-preview-label", P.textContent = "Preview";
529
- const te = document.createElement("div");
530
- te.className = "rte-modal-preview";
531
- const K = document.createElement("div");
532
- K.className = "rte-blockquote-title";
533
- const G = document.createElement("div");
534
- G.className = "rte-blockquote-content";
535
- const oe = document.createElement("div");
536
- oe.className = "rte-blockquote-footer", te.appendChild(K), te.appendChild(G), te.appendChild(oe), T.appendChild(M), T.appendChild(_), T.appendChild(D), T.appendChild(B), T.appendChild(P), T.appendChild(te);
537
- const X = document.createElement("div");
538
- X.className = "rte-modal-actions";
539
- const ne = document.createElement("div");
540
- ne.setAttribute("role", "button"), ne.tabIndex = 0, ne.style.userSelect = "none", ne.className = "rte-btn-danger", ne.textContent = "Remove", ne.style.display = "none", ne.onclick = () => {
541
- ee && (ee.remove(), ee = null), d.style.display = "none";
519
+ const q = document.createElement("div");
520
+ q.className = "rte-modal-preview";
521
+ const H = document.createElement("div");
522
+ H.className = "rte-blockquote-title";
523
+ const U = document.createElement("div");
524
+ U.className = "rte-blockquote-content";
525
+ const Q = document.createElement("div");
526
+ Q.className = "rte-blockquote-footer", q.appendChild(H), q.appendChild(U), q.appendChild(Q), S.appendChild(_), S.appendChild(A), S.appendChild(j), S.appendChild(G), S.appendChild(P), S.appendChild(q);
527
+ const J = document.createElement("div");
528
+ J.className = "rte-modal-actions";
529
+ const re = document.createElement("div");
530
+ re.setAttribute("role", "button"), re.tabIndex = 0, re.style.userSelect = "none", re.className = "rte-btn-danger", re.textContent = "Remove", re.style.display = "none", re.onclick = () => {
531
+ ne && (ne.remove(), ne = null), d.style.display = "none";
542
532
  };
543
- const Z = document.createElement("div");
544
- Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-muted", Z.textContent = "Cancel", Z.onclick = () => {
545
- d.style.display = "none", ee = null;
533
+ const te = document.createElement("div");
534
+ te.setAttribute("role", "button"), te.tabIndex = 0, te.style.userSelect = "none", te.className = "rte-btn-muted", te.textContent = "Cancel", te.onclick = () => {
535
+ d.style.display = "none", ne = null;
546
536
  };
547
537
  const ie = document.createElement("div");
548
538
  ie.setAttribute("role", "button"), ie.tabIndex = 0, ie.style.userSelect = "none", ie.className = "rte-btn-primary", ie.textContent = "Apply", ie.onclick = () => {
549
- const J = _.value.trim();
550
- let L = B.value.trim();
551
- if (L && !/^https?:\/\//i.test(L) && (L = `https://${L}`), ee) {
552
- const le = ee.querySelector(
539
+ const Z = A.value.trim();
540
+ let z = G.value.trim();
541
+ if (z && !/^https?:\/\//i.test(z) && (z = `https://${z}`), ne) {
542
+ const le = ne.querySelector(
553
543
  ".rte-blockquote-title"
554
544
  );
555
- if (J)
556
- if (le) le.textContent = J;
545
+ if (Z)
546
+ if (le) le.textContent = Z;
557
547
  else {
558
- const Y = document.createElement("div");
559
- Y.className = "rte-blockquote-title", Y.textContent = J, ee.insertBefore(Y, ee.firstChild);
548
+ const $ = document.createElement("div");
549
+ $.className = "rte-blockquote-title", $.textContent = Z, ne.insertBefore($, ne.firstChild);
560
550
  }
561
551
  else le && le.remove();
562
- const ce = ee.querySelector(
552
+ const ce = ne.querySelector(
563
553
  ".rte-blockquote-footer"
564
554
  );
565
- if (L)
555
+ if (z)
566
556
  if (ce) {
567
- const Y = ce.querySelector("a");
568
- Y.href = L, Y.textContent = L;
557
+ const $ = ce.querySelector("a");
558
+ $.href = z, $.textContent = z;
569
559
  } else {
570
- const Y = document.createElement("footer");
571
- Y.className = "rte-blockquote-footer";
572
- const $ = document.createElement("cite"), q = document.createElement("a");
573
- q.href = L, q.textContent = L, q.target = "_blank", q.rel = "noopener noreferrer", $.appendChild(q), Y.appendChild($), ee.appendChild(Y);
560
+ const $ = document.createElement("footer");
561
+ $.className = "rte-blockquote-footer";
562
+ const X = document.createElement("cite"), W = document.createElement("a");
563
+ W.href = z, W.textContent = z, W.target = "_blank", W.rel = "noopener noreferrer", X.appendChild(W), $.appendChild(X), ne.appendChild($);
574
564
  }
575
565
  else ce && ce.remove();
576
566
  } else {
@@ -580,61 +570,61 @@ function zo() {
580
570
  d.style.display = "none";
581
571
  return;
582
572
  }
583
- const ce = le.getRangeAt(0), Y = ce.extractContents(), $ = document.createElement("blockquote");
584
- if ($.className = "rte-blockquote", J) {
585
- const Q = document.createElement("div");
586
- Q.className = "rte-blockquote-title", Q.textContent = J, $.appendChild(Q);
573
+ const ce = le.getRangeAt(0), $ = ce.extractContents(), X = document.createElement("blockquote");
574
+ if (X.className = "rte-blockquote", Z) {
575
+ const ee = document.createElement("div");
576
+ ee.className = "rte-blockquote-title", ee.textContent = Z, X.appendChild(ee);
587
577
  }
588
- const q = document.createElement("p");
589
- if (q.appendChild(Y), $.appendChild(q), L) {
590
- const Q = document.createElement("footer");
591
- Q.className = "rte-blockquote-footer";
578
+ const W = document.createElement("p");
579
+ if (W.appendChild($), X.appendChild(W), z) {
580
+ const ee = document.createElement("footer");
581
+ ee.className = "rte-blockquote-footer";
592
582
  const se = document.createElement("cite"), de = document.createElement("a");
593
- de.href = L, de.textContent = L, de.target = "_blank", de.rel = "noopener noreferrer", se.appendChild(de), Q.appendChild(se), $.appendChild(Q);
583
+ de.href = z, de.textContent = z, de.target = "_blank", de.rel = "noopener noreferrer", se.appendChild(de), ee.appendChild(se), X.appendChild(ee);
594
584
  }
595
- ce.insertNode($), le.removeAllRanges();
596
- const re = document.createRange();
597
- re.setStartAfter($), re.collapse(!0), le.addRange(re), pe(re);
585
+ ce.insertNode(X), le.removeAllRanges();
586
+ const oe = document.createRange();
587
+ oe.setStartAfter(X), oe.collapse(!0), le.addRange(oe), pe(oe);
598
588
  }
599
- d.style.display = "none", _.value = "", B.value = "", ee = null;
600
- }, X.appendChild(ne), X.appendChild(Z), X.appendChild(ie), g.appendChild(m), g.appendChild(T), g.appendChild(X), d.appendChild(g), document.body.appendChild(d);
601
- let ee = null, b = "";
589
+ d.style.display = "none", A.value = "", G.value = "", ne = null;
590
+ }, J.appendChild(re), J.appendChild(te), J.appendChild(ie), g.appendChild(m), g.appendChild(S), g.appendChild(J), d.appendChild(g), document.body.appendChild(d);
591
+ let ne = null, b = "";
602
592
  return v.onmousedown = () => {
603
- ee = null, b = "";
604
- const J = window.getSelection();
605
- if (J && J.rangeCount > 0) {
606
- const L = J.getRangeAt(0), le = document.createElement("div");
607
- le.appendChild(L.cloneContents()), b = le.innerHTML || L.toString();
608
- let ce = L.startContainer;
593
+ ne = null, b = "";
594
+ const Z = window.getSelection();
595
+ if (Z && Z.rangeCount > 0) {
596
+ const z = Z.getRangeAt(0), le = document.createElement("div");
597
+ le.appendChild(z.cloneContents()), b = le.innerHTML || z.toString();
598
+ let ce = z.startContainer;
609
599
  for (; ce && ce.nodeType !== Node.ELEMENT_NODE; )
610
600
  ce = ce.parentNode;
611
- let Y = ce;
612
- for (; Y && Y !== document.body; ) {
613
- if (Y.tagName === "BLOCKQUOTE") {
614
- ee = Y;
615
- const $ = ee.querySelector(
601
+ let $ = ce;
602
+ for (; $ && $ !== document.body; ) {
603
+ if ($.tagName === "BLOCKQUOTE") {
604
+ ne = $;
605
+ const X = ne.querySelector(
616
606
  ".rte-blockquote-title"
617
- ), q = ee.querySelector(
607
+ ), W = ne.querySelector(
618
608
  ".rte-blockquote-footer a"
619
609
  );
620
- _.value = $ && $.textContent || "", B.value = q && q.href || "", ne.style.display = "inline-block";
621
- const re = ee.querySelector("p");
622
- G.innerHTML = re ? re.innerHTML : ee.innerHTML, K.textContent = $ && $.textContent || "", oe.innerHTML = q ? `<a href="${q.href}">${q.href}</a>` : "";
610
+ A.value = X && X.textContent || "", G.value = W && W.href || "", re.style.display = "inline-block";
611
+ const oe = ne.querySelector("p");
612
+ U.innerHTML = oe ? oe.innerHTML : ne.innerHTML, H.textContent = X && X.textContent || "", Q.innerHTML = W ? `<a href="${W.href}">${W.href}</a>` : "";
623
613
  break;
624
614
  }
625
- Y = Y.parentElement;
615
+ $ = $.parentElement;
626
616
  }
627
617
  }
628
- ee || (G.innerHTML = b || "<em>Selected text will appear here</em>", K.textContent = "", oe.innerHTML = "", ne.style.display = "none"), pe();
629
- }, _.oninput = () => K.textContent = _.value, B.oninput = () => {
630
- const J = B.value.trim();
631
- if (!J) oe.innerHTML = "";
618
+ ne || (U.innerHTML = b || "<em>Selected text will appear here</em>", H.textContent = "", Q.innerHTML = "", re.style.display = "none"), pe();
619
+ }, A.oninput = () => H.textContent = A.value, G.oninput = () => {
620
+ const Z = G.value.trim();
621
+ if (!Z) Q.innerHTML = "";
632
622
  else {
633
- const L = /^https?:\/\//i.test(J) ? J : `https://${J}`;
634
- oe.innerHTML = `<a href="${L}" target="_blank" rel="noopener noreferrer">${L}</a>`;
623
+ const z = /^https?:\/\//i.test(Z) ? Z : `https://${Z}`;
624
+ Q.innerHTML = `<a href="${z}" target="_blank" rel="noopener noreferrer">${z}</a>`;
635
625
  }
636
626
  }, v.onclick = () => {
637
- d.style.display = "flex", _.focus();
627
+ d.style.display = "flex", A.focus();
638
628
  }, h.appendChild(v), h;
639
629
  }
640
630
  function Lo() {
@@ -645,7 +635,7 @@ function Lo() {
645
635
  const p = ye(mo, { width: 16, height: 16 });
646
636
  return v.appendChild(p), v.title = "Remove Formatting", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.padding = "6px 10px", v.style.borderRadius = "3px", v.style.cursor = "pointer", v.style.color = "#000000", v.onmouseover = () => v.style.backgroundColor = "#f0f0f0", v.onmouseout = () => v.style.backgroundColor = "#ffffff", v.onclick = () => document.execCommand("removeFormat"), h.appendChild(v), h;
647
637
  }
648
- function jo(h) {
638
+ function Fo(h) {
649
639
  const v = document.createDocumentFragment(), p = document.createElement("div");
650
640
  p.className = "rte-modal-overlay", p.style.display = "none";
651
641
  const d = document.createElement("div");
@@ -654,70 +644,70 @@ function jo(h) {
654
644
  g.className = "rte-modal-header";
655
645
  const m = document.createElement("h3");
656
646
  m.className = "rte-modal-title", m.textContent = "Insert Video";
657
- const x = document.createElement("div");
658
- x.setAttribute("role", "button"), x.tabIndex = 0, x.style.userSelect = "none", x.className = "rte-modal-close", x.innerHTML = "&times;", x.onclick = () => p.style.display = "none", g.appendChild(m), g.appendChild(x);
659
647
  const E = document.createElement("div");
660
- E.className = "rte-modal-form";
661
- const T = document.createElement("label");
662
- T.className = "rte-label", T.textContent = "Video URL";
663
- const M = document.createElement("input");
664
- M.type = "url", M.className = "rte-input", M.placeholder = "https://... or YouTube URL";
665
- const _ = document.createElement("div");
666
- _.className = "rte-preview-label", _.textContent = "Preview";
667
- const D = document.createElement("div");
668
- D.className = "rte-modal-preview";
669
- const B = document.createElement("div");
670
- B.className = "rte-form-left";
648
+ E.setAttribute("role", "button"), E.tabIndex = 0, E.style.userSelect = "none", E.className = "rte-modal-close", E.innerHTML = "&times;", E.onclick = () => p.style.display = "none", g.appendChild(m), g.appendChild(E);
649
+ const x = document.createElement("div");
650
+ x.className = "rte-modal-form";
651
+ const S = document.createElement("label");
652
+ S.className = "rte-label", S.textContent = "Video URL";
653
+ const _ = document.createElement("input");
654
+ _.type = "url", _.className = "rte-input", _.placeholder = "https://... or YouTube URL";
655
+ const A = document.createElement("div");
656
+ A.className = "rte-preview-label", A.textContent = "Preview";
657
+ const j = document.createElement("div");
658
+ j.className = "rte-modal-preview";
659
+ const G = document.createElement("div");
660
+ G.className = "rte-form-left";
671
661
  const P = document.createElement("div");
672
662
  P.className = "rte-form-right";
673
- const te = document.createElement("div");
674
- te.className = "rte-field", te.appendChild(T), te.appendChild(M);
675
- const K = document.createElement("div");
676
- K.className = "rte-dim-row";
677
- const G = document.createElement("div");
678
- G.style.display = "flex", G.style.flexDirection = "column";
679
- const oe = document.createElement("label");
680
- oe.className = "rte-label", oe.textContent = "Width (px)";
681
- const X = document.createElement("input");
682
- X.type = "text", X.className = "rte-dim-input", X.placeholder = "e.g., 560", G.appendChild(oe), G.appendChild(X);
683
- const ne = document.createElement("div");
684
- ne.style.display = "flex", ne.style.flexDirection = "column";
685
- const Z = document.createElement("label");
686
- Z.className = "rte-label", Z.textContent = "Height (px)";
663
+ const q = document.createElement("div");
664
+ q.className = "rte-field", q.appendChild(S), q.appendChild(_);
665
+ const H = document.createElement("div");
666
+ H.className = "rte-dim-row";
667
+ const U = document.createElement("div");
668
+ U.style.display = "flex", U.style.flexDirection = "column";
669
+ const Q = document.createElement("label");
670
+ Q.className = "rte-label", Q.textContent = "Width (px)";
671
+ const J = document.createElement("input");
672
+ J.type = "text", J.className = "rte-dim-input", J.placeholder = "e.g., 560", U.appendChild(Q), U.appendChild(J);
673
+ const re = document.createElement("div");
674
+ re.style.display = "flex", re.style.flexDirection = "column";
675
+ const te = document.createElement("label");
676
+ te.className = "rte-label", te.textContent = "Height (px)";
687
677
  const ie = document.createElement("input");
688
- ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", ne.appendChild(Z), ne.appendChild(ie), K.appendChild(G), K.appendChild(ne), B.appendChild(te), B.appendChild(K), P.appendChild(_), P.appendChild(D), E.appendChild(B), E.appendChild(P);
689
- const ee = document.createElement("div");
690
- ee.className = "rte-modal-actions";
678
+ ie.type = "text", ie.className = "rte-dim-input", ie.placeholder = "e.g., 315", re.appendChild(te), re.appendChild(ie), H.appendChild(U), H.appendChild(re), G.appendChild(q), G.appendChild(H), P.appendChild(A), P.appendChild(j), x.appendChild(G), x.appendChild(P);
679
+ const ne = document.createElement("div");
680
+ ne.className = "rte-modal-actions";
691
681
  const b = document.createElement("div");
692
682
  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";
693
- const J = document.createElement("div");
694
- J.setAttribute("role", "button"), J.tabIndex = 0, J.style.userSelect = "none", J.className = "rte-btn-primary", J.textContent = "Insert", ee.appendChild(b), ee.appendChild(J), d.appendChild(g), d.appendChild(E), d.appendChild(ee), p.appendChild(d), document.body.appendChild(p);
695
- const L = document.createElement("div");
696
- L.setAttribute("role", "button"), L.tabIndex = 0, L.style.userSelect = "none";
683
+ const Z = document.createElement("div");
684
+ Z.setAttribute("role", "button"), Z.tabIndex = 0, Z.style.userSelect = "none", Z.className = "rte-btn-primary", Z.textContent = "Insert", ne.appendChild(b), ne.appendChild(Z), d.appendChild(g), d.appendChild(x), d.appendChild(ne), p.appendChild(d), document.body.appendChild(p);
685
+ const z = document.createElement("div");
686
+ z.setAttribute("role", "button"), z.tabIndex = 0, z.style.userSelect = "none";
697
687
  const le = ye(Co, { width: 16, height: 16 });
698
- L.appendChild(le), L.title = "Insert Video", L.style.border = "1px solid #e1e1e1", L.style.backgroundColor = "#ffffff", L.style.padding = "6px 10px", L.style.borderRadius = "3px", L.style.cursor = "pointer", L.style.color = "#000000", L.onmouseover = () => L.style.backgroundColor = "#f0f0f0", L.onmouseout = () => L.style.backgroundColor = "#ffffff", L.onmousedown = () => pe(), L.addEventListener("keydown", ($) => {
699
- ($.key === "Enter" || $.key === " ") && ($.preventDefault(), L.click());
700
- }), L.onclick = () => {
701
- D.innerHTML = "<em>No URL entered</em>", M.value = "", p.style.display = "flex", M.focus();
688
+ z.appendChild(le), z.title = "Insert Video", z.style.border = "1px solid #e1e1e1", z.style.backgroundColor = "#ffffff", z.style.padding = "6px 10px", z.style.borderRadius = "3px", z.style.cursor = "pointer", z.style.color = "#000000", z.onmouseover = () => z.style.backgroundColor = "#f0f0f0", z.onmouseout = () => z.style.backgroundColor = "#ffffff", z.onmousedown = () => pe(), z.addEventListener("keydown", (X) => {
689
+ (X.key === "Enter" || X.key === " ") && (X.preventDefault(), z.click());
690
+ }), z.onclick = () => {
691
+ j.innerHTML = "<em>No URL entered</em>", _.value = "", p.style.display = "flex", _.focus();
702
692
  };
703
693
  const ce = () => {
704
- const $ = M.value.trim(), q = X && X.value.trim() || "", re = ie && ie.value.trim() || "", Q = parseInt(q, 10), se = parseInt(re, 10);
705
- if (!$) {
706
- D.innerHTML = "<em>No preview</em>";
694
+ const X = _.value.trim(), W = J && J.value.trim() || "", oe = ie && ie.value.trim() || "", ee = parseInt(W, 10), se = parseInt(oe, 10);
695
+ if (!X) {
696
+ j.innerHTML = "<em>No preview</em>";
707
697
  return;
708
698
  }
709
- const de = $.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
699
+ const de = X.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
710
700
  if (de) {
711
- const w = de[1], N = Number.isFinite(Q) ? Q : 320, j = Number.isFinite(se) ? se : 180;
712
- D.innerHTML = `<iframe width="${N}" height="${j}" src="https://www.youtube.com/embed/${w}" frameborder="0" allowfullscreen></iframe>`;
701
+ const w = de[1], D = Number.isFinite(ee) ? ee : 320, L = Number.isFinite(se) ? se : 180;
702
+ j.innerHTML = `<iframe width="${D}" height="${L}" src="https://www.youtube.com/embed/${w}" frameborder="0" allowfullscreen></iframe>`;
713
703
  return;
714
704
  }
715
- const fe = Number.isFinite(Q) ? `${Q}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
716
- D.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${$}"></video>`;
705
+ const fe = Number.isFinite(ee) ? `${ee}px` : "320px", he = Number.isFinite(se) ? `${se}px` : "auto";
706
+ j.innerHTML = `<video controls style="max-width:100%; width:${fe}; height:${he};" src="${X}"></video>`;
717
707
  };
718
- M.oninput = ce, typeof X < "u" && (X.oninput = ce), typeof ie < "u" && (ie.oninput = ce), J.onclick = () => {
719
- const $ = M.value.trim(), q = X && X.value.trim() || "", re = ie && ie.value.trim() || "", Q = parseInt(q, 10), se = parseInt(re, 10);
720
- if (!$) {
708
+ _.oninput = ce, typeof J < "u" && (J.oninput = ce), typeof ie < "u" && (ie.oninput = ce), Z.onclick = () => {
709
+ const X = _.value.trim(), W = J && J.value.trim() || "", oe = ie && ie.value.trim() || "", ee = parseInt(W, 10), se = parseInt(oe, 10);
710
+ if (!X) {
721
711
  p.style.display = "none";
722
712
  return;
723
713
  }
@@ -727,32 +717,32 @@ function jo(h) {
727
717
  p.style.display = "none";
728
718
  return;
729
719
  }
730
- const fe = de.getRangeAt(0), he = $.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
720
+ const fe = de.getRangeAt(0), he = X.match(/(?:youtube.com\/watch\?v=|youtu.be\/)([\w-]+)/i);
731
721
  let w;
732
722
  if (he) {
733
- const j = he[1], W = document.createElement("div"), xe = Number.isFinite(Q) ? Q : 560, Ee = Number.isFinite(se) ? se : 315;
734
- W.innerHTML = `<iframe width="${xe}" height="${Ee}" src="https://www.youtube.com/embed/${j}" frameborder="0" allowfullscreen></iframe>`, W.contentEditable = "false", W.className = "editor-video-wrapper", W.style.display = "block", W.style.maxWidth = "100%", W.style.width = "auto", W.style.height = "auto", W.style.boxSizing = "border-box", W.style.userSelect = "none", w = W;
723
+ const L = he[1], V = document.createElement("div"), xe = Number.isFinite(ee) ? ee : 560, Ee = Number.isFinite(se) ? se : 315;
724
+ V.innerHTML = `<iframe width="${xe}" height="${Ee}" src="https://www.youtube.com/embed/${L}" frameborder="0" allowfullscreen></iframe>`, 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", w = V;
735
725
  } else {
736
- const j = document.createElement("div"), W = document.createElement("video");
737
- W.controls = !0, W.src = $, Number.isFinite(Q) && (W.width = Q), Number.isFinite(se) && (W.height = se), W.style.maxWidth = "100%", W.style.display = "block", j.appendChild(W), 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", w = j;
726
+ const L = document.createElement("div"), V = document.createElement("video");
727
+ V.controls = !0, V.src = X, Number.isFinite(ee) && (V.width = ee), Number.isFinite(se) && (V.height = se), V.style.maxWidth = "100%", V.style.display = "block", L.appendChild(V), L.contentEditable = "false", L.className = "editor-video-wrapper", L.style.display = "block", L.style.maxWidth = "100%", L.style.width = "auto", L.style.height = "auto", L.style.boxSizing = "border-box", L.style.userSelect = "none", w = L;
738
728
  }
739
729
  fe.insertNode(w), de.removeAllRanges();
740
- const N = document.createRange();
741
- N.setStartAfter(w), N.collapse(!0), de.addRange(N), pe(N);
730
+ const D = document.createRange();
731
+ D.setStartAfter(w), D.collapse(!0), de.addRange(D), pe(D);
742
732
  try {
743
- const j = Y;
744
- j && typeof j.focus == "function" && (j.focus(), j.dispatchEvent(new Event("input", { bubbles: !0 })));
733
+ const L = $;
734
+ L && typeof L.focus == "function" && (L.focus(), L.dispatchEvent(new Event("input", { bubbles: !0 })));
745
735
  } catch {
746
736
  }
747
- p.style.display = "none", M.value = "", D.innerHTML = "";
737
+ p.style.display = "none", _.value = "", j.innerHTML = "";
748
738
  };
749
- const Y = h.querySelector(".editor");
750
- return Y && Y.addEventListener("click", ($) => {
751
- const q = $.target;
752
- q && q.tagName === "VIDEO" && q.focus();
753
- }), v.appendChild(L), v;
739
+ const $ = h.querySelector(".editor");
740
+ return $ && $.addEventListener("click", (X) => {
741
+ const W = X.target;
742
+ W && W.tagName === "VIDEO" && W.focus();
743
+ }), v.appendChild(z), v;
754
744
  }
755
- function Fo(h) {
745
+ function jo(h) {
756
746
  const v = document.createElement("div");
757
747
  v.style.display = "flex", v.style.flexWrap = "wrap", v.style.gap = "8px", v.style.marginBottom = "10px", v.style.padding = "12px", v.style.border = "1px solid #e1e1e1", v.style.backgroundColor = "#ffffff", v.style.borderRadius = "4px", v.style.boxShadow = "0 1px 3px rgba(0,0,0,0.1)";
758
748
  const p = Zr();
@@ -771,24 +761,24 @@ function Fo(h) {
771
761
  <option value="h3">Heading 3</option>
772
762
  <option value="h4">Heading 4</option>
773
763
  `, d.onchange = () => {
774
- const oe = d.value, X = oe === "p" ? "P" : oe.toUpperCase();
775
- document.execCommand("formatBlock", !1, `<${X}>`);
764
+ const Q = d.value, J = Q === "p" ? "P" : Q.toUpperCase();
765
+ document.execCommand("formatBlock", !1, `<${J}>`);
776
766
  }, v.appendChild(d), document.addEventListener("selectionchange", () => {
777
767
  try {
778
- const oe = window.getSelection();
779
- if (!oe || !oe.anchorNode) return;
780
- let X = oe.anchorNode;
781
- for (; X && X.nodeType !== Node.ELEMENT_NODE; )
782
- X = X.parentNode;
783
- if (!X) return;
784
- let ne = X;
785
- for (; ne && ne !== document.body && ne !== v.parentElement; ) {
786
- const Z = ne.tagName?.toUpperCase?.();
787
- if (Z === "H1" || Z === "H2" || Z === "H3" || Z === "H4" || Z === "P") {
788
- d.value = Z === "P" ? "p" : Z.toLowerCase();
768
+ const Q = window.getSelection();
769
+ if (!Q || !Q.anchorNode) return;
770
+ let J = Q.anchorNode;
771
+ for (; J && J.nodeType !== Node.ELEMENT_NODE; )
772
+ J = J.parentNode;
773
+ if (!J) return;
774
+ let re = J;
775
+ for (; re && re !== document.body && re !== v.parentElement; ) {
776
+ const te = re.tagName?.toUpperCase?.();
777
+ if (te === "H1" || te === "H2" || te === "H3" || te === "H4" || te === "P") {
778
+ d.value = te === "P" ? "p" : te.toLowerCase();
789
779
  return;
790
780
  }
791
- ne = ne.parentElement;
781
+ re = re.parentElement;
792
782
  }
793
783
  d.value = "p";
794
784
  } catch {
@@ -806,44 +796,44 @@ function Fo(h) {
806
796
  `, g.style.border = "1px solid #e1e1e1", g.style.backgroundColor = "#ffffff", g.style.padding = "4px", g.style.borderRadius = "3px", g.style.color = "#000000", g.onchange = () => document.execCommand("fontSize", !1, g.value), v.appendChild(g);
807
797
  const m = So();
808
798
  v.appendChild(m);
809
- const x = Mo();
810
- v.appendChild(x);
811
- const E = Ro();
799
+ const E = Mo();
812
800
  v.appendChild(E);
813
- const T = Ao();
814
- v.appendChild(T);
815
- const M = Io();
816
- v.appendChild(M);
817
- const _ = Oo();
801
+ const x = Ro();
802
+ v.appendChild(x);
803
+ const S = Ao();
804
+ v.appendChild(S);
805
+ const _ = Po();
818
806
  v.appendChild(_);
819
- const D = Po();
820
- v.appendChild(D);
821
- const B = No(h);
822
- v.appendChild(B);
807
+ const A = Io();
808
+ v.appendChild(A);
809
+ const j = Oo();
810
+ v.appendChild(j);
811
+ const G = No(h);
812
+ v.appendChild(G);
823
813
  const P = zo();
824
814
  v.appendChild(P);
825
- const te = Lo();
826
- v.appendChild(te);
827
- const K = jo(h);
828
- v.appendChild(K);
829
- const G = Do();
830
- return v.appendChild(G), v;
815
+ const q = Lo();
816
+ v.appendChild(q);
817
+ const H = Fo(h);
818
+ v.appendChild(H);
819
+ const U = Do();
820
+ return v.appendChild(U), v;
831
821
  }
832
822
  function Ho(h) {
833
823
  const p = new DOMParser().parseFromString(h, "text/html");
834
824
  return p.querySelectorAll("img").forEach((g) => {
835
825
  const m = g.cloneNode(!0);
836
826
  m.style.maxWidth = "100%", m.style.width = "100%", m.style.height = "auto", m.style.cursor = "pointer", m.draggable = !1;
837
- const x = document.createElement("div");
838
- x.className = "editor-image-wrapper", x.style.display = "inline-block", x.style.position = "relative", x.style.maxWidth = "100%", x.style.width = "auto", x.style.height = "auto", x.contentEditable = "false", x.style.boxSizing = "border-box", x.style.touchAction = "none", x.style.userSelect = "none", x.appendChild(m);
839
827
  const E = document.createElement("div");
840
- E.contentEditable = "true", E.style.margin = "10px 0", E.style.textAlign = "left", E.style.display = "block", E.appendChild(x);
841
- let T = g.parentNode, M = T;
842
- for (; T && T !== p.body && Array.from(T.childNodes).filter(
843
- (D) => D.nodeType === Node.ELEMENT_NODE || D.nodeType === Node.TEXT_NODE && D.textContent?.trim()
828
+ E.className = "editor-image-wrapper", E.style.display = "inline-block", E.style.position = "relative", E.style.maxWidth = "100%", E.style.width = "auto", E.style.height = "auto", E.contentEditable = "false", E.style.boxSizing = "border-box", E.style.touchAction = "none", E.style.userSelect = "none", E.appendChild(m);
829
+ const x = document.createElement("div");
830
+ x.contentEditable = "true", x.style.margin = "10px 0", x.style.textAlign = "left", x.style.display = "block", x.appendChild(E);
831
+ let S = g.parentNode, _ = S;
832
+ for (; S && S !== p.body && Array.from(S.childNodes).filter(
833
+ (j) => j.nodeType === Node.ELEMENT_NODE || j.nodeType === Node.TEXT_NODE && j.textContent?.trim()
844
834
  ).length === 1; )
845
- M = T, T = T.parentNode;
846
- M && M.parentNode && M.parentNode.replaceChild(E, M);
835
+ _ = S, S = S.parentNode;
836
+ _ && _.parentNode && _.parentNode.replaceChild(x, _);
847
837
  }), p.body.innerHTML;
848
838
  }
849
839
  function Bo(h, v) {
@@ -854,58 +844,81 @@ function Bo(h, v) {
854
844
  g.preventDefault(), g.stopPropagation();
855
845
  }), p.addEventListener("drop", (g) => {
856
846
  g.preventDefault(), g.stopPropagation();
857
- const m = g.dataTransfer?.files;
858
- if (m && m.length > 0)
859
- for (let x = 0; x < m.length; x++) {
860
- const E = m[x];
861
- if (E.type.startsWith("image/")) {
862
- const T = new FileReader();
863
- T.onload = (M) => {
864
- const _ = document.createElement("img");
865
- _.src = M.target?.result, _.style.maxWidth = "100%", _.style.width = "100%", _.style.height = "auto", _.style.cursor = "pointer", _.draggable = !1;
866
- const D = document.createElement("div");
867
- D.className = "editor-image-wrapper", D.style.display = "inline-block", D.style.position = "relative", D.style.maxWidth = "100%", D.style.width = "auto", D.style.height = "auto", D.contentEditable = "false", D.style.userSelect = "none", D.style.boxSizing = "border-box", D.style.touchAction = "none", D.appendChild(_);
868
- const B = document.createElement("div");
869
- B.contentEditable = "true", B.style.margin = "10px 0", B.style.textAlign = "left", B.style.display = "block", B.appendChild(D), p.appendChild(B), p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
870
- }, T.readAsDataURL(E);
847
+ const m = g.clientX, E = g.clientY;
848
+ let x = null;
849
+ if (document.caretRangeFromPoint)
850
+ x = document.caretRangeFromPoint(m, E);
851
+ else if (document.caretPositionFromPoint) {
852
+ const _ = document.caretPositionFromPoint(m, E);
853
+ _ && (x = document.createRange(), x.setStart(_.offsetNode, _.offset));
854
+ }
855
+ const S = g.dataTransfer?.files;
856
+ if (S && S.length > 0)
857
+ for (let _ = 0; _ < S.length; _++) {
858
+ const A = S[_];
859
+ if (A.type.startsWith("image/")) {
860
+ const j = new FileReader();
861
+ j.onload = (G) => {
862
+ const P = document.createElement("img");
863
+ P.src = G.target?.result, P.style.maxWidth = "100%", P.style.width = "100%", P.style.height = "auto", P.style.cursor = "pointer", P.draggable = !1;
864
+ const q = document.createElement("div");
865
+ q.className = "editor-image-wrapper", q.style.display = "inline-block", q.style.position = "relative", q.style.maxWidth = "100%", q.style.width = "auto", q.style.height = "auto", q.contentEditable = "false", q.style.userSelect = "none", q.style.boxSizing = "border-box", q.style.touchAction = "none", q.appendChild(P);
866
+ const H = document.createElement("div");
867
+ if (H.contentEditable = "true", H.style.margin = "10px 0", H.style.textAlign = "left", H.style.display = "block", H.appendChild(q), x)
868
+ try {
869
+ x.insertNode(H);
870
+ const U = window.getSelection();
871
+ if (U) {
872
+ U.removeAllRanges();
873
+ const Q = document.createRange();
874
+ Q.setStartAfter(H), Q.collapse(!0), U.addRange(Q), pe(Q);
875
+ }
876
+ } catch {
877
+ p.appendChild(H);
878
+ }
879
+ else
880
+ p.appendChild(H);
881
+ p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus();
882
+ }, j.readAsDataURL(A);
871
883
  }
872
884
  }
873
885
  }), p.addEventListener("paste", (g) => {
874
886
  g.preventDefault();
875
887
  const m = g.clipboardData;
876
888
  if (!m) return;
877
- let x = m.getData("text/html");
878
- x ? x = Ho(x) : x = m.getData("text/plain");
879
- const E = window.getSelection();
880
- if (E && E.rangeCount > 0) {
881
- const T = E.getRangeAt(0), M = document.createElement("div");
882
- M.innerHTML = x;
883
- const _ = document.createDocumentFragment();
884
- for (; M.firstChild; )
885
- _.appendChild(M.firstChild);
886
- T.deleteContents(), T.insertNode(_), T.collapse(!1), E.removeAllRanges(), E.addRange(T);
889
+ let E = m.getData("text/html");
890
+ E ? E = Ho(E) : E = m.getData("text/plain");
891
+ const x = window.getSelection();
892
+ if (x && x.rangeCount > 0) {
893
+ const S = x.getRangeAt(0), _ = document.createElement("div");
894
+ _.innerHTML = E;
895
+ const A = document.createDocumentFragment();
896
+ for (; _.firstChild; )
897
+ A.appendChild(_.firstChild);
898
+ S.deleteContents(), S.insertNode(A), S.collapse(!1), x.removeAllRanges(), x.addRange(S);
887
899
  } else {
888
- const T = document.createElement("div");
889
- for (T.innerHTML = x; T.firstChild; )
890
- p.appendChild(T.firstChild);
900
+ const S = document.createElement("div");
901
+ for (S.innerHTML = E; S.firstChild; )
902
+ p.appendChild(S.firstChild);
891
903
  }
892
904
  p.dispatchEvent(new Event("input", { bubbles: !0 })), p.focus(), pe();
893
905
  }), p.addEventListener("click", (g) => {
894
906
  const m = g.target;
895
- let x = m;
896
- if (m.tagName === "IMG" && (x = m.parentElement), x && x.classList.contains("editor-image-wrapper")) {
897
- g.stopPropagation(), v(x);
898
- const E = x.parentElement;
899
- if (E && E.tagName === "DIV" && E.querySelector(".editor-image-wrapper"))
907
+ let E = m;
908
+ if (m.tagName === "IMG" && (E = m.parentElement), E && E.classList.contains("editor-image-wrapper")) {
909
+ g.preventDefault(), g.stopPropagation(), v(E);
910
+ const x = E.parentElement;
911
+ if (x && (x.tagName === "DIV" || x.tagName === "P") && x.querySelector(".editor-image-wrapper"))
900
912
  try {
901
- const T = window.getSelection();
902
- if (T) {
903
- const M = document.createRange();
904
- M.selectNode(E), T.removeAllRanges(), T.addRange(M), pe();
913
+ const S = window.getSelection();
914
+ if (S) {
915
+ const _ = document.createRange();
916
+ _.selectNodeContents(x), S.removeAllRanges(), S.addRange(_), pe();
905
917
  }
906
918
  } catch {
907
919
  }
908
- }
920
+ } else
921
+ pe();
909
922
  }), p.addEventListener("keyup", () => pe()), p.addEventListener("mouseup", () => pe()), p.addEventListener("focus", () => pe()), window.addEventListener("selectionchange", () => {
910
923
  try {
911
924
  const g = window.getSelection();
@@ -922,9 +935,9 @@ function Bo(h, v) {
922
935
  function qo(h) {
923
936
  return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
924
937
  }
925
- var Ke = { exports: {} }, Wo = Ke.exports, In;
938
+ var Ke = { exports: {} }, Wo = Ke.exports, Pn;
926
939
  function Vo() {
927
- return In || (In = 1, (function(h, v) {
940
+ return Pn || (Pn = 1, (function(h, v) {
928
941
  (function(p, d) {
929
942
  h.exports = d();
930
943
  })(Wo, (function() {
@@ -942,7 +955,7 @@ function Vo() {
942
955
  for (var e = 1; e < arguments.length; e++) {
943
956
  var n = arguments[e] != null ? arguments[e] : {};
944
957
  e % 2 ? p(Object(n), !0).forEach((function(r) {
945
- T(t, r, n[r]);
958
+ S(t, r, n[r]);
946
959
  })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach((function(r) {
947
960
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
948
961
  }));
@@ -959,33 +972,33 @@ function Vo() {
959
972
  function m(t, e) {
960
973
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
961
974
  }
962
- function x(t, e) {
975
+ function E(t, e) {
963
976
  for (var n = 0; n < e.length; n++) {
964
977
  var r = e[n];
965
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, K(r.key), r);
978
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, H(r.key), r);
966
979
  }
967
980
  }
968
- function E(t, e, n) {
969
- return e && x(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
981
+ function x(t, e, n) {
982
+ return e && E(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
970
983
  }
971
- function T(t, e, n) {
972
- return (e = K(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
984
+ function S(t, e, n) {
985
+ return (e = H(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
973
986
  }
974
- function M(t, e) {
987
+ function _(t, e) {
975
988
  if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
976
- t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && D(t, e);
989
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && j(t, e);
977
990
  }
978
- function _(t) {
979
- return _ = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
991
+ function A(t) {
992
+ return A = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
980
993
  return e.__proto__ || Object.getPrototypeOf(e);
981
- }, _(t);
994
+ }, A(t);
982
995
  }
983
- function D(t, e) {
984
- return D = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
996
+ function j(t, e) {
997
+ return j = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
985
998
  return n.__proto__ = r, n;
986
- }, D(t, e);
999
+ }, j(t, e);
987
1000
  }
988
- function B(t) {
1001
+ function G(t) {
989
1002
  if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
990
1003
  return t;
991
1004
  }
@@ -1001,31 +1014,31 @@ function Vo() {
1001
1014
  }
1002
1015
  })();
1003
1016
  return function() {
1004
- var n, r = _(t);
1017
+ var n, r = A(t);
1005
1018
  if (e) {
1006
- var o = _(this).constructor;
1019
+ var o = A(this).constructor;
1007
1020
  n = Reflect.construct(r, arguments, o);
1008
1021
  } else n = r.apply(this, arguments);
1009
1022
  return (function(i, a) {
1010
1023
  if (a && (typeof a == "object" || typeof a == "function")) return a;
1011
1024
  if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
1012
- return B(i);
1025
+ return G(i);
1013
1026
  })(this, n);
1014
1027
  };
1015
1028
  }
1016
- function te() {
1017
- return te = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
1029
+ function q() {
1030
+ return q = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(t, e, n) {
1018
1031
  var r = (function(i, a) {
1019
- for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = _(i)) !== null; ) ;
1032
+ for (; !Object.prototype.hasOwnProperty.call(i, a) && (i = A(i)) !== null; ) ;
1020
1033
  return i;
1021
1034
  })(t, e);
1022
1035
  if (r) {
1023
1036
  var o = Object.getOwnPropertyDescriptor(r, e);
1024
1037
  return o.get ? o.get.call(arguments.length < 3 ? t : n) : o.value;
1025
1038
  }
1026
- }, te.apply(this, arguments);
1039
+ }, q.apply(this, arguments);
1027
1040
  }
1028
- function K(t) {
1041
+ function H(t) {
1029
1042
  var e = (function(n, r) {
1030
1043
  if (typeof n != "object" || n === null) return n;
1031
1044
  var o = n[Symbol.toPrimitive];
@@ -1038,27 +1051,27 @@ function Vo() {
1038
1051
  })(t, "string");
1039
1052
  return typeof e == "symbol" ? e : e + "";
1040
1053
  }
1041
- var G = function(t) {
1054
+ var U = function(t) {
1042
1055
  return !(!t || !t.Window) && t instanceof t.Window;
1043
- }, oe = void 0, X = void 0;
1044
- function ne(t) {
1045
- oe = t;
1056
+ }, Q = void 0, J = void 0;
1057
+ function re(t) {
1058
+ Q = t;
1046
1059
  var e = t.document.createTextNode("");
1047
- e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), X = t;
1060
+ e.ownerDocument !== t.document && typeof t.wrap == "function" && t.wrap(e) === e && (t = t.wrap(t)), J = t;
1048
1061
  }
1049
- function Z(t) {
1050
- return G(t) ? t : (t.ownerDocument || t).defaultView || X.window;
1062
+ function te(t) {
1063
+ return U(t) ? t : (t.ownerDocument || t).defaultView || J.window;
1051
1064
  }
1052
- typeof window < "u" && window && ne(window);
1065
+ typeof window < "u" && window && re(window);
1053
1066
  var ie = function(t) {
1054
1067
  return !!t && g(t) === "object";
1055
- }, ee = function(t) {
1068
+ }, ne = function(t) {
1056
1069
  return typeof t == "function";
1057
1070
  }, b = { window: function(t) {
1058
- return t === X || G(t);
1071
+ return t === J || U(t);
1059
1072
  }, docFrag: function(t) {
1060
1073
  return ie(t) && t.nodeType === 11;
1061
- }, object: ie, func: ee, number: function(t) {
1074
+ }, object: ie, func: ne, number: function(t) {
1062
1075
  return typeof t == "number";
1063
1076
  }, bool: function(t) {
1064
1077
  return typeof t == "boolean";
@@ -1066,21 +1079,21 @@ function Vo() {
1066
1079
  return typeof t == "string";
1067
1080
  }, element: function(t) {
1068
1081
  if (!t || g(t) !== "object") return !1;
1069
- var e = Z(t) || X;
1082
+ var e = te(t) || J;
1070
1083
  return /object|function/.test(typeof Element > "u" ? "undefined" : g(Element)) ? t instanceof Element || t instanceof e.Element : t.nodeType === 1 && typeof t.nodeName == "string";
1071
1084
  }, plainObject: function(t) {
1072
1085
  return ie(t) && !!t.constructor && /function Object\b/.test(t.constructor.toString());
1073
1086
  }, array: function(t) {
1074
- return ie(t) && t.length !== void 0 && ee(t.splice);
1087
+ return ie(t) && t.length !== void 0 && ne(t.splice);
1075
1088
  } };
1076
- function J(t) {
1089
+ function Z(t) {
1077
1090
  var e = t.interaction;
1078
1091
  if (e.prepared.name === "drag") {
1079
1092
  var n = e.prepared.axis;
1080
1093
  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);
1081
1094
  }
1082
1095
  }
1083
- function L(t) {
1096
+ function z(t) {
1084
1097
  var e = t.iEvent, n = t.interaction;
1085
1098
  if (n.prepared.name === "drag") {
1086
1099
  var r = n.prepared.axis;
@@ -1093,25 +1106,25 @@ function Vo() {
1093
1106
  var le = { id: "actions/drag", install: function(t) {
1094
1107
  var e = t.actions, n = t.Interactable, r = t.defaults;
1095
1108
  n.prototype.draggable = le.draggable, e.map.drag = le, e.methodDict.drag = "draggable", r.actions.drag = le.defaults;
1096
- }, listeners: { "interactions:before-action-move": J, "interactions:action-resume": J, "interactions:action-move": L, "auto-start:check": function(t) {
1109
+ }, listeners: { "interactions:before-action-move": Z, "interactions:action-resume": Z, "interactions:action-move": z, "auto-start:check": function(t) {
1097
1110
  var e = t.interaction, n = t.interactable, r = t.buttons, o = n.options.drag;
1098
1111
  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;
1099
1112
  } }, draggable: function(t) {
1100
1113
  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;
1101
- }, beforeMove: J, move: L, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1114
+ }, beforeMove: Z, move: z, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
1102
1115
  return "move";
1103
1116
  }, filterEventType: function(t) {
1104
1117
  return t.search("drag") === 0;
1105
- } }, ce = le, Y = { init: function(t) {
1118
+ } }, ce = le, $ = { init: function(t) {
1106
1119
  var e = t;
1107
- Y.document = e.document, Y.DocumentFragment = e.DocumentFragment || $, Y.SVGElement = e.SVGElement || $, Y.SVGSVGElement = e.SVGSVGElement || $, Y.SVGElementInstance = e.SVGElementInstance || $, Y.Element = e.Element || $, Y.HTMLElement = e.HTMLElement || Y.Element, Y.Event = e.Event, Y.Touch = e.Touch || $, Y.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1120
+ $.document = e.document, $.DocumentFragment = e.DocumentFragment || X, $.SVGElement = e.SVGElement || X, $.SVGSVGElement = e.SVGSVGElement || X, $.SVGElementInstance = e.SVGElementInstance || X, $.Element = e.Element || X, $.HTMLElement = e.HTMLElement || $.Element, $.Event = e.Event, $.Touch = e.Touch || X, $.PointerEvent = e.PointerEvent || e.MSPointerEvent;
1108
1121
  }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
1109
- function $() {
1122
+ function X() {
1110
1123
  }
1111
- var q = Y, re = { init: function(t) {
1112
- var e = q.Element, n = t.navigator || {};
1113
- re.supportsTouch = "ontouchstart" in t || b.func(t.DocumentTouch) && q.document instanceof t.DocumentTouch, re.supportsPointerEvent = n.pointerEnabled !== !1 && !!q.PointerEvent, re.isIOS = /iP(hone|od|ad)/.test(n.platform), re.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), re.isIe9 = /MSIE 9/.test(n.userAgent), re.isOperaMobile = n.appName === "Opera" && re.supportsTouch && /Presto/.test(n.userAgent), re.prefixedMatchesSelector = "matches" in e.prototype ? "matches" : "webkitMatchesSelector" in e.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in e.prototype ? "mozMatchesSelector" : "oMatchesSelector" in e.prototype ? "oMatchesSelector" : "msMatchesSelector", re.pEventTypes = re.supportsPointerEvent ? q.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, re.wheelEvent = q.document && "onmousewheel" in q.document ? "mousewheel" : "wheel";
1114
- }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, Q = re;
1124
+ var W = $, oe = { init: function(t) {
1125
+ var e = W.Element, n = t.navigator || {};
1126
+ oe.supportsTouch = "ontouchstart" in t || b.func(t.DocumentTouch) && W.document instanceof t.DocumentTouch, oe.supportsPointerEvent = n.pointerEnabled !== !1 && !!W.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 ? W.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 = W.document && "onmousewheel" in W.document ? "mousewheel" : "wheel";
1127
+ }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, ee = oe;
1115
1128
  function se(t, e) {
1116
1129
  if (t.contains) return t.contains(e);
1117
1130
  for (; e; ) {
@@ -1136,33 +1149,33 @@ function Vo() {
1136
1149
  return e;
1137
1150
  }
1138
1151
  function he(t, e) {
1139
- return X !== oe && (e = e.replace(/\/deep\//g, " ")), t[Q.prefixedMatchesSelector](e);
1152
+ return J !== Q && (e = e.replace(/\/deep\//g, " ")), t[ee.prefixedMatchesSelector](e);
1140
1153
  }
1141
1154
  var w = function(t) {
1142
1155
  return t.parentNode || t.host;
1143
1156
  };
1144
- function N(t, e) {
1157
+ function D(t, e) {
1145
1158
  for (var n, r = [], o = t; (n = w(o)) && o !== e && n !== o.ownerDocument; ) r.unshift(o), o = n;
1146
1159
  return r;
1147
1160
  }
1148
- function j(t, e, n) {
1161
+ function L(t, e, n) {
1149
1162
  for (; b.element(t); ) {
1150
1163
  if (he(t, e)) return !0;
1151
1164
  if ((t = fe(t)) === n) return he(t, e);
1152
1165
  }
1153
1166
  return !1;
1154
1167
  }
1155
- function W(t) {
1168
+ function V(t) {
1156
1169
  return t.correspondingUseElement || t;
1157
1170
  }
1158
1171
  function xe(t) {
1159
- var e = t instanceof q.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1172
+ var e = t instanceof W.SVGElement ? t.getBoundingClientRect() : t.getClientRects()[0];
1160
1173
  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 };
1161
1174
  }
1162
1175
  function Ee(t) {
1163
1176
  var e, n = xe(t);
1164
- if (!Q.isIOS7 && n) {
1165
- var r = { x: (e = (e = Z(t)) || X).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1177
+ if (!ee.isIOS7 && n) {
1178
+ var r = { x: (e = (e = te(t)) || J).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop };
1166
1179
  n.left += r.x, n.right += r.x, n.top += r.y, n.bottom += r.y;
1167
1180
  }
1168
1181
  return n;
@@ -1172,7 +1185,7 @@ function Vo() {
1172
1185
  return e;
1173
1186
  }
1174
1187
  function we(t) {
1175
- return !!b.string(t) && (q.document.querySelector(t), !0);
1188
+ return !!b.string(t) && (W.document.querySelector(t), !0);
1176
1189
  }
1177
1190
  function I(t, e) {
1178
1191
  for (var n in e) t[n] = e[n];
@@ -1202,7 +1215,7 @@ function Vo() {
1202
1215
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(l) {
1203
1216
  return !0;
1204
1217
  }, r = arguments.length > 3 ? arguments[3] : void 0;
1205
- if (r = r || {}, b.string(t) && t.search(" ") !== -1 && (t = Ft(t)), b.array(t)) return t.forEach((function(l) {
1218
+ if (r = r || {}, b.string(t) && t.search(" ") !== -1 && (t = jt(t)), b.array(t)) return t.forEach((function(l) {
1206
1219
  return Ae(l, e, n, r);
1207
1220
  })), r;
1208
1221
  if (b.object(t) && (e = t, t = ""), b.func(e) && n(t)) r[t] = r[t] || [], r[t].push(e);
@@ -1211,21 +1224,21 @@ function Vo() {
1211
1224
  Ae(t, a, n, r);
1212
1225
  }
1213
1226
  else if (b.object(e)) for (var s in e)
1214
- Ae(Ft(s).map((function(l) {
1227
+ Ae(jt(s).map((function(l) {
1215
1228
  return "".concat(t).concat(l);
1216
1229
  })), e[s], n, r);
1217
1230
  return r;
1218
1231
  }
1219
- function Ft(t) {
1232
+ function jt(t) {
1220
1233
  return t.trim().split(/ +/);
1221
1234
  }
1222
- var je = function(t, e) {
1235
+ var Fe = function(t, e) {
1223
1236
  return Math.sqrt(t * t + e * e);
1224
- }, jn = ["webkit", "moz"];
1237
+ }, Fn = ["webkit", "moz"];
1225
1238
  function tt(t, e) {
1226
1239
  t.__set || (t.__set = {});
1227
1240
  var n = function(o) {
1228
- if (jn.some((function(i) {
1241
+ if (Fn.some((function(i) {
1229
1242
  return o.indexOf(i) === 0;
1230
1243
  }))) return 1;
1231
1244
  typeof t[o] != "function" && o !== "__set" && Object.defineProperty(t, o, { get: function() {
@@ -1244,21 +1257,21 @@ function Vo() {
1244
1257
  t.page.x = 0, t.page.y = 0, t.client.x = 0, t.client.y = 0;
1245
1258
  }
1246
1259
  function Bt(t) {
1247
- return t instanceof q.Event || t instanceof q.Touch;
1260
+ return t instanceof W.Event || t instanceof W.Touch;
1248
1261
  }
1249
1262
  function rt(t, e, n) {
1250
1263
  return t = t || "page", (n = n || {}).x = e[t + "X"], n.y = e[t + "Y"], n;
1251
1264
  }
1252
1265
  function qt(t, e) {
1253
- return e = e || { x: 0, y: 0 }, Q.isOperaMobile && Bt(t) ? (rt("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : rt("page", t, e), e;
1266
+ return e = e || { x: 0, y: 0 }, ee.isOperaMobile && Bt(t) ? (rt("screen", t, e), e.x += window.scrollX, e.y += window.scrollY) : rt("page", t, e), e;
1254
1267
  }
1255
- function Fe(t) {
1268
+ function je(t) {
1256
1269
  return b.number(t.pointerId) ? t.pointerId : t.identifier;
1257
1270
  }
1258
- function Fn(t, e, n) {
1271
+ function jn(t, e, n) {
1259
1272
  var r = e.length > 1 ? Wt(e) : e[0];
1260
1273
  qt(r, t.page), (function(o, i) {
1261
- i = i || {}, Q.isOperaMobile && Bt(o) ? rt("screen", o, i) : rt("client", o, i);
1274
+ i = i || {}, ee.isOperaMobile && Bt(o) ? rt("screen", o, i) : rt("client", o, i);
1262
1275
  })(r, t.client), t.timeStamp = n;
1263
1276
  }
1264
1277
  function mt(t) {
@@ -1280,24 +1293,24 @@ function Vo() {
1280
1293
  }
1281
1294
  function yt(t, e) {
1282
1295
  var n = e + "X", r = e + "Y", o = mt(t), i = o[0][n] - o[1][n], a = o[0][r] - o[1][r];
1283
- return je(i, a);
1296
+ return Fe(i, a);
1284
1297
  }
1285
1298
  function bt(t, e) {
1286
1299
  var n = e + "X", r = e + "Y", o = mt(t), i = o[1][n] - o[0][n], a = o[1][r] - o[0][r];
1287
1300
  return 180 * Math.atan2(a, i) / Math.PI;
1288
1301
  }
1289
1302
  function Vt(t) {
1290
- 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 q.Touch ? "touch" : "mouse";
1303
+ 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 W.Touch ? "touch" : "mouse";
1291
1304
  }
1292
1305
  function Yt(t) {
1293
1306
  var e = b.func(t.composedPath) ? t.composedPath() : t.path;
1294
- return [W(e ? e[0] : t.target), W(t.currentTarget)];
1307
+ return [V(e ? e[0] : t.target), V(t.currentTarget)];
1295
1308
  }
1296
1309
  var ot = (function() {
1297
1310
  function t(e) {
1298
1311
  m(this, t), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = e;
1299
1312
  }
1300
- return E(t, [{ key: "preventDefault", value: function() {
1313
+ return x(t, [{ key: "preventDefault", value: function() {
1301
1314
  } }, { key: "stopPropagation", value: function() {
1302
1315
  this.propagationStopped = !0;
1303
1316
  } }, { key: "stopImmediatePropagation", value: function() {
@@ -1321,8 +1334,8 @@ function Vo() {
1321
1334
  return -1;
1322
1335
  }, Be = function(t, e) {
1323
1336
  return t[He(t, e)];
1324
- }, Pe = (function(t) {
1325
- M(n, t);
1337
+ }, Oe = (function(t) {
1338
+ _(n, t);
1326
1339
  var e = P(n);
1327
1340
  function n(r, o, i) {
1328
1341
  var a;
@@ -1330,7 +1343,7 @@ function Vo() {
1330
1343
  var s = i === "dragleave" ? r.prev : r.cur, l = s.element, u = s.dropzone;
1331
1344
  return a.type = i, a.target = l, a.currentTarget = l, a.dropzone = u, a.dragEvent = o, a.relatedTarget = o.target, a.draggable = o.interactable, a.timeStamp = o.timeStamp, a;
1332
1345
  }
1333
- return E(n, [{ key: "reject", value: function() {
1346
+ return x(n, [{ key: "reject", value: function() {
1334
1347
  var r = this, o = this._interaction.dropState;
1335
1348
  if (this.type === "dropactivate" || this.dropzone && o.cur.dropzone === this.dropzone && o.cur.element === this.target) if (o.prev.dropzone = this.dropzone, o.prev.element = this.target, o.rejected = !0, o.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
1336
1349
  var i = o.activeDrops, a = He(i, (function(l) {
@@ -1378,39 +1391,39 @@ function Vo() {
1378
1391
  var u = l[s], c = u.dropzone, f = u.element, y = u.rect, C = c.dropCheck(e, n, o, i, f, y);
1379
1392
  a.push(C ? f : null);
1380
1393
  }
1381
- var k = (function(S) {
1382
- for (var A, R, O, H = [], U = 0; U < S.length; U++) {
1383
- var z = S[U], V = S[A];
1384
- if (z && U !== A) if (V) {
1385
- var me = w(z), ae = w(V);
1386
- if (me !== z.ownerDocument) if (ae !== z.ownerDocument) if (me !== ae) {
1387
- H = H.length ? H : N(V);
1394
+ var k = (function(T) {
1395
+ for (var R, M, O, B = [], K = 0; K < T.length; K++) {
1396
+ var N = T[K], Y = T[R];
1397
+ if (N && K !== R) if (Y) {
1398
+ var me = w(N), ae = w(Y);
1399
+ if (me !== N.ownerDocument) if (ae !== N.ownerDocument) if (me !== ae) {
1400
+ B = B.length ? B : D(Y);
1388
1401
  var ge = void 0;
1389
- if (V instanceof q.HTMLElement && z instanceof q.SVGElement && !(z instanceof q.SVGSVGElement)) {
1390
- if (z === ae) continue;
1391
- ge = z.ownerSVGElement;
1392
- } else ge = z;
1393
- for (var be = N(ge, V.ownerDocument), Se = 0; be[Se] && be[Se] === H[Se]; ) Se++;
1394
- var ft = [be[Se - 1], be[Se], H[Se]];
1402
+ if (Y instanceof W.HTMLElement && N instanceof W.SVGElement && !(N instanceof W.SVGSVGElement)) {
1403
+ if (N === ae) continue;
1404
+ ge = N.ownerSVGElement;
1405
+ } else ge = N;
1406
+ for (var be = D(ge, Y.ownerDocument), Se = 0; be[Se] && be[Se] === B[Se]; ) Se++;
1407
+ var ft = [be[Se - 1], be[Se], B[Se]];
1395
1408
  if (ft[0]) for (var Ue = ft[0].lastChild; Ue; ) {
1396
1409
  if (Ue === ft[1]) {
1397
- A = U, H = be;
1410
+ R = K, B = be;
1398
1411
  break;
1399
1412
  }
1400
1413
  if (Ue === ft[2]) break;
1401
1414
  Ue = Ue.previousSibling;
1402
1415
  }
1403
- } else O = V, (parseInt(Z(R = z).getComputedStyle(R).zIndex, 10) || 0) >= (parseInt(Z(O).getComputedStyle(O).zIndex, 10) || 0) && (A = U);
1404
- else A = U;
1405
- } else A = U;
1416
+ } else O = Y, (parseInt(te(M = N).getComputedStyle(M).zIndex, 10) || 0) >= (parseInt(te(O).getComputedStyle(O).zIndex, 10) || 0) && (R = K);
1417
+ else R = K;
1418
+ } else R = K;
1406
1419
  }
1407
- return A;
1420
+ return R;
1408
1421
  })(a);
1409
1422
  return r.activeDrops[k] || null;
1410
1423
  }
1411
1424
  function Et(t, e, n) {
1412
1425
  var r = t.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
1413
- return n.type === "dragstart" && (o.activate = new Pe(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new Pe(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 Pe(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 Pe(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new Pe(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new Pe(r, n, "dropmove"), n.dropzone = r.cur.dropzone)), o;
1426
+ 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;
1414
1427
  }
1415
1428
  function wt(t, e) {
1416
1429
  var n = t.dropState, r = n.activeDrops, o = n.cur, i = n.prev;
@@ -1441,22 +1454,22 @@ function Vo() {
1441
1454
  return b.bool(s) ? (a.options.drop.enabled = s, a) : a.options.drop;
1442
1455
  })(this, i);
1443
1456
  }, r.prototype.dropCheck = function(i, a, s, l, u, c) {
1444
- return (function(f, y, C, k, S, A, R) {
1457
+ return (function(f, y, C, k, T, R, M) {
1445
1458
  var O = !1;
1446
- if (!(R = R || f.getRect(A))) return !!f.options.drop.checker && f.options.drop.checker(y, C, O, f, A, k, S);
1447
- var H = f.options.drop.overlap;
1448
- if (H === "pointer") {
1449
- var U = Le(k, S, "drag"), z = qt(y);
1450
- z.x += U.x, z.y += U.y;
1451
- var V = z.x > R.left && z.x < R.right, me = z.y > R.top && z.y < R.bottom;
1452
- O = V && me;
1459
+ if (!(M = M || f.getRect(R))) return !!f.options.drop.checker && f.options.drop.checker(y, C, O, f, R, k, T);
1460
+ var B = f.options.drop.overlap;
1461
+ if (B === "pointer") {
1462
+ var K = Le(k, T, "drag"), N = qt(y);
1463
+ N.x += K.x, N.y += K.y;
1464
+ var Y = N.x > M.left && N.x < M.right, me = N.y > M.top && N.y < M.bottom;
1465
+ O = Y && me;
1453
1466
  }
1454
- var ae = k.getRect(S);
1455
- if (ae && H === "center") {
1467
+ var ae = k.getRect(T);
1468
+ if (ae && B === "center") {
1456
1469
  var ge = ae.left + ae.width / 2, be = ae.top + ae.height / 2;
1457
- O = ge >= R.left && ge <= R.right && be >= R.top && be <= R.bottom;
1470
+ O = ge >= M.left && ge <= M.right && be >= M.top && be <= M.bottom;
1458
1471
  }
1459
- return ae && b.number(H) && (O = Math.max(0, Math.min(R.right, ae.right) - Math.max(R.left, ae.left)) * Math.max(0, Math.min(R.bottom, ae.bottom) - Math.max(R.top, ae.top)) / (ae.width * ae.height) >= H), f.options.drop.checker && (O = f.options.drop.checker(y, C, O, f, A, k, S)), O;
1472
+ return ae && b.number(B) && (O = Math.max(0, Math.min(M.right, ae.right) - Math.max(M.left, ae.left)) * Math.max(0, Math.min(M.bottom, ae.bottom) - Math.max(M.top, ae.top)) / (ae.width * ae.height) >= B), f.options.drop.checker && (O = f.options.drop.checker(y, C, O, f, R, k, T)), O;
1460
1473
  })(this, i, a, s, l, u, c);
1461
1474
  }, n.dynamicDrop = function(i) {
1462
1475
  return b.bool(i) ? (t.dynamicDrop = i, n) : t.dynamicDrop;
@@ -1536,7 +1549,7 @@ function Vo() {
1536
1549
  if (t === "right") return n.x > (s >= 0 ? i.right : i.left) - a;
1537
1550
  if (t === "bottom") return n.y > (l >= 0 ? i.bottom : i.top) - a;
1538
1551
  }
1539
- return !!b.element(r) && (b.element(e) ? e === r : j(r, e, o));
1552
+ return !!b.element(r) && (b.element(e) ? e === r : L(r, e, o));
1540
1553
  }
1541
1554
  function Qt(t) {
1542
1555
  var e = t.iEvent, n = t.interaction;
@@ -1545,7 +1558,7 @@ function Vo() {
1545
1558
  n.interactable.options.resize.square ? (n.resizeAxes === "y" ? r.delta.x = r.delta.y : r.delta.y = r.delta.x, r.axes = "xy") : (r.axes = n.resizeAxes, n.resizeAxes === "x" ? r.delta.y = 0 : n.resizeAxes === "y" && (r.delta.x = 0));
1546
1559
  }
1547
1560
  }
1548
- var ke, Ie, Ce = { id: "actions/resize", before: ["actions/drag"], install: function(t) {
1561
+ var ke, Pe, Ce = { id: "actions/resize", before: ["actions/drag"], install: function(t) {
1549
1562
  var e = t.actions, n = t.browser, r = t.Interactable, o = t.defaults;
1550
1563
  Ce.cursors = (function(i) {
1551
1564
  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" };
@@ -1581,7 +1594,7 @@ function Vo() {
1581
1594
  }
1582
1595
  }
1583
1596
  } else c.top = Math.min(s.top, u.bottom), c.bottom = Math.max(s.bottom, u.top), c.left = Math.min(s.left, u.right), c.right = Math.max(s.right, u.left);
1584
- for (var S in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[S] = c[S] - y[S];
1597
+ for (var T in c.width = c.right - c.left, c.height = c.bottom - c.top, c) f[T] = c[T] - y[T];
1585
1598
  o.edges = r.prepared.edges, o.rect = c, o.deltaRect = f;
1586
1599
  }
1587
1600
  })(t), Qt(t);
@@ -1625,18 +1638,18 @@ function Vo() {
1625
1638
  } }, Zt = 0, Te = { request: function(t) {
1626
1639
  return ke(t);
1627
1640
  }, cancel: function(t) {
1628
- return Ie(t);
1641
+ return Pe(t);
1629
1642
  }, init: function(t) {
1630
- if (ke = t.requestAnimationFrame, Ie = t.cancelAnimationFrame, !ke) for (var e = ["ms", "moz", "webkit", "o"], n = 0; n < e.length; n++) {
1643
+ if (ke = t.requestAnimationFrame, Pe = t.cancelAnimationFrame, !ke) for (var e = ["ms", "moz", "webkit", "o"], n = 0; n < e.length; n++) {
1631
1644
  var r = e[n];
1632
- ke = t["".concat(r, "RequestAnimationFrame")], Ie = t["".concat(r, "CancelAnimationFrame")] || t["".concat(r, "CancelRequestAnimationFrame")];
1645
+ ke = t["".concat(r, "RequestAnimationFrame")], Pe = t["".concat(r, "CancelAnimationFrame")] || t["".concat(r, "CancelRequestAnimationFrame")];
1633
1646
  }
1634
- ke = ke && ke.bind(t), Ie = Ie && Ie.bind(t), ke || (ke = function(o) {
1647
+ ke = ke && ke.bind(t), Pe = Pe && Pe.bind(t), ke || (ke = function(o) {
1635
1648
  var i = Date.now(), a = Math.max(0, 16 - (i - Zt)), s = t.setTimeout((function() {
1636
1649
  o(i + a);
1637
1650
  }), a);
1638
1651
  return Zt = i + a, s;
1639
- }, Ie = function(o) {
1652
+ }, Pe = function(o) {
1640
1653
  return clearTimeout(o);
1641
1654
  });
1642
1655
  } }, F = { 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) {
@@ -1673,7 +1686,7 @@ function Vo() {
1673
1686
  }
1674
1687
  } };
1675
1688
  function en(t, e, n) {
1676
- return (b.string(t) ? Qe(t, e, n) : t) || Z(n);
1689
+ return (b.string(t) ? Qe(t, e, n) : t) || te(n);
1677
1690
  }
1678
1691
  function tn(t) {
1679
1692
  return b.window(t) && (t = window.document.body), { x: t.scrollLeft, y: t.scrollTop };
@@ -1693,7 +1706,7 @@ function Vo() {
1693
1706
  function qe(t, e) {
1694
1707
  var n = !1;
1695
1708
  return function() {
1696
- return n || (X.console.warn(e), n = !0), t.apply(this, arguments);
1709
+ return n || (J.console.warn(e), n = !0), t.apply(this, arguments);
1697
1710
  };
1698
1711
  }
1699
1712
  function St(t, e) {
@@ -1808,14 +1821,14 @@ function Vo() {
1808
1821
  n.prepared.name = null;
1809
1822
  for (var f = r, y = function(k) {
1810
1823
  if (k !== n.interactable) {
1811
- var S = n.interactable.options.drag;
1812
- if (!S.manualStart && k.testIgnoreAllow(S, f, r)) {
1813
- var A = k.getAction(n.downPointer, n.downEvent, n, f);
1814
- if (A && A.name === "drag" && (function(R, O) {
1824
+ var T = n.interactable.options.drag;
1825
+ if (!T.manualStart && k.testIgnoreAllow(T, f, r)) {
1826
+ var R = k.getAction(n.downPointer, n.downEvent, n, f);
1827
+ if (R && R.name === "drag" && (function(M, O) {
1815
1828
  if (!O) return !1;
1816
- var H = O.options.drag.startAxis;
1817
- return R === "xy" || H === "xy" || H === R;
1818
- })(c, k) && _t.validateAction(A, k, f, r, e)) return k;
1829
+ var B = O.options.drag.startAxis;
1830
+ return M === "xy" || B === "xy" || B === M;
1831
+ })(c, k) && _t.validateAction(R, k, f, r, e)) return k;
1819
1832
  }
1820
1833
  }
1821
1834
  }; b.element(f); ) {
@@ -1867,7 +1880,7 @@ function Vo() {
1867
1880
  var a = r.options.preventDefault;
1868
1881
  if (a !== "never") if (a !== "always") {
1869
1882
  if (o.events.supportsPassive && /^touch(start|move)$/.test(i.type)) {
1870
- var s = Z(i.target).document, l = o.getDocOptions(s);
1883
+ var s = te(i.target).document, l = o.getDocOptions(s);
1871
1884
  if (!l || !l.events || l.events.passive !== !1) return;
1872
1885
  }
1873
1886
  /^(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();
@@ -1899,7 +1912,7 @@ function Vo() {
1899
1912
  function t(e) {
1900
1913
  m(this, t), this.states = [], this.startOffset = { left: 0, right: 0, top: 0, bottom: 0 }, this.startDelta = void 0, this.result = void 0, this.endResult = void 0, this.startEdges = void 0, this.edges = void 0, this.interaction = void 0, this.interaction = e, this.result = st(), this.edges = { left: !1, right: !1, top: !1, bottom: !1 };
1901
1914
  }
1902
- return E(t, [{ key: "start", value: function(e, n) {
1915
+ return x(t, [{ key: "start", value: function(e, n) {
1903
1916
  var r, o, i = e.phase, a = this.interaction, s = (function(u) {
1904
1917
  var c = u.interactable.options[u.prepared.name], f = c.modifiers;
1905
1918
  return f && f.length ? f : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(y) {
@@ -1928,10 +1941,10 @@ function Vo() {
1928
1941
  (c = f.methods) != null && c.set && this.shouldDo(y, r, n) && (e.state = f, k = f.methods.set(e), et(e.edges, e.rect, { x: e.coords.x - C.x, y: e.coords.y - C.y })), l.eventProps.push(k);
1929
1942
  }
1930
1943
  I(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;
1931
- var S = this.result.coords, A = this.result.rect;
1932
- if (S && A) {
1933
- var R = l.rect.left !== A.left || l.rect.right !== A.right || l.rect.top !== A.top || l.rect.bottom !== A.bottom;
1934
- l.changed = R || S.x !== l.coords.x || S.y !== l.coords.y;
1944
+ var T = this.result.coords, R = this.result.rect;
1945
+ if (T && R) {
1946
+ var M = l.rect.left !== R.left || l.rect.right !== R.right || l.rect.top !== R.top || l.rect.bottom !== R.bottom;
1947
+ l.changed = M || T.x !== l.coords.x || T.y !== l.coords.y;
1935
1948
  }
1936
1949
  return l;
1937
1950
  } }, { key: "applyToInteraction", value: function(e) {
@@ -1941,8 +1954,8 @@ function Vo() {
1941
1954
  var f = c[u], y = f[0], C = f[1];
1942
1955
  y.page.x += C.x, y.page.y += C.y, y.client.x += C.x, y.client.y += C.y;
1943
1956
  }
1944
- var k = this.result.rectDelta, S = e.rect || n.rect;
1945
- S.left += k.left, S.right += k.right, S.top += k.top, S.bottom += k.bottom, S.width = S.right - S.left, S.height = S.bottom - S.top;
1957
+ var k = this.result.rectDelta, T = e.rect || n.rect;
1958
+ T.left += k.left, T.right += k.right, T.top += k.top, T.bottom += k.bottom, T.width = T.right - T.left, T.height = T.bottom - T.top;
1946
1959
  } }, { key: "setAndApply", value: function(e) {
1947
1960
  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 }));
1948
1961
  if (this.result = a, !a.changed && (!i || i < this.states.length) && n.interacting()) return !1;
@@ -2041,15 +2054,15 @@ function Vo() {
2041
2054
  }, "interactions:stop": function(t) {
2042
2055
  return t.interaction.modification.stop(t);
2043
2056
  } } }, cn = or, un = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, At = (function(t) {
2044
- M(n, t);
2057
+ _(n, t);
2045
2058
  var e = P(n);
2046
2059
  function n(r, o, i, a, s, l, u) {
2047
2060
  var c;
2048
2061
  m(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;
2049
- var f = r.interactable, y = (f && f.options || un).deltaSource, C = Le(f, s, i), k = a === "start", S = a === "end", A = k ? B(c) : r.prevEvent, R = k ? r.coords.start : S ? { page: A.page, client: A.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
2050
- return c.page = I({}, R.page), c.client = I({}, R.client), c.rect = I({}, r.rect), c.timeStamp = R.timeStamp, S || (c.page.x -= C.x, c.page.y -= C.y, c.client.x -= C.x, c.client.y -= C.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 = u || i + (a || ""), c.interactable = f, c.t0 = k ? r.pointers[r.pointers.length - 1].downTime : A.t0, c.x0 = r.coords.start.page.x - C.x, c.y0 = r.coords.start.page.y - C.y, c.clientX0 = r.coords.start.client.x - C.x, c.clientY0 = r.coords.start.client.y - C.y, c.delta = k || S ? { x: 0, y: 0 } : { x: c[y].x - A[y].x, y: c[y].y - A[y].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = I({}, r.coords.velocity[y]), c.speed = je(c.velocity.x, c.velocity.y), c.swipe = S || a === "inertiastart" ? c.getSwipe() : null, c;
2062
+ var f = r.interactable, y = (f && f.options || un).deltaSource, C = Le(f, s, i), k = a === "start", T = a === "end", R = k ? G(c) : r.prevEvent, M = k ? r.coords.start : T ? { page: R.page, client: R.client, timeStamp: r.coords.cur.timeStamp } : r.coords.cur;
2063
+ return c.page = I({}, M.page), c.client = I({}, M.client), c.rect = I({}, r.rect), c.timeStamp = M.timeStamp, T || (c.page.x -= C.x, c.page.y -= C.y, c.client.x -= C.x, c.client.y -= C.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 = u || i + (a || ""), c.interactable = f, c.t0 = k ? r.pointers[r.pointers.length - 1].downTime : R.t0, c.x0 = r.coords.start.page.x - C.x, c.y0 = r.coords.start.page.y - C.y, c.clientX0 = r.coords.start.client.x - C.x, c.clientY0 = r.coords.start.client.y - C.y, c.delta = k || T ? { x: 0, y: 0 } : { x: c[y].x - R[y].x, y: c[y].y - R[y].y }, c.dt = r.coords.delta.timeStamp, c.duration = c.timeStamp - c.t0, c.velocity = I({}, r.coords.velocity[y]), c.speed = Fe(c.velocity.x, c.velocity.y), c.swipe = T || a === "inertiastart" ? c.getSwipe() : null, c;
2051
2064
  }
2052
- return E(n, [{ key: "getSwipe", value: function() {
2065
+ return x(n, [{ key: "getSwipe", value: function() {
2053
2066
  var r = this._interaction;
2054
2067
  if (r.prevEvent.speed < 600 || this.timeStamp - r.prevEvent.timeStamp > 150) return null;
2055
2068
  var o = 180 * Math.atan2(r.prevEvent.velocityY, r.prevEvent.velocityX) / Math.PI;
@@ -2096,7 +2109,7 @@ function Vo() {
2096
2109
  }, set: function(t) {
2097
2110
  this.velocity.y = t;
2098
2111
  } } });
2099
- var ir = E((function t(e, n, r, o, i) {
2112
+ var ir = x((function t(e, n, r, o, i) {
2100
2113
  m(this, t), this.id = void 0, this.pointer = void 0, this.event = void 0, this.downTime = void 0, this.downTarget = void 0, this.id = e, this.pointer = n, this.event = r, this.downTime = o, this.downTarget = i;
2101
2114
  })), ar = (function(t) {
2102
2115
  return t.interactable = "", t.element = "", t.prepared = "", t.pointerIsDown = "", t.pointerWasMoved = "", t._proxy = "", t;
@@ -2124,7 +2137,7 @@ function Vo() {
2124
2137
  for (var u in dn) l(u);
2125
2138
  this._scopeFire("interactions:new", { interaction: this });
2126
2139
  }
2127
- return E(t, [{ key: "pointerMoveTolerance", get: function() {
2140
+ return x(t, [{ key: "pointerMoveTolerance", get: function() {
2128
2141
  return 1;
2129
2142
  } }, { key: "pointerDown", value: function(e, n, r) {
2130
2143
  var o = this.updatePointer(e, n, r, !0), i = this.pointers[o];
@@ -2134,7 +2147,7 @@ function Vo() {
2134
2147
  } }, { key: "pointerMove", value: function(e, n, r) {
2135
2148
  this.simulation || this.modification && this.modification.endResult || this.updatePointer(e, n, r, !1);
2136
2149
  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;
2137
- this.pointerIsDown && !this.pointerWasMoved && (o = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = je(o, i) > this.pointerMoveTolerance);
2150
+ this.pointerIsDown && !this.pointerWasMoved && (o = this.coords.cur.client.x - this.coords.start.client.x, i = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = Fe(o, i) > this.pointerMoveTolerance);
2138
2151
  var s, l, u, 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 };
2139
2152
  a || (s = this.coords.velocity, l = this.coords.delta, u = Math.max(l.timeStamp / 1e3, 1e-3), s.page.x = l.page.x / u, s.page.y = l.page.y / u, s.client.x = l.client.x / u, s.client.y = l.client.y / u, s.timeStamp = u), this._scopeFire("interactions:move", f), a || this.simulation || (this.interacting() && (f.type = null, this.move(f)), this.pointerWasMoved && nt(this.coords.prev, this.coords.cur));
2140
2153
  } }, { key: "move", value: function(e) {
@@ -2156,15 +2169,15 @@ function Vo() {
2156
2169
  } }, { key: "stop", value: function() {
2157
2170
  this._scopeFire("interactions:stop", { interaction: this }), this.interactable = this.element = null, this._interacting = !1, this._stopped = !0, this.prepared.name = this.prevEvent = null;
2158
2171
  } }, { key: "getPointerIndex", value: function(e) {
2159
- var n = Fe(e);
2172
+ var n = je(e);
2160
2173
  return this.pointerType === "mouse" || this.pointerType === "pen" ? this.pointers.length - 1 : He(this.pointers, (function(r) {
2161
2174
  return r.id === n;
2162
2175
  }));
2163
2176
  } }, { key: "getPointerInfo", value: function(e) {
2164
2177
  return this.pointers[this.getPointerIndex(e)];
2165
2178
  } }, { key: "updatePointer", value: function(e, n, r, o) {
2166
- var i, a, s, l = Fe(e), u = this.getPointerIndex(e), c = this.pointers[u];
2167
- return o = o !== !1 && (o || /(down|start)$/i.test(n.type)), c ? c.pointer = e : (c = new ir(l, e, n, null, null), u = this.pointers.length, this.pointers.push(c)), Fn(this.coords.cur, this.pointers.map((function(f) {
2179
+ var i, a, s, l = je(e), u = this.getPointerIndex(e), c = this.pointers[u];
2180
+ return o = o !== !1 && (o || /(down|start)$/i.test(n.type)), c ? c.pointer = e : (c = new ir(l, e, n, null, null), u = this.pointers.length, this.pointers.push(c)), jn(this.coords.cur, this.pointers.map((function(f) {
2168
2181
  return f.pointer;
2169
2182
  })), this._now()), i = this.coords.delta, a = this.coords.prev, s = this.coords.cur, i.page.x = s.page.x - a.page.x, i.page.y = s.page.y - a.page.y, i.client.x = s.client.x - a.client.x, i.client.y = s.client.y - a.client.y, i.timeStamp = s.timeStamp - a.timeStamp, o && (this.pointerIsDown = !0, c.downTime = this.coords.cur.timeStamp, c.downTarget = r, tt(this.downPointer, e), this.interacting() || (nt(this.coords.start, this.coords.cur), nt(this.coords.prev, this.coords.cur), this.downEvent = n, this.pointerWasMoved = !1)), this._updateLatestPointer(e, n, r), this._scopeFire("interactions:update-pointer", { pointer: e, event: n, eventTarget: r, down: o, pointerInfo: c, pointerIndex: u, interaction: this }), u;
2170
2183
  } }, { key: "removePointer", value: function(e, n) {
@@ -2199,13 +2212,13 @@ function Vo() {
2199
2212
  return !(!n.offset.pending.x && !n.offset.pending.y);
2200
2213
  })(t)) return !1;
2201
2214
  var e = t.offset.pending;
2202
- return It(t.coords.cur, e), It(t.coords.delta, e), et(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2215
+ return Pt(t.coords.cur, e), Pt(t.coords.delta, e), et(t.edges, t.rect, e), e.x = 0, e.y = 0, !0;
2203
2216
  }
2204
2217
  function cr(t) {
2205
2218
  var e = t.x, n = t.y;
2206
2219
  this.offset.pending.x += e, this.offset.pending.y += n, this.offset.total.x += e, this.offset.total.y += n;
2207
2220
  }
2208
- function It(t, e) {
2221
+ function Pt(t, e) {
2209
2222
  var n = t.page, r = t.client, o = e.x, i = e.y;
2210
2223
  n.x += o, n.y += i, r.x += o, r.y += i;
2211
2224
  }
@@ -2216,7 +2229,7 @@ function Vo() {
2216
2229
  t.interaction.offset = { total: { x: 0, y: 0 }, pending: { x: 0, y: 0 } };
2217
2230
  }, "interactions:update-pointer": function(t) {
2218
2231
  return (function(e) {
2219
- e.pointerIsDown && (It(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2232
+ e.pointerIsDown && (Pt(e.coords.cur, e.offset.total), e.offset.pending.x = 0, e.offset.pending.y = 0);
2220
2233
  })(t.interaction);
2221
2234
  }, "interactions:before-action-start": pn, "interactions:before-action-move": pn, "interactions:before-action-end": function(t) {
2222
2235
  var e = t.interaction;
@@ -2228,10 +2241,10 @@ function Vo() {
2228
2241
  function t(e) {
2229
2242
  m(this, t), this.active = !1, this.isModified = !1, this.smoothEnd = !1, this.allowResume = !1, this.modification = void 0, this.modifierCount = 0, this.modifierArg = void 0, this.startCoords = void 0, this.t0 = 0, this.v0 = 0, this.te = 0, this.targetOffset = void 0, this.modifiedOffset = void 0, this.currentOffset = void 0, this.lambda_v0 = 0, this.one_ve_v0 = 0, this.timeout = void 0, this.interaction = void 0, this.interaction = e;
2230
2243
  }
2231
- return E(t, [{ key: "start", value: function(e) {
2244
+ return x(t, [{ key: "start", value: function(e) {
2232
2245
  var n = this.interaction, r = lt(n);
2233
2246
  if (!r || !r.enabled) return !1;
2234
- var o = n.coords.velocity.client, i = je(o.x, o.y), a = this.modification || (this.modification = new Rt(n));
2247
+ var o = n.coords.velocity.client, i = Fe(o.x, o.y), a = this.modification || (this.modification = new Rt(n));
2235
2248
  if (a.copyFrom(n.modification), this.t0 = n._now(), this.allowResume = r.allowResume, this.v0 = i, this.currentOffset = { x: 0, y: 0 }, this.startCoords = n.coords.cur.page, this.modifierArg = a.fillArg({ pageCoords: this.startCoords, preEnd: !0, phase: "inertiastart" }), this.t0 - n.coords.cur.timeStamp < 50 && i > r.minSpeed && i > r.endSpeed) this.startInertia();
2236
2249
  else {
2237
2250
  if (a.result = a.setAll(this.modifierArg), !a.result.changed) return !1;
@@ -2336,7 +2349,7 @@ function Vo() {
2336
2349
  function t(e) {
2337
2350
  m(this, t), this.options = void 0, this.types = {}, this.propagationStopped = !1, this.immediatePropagationStopped = !1, this.global = void 0, this.options = I({}, e || {});
2338
2351
  }
2339
- return E(t, [{ key: "fire", value: function(e) {
2352
+ return x(t, [{ key: "fire", value: function(e) {
2340
2353
  var n, r = this.global;
2341
2354
  (n = this.types[e.type]) && gn(e, n), !e.propagationStopped && r && (n = r[e.type]) && gn(e, n);
2342
2355
  } }, { key: "on", value: function(e, n) {
@@ -2358,7 +2371,7 @@ function Vo() {
2358
2371
  function t(e) {
2359
2372
  m(this, t), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = e, tt(this, e);
2360
2373
  }
2361
- return E(t, [{ key: "preventOriginalDefault", value: function() {
2374
+ return x(t, [{ key: "preventOriginalDefault", value: function() {
2362
2375
  this.originalEvent.preventDefault();
2363
2376
  } }, { key: "stopPropagation", value: function() {
2364
2377
  this.originalEvent.stopPropagation();
@@ -2374,28 +2387,28 @@ function Vo() {
2374
2387
  }
2375
2388
  var vr = { id: "events", install: function(t) {
2376
2389
  var e, n = [], r = {}, o = [], i = { add: a, remove: s, addDelegate: function(c, f, y, C, k) {
2377
- var S = Ve(k);
2390
+ var T = Ve(k);
2378
2391
  if (!r[y]) {
2379
2392
  r[y] = [];
2380
- for (var A = 0; A < o.length; A++) {
2381
- var R = o[A];
2382
- a(R, y, l), a(R, y, u, !0);
2393
+ for (var R = 0; R < o.length; R++) {
2394
+ var M = o[R];
2395
+ a(M, y, l), a(M, y, u, !0);
2383
2396
  }
2384
2397
  }
2385
- var O = r[y], H = Be(O, (function(U) {
2386
- return U.selector === c && U.context === f;
2398
+ var O = r[y], B = Be(O, (function(K) {
2399
+ return K.selector === c && K.context === f;
2387
2400
  }));
2388
- H || (H = { selector: c, context: f, listeners: [] }, O.push(H)), H.listeners.push({ func: C, options: S });
2401
+ B || (B = { selector: c, context: f, listeners: [] }, O.push(B)), B.listeners.push({ func: C, options: T });
2389
2402
  }, removeDelegate: function(c, f, y, C, k) {
2390
- var S, A = Ve(k), R = r[y], O = !1;
2391
- if (R)
2392
- for (S = R.length - 1; S >= 0; S--) {
2393
- var H = R[S];
2394
- if (H.selector === c && H.context === f) {
2395
- for (var U = H.listeners, z = U.length - 1; z >= 0; z--) {
2396
- var V = U[z];
2397
- if (V.func === C && ct(V.options, A)) {
2398
- U.splice(z, 1), U.length || (R.splice(S, 1), s(f, y, l), s(f, y, u, !0)), O = !0;
2403
+ var T, R = Ve(k), M = r[y], O = !1;
2404
+ if (M)
2405
+ for (T = M.length - 1; T >= 0; T--) {
2406
+ var B = M[T];
2407
+ if (B.selector === c && B.context === f) {
2408
+ for (var K = B.listeners, N = K.length - 1; N >= 0; N--) {
2409
+ var Y = K[N];
2410
+ if (Y.func === C && ct(Y.options, R)) {
2411
+ K.splice(N, 1), K.length || (M.splice(T, 1), s(f, y, l), s(f, y, u, !0)), O = !0;
2399
2412
  break;
2400
2413
  }
2401
2414
  }
@@ -2405,55 +2418,55 @@ function Vo() {
2405
2418
  }, delegateListener: l, delegateUseCapture: u, delegatedEvents: r, documents: o, targets: n, supportsOptions: !1, supportsPassive: !1 };
2406
2419
  function a(c, f, y, C) {
2407
2420
  if (c.addEventListener) {
2408
- var k = Ve(C), S = Be(n, (function(A) {
2409
- return A.eventTarget === c;
2421
+ var k = Ve(C), T = Be(n, (function(R) {
2422
+ return R.eventTarget === c;
2410
2423
  }));
2411
- S || (S = { eventTarget: c, events: {} }, n.push(S)), S.events[f] || (S.events[f] = []), Be(S.events[f], (function(A) {
2412
- return A.func === y && ct(A.options, k);
2413
- })) || (c.addEventListener(f, y, i.supportsOptions ? k : k.capture), S.events[f].push({ func: y, options: k }));
2424
+ T || (T = { eventTarget: c, events: {} }, n.push(T)), T.events[f] || (T.events[f] = []), Be(T.events[f], (function(R) {
2425
+ return R.func === y && ct(R.options, k);
2426
+ })) || (c.addEventListener(f, y, i.supportsOptions ? k : k.capture), T.events[f].push({ func: y, options: k }));
2414
2427
  }
2415
2428
  }
2416
2429
  function s(c, f, y, C) {
2417
2430
  if (c.addEventListener && c.removeEventListener) {
2418
2431
  var k = He(n, (function(me) {
2419
2432
  return me.eventTarget === c;
2420
- })), S = n[k];
2421
- if (S && S.events) if (f !== "all") {
2422
- var A = !1, R = S.events[f];
2423
- if (R) {
2433
+ })), T = n[k];
2434
+ if (T && T.events) if (f !== "all") {
2435
+ var R = !1, M = T.events[f];
2436
+ if (M) {
2424
2437
  if (y === "all") {
2425
- for (var O = R.length - 1; O >= 0; O--) {
2426
- var H = R[O];
2427
- s(c, f, H.func, H.options);
2438
+ for (var O = M.length - 1; O >= 0; O--) {
2439
+ var B = M[O];
2440
+ s(c, f, B.func, B.options);
2428
2441
  }
2429
2442
  return;
2430
2443
  }
2431
- for (var U = Ve(C), z = 0; z < R.length; z++) {
2432
- var V = R[z];
2433
- if (V.func === y && ct(V.options, U)) {
2434
- c.removeEventListener(f, y, i.supportsOptions ? U : U.capture), R.splice(z, 1), R.length === 0 && (delete S.events[f], A = !0);
2444
+ for (var K = Ve(C), N = 0; N < M.length; N++) {
2445
+ var Y = M[N];
2446
+ if (Y.func === y && ct(Y.options, K)) {
2447
+ c.removeEventListener(f, y, i.supportsOptions ? K : K.capture), M.splice(N, 1), M.length === 0 && (delete T.events[f], R = !0);
2435
2448
  break;
2436
2449
  }
2437
2450
  }
2438
2451
  }
2439
- A && !Object.keys(S.events).length && n.splice(k, 1);
2440
- } else for (f in S.events) S.events.hasOwnProperty(f) && s(c, f, "all");
2452
+ R && !Object.keys(T.events).length && n.splice(k, 1);
2453
+ } else for (f in T.events) T.events.hasOwnProperty(f) && s(c, f, "all");
2441
2454
  }
2442
2455
  }
2443
2456
  function l(c, f) {
2444
- for (var y = Ve(f), C = new hr(c), k = r[c.type], S = Yt(c)[0], A = S; b.element(A); ) {
2445
- for (var R = 0; R < k.length; R++) {
2446
- var O = k[R], H = O.selector, U = O.context;
2447
- if (he(A, H) && se(U, S) && se(U, A)) {
2448
- var z = O.listeners;
2449
- C.currentTarget = A;
2450
- for (var V = 0; V < z.length; V++) {
2451
- var me = z[V];
2457
+ for (var y = Ve(f), C = new hr(c), k = r[c.type], T = Yt(c)[0], R = T; b.element(R); ) {
2458
+ for (var M = 0; M < k.length; M++) {
2459
+ var O = k[M], B = O.selector, K = O.context;
2460
+ if (he(R, B) && se(K, T) && se(K, R)) {
2461
+ var N = O.listeners;
2462
+ C.currentTarget = R;
2463
+ for (var Y = 0; Y < N.length; Y++) {
2464
+ var me = N[Y];
2452
2465
  ct(me.options, y) && me.func(C);
2453
2466
  }
2454
2467
  }
2455
2468
  }
2456
- A = fe(A);
2469
+ R = fe(R);
2457
2470
  }
2458
2471
  }
2459
2472
  function u(c) {
@@ -2464,9 +2477,9 @@ function Vo() {
2464
2477
  }, get passive() {
2465
2478
  return i.supportsPassive = !0;
2466
2479
  } }), t.events = i, i;
2467
- } }, Ot = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2468
- for (var e = 0, n = Ot.methodOrder; e < n.length; e++) {
2469
- var r = n[e], o = Ot[r](t);
2480
+ } }, It = { methodOrder: ["simulationResume", "mouseOrPen", "hasPointer", "idle"], search: function(t) {
2481
+ for (var e = 0, n = It.methodOrder; e < n.length; e++) {
2482
+ var r = n[e], o = It[r](t);
2470
2483
  if (o) return o;
2471
2484
  }
2472
2485
  return null;
@@ -2520,30 +2533,30 @@ function Vo() {
2520
2533
  return n.id === e;
2521
2534
  }));
2522
2535
  }
2523
- var mr = Ot, Pt = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2536
+ var mr = It, Ot = ["pointerDown", "pointerMove", "pointerUp", "updatePointer", "removePointer", "windowBlur"];
2524
2537
  function xn(t, e) {
2525
2538
  return function(n) {
2526
2539
  var r = e.interactions.list, o = Vt(n), i = Yt(n), a = i[0], s = i[1], l = [];
2527
2540
  if (/^touch/.test(n.type)) {
2528
2541
  e.prevTouchTime = e.now();
2529
2542
  for (var u = 0, c = n.changedTouches; u < c.length; u++) {
2530
- var f = c[u], y = { pointer: f, pointerId: Fe(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, C = En(y);
2543
+ var f = c[u], y = { pointer: f, pointerId: je(f), pointerType: o, eventType: n.type, eventTarget: a, curEventTarget: s, scope: e }, C = En(y);
2531
2544
  l.push([y.pointer, y.eventTarget, y.curEventTarget, C]);
2532
2545
  }
2533
2546
  } else {
2534
2547
  var k = !1;
2535
- if (!Q.supportsPointerEvent && /mouse/.test(n.type)) {
2536
- for (var S = 0; S < r.length && !k; S++) k = r[S].pointerType !== "mouse" && r[S].pointerIsDown;
2548
+ if (!ee.supportsPointerEvent && /mouse/.test(n.type)) {
2549
+ for (var T = 0; T < r.length && !k; T++) k = r[T].pointerType !== "mouse" && r[T].pointerIsDown;
2537
2550
  k = k || e.now() - e.prevTouchTime < 500 || n.timeStamp === 0;
2538
2551
  }
2539
2552
  if (!k) {
2540
- var A = { pointer: n, pointerId: Fe(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, R = En(A);
2541
- l.push([A.pointer, A.eventTarget, A.curEventTarget, R]);
2553
+ var R = { pointer: n, pointerId: je(n), pointerType: o, eventType: n.type, curEventTarget: s, eventTarget: a, scope: e }, M = En(R);
2554
+ l.push([R.pointer, R.eventTarget, R.curEventTarget, M]);
2542
2555
  }
2543
2556
  }
2544
2557
  for (var O = 0; O < l.length; O++) {
2545
- var H = l[O], U = H[0], z = H[1], V = H[2];
2546
- H[3][t](U, n, z, V);
2558
+ var B = l[O], K = B[0], N = B[1], Y = B[2];
2559
+ B[3][t](K, n, N, Y);
2547
2560
  }
2548
2561
  };
2549
2562
  }
@@ -2560,11 +2573,11 @@ function Vo() {
2560
2573
  }
2561
2574
  }
2562
2575
  var gr = { id: "core/interactions", install: function(t) {
2563
- for (var e = {}, n = 0; n < Pt.length; n++) {
2564
- var r = Pt[n];
2576
+ for (var e = {}, n = 0; n < Ot.length; n++) {
2577
+ var r = Ot[n];
2565
2578
  e[r] = xn(r, t);
2566
2579
  }
2567
- var o, i = Q.pEventTypes;
2580
+ var o, i = ee.pEventTypes;
2568
2581
  function a() {
2569
2582
  for (var s = 0, l = t.interactions.list; s < l.length; s++) {
2570
2583
  var u = l[s];
@@ -2576,16 +2589,16 @@ function Vo() {
2576
2589
  }, f = 0, y = u.pointers; f < y.length; f++) c();
2577
2590
  }
2578
2591
  }
2579
- (o = q.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) {
2592
+ (o = W.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) {
2580
2593
  for (var l = 0, u = t.interactions.list; l < u.length; l++)
2581
2594
  u[l].documentBlur(s);
2582
2595
  } }), t.prevTouchTime = 0, t.Interaction = (function(s) {
2583
- M(u, s);
2596
+ _(u, s);
2584
2597
  var l = P(u);
2585
2598
  function u() {
2586
2599
  return m(this, u), l.apply(this, arguments);
2587
2600
  }
2588
- return E(u, [{ key: "pointerMoveTolerance", get: function() {
2601
+ return x(u, [{ key: "pointerMoveTolerance", get: function() {
2589
2602
  return t.interactions.pointerMoveTolerance;
2590
2603
  }, set: function(c) {
2591
2604
  t.interactions.pointerMoveTolerance = c;
@@ -2608,13 +2621,13 @@ function Vo() {
2608
2621
  var o = e.interactions.list[r];
2609
2622
  o.interactable === n && (o.stop(), e.fire("interactions:destroy", { interaction: o }), o.destroy(), e.interactions.list.length > 2 && e.interactions.list.splice(r, 1));
2610
2623
  }
2611
- } }, onDocSignal: Dt, doOnInteractions: xn, methodNames: Pt }, yr = gr, Me = (function(t) {
2624
+ } }, onDocSignal: Dt, doOnInteractions: xn, methodNames: Ot }, yr = gr, Me = (function(t) {
2612
2625
  return t[t.On = 0] = "On", t[t.Off = 1] = "Off", t;
2613
2626
  })(Me || {}), br = (function() {
2614
2627
  function t(e, n, r, o) {
2615
- m(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new yn(), 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(we(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2628
+ m(this, t), this.target = void 0, this.options = void 0, this._actions = void 0, this.events = new yn(), 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 = te(we(e) ? this._context : e), this._doc = this._win.document, this._scopeEvents = o, this.set(n);
2616
2629
  }
2617
- return E(t, [{ key: "_defaults", get: function() {
2630
+ return x(t, [{ key: "_defaults", get: function() {
2618
2631
  return { base: {}, perAction: {}, actions: {} };
2619
2632
  } }, { key: "setOnEvents", value: function(e, n) {
2620
2633
  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;
@@ -2657,16 +2670,16 @@ function Vo() {
2657
2670
  } }, { key: "testIgnoreAllow", value: function(e, n, r) {
2658
2671
  return !this.testIgnore(e.ignoreFrom, n, r) && this.testAllow(e.allowFrom, n, r);
2659
2672
  } }, { key: "testAllow", value: function(e, n, r) {
2660
- return !e || !!b.element(r) && (b.string(e) ? j(r, e, n) : !!b.element(e) && se(e, r));
2673
+ return !e || !!b.element(r) && (b.string(e) ? L(r, e, n) : !!b.element(e) && se(e, r));
2661
2674
  } }, { key: "testIgnore", value: function(e, n, r) {
2662
- return !(!e || !b.element(r)) && (b.string(e) ? j(r, e, n) : !!b.element(e) && se(e, r));
2675
+ return !(!e || !b.element(r)) && (b.string(e) ? L(r, e, n) : !!b.element(e) && se(e, r));
2663
2676
  } }, { key: "fire", value: function(e) {
2664
2677
  return this.events.fire(e), this;
2665
2678
  } }, { key: "_onOff", value: function(e, n, r, o, i) {
2666
2679
  b.object(n) && !b.array(n) && (o = r, r = null);
2667
2680
  var a = Ae(n, r, i);
2668
2681
  for (var s in a) {
2669
- s === "wheel" && (s = Q.wheelEvent);
2682
+ s === "wheel" && (s = ee.wheelEvent);
2670
2683
  for (var l = 0, u = a[s]; l < u.length; l++) {
2671
2684
  var c = u[l];
2672
2685
  at(s, this._actions) ? this.events[e === Me.On ? "on" : "off"](s, c) : b.string(this.target) ? this._scopeEvents[e === Me.On ? "addDelegate" : "removeDelegate"](this.target, this._context, s, c, o) : this._scopeEvents[e === Me.On ? "add" : "remove"](this.target, s, c, o);
@@ -2703,7 +2716,7 @@ function Vo() {
2703
2716
  a.splice(s, 1);
2704
2717
  } });
2705
2718
  }
2706
- return E(t, [{ key: "new", value: function(e, n) {
2719
+ return x(t, [{ key: "new", value: function(e, n) {
2707
2720
  n = I(n || {}, { actions: this.scope.actions });
2708
2721
  var r = new this.scope.Interactable(e, n, this.scope.document, this.scope.events);
2709
2722
  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;
@@ -2721,7 +2734,7 @@ function Vo() {
2721
2734
  })(), Er = (function() {
2722
2735
  function t() {
2723
2736
  var e = this;
2724
- m(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = Q, this.defaults = De(un), this.Eventable = yn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
2737
+ m(this, t), this.id = "__interact_scope_".concat(Math.floor(100 * Math.random())), this.isInitialized = !1, this.listenerMaps = [], this.browser = ee, this.defaults = De(un), this.Eventable = yn, this.actions = { map: {}, phases: { start: !0, move: !0, end: !0 }, methodDict: {}, phaselessTypes: {} }, this.interactStatic = (function(r) {
2725
2738
  var o = function i(a, s) {
2726
2739
  var l = r.interactables.getExisting(a, s);
2727
2740
  return l || ((l = r.interactables.new(a, s)).events.global = i.globalEvents), l;
@@ -2760,9 +2773,9 @@ function Vo() {
2760
2773
  }), "The interact.off() method is being deprecated"), o.debug = function() {
2761
2774
  return this.scope;
2762
2775
  }, o.supportsTouch = function() {
2763
- return Q.supportsTouch;
2776
+ return ee.supportsTouch;
2764
2777
  }, o.supportsPointerEvent = function() {
2765
- return Q.supportsPointerEvent;
2778
+ return ee.supportsPointerEvent;
2766
2779
  }, o.stop = function() {
2767
2780
  for (var i = 0, a = this.scope.interactions.list; i < a.length; i++) a[i].stop();
2768
2781
  return this;
@@ -2778,23 +2791,23 @@ function Vo() {
2778
2791
  };
2779
2792
  var n = this;
2780
2793
  this.Interactable = (function(r) {
2781
- M(i, r);
2794
+ _(i, r);
2782
2795
  var o = P(i);
2783
2796
  function i() {
2784
2797
  return m(this, i), o.apply(this, arguments);
2785
2798
  }
2786
- return E(i, [{ key: "_defaults", get: function() {
2799
+ return x(i, [{ key: "_defaults", get: function() {
2787
2800
  return n.defaults;
2788
2801
  } }, { key: "set", value: function(a) {
2789
- return te(_(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2802
+ return q(A(i.prototype), "set", this).call(this, a), n.fire("interactable:set", { options: a, interactable: this }), this;
2790
2803
  } }, { key: "unset", value: function() {
2791
- te(_(i.prototype), "unset", this).call(this);
2804
+ q(A(i.prototype), "unset", this).call(this);
2792
2805
  var a = n.interactables.list.indexOf(this);
2793
2806
  a < 0 || (n.interactables.list.splice(a, 1), n.fire("interactable:unset", { interactable: this }));
2794
2807
  } }]), i;
2795
2808
  })(br);
2796
2809
  }
2797
- return E(t, [{ key: "addListeners", value: function(e, n) {
2810
+ return x(t, [{ key: "addListeners", value: function(e, n) {
2798
2811
  this.listenerMaps.push({ id: n, map: e });
2799
2812
  } }, { key: "fire", value: function(e, n) {
2800
2813
  for (var r = 0, o = this.listenerMaps; r < o.length; r++) {
@@ -2803,7 +2816,7 @@ function Vo() {
2803
2816
  }
2804
2817
  } }, { key: "init", value: function(e) {
2805
2818
  return this.isInitialized ? this : (function(n, r) {
2806
- return n.isInitialized = !0, b.window(r) && ne(r), q.init(r), Q.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(yr), n.usePlugin(vr), n;
2819
+ return n.isInitialized = !0, b.window(r) && re(r), W.init(r), ee.init(r), Te.init(r), n.window = r, n.document = r.document, n.usePlugin(yr), n.usePlugin(vr), n;
2807
2820
  })(this, e);
2808
2821
  } }, { key: "pluginIsInstalled", value: function(e) {
2809
2822
  var n = e.id;
@@ -2823,10 +2836,10 @@ function Vo() {
2823
2836
  return this;
2824
2837
  } }, { key: "addDocument", value: function(e, n) {
2825
2838
  if (this.getDocIndex(e) !== -1) return !1;
2826
- var r = Z(e);
2839
+ var r = te(e);
2827
2840
  n = n ? I({}, 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 });
2828
2841
  } }, { key: "removeDocument", value: function(e) {
2829
- var n = this.getDocIndex(e), r = Z(e), o = this.documents[n].options;
2842
+ var n = this.getDocIndex(e), r = te(e), o = this.documents[n].options;
2830
2843
  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 });
2831
2844
  } }, { key: "getDocIndex", value: function(e) {
2832
2845
  for (var n = 0; n < this.documents.length; n++) if (this.documents[n].doc === e) return n;
@@ -2851,8 +2864,8 @@ function Vo() {
2851
2864
  return o in t || i in t;
2852
2865
  })), n = function(r, o) {
2853
2866
  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, u = l === void 0 ? { x: 0, y: 0 } : l, c = { range: i, grid: t, x: null, y: null }, f = 0; f < e.length; f++) {
2854
- var y = e[f], C = y[0], k = y[1], S = Math.round((r - u.x) / t[C]), A = Math.round((o - u.y) / t[k]);
2855
- c[C] = Math.max(s.left, Math.min(s.right, S * t[C] + u.x)), c[k] = Math.max(s.top, Math.min(s.bottom, A * t[k] + u.y));
2867
+ var y = e[f], C = y[0], k = y[1], T = Math.round((r - u.x) / t[C]), R = Math.round((o - u.y) / t[k]);
2868
+ c[C] = Math.max(s.left, Math.min(s.right, T * t[C] + u.x)), c[k] = Math.max(s.top, Math.min(s.bottom, R * t[k] + u.y));
2856
2869
  }
2857
2870
  return c;
2858
2871
  };
@@ -2898,13 +2911,13 @@ function Vo() {
2898
2911
  };
2899
2912
  Cn._defaults = {};
2900
2913
  var ut = Cn;
2901
- function Oe(t, e, n) {
2914
+ function Ie(t, e, n) {
2902
2915
  return b.func(t) ? ze(t, e.interactable, e.element, [n.x, n.y, e]) : ze(t, e.interactable, e.element);
2903
2916
  }
2904
2917
  var dt = { start: function(t) {
2905
2918
  var e = t.rect, n = t.startOffset, r = t.state, o = t.interaction, i = t.pageCoords, a = r.options, s = a.elementRect, l = I({ left: 0, top: 0, right: 0, bottom: 0 }, a.offset || {});
2906
2919
  if (e && s) {
2907
- var u = Oe(a.restriction, o, i);
2920
+ var u = Ie(a.restriction, o, i);
2908
2921
  if (u) {
2909
2922
  var c = u.right - u.left - e.width, f = u.bottom - u.top - e.height;
2910
2923
  c < 0 && (l.left += c, l.right += c), f < 0 && (l.top += f, l.bottom += f);
@@ -2913,7 +2926,7 @@ function Vo() {
2913
2926
  }
2914
2927
  r.offset = l;
2915
2928
  }, set: function(t) {
2916
- var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Oe(o.restriction, n, e);
2929
+ var e = t.coords, n = t.interaction, r = t.state, o = r.options, i = r.offset, a = Ie(o.restriction, n, e);
2917
2930
  if (a) {
2918
2931
  var s = (function(l) {
2919
2932
  return !l || "left" in l && "top" in l || ((l = I({}, 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;
@@ -2930,28 +2943,28 @@ function Vo() {
2930
2943
  }
2931
2944
  var Ye = { noInner: Sn, noOuter: Tn, start: function(t) {
2932
2945
  var e, n = t.interaction, r = t.startOffset, o = t.state, i = o.options;
2933
- i && (e = Ze(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 };
2946
+ i && (e = Ze(Ie(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 };
2934
2947
  }, set: function(t) {
2935
2948
  var e = t.coords, n = t.edges, r = t.interaction, o = t.state, i = o.offset, a = o.options;
2936
2949
  if (n) {
2937
- var s = I({}, e), l = Oe(a.inner, r, s) || {}, u = Oe(a.outer, r, s) || {};
2950
+ var s = I({}, e), l = Ie(a.inner, r, s) || {}, u = Ie(a.outer, r, s) || {};
2938
2951
  _n(l, Sn), _n(u, Tn), n.top ? e.y = Math.min(Math.max(u.top + i.top, s.y), l.top + i.top) : n.bottom && (e.y = Math.max(Math.min(u.bottom + i.bottom, s.y), l.bottom + i.bottom)), n.left ? e.x = Math.min(Math.max(u.left + i.left, s.x), l.left + i.left) : n.right && (e.x = Math.max(Math.min(u.right + i.right, s.x), l.right + i.right));
2939
2952
  }
2940
- }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Ir = _e(Ye, "restrictEdges"), Or = I({ get elementRect() {
2953
+ }, defaults: { inner: null, outer: null, offset: null, endOnly: !1, enabled: !1 } }, Pr = _e(Ye, "restrictEdges"), Ir = I({ get elementRect() {
2941
2954
  return { top: 0, left: 0, bottom: 1, right: 1 };
2942
2955
  }, set elementRect(t) {
2943
- } }, dt.defaults), Pr = _e({ start: dt.start, set: dt.set, defaults: Or }, "restrictRect"), Dr = { width: -1 / 0, height: -1 / 0 }, Nr = { width: 1 / 0, height: 1 / 0 }, zr = _e({ start: function(t) {
2956
+ } }, dt.defaults), Or = _e({ start: dt.start, set: dt.set, defaults: Ir }, "restrictRect"), Dr = { width: -1 / 0, height: -1 / 0 }, Nr = { width: 1 / 0, height: 1 / 0 }, zr = _e({ start: function(t) {
2944
2957
  return Ye.start(t);
2945
2958
  }, set: function(t) {
2946
2959
  var e = t.interaction, n = t.state, r = t.rect, o = t.edges, i = n.options;
2947
2960
  if (o) {
2948
- var a = vt(Oe(i.min, e, t.coords)) || Dr, s = vt(Oe(i.max, e, t.coords)) || Nr;
2961
+ var a = vt(Ie(i.min, e, t.coords)) || Dr, s = vt(Ie(i.max, e, t.coords)) || Nr;
2949
2962
  n.options = { endOnly: i.endOnly, inner: I({}, Ye.noInner), outer: I({}, Ye.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), Ye.set(t), n.options = i;
2950
2963
  }
2951
2964
  }, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), Nt = { start: function(t) {
2952
2965
  var e, n = t.interaction, r = t.interactable, o = t.element, i = t.rect, a = t.state, s = t.startOffset, l = a.options, u = l.offsetWithOrigin ? (function(y) {
2953
- var C = y.interaction.element, k = Ze(ze(y.state.options.origin, null, null, [C])), S = k || Le(y.interactable, C, y.interaction.prepared.name);
2954
- return S;
2966
+ var C = y.interaction.element, k = Ze(ze(y.state.options.origin, null, null, [C])), T = k || Le(y.interactable, C, y.interaction.prepared.name);
2967
+ return T;
2955
2968
  })(t) : { x: 0, y: 0 };
2956
2969
  if (l.offset === "startCoords") e = { x: n.coords.start.page.x, y: n.coords.start.page.y };
2957
2970
  else {
@@ -2965,13 +2978,13 @@ function Vo() {
2965
2978
  }, set: function(t) {
2966
2979
  var e = t.interaction, n = t.coords, r = t.state, o = r.options, i = r.offsets, a = Le(e.interactable, e.element, e.prepared.name), s = I({}, n), l = [];
2967
2980
  o.offsetWithOrigin || (s.x -= a.x, s.y -= a.y);
2968
- for (var u = 0, c = i; u < c.length; u++) for (var f = c[u], y = s.x - f.x, C = s.y - f.y, k = 0, S = o.targets.length; k < S; k++) {
2969
- var A = o.targets[k], R = void 0;
2970
- (R = b.func(A) ? A(y, C, e._proxy, f, k) : A) && l.push({ x: (b.number(R.x) ? R.x : y) + f.x, y: (b.number(R.y) ? R.y : C) + f.y, range: b.number(R.range) ? R.range : o.range, source: A, index: k, offset: f });
2981
+ for (var u = 0, c = i; u < c.length; u++) for (var f = c[u], y = s.x - f.x, C = s.y - f.y, k = 0, T = o.targets.length; k < T; k++) {
2982
+ var R = o.targets[k], M = void 0;
2983
+ (M = b.func(R) ? R(y, C, e._proxy, f, k) : R) && l.push({ x: (b.number(M.x) ? M.x : y) + f.x, y: (b.number(M.y) ? M.y : C) + f.y, range: b.number(M.range) ? M.range : o.range, source: R, index: k, offset: f });
2971
2984
  }
2972
- for (var O = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, H = 0; H < l.length; H++) {
2973
- var U = l[H], z = U.range, V = U.x - s.x, me = U.y - s.y, ae = je(V, me), ge = ae <= z;
2974
- z === 1 / 0 && O.inRange && O.range !== 1 / 0 && (ge = !1), O.target && !(ge ? O.inRange && z !== 1 / 0 ? ae / z < O.distance / O.range : z === 1 / 0 && O.range !== 1 / 0 || ae < O.distance : !O.inRange && ae < O.distance) || (O.target = U, O.distance = ae, O.range = z, O.inRange = ge, O.delta.x = V, O.delta.y = me);
2985
+ for (var O = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, B = 0; B < l.length; B++) {
2986
+ var K = l[B], N = K.range, Y = K.x - s.x, me = K.y - s.y, ae = Fe(Y, me), ge = ae <= N;
2987
+ N === 1 / 0 && O.inRange && O.range !== 1 / 0 && (ge = !1), O.target && !(ge ? O.inRange && N !== 1 / 0 ? ae / N < O.distance / O.range : N === 1 / 0 && O.range !== 1 / 0 || ae < O.distance : !O.inRange && ae < O.distance) || (O.target = K, O.distance = ae, O.range = N, O.inRange = ge, O.delta.x = Y, O.delta.y = me);
2975
2988
  }
2976
2989
  return O.inRange && (n.x = O.target.x, n.y = O.target.y), r.closest = O, O;
2977
2990
  }, defaults: { range: 1 / 0, targets: null, offset: null, offsetWithOrigin: !0, origin: null, relativePoints: null, endOnly: !1, enabled: !1 } }, Lr = _e(Nt, "snap"), pt = { start: function(t) {
@@ -2985,32 +2998,32 @@ function Vo() {
2985
2998
  var u = l[s], c = void 0;
2986
2999
  if (c = b.func(u) ? u(a.x, a.y, e) : u) {
2987
3000
  for (var f = 0, y = n.targetFields; f < y.length; f++) {
2988
- var C = y[f], k = C[0], S = C[1];
2989
- if (k in c || S in c) {
2990
- c.x = c[k], c.y = c[S];
3001
+ var C = y[f], k = C[0], T = C[1];
3002
+ if (k in c || T in c) {
3003
+ c.x = c[k], c.y = c[T];
2991
3004
  break;
2992
3005
  }
2993
3006
  }
2994
3007
  n.options.targets.push(c);
2995
3008
  }
2996
3009
  }
2997
- var A = Nt.set(t);
2998
- return n.options = o, A;
2999
- }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, jr = _e(pt, "snapSize"), zt = { aspectRatio: Rr, restrictEdges: Ir, restrict: Ar, restrictRect: Pr, restrictSize: zr, snapEdges: _e({ start: function(t) {
3010
+ var R = Nt.set(t);
3011
+ return n.options = o, R;
3012
+ }, defaults: { range: 1 / 0, targets: null, offset: null, endOnly: !1, enabled: !1 } }, Fr = _e(pt, "snapSize"), zt = { aspectRatio: Rr, restrictEdges: Pr, restrict: Ar, restrictRect: Or, restrictSize: zr, snapEdges: _e({ start: function(t) {
3000
3013
  var e = t.edges;
3001
3014
  return e ? (t.state.targetFields = t.state.targetFields || [[e.left ? "left" : "right", e.top ? "top" : "bottom"]], pt.start(t)) : null;
3002
- }, set: pt.set, defaults: I(De(pt.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Lr, snapSize: jr, spring: ut, avoid: ut, transform: ut, rubberband: ut }, Fr = { id: "modifiers", install: function(t) {
3015
+ }, set: pt.set, defaults: I(De(pt.defaults), { targets: void 0, range: void 0, offset: { x: 0, y: 0 } }) }, "snapEdges"), snap: Lr, snapSize: Fr, spring: ut, avoid: ut, transform: ut, rubberband: ut }, jr = { id: "modifiers", install: function(t) {
3003
3016
  var e = t.interactStatic;
3004
3017
  for (var n in t.usePlugin(cn), t.usePlugin(Sr), e.modifiers = zt, zt) {
3005
3018
  var r = zt[n], o = r._defaults, i = r._methods;
3006
3019
  o._methods = i, t.defaults.perAction[n] = o;
3007
3020
  }
3008
- } }, Hr = Fr, Mn = (function(t) {
3009
- M(n, t);
3021
+ } }, Hr = jr, Mn = (function(t) {
3022
+ _(n, t);
3010
3023
  var e = P(n);
3011
3024
  function n(r, o, i, a, s, l) {
3012
3025
  var u;
3013
- if (m(this, n), tt(B(u = e.call(this, s)), i), i !== o && tt(B(u), o), u.timeStamp = l, u.originalEvent = i, u.type = r, u.pointerId = Fe(o), u.pointerType = Vt(o), u.target = a, u.currentTarget = null, r === "tap") {
3026
+ if (m(this, n), tt(G(u = e.call(this, s)), i), i !== o && tt(G(u), o), u.timeStamp = l, u.originalEvent = i, u.type = r, u.pointerId = je(o), u.pointerType = Vt(o), u.target = a, u.currentTarget = null, r === "tap") {
3014
3027
  var c = s.getPointerIndex(o);
3015
3028
  u.dt = u.timeStamp - s.pointers[c].downTime;
3016
3029
  var f = u.timeStamp - s.tapTime;
@@ -3018,7 +3031,7 @@ function Vo() {
3018
3031
  } else r === "doubletap" && (u.dt = o.timeStamp - s.tapTime, u.double = !0);
3019
3032
  return u;
3020
3033
  }
3021
- return E(n, [{ key: "_subtractOrigin", value: function(r) {
3034
+ return x(n, [{ key: "_subtractOrigin", value: function(r) {
3022
3035
  var o = r.x, i = r.y;
3023
3036
  return this.pageX -= o, this.pageY -= i, this.clientX -= o, this.clientY -= i, this;
3024
3037
  } }, { key: "_addOrigin", value: function(r) {
@@ -3045,9 +3058,9 @@ function Vo() {
3045
3058
  f.node = C, r.fire("pointerEvents:collect-targets", f);
3046
3059
  }
3047
3060
  if (f.targets.length) {
3048
- for (var k = 1 / 0, S = 0, A = f.targets; S < A.length; S++) {
3049
- var R = A[S].eventable.options.holdDuration;
3050
- R < k && (k = R);
3061
+ for (var k = 1 / 0, T = 0, R = f.targets; T < R.length; T++) {
3062
+ var M = R[T].eventable.options.holdDuration;
3063
+ M < k && (k = M);
3051
3064
  }
3052
3065
  u.duration = k, u.timeout = setTimeout((function() {
3053
3066
  Re({ interaction: o, eventTarget: s, pointer: i, event: a, type: "hold" }, r);
@@ -3072,8 +3085,8 @@ function Vo() {
3072
3085
  if (u._subtractOrigin(k), u.eventable = y.eventable, u.currentTarget = y.node, y.eventable.fire(u), u._addOrigin(k), u.immediatePropagationStopped || u.propagationStopped && f + 1 < l.length && l[f + 1].node !== u.currentTarget) break;
3073
3086
  }
3074
3087
  if (e.fire("pointerEvents:fired", c), a === "tap") {
3075
- var S = u.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : u;
3076
- n.prevTap = S, n.tapTime = S.timeStamp;
3088
+ var T = u.double ? Re({ interaction: n, pointer: r, event: o, eventTarget: i, type: "doubletap" }, e) : u;
3089
+ n.prevTap = T, n.tapTime = T.timeStamp;
3077
3090
  }
3078
3091
  return u;
3079
3092
  }
@@ -3085,8 +3098,8 @@ function Vo() {
3085
3098
  c.node = y, e.fire("pointerEvents:collect-targets", c);
3086
3099
  }
3087
3100
  return a === "hold" && (c.targets = c.targets.filter((function(C) {
3088
- var k, S;
3089
- return C.eventable.options.holdDuration === ((k = n.pointers[s]) == null || (S = k.hold) == null ? void 0 : S.duration);
3101
+ var k, T;
3102
+ return C.eventable.options.holdDuration === ((k = n.pointers[s]) == null || (T = k.hold) == null ? void 0 : T.duration);
3090
3103
  }))), c.targets;
3091
3104
  }
3092
3105
  function Lt(t) {
@@ -3148,15 +3161,15 @@ function Vo() {
3148
3161
  for (var a = r.getAllElements(), s = i.window.Promise, l = s ? [] : null, u = function() {
3149
3162
  var f = a[c], y = r.getRect(f);
3150
3163
  if (!y) return 1;
3151
- var C, k = Be(i.interactions.list, (function(R) {
3152
- return R.interacting() && R.interactable === r && R.element === f && R.prepared.name === o.name;
3164
+ var C, k = Be(i.interactions.list, (function(M) {
3165
+ return M.interacting() && M.interactable === r && M.element === f && M.prepared.name === o.name;
3153
3166
  }));
3154
- if (k) k.move(), l && (C = k._reflowPromise || new s((function(R) {
3155
- k._reflowResolve = R;
3167
+ if (k) k.move(), l && (C = k._reflowPromise || new s((function(M) {
3168
+ k._reflowResolve = M;
3156
3169
  })));
3157
3170
  else {
3158
- var S = vt(y), A = /* @__PURE__ */ (function(R) {
3159
- return { coords: R, get page() {
3171
+ var T = vt(y), R = /* @__PURE__ */ (function(M) {
3172
+ return { coords: M, get page() {
3160
3173
  return this.coords.page;
3161
3174
  }, get client() {
3162
3175
  return this.coords.client;
@@ -3182,15 +3195,15 @@ function Vo() {
3182
3195
  return this.coords.buttons;
3183
3196
  }, preventDefault: function() {
3184
3197
  } };
3185
- })({ page: { x: S.x, y: S.y }, client: { x: S.x, y: S.y }, timeStamp: i.now() });
3186
- C = (function(R, O, H, U, z) {
3187
- var V = R.interactions.new({ pointerType: "reflow" }), me = { interaction: V, event: z, pointer: z, eventTarget: H, phase: "reflow" };
3188
- V.interactable = O, V.element = H, V.prevEvent = z, V.updatePointer(z, z, H, !0), Ht(V.coords.delta), St(V.prepared, U), V._doPhase(me);
3189
- var ae = R.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3190
- V._reflowResolve = Se;
3198
+ })({ page: { x: T.x, y: T.y }, client: { x: T.x, y: T.y }, timeStamp: i.now() });
3199
+ C = (function(M, O, B, K, N) {
3200
+ var Y = M.interactions.new({ pointerType: "reflow" }), me = { interaction: Y, event: N, pointer: N, eventTarget: B, phase: "reflow" };
3201
+ Y.interactable = O, Y.element = B, Y.prevEvent = N, Y.updatePointer(N, N, B, !0), Ht(Y.coords.delta), St(Y.prepared, K), Y._doPhase(me);
3202
+ var ae = M.window, ge = ae.Promise, be = ge ? new ge((function(Se) {
3203
+ Y._reflowResolve = Se;
3191
3204
  })) : void 0;
3192
- return V._reflowPromise = be, V.start(U, O, H), V._interacting ? (V.move(me), V.end(z)) : (V.stop(), V._reflowResolve()), V.removePointer(z, z), be;
3193
- })(i, r, f, o, A);
3205
+ return Y._reflowPromise = be, Y.start(K, O, B), Y._interacting ? (Y.move(me), Y.end(N)) : (Y.stop(), Y._reflowResolve()), Y.removePointer(N, N), be;
3206
+ })(i, r, f, o, R);
3194
3207
  }
3195
3208
  l && l.push(C);
3196
3209
  }, c = 0; c < a.length && !u(); c++) ;
@@ -3214,31 +3227,31 @@ function Vo() {
3214
3227
  })(Ke, Ke.exports)), Ke.exports;
3215
3228
  }
3216
3229
  var Yo = /* @__PURE__ */ Vo();
3217
- const jt = /* @__PURE__ */ qo(Yo);
3218
- function On(h) {
3230
+ const Ft = /* @__PURE__ */ qo(Yo);
3231
+ function In(h) {
3219
3232
  const v = document.createElement("input");
3220
3233
  v.type = "file", v.accept = "image/*", v.onchange = (p) => {
3221
3234
  const d = p.target.files?.[0];
3222
3235
  if (d) {
3223
3236
  const g = new FileReader();
3224
3237
  g.onload = (m) => {
3225
- const x = document.createElement("img");
3226
- x.src = m.target?.result, x.style.maxWidth = "100%", x.style.width = "100%", x.style.height = "auto", x.style.cursor = "pointer", x.draggable = !1;
3227
- const E = document.createElement("div");
3228
- E.className = "editor-image-wrapper", E.style.display = "inline-block", E.style.position = "relative", E.style.maxWidth = "100%", E.style.width = "auto", E.style.height = "auto", E.contentEditable = "false", E.style.boxSizing = "border-box", E.style.touchAction = "none", E.style.userSelect = "none", E.appendChild(x);
3229
- const T = document.createElement("div");
3230
- T.contentEditable = "true", T.style.margin = "10px 0", T.style.textAlign = "left", T.style.display = "block", T.appendChild(E);
3238
+ const E = document.createElement("img");
3239
+ E.src = m.target?.result, E.style.maxWidth = "100%", E.style.width = "100%", E.style.height = "auto", E.style.cursor = "pointer", E.draggable = !1;
3240
+ const x = document.createElement("div");
3241
+ x.className = "editor-image-wrapper", x.style.display = "inline-block", x.style.position = "relative", x.style.maxWidth = "100%", x.style.width = "auto", x.style.height = "auto", x.contentEditable = "false", x.style.boxSizing = "border-box", x.style.touchAction = "none", x.style.userSelect = "none", x.appendChild(E);
3242
+ const S = document.createElement("div");
3243
+ S.contentEditable = "true", S.style.margin = "10px 0", S.style.textAlign = "left", S.style.display = "block", S.appendChild(x);
3231
3244
  try {
3232
3245
  Ne();
3233
- const M = window.getSelection();
3234
- if (M && M.rangeCount > 0) {
3235
- M.getRangeAt(0).insertNode(T), M.removeAllRanges();
3236
- const D = document.createRange();
3237
- D.setStartAfter(T), D.collapse(!0), M.addRange(D), pe(D);
3246
+ const _ = window.getSelection();
3247
+ if (_ && _.rangeCount > 0) {
3248
+ _.getRangeAt(0).insertNode(S), _.removeAllRanges();
3249
+ const j = document.createRange();
3250
+ j.setStartAfter(S), j.collapse(!0), _.addRange(j), pe(j);
3238
3251
  } else
3239
- h.appendChild(T), h.focus(), pe();
3252
+ h.appendChild(S), h.focus(), pe();
3240
3253
  } catch {
3241
- h.appendChild(T), h.focus(), pe();
3254
+ h.appendChild(S), h.focus(), pe();
3242
3255
  }
3243
3256
  h.dispatchEvent(new Event("input", { bubbles: !0 })), h.focus();
3244
3257
  }, g.readAsDataURL(d);
@@ -3252,13 +3265,13 @@ function $o(h) {
3252
3265
  if (p)
3253
3266
  if (v.classList.contains("resizable")) {
3254
3267
  const d = v.getBoundingClientRect(), g = Math.round(d.width) + "px", m = Math.round(d.height) + "px";
3255
- jt(v).unset(), v.classList.remove("resizable"), v.style.border = "none", v.style.transform = "", v.dataset.x = "", v.dataset.y = "", v.style.width = g, v.style.height = m, v.contentEditable = "false", p && (p.style.width = "100%", p.style.height = "100%");
3256
- const x = v.closest(".editor");
3257
- x && x.dispatchEvent(new Event("input", { bubbles: !0 }));
3268
+ Ft(v).unset(), v.classList.remove("resizable"), v.style.border = "none", v.style.transform = "", v.dataset.x = "", v.dataset.y = "", v.style.width = g, v.style.height = m, v.contentEditable = "false", p && (p.style.width = "100%", p.style.height = "100%");
3269
+ const E = v.closest(".editor");
3270
+ E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
3258
3271
  } else {
3259
3272
  v.classList.add("resizable"), v.style.border = "2px dashed #007bff", v.style.position = "relative", v.style.userSelect = "none";
3260
3273
  const d = v.getBoundingClientRect();
3261
- v.style.width = d.width + "px", v.style.height = d.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), jt(v).resizable({
3274
+ v.style.width = d.width + "px", v.style.height = d.height + "px", p && (p.style.width = "100%", p.style.height = "100%"), Ft(v).resizable({
3262
3275
  edges: { left: !0, right: !0, bottom: !0, top: !0 },
3263
3276
  listeners: {
3264
3277
  move: (g) => {
@@ -3267,16 +3280,16 @@ function $o(h) {
3267
3280
  width: `${g.rect.width}px`,
3268
3281
  height: `${g.rect.height}px`
3269
3282
  });
3270
- const x = m.closest(".editor");
3271
- x && x.dispatchEvent(new Event("input", { bubbles: !0 }));
3283
+ const E = m.closest(".editor");
3284
+ E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
3272
3285
  },
3273
3286
  end: (g) => {
3274
- const x = g.target.closest(".editor");
3275
- x && x.dispatchEvent(new Event("input", { bubbles: !0 }));
3287
+ const E = g.target.closest(".editor");
3288
+ E && E.dispatchEvent(new Event("input", { bubbles: !0 }));
3276
3289
  }
3277
3290
  },
3278
3291
  modifiers: [
3279
- jt.modifiers.restrictSize({ min: { width: 50, height: 50 } })
3292
+ Ft.modifiers.restrictSize({ min: { width: 50, height: 50 } })
3280
3293
  ],
3281
3294
  inertia: !0
3282
3295
  });
@@ -3288,13 +3301,13 @@ class Uo {
3288
3301
  editor;
3289
3302
  constructor() {
3290
3303
  this.container = document.createElement("div"), this.container.classList.add("editor-container"), this.editor = Bo(
3291
- () => On(this.editor),
3304
+ () => In(this.editor),
3292
3305
  (p) => $o(p)
3293
- ), this.toolbar = Fo(this.container);
3306
+ ), this.toolbar = jo(this.container);
3294
3307
  const v = this.toolbar.querySelector(
3295
3308
  '[role="button"][title="Insert Image"]'
3296
3309
  );
3297
- v && (v.onclick = () => On(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3310
+ v && (v.addEventListener("mousedown", () => pe()), v.onclick = () => In(this.editor)), this.container.appendChild(this.toolbar), this.container.appendChild(this.editor);
3298
3311
  }
3299
3312
  getElement() {
3300
3313
  return this.container;
@@ -3314,44 +3327,44 @@ class Uo {
3314
3327
  g.className = "editor-image-wrapper", g.style.display = "inline-block", g.style.position = "relative", g.style.maxWidth = "100%", g.style.width = "300px", g.contentEditable = "false", g.style.userSelect = "none", g.style.boxSizing = "border-box", g.style.touchAction = "none";
3315
3328
  const m = p;
3316
3329
  m.style.maxWidth = "100%", m.style.width = "100%", m.style.height = "auto", m.style.cursor = "pointer", m.draggable = !1;
3317
- const x = (D) => {
3318
- if (!D) return null;
3319
- const B = String(D).match(/(\d+(?:\.\d+)?)/);
3320
- if (!B) return null;
3321
- const P = Math.round(Number(B[1]));
3330
+ const E = (j) => {
3331
+ if (!j) return null;
3332
+ const G = String(j).match(/(\d+(?:\.\d+)?)/);
3333
+ if (!G) return null;
3334
+ const P = Math.round(Number(G[1]));
3322
3335
  return Number.isFinite(P) && P > 0 ? P : null;
3323
- }, E = x(m.getAttribute("width")) ?? x(m.style.width) ?? x(m.getAttribute("style"));
3324
- E ? g.style.width = `${E}px` : m.onload = () => {
3325
- const D = this.editor.clientWidth || 0, B = m.naturalWidth || 0;
3326
- if (B > 0) {
3327
- const P = D > 0 ? Math.min(B, D) : B;
3336
+ }, x = E(m.getAttribute("width")) ?? E(m.style.width) ?? E(m.getAttribute("style"));
3337
+ x ? g.style.width = `${x}px` : m.onload = () => {
3338
+ const j = this.editor.clientWidth || 0, G = m.naturalWidth || 0;
3339
+ if (G > 0) {
3340
+ const P = j > 0 ? Math.min(G, j) : G;
3328
3341
  g.style.width = `${P}px`;
3329
3342
  }
3330
3343
  };
3331
- const T = document.createElement("p");
3332
- T.style.margin = "10px 0", T.style.textAlign = "left", T.style.display = "block";
3333
- const M = m.closest("figure") ?? m.closest(".se-image-container") ?? m, _ = M.parentNode;
3334
- _ && (g.appendChild(m), T.appendChild(g), _.replaceChild(T, M));
3344
+ const S = document.createElement("p");
3345
+ S.style.margin = "10px 0", S.style.textAlign = "left", S.style.display = "block";
3346
+ const _ = m.closest("figure") ?? m.closest(".se-image-container") ?? m, A = _.parentNode;
3347
+ A && (g.appendChild(m), S.appendChild(g), A.replaceChild(S, _));
3335
3348
  }), this.editor.dispatchEvent(new Event("input", { bubbles: !0 }));
3336
3349
  }
3337
3350
  }
3338
3351
  var ht = { exports: {} }, Xe = {};
3339
- var Pn;
3352
+ var On;
3340
3353
  function Xo() {
3341
- if (Pn) return Xe;
3342
- Pn = 1;
3354
+ if (On) return Xe;
3355
+ On = 1;
3343
3356
  var h = Symbol.for("react.transitional.element"), v = Symbol.for("react.fragment");
3344
3357
  function p(d, g, m) {
3345
- var x = null;
3346
- if (m !== void 0 && (x = "" + m), g.key !== void 0 && (x = "" + g.key), "key" in g) {
3358
+ var E = null;
3359
+ if (m !== void 0 && (E = "" + m), g.key !== void 0 && (E = "" + g.key), "key" in g) {
3347
3360
  m = {};
3348
- for (var E in g)
3349
- E !== "key" && (m[E] = g[E]);
3361
+ for (var x in g)
3362
+ x !== "key" && (m[x] = g[x]);
3350
3363
  } else m = g;
3351
3364
  return g = m.ref, {
3352
3365
  $$typeof: h,
3353
3366
  type: d,
3354
- key: x,
3367
+ key: E,
3355
3368
  ref: g !== void 0 ? g : null,
3356
3369
  props: m
3357
3370
  };
@@ -3368,13 +3381,13 @@ function Go() {
3368
3381
  return w.$$typeof === ce ? null : w.displayName || w.name || null;
3369
3382
  if (typeof w == "string") return w;
3370
3383
  switch (w) {
3371
- case G:
3384
+ case U:
3372
3385
  return "Fragment";
3373
- case X:
3386
+ case J:
3374
3387
  return "Profiler";
3375
- case oe:
3388
+ case Q:
3376
3389
  return "StrictMode";
3377
- case ee:
3390
+ case ne:
3378
3391
  return "Suspense";
3379
3392
  case b:
3380
3393
  return "SuspenseList";
@@ -3385,21 +3398,21 @@ function Go() {
3385
3398
  switch (typeof w.tag == "number" && console.error(
3386
3399
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
3387
3400
  ), w.$$typeof) {
3388
- case K:
3401
+ case H:
3389
3402
  return "Portal";
3390
- case Z:
3403
+ case te:
3391
3404
  return w.displayName || "Context";
3392
- case ne:
3405
+ case re:
3393
3406
  return (w._context.displayName || "Context") + ".Consumer";
3394
3407
  case ie:
3395
- var N = w.render;
3396
- return w = w.displayName, w || (w = N.displayName || N.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w;
3397
- case J:
3398
- return N = w.displayName || null, N !== null ? N : h(w.type) || "Memo";
3399
- case L:
3400
- N = w._payload, w = w._init;
3408
+ var D = w.render;
3409
+ return w = w.displayName, w || (w = D.displayName || D.name || "", w = w !== "" ? "ForwardRef(" + w + ")" : "ForwardRef"), w;
3410
+ case Z:
3411
+ return D = w.displayName || null, D !== null ? D : h(w.type) || "Memo";
3412
+ case z:
3413
+ D = w._payload, w = w._init;
3401
3414
  try {
3402
- return h(w(N));
3415
+ return h(w(D));
3403
3416
  } catch {
3404
3417
  }
3405
3418
  }
@@ -3411,74 +3424,74 @@ function Go() {
3411
3424
  function p(w) {
3412
3425
  try {
3413
3426
  v(w);
3414
- var N = !1;
3427
+ var D = !1;
3415
3428
  } catch {
3416
- N = !0;
3429
+ D = !0;
3417
3430
  }
3418
- if (N) {
3419
- N = console;
3420
- var j = N.error, W = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object";
3421
- return j.call(
3422
- N,
3431
+ if (D) {
3432
+ D = console;
3433
+ var L = D.error, V = typeof Symbol == "function" && Symbol.toStringTag && w[Symbol.toStringTag] || w.constructor.name || "Object";
3434
+ return L.call(
3435
+ D,
3423
3436
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
3424
- W
3437
+ V
3425
3438
  ), v(w);
3426
3439
  }
3427
3440
  }
3428
3441
  function d(w) {
3429
- if (w === G) return "<>";
3430
- if (typeof w == "object" && w !== null && w.$$typeof === L)
3442
+ if (w === U) return "<>";
3443
+ if (typeof w == "object" && w !== null && w.$$typeof === z)
3431
3444
  return "<...>";
3432
3445
  try {
3433
- var N = h(w);
3434
- return N ? "<" + N + ">" : "<...>";
3446
+ var D = h(w);
3447
+ return D ? "<" + D + ">" : "<...>";
3435
3448
  } catch {
3436
3449
  return "<...>";
3437
3450
  }
3438
3451
  }
3439
3452
  function g() {
3440
- var w = Y.A;
3453
+ var w = $.A;
3441
3454
  return w === null ? null : w.getOwner();
3442
3455
  }
3443
3456
  function m() {
3444
3457
  return Error("react-stack-top-frame");
3445
3458
  }
3446
- function x(w) {
3447
- if ($.call(w, "key")) {
3448
- var N = Object.getOwnPropertyDescriptor(w, "key").get;
3449
- if (N && N.isReactWarning) return !1;
3459
+ function E(w) {
3460
+ if (X.call(w, "key")) {
3461
+ var D = Object.getOwnPropertyDescriptor(w, "key").get;
3462
+ if (D && D.isReactWarning) return !1;
3450
3463
  }
3451
3464
  return w.key !== void 0;
3452
3465
  }
3453
- function E(w, N) {
3454
- function j() {
3455
- Q || (Q = !0, console.error(
3466
+ function x(w, D) {
3467
+ function L() {
3468
+ ee || (ee = !0, console.error(
3456
3469
  "%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)",
3457
- N
3470
+ D
3458
3471
  ));
3459
3472
  }
3460
- j.isReactWarning = !0, Object.defineProperty(w, "key", {
3461
- get: j,
3473
+ L.isReactWarning = !0, Object.defineProperty(w, "key", {
3474
+ get: L,
3462
3475
  configurable: !0
3463
3476
  });
3464
3477
  }
3465
- function T() {
3478
+ function S() {
3466
3479
  var w = h(this.type);
3467
3480
  return se[w] || (se[w] = !0, console.error(
3468
3481
  "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."
3469
3482
  )), w = this.props.ref, w !== void 0 ? w : null;
3470
3483
  }
3471
- function M(w, N, j, W, xe, Ee) {
3472
- var ue = j.ref;
3484
+ function _(w, D, L, V, xe, Ee) {
3485
+ var ue = L.ref;
3473
3486
  return w = {
3474
- $$typeof: te,
3487
+ $$typeof: q,
3475
3488
  type: w,
3476
- key: N,
3477
- props: j,
3478
- _owner: W
3489
+ key: D,
3490
+ props: L,
3491
+ _owner: V
3479
3492
  }, (ue !== void 0 ? ue : null) !== null ? Object.defineProperty(w, "ref", {
3480
3493
  enumerable: !1,
3481
- get: T
3494
+ get: S
3482
3495
  }) : Object.defineProperty(w, "ref", { enumerable: !1, value: null }), w._store = {}, Object.defineProperty(w._store, "validated", {
3483
3496
  configurable: !1,
3484
3497
  enumerable: !1,
@@ -3501,61 +3514,61 @@ function Go() {
3501
3514
  value: Ee
3502
3515
  }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
3503
3516
  }
3504
- function _(w, N, j, W, xe, Ee) {
3505
- var ue = N.children;
3517
+ function A(w, D, L, V, xe, Ee) {
3518
+ var ue = D.children;
3506
3519
  if (ue !== void 0)
3507
- if (W)
3508
- if (q(ue)) {
3509
- for (W = 0; W < ue.length; W++)
3510
- D(ue[W]);
3520
+ if (V)
3521
+ if (W(ue)) {
3522
+ for (V = 0; V < ue.length; V++)
3523
+ j(ue[V]);
3511
3524
  Object.freeze && Object.freeze(ue);
3512
3525
  } else
3513
3526
  console.error(
3514
3527
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
3515
3528
  );
3516
- else D(ue);
3517
- if ($.call(N, "key")) {
3529
+ else j(ue);
3530
+ if (X.call(D, "key")) {
3518
3531
  ue = h(w);
3519
- var we = Object.keys(N).filter(function(Qe) {
3532
+ var we = Object.keys(D).filter(function(Qe) {
3520
3533
  return Qe !== "key";
3521
3534
  });
3522
- W = 0 < we.length ? "{key: someKey, " + we.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + W] || (we = 0 < we.length ? "{" + we.join(": ..., ") + ": ...}" : "{}", console.error(
3535
+ V = 0 < we.length ? "{key: someKey, " + we.join(": ..., ") + ": ...}" : "{key: someKey}", he[ue + V] || (we = 0 < we.length ? "{" + we.join(": ..., ") + ": ...}" : "{}", console.error(
3523
3536
  `A props object containing a "key" prop is being spread into JSX:
3524
3537
  let props = %s;
3525
3538
  <%s {...props} />
3526
3539
  React keys must be passed directly to JSX without using spread:
3527
3540
  let props = %s;
3528
3541
  <%s key={someKey} {...props} />`,
3529
- W,
3542
+ V,
3530
3543
  ue,
3531
3544
  we,
3532
3545
  ue
3533
- ), he[ue + W] = !0);
3534
- }
3535
- if (ue = null, j !== void 0 && (p(j), ue = "" + j), x(N) && (p(N.key), ue = "" + N.key), "key" in N) {
3536
- j = {};
3537
- for (var I in N)
3538
- I !== "key" && (j[I] = N[I]);
3539
- } else j = N;
3540
- return ue && E(
3541
- j,
3546
+ ), he[ue + V] = !0);
3547
+ }
3548
+ if (ue = null, L !== void 0 && (p(L), ue = "" + L), E(D) && (p(D.key), ue = "" + D.key), "key" in D) {
3549
+ L = {};
3550
+ for (var I in D)
3551
+ I !== "key" && (L[I] = D[I]);
3552
+ } else L = D;
3553
+ return ue && x(
3554
+ L,
3542
3555
  typeof w == "function" ? w.displayName || w.name || "Unknown" : w
3543
- ), M(
3556
+ ), _(
3544
3557
  w,
3545
3558
  ue,
3546
- j,
3559
+ L,
3547
3560
  g(),
3548
3561
  xe,
3549
3562
  Ee
3550
3563
  );
3551
3564
  }
3552
- function D(w) {
3553
- B(w) ? w._store && (w._store.validated = 1) : typeof w == "object" && w !== null && w.$$typeof === L && (w._payload.status === "fulfilled" ? B(w._payload.value) && w._payload.value._store && (w._payload.value._store.validated = 1) : w._store && (w._store.validated = 1));
3565
+ function j(w) {
3566
+ G(w) ? w._store && (w._store.validated = 1) : typeof w == "object" && w !== null && w.$$typeof === z && (w._payload.status === "fulfilled" ? G(w._payload.value) && w._payload.value._store && (w._payload.value._store.validated = 1) : w._store && (w._store.validated = 1));
3554
3567
  }
3555
- function B(w) {
3556
- return typeof w == "object" && w !== null && w.$$typeof === te;
3568
+ function G(w) {
3569
+ return typeof w == "object" && w !== null && w.$$typeof === q;
3557
3570
  }
3558
- var P = Jr, te = Symbol.for("react.transitional.element"), K = Symbol.for("react.portal"), G = Symbol.for("react.fragment"), oe = Symbol.for("react.strict_mode"), X = Symbol.for("react.profiler"), ne = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), J = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), Y = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, q = Array.isArray, re = console.createTask ? console.createTask : function() {
3571
+ var P = Jr, q = Symbol.for("react.transitional.element"), H = Symbol.for("react.portal"), U = Symbol.for("react.fragment"), Q = Symbol.for("react.strict_mode"), J = Symbol.for("react.profiler"), re = Symbol.for("react.consumer"), te = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), $ = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, W = Array.isArray, oe = console.createTask ? console.createTask : function() {
3559
3572
  return null;
3560
3573
  };
3561
3574
  P = {
@@ -3563,29 +3576,29 @@ React keys must be passed directly to JSX without using spread:
3563
3576
  return w();
3564
3577
  }
3565
3578
  };
3566
- var Q, se = {}, de = P.react_stack_bottom_frame.bind(
3579
+ var ee, se = {}, de = P.react_stack_bottom_frame.bind(
3567
3580
  P,
3568
3581
  m
3569
- )(), fe = re(d(m)), he = {};
3570
- Ge.Fragment = G, Ge.jsx = function(w, N, j) {
3571
- var W = 1e4 > Y.recentlyCreatedOwnerStacks++;
3572
- return _(
3582
+ )(), fe = oe(d(m)), he = {};
3583
+ Ge.Fragment = U, Ge.jsx = function(w, D, L) {
3584
+ var V = 1e4 > $.recentlyCreatedOwnerStacks++;
3585
+ return A(
3573
3586
  w,
3574
- N,
3575
- j,
3587
+ D,
3588
+ L,
3576
3589
  !1,
3577
- W ? Error("react-stack-top-frame") : de,
3578
- W ? re(d(w)) : fe
3590
+ V ? Error("react-stack-top-frame") : de,
3591
+ V ? oe(d(w)) : fe
3579
3592
  );
3580
- }, Ge.jsxs = function(w, N, j) {
3581
- var W = 1e4 > Y.recentlyCreatedOwnerStacks++;
3582
- return _(
3593
+ }, Ge.jsxs = function(w, D, L) {
3594
+ var V = 1e4 > $.recentlyCreatedOwnerStacks++;
3595
+ return A(
3583
3596
  w,
3584
- N,
3585
- j,
3597
+ D,
3598
+ L,
3586
3599
  !0,
3587
- W ? Error("react-stack-top-frame") : de,
3588
- W ? re(d(w)) : fe
3600
+ V ? Error("react-stack-top-frame") : de,
3601
+ V ? oe(d(w)) : fe
3589
3602
  );
3590
3603
  };
3591
3604
  })()), Ge;
@@ -3605,11 +3618,11 @@ const Zo = ({
3605
3618
  p.current = new Uo(), d.current.appendChild(p.current.getElement()), v && p.current.setHTML(v);
3606
3619
  const g = p.current.getElement(), m = g.querySelector(
3607
3620
  ".editor"
3608
- ), x = () => {
3609
- const E = p.current?.getHTML() || "";
3610
- h?.(E);
3621
+ ), E = () => {
3622
+ const x = p.current?.getHTML() || "";
3623
+ h?.(x);
3611
3624
  };
3612
- m ? (m.addEventListener("input", x), m.addEventListener("keyup", x), m.addEventListener("paste", x)) : (g.addEventListener("input", x), g.addEventListener("keyup", x), g.addEventListener("paste", x));
3625
+ m ? (m.addEventListener("input", E), m.addEventListener("keyup", E), m.addEventListener("paste", E)) : (g.addEventListener("input", E), g.addEventListener("keyup", E), g.addEventListener("paste", E));
3613
3626
  }
3614
3627
  }, [h, v]), /* @__PURE__ */ Jo.jsx("div", { ref: d });
3615
3628
  };