mind-elixir 5.0.0 → 5.0.2

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.
@@ -1,7 +1,7 @@
1
1
  var lt = Object.defineProperty;
2
2
  var at = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var q = (e, t, n) => (at(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- const fe = {
4
+ const pe = {
5
5
  name: "Latte",
6
6
  type: "light",
7
7
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
@@ -26,7 +26,7 @@ const fe = {
26
26
  "--panel-border-color": "#eaeaea",
27
27
  "--map-padding": "50px"
28
28
  }
29
- }, pe = {
29
+ }, ge = {
30
30
  name: "Dark",
31
31
  type: "dark",
32
32
  palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
@@ -72,10 +72,10 @@ const ne = function(e, t) {
72
72
  for (let n = 0; n < e.children.length; n++)
73
73
  $(e.children[n], e);
74
74
  };
75
- function ge(e) {
75
+ function me(e) {
76
76
  if (e.id = V(), e.children)
77
77
  for (let t = 0; t < e.children.length; t++)
78
- ge(e.children[t]);
78
+ me(e.children[t]);
79
79
  }
80
80
  function oe(e, t, n, o) {
81
81
  const i = o - t, s = e - n;
@@ -101,7 +101,7 @@ const dt = function() {
101
101
  id: e
102
102
  };
103
103
  };
104
- function me(e) {
104
+ function ve(e) {
105
105
  return JSON.parse(
106
106
  JSON.stringify(e, (n, o) => {
107
107
  if (n !== "parent")
@@ -117,7 +117,7 @@ const H = (e, t) => {
117
117
  }, S = (e, t) => {
118
118
  for (const n in t)
119
119
  e.setAttribute(n, t[n]);
120
- }, ae = (e) => e ? e.tagName === "ME-TPC" : !1, ce = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
120
+ }, de = (e) => e ? e.tagName === "ME-TPC" : !1, ce = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
121
121
  for (let i = 0; i < o.length; i++) {
122
122
  if (t === o[i])
123
123
  continue;
@@ -129,7 +129,7 @@ const H = (e, t) => {
129
129
  }), Ye = (e) => {
130
130
  const t = /translate\(([^,]+),\s*([^)]+)\)/, n = e.match(t);
131
131
  return n ? { x: parseFloat(n[1]), y: parseFloat(n[2]) } : { x: 0, y: 0 };
132
- }, ve = function(e) {
132
+ }, be = function(e) {
133
133
  for (let t = 0; t < e.length; t++) {
134
134
  const { dom: n, evt: o, func: i } = e[t];
135
135
  n.addEventListener(o, i);
@@ -255,7 +255,7 @@ function mt(e, t) {
255
255
  ...t
256
256
  };
257
257
  e.container.onkeydown = (i) => {
258
- if (i.preventDefault(), !e.editable || i.target !== i.currentTarget)
258
+ if (i.preventDefault(), !e.editable)
259
259
  return;
260
260
  const s = o[i.key];
261
261
  s && s(i);
@@ -292,7 +292,7 @@ function vt(e) {
292
292
  if (!e.editable)
293
293
  return;
294
294
  const l = d.target;
295
- ae(l) && e.beginEdit(l);
295
+ de(l) && e.beginEdit(l);
296
296
  const p = (m = l.parentElement) == null ? void 0 : m.parentElement;
297
297
  p.getAttribute("class") === "topiclinks" ? e.editArrowLabel(l.parentElement) : p.getAttribute("class") === "summary" && e.editSummary(l.parentElement);
298
298
  };
@@ -326,13 +326,13 @@ function vt(e) {
326
326
  if (d.preventDefault(), d.button !== 2 || !e.editable)
327
327
  return;
328
328
  const l = d.target;
329
- ae(l) && !l.classList.contains("selected") && e.selectNode(l), setTimeout(() => {
329
+ de(l) && !l.classList.contains("selected") && e.selectNode(l), setTimeout(() => {
330
330
  e.dragMoveHelper.moved || e.bus.fire("showContextMenu", d);
331
331
  }, 200);
332
332
  }, f = (d) => {
333
333
  d.stopPropagation(), d.preventDefault(), d.ctrlKey || d.metaKey ? d.deltaY < 0 ? ie(e, "in", e.dragMoveHelper) : e.scaleVal - e.scaleSensitivity > 0 && ie(e, "out", e.dragMoveHelper) : d.shiftKey ? e.move(-d.deltaY, 0) : (e.map.style.transition = "none", e.move(-d.deltaX, -d.deltaY), e.map.style.transition = "transform 0.3s");
334
334
  }, { container: h } = e;
335
- return ve([
335
+ return be([
336
336
  { dom: h, evt: "pointerdown", func: r },
337
337
  { dom: h, evt: "pointermove", func: c },
338
338
  { dom: h, evt: "pointerup", func: u },
@@ -371,7 +371,7 @@ function bt() {
371
371
  const se = document, yt = function() {
372
372
  this.nodes.innerHTML = "";
373
373
  const e = this.createTopic(this.nodeData);
374
- be(e, this.nodeData), e.draggable = !1;
374
+ ye(e, this.nodeData), e.draggable = !1;
375
375
  const t = se.createElement("me-root");
376
376
  t.appendChild(e);
377
377
  const n = this.nodeData.children || [];
@@ -400,11 +400,11 @@ const se = document, yt = function() {
400
400
  }
401
401
  return n;
402
402
  }, A = document, Ge = function(e, t) {
403
- const o = (this.el ? this.el : t || document).querySelector(`[data-nodeid=me${e}]`);
403
+ const o = (this != null && this.el ? this.el : t || document).querySelector(`[data-nodeid="me${e}"]`);
404
404
  if (!o)
405
405
  throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
406
406
  return o;
407
- }, be = function(e, t) {
407
+ }, ye = function(e, t) {
408
408
  if (e.innerHTML = "", t.style) {
409
409
  const n = t.style;
410
410
  for (const o in n)
@@ -444,7 +444,7 @@ const se = document, yt = function() {
444
444
  }, Et = function(e, t) {
445
445
  const n = A.createElement("me-wrapper"), { p: o, tpc: i } = this.createParent(e);
446
446
  if (n.appendChild(o), !t && e.children && e.children.length > 0) {
447
- const s = ye(e.expanded);
447
+ const s = we(e.expanded);
448
448
  if (o.appendChild(s), e.expanded !== !1) {
449
449
  const r = xt(this, e.children);
450
450
  n.appendChild(r);
@@ -453,7 +453,7 @@ const se = document, yt = function() {
453
453
  return { grp: n, top: o, tpc: i };
454
454
  }, Ct = function(e) {
455
455
  const t = A.createElement("me-parent"), n = this.createTopic(e);
456
- return be(n, e), t.appendChild(n), { p: t, tpc: n };
456
+ return ye(n, e), t.appendChild(n), { p: t, tpc: n };
457
457
  }, St = function(e) {
458
458
  const t = A.createElement("me-children");
459
459
  return t.append(...e), t;
@@ -501,7 +501,7 @@ const _t = function(e) {
501
501
  origin: n
502
502
  }));
503
503
  });
504
- }, ye = function(e) {
504
+ }, we = function(e) {
505
505
  const t = A.createElement("me-epd");
506
506
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
507
507
  }, W = document, k = "http://www.w3.org/2000/svg", qe = function(e, t, n) {
@@ -770,7 +770,7 @@ function At(e, t) {
770
770
  let y = !0;
771
771
  const E = (w) => {
772
772
  const x = w.target;
773
- if (ae(x)) {
773
+ if (de(x)) {
774
774
  x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (f.className = "disabled", g.className = "disabled", d.className = "disabled", c.className = "disabled", u.className = "disabled", a.className = "disabled") : (f.className = "", g.className = "", d.className = "", c.className = "", u.className = "", a.className = ""), b.hidden = !1, v.style.top = "", v.style.bottom = "", v.style.left = "", v.style.right = "";
775
775
  const C = v.getBoundingClientRect(), _ = v.offsetHeight, O = v.offsetWidth, B = w.clientY - C.top, R = w.clientX - C.left;
776
776
  _ + B > window.innerHeight ? (v.style.top = "", v.style.bottom = "0px") : (v.style.bottom = "", v.style.top = B + 15 + "px"), O + R > window.innerWidth ? (v.style.left = "", v.style.right = "0px") : (v.style.right = "", v.style.left = R + 10 + "px");
@@ -816,13 +816,13 @@ function At(e, t) {
816
816
  r.onclick = null, c.onclick = null, u.onclick = null, a.onclick = null, f.onclick = null, h.onclick = null, g.onclick = null, d.onclick = null, l.onclick = null, m.onclick = null, b.onclick = null, e.container.oncontextmenu = null;
817
817
  };
818
818
  }
819
- const de = document, Lt = function(e, t) {
819
+ const he = document, Lt = function(e, t) {
820
820
  if (!t)
821
- return he(e), e;
821
+ return ue(e), e;
822
822
  let n = e.querySelector(".insert-preview");
823
823
  const o = `insert-preview ${t} show`;
824
- return n || (n = de.createElement("div"), e.appendChild(n)), n.className = o, e;
825
- }, he = function(e) {
824
+ return n || (n = he.createElement("div"), e.appendChild(n)), n.className = o, e;
825
+ }, ue = function(e) {
826
826
  if (!e)
827
827
  return;
828
828
  const t = e.querySelectorAll(".insert-preview");
@@ -878,21 +878,21 @@ function Ot(e) {
878
878
  for (const g of f)
879
879
  g.parentElement.parentElement.style.opacity = "1";
880
880
  const h = a.target;
881
- h.style.opacity = "", n && (he(n), t === "before" ? e.moveNodeBefore(f, n) : t === "after" ? e.moveNodeAfter(f, n) : t === "in" && e.moveNodeIn(f, n), e.dragged = null);
881
+ h.style.opacity = "", n && (ue(n), t === "before" ? e.moveNodeBefore(f, n) : t === "after" ? e.moveNodeAfter(f, n) : t === "in" && e.moveNodeIn(f, n), e.dragged = null);
882
882
  }, c = (a) => {
883
883
  a.preventDefault();
884
884
  const f = 12 * e.scaleVal, { dragged: h } = e;
885
885
  if (!h)
886
886
  return;
887
887
  const g = e.container.getBoundingClientRect();
888
- a.clientX < g.x + 50 ? i.move(1, 0) : a.clientX > g.x + g.width - 50 ? i.move(-1, 0) : a.clientY < g.y + 50 ? i.move(0, 1) : a.clientY > g.y + g.height - 50 ? i.move(0, -1) : i.stop(), he(n);
889
- const d = de.elementFromPoint(a.clientX, a.clientY - f);
888
+ a.clientX < g.x + 50 ? i.move(1, 0) : a.clientX > g.x + g.width - 50 ? i.move(-1, 0) : a.clientY < g.y + 50 ? i.move(0, 1) : a.clientY > g.y + g.height - 50 ? i.move(0, -1) : i.stop(), ue(n);
889
+ const d = he.elementFromPoint(a.clientX, a.clientY - f);
890
890
  if (Me(d, h)) {
891
891
  n = d;
892
892
  const l = d.getBoundingClientRect(), p = l.y;
893
893
  a.clientY > p + l.height ? t = "after" : t = "in";
894
894
  } else {
895
- const l = de.elementFromPoint(a.clientX, a.clientY + f), p = l.getBoundingClientRect();
895
+ const l = he.elementFromPoint(a.clientX, a.clientY + f), p = l.getBoundingClientRect();
896
896
  if (Me(l, h)) {
897
897
  n = l;
898
898
  const m = p.y;
@@ -902,7 +902,7 @@ function Ot(e) {
902
902
  }
903
903
  n && Lt(n, t);
904
904
  };
905
- return ve([
905
+ return be([
906
906
  { dom: e.map, evt: "dragstart", func: s },
907
907
  { dom: e.map, evt: "dragend", func: r },
908
908
  { dom: e.map, evt: "dragover", func: c }
@@ -1049,8 +1049,8 @@ const De = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1049
1049
  case "touch":
1050
1050
  return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
1051
1051
  }
1052
- }, Ut = () => matchMedia("(hover: none), (pointer: coarse)").matches, Xt = () => "safari" in window, ue = (e) => Array.isArray(e) ? e : [e], Xe = (e) => (t, n, o, i = {}) => {
1053
- (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = ue(n), t = ue(t);
1052
+ }, Ut = () => matchMedia("(hover: none), (pointer: coarse)").matches, Xt = () => "safari" in window, fe = (e) => Array.isArray(e) ? e : [e], Xe = (e) => (t, n, o, i = {}) => {
1053
+ (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = fe(n), t = fe(t);
1054
1054
  for (const s of t)
1055
1055
  if (s)
1056
1056
  for (const r of n)
@@ -1059,7 +1059,7 @@ const De = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
1059
1059
  var t;
1060
1060
  const { clientX: n, clientY: o, target: i } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
1061
1061
  return { x: n, y: o, target: i };
1062
- }, Y = (e, t = document) => ue(e).map(
1062
+ }, Y = (e, t = document) => fe(e).map(
1063
1063
  (n) => typeof n == "string" ? Array.from(t.querySelectorAll(n)) : n instanceof Element ? n : null
1064
1064
  ).flat().filter(Boolean), Jt = (e, t) => t.some((n) => typeof n == "number" ? e.button === n : typeof n == "object" ? n.button !== e.button ? !1 : n.modifiers.every((o) => {
1065
1065
  switch (o) {
@@ -1504,7 +1504,7 @@ function Qt(e) {
1504
1504
  const en = function(e, t = !0) {
1505
1505
  this.theme = e;
1506
1506
  const o = {
1507
- ...(e.type === "dark" ? pe : fe).cssVar,
1507
+ ...(e.type === "dark" ? ge : pe).cssVar,
1508
1508
  ...e.cssVar
1509
1509
  }, i = Object.keys(o);
1510
1510
  for (let s = 0; s < i.length; s++) {
@@ -1573,7 +1573,7 @@ const rn = function({ map: e, direction: t }, n) {
1573
1573
  i.nextSibling.appendChild(n);
1574
1574
  else {
1575
1575
  const c = e.createChildren([n]);
1576
- i.appendChild(ye(!0)), i.insertAdjacentElement("afterend", c);
1576
+ i.appendChild(we(!0)), i.insertAdjacentElement("afterend", c);
1577
1577
  }
1578
1578
  e.linkDiv(n.offsetParent);
1579
1579
  } else
@@ -1592,15 +1592,15 @@ const rn = function({ map: e, direction: t }, n) {
1592
1592
  const n = e.parentElement.parentElement.lastElementChild;
1593
1593
  (n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
1594
1594
  }, ln = function(e, t) {
1595
- const n = e.nodeObj, o = me(n);
1595
+ const n = e.nodeObj, o = ve(n);
1596
1596
  o.style && t.style && (t.style = Object.assign(o.style, t.style));
1597
1597
  const i = Object.assign(n, t);
1598
- be(e, i), this.linkDiv(), this.bus.fire("operation", {
1598
+ ye(e, i), this.linkDiv(), this.bus.fire("operation", {
1599
1599
  name: "reshapeNode",
1600
1600
  obj: i,
1601
1601
  origin: o
1602
1602
  });
1603
- }, we = function(e, t, n) {
1603
+ }, xe = function(e, t, n) {
1604
1604
  if (!t)
1605
1605
  return null;
1606
1606
  const o = t.nodeObj;
@@ -1647,7 +1647,7 @@ const rn = function({ map: e, direction: t }, n) {
1647
1647
  const i = t || this.generateNewObj();
1648
1648
  sn(o, i), $(this.nodeData);
1649
1649
  const s = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(i, !0);
1650
- c.appendChild(ye(!0)), s.insertAdjacentElement("afterend", r);
1650
+ c.appendChild(we(!0)), s.insertAdjacentElement("afterend", r);
1651
1651
  const u = this.createChildren([s]);
1652
1652
  c.insertAdjacentElement("afterend", u), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
1653
1653
  name: "insertParent",
@@ -1657,7 +1657,7 @@ const rn = function({ map: e, direction: t }, n) {
1657
1657
  const n = e || this.currentNode;
1658
1658
  if (!n)
1659
1659
  return;
1660
- const o = we(this, n, t);
1660
+ const o = xe(this, n, t);
1661
1661
  if (!o)
1662
1662
  return;
1663
1663
  const { newTop: i, newNodeObj: s } = o;
@@ -1666,9 +1666,9 @@ const rn = function({ map: e, direction: t }, n) {
1666
1666
  obj: s
1667
1667
  }), t || this.editTopic(i.firstChild), this.selectNode(i.firstChild, !0);
1668
1668
  }, un = function(e, t) {
1669
- const n = me(e.nodeObj);
1670
- ge(n);
1671
- const o = we(this, t, n);
1669
+ const n = ve(e.nodeObj);
1670
+ me(n);
1671
+ const o = xe(this, t, n);
1672
1672
  if (!o)
1673
1673
  return;
1674
1674
  const { newNodeObj: i } = o;
@@ -1680,9 +1680,9 @@ const rn = function({ map: e, direction: t }, n) {
1680
1680
  e = ce(e);
1681
1681
  const n = [];
1682
1682
  for (let o = 0; o < e.length; o++) {
1683
- const i = e[o], s = me(i.nodeObj);
1684
- ge(s);
1685
- const r = we(this, t, s);
1683
+ const i = e[o], s = ve(i.nodeObj);
1684
+ me(s);
1685
+ const r = xe(this, t, s);
1686
1686
  if (!r)
1687
1687
  return;
1688
1688
  const { newNodeObj: c } = r;
@@ -1922,7 +1922,7 @@ const Cn = function(e) {
1922
1922
  },
1923
1923
  cb: null,
1924
1924
  init(t, n) {
1925
- this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = ve([
1925
+ this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = be([
1926
1926
  { dom: t, evt: "pointermove", func: this.handlePointerMove },
1927
1927
  { dom: t, evt: "pointerleave", func: this.handleClear },
1928
1928
  { dom: t, evt: "pointerup", func: this.handleClear },
@@ -2005,7 +2005,7 @@ const Xn = function(e, t, n, o) {
2005
2005
  y: n + "",
2006
2006
  fill: o || "rgb(235, 95, 82)"
2007
2007
  }), i.dataset.type = "custom-link", i.innerHTML = e, i;
2008
- }, xe = function(e, t, n, o, i) {
2008
+ }, Ee = function(e, t, n, o, i) {
2009
2009
  var x;
2010
2010
  if (!t || !n)
2011
2011
  return;
@@ -2038,13 +2038,14 @@ const Xn = function(e, t, n, o) {
2038
2038
  },
2039
2039
  ...n
2040
2040
  };
2041
- xe(this, e, t, o), this.bus.fire("operation", {
2041
+ Ee(this, e, t, o), this.bus.fire("operation", {
2042
2042
  name: "createArrow",
2043
2043
  obj: o
2044
2044
  });
2045
2045
  }, Zn = function(e) {
2046
+ le(this);
2046
2047
  const t = { ...e, id: V() };
2047
- xe(this, this.findEle(t.from), this.findEle(t.to), t), this.bus.fire("operation", {
2048
+ Ee(this, this.findEle(t.from), this.findEle(t.to), t), this.bus.fire("operation", {
2048
2049
  name: "createArrow",
2049
2050
  obj: t
2050
2051
  });
@@ -2052,7 +2053,7 @@ const Xn = function(e, t, n, o) {
2052
2053
  let t;
2053
2054
  if (e ? t = e : t = this.currentArrow, !t)
2054
2055
  return;
2055
- Ee(this);
2056
+ le(this);
2056
2057
  const n = t.arrowObj.id;
2057
2058
  this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
2058
2059
  name: "removeArrow",
@@ -2065,8 +2066,8 @@ const Xn = function(e, t, n, o) {
2065
2066
  const t = e.arrowObj, n = this.findEle(t.from), o = this.findEle(t.to), i = re(this, n, t.delta1), s = re(this, o, t.delta2);
2066
2067
  rt(this, t, i, s);
2067
2068
  }, to = function() {
2068
- Ee(this), this.currentArrow = null;
2069
- }, le = function(e, t) {
2069
+ le(this), this.currentArrow = null;
2070
+ }, ae = function(e, t) {
2070
2071
  const n = document.createElementNS(k, "path");
2071
2072
  return S(n, {
2072
2073
  d: e,
@@ -2079,11 +2080,11 @@ const Xn = function(e, t, n, o) {
2079
2080
  }, no = function(e, t) {
2080
2081
  const n = document.createElementNS(k, "g");
2081
2082
  n.setAttribute("class", "arrow-highlight"), n.setAttribute("opacity", "0.45");
2082
- const o = le(e.line.getAttribute("d"), t);
2083
+ const o = ae(e.line.getAttribute("d"), t);
2083
2084
  n.appendChild(o);
2084
- const i = le(e.arrow1.getAttribute("d"), t);
2085
+ const i = ae(e.arrow1.getAttribute("d"), t);
2085
2086
  if (n.appendChild(i), e.arrow2.getAttribute("d")) {
2086
- const s = le(e.arrow2.getAttribute("d"), t);
2087
+ const s = ae(e.arrow2.getAttribute("d"), t);
2087
2088
  n.appendChild(s);
2088
2089
  }
2089
2090
  e.insertBefore(n, e.firstChild);
@@ -2096,7 +2097,7 @@ const Xn = function(e, t, n, o) {
2096
2097
  return;
2097
2098
  const n = t.querySelectorAll("path");
2098
2099
  n.length >= 1 && n[0].setAttribute("d", e.line.getAttribute("d")), n.length >= 2 && n[1].setAttribute("d", e.arrow1.getAttribute("d")), n.length >= 3 && e.arrow2.getAttribute("d") && n[2].setAttribute("d", e.arrow2.getAttribute("d"));
2099
- }, Ee = function(e) {
2100
+ }, le = function(e) {
2100
2101
  var t, n;
2101
2102
  (t = e.helper1) == null || t.destroy(), (n = e.helper2) == null || n.destroy(), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none", e.currentArrow && oo(e.currentArrow);
2102
2103
  }, rt = function(e, t, n, o) {
@@ -2120,14 +2121,14 @@ function so() {
2120
2121
  for (let e = 0; e < this.arrows.length; e++) {
2121
2122
  const t = this.arrows[e];
2122
2123
  try {
2123
- xe(this, this.findEle(t.from), this.findEle(t.to), t, !0);
2124
+ Ee(this, this.findEle(t.from), this.findEle(t.to), t, !0);
2124
2125
  } catch {
2125
2126
  }
2126
2127
  }
2127
2128
  this.nodes.appendChild(this.linkSvgGroup);
2128
2129
  }
2129
2130
  function ro(e) {
2130
- if (Ee(this), !e)
2131
+ if (le(this), !e)
2131
2132
  return;
2132
2133
  const t = e.label;
2133
2134
  ze(this, t, e.arrowObj);
@@ -2502,7 +2503,7 @@ function Ro({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction:
2502
2503
  const v = Math.abs(h - d) / 300 * f;
2503
2504
  return u === M.LHS ? (m = t, l = m + f, p = m - f, g = s + f, `M ${l} ${h} C ${m} ${h} ${m + v} ${d} ${p} ${d} H ${g}`) : (m = t + n, l = m - f, p = m + f, g = s + r - f, `M ${l} ${h} C ${m} ${h} ${m - v} ${d} ${p} ${d} H ${g}`);
2504
2505
  }
2505
- const Fo = "5.0.0";
2506
+ const Fo = "5.0.2";
2506
2507
  function Io(e) {
2507
2508
  return {
2508
2509
  x: 0,
@@ -2546,7 +2547,7 @@ function D({
2546
2547
  throw new Error("MindElixir: el is not a valid element");
2547
2548
  y.style.position = "relative", y.innerHTML = "", this.el = y, this.disposable = [], this.before = f || {}, this.locale = n || "en", this.contextMenu = s === void 0 ? !0 : s, this.toolBar = r === void 0 ? !0 : r, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = u || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = g === void 0 ? !1 : g, this.scaleSensitivity = typeof b == "number" ? b : 0.2, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = d || Bo, this.generateSubBranch = l || Ro, this.overflowHidden = p || !1, this.dragMoveHelper = Io(this), this.bus = bt(), this.container = z.createElement("div"), this.selectionContainer = a || this.container, this.container.className = "map-container";
2548
2549
  const N = window.matchMedia("(prefers-color-scheme: dark)");
2549
- this.theme = m || (N.matches ? pe : fe);
2550
+ this.theme = m || (N.matches ? ge : pe);
2550
2551
  const w = z.createElement("div");
2551
2552
  w.className = "map-canvas", setTimeout(() => {
2552
2553
  w.style.transition = "all 0.3s";
@@ -2562,8 +2563,8 @@ Object.defineProperty(D.prototype, "currentNode", {
2562
2563
  D.LEFT = 0;
2563
2564
  D.RIGHT = 1;
2564
2565
  D.SIDE = 2;
2565
- D.THEME = fe;
2566
- D.DARK_THEME = pe;
2566
+ D.THEME = pe;
2567
+ D.DARK_THEME = ge;
2567
2568
  D.version = Fo;
2568
2569
  D.E = Ge;
2569
2570
  D.new = (e) => ({