mind-elixir 5.12.2-beta.0 → 5.12.2-beta.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.
@@ -53,7 +53,7 @@ const Wn = 0, Yn = 1, Rn = 2, Y = {
53
53
  "--map-padding": "50px 80px"
54
54
  }
55
55
  };
56
- function $t(t) {
56
+ function It(t) {
57
57
  return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
58
58
  }
59
59
  const _ = function(t, e) {
@@ -88,7 +88,7 @@ function q(t, e, n, o) {
88
88
  function R() {
89
89
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2)).substring(2, 18);
90
90
  }
91
- const Ht = function() {
91
+ const Ot = function() {
92
92
  const t = R();
93
93
  return {
94
94
  topic: this.newTopicName,
@@ -105,7 +105,7 @@ const Ht = function() {
105
105
  }, Z = (t) => t ? t.tagName === "ME-TPC" : !1, ot = (t) => {
106
106
  const e = /translate3d\(([^,]+),\s*([^,]+)/, n = t.match(e);
107
107
  return n ? { x: parseFloat(n[1]), y: parseFloat(n[2]) } : { x: 0, y: 0 };
108
- }, vt = function(t) {
108
+ }, bt = function(t) {
109
109
  for (let e = 0; e < t.length; e++) {
110
110
  const { dom: n, evt: o, func: s } = t[e];
111
111
  n.addEventListener(o, s);
@@ -119,7 +119,7 @@ const Ht = function() {
119
119
  }, ht = (t, e) => {
120
120
  const n = t.x - e.x, o = t.y - e.y;
121
121
  return Math.sqrt(n * n + o * o);
122
- }, It = function(t, e) {
122
+ }, Bt = function(t, e) {
123
123
  if (!e)
124
124
  return U(t), t;
125
125
  let n = t.querySelector(".insert-preview");
@@ -136,11 +136,11 @@ const Ht = function() {
136
136
  if (!(t && t.tagName === "ME-TPC" && t !== n && !o && t.nodeObj.parent)) return !1;
137
137
  }
138
138
  return !0;
139
- }, Ot = function(t) {
139
+ }, Wt = function(t) {
140
140
  const e = document.createElement("div");
141
141
  return e.className = "mind-elixir-ghost", t.container.appendChild(e), e;
142
142
  };
143
- class Bt {
143
+ class Yt {
144
144
  mind;
145
145
  isMoving = !1;
146
146
  interval = null;
@@ -157,19 +157,19 @@ class Bt {
157
157
  this.isMoving = !1, this.interval && (clearInterval(this.interval), this.interval = null);
158
158
  }
159
159
  }
160
- function Wt(t) {
160
+ function Rt(t) {
161
161
  return {
162
162
  isDragging: !1,
163
163
  insertType: null,
164
164
  meet: null,
165
- ghost: Ot(t),
166
- edgeMoveController: new Bt(t),
165
+ ghost: Wt(t),
166
+ edgeMoveController: new Yt(t),
167
167
  startX: 0,
168
168
  startY: 0,
169
169
  pointerId: null
170
170
  };
171
171
  }
172
- const Yt = 5;
172
+ const Xt = 5;
173
173
  function ft(t, e, n, o = !1) {
174
174
  if (t.spacePressed) return !1;
175
175
  const s = n.target;
@@ -177,11 +177,11 @@ function ft(t, e, n, o = !1) {
177
177
  if (e.startX = n.clientX, e.startY = n.clientY, e.pointerId = n.pointerId, t.dragged = t.currentNodes, o) {
178
178
  xt(t, e);
179
179
  const i = t.container.getBoundingClientRect();
180
- bt(e.ghost, n.clientX - i.x, n.clientY - i.y);
180
+ vt(e.ghost, n.clientX - i.x, n.clientY - i.y);
181
181
  }
182
182
  return !0;
183
183
  }
184
- function bt(t, e, n) {
184
+ function vt(t, e, n) {
185
185
  t.style.transform = `translate(${e - 10}px, ${n - 10}px)`, t.style.display = "block";
186
186
  }
187
187
  function xt(t, e) {
@@ -193,13 +193,13 @@ function xt(t, e) {
193
193
  s.parentElement.parentElement.style.opacity = "0.5";
194
194
  t.panHelper.clear();
195
195
  }
196
- function Rt(t, e, n) {
196
+ function Vt(t, e, n) {
197
197
  const { dragged: o } = t;
198
198
  if (!o || e.pointerId !== n.pointerId) return;
199
199
  const s = n.clientX - e.startX, i = n.clientY - e.startY, r = Math.sqrt(s * s + i * i);
200
- if (!e.isDragging && r > Yt && xt(t, e), !e.isDragging) return;
200
+ if (!e.isDragging && r > Xt && xt(t, e), !e.isDragging) return;
201
201
  const c = t.container.getBoundingClientRect();
202
- bt(e.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? e.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? e.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? e.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? e.edgeMoveController.move(0, -1) : e.edgeMoveController.stop(), U(e.meet);
202
+ vt(e.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? e.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? e.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? e.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? e.edgeMoveController.move(0, -1) : e.edgeMoveController.stop(), U(e.meet);
203
203
  const l = 12 * t.scaleVal, a = document.elementFromPoint(n.clientX, n.clientY - l);
204
204
  if (dt(a, o)) {
205
205
  e.meet = a;
@@ -214,9 +214,9 @@ function Rt(t, e, n) {
214
214
  } else
215
215
  e.insertType = null, e.meet = null;
216
216
  }
217
- e.meet && It(e.meet, e.insertType);
217
+ e.meet && Bt(e.meet, e.insertType);
218
218
  }
219
- function Xt(t, e, n) {
219
+ function zt(t, e, n) {
220
220
  const { dragged: o } = t;
221
221
  if (!(!o || e.pointerId !== n.pointerId)) {
222
222
  e.edgeMoveController.stop();
@@ -237,7 +237,7 @@ function ut(t, e) {
237
237
  const O = {
238
238
  LHS: "lhs",
239
239
  RHS: "rhs"
240
- }, Vt = function() {
240
+ }, Ft = function() {
241
241
  this.nodes.innerHTML = "";
242
242
  const t = this.createTopic(this.nodeData);
243
243
  St.call(this, t, this.nodeData), t.draggable = !1;
@@ -250,8 +250,8 @@ const O = {
250
250
  i.direction === 0 ? o += 1 : i.direction === 1 ? s += 1 : o <= s ? (i.direction = 0, o += 1) : (i.direction = 1, s += 1);
251
251
  });
252
252
  }
253
- zt(this, n, e);
254
- }, zt = function(t, e, n) {
253
+ Gt(this, n, e);
254
+ }, Gt = function(t, e, n) {
255
255
  const o = document.createElement("me-main");
256
256
  o.className = O.LHS;
257
257
  const s = document.createElement("me-main");
@@ -261,7 +261,7 @@ const O = {
261
261
  t.direction === 2 ? r.direction === 0 ? o.appendChild(c) : s.appendChild(c) : t.direction === 0 ? o.appendChild(c) : s.appendChild(c);
262
262
  }
263
263
  t.nodes.appendChild(o), t.nodes.appendChild(n), t.nodes.appendChild(s), t.nodes.appendChild(t.lines), t.nodes.appendChild(t.labelContainer);
264
- }, Ft = function(t, e) {
264
+ }, _t = function(t, e) {
265
265
  const n = document.createElement("me-children");
266
266
  for (let o = 0; o < e.length; o++) {
267
267
  const s = e[o], { grp: i } = t.createWrapper(s);
@@ -299,7 +299,7 @@ const O = {
299
299
  } else t.link && (t.link = void 0);
300
300
  if (e.icons && e.icons.length) {
301
301
  const n = document.createElement("span");
302
- n.className = "icons", n.innerHTML = e.icons.map((o) => `<span>${$t(o)}</span>`).join(""), t.appendChild(n), t.icons = n;
302
+ n.className = "icons", n.innerHTML = e.icons.map((o) => `<span>${It(o)}</span>`).join(""), t.appendChild(n), t.icons = n;
303
303
  } else t.icons && (t.icons = void 0);
304
304
  if (e.tags && e.tags.length) {
305
305
  const n = document.createElement("div");
@@ -308,23 +308,23 @@ const O = {
308
308
  typeof o == "string" ? s.textContent = o : (s.textContent = o.text, o.className && (s.className = o.className), o.style && Object.assign(s.style, o.style)), n.appendChild(s);
309
309
  }), t.appendChild(n), t.tags = n;
310
310
  } else t.tags && (t.tags = void 0);
311
- }, Gt = function(t, e) {
311
+ }, qt = function(t, e) {
312
312
  const n = document.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(t);
313
313
  if (n.appendChild(o), !e && t.children && t.children.length > 0) {
314
- const i = Kt(t.expanded);
314
+ const i = Zt(t.expanded);
315
315
  if (o.appendChild(i), t.expanded !== !1) {
316
- const r = Ft(this, t.children);
316
+ const r = _t(this, t.children);
317
317
  n.appendChild(r);
318
318
  }
319
319
  }
320
320
  return { grp: n, top: o, tpc: s };
321
- }, _t = function(t) {
321
+ }, jt = function(t) {
322
322
  const e = document.createElement("me-parent"), n = this.createTopic(t);
323
323
  return St.call(this, n, t), e.appendChild(n), { p: e, tpc: n };
324
- }, qt = function(t) {
324
+ }, Ut = function(t) {
325
325
  const e = document.createElement("me-children");
326
326
  return e.append(...t), e;
327
- }, jt = function(t) {
327
+ }, Kt = function(t) {
328
328
  const e = document.createElement("me-tpc");
329
329
  return e.nodeObj = t, e.dataset.nodeid = "me" + t.id, e;
330
330
  };
@@ -334,7 +334,7 @@ function Et(t) {
334
334
  const n = window.getSelection();
335
335
  n && (n.removeAllRanges(), n.addRange(e));
336
336
  }
337
- const Ut = function(t) {
337
+ const Jt = function(t) {
338
338
  if (!t) return;
339
339
  const e = document.createElement("div"), n = t.nodeObj, o = n.topic, { offsetLeft: s, offsetTop: i } = P(this.nodes, t);
340
340
  this.nodes.appendChild(e), e.id = "input-box", e.textContent = o, e.contentEditable = "plaintext-only", e.spellcheck = !1;
@@ -369,14 +369,14 @@ const Ut = function(t) {
369
369
  origin: o
370
370
  }));
371
371
  });
372
- }, Kt = function(t) {
372
+ }, Zt = function(t) {
373
373
  const e = document.createElement("me-epd");
374
374
  return e.expanded = t !== !1, e.className = t !== !1 ? "minus" : "", e;
375
- }, Jt = function(t) {
375
+ }, Qt = function(t) {
376
376
  const n = t.parentElement.parentElement.lastElementChild;
377
377
  n?.tagName === "svg" && n?.remove();
378
378
  };
379
- function Zt(t) {
379
+ function te(t) {
380
380
  return {
381
381
  nodeData: t.isFocusMode ? t.nodeDataBackup : t.nodeData,
382
382
  arrows: t.arrows,
@@ -387,44 +387,44 @@ function Zt(t) {
387
387
  meta: t.meta
388
388
  };
389
389
  }
390
- const Qt = function(t, e = !1) {
390
+ const ee = function(t, e = !1) {
391
391
  const n = this.container, o = t.getBoundingClientRect(), s = n.getBoundingClientRect();
392
392
  if (e || o.top > s.bottom - 50 || o.bottom < s.top + 50 || o.left > s.right - 50 || o.right < s.left + 50) {
393
393
  const r = o.left + o.width / 2, c = o.top + o.height / 2, l = s.left + s.width / 2, a = s.top + s.height / 2, f = r - l, d = c - a;
394
394
  this.move(-f, -d, !0);
395
395
  }
396
- }, te = function(t, e, n) {
396
+ }, ne = function(t, e, n) {
397
397
  this.clearSelection(), this.scrollIntoView(t), this.selection?.select(t), e && this.bus.fire("selectNewNode", t.nodeObj);
398
- }, ee = function(t) {
398
+ }, oe = function(t) {
399
399
  this.selection?.select(t);
400
- }, ne = function(t) {
400
+ }, se = function(t) {
401
401
  this.selection?.deselect(t);
402
- }, oe = function() {
402
+ }, ie = function() {
403
403
  this.unselectNodes(this.currentNodes), this.unselectSummary(), this.unselectArrow();
404
404
  }, Tt = function(t) {
405
405
  return JSON.stringify(t, (e, n) => {
406
406
  if (!(e === "parent" && typeof n != "string"))
407
407
  return n;
408
408
  });
409
- }, se = function() {
410
- const t = Zt(this);
409
+ }, re = function() {
410
+ const t = te(this);
411
411
  return Tt(t);
412
- }, ie = function() {
412
+ }, ce = function() {
413
413
  return JSON.parse(this.getDataString());
414
- }, re = function() {
414
+ }, le = function() {
415
415
  this.editable = !0;
416
- }, ce = function() {
416
+ }, ae = function() {
417
417
  this.editable = !1;
418
- }, le = function(t, e = { x: 0, y: 0 }) {
418
+ }, he = function(t, e = { x: 0, y: 0 }) {
419
419
  if (t < this.scaleMin && t < this.scaleVal || t > this.scaleMax && t > this.scaleVal) return;
420
420
  const n = this.container.getBoundingClientRect(), o = e.x ? e.x - n.left - n.width / 2 : 0, s = e.y ? e.y - n.top - n.height / 2 : 0, { dx: i, dy: r } = st(this), c = this.map.style.transform, { x: l, y: a } = ot(c), f = l - i, d = a - r, p = this.scaleVal, w = (-o + f) * (1 - t / p), y = (-s + d) * (1 - t / p);
421
421
  this.map.style.transform = `translate3d(${l - w}px, ${a - y}px, 0) scale(${t})`, this.scaleVal = t, this.bus.fire("scale", t);
422
- }, ae = function() {
422
+ }, de = function() {
423
423
  const t = this.nodes.offsetHeight / this.container.offsetHeight, e = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(t, e));
424
424
  this.scaleVal = n;
425
425
  const { dx: o, dy: s } = st(this, !0);
426
426
  this.map.style.transform = `translate3d(${o}px, ${s}px, 0) scale(${n})`, this.bus.fire("scale", n);
427
- }, he = function(t, e, n = !1) {
427
+ }, fe = function(t, e, n = !1) {
428
428
  const { map: o, scaleVal: s, bus: i, container: r, nodes: c } = this;
429
429
  if (n && o.style.transition === "transform 0.3s")
430
430
  return;
@@ -452,29 +452,29 @@ const Qt = function(t, e = !1) {
452
452
  i = n.offsetWidth / 2 - a - f / 2, r = n.offsetHeight / 2 - l - d / 2, o.style.transformOrigin = `${a + f / 2}px 50%`;
453
453
  }
454
454
  return { dx: i, dy: r };
455
- }, de = function() {
455
+ }, ue = function() {
456
456
  const { map: t, container: e } = this, { dx: n, dy: o } = st(this);
457
457
  e.scrollTop = 0, e.scrollLeft = 0, t.style.transform = `translate3d(${n}px, ${o}px, 0) scale(${this.scaleVal})`;
458
- }, fe = function(t) {
458
+ }, pe = function(t) {
459
459
  t(this);
460
- }, ue = function(t) {
460
+ }, ge = function(t) {
461
461
  t.nodeObj.parent && (this.clearSelection(), this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = t.nodeObj, this.initRight(), this.toCenter());
462
- }, pe = function() {
462
+ }, me = function() {
463
463
  this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
464
- }, ge = function() {
464
+ }, ye = function() {
465
465
  this.direction = 0, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
466
- }, me = function() {
466
+ }, we = function() {
467
467
  this.direction = 1, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
468
- }, ye = function() {
468
+ }, be = function() {
469
469
  this.direction = 2, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
470
- }, we = function(t, e) {
470
+ }, ve = function(t, e) {
471
471
  const n = t.nodeObj;
472
472
  typeof e == "boolean" ? n.expanded = e : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
473
473
  const o = t.getBoundingClientRect(), s = {
474
474
  x: o.left,
475
475
  y: o.top
476
476
  }, i = t.parentNode, r = i.children[1];
477
- if (r.expanded = n.expanded, r.className = n.expanded ? "minus" : "", Jt(t), n.expanded) {
477
+ if (r.expanded = n.expanded, r.className = n.expanded ? "minus" : "", Qt(t), n.expanded) {
478
478
  const d = this.createChildren(
479
479
  n.children.map((p) => this.createWrapper(p).grp)
480
480
  );
@@ -487,7 +487,7 @@ const Qt = function(t, e = !1) {
487
487
  y: c.top
488
488
  }, a = s.x - l.x, f = s.y - l.y;
489
489
  this.move(a, f), this.bus.fire("expandNode", n);
490
- }, ve = function(t, e) {
490
+ }, xe = function(t, e) {
491
491
  const n = t.nodeObj, o = t.getBoundingClientRect(), s = {
492
492
  x: o.left,
493
493
  y: o.top
@@ -498,48 +498,48 @@ const Qt = function(t, e = !1) {
498
498
  y: i.top
499
499
  }, c = s.x - r.x, l = s.y - r.y;
500
500
  this.move(c, l);
501
- }, be = function(t) {
501
+ }, Ce = function(t) {
502
502
  this.clearSelection(), t && (t = JSON.parse(JSON.stringify(t)), this.nodeData = t.nodeData, this.arrows = t.arrows || [], this.summaries = t.summaries || [], t.meta && (this.meta = t.meta), t.theme && this.changeTheme(t.theme)), nt(this.nodeData), this.layout(), this.linkDiv();
503
- }, xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
503
+ }, Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
504
504
  __proto__: null,
505
- cancelFocus: pe,
506
- clearSelection: oe,
507
- disableEdit: ce,
508
- enableEdit: re,
509
- expandNode: we,
510
- expandNodeAll: ve,
511
- focusNode: ue,
512
- getData: ie,
513
- getDataString: se,
514
- initLeft: ge,
515
- initRight: me,
516
- initSide: ye,
517
- install: fe,
518
- move: he,
519
- refresh: be,
520
- scale: le,
521
- scaleFit: ae,
522
- scrollIntoView: Qt,
523
- selectNode: te,
524
- selectNodes: ee,
505
+ cancelFocus: me,
506
+ clearSelection: ie,
507
+ disableEdit: ae,
508
+ enableEdit: le,
509
+ expandNode: ve,
510
+ expandNodeAll: xe,
511
+ focusNode: ge,
512
+ getData: ce,
513
+ getDataString: re,
514
+ initLeft: ye,
515
+ initRight: we,
516
+ initSide: be,
517
+ install: pe,
518
+ move: fe,
519
+ refresh: Ce,
520
+ scale: he,
521
+ scaleFit: de,
522
+ scrollIntoView: ee,
523
+ selectNode: ne,
524
+ selectNodes: oe,
525
525
  stringifyData: Tt,
526
- toCenter: de,
527
- unselectNodes: ne
528
- }, Symbol.toStringTag, { value: "Module" })), Ce = 40, Se = 10, Ee = ({ deltaMode: t, deltaY: e, viewportHeight: n }) => t === WheelEvent.DOM_DELTA_LINE ? e * Ce : t === WheelEvent.DOM_DELTA_PAGE ? e * n : e, Te = ({ deltaMode: t, deltaY: e, scaleSensitivity: n, viewportHeight: o }) => {
529
- const i = -Ee({ deltaMode: t, deltaY: e, viewportHeight: o }) / Se * n;
526
+ toCenter: ue,
527
+ unselectNodes: se
528
+ }, Symbol.toStringTag, { value: "Module" })), Ee = 40, Te = 10, De = ({ deltaMode: t, deltaY: e, viewportHeight: n }) => t === WheelEvent.DOM_DELTA_LINE ? e * Ee : t === WheelEvent.DOM_DELTA_PAGE ? e * n : e, Le = ({ deltaMode: t, deltaY: e, scaleSensitivity: n, viewportHeight: o }) => {
529
+ const i = -De({ deltaMode: t, deltaY: e, viewportHeight: o }) / Te * n;
530
530
  return Math.max(-n, Math.min(n, i));
531
- }, De = (t, e, n) => {
531
+ }, Me = (t, e, n) => {
532
532
  e !== 0 && t.scale(t.scaleVal + e, n);
533
- }, Le = (t, e) => {
534
- const n = Te({
533
+ }, Pe = (t, e) => {
534
+ const n = Le({
535
535
  deltaMode: e.deltaMode,
536
536
  deltaY: e.deltaY,
537
537
  scaleSensitivity: t.scaleSensitivity,
538
538
  viewportHeight: t.container.clientHeight || window.innerHeight
539
539
  });
540
- De(t, n, { x: e.clientX, y: e.clientY });
540
+ Me(t, n, { x: e.clientX, y: e.clientY });
541
541
  };
542
- function Me(t) {
542
+ function ke(t) {
543
543
  const { panHelper: e, container: n } = t;
544
544
  let o = null;
545
545
  t.spacePressed = !1;
@@ -599,7 +599,7 @@ function Me(t) {
599
599
  clear() {
600
600
  this.activePointers.clear(), this.lastDistance = null;
601
601
  }
602
- }, c = Wt(t), l = {
602
+ }, c = Rt(t), l = {
603
603
  timer: null,
604
604
  startPos: null,
605
605
  pointerId: null,
@@ -681,7 +681,7 @@ function Me(t) {
681
681
  l.handleMove(h), l.timer === null && (t.ptState = i.Idle);
682
682
  break;
683
683
  case i.Drag:
684
- Rt(t, c, h);
684
+ Vt(t, c, h);
685
685
  break;
686
686
  case i.Pan:
687
687
  e.handlePointerMove(h);
@@ -695,7 +695,7 @@ function Me(t) {
695
695
  l.clear();
696
696
  break;
697
697
  case i.Drag:
698
- Xt(t, c, h);
698
+ zt(t, c, h);
699
699
  break;
700
700
  case i.Pan:
701
701
  e.handlePointerUp(h);
@@ -710,29 +710,29 @@ function Me(t) {
710
710
  const m = h.target;
711
711
  Z(m) && !m.classList.contains("selected") && t.selectNode(m), t.bus.fire("showContextMenu", h);
712
712
  }, 200);
713
- }, b = (h) => {
714
- if (h.stopPropagation(), h.preventDefault(), h.ctrlKey || h.metaKey) return Le(t, h);
713
+ }, v = (h) => {
714
+ if (h.stopPropagation(), h.preventDefault(), h.ctrlKey || h.metaKey) return Pe(t, h);
715
715
  if (h.shiftKey) return t.move(-h.deltaY, 0);
716
716
  t.move(-h.deltaX, -h.deltaY);
717
- }, v = (h) => {
717
+ }, b = (h) => {
718
718
  h.code === "Space" && (t.spacePressed = !0, t.container.classList.add("space-pressed"));
719
719
  }, C = (h) => {
720
720
  h.code === "Space" && (t.spacePressed = !1, t.container.classList.remove("space-pressed"));
721
721
  };
722
- return vt([
722
+ return bt([
723
723
  { dom: n, evt: "pointerdown", func: p },
724
724
  { dom: n, evt: "pointermove", func: w },
725
725
  { dom: n, evt: "pointerup", func: y },
726
726
  { dom: n, evt: "pointercancel", func: u },
727
727
  { dom: n, evt: "click", func: f },
728
728
  { dom: n, evt: "contextmenu", func: g },
729
- { dom: n, evt: "wheel", func: typeof t.handleWheel == "function" ? t.handleWheel : b },
729
+ { dom: n, evt: "wheel", func: typeof t.handleWheel == "function" ? t.handleWheel : v },
730
730
  { dom: n, evt: "blur", func: u },
731
- { dom: n, evt: "keydown", func: v },
731
+ { dom: n, evt: "keydown", func: b },
732
732
  { dom: n, evt: "keyup", func: C }
733
733
  ]);
734
734
  }
735
- function Pe() {
735
+ function Ne() {
736
736
  return {
737
737
  handlers: {},
738
738
  addListener: function(t, e) {
@@ -779,7 +779,7 @@ const k = "http://www.w3.org/2000/svg", K = function(t) {
779
779
  }, pt = function() {
780
780
  const t = document.createElementNS(k, "line");
781
781
  return t.setAttribute("stroke", "#4dc4ff"), t.setAttribute("fill", "none"), t.setAttribute("stroke-width", "2"), t.setAttribute("opacity", "0.45"), t;
782
- }, ke = function(t, e, n, o) {
782
+ }, Ae = function(t, e, n, o) {
783
783
  const s = document.createElementNS(k, "g");
784
784
  return [
785
785
  {
@@ -838,15 +838,15 @@ const k = "http://www.w3.org/2000/svg", K = function(t) {
838
838
  obj: n
839
839
  }));
840
840
  });
841
- }, Ne = function(t) {
841
+ }, $e = function(t) {
842
842
  const e = this.map.querySelector("me-root"), n = e.offsetTop, o = e.offsetLeft, s = e.offsetWidth, i = e.offsetHeight, r = this.map.querySelectorAll("me-main > me-wrapper");
843
843
  this.lines.innerHTML = "";
844
844
  for (let c = 0; c < r.length; c++) {
845
- const l = r[c], a = l.querySelector("me-tpc"), { offsetLeft: f, offsetTop: d } = P(this.nodes, a), p = a.offsetWidth, w = a.offsetHeight, y = l.parentNode.className, u = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: d, cL: f, cW: p, cH: w, direction: y, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, b = a.nodeObj.branchColor || g[c % g.length];
846
- if (a.style.borderColor = b, this.lines.appendChild(Dt(u, b, "3")), t && t !== l)
845
+ const l = r[c], a = l.querySelector("me-tpc"), { offsetLeft: f, offsetTop: d } = P(this.nodes, a), p = a.offsetWidth, w = a.offsetHeight, y = l.parentNode.className, u = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: d, cL: f, cW: p, cH: w, direction: y, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, v = a.nodeObj.branchColor || g[c % g.length];
846
+ if (a.style.borderColor = v, this.lines.appendChild(Dt(u, v, "3")), t && t !== l)
847
847
  continue;
848
- const v = W("subLines"), C = l.lastChild;
849
- C.tagName === "svg" && C.remove(), l.appendChild(v), Mt(this, v, b, l, y, !0);
848
+ const b = W("subLines"), C = l.lastChild;
849
+ C.tagName === "svg" && C.remove(), l.appendChild(b), Mt(this, b, v, l, y, !0);
850
850
  }
851
851
  this.labelContainer.innerHTML = "", this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
852
852
  }, Mt = function(t, e, n, o, s, i) {
@@ -854,7 +854,7 @@ const k = "http://www.w3.org/2000/svg", K = function(t) {
854
854
  if (c.length === 0) return;
855
855
  const l = r.offsetTop, a = r.offsetLeft, f = r.offsetWidth, d = r.offsetHeight;
856
856
  for (let p = 0; p < c.length; p++) {
857
- const w = c[p], y = w.firstChild, u = y.offsetTop, g = y.offsetLeft, b = y.offsetWidth, v = y.offsetHeight, C = y.firstChild.nodeObj.branchColor || n, T = t.generateSubBranch({ pT: l, pL: a, pW: f, pH: d, cT: u, cL: g, cW: b, cH: v, direction: s, isFirst: i });
857
+ const w = c[p], y = w.firstChild, u = y.offsetTop, g = y.offsetLeft, v = y.offsetWidth, b = y.offsetHeight, C = y.firstChild.nodeObj.branchColor || n, T = t.generateSubBranch({ pT: l, pL: a, pW: f, pH: d, cT: u, cL: g, cW: v, cH: b, direction: s, isFirst: i });
858
858
  e.appendChild(Dt(T, C, "2"));
859
859
  const h = y.children[1];
860
860
  if (h) {
@@ -863,19 +863,19 @@ const k = "http://www.w3.org/2000/svg", K = function(t) {
863
863
  continue;
864
864
  Mt(t, e, C, w, s);
865
865
  }
866
- }, Ae = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', $e = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', He = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Ie = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', Oe = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Be = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', We = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>', Ye = {
867
- side: Ae,
868
- left: $e,
869
- right: He,
870
- full: Ie,
871
- living: Oe,
872
- zoomin: Be,
873
- zoomout: We
866
+ }, He = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Ie = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Oe = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Be = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', We = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Ye = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', Re = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>', Xe = {
867
+ side: He,
868
+ left: Ie,
869
+ right: Oe,
870
+ full: Be,
871
+ living: We,
872
+ zoomin: Ye,
873
+ zoomout: Re
874
874
  }, H = (t, e) => {
875
875
  const n = document.createElement("span");
876
- return n.id = t, n.innerHTML = Ye[e], n;
876
+ return n.id = t, n.innerHTML = Xe[e], n;
877
877
  };
878
- function Re(t) {
878
+ function Ve(t) {
879
879
  const e = document.createElement("div"), n = H("fullscreen", "full"), o = H("toCenter", "living"), s = H("zoomout", "zoomout"), i = H("zoomin", "zoomin");
880
880
  e.appendChild(n), e.appendChild(o), e.appendChild(s), e.appendChild(i), e.className = "mind-elixir-toolbar rb";
881
881
  let r = null;
@@ -903,7 +903,7 @@ function Re(t) {
903
903
  t.scale(t.scaleVal + t.scaleSensitivity);
904
904
  }, e;
905
905
  }
906
- function Xe(t) {
906
+ function ze(t) {
907
907
  const e = document.createElement("div"), n = H("tbltl", "left"), o = H("tbltr", "right"), s = H("tblts", "side");
908
908
  return e.appendChild(n), e.appendChild(o), e.appendChild(s), e.className = "mind-elixir-toolbar lt", n.onclick = () => {
909
909
  t.initLeft();
@@ -913,10 +913,27 @@ function Xe(t) {
913
913
  t.initSide();
914
914
  }, e;
915
915
  }
916
- function Ve(t) {
917
- t.container.append(Re(t)), t.container.append(Xe(t));
916
+ function Fe(t) {
917
+ t.container.append(Ve(t)), t.container.append(ze(t));
918
+ }
919
+ function Pt({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: a }) {
920
+ let f = e + n / 2;
921
+ const d = t + o / 2;
922
+ let p;
923
+ l === O.LHS ? p = i + r : p = i;
924
+ const w = s + c / 2, u = (1 - Math.abs(w - d) / a) * 0.25 * (n / 2);
925
+ return l === O.LHS ? f = f - n / 10 - u : f = f + n / 10 + u, `M ${f} ${d} Q ${f} ${w} ${p} ${w}`;
918
926
  }
919
- const ze = function(t, e = !0) {
927
+ function kt({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: a }) {
928
+ const f = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
929
+ let d = 0, p = 0;
930
+ a ? d = t + o / 2 : d = t + o;
931
+ const w = s + c;
932
+ let y = 0, u = 0, g = 0;
933
+ const v = Math.abs(d - w) / 300 * f;
934
+ return l === O.LHS ? (g = e, y = g + f, u = g - f, p = i + f, `M ${y} ${d} C ${g} ${d} ${g + v} ${w} ${u} ${w} H ${p}`) : (g = e + n, y = g - f, u = g + f, p = i + r - f, `M ${y} ${d} C ${g} ${d} ${g - v} ${w} ${u} ${w} H ${p}`);
935
+ }
936
+ const Ge = function(t, e = !0) {
920
937
  this.theme = {
921
938
  ...this.theme || Y,
922
939
  ...t,
@@ -924,7 +941,7 @@ const ze = function(t, e = !0) {
924
941
  ...this.theme?.cssVar || Y.cssVar,
925
942
  ...t.cssVar || {}
926
943
  }
927
- }, this.theme.generateMainBranch !== void 0 && (this.generateMainBranch = this.theme.generateMainBranch), this.theme.generateSubBranch !== void 0 && (this.generateSubBranch = this.theme.generateSubBranch);
944
+ }, this.generateMainBranch = this.theme.generateMainBranch || Pt, this.generateSubBranch = this.theme.generateSubBranch || kt;
928
945
  const o = {
929
946
  ...(this.theme.type === "dark" ? et : Y).cssVar,
930
947
  ...this.theme.cssVar
@@ -936,9 +953,9 @@ const ze = function(t, e = !0) {
936
953
  this.container.style.setProperty(r, o[r]);
937
954
  }
938
955
  e && this.refresh();
939
- }, Fe = function(t) {
956
+ }, _e = function(t) {
940
957
  this.compact = t, this.theme && this.changeTheme(this.theme);
941
- }, Ge = function(t) {
958
+ }, qe = function(t) {
942
959
  return {
943
960
  dom: t,
944
961
  moved: !1,
@@ -961,7 +978,7 @@ const ze = function(t, e = !0) {
961
978
  },
962
979
  cb: null,
963
980
  init(e, n) {
964
- this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = vt([
981
+ this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = bt([
965
982
  { dom: e, evt: "pointermove", func: this.handlePointerMove },
966
983
  { dom: e, evt: "pointerleave", func: this.handleClear },
967
984
  { dom: e, evt: "pointerup", func: this.handleClear },
@@ -974,15 +991,15 @@ const ze = function(t, e = !0) {
974
991
  }
975
992
  };
976
993
  }, gt = {
977
- create: Ge
978
- }, Pt = "#4dc4ff";
979
- function kt(t, e, n, o, s, i, r, c) {
994
+ create: qe
995
+ }, Nt = "#4dc4ff";
996
+ function At(t, e, n, o, s, i, r, c) {
980
997
  return {
981
998
  x: t / 8 + n * 3 / 8 + s * 3 / 8 + r / 8,
982
999
  y: e / 8 + o * 3 / 8 + i * 3 / 8 + c / 8
983
1000
  };
984
1001
  }
985
- function _e(t, e, n) {
1002
+ function je(t, e, n) {
986
1003
  t && (t.dataset.x = e.toString(), t.dataset.y = n.toString(), K(t));
987
1004
  }
988
1005
  function z(t, e, n, o, s) {
@@ -1014,17 +1031,17 @@ function mt(t, e, n, o, s, i, r, c, l, a) {
1014
1031
  if (u) {
1015
1032
  const g = `M ${u.x1} ${u.y1} L ${e} ${n} L ${u.x2} ${u.y2}`;
1016
1033
  if (t.arrow2.setAttribute("d", g), d.length > 2 && d[2].setAttribute("d", g), a.style) {
1017
- const b = a.style;
1018
- b.stroke && t.arrow2.setAttribute("stroke", b.stroke), b.strokeWidth && t.arrow2.setAttribute("stroke-width", String(b.strokeWidth)), b.strokeLinecap && t.arrow2.setAttribute("stroke-linecap", b.strokeLinecap), b.opacity !== void 0 && t.arrow2.setAttribute("opacity", String(b.opacity));
1034
+ const v = a.style;
1035
+ v.stroke && t.arrow2.setAttribute("stroke", v.stroke), v.strokeWidth && t.arrow2.setAttribute("stroke-width", String(v.strokeWidth)), v.strokeLinecap && t.arrow2.setAttribute("stroke-linecap", v.strokeLinecap), v.opacity !== void 0 && t.arrow2.setAttribute("opacity", String(v.opacity));
1019
1036
  }
1020
1037
  }
1021
1038
  }
1022
- const { x: w, y } = kt(e, n, o, s, i, r, c, l);
1023
- if (t.labelEl && _e(t.labelEl, w, y), a.style?.labelColor) {
1039
+ const { x: w, y } = At(e, n, o, s, i, r, c, l);
1040
+ if (t.labelEl && je(t.labelEl, w, y), a.style?.labelColor) {
1024
1041
  const u = t.labelEl;
1025
1042
  u && (u.style.color = a.style.labelColor);
1026
1043
  }
1027
- tn(t);
1044
+ nn(t);
1028
1045
  }
1029
1046
  function j(t, e, n) {
1030
1047
  const { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = e.offsetWidth, r = e.offsetHeight, c = o + i / 2, l = s + r / 2, a = c + n.x, f = l + n.y;
@@ -1045,20 +1062,20 @@ function I(t) {
1045
1062
  y: n
1046
1063
  };
1047
1064
  }
1048
- const qe = function(t, e, n) {
1065
+ const Ue = function(t, e, n) {
1049
1066
  const o = P(t.nodes, e), s = P(t.nodes, n), i = o.offsetLeft + e.offsetWidth / 2, r = o.offsetTop + e.offsetHeight / 2, c = s.offsetLeft + n.offsetWidth / 2, l = s.offsetTop + n.offsetHeight / 2, a = c - i, f = l - r, d = Math.sqrt(a * a + f * f), p = Math.max(50, Math.min(200, d * 0.3)), w = Math.abs(a), y = Math.abs(f);
1050
1067
  let u, g;
1051
1068
  if (d < 150) {
1052
- const v = e.closest("me-main").className === "lhs" ? -1 : 1;
1053
- u = { x: 200 * v, y: 0 }, g = { x: 200 * v, y: 0 };
1069
+ const b = e.closest("me-main").className === "lhs" ? -1 : 1;
1070
+ u = { x: 200 * b, y: 0 }, g = { x: 200 * b, y: 0 };
1054
1071
  } else if (w > y * 1.5) {
1055
- const v = a > 0 ? e.offsetWidth / 2 : -e.offsetWidth / 2, C = a > 0 ? -n.offsetWidth / 2 : n.offsetWidth / 2;
1056
- u = { x: v + (a > 0 ? p : -p), y: 0 }, g = { x: C + (a > 0 ? -p : p), y: 0 };
1072
+ const b = a > 0 ? e.offsetWidth / 2 : -e.offsetWidth / 2, C = a > 0 ? -n.offsetWidth / 2 : n.offsetWidth / 2;
1073
+ u = { x: b + (a > 0 ? p : -p), y: 0 }, g = { x: C + (a > 0 ? -p : p), y: 0 };
1057
1074
  } else if (y > w * 1.5) {
1058
- const v = f > 0 ? e.offsetHeight / 2 : -e.offsetHeight / 2, C = f > 0 ? -n.offsetHeight / 2 : n.offsetHeight / 2;
1059
- u = { x: 0, y: v + (f > 0 ? p : -p) }, g = { x: 0, y: C + (f > 0 ? -p : p) };
1075
+ const b = f > 0 ? e.offsetHeight / 2 : -e.offsetHeight / 2, C = f > 0 ? -n.offsetHeight / 2 : n.offsetHeight / 2;
1076
+ u = { x: 0, y: b + (f > 0 ? p : -p) }, g = { x: 0, y: C + (f > 0 ? -p : p) };
1060
1077
  } else {
1061
- const v = Math.atan2(f, a), C = e.offsetWidth / 2 * Math.cos(v), T = e.offsetHeight / 2 * Math.sin(v), h = -(n.offsetWidth / 2) * Math.cos(v), m = -(n.offsetHeight / 2) * Math.sin(v), x = p * 0.7 * (a > 0 ? 1 : -1), E = p * 0.7 * (f > 0 ? 1 : -1);
1078
+ const b = Math.atan2(f, a), C = e.offsetWidth / 2 * Math.cos(b), T = e.offsetHeight / 2 * Math.sin(b), h = -(n.offsetWidth / 2) * Math.cos(b), m = -(n.offsetHeight / 2) * Math.sin(b), x = p * 0.7 * (a > 0 ? 1 : -1), E = p * 0.7 * (f > 0 ? 1 : -1);
1062
1079
  u = { x: C + x, y: T + E }, g = { x: h - x, y: m - E };
1063
1080
  }
1064
1081
  return {
@@ -1069,28 +1086,28 @@ const qe = function(t, e, n) {
1069
1086
  if (!e || !n)
1070
1087
  return;
1071
1088
  if (!o.delta1 || !o.delta2) {
1072
- const S = qe(t, e, n);
1089
+ const S = Ue(t, e, n);
1073
1090
  o.delta1 = S.delta1, o.delta2 = S.delta2;
1074
1091
  }
1075
1092
  const i = j(t, e, o.delta1), r = j(t, n, o.delta2), { x: c, y: l } = I(i), { ctrlX: a, ctrlY: f } = i, { ctrlX: d, ctrlY: p } = r, { x: w, y } = I(r), u = q(d, p, w, y);
1076
1093
  if (!u) return;
1077
1094
  const g = `M ${u.x1} ${u.y1} L ${w} ${y} L ${u.x2} ${u.y2}`;
1078
- let b = "";
1095
+ let v = "";
1079
1096
  if (o.bidirectional) {
1080
1097
  const S = q(a, f, c, l);
1081
1098
  if (!S) return;
1082
- b = `M ${S.x1} ${S.y1} L ${c} ${l} L ${S.x2} ${S.y2}`;
1099
+ v = `M ${S.x1} ${S.y1} L ${c} ${l} L ${S.x2} ${S.y2}`;
1083
1100
  }
1084
- const v = ke(`M ${c} ${l} C ${a} ${f} ${d} ${p} ${w} ${y}`, g, b, o.style), { x: C, y: T } = kt(c, l, a, f, d, p, w, y), h = o.style?.labelColor || "rgb(235, 95, 82)", m = "a-" + o.id;
1085
- v.id = m;
1101
+ const b = Ae(`M ${c} ${l} C ${a} ${f} ${d} ${p} ${w} ${y}`, g, v, o.style), { x: C, y: T } = At(c, l, a, f, d, p, w, y), h = o.style?.labelColor || "rgb(235, 95, 82)", m = "a-" + o.id;
1102
+ b.id = m;
1086
1103
  const x = t.markdown ? t.markdown(o.label, o) : o.label, E = tt(x, C, T, {
1087
1104
  anchor: "middle",
1088
1105
  color: h,
1089
1106
  dataType: "arrow",
1090
1107
  svgId: m
1091
1108
  });
1092
- v.labelEl = E, v.arrowObj = o, v.dataset.linkid = o.id, t.labelContainer.appendChild(E), t.arrowSvg.appendChild(v), K(E), s || (t.arrows.push(o), t.currentArrow = v, At(t, o, i, r));
1093
- }, je = function(t, e, n = {}) {
1109
+ b.labelEl = E, b.arrowObj = o, b.dataset.linkid = o.id, t.labelContainer.appendChild(E), t.arrowSvg.appendChild(b), K(E), s || (t.arrows.push(o), t.currentArrow = b, Ht(t, o, i, r));
1110
+ }, Ke = function(t, e, n = {}) {
1094
1111
  const o = {
1095
1112
  id: R(),
1096
1113
  label: "Custom Link",
@@ -1102,14 +1119,14 @@ const qe = function(t, e, n) {
1102
1119
  name: "createArrow",
1103
1120
  obj: o
1104
1121
  });
1105
- }, Ue = function(t) {
1122
+ }, Je = function(t) {
1106
1123
  J(this);
1107
1124
  const e = { ...t, id: R() };
1108
1125
  it(this, this.findEle(e.from), this.findEle(e.to), e), this.bus.fire("operation", {
1109
1126
  name: "createArrow",
1110
1127
  obj: e
1111
1128
  });
1112
- }, Ke = function(t) {
1129
+ }, Ze = function(t) {
1113
1130
  let e;
1114
1131
  if (t ? e = t : e = this.currentArrow, !e) return;
1115
1132
  J(this);
@@ -1120,11 +1137,11 @@ const qe = function(t, e, n) {
1120
1137
  id: n
1121
1138
  }
1122
1139
  });
1123
- }, Je = function(t) {
1140
+ }, Qe = function(t) {
1124
1141
  this.currentArrow = t;
1125
1142
  const e = t.arrowObj, n = this.findEle(e.from), o = this.findEle(e.to), s = j(this, n, e.delta1), i = j(this, o, e.delta2);
1126
- this.editable ? At(this, e, s, i) : Nt(t, Pt), this.bus.fire("selectArrow", e);
1127
- }, Ze = function() {
1143
+ this.editable ? Ht(this, e, s, i) : $t(t, Nt), this.bus.fire("selectArrow", e);
1144
+ }, tn = function() {
1128
1145
  J(this), this.currentArrow = null, this.bus.fire("unselectArrow");
1129
1146
  }, Q = function(t, e) {
1130
1147
  const n = document.createElementNS(k, "path");
@@ -1136,7 +1153,7 @@ const qe = function(t, e, n) {
1136
1153
  "stroke-linecap": "round",
1137
1154
  "stroke-linejoin": "round"
1138
1155
  }), n;
1139
- }, Nt = function(t, e) {
1156
+ }, $t = function(t, e) {
1140
1157
  const n = document.createElementNS(k, "g");
1141
1158
  n.setAttribute("class", "arrow-highlight"), n.setAttribute("opacity", "0.45");
1142
1159
  const o = Q(t.line.getAttribute("d"), e);
@@ -1147,32 +1164,32 @@ const qe = function(t, e, n) {
1147
1164
  n.appendChild(i);
1148
1165
  }
1149
1166
  t.insertBefore(n, t.firstChild);
1150
- }, Qe = function(t) {
1167
+ }, en = function(t) {
1151
1168
  const e = t.querySelector(".arrow-highlight");
1152
1169
  e && e.remove();
1153
- }, tn = function(t) {
1170
+ }, nn = function(t) {
1154
1171
  const e = t.querySelector(".arrow-highlight");
1155
1172
  if (!e) return;
1156
1173
  const n = e.querySelectorAll("path");
1157
1174
  n.length >= 1 && n[0].setAttribute("d", t.line.getAttribute("d")), n.length >= 2 && n[1].setAttribute("d", t.arrow1.getAttribute("d")), n.length >= 3 && t.arrow2.getAttribute("d") && n[2].setAttribute("d", t.arrow2.getAttribute("d"));
1158
1175
  }, J = function(t) {
1159
- t.helper1?.destroy(), t.helper2?.destroy(), t.linkController.style.display = "none", t.P2.style.display = "none", t.P3.style.display = "none", t.currentArrow && Qe(t.currentArrow);
1160
- }, At = function(t, e, n, o) {
1176
+ t.helper1?.destroy(), t.helper2?.destroy(), t.linkController.style.display = "none", t.P2.style.display = "none", t.P3.style.display = "none", t.currentArrow && en(t.currentArrow);
1177
+ }, Ht = function(t, e, n, o) {
1161
1178
  const { linkController: s, P2: i, P3: r, line1: c, line2: l, nodes: a, map: f, currentArrow: d, bus: p } = t;
1162
1179
  if (!d) return;
1163
- s.style.display = "initial", i.style.display = "initial", r.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(r), Nt(d, Pt);
1164
- let { x: w, y } = I(n), { ctrlX: u, ctrlY: g } = n, { ctrlX: b, ctrlY: v } = o, { x: C, y: T } = I(o);
1165
- i.style.cssText = `top:${g}px;left:${u}px;`, r.style.cssText = `top:${v}px;left:${b}px;`, z(c, w, y, u, g), z(l, b, v, C, T), t.helper1 = gt.create(i), t.helper2 = gt.create(r), t.helper1.init(f, (h, m) => {
1180
+ s.style.display = "initial", i.style.display = "initial", r.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(r), $t(d, Nt);
1181
+ let { x: w, y } = I(n), { ctrlX: u, ctrlY: g } = n, { ctrlX: v, ctrlY: b } = o, { x: C, y: T } = I(o);
1182
+ i.style.cssText = `top:${g}px;left:${u}px;`, r.style.cssText = `top:${b}px;left:${v}px;`, z(c, w, y, u, g), z(l, v, b, C, T), t.helper1 = gt.create(i), t.helper2 = gt.create(r), t.helper1.init(f, (h, m) => {
1166
1183
  u = u + h / t.scaleVal, g = g + m / t.scaleVal;
1167
1184
  const x = I({ ...n, ctrlX: u, ctrlY: g });
1168
- w = x.x, y = x.y, i.style.top = g + "px", i.style.left = u + "px", mt(d, w, y, u, g, b, v, C, T, e), z(c, w, y, u, g), e.delta1.x = Math.round(u - n.cx), e.delta1.y = Math.round(g - n.cy), p.fire("updateArrowDelta", e);
1185
+ w = x.x, y = x.y, i.style.top = g + "px", i.style.left = u + "px", mt(d, w, y, u, g, v, b, C, T, e), z(c, w, y, u, g), e.delta1.x = Math.round(u - n.cx), e.delta1.y = Math.round(g - n.cy), p.fire("updateArrowDelta", e);
1169
1186
  }), t.helper2.init(f, (h, m) => {
1170
- b = b + h / t.scaleVal, v = v + m / t.scaleVal;
1171
- const x = I({ ...o, ctrlX: b, ctrlY: v });
1172
- C = x.x, T = x.y, r.style.top = v + "px", r.style.left = b + "px", mt(d, w, y, u, g, b, v, C, T, e), z(l, b, v, C, T), e.delta2.x = Math.round(b - o.cx), e.delta2.y = Math.round(v - o.cy), p.fire("updateArrowDelta", e);
1187
+ v = v + h / t.scaleVal, b = b + m / t.scaleVal;
1188
+ const x = I({ ...o, ctrlX: v, ctrlY: b });
1189
+ C = x.x, T = x.y, r.style.top = b + "px", r.style.left = v + "px", mt(d, w, y, u, g, v, b, C, T, e), z(l, v, b, C, T), e.delta2.x = Math.round(v - o.cx), e.delta2.y = Math.round(b - o.cy), p.fire("updateArrowDelta", e);
1173
1190
  });
1174
1191
  };
1175
- function en() {
1192
+ function on() {
1176
1193
  this.arrowSvg.innerHTML = "", this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach((e) => e.remove());
1177
1194
  for (let e = 0; e < this.arrows.length; e++) {
1178
1195
  const n = this.arrows[e];
@@ -1183,23 +1200,23 @@ function en() {
1183
1200
  }
1184
1201
  this.nodes.appendChild(this.arrowSvg);
1185
1202
  }
1186
- function nn(t) {
1203
+ function sn(t) {
1187
1204
  J(this), t && t.labelEl && Lt(this, t.labelEl, t.arrowObj);
1188
1205
  }
1189
- function on() {
1206
+ function rn() {
1190
1207
  this.arrows = this.arrows.filter((t) => _(t.from, this.nodeData) && _(t.to, this.nodeData));
1191
1208
  }
1192
- const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1209
+ const cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1193
1210
  __proto__: null,
1194
- createArrow: je,
1195
- createArrowFrom: Ue,
1196
- editArrowLabel: nn,
1197
- removeArrow: Ke,
1198
- renderArrow: en,
1199
- selectArrow: Je,
1200
- tidyArrow: on,
1201
- unselectArrow: Ze
1202
- }, Symbol.toStringTag, { value: "Module" })), rn = function(t) {
1211
+ createArrow: Ke,
1212
+ createArrowFrom: Je,
1213
+ editArrowLabel: sn,
1214
+ removeArrow: Ze,
1215
+ renderArrow: on,
1216
+ selectArrow: Qe,
1217
+ tidyArrow: rn,
1218
+ unselectArrow: tn
1219
+ }, Symbol.toStringTag, { value: "Module" })), ln = function(t) {
1203
1220
  if (t.length === 0) throw new Error("No selected node.");
1204
1221
  if (t.length === 1) {
1205
1222
  const l = t[0].nodeObj, a = t[0].nodeObj.parent;
@@ -1236,7 +1253,7 @@ const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1236
1253
  start: i,
1237
1254
  end: r
1238
1255
  };
1239
- }, cn = function(t) {
1256
+ }, an = function(t) {
1240
1257
  const e = document.createElementNS(k, "g");
1241
1258
  return e.setAttribute("id", t), e;
1242
1259
  }, yt = function(t, e) {
@@ -1248,69 +1265,69 @@ const sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1248
1265
  "stroke-linecap": "round",
1249
1266
  "stroke-width": "2"
1250
1267
  }), n;
1251
- }, ln = (t) => t.parentElement.parentElement, an = function(t, { parent: e, start: n }) {
1268
+ }, hn = (t) => t.parentElement.parentElement, dn = function(t, { parent: e, start: n }) {
1252
1269
  const o = t.findEle(e), s = o.nodeObj;
1253
1270
  let i;
1254
1271
  return s.parent ? i = o.closest("me-main").className : i = t.findEle(s.children[n].id).closest("me-main").className, i;
1255
1272
  }, rt = function(t, e) {
1256
- const { id: n, label: o, parent: s, start: i, end: r, style: c } = e, { nodes: l, theme: a, summarySvg: f } = t, p = t.findEle(s).nodeObj, w = an(t, e);
1257
- let y = 1 / 0, u = 0, g = 0, b = 0;
1273
+ const { id: n, label: o, parent: s, start: i, end: r, style: c } = e, { nodes: l, theme: a, summarySvg: f } = t, p = t.findEle(s).nodeObj, w = dn(t, e);
1274
+ let y = 1 / 0, u = 0, g = 0, v = 0;
1258
1275
  for (let B = i; B <= r; B++) {
1259
1276
  const ct = p.children?.[B];
1260
1277
  if (!ct)
1261
1278
  return t.removeSummary(n), null;
1262
- const X = ln(t.findEle(ct.id)), { offsetLeft: V, offsetTop: lt } = P(l, X), at = i === r ? 10 : 20;
1263
- B === i && (g = lt + at), B === r && (b = lt + X.offsetHeight - at), V < y && (y = V), X.offsetWidth + V > u && (u = X.offsetWidth + V);
1279
+ const X = hn(t.findEle(ct.id)), { offsetLeft: V, offsetTop: lt } = P(l, X), at = i === r ? 10 : 20;
1280
+ B === i && (g = lt + at), B === r && (v = lt + X.offsetHeight - at), V < y && (y = V), X.offsetWidth + V > u && (u = X.offsetWidth + V);
1264
1281
  }
1265
- let v, C;
1266
- const T = p.parent ? 10 : 0, h = g + T, m = b + T, x = (h + m) / 2, E = c?.stroke || a.cssVar["--color"], S = c?.labelColor || a.cssVar["--color"], M = "s-" + n, N = t.markdown ? t.markdown(o, e) : o;
1267
- w === O.LHS ? (v = yt(`M ${y + 10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m - 10} c 0 5 5 10 10 10 M ${y} ${x} h -10`, E), C = tt(N, y - 20, x, { anchor: "end", color: S, dataType: "summary", svgId: M })) : (v = yt(`M ${u - 10} ${h} c 5 0 10 5 10 10 L ${u} ${m - 10} c 0 5 -5 10 -10 10 M ${u} ${x} h 10`, E), C = tt(N, u + 20, x, { anchor: "start", color: S, dataType: "summary", svgId: M }));
1268
- const $ = cn(M);
1269
- return $.appendChild(v), t.labelContainer.appendChild(C), K(C), $.summaryObj = e, $.labelEl = C, f.appendChild($), $;
1270
- }, hn = function(t = {}) {
1282
+ let b, C;
1283
+ const T = p.parent ? 10 : 0, h = g + T, m = v + T, x = (h + m) / 2, E = c?.stroke || a.cssVar["--color"], S = c?.labelColor || a.cssVar["--color"], M = "s-" + n, N = t.markdown ? t.markdown(o, e) : o;
1284
+ w === O.LHS ? (b = yt(`M ${y + 10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m - 10} c 0 5 5 10 10 10 M ${y} ${x} h -10`, E), C = tt(N, y - 20, x, { anchor: "end", color: S, dataType: "summary", svgId: M })) : (b = yt(`M ${u - 10} ${h} c 5 0 10 5 10 10 L ${u} ${m - 10} c 0 5 -5 10 -10 10 M ${u} ${x} h 10`, E), C = tt(N, u + 20, x, { anchor: "start", color: S, dataType: "summary", svgId: M }));
1285
+ const $ = an(M);
1286
+ return $.appendChild(b), t.labelContainer.appendChild(C), K(C), $.summaryObj = e, $.labelEl = C, f.appendChild($), $;
1287
+ }, fn = function(t = {}) {
1271
1288
  if (!this.currentNodes) return;
1272
- const { currentNodes: e, summaries: n, bus: o } = this, { parent: s, start: i, end: r } = rn(e), c = { id: R(), parent: s, start: i, end: r, label: "summary", style: t.style }, l = rt(this, c);
1289
+ const { currentNodes: e, summaries: n, bus: o } = this, { parent: s, start: i, end: r } = ln(e), c = { id: R(), parent: s, start: i, end: r, label: "summary", style: t.style }, l = rt(this, c);
1273
1290
  n.push(c), this.editSummary(l), o.fire("operation", {
1274
1291
  name: "createSummary",
1275
1292
  obj: c
1276
1293
  });
1277
- }, dn = function(t) {
1294
+ }, un = function(t) {
1278
1295
  const e = R(), n = { ...t, id: e };
1279
1296
  rt(this, n), this.summaries.push(n), this.bus.fire("operation", {
1280
1297
  name: "createSummary",
1281
1298
  obj: n
1282
1299
  });
1283
- }, fn = function(t) {
1300
+ }, pn = function(t) {
1284
1301
  const e = this.summaries.findIndex((n) => n.id === t);
1285
1302
  e > -1 && (this.summaries.splice(e, 1), this.nodes.querySelector("#s-" + t)?.remove(), this.nodes.querySelector("#label-s-" + t)?.remove()), this.bus.fire("operation", {
1286
1303
  name: "removeSummary",
1287
1304
  obj: { id: t }
1288
1305
  });
1289
- }, un = function(t) {
1306
+ }, gn = function(t) {
1290
1307
  const e = t.labelEl;
1291
1308
  e && e.classList.add("selected"), this.currentSummary = t, this.bus.fire("selectSummary", t.summaryObj);
1292
- }, pn = function() {
1309
+ }, mn = function() {
1293
1310
  this.currentSummary?.labelEl?.classList.remove("selected"), this.currentSummary = null, this.bus.fire("unselectSummary");
1294
- }, gn = function() {
1311
+ }, yn = function() {
1295
1312
  this.summarySvg.innerHTML = "", this.summaries.forEach((t) => {
1296
1313
  try {
1297
1314
  rt(this, t);
1298
1315
  } catch {
1299
1316
  }
1300
1317
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
1301
- }, mn = function(t) {
1318
+ }, wn = function(t) {
1302
1319
  t && t.labelEl && Lt(this, t.labelEl, t.summaryObj);
1303
- }, yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1320
+ }, bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1304
1321
  __proto__: null,
1305
- createSummary: hn,
1306
- createSummaryFrom: dn,
1307
- editSummary: mn,
1308
- removeSummary: fn,
1309
- renderSummary: gn,
1310
- selectSummary: un,
1311
- unselectSummary: pn
1322
+ createSummary: fn,
1323
+ createSummaryFrom: un,
1324
+ editSummary: wn,
1325
+ removeSummary: pn,
1326
+ renderSummary: yn,
1327
+ selectSummary: gn,
1328
+ unselectSummary: mn
1312
1329
  }, Symbol.toStringTag, { value: "Module" })), L = "http://www.w3.org/2000/svg";
1313
- function wn(t, e) {
1330
+ function vn(t, e) {
1314
1331
  const n = document.createElementNS(L, "svg");
1315
1332
  return D(n, {
1316
1333
  version: "1.1",
@@ -1319,10 +1336,10 @@ function wn(t, e) {
1319
1336
  width: e
1320
1337
  }), n;
1321
1338
  }
1322
- function vn(t, e) {
1339
+ function xn(t, e) {
1323
1340
  return (parseInt(t) - parseInt(e)) / 2;
1324
1341
  }
1325
- function bn(t, e, n, o) {
1342
+ function Cn(t, e, n, o) {
1326
1343
  const s = document.createElementNS(L, "g");
1327
1344
  let i = "";
1328
1345
  return t.text ? i = t.text.textContent : i = t.childNodes[0].textContent, i.split(`
@@ -1330,7 +1347,7 @@ function bn(t, e, n, o) {
1330
1347
  const a = document.createElementNS(L, "text");
1331
1348
  D(a, {
1332
1349
  x: n + parseInt(e.paddingLeft) + "",
1333
- y: o + parseInt(e.paddingTop) + vn(e.lineHeight, e.fontSize) * (l + 1) + parseFloat(e.fontSize) * (l + 1) + "",
1350
+ y: o + parseInt(e.paddingTop) + xn(e.lineHeight, e.fontSize) * (l + 1) + parseFloat(e.fontSize) * (l + 1) + "",
1334
1351
  "text-anchor": "start",
1335
1352
  "font-family": e.fontFamily,
1336
1353
  "font-size": `${e.fontSize}`,
@@ -1339,7 +1356,7 @@ function bn(t, e, n, o) {
1339
1356
  }), a.innerHTML = c, s.appendChild(a);
1340
1357
  }), s;
1341
1358
  }
1342
- function xn(t, e, n, o) {
1359
+ function Sn(t, e, n, o) {
1343
1360
  let s = "";
1344
1361
  t.nodeObj?.dangerouslySetInnerHTML ? s = t.nodeObj.dangerouslySetInnerHTML : t.text ? s = t.text.textContent : s = t.childNodes[0].textContent;
1345
1362
  const i = document.createElementNS(L, "foreignObject");
@@ -1355,7 +1372,7 @@ function xn(t, e, n, o) {
1355
1372
  style: `font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`
1356
1373
  }), r.innerHTML = s, i.appendChild(r), i;
1357
1374
  }
1358
- function Cn(t, e) {
1375
+ function En(t, e) {
1359
1376
  const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = document.createElementNS(L, "rect");
1360
1377
  return D(i, {
1361
1378
  x: o + "",
@@ -1385,9 +1402,9 @@ function F(t, e, n = !1) {
1385
1402
  const c = document.createElementNS(L, "g");
1386
1403
  c.appendChild(r);
1387
1404
  let l;
1388
- return n ? l = xn(e, o, s, i) : l = bn(e, o, s, i), c.appendChild(l), c;
1405
+ return n ? l = Sn(e, o, s, i) : l = Cn(e, o, s, i), c.appendChild(l), c;
1389
1406
  }
1390
- function Sn(t, e) {
1407
+ function Tn(t, e) {
1391
1408
  const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = document.createElementNS(L, "a"), r = document.createElementNS(L, "text");
1392
1409
  return D(r, {
1393
1410
  x: o + "",
@@ -1399,7 +1416,7 @@ function Sn(t, e) {
1399
1416
  fill: `${n.color}`
1400
1417
  }), r.innerHTML = e.textContent, i.appendChild(r), i.setAttribute("href", e.href), i;
1401
1418
  }
1402
- function En(t, e) {
1419
+ function Dn(t, e) {
1403
1420
  const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = P(t.nodes, e), i = document.createElementNS(L, "image");
1404
1421
  return D(i, {
1405
1422
  x: o + "",
@@ -1409,8 +1426,8 @@ function En(t, e) {
1409
1426
  href: e.src
1410
1427
  }), i;
1411
1428
  }
1412
- const G = 100, Tn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Dn = (t, e = !1) => {
1413
- const n = t.nodes, o = n.offsetHeight + G * 2, s = n.offsetWidth + G * 2, i = wn(o + "px", s + "px"), r = document.createElementNS(L, "svg"), c = document.createElementNS(L, "rect");
1429
+ const G = 100, Ln = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Mn = (t, e = !1) => {
1430
+ const n = t.nodes, o = n.offsetHeight + G * 2, s = n.offsetWidth + G * 2, i = vn(o + "px", s + "px"), r = document.createElementNS(L, "svg"), c = document.createElementNS(L, "rect");
1414
1431
  D(c, {
1415
1432
  x: "0",
1416
1433
  y: "0",
@@ -1427,22 +1444,22 @@ const G = 100, Tn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "
1427
1444
  a && r.appendChild(a);
1428
1445
  const f = n.querySelector(".summary")?.cloneNode(!0);
1429
1446
  return f && r.appendChild(f), n.querySelectorAll("me-tpc").forEach((d) => {
1430
- d.nodeObj.dangerouslySetInnerHTML ? r.appendChild(F(t, d, !e)) : (r.appendChild(Cn(t, d)), r.appendChild(F(t, d.text, !e)));
1447
+ d.nodeObj.dangerouslySetInnerHTML ? r.appendChild(F(t, d, !e)) : (r.appendChild(En(t, d)), r.appendChild(F(t, d.text, !e)));
1431
1448
  }), n.querySelectorAll(".tags > span").forEach((d) => {
1432
1449
  r.appendChild(F(t, d));
1433
1450
  }), n.querySelectorAll(".icons > span").forEach((d) => {
1434
1451
  r.appendChild(F(t, d));
1435
1452
  }), n.querySelectorAll(".hyper-link").forEach((d) => {
1436
- r.appendChild(Sn(t, d));
1453
+ r.appendChild(Tn(t, d));
1437
1454
  }), n.querySelectorAll("img").forEach((d) => {
1438
- r.appendChild(En(t, d));
1455
+ r.appendChild(Dn(t, d));
1439
1456
  }), D(r, {
1440
1457
  x: G + "",
1441
1458
  y: G + "",
1442
1459
  overflow: "visible"
1443
1460
  }), i.appendChild(r), i;
1444
- }, Ln = (t, e) => (e && t.insertAdjacentHTML("afterbegin", "<style>" + e + "</style>"), Tn + t.outerHTML);
1445
- function Mn(t) {
1461
+ }, Pn = (t, e) => (e && t.insertAdjacentHTML("afterbegin", "<style>" + e + "</style>"), Ln + t.outerHTML);
1462
+ function kn(t) {
1446
1463
  return new Promise((e, n) => {
1447
1464
  const o = new FileReader();
1448
1465
  o.onload = (s) => {
@@ -1452,11 +1469,11 @@ function Mn(t) {
1452
1469
  }, o.readAsDataURL(t);
1453
1470
  });
1454
1471
  }
1455
- const Pn = function(t = !1, e) {
1456
- const n = Dn(this, t), o = Ln(n, e);
1472
+ const Nn = function(t = !1, e) {
1473
+ const n = Mn(this, t), o = Pn(n, e);
1457
1474
  return new Blob([o], { type: "image/svg+xml" });
1458
- }, kn = async function(t = !1, e) {
1459
- const n = this.exportSvg(t, e), o = await Mn(n);
1475
+ }, An = async function(t = !1, e) {
1476
+ const n = this.exportSvg(t, e), o = await kn(n);
1460
1477
  return new Promise((s, i) => {
1461
1478
  const r = new Image();
1462
1479
  r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
@@ -1464,31 +1481,31 @@ const Pn = function(t = !1, e) {
1464
1481
  c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(s, "image/png", 1);
1465
1482
  }, r.src = o, r.onerror = i;
1466
1483
  });
1467
- }, Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1484
+ }, $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1468
1485
  __proto__: null,
1469
- exportPng: kn,
1470
- exportSvg: Pn
1471
- }, Symbol.toStringTag, { value: "Module" })), An = {}, $n = {
1486
+ exportPng: An,
1487
+ exportSvg: Nn
1488
+ }, Symbol.toStringTag, { value: "Module" })), Hn = {}, In = {
1472
1489
  getObjById: _,
1473
- generateNewObj: Ht,
1474
- layout: Vt,
1475
- linkDiv: Ne,
1476
- editTopic: Ut,
1477
- createWrapper: Gt,
1478
- createParent: _t,
1479
- createChildren: qt,
1480
- createTopic: jt,
1490
+ generateNewObj: Ot,
1491
+ layout: Ft,
1492
+ linkDiv: $e,
1493
+ editTopic: Jt,
1494
+ createWrapper: qt,
1495
+ createParent: jt,
1496
+ createChildren: Ut,
1497
+ createTopic: Kt,
1481
1498
  findEle: Ct,
1482
- changeTheme: ze,
1483
- changeCompact: Fe,
1484
- ...xe,
1485
- ...An,
1486
- ...sn,
1487
- ...yn,
1488
- ...Nn,
1499
+ changeTheme: Ge,
1500
+ changeCompact: _e,
1501
+ ...Se,
1502
+ ...Hn,
1503
+ ...cn,
1504
+ ...bn,
1505
+ ...$n,
1489
1506
  init(t) {
1490
1507
  if (t = JSON.parse(JSON.stringify(t)), !t || !t.nodeData) return new Error("MindElixir: `data` is required");
1491
- t.direction !== void 0 && (this.direction = t.direction), t.compact !== void 0 && (this.compact = t.compact), this.changeTheme(t.theme || this.theme, !1), t.meta && (this.meta = t.meta), this.nodeData = t.nodeData, nt(this.nodeData), this.arrows = t.arrows || [], this.summaries = t.summaries || [], this.tidyArrow(), this.toolBar && Ve(this), this.layout(), this.linkDiv(), this.toCenter();
1508
+ t.direction !== void 0 && (this.direction = t.direction), t.compact !== void 0 && (this.compact = t.compact), this.changeTheme(t.theme || this.theme, !1), t.meta && (this.meta = t.meta), this.nodeData = t.nodeData, nt(this.nodeData), this.arrows = t.arrows || [], this.summaries = t.summaries || [], this.tidyArrow(), this.toolBar && Fe(this), this.layout(), this.linkDiv(), this.toCenter();
1492
1509
  },
1493
1510
  destroy() {
1494
1511
  this.disposable.forEach((t) => t()), this.el && (this.el.innerHTML = ""), this.el = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.arrowSvg = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, this.selection?.destroy(), this.selection = void 0;
@@ -1500,25 +1517,7 @@ const Pn = function(t = !1, e) {
1500
1517
  enableMobileMultiSelect(t) {
1501
1518
  this.mobileMultiSelect = t;
1502
1519
  }
1503
- };
1504
- function Hn({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: a }) {
1505
- let f = e + n / 2;
1506
- const d = t + o / 2;
1507
- let p;
1508
- l === O.LHS ? p = i + r : p = i;
1509
- const w = s + c / 2, u = (1 - Math.abs(w - d) / a) * 0.25 * (n / 2);
1510
- return l === O.LHS ? f = f - n / 10 - u : f = f + n / 10 + u, `M ${f} ${d} Q ${f} ${w} ${p} ${w}`;
1511
- }
1512
- function In({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: a }) {
1513
- const f = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
1514
- let d = 0, p = 0;
1515
- a ? d = t + o / 2 : d = t + o;
1516
- const w = s + c;
1517
- let y = 0, u = 0, g = 0;
1518
- const b = Math.abs(d - w) / 300 * f;
1519
- return l === O.LHS ? (g = e, y = g + f, u = g - f, p = i + f, `M ${y} ${d} C ${g} ${d} ${g + b} ${w} ${u} ${w} H ${p}`) : (g = e + n, y = g - f, u = g + f, p = i + r - f, `M ${y} ${d} C ${g} ${d} ${g - b} ${w} ${u} ${w} H ${p}`);
1520
- }
1521
- const On = "5.12.2-beta.0";
1520
+ }, On = "5.12.2-beta.2";
1522
1521
  function Bn(t) {
1523
1522
  return {
1524
1523
  x: 0,
@@ -1564,8 +1563,8 @@ function A({
1564
1563
  compact: y,
1565
1564
  theme: u,
1566
1565
  alignment: g,
1567
- scaleSensitivity: b,
1568
- scaleMax: v,
1566
+ scaleSensitivity: v,
1567
+ scaleMax: b,
1569
1568
  scaleMin: C,
1570
1569
  handleWheel: T,
1571
1570
  markdown: h,
@@ -1576,13 +1575,13 @@ function A({
1576
1575
  let S = null;
1577
1576
  const M = Object.prototype.toString.call(t);
1578
1577
  if (M === "[object HTMLDivElement]" ? S = t : M === "[object String]" && (S = document.querySelector(t)), !S) throw new Error("MindElixir: el is not a valid element");
1579
- S.style.position = "relative", S.innerHTML = "", this.el = S, this.disposable = [], this.before = l || {}, this.newTopicName = a || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = r ?? 0, this.direction = e ?? 1, this.editable = n ?? !0, this.allowUndo = f ?? !0, this.scaleSensitivity = b ?? 0.1, this.scaleMax = v ?? 1.4, this.scaleMin = C ?? 0.2, this.generateMainBranch = d || Hn, this.generateSubBranch = p || In, this.overflowHidden = w ?? !1, this.compact = y ?? !1, this.alignment = g ?? "root", this.handleWheel = T ?? !0, this.markdown = h || void 0, this.imageProxy = m || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = E ?? !1, this.panHelper = Bn(this), this.bus = Pe(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
1578
+ S.style.position = "relative", S.innerHTML = "", this.el = S, this.disposable = [], this.before = l || {}, this.newTopicName = a || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = r ?? 0, this.direction = e ?? 1, this.editable = n ?? !0, this.allowUndo = f ?? !0, this.scaleSensitivity = v ?? 0.1, this.scaleMax = b ?? 1.4, this.scaleMin = C ?? 0.2, this.generateMainBranch = d || Pt, this.generateSubBranch = p || kt, this.overflowHidden = w ?? !1, this.compact = y ?? !1, this.alignment = g ?? "root", this.handleWheel = T ?? !0, this.markdown = h || void 0, this.imageProxy = m || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = E ?? !1, this.panHelper = Bn(this), this.bus = Ne(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
1580
1579
  const N = window.matchMedia("(prefers-color-scheme: dark)");
1581
1580
  this.theme = u || (N.matches ? et : Y);
1582
1581
  const $ = document.createElement("div");
1583
- $.className = "map-canvas", this.map = $, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = document.createElement("div"), this.P3 = document.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = pt(), this.line2 = pt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = W("topiclinks"), this.labelContainer = document.createElement("div"), this.labelContainer.className = "label-container", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(Me(this)), x && (this.pasteHandler = x);
1582
+ $.className = "map-canvas", this.map = $, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = document.createElement("div"), this.P3 = document.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = pt(), this.line2 = pt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = W("topiclinks"), this.labelContainer = document.createElement("div"), this.labelContainer.className = "label-container", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(ke(this)), x && (this.pasteHandler = x);
1584
1583
  }
1585
- A.prototype = $n;
1584
+ A.prototype = In;
1586
1585
  Object.defineProperty(A.prototype, "currentNode", {
1587
1586
  get() {
1588
1587
  return this.currentNodes[this.currentNodes.length - 1];