vue3-network-graph 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +778 -731
- package/dist/index.umd.cjs +5 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createStaticVNode as a, getCurrentInstance as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as ee, toDisplayString as m, unref as te, watch as
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createStaticVNode as a, getCurrentInstance as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, renderSlot as ee, toDisplayString as m, unref as te, watch as h, watchEffect as ne, withModifiers as g } from "vue";
|
|
2
2
|
// node_modules/uuid/dist/stringify.js
|
|
3
|
-
var
|
|
4
|
-
for (let e = 0; e < 256; ++e)
|
|
5
|
-
function
|
|
6
|
-
return (
|
|
3
|
+
var _ = [];
|
|
4
|
+
for (let e = 0; e < 256; ++e) _.push((e + 256).toString(16).slice(1));
|
|
5
|
+
function re(e, t = 0) {
|
|
6
|
+
return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
|
|
7
7
|
}
|
|
8
8
|
// node_modules/uuid/dist/rng.js
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
return crypto.getRandomValues(
|
|
9
|
+
var ie = /* @__PURE__ */ new Uint8Array(16);
|
|
10
|
+
function v() {
|
|
11
|
+
return crypto.getRandomValues(ie);
|
|
12
12
|
}
|
|
13
13
|
// node_modules/uuid/dist/v4.js
|
|
14
|
-
function
|
|
15
|
-
return !t && !e && crypto.randomUUID ? crypto.randomUUID() :
|
|
14
|
+
function ae(e, t, n) {
|
|
15
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : y(e, t, n);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function y(e, t, n) {
|
|
18
18
|
e ||= {};
|
|
19
|
-
let r = e.random ?? e.rng?.() ??
|
|
19
|
+
let r = e.random ?? e.rng?.() ?? v();
|
|
20
20
|
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
21
21
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
22
22
|
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
23
23
|
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
24
24
|
return t;
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return re(r);
|
|
27
27
|
}
|
|
28
28
|
// src/components/topology-data.js
|
|
29
|
-
var
|
|
29
|
+
var b = {
|
|
30
30
|
normal: {
|
|
31
31
|
color: "#4ade80",
|
|
32
32
|
label: "Running"
|
|
@@ -67,7 +67,7 @@ var y = {
|
|
|
67
67
|
color: "#64748b",
|
|
68
68
|
label: "Idle"
|
|
69
69
|
}
|
|
70
|
-
},
|
|
70
|
+
}, oe = {
|
|
71
71
|
core: "#00f0ff",
|
|
72
72
|
firewall: "#ff6b35",
|
|
73
73
|
loadbalancer: "#a855f7",
|
|
@@ -77,44 +77,48 @@ var y = {
|
|
|
77
77
|
cache: "#f43f5e",
|
|
78
78
|
queue: "#fb923c",
|
|
79
79
|
text: "#94a3b8"
|
|
80
|
-
},
|
|
80
|
+
}, se = ["viewBox"], ce = [
|
|
81
81
|
"cx",
|
|
82
82
|
"cy",
|
|
83
83
|
"r"
|
|
84
|
-
],
|
|
84
|
+
], le = [
|
|
85
85
|
"offset",
|
|
86
86
|
"stop-color",
|
|
87
87
|
"stop-opacity"
|
|
88
|
-
],
|
|
88
|
+
], ue = ["id"], de = ["stop-color"], fe = ["stop-color"], pe = ["stop-color"], me = ["id"], he = [
|
|
89
89
|
"offset",
|
|
90
90
|
"stop-color",
|
|
91
91
|
"stop-opacity"
|
|
92
|
-
],
|
|
92
|
+
], ge = ["id"], _e = ["fill"], ve = ["id"], ye = ["fill"], be = [
|
|
93
93
|
"width",
|
|
94
94
|
"height",
|
|
95
95
|
"x",
|
|
96
96
|
"y"
|
|
97
|
-
],
|
|
97
|
+
], xe = ["width", "height"], Se = ["d", "stroke"], Ce = [
|
|
98
98
|
"width",
|
|
99
99
|
"height",
|
|
100
100
|
"x",
|
|
101
101
|
"y",
|
|
102
102
|
"opacity"
|
|
103
|
-
],
|
|
103
|
+
], we = {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "center-crosshair"
|
|
106
|
-
},
|
|
106
|
+
}, Te = [
|
|
107
107
|
"x",
|
|
108
108
|
"y",
|
|
109
109
|
"width",
|
|
110
110
|
"height",
|
|
111
111
|
"fill"
|
|
112
|
-
],
|
|
112
|
+
], Ee = [
|
|
113
113
|
"x",
|
|
114
114
|
"y",
|
|
115
115
|
"width",
|
|
116
116
|
"height",
|
|
117
117
|
"stroke"
|
|
118
|
+
], De = [
|
|
119
|
+
"cx",
|
|
120
|
+
"cy",
|
|
121
|
+
"fill"
|
|
118
122
|
], Oe = [
|
|
119
123
|
"cx",
|
|
120
124
|
"cy",
|
|
@@ -128,22 +132,18 @@ var y = {
|
|
|
128
132
|
"cy",
|
|
129
133
|
"fill"
|
|
130
134
|
], je = [
|
|
131
|
-
"cx",
|
|
132
|
-
"cy",
|
|
133
|
-
"fill"
|
|
134
|
-
], Me = [
|
|
135
135
|
"x",
|
|
136
136
|
"y",
|
|
137
137
|
"transform",
|
|
138
138
|
"fill"
|
|
139
|
-
],
|
|
139
|
+
], Me = ["transform"], Ne = [
|
|
140
140
|
"x",
|
|
141
141
|
"y",
|
|
142
142
|
"width",
|
|
143
143
|
"height",
|
|
144
144
|
"rx",
|
|
145
145
|
"fill"
|
|
146
|
-
],
|
|
146
|
+
], Pe = [
|
|
147
147
|
"x",
|
|
148
148
|
"y",
|
|
149
149
|
"width",
|
|
@@ -152,18 +152,18 @@ var y = {
|
|
|
152
152
|
"stroke",
|
|
153
153
|
"stroke-width",
|
|
154
154
|
"stroke-dasharray"
|
|
155
|
-
],
|
|
155
|
+
], Fe = {
|
|
156
156
|
key: 2,
|
|
157
157
|
class: "node-base-layer",
|
|
158
158
|
"pointer-events": "none"
|
|
159
|
-
},
|
|
159
|
+
}, Ie = ["transform"], Le = [
|
|
160
160
|
"x",
|
|
161
161
|
"y",
|
|
162
162
|
"width",
|
|
163
163
|
"height",
|
|
164
164
|
"rx",
|
|
165
165
|
"fill"
|
|
166
|
-
],
|
|
166
|
+
], Re = [
|
|
167
167
|
"x",
|
|
168
168
|
"y",
|
|
169
169
|
"width",
|
|
@@ -172,22 +172,43 @@ var y = {
|
|
|
172
172
|
"stroke",
|
|
173
173
|
"stroke-width",
|
|
174
174
|
"stroke-dasharray"
|
|
175
|
-
],
|
|
175
|
+
], ze = [
|
|
176
176
|
"d",
|
|
177
177
|
"stroke",
|
|
178
178
|
"opacity",
|
|
179
|
+
"stroke-width",
|
|
179
180
|
"marker-end"
|
|
180
|
-
],
|
|
181
|
+
], Be = [
|
|
182
|
+
"d",
|
|
183
|
+
"stroke",
|
|
184
|
+
"stroke-width"
|
|
185
|
+
], Ve = [
|
|
186
|
+
"d",
|
|
187
|
+
"stroke",
|
|
188
|
+
"stroke-width"
|
|
189
|
+
], He = { key: 0 }, Ue = [
|
|
190
|
+
"d",
|
|
191
|
+
"stroke",
|
|
192
|
+
"stroke-width"
|
|
193
|
+
], We = ["dur"], Ge = [
|
|
194
|
+
"d",
|
|
195
|
+
"stroke",
|
|
196
|
+
"stroke-width"
|
|
197
|
+
], Ke = ["dur"], qe = [
|
|
198
|
+
"d",
|
|
199
|
+
"stroke",
|
|
200
|
+
"stroke-width"
|
|
201
|
+
], Je = ["dur"], Ye = [
|
|
181
202
|
"d",
|
|
182
203
|
"stroke",
|
|
183
204
|
"stroke-width",
|
|
184
205
|
"stroke-dasharray",
|
|
185
206
|
"marker-end"
|
|
186
|
-
],
|
|
207
|
+
], Xe = ["to", "dur"], Ze = { key: 0 }, Qe = ["fill"], $e = ["path", "dur"], et = ["fill"], tt = ["path", "dur"], nt = ["transform"], rt = [
|
|
187
208
|
"y",
|
|
188
209
|
"height",
|
|
189
210
|
"stroke"
|
|
190
|
-
],
|
|
211
|
+
], it = ["font-size", "fill"], at = { key: 1 }, ot = ["transform"], st = [
|
|
191
212
|
"x",
|
|
192
213
|
"y",
|
|
193
214
|
"width",
|
|
@@ -197,7 +218,7 @@ var y = {
|
|
|
197
218
|
"stroke",
|
|
198
219
|
"stroke-opacity",
|
|
199
220
|
"stroke-dasharray"
|
|
200
|
-
],
|
|
221
|
+
], ct = ["font-size", "fill"], lt = ["transform"], ut = [
|
|
201
222
|
"x",
|
|
202
223
|
"y",
|
|
203
224
|
"width",
|
|
@@ -207,7 +228,7 @@ var y = {
|
|
|
207
228
|
"stroke",
|
|
208
229
|
"stroke-opacity",
|
|
209
230
|
"stroke-dasharray"
|
|
210
|
-
],
|
|
231
|
+
], dt = ["font-size", "fill"], ft = ["transform"], pt = [
|
|
211
232
|
"x",
|
|
212
233
|
"y",
|
|
213
234
|
"width",
|
|
@@ -217,69 +238,69 @@ var y = {
|
|
|
217
238
|
"stroke",
|
|
218
239
|
"stroke-opacity",
|
|
219
240
|
"stroke-dasharray"
|
|
220
|
-
],
|
|
241
|
+
], mt = ["font-size", "fill"], ht = { key: 3 }, gt = [
|
|
221
242
|
"x1",
|
|
222
243
|
"y1",
|
|
223
244
|
"x2",
|
|
224
245
|
"y2",
|
|
225
246
|
"stroke"
|
|
226
|
-
],
|
|
247
|
+
], _t = [
|
|
227
248
|
"cx",
|
|
228
249
|
"cy",
|
|
229
250
|
"fill"
|
|
230
|
-
],
|
|
251
|
+
], vt = [
|
|
231
252
|
"x",
|
|
232
253
|
"y",
|
|
233
254
|
"width",
|
|
234
255
|
"height",
|
|
235
256
|
"stroke"
|
|
236
|
-
],
|
|
257
|
+
], yt = { class: "region-hit-layer" }, bt = [
|
|
237
258
|
"transform",
|
|
238
259
|
"onMousedown",
|
|
239
260
|
"onClick"
|
|
240
|
-
],
|
|
261
|
+
], xt = [
|
|
241
262
|
"x",
|
|
242
263
|
"y",
|
|
243
264
|
"width",
|
|
244
265
|
"height",
|
|
245
266
|
"rx"
|
|
246
|
-
],
|
|
267
|
+
], St = [
|
|
247
268
|
"x",
|
|
248
269
|
"y",
|
|
249
270
|
"width",
|
|
250
271
|
"height",
|
|
251
272
|
"rx"
|
|
252
|
-
],
|
|
273
|
+
], Ct = [
|
|
253
274
|
"x",
|
|
254
275
|
"y",
|
|
255
276
|
"width",
|
|
256
277
|
"height",
|
|
257
278
|
"rx",
|
|
258
279
|
"stroke"
|
|
259
|
-
],
|
|
280
|
+
], wt = ["d", "onClick"], Tt = [
|
|
260
281
|
"transform",
|
|
261
282
|
"onMousedown",
|
|
262
283
|
"onClick"
|
|
263
|
-
],
|
|
284
|
+
], Et = [
|
|
264
285
|
"x",
|
|
265
286
|
"y",
|
|
266
287
|
"width",
|
|
267
288
|
"height",
|
|
268
289
|
"rx",
|
|
269
290
|
"stroke-width"
|
|
270
|
-
],
|
|
291
|
+
], Dt = [
|
|
271
292
|
"x",
|
|
272
293
|
"y",
|
|
273
294
|
"width",
|
|
274
295
|
"height"
|
|
275
|
-
],
|
|
296
|
+
], Ot = [
|
|
276
297
|
"x",
|
|
277
298
|
"y",
|
|
278
299
|
"width",
|
|
279
300
|
"height",
|
|
280
301
|
"rx",
|
|
281
302
|
"fill"
|
|
282
|
-
],
|
|
303
|
+
], kt = [
|
|
283
304
|
"x",
|
|
284
305
|
"y",
|
|
285
306
|
"width",
|
|
@@ -288,79 +309,82 @@ var y = {
|
|
|
288
309
|
"stroke",
|
|
289
310
|
"stroke-width",
|
|
290
311
|
"stroke-dasharray"
|
|
291
|
-
],
|
|
312
|
+
], At = [
|
|
292
313
|
"x",
|
|
293
314
|
"y",
|
|
294
315
|
"width",
|
|
295
316
|
"height",
|
|
296
317
|
"rx",
|
|
297
318
|
"stroke"
|
|
298
|
-
],
|
|
319
|
+
], jt = [
|
|
299
320
|
"transform",
|
|
300
321
|
"fill",
|
|
301
322
|
"font-size"
|
|
302
|
-
],
|
|
323
|
+
], Mt = ["dy"], Nt = [
|
|
303
324
|
"r",
|
|
304
325
|
"fill",
|
|
305
326
|
"stroke",
|
|
306
327
|
"stroke-width",
|
|
307
328
|
"opacity"
|
|
308
|
-
],
|
|
329
|
+
], Pt = [
|
|
309
330
|
"values",
|
|
310
331
|
"dur",
|
|
311
332
|
"begin"
|
|
312
|
-
],
|
|
333
|
+
], Ft = [
|
|
313
334
|
"values",
|
|
314
335
|
"keyTimes",
|
|
315
336
|
"dur",
|
|
316
337
|
"begin"
|
|
317
|
-
],
|
|
338
|
+
], It = [
|
|
339
|
+
"viewBox",
|
|
318
340
|
"x",
|
|
319
341
|
"y",
|
|
320
342
|
"width",
|
|
321
343
|
"height",
|
|
322
|
-
"viewBox",
|
|
323
344
|
"preserveAspectRatio"
|
|
324
|
-
],
|
|
345
|
+
], Lt = [
|
|
325
346
|
"href",
|
|
326
347
|
"x",
|
|
327
348
|
"y",
|
|
328
349
|
"width",
|
|
329
350
|
"height"
|
|
330
|
-
],
|
|
351
|
+
], Rt = {
|
|
352
|
+
key: 1,
|
|
353
|
+
class: "node-icon"
|
|
354
|
+
}, zt = ["fill"], Bt = ["transform"], Vt = ["fill"], Ht = [
|
|
331
355
|
"y",
|
|
332
356
|
"transform",
|
|
333
357
|
"fill",
|
|
334
358
|
"font-size",
|
|
335
359
|
"font-weight"
|
|
336
|
-
],
|
|
360
|
+
], Ut = ["dy"], Wt = {
|
|
337
361
|
key: 9,
|
|
338
362
|
class: "node-handles"
|
|
339
|
-
},
|
|
363
|
+
}, Gt = [
|
|
340
364
|
"cx",
|
|
341
365
|
"cy",
|
|
342
366
|
"stroke",
|
|
343
367
|
"onPointerdown"
|
|
344
|
-
],
|
|
368
|
+
], Kt = {
|
|
345
369
|
key: 4,
|
|
346
370
|
class: "node-resize-layer"
|
|
347
|
-
},
|
|
371
|
+
}, qt = [
|
|
348
372
|
"x",
|
|
349
373
|
"y",
|
|
350
374
|
"onMousedown"
|
|
351
|
-
],
|
|
375
|
+
], Jt = {
|
|
352
376
|
key: 0,
|
|
353
377
|
"pointer-events": "none"
|
|
354
|
-
},
|
|
378
|
+
}, Yt = [
|
|
355
379
|
"d",
|
|
356
380
|
"stroke",
|
|
357
381
|
"marker-end"
|
|
358
|
-
],
|
|
382
|
+
], Xt = [
|
|
359
383
|
"x",
|
|
360
384
|
"y",
|
|
361
385
|
"width",
|
|
362
386
|
"height"
|
|
363
|
-
],
|
|
387
|
+
], Zt = 6, Qt = 14, $t = 3, en = .2, tn = 5, nn = 160, rn = 140, an = 12, on = 4e3, sn = 12, cn = 4e3, ln = 45, un = 32, dn = {
|
|
364
388
|
__name: "Topology",
|
|
365
389
|
props: {
|
|
366
390
|
nodes: {
|
|
@@ -416,12 +440,13 @@ var y = {
|
|
|
416
440
|
"node-drag-end",
|
|
417
441
|
"node-resize-start",
|
|
418
442
|
"node-resize-end",
|
|
419
|
-
"delete-request"
|
|
443
|
+
"delete-request",
|
|
444
|
+
"zoom-change"
|
|
420
445
|
],
|
|
421
|
-
setup(
|
|
422
|
-
let
|
|
423
|
-
|
|
424
|
-
},
|
|
446
|
+
setup(_, { expose: re, emit: ie }) {
|
|
447
|
+
let v = _, y = ie, dn = 0, fn = () => {
|
|
448
|
+
dn++;
|
|
449
|
+
}, pn = (e) => e && typeof e == "object" ? {
|
|
425
450
|
text: e.text,
|
|
426
451
|
rotation: e.rotation || 0,
|
|
427
452
|
fontSize: e.fontSize,
|
|
@@ -431,10 +456,10 @@ var y = {
|
|
|
431
456
|
rotation: 0,
|
|
432
457
|
fontSize: void 0,
|
|
433
458
|
color: void 0
|
|
434
|
-
}, mn = (e, t = 11) => e.fontSize || t, hn = (e) => e.fontColor || "#000000", gn = (e, t = 500) => e.fontWeight || t, _n = (e, t) => e.fontSize ||
|
|
435
|
-
yn = x.value,
|
|
459
|
+
}, mn = (e, t = 11) => e.fontSize || t, hn = (e) => e.fontColor || "#000000", gn = (e, t = 500) => e.fontWeight || t, _n = (e, t) => e.fontSize || pn(t).fontSize || 8, vn = (e, t) => e.fontColor || pn(t).color || t != null && t === e.centerText && ca.value || "#000000", x = f(v.nodes.map((e) => ({ ...e }))), yn = null, S = () => {
|
|
460
|
+
yn = x.value, y("update:nodes", x.value);
|
|
436
461
|
};
|
|
437
|
-
|
|
462
|
+
h(() => v.nodes, (e) => {
|
|
438
463
|
let t = Array.isArray(e) ? e : [];
|
|
439
464
|
if (t === yn) return;
|
|
440
465
|
let n = null, r = null;
|
|
@@ -443,22 +468,22 @@ var y = {
|
|
|
443
468
|
} catch {
|
|
444
469
|
n = null;
|
|
445
470
|
}
|
|
446
|
-
(n === null || n !== r) && (
|
|
471
|
+
(n === null || n !== r) && (fn(), x.value = t.map((e) => ({ ...e })));
|
|
447
472
|
}, { deep: !0 });
|
|
448
|
-
let bn = f(
|
|
449
|
-
|
|
473
|
+
let bn = f(v.lineMode);
|
|
474
|
+
h(() => v.lineMode, (e) => {
|
|
450
475
|
bn.value = e;
|
|
451
476
|
});
|
|
452
477
|
let xn = t({
|
|
453
478
|
get: () => bn.value,
|
|
454
479
|
set: (e) => {
|
|
455
|
-
bn.value = e,
|
|
480
|
+
bn.value = e, y("update:lineMode", e);
|
|
456
481
|
}
|
|
457
482
|
}), C = f(null), w = f(null), Sn = f({
|
|
458
483
|
x: 0,
|
|
459
484
|
y: 0
|
|
460
485
|
}), Cn = f(null), wn = null, Tn = !1, En = !1, T = f([]), E = f(/* @__PURE__ */ new Map()), D = f(/* @__PURE__ */ new Set()), O = t(() => {
|
|
461
|
-
let e =
|
|
486
|
+
let e = v.edges, t = [];
|
|
462
487
|
if (T.value.length) {
|
|
463
488
|
let n = new Set(e.map((e) => e.id));
|
|
464
489
|
t = T.value.filter((e) => !n.has(e.id));
|
|
@@ -470,7 +495,7 @@ var y = {
|
|
|
470
495
|
} : e));
|
|
471
496
|
let i = new Set(x.value.map((e) => e.id)), a = D.value;
|
|
472
497
|
return n.filter((e) => !a.has(e.id) && i.has(e.from) && i.has(e.to));
|
|
473
|
-
}), Dn = t(() =>
|
|
498
|
+
}), Dn = t(() => v.config.watchDataChanges === !0), On = f({
|
|
474
499
|
nodes: [],
|
|
475
500
|
edges: []
|
|
476
501
|
}), kn = "", k = null, An = () => JSON.parse(JSON.stringify({
|
|
@@ -491,7 +516,7 @@ var y = {
|
|
|
491
516
|
let e = An(), t = JSON.stringify(e);
|
|
492
517
|
if (t === kn) return;
|
|
493
518
|
let n = Mn(e), r = n.nodes.added.length + n.nodes.removed.length + n.nodes.updated.length + n.edges.added.length + n.edges.removed.length + n.edges.updated.length;
|
|
494
|
-
kn = t, r &&
|
|
519
|
+
kn = t, r && y("data-change", {
|
|
495
520
|
nodes: e.nodes,
|
|
496
521
|
edges: e.edges,
|
|
497
522
|
summary: n
|
|
@@ -501,18 +526,18 @@ var y = {
|
|
|
501
526
|
}, Fn = () => {
|
|
502
527
|
k &&= (clearTimeout(k), null), On.value = An(), kn = "";
|
|
503
528
|
};
|
|
504
|
-
|
|
529
|
+
h([
|
|
505
530
|
x,
|
|
506
531
|
T,
|
|
507
532
|
D,
|
|
508
533
|
E
|
|
509
|
-
], () => Pn(), { deep: !0 }),
|
|
534
|
+
], () => Pn(), { deep: !0 }), h(Dn, (e) => {
|
|
510
535
|
e ? Fn() : k &&= (clearTimeout(k), null);
|
|
511
536
|
}), u(() => {
|
|
512
537
|
Dn.value && Fn();
|
|
513
538
|
});
|
|
514
539
|
let In = () => An(), Ln = () => {
|
|
515
|
-
let e = new Set(
|
|
540
|
+
let e = new Set(L.value), t = new Set(R.value);
|
|
516
541
|
return {
|
|
517
542
|
nodeIds: e,
|
|
518
543
|
nodes: x.value.filter((t) => e.has(t.id)),
|
|
@@ -523,7 +548,7 @@ var y = {
|
|
|
523
548
|
return !t.length && !n.length ? {
|
|
524
549
|
nodes: [],
|
|
525
550
|
edges: []
|
|
526
|
-
} : (t.length && (x.value = x.value.filter((t) => !e.has(t.id)), S()), n.length && (D.value = /* @__PURE__ */ new Set([...D.value, ...n.map((e) => e.id)]), T.value = T.value.filter((e) => !D.value.has(e.id)),
|
|
551
|
+
} : (t.length && (x.value = x.value.filter((t) => !e.has(t.id)), S()), n.length && (D.value = /* @__PURE__ */ new Set([...D.value, ...n.map((e) => e.id)]), T.value = T.value.filter((e) => !D.value.has(e.id)), y("edge-remove", n.map((e) => JSON.parse(JSON.stringify(e))))), L.value = [], R.value = [], y("node-select", null), y("edge-select", null), z(), JSON.parse(JSON.stringify({
|
|
527
552
|
nodes: t,
|
|
528
553
|
edges: n
|
|
529
554
|
})));
|
|
@@ -537,19 +562,19 @@ var y = {
|
|
|
537
562
|
return !!e && "onDeleteRequest" in e;
|
|
538
563
|
}, Hn = () => {
|
|
539
564
|
let { nodes: e, edges: t } = Ln();
|
|
540
|
-
|
|
565
|
+
y("delete-request", JSON.parse(JSON.stringify({
|
|
541
566
|
nodes: e,
|
|
542
567
|
edges: t
|
|
543
568
|
})));
|
|
544
569
|
}, Un = (e) => {
|
|
545
|
-
e.key !== "Delete" && e.key !== "Backspace" || e.isComposing || e.ctrlKey || e.metaKey || e.altKey ||
|
|
570
|
+
e.key !== "Delete" && e.key !== "Backspace" || e.isComposing || e.ctrlKey || e.metaKey || e.altKey || v.config?.enableDeleteKey !== !1 && v.editable && (zn(e) || (L.value.length || R.value.length) && (C.value || Y.value || X.value || (e.preventDefault(), Vn() ? Hn() : Rn())));
|
|
546
571
|
};
|
|
547
572
|
u(() => window.addEventListener("keydown", Un)), l(() => window.removeEventListener("keydown", Un));
|
|
548
573
|
let Wn = (e) => {
|
|
549
574
|
let t = (Array.isArray(e) ? e : [e]).filter((e) => e && typeof e == "object"), n = new Set(x.value.map((e) => e.id)), r = [];
|
|
550
575
|
for (let e of t) {
|
|
551
576
|
let t = JSON.parse(JSON.stringify(e));
|
|
552
|
-
if (t.id == null) t.id =
|
|
577
|
+
if (t.id == null) t.id = ae();
|
|
553
578
|
else if (n.has(t.id)) continue;
|
|
554
579
|
n.add(t.id), r.push(t);
|
|
555
580
|
}
|
|
@@ -559,7 +584,7 @@ var y = {
|
|
|
559
584
|
for (let e of t) {
|
|
560
585
|
let t = JSON.parse(JSON.stringify(e));
|
|
561
586
|
if (t.from != null && t.to != null) {
|
|
562
|
-
if (t.id == null) t.id =
|
|
587
|
+
if (t.id == null) t.id = ae();
|
|
563
588
|
else if (n.has(t.id)) continue;
|
|
564
589
|
n.add(t.id), r.push(t);
|
|
565
590
|
}
|
|
@@ -570,7 +595,7 @@ var y = {
|
|
|
570
595
|
let e = new Set(i.map((e) => e.id));
|
|
571
596
|
D.value = new Set([...D.value].filter((t) => !e.has(t)));
|
|
572
597
|
}
|
|
573
|
-
return T.value = [...T.value, ...r], r.forEach((e) =>
|
|
598
|
+
return T.value = [...T.value, ...r], r.forEach((e) => y("edge-create", JSON.parse(JSON.stringify(e)))), JSON.parse(JSON.stringify(r));
|
|
574
599
|
}, Kn = (e) => {
|
|
575
600
|
let t = (Array.isArray(e) ? e : [e]).filter((e) => e && e.id != null);
|
|
576
601
|
if (!t.length) return [];
|
|
@@ -613,13 +638,13 @@ var y = {
|
|
|
613
638
|
...s
|
|
614
639
|
});
|
|
615
640
|
}
|
|
616
|
-
return i.length ? (E.value = r,
|
|
641
|
+
return i.length ? (E.value = r, y("edge-update", JSON.parse(JSON.stringify(i))), JSON.parse(JSON.stringify(i))) : [];
|
|
617
642
|
}, Jn = (e) => {
|
|
618
643
|
let t = e && typeof e == "object" ? e : null;
|
|
619
|
-
return T.value = [], D.value = /* @__PURE__ */ new Set(), E.value = /* @__PURE__ */ new Map(), t && Array.isArray(t.nodes) ? (x.value = JSON.parse(JSON.stringify(t.nodes)), S()) : (x.value = (Array.isArray(
|
|
644
|
+
return T.value = [], D.value = /* @__PURE__ */ new Set(), E.value = /* @__PURE__ */ new Map(), t && Array.isArray(t.nodes) ? (x.value = JSON.parse(JSON.stringify(t.nodes)), S()) : (x.value = (Array.isArray(v.nodes) ? v.nodes : []).map((e) => ({ ...e })), yn = x.value), L.value = [], R.value = [], y("node-select", null), y("edge-select", null), z(), Fn(), An();
|
|
620
645
|
};
|
|
621
|
-
|
|
622
|
-
|
|
646
|
+
h(() => v.edges, (e) => {
|
|
647
|
+
fn();
|
|
623
648
|
let t = Array.isArray(e) ? e : [], n = new Set(t.map((e) => e.id));
|
|
624
649
|
if (T.value.length) {
|
|
625
650
|
let e = T.value.filter((e) => !n.has(e.id));
|
|
@@ -634,7 +659,7 @@ var y = {
|
|
|
634
659
|
r && (E.value = e);
|
|
635
660
|
}
|
|
636
661
|
}, { deep: !0 });
|
|
637
|
-
let
|
|
662
|
+
let Yn = t(() => {
|
|
638
663
|
let e = {};
|
|
639
664
|
O.value.forEach((t) => {
|
|
640
665
|
let n = [t.from, t.to].sort().join("__");
|
|
@@ -643,7 +668,7 @@ var y = {
|
|
|
643
668
|
let t = {};
|
|
644
669
|
return Object.entries(e).forEach(([e, n]) => {
|
|
645
670
|
let r = n.length;
|
|
646
|
-
r >
|
|
671
|
+
r > Zt ? n.forEach((n, i) => {
|
|
647
672
|
t[n.id] = i === 0 ? {
|
|
648
673
|
key: e,
|
|
649
674
|
index: 0,
|
|
@@ -672,78 +697,74 @@ var y = {
|
|
|
672
697
|
};
|
|
673
698
|
});
|
|
674
699
|
}), t;
|
|
675
|
-
}),
|
|
700
|
+
}), Xn = t(() => {
|
|
676
701
|
let e = /* @__PURE__ */ new Map();
|
|
677
702
|
for (let t of x.value) e.set(t.id, t);
|
|
678
703
|
return e;
|
|
679
|
-
}),
|
|
704
|
+
}), A = (e) => Xn.value.get(e), j = (e) => e.state != "none" && b[e.state] && b[e.state].color || "#00f0ff", Zn = (e) => b[e.state] || b.normal, Qn = (e) => e.nodeType === "text", $n = (e) => e.nodeType === "border-only", M = (e) => e.nodeType === "region", er = (e) => e.background || "#f60f60", tr = (e) => e.borderStyle !== "none", nr = (e) => {
|
|
680
705
|
let t = Number(e.borderWidth);
|
|
681
706
|
return Number.isFinite(t) && t > 0 ? t : 1.5;
|
|
682
|
-
},
|
|
707
|
+
}, rr = (e, t) => {
|
|
683
708
|
let n = Number(e);
|
|
684
709
|
return Number.isFinite(n) && n > 0 ? n : t;
|
|
685
|
-
},
|
|
710
|
+
}, ir = t(() => rr(v.config?.baseIconWidth, 60)), ar = t(() => rr(v.config?.baseIconHeight, 60)), or = [
|
|
686
711
|
"image",
|
|
687
712
|
"img",
|
|
688
713
|
"picture"
|
|
689
|
-
],
|
|
714
|
+
], sr = (e) => {
|
|
690
715
|
if (!e) return "";
|
|
691
716
|
let t = e.image ?? e.src ?? e.img ?? e.imageUrl;
|
|
692
717
|
return typeof t == "string" && t.trim() ? t.trim() : "";
|
|
693
|
-
},
|
|
694
|
-
if (!e ||
|
|
695
|
-
|
|
718
|
+
}, cr = (e) => e ? or.includes(String(e.nodeType ?? "").toLowerCase()) ? !0 : (v.config?.imageNodeBySource || !e.nodeType) && !!sr(e) : !1, lr = t(() => v.config?.imageFit === "cover" ? "cover" : "contain"), ur = t(() => lr.value === "contain" ? "xMidYMid meet" : "xMidYMid slice"), dr = t(() => `${-ir.value / 2} ${-ar.value / 2} ${ir.value} ${ar.value}`), fr = /* @__PURE__ */ new Map(), pr = f(0), mr = (e) => {
|
|
719
|
+
if (!e || fr.has(e) || typeof Image > "u") return;
|
|
720
|
+
fr.set(e, null);
|
|
696
721
|
let t = new Image();
|
|
697
722
|
t.onload = () => {
|
|
698
|
-
|
|
723
|
+
fr.set(e, {
|
|
699
724
|
w: t.naturalWidth || 1,
|
|
700
725
|
h: t.naturalHeight || 1
|
|
701
|
-
}),
|
|
726
|
+
}), pr.value++;
|
|
702
727
|
}, t.onerror = () => {
|
|
703
|
-
|
|
728
|
+
fr.set(e, {
|
|
704
729
|
w: 1,
|
|
705
730
|
h: 1
|
|
706
|
-
}),
|
|
731
|
+
}), pr.value++;
|
|
707
732
|
}, t.src = e;
|
|
708
|
-
},
|
|
709
|
-
|
|
710
|
-
let t =
|
|
733
|
+
}, hr = (e) => {
|
|
734
|
+
pr.value;
|
|
735
|
+
let t = sr(e), n = t ? fr.get(t) : null, { w: r, h: i } = P(e);
|
|
711
736
|
if (!n) return {
|
|
712
737
|
w: r,
|
|
713
738
|
h: i
|
|
714
739
|
};
|
|
715
|
-
let a = n.w, o = n.h, s, c =
|
|
716
|
-
if (
|
|
740
|
+
let a = n.w, o = n.h, s, c = ir.value, l = ar.value;
|
|
741
|
+
if (lr.value === "contain") s = Math.min(c / a, l / o);
|
|
717
742
|
else {
|
|
718
743
|
let e = Math.max(r / c, i / l);
|
|
719
|
-
s = Math.
|
|
744
|
+
s = Math.min(r / e / a, i / e / o);
|
|
720
745
|
}
|
|
721
746
|
return {
|
|
722
747
|
w: a * s,
|
|
723
748
|
h: o * s
|
|
724
749
|
};
|
|
725
750
|
};
|
|
726
|
-
|
|
727
|
-
for (let e of x.value)
|
|
751
|
+
ne(() => {
|
|
752
|
+
for (let e of x.value) cr(e) && mr(sr(e));
|
|
728
753
|
});
|
|
729
|
-
let
|
|
754
|
+
let gr = (e, t) => {
|
|
730
755
|
let n = Number(e);
|
|
731
756
|
return Number.isFinite(n) && n > 0 ? n : t;
|
|
732
|
-
}, gr = (e) => {
|
|
733
|
-
let t = hr(e.width, rr.value), n = hr(e.height, ir.value);
|
|
734
|
-
return {
|
|
735
|
-
sx: t / rr.value,
|
|
736
|
-
sy: n / ir.value
|
|
737
|
-
};
|
|
738
757
|
}, _r = (e) => {
|
|
739
|
-
let { w: t, h: n } =
|
|
758
|
+
let { w: t, h: n } = P(e), r = Math.min(t, n) / 2;
|
|
740
759
|
return Number.isFinite(r) && r > 0 ? r : 30;
|
|
741
760
|
}, vr = [
|
|
742
|
-
"
|
|
743
|
-
"
|
|
744
|
-
"
|
|
761
|
+
"master",
|
|
762
|
+
"expert",
|
|
763
|
+
"advanced",
|
|
764
|
+
"awakened",
|
|
765
|
+
"dormant"
|
|
745
766
|
], yr = t(() => {
|
|
746
|
-
let e =
|
|
767
|
+
let e = v.config.alertStates;
|
|
747
768
|
return Array.isArray(e) && e.length ? e.map((e) => String(e)) : vr;
|
|
748
769
|
}), br = (e) => !!e && e.state != null && yr.value.includes(String(e.state)), xr = {
|
|
749
770
|
warning: {
|
|
@@ -778,7 +799,7 @@ var y = {
|
|
|
778
799
|
"fill",
|
|
779
800
|
"ripple",
|
|
780
801
|
"blink"
|
|
781
|
-
], Tr = t(() => wr.includes(
|
|
802
|
+
], Tr = t(() => wr.includes(v.config.alertStyle) ? v.config.alertStyle : "ring"), Er = (e) => wr.includes(e?.alertStyle) ? e.alertStyle : Tr.value, N = (e) => Number(Number(e).toFixed(2)), Dr = (e, t = .1) => `${N(e)};${N(e * t)};${N(e)}`, Or = [
|
|
782
803
|
{
|
|
783
804
|
offset: "0%",
|
|
784
805
|
opacity: 1
|
|
@@ -818,7 +839,7 @@ var y = {
|
|
|
818
839
|
}
|
|
819
840
|
], Ar = (e) => String(e).replace(/[^a-zA-Z0-9]/g, ""), jr = t(() => {
|
|
820
841
|
let e = /* @__PURE__ */ new Map();
|
|
821
|
-
for (let t of Object.values(
|
|
842
|
+
for (let t of Object.values(b)) {
|
|
822
843
|
let n = Ar(t.color);
|
|
823
844
|
n && !e.has(n) && e.set(n, t.color);
|
|
824
845
|
}
|
|
@@ -833,37 +854,40 @@ var y = {
|
|
|
833
854
|
stops: kr
|
|
834
855
|
});
|
|
835
856
|
return t;
|
|
836
|
-
}), Mr = t(() =>
|
|
837
|
-
|
|
838
|
-
|
|
857
|
+
}), Mr = t(() => v.config.alertGlow !== !1), Nr = t(() => {
|
|
858
|
+
let e = Number(v.config?.alertFillScale);
|
|
859
|
+
return Number.isFinite(e) && e > 0 ? e : 1.15;
|
|
860
|
+
}), Pr = (e) => {
|
|
861
|
+
if (!ma.value || !br(e)) return [];
|
|
862
|
+
let t = Sr(e), n = Zn(e).color, r = N(_r(e)), i = t.dur, a = N(Cr(e)), o = Er(e);
|
|
839
863
|
if (o === "fill") {
|
|
840
|
-
let o = Ar(n), s =
|
|
864
|
+
let o = Ar(n), s = N(t.opacity * .55), c = N(r * Nr.value), l = c * (1 + (t.scale - 1) * .55), u = {
|
|
841
865
|
key: "fill",
|
|
842
|
-
r,
|
|
866
|
+
r: c,
|
|
843
867
|
fill: Mr.value ? `url(#alert-fill-${o})` : n,
|
|
844
868
|
stroke: "none",
|
|
845
869
|
strokeWidth: 0,
|
|
846
870
|
opacity: s,
|
|
847
|
-
rValues: `${
|
|
871
|
+
rValues: `${c};${N(l)};${c}`,
|
|
848
872
|
opacityValues: Dr(s),
|
|
849
873
|
keyTimes: null,
|
|
850
|
-
dur: `${
|
|
874
|
+
dur: `${N(i)}s`,
|
|
851
875
|
begin: `${a}s`
|
|
852
876
|
};
|
|
853
|
-
if (!Mr.value) return [
|
|
854
|
-
let
|
|
855
|
-
return [
|
|
877
|
+
if (!Mr.value) return [u];
|
|
878
|
+
let d = N(c * 1.04), f = N(l * 1.14), p = N(Math.min(.95, t.opacity * 1.6));
|
|
879
|
+
return [u, {
|
|
856
880
|
key: "fill-glow",
|
|
857
|
-
r:
|
|
881
|
+
r: d,
|
|
858
882
|
fill: `url(#alert-glow-${o})`,
|
|
859
883
|
stroke: "none",
|
|
860
884
|
strokeWidth: 0,
|
|
861
|
-
opacity:
|
|
862
|
-
rValues: `${
|
|
863
|
-
opacityValues: Dr(
|
|
885
|
+
opacity: p,
|
|
886
|
+
rValues: `${d};${f};${d}`,
|
|
887
|
+
opacityValues: Dr(p),
|
|
864
888
|
keyTimes: null,
|
|
865
|
-
dur: `${
|
|
866
|
-
begin: `${
|
|
889
|
+
dur: `${N(i * 1.15)}s`,
|
|
890
|
+
begin: `${N(Cr(e, 1.15))}s`
|
|
867
891
|
}];
|
|
868
892
|
}
|
|
869
893
|
if (o === "ripple") {
|
|
@@ -873,7 +897,7 @@ var y = {
|
|
|
873
897
|
1,
|
|
874
898
|
2
|
|
875
899
|
].map((i) => {
|
|
876
|
-
let o =
|
|
900
|
+
let o = N(r * (.92 + i * .02)), s = N(t.opacity * (1 - i * .15));
|
|
877
901
|
return {
|
|
878
902
|
key: `ripple-${i}`,
|
|
879
903
|
r: o,
|
|
@@ -881,19 +905,19 @@ var y = {
|
|
|
881
905
|
stroke: n,
|
|
882
906
|
strokeWidth: 1.8,
|
|
883
907
|
opacity: s,
|
|
884
|
-
rValues: `${o};${
|
|
908
|
+
rValues: `${o};${N(r * t.scale)};${o}`,
|
|
885
909
|
opacityValues: `${s};0;${s}`,
|
|
886
910
|
keyTimes: null,
|
|
887
|
-
dur: `${
|
|
888
|
-
begin: `${
|
|
911
|
+
dur: `${N(e)}s`,
|
|
912
|
+
begin: `${N(a - e * i / 3)}s`
|
|
889
913
|
};
|
|
890
914
|
});
|
|
891
915
|
}
|
|
892
916
|
if (o === "blink") {
|
|
893
|
-
let e =
|
|
917
|
+
let e = N(Math.min(.9, t.opacity * 1.7)), o = Math.max(.8, i * .8);
|
|
894
918
|
return [{
|
|
895
919
|
key: "blink",
|
|
896
|
-
r:
|
|
920
|
+
r: N(r * 1.06),
|
|
897
921
|
fill: "none",
|
|
898
922
|
stroke: n,
|
|
899
923
|
strokeWidth: 3,
|
|
@@ -901,7 +925,7 @@ var y = {
|
|
|
901
925
|
rValues: null,
|
|
902
926
|
opacityValues: `${e};${e};0.04;${e};${e};0.04;${e}`,
|
|
903
927
|
keyTimes: "0;0.18;0.22;0.4;0.58;0.62;1",
|
|
904
|
-
dur: `${
|
|
928
|
+
dur: `${N(o)}s`,
|
|
905
929
|
begin: `${a}s`
|
|
906
930
|
}];
|
|
907
931
|
}
|
|
@@ -911,15 +935,15 @@ var y = {
|
|
|
911
935
|
fill: "none",
|
|
912
936
|
stroke: n,
|
|
913
937
|
strokeWidth: 2.5,
|
|
914
|
-
opacity:
|
|
915
|
-
rValues: `${r};${
|
|
938
|
+
opacity: N(t.opacity),
|
|
939
|
+
rValues: `${r};${N(r * t.scale)};${r}`,
|
|
916
940
|
opacityValues: Dr(t.opacity),
|
|
917
941
|
keyTimes: null,
|
|
918
|
-
dur: `${
|
|
942
|
+
dur: `${N(i)}s`,
|
|
919
943
|
begin: `${a}s`
|
|
920
944
|
}];
|
|
921
945
|
if (t.ripple) {
|
|
922
|
-
let a =
|
|
946
|
+
let a = N(r * 1.12), o = N(t.opacity * .45);
|
|
923
947
|
s.push({
|
|
924
948
|
key: "ring-ripple",
|
|
925
949
|
r: a,
|
|
@@ -927,22 +951,19 @@ var y = {
|
|
|
927
951
|
stroke: n,
|
|
928
952
|
strokeWidth: 1.5,
|
|
929
953
|
opacity: o,
|
|
930
|
-
rValues: `${a};${
|
|
954
|
+
rValues: `${a};${N(r * (t.scale - .12))};${a}`,
|
|
931
955
|
opacityValues: Dr(o),
|
|
932
956
|
keyTimes: null,
|
|
933
|
-
dur: `${
|
|
934
|
-
begin: `${
|
|
957
|
+
dur: `${N(i * 1.25)}s`,
|
|
958
|
+
begin: `${N(Cr(e, 1.25))}s`
|
|
935
959
|
});
|
|
936
960
|
}
|
|
937
961
|
return s;
|
|
938
|
-
},
|
|
939
|
-
let {
|
|
940
|
-
return t === 1 && n === 1 ? "" : `scale(${t}, ${n})`;
|
|
941
|
-
}, Ir = (e) => {
|
|
942
|
-
let { w: t, h: n } = F(e), r = Math.min(10, t * .3), i = Math.min(10, n * .3);
|
|
962
|
+
}, Fr = t(() => x.value.filter((e) => br(e)).length), Ir = (e) => {
|
|
963
|
+
let { w: t, h: n } = P(e), r = Math.min(10, t * .3), i = Math.min(10, n * .3);
|
|
943
964
|
return `translate(${t / 2 - r}, ${-(n / 2 - i)})`;
|
|
944
965
|
}, Lr = t(() => {
|
|
945
|
-
let e = Number(
|
|
966
|
+
let e = Number(v.config.labelGap);
|
|
946
967
|
return Number.isFinite(e) && e >= 0 ? e : 18;
|
|
947
968
|
}), Rr = [
|
|
948
969
|
"top",
|
|
@@ -951,15 +972,15 @@ var y = {
|
|
|
951
972
|
], zr = (e) => {
|
|
952
973
|
let t = e?.labelPosition;
|
|
953
974
|
if (Rr.includes(t)) return t;
|
|
954
|
-
let n =
|
|
975
|
+
let n = v.config.nodeLabelPosition;
|
|
955
976
|
return Rr.includes(n) ? n : "bottom";
|
|
956
977
|
}, Br = (e) => {
|
|
957
|
-
if (
|
|
958
|
-
let { h: t } =
|
|
978
|
+
if (Qn(e)) return 4;
|
|
979
|
+
let { h: t } = P(e), n = zr(e);
|
|
959
980
|
return n === "top" ? -(t / 2 + Lr.value) : n === "center" ? 0 : t / 2 + Lr.value;
|
|
960
981
|
}, Vr = (e) => {
|
|
961
|
-
let t =
|
|
962
|
-
if (
|
|
982
|
+
let t = F(e);
|
|
983
|
+
if (Qn(e) || !e.label) return t;
|
|
963
984
|
let n = mn(e), r = Br(e), i = zr(e);
|
|
964
985
|
if (i === "top") {
|
|
965
986
|
let e = r - n - 4;
|
|
@@ -969,65 +990,65 @@ var y = {
|
|
|
969
990
|
i > t.y + t.height && (t.height = i - t.y);
|
|
970
991
|
}
|
|
971
992
|
return t;
|
|
972
|
-
}, Hr = (e) => e.borderStyle !== "none" && (e.borderColor !== void 0 || e.borderWidth !== void 0 || e.borderStyle !== void 0),
|
|
973
|
-
let t =
|
|
993
|
+
}, Hr = (e) => e.borderStyle !== "none" && (e.borderColor !== void 0 || e.borderWidth !== void 0 || e.borderStyle !== void 0), P = (e) => {
|
|
994
|
+
let t = Qn(e), n = $n(e), r = M(e);
|
|
974
995
|
return {
|
|
975
|
-
w:
|
|
976
|
-
h:
|
|
996
|
+
w: gr(e.width, t ? Math.max(60, String(e.label).length * 7 + 16) : r ? 240 : n ? Math.max(80, String(e.label).length * 8 + 24) : ir.value),
|
|
997
|
+
h: gr(e.height, t ? 26 : r ? 160 : n ? 40 : ar.value)
|
|
977
998
|
};
|
|
978
|
-
},
|
|
979
|
-
let { w: t, h: n } =
|
|
999
|
+
}, F = (e) => {
|
|
1000
|
+
let { w: t, h: n } = P(e);
|
|
980
1001
|
return {
|
|
981
1002
|
x: -t / 2,
|
|
982
1003
|
y: -n / 2,
|
|
983
1004
|
width: t,
|
|
984
1005
|
height: n
|
|
985
1006
|
};
|
|
986
|
-
},
|
|
987
|
-
t(() =>
|
|
988
|
-
let Wr = (e) =>
|
|
989
|
-
|
|
990
|
-
nodes: x.value.filter((e) =>
|
|
991
|
-
edges: O.value.filter((e) =>
|
|
1007
|
+
}, I = (e) => M(e) ? null : Hr(e) ? F(e) : null, Ur = (e) => !M(e) && e.background && e.background !== "none" ? e.background : null, L = f([]), R = f([]);
|
|
1008
|
+
t(() => L.value.length === 1 ? L.value[0] : null), t(() => R.value.length === 1 ? R.value[0] : null);
|
|
1009
|
+
let Wr = (e) => L.value.includes(e.id), Gr = (e) => R.value.includes(e.id), z = () => {
|
|
1010
|
+
y("selection-change", {
|
|
1011
|
+
nodes: x.value.filter((e) => L.value.includes(e.id)),
|
|
1012
|
+
edges: O.value.filter((e) => R.value.includes(e.id))
|
|
992
1013
|
});
|
|
993
|
-
}, Kr = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 ? Math.floor(e) : Infinity : typeof e == "string" && /^\d+$/.test(e.trim()) ? parseInt(e.trim(), 10) : Infinity, qr = t(() => Kr(
|
|
1014
|
+
}, Kr = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 ? Math.floor(e) : Infinity : typeof e == "string" && /^\d+$/.test(e.trim()) ? parseInt(e.trim(), 10) : Infinity, qr = t(() => Kr(v.config.maxSelectNodes)), Jr = t(() => Kr(v.config.maxSelectEdges)), B = (e, t, n) => {
|
|
994
1015
|
let r = new Set(e), i = [];
|
|
995
1016
|
for (let e of t) r.has(e) || (r.add(e), i.push(e));
|
|
996
1017
|
if (n === Infinity) return [...e, ...i];
|
|
997
1018
|
let a = Math.max(0, n - e.length);
|
|
998
1019
|
return [...e, ...i.slice(0, a)];
|
|
999
1020
|
};
|
|
1000
|
-
|
|
1021
|
+
h([qr, Jr], ([e, t]) => {
|
|
1001
1022
|
let n = !1;
|
|
1002
|
-
|
|
1023
|
+
L.value.length > e && (L.value = L.value.slice(0, e), n = !0), R.value.length > t && (R.value = R.value.slice(0, t), n = !0), n && z();
|
|
1003
1024
|
});
|
|
1004
|
-
let Yr = t(() =>
|
|
1025
|
+
let Yr = t(() => v.config.selectedBorderColor || "#fbbf24"), Xr = t(() => v.config?.edgeLayer !== "below"), Zr = t(() => v.config?.highlightEdgeOnTop !== !1), Qr = (e, t) => {
|
|
1005
1026
|
if (!ci()) {
|
|
1006
1027
|
if (t && (t.ctrlKey || t.metaKey)) {
|
|
1007
|
-
let t =
|
|
1008
|
-
t >= 0 ?
|
|
1028
|
+
let t = L.value.indexOf(e.id);
|
|
1029
|
+
t >= 0 ? L.value.splice(t, 1) : L.value = B(L.value, [e.id], qr.value);
|
|
1009
1030
|
} else {
|
|
1010
|
-
let t =
|
|
1011
|
-
|
|
1031
|
+
let t = L.value.length === 1 && L.value[0] === e.id;
|
|
1032
|
+
L.value = t ? [] : B([], [e.id], qr.value), R.value = [];
|
|
1012
1033
|
}
|
|
1013
|
-
|
|
1034
|
+
y("node-click", e), y("node-select", Wr(e) ? e : null), z();
|
|
1014
1035
|
}
|
|
1015
1036
|
}, $r = (e) => {
|
|
1016
1037
|
let t = x.value.find((t) => t.id === e);
|
|
1017
|
-
if (!t ||
|
|
1038
|
+
if (!t || v.config.enableZOrder === !1) return !1;
|
|
1018
1039
|
let n = t.zIndex ?? 0, r = x.value.filter((e) => (e.zIndex ?? 0) > n);
|
|
1019
1040
|
return r.length !== 0 && (t.zIndex = Math.min(...r.map((e) => e.zIndex ?? 0)), !0);
|
|
1020
1041
|
}, ei = (e) => {
|
|
1021
1042
|
let t = x.value.find((t) => t.id === e);
|
|
1022
|
-
if (!t ||
|
|
1043
|
+
if (!t || v.config.enableZOrder === !1) return !1;
|
|
1023
1044
|
let n = t.zIndex ?? 0, r = x.value.filter((e) => (e.zIndex ?? 0) < n);
|
|
1024
1045
|
return r.length !== 0 && (t.zIndex = Math.max(...r.map((e) => e.zIndex ?? 0)), !0);
|
|
1025
1046
|
}, ti = (e) => {
|
|
1026
1047
|
let t = x.value.find((t) => t.id === e);
|
|
1027
|
-
return !t ||
|
|
1048
|
+
return !t || v.config.enableZOrder === !1 ? !1 : (t.zIndex = Math.max(...x.value.map((e) => e.zIndex ?? 0), 0) + 1, !0);
|
|
1028
1049
|
}, ni = (e) => {
|
|
1029
1050
|
let t = x.value.find((t) => t.id === e);
|
|
1030
|
-
return !t ||
|
|
1051
|
+
return !t || v.config.enableZOrder === !1 ? !1 : (t.zIndex = Math.min(...x.value.map((e) => e.zIndex ?? 0), 0) - 1, !0);
|
|
1031
1052
|
}, ri = () => {
|
|
1032
1053
|
if (!w.value) return;
|
|
1033
1054
|
let e = w.value.cloneNode(!0);
|
|
@@ -1036,25 +1057,25 @@ var y = {
|
|
|
1036
1057
|
t = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + t;
|
|
1037
1058
|
let n = new Blob([t], { type: "image/svg+xml;charset=utf-8" }), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
1038
1059
|
i.href = r, i.download = `topology-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.svg`, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
|
|
1039
|
-
}, ii = t(() =>
|
|
1060
|
+
}, ii = t(() => v.config.selectedLineColor || "#fbbf24"), ai = (e, t) => {
|
|
1040
1061
|
if (ci()) return;
|
|
1041
|
-
let n =
|
|
1042
|
-
let t =
|
|
1062
|
+
let n = Yn.value[e.id], r = !!(n && n.merged && n.representative), i = r ? O.value.filter((e) => {
|
|
1063
|
+
let t = Yn.value[e.id];
|
|
1043
1064
|
return t && t.key === n.key;
|
|
1044
1065
|
}) : null, a = r ? i.map((e) => e.id) : [e.id], o = r ? {
|
|
1045
1066
|
...e,
|
|
1046
1067
|
bundleEdges: i
|
|
1047
1068
|
} : e;
|
|
1048
|
-
if (t && (t.ctrlKey || t.metaKey)) a.every((e) =>
|
|
1069
|
+
if (t && (t.ctrlKey || t.metaKey)) a.every((e) => R.value.includes(e)) ? R.value = R.value.filter((e) => !a.includes(e)) : R.value = B(R.value, a, Jr.value);
|
|
1049
1070
|
else {
|
|
1050
|
-
let e = a.length ===
|
|
1051
|
-
|
|
1071
|
+
let e = a.length === R.value.length && a.every((e) => R.value.includes(e));
|
|
1072
|
+
R.value = e ? [] : B([], a, Jr.value), L.value = [];
|
|
1052
1073
|
}
|
|
1053
|
-
|
|
1074
|
+
y("edge-select", Gr(e) ? o : null), z();
|
|
1054
1075
|
}, oi = 0, si = (e = 200) => {
|
|
1055
1076
|
oi = performance.now() + e;
|
|
1056
1077
|
}, ci = () => performance.now() < oi, li = () => {
|
|
1057
|
-
|
|
1078
|
+
L.value = [], R.value = [], y("node-select", null), y("edge-select", null), z();
|
|
1058
1079
|
}, ui = (e) => {
|
|
1059
1080
|
if (ci()) return;
|
|
1060
1081
|
let t = e.target;
|
|
@@ -1062,7 +1083,32 @@ var y = {
|
|
|
1062
1083
|
}, di = f({
|
|
1063
1084
|
width: 1e3,
|
|
1064
1085
|
height: 650
|
|
1065
|
-
}),
|
|
1086
|
+
}), V = f(1), fi = f(0), pi = f(0), mi = (e) => Math.min(tn, Math.max(en, e));
|
|
1087
|
+
h(() => v.config.zoom, (e) => {
|
|
1088
|
+
typeof e != "number" || !Number.isFinite(e) || e <= 0 || (V.value = mi(e), y("zoom-change", V.value));
|
|
1089
|
+
}, { immediate: !0 });
|
|
1090
|
+
let hi = (e) => {
|
|
1091
|
+
typeof e != "number" || !Number.isFinite(e) || e <= 0 || (V.value = mi(e), y("zoom-change", V.value));
|
|
1092
|
+
}, gi = () => {
|
|
1093
|
+
let e = x.value.filter((e) => !M(e));
|
|
1094
|
+
if (!e.length) return {
|
|
1095
|
+
x: 0,
|
|
1096
|
+
y: 0
|
|
1097
|
+
};
|
|
1098
|
+
let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity;
|
|
1099
|
+
for (let a of e) {
|
|
1100
|
+
let { w: e, h: o } = P(a);
|
|
1101
|
+
t = Math.min(t, a.x - e / 2), r = Math.max(r, a.x + e / 2), n = Math.min(n, a.y - o / 2), i = Math.max(i, a.y + o / 2);
|
|
1102
|
+
}
|
|
1103
|
+
return {
|
|
1104
|
+
x: (t + r) / 2,
|
|
1105
|
+
y: (n + i) / 2
|
|
1106
|
+
};
|
|
1107
|
+
}, _i = () => {
|
|
1108
|
+
V.value = 1;
|
|
1109
|
+
let e = gi();
|
|
1110
|
+
fi.value = e.x, pi.value = e.y, y("zoom-change", V.value);
|
|
1111
|
+
}, vi = t(() => -bi.value / 2 + fi.value), yi = t(() => -xi.value / 2 + pi.value), bi = t(() => v.width ?? di.value.width), xi = t(() => v.height ?? di.value.height), Si = null;
|
|
1066
1112
|
u(() => {
|
|
1067
1113
|
let e = w.value;
|
|
1068
1114
|
if (e) {
|
|
@@ -1072,42 +1118,42 @@ var y = {
|
|
|
1072
1118
|
height: t.height
|
|
1073
1119
|
});
|
|
1074
1120
|
}
|
|
1075
|
-
e && typeof ResizeObserver < "u" && (
|
|
1121
|
+
e && typeof ResizeObserver < "u" && (Si = new ResizeObserver(() => {
|
|
1076
1122
|
let t = e.getBoundingClientRect();
|
|
1077
1123
|
t.width > 0 && t.height > 0 && (di.value = {
|
|
1078
1124
|
width: t.width,
|
|
1079
1125
|
height: t.height
|
|
1080
1126
|
});
|
|
1081
|
-
}),
|
|
1127
|
+
}), Si.observe(e));
|
|
1082
1128
|
}), l(() => {
|
|
1083
|
-
|
|
1129
|
+
Si &&= (Si.disconnect(), null), ba &&= (cancelAnimationFrame(ba), 0), Ri &&= (cancelAnimationFrame(Ri), 0), Wa &&= (cancelAnimationFrame(Wa), 0), Za(), Wi();
|
|
1084
1130
|
});
|
|
1085
|
-
let H = t(() =>
|
|
1086
|
-
x0:
|
|
1087
|
-
y0:
|
|
1088
|
-
x1:
|
|
1089
|
-
y1:
|
|
1090
|
-
})),
|
|
1091
|
-
let e =
|
|
1092
|
-
let { w: n, h: r } =
|
|
1131
|
+
let H = t(() => bi.value / V.value), U = t(() => xi.value / V.value), Ci = t(() => ({
|
|
1132
|
+
x0: vi.value - nn,
|
|
1133
|
+
y0: yi.value - nn,
|
|
1134
|
+
x1: vi.value + H.value + nn,
|
|
1135
|
+
y1: yi.value + U.value + nn
|
|
1136
|
+
})), wi = t(() => {
|
|
1137
|
+
let e = Ci.value, t = x.value.filter((t) => {
|
|
1138
|
+
let { w: n, h: r } = P(t);
|
|
1093
1139
|
return t.x + n / 2 >= e.x0 && t.x - n / 2 <= e.x1 && t.y + r / 2 >= e.y0 && t.y - r / 2 <= e.y1;
|
|
1094
1140
|
});
|
|
1095
|
-
return
|
|
1096
|
-
}),
|
|
1097
|
-
let e =
|
|
1141
|
+
return v.config.enableZOrder !== !1 && t.sort((e, t) => (e.zIndex ?? 0) - (t.zIndex ?? 0)), t;
|
|
1142
|
+
}), Ti = t(() => wi.value.filter((e) => M(e))), Ei = t(() => wi.value.filter((e) => !M(e))), W = t(() => {
|
|
1143
|
+
let e = Ci.value;
|
|
1098
1144
|
return O.value.filter((t) => {
|
|
1099
|
-
if (!
|
|
1100
|
-
let n =
|
|
1145
|
+
if (!mo(t)) return !1;
|
|
1146
|
+
let n = A(t.from), r = A(t.to);
|
|
1101
1147
|
if (!n || !r) return !1;
|
|
1102
|
-
let i =
|
|
1103
|
-
return Math.min(n.x - i, r.x - o) -
|
|
1148
|
+
let i = P(n).w / 2, a = P(n).h / 2, o = P(r).w / 2, s = P(r).h / 2;
|
|
1149
|
+
return Math.min(n.x - i, r.x - o) - rn <= e.x1 && Math.max(n.x + i, r.x + o) + rn >= e.x0 && Math.min(n.y - a, r.y - s) - rn <= e.y1 && Math.max(n.y + a, r.y + s) + rn >= e.y0;
|
|
1104
1150
|
});
|
|
1105
|
-
}),
|
|
1106
|
-
if (
|
|
1151
|
+
}), Di = (e) => {
|
|
1152
|
+
if (v.config.enableZoom === !1) return;
|
|
1107
1153
|
e.preventDefault();
|
|
1108
|
-
let t = w.value.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = n / t.width, a = r / t.height, o = H.value, s = U.value, c = e.deltaY > 0 ? .9 : 1.1, l = Math.min(
|
|
1109
|
-
|
|
1110
|
-
}, G = f(null), K = f(null),
|
|
1154
|
+
let t = w.value.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = n / t.width, a = r / t.height, o = H.value, s = U.value, c = e.deltaY > 0 ? .9 : 1.1, l = Math.min(tn, Math.max(en, V.value * c)), u = bi.value / l, d = xi.value / l;
|
|
1155
|
+
fi.value += (o - u) * i, pi.value += (s - d) * a, V.value = l, y("zoom-change", l);
|
|
1156
|
+
}, G = f(null), K = f(null), Oi = (e) => {
|
|
1111
1157
|
let t = w.value, n = t ? t.getBoundingClientRect() : null;
|
|
1112
1158
|
G.value = {
|
|
1113
1159
|
startX: e.clientX,
|
|
@@ -1117,8 +1163,8 @@ var y = {
|
|
|
1117
1163
|
moved: !1,
|
|
1118
1164
|
rectWidth: n && n.width ? n.width : 0,
|
|
1119
1165
|
rectHeight: n && n.height ? n.height : 0
|
|
1120
|
-
},
|
|
1121
|
-
},
|
|
1166
|
+
}, Ui();
|
|
1167
|
+
}, ki = (e) => {
|
|
1122
1168
|
let t = G.value, n = w.value;
|
|
1123
1169
|
if (!t || !n) return;
|
|
1124
1170
|
let r = t.rectWidth, i = t.rectHeight;
|
|
@@ -1129,11 +1175,11 @@ var y = {
|
|
|
1129
1175
|
return;
|
|
1130
1176
|
}
|
|
1131
1177
|
let a = e.clientX - t.lastX, o = e.clientY - t.lastY;
|
|
1132
|
-
t.lastX = e.clientX, t.lastY = e.clientY,
|
|
1133
|
-
},
|
|
1178
|
+
t.lastX = e.clientX, t.lastY = e.clientY, fi.value -= a * (H.value / r), pi.value -= o * (U.value / i);
|
|
1179
|
+
}, Ai = () => {
|
|
1134
1180
|
let e = G.value;
|
|
1135
|
-
G.value = null, e && e.moved && si(),
|
|
1136
|
-
},
|
|
1181
|
+
G.value = null, e && e.moved && si(), Gi();
|
|
1182
|
+
}, ji = (e) => {
|
|
1137
1183
|
let t = Z(e);
|
|
1138
1184
|
K.value = {
|
|
1139
1185
|
start: {
|
|
@@ -1147,8 +1193,8 @@ var y = {
|
|
|
1147
1193
|
startClientX: e.clientX,
|
|
1148
1194
|
startClientY: e.clientY,
|
|
1149
1195
|
moved: !1
|
|
1150
|
-
},
|
|
1151
|
-
},
|
|
1196
|
+
}, Ui();
|
|
1197
|
+
}, Mi = (e) => {
|
|
1152
1198
|
let t = K.value;
|
|
1153
1199
|
if (!t) return;
|
|
1154
1200
|
let n = Z(e);
|
|
@@ -1156,7 +1202,7 @@ var y = {
|
|
|
1156
1202
|
x: n.x,
|
|
1157
1203
|
y: n.y
|
|
1158
1204
|
}, !t.moved && Math.hypot(e.clientX - t.startClientX, e.clientY - t.startClientY) > 3 && (t.moved = !0);
|
|
1159
|
-
},
|
|
1205
|
+
}, Ni = t(() => {
|
|
1160
1206
|
let e = K.value;
|
|
1161
1207
|
return e ? {
|
|
1162
1208
|
x: Math.min(e.start.x, e.current.x),
|
|
@@ -1169,7 +1215,7 @@ var y = {
|
|
|
1169
1215
|
width: 0,
|
|
1170
1216
|
height: 0
|
|
1171
1217
|
};
|
|
1172
|
-
}),
|
|
1218
|
+
}), Pi = () => {
|
|
1173
1219
|
let e = K.value;
|
|
1174
1220
|
if (K.value = null, e && e.moved) {
|
|
1175
1221
|
let t = {
|
|
@@ -1178,50 +1224,50 @@ var y = {
|
|
|
1178
1224
|
w: Math.abs(e.current.x - e.start.x),
|
|
1179
1225
|
h: Math.abs(e.current.y - e.start.y)
|
|
1180
1226
|
}, n = x.value.filter((e) => {
|
|
1181
|
-
let n =
|
|
1182
|
-
return r + n.width < t.x || r > t.x + t.w || i + n.height < t.y || i > t.y + t.h ? !1 : !
|
|
1227
|
+
let n = F(e), r = e.x + n.x, i = e.y + n.y;
|
|
1228
|
+
return r + n.width < t.x || r > t.x + t.w || i + n.height < t.y || i > t.y + t.h ? !1 : !M(e) || r >= t.x && i >= t.y && r + n.width <= t.x + t.w && i + n.height <= t.y + t.h;
|
|
1183
1229
|
});
|
|
1184
|
-
n.length && (
|
|
1230
|
+
n.length && (L.value = B(L.value, n.map((e) => e.id), qr.value), z()), si();
|
|
1185
1231
|
}
|
|
1186
|
-
|
|
1187
|
-
},
|
|
1232
|
+
Gi();
|
|
1233
|
+
}, Fi = (e) => !e || typeof e.closest != "function" ? !1 : !!(e.closest(".topology-node") || e.closest(".node-handles") || e.closest(".node-resize-layer")), Ii = (e) => {
|
|
1188
1234
|
if (w.value) {
|
|
1189
1235
|
if (e.button === 1) {
|
|
1190
|
-
if (
|
|
1191
|
-
e.preventDefault(),
|
|
1192
|
-
} else if (e.button === 0 && !
|
|
1236
|
+
if (v.config.enablePan === !1) return;
|
|
1237
|
+
e.preventDefault(), Oi(e);
|
|
1238
|
+
} else if (e.button === 0 && !Fi(e.target)) {
|
|
1193
1239
|
if (e.ctrlKey || e.metaKey) {
|
|
1194
|
-
if (
|
|
1195
|
-
e.preventDefault(),
|
|
1196
|
-
} else
|
|
1240
|
+
if (v.config.enableMarquee === !1) return;
|
|
1241
|
+
e.preventDefault(), ji(e);
|
|
1242
|
+
} else v.config.enablePan !== !1 && (e.preventDefault(), Oi(e));
|
|
1197
1243
|
}
|
|
1198
1244
|
}
|
|
1199
|
-
},
|
|
1200
|
-
|
|
1201
|
-
let e =
|
|
1202
|
-
|
|
1203
|
-
},
|
|
1204
|
-
|
|
1205
|
-
}, zi = () => {
|
|
1206
|
-
Fi && (cancelAnimationFrame(Fi), Li()), G.value && Di(), K.value && ji();
|
|
1207
|
-
}, Bi = () => {
|
|
1208
|
-
Pi || (Pi = !0, window.addEventListener("mousemove", Ri, !0), window.addEventListener("mouseup", zi, !0));
|
|
1209
|
-
}, Vi = () => {
|
|
1210
|
-
Pi && (Pi = !1, window.removeEventListener("mousemove", Ri, !0), window.removeEventListener("mouseup", zi, !0));
|
|
1245
|
+
}, Li = !1, Ri = 0, zi = null, Bi = () => {
|
|
1246
|
+
Ri = 0;
|
|
1247
|
+
let e = zi;
|
|
1248
|
+
zi = null, e && (G.value ? ki(e) : K.value && Mi(e));
|
|
1249
|
+
}, Vi = (e) => {
|
|
1250
|
+
zi = e, Ri ||= requestAnimationFrame(Bi);
|
|
1211
1251
|
}, Hi = () => {
|
|
1212
|
-
|
|
1213
|
-
}, Ui =
|
|
1214
|
-
|
|
1252
|
+
Ri && (cancelAnimationFrame(Ri), Bi()), G.value && Ai(), K.value && Pi();
|
|
1253
|
+
}, Ui = () => {
|
|
1254
|
+
Li || (Li = !0, window.addEventListener("mousemove", Vi, !0), window.addEventListener("mouseup", Hi, !0));
|
|
1255
|
+
}, Wi = () => {
|
|
1256
|
+
Li && (Li = !1, window.removeEventListener("mousemove", Vi, !0), window.removeEventListener("mouseup", Hi, !0));
|
|
1257
|
+
}, Gi = () => {
|
|
1258
|
+
!G.value && !K.value && Wi();
|
|
1259
|
+
}, Ki = t(() => {
|
|
1260
|
+
if (Y.value && Y.value.side) return { cursor: Pa(Y.value.side) };
|
|
1215
1261
|
if (K.value) return { cursor: "crosshair" };
|
|
1216
1262
|
if (G.value && G.value.moved) return { cursor: "grabbing" };
|
|
1217
|
-
}),
|
|
1218
|
-
let e = Number(
|
|
1219
|
-
return (Number.isFinite(e) && e > 0 ? e : 40) /
|
|
1220
|
-
}),
|
|
1221
|
-
let e = Number(
|
|
1263
|
+
}), qi = t(() => v.config.showGrid !== !1), Ji = t(() => v.config.gridColor || "#1a2240"), Yi = t(() => {
|
|
1264
|
+
let e = Number(v.config.gridStep);
|
|
1265
|
+
return (Number.isFinite(e) && e > 0 ? e : 40) / V.value;
|
|
1266
|
+
}), Xi = t(() => {
|
|
1267
|
+
let e = Number(v.config.gridOpacity);
|
|
1222
1268
|
return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .5;
|
|
1223
|
-
}),
|
|
1224
|
-
let e =
|
|
1269
|
+
}), Zi = t(() => {
|
|
1270
|
+
let e = v.config.radialGradient && typeof v.config.radialGradient == "object" ? v.config.radialGradient : {}, t = Array.isArray(e.stops) && e.stops.length ? e.stops.filter((e) => e && e.color).map((e, t) => ({
|
|
1225
1271
|
offset: e.offset == null ? t === 0 ? "0%" : "100%" : e.offset,
|
|
1226
1272
|
color: e.color,
|
|
1227
1273
|
opacity: e.opacity
|
|
@@ -1240,59 +1286,62 @@ var y = {
|
|
|
1240
1286
|
r: e.r || "60%",
|
|
1241
1287
|
stops: n
|
|
1242
1288
|
};
|
|
1243
|
-
}),
|
|
1244
|
-
let e = Number(
|
|
1289
|
+
}), Qi = t(() => v.config.showCenterPoint === !0), $i = t(() => v.config.showEdgeTextBg === !0), ea = t(() => v.config.edgeTextBgColor || "#0a0e1a"), ta = t(() => {
|
|
1290
|
+
let e = Number(v.config.edgeTextBgOpacity);
|
|
1245
1291
|
return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : .92;
|
|
1246
|
-
}),
|
|
1247
|
-
let t = e.
|
|
1292
|
+
}), na = t(() => v.config.edgeColor || v.config.defaultEdgeColor || null), ra = t(() => v.config.edgeBaseColor || null), ia = (e) => {
|
|
1293
|
+
let t = Number(e.width ?? v.config.edgeWidth);
|
|
1294
|
+
return Number.isFinite(t) && t > 0 ? t : 2;
|
|
1295
|
+
}, aa = (e) => ia(e) / 2, oa = (e) => e.baseColor ? e.baseColor : ra.value ? ra.value : e.color || na.value ? Q(e) : "#1a2744", sa = (e) => {
|
|
1296
|
+
let t = e.baseDimOpacity ?? v.config.edgeBaseDimOpacity;
|
|
1248
1297
|
if (t != null) {
|
|
1249
1298
|
let e = Number(t);
|
|
1250
1299
|
return Number.isFinite(e) ? Math.min(1, Math.max(0, e)) : 1;
|
|
1251
1300
|
}
|
|
1252
|
-
return
|
|
1253
|
-
},
|
|
1301
|
+
return fa.value === "none" || ha(e) === "none" ? 1 : .45;
|
|
1302
|
+
}, ca = t(() => v.config.edgeCenterTextColor || null), la = t(() => v.config.showNodeHandles === !0), ua = t(() => v.config.showStatusDot !== !1), da = (e, t) => {
|
|
1254
1303
|
let n = Number(e);
|
|
1255
1304
|
return Number.isFinite(n) && n >= 0 ? n : t;
|
|
1256
|
-
},
|
|
1257
|
-
let e =
|
|
1305
|
+
}, fa = t(() => {
|
|
1306
|
+
let e = v.config.motionFx ?? v.config.fx;
|
|
1258
1307
|
return typeof e == "boolean" ? e ? "all" : "none" : [
|
|
1259
1308
|
"none",
|
|
1260
1309
|
"flow",
|
|
1261
1310
|
"particle",
|
|
1262
1311
|
"all"
|
|
1263
|
-
].includes(e) ? e : O.value.length <=
|
|
1264
|
-
}),
|
|
1265
|
-
let e =
|
|
1266
|
-
return typeof e == "boolean" ? e : O.value.length <=
|
|
1267
|
-
}),
|
|
1268
|
-
let e =
|
|
1269
|
-
return typeof e == "boolean" ? e :
|
|
1270
|
-
}),
|
|
1312
|
+
].includes(e) ? e : O.value.length <= da(v.config.fxMotionMaxEdges, 200) ? "all" : "none";
|
|
1313
|
+
}), pa = t(() => {
|
|
1314
|
+
let e = v.config.glowFx ?? v.config.fx;
|
|
1315
|
+
return typeof e == "boolean" ? e : O.value.length <= da(v.config.fxGlowMaxEdges, 500);
|
|
1316
|
+
}), ma = t(() => {
|
|
1317
|
+
let e = v.config.breatheFx ?? v.config.fx;
|
|
1318
|
+
return typeof e == "boolean" ? e : Fr.value <= da(v.config.fxAlertMaxNodes, 300);
|
|
1319
|
+
}), ha = (e) => {
|
|
1271
1320
|
if (e.animatedMode !== void 0) {
|
|
1272
1321
|
let t = e.animatedMode;
|
|
1273
|
-
return !t || t === "all" ?
|
|
1322
|
+
return !t || t === "all" ? fa.value : t === "none" ? "none" : t;
|
|
1274
1323
|
}
|
|
1275
|
-
return e.animated === void 0 || e.animated ?
|
|
1276
|
-
},
|
|
1324
|
+
return e.animated === void 0 || e.animated ? fa.value : "none";
|
|
1325
|
+
}, ga = (e) => e.borderColor || j(e) || "#94a3b8", _a = (e) => e.borderWidth || 0, va = (e) => e.borderStyle === "dashed" ? "8 5" : void 0, q = (e) => {
|
|
1277
1326
|
let t = e.borderRadius;
|
|
1278
|
-
if (t == null || t === "") return
|
|
1327
|
+
if (t == null || t === "") return M(e) ? 16 : 6;
|
|
1279
1328
|
let n = Number(t);
|
|
1280
|
-
return !Number.isFinite(n) || n < 0 ?
|
|
1281
|
-
},
|
|
1282
|
-
if (e.button !== 0 || !
|
|
1329
|
+
return !Number.isFinite(n) || n < 0 ? M(e) ? 16 : 6 : n;
|
|
1330
|
+
}, ya = (e, t) => {
|
|
1331
|
+
if (e.button !== 0 || !v.editable || v.config.nodeDraggable === !1) return;
|
|
1283
1332
|
e.stopPropagation();
|
|
1284
|
-
let n =
|
|
1333
|
+
let n = A(t), r = Z(e);
|
|
1285
1334
|
if (Sn.value = {
|
|
1286
1335
|
x: r.x - n.x,
|
|
1287
1336
|
y: r.y - n.y
|
|
1288
1337
|
}, wn = {
|
|
1289
1338
|
x: e.clientX,
|
|
1290
1339
|
y: e.clientY
|
|
1291
|
-
}, Tn = !1, En = !!(e.ctrlKey || e.metaKey),
|
|
1340
|
+
}, Tn = !1, En = !!(e.ctrlKey || e.metaKey), L.value.length > 1 && L.value.includes(t)) {
|
|
1292
1341
|
let e = {};
|
|
1293
|
-
|
|
1294
|
-
let n =
|
|
1295
|
-
n && !
|
|
1342
|
+
L.value.forEach((t) => {
|
|
1343
|
+
let n = A(t);
|
|
1344
|
+
n && !M(n) && (e[t] = {
|
|
1296
1345
|
x: n.x,
|
|
1297
1346
|
y: n.y
|
|
1298
1347
|
});
|
|
@@ -1304,28 +1353,28 @@ var y = {
|
|
|
1304
1353
|
}
|
|
1305
1354
|
};
|
|
1306
1355
|
} else Cn.value = null;
|
|
1307
|
-
C.value = t,
|
|
1308
|
-
},
|
|
1309
|
-
|
|
1310
|
-
let e =
|
|
1311
|
-
|
|
1312
|
-
},
|
|
1313
|
-
(Y.value || C.value || J.value) && (
|
|
1356
|
+
C.value = t, y("node-drag-start", n);
|
|
1357
|
+
}, ba = 0, xa = null, Sa = () => {
|
|
1358
|
+
ba = 0;
|
|
1359
|
+
let e = xa;
|
|
1360
|
+
xa = null, e && wa(e);
|
|
1361
|
+
}, Ca = (e) => {
|
|
1362
|
+
(Y.value || C.value || J.value) && (xa = {
|
|
1314
1363
|
clientX: e.clientX,
|
|
1315
1364
|
clientY: e.clientY
|
|
1316
|
-
},
|
|
1317
|
-
},
|
|
1365
|
+
}, ba ||= requestAnimationFrame(Sa));
|
|
1366
|
+
}, wa = (e) => {
|
|
1318
1367
|
if (J.value) {
|
|
1319
|
-
|
|
1368
|
+
ka(e);
|
|
1320
1369
|
return;
|
|
1321
1370
|
}
|
|
1322
1371
|
if (Y.value) {
|
|
1323
|
-
|
|
1372
|
+
Ia(e);
|
|
1324
1373
|
return;
|
|
1325
1374
|
}
|
|
1326
1375
|
if (!C.value) return;
|
|
1327
1376
|
let t = Z(e);
|
|
1328
|
-
!Tn && wn && Math.hypot(e.clientX - wn.x, e.clientY - wn.y) >
|
|
1377
|
+
!Tn && wn && Math.hypot(e.clientX - wn.x, e.clientY - wn.y) > $t && (Tn = !0, !En && !L.value.includes(C.value) && (L.value = B([], [C.value], qr.value), R.value = [], y("node-select", L.value.includes(C.value) ? A(C.value) : null), z()));
|
|
1329
1378
|
let n = Cn.value;
|
|
1330
1379
|
if (n) {
|
|
1331
1380
|
let e = t.x - n.start.x, r = t.y - n.start.y;
|
|
@@ -1340,10 +1389,10 @@ var y = {
|
|
|
1340
1389
|
y: t.y - Sn.value.y
|
|
1341
1390
|
} : e);
|
|
1342
1391
|
S();
|
|
1343
|
-
},
|
|
1344
|
-
|
|
1345
|
-
}, J = f(null),
|
|
1346
|
-
if (e.button !== 0 || e.ctrlKey || e.metaKey || !
|
|
1392
|
+
}, Ta = () => {
|
|
1393
|
+
ba && (cancelAnimationFrame(ba), Sa()), J.value ? Aa() : Y.value ? La() : C.value && (Tn && si(), C.value = null, Cn.value = null, wn = null, Tn = !1, y("node-drag-end"));
|
|
1394
|
+
}, J = f(null), Ea = t(() => v.editable && v.config.regionDraggable !== !1), Da = t(() => v.config.regionHitArea === "border" ? "border" : "box"), Oa = (e, t) => {
|
|
1395
|
+
if (e.button !== 0 || e.ctrlKey || e.metaKey || !Ea.value) return;
|
|
1347
1396
|
e.stopPropagation(), e.preventDefault();
|
|
1348
1397
|
let n = Z(e);
|
|
1349
1398
|
J.value = {
|
|
@@ -1357,13 +1406,13 @@ var y = {
|
|
|
1357
1406
|
y: e.clientY
|
|
1358
1407
|
},
|
|
1359
1408
|
moved: !1
|
|
1360
|
-
},
|
|
1361
|
-
},
|
|
1409
|
+
}, y("node-drag-start", t);
|
|
1410
|
+
}, ka = (e) => {
|
|
1362
1411
|
let t = J.value;
|
|
1363
1412
|
if (!t) return;
|
|
1364
1413
|
if (!t.moved) {
|
|
1365
|
-
if (Math.hypot(e.clientX - t.startClient.x, e.clientY - t.startClient.y) <=
|
|
1366
|
-
t.moved = !0,
|
|
1414
|
+
if (Math.hypot(e.clientX - t.startClient.x, e.clientY - t.startClient.y) <= $t) return;
|
|
1415
|
+
t.moved = !0, L.value.includes(t.id) || (L.value = B([], [t.id], qr.value), R.value = [], y("node-select", A(t.id) || null), z());
|
|
1367
1416
|
}
|
|
1368
1417
|
let n = Z(e);
|
|
1369
1418
|
x.value = x.value.map((e) => e.id === t.id ? {
|
|
@@ -1371,13 +1420,13 @@ var y = {
|
|
|
1371
1420
|
x: n.x - t.offset.x,
|
|
1372
1421
|
y: n.y - t.offset.y
|
|
1373
1422
|
} : e), S();
|
|
1374
|
-
},
|
|
1423
|
+
}, Aa = () => {
|
|
1375
1424
|
let e = J.value;
|
|
1376
|
-
J.value = null, e && (e.moved && si(),
|
|
1377
|
-
},
|
|
1425
|
+
J.value = null, e && (e.moved && si(), y("node-drag-end", A(e.id) || null));
|
|
1426
|
+
}, ja = (e, t) => {
|
|
1378
1427
|
ci() || Qr(e, t);
|
|
1379
|
-
}, Y = f(null),
|
|
1380
|
-
let t =
|
|
1428
|
+
}, Y = f(null), Ma = (e, t, n) => Math.min(n, Math.max(t, e)), Na = (e) => {
|
|
1429
|
+
let t = F(e), n = t.x, r = t.y, i = t.x + t.width, a = t.y + t.height;
|
|
1381
1430
|
return [
|
|
1382
1431
|
{
|
|
1383
1432
|
side: "nw",
|
|
@@ -1420,9 +1469,9 @@ var y = {
|
|
|
1420
1469
|
y: 0
|
|
1421
1470
|
}
|
|
1422
1471
|
];
|
|
1423
|
-
},
|
|
1424
|
-
if (!
|
|
1425
|
-
let { w: r, h: i } =
|
|
1472
|
+
}, Pa = (e) => e === "nw" || e === "se" ? "nwse-resize" : e === "ne" || e === "sw" ? "nesw-resize" : e === "n" || e === "s" ? "ns-resize" : "ew-resize", Fa = (e, t, n) => {
|
|
1473
|
+
if (!v.editable || v.config.nodeResizable === !1 || !t) return;
|
|
1474
|
+
let { w: r, h: i } = P(t);
|
|
1426
1475
|
Y.value = {
|
|
1427
1476
|
id: t.id,
|
|
1428
1477
|
side: n,
|
|
@@ -1430,20 +1479,20 @@ var y = {
|
|
|
1430
1479
|
anchorY: n.includes("s") ? t.y - i / 2 : n.includes("n") ? t.y + i / 2 : null,
|
|
1431
1480
|
startW: r,
|
|
1432
1481
|
startH: i
|
|
1433
|
-
},
|
|
1434
|
-
},
|
|
1482
|
+
}, y("node-resize-start", t);
|
|
1483
|
+
}, Ia = (e) => {
|
|
1435
1484
|
let t = Y.value;
|
|
1436
1485
|
if (!t) return;
|
|
1437
|
-
let n =
|
|
1486
|
+
let n = A(t.id);
|
|
1438
1487
|
if (!n) return;
|
|
1439
1488
|
let r = Z(e), i = t.startW, a = t.startH, o = n.x, s = n.y;
|
|
1440
1489
|
if (t.anchorX !== null) {
|
|
1441
1490
|
let e = t.side.includes("e");
|
|
1442
|
-
i =
|
|
1491
|
+
i = Ma(e ? r.x - t.anchorX : t.anchorX - r.x, an, on), o = e ? t.anchorX + i / 2 : t.anchorX - i / 2;
|
|
1443
1492
|
}
|
|
1444
1493
|
if (t.anchorY !== null) {
|
|
1445
1494
|
let e = t.side.includes("s");
|
|
1446
|
-
a =
|
|
1495
|
+
a = Ma(e ? r.y - t.anchorY : t.anchorY - r.y, sn, cn), s = e ? t.anchorY + a / 2 : t.anchorY - a / 2;
|
|
1447
1496
|
}
|
|
1448
1497
|
x.value = x.value.map((e) => e.id === t.id ? {
|
|
1449
1498
|
...e,
|
|
@@ -1452,15 +1501,15 @@ var y = {
|
|
|
1452
1501
|
width: i,
|
|
1453
1502
|
height: a
|
|
1454
1503
|
} : e), S();
|
|
1455
|
-
},
|
|
1504
|
+
}, La = () => {
|
|
1456
1505
|
let e = Y.value;
|
|
1457
|
-
Y.value = null, e && (si(),
|
|
1458
|
-
},
|
|
1459
|
-
if (!
|
|
1460
|
-
let e =
|
|
1461
|
-
return e.length === 1 &&
|
|
1462
|
-
}), X = f(null),
|
|
1463
|
-
let t =
|
|
1506
|
+
Y.value = null, e && (si(), y("node-resize-end", A(e.id) || null));
|
|
1507
|
+
}, Ra = t(() => v.editable && v.config.nodeResizable !== !1), za = t(() => {
|
|
1508
|
+
if (!Ra.value) return null;
|
|
1509
|
+
let e = L.value;
|
|
1510
|
+
return e.length === 1 && A(e[0]) || null;
|
|
1511
|
+
}), X = f(null), Ba = (e) => {
|
|
1512
|
+
let t = F(e);
|
|
1464
1513
|
return [
|
|
1465
1514
|
{
|
|
1466
1515
|
side: "top",
|
|
@@ -1483,7 +1532,7 @@ var y = {
|
|
|
1483
1532
|
y: 0
|
|
1484
1533
|
}
|
|
1485
1534
|
];
|
|
1486
|
-
},
|
|
1535
|
+
}, Va = (e, t) => {
|
|
1487
1536
|
let n = w.value;
|
|
1488
1537
|
if (!n) return null;
|
|
1489
1538
|
let r = e, i = t;
|
|
@@ -1497,7 +1546,7 @@ var y = {
|
|
|
1497
1546
|
x: s.x,
|
|
1498
1547
|
y: s.y
|
|
1499
1548
|
};
|
|
1500
|
-
},
|
|
1549
|
+
}, Ha = (e, t) => {
|
|
1501
1550
|
let n = w.value;
|
|
1502
1551
|
if (!n) return null;
|
|
1503
1552
|
let r = n.createSVGPoint();
|
|
@@ -1509,11 +1558,11 @@ var y = {
|
|
|
1509
1558
|
x: a.x,
|
|
1510
1559
|
y: a.y
|
|
1511
1560
|
};
|
|
1512
|
-
}, Z = (e) =>
|
|
1561
|
+
}, Z = (e) => Va(e) ?? {
|
|
1513
1562
|
x: 0,
|
|
1514
1563
|
y: 0
|
|
1515
|
-
},
|
|
1516
|
-
let r =
|
|
1564
|
+
}, Ua = (e, t, n) => {
|
|
1565
|
+
let r = A(t);
|
|
1517
1566
|
if (!r || !w.value) return;
|
|
1518
1567
|
let i = Z(e);
|
|
1519
1568
|
X.value = {
|
|
@@ -1528,53 +1577,53 @@ var y = {
|
|
|
1528
1577
|
try {
|
|
1529
1578
|
e.target.setPointerCapture?.(e.pointerId);
|
|
1530
1579
|
} catch {}
|
|
1531
|
-
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1534
|
-
let e =
|
|
1535
|
-
|
|
1536
|
-
},
|
|
1537
|
-
X.value && (
|
|
1580
|
+
Xa();
|
|
1581
|
+
}, Wa = 0, Ga = null, Ka = () => {
|
|
1582
|
+
Wa = 0;
|
|
1583
|
+
let e = Ga;
|
|
1584
|
+
Ga = null, e && X.value && $a(e);
|
|
1585
|
+
}, qa = (e) => {
|
|
1586
|
+
X.value && (Ga = {
|
|
1538
1587
|
clientX: e.clientX,
|
|
1539
1588
|
clientY: e.clientY
|
|
1540
|
-
},
|
|
1541
|
-
},
|
|
1542
|
-
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1545
|
-
},
|
|
1546
|
-
|
|
1547
|
-
},
|
|
1589
|
+
}, Wa ||= requestAnimationFrame(Ka));
|
|
1590
|
+
}, Ja = () => {
|
|
1591
|
+
Wa && (cancelAnimationFrame(Wa), Ka()), X.value && eo();
|
|
1592
|
+
}, Ya = !1, Xa = () => {
|
|
1593
|
+
Ya || (Ya = !0, window.addEventListener("mousemove", qa, !0), window.addEventListener("mouseup", Ja, !0));
|
|
1594
|
+
}, Za = () => {
|
|
1595
|
+
Ya && (Ya = !1, window.removeEventListener("mousemove", qa, !0), window.removeEventListener("mouseup", Ja, !0));
|
|
1596
|
+
}, Qa = (e, t, n) => {
|
|
1548
1597
|
let r = x.value;
|
|
1549
1598
|
for (let i = r.length - 1; i >= 0; i--) {
|
|
1550
1599
|
let a = r[i];
|
|
1551
1600
|
if (a.id === n) continue;
|
|
1552
|
-
let o =
|
|
1601
|
+
let o = F(a);
|
|
1553
1602
|
if (e >= a.x + o.x - 2 && e <= a.x + o.x + o.width + 2 && t >= a.y + o.y - 2 && t <= a.y + o.y + o.height + 2) return a;
|
|
1554
1603
|
}
|
|
1555
1604
|
return null;
|
|
1556
|
-
},
|
|
1605
|
+
}, $a = (e) => {
|
|
1557
1606
|
let t = X.value;
|
|
1558
1607
|
if (!t) return;
|
|
1559
1608
|
let n = Z(e);
|
|
1560
1609
|
t.px = n.x, t.py = n.y;
|
|
1561
|
-
let r =
|
|
1610
|
+
let r = Qa(n.x, n.y, t.fromId);
|
|
1562
1611
|
t.overId = r ? r.id : null;
|
|
1563
|
-
},
|
|
1564
|
-
|
|
1612
|
+
}, eo = () => {
|
|
1613
|
+
Za();
|
|
1565
1614
|
let e = X.value;
|
|
1566
1615
|
if (X.value = null, !e || !e.overId || e.overId === e.fromId) return;
|
|
1567
1616
|
let t = {
|
|
1568
|
-
id: `${
|
|
1617
|
+
id: `${ae()}`,
|
|
1569
1618
|
from: e.fromId,
|
|
1570
1619
|
to: e.overId,
|
|
1571
1620
|
speed: 1,
|
|
1572
1621
|
fromAnchor: "edge",
|
|
1573
1622
|
toAnchor: "edge"
|
|
1574
1623
|
};
|
|
1575
|
-
T.value.push(t),
|
|
1576
|
-
},
|
|
1577
|
-
let r = e.x, i = e.y, a = t.x - r, o = t.y - i, { w: s, h: c } =
|
|
1624
|
+
T.value.push(t), y("edge-create", t);
|
|
1625
|
+
}, to = (e, t, n) => {
|
|
1626
|
+
let r = e.x, i = e.y, a = t.x - r, o = t.y - i, { w: s, h: c } = P(e);
|
|
1578
1627
|
if (!n || n === "center" || a === 0 && o === 0) return {
|
|
1579
1628
|
x: r,
|
|
1580
1629
|
y: i
|
|
@@ -1584,23 +1633,23 @@ var y = {
|
|
|
1584
1633
|
x: r + a * p,
|
|
1585
1634
|
y: i + o * p
|
|
1586
1635
|
};
|
|
1587
|
-
},
|
|
1636
|
+
}, no = t(() => {
|
|
1588
1637
|
let e = /* @__PURE__ */ new Map();
|
|
1589
1638
|
O.value.forEach((t) => {
|
|
1590
|
-
let n =
|
|
1639
|
+
let n = Yn.value[t.id];
|
|
1591
1640
|
n && !n.hidden && (e.has(n.key) || e.set(n.key, []), e.get(n.key).push(t));
|
|
1592
1641
|
});
|
|
1593
1642
|
let t = {};
|
|
1594
1643
|
return e.forEach((e, n) => {
|
|
1595
|
-
let [r, i] = n.split("__"), a =
|
|
1644
|
+
let [r, i] = n.split("__"), a = A(r), o = A(i);
|
|
1596
1645
|
if (!a || !o) return;
|
|
1597
|
-
let s = o.x - a.x, c = o.y - a.y, l = Math.sqrt(s * s + c * c) || 1, u = s / l, d = c / l, f = -d, p = u, ee = e.length, m =
|
|
1646
|
+
let s = o.x - a.x, c = o.y - a.y, l = Math.sqrt(s * s + c * c) || 1, u = s / l, d = c / l, f = -d, p = u, ee = e.length, m = Qt;
|
|
1598
1647
|
if (ee > 1) {
|
|
1599
|
-
let e = (ee - 1) / 2 *
|
|
1600
|
-
let { w: t, h: n } =
|
|
1648
|
+
let e = (ee - 1) / 2 * Qt, t = (e) => {
|
|
1649
|
+
let { w: t, h: n } = P(e);
|
|
1601
1650
|
return Math.max(4, (Math.abs(f) * t + Math.abs(p) * n) / 2 - 6);
|
|
1602
1651
|
}, n = Math.min(1, t(a) / e, t(o) / e);
|
|
1603
|
-
m =
|
|
1652
|
+
m = Qt * Math.max(.35, n);
|
|
1604
1653
|
}
|
|
1605
1654
|
let te = {};
|
|
1606
1655
|
e.forEach((e, t) => {
|
|
@@ -1616,12 +1665,12 @@ var y = {
|
|
|
1616
1665
|
bulge: Math.min(l * .15, 50)
|
|
1617
1666
|
};
|
|
1618
1667
|
}), t;
|
|
1619
|
-
}),
|
|
1620
|
-
let t =
|
|
1668
|
+
}), ro = (e) => {
|
|
1669
|
+
let t = Yn.value[e.id], n = t && no.value[t.key];
|
|
1621
1670
|
if (!n) return null;
|
|
1622
|
-
let r =
|
|
1671
|
+
let r = A(e.from), i = A(e.to);
|
|
1623
1672
|
if (!r || !i) return null;
|
|
1624
|
-
let a = n.slots[e.id] || 0, o = a * n.gap, s =
|
|
1673
|
+
let a = n.slots[e.id] || 0, o = a * n.gap, s = to(r, i, e.fromAnchor), c = to(i, r, e.toAnchor);
|
|
1625
1674
|
return {
|
|
1626
1675
|
frame: n,
|
|
1627
1676
|
slot: a,
|
|
@@ -1634,8 +1683,8 @@ var y = {
|
|
|
1634
1683
|
y: c.y + n.ny * o
|
|
1635
1684
|
}
|
|
1636
1685
|
};
|
|
1637
|
-
},
|
|
1638
|
-
let t =
|
|
1686
|
+
}, io = (e) => {
|
|
1687
|
+
let t = ro(e);
|
|
1639
1688
|
if (!t) return "";
|
|
1640
1689
|
let { from: n, to: r, frame: i, slot: a } = t, o = a * i.gap;
|
|
1641
1690
|
if (xn.value === "straight") return `M ${n.x} ${n.y} L ${r.x} ${r.y}`;
|
|
@@ -1649,8 +1698,8 @@ var y = {
|
|
|
1649
1698
|
}
|
|
1650
1699
|
let s = (n.x + r.x) / 2 + i.nx * i.bulge, c = (n.y + r.y) / 2 + i.ny * i.bulge;
|
|
1651
1700
|
return `M ${n.x} ${n.y} Q ${s} ${c} ${r.x} ${r.y}`;
|
|
1652
|
-
},
|
|
1653
|
-
let n =
|
|
1701
|
+
}, ao = (e, t) => {
|
|
1702
|
+
let n = ro(e);
|
|
1654
1703
|
if (!n) return {
|
|
1655
1704
|
x: 0,
|
|
1656
1705
|
y: 0
|
|
@@ -1691,29 +1740,29 @@ var y = {
|
|
|
1691
1740
|
x: (1 - t) * (1 - t) * r.x + 2 * (1 - t) * t * c + t * t * i.x,
|
|
1692
1741
|
y: (1 - t) * (1 - t) * r.y + 2 * (1 - t) * t * l + t * t * i.y
|
|
1693
1742
|
};
|
|
1694
|
-
},
|
|
1743
|
+
}, oo = t(() => X.value ? A(X.value.fromId) : null), so = t(() => X.value && X.value.overId ? A(X.value.overId) : null), co = t(() => oo.value ? j(oo.value) : "#00f0ff"), lo = t(() => {
|
|
1695
1744
|
let e = X.value;
|
|
1696
1745
|
if (!e) return {
|
|
1697
1746
|
x: 0,
|
|
1698
1747
|
y: 0
|
|
1699
1748
|
};
|
|
1700
|
-
let t =
|
|
1701
|
-
return t &&
|
|
1749
|
+
let t = so.value;
|
|
1750
|
+
return t && oo.value ? to(t, oo.value, "edge") : {
|
|
1702
1751
|
x: e.px,
|
|
1703
1752
|
y: e.py
|
|
1704
1753
|
};
|
|
1705
|
-
}),
|
|
1706
|
-
let e =
|
|
1754
|
+
}), uo = t(() => {
|
|
1755
|
+
let e = so.value;
|
|
1707
1756
|
if (!e) return null;
|
|
1708
|
-
let t =
|
|
1757
|
+
let t = F(e);
|
|
1709
1758
|
return {
|
|
1710
1759
|
x: e.x + t.x - 4,
|
|
1711
1760
|
y: e.y + t.y - 4,
|
|
1712
1761
|
w: t.width + 8,
|
|
1713
1762
|
h: t.height + 8
|
|
1714
1763
|
};
|
|
1715
|
-
}),
|
|
1716
|
-
let t = e.nodeIds.map((e) =>
|
|
1764
|
+
}), fo = (e) => {
|
|
1765
|
+
let t = e.nodeIds.map((e) => A(e)).filter(Boolean);
|
|
1717
1766
|
if (t.length === 0) return null;
|
|
1718
1767
|
let n = e.padding, r = Math.min(...t.map((e) => e.x)) - n, i = Math.min(...t.map((e) => e.y)) - n, a = Math.max(...t.map((e) => e.x)) + n, o = Math.max(...t.map((e) => e.y)) + n;
|
|
1719
1768
|
return {
|
|
@@ -1722,62 +1771,62 @@ var y = {
|
|
|
1722
1771
|
width: a - r,
|
|
1723
1772
|
height: o - i
|
|
1724
1773
|
};
|
|
1725
|
-
},
|
|
1774
|
+
}, po = t(() => v.groups.map((e) => ({
|
|
1726
1775
|
...e,
|
|
1727
|
-
rect:
|
|
1728
|
-
})).filter((e) => e.rect)), Q = (e) => Gr(e) ? ii.value : e.color ? e.color :
|
|
1729
|
-
let t =
|
|
1776
|
+
rect: fo(e)
|
|
1777
|
+
})).filter((e) => e.rect)), Q = (e) => Gr(e) ? ii.value : e.color ? e.color : na.value ? na.value : e.centerText && e.centerText.color || "#00f0ff", mo = (e) => {
|
|
1778
|
+
let t = Yn.value[e.id];
|
|
1730
1779
|
return !!t && !t.hidden;
|
|
1731
|
-
},
|
|
1780
|
+
}, ho = t(() => [...new Set(O.value.map(Q))].map((e) => ({
|
|
1732
1781
|
key: String(e).replace("#", ""),
|
|
1733
1782
|
color: e
|
|
1734
|
-
}))),
|
|
1783
|
+
}))), go = (e) => {
|
|
1735
1784
|
let t = e.endMarker;
|
|
1736
1785
|
if (!t || t === "none") return "";
|
|
1737
1786
|
let n = Q(e) || "#00f0ff", r = String(n).replace("#", "");
|
|
1738
1787
|
return `url(#${t === "dot" ? "edge-dot" : "edge-arrow"}-${r})`;
|
|
1739
|
-
},
|
|
1788
|
+
}, _o = /* @__PURE__ */ new Map(), vo = {
|
|
1740
1789
|
nodes: null,
|
|
1741
1790
|
edges: null,
|
|
1742
1791
|
mode: null,
|
|
1743
1792
|
epoch: -1
|
|
1744
|
-
},
|
|
1745
|
-
let e =
|
|
1746
|
-
(e.nodes !== x.value || e.edges !== O.value || e.mode !== xn.value || e.epoch !==
|
|
1793
|
+
}, yo = () => {
|
|
1794
|
+
let e = vo;
|
|
1795
|
+
(e.nodes !== x.value || e.edges !== O.value || e.mode !== xn.value || e.epoch !== dn) && (vo = {
|
|
1747
1796
|
nodes: x.value,
|
|
1748
1797
|
edges: O.value,
|
|
1749
1798
|
mode: xn.value,
|
|
1750
|
-
epoch:
|
|
1751
|
-
},
|
|
1799
|
+
epoch: dn
|
|
1800
|
+
}, _o = /* @__PURE__ */ new Map());
|
|
1752
1801
|
}, $ = (e) => {
|
|
1753
|
-
|
|
1754
|
-
let t =
|
|
1755
|
-
return t === void 0 && (t =
|
|
1756
|
-
},
|
|
1757
|
-
let e =
|
|
1802
|
+
yo();
|
|
1803
|
+
let t = _o.get(e.id);
|
|
1804
|
+
return t === void 0 && (t = io(e), _o.set(e.id, t)), t;
|
|
1805
|
+
}, bo = (e, t = 1) => `${2 / e.speed * t}s`, xo = (e) => `${3 / e.speed}s`, So = t(() => v.config.edgeDashFlow === !0), Co = t(() => {
|
|
1806
|
+
let e = v.config.edgeDashPattern, t = null;
|
|
1758
1807
|
return typeof e == "string" && e.trim() ? t = e.trim().split(/\s+/).map(Number).filter((e) => Number.isFinite(e) && e > 0) : Array.isArray(e) && (t = e.map(Number).filter((e) => Number.isFinite(e) && e > 0)), t && t.length ? t : [10, 8];
|
|
1759
|
-
}),
|
|
1760
|
-
let t = Number(e.dashFlowWidth ??
|
|
1808
|
+
}), wo = t(() => Co.value.join(" ")), To = t(() => Co.value.reduce((e, t) => e + t, 0)), Eo = (e) => {
|
|
1809
|
+
let t = Number(e.dashFlowWidth ?? v.config.edgeDashFlowWidth ?? v.config.edgeWidth);
|
|
1761
1810
|
return Number.isFinite(t) && t > 0 ? t : 2;
|
|
1762
|
-
},
|
|
1811
|
+
}, Do = (e) => {
|
|
1763
1812
|
let t = Number(e.speed);
|
|
1764
1813
|
return `${1.2 / (Number.isFinite(t) && t > 0 ? t : 1)}s`;
|
|
1765
|
-
},
|
|
1766
|
-
let t =
|
|
1814
|
+
}, Oo = (e) => e.animated === !1 ? !1 : e.dashFlow === !0 || e.dashFlow !== !1 && So.value, ko = (e) => {
|
|
1815
|
+
let t = ha(e);
|
|
1767
1816
|
return t === "flow" || t === "all";
|
|
1768
|
-
},
|
|
1769
|
-
let t =
|
|
1817
|
+
}, Ao = (e) => {
|
|
1818
|
+
let t = ha(e);
|
|
1770
1819
|
return t === "particle" || t === "all";
|
|
1771
|
-
},
|
|
1820
|
+
}, jo = (e) => pn(e).text, Mo = (e) => !!e && String(pn(e).text ?? "").trim() !== "", No = (e, t) => {
|
|
1772
1821
|
if (!e) return null;
|
|
1773
|
-
let n =
|
|
1822
|
+
let n = pn(e), r = Number(t.fontSize) || Number(n.fontSize) || 8, i = String(n.text ?? ""), a = 0;
|
|
1774
1823
|
for (let e of i) a += e.charCodeAt(0) > 11904 ? 1 : .62;
|
|
1775
1824
|
return {
|
|
1776
1825
|
w: Math.max(14, a * r + 8),
|
|
1777
1826
|
h: Math.max(12, r + 6)
|
|
1778
1827
|
};
|
|
1779
|
-
},
|
|
1780
|
-
let n = t && typeof t == "object" ? t : {}, r = n.showBg === void 0 ?
|
|
1828
|
+
}, Po = (e, t) => {
|
|
1829
|
+
let n = t && typeof t == "object" ? t : {}, r = n.showBg === void 0 ? $i.value : !!n.showBg, i = n.bgColor || ea.value, a = ta.value;
|
|
1781
1830
|
if (n.bgOpacity !== void 0 && n.bgOpacity !== null) {
|
|
1782
1831
|
let e = Number(n.bgOpacity);
|
|
1783
1832
|
Number.isFinite(e) && (a = Math.min(1, Math.max(0, e)));
|
|
@@ -1795,40 +1844,40 @@ var y = {
|
|
|
1795
1844
|
borderColor: s,
|
|
1796
1845
|
borderOpacity: c
|
|
1797
1846
|
};
|
|
1798
|
-
},
|
|
1799
|
-
let n =
|
|
1847
|
+
}, Fo = (e, t) => {
|
|
1848
|
+
let n = ao(e, Math.max(0, t - .005)), r = ao(e, Math.min(1, t + .005));
|
|
1800
1849
|
return Math.atan2(r.y - n.y, r.x - n.x) * 180 / Math.PI;
|
|
1801
|
-
},
|
|
1850
|
+
}, Io = (e) => {
|
|
1802
1851
|
let t = e % 180;
|
|
1803
1852
|
return t > 90 && (t -= 180), t < -90 && (t += 180), t;
|
|
1804
|
-
},
|
|
1853
|
+
}, Lo = [
|
|
1805
1854
|
"above",
|
|
1806
1855
|
"center",
|
|
1807
1856
|
"below"
|
|
1808
|
-
],
|
|
1857
|
+
], Ro = (e, t) => {
|
|
1809
1858
|
let n = e && typeof e == "object" ? e.position : void 0;
|
|
1810
|
-
if (
|
|
1811
|
-
let r =
|
|
1812
|
-
if (
|
|
1813
|
-
let i =
|
|
1814
|
-
return
|
|
1815
|
-
},
|
|
1816
|
-
let e = Number(
|
|
1859
|
+
if (Lo.includes(n)) return n;
|
|
1860
|
+
let r = v.config?.[`edge${t}TextPosition`];
|
|
1861
|
+
if (Lo.includes(r)) return r;
|
|
1862
|
+
let i = v.config?.edgeTextPosition;
|
|
1863
|
+
return Lo.includes(i) ? i : "center";
|
|
1864
|
+
}, zo = t(() => {
|
|
1865
|
+
let e = Number(v.config?.edgeTextGap);
|
|
1817
1866
|
return Number.isFinite(e) && e >= 0 ? e : 2;
|
|
1818
|
-
}),
|
|
1819
|
-
let r =
|
|
1867
|
+
}), Bo = (e, t, n) => {
|
|
1868
|
+
let r = Ro(e, t);
|
|
1820
1869
|
if (r === "center") return 0;
|
|
1821
|
-
let i = (n && n.h ? n.h : 14) / 2 +
|
|
1822
|
-
return
|
|
1823
|
-
},
|
|
1824
|
-
let i = (
|
|
1870
|
+
let i = (n && n.h ? n.h : 14) / 2 + zo.value;
|
|
1871
|
+
return N(r === "above" ? -i : i);
|
|
1872
|
+
}, Vo = (e, t, n, r = 0) => {
|
|
1873
|
+
let i = (pn(e).rotation || 0) + (n || 0), a = `translate(${t.x}, ${t.y}) rotate(${i})`;
|
|
1825
1874
|
return r ? `${a} translate(0, ${r})` : a;
|
|
1826
|
-
},
|
|
1875
|
+
}, Ho = t(() => v.config?.edgeCenterTextFollowLine !== !1), Uo = (e, t) => Ho.value ? Math.abs(e) <= ln || v.config?.edgeCenterTextFollowLine ? e : t > 0 ? Math.abs(e) : -Math.abs(e) : 0, Wo = (e, t = 120) => {
|
|
1827
1876
|
let n = [];
|
|
1828
|
-
for (let r = 0; r <= t; r++) n.push(
|
|
1877
|
+
for (let r = 0; r <= t; r++) n.push(ao(e, r / t));
|
|
1829
1878
|
return n;
|
|
1830
|
-
},
|
|
1831
|
-
let r =
|
|
1879
|
+
}, Go = (e, t, n = !1) => {
|
|
1880
|
+
let r = Wo(e), i = [], a = 0;
|
|
1832
1881
|
for (let e = 1; e < r.length; e++) {
|
|
1833
1882
|
let t = Math.hypot(r[e].x - r[e - 1].x, r[e].y - r[e - 1].y);
|
|
1834
1883
|
i.push(t), a += t;
|
|
@@ -1842,43 +1891,43 @@ var y = {
|
|
|
1842
1891
|
c += i[e];
|
|
1843
1892
|
}
|
|
1844
1893
|
return +!!n;
|
|
1845
|
-
},
|
|
1894
|
+
}, Ko = t(() => {
|
|
1846
1895
|
let e = [];
|
|
1847
1896
|
for (let t of W.value) {
|
|
1848
|
-
let n =
|
|
1897
|
+
let n = Yn.value[t.id];
|
|
1849
1898
|
if (!n) continue;
|
|
1850
1899
|
let r = n.merged && n.representative, i = !n.merged && (t.fromText || t.centerText || t.toText);
|
|
1851
1900
|
if (!r && !i) continue;
|
|
1852
|
-
let a =
|
|
1901
|
+
let a = A(t.from), o = A(t.to);
|
|
1853
1902
|
if (!a || !o) continue;
|
|
1854
|
-
let s =
|
|
1903
|
+
let s = Go(t, un), c = Go(t, un, !0), l = No(t.fromText, t), u = No(t.centerText, t), d = No(t.toText, t);
|
|
1855
1904
|
e.push({
|
|
1856
1905
|
id: t.id,
|
|
1857
1906
|
edge: t,
|
|
1858
1907
|
info: n,
|
|
1859
|
-
color: a &&
|
|
1860
|
-
start:
|
|
1861
|
-
center:
|
|
1862
|
-
end:
|
|
1863
|
-
startAngle:
|
|
1864
|
-
centerRaw:
|
|
1865
|
-
centerAngle:
|
|
1866
|
-
endAngle:
|
|
1908
|
+
color: a && oe[a.nodeType] || "#00f0ff",
|
|
1909
|
+
start: ao(t, s),
|
|
1910
|
+
center: ao(t, .5),
|
|
1911
|
+
end: ao(t, c),
|
|
1912
|
+
startAngle: Io(Fo(t, s)),
|
|
1913
|
+
centerRaw: Fo(t, .5),
|
|
1914
|
+
centerAngle: Io(Fo(t, .5)),
|
|
1915
|
+
endAngle: Io(Fo(t, c)),
|
|
1867
1916
|
fromBox: l,
|
|
1868
1917
|
centerBox: u,
|
|
1869
1918
|
toBox: d,
|
|
1870
|
-
fromShift:
|
|
1871
|
-
centerShift:
|
|
1872
|
-
toShift:
|
|
1873
|
-
mergedShift:
|
|
1874
|
-
fromPlate:
|
|
1875
|
-
centerPlate:
|
|
1876
|
-
toPlate:
|
|
1919
|
+
fromShift: Bo(t.fromText, "From", l),
|
|
1920
|
+
centerShift: Bo(t.centerText, "Center", u),
|
|
1921
|
+
toShift: Bo(t.toText, "To", d),
|
|
1922
|
+
mergedShift: Bo(null, "Center", { h: Number(t.fontSize) || 8 }),
|
|
1923
|
+
fromPlate: Po(t, t.fromText),
|
|
1924
|
+
centerPlate: Po(t, t.centerText),
|
|
1925
|
+
toPlate: Po(t, t.toText)
|
|
1877
1926
|
});
|
|
1878
1927
|
}
|
|
1879
1928
|
return e;
|
|
1880
1929
|
});
|
|
1881
|
-
return
|
|
1930
|
+
return re({
|
|
1882
1931
|
resetDataBaseline: Fn,
|
|
1883
1932
|
getData: In,
|
|
1884
1933
|
setData: Jn,
|
|
@@ -1887,40 +1936,42 @@ var y = {
|
|
|
1887
1936
|
addEdges: Gn,
|
|
1888
1937
|
updateNodes: Kn,
|
|
1889
1938
|
updateEdges: qn,
|
|
1890
|
-
clientToSvg:
|
|
1891
|
-
svgToClient:
|
|
1939
|
+
clientToSvg: Va,
|
|
1940
|
+
svgToClient: Ha,
|
|
1892
1941
|
moveLayerUp: $r,
|
|
1893
1942
|
moveLayerDown: ei,
|
|
1894
1943
|
moveToFront: ti,
|
|
1895
1944
|
moveToBack: ni,
|
|
1896
|
-
downloadSVG: ri
|
|
1945
|
+
downloadSVG: ri,
|
|
1946
|
+
setZoom: hi,
|
|
1947
|
+
resetZoom: _i
|
|
1897
1948
|
}), (t, o) => (d(), r("svg", {
|
|
1898
1949
|
ref_key: "svgRef",
|
|
1899
1950
|
ref: w,
|
|
1900
1951
|
class: "topology-svg",
|
|
1901
|
-
style: c(
|
|
1902
|
-
viewBox: `${
|
|
1903
|
-
onMousedown:
|
|
1904
|
-
onMousemove:
|
|
1905
|
-
onMouseup:
|
|
1906
|
-
onMouseleave:
|
|
1952
|
+
style: c(Ki.value),
|
|
1953
|
+
viewBox: `${vi.value} ${yi.value} ${H.value} ${U.value}`,
|
|
1954
|
+
onMousedown: Ii,
|
|
1955
|
+
onMousemove: Ca,
|
|
1956
|
+
onMouseup: Ta,
|
|
1957
|
+
onMouseleave: Ta,
|
|
1907
1958
|
onClick: ui,
|
|
1908
|
-
onWheel:
|
|
1959
|
+
onWheel: g(Di, ["prevent"])
|
|
1909
1960
|
}, [
|
|
1910
1961
|
i("defs", null, [
|
|
1911
1962
|
o[3] ||= a("<linearGradient id=\"glassHighlight\" x1=\"0%\" y1=\"0%\" x2=\"60%\" y2=\"100%\"><stop offset=\"0%\" stop-color=\"rgba(255,255,255,0.9)\"></stop><stop offset=\"30%\" stop-color=\"rgba(255,255,255,0.25)\"></stop><stop offset=\"100%\" stop-color=\"rgba(255,255,255,0)\"></stop></linearGradient><filter id=\"glow-core\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"3\" result=\"blur\"></feGaussianBlur><feMerge><feMergeNode in=\"blur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter><filter id=\"glow-strong\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"6\" result=\"blur\"></feGaussianBlur><feMerge><feMergeNode in=\"blur\"></feMergeNode><feMergeNode in=\"blur\"></feMergeNode><feMergeNode in=\"SourceGraphic\"></feMergeNode></feMerge></filter>", 3),
|
|
1912
1963
|
i("radialGradient", {
|
|
1913
1964
|
id: "bg-grid",
|
|
1914
|
-
cx:
|
|
1915
|
-
cy:
|
|
1916
|
-
r:
|
|
1917
|
-
}, [(d(!0), r(e, null, p(
|
|
1965
|
+
cx: Zi.value.cx,
|
|
1966
|
+
cy: Zi.value.cy,
|
|
1967
|
+
r: Zi.value.r
|
|
1968
|
+
}, [(d(!0), r(e, null, p(Zi.value.stops, (e, t) => (d(), r("stop", {
|
|
1918
1969
|
key: `bg-stop-${t}`,
|
|
1919
1970
|
offset: e.offset,
|
|
1920
1971
|
"stop-color": e.color,
|
|
1921
1972
|
"stop-opacity": e.opacity
|
|
1922
|
-
}, null, 8,
|
|
1923
|
-
(d(!0), r(e, null, p(te(
|
|
1973
|
+
}, null, 8, le))), 128))], 8, ce),
|
|
1974
|
+
(d(!0), r(e, null, p(te(b), (e, t) => (d(), r("radialGradient", {
|
|
1924
1975
|
key: `breath-${t}`,
|
|
1925
1976
|
id: `breath-grad-${t}`
|
|
1926
1977
|
}, [
|
|
@@ -1928,18 +1979,18 @@ var y = {
|
|
|
1928
1979
|
offset: "0%",
|
|
1929
1980
|
"stop-color": e.color,
|
|
1930
1981
|
"stop-opacity": "1"
|
|
1931
|
-
}, null, 8,
|
|
1982
|
+
}, null, 8, de),
|
|
1932
1983
|
i("stop", {
|
|
1933
1984
|
offset: "40%",
|
|
1934
1985
|
"stop-color": e.color,
|
|
1935
1986
|
"stop-opacity": "0.5"
|
|
1936
|
-
}, null, 8,
|
|
1987
|
+
}, null, 8, fe),
|
|
1937
1988
|
i("stop", {
|
|
1938
1989
|
offset: "100%",
|
|
1939
1990
|
"stop-color": e.color,
|
|
1940
1991
|
"stop-opacity": "0"
|
|
1941
|
-
}, null, 8,
|
|
1942
|
-
], 8,
|
|
1992
|
+
}, null, 8, pe)
|
|
1993
|
+
], 8, ue))), 128)),
|
|
1943
1994
|
(d(!0), r(e, null, p(jr.value, (t) => (d(), r("radialGradient", {
|
|
1944
1995
|
key: t.id,
|
|
1945
1996
|
id: t.id
|
|
@@ -1948,9 +1999,9 @@ var y = {
|
|
|
1948
1999
|
offset: e.offset,
|
|
1949
2000
|
"stop-color": t.color,
|
|
1950
2001
|
"stop-opacity": e.opacity
|
|
1951
|
-
}, null, 8,
|
|
2002
|
+
}, null, 8, he))), 128))], 8, me))), 128)),
|
|
1952
2003
|
o[4] ||= a("<linearGradient id=\"flow-grad-1\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0%\" stop-color=\"#00f0ff\" stop-opacity=\"0\"></stop><stop offset=\"40%\" stop-color=\"#00f0ff\" stop-opacity=\"1\"></stop><stop offset=\"60%\" stop-color=\"#00f0ff\" stop-opacity=\"1\"></stop><stop offset=\"100%\" stop-color=\"#00f0ff\" stop-opacity=\"0\"></stop></linearGradient>", 1),
|
|
1953
|
-
(d(!0), r(e, null, p(
|
|
2004
|
+
(d(!0), r(e, null, p(ho.value, (e) => (d(), r("marker", {
|
|
1954
2005
|
key: `m-arrow-${e.key}`,
|
|
1955
2006
|
id: `edge-arrow-${e.key}`,
|
|
1956
2007
|
viewBox: "0 0 10 10",
|
|
@@ -1963,8 +2014,8 @@ var y = {
|
|
|
1963
2014
|
}, [i("path", {
|
|
1964
2015
|
d: "M1,2.5 L9,5 L1,7.5 Z",
|
|
1965
2016
|
fill: e.color
|
|
1966
|
-
}, null, 8,
|
|
1967
|
-
(d(!0), r(e, null, p(
|
|
2017
|
+
}, null, 8, _e)], 8, ge))), 128)),
|
|
2018
|
+
(d(!0), r(e, null, p(ho.value, (e) => (d(), r("marker", {
|
|
1968
2019
|
key: `m-dot-${e.key}`,
|
|
1969
2020
|
id: `edge-dot-${e.key}`,
|
|
1970
2021
|
viewBox: "0 0 10 10",
|
|
@@ -1979,34 +2030,34 @@ var y = {
|
|
|
1979
2030
|
cy: "5",
|
|
1980
2031
|
r: "4",
|
|
1981
2032
|
fill: e.color
|
|
1982
|
-
}, null, 8,
|
|
2033
|
+
}, null, 8, ye)], 8, ve))), 128))
|
|
1983
2034
|
]),
|
|
1984
2035
|
i("rect", {
|
|
1985
2036
|
width: H.value,
|
|
1986
2037
|
height: U.value,
|
|
1987
|
-
x:
|
|
1988
|
-
y:
|
|
2038
|
+
x: vi.value,
|
|
2039
|
+
y: yi.value,
|
|
1989
2040
|
fill: "url(#bg-grid)"
|
|
1990
|
-
}, null, 8,
|
|
1991
|
-
|
|
2041
|
+
}, null, 8, be),
|
|
2042
|
+
qi.value ? (d(), r(e, { key: 0 }, [i("pattern", {
|
|
1992
2043
|
id: "grid",
|
|
1993
|
-
width:
|
|
1994
|
-
height:
|
|
2044
|
+
width: Yi.value,
|
|
2045
|
+
height: Yi.value,
|
|
1995
2046
|
patternUnits: "userSpaceOnUse"
|
|
1996
2047
|
}, [i("path", {
|
|
1997
|
-
d: `M ${
|
|
2048
|
+
d: `M ${Yi.value} 0 L 0 0 0 ${Yi.value}`,
|
|
1998
2049
|
fill: "none",
|
|
1999
|
-
stroke:
|
|
2050
|
+
stroke: Ji.value,
|
|
2000
2051
|
"stroke-width": "0.5"
|
|
2001
|
-
}, null, 8,
|
|
2052
|
+
}, null, 8, Se)], 8, xe), i("rect", {
|
|
2002
2053
|
width: H.value,
|
|
2003
2054
|
height: U.value,
|
|
2004
|
-
x:
|
|
2005
|
-
y:
|
|
2055
|
+
x: vi.value,
|
|
2056
|
+
y: yi.value,
|
|
2006
2057
|
fill: "url(#grid)",
|
|
2007
|
-
opacity:
|
|
2008
|
-
}, null, 8,
|
|
2009
|
-
|
|
2058
|
+
opacity: Xi.value
|
|
2059
|
+
}, null, 8, Ce)], 64)) : n("", !0),
|
|
2060
|
+
Qi.value ? (d(), r("g", we, [...o[5] ||= [
|
|
2010
2061
|
i("line", {
|
|
2011
2062
|
x1: "-22",
|
|
2012
2063
|
y1: "0",
|
|
@@ -2038,7 +2089,7 @@ var y = {
|
|
|
2038
2089
|
opacity: "0.8"
|
|
2039
2090
|
}, null, -1)
|
|
2040
2091
|
]])) : n("", !0),
|
|
2041
|
-
(d(!0), r(e, null, p(
|
|
2092
|
+
(d(!0), r(e, null, p(po.value, (e) => (d(), r("g", { key: e.id }, [
|
|
2042
2093
|
i("rect", {
|
|
2043
2094
|
x: e.rect.x,
|
|
2044
2095
|
y: e.rect.y,
|
|
@@ -2047,7 +2098,7 @@ var y = {
|
|
|
2047
2098
|
rx: "16",
|
|
2048
2099
|
fill: e.color,
|
|
2049
2100
|
opacity: "0.03"
|
|
2050
|
-
}, null, 8,
|
|
2101
|
+
}, null, 8, Te),
|
|
2051
2102
|
i("rect", {
|
|
2052
2103
|
x: e.rect.x,
|
|
2053
2104
|
y: e.rect.y,
|
|
@@ -2059,35 +2110,35 @@ var y = {
|
|
|
2059
2110
|
"stroke-width": "1.5",
|
|
2060
2111
|
"stroke-dasharray": "8 5",
|
|
2061
2112
|
opacity: "0.35"
|
|
2062
|
-
}, null, 8,
|
|
2113
|
+
}, null, 8, Ee),
|
|
2063
2114
|
i("circle", {
|
|
2064
2115
|
cx: e.rect.x + 4,
|
|
2065
2116
|
cy: e.rect.y + 4,
|
|
2066
2117
|
r: "3",
|
|
2067
2118
|
fill: e.color,
|
|
2068
2119
|
opacity: "0.5"
|
|
2069
|
-
}, null, 8,
|
|
2120
|
+
}, null, 8, De),
|
|
2070
2121
|
i("circle", {
|
|
2071
2122
|
cx: e.rect.x + e.rect.width - 4,
|
|
2072
2123
|
cy: e.rect.y + 4,
|
|
2073
2124
|
r: "3",
|
|
2074
2125
|
fill: e.color,
|
|
2075
2126
|
opacity: "0.5"
|
|
2076
|
-
}, null, 8,
|
|
2127
|
+
}, null, 8, Oe),
|
|
2077
2128
|
i("circle", {
|
|
2078
2129
|
cx: e.rect.x + 4,
|
|
2079
2130
|
cy: e.rect.y + e.rect.height - 4,
|
|
2080
2131
|
r: "3",
|
|
2081
2132
|
fill: e.color,
|
|
2082
2133
|
opacity: "0.5"
|
|
2083
|
-
}, null, 8,
|
|
2134
|
+
}, null, 8, ke),
|
|
2084
2135
|
i("circle", {
|
|
2085
2136
|
cx: e.rect.x + e.rect.width - 4,
|
|
2086
2137
|
cy: e.rect.y + e.rect.height - 4,
|
|
2087
2138
|
r: "3",
|
|
2088
2139
|
fill: e.color,
|
|
2089
2140
|
opacity: "0.5"
|
|
2090
|
-
}, null, 8,
|
|
2141
|
+
}, null, 8, Ae),
|
|
2091
2142
|
i("text", {
|
|
2092
2143
|
x: e.rect.x + 14,
|
|
2093
2144
|
y: e.rect.y + 20,
|
|
@@ -2096,93 +2147,93 @@ var y = {
|
|
|
2096
2147
|
"font-size": "12",
|
|
2097
2148
|
opacity: "0.7",
|
|
2098
2149
|
"letter-spacing": "0.5"
|
|
2099
|
-
}, m(e.label), 9,
|
|
2150
|
+
}, m(e.label), 9, je)
|
|
2100
2151
|
]))), 128)),
|
|
2101
|
-
(d(!0), r(e, null, p(
|
|
2152
|
+
(d(!0), r(e, null, p(Ti.value, (e) => (d(), r("g", {
|
|
2102
2153
|
key: `region-${e.id}`,
|
|
2103
2154
|
transform: `translate(${e.x}, ${e.y})`,
|
|
2104
2155
|
"pointer-events": "none"
|
|
2105
2156
|
}, [i("rect", {
|
|
2106
|
-
x:
|
|
2107
|
-
y:
|
|
2108
|
-
width:
|
|
2109
|
-
height:
|
|
2157
|
+
x: F(e).x,
|
|
2158
|
+
y: F(e).y,
|
|
2159
|
+
width: F(e).width,
|
|
2160
|
+
height: F(e).height,
|
|
2110
2161
|
rx: q(e),
|
|
2111
|
-
fill:
|
|
2112
|
-
opacity: "0.
|
|
2113
|
-
}, null, 8,
|
|
2162
|
+
fill: er(e),
|
|
2163
|
+
opacity: "0.9"
|
|
2164
|
+
}, null, 8, Ne), tr(e) ? (d(), r("rect", {
|
|
2114
2165
|
key: 0,
|
|
2115
|
-
x:
|
|
2116
|
-
y:
|
|
2117
|
-
width:
|
|
2118
|
-
height:
|
|
2166
|
+
x: F(e).x,
|
|
2167
|
+
y: F(e).y,
|
|
2168
|
+
width: F(e).width,
|
|
2169
|
+
height: F(e).height,
|
|
2119
2170
|
rx: q(e),
|
|
2120
2171
|
fill: "none",
|
|
2121
|
-
stroke:
|
|
2122
|
-
"stroke-width":
|
|
2123
|
-
"stroke-dasharray":
|
|
2172
|
+
stroke: ga(e),
|
|
2173
|
+
"stroke-width": nr(e),
|
|
2174
|
+
"stroke-dasharray": va(e),
|
|
2124
2175
|
opacity: "0.35"
|
|
2125
|
-
}, null, 8,
|
|
2126
|
-
Xr.value ? (d(), r("g",
|
|
2176
|
+
}, null, 8, Pe)) : n("", !0)], 8, Me))), 128)),
|
|
2177
|
+
Xr.value ? (d(), r("g", Fe, [(d(!0), r(e, null, p(Ei.value, (e) => (d(), r("g", {
|
|
2127
2178
|
key: `node-base-${e.id}`,
|
|
2128
2179
|
transform: `translate(${e.x}, ${e.y})`
|
|
2129
|
-
}, [Ur(e) &&
|
|
2180
|
+
}, [Ur(e) && _.viewMode !== "3d" ? (d(), r("rect", {
|
|
2130
2181
|
key: 0,
|
|
2131
|
-
x:
|
|
2132
|
-
y:
|
|
2133
|
-
width:
|
|
2134
|
-
height:
|
|
2182
|
+
x: F(e).x,
|
|
2183
|
+
y: F(e).y,
|
|
2184
|
+
width: F(e).width,
|
|
2185
|
+
height: F(e).height,
|
|
2135
2186
|
rx: q(e),
|
|
2136
2187
|
fill: Ur(e),
|
|
2137
2188
|
opacity: "0.15"
|
|
2138
|
-
}, null, 8,
|
|
2189
|
+
}, null, 8, Le)) : n("", !0), I(e) && _.viewMode !== "3d" ? (d(), r("rect", {
|
|
2139
2190
|
key: 1,
|
|
2140
|
-
x:
|
|
2141
|
-
y:
|
|
2142
|
-
width:
|
|
2143
|
-
height:
|
|
2191
|
+
x: I(e).x,
|
|
2192
|
+
y: I(e).y,
|
|
2193
|
+
width: I(e).width,
|
|
2194
|
+
height: I(e).height,
|
|
2144
2195
|
rx: q(e),
|
|
2145
2196
|
fill: "none",
|
|
2146
|
-
stroke:
|
|
2147
|
-
"stroke-width":
|
|
2148
|
-
"stroke-dasharray":
|
|
2197
|
+
stroke: ga(e),
|
|
2198
|
+
"stroke-width": _a(e),
|
|
2199
|
+
"stroke-dasharray": va(e),
|
|
2149
2200
|
opacity: "0.8"
|
|
2150
|
-
}, null, 8,
|
|
2151
|
-
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `base-${t.id}` }, [
|
|
2201
|
+
}, null, 8, Re)) : n("", !0)], 8, Ie))), 128))])) : n("", !0),
|
|
2202
|
+
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `base-${t.id}` }, [Oo(t) ? n("", !0) : (d(), r("path", {
|
|
2152
2203
|
key: 0,
|
|
2153
2204
|
d: $(t),
|
|
2154
2205
|
fill: "none",
|
|
2155
|
-
stroke:
|
|
2156
|
-
opacity:
|
|
2157
|
-
"stroke-width":
|
|
2206
|
+
stroke: oa(t),
|
|
2207
|
+
opacity: sa(t),
|
|
2208
|
+
"stroke-width": ia(t),
|
|
2158
2209
|
"stroke-linecap": "round",
|
|
2159
|
-
"marker-end":
|
|
2160
|
-
}, null, 8,
|
|
2161
|
-
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `glow-${t.id}` }, [
|
|
2210
|
+
"marker-end": go(t)
|
|
2211
|
+
}, null, 8, ze))], 64))), 128)),
|
|
2212
|
+
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `glow-${t.id}` }, [pa.value ? (d(), r("path", {
|
|
2162
2213
|
key: 0,
|
|
2163
2214
|
d: $(t),
|
|
2164
2215
|
fill: "none",
|
|
2165
2216
|
stroke: Q(t),
|
|
2166
|
-
"stroke-width":
|
|
2217
|
+
"stroke-width": ia(t),
|
|
2167
2218
|
"stroke-linecap": "round",
|
|
2168
2219
|
opacity: "0.15",
|
|
2169
2220
|
filter: "url(#glow-strong)"
|
|
2170
|
-
}, null, 8,
|
|
2221
|
+
}, null, 8, Be)) : n("", !0)], 64))), 128)),
|
|
2171
2222
|
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `sel-${t.id}` }, [Gr(t) ? (d(), r("path", {
|
|
2172
2223
|
key: 0,
|
|
2173
2224
|
d: $(t),
|
|
2174
2225
|
fill: "none",
|
|
2175
2226
|
stroke: ii.value,
|
|
2176
|
-
"stroke-width":
|
|
2227
|
+
"stroke-width": 4 * aa(t),
|
|
2177
2228
|
opacity: "0.35",
|
|
2178
2229
|
filter: "url(#glow-strong)"
|
|
2179
|
-
}, null, 8,
|
|
2180
|
-
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `flow-${t.id}` }, [
|
|
2230
|
+
}, null, 8, Ve)) : n("", !0)], 64))), 128)),
|
|
2231
|
+
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `flow-${t.id}` }, [ko(t) ? (d(), r("g", He, [
|
|
2181
2232
|
i("path", {
|
|
2182
2233
|
d: $(t),
|
|
2183
2234
|
fill: "none",
|
|
2184
2235
|
stroke: Q(t),
|
|
2185
|
-
"stroke-width":
|
|
2236
|
+
"stroke-width": 2.5 * aa(t),
|
|
2186
2237
|
"stroke-linecap": "round",
|
|
2187
2238
|
"stroke-dasharray": "12 40",
|
|
2188
2239
|
opacity: "0.9"
|
|
@@ -2190,14 +2241,14 @@ var y = {
|
|
|
2190
2241
|
attributeName: "stroke-dashoffset",
|
|
2191
2242
|
from: "0",
|
|
2192
2243
|
to: "-52",
|
|
2193
|
-
dur:
|
|
2244
|
+
dur: bo(t),
|
|
2194
2245
|
repeatCount: "indefinite"
|
|
2195
|
-
}, null, 8,
|
|
2246
|
+
}, null, 8, We)], 8, Ue),
|
|
2196
2247
|
i("path", {
|
|
2197
2248
|
d: $(t),
|
|
2198
2249
|
fill: "none",
|
|
2199
2250
|
stroke: Q(t),
|
|
2200
|
-
"stroke-width":
|
|
2251
|
+
"stroke-width": 1.5 * aa(t),
|
|
2201
2252
|
"stroke-linecap": "round",
|
|
2202
2253
|
"stroke-dasharray": "6 60",
|
|
2203
2254
|
opacity: "0.5"
|
|
@@ -2205,14 +2256,14 @@ var y = {
|
|
|
2205
2256
|
attributeName: "stroke-dashoffset",
|
|
2206
2257
|
from: "-30",
|
|
2207
2258
|
to: "-82",
|
|
2208
|
-
dur:
|
|
2259
|
+
dur: bo(t, 1.3),
|
|
2209
2260
|
repeatCount: "indefinite"
|
|
2210
|
-
}, null, 8,
|
|
2261
|
+
}, null, 8, Ke)], 8, Ge),
|
|
2211
2262
|
i("path", {
|
|
2212
2263
|
d: $(t),
|
|
2213
2264
|
fill: "none",
|
|
2214
2265
|
stroke: Q(t),
|
|
2215
|
-
"stroke-width":
|
|
2266
|
+
"stroke-width": 6 * aa(t),
|
|
2216
2267
|
"stroke-linecap": "round",
|
|
2217
2268
|
"stroke-dasharray": "4 80",
|
|
2218
2269
|
opacity: "0.3",
|
|
@@ -2221,47 +2272,47 @@ var y = {
|
|
|
2221
2272
|
attributeName: "stroke-dashoffset",
|
|
2222
2273
|
from: "0",
|
|
2223
2274
|
to: "-84",
|
|
2224
|
-
dur:
|
|
2275
|
+
dur: bo(t, .8),
|
|
2225
2276
|
repeatCount: "indefinite"
|
|
2226
|
-
}, null, 8,
|
|
2277
|
+
}, null, 8, Je)], 8, qe)
|
|
2227
2278
|
])) : n("", !0)], 64))), 128)),
|
|
2228
|
-
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `dash-${t.id}` }, [
|
|
2279
|
+
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `dash-${t.id}` }, [Oo(t) ? (d(), r("path", {
|
|
2229
2280
|
key: 0,
|
|
2230
2281
|
d: $(t),
|
|
2231
2282
|
fill: "none",
|
|
2232
2283
|
stroke: Q(t),
|
|
2233
|
-
"stroke-width":
|
|
2284
|
+
"stroke-width": Eo(t),
|
|
2234
2285
|
"stroke-linecap": "round",
|
|
2235
|
-
"stroke-dasharray":
|
|
2236
|
-
"marker-end":
|
|
2286
|
+
"stroke-dasharray": wo.value,
|
|
2287
|
+
"marker-end": go(t),
|
|
2237
2288
|
opacity: "0.9"
|
|
2238
2289
|
}, [i("animate", {
|
|
2239
2290
|
attributeName: "stroke-dashoffset",
|
|
2240
2291
|
from: "0",
|
|
2241
|
-
to: `${-
|
|
2242
|
-
dur:
|
|
2292
|
+
to: `${-To.value}`,
|
|
2293
|
+
dur: Do(t),
|
|
2243
2294
|
repeatCount: "indefinite"
|
|
2244
|
-
}, null, 8,
|
|
2245
|
-
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `particle-${t.id}` }, [
|
|
2295
|
+
}, null, 8, Xe)], 8, Ye)) : n("", !0)], 64))), 128)),
|
|
2296
|
+
(d(!0), r(e, null, p(W.value, (t) => (d(), r(e, { key: `particle-${t.id}` }, [Ao(t) ? (d(), r("g", Ze, [i("circle", {
|
|
2246
2297
|
r: "3",
|
|
2247
2298
|
fill: Q(t),
|
|
2248
2299
|
opacity: "0.9",
|
|
2249
2300
|
filter: "url(#glow-core)"
|
|
2250
2301
|
}, [i("animateMotion", {
|
|
2251
2302
|
path: $(t),
|
|
2252
|
-
dur:
|
|
2303
|
+
dur: xo(t),
|
|
2253
2304
|
repeatCount: "indefinite"
|
|
2254
|
-
}, null, 8,
|
|
2305
|
+
}, null, 8, $e)], 8, Qe), i("circle", {
|
|
2255
2306
|
r: "8",
|
|
2256
2307
|
fill: Q(t),
|
|
2257
2308
|
opacity: "0.2",
|
|
2258
2309
|
filter: "url(#glow-strong)"
|
|
2259
2310
|
}, [i("animateMotion", {
|
|
2260
2311
|
path: $(t),
|
|
2261
|
-
dur:
|
|
2312
|
+
dur: xo(t),
|
|
2262
2313
|
repeatCount: "indefinite"
|
|
2263
|
-
}, null, 8,
|
|
2264
|
-
(d(!0), r(e, null, p(
|
|
2314
|
+
}, null, 8, tt)], 8, et)])) : n("", !0)], 64))), 128)),
|
|
2315
|
+
(d(!0), r(e, null, p(Ko.value, (t) => (d(), r(e, { key: `text-${t.id}` }, [t.info.merged && t.info.representative ? (d(), r("g", {
|
|
2265
2316
|
key: 0,
|
|
2266
2317
|
transform: `translate(${t.center.x}, ${t.center.y}) rotate(${t.centerAngle})${t.mergedShift ? ` translate(0, ${t.mergedShift})` : ""}`
|
|
2267
2318
|
}, [i("rect", {
|
|
@@ -2274,17 +2325,17 @@ var y = {
|
|
|
2274
2325
|
opacity: "0.9",
|
|
2275
2326
|
stroke: t.color,
|
|
2276
2327
|
"stroke-width": "0.6"
|
|
2277
|
-
}, null, 8,
|
|
2328
|
+
}, null, 8, rt), i("text", {
|
|
2278
2329
|
y: "0",
|
|
2279
2330
|
"dominant-baseline": "central",
|
|
2280
2331
|
"text-anchor": "middle",
|
|
2281
2332
|
"font-size": _n(t.edge, null),
|
|
2282
2333
|
fill: vn(t.edge, null),
|
|
2283
2334
|
opacity: "1"
|
|
2284
|
-
}, m(t.info.count), 9,
|
|
2285
|
-
|
|
2335
|
+
}, m(t.info.count), 9, it)], 8, nt)) : t.info.merged ? n("", !0) : (d(), r("g", at, [
|
|
2336
|
+
Mo(t.edge.fromText) ? (d(), r("g", {
|
|
2286
2337
|
key: 0,
|
|
2287
|
-
transform:
|
|
2338
|
+
transform: Vo(t.edge.fromText, t.start, t.startAngle, t.fromShift)
|
|
2288
2339
|
}, [t.fromPlate.show ? (d(), r("rect", {
|
|
2289
2340
|
key: 0,
|
|
2290
2341
|
x: -t.fromBox.w / 2,
|
|
@@ -2298,17 +2349,17 @@ var y = {
|
|
|
2298
2349
|
"stroke-width": "0.6",
|
|
2299
2350
|
"stroke-opacity": t.fromPlate.borderOpacity,
|
|
2300
2351
|
"stroke-dasharray": t.fromPlate.borderStyle === "dashed" ? "3 2" : void 0
|
|
2301
|
-
}, null, 8,
|
|
2352
|
+
}, null, 8, st)) : n("", !0), i("text", {
|
|
2302
2353
|
y: "0",
|
|
2303
2354
|
"dominant-baseline": "central",
|
|
2304
2355
|
"text-anchor": "middle",
|
|
2305
2356
|
"font-size": _n(t.edge, t.edge.fromText),
|
|
2306
2357
|
fill: vn(t.edge, t.edge.fromText),
|
|
2307
2358
|
opacity: "0.9"
|
|
2308
|
-
}, m(
|
|
2309
|
-
|
|
2359
|
+
}, m(jo(t.edge.fromText)), 9, ct)], 8, ot)) : n("", !0),
|
|
2360
|
+
Mo(t.edge.centerText) ? (d(), r("g", {
|
|
2310
2361
|
key: 1,
|
|
2311
|
-
transform:
|
|
2362
|
+
transform: Vo(t.edge.centerText, t.center, Uo(t.centerAngle, t.centerRaw), t.centerShift)
|
|
2312
2363
|
}, [t.centerPlate.show ? (d(), r("rect", {
|
|
2313
2364
|
key: 0,
|
|
2314
2365
|
x: -t.centerBox.w / 2,
|
|
@@ -2322,17 +2373,17 @@ var y = {
|
|
|
2322
2373
|
"stroke-width": "0.6",
|
|
2323
2374
|
"stroke-opacity": t.centerPlate.borderOpacity,
|
|
2324
2375
|
"stroke-dasharray": t.centerPlate.borderStyle === "dashed" ? "3 2" : void 0
|
|
2325
|
-
}, null, 8,
|
|
2376
|
+
}, null, 8, ut)) : n("", !0), i("text", {
|
|
2326
2377
|
y: "0",
|
|
2327
2378
|
"dominant-baseline": "central",
|
|
2328
2379
|
"text-anchor": "middle",
|
|
2329
2380
|
"font-size": _n(t.edge, t.edge.centerText),
|
|
2330
2381
|
fill: vn(t.edge, t.edge.centerText),
|
|
2331
2382
|
opacity: "1"
|
|
2332
|
-
}, m(
|
|
2333
|
-
|
|
2383
|
+
}, m(jo(t.edge.centerText)), 9, dt)], 8, lt)) : n("", !0),
|
|
2384
|
+
Mo(t.edge.toText) ? (d(), r("g", {
|
|
2334
2385
|
key: 2,
|
|
2335
|
-
transform:
|
|
2386
|
+
transform: Vo(t.edge.toText, t.end, t.endAngle, t.toShift)
|
|
2336
2387
|
}, [t.toPlate.show ? (d(), r("rect", {
|
|
2337
2388
|
key: 0,
|
|
2338
2389
|
x: -t.toBox.w / 2,
|
|
@@ -2346,88 +2397,88 @@ var y = {
|
|
|
2346
2397
|
"stroke-width": "0.6",
|
|
2347
2398
|
"stroke-opacity": t.toPlate.borderOpacity,
|
|
2348
2399
|
"stroke-dasharray": t.toPlate.borderStyle === "dashed" ? "3 2" : void 0
|
|
2349
|
-
}, null, 8,
|
|
2400
|
+
}, null, 8, pt)) : n("", !0), i("text", {
|
|
2350
2401
|
y: "0",
|
|
2351
2402
|
"dominant-baseline": "central",
|
|
2352
2403
|
"text-anchor": "middle",
|
|
2353
2404
|
"font-size": _n(t.edge, t.edge.toText),
|
|
2354
2405
|
fill: vn(t.edge, t.edge.toText),
|
|
2355
2406
|
opacity: "0.9"
|
|
2356
|
-
}, m(
|
|
2407
|
+
}, m(jo(t.edge.toText)), 9, mt)], 8, ft)) : n("", !0)
|
|
2357
2408
|
]))], 64))), 128)),
|
|
2358
|
-
X.value ? (d(), r("g",
|
|
2409
|
+
X.value ? (d(), r("g", ht, [
|
|
2359
2410
|
i("line", {
|
|
2360
2411
|
x1: X.value.ax,
|
|
2361
2412
|
y1: X.value.ay,
|
|
2362
|
-
x2:
|
|
2363
|
-
y2:
|
|
2364
|
-
stroke:
|
|
2413
|
+
x2: lo.value.x,
|
|
2414
|
+
y2: lo.value.y,
|
|
2415
|
+
stroke: co.value,
|
|
2365
2416
|
"stroke-width": "2",
|
|
2366
2417
|
"stroke-dasharray": "6 6",
|
|
2367
2418
|
"stroke-linecap": "round",
|
|
2368
2419
|
opacity: "0.9"
|
|
2369
|
-
}, null, 8,
|
|
2420
|
+
}, null, 8, gt),
|
|
2370
2421
|
i("circle", {
|
|
2371
2422
|
cx: X.value.px,
|
|
2372
2423
|
cy: X.value.py,
|
|
2373
2424
|
r: "3.5",
|
|
2374
|
-
fill:
|
|
2425
|
+
fill: co.value,
|
|
2375
2426
|
opacity: "0.9"
|
|
2376
|
-
}, null, 8,
|
|
2377
|
-
X.value.overId &&
|
|
2427
|
+
}, null, 8, _t),
|
|
2428
|
+
X.value.overId && uo.value ? (d(), r("rect", {
|
|
2378
2429
|
key: 0,
|
|
2379
|
-
x:
|
|
2380
|
-
y:
|
|
2381
|
-
width:
|
|
2382
|
-
height:
|
|
2430
|
+
x: uo.value.x,
|
|
2431
|
+
y: uo.value.y,
|
|
2432
|
+
width: uo.value.w,
|
|
2433
|
+
height: uo.value.h,
|
|
2383
2434
|
rx: "6",
|
|
2384
2435
|
fill: "none",
|
|
2385
|
-
stroke:
|
|
2436
|
+
stroke: co.value,
|
|
2386
2437
|
"stroke-width": "1.5",
|
|
2387
2438
|
"stroke-dasharray": "6 4",
|
|
2388
2439
|
opacity: "0.9"
|
|
2389
|
-
}, null, 8,
|
|
2440
|
+
}, null, 8, vt)) : n("", !0)
|
|
2390
2441
|
])) : n("", !0),
|
|
2391
|
-
i("g",
|
|
2442
|
+
i("g", yt, [(d(!0), r(e, null, p(Ti.value, (e) => (d(), r("g", {
|
|
2392
2443
|
key: `region-hit-${e.id}`,
|
|
2393
2444
|
transform: `translate(${e.x}, ${e.y})`,
|
|
2394
|
-
style: c({ cursor:
|
|
2395
|
-
onMousedown: (t) =>
|
|
2396
|
-
onClick:
|
|
2397
|
-
}, [
|
|
2445
|
+
style: c({ cursor: Ea.value ? "move" : "default" }),
|
|
2446
|
+
onMousedown: (t) => Oa(t, e),
|
|
2447
|
+
onClick: g((t) => ja(e, t), ["stop"])
|
|
2448
|
+
}, [Da.value === "box" ? (d(), r("rect", {
|
|
2398
2449
|
key: 0,
|
|
2399
2450
|
class: "region-hit-area",
|
|
2400
|
-
x:
|
|
2401
|
-
y:
|
|
2402
|
-
width:
|
|
2403
|
-
height:
|
|
2451
|
+
x: F(e).x,
|
|
2452
|
+
y: F(e).y,
|
|
2453
|
+
width: F(e).width,
|
|
2454
|
+
height: F(e).height,
|
|
2404
2455
|
rx: q(e),
|
|
2405
2456
|
fill: "transparent",
|
|
2406
2457
|
"pointer-events": "all"
|
|
2407
|
-
}, null, 8,
|
|
2458
|
+
}, null, 8, xt)) : (d(), r("rect", {
|
|
2408
2459
|
key: 1,
|
|
2409
2460
|
class: "region-hit-area region-hit-frame",
|
|
2410
|
-
x:
|
|
2411
|
-
y:
|
|
2412
|
-
width:
|
|
2413
|
-
height:
|
|
2461
|
+
x: F(e).x,
|
|
2462
|
+
y: F(e).y,
|
|
2463
|
+
width: F(e).width,
|
|
2464
|
+
height: F(e).height,
|
|
2414
2465
|
rx: q(e),
|
|
2415
2466
|
fill: "none",
|
|
2416
2467
|
stroke: "transparent",
|
|
2417
2468
|
"stroke-width": "14",
|
|
2418
2469
|
"pointer-events": "stroke"
|
|
2419
|
-
}, null, 8,
|
|
2470
|
+
}, null, 8, St)), Wr(e) && _.viewMode !== "3d" ? (d(), r("rect", {
|
|
2420
2471
|
key: 2,
|
|
2421
|
-
x:
|
|
2422
|
-
y:
|
|
2423
|
-
width:
|
|
2424
|
-
height:
|
|
2472
|
+
x: F(e).x,
|
|
2473
|
+
y: F(e).y,
|
|
2474
|
+
width: F(e).width,
|
|
2475
|
+
height: F(e).height,
|
|
2425
2476
|
rx: q(e),
|
|
2426
2477
|
fill: "none",
|
|
2427
2478
|
stroke: Yr.value,
|
|
2428
2479
|
"stroke-width": "2.5",
|
|
2429
2480
|
"pointer-events": "none"
|
|
2430
|
-
}, null, 8,
|
|
2481
|
+
}, null, 8, Ct)) : n("", !0)], 44, bt))), 128))]),
|
|
2431
2482
|
(d(!0), r(e, null, p(W.value, (e) => (d(), r("path", {
|
|
2432
2483
|
key: `hit-${e.id}`,
|
|
2433
2484
|
d: $(e),
|
|
@@ -2438,32 +2489,32 @@ var y = {
|
|
|
2438
2489
|
"pointer-events": "stroke",
|
|
2439
2490
|
cursor: "pointer"
|
|
2440
2491
|
},
|
|
2441
|
-
onClick:
|
|
2442
|
-
}, null, 8,
|
|
2443
|
-
(d(!0), r(e, null, p(
|
|
2492
|
+
onClick: g((t) => ai(e, t), ["stop"])
|
|
2493
|
+
}, null, 8, wt))), 128)),
|
|
2494
|
+
(d(!0), r(e, null, p(Ei.value, (a) => (d(), r("g", {
|
|
2444
2495
|
key: a.id,
|
|
2445
2496
|
transform: `translate(${a.x}, ${a.y})`,
|
|
2446
2497
|
class: s(["topology-node", C.value === a.id ? "dragging" : ""]),
|
|
2447
|
-
onMousedown: (e) =>
|
|
2498
|
+
onMousedown: (e) => ya(e, a.id),
|
|
2448
2499
|
onClick: (e) => Qr(a, e),
|
|
2449
2500
|
style: c({
|
|
2450
|
-
cursor:
|
|
2451
|
-
color:
|
|
2501
|
+
cursor: v.editable && v.config.nodeDraggable !== !1 ? "grab" : "default",
|
|
2502
|
+
color: j(a)
|
|
2452
2503
|
})
|
|
2453
2504
|
}, [
|
|
2454
|
-
|
|
2505
|
+
$n(a) ? (d(), r("rect", {
|
|
2455
2506
|
key: 0,
|
|
2456
2507
|
class: "node-hit-area node-hit-frame",
|
|
2457
|
-
x:
|
|
2458
|
-
y:
|
|
2459
|
-
width:
|
|
2460
|
-
height:
|
|
2508
|
+
x: F(a).x,
|
|
2509
|
+
y: F(a).y,
|
|
2510
|
+
width: F(a).width,
|
|
2511
|
+
height: F(a).height,
|
|
2461
2512
|
rx: q(a),
|
|
2462
2513
|
fill: "none",
|
|
2463
2514
|
stroke: "transparent",
|
|
2464
|
-
"stroke-width": Math.max(
|
|
2515
|
+
"stroke-width": Math.max(_a(a), 12),
|
|
2465
2516
|
"pointer-events": "stroke"
|
|
2466
|
-
}, null, 8,
|
|
2517
|
+
}, null, 8, Et)) : (d(), r("rect", {
|
|
2467
2518
|
key: 1,
|
|
2468
2519
|
class: "node-hit-area",
|
|
2469
2520
|
x: Vr(a).x,
|
|
@@ -2472,56 +2523,56 @@ var y = {
|
|
|
2472
2523
|
height: Vr(a).height,
|
|
2473
2524
|
fill: "transparent",
|
|
2474
2525
|
"pointer-events": "all"
|
|
2475
|
-
}, null, 8,
|
|
2476
|
-
!Xr.value && Ur(a) &&
|
|
2526
|
+
}, null, 8, Dt)),
|
|
2527
|
+
!Xr.value && Ur(a) && _.viewMode !== "3d" ? (d(), r("rect", {
|
|
2477
2528
|
key: 2,
|
|
2478
|
-
x:
|
|
2479
|
-
y:
|
|
2480
|
-
width:
|
|
2481
|
-
height:
|
|
2529
|
+
x: F(a).x,
|
|
2530
|
+
y: F(a).y,
|
|
2531
|
+
width: F(a).width,
|
|
2532
|
+
height: F(a).height,
|
|
2482
2533
|
rx: q(a),
|
|
2483
2534
|
fill: Ur(a),
|
|
2484
2535
|
opacity: "0.15"
|
|
2485
|
-
}, null, 8,
|
|
2486
|
-
!Xr.value &&
|
|
2536
|
+
}, null, 8, Ot)) : n("", !0),
|
|
2537
|
+
!Xr.value && I(a) && _.viewMode !== "3d" ? (d(), r("rect", {
|
|
2487
2538
|
key: 3,
|
|
2488
|
-
x: L(a).x,
|
|
2489
|
-
y: L(a).y,
|
|
2490
|
-
width: L(a).width,
|
|
2491
|
-
height: L(a).height,
|
|
2492
|
-
rx: q(a),
|
|
2493
|
-
fill: "none",
|
|
2494
|
-
stroke: da(a),
|
|
2495
|
-
"stroke-width": fa(a),
|
|
2496
|
-
"stroke-dasharray": pa(a),
|
|
2497
|
-
opacity: "0.8"
|
|
2498
|
-
}, null, 8, At)) : n("", !0),
|
|
2499
|
-
Wr(a) && g.viewMode !== "3d" ? (d(), r("rect", {
|
|
2500
|
-
key: 4,
|
|
2501
2539
|
x: I(a).x,
|
|
2502
2540
|
y: I(a).y,
|
|
2503
2541
|
width: I(a).width,
|
|
2504
2542
|
height: I(a).height,
|
|
2505
2543
|
rx: q(a),
|
|
2506
2544
|
fill: "none",
|
|
2545
|
+
stroke: ga(a),
|
|
2546
|
+
"stroke-width": _a(a),
|
|
2547
|
+
"stroke-dasharray": va(a),
|
|
2548
|
+
opacity: "0.8"
|
|
2549
|
+
}, null, 8, kt)) : n("", !0),
|
|
2550
|
+
Wr(a) && _.viewMode !== "3d" ? (d(), r("rect", {
|
|
2551
|
+
key: 4,
|
|
2552
|
+
x: F(a).x,
|
|
2553
|
+
y: F(a).y,
|
|
2554
|
+
width: F(a).width,
|
|
2555
|
+
height: F(a).height,
|
|
2556
|
+
rx: q(a),
|
|
2557
|
+
fill: "none",
|
|
2507
2558
|
stroke: Yr.value,
|
|
2508
2559
|
"stroke-width": "2.5",
|
|
2509
|
-
transform: "scale(1
|
|
2560
|
+
transform: "scale(1)",
|
|
2510
2561
|
style: { "pointer-events": "none" }
|
|
2511
|
-
}, null, 8,
|
|
2512
|
-
|
|
2562
|
+
}, null, 8, At)) : n("", !0),
|
|
2563
|
+
Qn(a) ? (d(), r("text", {
|
|
2513
2564
|
key: 5,
|
|
2514
2565
|
y: "4",
|
|
2515
2566
|
transform: `rotate(${a.rotation || 0} 0 4)`,
|
|
2516
2567
|
"text-anchor": "middle",
|
|
2517
|
-
fill: hn(a) ||
|
|
2568
|
+
fill: hn(a) || j(a) || Zn(a).color,
|
|
2518
2569
|
"font-size": mn(a, 12)
|
|
2519
2570
|
}, [(d(!0), r(e, null, p(String(a.label ?? "").split("\n"), (e, t) => (d(), r("tspan", {
|
|
2520
2571
|
key: t,
|
|
2521
2572
|
x: "0",
|
|
2522
2573
|
dy: t === 0 ? 0 : "1.2em"
|
|
2523
|
-
}, m(e), 9,
|
|
2524
|
-
(d(!0), r(e, null, p(
|
|
2574
|
+
}, m(e), 9, Mt))), 128))], 8, jt)) : $n(a) ? (d(), r(e, { key: 6 }, [], 64)) : M(a) ? (d(), r(e, { key: 7 }, [], 64)) : (d(), r(e, { key: 8 }, [
|
|
2575
|
+
(d(!0), r(e, null, p(Pr(a), (e) => (d(), r("circle", {
|
|
2525
2576
|
key: `alert-${a.id}-${e.key}`,
|
|
2526
2577
|
r: e.r,
|
|
2527
2578
|
fill: e.fill,
|
|
@@ -2535,71 +2586,67 @@ var y = {
|
|
|
2535
2586
|
dur: e.dur,
|
|
2536
2587
|
begin: e.begin,
|
|
2537
2588
|
repeatCount: "indefinite"
|
|
2538
|
-
}, null, 8,
|
|
2589
|
+
}, null, 8, Pt)) : n("", !0), i("animate", {
|
|
2539
2590
|
attributeName: "opacity",
|
|
2540
2591
|
values: e.opacityValues,
|
|
2541
2592
|
keyTimes: e.keyTimes || void 0,
|
|
2542
2593
|
dur: e.dur,
|
|
2543
2594
|
begin: e.begin,
|
|
2544
2595
|
repeatCount: "indefinite"
|
|
2545
|
-
}, null, 8,
|
|
2546
|
-
|
|
2596
|
+
}, null, 8, Ft)], 8, Nt))), 128)),
|
|
2597
|
+
cr(a) ? (d(), r("svg", {
|
|
2547
2598
|
key: 0,
|
|
2548
2599
|
class: "node-icon",
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
preserveAspectRatio:
|
|
2600
|
+
viewBox: dr.value,
|
|
2601
|
+
x: F(a).x,
|
|
2602
|
+
y: F(a).y,
|
|
2603
|
+
width: F(a).width,
|
|
2604
|
+
height: F(a).height,
|
|
2605
|
+
preserveAspectRatio: ur.value
|
|
2555
2606
|
}, [ee(t.$slots, "node-icon", {
|
|
2556
2607
|
node: a,
|
|
2557
|
-
color:
|
|
2558
|
-
viewMode:
|
|
2608
|
+
color: j(a),
|
|
2609
|
+
viewMode: _.viewMode,
|
|
2559
2610
|
isImage: !0,
|
|
2560
|
-
image:
|
|
2561
|
-
fit:
|
|
2562
|
-
imageWidth:
|
|
2563
|
-
imageHeight:
|
|
2564
|
-
width:
|
|
2565
|
-
height:
|
|
2611
|
+
image: sr(a),
|
|
2612
|
+
fit: lr.value,
|
|
2613
|
+
imageWidth: hr(a).w,
|
|
2614
|
+
imageHeight: hr(a).h,
|
|
2615
|
+
width: F(a).width,
|
|
2616
|
+
height: F(a).height
|
|
2566
2617
|
}, () => [i("image", {
|
|
2567
|
-
href:
|
|
2568
|
-
x: -
|
|
2569
|
-
y: -
|
|
2570
|
-
width:
|
|
2571
|
-
height:
|
|
2572
|
-
}, null, 8,
|
|
2573
|
-
key: 1,
|
|
2574
|
-
class: "node-icon",
|
|
2575
|
-
transform: Fr(a)
|
|
2576
|
-
}, [ee(t.$slots, "node-icon", {
|
|
2618
|
+
href: sr(a),
|
|
2619
|
+
x: -hr(a).w / 2,
|
|
2620
|
+
y: -hr(a).h / 2,
|
|
2621
|
+
width: hr(a).w,
|
|
2622
|
+
height: hr(a).h
|
|
2623
|
+
}, null, 8, Lt)])], 8, It)) : (d(), r("g", Rt, [ee(t.$slots, "node-icon", {
|
|
2577
2624
|
node: a,
|
|
2578
|
-
color:
|
|
2579
|
-
viewMode:
|
|
2625
|
+
color: j(a),
|
|
2626
|
+
viewMode: _.viewMode,
|
|
2580
2627
|
isImage: !1,
|
|
2581
|
-
image:
|
|
2582
|
-
fit:
|
|
2583
|
-
width:
|
|
2584
|
-
height:
|
|
2628
|
+
image: sr(a),
|
|
2629
|
+
fit: lr.value,
|
|
2630
|
+
width: F(a).width,
|
|
2631
|
+
height: F(a).height
|
|
2585
2632
|
}, () => [i("rect", {
|
|
2586
2633
|
x: "-18",
|
|
2587
2634
|
y: "-18",
|
|
2588
2635
|
width: "36",
|
|
2589
2636
|
height: "36",
|
|
2590
2637
|
rx: "6",
|
|
2591
|
-
fill:
|
|
2638
|
+
fill: j(a),
|
|
2592
2639
|
opacity: "0.9"
|
|
2593
|
-
}, null, 8,
|
|
2594
|
-
|
|
2640
|
+
}, null, 8, zt)])])),
|
|
2641
|
+
ua.value ? (d(), r("g", {
|
|
2595
2642
|
key: 2,
|
|
2596
2643
|
transform: Ir(a)
|
|
2597
2644
|
}, [i("circle", {
|
|
2598
2645
|
r: "4",
|
|
2599
|
-
fill:
|
|
2646
|
+
fill: Zn(a).color,
|
|
2600
2647
|
stroke: "#0a0e1a",
|
|
2601
2648
|
"stroke-width": "2"
|
|
2602
|
-
}, null, 8,
|
|
2649
|
+
}, null, 8, Vt)], 8, Bt)) : n("", !0),
|
|
2603
2650
|
i("text", {
|
|
2604
2651
|
y: Br(a),
|
|
2605
2652
|
transform: `rotate(${a.rotation || 0} 0 ${Br(a)})`,
|
|
@@ -2612,58 +2659,58 @@ var y = {
|
|
|
2612
2659
|
key: t,
|
|
2613
2660
|
x: "0",
|
|
2614
2661
|
dy: t === 0 ? 0 : "1.2em"
|
|
2615
|
-
}, m(e), 9,
|
|
2662
|
+
}, m(e), 9, Ut))), 128))], 8, Ht)
|
|
2616
2663
|
], 64)),
|
|
2617
|
-
|
|
2664
|
+
la.value && !M(a) ? (d(), r("g", Wt, [(d(!0), r(e, null, p(Ba(a), (e) => (d(), r("circle", {
|
|
2618
2665
|
key: e.side,
|
|
2619
2666
|
cx: e.x,
|
|
2620
2667
|
cy: e.y,
|
|
2621
2668
|
r: "4.5",
|
|
2622
2669
|
class: "node-handle",
|
|
2623
2670
|
fill: "#0a0e1a",
|
|
2624
|
-
stroke:
|
|
2671
|
+
stroke: j(a),
|
|
2625
2672
|
"stroke-width": "1.5",
|
|
2626
|
-
onPointerdown:
|
|
2627
|
-
onPointermove:
|
|
2628
|
-
onPointerup:
|
|
2629
|
-
onPointercancel:
|
|
2630
|
-
onLostpointercapture:
|
|
2631
|
-
onMousedown: o[0] ||=
|
|
2632
|
-
onClick: o[1] ||=
|
|
2633
|
-
}, null, 40,
|
|
2634
|
-
], 46,
|
|
2635
|
-
|
|
2673
|
+
onPointerdown: g((t) => Ua(t, a.id, e), ["stop", "prevent"]),
|
|
2674
|
+
onPointermove: g($a, ["stop"]),
|
|
2675
|
+
onPointerup: g(eo, ["stop"]),
|
|
2676
|
+
onPointercancel: g(eo, ["stop"]),
|
|
2677
|
+
onLostpointercapture: eo,
|
|
2678
|
+
onMousedown: o[0] ||= g(() => {}, ["stop", "prevent"]),
|
|
2679
|
+
onClick: o[1] ||= g(() => {}, ["stop"])
|
|
2680
|
+
}, null, 40, Gt))), 128))])) : n("", !0)
|
|
2681
|
+
], 46, Tt))), 128)),
|
|
2682
|
+
za.value ? (d(), r("g", Kt, [(d(!0), r(e, null, p(Na(za.value), (e) => (d(), r("rect", {
|
|
2636
2683
|
key: e.side,
|
|
2637
|
-
x:
|
|
2638
|
-
y:
|
|
2684
|
+
x: za.value.x + e.x - 4.5,
|
|
2685
|
+
y: za.value.y + e.y - 4.5,
|
|
2639
2686
|
width: "9",
|
|
2640
2687
|
height: "9",
|
|
2641
2688
|
rx: "2",
|
|
2642
2689
|
class: s(["node-resize-handle", `rt-${e.side}`]),
|
|
2643
|
-
onMousedown:
|
|
2644
|
-
onClick: o[2] ||=
|
|
2645
|
-
}, null, 42,
|
|
2646
|
-
Zr.value ? (d(!0), r(e, { key: 5 }, p(W.value, (t) => (d(), r(e, { key: `front-${t.id}` }, [Gr(t) ? (d(), r("g",
|
|
2690
|
+
onMousedown: g((t) => Fa(t, za.value, e.side), ["stop", "prevent"]),
|
|
2691
|
+
onClick: o[2] ||= g(() => {}, ["stop"])
|
|
2692
|
+
}, null, 42, qt))), 128))])) : n("", !0),
|
|
2693
|
+
Zr.value ? (d(!0), r(e, { key: 5 }, p(W.value, (t) => (d(), r(e, { key: `front-${t.id}` }, [Gr(t) ? (d(), r("g", Jt, [i("path", {
|
|
2647
2694
|
d: $(t),
|
|
2648
2695
|
fill: "none",
|
|
2649
2696
|
stroke: Q(t),
|
|
2650
2697
|
"stroke-width": "2.5",
|
|
2651
2698
|
"stroke-linecap": "round",
|
|
2652
|
-
"marker-end":
|
|
2653
|
-
}, null, 8,
|
|
2699
|
+
"marker-end": go(t)
|
|
2700
|
+
}, null, 8, Yt)])) : n("", !0)], 64))), 128)) : n("", !0),
|
|
2654
2701
|
K.value ? (d(), r("rect", {
|
|
2655
2702
|
key: 6,
|
|
2656
2703
|
class: "marquee-box",
|
|
2657
|
-
x:
|
|
2658
|
-
y:
|
|
2659
|
-
width:
|
|
2660
|
-
height:
|
|
2704
|
+
x: Ni.value.x,
|
|
2705
|
+
y: Ni.value.y,
|
|
2706
|
+
width: Ni.value.width,
|
|
2707
|
+
height: Ni.value.height,
|
|
2661
2708
|
rx: "2",
|
|
2662
2709
|
"vector-effect": "non-scaling-stroke"
|
|
2663
|
-
}, null, 8,
|
|
2664
|
-
], 44,
|
|
2710
|
+
}, null, 8, Xt)) : n("", !0)
|
|
2711
|
+
], 44, se));
|
|
2665
2712
|
}
|
|
2666
|
-
},
|
|
2667
|
-
e.component("Topology",
|
|
2713
|
+
}, fn = { install(e) {
|
|
2714
|
+
e.component("Topology", dn);
|
|
2668
2715
|
} };
|
|
2669
|
-
export {
|
|
2716
|
+
export { dn as Topology, fn as default, oe as nodeColors, b as nodeStates };
|