@skydesign/tf 0.3.4 → 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.
@@ -1,7 +1,7 @@
1
1
  function Zs(t) {
2
2
  return JSON.stringify(JSON.stringify(t)).slice(1, -1);
3
3
  }
4
- function Mt(t) {
4
+ function Ct(t) {
5
5
  try {
6
6
  return JSON.parse(t);
7
7
  } catch {
@@ -16,9 +16,9 @@ function ie() {
16
16
  if (!(r = arguments[t] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
17
17
  n[r] = [];
18
18
  }
19
- return new St(n);
19
+ return new kt(n);
20
20
  }
21
- function St(t) {
21
+ function kt(t) {
22
22
  this._ = t;
23
23
  }
24
24
  function wn(t, e) {
@@ -28,8 +28,8 @@ function wn(t, e) {
28
28
  return { type: n, name: r };
29
29
  });
30
30
  }
31
- St.prototype = ie.prototype = {
32
- constructor: St,
31
+ kt.prototype = ie.prototype = {
32
+ constructor: kt,
33
33
  on: function(t, e) {
34
34
  var n = this._, r = wn(t + "", n), i, s = -1, o = r.length;
35
35
  if (arguments.length < 2) {
@@ -45,7 +45,7 @@ St.prototype = ie.prototype = {
45
45
  copy: function() {
46
46
  var t = {}, e = this._;
47
47
  for (var n in e) t[n] = e[n].slice();
48
- return new St(t);
48
+ return new kt(t);
49
49
  },
50
50
  call: function(t, e) {
51
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];
@@ -109,22 +109,22 @@ function $n(t) {
109
109
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
110
110
  for (var s = e[i], o = s.length, c = r[i] = new Array(o), a, l, u = 0; u < o; ++u)
111
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 F(r, this._parents);
112
+ return new G(r, this._parents);
113
113
  }
114
- function Sn(t) {
114
+ function kn(t) {
115
115
  return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
116
116
  }
117
- function kn() {
117
+ function Sn() {
118
118
  return [];
119
119
  }
120
120
  function Ye(t) {
121
- return t == null ? kn : function() {
121
+ return t == null ? Sn : function() {
122
122
  return this.querySelectorAll(t);
123
123
  };
124
124
  }
125
125
  function An(t) {
126
126
  return function() {
127
- return Sn(t.apply(this, arguments));
127
+ return kn(t.apply(this, arguments));
128
128
  };
129
129
  }
130
130
  function In(t) {
@@ -132,7 +132,7 @@ function In(t) {
132
132
  for (var e = this._groups, n = e.length, r = [], i = [], s = 0; s < n; ++s)
133
133
  for (var o = e[s], c = o.length, a, l = 0; l < c; ++l)
134
134
  (a = o[l]) && (r.push(t.call(a, a.__data__, l, o)), i.push(a));
135
- return new F(r, i);
135
+ return new G(r, i);
136
136
  }
137
137
  function ze(t) {
138
138
  return function() {
@@ -145,16 +145,16 @@ function Re(t) {
145
145
  };
146
146
  }
147
147
  var Tn = Array.prototype.find;
148
- function Mn(t) {
148
+ function Cn(t) {
149
149
  return function() {
150
150
  return Tn.call(this.children, t);
151
151
  };
152
152
  }
153
- function Cn() {
153
+ function Mn() {
154
154
  return this.firstElementChild;
155
155
  }
156
156
  function Dn(t) {
157
- return this.select(t == null ? Cn : Mn(typeof t == "function" ? t : Re(t)));
157
+ return this.select(t == null ? Mn : Cn(typeof t == "function" ? t : Re(t)));
158
158
  }
159
159
  var Pn = Array.prototype.filter;
160
160
  function Yn() {
@@ -173,19 +173,19 @@ function Ln(t) {
173
173
  for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
174
174
  for (var s = e[i], o = s.length, c = r[i] = [], a, l = 0; l < o; ++l)
175
175
  (a = s[l]) && t.call(a, a.__data__, l, s) && c.push(a);
176
- return new F(r, this._parents);
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 On() {
182
- return new F(this._enter || this._groups.map(Le), this._parents);
181
+ function Bn() {
182
+ return new G(this._enter || this._groups.map(Le), this._parents);
183
183
  }
184
- function Ct(t, e) {
184
+ function Mt(t, e) {
185
185
  this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
186
186
  }
187
- Ct.prototype = {
188
- constructor: Ct,
187
+ Mt.prototype = {
188
+ constructor: Mt,
189
189
  appendChild: function(t) {
190
190
  return this._parent.insertBefore(t, this._next);
191
191
  },
@@ -199,14 +199,14 @@ Ct.prototype = {
199
199
  return this._parent.querySelectorAll(t);
200
200
  }
201
201
  };
202
- function Bn(t) {
202
+ function On(t) {
203
203
  return function() {
204
204
  return t;
205
205
  };
206
206
  }
207
207
  function Hn(t, e, n, r, i, s) {
208
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 Ct(t, s[o]);
209
+ (c = e[o]) ? (c.__data__ = s[o], r[o] = c) : n[o] = new Mt(t, s[o]);
210
210
  for (; o < a; ++o)
211
211
  (c = e[o]) && (i[o] = c);
212
212
  }
@@ -215,7 +215,7 @@ function Fn(t, e, n, r, i, s, o) {
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, s[c], c, s) + "", (a = l.get(g)) ? (r[c] = a, a.__data__ = s[c], l.delete(g)) : n[c] = new Ct(t, s[c]);
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
  }
@@ -225,7 +225,7 @@ 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 = Bn(t));
228
+ typeof t != "function" && (t = On(t));
229
229
  for (var s = i.length, o = new Array(s), c = new Array(s), a = new Array(s), l = 0; l < s; ++l) {
230
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);
@@ -235,13 +235,13 @@ function Gn(t, e) {
235
235
  S._next = $ || null;
236
236
  }
237
237
  }
238
- return o = new F(o, r), o._enter = c, o._exit = a, o;
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 F(this._exit || this._groups.map(Le), this._parents);
244
+ return new G(this._exit || this._groups.map(Le), this._parents);
245
245
  }
246
246
  function qn(t, e, n) {
247
247
  var r = this.enter(), i = this, s = this.exit();
@@ -253,7 +253,7 @@ function Un(t) {
253
253
  (g = l[m] || u[m]) && (h[m] = g);
254
254
  for (; a < i; ++a)
255
255
  c[a] = n[a];
256
- return new F(c, this._parents);
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; )
@@ -271,7 +271,7 @@ function Kn(t) {
271
271
  (l = o[u]) && (a[u] = l);
272
272
  a.sort(e);
273
273
  }
274
- return new F(i, this._parents).order();
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;
@@ -345,7 +345,7 @@ function ur(t, e) {
345
345
  }
346
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 Oe(t) {
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) || Oe(t).getComputedStyle(t, null).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 Be(t) {
392
+ function Oe(t) {
393
393
  return t.trim().split(/^|\s+/);
394
394
  }
395
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 = Be(t.getAttribute("class") || "");
399
+ this._node = t, this._names = Oe(t.getAttribute("class") || "");
400
400
  }
401
401
  He.prototype = {
402
402
  add: function(t) {
@@ -433,7 +433,7 @@ function vr(t, e) {
433
433
  };
434
434
  }
435
435
  function br(t, e) {
436
- var n = Be(t + "");
436
+ var n = Oe(t + "");
437
437
  if (arguments.length < 2) {
438
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;
@@ -454,10 +454,10 @@ function $r(t) {
454
454
  this.textContent = e ?? "";
455
455
  };
456
456
  }
457
- function Sr(t) {
457
+ function kr(t) {
458
458
  return arguments.length ? this.each(t == null ? Er : (typeof t == "function" ? $r : Nr)(t)) : this.node().textContent;
459
459
  }
460
- function kr() {
460
+ function Sr() {
461
461
  this.innerHTML = "";
462
462
  }
463
463
  function Ar(t) {
@@ -472,13 +472,13 @@ function Ir(t) {
472
472
  };
473
473
  }
474
474
  function Tr(t) {
475
- return arguments.length ? this.each(t == null ? kr : (typeof t == "function" ? Ir : Ar)(t)) : this.node().innerHTML;
475
+ return arguments.length ? this.each(t == null ? Sr : (typeof t == "function" ? Ir : Ar)(t)) : this.node().innerHTML;
476
476
  }
477
- function Mr() {
477
+ function Cr() {
478
478
  this.nextSibling && this.parentNode.appendChild(this);
479
479
  }
480
- function Cr() {
481
- return this.each(Mr);
480
+ function Mr() {
481
+ return this.each(Cr);
482
482
  }
483
483
  function Dr() {
484
484
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
@@ -505,10 +505,10 @@ function Lr() {
505
505
  var t = this.parentNode;
506
506
  t && t.removeChild(this);
507
507
  }
508
- function Or() {
508
+ function Br() {
509
509
  return this.each(Lr);
510
510
  }
511
- function Br() {
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 : Br);
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__;
@@ -572,7 +572,7 @@ function Ur(t, e, n) {
572
572
  return this;
573
573
  }
574
574
  function Ge(t, e, n) {
575
- var r = Oe(t), i = r.CustomEvent;
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) {
@@ -594,24 +594,24 @@ function* Jr() {
594
594
  (o = r[i]) && (yield o);
595
595
  }
596
596
  var Ve = [null];
597
- function F(t, e) {
597
+ function G(t, e) {
598
598
  this._groups = t, this._parents = e;
599
599
  }
600
600
  function wt() {
601
- return new F([[document.documentElement]], Ve);
601
+ return new G([[document.documentElement]], Ve);
602
602
  }
603
603
  function jr() {
604
604
  return this;
605
605
  }
606
- F.prototype = wt.prototype = {
607
- constructor: F,
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: On,
614
+ enter: Bn,
615
615
  exit: Xn,
616
616
  join: qn,
617
617
  merge: Un,
@@ -628,21 +628,21 @@ F.prototype = wt.prototype = {
628
628
  style: gr,
629
629
  property: xr,
630
630
  classed: br,
631
- text: Sr,
631
+ text: kr,
632
632
  html: Tr,
633
- raise: Cr,
633
+ raise: Mr,
634
634
  lower: Pr,
635
635
  append: Yr,
636
636
  insert: Rr,
637
- remove: Or,
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 Y(t) {
645
- return typeof t == "string" ? new F([[document.querySelector(t)]], [document.documentElement]) : new F([[t]], Ve);
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,11 +668,11 @@ function Ut(t) {
668
668
  t.preventDefault(), t.stopImmediatePropagation();
669
669
  }
670
670
  function ei(t) {
671
- var e = t.document.documentElement, n = Y(t).on("dragstart.drag", Ut, qt);
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 = Y(t).on("dragstart.drag", null);
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);
@@ -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*", U = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ri = /^#([0-9a-f]{3,8})$/, ii = new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`), oi = new RegExp(`^rgb\\(${U},${U},${U}\\)$`), si = new RegExp(`^rgba\\(${ct},${ct},${ct},${mt}\\)$`), ai = new RegExp(`^rgba\\(${U},${U},${U},${mt}\\)$`), ci = new RegExp(`^hsl\\(${mt},${U},${U}\\)$`), li = new RegExp(`^hsla\\(${mt},${U},${U},${mt}\\)$`), ge = {
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,
@@ -866,35 +866,35 @@ 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 H(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 H(e[1], e[2], e[3], 1) : (e = oi.exec(t)) ? new H(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 H(NaN, NaN, NaN, 0) : null;
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
- return new H(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
872
+ return new F(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
873
873
  }
874
874
  function bt(t, e, n, r) {
875
- return r <= 0 && (t = e = n = NaN), new H(t, e, n, r);
875
+ return r <= 0 && (t = e = n = NaN), new F(t, e, n, r);
876
876
  }
877
877
  function hi(t) {
878
- return t instanceof vt || (t = yt(t)), t ? (t = t.rgb(), new H(t.r, t.g, t.b, t.opacity)) : new H();
878
+ return t instanceof vt || (t = yt(t)), t ? (t = t.rgb(), new F(t.r, t.g, t.b, t.opacity)) : new F();
879
879
  }
880
880
  function Zt(t, e, n, r) {
881
- return arguments.length === 1 ? hi(t) : new H(t, e, n, r ?? 1);
881
+ return arguments.length === 1 ? hi(t) : new F(t, e, n, r ?? 1);
882
882
  }
883
- function H(t, e, n, r) {
883
+ function F(t, e, n, r) {
884
884
  this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
885
885
  }
886
- ae(H, Zt, Xe(vt, {
886
+ ae(F, Zt, Xe(vt, {
887
887
  brighter(t) {
888
- return t = t == null ? Dt : Math.pow(Dt, t), new H(this.r * t, this.g * t, this.b * t, this.opacity);
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
  },
890
890
  darker(t) {
891
- return t = t == null ? pt : Math.pow(pt, t), new H(this.r * t, this.g * t, this.b * t, this.opacity);
891
+ return t = t == null ? pt : Math.pow(pt, t), new F(this.r * t, this.g * t, this.b * t, this.opacity);
892
892
  },
893
893
  rgb() {
894
894
  return this;
895
895
  },
896
896
  clamp() {
897
- return new H(st(this.r), st(this.g), st(this.b), Pt(this.opacity));
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;
@@ -926,32 +926,32 @@ function ot(t) {
926
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 X(t, e, n, r);
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 X) return new X(t.h, t.s, t.l, t.opacity);
933
- if (t instanceof vt || (t = yt(t)), !t) return new X();
934
- if (t instanceof X) return t;
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
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 X(o, c, a, t.opacity);
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 X(t, e, n, r ?? 1);
940
+ return arguments.length === 1 ? qe(t) : new q(t, e, n, r ?? 1);
941
941
  }
942
- function X(t, e, n, r) {
942
+ function q(t, e, n, r) {
943
943
  this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
944
944
  }
945
- ae(X, gi, Xe(vt, {
945
+ ae(q, gi, Xe(vt, {
946
946
  brighter(t) {
947
- return t = t == null ? Dt : Math.pow(Dt, t), new X(this.h, this.s, this.l * t, this.opacity);
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 X(this.h, this.s, this.l * t, this.opacity);
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;
954
- return new H(
954
+ return new F(
955
955
  Wt(t >= 240 ? t - 240 : t + 120, i, r),
956
956
  Wt(t, i, r),
957
957
  Wt(t < 120 ? t + 240 : t - 120, i, r),
@@ -959,7 +959,7 @@ ae(X, gi, Xe(vt, {
959
959
  );
960
960
  },
961
961
  clamp() {
962
- return new X(ve(this.h), Et(this.s), Et(this.l), Pt(this.opacity));
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;
@@ -1094,10 +1094,10 @@ var Ei = Qe(vi, "px, ", "px)", "deg)"), Ni = Qe(bi, ", ", ")", ")"), $i = 1e-12;
1094
1094
  function Ne(t) {
1095
1095
  return ((t = Math.exp(t)) + 1 / t) / 2;
1096
1096
  }
1097
- function Si(t) {
1097
+ function ki(t) {
1098
1098
  return ((t = Math.exp(t)) - 1 / t) / 2;
1099
1099
  }
1100
- function ki(t) {
1100
+ 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) {
@@ -1114,11 +1114,11 @@ const Ai = (function t(e, n, r) {
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 z = k * p, M = Ne($), D = l / (n * w) * (M * ki(e * z + $) - Si($));
1117
+ var D = k * p, P = Ne($), C = l / (n * w) * (P * Si(e * D + $) - ki($));
1118
1118
  return [
1119
- c + D * g,
1120
- a + D * m,
1121
- l * M / Ne(e * z + $)
1119
+ c + C * g,
1120
+ a + C * m,
1121
+ l * P / Ne(e * D + $)
1122
1122
  ];
1123
1123
  };
1124
1124
  }
@@ -1129,11 +1129,11 @@ const Ai = (function t(e, n, r) {
1129
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, at = 0, Ot = 0, xt = typeof performance == "object" && performance.now ? performance : Date, je = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
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 at || (je(Ii), at = xt.now() + Ot);
1136
+ return at || (je(Ii), at = xt.now() + Bt);
1137
1137
  }
1138
1138
  function Ii() {
1139
1139
  at = 0;
@@ -1162,18 +1162,18 @@ function Ti() {
1162
1162
  --ut;
1163
1163
  }
1164
1164
  function $e() {
1165
- at = (zt = xt.now()) + Ot, ut = dt = 0;
1165
+ at = (zt = xt.now()) + Bt, ut = dt = 0;
1166
1166
  try {
1167
1167
  Ti();
1168
1168
  } finally {
1169
- ut = 0, Ci(), at = 0;
1169
+ ut = 0, Mi(), at = 0;
1170
1170
  }
1171
1171
  }
1172
- function Mi() {
1172
+ function Ci() {
1173
1173
  var t = xt.now(), e = t - zt;
1174
- e > Je && (Ot -= e, zt = t);
1174
+ e > Je && (Bt -= e, zt = t);
1175
1175
  }
1176
- function Ci() {
1176
+ function Mi() {
1177
1177
  for (var t, e = Yt, n, r = 1 / 0; e; )
1178
1178
  e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : Yt = n);
1179
1179
  gt = t, Jt(r);
@@ -1182,17 +1182,17 @@ function Jt(t) {
1182
1182
  if (!ut) {
1183
1183
  dt && (dt = clearTimeout(dt));
1184
1184
  var e = t - at;
1185
- e > 24 ? (t < 1 / 0 && (dt = setTimeout($e, t - xt.now() - Ot)), ft && (ft = clearInterval(ft))) : (ft || (zt = xt.now(), ft = setInterval(Mi, Je)), ut = 1, je($e));
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
- function Se(t, e, n) {
1188
+ function ke(t, e, n) {
1189
1189
  var r = new Rt();
1190
1190
  return e = e == null ? 0 : +e, r.restart((i) => {
1191
1191
  r.stop(), t(i + e);
1192
1192
  }, e, n), r;
1193
1193
  }
1194
- var Di = ie("start", "end", "cancel", "interrupt"), Pi = [], en = 0, ke = 1, jt = 2, kt = 3, Ae = 4, te = 5, At = 6;
1195
- function Bt(t, e, n, r, i, s) {
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 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;
@@ -1213,16 +1213,16 @@ function Bt(t, e, n, r, i, s) {
1213
1213
  });
1214
1214
  }
1215
1215
  function le(t, e) {
1216
- var n = q(t, e);
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 Z(t, e) {
1221
- var n = q(t, e);
1222
- if (n.state > kt) throw new Error("too late; already running");
1220
+ function K(t, e) {
1221
+ var n = U(t, e);
1222
+ if (n.state > St) throw new Error("too late; already running");
1223
1223
  return n;
1224
1224
  }
1225
- function q(t, e) {
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;
@@ -1231,20 +1231,20 @@ function Yi(t, e, n) {
1231
1231
  var r = t.__transition, i;
1232
1232
  r[e] = n, n.timer = tn(s, 0, n.time);
1233
1233
  function s(l) {
1234
- n.state = ke, n.timer.restart(o, n.delay, n.time), n.delay <= l && o(l - n.delay);
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 !== ke) return a();
1238
+ if (n.state !== Se) return a();
1239
1239
  for (u in r)
1240
1240
  if (g = r[u], g.name === n.name) {
1241
- if (g.state === kt) return Se(o);
1241
+ if (g.state === St) return ke(o);
1242
1242
  g.state === Ae ? (g.state = At, g.timer.stop(), g.on.call("interrupt", t, t.__data__, g.index, g.group), delete r[u]) : +u < e && (g.state = At, g.timer.stop(), g.on.call("cancel", t, t.__data__, g.index, g.group), delete r[u]);
1243
1243
  }
1244
- if (Se(function() {
1245
- n.state === kt && (n.state = Ae, n.timer.restart(c, n.delay, n.time), c(l));
1244
+ if (ke(function() {
1245
+ n.state === St && (n.state = Ae, n.timer.restart(c, n.delay, n.time), c(l));
1246
1246
  }), n.state = jt, n.on.call("start", t, t.__data__, n.index, n.group), n.state === jt) {
1247
- for (n.state = kt, i = new Array(h = n.tween.length), u = 0, f = -1; u < h; ++u)
1247
+ for (n.state = St, i = new Array(h = n.tween.length), u = 0, f = -1; u < h; ++u)
1248
1248
  (g = n.tween[u].value.call(t, t.__data__, n.index, n.group)) && (i[++f] = g);
1249
1249
  i.length = f + 1;
1250
1250
  }
@@ -1282,7 +1282,7 @@ function zi(t) {
1282
1282
  function Ri(t, e) {
1283
1283
  var n, r;
1284
1284
  return function() {
1285
- var i = Z(this, t), s = i.tween;
1285
+ var i = K(this, t), s = i.tween;
1286
1286
  if (s !== n) {
1287
1287
  r = n = s;
1288
1288
  for (var o = 0, c = r.length; o < c; ++o)
@@ -1298,7 +1298,7 @@ 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 s = Z(this, t), o = s.tween;
1301
+ var s = K(this, t), o = s.tween;
1302
1302
  if (o !== r) {
1303
1303
  i = (r = o).slice();
1304
1304
  for (var c = { name: e, value: n }, a = 0, l = i.length; a < l; ++a)
@@ -1311,10 +1311,10 @@ function Li(t, e, n) {
1311
1311
  s.tween = i;
1312
1312
  };
1313
1313
  }
1314
- function Oi(t, e) {
1314
+ function Bi(t, e) {
1315
1315
  var n = this._id;
1316
1316
  if (t += "", arguments.length < 2) {
1317
- for (var r = q(this.node(), n).tween, i = 0, s = r.length, o; i < s; ++i)
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 = Z(this, r);
1327
+ var i = K(this, r);
1328
1328
  (i.value || (i.value = {}))[e] = n.apply(this, arguments);
1329
1329
  }), function(i) {
1330
- return q(i, r).value[e];
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 Bi(t) {
1337
+ function Oi(t) {
1338
1338
  return function() {
1339
1339
  this.removeAttribute(t);
1340
1340
  };
@@ -1374,7 +1374,7 @@ function Vi(t, e, n) {
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 : Bi)(n) : (n.local ? Wi : Fi)(n, r, e));
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) {
@@ -1422,37 +1422,37 @@ 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)) : q(this.node(), e).delay;
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
- Z(this, t).duration = +e.apply(this, arguments);
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
- Z(this, t).duration = e;
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)) : q(this.node(), e).duration;
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
- Z(this, t).ease = e;
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)) : q(this.node(), e).ease;
1449
+ return arguments.length ? this.each(io(e, t)) : U(this.node(), e).ease;
1450
1450
  }
1451
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
- Z(this, t).ease = n;
1455
+ K(this, t).ease = n;
1456
1456
  };
1457
1457
  }
1458
1458
  function ao(t) {
@@ -1482,7 +1482,7 @@ function uo(t) {
1482
1482
  });
1483
1483
  }
1484
1484
  function fo(t, e, n) {
1485
- var r, i, s = uo(e) ? le : Z;
1485
+ var r, i, s = uo(e) ? le : K;
1486
1486
  return function() {
1487
1487
  var o = s(this, t), c = o.on;
1488
1488
  c !== r && (i = (r = c).copy()).on(e, n), o.on = i;
@@ -1490,7 +1490,7 @@ function fo(t, e, n) {
1490
1490
  }
1491
1491
  function ho(t, e) {
1492
1492
  var n = this._id;
1493
- return arguments.length < 2 ? q(this.node(), n).on.on(t) : this.each(fo(n, t, e));
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() {
@@ -1507,7 +1507,7 @@ function mo(t) {
1507
1507
  typeof t != "function" && (t = oe(t));
1508
1508
  for (var r = this._groups, i = r.length, s = new Array(i), o = 0; o < i; ++o)
1509
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, Bt(l[h], e, n, h, l, q(u, n)));
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
1511
  return new tt(s, this._parents, e, n);
1512
1512
  }
1513
1513
  function yo(t) {
@@ -1516,8 +1516,8 @@ function yo(t) {
1516
1516
  for (var r = this._groups, i = r.length, s = [], o = [], c = 0; c < i; ++c)
1517
1517
  for (var a = r[c], l = a.length, u, f = 0; f < l; ++f)
1518
1518
  if (u = a[f]) {
1519
- for (var h = t.call(u, u.__data__, f, a), g, m = q(u, n), x = 0, y = h.length; x < y; ++x)
1520
- (g = h[x]) && Bt(g, e, n, x, h, m);
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
1521
  s.push(h), o.push(u);
1522
1522
  }
1523
1523
  return new tt(s, o, e, n);
@@ -1555,7 +1555,7 @@ function bo(t, e, n) {
1555
1555
  function Eo(t, e) {
1556
1556
  var n, r, i, s = "style." + e, o = "end." + s, c;
1557
1557
  return function() {
1558
- var a = Z(this, t), l = a.on, u = a.value[s] == null ? c || (c = rn(e)) : void 0;
1558
+ var a = K(this, t), l = a.on, u = a.value[s] == null ? c || (c = rn(e)) : void 0;
1559
1559
  (l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), a.on = r;
1560
1560
  };
1561
1561
  }
@@ -1568,7 +1568,7 @@ function $o(t, e, n) {
1568
1568
  this.style.setProperty(t, e.call(this, r), n);
1569
1569
  };
1570
1570
  }
1571
- function So(t, e, n) {
1571
+ function ko(t, e, n) {
1572
1572
  var r, i;
1573
1573
  function s() {
1574
1574
  var o = e.apply(this, arguments);
@@ -1576,12 +1576,12 @@ function So(t, e, n) {
1576
1576
  }
1577
1577
  return s._value = e, s;
1578
1578
  }
1579
- function ko(t, e, n) {
1579
+ function So(t, e, n) {
1580
1580
  var r = "style." + (t += "");
1581
1581
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
1582
1582
  if (e == null) return this.tween(r, null);
1583
1583
  if (typeof e != "function") throw new Error();
1584
- return this.tween(r, So(t, e, n ?? ""));
1584
+ return this.tween(r, ko(t, e, n ?? ""));
1585
1585
  }
1586
1586
  function Ao(t) {
1587
1587
  return function() {
@@ -1597,16 +1597,16 @@ function Io(t) {
1597
1597
  function To(t) {
1598
1598
  return this.tween("text", typeof t == "function" ? Io(ue(this, "text", t)) : Ao(t == null ? "" : t + ""));
1599
1599
  }
1600
- function Mo(t) {
1600
+ function Co(t) {
1601
1601
  return function(e) {
1602
1602
  this.textContent = t.call(this, e);
1603
1603
  };
1604
1604
  }
1605
- function Co(t) {
1605
+ function Mo(t) {
1606
1606
  var e, n;
1607
1607
  function r() {
1608
1608
  var i = t.apply(this, arguments);
1609
- return i !== n && (e = (n = i) && Mo(i)), e;
1609
+ return i !== n && (e = (n = i) && Co(i)), e;
1610
1610
  }
1611
1611
  return r._value = t, r;
1612
1612
  }
@@ -1615,14 +1615,14 @@ function Do(t) {
1615
1615
  if (arguments.length < 1) return (e = this.tween(e)) && e._value;
1616
1616
  if (t == null) return this.tween(e, null);
1617
1617
  if (typeof t != "function") throw new Error();
1618
- return this.tween(e, Co(t));
1618
+ return this.tween(e, Mo(t));
1619
1619
  }
1620
1620
  function Po() {
1621
1621
  for (var t = this._name, e = this._id, n = on(), r = this._groups, i = r.length, s = 0; s < i; ++s)
1622
1622
  for (var o = r[s], c = o.length, a, l = 0; l < c; ++l)
1623
1623
  if (a = o[l]) {
1624
- var u = q(a, e);
1625
- Bt(a, t, n, l, o, {
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,
@@ -1638,7 +1638,7 @@ function Yo() {
1638
1638
  --i === 0 && s();
1639
1639
  } };
1640
1640
  n.each(function() {
1641
- var l = Z(this, r), u = l.on;
1641
+ var l = K(this, r), u = l.on;
1642
1642
  u !== t && (e = (t = u).copy(), e._.cancel.push(c), e._.interrupt.push(c), e._.end.push(a)), l.on = e;
1643
1643
  }), i === 0 && s();
1644
1644
  });
@@ -1671,11 +1671,11 @@ tt.prototype = {
1671
1671
  attr: Xi,
1672
1672
  attrTween: Qi,
1673
1673
  style: No,
1674
- styleTween: ko,
1674
+ styleTween: So,
1675
1675
  text: To,
1676
1676
  textTween: Do,
1677
1677
  remove: po,
1678
- tween: Oi,
1678
+ tween: Bi,
1679
1679
  delay: to,
1680
1680
  duration: ro,
1681
1681
  ease: oo,
@@ -1693,22 +1693,22 @@ var Lo = {
1693
1693
  duration: 250,
1694
1694
  ease: Ro
1695
1695
  };
1696
- function Oo(t, e) {
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 Bo(t) {
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
1705
  for (var r = this._groups, i = r.length, s = 0; s < i; ++s)
1706
1706
  for (var o = r[s], c = o.length, a, l = 0; l < c; ++l)
1707
- (a = o[l]) && Bt(a, t, e, l, o, n || Oo(a, e));
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 = Bo;
1711
+ wt.prototype.transition = Oo;
1712
1712
  const $t = (t) => () => t;
1713
1713
  function Ho(t, {
1714
1714
  sourceEvent: e,
@@ -1801,71 +1801,71 @@ function qo(t, e, n) {
1801
1801
  function sn() {
1802
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", z, { passive: !1 }).on("mousedown.zoom", M).on("dblclick.zoom", D).filter(i).on("touchstart.zoom", R).on("touchmove.zoom", O).on("touchend.zoom touchcancel.zoom", W).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
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
- p.transform = function(d, b, _, N) {
1806
+ p.transform = function(d, N, _, b) {
1807
1807
  var A = d.selection ? d.selection() : d;
1808
- A.property("__zoom", Ie), d !== A ? $(d, b, _, N) : A.interrupt().each(function() {
1809
- v(this, arguments).event(N).start().zoom(null, typeof b == "function" ? b.apply(this, arguments) : b).end();
1808
+ A.property("__zoom", Ie), d !== A ? $(d, N, _, b) : A.interrupt().each(function() {
1809
+ v(this, arguments).event(b).start().zoom(null, typeof N == "function" ? N.apply(this, arguments) : N).end();
1810
1810
  });
1811
- }, p.scaleBy = function(d, b, _, N) {
1811
+ }, p.scaleBy = function(d, N, _, b) {
1812
1812
  p.scaleTo(d, function() {
1813
- var A = this.__zoom.k, I = typeof b == "function" ? b.apply(this, arguments) : b;
1813
+ var A = this.__zoom.k, I = typeof N == "function" ? N.apply(this, arguments) : N;
1814
1814
  return A * I;
1815
- }, _, N);
1816
- }, p.scaleTo = function(d, b, _, N) {
1815
+ }, _, b);
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) : _, P = I.invert(T), C = typeof b == "function" ? b.apply(this, arguments) : b;
1819
- return n(E(w(I, C), T, P), A, o);
1820
- }, _, N);
1821
- }, p.translateBy = function(d, b, _, N) {
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
+ }, _, b);
1821
+ }, p.translateBy = function(d, N, _, b) {
1822
1822
  p.transform(d, function() {
1823
1823
  return n(this.__zoom.translate(
1824
- typeof b == "function" ? b.apply(this, arguments) : b,
1824
+ typeof N == "function" ? N.apply(this, arguments) : N,
1825
1825
  typeof _ == "function" ? _.apply(this, arguments) : _
1826
1826
  ), e.apply(this, arguments), o);
1827
- }, null, N);
1828
- }, p.translateTo = function(d, b, _, N, A) {
1827
+ }, null, b);
1828
+ }, p.translateTo = function(d, N, _, b, A) {
1829
1829
  p.transform(d, function() {
1830
- var I = e.apply(this, arguments), T = this.__zoom, P = N == null ? S(I) : typeof N == "function" ? N.apply(this, arguments) : N;
1831
- return n(Ht.translate(P[0], P[1]).scale(T.k).translate(
1832
- typeof b == "function" ? -b.apply(this, arguments) : -b,
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
+ typeof N == "function" ? -N.apply(this, arguments) : -N,
1833
1833
  typeof _ == "function" ? -_.apply(this, arguments) : -_
1834
1834
  ), I, o);
1835
- }, N, A);
1835
+ }, b, A);
1836
1836
  };
1837
- function w(d, b) {
1838
- return b = Math.max(s[0], Math.min(s[1], b)), b === d.k ? d : new j(b, d.x, d.y);
1837
+ function w(d, N) {
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
- function E(d, b, _) {
1841
- var N = b[0] - _[0] * d.k, A = b[1] - _[1] * d.k;
1842
- return N === d.x && A === d.y ? d : new j(d.k, N, A);
1840
+ function E(d, N, _) {
1841
+ var b = N[0] - _[0] * d.k, A = N[1] - _[1] * d.k;
1842
+ return b === d.x && A === d.y ? d : new j(d.k, b, A);
1843
1843
  }
1844
1844
  function S(d) {
1845
1845
  return [(+d[0][0] + +d[1][0]) / 2, (+d[0][1] + +d[1][1]) / 2];
1846
1846
  }
1847
- function $(d, b, _, N) {
1847
+ function $(d, N, _, b) {
1848
1848
  d.on("start.zoom", function() {
1849
- v(this, arguments).event(N).start();
1849
+ v(this, arguments).event(b).start();
1850
1850
  }).on("interrupt.zoom end.zoom", function() {
1851
- v(this, arguments).event(N).end();
1851
+ v(this, arguments).event(b).end();
1852
1852
  }).tween("zoom", function() {
1853
- var A = this, I = arguments, T = v(A, I).event(N), P = e.apply(A, I), C = _ == null ? S(P) : typeof _ == "function" ? _.apply(A, I) : _, B = Math.max(P[1][0] - P[0][0], P[1][1] - P[0][1]), L = A.__zoom, G = typeof b == "function" ? b.apply(A, I) : b, K = a(L.invert(C).concat(B / L.k), G.invert(C).concat(B / G.k));
1854
- return function(V) {
1855
- if (V === 1) V = G;
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 = K(V), Ft = B / Q[2];
1858
- V = new j(Ft, C[0] - Q[0] * Ft, C[1] - Q[1] * Ft);
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, V);
1860
+ T.zoom(null, X);
1861
1861
  };
1862
1862
  });
1863
1863
  }
1864
- function v(d, b, _) {
1865
- return !_ && d.__zooming || new k(d, b);
1864
+ function v(d, N, _) {
1865
+ return !_ && d.__zooming || new k(d, N);
1866
1866
  }
1867
- function k(d, b) {
1868
- this.that = d, this.args = b, this.active = 0, this.sourceEvent = null, this.extent = e.apply(d, b), this.taps = 0;
1867
+ function k(d, N) {
1868
+ this.that = d, this.args = N, this.active = 0, this.sourceEvent = null, this.extent = e.apply(d, N), this.taps = 0;
1869
1869
  }
1870
1870
  k.prototype = {
1871
1871
  event: function(d) {
@@ -1874,14 +1874,14 @@ function sn() {
1874
1874
  start: function() {
1875
1875
  return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
1876
1876
  },
1877
- zoom: function(d, b) {
1878
- return this.mouse && d !== "mouse" && (this.mouse[1] = b.invert(this.mouse[0])), this.touch0 && d !== "touch" && (this.touch0[1] = b.invert(this.touch0[0])), this.touch1 && d !== "touch" && (this.touch1[1] = b.invert(this.touch1[0])), this.that.__zoom = b, this.emit("zoom"), this;
1877
+ zoom: function(d, N) {
1878
+ return this.mouse && d !== "mouse" && (this.mouse[1] = N.invert(this.mouse[0])), this.touch0 && d !== "touch" && (this.touch0[1] = N.invert(this.touch0[0])), this.touch1 && d !== "touch" && (this.touch1[1] = N.invert(this.touch1[0])), this.that.__zoom = N, this.emit("zoom"), this;
1879
1879
  },
1880
1880
  end: function() {
1881
1881
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
1882
1882
  },
1883
1883
  emit: function(d) {
1884
- var b = Y(this.that).datum();
1884
+ var N = z(this.that).datum();
1885
1885
  l.call(
1886
1886
  d,
1887
1887
  this.that,
@@ -1891,79 +1891,79 @@ function sn() {
1891
1891
  transform: this.that.__zoom,
1892
1892
  dispatch: l
1893
1893
  }),
1894
- b
1894
+ N
1895
1895
  );
1896
1896
  }
1897
1897
  };
1898
- function z(d, ...b) {
1898
+ function D(d, ...N) {
1899
1899
  if (!t.apply(this, arguments)) return;
1900
- var _ = v(this, b).event(d), N = this.__zoom, A = Math.max(s[0], Math.min(s[1], N.k * Math.pow(2, r.apply(this, arguments)))), I = rt(d);
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
- (_.mouse[0][0] !== I[0] || _.mouse[0][1] !== I[1]) && (_.mouse[1] = N.invert(_.mouse[0] = I)), clearTimeout(_.wheel);
1902
+ (_.mouse[0][0] !== I[0] || _.mouse[0][1] !== I[1]) && (_.mouse[1] = b.invert(_.mouse[0] = I)), clearTimeout(_.wheel);
1903
1903
  else {
1904
- if (N.k === A) return;
1905
- _.mouse = [I, N.invert(I)], It(this), _.start();
1904
+ if (b.k === A) return;
1905
+ _.mouse = [I, b.invert(I)], It(this), _.start();
1906
1906
  }
1907
- ht(d), _.wheel = setTimeout(T, m), _.zoom("mouse", n(E(w(N, A), _.mouse[0], _.mouse[1]), _.extent, o));
1907
+ ht(d), _.wheel = setTimeout(T, m), _.zoom("mouse", n(E(w(b, A), _.mouse[0], _.mouse[1]), _.extent, o));
1908
1908
  function T() {
1909
1909
  _.wheel = null, _.end();
1910
1910
  }
1911
1911
  }
1912
- function M(d, ...b) {
1912
+ function P(d, ...N) {
1913
1913
  if (h || !t.apply(this, arguments)) return;
1914
- var _ = d.currentTarget, N = v(this, b, !0).event(d), A = Y(d.view).on("mousemove.zoom", C, !0).on("mouseup.zoom", B, !0), I = rt(d, _), T = d.clientX, P = d.clientY;
1915
- ei(d.view), Vt(d), N.mouse = [I, this.__zoom.invert(I)], It(this), N.start();
1916
- function C(L) {
1917
- if (ht(L), !N.moved) {
1918
- var G = L.clientX - T, K = L.clientY - P;
1919
- N.moved = G * G + K * K > x;
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
+ ei(d.view), Vt(d), b.mouse = [I, this.__zoom.invert(I)], It(this), b.start();
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
- N.event(L).zoom("mouse", n(E(N.that.__zoom, N.mouse[0] = rt(L, _), N.mouse[1]), N.extent, o));
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 B(L) {
1924
- A.on("mousemove.zoom mouseup.zoom", null), ni(L.view, N.moved), ht(L), N.event(L).end();
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
- function D(d, ...b) {
1927
+ function C(d, ...N) {
1928
1928
  if (t.apply(this, arguments)) {
1929
- var _ = this.__zoom, N = rt(d.changedTouches ? d.changedTouches[0] : d, this), A = _.invert(N), I = _.k * (d.shiftKey ? 0.5 : 2), T = n(E(w(_, I), N, A), e.apply(this, b), o);
1930
- ht(d), c > 0 ? Y(this).transition().duration(c).call($, T, N, d) : Y(this).call(p.transform, T, N, d);
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 ? z(this).transition().duration(c).call($, T, b, d) : z(this).call(p.transform, T, b, d);
1931
1931
  }
1932
1932
  }
1933
- function R(d, ...b) {
1933
+ function L(d, ...N) {
1934
1934
  if (t.apply(this, arguments)) {
1935
- var _ = d.touches, N = _.length, A = v(this, b, d.changedTouches.length === N).event(d), I, T, P, C;
1936
- for (Vt(d), T = 0; T < N; ++T)
1937
- P = _[T], C = rt(P, this), C = [C, this.__zoom.invert(C), P.identifier], A.touch0 ? !A.touch1 && A.touch0[2] !== C[2] && (A.touch1 = C, A.taps = 0) : (A.touch0 = C, I = !0, A.taps = 1 + !!u);
1938
- u && (u = clearTimeout(u)), I && (A.taps < 2 && (f = C[0], u = setTimeout(function() {
1935
+ var _ = d.touches, b = _.length, A = v(this, N, d.changedTouches.length === b).event(d), I, T, Y, R;
1936
+ for (Vt(d), T = 0; T < b; ++T)
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
- function O(d, ...b) {
1943
+ function B(d, ...N) {
1944
1944
  if (this.__zooming) {
1945
- var _ = v(this, b).event(d), N = d.changedTouches, A = N.length, I, T, P, C;
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 = N[I], P = rt(T, this), _.touch0 && _.touch0[2] === T.identifier ? _.touch0[0] = P : _.touch1 && _.touch1[2] === T.identifier && (_.touch1[0] = P);
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 B = _.touch0[0], L = _.touch0[1], G = _.touch1[0], K = _.touch1[1], V = (V = G[0] - B[0]) * V + (V = G[1] - B[1]) * V, Q = (Q = K[0] - L[0]) * Q + (Q = K[1] - L[1]) * Q;
1950
- T = w(T, Math.sqrt(V / Q)), P = [(B[0] + G[0]) / 2, (B[1] + G[1]) / 2], C = [(L[0] + K[0]) / 2, (L[1] + K[1]) / 2];
1951
- } else if (_.touch0) P = _.touch0[0], C = _.touch0[1];
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, P, C), _.extent, o));
1953
+ _.zoom("touch", n(E(T, Y, R), _.extent, o));
1954
1954
  }
1955
1955
  }
1956
- function W(d, ...b) {
1956
+ function V(d, ...N) {
1957
1957
  if (this.__zooming) {
1958
- var _ = v(this, b).event(d), N = d.changedTouches, A = N.length, I, T;
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() {
1960
1960
  h = null;
1961
1961
  }, g), I = 0; I < A; ++I)
1962
- T = N[I], _.touch0 && _.touch0[2] === T.identifier ? delete _.touch0 : _.touch1 && _.touch1[2] === T.identifier && delete _.touch1;
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 P = Y(this).on("dblclick.zoom");
1966
- P && P.apply(this, arguments);
1965
+ var Y = z(this).on("dblclick.zoom");
1966
+ Y && Y.apply(this, arguments);
1967
1967
  }
1968
1968
  }
1969
1969
  }
@@ -2110,7 +2110,7 @@ class rs extends hn {
2110
2110
  }) {
2111
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
- this.edgeContent = Mt(l), this.edgeIndex = this.edgeContent.index, this.edgeColor = this.edgeContent.color;
2113
+ this.edgeContent = Ct(l), this.edgeIndex = this.edgeContent.index, this.edgeColor = this.edgeContent.color;
2114
2114
  } catch (u) {
2115
2115
  /^\s*</.test(l) || console.warn(`Failed to decode edge label for ${n}:`, u);
2116
2116
  }
@@ -2280,7 +2280,7 @@ const ss = 0.6, as = /mono|fira|consolas|courier|menlo|roboto mono|ui-monospace/
2280
2280
  "[": 0.34,
2281
2281
  "]": 0.34,
2282
2282
  " ": 0.28
2283
- }, Me = {
2283
+ }, Ce = {
2284
2284
  m: 0.85,
2285
2285
  w: 0.74,
2286
2286
  M: 0.83,
@@ -2289,7 +2289,7 @@ const ss = 0.6, as = /mono|fira|consolas|courier|menlo|roboto mono|ui-monospace/
2289
2289
  };
2290
2290
  function cs(t) {
2291
2291
  if (t in Te) return Te[t];
2292
- if (t in Me) return Me[t];
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
  }
@@ -2394,7 +2394,7 @@ function ps(t) {
2394
2394
  }
2395
2395
  return e;
2396
2396
  }
2397
- function Ce(t, e, n) {
2397
+ function Me(t, e, n) {
2398
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) {
@@ -2549,11 +2549,11 @@ function Tt(t, e, n, r = yn) {
2549
2549
  let y;
2550
2550
  f ? y = x.isNearlyHorizontal ? ["straight", "3seg"] : ["3seg"] : y = x.isNearlyHorizontal ? ["straight", "3seg", "4seg", "5seg", "6seg"] : ["3seg", "4seg", "5seg", "6seg"];
2551
2551
  for (const w of y) {
2552
- const E = Ce(w, g, x);
2552
+ const E = Me(w, g, x);
2553
2553
  if (E)
2554
2554
  return { midY: E.actualMidY, points: E.points };
2555
2555
  }
2556
- const p = Ce("6seg", g, x);
2556
+ const p = Me("6seg", g, x);
2557
2557
  return p ? { midY: p.actualMidY, points: p.points } : void 0;
2558
2558
  }
2559
2559
  function De(t, e) {
@@ -2750,39 +2750,39 @@ function _s(t, e, n, r, i) {
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;
2752
2752
  const m = Math.min(h, g), x = Math.max(h, g), y = [];
2753
- for (let D = m; D <= x; D++) {
2754
- const R = e.get(D);
2755
- R && y.push(...R.nodes);
2753
+ for (let C = m; C <= x; C++) {
2754
+ const L = e.get(C);
2755
+ L && y.push(...L.nodes);
2756
2756
  }
2757
- const p = y.map((D) => {
2758
- const R = D.getPosition();
2759
- if (!R) return null;
2760
- const O = r - R[1], W = D.height ? parseFloat(D.height) * nt : fe;
2761
- return { y: O, height: W, bottomY: O + W / 2 };
2757
+ const p = y.map((C) => {
2758
+ const L = C.getPosition();
2759
+ if (!L) return null;
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
- (D) => D !== null
2764
- ).sort((D, R) => D.y - R.y);
2763
+ (C) => C !== null
2764
+ ).sort((C, L) => C.y - L.y);
2765
2765
  let w;
2766
2766
  if (p.length === 0)
2767
2767
  w = (l + u) / 2;
2768
2768
  else if (p.length % 2 === 1)
2769
2769
  w = p[Math.floor(p.length / 2)].bottomY;
2770
2770
  else {
2771
- const D = p.length / 2;
2772
- w = (p[D - 1].bottomY + p[D].bottomY) / 2;
2771
+ const C = p.length / 2;
2772
+ w = (p[C - 1].bottomY + p[C].bottomY) / 2;
2773
2773
  }
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 z;
2778
- v === "above" ? (f.midY = l - k, z = l, l = f.midY) : (f.midY = u + k, z = u, u = f.midY);
2779
- const M = Tt(
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: z },
2782
+ { midY: D },
2783
2783
  i
2784
2784
  );
2785
- M && (f.midY = M.midY, f.orthogonalPathPoints = M.points, v === "above" ? l = Math.min(l, M.midY) : u = Math.max(u, M.midY));
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
2788
  function ws(t) {
@@ -2920,7 +2920,7 @@ function $s(t, e, n) {
2920
2920
  });
2921
2921
  return { nodes: i, edges: c };
2922
2922
  }
2923
- function Ss(t, e, n, r) {
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());
@@ -2932,7 +2932,7 @@ function Ss(t, e, n, r) {
2932
2932
  s = Math.max(s, c);
2933
2933
  }), i + 2 * n.horizontalExtension + s + 2 * jo;
2934
2934
  }
2935
- function ks(t, e, n) {
2935
+ function Ss(t, e, n) {
2936
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);
@@ -2941,15 +2941,15 @@ function ks(t, e, n) {
2941
2941
  if (h.length === 0) return;
2942
2942
  const g = i > 1 ? s + u * o : a / 2;
2943
2943
  h.sort((v, k) => {
2944
- const z = v.getPosition(), M = k.getPosition();
2945
- return !z || !M ? 0 : M[1] - z[1];
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, z) => k + z.getHeightPoints(), 0)) / 2;
2949
+ let v = (e + h.reduce((k, D) => k + D.getHeightPoints(), 0)) / 2;
2950
2950
  h.forEach((k) => {
2951
- const z = k.getHeightPoints();
2952
- v -= z / 2, k.pos = `${g},${v}`, v -= z / 2;
2951
+ const D = k.getHeightPoints();
2952
+ v -= D / 2, k.pos = `${g},${v}`, v -= D / 2;
2953
2953
  });
2954
2954
  return;
2955
2955
  }
@@ -2965,13 +2965,13 @@ function ks(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], z = h[v + 1], M = k.getHeightPoints(), D = k.virtualNode || z.virtualNode ? 0 : m;
2969
- $ += D + M / 2, k.pos = `${g},${$}`, $ += M / 2;
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], z = h[v - 1], M = k.getHeightPoints(), D = k.virtualNode || z.virtualNode ? 0 : m;
2974
- $ -= D + M / 2, k.pos = `${g},${$}`, $ -= M / 2;
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
  }
@@ -2982,13 +2982,13 @@ 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 = Y(this).attr("data-node-id"), s = /* @__PURE__ */ new Set([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 = Y(this).attr("data-source-node-id"), c = Y(this).attr("data-target-node-id");
2988
- o === i || c === i ? o === i ? s.add(c) : s.add(o) : Y(this).classed("dimmed", !0);
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 = Y(this).attr("data-node-id");
2991
- s.has(o) || Y(this).classed("dimmed", !0);
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);
@@ -3027,19 +3027,19 @@ function Is(t) {
3027
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
3028
  As(e, S, n);
3029
3029
  let $ = r - s / 2 + 8;
3030
- const v = p + x / 2, k = 7.2, z = 6, M = 18, D = 4;
3031
- if (a.forEach((R) => {
3032
- const W = R.length * k + z * 2;
3033
- e.append("rect").attr("x", $).attr("y", v - M / 2).attr("width", W).attr("height", M).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", $ + z).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(R), $ += W + D;
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 R = r + s / 2 - 8 - $, O = 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
- ne(O, R, l);
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
+ ne(B, L, l);
3037
3037
  }
3038
3038
  if (u) {
3039
- const R = p + x + y / 2, O = m ? _t + an : 0;
3040
- m && xn(e, r - s / 2 + 8, R);
3041
- const W = s - 16 - O, d = e.append("text").attr("x", r - s / 2 + 8 + O).attr("y", R).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, W, u);
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
3045
  function Ts(t) {
@@ -3087,7 +3087,7 @@ function Ts(t) {
3087
3087
  ne(k, v, E);
3088
3088
  }
3089
3089
  }
3090
- function Ms(t, e, n, r, i) {
3090
+ function Cs(t, e, n, r, i) {
3091
3091
  const s = t.getPosition();
3092
3092
  if (!s) return;
3093
3093
  const [o, c] = s, a = t.getWidthPoints(), l = t.getHeightPoints(), u = t.virtualNode;
@@ -3095,7 +3095,7 @@ function Ms(t, e, n, r, i) {
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
- t.label && (h = Mt(t.label));
3098
+ t.label && (h = Ct(t.label));
3099
3099
  } catch (v) {
3100
3100
  h = hs(t.label), h || console.warn(`Failed to decode node label for ${t.name}:`, v);
3101
3101
  }
@@ -3123,10 +3123,10 @@ function Ms(t, e, n, r, i) {
3123
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 Cs(t, e, n, r, i) {
3126
+ function Ms(t, e, n, r, i) {
3127
3127
  e.forEach((s) => {
3128
3128
  s.nodes.forEach((o) => {
3129
- Ms(o, t, n, r, i);
3129
+ Cs(o, t, n, r, i);
3130
3130
  });
3131
3131
  });
3132
3132
  }
@@ -3292,7 +3292,7 @@ function it(t, e, n) {
3292
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, s] = r, o = Y(t).append("svg").attr("width", "100%").attr("height", "100%").attr("viewBox", `0 0 ${i} ${s}`);
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
3296
  o.append("defs").html(Ps);
3297
3297
  const c = o.append("g").attr("id", "graph0");
3298
3298
  (e.objects || []).forEach((p) => {
@@ -3311,14 +3311,14 @@ function Ks(t, e, n = 14) {
3311
3311
  const f = t.clientWidth || un, h = n * (f / i), g = l.filter((p) => {
3312
3312
  if (!p.label) return !1;
3313
3313
  try {
3314
- const w = Mt(p.label);
3314
+ const w = Ct(p.label);
3315
3315
  return (w == null ? void 0 : w.index) !== void 0;
3316
3316
  } catch {
3317
3317
  return !1;
3318
3318
  }
3319
3319
  }).map((p) => {
3320
3320
  var E;
3321
- const w = Mt(p.label);
3321
+ const w = Ct(p.label);
3322
3322
  return {
3323
3323
  id: p._gvid,
3324
3324
  index: w.index,
@@ -3368,32 +3368,32 @@ function Js(t, e, n) {
3368
3368
  const r = e / n;
3369
3369
  return ts / (t * r);
3370
3370
  }
3371
- function Os(t, e, n, r) {
3371
+ function Bs(t, e, n, r) {
3372
3372
  return sn().scaleExtent([0.1, Rs(e, n, r)]).on("zoom", (i) => {
3373
3373
  const s = i.transform;
3374
3374
  !isNaN(s.x) && !isNaN(s.y) && !isNaN(s.k) && t.attr("transform", s.toString());
3375
3375
  });
3376
3376
  }
3377
- function Bs(t, e) {
3377
+ function Os(t, e) {
3378
3378
  t.on("mouseenter", function() {
3379
- Y(this).raise();
3380
- const n = Y(this).select(".arrow-group");
3379
+ z(this).raise();
3380
+ const n = z(this).select(".arrow-group");
3381
3381
  if (!n.empty()) {
3382
3382
  const a = n.attr("data-base-transform") || "";
3383
3383
  n.attr("transform", a + " scale(1.3)");
3384
3384
  }
3385
- const r = e.select(".edge.selected").size() > 0, i = Y(this).classed("selected"), s = Y(this).attr("data-source-node-id"), o = Y(this).attr("data-target-node-id"), c = Y(this).attr("id");
3386
- r && !i ? (Y(this).classed("hover-highlight", !0), e.selectAll(".node").each(function() {
3387
- const a = Y(this).attr("data-node-id");
3388
- (a === s || a === o) && Y(this).classed("hover-highlight", !0);
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
- Y(this).attr("id") !== c && Y(this).classed("dimmed", !0);
3390
+ z(this).attr("id") !== c && z(this).classed("dimmed", !0);
3391
3391
  }), e.selectAll(".node").each(function() {
3392
- const a = Y(this).attr("data-node-id");
3393
- a !== s && a !== o && Y(this).classed("dimmed", !0);
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 = Y(this).select(".arrow-group");
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);
@@ -3416,20 +3416,22 @@ function Hs(t, e, n, r, i, s, o) {
3416
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
3418
  function Fs(t) {
3419
- const { edge: e, edgeGroup: n, labelMidpoint: r, edgeColor: i, isSelected: s, ctx: o } = t, { config: c, onEdgeSelect: a, debug: l } = o, { displayElems: u, finalText: f, boxWidth: h, boxHeight: g } = mn(e, c, o.edgeCount), m = e.edgeIndex !== void 0, x = h, y = g, p = r.y, w = r.x, E = n.append("g").attr("class", "label-area");
3420
- E.append("rect").attr("class", "label-bg").attr("x", w - x / 2).attr("y", p - y / 2).attr("width", x).attr("height", y).attr("rx", 5).attr("ry", 5).attr("fill", "var(--bg-primary, #fff)").attr("stroke", "var(--border-tertiary, #F2F2F3)").attr("stroke-width", 1.5);
3421
- const S = w;
3422
- m && a && n.style("cursor", "pointer").on("click", function($) {
3423
- $.stopPropagation(), !s && a(e.edgeIndex);
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
+ 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
+ const $ = E;
3422
+ x && a && n.style("cursor", "pointer").on("click", function(v) {
3423
+ v.stopPropagation(), !s && a(e.edgeIndex);
3424
+ }), x && l && S.on("click", function(v) {
3425
+ v.stopPropagation(), l(e.edgeIndex);
3424
3426
  }), Hs(
3425
- E,
3426
- u,
3427
3427
  S,
3428
- p,
3429
- i,
3430
3428
  f,
3429
+ $,
3430
+ w,
3431
+ i,
3432
+ h,
3431
3433
  c.labelFontSize
3432
- ), l && 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");
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");
3433
3435
  }
3434
3436
  function Ws(t, e, n) {
3435
3437
  e._ldraw_.forEach((r) => {
@@ -3453,8 +3455,8 @@ function Gs(t, e, n) {
3453
3455
  }), e._ldraw_ && it(t, e._ldraw_, n);
3454
3456
  }
3455
3457
  function Vs(t, e) {
3456
- var D, R;
3457
- 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", ((D = t.sourceNode) == null ? void 0 : D.name) || "").attr("data-target-node-id", ((R = t.targetNode) == null ? void 0 : R.name) || "").attr("style", `--edge-color: ${l}`), f = t.getStartPoint(), h = t.getEndPoint(), g = t.getDirection(), m = i.arrowWidth;
3458
+ var C, L;
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;
3458
3460
  if (!(f && h && g)) {
3459
3461
  Gs(u, t, r);
3460
3462
  return;
@@ -3471,24 +3473,24 @@ function Vs(t, e) {
3471
3473
  i,
3472
3474
  s
3473
3475
  ), S = c && t.isBaseEdge ? "#000000" : t.getColor(), $ = c && t.isBaseEdge ? 4 : 1.5;
3474
- 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"), Bs(u, n);
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);
3475
3477
  const v = 12;
3476
3478
  let k = "";
3477
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);
3478
- const M = {
3480
+ const P = {
3479
3481
  x: (x.x + y.x) / 2,
3480
3482
  y: t.midY
3481
3483
  };
3482
- if (u.attr(Ys, M.x).attr(zs, M.y), t.label ? Fs({
3484
+ if (u.attr(Ys, P.x).attr(zs, P.y), t.label ? Fs({
3483
3485
  edge: t,
3484
3486
  edgeGroup: u,
3485
- labelMidpoint: M,
3487
+ labelMidpoint: P,
3486
3488
  edgeColor: S,
3487
3489
  isSelected: a,
3488
3490
  ctx: e
3489
- }) : t._ldraw_ && Ws(u, t, M), c) {
3490
- let O;
3491
- t.depth === 0 ? O = `d:0 dir:${t.baseDirection || "base"} off:${t.baseOffset} id:${t._gvid}` : O = `d:${t.depth} dir:${t.baseDirection || "?"} midY:${Math.round(t.midY)} id:${t._gvid}`, u.append("text").attr("x", M.x).attr("y", M.y + 15).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "monospace").attr("font-size", "9px").attr("fill", "#999").text(O);
3491
+ }) : t._ldraw_ && Ws(u, t, P), c) {
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", 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);
3492
3494
  }
3493
3495
  }
3494
3496
  function Xs(t) {
@@ -3512,6 +3514,7 @@ function js(t = {}) {
3512
3514
  debug: !1,
3513
3515
  selectedEdgeId: null,
3514
3516
  onEdgeSelect: void 0,
3517
+ onEdgeLabelClick: void 0,
3515
3518
  nodeWidth: Uo,
3516
3519
  nodeHeight: Zo,
3517
3520
  nodeColumnSpacing: null,
@@ -3529,7 +3532,7 @@ function Us(t) {
3529
3532
  });
3530
3533
  }
3531
3534
  function ta(t, e, n) {
3532
- var P;
3535
+ var W;
3533
3536
  const {
3534
3537
  maxDepth: r,
3535
3538
  includeLesserDepths: i,
@@ -3539,71 +3542,88 @@ function ta(t, e, n) {
3539
3542
  debug: a,
3540
3543
  selectedEdgeId: l,
3541
3544
  onEdgeSelect: u,
3542
- nodeWidth: f,
3543
- nodeHeight: h,
3544
- nodeColumnSpacing: g,
3545
- enableWheelZoom: m,
3546
- headless: x,
3547
- chainIcon: y
3545
+ onEdgeLabelClick: f,
3546
+ nodeWidth: h,
3547
+ nodeHeight: g,
3548
+ nodeColumnSpacing: m,
3549
+ enableWheelZoom: x,
3550
+ headless: y,
3551
+ chainIcon: p
3548
3552
  } = n;
3549
3553
  t.innerHTML = "";
3550
- const p = ((P = e.bb) == null ? void 0 : P.split(",").map(Number)) || fn, [, , w, E] = p;
3551
- let S = w;
3552
- const $ = E, v = Y(t).append("svg").attr("width", "100%").attr("height", "100%").attr("viewBox", `0 0 ${S} ${$}`);
3553
- v.append("defs").html(Ds + (y ? Us(y) : ""));
3554
- const k = v.append("g").attr("id", "graph0"), { nodes: z, edges: M } = $s(e, f, h), { nodeColumnMap: D, nodeColumns: R, edgeColumns: O } = bs(
3555
- z,
3556
- M
3557
- ), W = M.length, d = g ?? Ss(z, M, s, W);
3558
- S = ks(R, $, d), v.attr("viewBox", `0 0 ${S} ${$}`), Cs(k, R, $, a, y !== void 0), o && (Es(R, $), Ns(M, O), ys(O, R, D, $, s));
3559
- const b = Os(k, t, S, c);
3560
- x || v.call(b), !x && !m && (v.on("wheel.zoom", null), v.on("dblclick.zoom", null)), M.forEach((C) => {
3554
+ const w = ((W = e.bb) == null ? void 0 : W.split(",").map(Number)) || fn, [, , E, S] = w;
3555
+ let $ = E;
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
+ C
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) => {
3561
3565
  if (r !== null) {
3562
3566
  if (i) {
3563
- if (C.depth > r) return;
3564
- } else if (C.depth !== r) return;
3567
+ if (M.depth > r) return;
3568
+ } else if (M.depth !== r) return;
3565
3569
  }
3566
- Vs(C, {
3567
- g: k,
3568
- height: $,
3570
+ Vs(M, {
3571
+ g: D,
3572
+ height: v,
3569
3573
  config: s,
3570
3574
  useOrthogonalRendering: o,
3571
- zoomBehavior: b,
3572
- svgSelection: v,
3575
+ zoomBehavior: _,
3576
+ svgSelection: k,
3573
3577
  container: t,
3574
- svgWidth: S,
3575
- svgHeight: $,
3578
+ svgWidth: $,
3579
+ svgHeight: v,
3576
3580
  selectedEdgeId: l,
3577
3581
  onEdgeSelect: u,
3582
+ onEdgeLabelClick: f,
3578
3583
  debug: a,
3579
- edgeCount: W
3584
+ edgeCount: d
3585
+ });
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
+ _.transform,
3590
+ Ht.translate(b.x, b.y).scale(b.k)
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
+ });
3580
3603
  });
3581
- }), a && Xs(k);
3582
- const _ = Ls(k, n, S, $), N = `translate(${_.x},${_.y}) scale(${_.k})`;
3583
- x ? k.attr("transform", N) : v.call(
3584
- b.transform,
3585
- Ht.translate(_.x, _.y).scale(_.k)
3586
- ), a && qs(v, S, $);
3587
- const A = M.filter((C) => C.edgeIndex !== void 0).map((C) => {
3588
- var B, L;
3604
+ });
3605
+ const T = C.filter((M) => M.edgeIndex !== void 0).map((M) => {
3606
+ var O, H;
3589
3607
  return {
3590
- id: C._gvid,
3591
- index: C.edgeIndex,
3592
- sourceNodeId: ((B = C.sourceNode) == null ? void 0 : B.name) || "",
3593
- targetNodeId: ((L = C.targetNode) == null ? void 0 : L.name) || "",
3594
- label: C.getLabelText()
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()
3595
3613
  };
3596
- }).sort((C, B) => C.index - B.index), I = v.node(), T = k.node();
3597
- if (!I || !T)
3614
+ }).sort((M, O) => M.index - O.index), Y = k.node(), R = D.node();
3615
+ if (!Y || !R)
3598
3616
  throw new Error("Failed to construct SVG elements");
3599
3617
  return {
3600
- zoomBehavior: b,
3601
- svgElement: I,
3602
- gElement: T,
3618
+ zoomBehavior: _,
3619
+ svgElement: Y,
3620
+ gElement: R,
3603
3621
  baseFontSize: c,
3604
- viewBoxWidth: S,
3605
- edges: A,
3606
- initialTransform: _
3622
+ viewBoxWidth: $,
3623
+ viewBoxHeight: v,
3624
+ edges: T,
3625
+ initialTransform: b,
3626
+ nodeBounds: I
3607
3627
  };
3608
3628
  }
3609
3629
  export {
@@ -3614,11 +3634,11 @@ export {
3614
3634
  js as d,
3615
3635
  Zo as e,
3616
3636
  Zs as f,
3617
- Mt as g,
3637
+ Ct as g,
3618
3638
  gs as h,
3619
3639
  Ht as i,
3620
3640
  yn as j,
3621
3641
  Ks as r,
3622
- Y as s,
3642
+ z as s,
3623
3643
  Fo as t
3624
3644
  };