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