@skydesign/tf 0.3.5 → 0.3.6
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.d.ts +46 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +475 -425
- package/dist/{render-SK2uaqmj.mjs → render-CyerC-P0.mjs} +645 -630
- package/dist/{render-aoKrPS96.js → render-DP-7B8CP.js} +3 -3
- package/dist/server.d.ts +18 -0
- package/dist/server.js +3 -3
- package/dist/server.mjs +66 -61
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Zs(t) {
|
|
2
2
|
return JSON.stringify(JSON.stringify(t)).slice(1, -1);
|
|
3
3
|
}
|
|
4
4
|
function Ct(t) {
|
|
@@ -31,14 +31,14 @@ function wn(t, e) {
|
|
|
31
31
|
kt.prototype = ie.prototype = {
|
|
32
32
|
constructor: kt,
|
|
33
33
|
on: function(t, e) {
|
|
34
|
-
var n = this._, r = wn(t + "", n), i,
|
|
34
|
+
var n = this._, r = wn(t + "", n), i, s = -1, o = r.length;
|
|
35
35
|
if (arguments.length < 2) {
|
|
36
|
-
for (; ++
|
|
36
|
+
for (; ++s < o; ) if ((i = (t = r[s]).type) && (i = vn(n[i], t.name))) return i;
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
if (e != null && typeof e != "function") throw new Error("invalid callback: " + e);
|
|
40
|
-
for (; ++
|
|
41
|
-
if (i = (t = r[
|
|
40
|
+
for (; ++s < o; )
|
|
41
|
+
if (i = (t = r[s]).type) n[i] = he(n[i], t.name, e);
|
|
42
42
|
else if (e == null) for (i in n) n[i] = he(n[i], t.name, null);
|
|
43
43
|
return this;
|
|
44
44
|
},
|
|
@@ -48,13 +48,13 @@ kt.prototype = ie.prototype = {
|
|
|
48
48
|
return new kt(t);
|
|
49
49
|
},
|
|
50
50
|
call: function(t, e) {
|
|
51
|
-
if ((i = arguments.length - 2) > 0) for (var n = new Array(i), r = 0, i,
|
|
51
|
+
if ((i = arguments.length - 2) > 0) for (var n = new Array(i), r = 0, i, s; r < i; ++r) n[r] = arguments[r + 2];
|
|
52
52
|
if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
53
|
-
for (
|
|
53
|
+
for (s = this._[t], r = 0, i = s.length; r < i; ++r) s[r].value.apply(e, n);
|
|
54
54
|
},
|
|
55
55
|
apply: function(t, e, n) {
|
|
56
56
|
if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
57
|
-
for (var r = this._[t], i = 0,
|
|
57
|
+
for (var r = this._[t], i = 0, s = r.length; i < s; ++i) r[i].value.apply(e, n);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
function vn(t, e) {
|
|
@@ -107,9 +107,9 @@ function oe(t) {
|
|
|
107
107
|
function $n(t) {
|
|
108
108
|
typeof t != "function" && (t = oe(t));
|
|
109
109
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
110
|
-
for (var
|
|
111
|
-
(
|
|
112
|
-
return new
|
|
110
|
+
for (var s = e[i], o = s.length, c = r[i] = new Array(o), a, l, u = 0; u < o; ++u)
|
|
111
|
+
(a = s[u]) && (l = t.call(a, a.__data__, u, s)) && ("__data__" in a && (l.__data__ = a.__data__), c[u] = l);
|
|
112
|
+
return new G(r, this._parents);
|
|
113
113
|
}
|
|
114
114
|
function kn(t) {
|
|
115
115
|
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
|
|
@@ -129,10 +129,10 @@ function An(t) {
|
|
|
129
129
|
}
|
|
130
130
|
function In(t) {
|
|
131
131
|
typeof t == "function" ? t = An(t) : t = Ye(t);
|
|
132
|
-
for (var e = this._groups, n = e.length, r = [], i = [],
|
|
133
|
-
for (var o = e[
|
|
134
|
-
(
|
|
135
|
-
return new
|
|
132
|
+
for (var e = this._groups, n = e.length, r = [], i = [], s = 0; s < n; ++s)
|
|
133
|
+
for (var o = e[s], c = o.length, a, l = 0; l < c; ++l)
|
|
134
|
+
(a = o[l]) && (r.push(t.call(a, a.__data__, l, o)), i.push(a));
|
|
135
|
+
return new G(r, i);
|
|
136
136
|
}
|
|
137
137
|
function ze(t) {
|
|
138
138
|
return function() {
|
|
@@ -171,15 +171,15 @@ function Rn(t) {
|
|
|
171
171
|
function Ln(t) {
|
|
172
172
|
typeof t != "function" && (t = ze(t));
|
|
173
173
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
174
|
-
for (var
|
|
175
|
-
(
|
|
176
|
-
return new
|
|
174
|
+
for (var s = e[i], o = s.length, c = r[i] = [], a, l = 0; l < o; ++l)
|
|
175
|
+
(a = s[l]) && t.call(a, a.__data__, l, s) && c.push(a);
|
|
176
|
+
return new G(r, this._parents);
|
|
177
177
|
}
|
|
178
178
|
function Le(t) {
|
|
179
179
|
return new Array(t.length);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return new
|
|
181
|
+
function Bn() {
|
|
182
|
+
return new G(this._enter || this._groups.map(Le), this._parents);
|
|
183
183
|
}
|
|
184
184
|
function Mt(t, e) {
|
|
185
185
|
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
|
|
@@ -199,25 +199,25 @@ Mt.prototype = {
|
|
|
199
199
|
return this._parent.querySelectorAll(t);
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
-
function
|
|
202
|
+
function On(t) {
|
|
203
203
|
return function() {
|
|
204
204
|
return t;
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function Hn(t, e, n, r, i,
|
|
208
|
-
for (var o = 0, c,
|
|
209
|
-
(c = e[o]) ? (c.__data__ =
|
|
210
|
-
for (; o <
|
|
207
|
+
function Hn(t, e, n, r, i, s) {
|
|
208
|
+
for (var o = 0, c, a = e.length, l = s.length; o < l; ++o)
|
|
209
|
+
(c = e[o]) ? (c.__data__ = s[o], r[o] = c) : n[o] = new Mt(t, s[o]);
|
|
210
|
+
for (; o < a; ++o)
|
|
211
211
|
(c = e[o]) && (i[o] = c);
|
|
212
212
|
}
|
|
213
|
-
function Fn(t, e, n, r, i,
|
|
214
|
-
var c,
|
|
213
|
+
function Fn(t, e, n, r, i, s, o) {
|
|
214
|
+
var c, a, l = /* @__PURE__ */ new Map(), u = e.length, f = s.length, h = new Array(u), g;
|
|
215
215
|
for (c = 0; c < u; ++c)
|
|
216
|
-
(
|
|
216
|
+
(a = e[c]) && (h[c] = g = o.call(a, a.__data__, c, e) + "", l.has(g) ? i[c] = a : l.set(g, a));
|
|
217
217
|
for (c = 0; c < f; ++c)
|
|
218
|
-
g = o.call(t,
|
|
218
|
+
g = o.call(t, s[c], c, s) + "", (a = l.get(g)) ? (r[c] = a, a.__data__ = s[c], l.delete(g)) : n[c] = new Mt(t, s[c]);
|
|
219
219
|
for (c = 0; c < u; ++c)
|
|
220
|
-
(
|
|
220
|
+
(a = e[c]) && l.get(h[c]) === a && (i[c] = a);
|
|
221
221
|
}
|
|
222
222
|
function Wn(t) {
|
|
223
223
|
return t.__data__;
|
|
@@ -225,9 +225,9 @@ function Wn(t) {
|
|
|
225
225
|
function Gn(t, e) {
|
|
226
226
|
if (!arguments.length) return Array.from(this, Wn);
|
|
227
227
|
var n = e ? Fn : Hn, r = this._parents, i = this._groups;
|
|
228
|
-
typeof t != "function" && (t =
|
|
229
|
-
for (var
|
|
230
|
-
var u = r[l], f = i[l], h = f.length, g = Vn(t.call(u, u && u.__data__, l, r)), m = g.length, x = c[l] = new Array(m), y = o[l] = new Array(m), p =
|
|
228
|
+
typeof t != "function" && (t = On(t));
|
|
229
|
+
for (var s = i.length, o = new Array(s), c = new Array(s), a = new Array(s), l = 0; l < s; ++l) {
|
|
230
|
+
var u = r[l], f = i[l], h = f.length, g = Vn(t.call(u, u && u.__data__, l, r)), m = g.length, x = c[l] = new Array(m), y = o[l] = new Array(m), p = a[l] = new Array(h);
|
|
231
231
|
n(u, f, x, y, p, g, e);
|
|
232
232
|
for (var w = 0, E = 0, S, $; w < m; ++w)
|
|
233
233
|
if (S = x[w]) {
|
|
@@ -235,30 +235,30 @@ function Gn(t, e) {
|
|
|
235
235
|
S._next = $ || null;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
return o = new
|
|
238
|
+
return o = new G(o, r), o._enter = c, o._exit = a, o;
|
|
239
239
|
}
|
|
240
240
|
function Vn(t) {
|
|
241
241
|
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
242
242
|
}
|
|
243
243
|
function Xn() {
|
|
244
|
-
return new
|
|
244
|
+
return new G(this._exit || this._groups.map(Le), this._parents);
|
|
245
245
|
}
|
|
246
246
|
function qn(t, e, n) {
|
|
247
|
-
var r = this.enter(), i = this,
|
|
248
|
-
return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ?
|
|
247
|
+
var r = this.enter(), i = this, s = this.exit();
|
|
248
|
+
return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ? s.remove() : n(s), r && i ? r.merge(i).order() : i;
|
|
249
249
|
}
|
|
250
250
|
function Un(t) {
|
|
251
|
-
for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length,
|
|
252
|
-
for (var l = n[
|
|
251
|
+
for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, s = r.length, o = Math.min(i, s), c = new Array(i), a = 0; a < o; ++a)
|
|
252
|
+
for (var l = n[a], u = r[a], f = l.length, h = c[a] = new Array(f), g, m = 0; m < f; ++m)
|
|
253
253
|
(g = l[m] || u[m]) && (h[m] = g);
|
|
254
|
-
for (;
|
|
255
|
-
c[
|
|
256
|
-
return new
|
|
254
|
+
for (; a < i; ++a)
|
|
255
|
+
c[a] = n[a];
|
|
256
|
+
return new G(c, this._parents);
|
|
257
257
|
}
|
|
258
258
|
function Zn() {
|
|
259
259
|
for (var t = this._groups, e = -1, n = t.length; ++e < n; )
|
|
260
|
-
for (var r = t[e], i = r.length - 1,
|
|
261
|
-
(o = r[i]) && (
|
|
260
|
+
for (var r = t[e], i = r.length - 1, s = r[i], o; --i >= 0; )
|
|
261
|
+
(o = r[i]) && (s && o.compareDocumentPosition(s) ^ 4 && s.parentNode.insertBefore(o, s), s = o);
|
|
262
262
|
return this;
|
|
263
263
|
}
|
|
264
264
|
function Kn(t) {
|
|
@@ -266,12 +266,12 @@ function Kn(t) {
|
|
|
266
266
|
function e(f, h) {
|
|
267
267
|
return f && h ? t(f.__data__, h.__data__) : !f - !h;
|
|
268
268
|
}
|
|
269
|
-
for (var n = this._groups, r = n.length, i = new Array(r),
|
|
270
|
-
for (var o = n[
|
|
271
|
-
(l = o[u]) && (
|
|
272
|
-
|
|
269
|
+
for (var n = this._groups, r = n.length, i = new Array(r), s = 0; s < r; ++s) {
|
|
270
|
+
for (var o = n[s], c = o.length, a = i[s] = new Array(c), l, u = 0; u < c; ++u)
|
|
271
|
+
(l = o[u]) && (a[u] = l);
|
|
272
|
+
a.sort(e);
|
|
273
273
|
}
|
|
274
|
-
return new
|
|
274
|
+
return new G(i, this._parents).order();
|
|
275
275
|
}
|
|
276
276
|
function Qn(t, e) {
|
|
277
277
|
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
@@ -285,7 +285,7 @@ function jn() {
|
|
|
285
285
|
}
|
|
286
286
|
function tr() {
|
|
287
287
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
288
|
-
for (var r = t[e], i = 0,
|
|
288
|
+
for (var r = t[e], i = 0, s = r.length; i < s; ++i) {
|
|
289
289
|
var o = r[i];
|
|
290
290
|
if (o) return o;
|
|
291
291
|
}
|
|
@@ -301,8 +301,8 @@ function nr() {
|
|
|
301
301
|
}
|
|
302
302
|
function rr(t) {
|
|
303
303
|
for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
|
|
304
|
-
for (var i = e[n],
|
|
305
|
-
(c = i[
|
|
304
|
+
for (var i = e[n], s = 0, o = i.length, c; s < o; ++s)
|
|
305
|
+
(c = i[s]) && t.call(c, c.__data__, s, i);
|
|
306
306
|
return this;
|
|
307
307
|
}
|
|
308
308
|
function ir(t) {
|
|
@@ -315,12 +315,12 @@ function or(t) {
|
|
|
315
315
|
this.removeAttributeNS(t.space, t.local);
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function sr(t, e) {
|
|
319
319
|
return function() {
|
|
320
320
|
this.setAttribute(t, e);
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function ar(t, e) {
|
|
324
324
|
return function() {
|
|
325
325
|
this.setAttributeNS(t.space, t.local, e);
|
|
326
326
|
};
|
|
@@ -343,9 +343,9 @@ function ur(t, e) {
|
|
|
343
343
|
var r = this.node();
|
|
344
344
|
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
345
345
|
}
|
|
346
|
-
return this.each((e == null ? n.local ? or : ir : typeof e == "function" ? n.local ? lr : cr : n.local ?
|
|
346
|
+
return this.each((e == null ? n.local ? or : ir : typeof e == "function" ? n.local ? lr : cr : n.local ? ar : sr)(n, e));
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Be(t) {
|
|
349
349
|
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
|
|
350
350
|
}
|
|
351
351
|
function fr(t) {
|
|
@@ -368,7 +368,7 @@ function gr(t, e, n) {
|
|
|
368
368
|
return arguments.length > 1 ? this.each((e == null ? fr : typeof e == "function" ? dr : hr)(t, e, n ?? "")) : lt(this.node(), t);
|
|
369
369
|
}
|
|
370
370
|
function lt(t, e) {
|
|
371
|
-
return t.style.getPropertyValue(e) ||
|
|
371
|
+
return t.style.getPropertyValue(e) || Be(t).getComputedStyle(t, null).getPropertyValue(e);
|
|
372
372
|
}
|
|
373
373
|
function pr(t) {
|
|
374
374
|
return function() {
|
|
@@ -389,14 +389,14 @@ function yr(t, e) {
|
|
|
389
389
|
function xr(t, e) {
|
|
390
390
|
return arguments.length > 1 ? this.each((e == null ? pr : typeof e == "function" ? yr : mr)(t, e)) : this.node()[t];
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Oe(t) {
|
|
393
393
|
return t.trim().split(/^|\s+/);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function se(t) {
|
|
396
396
|
return t.classList || new He(t);
|
|
397
397
|
}
|
|
398
398
|
function He(t) {
|
|
399
|
-
this._node = t, this._names =
|
|
399
|
+
this._node = t, this._names = Oe(t.getAttribute("class") || "");
|
|
400
400
|
}
|
|
401
401
|
He.prototype = {
|
|
402
402
|
add: function(t) {
|
|
@@ -412,10 +412,10 @@ He.prototype = {
|
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
function Fe(t, e) {
|
|
415
|
-
for (var n =
|
|
415
|
+
for (var n = se(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
|
|
416
416
|
}
|
|
417
417
|
function We(t, e) {
|
|
418
|
-
for (var n =
|
|
418
|
+
for (var n = se(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
|
|
419
419
|
}
|
|
420
420
|
function _r(t) {
|
|
421
421
|
return function() {
|
|
@@ -433,9 +433,9 @@ function vr(t, e) {
|
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
435
|
function br(t, e) {
|
|
436
|
-
var n =
|
|
436
|
+
var n = Oe(t + "");
|
|
437
437
|
if (arguments.length < 2) {
|
|
438
|
-
for (var r =
|
|
438
|
+
for (var r = se(this.node()), i = -1, s = n.length; ++i < s; ) if (!r.contains(n[i])) return !1;
|
|
439
439
|
return !0;
|
|
440
440
|
}
|
|
441
441
|
return this.each((typeof e == "function" ? vr : e ? _r : wr)(n, e));
|
|
@@ -505,10 +505,10 @@ function Lr() {
|
|
|
505
505
|
var t = this.parentNode;
|
|
506
506
|
t && t.removeChild(this);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Br() {
|
|
509
509
|
return this.each(Lr);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Or() {
|
|
512
512
|
var t = this.cloneNode(!1), e = this.parentNode;
|
|
513
513
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
514
514
|
}
|
|
@@ -517,7 +517,7 @@ function Hr() {
|
|
|
517
517
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
518
518
|
}
|
|
519
519
|
function Fr(t) {
|
|
520
|
-
return this.select(t ? Hr :
|
|
520
|
+
return this.select(t ? Hr : Or);
|
|
521
521
|
}
|
|
522
522
|
function Wr(t) {
|
|
523
523
|
return arguments.length ? this.property("__data__", t) : this.node().__data__;
|
|
@@ -537,42 +537,42 @@ function Xr(t) {
|
|
|
537
537
|
return function() {
|
|
538
538
|
var e = this.__on;
|
|
539
539
|
if (e) {
|
|
540
|
-
for (var n = 0, r = -1, i = e.length,
|
|
541
|
-
|
|
540
|
+
for (var n = 0, r = -1, i = e.length, s; n < i; ++n)
|
|
541
|
+
s = e[n], (!t.type || s.type === t.type) && s.name === t.name ? this.removeEventListener(s.type, s.listener, s.options) : e[++r] = s;
|
|
542
542
|
++r ? e.length = r : delete this.__on;
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
546
|
function qr(t, e, n) {
|
|
547
547
|
return function() {
|
|
548
|
-
var r = this.__on, i,
|
|
548
|
+
var r = this.__on, i, s = Gr(e);
|
|
549
549
|
if (r) {
|
|
550
550
|
for (var o = 0, c = r.length; o < c; ++o)
|
|
551
551
|
if ((i = r[o]).type === t.type && i.name === t.name) {
|
|
552
|
-
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener =
|
|
552
|
+
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = s, i.options = n), i.value = e;
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
this.addEventListener(t.type,
|
|
556
|
+
this.addEventListener(t.type, s, n), i = { type: t.type, name: t.name, value: e, listener: s, options: n }, r ? r.push(i) : this.__on = [i];
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
559
|
function Ur(t, e, n) {
|
|
560
|
-
var r = Vr(t + ""), i,
|
|
560
|
+
var r = Vr(t + ""), i, s = r.length, o;
|
|
561
561
|
if (arguments.length < 2) {
|
|
562
562
|
var c = this.node().__on;
|
|
563
563
|
if (c) {
|
|
564
|
-
for (var
|
|
565
|
-
for (i = 0, u = c[
|
|
564
|
+
for (var a = 0, l = c.length, u; a < l; ++a)
|
|
565
|
+
for (i = 0, u = c[a]; i < s; ++i)
|
|
566
566
|
if ((o = r[i]).type === u.type && o.name === u.name)
|
|
567
567
|
return u.value;
|
|
568
568
|
}
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
|
-
for (c = e ? qr : Xr, i = 0; i <
|
|
571
|
+
for (c = e ? qr : Xr, i = 0; i < s; ++i) this.each(c(r[i], e, n));
|
|
572
572
|
return this;
|
|
573
573
|
}
|
|
574
574
|
function Ge(t, e, n) {
|
|
575
|
-
var r =
|
|
575
|
+
var r = Be(t), i = r.CustomEvent;
|
|
576
576
|
typeof i == "function" ? i = new i(e, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(e, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
|
|
577
577
|
}
|
|
578
578
|
function Zr(t, e) {
|
|
@@ -590,28 +590,28 @@ function Qr(t, e) {
|
|
|
590
590
|
}
|
|
591
591
|
function* Jr() {
|
|
592
592
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
593
|
-
for (var r = t[e], i = 0,
|
|
593
|
+
for (var r = t[e], i = 0, s = r.length, o; i < s; ++i)
|
|
594
594
|
(o = r[i]) && (yield o);
|
|
595
595
|
}
|
|
596
596
|
var Ve = [null];
|
|
597
|
-
function
|
|
597
|
+
function G(t, e) {
|
|
598
598
|
this._groups = t, this._parents = e;
|
|
599
599
|
}
|
|
600
600
|
function wt() {
|
|
601
|
-
return new
|
|
601
|
+
return new G([[document.documentElement]], Ve);
|
|
602
602
|
}
|
|
603
603
|
function jr() {
|
|
604
604
|
return this;
|
|
605
605
|
}
|
|
606
|
-
|
|
607
|
-
constructor:
|
|
606
|
+
G.prototype = wt.prototype = {
|
|
607
|
+
constructor: G,
|
|
608
608
|
select: $n,
|
|
609
609
|
selectAll: In,
|
|
610
610
|
selectChild: Dn,
|
|
611
611
|
selectChildren: Rn,
|
|
612
612
|
filter: Ln,
|
|
613
613
|
data: Gn,
|
|
614
|
-
enter:
|
|
614
|
+
enter: Bn,
|
|
615
615
|
exit: Xn,
|
|
616
616
|
join: qn,
|
|
617
617
|
merge: Un,
|
|
@@ -634,15 +634,15 @@ W.prototype = wt.prototype = {
|
|
|
634
634
|
lower: Pr,
|
|
635
635
|
append: Yr,
|
|
636
636
|
insert: Rr,
|
|
637
|
-
remove:
|
|
637
|
+
remove: Br,
|
|
638
638
|
clone: Fr,
|
|
639
639
|
datum: Wr,
|
|
640
640
|
on: Ur,
|
|
641
641
|
dispatch: Qr,
|
|
642
642
|
[Symbol.iterator]: Jr
|
|
643
643
|
};
|
|
644
|
-
function
|
|
645
|
-
return typeof t == "string" ? new
|
|
644
|
+
function z(t) {
|
|
645
|
+
return typeof t == "string" ? new G([[document.querySelector(t)]], [document.documentElement]) : new G([[t]], Ve);
|
|
646
646
|
}
|
|
647
647
|
function ti(t) {
|
|
648
648
|
let e;
|
|
@@ -668,16 +668,16 @@ function Ut(t) {
|
|
|
668
668
|
t.preventDefault(), t.stopImmediatePropagation();
|
|
669
669
|
}
|
|
670
670
|
function ei(t) {
|
|
671
|
-
var e = t.document.documentElement, n =
|
|
671
|
+
var e = t.document.documentElement, n = z(t).on("dragstart.drag", Ut, qt);
|
|
672
672
|
"onselectstart" in e ? n.on("selectstart.drag", Ut, qt) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
|
|
673
673
|
}
|
|
674
674
|
function ni(t, e) {
|
|
675
|
-
var n = t.document.documentElement, r =
|
|
675
|
+
var n = t.document.documentElement, r = z(t).on("dragstart.drag", null);
|
|
676
676
|
e && (r.on("click.drag", Ut, qt), setTimeout(function() {
|
|
677
677
|
r.on("click.drag", null);
|
|
678
678
|
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function ae(t, e, n) {
|
|
681
681
|
t.prototype = e.prototype = n, n.constructor = t;
|
|
682
682
|
}
|
|
683
683
|
function Xe(t, e) {
|
|
@@ -687,7 +687,7 @@ function Xe(t, e) {
|
|
|
687
687
|
}
|
|
688
688
|
function vt() {
|
|
689
689
|
}
|
|
690
|
-
var pt = 0.7, Dt = 1 / pt, ct = "\\s*([+-]?\\d+)\\s*", mt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
690
|
+
var pt = 0.7, Dt = 1 / pt, ct = "\\s*([+-]?\\d+)\\s*", mt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Z = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ri = /^#([0-9a-f]{3,8})$/, ii = new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`), oi = new RegExp(`^rgb\\(${Z},${Z},${Z}\\)$`), si = new RegExp(`^rgba\\(${ct},${ct},${ct},${mt}\\)$`), ai = new RegExp(`^rgba\\(${Z},${Z},${Z},${mt}\\)$`), ci = new RegExp(`^hsl\\(${mt},${Z},${Z}\\)$`), li = new RegExp(`^hsla\\(${mt},${Z},${Z},${mt}\\)$`), ge = {
|
|
691
691
|
aliceblue: 15792383,
|
|
692
692
|
antiquewhite: 16444375,
|
|
693
693
|
aqua: 65535,
|
|
@@ -837,7 +837,7 @@ var pt = 0.7, Dt = 1 / pt, ct = "\\s*([+-]?\\d+)\\s*", mt = "\\s*([+-]?(?:\\d*\\
|
|
|
837
837
|
yellow: 16776960,
|
|
838
838
|
yellowgreen: 10145074
|
|
839
839
|
};
|
|
840
|
-
|
|
840
|
+
ae(vt, yt, {
|
|
841
841
|
copy(t) {
|
|
842
842
|
return Object.assign(new this.constructor(), this, t);
|
|
843
843
|
},
|
|
@@ -866,7 +866,7 @@ function me() {
|
|
|
866
866
|
}
|
|
867
867
|
function yt(t) {
|
|
868
868
|
var e, n;
|
|
869
|
-
return t = (t + "").trim().toLowerCase(), (e = ri.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? ye(e) : n === 3 ? new F(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? bt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? bt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = ii.exec(t)) ? new F(e[1], e[2], e[3], 1) : (e = oi.exec(t)) ? new F(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e =
|
|
869
|
+
return t = (t + "").trim().toLowerCase(), (e = ri.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? ye(e) : n === 3 ? new F(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? bt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? bt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = ii.exec(t)) ? new F(e[1], e[2], e[3], 1) : (e = oi.exec(t)) ? new F(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = si.exec(t)) ? bt(e[1], e[2], e[3], e[4]) : (e = ai.exec(t)) ? bt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = ci.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, 1) : (e = li.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, e[4]) : ge.hasOwnProperty(t) ? ye(ge[t]) : t === "transparent" ? new F(NaN, NaN, NaN, 0) : null;
|
|
870
870
|
}
|
|
871
871
|
function ye(t) {
|
|
872
872
|
return new F(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
|
|
@@ -883,7 +883,7 @@ function Zt(t, e, n, r) {
|
|
|
883
883
|
function F(t, e, n, r) {
|
|
884
884
|
this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
ae(F, Zt, Xe(vt, {
|
|
887
887
|
brighter(t) {
|
|
888
888
|
return t = t == null ? Dt : Math.pow(Dt, t), new F(this.r * t, this.g * t, this.b * t, this.opacity);
|
|
889
889
|
},
|
|
@@ -894,7 +894,7 @@ se(F, Zt, Xe(vt, {
|
|
|
894
894
|
return this;
|
|
895
895
|
},
|
|
896
896
|
clamp() {
|
|
897
|
-
return new F(
|
|
897
|
+
return new F(st(this.r), st(this.g), st(this.b), Pt(this.opacity));
|
|
898
898
|
},
|
|
899
899
|
displayable() {
|
|
900
900
|
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
@@ -914,40 +914,40 @@ function di() {
|
|
|
914
914
|
}
|
|
915
915
|
function _e() {
|
|
916
916
|
const t = Pt(this.opacity);
|
|
917
|
-
return `${t === 1 ? "rgb(" : "rgba("}${
|
|
917
|
+
return `${t === 1 ? "rgb(" : "rgba("}${st(this.r)}, ${st(this.g)}, ${st(this.b)}${t === 1 ? ")" : `, ${t})`}`;
|
|
918
918
|
}
|
|
919
919
|
function Pt(t) {
|
|
920
920
|
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function st(t) {
|
|
923
923
|
return Math.max(0, Math.min(255, Math.round(t) || 0));
|
|
924
924
|
}
|
|
925
925
|
function ot(t) {
|
|
926
|
-
return t =
|
|
926
|
+
return t = st(t), (t < 16 ? "0" : "") + t.toString(16);
|
|
927
927
|
}
|
|
928
928
|
function we(t, e, n, r) {
|
|
929
|
-
return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new
|
|
929
|
+
return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new q(t, e, n, r);
|
|
930
930
|
}
|
|
931
931
|
function qe(t) {
|
|
932
|
-
if (t instanceof
|
|
933
|
-
if (t instanceof vt || (t = yt(t)), !t) return new
|
|
934
|
-
if (t instanceof
|
|
932
|
+
if (t instanceof q) return new q(t.h, t.s, t.l, t.opacity);
|
|
933
|
+
if (t instanceof vt || (t = yt(t)), !t) return new q();
|
|
934
|
+
if (t instanceof q) return t;
|
|
935
935
|
t = t.rgb();
|
|
936
|
-
var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r),
|
|
937
|
-
return c ? (e ===
|
|
936
|
+
var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), s = Math.max(e, n, r), o = NaN, c = s - i, a = (s + i) / 2;
|
|
937
|
+
return c ? (e === s ? o = (n - r) / c + (n < r) * 6 : n === s ? o = (r - e) / c + 2 : o = (e - n) / c + 4, c /= a < 0.5 ? s + i : 2 - s - i, o *= 60) : c = a > 0 && a < 1 ? 0 : o, new q(o, c, a, t.opacity);
|
|
938
938
|
}
|
|
939
939
|
function gi(t, e, n, r) {
|
|
940
|
-
return arguments.length === 1 ? qe(t) : new
|
|
940
|
+
return arguments.length === 1 ? qe(t) : new q(t, e, n, r ?? 1);
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function q(t, e, n, r) {
|
|
943
943
|
this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
|
|
944
944
|
}
|
|
945
|
-
|
|
945
|
+
ae(q, gi, Xe(vt, {
|
|
946
946
|
brighter(t) {
|
|
947
|
-
return t = t == null ? Dt : Math.pow(Dt, t), new
|
|
947
|
+
return t = t == null ? Dt : Math.pow(Dt, t), new q(this.h, this.s, this.l * t, this.opacity);
|
|
948
948
|
},
|
|
949
949
|
darker(t) {
|
|
950
|
-
return t = t == null ? pt : Math.pow(pt, t), new
|
|
950
|
+
return t = t == null ? pt : Math.pow(pt, t), new q(this.h, this.s, this.l * t, this.opacity);
|
|
951
951
|
},
|
|
952
952
|
rgb() {
|
|
953
953
|
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
|
|
@@ -959,7 +959,7 @@ se(X, gi, Xe(vt, {
|
|
|
959
959
|
);
|
|
960
960
|
},
|
|
961
961
|
clamp() {
|
|
962
|
-
return new
|
|
962
|
+
return new q(ve(this.h), Et(this.s), Et(this.l), Pt(this.opacity));
|
|
963
963
|
},
|
|
964
964
|
displayable() {
|
|
965
965
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
@@ -1000,10 +1000,10 @@ function Ze(t, e) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
const be = (function t(e) {
|
|
1002
1002
|
var n = yi(e);
|
|
1003
|
-
function r(i,
|
|
1004
|
-
var o = n((i = Zt(i)).r, (
|
|
1003
|
+
function r(i, s) {
|
|
1004
|
+
var o = n((i = Zt(i)).r, (s = Zt(s)).r), c = n(i.g, s.g), a = n(i.b, s.b), l = Ze(i.opacity, s.opacity);
|
|
1005
1005
|
return function(u) {
|
|
1006
|
-
return i.r = o(u), i.g = c(u), i.b =
|
|
1006
|
+
return i.r = o(u), i.g = c(u), i.b = a(u), i.opacity = l(u), i + "";
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
1009
|
return r.gamma = t, r;
|
|
@@ -1025,11 +1025,11 @@ function _i(t) {
|
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
1027
|
function wi(t, e) {
|
|
1028
|
-
var n = Kt.lastIndex = Gt.lastIndex = 0, r, i,
|
|
1028
|
+
var n = Kt.lastIndex = Gt.lastIndex = 0, r, i, s, o = -1, c = [], a = [];
|
|
1029
1029
|
for (t = t + "", e = e + ""; (r = Kt.exec(t)) && (i = Gt.exec(e)); )
|
|
1030
|
-
(
|
|
1031
|
-
return n < e.length && (
|
|
1032
|
-
for (var u = 0, f; u < e; ++u) c[(f =
|
|
1030
|
+
(s = i.index) > n && (s = e.slice(n, s), c[o] ? c[o] += s : c[++o] = s), (r = r[0]) === (i = i[0]) ? c[o] ? c[o] += i : c[++o] = i : (c[++o] = null, a.push({ i: o, x: et(r, i) })), n = Gt.lastIndex;
|
|
1031
|
+
return n < e.length && (s = e.slice(n), c[o] ? c[o] += s : c[++o] = s), c.length < 2 ? a[0] ? _i(a[0].x) : xi(e) : (e = a.length, function(l) {
|
|
1032
|
+
for (var u = 0, f; u < e; ++u) c[(f = a[u]).i] = f.x(l);
|
|
1033
1033
|
return c.join("");
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
@@ -1041,13 +1041,13 @@ var Ee = 180 / Math.PI, Qt = {
|
|
|
1041
1041
|
scaleX: 1,
|
|
1042
1042
|
scaleY: 1
|
|
1043
1043
|
};
|
|
1044
|
-
function Ke(t, e, n, r, i,
|
|
1045
|
-
var o, c,
|
|
1046
|
-
return (o = Math.sqrt(t * t + e * e)) && (t /= o, e /= o), (
|
|
1044
|
+
function Ke(t, e, n, r, i, s) {
|
|
1045
|
+
var o, c, a;
|
|
1046
|
+
return (o = Math.sqrt(t * t + e * e)) && (t /= o, e /= o), (a = t * n + e * r) && (n -= t * a, r -= e * a), (c = Math.sqrt(n * n + r * r)) && (n /= c, r /= c, a /= c), t * r < e * n && (t = -t, e = -e, a = -a, o = -o), {
|
|
1047
1047
|
translateX: i,
|
|
1048
|
-
translateY:
|
|
1048
|
+
translateY: s,
|
|
1049
1049
|
rotate: Math.atan2(e, t) * Ee,
|
|
1050
|
-
skewX: Math.atan(
|
|
1050
|
+
skewX: Math.atan(a) * Ee,
|
|
1051
1051
|
scaleX: o,
|
|
1052
1052
|
scaleY: c
|
|
1053
1053
|
};
|
|
@@ -1064,7 +1064,7 @@ function Qe(t, e, n, r) {
|
|
|
1064
1064
|
function i(l) {
|
|
1065
1065
|
return l.length ? l.pop() + " " : "";
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function s(l, u, f, h, g, m) {
|
|
1068
1068
|
if (l !== f || u !== h) {
|
|
1069
1069
|
var x = g.push("translate(", null, e, null, n);
|
|
1070
1070
|
m.push({ i: x - 4, x: et(l, f) }, { i: x - 2, x: et(u, h) });
|
|
@@ -1076,7 +1076,7 @@ function Qe(t, e, n, r) {
|
|
|
1076
1076
|
function c(l, u, f, h) {
|
|
1077
1077
|
l !== u ? h.push({ i: f.push(i(f) + "skewX(", null, r) - 2, x: et(l, u) }) : u && f.push(i(f) + "skewX(" + u + r);
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function a(l, u, f, h, g, m) {
|
|
1080
1080
|
if (l !== f || u !== h) {
|
|
1081
1081
|
var x = g.push(i(g) + "scale(", null, ",", null, ")");
|
|
1082
1082
|
m.push({ i: x - 4, x: et(l, f) }, { i: x - 2, x: et(u, h) });
|
|
@@ -1084,7 +1084,7 @@ function Qe(t, e, n, r) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
return function(l, u) {
|
|
1086
1086
|
var f = [], h = [];
|
|
1087
|
-
return l = t(l), u = t(u),
|
|
1087
|
+
return l = t(l), u = t(u), s(l.translateX, l.translateY, u.translateX, u.translateY, f, h), o(l.rotate, u.rotate, f, h), c(l.skewX, u.skewX, f, h), a(l.scaleX, l.scaleY, u.scaleX, u.scaleY, f, h), l = u = null, function(g) {
|
|
1088
1088
|
for (var m = -1, x = h.length, y; ++m < x; ) f[(y = h[m]).i] = y.x(g);
|
|
1089
1089
|
return f.join("");
|
|
1090
1090
|
};
|
|
@@ -1101,42 +1101,42 @@ function Si(t) {
|
|
|
1101
1101
|
return ((t = Math.exp(2 * t)) - 1) / (t + 1);
|
|
1102
1102
|
}
|
|
1103
1103
|
const Ai = (function t(e, n, r) {
|
|
1104
|
-
function i(
|
|
1105
|
-
var c =
|
|
1104
|
+
function i(s, o) {
|
|
1105
|
+
var c = s[0], a = s[1], l = s[2], u = o[0], f = o[1], h = o[2], g = u - c, m = f - a, x = g * g + m * m, y, p;
|
|
1106
1106
|
if (x < $i)
|
|
1107
1107
|
p = Math.log(h / l) / e, y = function(k) {
|
|
1108
1108
|
return [
|
|
1109
1109
|
c + k * g,
|
|
1110
|
-
|
|
1110
|
+
a + k * m,
|
|
1111
1111
|
l * Math.exp(e * k * p)
|
|
1112
1112
|
];
|
|
1113
1113
|
};
|
|
1114
1114
|
else {
|
|
1115
1115
|
var w = Math.sqrt(x), E = (h * h - l * l + r * x) / (2 * l * n * w), S = (h * h - l * l - r * x) / (2 * h * n * w), $ = Math.log(Math.sqrt(E * E + 1) - E), v = Math.log(Math.sqrt(S * S + 1) - S);
|
|
1116
1116
|
p = (v - $) / e, y = function(k) {
|
|
1117
|
-
var
|
|
1117
|
+
var D = k * p, P = Ne($), C = l / (n * w) * (P * Si(e * D + $) - ki($));
|
|
1118
1118
|
return [
|
|
1119
1119
|
c + C * g,
|
|
1120
|
-
|
|
1121
|
-
l *
|
|
1120
|
+
a + C * m,
|
|
1121
|
+
l * P / Ne(e * D + $)
|
|
1122
1122
|
];
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
1125
|
return y.duration = p * 1e3 * e / Math.SQRT2, y;
|
|
1126
1126
|
}
|
|
1127
|
-
return i.rho = function(
|
|
1128
|
-
var o = Math.max(1e-3, +
|
|
1129
|
-
return t(o, c,
|
|
1127
|
+
return i.rho = function(s) {
|
|
1128
|
+
var o = Math.max(1e-3, +s), c = o * o, a = c * c;
|
|
1129
|
+
return t(o, c, a);
|
|
1130
1130
|
}, i;
|
|
1131
1131
|
})(Math.SQRT2, 2, 4);
|
|
1132
|
-
var ut = 0, dt = 0, ft = 0, Je = 1e3, Yt, gt, zt = 0,
|
|
1132
|
+
var ut = 0, dt = 0, ft = 0, Je = 1e3, Yt, gt, zt = 0, at = 0, Bt = 0, xt = typeof performance == "object" && performance.now ? performance : Date, je = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
|
|
1133
1133
|
setTimeout(t, 17);
|
|
1134
1134
|
};
|
|
1135
1135
|
function ce() {
|
|
1136
|
-
return
|
|
1136
|
+
return at || (je(Ii), at = xt.now() + Bt);
|
|
1137
1137
|
}
|
|
1138
1138
|
function Ii() {
|
|
1139
|
-
|
|
1139
|
+
at = 0;
|
|
1140
1140
|
}
|
|
1141
1141
|
function Rt() {
|
|
1142
1142
|
this._call = this._time = this._next = null;
|
|
@@ -1158,20 +1158,20 @@ function tn(t, e, n) {
|
|
|
1158
1158
|
function Ti() {
|
|
1159
1159
|
ce(), ++ut;
|
|
1160
1160
|
for (var t = Yt, e; t; )
|
|
1161
|
-
(e =
|
|
1161
|
+
(e = at - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
|
|
1162
1162
|
--ut;
|
|
1163
1163
|
}
|
|
1164
1164
|
function $e() {
|
|
1165
|
-
|
|
1165
|
+
at = (zt = xt.now()) + Bt, ut = dt = 0;
|
|
1166
1166
|
try {
|
|
1167
1167
|
Ti();
|
|
1168
1168
|
} finally {
|
|
1169
|
-
ut = 0, Mi(),
|
|
1169
|
+
ut = 0, Mi(), at = 0;
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
function Ci() {
|
|
1173
1173
|
var t = xt.now(), e = t - zt;
|
|
1174
|
-
e > Je && (
|
|
1174
|
+
e > Je && (Bt -= e, zt = t);
|
|
1175
1175
|
}
|
|
1176
1176
|
function Mi() {
|
|
1177
1177
|
for (var t, e = Yt, n, r = 1 / 0; e; )
|
|
@@ -1181,8 +1181,8 @@ function Mi() {
|
|
|
1181
1181
|
function Jt(t) {
|
|
1182
1182
|
if (!ut) {
|
|
1183
1183
|
dt && (dt = clearTimeout(dt));
|
|
1184
|
-
var e = t -
|
|
1185
|
-
e > 24 ? (t < 1 / 0 && (dt = setTimeout($e, t - xt.now() -
|
|
1184
|
+
var e = t - at;
|
|
1185
|
+
e > 24 ? (t < 1 / 0 && (dt = setTimeout($e, t - xt.now() - Bt)), ft && (ft = clearInterval(ft))) : (ft || (zt = xt.now(), ft = setInterval(Ci, Je)), ut = 1, je($e));
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
1188
|
function ke(t, e, n) {
|
|
@@ -1192,7 +1192,7 @@ function ke(t, e, n) {
|
|
|
1192
1192
|
}, e, n), r;
|
|
1193
1193
|
}
|
|
1194
1194
|
var Di = ie("start", "end", "cancel", "interrupt"), Pi = [], en = 0, Se = 1, jt = 2, St = 3, Ae = 4, te = 5, At = 6;
|
|
1195
|
-
function
|
|
1195
|
+
function Ot(t, e, n, r, i, s) {
|
|
1196
1196
|
var o = t.__transition;
|
|
1197
1197
|
if (!o) t.__transition = {};
|
|
1198
1198
|
else if (n in o) return;
|
|
@@ -1204,38 +1204,38 @@ function Bt(t, e, n, r, i, a) {
|
|
|
1204
1204
|
// For context during callback.
|
|
1205
1205
|
on: Di,
|
|
1206
1206
|
tween: Pi,
|
|
1207
|
-
time:
|
|
1208
|
-
delay:
|
|
1209
|
-
duration:
|
|
1210
|
-
ease:
|
|
1207
|
+
time: s.time,
|
|
1208
|
+
delay: s.delay,
|
|
1209
|
+
duration: s.duration,
|
|
1210
|
+
ease: s.ease,
|
|
1211
1211
|
timer: null,
|
|
1212
1212
|
state: en
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
1215
|
function le(t, e) {
|
|
1216
|
-
var n =
|
|
1216
|
+
var n = U(t, e);
|
|
1217
1217
|
if (n.state > en) throw new Error("too late; already scheduled");
|
|
1218
1218
|
return n;
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1221
|
-
var n =
|
|
1220
|
+
function K(t, e) {
|
|
1221
|
+
var n = U(t, e);
|
|
1222
1222
|
if (n.state > St) throw new Error("too late; already running");
|
|
1223
1223
|
return n;
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function U(t, e) {
|
|
1226
1226
|
var n = t.__transition;
|
|
1227
1227
|
if (!n || !(n = n[e])) throw new Error("transition not found");
|
|
1228
1228
|
return n;
|
|
1229
1229
|
}
|
|
1230
1230
|
function Yi(t, e, n) {
|
|
1231
1231
|
var r = t.__transition, i;
|
|
1232
|
-
r[e] = n, n.timer = tn(
|
|
1233
|
-
function
|
|
1232
|
+
r[e] = n, n.timer = tn(s, 0, n.time);
|
|
1233
|
+
function s(l) {
|
|
1234
1234
|
n.state = Se, n.timer.restart(o, n.delay, n.time), n.delay <= l && o(l - n.delay);
|
|
1235
1235
|
}
|
|
1236
1236
|
function o(l) {
|
|
1237
1237
|
var u, f, h, g;
|
|
1238
|
-
if (n.state !== Se) return
|
|
1238
|
+
if (n.state !== Se) return a();
|
|
1239
1239
|
for (u in r)
|
|
1240
1240
|
if (g = r[u], g.name === n.name) {
|
|
1241
1241
|
if (g.state === St) return ke(o);
|
|
@@ -1250,28 +1250,28 @@ function Yi(t, e, n) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
1252
|
function c(l) {
|
|
1253
|
-
for (var u = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(
|
|
1253
|
+
for (var u = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(a), n.state = te, 1), f = -1, h = i.length; ++f < h; )
|
|
1254
1254
|
i[f].call(t, u);
|
|
1255
|
-
n.state === te && (n.on.call("end", t, t.__data__, n.index, n.group),
|
|
1255
|
+
n.state === te && (n.on.call("end", t, t.__data__, n.index, n.group), a());
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function a() {
|
|
1258
1258
|
n.state = At, n.timer.stop(), delete r[e];
|
|
1259
1259
|
for (var l in r) return;
|
|
1260
1260
|
delete t.__transition;
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
function It(t, e) {
|
|
1264
|
-
var n = t.__transition, r, i,
|
|
1264
|
+
var n = t.__transition, r, i, s = !0, o;
|
|
1265
1265
|
if (n) {
|
|
1266
1266
|
e = e == null ? null : e + "";
|
|
1267
1267
|
for (o in n) {
|
|
1268
1268
|
if ((r = n[o]).name !== e) {
|
|
1269
|
-
|
|
1269
|
+
s = !1;
|
|
1270
1270
|
continue;
|
|
1271
1271
|
}
|
|
1272
1272
|
i = r.state > jt && r.state < te, r.state = At, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", t, t.__data__, r.index, r.group), delete n[o];
|
|
1273
1273
|
}
|
|
1274
|
-
|
|
1274
|
+
s && delete t.__transition;
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
function zi(t) {
|
|
@@ -1282,9 +1282,9 @@ function zi(t) {
|
|
|
1282
1282
|
function Ri(t, e) {
|
|
1283
1283
|
var n, r;
|
|
1284
1284
|
return function() {
|
|
1285
|
-
var i =
|
|
1286
|
-
if (
|
|
1287
|
-
r = n =
|
|
1285
|
+
var i = K(this, t), s = i.tween;
|
|
1286
|
+
if (s !== n) {
|
|
1287
|
+
r = n = s;
|
|
1288
1288
|
for (var o = 0, c = r.length; o < c; ++o)
|
|
1289
1289
|
if (r[o].name === e) {
|
|
1290
1290
|
r = r.slice(), r.splice(o, 1);
|
|
@@ -1298,23 +1298,23 @@ function Li(t, e, n) {
|
|
|
1298
1298
|
var r, i;
|
|
1299
1299
|
if (typeof n != "function") throw new Error();
|
|
1300
1300
|
return function() {
|
|
1301
|
-
var
|
|
1301
|
+
var s = K(this, t), o = s.tween;
|
|
1302
1302
|
if (o !== r) {
|
|
1303
1303
|
i = (r = o).slice();
|
|
1304
|
-
for (var c = { name: e, value: n },
|
|
1305
|
-
if (i[
|
|
1306
|
-
i[
|
|
1304
|
+
for (var c = { name: e, value: n }, a = 0, l = i.length; a < l; ++a)
|
|
1305
|
+
if (i[a].name === e) {
|
|
1306
|
+
i[a] = c;
|
|
1307
1307
|
break;
|
|
1308
1308
|
}
|
|
1309
|
-
|
|
1309
|
+
a === l && i.push(c);
|
|
1310
1310
|
}
|
|
1311
|
-
|
|
1311
|
+
s.tween = i;
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Bi(t, e) {
|
|
1315
1315
|
var n = this._id;
|
|
1316
1316
|
if (t += "", arguments.length < 2) {
|
|
1317
|
-
for (var r =
|
|
1317
|
+
for (var r = U(this.node(), n).tween, i = 0, s = r.length, o; i < s; ++i)
|
|
1318
1318
|
if ((o = r[i]).name === t)
|
|
1319
1319
|
return o.value;
|
|
1320
1320
|
return null;
|
|
@@ -1324,17 +1324,17 @@ function Oi(t, e) {
|
|
|
1324
1324
|
function ue(t, e, n) {
|
|
1325
1325
|
var r = t._id;
|
|
1326
1326
|
return t.each(function() {
|
|
1327
|
-
var i =
|
|
1327
|
+
var i = K(this, r);
|
|
1328
1328
|
(i.value || (i.value = {}))[e] = n.apply(this, arguments);
|
|
1329
1329
|
}), function(i) {
|
|
1330
|
-
return
|
|
1330
|
+
return U(i, r).value[e];
|
|
1331
1331
|
};
|
|
1332
1332
|
}
|
|
1333
1333
|
function nn(t, e) {
|
|
1334
1334
|
var n;
|
|
1335
1335
|
return (typeof e == "number" ? et : e instanceof yt ? be : (n = yt(e)) ? (e = n, be) : wi)(t, e);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Oi(t) {
|
|
1338
1338
|
return function() {
|
|
1339
1339
|
this.removeAttribute(t);
|
|
1340
1340
|
};
|
|
@@ -1345,36 +1345,36 @@ function Hi(t) {
|
|
|
1345
1345
|
};
|
|
1346
1346
|
}
|
|
1347
1347
|
function Fi(t, e, n) {
|
|
1348
|
-
var r, i = n + "",
|
|
1348
|
+
var r, i = n + "", s;
|
|
1349
1349
|
return function() {
|
|
1350
1350
|
var o = this.getAttribute(t);
|
|
1351
|
-
return o === i ? null : o === r ?
|
|
1351
|
+
return o === i ? null : o === r ? s : s = e(r = o, n);
|
|
1352
1352
|
};
|
|
1353
1353
|
}
|
|
1354
1354
|
function Wi(t, e, n) {
|
|
1355
|
-
var r, i = n + "",
|
|
1355
|
+
var r, i = n + "", s;
|
|
1356
1356
|
return function() {
|
|
1357
1357
|
var o = this.getAttributeNS(t.space, t.local);
|
|
1358
|
-
return o === i ? null : o === r ?
|
|
1358
|
+
return o === i ? null : o === r ? s : s = e(r = o, n);
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
1361
|
function Gi(t, e, n) {
|
|
1362
|
-
var r, i,
|
|
1362
|
+
var r, i, s;
|
|
1363
1363
|
return function() {
|
|
1364
|
-
var o, c = n(this),
|
|
1365
|
-
return c == null ? void this.removeAttribute(t) : (o = this.getAttribute(t),
|
|
1364
|
+
var o, c = n(this), a;
|
|
1365
|
+
return c == null ? void this.removeAttribute(t) : (o = this.getAttribute(t), a = c + "", o === a ? null : o === r && a === i ? s : (i = a, s = e(r = o, c)));
|
|
1366
1366
|
};
|
|
1367
1367
|
}
|
|
1368
1368
|
function Vi(t, e, n) {
|
|
1369
|
-
var r, i,
|
|
1369
|
+
var r, i, s;
|
|
1370
1370
|
return function() {
|
|
1371
|
-
var o, c = n(this),
|
|
1372
|
-
return c == null ? void this.removeAttributeNS(t.space, t.local) : (o = this.getAttributeNS(t.space, t.local),
|
|
1371
|
+
var o, c = n(this), a;
|
|
1372
|
+
return c == null ? void this.removeAttributeNS(t.space, t.local) : (o = this.getAttributeNS(t.space, t.local), a = c + "", o === a ? null : o === r && a === i ? s : (i = a, s = e(r = o, c)));
|
|
1373
1373
|
};
|
|
1374
1374
|
}
|
|
1375
1375
|
function Xi(t, e) {
|
|
1376
1376
|
var n = Lt(t), r = n === "transform" ? Ni : nn;
|
|
1377
|
-
return this.attrTween(t, typeof e == "function" ? (n.local ? Vi : Gi)(n, r, ue(this, "attr." + t, e)) : e == null ? (n.local ? Hi :
|
|
1377
|
+
return this.attrTween(t, typeof e == "function" ? (n.local ? Vi : Gi)(n, r, ue(this, "attr." + t, e)) : e == null ? (n.local ? Hi : Oi)(n) : (n.local ? Wi : Fi)(n, r, e));
|
|
1378
1378
|
}
|
|
1379
1379
|
function qi(t, e) {
|
|
1380
1380
|
return function(n) {
|
|
@@ -1389,16 +1389,16 @@ function Ui(t, e) {
|
|
|
1389
1389
|
function Zi(t, e) {
|
|
1390
1390
|
var n, r;
|
|
1391
1391
|
function i() {
|
|
1392
|
-
var
|
|
1393
|
-
return
|
|
1392
|
+
var s = e.apply(this, arguments);
|
|
1393
|
+
return s !== r && (n = (r = s) && Ui(t, s)), n;
|
|
1394
1394
|
}
|
|
1395
1395
|
return i._value = e, i;
|
|
1396
1396
|
}
|
|
1397
1397
|
function Ki(t, e) {
|
|
1398
1398
|
var n, r;
|
|
1399
1399
|
function i() {
|
|
1400
|
-
var
|
|
1401
|
-
return
|
|
1400
|
+
var s = e.apply(this, arguments);
|
|
1401
|
+
return s !== r && (n = (r = s) && qi(t, s)), n;
|
|
1402
1402
|
}
|
|
1403
1403
|
return i._value = e, i;
|
|
1404
1404
|
}
|
|
@@ -1422,55 +1422,55 @@ function ji(t, e) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
function to(t) {
|
|
1424
1424
|
var e = this._id;
|
|
1425
|
-
return arguments.length ? this.each((typeof t == "function" ? Ji : ji)(e, t)) :
|
|
1425
|
+
return arguments.length ? this.each((typeof t == "function" ? Ji : ji)(e, t)) : U(this.node(), e).delay;
|
|
1426
1426
|
}
|
|
1427
1427
|
function eo(t, e) {
|
|
1428
1428
|
return function() {
|
|
1429
|
-
|
|
1429
|
+
K(this, t).duration = +e.apply(this, arguments);
|
|
1430
1430
|
};
|
|
1431
1431
|
}
|
|
1432
1432
|
function no(t, e) {
|
|
1433
1433
|
return e = +e, function() {
|
|
1434
|
-
|
|
1434
|
+
K(this, t).duration = e;
|
|
1435
1435
|
};
|
|
1436
1436
|
}
|
|
1437
1437
|
function ro(t) {
|
|
1438
1438
|
var e = this._id;
|
|
1439
|
-
return arguments.length ? this.each((typeof t == "function" ? eo : no)(e, t)) :
|
|
1439
|
+
return arguments.length ? this.each((typeof t == "function" ? eo : no)(e, t)) : U(this.node(), e).duration;
|
|
1440
1440
|
}
|
|
1441
1441
|
function io(t, e) {
|
|
1442
1442
|
if (typeof e != "function") throw new Error();
|
|
1443
1443
|
return function() {
|
|
1444
|
-
|
|
1444
|
+
K(this, t).ease = e;
|
|
1445
1445
|
};
|
|
1446
1446
|
}
|
|
1447
1447
|
function oo(t) {
|
|
1448
1448
|
var e = this._id;
|
|
1449
|
-
return arguments.length ? this.each(io(e, t)) :
|
|
1449
|
+
return arguments.length ? this.each(io(e, t)) : U(this.node(), e).ease;
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function so(t, e) {
|
|
1452
1452
|
return function() {
|
|
1453
1453
|
var n = e.apply(this, arguments);
|
|
1454
1454
|
if (typeof n != "function") throw new Error();
|
|
1455
|
-
|
|
1455
|
+
K(this, t).ease = n;
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function ao(t) {
|
|
1459
1459
|
if (typeof t != "function") throw new Error();
|
|
1460
|
-
return this.each(
|
|
1460
|
+
return this.each(so(this._id, t));
|
|
1461
1461
|
}
|
|
1462
1462
|
function co(t) {
|
|
1463
1463
|
typeof t != "function" && (t = ze(t));
|
|
1464
1464
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
1465
|
-
for (var
|
|
1466
|
-
(
|
|
1465
|
+
for (var s = e[i], o = s.length, c = r[i] = [], a, l = 0; l < o; ++l)
|
|
1466
|
+
(a = s[l]) && t.call(a, a.__data__, l, s) && c.push(a);
|
|
1467
1467
|
return new tt(r, this._parents, this._name, this._id);
|
|
1468
1468
|
}
|
|
1469
1469
|
function lo(t) {
|
|
1470
1470
|
if (t._id !== this._id) throw new Error();
|
|
1471
|
-
for (var e = this._groups, n = t._groups, r = e.length, i = n.length,
|
|
1472
|
-
for (var
|
|
1473
|
-
(h =
|
|
1471
|
+
for (var e = this._groups, n = t._groups, r = e.length, i = n.length, s = Math.min(r, i), o = new Array(r), c = 0; c < s; ++c)
|
|
1472
|
+
for (var a = e[c], l = n[c], u = a.length, f = o[c] = new Array(u), h, g = 0; g < u; ++g)
|
|
1473
|
+
(h = a[g] || l[g]) && (f[g] = h);
|
|
1474
1474
|
for (; c < r; ++c)
|
|
1475
1475
|
o[c] = e[c];
|
|
1476
1476
|
return new tt(o, this._parents, this._name, this._id);
|
|
@@ -1482,15 +1482,15 @@ function uo(t) {
|
|
|
1482
1482
|
});
|
|
1483
1483
|
}
|
|
1484
1484
|
function fo(t, e, n) {
|
|
1485
|
-
var r, i,
|
|
1485
|
+
var r, i, s = uo(e) ? le : K;
|
|
1486
1486
|
return function() {
|
|
1487
|
-
var o =
|
|
1487
|
+
var o = s(this, t), c = o.on;
|
|
1488
1488
|
c !== r && (i = (r = c).copy()).on(e, n), o.on = i;
|
|
1489
1489
|
};
|
|
1490
1490
|
}
|
|
1491
1491
|
function ho(t, e) {
|
|
1492
1492
|
var n = this._id;
|
|
1493
|
-
return arguments.length < 2 ?
|
|
1493
|
+
return arguments.length < 2 ? U(this.node(), n).on.on(t) : this.each(fo(n, t, e));
|
|
1494
1494
|
}
|
|
1495
1495
|
function go(t) {
|
|
1496
1496
|
return function() {
|
|
@@ -1505,22 +1505,22 @@ function po() {
|
|
|
1505
1505
|
function mo(t) {
|
|
1506
1506
|
var e = this._name, n = this._id;
|
|
1507
1507
|
typeof t != "function" && (t = oe(t));
|
|
1508
|
-
for (var r = this._groups, i = r.length,
|
|
1509
|
-
for (var c = r[o],
|
|
1510
|
-
(u = c[h]) && (f = t.call(u, u.__data__, h, c)) && ("__data__" in u && (f.__data__ = u.__data__), l[h] = f,
|
|
1511
|
-
return new tt(
|
|
1508
|
+
for (var r = this._groups, i = r.length, s = new Array(i), o = 0; o < i; ++o)
|
|
1509
|
+
for (var c = r[o], a = c.length, l = s[o] = new Array(a), u, f, h = 0; h < a; ++h)
|
|
1510
|
+
(u = c[h]) && (f = t.call(u, u.__data__, h, c)) && ("__data__" in u && (f.__data__ = u.__data__), l[h] = f, Ot(l[h], e, n, h, l, U(u, n)));
|
|
1511
|
+
return new tt(s, this._parents, e, n);
|
|
1512
1512
|
}
|
|
1513
1513
|
function yo(t) {
|
|
1514
1514
|
var e = this._name, n = this._id;
|
|
1515
1515
|
typeof t != "function" && (t = Ye(t));
|
|
1516
|
-
for (var r = this._groups, i = r.length,
|
|
1517
|
-
for (var
|
|
1518
|
-
if (u =
|
|
1519
|
-
for (var h = t.call(u, u.__data__, f,
|
|
1520
|
-
(g = h[x]) &&
|
|
1521
|
-
|
|
1516
|
+
for (var r = this._groups, i = r.length, s = [], o = [], c = 0; c < i; ++c)
|
|
1517
|
+
for (var a = r[c], l = a.length, u, f = 0; f < l; ++f)
|
|
1518
|
+
if (u = a[f]) {
|
|
1519
|
+
for (var h = t.call(u, u.__data__, f, a), g, m = U(u, n), x = 0, y = h.length; x < y; ++x)
|
|
1520
|
+
(g = h[x]) && Ot(g, e, n, x, h, m);
|
|
1521
|
+
s.push(h), o.push(u);
|
|
1522
1522
|
}
|
|
1523
|
-
return new tt(
|
|
1523
|
+
return new tt(s, o, e, n);
|
|
1524
1524
|
}
|
|
1525
1525
|
var xo = wt.prototype.constructor;
|
|
1526
1526
|
function _o() {
|
|
@@ -1529,8 +1529,8 @@ function _o() {
|
|
|
1529
1529
|
function wo(t, e) {
|
|
1530
1530
|
var n, r, i;
|
|
1531
1531
|
return function() {
|
|
1532
|
-
var
|
|
1533
|
-
return
|
|
1532
|
+
var s = lt(this, t), o = (this.style.removeProperty(t), lt(this, t));
|
|
1533
|
+
return s === o ? null : s === n && o === r ? i : i = e(n = s, r = o);
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
1536
1536
|
function rn(t) {
|
|
@@ -1539,24 +1539,24 @@ function rn(t) {
|
|
|
1539
1539
|
};
|
|
1540
1540
|
}
|
|
1541
1541
|
function vo(t, e, n) {
|
|
1542
|
-
var r, i = n + "",
|
|
1542
|
+
var r, i = n + "", s;
|
|
1543
1543
|
return function() {
|
|
1544
1544
|
var o = lt(this, t);
|
|
1545
|
-
return o === i ? null : o === r ?
|
|
1545
|
+
return o === i ? null : o === r ? s : s = e(r = o, n);
|
|
1546
1546
|
};
|
|
1547
1547
|
}
|
|
1548
1548
|
function bo(t, e, n) {
|
|
1549
|
-
var r, i,
|
|
1549
|
+
var r, i, s;
|
|
1550
1550
|
return function() {
|
|
1551
|
-
var o = lt(this, t), c = n(this),
|
|
1552
|
-
return c == null && (
|
|
1551
|
+
var o = lt(this, t), c = n(this), a = c + "";
|
|
1552
|
+
return c == null && (a = c = (this.style.removeProperty(t), lt(this, t))), o === a ? null : o === r && a === i ? s : (i = a, s = e(r = o, c));
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
1555
|
function Eo(t, e) {
|
|
1556
|
-
var n, r, i,
|
|
1556
|
+
var n, r, i, s = "style." + e, o = "end." + s, c;
|
|
1557
1557
|
return function() {
|
|
1558
|
-
var
|
|
1559
|
-
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u),
|
|
1558
|
+
var a = K(this, t), l = a.on, u = a.value[s] == null ? c || (c = rn(e)) : void 0;
|
|
1559
|
+
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), a.on = r;
|
|
1560
1560
|
};
|
|
1561
1561
|
}
|
|
1562
1562
|
function No(t, e, n) {
|
|
@@ -1570,11 +1570,11 @@ function $o(t, e, n) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
function ko(t, e, n) {
|
|
1572
1572
|
var r, i;
|
|
1573
|
-
function
|
|
1573
|
+
function s() {
|
|
1574
1574
|
var o = e.apply(this, arguments);
|
|
1575
1575
|
return o !== i && (r = (i = o) && $o(t, o, n)), r;
|
|
1576
1576
|
}
|
|
1577
|
-
return
|
|
1577
|
+
return s._value = e, s;
|
|
1578
1578
|
}
|
|
1579
1579
|
function So(t, e, n) {
|
|
1580
1580
|
var r = "style." + (t += "");
|
|
@@ -1618,11 +1618,11 @@ function Do(t) {
|
|
|
1618
1618
|
return this.tween(e, Mo(t));
|
|
1619
1619
|
}
|
|
1620
1620
|
function Po() {
|
|
1621
|
-
for (var t = this._name, e = this._id, n = on(), r = this._groups, i = r.length,
|
|
1622
|
-
for (var o = r[
|
|
1623
|
-
if (
|
|
1624
|
-
var u =
|
|
1625
|
-
|
|
1621
|
+
for (var t = this._name, e = this._id, n = on(), r = this._groups, i = r.length, s = 0; s < i; ++s)
|
|
1622
|
+
for (var o = r[s], c = o.length, a, l = 0; l < c; ++l)
|
|
1623
|
+
if (a = o[l]) {
|
|
1624
|
+
var u = U(a, e);
|
|
1625
|
+
Ot(a, t, n, l, o, {
|
|
1626
1626
|
time: u.time + u.delay + u.duration,
|
|
1627
1627
|
delay: 0,
|
|
1628
1628
|
duration: u.duration,
|
|
@@ -1633,14 +1633,14 @@ function Po() {
|
|
|
1633
1633
|
}
|
|
1634
1634
|
function Yo() {
|
|
1635
1635
|
var t, e, n = this, r = n._id, i = n.size();
|
|
1636
|
-
return new Promise(function(
|
|
1637
|
-
var c = { value: o },
|
|
1638
|
-
--i === 0 &&
|
|
1636
|
+
return new Promise(function(s, o) {
|
|
1637
|
+
var c = { value: o }, a = { value: function() {
|
|
1638
|
+
--i === 0 && s();
|
|
1639
1639
|
} };
|
|
1640
1640
|
n.each(function() {
|
|
1641
|
-
var l =
|
|
1642
|
-
u !== t && (e = (t = u).copy(), e._.cancel.push(c), e._.interrupt.push(c), e._.end.push(
|
|
1643
|
-
}), i === 0 &&
|
|
1641
|
+
var l = K(this, r), u = l.on;
|
|
1642
|
+
u !== t && (e = (t = u).copy(), e._.cancel.push(c), e._.interrupt.push(c), e._.end.push(a)), l.on = e;
|
|
1643
|
+
}), i === 0 && s();
|
|
1644
1644
|
});
|
|
1645
1645
|
}
|
|
1646
1646
|
var zo = 0;
|
|
@@ -1675,11 +1675,11 @@ tt.prototype = {
|
|
|
1675
1675
|
text: To,
|
|
1676
1676
|
textTween: Do,
|
|
1677
1677
|
remove: po,
|
|
1678
|
-
tween:
|
|
1678
|
+
tween: Bi,
|
|
1679
1679
|
delay: to,
|
|
1680
1680
|
duration: ro,
|
|
1681
1681
|
ease: oo,
|
|
1682
|
-
easeVarying:
|
|
1682
|
+
easeVarying: ao,
|
|
1683
1683
|
end: Yo,
|
|
1684
1684
|
[Symbol.iterator]: J[Symbol.iterator]
|
|
1685
1685
|
};
|
|
@@ -1693,22 +1693,22 @@ var Lo = {
|
|
|
1693
1693
|
duration: 250,
|
|
1694
1694
|
ease: Ro
|
|
1695
1695
|
};
|
|
1696
|
-
function
|
|
1696
|
+
function Bo(t, e) {
|
|
1697
1697
|
for (var n; !(n = t.__transition) || !(n = n[e]); )
|
|
1698
1698
|
if (!(t = t.parentNode))
|
|
1699
1699
|
throw new Error(`transition ${e} not found`);
|
|
1700
1700
|
return n;
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function Oo(t) {
|
|
1703
1703
|
var e, n;
|
|
1704
1704
|
t instanceof tt ? (e = t._id, t = t._name) : (e = on(), (n = Lo).time = ce(), t = t == null ? null : t + "");
|
|
1705
|
-
for (var r = this._groups, i = r.length,
|
|
1706
|
-
for (var o = r[
|
|
1707
|
-
(
|
|
1705
|
+
for (var r = this._groups, i = r.length, s = 0; s < i; ++s)
|
|
1706
|
+
for (var o = r[s], c = o.length, a, l = 0; l < c; ++l)
|
|
1707
|
+
(a = o[l]) && Ot(a, t, e, l, o, n || Bo(a, e));
|
|
1708
1708
|
return new tt(r, this._parents, t, e);
|
|
1709
1709
|
}
|
|
1710
1710
|
wt.prototype.interrupt = zi;
|
|
1711
|
-
wt.prototype.transition =
|
|
1711
|
+
wt.prototype.transition = Oo;
|
|
1712
1712
|
const $t = (t) => () => t;
|
|
1713
1713
|
function Ho(t, {
|
|
1714
1714
|
sourceEvent: e,
|
|
@@ -1792,16 +1792,16 @@ function Xo() {
|
|
|
1792
1792
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1793
1793
|
}
|
|
1794
1794
|
function qo(t, e, n) {
|
|
1795
|
-
var r = t.invertX(e[0][0]) - n[0][0], i = t.invertX(e[1][0]) - n[1][0],
|
|
1795
|
+
var r = t.invertX(e[0][0]) - n[0][0], i = t.invertX(e[1][0]) - n[1][0], s = t.invertY(e[0][1]) - n[0][1], o = t.invertY(e[1][1]) - n[1][1];
|
|
1796
1796
|
return t.translate(
|
|
1797
1797
|
i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i),
|
|
1798
|
-
o >
|
|
1798
|
+
o > s ? (s + o) / 2 : Math.min(0, s) || Math.max(0, o)
|
|
1799
1799
|
);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var t = Wo, e = Go, n = qo, r = Vo, i = Xo,
|
|
1801
|
+
function sn() {
|
|
1802
|
+
var t = Wo, e = Go, n = qo, r = Vo, i = Xo, s = [0, 1 / 0], o = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], c = 250, a = Ai, l = ie("start", "zoom", "end"), u, f, h, g = 500, m = 150, x = 0, y = 10;
|
|
1803
1803
|
function p(d) {
|
|
1804
|
-
d.property("__zoom", Ie).on("wheel.zoom",
|
|
1804
|
+
d.property("__zoom", Ie).on("wheel.zoom", D, { passive: !1 }).on("mousedown.zoom", P).on("dblclick.zoom", C).filter(i).on("touchstart.zoom", L).on("touchmove.zoom", B).on("touchend.zoom touchcancel.zoom", V).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1805
1805
|
}
|
|
1806
1806
|
p.transform = function(d, N, _, b) {
|
|
1807
1807
|
var A = d.selection ? d.selection() : d;
|
|
@@ -1815,8 +1815,8 @@ function an() {
|
|
|
1815
1815
|
}, _, b);
|
|
1816
1816
|
}, p.scaleTo = function(d, N, _, b) {
|
|
1817
1817
|
p.transform(d, function() {
|
|
1818
|
-
var A = e.apply(this, arguments), I = this.__zoom, T = _ == null ? S(A) : typeof _ == "function" ? _.apply(this, arguments) : _,
|
|
1819
|
-
return n(E(w(I,
|
|
1818
|
+
var A = e.apply(this, arguments), I = this.__zoom, T = _ == null ? S(A) : typeof _ == "function" ? _.apply(this, arguments) : _, Y = I.invert(T), R = typeof N == "function" ? N.apply(this, arguments) : N;
|
|
1819
|
+
return n(E(w(I, R), T, Y), A, o);
|
|
1820
1820
|
}, _, b);
|
|
1821
1821
|
}, p.translateBy = function(d, N, _, b) {
|
|
1822
1822
|
p.transform(d, function() {
|
|
@@ -1827,15 +1827,15 @@ function an() {
|
|
|
1827
1827
|
}, null, b);
|
|
1828
1828
|
}, p.translateTo = function(d, N, _, b, A) {
|
|
1829
1829
|
p.transform(d, function() {
|
|
1830
|
-
var I = e.apply(this, arguments), T = this.__zoom,
|
|
1831
|
-
return n(Ht.translate(
|
|
1830
|
+
var I = e.apply(this, arguments), T = this.__zoom, Y = b == null ? S(I) : typeof b == "function" ? b.apply(this, arguments) : b;
|
|
1831
|
+
return n(Ht.translate(Y[0], Y[1]).scale(T.k).translate(
|
|
1832
1832
|
typeof N == "function" ? -N.apply(this, arguments) : -N,
|
|
1833
1833
|
typeof _ == "function" ? -_.apply(this, arguments) : -_
|
|
1834
1834
|
), I, o);
|
|
1835
1835
|
}, b, A);
|
|
1836
1836
|
};
|
|
1837
1837
|
function w(d, N) {
|
|
1838
|
-
return N = Math.max(
|
|
1838
|
+
return N = Math.max(s[0], Math.min(s[1], N)), N === d.k ? d : new j(N, d.x, d.y);
|
|
1839
1839
|
}
|
|
1840
1840
|
function E(d, N, _) {
|
|
1841
1841
|
var b = N[0] - _[0] * d.k, A = N[1] - _[1] * d.k;
|
|
@@ -1850,14 +1850,14 @@ function an() {
|
|
|
1850
1850
|
}).on("interrupt.zoom end.zoom", function() {
|
|
1851
1851
|
v(this, arguments).event(b).end();
|
|
1852
1852
|
}).tween("zoom", function() {
|
|
1853
|
-
var A = this, I = arguments, T = v(A, I).event(b),
|
|
1854
|
-
return function(
|
|
1855
|
-
if (
|
|
1853
|
+
var A = this, I = arguments, T = v(A, I).event(b), Y = e.apply(A, I), R = _ == null ? S(Y) : typeof _ == "function" ? _.apply(A, I) : _, W = Math.max(Y[1][0] - Y[0][0], Y[1][1] - Y[0][1]), M = A.__zoom, O = typeof N == "function" ? N.apply(A, I) : N, H = a(M.invert(R).concat(W / M.k), O.invert(R).concat(W / O.k));
|
|
1854
|
+
return function(X) {
|
|
1855
|
+
if (X === 1) X = O;
|
|
1856
1856
|
else {
|
|
1857
|
-
var Q =
|
|
1858
|
-
|
|
1857
|
+
var Q = H(X), Ft = W / Q[2];
|
|
1858
|
+
X = new j(Ft, R[0] - Q[0] * Ft, R[1] - Q[1] * Ft);
|
|
1859
1859
|
}
|
|
1860
|
-
T.zoom(null,
|
|
1860
|
+
T.zoom(null, X);
|
|
1861
1861
|
};
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
@@ -1881,7 +1881,7 @@ function an() {
|
|
|
1881
1881
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
1882
1882
|
},
|
|
1883
1883
|
emit: function(d) {
|
|
1884
|
-
var N =
|
|
1884
|
+
var N = z(this.that).datum();
|
|
1885
1885
|
l.call(
|
|
1886
1886
|
d,
|
|
1887
1887
|
this.that,
|
|
@@ -1895,9 +1895,9 @@ function an() {
|
|
|
1895
1895
|
);
|
|
1896
1896
|
}
|
|
1897
1897
|
};
|
|
1898
|
-
function
|
|
1898
|
+
function D(d, ...N) {
|
|
1899
1899
|
if (!t.apply(this, arguments)) return;
|
|
1900
|
-
var _ = v(this, N).event(d), b = this.__zoom, A = Math.max(
|
|
1900
|
+
var _ = v(this, N).event(d), b = this.__zoom, A = Math.max(s[0], Math.min(s[1], b.k * Math.pow(2, r.apply(this, arguments)))), I = rt(d);
|
|
1901
1901
|
if (_.wheel)
|
|
1902
1902
|
(_.mouse[0][0] !== I[0] || _.mouse[0][1] !== I[1]) && (_.mouse[1] = b.invert(_.mouse[0] = I)), clearTimeout(_.wheel);
|
|
1903
1903
|
else {
|
|
@@ -1909,51 +1909,51 @@ function an() {
|
|
|
1909
1909
|
_.wheel = null, _.end();
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1912
|
+
function P(d, ...N) {
|
|
1913
1913
|
if (h || !t.apply(this, arguments)) return;
|
|
1914
|
-
var _ = d.currentTarget, b = v(this, N, !0).event(d), A =
|
|
1914
|
+
var _ = d.currentTarget, b = v(this, N, !0).event(d), A = z(d.view).on("mousemove.zoom", R, !0).on("mouseup.zoom", W, !0), I = rt(d, _), T = d.clientX, Y = d.clientY;
|
|
1915
1915
|
ei(d.view), Vt(d), b.mouse = [I, this.__zoom.invert(I)], It(this), b.start();
|
|
1916
|
-
function
|
|
1917
|
-
if (ht(
|
|
1918
|
-
var
|
|
1919
|
-
b.moved =
|
|
1916
|
+
function R(M) {
|
|
1917
|
+
if (ht(M), !b.moved) {
|
|
1918
|
+
var O = M.clientX - T, H = M.clientY - Y;
|
|
1919
|
+
b.moved = O * O + H * H > x;
|
|
1920
1920
|
}
|
|
1921
|
-
b.event(
|
|
1921
|
+
b.event(M).zoom("mouse", n(E(b.that.__zoom, b.mouse[0] = rt(M, _), b.mouse[1]), b.extent, o));
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1924
|
-
A.on("mousemove.zoom mouseup.zoom", null), ni(
|
|
1923
|
+
function W(M) {
|
|
1924
|
+
A.on("mousemove.zoom mouseup.zoom", null), ni(M.view, b.moved), ht(M), b.event(M).end();
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
1927
1927
|
function C(d, ...N) {
|
|
1928
1928
|
if (t.apply(this, arguments)) {
|
|
1929
1929
|
var _ = this.__zoom, b = rt(d.changedTouches ? d.changedTouches[0] : d, this), A = _.invert(b), I = _.k * (d.shiftKey ? 0.5 : 2), T = n(E(w(_, I), b, A), e.apply(this, N), o);
|
|
1930
|
-
ht(d), c > 0 ?
|
|
1930
|
+
ht(d), c > 0 ? z(this).transition().duration(c).call($, T, b, d) : z(this).call(p.transform, T, b, d);
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
1933
|
function L(d, ...N) {
|
|
1934
1934
|
if (t.apply(this, arguments)) {
|
|
1935
|
-
var _ = d.touches, b = _.length, A = v(this, N, d.changedTouches.length === b).event(d), I, T,
|
|
1935
|
+
var _ = d.touches, b = _.length, A = v(this, N, d.changedTouches.length === b).event(d), I, T, Y, R;
|
|
1936
1936
|
for (Vt(d), T = 0; T < b; ++T)
|
|
1937
|
-
|
|
1938
|
-
u && (u = clearTimeout(u)), I && (A.taps < 2 && (f =
|
|
1937
|
+
Y = _[T], R = rt(Y, this), R = [R, this.__zoom.invert(R), Y.identifier], A.touch0 ? !A.touch1 && A.touch0[2] !== R[2] && (A.touch1 = R, A.taps = 0) : (A.touch0 = R, I = !0, A.taps = 1 + !!u);
|
|
1938
|
+
u && (u = clearTimeout(u)), I && (A.taps < 2 && (f = R[0], u = setTimeout(function() {
|
|
1939
1939
|
u = null;
|
|
1940
1940
|
}, g)), It(this), A.start());
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
1943
|
function B(d, ...N) {
|
|
1944
1944
|
if (this.__zooming) {
|
|
1945
|
-
var _ = v(this, N).event(d), b = d.changedTouches, A = b.length, I, T,
|
|
1945
|
+
var _ = v(this, N).event(d), b = d.changedTouches, A = b.length, I, T, Y, R;
|
|
1946
1946
|
for (ht(d), I = 0; I < A; ++I)
|
|
1947
|
-
T = b[I],
|
|
1947
|
+
T = b[I], Y = rt(T, this), _.touch0 && _.touch0[2] === T.identifier ? _.touch0[0] = Y : _.touch1 && _.touch1[2] === T.identifier && (_.touch1[0] = Y);
|
|
1948
1948
|
if (T = _.that.__zoom, _.touch1) {
|
|
1949
|
-
var
|
|
1950
|
-
T = w(T, Math.sqrt(
|
|
1951
|
-
} else if (_.touch0)
|
|
1949
|
+
var W = _.touch0[0], M = _.touch0[1], O = _.touch1[0], H = _.touch1[1], X = (X = O[0] - W[0]) * X + (X = O[1] - W[1]) * X, Q = (Q = H[0] - M[0]) * Q + (Q = H[1] - M[1]) * Q;
|
|
1950
|
+
T = w(T, Math.sqrt(X / Q)), Y = [(W[0] + O[0]) / 2, (W[1] + O[1]) / 2], R = [(M[0] + H[0]) / 2, (M[1] + H[1]) / 2];
|
|
1951
|
+
} else if (_.touch0) Y = _.touch0[0], R = _.touch0[1];
|
|
1952
1952
|
else return;
|
|
1953
|
-
_.zoom("touch", n(E(T,
|
|
1953
|
+
_.zoom("touch", n(E(T, Y, R), _.extent, o));
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function V(d, ...N) {
|
|
1957
1957
|
if (this.__zooming) {
|
|
1958
1958
|
var _ = v(this, N).event(d), b = d.changedTouches, A = b.length, I, T;
|
|
1959
1959
|
for (Vt(d), h && clearTimeout(h), h = setTimeout(function() {
|
|
@@ -1962,8 +1962,8 @@ function an() {
|
|
|
1962
1962
|
T = b[I], _.touch0 && _.touch0[2] === T.identifier ? delete _.touch0 : _.touch1 && _.touch1[2] === T.identifier && delete _.touch1;
|
|
1963
1963
|
if (_.touch1 && !_.touch0 && (_.touch0 = _.touch1, delete _.touch1), _.touch0) _.touch0[1] = this.__zoom.invert(_.touch0[0]);
|
|
1964
1964
|
else if (_.end(), _.taps === 2 && (T = rt(T, this), Math.hypot(f[0] - T[0], f[1] - T[1]) < y)) {
|
|
1965
|
-
var
|
|
1966
|
-
|
|
1965
|
+
var Y = z(this).on("dblclick.zoom");
|
|
1966
|
+
Y && Y.apply(this, arguments);
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
@@ -1976,7 +1976,7 @@ function an() {
|
|
|
1976
1976
|
}, p.extent = function(d) {
|
|
1977
1977
|
return arguments.length ? (e = typeof d == "function" ? d : $t([[+d[0][0], +d[0][1]], [+d[1][0], +d[1][1]]]), p) : e;
|
|
1978
1978
|
}, p.scaleExtent = function(d) {
|
|
1979
|
-
return arguments.length ? (
|
|
1979
|
+
return arguments.length ? (s[0] = +d[0], s[1] = +d[1], p) : [s[0], s[1]];
|
|
1980
1980
|
}, p.translateExtent = function(d) {
|
|
1981
1981
|
return arguments.length ? (o[0][0] = +d[0][0], o[1][0] = +d[1][0], o[0][1] = +d[0][1], o[1][1] = +d[1][1], p) : [[o[0][0], o[0][1]], [o[1][0], o[1][1]]];
|
|
1982
1982
|
}, p.constrain = function(d) {
|
|
@@ -1984,7 +1984,7 @@ function an() {
|
|
|
1984
1984
|
}, p.duration = function(d) {
|
|
1985
1985
|
return arguments.length ? (c = +d, p) : c;
|
|
1986
1986
|
}, p.interpolate = function(d) {
|
|
1987
|
-
return arguments.length ? (
|
|
1987
|
+
return arguments.length ? (a = d, p) : a;
|
|
1988
1988
|
}, p.on = function() {
|
|
1989
1989
|
var d = l.on.apply(l, arguments);
|
|
1990
1990
|
return d === l ? p : d;
|
|
@@ -1994,15 +1994,15 @@ function an() {
|
|
|
1994
1994
|
return arguments.length ? (y = +d, p) : y;
|
|
1995
1995
|
}, p;
|
|
1996
1996
|
}
|
|
1997
|
-
const nt = 72, Uo = 240, Zo = 74, Ko = 40 / 74, _t = 16,
|
|
1997
|
+
const nt = 72, Uo = 240, Zo = 74, Ko = 40 / 74, _t = 16, an = 6, cn = "tf-chain-icon", ln = 50, Qo = 80, Jo = 20, jo = 20, ee = 0.9, ts = 16, es = 32, ns = 3, un = 800, fn = [
|
|
1998
1998
|
0,
|
|
1999
1999
|
0,
|
|
2000
2000
|
1e3,
|
|
2001
2001
|
800
|
|
2002
2002
|
], fe = 40;
|
|
2003
2003
|
class hn {
|
|
2004
|
-
constructor(e, n, r, i,
|
|
2005
|
-
this.type = e, this._gvid = n, this.name = r, this._draw_ = i, this._ldraw_ =
|
|
2004
|
+
constructor(e, n, r, i, s) {
|
|
2005
|
+
this.type = e, this._gvid = n, this.name = r, this._draw_ = i, this._ldraw_ = s;
|
|
2006
2006
|
}
|
|
2007
2007
|
}
|
|
2008
2008
|
class dn extends hn {
|
|
@@ -2012,13 +2012,13 @@ class dn extends hn {
|
|
|
2012
2012
|
name: n,
|
|
2013
2013
|
_draw_: r,
|
|
2014
2014
|
_ldraw_: i,
|
|
2015
|
-
bb:
|
|
2015
|
+
bb: s,
|
|
2016
2016
|
pos: o,
|
|
2017
2017
|
width: c,
|
|
2018
|
-
height:
|
|
2018
|
+
height: a,
|
|
2019
2019
|
label: l
|
|
2020
2020
|
}) {
|
|
2021
|
-
super("node", e, n, r, i), this.virtualNode = !1, this.bb =
|
|
2021
|
+
super("node", e, n, r, i), this.virtualNode = !1, this.bb = s, this.pos = o, this.width = c, this.height = a, this.label = l;
|
|
2022
2022
|
}
|
|
2023
2023
|
/**
|
|
2024
2024
|
* Get parsed position as [x, y] coordinates
|
|
@@ -2047,12 +2047,12 @@ class dn extends hn {
|
|
|
2047
2047
|
getBounds() {
|
|
2048
2048
|
const e = this.getPosition();
|
|
2049
2049
|
if (!e) return null;
|
|
2050
|
-
const [n, r] = e, i = this.getWidthPoints(),
|
|
2050
|
+
const [n, r] = e, i = this.getWidthPoints(), s = this.getHeightPoints();
|
|
2051
2051
|
return {
|
|
2052
2052
|
x: n - i / 2,
|
|
2053
|
-
y: r -
|
|
2053
|
+
y: r - s / 2,
|
|
2054
2054
|
width: i,
|
|
2055
|
-
height:
|
|
2055
|
+
height: s
|
|
2056
2056
|
};
|
|
2057
2057
|
}
|
|
2058
2058
|
/**
|
|
@@ -2096,19 +2096,19 @@ class dn extends hn {
|
|
|
2096
2096
|
} : null;
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
|
-
class
|
|
2099
|
+
class rs extends hn {
|
|
2100
2100
|
constructor({
|
|
2101
2101
|
_gvid: e,
|
|
2102
2102
|
name: n,
|
|
2103
2103
|
_draw_: r,
|
|
2104
2104
|
_ldraw_: i,
|
|
2105
|
-
_hdraw_:
|
|
2105
|
+
_hdraw_: s,
|
|
2106
2106
|
_tdraw_: o,
|
|
2107
2107
|
head: c,
|
|
2108
|
-
tail:
|
|
2108
|
+
tail: a,
|
|
2109
2109
|
label: l
|
|
2110
2110
|
}) {
|
|
2111
|
-
if (super("edge", e, n, r, i), this.isBaseEdge = !1, this.depth = 0, this.baseOffset = 0, this.midY = 0, this._hdraw_ =
|
|
2111
|
+
if (super("edge", e, n, r, i), this.isBaseEdge = !1, this.depth = 0, this.baseOffset = 0, this.midY = 0, this._hdraw_ = s, this._tdraw_ = o, this.head = c, this.tail = a, this.label = l, l)
|
|
2112
2112
|
try {
|
|
2113
2113
|
this.edgeContent = Ct(l), this.edgeIndex = this.edgeContent.index, this.edgeColor = this.edgeContent.color;
|
|
2114
2114
|
} catch (u) {
|
|
@@ -2230,7 +2230,7 @@ class gn {
|
|
|
2230
2230
|
return { above: this.aboveY, below: this.belowY };
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
|
-
class
|
|
2233
|
+
class is extends gn {
|
|
2234
2234
|
constructor(e, n = 0) {
|
|
2235
2235
|
super(e, n), this.nodes = [];
|
|
2236
2236
|
}
|
|
@@ -2238,12 +2238,12 @@ class ia extends gn {
|
|
|
2238
2238
|
if (this.nodes.push(e), !n) return;
|
|
2239
2239
|
const r = e.getPosition();
|
|
2240
2240
|
if (r) {
|
|
2241
|
-
const i = e.height ? parseFloat(e.height) * nt : fe,
|
|
2242
|
-
this.aboveY = Math.min(this.aboveY,
|
|
2241
|
+
const i = e.height ? parseFloat(e.height) * nt : fe, s = r[1] - i / 2, o = r[1] + i / 2;
|
|
2242
|
+
this.aboveY = Math.min(this.aboveY, s), this.belowY = Math.max(this.belowY, o);
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
2245
|
}
|
|
2246
|
-
class
|
|
2246
|
+
class os extends gn {
|
|
2247
2247
|
constructor(e, n, r = 0) {
|
|
2248
2248
|
super(Math.min(e, n), r), this.edges = [], this.baseEdgeIndex = -1, this.sourceColIndex = e, this.targetColIndex = n;
|
|
2249
2249
|
}
|
|
@@ -2260,7 +2260,7 @@ class oa extends gn {
|
|
|
2260
2260
|
return `${e}-${n}`;
|
|
2261
2261
|
}
|
|
2262
2262
|
}
|
|
2263
|
-
const
|
|
2263
|
+
const ss = 0.6, as = /mono|fira|consolas|courier|menlo|roboto mono|ui-monospace/i, Te = {
|
|
2264
2264
|
i: 0.27,
|
|
2265
2265
|
l: 0.27,
|
|
2266
2266
|
j: 0.27,
|
|
@@ -2287,35 +2287,35 @@ const aa = 0.6, sa = /mono|fira|consolas|courier|menlo|roboto mono|ui-monospace/
|
|
|
2287
2287
|
W: 0.86,
|
|
2288
2288
|
"@": 0.92
|
|
2289
2289
|
};
|
|
2290
|
-
function
|
|
2290
|
+
function cs(t) {
|
|
2291
2291
|
if (t in Te) return Te[t];
|
|
2292
2292
|
if (t in Ce) return Ce[t];
|
|
2293
2293
|
const e = t.charCodeAt(0);
|
|
2294
2294
|
return e >= 48 && e <= 57 ? 0.57 : e >= 65 && e <= 90 ? 0.66 : e >= 97 && e <= 122 ? 0.53 : e >= 33 && e <= 126 ? 0.5 : e > 11904 ? 1 : 0.55;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2297
|
-
return !!t &&
|
|
2296
|
+
function ls(t) {
|
|
2297
|
+
return !!t && as.test(t);
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function us(t, e, n) {
|
|
2300
2300
|
if (!t) return 0;
|
|
2301
|
-
if (
|
|
2302
|
-
return t.length * n *
|
|
2301
|
+
if (ls(e))
|
|
2302
|
+
return t.length * n * ss;
|
|
2303
2303
|
let r = 0;
|
|
2304
|
-
for (const i of t) r +=
|
|
2304
|
+
for (const i of t) r += cs(i);
|
|
2305
2305
|
return r * n;
|
|
2306
2306
|
}
|
|
2307
2307
|
function ne(t, e, n) {
|
|
2308
|
-
const r = t.attr("font-family") || void 0, i = parseFloat(t.attr("font-size") || "12") || 12,
|
|
2309
|
-
if (t.text(n),
|
|
2308
|
+
const r = t.attr("font-family") || void 0, i = parseFloat(t.attr("font-size") || "12") || 12, s = (l) => us(l, r, i);
|
|
2309
|
+
if (t.text(n), s(n) <= e) return;
|
|
2310
2310
|
const o = "...";
|
|
2311
|
-
let c = 0,
|
|
2312
|
-
for (; c <
|
|
2313
|
-
const l = Math.floor((c +
|
|
2314
|
-
|
|
2311
|
+
let c = 0, a = n.length;
|
|
2312
|
+
for (; c < a; ) {
|
|
2313
|
+
const l = Math.floor((c + a + 1) / 2);
|
|
2314
|
+
s(n.slice(0, l) + o) <= e ? c = l : a = l - 1;
|
|
2315
2315
|
}
|
|
2316
2316
|
c > 0 ? t.text(n.slice(0, c) + o) : t.text(o);
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function fs(t) {
|
|
2319
2319
|
if (!t) return [];
|
|
2320
2320
|
const e = [], n = /<TD[^>]*>(.*?)<\/TD>/gi;
|
|
2321
2321
|
let r;
|
|
@@ -2329,32 +2329,32 @@ function fa(t) {
|
|
|
2329
2329
|
}
|
|
2330
2330
|
return e;
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2333
|
-
var
|
|
2332
|
+
function hs(t) {
|
|
2333
|
+
var s;
|
|
2334
2334
|
if (!t || !/<TABLE/i.test(t)) return null;
|
|
2335
|
-
const e = /<B>([\s\S]*?)<\/B>/i.exec(t), n = e ? e[1].replace(/<[^>]+>/g, "").trim() : "", r = t.replace(/<[^>]+>/g, " "), i = ((
|
|
2335
|
+
const e = /<B>([\s\S]*?)<\/B>/i.exec(t), n = e ? e[1].replace(/<[^>]+>/g, "").trim() : "", r = t.replace(/<[^>]+>/g, " "), i = ((s = /0x[0-9a-fA-F]{8,}/.exec(r)) == null ? void 0 : s[0]) ?? "";
|
|
2336
2336
|
return !n && !i ? null : { tags: [], label: n, text: i };
|
|
2337
2337
|
}
|
|
2338
2338
|
function pn(t, e) {
|
|
2339
2339
|
const n = /^\[(\d+)\]$/.exec(t);
|
|
2340
2340
|
return n ? `[${n[1]}/${e}]` : t;
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function ds(t, e) {
|
|
2343
2343
|
return !t || t.length === 0 ? t : t.map(
|
|
2344
2344
|
(n, r) => r === 0 ? { ...n, text: pn(n.text, e) } : n
|
|
2345
2345
|
);
|
|
2346
2346
|
}
|
|
2347
2347
|
function mn(t, e, n) {
|
|
2348
2348
|
var l;
|
|
2349
|
-
const r =
|
|
2349
|
+
const r = ds((l = t.edgeContent) == null ? void 0 : l.elems, n);
|
|
2350
2350
|
let i = "";
|
|
2351
|
-
r && r.length > 0 && (i = r.map((u) => u.text).join(" ")), i || (i =
|
|
2352
|
-
const
|
|
2351
|
+
r && r.length > 0 && (i = r.map((u) => u.text).join(" ")), i || (i = fs(t.label ?? "").map((f, h) => h === 0 ? pn(f, n) : f).map((f) => f.length > 20 ? f.slice(0, 20) + "..." : f).join(" "));
|
|
2352
|
+
const s = i.length > 60 ? i.slice(0, 60) + "..." : i, o = e.labelFontSize, c = o * 0.6, a = e.labelPadding;
|
|
2353
2353
|
return {
|
|
2354
2354
|
displayElems: r,
|
|
2355
|
-
finalText:
|
|
2356
|
-
boxWidth:
|
|
2357
|
-
boxHeight: o +
|
|
2355
|
+
finalText: s,
|
|
2356
|
+
boxWidth: s.length * c + a * 2,
|
|
2357
|
+
boxHeight: o + a * 2
|
|
2358
2358
|
};
|
|
2359
2359
|
}
|
|
2360
2360
|
const yn = {
|
|
@@ -2379,13 +2379,13 @@ const yn = {
|
|
|
2379
2379
|
nearlyHorizontalThreshold: 5,
|
|
2380
2380
|
nearlyAlignedThreshold: 30
|
|
2381
2381
|
};
|
|
2382
|
-
function
|
|
2382
|
+
function gs(t) {
|
|
2383
2383
|
return {
|
|
2384
2384
|
...yn,
|
|
2385
2385
|
...t
|
|
2386
2386
|
};
|
|
2387
2387
|
}
|
|
2388
|
-
function
|
|
2388
|
+
function ps(t) {
|
|
2389
2389
|
if (t.length < 2) return t;
|
|
2390
2390
|
const e = [t[0]];
|
|
2391
2391
|
for (let n = 1; n < t.length; n++) {
|
|
@@ -2395,13 +2395,13 @@ function pa(t) {
|
|
|
2395
2395
|
return e;
|
|
2396
2396
|
}
|
|
2397
2397
|
function Me(t, e, n) {
|
|
2398
|
-
const { start: r, pathEnd: i, isNearlyHorizontal:
|
|
2398
|
+
const { start: r, pathEnd: i, isNearlyHorizontal: s, startExtensionX: o, endExtensionX: c } = n, a = n.minVerticalSegment, l = Math.abs(r.y - e), u = Math.abs(e - i.y);
|
|
2399
2399
|
let f = [], h = e;
|
|
2400
2400
|
switch (t) {
|
|
2401
2401
|
case "straight":
|
|
2402
|
-
if (
|
|
2402
|
+
if (s) {
|
|
2403
2403
|
const m = (r.y + i.y) / 2;
|
|
2404
|
-
Math.abs(e - m) <
|
|
2404
|
+
Math.abs(e - m) < a ? (f = [r, i], h = m) : (f = [
|
|
2405
2405
|
r,
|
|
2406
2406
|
{ x: o, y: r.y },
|
|
2407
2407
|
// H: horizontal extension
|
|
@@ -2418,7 +2418,7 @@ function Me(t, e, n) {
|
|
|
2418
2418
|
return null;
|
|
2419
2419
|
break;
|
|
2420
2420
|
case "2seg":
|
|
2421
|
-
l < u ? Math.abs(e - r.y) <
|
|
2421
|
+
l < u ? Math.abs(e - r.y) < a ? (f = [r, { x: i.x, y: r.y }, i], h = r.y) : (f = [
|
|
2422
2422
|
r,
|
|
2423
2423
|
{ x: o, y: r.y },
|
|
2424
2424
|
// H: horizontal extension
|
|
@@ -2430,7 +2430,7 @@ function Me(t, e, n) {
|
|
|
2430
2430
|
// V: vertical to end
|
|
2431
2431
|
i
|
|
2432
2432
|
// H: horizontal to end
|
|
2433
|
-
], h = e) : Math.abs(e - i.y) <
|
|
2433
|
+
], h = e) : Math.abs(e - i.y) < a ? (f = [
|
|
2434
2434
|
r,
|
|
2435
2435
|
{ x: o, y: r.y },
|
|
2436
2436
|
// H: horizontal extension
|
|
@@ -2478,7 +2478,7 @@ function Me(t, e, n) {
|
|
|
2478
2478
|
], h = e;
|
|
2479
2479
|
break;
|
|
2480
2480
|
case "5seg":
|
|
2481
|
-
if (l <
|
|
2481
|
+
if (l < a)
|
|
2482
2482
|
f = [
|
|
2483
2483
|
r,
|
|
2484
2484
|
{ x: o, y: r.y },
|
|
@@ -2490,7 +2490,7 @@ function Me(t, e, n) {
|
|
|
2490
2490
|
i
|
|
2491
2491
|
// H: horizontal to end
|
|
2492
2492
|
], h = e;
|
|
2493
|
-
else if (u <
|
|
2493
|
+
else if (u < a)
|
|
2494
2494
|
f = [
|
|
2495
2495
|
r,
|
|
2496
2496
|
{ x: o, y: r.y },
|
|
@@ -2516,16 +2516,16 @@ function Me(t, e, n) {
|
|
|
2516
2516
|
], h = e;
|
|
2517
2517
|
break;
|
|
2518
2518
|
}
|
|
2519
|
-
const g =
|
|
2519
|
+
const g = ps(f);
|
|
2520
2520
|
return g.length > 0 ? { points: g, actualMidY: h } : null;
|
|
2521
2521
|
}
|
|
2522
2522
|
function Tt(t, e, n, r = yn) {
|
|
2523
|
-
const i = t.getStartPoint(),
|
|
2524
|
-
if (!i || !
|
|
2523
|
+
const i = t.getStartPoint(), s = t.getEndPoint(), o = t.getDirection();
|
|
2524
|
+
if (!i || !s || !o || o === "self")
|
|
2525
2525
|
return;
|
|
2526
|
-
const c = { x: i.x, y: e - i.y },
|
|
2527
|
-
let l = { x:
|
|
2528
|
-
o === "right" ? l = { x:
|
|
2526
|
+
const c = { x: i.x, y: e - i.y }, a = { x: s.x, y: e - s.y };
|
|
2527
|
+
let l = { x: a.x, y: a.y };
|
|
2528
|
+
o === "right" ? l = { x: a.x - r.arrowWidth, y: a.y } : o === "left" && (l = { x: a.x + r.arrowWidth, y: a.y });
|
|
2529
2529
|
const u = r.minEdgeDistance, f = t.baseDirection === void 0;
|
|
2530
2530
|
let g = (c.y + l.y) / 2;
|
|
2531
2531
|
if (!f && n && n.midY !== void 0) {
|
|
@@ -2563,11 +2563,11 @@ function De(t, e) {
|
|
|
2563
2563
|
const n = [];
|
|
2564
2564
|
n.push(`M${t[0].x},${t[0].y}`);
|
|
2565
2565
|
for (let i = 1; i < t.length - 1; i++) {
|
|
2566
|
-
const
|
|
2566
|
+
const s = t[i - 1], o = t[i], c = t[i + 1], a = Math.sqrt((o.x - s.x) ** 2 + (o.y - s.y) ** 2), l = Math.sqrt((c.x - o.x) ** 2 + (c.y - o.y) ** 2), u = Math.min(a, l) / 2, f = Math.min(e, u);
|
|
2567
2567
|
if (f > 0) {
|
|
2568
|
-
const h = f /
|
|
2569
|
-
x: o.x - (o.x -
|
|
2570
|
-
y: o.y - (o.y -
|
|
2568
|
+
const h = f / a, g = f / l, m = {
|
|
2569
|
+
x: o.x - (o.x - s.x) * h,
|
|
2570
|
+
y: o.y - (o.y - s.y) * h
|
|
2571
2571
|
}, x = {
|
|
2572
2572
|
x: o.x + (c.x - o.x) * g,
|
|
2573
2573
|
y: o.y + (c.y - o.y) * g
|
|
@@ -2580,22 +2580,22 @@ function De(t, e) {
|
|
|
2580
2580
|
return n.push(`L${r.x},${r.y}`), n.join(" ");
|
|
2581
2581
|
}
|
|
2582
2582
|
function re(t, e, n, r, i) {
|
|
2583
|
-
const
|
|
2583
|
+
const s = i.topLeft || 0, o = i.topRight || 0, c = i.bottomRight || 0, a = i.bottomLeft || 0;
|
|
2584
2584
|
return `
|
|
2585
|
-
M ${t +
|
|
2585
|
+
M ${t + s} ${e}
|
|
2586
2586
|
L ${t + n - o} ${e}
|
|
2587
2587
|
${o ? `Q ${t + n} ${e} ${t + n} ${e + o}` : ""}
|
|
2588
2588
|
L ${t + n} ${e + r - c}
|
|
2589
2589
|
${c ? `Q ${t + n} ${e + r} ${t + n - c} ${e + r}` : ""}
|
|
2590
|
-
L ${t +
|
|
2591
|
-
${
|
|
2592
|
-
L ${t} ${e +
|
|
2593
|
-
${
|
|
2590
|
+
L ${t + a} ${e + r}
|
|
2591
|
+
${a ? `Q ${t} ${e + r} ${t} ${e + r - a}` : ""}
|
|
2592
|
+
L ${t} ${e + s}
|
|
2593
|
+
${s ? `Q ${t} ${e} ${t + s} ${e}` : ""}
|
|
2594
2594
|
Z
|
|
2595
2595
|
`.trim().replace(/\s+/g, " ");
|
|
2596
2596
|
}
|
|
2597
|
-
function
|
|
2598
|
-
const c =
|
|
2597
|
+
function ms(t, e, n, r, i, s, o) {
|
|
2598
|
+
const c = s.loopRadius, a = s.horizontalExtension, l = s.cornerRadius, u = () => {
|
|
2599
2599
|
const g = n.x - c, m = n.y - c, x = r.x + c, y = r.y - c;
|
|
2600
2600
|
return `M${n.x},${n.y} C${g},${m} ${x},${y} ${r.x},${r.y}`;
|
|
2601
2601
|
};
|
|
@@ -2605,7 +2605,7 @@ function ma(t, e, n, r, i, a, o) {
|
|
|
2605
2605
|
const g = r.x - n.x, m = 0.4, x = n.x + g * m, y = n.y, p = r.x - g * m, w = r.y;
|
|
2606
2606
|
return `M${n.x},${n.y} C${x},${y} ${p},${w} ${r.x},${r.y}`;
|
|
2607
2607
|
}
|
|
2608
|
-
const f =
|
|
2608
|
+
const f = a - s.arrowWidth;
|
|
2609
2609
|
if (e === "self") {
|
|
2610
2610
|
if (t.virtualNode) {
|
|
2611
2611
|
const g = t.virtualNode.getPosition();
|
|
@@ -2615,9 +2615,9 @@ function ma(t, e, n, r, i, a, o) {
|
|
|
2615
2615
|
const x = [
|
|
2616
2616
|
n,
|
|
2617
2617
|
// leftOut of source node
|
|
2618
|
-
{ x: n.x -
|
|
2618
|
+
{ x: n.x - a, y: n.y },
|
|
2619
2619
|
// Extend left
|
|
2620
|
-
{ x: n.x -
|
|
2620
|
+
{ x: n.x - a, y: m },
|
|
2621
2621
|
// Go to virtual node height
|
|
2622
2622
|
{ x: r.x + f, y: m },
|
|
2623
2623
|
// Horizontal segment through virtual node
|
|
@@ -2636,7 +2636,7 @@ function ma(t, e, n, r, i, a, o) {
|
|
|
2636
2636
|
if (t.orthogonalPathPoints && t.orthogonalPathPoints.length > 0)
|
|
2637
2637
|
h = t.orthogonalPathPoints;
|
|
2638
2638
|
else {
|
|
2639
|
-
const g = Math.abs(n.y - t.midY), m = Math.abs(t.midY - r.y), x = 20, y = g >= x, p = m >= x, w = e === "right" ? n.x +
|
|
2639
|
+
const g = Math.abs(n.y - t.midY), m = Math.abs(t.midY - r.y), x = 20, y = g >= x, p = m >= x, w = e === "right" ? n.x + a : n.x - a, E = e === "right" ? r.x - f : r.x + f;
|
|
2640
2640
|
if (h = [], !y && !p) {
|
|
2641
2641
|
const S = (n.y + r.y) / 2;
|
|
2642
2642
|
h.push(
|
|
@@ -2668,27 +2668,27 @@ function ma(t, e, n, r, i, a, o) {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
return De(h, l);
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2672
|
-
|
|
2671
|
+
function ys(t, e, n, r, i) {
|
|
2672
|
+
xs(t, r, i), _s(t, e, n, r, i);
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2675
|
-
const r = n.loopRadius, i = n.edgeSpacing,
|
|
2674
|
+
function xs(t, e, n) {
|
|
2675
|
+
const r = n.loopRadius, i = n.edgeSpacing, s = n.labelHeight;
|
|
2676
2676
|
t.forEach((o) => {
|
|
2677
2677
|
const c = o.edges;
|
|
2678
2678
|
if (c.length === 0) return;
|
|
2679
|
-
const
|
|
2680
|
-
if (!
|
|
2681
|
-
const u =
|
|
2679
|
+
const a = o.baseEdge, l = o.baseEdgeIndex;
|
|
2680
|
+
if (!a || l < 0) return;
|
|
2681
|
+
const u = a.getStartPoint(), f = a.getEndPoint();
|
|
2682
2682
|
if (!u || !f) return;
|
|
2683
2683
|
const h = e - u.y, g = e - f.y;
|
|
2684
|
-
|
|
2684
|
+
a.midY = (h + g) / 2;
|
|
2685
2685
|
const m = Tt(
|
|
2686
|
-
|
|
2686
|
+
a,
|
|
2687
2687
|
e,
|
|
2688
2688
|
void 0,
|
|
2689
2689
|
n
|
|
2690
2690
|
);
|
|
2691
|
-
m && (
|
|
2691
|
+
m && (a.midY = m.midY, a.orthogonalPathPoints = m.points), o.aboveY = a.midY, o.belowY = a.midY;
|
|
2692
2692
|
for (let x = l - 1; x >= 0; x--) {
|
|
2693
2693
|
const y = c[x];
|
|
2694
2694
|
if (y.depth !== 0) continue;
|
|
@@ -2697,7 +2697,7 @@ function xa(t, e, n) {
|
|
|
2697
2697
|
$ && (y.midY = e - $.y - r);
|
|
2698
2698
|
continue;
|
|
2699
2699
|
}
|
|
2700
|
-
const w = y.label ? i +
|
|
2700
|
+
const w = y.label ? i + s : i;
|
|
2701
2701
|
y.midY = o.aboveY - w, o.aboveY = y.midY, y.baseDirection = "above", y.baseOffset = -(l - x);
|
|
2702
2702
|
const E = x < c.length - 1 ? c[x + 1] : void 0, S = Tt(
|
|
2703
2703
|
y,
|
|
@@ -2715,7 +2715,7 @@ function xa(t, e, n) {
|
|
|
2715
2715
|
$ && (y.midY = e - $.y - r);
|
|
2716
2716
|
continue;
|
|
2717
2717
|
}
|
|
2718
|
-
const w = y.label ? i +
|
|
2718
|
+
const w = y.label ? i + s : i;
|
|
2719
2719
|
y.midY = o.belowY + w, o.belowY = y.midY, y.baseDirection = "below", y.baseOffset = x - l;
|
|
2720
2720
|
const E = x > 0 ? c[x - 1] : void 0, S = Tt(
|
|
2721
2721
|
y,
|
|
@@ -2727,25 +2727,25 @@ function xa(t, e, n) {
|
|
|
2727
2727
|
}
|
|
2728
2728
|
});
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2731
|
-
const
|
|
2730
|
+
function _s(t, e, n, r, i) {
|
|
2731
|
+
const s = i.loopRadius, o = i.edgeSpacing, c = i.labelHeight, a = [];
|
|
2732
2732
|
t.forEach((f) => {
|
|
2733
2733
|
const h = f.edges;
|
|
2734
2734
|
h.length === 0 || f.baseEdge || !h.every((m) => m.depth > 0) || h.forEach((m) => {
|
|
2735
2735
|
if (m.getDirection() !== "self")
|
|
2736
|
-
|
|
2736
|
+
a.push(m);
|
|
2737
2737
|
else {
|
|
2738
2738
|
const x = m.getStartPoint();
|
|
2739
|
-
x && (m.midY = r - x.y -
|
|
2739
|
+
x && (m.midY = r - x.y - s);
|
|
2740
2740
|
}
|
|
2741
2741
|
});
|
|
2742
|
-
}),
|
|
2742
|
+
}), a.sort((f, h) => f.depth - h.depth);
|
|
2743
2743
|
let l = 1 / 0, u = -1 / 0;
|
|
2744
2744
|
t.forEach((f) => {
|
|
2745
2745
|
f.aboveY !== 0 && (l = Math.min(l, f.aboveY)), f.belowY !== 0 && (u = Math.max(u, f.belowY));
|
|
2746
2746
|
}), e.forEach((f) => {
|
|
2747
2747
|
f.aboveY !== 0 && (l = Math.min(l, f.aboveY)), f.belowY !== 0 && (u = Math.max(u, f.belowY));
|
|
2748
|
-
}),
|
|
2748
|
+
}), a.forEach((f) => {
|
|
2749
2749
|
if (!f.sourceNode || !f.targetNode) return;
|
|
2750
2750
|
const h = n.get(f.sourceNode._gvid), g = n.get(f.targetNode._gvid);
|
|
2751
2751
|
if (h === void 0 || g === void 0) return;
|
|
@@ -2757,8 +2757,8 @@ function _a(t, e, n, r, i) {
|
|
|
2757
2757
|
const p = y.map((C) => {
|
|
2758
2758
|
const L = C.getPosition();
|
|
2759
2759
|
if (!L) return null;
|
|
2760
|
-
const B = r - L[1],
|
|
2761
|
-
return { y: B, height:
|
|
2760
|
+
const B = r - L[1], V = C.height ? parseFloat(C.height) * nt : fe;
|
|
2761
|
+
return { y: B, height: V, bottomY: B + V / 2 };
|
|
2762
2762
|
}).filter(
|
|
2763
2763
|
(C) => C !== null
|
|
2764
2764
|
).sort((C, L) => C.y - L.y);
|
|
@@ -2774,18 +2774,18 @@ function _a(t, e, n, r, i) {
|
|
|
2774
2774
|
const E = f.getStartPoint(), S = f.getEndPoint(), v = (E && S ? r - (E.y + S.y) / 2 : w) < w ? "above" : "below";
|
|
2775
2775
|
f.baseDirection = v;
|
|
2776
2776
|
const k = f.label ? o + c : o;
|
|
2777
|
-
let
|
|
2778
|
-
v === "above" ? (f.midY = l - k,
|
|
2779
|
-
const
|
|
2777
|
+
let D;
|
|
2778
|
+
v === "above" ? (f.midY = l - k, D = l, l = f.midY) : (f.midY = u + k, D = u, u = f.midY);
|
|
2779
|
+
const P = Tt(
|
|
2780
2780
|
f,
|
|
2781
2781
|
r,
|
|
2782
|
-
{ midY:
|
|
2782
|
+
{ midY: D },
|
|
2783
2783
|
i
|
|
2784
2784
|
);
|
|
2785
|
-
|
|
2785
|
+
P && (f.midY = P.midY, f.orthogonalPathPoints = P.points, v === "above" ? l = Math.min(l, P.midY) : u = Math.max(u, P.midY));
|
|
2786
2786
|
});
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2788
|
+
function ws(t) {
|
|
2789
2789
|
if (!t.sourceNode) return null;
|
|
2790
2790
|
const e = t.sourceNode.getPosition();
|
|
2791
2791
|
if (!e) return null;
|
|
@@ -2803,15 +2803,15 @@ function wa(t) {
|
|
|
2803
2803
|
});
|
|
2804
2804
|
return r.virtualNode = !0, r.edge = t, t.virtualNode = r, r;
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2807
|
-
const r = e.nodes, i = r.findIndex((
|
|
2806
|
+
function vs(t, e, n) {
|
|
2807
|
+
const r = e.nodes, i = r.findIndex((s) => s._gvid === n._gvid);
|
|
2808
2808
|
if (i === -1) {
|
|
2809
2809
|
r.push(t);
|
|
2810
2810
|
return;
|
|
2811
2811
|
}
|
|
2812
2812
|
r.splice(i, 0, t);
|
|
2813
2813
|
}
|
|
2814
|
-
function
|
|
2814
|
+
function bs(t, e) {
|
|
2815
2815
|
const n = Jo, r = [], i = /* @__PURE__ */ new Map();
|
|
2816
2816
|
t.forEach((l) => {
|
|
2817
2817
|
const u = l.getPosition();
|
|
@@ -2822,8 +2822,8 @@ function ba(t, e) {
|
|
|
2822
2822
|
);
|
|
2823
2823
|
h === -1 && (h = r.length, r.push(f)), i.set(l._gvid, h);
|
|
2824
2824
|
});
|
|
2825
|
-
const
|
|
2826
|
-
|
|
2825
|
+
const s = r.map((l, u) => ({ x: l, i: u })).sort((l, u) => l.x - u.x).map((l, u) => ({ oldIndex: l.i, newIndex: u })), o = /* @__PURE__ */ new Map();
|
|
2826
|
+
s.forEach(({ oldIndex: l, newIndex: u }) => {
|
|
2827
2827
|
o.set(l, u);
|
|
2828
2828
|
});
|
|
2829
2829
|
for (const [l, u] of i)
|
|
@@ -2831,54 +2831,54 @@ function ba(t, e) {
|
|
|
2831
2831
|
const c = /* @__PURE__ */ new Map();
|
|
2832
2832
|
t.forEach((l) => {
|
|
2833
2833
|
const u = i.get(l._gvid);
|
|
2834
|
-
u !== void 0 && (c.has(u) || c.set(u, new
|
|
2834
|
+
u !== void 0 && (c.has(u) || c.set(u, new is(u, 0)), c.get(u).addNode(l, !1));
|
|
2835
2835
|
}), e.forEach((l) => {
|
|
2836
2836
|
if (!l.sourceNode || !l.targetNode || l.sourceNode._gvid !== l.targetNode._gvid) return;
|
|
2837
2837
|
const u = i.get(l.sourceNode._gvid);
|
|
2838
2838
|
if (u === void 0) return;
|
|
2839
2839
|
const f = c.get(u);
|
|
2840
2840
|
if (!f) return;
|
|
2841
|
-
const h =
|
|
2842
|
-
h &&
|
|
2841
|
+
const h = ws(l);
|
|
2842
|
+
h && vs(h, f, l.sourceNode);
|
|
2843
2843
|
});
|
|
2844
|
-
const
|
|
2844
|
+
const a = /* @__PURE__ */ new Map();
|
|
2845
2845
|
return e.forEach((l) => {
|
|
2846
2846
|
if (!l.sourceNode || !l.targetNode) return;
|
|
2847
2847
|
const u = i.get(l.sourceNode._gvid), f = i.get(l.targetNode._gvid);
|
|
2848
2848
|
if (u === void 0 || f === void 0) return;
|
|
2849
2849
|
l.depth = Math.abs(f - u) - 1, l.depth < 0 && (l.depth = 0);
|
|
2850
2850
|
const h = Math.min(u, f), g = Math.max(u, f), m = `${h}-${g}`;
|
|
2851
|
-
|
|
2852
|
-
}),
|
|
2851
|
+
a.has(m) || a.set(m, new os(u, f, 0)), a.get(m).addEdge(l);
|
|
2852
|
+
}), a.forEach((l) => {
|
|
2853
2853
|
l.edges.sort((u, f) => {
|
|
2854
2854
|
const h = u.getStartPoint(), g = u.getEndPoint(), m = h && g ? (h.y + g.y) / 2 : 0, x = f.getStartPoint(), y = f.getEndPoint();
|
|
2855
2855
|
return (x && y ? (x.y + y.y) / 2 : 0) - m;
|
|
2856
2856
|
});
|
|
2857
|
-
}), { nodeColumnMap: i, nodeColumns: c, edgeColumns:
|
|
2857
|
+
}), { nodeColumnMap: i, nodeColumns: c, edgeColumns: a };
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function Es(t, e) {
|
|
2860
2860
|
t.forEach((n) => {
|
|
2861
2861
|
if (n.nodes.length === 0) return;
|
|
2862
2862
|
let r = !0;
|
|
2863
2863
|
n.nodes.forEach((i) => {
|
|
2864
|
-
const
|
|
2865
|
-
if (!
|
|
2866
|
-
const o = i.height ? parseFloat(i.height) * nt : fe, c = e -
|
|
2867
|
-
r ? (n.aboveY =
|
|
2864
|
+
const s = i.getPosition();
|
|
2865
|
+
if (!s) return;
|
|
2866
|
+
const o = i.height ? parseFloat(i.height) * nt : fe, c = e - s[1], a = c - o / 2, l = c + o / 2;
|
|
2867
|
+
r ? (n.aboveY = a, n.belowY = l, r = !1) : (n.aboveY = Math.min(n.aboveY, a), n.belowY = Math.max(n.belowY, l));
|
|
2868
2868
|
});
|
|
2869
2869
|
});
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function Ns(t, e) {
|
|
2872
2872
|
t.length !== 0 && e.forEach((n) => {
|
|
2873
2873
|
const r = n.edges;
|
|
2874
2874
|
if (r.length === 0) return;
|
|
2875
2875
|
const i = r.filter((f) => f.depth === 0);
|
|
2876
2876
|
if (i.length === 0) return;
|
|
2877
|
-
const
|
|
2877
|
+
const s = Math.floor(i.length / 2), o = i[s];
|
|
2878
2878
|
o.isBaseEdge = !0, o.baseDirection = void 0;
|
|
2879
2879
|
const c = r.indexOf(o);
|
|
2880
2880
|
n.setBaseEdge(o, c);
|
|
2881
|
-
const
|
|
2881
|
+
const a = o.getStartPoint(), l = o.getEndPoint(), u = a && l ? (a.y + l.y) / 2 : 0;
|
|
2882
2882
|
i.forEach((f) => {
|
|
2883
2883
|
if (f === o) return;
|
|
2884
2884
|
const h = f.getStartPoint(), g = f.getEndPoint();
|
|
@@ -2886,70 +2886,70 @@ function Na(t, e) {
|
|
|
2886
2886
|
});
|
|
2887
2887
|
});
|
|
2888
2888
|
}
|
|
2889
|
-
function $
|
|
2889
|
+
function $s(t, e, n) {
|
|
2890
2890
|
const i = (t.objects || []).map(
|
|
2891
|
-
(
|
|
2892
|
-
_gvid:
|
|
2893
|
-
name:
|
|
2894
|
-
_draw_:
|
|
2895
|
-
_ldraw_:
|
|
2896
|
-
bb:
|
|
2897
|
-
pos:
|
|
2891
|
+
(a) => new dn({
|
|
2892
|
+
_gvid: a._gvid,
|
|
2893
|
+
name: a.name,
|
|
2894
|
+
_draw_: a._draw_,
|
|
2895
|
+
_ldraw_: a._ldraw_,
|
|
2896
|
+
bb: a.bb,
|
|
2897
|
+
pos: a.pos,
|
|
2898
2898
|
// Apply custom node dimensions if provided (convert points to inches)
|
|
2899
|
-
width: e !== null ? String(e / nt) :
|
|
2900
|
-
height: n !== null ? String(n / nt) :
|
|
2901
|
-
label:
|
|
2899
|
+
width: e !== null ? String(e / nt) : a.width,
|
|
2900
|
+
height: n !== null ? String(n / nt) : a.height,
|
|
2901
|
+
label: a.label
|
|
2902
2902
|
})
|
|
2903
|
-
),
|
|
2904
|
-
i.forEach((
|
|
2905
|
-
|
|
2903
|
+
), s = /* @__PURE__ */ new Map();
|
|
2904
|
+
i.forEach((a) => {
|
|
2905
|
+
s.set(a._gvid, a);
|
|
2906
2906
|
});
|
|
2907
|
-
const c = (t.edges || []).map((
|
|
2908
|
-
const l = new
|
|
2909
|
-
_gvid:
|
|
2910
|
-
name:
|
|
2911
|
-
_draw_:
|
|
2912
|
-
_ldraw_:
|
|
2913
|
-
_hdraw_:
|
|
2914
|
-
_tdraw_:
|
|
2915
|
-
head:
|
|
2916
|
-
tail:
|
|
2917
|
-
label:
|
|
2918
|
-
}), u =
|
|
2907
|
+
const c = (t.edges || []).map((a) => {
|
|
2908
|
+
const l = new rs({
|
|
2909
|
+
_gvid: a._gvid,
|
|
2910
|
+
name: a.name,
|
|
2911
|
+
_draw_: a._draw_,
|
|
2912
|
+
_ldraw_: a._ldraw_,
|
|
2913
|
+
_hdraw_: a._hdraw_,
|
|
2914
|
+
_tdraw_: a._tdraw_,
|
|
2915
|
+
head: a.head,
|
|
2916
|
+
tail: a.tail,
|
|
2917
|
+
label: a.label
|
|
2918
|
+
}), u = a.tail !== void 0 ? s.get(a.tail) : void 0, f = a.head !== void 0 ? s.get(a.head) : void 0;
|
|
2919
2919
|
return u && f && l.setNodes(u, f), l;
|
|
2920
2920
|
});
|
|
2921
2921
|
return { nodes: i, edges: c };
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function ks(t, e, n, r) {
|
|
2924
2924
|
let i = 0;
|
|
2925
2925
|
t.forEach((o) => {
|
|
2926
2926
|
i = Math.max(i, o.getWidthPoints());
|
|
2927
2927
|
});
|
|
2928
|
-
let
|
|
2928
|
+
let s = 0;
|
|
2929
2929
|
return e.forEach((o) => {
|
|
2930
2930
|
if (o.depth !== 0 || !o.label || o.getDirection() === "self") return;
|
|
2931
2931
|
const { boxWidth: c } = mn(o, n, r);
|
|
2932
|
-
|
|
2933
|
-
}), i + 2 * n.horizontalExtension +
|
|
2932
|
+
s = Math.max(s, c);
|
|
2933
|
+
}), i + 2 * n.horizontalExtension + s + 2 * jo;
|
|
2934
2934
|
}
|
|
2935
|
-
function
|
|
2936
|
-
const r = Array.from(t.keys()).sort((l, u) => l - u), i = r.length,
|
|
2935
|
+
function Ss(t, e, n) {
|
|
2936
|
+
const r = Array.from(t.keys()).sort((l, u) => l - u), i = r.length, s = Qo, o = n, a = (i > 1 ? (i - 1) * o : 0) + 2 * s;
|
|
2937
2937
|
return r.forEach((l, u) => {
|
|
2938
2938
|
const f = t.get(l);
|
|
2939
2939
|
if (!f) return;
|
|
2940
2940
|
const h = f.nodes;
|
|
2941
2941
|
if (h.length === 0) return;
|
|
2942
|
-
const g = i > 1 ?
|
|
2942
|
+
const g = i > 1 ? s + u * o : a / 2;
|
|
2943
2943
|
h.sort((v, k) => {
|
|
2944
|
-
const
|
|
2945
|
-
return !
|
|
2944
|
+
const D = v.getPosition(), P = k.getPosition();
|
|
2945
|
+
return !D || !P ? 0 : P[1] - D[1];
|
|
2946
2946
|
});
|
|
2947
2947
|
const m = ln, x = h.filter((v) => !v.virtualNode), y = x.length;
|
|
2948
2948
|
if (y === 0) {
|
|
2949
|
-
let v = (e + h.reduce((k,
|
|
2949
|
+
let v = (e + h.reduce((k, D) => k + D.getHeightPoints(), 0)) / 2;
|
|
2950
2950
|
h.forEach((k) => {
|
|
2951
|
-
const
|
|
2952
|
-
v -=
|
|
2951
|
+
const D = k.getHeightPoints();
|
|
2952
|
+
v -= D / 2, k.pos = `${g},${v}`, v -= D / 2;
|
|
2953
2953
|
});
|
|
2954
2954
|
return;
|
|
2955
2955
|
}
|
|
@@ -2965,45 +2965,45 @@ function Sa(t, e, n) {
|
|
|
2965
2965
|
E.pos = `${g},${p}`;
|
|
2966
2966
|
let $ = p + S / 2;
|
|
2967
2967
|
for (let v = w - 1; v >= 0; v--) {
|
|
2968
|
-
const k = h[v],
|
|
2969
|
-
$ += C +
|
|
2968
|
+
const k = h[v], D = h[v + 1], P = k.getHeightPoints(), C = k.virtualNode || D.virtualNode ? 0 : m;
|
|
2969
|
+
$ += C + P / 2, k.pos = `${g},${$}`, $ += P / 2;
|
|
2970
2970
|
}
|
|
2971
2971
|
$ = p - S / 2;
|
|
2972
2972
|
for (let v = w + 1; v < h.length; v++) {
|
|
2973
|
-
const k = h[v],
|
|
2974
|
-
$ -= C +
|
|
2973
|
+
const k = h[v], D = h[v - 1], P = k.getHeightPoints(), C = k.virtualNode || D.virtualNode ? 0 : m;
|
|
2974
|
+
$ -= C + P / 2, k.pos = `${g},${$}`, $ -= P / 2;
|
|
2975
2975
|
}
|
|
2976
|
-
}),
|
|
2976
|
+
}), a;
|
|
2977
2977
|
}
|
|
2978
2978
|
function xn(t, e, n) {
|
|
2979
2979
|
t.append("use").attr("href", `#${cn}`).attr("x", e).attr("y", n - _t / 2);
|
|
2980
2980
|
}
|
|
2981
|
-
function
|
|
2981
|
+
function As(t, e, n) {
|
|
2982
2982
|
t.style("cursor", "pointer").on("mouseenter", function() {
|
|
2983
2983
|
if (e.attr("opacity", 1), n.select(".edge.selected").size() > 0)
|
|
2984
2984
|
return;
|
|
2985
|
-
const i =
|
|
2985
|
+
const i = z(this).attr("data-node-id"), s = /* @__PURE__ */ new Set([i]);
|
|
2986
2986
|
n.selectAll(".edge").each(function() {
|
|
2987
|
-
const o =
|
|
2988
|
-
o === i || c === i ? o === i ?
|
|
2987
|
+
const o = z(this).attr("data-source-node-id"), c = z(this).attr("data-target-node-id");
|
|
2988
|
+
o === i || c === i ? o === i ? s.add(c) : s.add(o) : z(this).classed("dimmed", !0);
|
|
2989
2989
|
}), n.selectAll(".node").each(function() {
|
|
2990
|
-
const o =
|
|
2991
|
-
|
|
2990
|
+
const o = z(this).attr("data-node-id");
|
|
2991
|
+
s.has(o) || z(this).classed("dimmed", !0);
|
|
2992
2992
|
});
|
|
2993
2993
|
}).on("mouseleave", function() {
|
|
2994
2994
|
e.attr("opacity", 0), n.selectAll(".edge.dimmed").classed("dimmed", !1), n.selectAll(".node.dimmed").classed("dimmed", !1);
|
|
2995
2995
|
});
|
|
2996
2996
|
}
|
|
2997
|
-
function
|
|
2997
|
+
function Is(t) {
|
|
2998
2998
|
const {
|
|
2999
2999
|
nodeGroup: e,
|
|
3000
3000
|
g: n,
|
|
3001
3001
|
x: r,
|
|
3002
3002
|
y: i,
|
|
3003
|
-
w:
|
|
3003
|
+
w: s,
|
|
3004
3004
|
h: o,
|
|
3005
3005
|
height: c,
|
|
3006
|
-
badges:
|
|
3006
|
+
badges: a,
|
|
3007
3007
|
labelText: l,
|
|
3008
3008
|
addressText: u,
|
|
3009
3009
|
nodeTextColor: f,
|
|
@@ -3012,46 +3012,46 @@ function Ia(t) {
|
|
|
3012
3012
|
hasChainIcon: m
|
|
3013
3013
|
} = t, x = o * Ko, y = o - x, p = c - i - o / 2, w = 4, E = "var(--border-primary, #D3D1D4)";
|
|
3014
3014
|
e.append("path").attr("d", re(
|
|
3015
|
-
r -
|
|
3015
|
+
r - s / 2,
|
|
3016
3016
|
p,
|
|
3017
|
-
|
|
3017
|
+
s,
|
|
3018
3018
|
x,
|
|
3019
3019
|
{ topLeft: w, topRight: w }
|
|
3020
|
-
)).attr("fill", g ? h : "var(--bg-quaternary, #F2F2F3)").attr("stroke", E).attr("stroke-width", 1), g && e.append("line").attr("x1", r -
|
|
3021
|
-
r -
|
|
3020
|
+
)).attr("fill", g ? h : "var(--bg-quaternary, #F2F2F3)").attr("stroke", E).attr("stroke-width", 1), g && e.append("line").attr("x1", r - s / 2).attr("y1", p + x).attr("x2", r + s / 2).attr("y2", p + x).attr("stroke", f).attr("stroke-width", 1), e.append("path").attr("d", re(
|
|
3021
|
+
r - s / 2,
|
|
3022
3022
|
p + x,
|
|
3023
|
-
|
|
3023
|
+
s,
|
|
3024
3024
|
y,
|
|
3025
3025
|
{ bottomLeft: w, bottomRight: w }
|
|
3026
3026
|
)).attr("fill", g ? h : "var(--bg-primary, #fff)").attr("stroke", E).attr("stroke-width", 1);
|
|
3027
|
-
const S = e.append("rect").attr("x", r -
|
|
3028
|
-
|
|
3029
|
-
let $ = r -
|
|
3030
|
-
const v = p + x / 2, k = 7.2,
|
|
3031
|
-
if (
|
|
3032
|
-
const
|
|
3033
|
-
e.append("rect").attr("x", $).attr("y", v -
|
|
3027
|
+
const S = e.append("rect").attr("x", r - s / 2 - 4).attr("y", p - 4).attr("width", s + 8).attr("height", o + 8).attr("rx", 5).attr("ry", 5).attr("fill", "none").attr("stroke", "var(--gray-700, #43444C)").attr("stroke-width", 2).attr("opacity", 0).style("pointer-events", "none");
|
|
3028
|
+
As(e, S, n);
|
|
3029
|
+
let $ = r - s / 2 + 8;
|
|
3030
|
+
const v = p + x / 2, k = 7.2, D = 6, P = 18, C = 4;
|
|
3031
|
+
if (a.forEach((L) => {
|
|
3032
|
+
const V = L.length * k + D * 2;
|
|
3033
|
+
e.append("rect").attr("x", $).attr("y", v - P / 2).attr("width", V).attr("height", P).attr("rx", 5).attr("ry", 5).attr("fill", "var(--bg-warning-primary, #FFF8E1)").attr("stroke", "var(--border-warning-light, #FFD66D)").attr("stroke-width", 1), e.append("text").attr("x", $ + D).attr("y", v).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-inter), Inter, Helvetica, Arial").attr("font-size", "12px").attr("font-weight", "500").attr("fill", "var(--text-warning-primary, #CD7004)").text(L), $ += V + C;
|
|
3034
3034
|
}), l) {
|
|
3035
|
-
const L = r +
|
|
3035
|
+
const L = r + s / 2 - 8 - $, B = e.append("text").attr("x", $).attr("y", v).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-inter), Inter, Helvetica, Arial").attr("font-size", "16px").attr("font-weight", "500").attr("fill", f);
|
|
3036
3036
|
ne(B, L, l);
|
|
3037
3037
|
}
|
|
3038
3038
|
if (u) {
|
|
3039
|
-
const L = p + x + y / 2, B = m ? _t +
|
|
3040
|
-
m && xn(e, r -
|
|
3041
|
-
const
|
|
3042
|
-
ne(d,
|
|
3039
|
+
const L = p + x + y / 2, B = m ? _t + an : 0;
|
|
3040
|
+
m && xn(e, r - s / 2 + 8, L);
|
|
3041
|
+
const V = s - 16 - B, d = e.append("text").attr("x", r - s / 2 + 8 + B).attr("y", L).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-fira-code), Fira Code, monospace").attr("font-size", "12px").attr("font-weight", "400").attr("fill", f);
|
|
3042
|
+
ne(d, V, u);
|
|
3043
3043
|
}
|
|
3044
3044
|
}
|
|
3045
|
-
function
|
|
3045
|
+
function Ts(t) {
|
|
3046
3046
|
const {
|
|
3047
3047
|
nodeGroup: e,
|
|
3048
3048
|
x: n,
|
|
3049
3049
|
y: r,
|
|
3050
3050
|
w: i,
|
|
3051
|
-
h:
|
|
3051
|
+
h: s,
|
|
3052
3052
|
height: o,
|
|
3053
3053
|
isVirtual: c,
|
|
3054
|
-
showVirtualStyle:
|
|
3054
|
+
showVirtualStyle: a,
|
|
3055
3055
|
nodeContent: l,
|
|
3056
3056
|
labelText: u,
|
|
3057
3057
|
addressText: f,
|
|
@@ -3059,15 +3059,15 @@ function Ta(t) {
|
|
|
3059
3059
|
nodeBackground: g,
|
|
3060
3060
|
hasCustomBackground: m,
|
|
3061
3061
|
hasChainIcon: x
|
|
3062
|
-
} = t, y = 4, p =
|
|
3062
|
+
} = t, y = 4, p = a ? "#EF4444" : "var(--border-primary, #D3D1D4)", w = e.append("path").attr("d", re(
|
|
3063
3063
|
n - i / 2,
|
|
3064
|
-
o - r -
|
|
3064
|
+
o - r - s / 2,
|
|
3065
3065
|
i,
|
|
3066
|
-
|
|
3066
|
+
s,
|
|
3067
3067
|
{ topLeft: y, topRight: y, bottomLeft: y, bottomRight: y }
|
|
3068
|
-
)).attr("fill", m ? g : "var(--bg-primary, #fff)").attr("stroke", p).attr("stroke-width",
|
|
3068
|
+
)).attr("fill", m ? g : "var(--bg-primary, #fff)").attr("stroke", p).attr("stroke-width", a ? 2 : 1);
|
|
3069
3069
|
if (!c) {
|
|
3070
|
-
const E = e.append("rect").attr("x", n - i / 2 - 4).attr("y", o - r -
|
|
3070
|
+
const E = e.append("rect").attr("x", n - i / 2 - 4).attr("y", o - r - s / 2 - 4).attr("width", i + 8).attr("height", s + 8).attr("rx", 5).attr("ry", 5).attr("fill", "none").attr("stroke", "#000000").attr("stroke-width", 2).attr("opacity", 0).style("pointer-events", "none");
|
|
3071
3071
|
w.style("cursor", "pointer").on("mouseenter", function() {
|
|
3072
3072
|
E.attr("opacity", 1);
|
|
3073
3073
|
}).on("mouseleave", function() {
|
|
@@ -3081,23 +3081,23 @@ function Ta(t) {
|
|
|
3081
3081
|
E.length > 20 ? E.slice(0, 20) + "..." : E
|
|
3082
3082
|
);
|
|
3083
3083
|
} else {
|
|
3084
|
-
const E = f || u, S = o - r, $ = x ? _t +
|
|
3084
|
+
const E = f || u, S = o - r, $ = x ? _t + an : 0;
|
|
3085
3085
|
x && xn(e, n - i / 2 + 8, S);
|
|
3086
3086
|
const v = i - 16 - $, k = e.append("text").attr("x", n - i / 2 + 8 + $).attr("y", S).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-fira-code), Fira Code, monospace").attr("font-size", "12px").attr("font-weight", "400").attr("fill", h);
|
|
3087
3087
|
ne(k, v, E);
|
|
3088
3088
|
}
|
|
3089
3089
|
}
|
|
3090
|
-
function
|
|
3091
|
-
const
|
|
3092
|
-
if (!
|
|
3093
|
-
const [o, c] =
|
|
3090
|
+
function Cs(t, e, n, r, i) {
|
|
3091
|
+
const s = t.getPosition();
|
|
3092
|
+
if (!s) return;
|
|
3093
|
+
const [o, c] = s, a = t.getWidthPoints(), l = t.getHeightPoints(), u = t.virtualNode;
|
|
3094
3094
|
if (u && !r) return;
|
|
3095
3095
|
const f = e.append("g").attr("class", u ? "node virtual-node" : "node").attr("id", t.name).attr("data-node-id", t.name);
|
|
3096
3096
|
let h = null;
|
|
3097
3097
|
try {
|
|
3098
3098
|
t.label && (h = Ct(t.label));
|
|
3099
3099
|
} catch (v) {
|
|
3100
|
-
h =
|
|
3100
|
+
h = hs(t.label), h || console.warn(`Failed to decode node label for ${t.name}:`, v);
|
|
3101
3101
|
}
|
|
3102
3102
|
h != null && h.key && f.attr("data-key", h.key);
|
|
3103
3103
|
const g = r && u, m = (h == null ? void 0 : h.tags) || [], x = (h == null ? void 0 : h.label) || "", y = (h == null ? void 0 : h.text) || "", p = (h == null ? void 0 : h.color) || "var(--text-primary, #1A171B)", w = (h == null ? void 0 : h.background) || "white", E = w !== "white", S = m.length > 0 || x.length > 0, $ = {
|
|
@@ -3105,7 +3105,7 @@ function Ca(t, e, n, r, i) {
|
|
|
3105
3105
|
g: e,
|
|
3106
3106
|
x: o,
|
|
3107
3107
|
y: c,
|
|
3108
|
-
w:
|
|
3108
|
+
w: a,
|
|
3109
3109
|
h: l,
|
|
3110
3110
|
height: n,
|
|
3111
3111
|
isVirtual: u,
|
|
@@ -3119,18 +3119,18 @@ function Ca(t, e, n, r, i) {
|
|
|
3119
3119
|
hasCustomBackground: E,
|
|
3120
3120
|
hasChainIcon: i
|
|
3121
3121
|
};
|
|
3122
|
-
S && !u ?
|
|
3123
|
-
v.op === "T" && v.text && f.append("text").attr("x", o -
|
|
3122
|
+
S && !u ? Is($) : Ts($), !t.label && t._ldraw_ && t._ldraw_.length > 0 && !u && t._ldraw_.forEach((v) => {
|
|
3123
|
+
v.op === "T" && v.text && f.append("text").attr("x", o - a / 2 + 8).attr("y", n - c).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", v.face || "Inter, Helvetica, Arial").attr("font-size", `${v.size || 11}px`).attr("fill", v.color || "#334155").text(v.text);
|
|
3124
3124
|
});
|
|
3125
3125
|
}
|
|
3126
|
-
function
|
|
3127
|
-
e.forEach((
|
|
3128
|
-
|
|
3129
|
-
|
|
3126
|
+
function Ms(t, e, n, r, i) {
|
|
3127
|
+
e.forEach((s) => {
|
|
3128
|
+
s.nodes.forEach((o) => {
|
|
3129
|
+
Cs(o, t, n, r, i);
|
|
3130
3130
|
});
|
|
3131
3131
|
});
|
|
3132
3132
|
}
|
|
3133
|
-
const
|
|
3133
|
+
const Ds = `
|
|
3134
3134
|
<style>
|
|
3135
3135
|
@keyframes selected-pulse {
|
|
3136
3136
|
0%, 100% {
|
|
@@ -3215,7 +3215,7 @@ const Da = `
|
|
|
3215
3215
|
<symbol id="arrow-right" viewBox="0 0 12 12">
|
|
3216
3216
|
<path d="M11.53 5.46967C11.8229 5.76256 11.8229 6.23744 11.53 6.53033L6.75736 11.303C6.46447 11.5959 5.98959 11.5959 5.6967 11.303C5.40381 11.0101 5.40381 10.5352 5.6967 10.2423L9.93934 6L5.6967 1.75736C5.40381 1.46447 5.40381 0.989593 5.6967 0.696699C5.98959 0.403806 6.46447 0.403806 6.75736 0.696699L11.53 5.46967ZM0 5.25H11V6.75H0V5.25Z"/>
|
|
3217
3217
|
</symbol>
|
|
3218
|
-
`,
|
|
3218
|
+
`, Ps = `
|
|
3219
3219
|
<style>
|
|
3220
3220
|
.node rect, .node ellipse, .node polygon {
|
|
3221
3221
|
cursor: pointer;
|
|
@@ -3226,7 +3226,7 @@ const Da = `
|
|
|
3226
3226
|
</style>
|
|
3227
3227
|
`;
|
|
3228
3228
|
function it(t, e, n) {
|
|
3229
|
-
let r = "#000000", i = "#000000",
|
|
3229
|
+
let r = "#000000", i = "#000000", s = "#000000";
|
|
3230
3230
|
e.forEach((o) => {
|
|
3231
3231
|
switch (o.op) {
|
|
3232
3232
|
case "c":
|
|
@@ -3236,75 +3236,75 @@ function it(t, e, n) {
|
|
|
3236
3236
|
o.color && (i = o.color);
|
|
3237
3237
|
break;
|
|
3238
3238
|
case "F":
|
|
3239
|
-
o.color && (
|
|
3239
|
+
o.color && (s = o.color);
|
|
3240
3240
|
break;
|
|
3241
3241
|
case "T":
|
|
3242
3242
|
o.pt && o.text && t.append("text").attr("x", o.pt[0]).attr("y", n - o.pt[1]).attr(
|
|
3243
3243
|
"text-anchor",
|
|
3244
3244
|
o.align === "l" ? "start" : o.align === "r" ? "end" : "middle"
|
|
3245
|
-
).attr("font-family", o.face || "Inter, Helvetica, Arial").attr("font-size", `${o.size || 12}px`).attr("fill", o.color ||
|
|
3245
|
+
).attr("font-family", o.face || "Inter, Helvetica, Arial").attr("font-size", `${o.size || 12}px`).attr("fill", o.color || s).text(o.text);
|
|
3246
3246
|
break;
|
|
3247
3247
|
case "p":
|
|
3248
3248
|
if (o.points) {
|
|
3249
|
-
const c = o.points.map(([
|
|
3250
|
-
t.append("polygon").attr("points", c.map((
|
|
3249
|
+
const c = o.points.map(([a, l]) => [a, n - l]);
|
|
3250
|
+
t.append("polygon").attr("points", c.map((a) => a.join(",")).join(" ")).attr("fill", i).attr("stroke", r);
|
|
3251
3251
|
}
|
|
3252
3252
|
break;
|
|
3253
3253
|
case "P":
|
|
3254
3254
|
if (o.points) {
|
|
3255
|
-
const c = o.points.map(([
|
|
3256
|
-
t.append("polygon").attr("points", c.map((
|
|
3255
|
+
const c = o.points.map(([a, l]) => [a, n - l]);
|
|
3256
|
+
t.append("polygon").attr("points", c.map((a) => a.join(",")).join(" ")).attr("fill", "none").attr("stroke", r);
|
|
3257
3257
|
}
|
|
3258
3258
|
break;
|
|
3259
3259
|
case "e":
|
|
3260
3260
|
if (o.rect) {
|
|
3261
|
-
const [c,
|
|
3262
|
-
t.append("ellipse").attr("cx", c).attr("cy", n -
|
|
3261
|
+
const [c, a, l, u] = o.rect;
|
|
3262
|
+
t.append("ellipse").attr("cx", c).attr("cy", n - a).attr("rx", l).attr("ry", u).attr("fill", i).attr("stroke", r);
|
|
3263
3263
|
}
|
|
3264
3264
|
break;
|
|
3265
3265
|
case "E":
|
|
3266
3266
|
if (o.rect) {
|
|
3267
|
-
const [c,
|
|
3268
|
-
t.append("ellipse").attr("cx", c).attr("cy", n -
|
|
3267
|
+
const [c, a, l, u] = o.rect;
|
|
3268
|
+
t.append("ellipse").attr("cx", c).attr("cy", n - a).attr("rx", l).attr("ry", u).attr("fill", "none").attr("stroke", r);
|
|
3269
3269
|
}
|
|
3270
3270
|
break;
|
|
3271
3271
|
case "b":
|
|
3272
3272
|
if (o.points) {
|
|
3273
|
-
const c = o.points.map(([l, u]) => [l, n - u]),
|
|
3274
|
-
t.append("path").attr("d",
|
|
3273
|
+
const c = o.points.map(([l, u]) => [l, n - u]), a = `M${c[0][0]},${c[0][1]} C${c.slice(1).map((l) => `${l[0]},${l[1]}`).join(" ")}`;
|
|
3274
|
+
t.append("path").attr("d", a).attr("fill", "none").attr("stroke", r).attr("stroke-width", 1);
|
|
3275
3275
|
}
|
|
3276
3276
|
break;
|
|
3277
3277
|
case "B":
|
|
3278
3278
|
if (o.points) {
|
|
3279
|
-
const c = o.points.map(([l, u]) => [l, n - u]),
|
|
3280
|
-
t.append("path").attr("d",
|
|
3279
|
+
const c = o.points.map(([l, u]) => [l, n - u]), a = `M${c[0][0]},${c[0][1]} C${c.slice(1).map((l) => `${l[0]},${l[1]}`).join(" ")}`;
|
|
3280
|
+
t.append("path").attr("d", a).attr("fill", i).attr("stroke", r).attr("stroke-width", 1);
|
|
3281
3281
|
}
|
|
3282
3282
|
break;
|
|
3283
3283
|
case "L":
|
|
3284
3284
|
if (o.points) {
|
|
3285
|
-
const
|
|
3286
|
-
t.append("path").attr("d",
|
|
3285
|
+
const a = `M${o.points.map(([l, u]) => [l, n - u]).map((l) => `${l[0]},${l[1]}`).join(" L")}`;
|
|
3286
|
+
t.append("path").attr("d", a).attr("fill", "none").attr("stroke", r).attr("stroke-width", 1);
|
|
3287
3287
|
}
|
|
3288
3288
|
break;
|
|
3289
3289
|
}
|
|
3290
3290
|
});
|
|
3291
3291
|
}
|
|
3292
|
-
function
|
|
3292
|
+
function Ks(t, e, n = 14) {
|
|
3293
3293
|
var y;
|
|
3294
3294
|
t.innerHTML = "";
|
|
3295
|
-
const r = ((y = e.bb) == null ? void 0 : y.split(",").map(Number)) || fn, [, , i,
|
|
3296
|
-
o.append("defs").html(
|
|
3295
|
+
const r = ((y = e.bb) == null ? void 0 : y.split(",").map(Number)) || fn, [, , i, s] = r, o = z(t).append("svg").attr("width", "100%").attr("height", "100%").attr("viewBox", `0 0 ${i} ${s}`);
|
|
3296
|
+
o.append("defs").html(Ps);
|
|
3297
3297
|
const c = o.append("g").attr("id", "graph0");
|
|
3298
3298
|
(e.objects || []).forEach((p) => {
|
|
3299
3299
|
const w = c.append("g").attr("class", "node").attr("id", p.name);
|
|
3300
|
-
p._draw_ && it(w, p._draw_,
|
|
3300
|
+
p._draw_ && it(w, p._draw_, s), p._ldraw_ && it(w, p._ldraw_, s);
|
|
3301
3301
|
});
|
|
3302
3302
|
const l = e.edges || [];
|
|
3303
3303
|
l.forEach((p) => {
|
|
3304
3304
|
const w = c.append("g").attr("class", "edge").attr("id", `edge_${p._gvid}`);
|
|
3305
|
-
p._draw_ && it(w, p._draw_,
|
|
3305
|
+
p._draw_ && it(w, p._draw_, s), p._hdraw_ && it(w, p._hdraw_, s), p._tdraw_ && it(w, p._tdraw_, s), p._ldraw_ && it(w, p._ldraw_, s);
|
|
3306
3306
|
});
|
|
3307
|
-
const u =
|
|
3307
|
+
const u = sn().scaleExtent([0.1, 10]).on("zoom", (p) => {
|
|
3308
3308
|
c.attr("transform", p.transform.toString());
|
|
3309
3309
|
});
|
|
3310
3310
|
o.call(u);
|
|
@@ -3338,12 +3338,12 @@ function Ka(t, e, n = 14) {
|
|
|
3338
3338
|
edges: g
|
|
3339
3339
|
};
|
|
3340
3340
|
}
|
|
3341
|
-
const
|
|
3342
|
-
function
|
|
3343
|
-
const i = (t.clientWidth || un) / e,
|
|
3344
|
-
return Math.max(
|
|
3341
|
+
const Ys = "data-label-center-x", zs = "data-label-center-y";
|
|
3342
|
+
function Rs(t, e, n) {
|
|
3343
|
+
const i = (t.clientWidth || un) / e, s = es / (n * i);
|
|
3344
|
+
return Math.max(ns, s);
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3346
|
+
function Ls(t, e, n, r) {
|
|
3347
3347
|
if (e.initialTransform)
|
|
3348
3348
|
return e.initialTransform;
|
|
3349
3349
|
if (e.headless) {
|
|
@@ -3354,46 +3354,46 @@ function La(t, e, n, r) {
|
|
|
3354
3354
|
k: l
|
|
3355
3355
|
};
|
|
3356
3356
|
}
|
|
3357
|
-
const i = t.node(),
|
|
3357
|
+
const i = t.node(), s = i ? i.getBBox() : { x: 0, y: 0, width: n, height: r }, o = ee * n / s.width, c = s.x + s.width / 2, a = s.y + s.height / 2;
|
|
3358
3358
|
return {
|
|
3359
3359
|
x: n / 2 - c * o,
|
|
3360
|
-
y: r / 2 -
|
|
3360
|
+
y: r / 2 - a * o,
|
|
3361
3361
|
k: o
|
|
3362
3362
|
};
|
|
3363
3363
|
}
|
|
3364
|
-
function
|
|
3364
|
+
function Qs(t, e) {
|
|
3365
3365
|
return ee * t / e;
|
|
3366
3366
|
}
|
|
3367
|
-
function
|
|
3367
|
+
function Js(t, e, n) {
|
|
3368
3368
|
const r = e / n;
|
|
3369
|
-
return
|
|
3369
|
+
return ts / (t * r);
|
|
3370
3370
|
}
|
|
3371
|
-
function
|
|
3372
|
-
return
|
|
3373
|
-
const
|
|
3374
|
-
!isNaN(
|
|
3371
|
+
function Bs(t, e, n, r) {
|
|
3372
|
+
return sn().scaleExtent([0.1, Rs(e, n, r)]).on("zoom", (i) => {
|
|
3373
|
+
const s = i.transform;
|
|
3374
|
+
!isNaN(s.x) && !isNaN(s.y) && !isNaN(s.k) && t.attr("transform", s.toString());
|
|
3375
3375
|
});
|
|
3376
3376
|
}
|
|
3377
|
-
function
|
|
3377
|
+
function Os(t, e) {
|
|
3378
3378
|
t.on("mouseenter", function() {
|
|
3379
|
-
|
|
3380
|
-
const n =
|
|
3379
|
+
z(this).raise();
|
|
3380
|
+
const n = z(this).select(".arrow-group");
|
|
3381
3381
|
if (!n.empty()) {
|
|
3382
|
-
const
|
|
3383
|
-
n.attr("transform",
|
|
3382
|
+
const a = n.attr("data-base-transform") || "";
|
|
3383
|
+
n.attr("transform", a + " scale(1.3)");
|
|
3384
3384
|
}
|
|
3385
|
-
const r = e.select(".edge.selected").size() > 0, i =
|
|
3386
|
-
r && !i ? (
|
|
3387
|
-
const
|
|
3388
|
-
(
|
|
3385
|
+
const r = e.select(".edge.selected").size() > 0, i = z(this).classed("selected"), s = z(this).attr("data-source-node-id"), o = z(this).attr("data-target-node-id"), c = z(this).attr("id");
|
|
3386
|
+
r && !i ? (z(this).classed("hover-highlight", !0), e.selectAll(".node").each(function() {
|
|
3387
|
+
const a = z(this).attr("data-node-id");
|
|
3388
|
+
(a === s || a === o) && z(this).classed("hover-highlight", !0);
|
|
3389
3389
|
})) : (e.selectAll(".edge").each(function() {
|
|
3390
|
-
|
|
3390
|
+
z(this).attr("id") !== c && z(this).classed("dimmed", !0);
|
|
3391
3391
|
}), e.selectAll(".node").each(function() {
|
|
3392
|
-
const
|
|
3393
|
-
|
|
3392
|
+
const a = z(this).attr("data-node-id");
|
|
3393
|
+
a !== s && a !== o && z(this).classed("dimmed", !0);
|
|
3394
3394
|
}));
|
|
3395
3395
|
}).on("mouseleave", function() {
|
|
3396
|
-
const n =
|
|
3396
|
+
const n = z(this).select(".arrow-group");
|
|
3397
3397
|
if (!n.empty()) {
|
|
3398
3398
|
const r = n.attr("data-base-transform") || "";
|
|
3399
3399
|
n.attr("transform", r);
|
|
@@ -3401,29 +3401,29 @@ function Ba(t, e) {
|
|
|
3401
3401
|
e.selectAll(".edge.hover-highlight").classed("hover-highlight", !1), e.selectAll(".node.hover-highlight").classed("hover-highlight", !1), e.selectAll(".edge.dimmed").classed("dimmed", !1), e.selectAll(".node.dimmed").classed("dimmed", !1);
|
|
3402
3402
|
});
|
|
3403
3403
|
}
|
|
3404
|
-
function
|
|
3404
|
+
function Hs(t, e, n, r, i, s, o) {
|
|
3405
3405
|
if (e && e.length > 0) {
|
|
3406
|
-
const c = o * 0.62,
|
|
3407
|
-
const x = m.text.length * c, y = m.background && m.background !== "transparent", p = x +
|
|
3406
|
+
const c = o * 0.62, a = 1, l = 0, u = 2, f = e.map((m) => {
|
|
3407
|
+
const x = m.text.length * c, y = m.background && m.background !== "transparent", p = x + a * 2;
|
|
3408
3408
|
return { textWidth: x, hasBackground: y, totalWidth: p };
|
|
3409
3409
|
}), h = f.reduce((m, x, y) => m + x.totalWidth + (y > 0 ? l : 0), 0);
|
|
3410
3410
|
let g = n - h / 2;
|
|
3411
3411
|
e.forEach((m, x) => {
|
|
3412
3412
|
const y = f[x];
|
|
3413
|
-
x > 0 && (g += l), y.hasBackground && t.append("rect").attr("class", "label-elem-bg").attr("x", g).attr("y", r - o / 2 - u).attr("width", y.totalWidth).attr("height", o + u * 2).attr("rx", 2).attr("ry", 2).attr("fill", m.background).style("pointer-events", "none"), t.append("text").attr("class", "label-text-elem").attr("x", g +
|
|
3413
|
+
x > 0 && (g += l), y.hasBackground && t.append("rect").attr("class", "label-elem-bg").attr("x", g).attr("y", r - o / 2 - u).attr("width", y.totalWidth).attr("height", o + u * 2).attr("rx", 2).attr("ry", 2).attr("fill", m.background).style("pointer-events", "none"), t.append("text").attr("class", "label-text-elem").attr("x", g + a).attr("y", r).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", o + "px").attr("font-weight", "500").attr("fill", m.color && m.color.length > 0 ? m.color : i).style("pointer-events", "none").text(m.text), g += y.totalWidth;
|
|
3414
3414
|
});
|
|
3415
3415
|
} else
|
|
3416
|
-
t.append("text").attr("class", "label-text").attr("x", n).attr("y", r).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", o + "px").attr("font-weight", "500").attr("fill", i).style("pointer-events", "none").text(
|
|
3416
|
+
t.append("text").attr("class", "label-text").attr("x", n).attr("y", r).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", o + "px").attr("font-weight", "500").attr("fill", i).style("pointer-events", "none").text(s);
|
|
3417
3417
|
}
|
|
3418
|
-
function
|
|
3419
|
-
const { edge: e, edgeGroup: n, labelMidpoint: r, edgeColor: i, isSelected:
|
|
3418
|
+
function Fs(t) {
|
|
3419
|
+
const { edge: e, edgeGroup: n, labelMidpoint: r, edgeColor: i, isSelected: s, ctx: o } = t, { config: c, onEdgeSelect: a, onEdgeLabelClick: l, debug: u } = o, { displayElems: f, finalText: h, boxWidth: g, boxHeight: m } = mn(e, c, o.edgeCount), x = e.edgeIndex !== void 0, y = g, p = m, w = r.y, E = r.x, S = n.append("g").attr("class", "label-area");
|
|
3420
3420
|
S.append("rect").attr("class", "label-bg").attr("x", E - y / 2).attr("y", w - p / 2).attr("width", y).attr("height", p).attr("rx", 5).attr("ry", 5).attr("fill", "var(--bg-primary, #fff)").attr("stroke", "var(--border-tertiary, #F2F2F3)").attr("stroke-width", 1.5);
|
|
3421
3421
|
const $ = E;
|
|
3422
|
-
x &&
|
|
3423
|
-
v.stopPropagation(), !
|
|
3422
|
+
x && a && n.style("cursor", "pointer").on("click", function(v) {
|
|
3423
|
+
v.stopPropagation(), !s && a(e.edgeIndex);
|
|
3424
3424
|
}), x && l && S.on("click", function(v) {
|
|
3425
3425
|
v.stopPropagation(), l(e.edgeIndex);
|
|
3426
|
-
}),
|
|
3426
|
+
}), Hs(
|
|
3427
3427
|
S,
|
|
3428
3428
|
f,
|
|
3429
3429
|
$,
|
|
@@ -3433,82 +3433,82 @@ function Fa(t) {
|
|
|
3433
3433
|
c.labelFontSize
|
|
3434
3434
|
), u && n.append("circle").attr("cx", r.x).attr("cy", r.y).attr("r", 4).attr("fill", "blue").attr("opacity", 0.8).style("pointer-events", "none").attr("class", "debug-label-center");
|
|
3435
3435
|
}
|
|
3436
|
-
function
|
|
3436
|
+
function Ws(t, e, n) {
|
|
3437
3437
|
e._ldraw_.forEach((r) => {
|
|
3438
3438
|
if (r.op === "T" && r.text) {
|
|
3439
|
-
const i = r.size || 10,
|
|
3439
|
+
const i = r.size || 10, s = i * 0.6, o = r.text.length * s, c = i, a = 6, l = o + a * 2, u = c + a * 2, f = 4, h = n.y;
|
|
3440
3440
|
t.append("rect").attr("x", n.x - l / 2).attr("y", h - u / 2).attr("width", l).attr("height", u).attr("rx", f).attr("ry", f).attr("fill", "white").attr("stroke", "#d0d0d0").attr("stroke-width", 0.5), t.append("text").attr("x", n.x).attr("y", h).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", r.face || "Inter, Helvetica, Arial").attr("font-size", `${i}px`).attr("fill", r.color || "#666").text(r.text);
|
|
3441
3441
|
}
|
|
3442
3442
|
});
|
|
3443
3443
|
}
|
|
3444
|
-
function
|
|
3444
|
+
function Gs(t, e, n) {
|
|
3445
3445
|
e._draw_ && e._draw_.forEach((r) => {
|
|
3446
3446
|
if (r.op === "b" && r.points) {
|
|
3447
|
-
const i = r.points.map(([o, c]) => [o, n - c]),
|
|
3448
|
-
t.append("path").attr("d",
|
|
3447
|
+
const i = r.points.map(([o, c]) => [o, n - c]), s = `M${i[0][0]},${i[0][1]} C${i.slice(1).map((o) => `${o[0]},${o[1]}`).join(" ")}`;
|
|
3448
|
+
t.append("path").attr("d", s).attr("fill", "none").attr("stroke", r.color || "#9AA4B2").attr("stroke-width", 2);
|
|
3449
3449
|
}
|
|
3450
3450
|
}), e._hdraw_ && e._hdraw_.forEach((r) => {
|
|
3451
3451
|
if (r.op === "P" && r.points) {
|
|
3452
|
-
const i = r.points.map(([
|
|
3453
|
-
t.append("polygon").attr("points", i.map((
|
|
3452
|
+
const i = r.points.map(([s, o]) => [s, n - o]);
|
|
3453
|
+
t.append("polygon").attr("points", i.map((s) => s.join(",")).join(" ")).attr("fill", r.color || "#9AA4B2");
|
|
3454
3454
|
}
|
|
3455
3455
|
}), e._ldraw_ && it(t, e._ldraw_, n);
|
|
3456
3456
|
}
|
|
3457
|
-
function
|
|
3457
|
+
function Vs(t, e) {
|
|
3458
3458
|
var C, L;
|
|
3459
|
-
const { g: n, height: r, config: i, useOrthogonalRendering:
|
|
3459
|
+
const { g: n, height: r, config: i, useOrthogonalRendering: s, selectedEdgeId: o, debug: c } = e, a = o != null && t.edgeIndex === o, l = t.getColor(), u = n.append("g").attr("class", a ? "edge selected" : "edge").attr("id", `edge_${t._gvid}`).attr("data-edge-id", t.edgeIndex !== void 0 ? String(t.edgeIndex) : "").attr("data-is-base", t.isBaseEdge ? "true" : "false").attr("data-color", l).attr("data-source-node-id", ((C = t.sourceNode) == null ? void 0 : C.name) || "").attr("data-target-node-id", ((L = t.targetNode) == null ? void 0 : L.name) || "").attr("style", `--edge-color: ${l}`), f = t.getStartPoint(), h = t.getEndPoint(), g = t.getDirection(), m = i.arrowWidth;
|
|
3460
3460
|
if (!(f && h && g)) {
|
|
3461
|
-
|
|
3461
|
+
Gs(u, t, r);
|
|
3462
3462
|
return;
|
|
3463
3463
|
}
|
|
3464
3464
|
const x = { x: f.x, y: r - f.y }, y = { x: h.x, y: r - h.y }, p = { x: y.x, y: y.y };
|
|
3465
3465
|
let w = { x: y.x, y: y.y };
|
|
3466
3466
|
g === "right" ? w = { x: y.x - m, y: y.y } : g === "left" ? w = { x: y.x + m, y: y.y } : g === "self" && (w = { x: y.x + m, y: y.y });
|
|
3467
|
-
const E =
|
|
3467
|
+
const E = ms(
|
|
3468
3468
|
t,
|
|
3469
3469
|
g,
|
|
3470
3470
|
x,
|
|
3471
3471
|
w,
|
|
3472
3472
|
r,
|
|
3473
3473
|
i,
|
|
3474
|
-
|
|
3474
|
+
s
|
|
3475
3475
|
), S = c && t.isBaseEdge ? "#000000" : t.getColor(), $ = c && t.isBaseEdge ? 4 : 1.5;
|
|
3476
|
-
u.append("path").attr("d", E).attr("fill", "none").attr("stroke", "transparent").attr("stroke-width", 10).attr("class", "edge-hit-area").style("cursor", "pointer"), u.append("path").attr("d", E).attr("fill", "none").attr("stroke", S).attr("stroke-width", $).attr("class", "edge-path").style("pointer-events", "none"),
|
|
3476
|
+
u.append("path").attr("d", E).attr("fill", "none").attr("stroke", "transparent").attr("stroke-width", 10).attr("class", "edge-hit-area").style("cursor", "pointer"), u.append("path").attr("d", E).attr("fill", "none").attr("stroke", S).attr("stroke-width", $).attr("class", "edge-path").style("pointer-events", "none"), Os(u, n);
|
|
3477
3477
|
const v = 12;
|
|
3478
3478
|
let k = "";
|
|
3479
3479
|
g === "right" ? k = `translate(${p.x - v / 2}, ${p.y})` : g === "left" ? k = `translate(${p.x + v / 2}, ${p.y}) rotate(180)` : g === "self" && (k = `translate(${p.x + v / 2}, ${p.y}) rotate(180)`), u.append("g").attr("class", "arrow-group").attr("transform", k).attr("data-base-transform", k).append("use").attr("class", "edge-arrow").attr("href", "#arrow-right").attr("width", v).attr("height", v).attr("x", -v / 2).attr("y", -v / 2).attr("fill", S).attr("stroke", S).style("stroke-width", 0);
|
|
3480
|
-
const
|
|
3480
|
+
const P = {
|
|
3481
3481
|
x: (x.x + y.x) / 2,
|
|
3482
3482
|
y: t.midY
|
|
3483
3483
|
};
|
|
3484
|
-
if (u.attr(
|
|
3484
|
+
if (u.attr(Ys, P.x).attr(zs, P.y), t.label ? Fs({
|
|
3485
3485
|
edge: t,
|
|
3486
3486
|
edgeGroup: u,
|
|
3487
|
-
labelMidpoint:
|
|
3487
|
+
labelMidpoint: P,
|
|
3488
3488
|
edgeColor: S,
|
|
3489
|
-
isSelected:
|
|
3489
|
+
isSelected: a,
|
|
3490
3490
|
ctx: e
|
|
3491
|
-
}) : t._ldraw_ &&
|
|
3491
|
+
}) : t._ldraw_ && Ws(u, t, P), c) {
|
|
3492
3492
|
let B;
|
|
3493
|
-
t.depth === 0 ? B = `d:0 dir:${t.baseDirection || "base"} off:${t.baseOffset} id:${t._gvid}` : B = `d:${t.depth} dir:${t.baseDirection || "?"} midY:${Math.round(t.midY)} id:${t._gvid}`, u.append("text").attr("x",
|
|
3493
|
+
t.depth === 0 ? B = `d:0 dir:${t.baseDirection || "base"} off:${t.baseOffset} id:${t._gvid}` : B = `d:${t.depth} dir:${t.baseDirection || "?"} midY:${Math.round(t.midY)} id:${t._gvid}`, u.append("text").attr("x", P.x).attr("y", P.y + 15).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "monospace").attr("font-size", "9px").attr("fill", "#999").text(B);
|
|
3494
3494
|
}
|
|
3495
3495
|
}
|
|
3496
|
-
function
|
|
3496
|
+
function Xs(t) {
|
|
3497
3497
|
const e = t.node();
|
|
3498
3498
|
if (!e) return;
|
|
3499
3499
|
const n = e.getBBox(), r = n.x + n.width / 2, i = n.y + n.height / 2;
|
|
3500
3500
|
t.append("rect").attr("x", n.x).attr("y", n.y).attr("width", n.width).attr("height", n.height).attr("fill", "none").attr("stroke", "yellow").attr("stroke-width", 3).attr("opacity", 0.8).style("pointer-events", "none").attr("class", "debug-root-border"), t.append("circle").attr("cx", r).attr("cy", i).attr("r", 10).attr("fill", "yellow").attr("stroke", "orange").attr("stroke-width", 2).attr("opacity", 0.9).style("pointer-events", "none").attr("class", "debug-geometric-center");
|
|
3501
3501
|
}
|
|
3502
|
-
function
|
|
3502
|
+
function qs(t, e, n) {
|
|
3503
3503
|
const r = Math.max(e, n) * 3e-3;
|
|
3504
3504
|
t.append("circle").attr("cx", e / 2).attr("cy", n / 2).attr("r", r).attr("fill", "red").attr("opacity", 0.9).style("pointer-events", "none").attr("class", "debug-center-marker");
|
|
3505
3505
|
}
|
|
3506
|
-
function
|
|
3506
|
+
function js(t = {}) {
|
|
3507
3507
|
return {
|
|
3508
3508
|
nodeMapping: {},
|
|
3509
3509
|
maxDepth: null,
|
|
3510
3510
|
includeLesserDepths: !0,
|
|
3511
|
-
config:
|
|
3511
|
+
config: gs(),
|
|
3512
3512
|
useOrthogonalRendering: !0,
|
|
3513
3513
|
svgFontSize: 14,
|
|
3514
3514
|
debug: !1,
|
|
@@ -3525,21 +3525,21 @@ function ja(t = {}) {
|
|
|
3525
3525
|
...t
|
|
3526
3526
|
};
|
|
3527
3527
|
}
|
|
3528
|
-
function
|
|
3528
|
+
function Us(t) {
|
|
3529
3529
|
return t.replace(/<svg\b([^>]*)>/i, (e, n) => {
|
|
3530
3530
|
const r = n.replace(/\s+(width|height|id)="[^"]*"/gi, "");
|
|
3531
3531
|
return `<svg id="${cn}" width="${_t}" height="${_t}"${r}>`;
|
|
3532
3532
|
});
|
|
3533
3533
|
}
|
|
3534
|
-
function
|
|
3535
|
-
var
|
|
3534
|
+
function ta(t, e, n) {
|
|
3535
|
+
var W;
|
|
3536
3536
|
const {
|
|
3537
3537
|
maxDepth: r,
|
|
3538
3538
|
includeLesserDepths: i,
|
|
3539
|
-
config:
|
|
3539
|
+
config: s,
|
|
3540
3540
|
useOrthogonalRendering: o,
|
|
3541
3541
|
svgFontSize: c,
|
|
3542
|
-
debug:
|
|
3542
|
+
debug: a,
|
|
3543
3543
|
selectedEdgeId: l,
|
|
3544
3544
|
onEdgeSelect: u,
|
|
3545
3545
|
onEdgeLabelClick: f,
|
|
@@ -3551,26 +3551,26 @@ function ts(t, e, n) {
|
|
|
3551
3551
|
chainIcon: p
|
|
3552
3552
|
} = n;
|
|
3553
3553
|
t.innerHTML = "";
|
|
3554
|
-
const w = ((
|
|
3554
|
+
const w = ((W = e.bb) == null ? void 0 : W.split(",").map(Number)) || fn, [, , E, S] = w;
|
|
3555
3555
|
let $ = E;
|
|
3556
|
-
const v = S, k =
|
|
3557
|
-
k.append("defs").html(
|
|
3558
|
-
const
|
|
3559
|
-
|
|
3556
|
+
const v = S, k = z(t).append("svg").attr("width", "100%").attr("height", "100%").attr("viewBox", `0 0 ${$} ${v}`);
|
|
3557
|
+
k.append("defs").html(Ds + (p ? Us(p) : ""));
|
|
3558
|
+
const D = k.append("g").attr("id", "graph0"), { nodes: P, edges: C } = $s(e, h, g), { nodeColumnMap: L, nodeColumns: B, edgeColumns: V } = bs(
|
|
3559
|
+
P,
|
|
3560
3560
|
C
|
|
3561
|
-
), d = C.length, N = m ??
|
|
3562
|
-
$ =
|
|
3563
|
-
const _ =
|
|
3564
|
-
y || k.call(_), !y && !x && (k.on("wheel.zoom", null), k.on("dblclick.zoom", null)), C.forEach((
|
|
3561
|
+
), d = C.length, N = m ?? ks(P, C, s, d);
|
|
3562
|
+
$ = Ss(B, v, N), k.attr("viewBox", `0 0 ${$} ${v}`), Ms(D, B, v, a, p !== void 0), o && (Es(B, v), Ns(C, V), ys(V, B, L, v, s));
|
|
3563
|
+
const _ = Bs(D, t, $, c);
|
|
3564
|
+
y || k.call(_), !y && !x && (k.on("wheel.zoom", null), k.on("dblclick.zoom", null)), C.forEach((M) => {
|
|
3565
3565
|
if (r !== null) {
|
|
3566
3566
|
if (i) {
|
|
3567
|
-
if (
|
|
3568
|
-
} else if (
|
|
3567
|
+
if (M.depth > r) return;
|
|
3568
|
+
} else if (M.depth !== r) return;
|
|
3569
3569
|
}
|
|
3570
|
-
|
|
3571
|
-
g:
|
|
3570
|
+
Vs(M, {
|
|
3571
|
+
g: D,
|
|
3572
3572
|
height: v,
|
|
3573
|
-
config:
|
|
3573
|
+
config: s,
|
|
3574
3574
|
useOrthogonalRendering: o,
|
|
3575
3575
|
zoomBehavior: _,
|
|
3576
3576
|
svgSelection: k,
|
|
@@ -3580,50 +3580,65 @@ function ts(t, e, n) {
|
|
|
3580
3580
|
selectedEdgeId: l,
|
|
3581
3581
|
onEdgeSelect: u,
|
|
3582
3582
|
onEdgeLabelClick: f,
|
|
3583
|
-
debug:
|
|
3583
|
+
debug: a,
|
|
3584
3584
|
edgeCount: d
|
|
3585
3585
|
});
|
|
3586
|
-
}),
|
|
3587
|
-
const b =
|
|
3588
|
-
y ?
|
|
3586
|
+
}), a && Xs(D);
|
|
3587
|
+
const b = Ls(D, n, $, v), A = `translate(${b.x},${b.y}) scale(${b.k})`;
|
|
3588
|
+
y ? D.attr("transform", A) : k.call(
|
|
3589
3589
|
_.transform,
|
|
3590
3590
|
Ht.translate(b.x, b.y).scale(b.k)
|
|
3591
|
-
),
|
|
3592
|
-
const I =
|
|
3591
|
+
), a && qs(k, $, v);
|
|
3592
|
+
const I = [];
|
|
3593
|
+
B.forEach((M) => {
|
|
3594
|
+
M.nodes.forEach((O) => {
|
|
3595
|
+
if (O.virtualNode) return;
|
|
3596
|
+
const H = O.getBounds();
|
|
3597
|
+
H && I.push({
|
|
3598
|
+
x: H.x,
|
|
3599
|
+
y: v - H.y - H.height,
|
|
3600
|
+
width: H.width,
|
|
3601
|
+
height: H.height
|
|
3602
|
+
});
|
|
3603
|
+
});
|
|
3604
|
+
});
|
|
3605
|
+
const T = C.filter((M) => M.edgeIndex !== void 0).map((M) => {
|
|
3593
3606
|
var O, H;
|
|
3594
3607
|
return {
|
|
3595
|
-
id:
|
|
3596
|
-
index:
|
|
3597
|
-
sourceNodeId: ((O =
|
|
3598
|
-
targetNodeId: ((H =
|
|
3599
|
-
label:
|
|
3608
|
+
id: M._gvid,
|
|
3609
|
+
index: M.edgeIndex,
|
|
3610
|
+
sourceNodeId: ((O = M.sourceNode) == null ? void 0 : O.name) || "",
|
|
3611
|
+
targetNodeId: ((H = M.targetNode) == null ? void 0 : H.name) || "",
|
|
3612
|
+
label: M.getLabelText()
|
|
3600
3613
|
};
|
|
3601
|
-
}).sort((
|
|
3602
|
-
if (!
|
|
3614
|
+
}).sort((M, O) => M.index - O.index), Y = k.node(), R = D.node();
|
|
3615
|
+
if (!Y || !R)
|
|
3603
3616
|
throw new Error("Failed to construct SVG elements");
|
|
3604
3617
|
return {
|
|
3605
3618
|
zoomBehavior: _,
|
|
3606
|
-
svgElement:
|
|
3607
|
-
gElement:
|
|
3619
|
+
svgElement: Y,
|
|
3620
|
+
gElement: R,
|
|
3608
3621
|
baseFontSize: c,
|
|
3609
3622
|
viewBoxWidth: $,
|
|
3610
|
-
|
|
3611
|
-
|
|
3623
|
+
viewBoxHeight: v,
|
|
3624
|
+
edges: T,
|
|
3625
|
+
initialTransform: b,
|
|
3626
|
+
nodeBounds: I
|
|
3612
3627
|
};
|
|
3613
3628
|
}
|
|
3614
3629
|
export {
|
|
3615
3630
|
Uo as D,
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3631
|
+
Qs as a,
|
|
3632
|
+
ta as b,
|
|
3633
|
+
Js as c,
|
|
3634
|
+
js as d,
|
|
3620
3635
|
Zo as e,
|
|
3621
|
-
|
|
3636
|
+
Zs as f,
|
|
3622
3637
|
Ct as g,
|
|
3623
|
-
|
|
3638
|
+
gs as h,
|
|
3624
3639
|
Ht as i,
|
|
3625
3640
|
yn as j,
|
|
3626
|
-
|
|
3627
|
-
|
|
3641
|
+
Ks as r,
|
|
3642
|
+
z as s,
|
|
3628
3643
|
Fo as t
|
|
3629
3644
|
};
|