mind-elixir 3.2.0 → 3.2.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.
- package/dist/MindElixir.iife.js +5 -5
- package/dist/MindElixir.js +64 -60
- package/dist/MindElixirLite.iife.js +4 -4
- package/dist/MindElixirLite.js +150 -185
- package/dist/types/customLink.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/methods.d.ts +1 -0
- package/package.json +1 -1
package/dist/MindElixirLite.js
CHANGED
|
@@ -90,7 +90,7 @@ function yt(e, t, n, s) {
|
|
|
90
90
|
function et() {
|
|
91
91
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const $t = function() {
|
|
94
94
|
const e = et();
|
|
95
95
|
return {
|
|
96
96
|
topic: this.newTopicName,
|
|
@@ -124,13 +124,13 @@ const Tt = function() {
|
|
|
124
124
|
this.moved = !1, this.mousedown = !1, this.lastX = 0, this.lastY = 0;
|
|
125
125
|
}
|
|
126
126
|
}, ot = (e) => e.tagName === "ME-TPC";
|
|
127
|
-
function
|
|
127
|
+
function Tt(e) {
|
|
128
128
|
e.map.addEventListener("click", (t) => {
|
|
129
129
|
if (N.moved) {
|
|
130
130
|
N.clear();
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
e.unselectNode(), e.unselectNodes(), e.unselectSummary();
|
|
133
|
+
e.unselectNode(), e.unselectNodes(), e.unselectSummary(), e.unselectLink();
|
|
134
134
|
const n = t.target;
|
|
135
135
|
if (n.tagName === "ME-EPD")
|
|
136
136
|
e.expandNode(n.previousSibling);
|
|
@@ -151,9 +151,11 @@ function Nt(e) {
|
|
|
151
151
|
console.log(t.button), t.button === 2 && N.clear();
|
|
152
152
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
153
153
|
t.button === 2 && N.clear();
|
|
154
|
+
}), e.map.addEventListener("contextmenu", (t) => {
|
|
155
|
+
t.preventDefault();
|
|
154
156
|
});
|
|
155
157
|
}
|
|
156
|
-
const
|
|
158
|
+
const Nt = {
|
|
157
159
|
create() {
|
|
158
160
|
return {
|
|
159
161
|
handlers: {},
|
|
@@ -182,11 +184,11 @@ const At = {
|
|
|
182
184
|
}
|
|
183
185
|
};
|
|
184
186
|
}
|
|
185
|
-
},
|
|
187
|
+
}, U = document, At = function() {
|
|
186
188
|
console.time("layout"), this.nodes.innerHTML = "";
|
|
187
189
|
const e = this.createTopic(this.nodeData);
|
|
188
190
|
bt(e, this.nodeData), e.draggable = !1;
|
|
189
|
-
const t =
|
|
191
|
+
const t = U.createElement("me-root");
|
|
190
192
|
t.appendChild(e);
|
|
191
193
|
const n = this.nodeData.children || [];
|
|
192
194
|
if (this.direction === J) {
|
|
@@ -195,19 +197,19 @@ const At = {
|
|
|
195
197
|
o.direction === q ? s += 1 : o.direction === Z ? i += 1 : s <= i ? (o.direction = q, s += 1) : (o.direction = Z, i += 1);
|
|
196
198
|
});
|
|
197
199
|
}
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
const s =
|
|
200
|
+
Dt(this, n, t), console.timeEnd("layout");
|
|
201
|
+
}, Dt = function(e, t, n) {
|
|
202
|
+
const s = U.createElement("me-main");
|
|
201
203
|
s.className = "lhs";
|
|
202
|
-
const i =
|
|
204
|
+
const i = U.createElement("me-main");
|
|
203
205
|
i.className = "rhs";
|
|
204
206
|
for (let o = 0; o < t.length; o++) {
|
|
205
207
|
const r = t[o], { grp: l } = e.createWrapper(r);
|
|
206
208
|
e.direction === J ? r.direction === q ? s.appendChild(l) : i.appendChild(l) : e.direction === q ? s.appendChild(l) : i.appendChild(l);
|
|
207
209
|
}
|
|
208
210
|
e.nodes.appendChild(s), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
|
|
209
|
-
},
|
|
210
|
-
const n =
|
|
211
|
+
}, Ht = function(e, t) {
|
|
212
|
+
const n = U.createElement("me-children");
|
|
211
213
|
for (let s = 0; s < t.length; s++) {
|
|
212
214
|
const i = t[s], { grp: o } = e.createWrapper(i);
|
|
213
215
|
n.appendChild(o);
|
|
@@ -236,23 +238,23 @@ const At = {
|
|
|
236
238
|
n.className = "tags", n.innerHTML = t.tags.map((s) => `<span>${it(s)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
237
239
|
}
|
|
238
240
|
t.branchColor && (e.style.borderColor = t.branchColor);
|
|
239
|
-
},
|
|
241
|
+
}, Pt = function(e, t) {
|
|
240
242
|
const n = E.createElement("me-wrapper"), { p: s, tpc: i } = this.createParent(e);
|
|
241
243
|
if (n.appendChild(s), !t && e.children && e.children.length > 0) {
|
|
242
|
-
const o =
|
|
244
|
+
const o = Vt(e.expanded);
|
|
243
245
|
if (s.appendChild(o), e.expanded !== !1) {
|
|
244
|
-
const r =
|
|
246
|
+
const r = Ht(this, e.children);
|
|
245
247
|
n.appendChild(r);
|
|
246
248
|
}
|
|
247
249
|
}
|
|
248
250
|
return { grp: n, top: s, tpc: i };
|
|
249
|
-
},
|
|
251
|
+
}, zt = function(e) {
|
|
250
252
|
const t = E.createElement("me-parent"), n = this.createTopic(e);
|
|
251
253
|
return bt(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
252
|
-
},
|
|
254
|
+
}, Bt = function(e) {
|
|
253
255
|
const t = E.createElement("me-children");
|
|
254
256
|
return t.append(...e), t;
|
|
255
|
-
},
|
|
257
|
+
}, Ot = function(e) {
|
|
256
258
|
const t = E.createElement("me-tpc");
|
|
257
259
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
258
260
|
};
|
|
@@ -262,7 +264,7 @@ function xt(e) {
|
|
|
262
264
|
const n = window.getSelection();
|
|
263
265
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
264
266
|
}
|
|
265
|
-
const
|
|
267
|
+
const qt = function(e) {
|
|
266
268
|
if (console.time("editTopic"), !e)
|
|
267
269
|
return;
|
|
268
270
|
const t = E.createElement("div"), n = e.childNodes[0].textContent;
|
|
@@ -288,10 +290,10 @@ const Vt = function(e) {
|
|
|
288
290
|
origin: n
|
|
289
291
|
}));
|
|
290
292
|
}), console.timeEnd("editTopic");
|
|
291
|
-
},
|
|
293
|
+
}, Vt = function(e) {
|
|
292
294
|
const t = E.createElement("me-epd");
|
|
293
295
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
294
|
-
}, H = document, P = "http://www.w3.org/2000/svg",
|
|
296
|
+
}, H = document, P = "http://www.w3.org/2000/svg", Rt = function(e, t) {
|
|
295
297
|
const n = H.createElementNS(P, "path");
|
|
296
298
|
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
|
|
297
299
|
}, W = function(e) {
|
|
@@ -300,10 +302,10 @@ const Vt = function(e) {
|
|
|
300
302
|
}, rt = function() {
|
|
301
303
|
const e = H.createElementNS(P, "line");
|
|
302
304
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
303
|
-
},
|
|
305
|
+
}, jt = function(e, t) {
|
|
304
306
|
const n = H.createElementNS(P, "path");
|
|
305
307
|
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
|
|
306
|
-
},
|
|
308
|
+
}, Wt = function(e, t) {
|
|
307
309
|
const n = {
|
|
308
310
|
stroke: "rgb(235, 95, 82)",
|
|
309
311
|
fill: "none",
|
|
@@ -341,12 +343,12 @@ const Vt = function(e) {
|
|
|
341
343
|
}), console.timeEnd("editSummary");
|
|
342
344
|
};
|
|
343
345
|
let _t = Ct;
|
|
344
|
-
const
|
|
346
|
+
const Xt = function(e) {
|
|
345
347
|
console.time("linkDiv");
|
|
346
348
|
const t = this.map.querySelector("me-root");
|
|
347
349
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
|
|
348
350
|
const n = this.map.querySelectorAll("me-main > me-wrapper");
|
|
349
|
-
this.lines.innerHTML = "", _t = this.subLinkStyle === 2 ?
|
|
351
|
+
this.lines.innerHTML = "", _t = this.subLinkStyle === 2 ? It : Ct;
|
|
350
352
|
for (let s = 0; s < n.length; s++) {
|
|
351
353
|
const i = n[s], o = i.querySelector("me-tpc"), r = i.firstChild, l = i.parentNode.className;
|
|
352
354
|
let c = t.offsetLeft + t.offsetWidth / 2;
|
|
@@ -357,18 +359,18 @@ const Yt = function(e) {
|
|
|
357
359
|
const m = g + r.offsetHeight / 2;
|
|
358
360
|
let p = "";
|
|
359
361
|
if (this.mainLinkStyle === 2)
|
|
360
|
-
this.direction === J && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), p =
|
|
362
|
+
this.direction === J && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), p = Yt({ x1: c, y1: u, x2: h, y2: m });
|
|
361
363
|
else {
|
|
362
364
|
const w = (1 - Math.abs(m - i.parentElement.offsetTop - i.parentElement.offsetHeight / 2) / i.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
|
|
363
|
-
l === "lhs" ? c = c - t.offsetWidth / 10 - w : c = c + t.offsetWidth / 10 + w, p =
|
|
365
|
+
l === "lhs" ? c = c - t.offsetWidth / 10 - w : c = c + t.offsetWidth / 10 + w, p = Ft({ x1: c, y1: u, x2: h, y2: m });
|
|
364
366
|
}
|
|
365
|
-
this.lines.appendChild(
|
|
367
|
+
this.lines.appendChild(Rt(p, a));
|
|
366
368
|
const v = i.children[0].children[1];
|
|
367
369
|
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== i) && i.childElementCount) {
|
|
368
370
|
const x = W("subLines"), w = i.lastChild;
|
|
369
371
|
w.tagName === "svg" && w.remove(), i.appendChild(x);
|
|
370
|
-
const _ = i.firstChild,
|
|
371
|
-
x.appendChild(
|
|
372
|
+
const _ = i.firstChild, k = i.children[1].children, X = Et(k, _, l, !0);
|
|
373
|
+
x.appendChild(jt(X, a));
|
|
372
374
|
}
|
|
373
375
|
}
|
|
374
376
|
this.renderCustomLink(), this.renderSummary(), console.timeEnd("linkDiv");
|
|
@@ -389,13 +391,13 @@ const Yt = function(e) {
|
|
|
389
391
|
}
|
|
390
392
|
return i;
|
|
391
393
|
};
|
|
392
|
-
function
|
|
394
|
+
function Yt({ x1: e, y1: t, x2: n, y2: s }) {
|
|
393
395
|
return `M ${e} ${t} V ${s > t ? s - 20 : s + 20} C ${e} ${s} ${e} ${s} ${n > e ? e + 20 : e - 20} ${s} H ${n}`;
|
|
394
396
|
}
|
|
395
|
-
function
|
|
397
|
+
function Ft({ x1: e, y1: t, x2: n, y2: s }) {
|
|
396
398
|
return `M ${e} ${t} Q ${e} ${s} ${n} ${s}`;
|
|
397
399
|
}
|
|
398
|
-
function
|
|
400
|
+
function It({ pT: e, pL: t, pW: n, pH: s, cT: i, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
|
|
399
401
|
let h;
|
|
400
402
|
u ? h = e + s / 2 : h = e + s;
|
|
401
403
|
const d = i + l;
|
|
@@ -416,7 +418,7 @@ const D = (e, t) => {
|
|
|
416
418
|
<use xlink:href="#icon-${t}"></use>
|
|
417
419
|
</svg>`, n;
|
|
418
420
|
};
|
|
419
|
-
function
|
|
421
|
+
function Gt(e) {
|
|
420
422
|
const t = document.createElement("div"), n = D("fullscreen", "full"), s = D("toCenter", "living"), i = D("zoomout", "move"), o = D("zoomin", "add"), r = document.createElement("span");
|
|
421
423
|
return r.innerText = "100%", t.appendChild(n), t.appendChild(s), t.appendChild(i), t.appendChild(o), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
422
424
|
e.container.requestFullscreen();
|
|
@@ -438,12 +440,12 @@ function Ut(e) {
|
|
|
438
440
|
e.initSide();
|
|
439
441
|
}, t;
|
|
440
442
|
}
|
|
441
|
-
function
|
|
442
|
-
e.container.append(
|
|
443
|
+
function Kt(e) {
|
|
444
|
+
e.container.append(Gt(e)), e.container.append(Ut(e));
|
|
443
445
|
}
|
|
444
446
|
/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
445
|
-
var
|
|
446
|
-
class
|
|
447
|
+
var Jt = Object.defineProperty, Qt = (e, t, n) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t, n) => (Qt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
448
|
+
class Zt {
|
|
447
449
|
constructor() {
|
|
448
450
|
y(this, "_listeners", /* @__PURE__ */ new Map()), y(this, "on", this.addEventListener), y(this, "off", this.removeEventListener), y(this, "emit", this.dispatchEvent);
|
|
449
451
|
}
|
|
@@ -508,7 +510,7 @@ function B(e, t = document) {
|
|
|
508
510
|
}
|
|
509
511
|
return s;
|
|
510
512
|
}
|
|
511
|
-
const
|
|
513
|
+
const te = () => matchMedia("(hover: none), (pointer: coarse)").matches, ee = () => "safari" in window, ne = (e) => {
|
|
512
514
|
let t, n = -1, s = !1;
|
|
513
515
|
return {
|
|
514
516
|
next(...i) {
|
|
@@ -521,7 +523,7 @@ const ee = () => matchMedia("(hover: none), (pointer: coarse)").matches, ne = ()
|
|
|
521
523
|
}
|
|
522
524
|
};
|
|
523
525
|
}, { abs: A, max: at, min: ht, ceil: dt } = Math;
|
|
524
|
-
class
|
|
526
|
+
class se extends Zt {
|
|
525
527
|
constructor(t) {
|
|
526
528
|
var n, s, i, o, r;
|
|
527
529
|
super(), y(this, "_options"), y(this, "_selection", {
|
|
@@ -585,7 +587,7 @@ class St extends te {
|
|
|
585
587
|
// https://stackoverflow.com/a/38268846
|
|
586
588
|
pointerEvents: "none",
|
|
587
589
|
zIndex: "1"
|
|
588
|
-
}), this._frame =
|
|
590
|
+
}), this._frame = ne((h) => {
|
|
589
591
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
|
|
590
592
|
}), this.enable();
|
|
591
593
|
}
|
|
@@ -691,7 +693,7 @@ class St extends te {
|
|
|
691
693
|
}
|
|
692
694
|
_handleMoveEvent(t) {
|
|
693
695
|
const { features: n } = this._options;
|
|
694
|
-
(n.touch &&
|
|
696
|
+
(n.touch && te() || this._scrollAvailable && ee()) && t.preventDefault();
|
|
695
697
|
}
|
|
696
698
|
_onScroll() {
|
|
697
699
|
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: s, scrollLeft: i } = n.scrollingElement ?? n.body;
|
|
@@ -706,8 +708,8 @@ class St extends te {
|
|
|
706
708
|
let { x2: m, y2: p } = n;
|
|
707
709
|
const { behaviour: { scrolling: { startScrollMargins: v } } } = o;
|
|
708
710
|
m < a.left + v.x ? (t.x = u ? -A(a.left - m + v.x) : 0, m = m < a.left ? a.left : m) : m > a.right - v.x ? (t.x = h - u - d ? A(a.left + a.width - m - v.x) : 0, m = m > a.right ? a.right : m) : t.x = 0, p < a.top + v.y ? (t.y = r ? -A(a.top - p + v.y) : 0, p = p < a.top ? a.top : p) : p > a.bottom - v.y ? (t.y = l - r - c ? A(a.top + a.height - p - v.y) : 0, p = p > a.bottom ? a.bottom : p) : t.y = 0;
|
|
709
|
-
const x = ht(f, m), w = ht(g, p), _ = at(f, m),
|
|
710
|
-
s.x = x, s.y = w, s.width = _ - x, s.height =
|
|
711
|
+
const x = ht(f, m), w = ht(g, p), _ = at(f, m), k = at(g, p);
|
|
712
|
+
s.x = x, s.y = w, s.width = _ - x, s.height = k - w;
|
|
711
713
|
}
|
|
712
714
|
_redrawSelectionArea() {
|
|
713
715
|
const { x: t, y: n, width: s, height: i } = this._areaRect, { style: o } = this._area;
|
|
@@ -861,48 +863,8 @@ class St extends te {
|
|
|
861
863
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
862
864
|
}
|
|
863
865
|
}
|
|
864
|
-
y(
|
|
865
|
-
|
|
866
|
-
const t = new St({
|
|
867
|
-
selectables: [".map-container me-tpc"],
|
|
868
|
-
boundaries: [".map-container"],
|
|
869
|
-
container: ".map-container",
|
|
870
|
-
behaviour: {
|
|
871
|
-
// Scroll configuration.
|
|
872
|
-
scrolling: {
|
|
873
|
-
// On scrollable areas the number on px per frame is devided by this amount.
|
|
874
|
-
// Default is 10 to provide a enjoyable scroll experience.
|
|
875
|
-
speedDivider: 10,
|
|
876
|
-
// Browsers handle mouse-wheel events differently, this number will be used as
|
|
877
|
-
// numerator to calculate the mount of px while scrolling manually: manualScrollSpeed / scrollSpeedDivider.
|
|
878
|
-
manualSpeed: 750,
|
|
879
|
-
// This property defines the virtual inset margins from the borders of the container
|
|
880
|
-
// component that, when crossed by the mouse/touch, trigger the scrolling. Useful for
|
|
881
|
-
// fullscreen containers.
|
|
882
|
-
startScrollMargins: { x: 10, y: 10 }
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
}).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box" || n.target.className === "circle")).on("start", ({ event: n }) => {
|
|
886
|
-
!n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
|
|
887
|
-
}).on(
|
|
888
|
-
"move",
|
|
889
|
-
({
|
|
890
|
-
store: {
|
|
891
|
-
changed: { added: n, removed: s }
|
|
892
|
-
}
|
|
893
|
-
}) => {
|
|
894
|
-
N.moved = !0;
|
|
895
|
-
for (const i of n)
|
|
896
|
-
i.classList.add("selected");
|
|
897
|
-
for (const i of s)
|
|
898
|
-
i.classList.remove("selected");
|
|
899
|
-
}
|
|
900
|
-
).on("stop", ({ store: { stored: n } }) => {
|
|
901
|
-
console.log(n, "stored"), e.selectNodes(n);
|
|
902
|
-
});
|
|
903
|
-
console.log(t, "selection");
|
|
904
|
-
}
|
|
905
|
-
const oe = function(e, t = !0) {
|
|
866
|
+
y(se, "version", "3.3.1");
|
|
867
|
+
const ie = function(e, t = !0) {
|
|
906
868
|
this.theme = e;
|
|
907
869
|
const n = this.theme.cssVar, s = Object.keys(n);
|
|
908
870
|
for (let i = 0; i < s.length; i++) {
|
|
@@ -911,7 +873,7 @@ const oe = function(e, t = !0) {
|
|
|
911
873
|
}
|
|
912
874
|
t && this.refresh();
|
|
913
875
|
};
|
|
914
|
-
function
|
|
876
|
+
function St(e) {
|
|
915
877
|
return {
|
|
916
878
|
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
917
879
|
linkData: e.linkData,
|
|
@@ -920,7 +882,7 @@ function Mt(e) {
|
|
|
920
882
|
theme: e.theme
|
|
921
883
|
};
|
|
922
884
|
}
|
|
923
|
-
const
|
|
885
|
+
const oe = function(e, t, n) {
|
|
924
886
|
if (e) {
|
|
925
887
|
if (console.time("selectNode"), typeof e == "string") {
|
|
926
888
|
const s = C(e);
|
|
@@ -928,9 +890,9 @@ const re = function(e, t, n) {
|
|
|
928
890
|
}
|
|
929
891
|
this.currentNode && (this.currentNode.className = ""), e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n), console.timeEnd("selectNode");
|
|
930
892
|
}
|
|
931
|
-
},
|
|
893
|
+
}, re = function() {
|
|
932
894
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
933
|
-
},
|
|
895
|
+
}, le = function(e) {
|
|
934
896
|
if (e) {
|
|
935
897
|
console.time("selectNodes");
|
|
936
898
|
for (const t of e)
|
|
@@ -940,12 +902,12 @@ const re = function(e, t, n) {
|
|
|
940
902
|
e.map((t) => t.nodeObj)
|
|
941
903
|
), console.timeEnd("selectNodes");
|
|
942
904
|
}
|
|
943
|
-
},
|
|
905
|
+
}, ce = function() {
|
|
944
906
|
if (this.currentNodes)
|
|
945
907
|
for (const e of this.currentNodes)
|
|
946
908
|
e.classList.remove("selected");
|
|
947
909
|
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
948
|
-
},
|
|
910
|
+
}, ae = function() {
|
|
949
911
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
950
912
|
return !1;
|
|
951
913
|
const e = this.currentNode.parentElement.parentElement.nextSibling;
|
|
@@ -955,7 +917,7 @@ const re = function(e, t, n) {
|
|
|
955
917
|
else
|
|
956
918
|
return !1;
|
|
957
919
|
return this.selectNode(t), !0;
|
|
958
|
-
},
|
|
920
|
+
}, he = function() {
|
|
959
921
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
960
922
|
return !1;
|
|
961
923
|
const e = this.currentNode.parentElement.parentElement.previousSibling;
|
|
@@ -965,7 +927,7 @@ const re = function(e, t, n) {
|
|
|
965
927
|
else
|
|
966
928
|
return !1;
|
|
967
929
|
return this.selectNode(t), !0;
|
|
968
|
-
},
|
|
930
|
+
}, de = function() {
|
|
969
931
|
if (!this.currentNode)
|
|
970
932
|
return;
|
|
971
933
|
const e = this.currentNode.parentElement.nextSibling;
|
|
@@ -973,7 +935,7 @@ const re = function(e, t, n) {
|
|
|
973
935
|
const t = e.firstChild.firstChild.firstChild;
|
|
974
936
|
this.selectNode(t);
|
|
975
937
|
}
|
|
976
|
-
},
|
|
938
|
+
}, ue = function() {
|
|
977
939
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
978
940
|
return;
|
|
979
941
|
const e = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
|
|
@@ -981,16 +943,16 @@ const re = function(e, t, n) {
|
|
|
981
943
|
const t = e.firstChild;
|
|
982
944
|
this.selectNode(t);
|
|
983
945
|
}
|
|
984
|
-
},
|
|
985
|
-
const e =
|
|
946
|
+
}, fe = function() {
|
|
947
|
+
const e = St(this);
|
|
986
948
|
return JSON.stringify(e, (t, n) => {
|
|
987
949
|
if (!(t === "parent" && typeof n != "string"))
|
|
988
950
|
return n;
|
|
989
951
|
});
|
|
990
|
-
},
|
|
952
|
+
}, pe = function() {
|
|
991
953
|
return JSON.parse(this.getDataString());
|
|
992
|
-
},
|
|
993
|
-
const e =
|
|
954
|
+
}, me = function() {
|
|
955
|
+
const e = St(this).nodeData;
|
|
994
956
|
let t = "# " + e.topic + `
|
|
995
957
|
|
|
996
958
|
`;
|
|
@@ -1002,60 +964,60 @@ const re = function(e, t, n) {
|
|
|
1002
964
|
`, s[o].children && n(s[o].children || [], i + 1);
|
|
1003
965
|
}
|
|
1004
966
|
return n(e.children || [], 2), t;
|
|
1005
|
-
},
|
|
967
|
+
}, ge = function() {
|
|
1006
968
|
this.editable = !0;
|
|
1007
|
-
},
|
|
969
|
+
}, ve = function() {
|
|
1008
970
|
this.editable = !1;
|
|
1009
|
-
},
|
|
971
|
+
}, ye = function(e) {
|
|
1010
972
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
|
|
1011
|
-
},
|
|
973
|
+
}, be = function() {
|
|
1012
974
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1013
|
-
},
|
|
975
|
+
}, xe = function(e) {
|
|
1014
976
|
e(this);
|
|
1015
|
-
},
|
|
977
|
+
}, we = function(e) {
|
|
1016
978
|
e.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
|
|
1017
|
-
},
|
|
979
|
+
}, _e = function() {
|
|
1018
980
|
this.isFocusMode = !1, this.tempDirection !== null && (delete this.nodeData.root, this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1019
|
-
},
|
|
981
|
+
}, Ee = function() {
|
|
1020
982
|
this.direction = 0, this.refresh();
|
|
1021
|
-
},
|
|
983
|
+
}, Ce = function() {
|
|
1022
984
|
this.direction = 1, this.refresh();
|
|
1023
|
-
},
|
|
985
|
+
}, Le = function() {
|
|
1024
986
|
this.direction = 2, this.refresh();
|
|
1025
|
-
},
|
|
987
|
+
}, Se = function(e) {
|
|
1026
988
|
this.locale = e, this.refresh();
|
|
1027
989
|
}, ke = function(e, t) {
|
|
1028
990
|
const n = e.nodeObj;
|
|
1029
991
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
|
|
1030
|
-
},
|
|
992
|
+
}, Me = function(e) {
|
|
1031
993
|
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}), tt(this.nodeData), this.layout(), this.linkDiv();
|
|
1032
|
-
},
|
|
994
|
+
}, $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1033
995
|
__proto__: null,
|
|
1034
|
-
cancelFocus:
|
|
1035
|
-
disableEdit:
|
|
1036
|
-
enableEdit:
|
|
996
|
+
cancelFocus: _e,
|
|
997
|
+
disableEdit: ve,
|
|
998
|
+
enableEdit: ge,
|
|
1037
999
|
expandNode: ke,
|
|
1038
|
-
focusNode:
|
|
1039
|
-
getData:
|
|
1040
|
-
getDataMd:
|
|
1041
|
-
getDataString:
|
|
1042
|
-
initLeft:
|
|
1043
|
-
initRight:
|
|
1044
|
-
initSide:
|
|
1045
|
-
install:
|
|
1046
|
-
refresh:
|
|
1047
|
-
scale:
|
|
1048
|
-
selectFirstChild:
|
|
1049
|
-
selectNextSibling:
|
|
1050
|
-
selectNode:
|
|
1051
|
-
selectNodes:
|
|
1052
|
-
selectParent:
|
|
1053
|
-
selectPrevSibling:
|
|
1054
|
-
setLocale:
|
|
1055
|
-
toCenter:
|
|
1056
|
-
unselectNode:
|
|
1057
|
-
unselectNodes:
|
|
1058
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1000
|
+
focusNode: we,
|
|
1001
|
+
getData: pe,
|
|
1002
|
+
getDataMd: me,
|
|
1003
|
+
getDataString: fe,
|
|
1004
|
+
initLeft: Ee,
|
|
1005
|
+
initRight: Ce,
|
|
1006
|
+
initSide: Le,
|
|
1007
|
+
install: xe,
|
|
1008
|
+
refresh: Me,
|
|
1009
|
+
scale: ye,
|
|
1010
|
+
selectFirstChild: de,
|
|
1011
|
+
selectNextSibling: ae,
|
|
1012
|
+
selectNode: oe,
|
|
1013
|
+
selectNodes: le,
|
|
1014
|
+
selectParent: ue,
|
|
1015
|
+
selectPrevSibling: he,
|
|
1016
|
+
setLocale: Se,
|
|
1017
|
+
toCenter: be,
|
|
1018
|
+
unselectNode: re,
|
|
1019
|
+
unselectNodes: ce
|
|
1020
|
+
}, Symbol.toStringTag, { value: "Module" })), Te = function(e) {
|
|
1059
1021
|
return {
|
|
1060
1022
|
dom: e,
|
|
1061
1023
|
mousedown: !1,
|
|
@@ -1089,9 +1051,9 @@ const re = function(e, t, n) {
|
|
|
1089
1051
|
}
|
|
1090
1052
|
};
|
|
1091
1053
|
}, ut = {
|
|
1092
|
-
create:
|
|
1054
|
+
create: Te
|
|
1093
1055
|
};
|
|
1094
|
-
function
|
|
1056
|
+
function K(e, t, n) {
|
|
1095
1057
|
const { offsetLeft: s, offsetTop: i } = V(e.nodes, t), o = t.offsetWidth, r = t.offsetHeight, l = s + o / 2, c = i + r / 2, u = l + n.x, h = c + n.y;
|
|
1096
1058
|
return {
|
|
1097
1059
|
w: o,
|
|
@@ -1110,7 +1072,7 @@ function O(e) {
|
|
|
1110
1072
|
y: n
|
|
1111
1073
|
};
|
|
1112
1074
|
}
|
|
1113
|
-
const
|
|
1075
|
+
const Ne = function(e, t, n, s) {
|
|
1114
1076
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1115
1077
|
return b(i, {
|
|
1116
1078
|
"text-anchor": "middle",
|
|
@@ -1118,19 +1080,19 @@ const Ae = function(e, t, n, s) {
|
|
|
1118
1080
|
y: n + "",
|
|
1119
1081
|
fill: s || "#666"
|
|
1120
1082
|
}), i.dataset.type = "custom-link", i.innerHTML = e, i;
|
|
1121
|
-
},
|
|
1083
|
+
}, Ae = function(e, t, n, s) {
|
|
1122
1084
|
if (!e || !t)
|
|
1123
1085
|
return;
|
|
1124
1086
|
const i = performance.now();
|
|
1125
1087
|
this.hideLinkController();
|
|
1126
|
-
const o =
|
|
1088
|
+
const o = K(this, e, n.delta1), r = K(this, t, n.delta2), { x: l, y: c } = O(o), { ctrlX: u, ctrlY: h } = o, { ctrlX: d, ctrlY: a } = r, { x: f, y: g } = O(r), m = yt(d, a, f, g), p = Wt(
|
|
1127
1089
|
`M ${l} ${c} C ${u} ${h} ${d} ${a} ${f} ${g}`,
|
|
1128
1090
|
`M ${m.x1} ${m.y1} L ${f} ${g} L ${m.x2} ${m.y2}`
|
|
1129
|
-
), v = l / 8 + u * 3 / 8 + d * 3 / 8 + f / 8, x = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, w =
|
|
1091
|
+
), v = l / 8 + u * 3 / 8 + d * 3 / 8 + f / 8, x = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, w = Ne(n.label, v, x, this.theme.cssVar["--color"]);
|
|
1130
1092
|
p.appendChild(w), p.linkObj = n, p.dataset.linkid = n.id, this.linkSvgGroup.appendChild(p), s || (this.linkData[n.id] = n, this.currentLink = p, this.showLinkController(n, o, r));
|
|
1131
1093
|
const _ = performance.now();
|
|
1132
1094
|
console.log(`DrawCustomLink Execution time: ${_ - i} ms`);
|
|
1133
|
-
},
|
|
1095
|
+
}, De = function(e, t) {
|
|
1134
1096
|
const n = {
|
|
1135
1097
|
id: et(),
|
|
1136
1098
|
label: "Custom Link",
|
|
@@ -1146,17 +1108,19 @@ const Ae = function(e, t, n, s) {
|
|
|
1146
1108
|
}
|
|
1147
1109
|
};
|
|
1148
1110
|
this.drawCustomLink(e, t, n);
|
|
1149
|
-
},
|
|
1111
|
+
}, He = function(e) {
|
|
1150
1112
|
let t;
|
|
1151
1113
|
if (e ? t = e : t = this.currentLink, !t)
|
|
1152
1114
|
return;
|
|
1153
1115
|
this.hideLinkController();
|
|
1154
1116
|
const n = t.linkObj.id;
|
|
1155
1117
|
delete this.linkData[n], t.remove(), t = null;
|
|
1156
|
-
},
|
|
1118
|
+
}, Pe = function(e) {
|
|
1157
1119
|
this.currentLink = e;
|
|
1158
|
-
const t = e.linkObj, n = C(t.from), s = C(t.to), i =
|
|
1120
|
+
const t = e.linkObj, n = C(t.from), s = C(t.to), i = K(this, n, t.delta1), o = K(this, s, t.delta2);
|
|
1159
1121
|
this.showLinkController(t, i, o);
|
|
1122
|
+
}, ze = function() {
|
|
1123
|
+
this.currentLink = null, this.hideLinkController();
|
|
1160
1124
|
}, Be = function() {
|
|
1161
1125
|
this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
|
|
1162
1126
|
}, Oe = function(e, t, n) {
|
|
@@ -1224,14 +1188,15 @@ function Ve(e) {
|
|
|
1224
1188
|
}
|
|
1225
1189
|
const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1226
1190
|
__proto__: null,
|
|
1227
|
-
createLink:
|
|
1228
|
-
drawCustomLink:
|
|
1191
|
+
createLink: De,
|
|
1192
|
+
drawCustomLink: Ae,
|
|
1229
1193
|
editCutsomLinkLabel: Ve,
|
|
1230
1194
|
hideLinkController: Be,
|
|
1231
|
-
removeLink:
|
|
1195
|
+
removeLink: He,
|
|
1232
1196
|
renderCustomLink: qe,
|
|
1233
|
-
selectLink:
|
|
1234
|
-
showLinkController: Oe
|
|
1197
|
+
selectLink: Pe,
|
|
1198
|
+
showLinkController: Oe,
|
|
1199
|
+
unselectLink: ze
|
|
1235
1200
|
}, Symbol.toStringTag, { value: "Module" })), je = function(e) {
|
|
1236
1201
|
var c, u;
|
|
1237
1202
|
if (e.length === 0)
|
|
@@ -1314,8 +1279,8 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1314
1279
|
let m, p;
|
|
1315
1280
|
const v = f + 10, x = g + 10, w = (v + x) / 2, _ = e.theme.cssVar["--color"];
|
|
1316
1281
|
h === "lhs" ? (m = ft(`M ${d + 10} ${v} c -5 0 -10 5 -10 10 L ${d} ${x - 10} c 0 5 5 10 10 10 M ${d} ${w} h -10`, _), p = pt(s, d - 20, w + 6, "end", _)) : (m = ft(`M ${a - 10} ${v} c 5 0 10 5 10 10 L ${a} ${x - 10} c 0 5 -5 10 -10 10 M ${a} ${w} h 10`, _), p = pt(s, a + 20, w + 6, "start", _));
|
|
1317
|
-
const
|
|
1318
|
-
return
|
|
1282
|
+
const k = We("s-" + n);
|
|
1283
|
+
return k.appendChild(m), k.appendChild(p), k.summaryObj = t, e.summarySvg.appendChild(k), k;
|
|
1319
1284
|
}, Fe = function() {
|
|
1320
1285
|
let e = [];
|
|
1321
1286
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
@@ -1337,10 +1302,10 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1337
1302
|
"stroke-width": "2",
|
|
1338
1303
|
fill: "none"
|
|
1339
1304
|
}), i.classList.add("selected"), e.appendChild(i), this.currentSummary = e;
|
|
1340
|
-
},
|
|
1305
|
+
}, Ue = function() {
|
|
1341
1306
|
var e, t;
|
|
1342
1307
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
1343
|
-
},
|
|
1308
|
+
}, Ke = function() {
|
|
1344
1309
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
1345
1310
|
kt(this, e);
|
|
1346
1311
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
@@ -1362,9 +1327,9 @@ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1362
1327
|
createSummary: Fe,
|
|
1363
1328
|
editSummary: Je,
|
|
1364
1329
|
removeSummary: Ie,
|
|
1365
|
-
renderSummary:
|
|
1330
|
+
renderSummary: Ke,
|
|
1366
1331
|
selectSummary: Ge,
|
|
1367
|
-
unselectSummary:
|
|
1332
|
+
unselectSummary: Ue
|
|
1368
1333
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1369
1334
|
function Ze(e, t) {
|
|
1370
1335
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -1438,7 +1403,7 @@ function sn(e, t) {
|
|
|
1438
1403
|
fill: `${n.color}`
|
|
1439
1404
|
}), r.innerHTML = t.textContent, o.appendChild(r), o.setAttribute("href", t.href), o;
|
|
1440
1405
|
}
|
|
1441
|
-
const G = 100, on = '<?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">',
|
|
1406
|
+
const G = 100, on = '<?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">', Mt = (e) => {
|
|
1442
1407
|
var h, d, a;
|
|
1443
1408
|
const t = e.nodes, n = t.offsetHeight + G * 2, s = t.offsetWidth + G * 2, i = Ze(n + "px", s + "px"), o = document.createElementNS("http://www.w3.org/2000/svg", "svg"), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1444
1409
|
b(r, {
|
|
@@ -1481,10 +1446,10 @@ function rn(e) {
|
|
|
1481
1446
|
});
|
|
1482
1447
|
}
|
|
1483
1448
|
const ln = function() {
|
|
1484
|
-
const e =
|
|
1449
|
+
const e = Mt(this);
|
|
1485
1450
|
return new Blob([e], { type: "image/svg+xml" });
|
|
1486
1451
|
}, cn = async function() {
|
|
1487
|
-
const e =
|
|
1452
|
+
const e = Mt(this), t = new Blob([e], { type: "image/svg+xml" }), n = await rn(t);
|
|
1488
1453
|
return new Promise((s, i) => {
|
|
1489
1454
|
const o = new Image();
|
|
1490
1455
|
o.setAttribute("crossOrigin", "anonymous"), o.onload = () => {
|
|
@@ -1498,17 +1463,17 @@ const ln = function() {
|
|
|
1498
1463
|
exportSvg: ln
|
|
1499
1464
|
}, Symbol.toStringTag, { value: "Module" })), hn = {}, dn = {
|
|
1500
1465
|
getObjById: vt,
|
|
1501
|
-
generateNewObj:
|
|
1502
|
-
layout:
|
|
1503
|
-
linkDiv:
|
|
1504
|
-
editTopic:
|
|
1505
|
-
createWrapper:
|
|
1506
|
-
createParent:
|
|
1507
|
-
createChildren:
|
|
1508
|
-
createTopic:
|
|
1466
|
+
generateNewObj: $t,
|
|
1467
|
+
layout: At,
|
|
1468
|
+
linkDiv: Xt,
|
|
1469
|
+
editTopic: qt,
|
|
1470
|
+
createWrapper: Pt,
|
|
1471
|
+
createParent: zt,
|
|
1472
|
+
createChildren: Bt,
|
|
1473
|
+
createTopic: Ot,
|
|
1509
1474
|
findEle: C,
|
|
1510
|
-
changeTheme:
|
|
1511
|
-
|
|
1475
|
+
changeTheme: ie,
|
|
1476
|
+
...$e,
|
|
1512
1477
|
...hn,
|
|
1513
1478
|
...Re,
|
|
1514
1479
|
...Qe,
|
|
@@ -1516,10 +1481,10 @@ const ln = function() {
|
|
|
1516
1481
|
init(e) {
|
|
1517
1482
|
if (!e || !e.nodeData)
|
|
1518
1483
|
return new Error("MindElixir: `data` is required");
|
|
1519
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, tt(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar &&
|
|
1484
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, tt(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Kt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
1520
1485
|
}
|
|
1521
1486
|
}, j = document;
|
|
1522
|
-
function
|
|
1487
|
+
function M({
|
|
1523
1488
|
el: e,
|
|
1524
1489
|
direction: t,
|
|
1525
1490
|
locale: n,
|
|
@@ -1538,25 +1503,25 @@ function k({
|
|
|
1538
1503
|
mobileMenu: m,
|
|
1539
1504
|
theme: p
|
|
1540
1505
|
}) {
|
|
1541
|
-
console.log("ME_version " +
|
|
1506
|
+
console.log("ME_version " + M.version, this);
|
|
1542
1507
|
let v = null;
|
|
1543
1508
|
const x = Object.prototype.toString.call(e);
|
|
1544
1509
|
if (x === "[object HTMLDivElement]" ? v = e : x === "[object String]" && (v = document.querySelector(e)), !v)
|
|
1545
1510
|
throw new Error("MindElixir: el is not a valid element");
|
|
1546
|
-
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = s === void 0 ? !0 : s, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = d === void 0 ? !1 : d, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = a || 0, this.subLinkStyle = f || 0, this.overflowHidden = g || !1, this.bus =
|
|
1511
|
+
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = s === void 0 ? !0 : s, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = d === void 0 ? !1 : d, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = a || 0, this.subLinkStyle = f || 0, this.overflowHidden = g || !1, this.bus = Nt.create(), this.container = j.createElement("div"), this.container.className = "map-container";
|
|
1547
1512
|
const w = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1548
1513
|
this.theme = p || (w.matches ? gt : mt);
|
|
1549
1514
|
const _ = j.createElement("div");
|
|
1550
|
-
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = j.createElement("div"), this.P3 = j.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = W("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" :
|
|
1515
|
+
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("linkcontroller"), this.P2 = j.createElement("div"), this.P3 = j.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = rt(), this.line2 = rt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = W("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Tt(this);
|
|
1551
1516
|
}
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1517
|
+
M.prototype = dn;
|
|
1518
|
+
M.LEFT = q;
|
|
1519
|
+
M.RIGHT = Z;
|
|
1520
|
+
M.SIDE = J;
|
|
1521
|
+
M.THEME = mt;
|
|
1522
|
+
M.DARK_THEME = gt;
|
|
1523
|
+
M.version = "3.2.2";
|
|
1524
|
+
M.E = C;
|
|
1560
1525
|
export {
|
|
1561
|
-
|
|
1526
|
+
M as default
|
|
1562
1527
|
};
|