@versini/sassysaint 8.109.1 → 8.109.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/chunks/{AboutChangelog.CHx3bA8W.js → AboutChangelog.BSdcqHox.js} +2 -2
  2. package/dist/chunks/{AboutEntry.B7hjR8pi.js → AboutEntry.CAewlRU7.js} +7 -7
  3. package/dist/chunks/{App.CvQU6EGq.js → App.Ck18sHiX.js} +1926 -1910
  4. package/dist/chunks/{Bubble.B5Bk6utN.js → Bubble.B6v5eAOZ.js} +1 -1
  5. package/dist/chunks/{ButtonIconDelete.C0IuterV.js → ButtonIconDelete.jqbd7Q9b.js} +2 -2
  6. package/dist/chunks/{Chart.Bhit-mtQ.js → Chart.BIy5YDm2.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.BFdbFREH.js → ChatBubbleAssistant.CN-iqEkP.js} +4 -4
  8. package/dist/chunks/{ChatBubbleUser.BR5AqwE9.js → ChatBubbleUser.D4OLR3vD.js} +3 -3
  9. package/dist/chunks/{ChatHistoryTable.BJUF2mNs.js → ChatHistoryTable.ZOLprzfc.js} +4 -4
  10. package/dist/chunks/HistoryEntry.DY5WIpTu.js +373 -0
  11. package/dist/chunks/{LoginEntry.DKzVM9lq.js → LoginEntry.CC1V4TOR.js} +4 -4
  12. package/dist/chunks/{LogoEntry.Et0a-97_.js → LogoEntry.B1e2c-s0.js} +1 -1
  13. package/dist/chunks/{MemoriesEntry.yJKFVG54.js → MemoriesEntry.CVrI1Ter.js} +5 -5
  14. package/dist/chunks/ProfileEntry.VlRvWAq4.js +213 -0
  15. package/dist/chunks/{SettingsEntry.BP8H8gHu.js → SettingsEntry.BxF_ZqA5.js} +5 -5
  16. package/dist/chunks/{UsageEntry.CamC3XI3.js → UsageEntry.DHYx6GmN.js} +5 -5
  17. package/dist/chunks/_baseUniq.B6Gcl5nF.js +477 -0
  18. package/dist/chunks/{arc.ynrnfWOq.js → arc.w_BReByh.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.DtWoTE88.js → architecture-U656AL7Q.BPCpLHAc.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.CDFvIr0j.js → architectureDiagram-VXUJARFQ.D96Sa2WG.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.BLWWo36R.js → blockDiagram-VD42YOAC.fDjFSO1h.js} +5 -5
  22. package/dist/chunks/{browser.BvYD8dc4.js → browser.Cb_vr1PR.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.-whHC2cr.js → c4Diagram-YG6GDRKO.U8IWA3ML.js} +2 -2
  24. package/dist/chunks/{channel.CiPC9guK.js → channel.Dw9Rrvd2.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.BOZN6uSe.js → chunk-4BX2VUAB.Cio3OsS-.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.wEa6Vrrn.js → chunk-55IACEB6.CFaFqBKt.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.sEhBCKvF.js → chunk-B4BG7PRW.DGkVxxTo.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.DJ2ZY0Xk.js → chunk-DI55MBZ5.DsnidbDu.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.jo8ibE98.js → chunk-FMBD7UC4.DTxRjjKJ.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL.FbSApAGi.js → chunk-QN33PNHL.CuRPKMac.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.B-GQnYi1.js → chunk-QZHKN3VN.CntLD_-Z.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.DeXLG4gm.js → chunk-TZMSLE5B.B7_0n6Dd.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.BFI_M0Vv.js → classDiagram-2ON5EDUG.BJsNaiPY.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.BFI_M0Vv.js → classDiagram-v2-WZHVMYZB.BJsNaiPY.js} +2 -2
  35. package/dist/chunks/{clone.CoM2ipCS.js → clone.BFX0o9-g.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.CW44zK-a.js → cose-bilkent-S5V4N54A.CJtHnhhQ.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.VaYbgRPs.js → dagre-6UL2VRFP.CuwjO6gV.js} +21 -22
  38. package/dist/chunks/{diagram-PSM6KHXK.CrrlGnPy.js → diagram-PSM6KHXK.CnNu5_LM.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.BSo_CGEX.js → diagram-QEK2KX5R.D74ae4xj.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.Rgo5A0oh.js → diagram-S2PKOQOG.C_JbSw1v.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.v7LUWRA_.js → erDiagram-Q2GNP2WA.Bu-foyWC.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.CUK5d1OY.js → flowDiagram-NV44I4VS.YDgJ2OQY.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.DSpVGXrZ.js → ganttDiagram-JELNMOA3.ymNQ3Hoy.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.CR5ma9FN.js → gitGraph-F6HP7TQM.D-mPOTEU.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.ddzDD3PJ.js → gitGraphDiagram-NY62KEGX.jrbht_5k.js} +4 -4
  46. package/dist/chunks/graph.Dw24ucCU.js +381 -0
  47. package/dist/chunks/{index.D0bvjdAE.js → index.BGnEq9eh.js} +1 -1
  48. package/dist/chunks/{index.CNOm7KYJ.js → index.BzMdQGY-.js} +1 -1
  49. package/dist/chunks/{index.D1HS2InQ.js → index.CQg0p3pG.js} +1 -1
  50. package/dist/chunks/{index.Bo0ZyMS6.js → index.Ci301JK4.js} +1 -1
  51. package/dist/chunks/{index.DpqePp5S.js → index.CmK3RbmJ.js} +1 -1
  52. package/dist/chunks/{index.DZn5_zSr.js → index.CmWau6U1.js} +4 -4
  53. package/dist/chunks/{index.D3lm4Af9.js → index.Cn19xWGt.js} +3 -3
  54. package/dist/chunks/{index.BNY6p-fk.js → index.D5R76Qhp.js} +2 -2
  55. package/dist/chunks/{index.7QjsCYx3.js → index.KPs76GKZ.js} +1 -1
  56. package/dist/chunks/{info-NVLQJR56.DUQkycDd.js → info-NVLQJR56.CzwKOAh7.js} +1 -1
  57. package/dist/chunks/{infoDiagram-WHAUD3N6.NPaVwPcu.js → infoDiagram-WHAUD3N6.au7bTIRT.js} +2 -2
  58. package/dist/chunks/{journeyDiagram-XKPGCS4Q.sLc-NUAF.js → journeyDiagram-XKPGCS4Q.C9l-1F8k.js} +4 -4
  59. package/dist/chunks/{kanban-definition-3W4ZIXB7.CJM-u6MS.js → kanban-definition-3W4ZIXB7.D6Vfi9gE.js} +2 -2
  60. package/dist/chunks/{katex.D0sQThIv.js → katex.6qoCFezb.js} +898 -896
  61. package/dist/chunks/layout.DPHpmMar.js +1438 -0
  62. package/dist/chunks/{mermaid-parser.core.3uaMP7ZS.js → mermaid-parser.core.DInxEyfY.js} +6567 -5346
  63. package/dist/chunks/min.MWawyr81.js +38 -0
  64. package/dist/chunks/{mindmap-definition-VGOIOE7T.Q2m6DBXW.js → mindmap-definition-VGOIOE7T.AmwLTujL.js} +3 -3
  65. package/dist/chunks/{packet-BFZMPI3H.sN5Fa0Sr.js → packet-BFZMPI3H.CSmnVpE_.js} +1 -1
  66. package/dist/chunks/{pie-7BOR55EZ.BScE_xM_.js → pie-7BOR55EZ.DJwvoEep.js} +1 -1
  67. package/dist/chunks/{pieDiagram-ADFJNKIX.WKnsLjJ9.js → pieDiagram-ADFJNKIX.Ci_Ogfw5.js} +4 -4
  68. package/dist/chunks/{quadrantDiagram-AYHSOK5B.CF5uxytb.js → quadrantDiagram-AYHSOK5B.DenSBLBq.js} +1 -1
  69. package/dist/chunks/{radar-NHE76QYJ.C3c_hhO0.js → radar-NHE76QYJ.Bs1Xji9w.js} +1 -1
  70. package/dist/chunks/{rehype-mermaid.9DNnJpsp.js → rehype-mermaid.DlMgdumz.js} +34 -36
  71. package/dist/chunks/{requirementDiagram-UZGBJVZJ.BgyWk-vG.js → requirementDiagram-UZGBJVZJ.CjMQhoO7.js} +3 -3
  72. package/dist/chunks/{sankeyDiagram-TZEHDZUN.DGhb8Q2q.js → sankeyDiagram-TZEHDZUN.B9hWlv5i.js} +1 -1
  73. package/dist/chunks/{sequenceDiagram-WL72ISMW.BdgDMneu.js → sequenceDiagram-WL72ISMW.MHpp_BjQ.js} +3 -3
  74. package/dist/chunks/{stateDiagram-FKZM4ZOC.WvFhN-Y1.js → stateDiagram-FKZM4ZOC.C4fbHKw_.js} +4 -4
  75. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.XGGE9T11.js → stateDiagram-v2-4FDKWEC3.ByhBnYKV.js} +2 -2
  76. package/dist/chunks/{timeline-definition-IT6M3QCI.BZ0pWBft.js → timeline-definition-IT6M3QCI.BVQ3wHwi.js} +2 -2
  77. package/dist/chunks/{treemap-KMMF4GRG.DkuK4pnF.js → treemap-KMMF4GRG.DCYbqvVC.js} +1 -1
  78. package/dist/chunks/{useMarkdown.C-Fn6Ae-.js → useMarkdown.4iaTIP2g.js} +771 -771
  79. package/dist/chunks/{xychartDiagram-PRI3JC2R.D313uw2n.js → xychartDiagram-PRI3JC2R.Dp6iurqL.js} +1 -1
  80. package/dist/components/SassySaint/SassySaint.js +1 -1
  81. package/dist/index.js +3 -3
  82. package/package.json +3 -3
  83. package/dist/chunks/HistoryEntry.BiqgKjR3.js +0 -362
  84. package/dist/chunks/ProfileEntry.8zXuUXK_.js +0 -197
  85. package/dist/chunks/_basePickBy.DwmlU26x.js +0 -151
  86. package/dist/chunks/_baseUniq.BQsx-qln.js +0 -614
  87. package/dist/chunks/graph.Dw7qTm3Q.js +0 -247
  88. package/dist/chunks/layout.BGNrNalg.js +0 -1332
@@ -0,0 +1,1438 @@
1
+ import { baseClone as Ge, Graph as g, isUndefined as m, values as E } from "./graph.Dw24ucCU.js";
2
+ import { isSymbol as z, baseIteratee as I, keys as Ye, baseFindIndex as $e, castFunction as ve, baseForOwn as pe, hasPath as De, castPath as we, toKey as qe, baseGet as be, arrayMap as G, hasIn as We, baseFlatten as ze, toString as Xe, forEach as s, filter as C, reduce as B } from "./_baseUniq.B6Gcl5nF.js";
3
+ import { flatten as O, baseExtremum as me, baseLt as He, baseMap as Ue, map as w, min as P } from "./min.MWawyr81.js";
4
+ import { isObject as M, setToString as Je, overRest as Ke, baseRest as ge, isIterateeCall as S, keysIn as ye, eq as Ze, isArrayLike as Qe, baseFor as en, baseAssignValue as nn, identity as xe, isIndex as rn, assignValue as Ee, isArray as ke, baseUnary as tn, constant$1 as an, merge as X } from "./rehype-mermaid.DlMgdumz.js";
5
+ var on = /\s/;
6
+ function un(e) {
7
+ for (var n = e.length; n-- && on.test(e.charAt(n)); )
8
+ ;
9
+ return n;
10
+ }
11
+ var dn = /^\s+/;
12
+ function fn(e) {
13
+ return e && e.slice(0, un(e) + 1).replace(dn, "");
14
+ }
15
+ var re = NaN, sn = /^[-+]0x[0-9a-f]+$/i, cn = /^0b[01]+$/i, ln = /^0o[0-7]+$/i, hn = parseInt;
16
+ function vn(e) {
17
+ if (typeof e == "number")
18
+ return e;
19
+ if (z(e))
20
+ return re;
21
+ if (M(e)) {
22
+ var n = typeof e.valueOf == "function" ? e.valueOf() : e;
23
+ e = M(n) ? n + "" : n;
24
+ }
25
+ if (typeof e != "string")
26
+ return e === 0 ? e : +e;
27
+ e = fn(e);
28
+ var r = cn.test(e);
29
+ return r || ln.test(e) ? hn(e.slice(2), r ? 2 : 8) : sn.test(e) ? re : +e;
30
+ }
31
+ var te = 1 / 0, pn = 17976931348623157e292;
32
+ function T(e) {
33
+ if (!e)
34
+ return e === 0 ? e : 0;
35
+ if (e = vn(e), e === te || e === -te) {
36
+ var n = e < 0 ? -1 : 1;
37
+ return n * pn;
38
+ }
39
+ return e === e ? e : 0;
40
+ }
41
+ function wn(e) {
42
+ var n = T(e), r = n % 1;
43
+ return n === n ? r ? n - r : n : 0;
44
+ }
45
+ function bn(e) {
46
+ return Je(Ke(e, void 0, O), e + "");
47
+ }
48
+ var mn = 1, gn = 4;
49
+ function yn(e) {
50
+ return Ge(e, mn | gn);
51
+ }
52
+ var Oe = Object.prototype, xn = Oe.hasOwnProperty, En = ge(function(e, n) {
53
+ e = Object(e);
54
+ var r = -1, t = n.length, i = t > 2 ? n[2] : void 0;
55
+ for (i && S(n[0], n[1], i) && (t = 1); ++r < t; )
56
+ for (var o = n[r], a = ye(o), u = -1, d = a.length; ++u < d; ) {
57
+ var f = a[u], c = e[f];
58
+ (c === void 0 || Ze(c, Oe[f]) && !xn.call(e, f)) && (e[f] = o[f]);
59
+ }
60
+ return e;
61
+ });
62
+ function F(e) {
63
+ var n = e == null ? 0 : e.length;
64
+ return n ? e[n - 1] : void 0;
65
+ }
66
+ function kn(e) {
67
+ return function(n, r, t) {
68
+ var i = Object(n);
69
+ if (!Qe(n)) {
70
+ var o = I(r);
71
+ n = Ye(n), r = function(u) {
72
+ return o(i[u], u, i);
73
+ };
74
+ }
75
+ var a = e(n, r, t);
76
+ return a > -1 ? i[o ? n[a] : a] : void 0;
77
+ };
78
+ }
79
+ var On = Math.max;
80
+ function Nn(e, n, r) {
81
+ var t = e == null ? 0 : e.length;
82
+ if (!t)
83
+ return -1;
84
+ var i = r == null ? 0 : wn(r);
85
+ return i < 0 && (i = On(t + i, 0)), $e(e, I(n), i);
86
+ }
87
+ var U = kn(Nn);
88
+ function Ln(e, n) {
89
+ return e == null ? e : en(e, ve(n), ye);
90
+ }
91
+ function Pn(e, n) {
92
+ return e && pe(e, ve(n));
93
+ }
94
+ function _n(e, n) {
95
+ return e > n;
96
+ }
97
+ var In = Object.prototype, Cn = In.hasOwnProperty;
98
+ function Rn(e, n) {
99
+ return e != null && Cn.call(e, n);
100
+ }
101
+ function Ne(e, n) {
102
+ return e != null && De(e, n, Rn);
103
+ }
104
+ function j(e, n) {
105
+ var r = {};
106
+ return n = I(n), pe(e, function(t, i, o) {
107
+ nn(r, i, n(t, i, o));
108
+ }), r;
109
+ }
110
+ function y(e) {
111
+ return e && e.length ? me(e, xe, _n) : void 0;
112
+ }
113
+ function J(e, n) {
114
+ return e && e.length ? me(e, I(n), He) : void 0;
115
+ }
116
+ function Tn(e, n, r, t) {
117
+ if (!M(e))
118
+ return e;
119
+ n = we(n, e);
120
+ for (var i = -1, o = n.length, a = o - 1, u = e; u != null && ++i < o; ) {
121
+ var d = qe(n[i]), f = r;
122
+ if (d === "__proto__" || d === "constructor" || d === "prototype")
123
+ return e;
124
+ if (i != a) {
125
+ var c = u[d];
126
+ f = void 0, f === void 0 && (f = M(c) ? c : rn(n[i + 1]) ? [] : {});
127
+ }
128
+ Ee(u, d, f), u = u[d];
129
+ }
130
+ return e;
131
+ }
132
+ function Mn(e, n, r) {
133
+ for (var t = -1, i = n.length, o = {}; ++t < i; ) {
134
+ var a = n[t], u = be(e, a);
135
+ r(u, a) && Tn(o, we(a, e), u);
136
+ }
137
+ return o;
138
+ }
139
+ function Sn(e, n) {
140
+ var r = e.length;
141
+ for (e.sort(n); r--; )
142
+ e[r] = e[r].value;
143
+ return e;
144
+ }
145
+ function Fn(e, n) {
146
+ if (e !== n) {
147
+ var r = e !== void 0, t = e === null, i = e === e, o = z(e), a = n !== void 0, u = n === null, d = n === n, f = z(n);
148
+ if (!u && !f && !o && e > n || o && a && d && !u && !f || t && a && d || !r && d || !i)
149
+ return 1;
150
+ if (!t && !o && !f && e < n || f && r && i && !t && !o || u && r && i || !a && i || !d)
151
+ return -1;
152
+ }
153
+ return 0;
154
+ }
155
+ function An(e, n, r) {
156
+ for (var t = -1, i = e.criteria, o = n.criteria, a = i.length, u = r.length; ++t < a; ) {
157
+ var d = Fn(i[t], o[t]);
158
+ if (d) {
159
+ if (t >= u)
160
+ return d;
161
+ var f = r[t];
162
+ return d * (f == "desc" ? -1 : 1);
163
+ }
164
+ }
165
+ return e.index - n.index;
166
+ }
167
+ function Bn(e, n, r) {
168
+ n.length ? n = G(n, function(o) {
169
+ return ke(o) ? function(a) {
170
+ return be(a, o.length === 1 ? o[0] : o);
171
+ } : o;
172
+ }) : n = [xe];
173
+ var t = -1;
174
+ n = G(n, tn(I));
175
+ var i = Ue(e, function(o, a, u) {
176
+ var d = G(n, function(f) {
177
+ return f(o);
178
+ });
179
+ return { criteria: d, index: ++t, value: o };
180
+ });
181
+ return Sn(i, function(o, a) {
182
+ return An(o, a, r);
183
+ });
184
+ }
185
+ function jn(e, n) {
186
+ return Mn(e, n, function(r, t) {
187
+ return We(e, t);
188
+ });
189
+ }
190
+ var A = bn(function(e, n) {
191
+ return e == null ? {} : jn(e, n);
192
+ }), Vn = Math.ceil, Gn = Math.max;
193
+ function Yn(e, n, r, t) {
194
+ for (var i = -1, o = Gn(Vn((n - e) / (r || 1)), 0), a = Array(o); o--; )
195
+ a[++i] = e, e += r;
196
+ return a;
197
+ }
198
+ function $n(e) {
199
+ return function(n, r, t) {
200
+ return t && typeof t != "number" && S(n, r, t) && (r = t = void 0), n = T(n), r === void 0 ? (r = n, n = 0) : r = T(r), t = t === void 0 ? n < r ? 1 : -1 : T(t), Yn(n, r, t);
201
+ };
202
+ }
203
+ var k = $n(), R = ge(function(e, n) {
204
+ if (e == null)
205
+ return [];
206
+ var r = n.length;
207
+ return r > 1 && S(e, n[0], n[1]) ? n = [] : r > 2 && S(n[0], n[1], n[2]) && (n = [n[0]]), Bn(e, ze(n), []);
208
+ }), Dn = 0;
209
+ function K(e) {
210
+ var n = ++Dn;
211
+ return Xe(e) + n;
212
+ }
213
+ function qn(e, n, r) {
214
+ for (var t = -1, i = e.length, o = n.length, a = {}; ++t < i; ) {
215
+ var u = t < o ? n[t] : void 0;
216
+ r(a, e[t], u);
217
+ }
218
+ return a;
219
+ }
220
+ function Wn(e, n) {
221
+ return qn(e || [], n || [], Ee);
222
+ }
223
+ class zn {
224
+ constructor() {
225
+ var n = {};
226
+ n._next = n._prev = n, this._sentinel = n;
227
+ }
228
+ dequeue() {
229
+ var n = this._sentinel, r = n._prev;
230
+ if (r !== n)
231
+ return ie(r), r;
232
+ }
233
+ enqueue(n) {
234
+ var r = this._sentinel;
235
+ n._prev && n._next && ie(n), n._next = r._next, r._next._prev = n, r._next = n, n._prev = r;
236
+ }
237
+ toString() {
238
+ for (var n = [], r = this._sentinel, t = r._prev; t !== r; )
239
+ n.push(JSON.stringify(t, Xn)), t = t._prev;
240
+ return "[" + n.join(", ") + "]";
241
+ }
242
+ }
243
+ function ie(e) {
244
+ e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
245
+ }
246
+ function Xn(e, n) {
247
+ if (e !== "_next" && e !== "_prev")
248
+ return n;
249
+ }
250
+ var Hn = an(1);
251
+ function Un(e, n) {
252
+ if (e.nodeCount() <= 1)
253
+ return [];
254
+ var r = Kn(e, n || Hn), t = Jn(r.graph, r.buckets, r.zeroIdx);
255
+ return O(
256
+ w(t, function(i) {
257
+ return e.outEdges(i.v, i.w);
258
+ })
259
+ );
260
+ }
261
+ function Jn(e, n, r) {
262
+ for (var t = [], i = n[n.length - 1], o = n[0], a; e.nodeCount(); ) {
263
+ for (; a = o.dequeue(); )
264
+ Y(e, n, r, a);
265
+ for (; a = i.dequeue(); )
266
+ Y(e, n, r, a);
267
+ if (e.nodeCount()) {
268
+ for (var u = n.length - 2; u > 0; --u)
269
+ if (a = n[u].dequeue(), a) {
270
+ t = t.concat(Y(e, n, r, a, !0));
271
+ break;
272
+ }
273
+ }
274
+ }
275
+ return t;
276
+ }
277
+ function Y(e, n, r, t, i) {
278
+ var o = i ? [] : void 0;
279
+ return s(e.inEdges(t.v), function(a) {
280
+ var u = e.edge(a), d = e.node(a.v);
281
+ i && o.push({ v: a.v, w: a.w }), d.out -= u, H(n, r, d);
282
+ }), s(e.outEdges(t.v), function(a) {
283
+ var u = e.edge(a), d = a.w, f = e.node(d);
284
+ f.in -= u, H(n, r, f);
285
+ }), e.removeNode(t.v), o;
286
+ }
287
+ function Kn(e, n) {
288
+ var r = new g(), t = 0, i = 0;
289
+ s(e.nodes(), function(u) {
290
+ r.setNode(u, { v: u, in: 0, out: 0 });
291
+ }), s(e.edges(), function(u) {
292
+ var d = r.edge(u.v, u.w) || 0, f = n(u), c = d + f;
293
+ r.setEdge(u.v, u.w, c), i = Math.max(i, r.node(u.v).out += f), t = Math.max(t, r.node(u.w).in += f);
294
+ });
295
+ var o = k(i + t + 3).map(function() {
296
+ return new zn();
297
+ }), a = t + 1;
298
+ return s(r.nodes(), function(u) {
299
+ H(o, a, r.node(u));
300
+ }), { graph: r, buckets: o, zeroIdx: a };
301
+ }
302
+ function H(e, n, r) {
303
+ r.out ? r.in ? e[r.out - r.in + n].enqueue(r) : e[e.length - 1].enqueue(r) : e[0].enqueue(r);
304
+ }
305
+ function Zn(e) {
306
+ var n = e.graph().acyclicer === "greedy" ? Un(e, r(e)) : Qn(e);
307
+ s(n, function(t) {
308
+ var i = e.edge(t);
309
+ e.removeEdge(t), i.forwardName = t.name, i.reversed = !0, e.setEdge(t.w, t.v, i, K("rev"));
310
+ });
311
+ function r(t) {
312
+ return function(i) {
313
+ return t.edge(i).weight;
314
+ };
315
+ }
316
+ }
317
+ function Qn(e) {
318
+ var n = [], r = {}, t = {};
319
+ function i(o) {
320
+ Object.prototype.hasOwnProperty.call(t, o) || (t[o] = !0, r[o] = !0, s(e.outEdges(o), function(a) {
321
+ Object.prototype.hasOwnProperty.call(r, a.w) ? n.push(a) : i(a.w);
322
+ }), delete r[o]);
323
+ }
324
+ return s(e.nodes(), i), n;
325
+ }
326
+ function er(e) {
327
+ s(e.edges(), function(n) {
328
+ var r = e.edge(n);
329
+ if (r.reversed) {
330
+ e.removeEdge(n);
331
+ var t = r.forwardName;
332
+ delete r.reversed, delete r.forwardName, e.setEdge(n.w, n.v, r, t);
333
+ }
334
+ });
335
+ }
336
+ function N(e, n, r, t) {
337
+ var i;
338
+ do
339
+ i = K(t);
340
+ while (e.hasNode(i));
341
+ return r.dummy = n, e.setNode(i, r), i;
342
+ }
343
+ function nr(e) {
344
+ var n = new g().setGraph(e.graph());
345
+ return s(e.nodes(), function(r) {
346
+ n.setNode(r, e.node(r));
347
+ }), s(e.edges(), function(r) {
348
+ var t = n.edge(r.v, r.w) || { weight: 0, minlen: 1 }, i = e.edge(r);
349
+ n.setEdge(r.v, r.w, {
350
+ weight: t.weight + i.weight,
351
+ minlen: Math.max(t.minlen, i.minlen)
352
+ });
353
+ }), n;
354
+ }
355
+ function Le(e) {
356
+ var n = new g({ multigraph: e.isMultigraph() }).setGraph(e.graph());
357
+ return s(e.nodes(), function(r) {
358
+ e.children(r).length || n.setNode(r, e.node(r));
359
+ }), s(e.edges(), function(r) {
360
+ n.setEdge(r, e.edge(r));
361
+ }), n;
362
+ }
363
+ function ae(e, n) {
364
+ var r = e.x, t = e.y, i = n.x - r, o = n.y - t, a = e.width / 2, u = e.height / 2;
365
+ if (!i && !o)
366
+ throw new Error("Not possible to find intersection inside of the rectangle");
367
+ var d, f;
368
+ return Math.abs(o) * a > Math.abs(i) * u ? (o < 0 && (u = -u), d = u * i / o, f = u) : (i < 0 && (a = -a), d = a, f = a * o / i), { x: r + d, y: t + f };
369
+ }
370
+ function V(e) {
371
+ var n = w(k(Pe(e) + 1), function() {
372
+ return [];
373
+ });
374
+ return s(e.nodes(), function(r) {
375
+ var t = e.node(r), i = t.rank;
376
+ m(i) || (n[i][t.order] = r);
377
+ }), n;
378
+ }
379
+ function rr(e) {
380
+ var n = P(
381
+ w(e.nodes(), function(r) {
382
+ return e.node(r).rank;
383
+ })
384
+ );
385
+ s(e.nodes(), function(r) {
386
+ var t = e.node(r);
387
+ Ne(t, "rank") && (t.rank -= n);
388
+ });
389
+ }
390
+ function tr(e) {
391
+ var n = P(
392
+ w(e.nodes(), function(o) {
393
+ return e.node(o).rank;
394
+ })
395
+ ), r = [];
396
+ s(e.nodes(), function(o) {
397
+ var a = e.node(o).rank - n;
398
+ r[a] || (r[a] = []), r[a].push(o);
399
+ });
400
+ var t = 0, i = e.graph().nodeRankFactor;
401
+ s(r, function(o, a) {
402
+ m(o) && a % i !== 0 ? --t : t && s(o, function(u) {
403
+ e.node(u).rank += t;
404
+ });
405
+ });
406
+ }
407
+ function oe(e, n, r, t) {
408
+ var i = {
409
+ width: 0,
410
+ height: 0
411
+ };
412
+ return arguments.length >= 4 && (i.rank = r, i.order = t), N(e, "border", i, n);
413
+ }
414
+ function Pe(e) {
415
+ return y(
416
+ w(e.nodes(), function(n) {
417
+ var r = e.node(n).rank;
418
+ if (!m(r))
419
+ return r;
420
+ })
421
+ );
422
+ }
423
+ function ir(e, n) {
424
+ var r = { lhs: [], rhs: [] };
425
+ return s(e, function(t) {
426
+ n(t) ? r.lhs.push(t) : r.rhs.push(t);
427
+ }), r;
428
+ }
429
+ function ar(e, n) {
430
+ return n();
431
+ }
432
+ function or(e) {
433
+ function n(r) {
434
+ var t = e.children(r), i = e.node(r);
435
+ if (t.length && s(t, n), Object.prototype.hasOwnProperty.call(i, "minRank")) {
436
+ i.borderLeft = [], i.borderRight = [];
437
+ for (var o = i.minRank, a = i.maxRank + 1; o < a; ++o)
438
+ ue(e, "borderLeft", "_bl", r, i, o), ue(e, "borderRight", "_br", r, i, o);
439
+ }
440
+ }
441
+ s(e.children(), n);
442
+ }
443
+ function ue(e, n, r, t, i, o) {
444
+ var a = { width: 0, height: 0, rank: o, borderType: n }, u = i[n][o - 1], d = N(e, "border", a, r);
445
+ i[n][o] = d, e.setParent(d, t), u && e.setEdge(u, d, { weight: 1 });
446
+ }
447
+ function ur(e) {
448
+ var n = e.graph().rankdir.toLowerCase();
449
+ (n === "lr" || n === "rl") && _e(e);
450
+ }
451
+ function dr(e) {
452
+ var n = e.graph().rankdir.toLowerCase();
453
+ (n === "bt" || n === "rl") && fr(e), (n === "lr" || n === "rl") && (sr(e), _e(e));
454
+ }
455
+ function _e(e) {
456
+ s(e.nodes(), function(n) {
457
+ de(e.node(n));
458
+ }), s(e.edges(), function(n) {
459
+ de(e.edge(n));
460
+ });
461
+ }
462
+ function de(e) {
463
+ var n = e.width;
464
+ e.width = e.height, e.height = n;
465
+ }
466
+ function fr(e) {
467
+ s(e.nodes(), function(n) {
468
+ $(e.node(n));
469
+ }), s(e.edges(), function(n) {
470
+ var r = e.edge(n);
471
+ s(r.points, $), Object.prototype.hasOwnProperty.call(r, "y") && $(r);
472
+ });
473
+ }
474
+ function $(e) {
475
+ e.y = -e.y;
476
+ }
477
+ function sr(e) {
478
+ s(e.nodes(), function(n) {
479
+ D(e.node(n));
480
+ }), s(e.edges(), function(n) {
481
+ var r = e.edge(n);
482
+ s(r.points, D), Object.prototype.hasOwnProperty.call(r, "x") && D(r);
483
+ });
484
+ }
485
+ function D(e) {
486
+ var n = e.x;
487
+ e.x = e.y, e.y = n;
488
+ }
489
+ function cr(e) {
490
+ e.graph().dummyChains = [], s(e.edges(), function(n) {
491
+ lr(e, n);
492
+ });
493
+ }
494
+ function lr(e, n) {
495
+ var r = n.v, t = e.node(r).rank, i = n.w, o = e.node(i).rank, a = n.name, u = e.edge(n), d = u.labelRank;
496
+ if (o !== t + 1) {
497
+ e.removeEdge(n);
498
+ var f = void 0, c, l;
499
+ for (l = 0, ++t; t < o; ++l, ++t)
500
+ u.points = [], f = {
501
+ width: 0,
502
+ height: 0,
503
+ edgeLabel: u,
504
+ edgeObj: n,
505
+ rank: t
506
+ }, c = N(e, "edge", f, "_d"), t === d && (f.width = u.width, f.height = u.height, f.dummy = "edge-label", f.labelpos = u.labelpos), e.setEdge(r, c, { weight: u.weight }, a), l === 0 && e.graph().dummyChains.push(c), r = c;
507
+ e.setEdge(r, i, { weight: u.weight }, a);
508
+ }
509
+ }
510
+ function hr(e) {
511
+ s(e.graph().dummyChains, function(n) {
512
+ var r = e.node(n), t = r.edgeLabel, i;
513
+ for (e.setEdge(r.edgeObj, t); r.dummy; )
514
+ i = e.successors(n)[0], e.removeNode(n), t.points.push({ x: r.x, y: r.y }), r.dummy === "edge-label" && (t.x = r.x, t.y = r.y, t.width = r.width, t.height = r.height), n = i, r = e.node(n);
515
+ });
516
+ }
517
+ function Z(e) {
518
+ var n = {};
519
+ function r(t) {
520
+ var i = e.node(t);
521
+ if (Object.prototype.hasOwnProperty.call(n, t))
522
+ return i.rank;
523
+ n[t] = !0;
524
+ var o = P(
525
+ w(e.outEdges(t), function(a) {
526
+ return r(a.w) - e.edge(a).minlen;
527
+ })
528
+ );
529
+ return (o === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
530
+ o === void 0 || // return value of _.map([]) for Lodash 4
531
+ o === null) && (o = 0), i.rank = o;
532
+ }
533
+ s(e.sources(), r);
534
+ }
535
+ function _(e, n) {
536
+ return e.node(n.w).rank - e.node(n.v).rank - e.edge(n).minlen;
537
+ }
538
+ function Ie(e) {
539
+ var n = new g({ directed: !1 }), r = e.nodes()[0], t = e.nodeCount();
540
+ n.setNode(r, {});
541
+ for (var i, o; vr(n, e) < t; )
542
+ i = pr(n, e), o = n.hasNode(i.v) ? _(e, i) : -_(e, i), wr(n, e, o);
543
+ return n;
544
+ }
545
+ function vr(e, n) {
546
+ function r(t) {
547
+ s(n.nodeEdges(t), function(i) {
548
+ var o = i.v, a = t === o ? i.w : o;
549
+ !e.hasNode(a) && !_(n, i) && (e.setNode(a, {}), e.setEdge(t, a, {}), r(a));
550
+ });
551
+ }
552
+ return s(e.nodes(), r), e.nodeCount();
553
+ }
554
+ function pr(e, n) {
555
+ return J(n.edges(), function(r) {
556
+ if (e.hasNode(r.v) !== e.hasNode(r.w))
557
+ return _(n, r);
558
+ });
559
+ }
560
+ function wr(e, n, r) {
561
+ s(e.nodes(), function(t) {
562
+ n.node(t).rank += r;
563
+ });
564
+ }
565
+ function Ce(e, n, r) {
566
+ ke(n) || (n = [n]);
567
+ var t = (e.isDirected() ? e.successors : e.neighbors).bind(e), i = [], o = {};
568
+ return s(n, function(a) {
569
+ if (!e.hasNode(a))
570
+ throw new Error("Graph does not have node: " + a);
571
+ Re(e, a, r === "post", o, t, i);
572
+ }), i;
573
+ }
574
+ function Re(e, n, r, t, i, o) {
575
+ Object.prototype.hasOwnProperty.call(t, n) || (t[n] = !0, r || o.push(n), s(i(n), function(a) {
576
+ Re(e, a, r, t, i, o);
577
+ }), r && o.push(n));
578
+ }
579
+ function br(e, n) {
580
+ return Ce(e, n, "post");
581
+ }
582
+ function mr(e, n) {
583
+ return Ce(e, n, "pre");
584
+ }
585
+ x.initLowLimValues = ee;
586
+ x.initCutValues = Q;
587
+ x.calcCutValue = Te;
588
+ x.leaveEdge = Se;
589
+ x.enterEdge = Fe;
590
+ x.exchangeEdges = Ae;
591
+ function x(e) {
592
+ e = nr(e), Z(e);
593
+ var n = Ie(e);
594
+ ee(n), Q(n, e);
595
+ for (var r, t; r = Se(n); )
596
+ t = Fe(n, e, r), Ae(n, e, r, t);
597
+ }
598
+ function Q(e, n) {
599
+ var r = br(e, e.nodes());
600
+ r = r.slice(0, r.length - 1), s(r, function(t) {
601
+ gr(e, n, t);
602
+ });
603
+ }
604
+ function gr(e, n, r) {
605
+ var t = e.node(r), i = t.parent;
606
+ e.edge(r, i).cutvalue = Te(e, n, r);
607
+ }
608
+ function Te(e, n, r) {
609
+ var t = e.node(r), i = t.parent, o = !0, a = n.edge(r, i), u = 0;
610
+ return a || (o = !1, a = n.edge(i, r)), u = a.weight, s(n.nodeEdges(r), function(d) {
611
+ var f = d.v === r, c = f ? d.w : d.v;
612
+ if (c !== i) {
613
+ var l = f === o, h = n.edge(d).weight;
614
+ if (u += l ? h : -h, xr(e, r, c)) {
615
+ var v = e.edge(r, c).cutvalue;
616
+ u += l ? -v : v;
617
+ }
618
+ }
619
+ }), u;
620
+ }
621
+ function ee(e, n) {
622
+ arguments.length < 2 && (n = e.nodes()[0]), Me(e, {}, 1, n);
623
+ }
624
+ function Me(e, n, r, t, i) {
625
+ var o = r, a = e.node(t);
626
+ return n[t] = !0, s(e.neighbors(t), function(u) {
627
+ Object.prototype.hasOwnProperty.call(n, u) || (r = Me(e, n, r, u, t));
628
+ }), a.low = o, a.lim = r++, i ? a.parent = i : delete a.parent, r;
629
+ }
630
+ function Se(e) {
631
+ return U(e.edges(), function(n) {
632
+ return e.edge(n).cutvalue < 0;
633
+ });
634
+ }
635
+ function Fe(e, n, r) {
636
+ var t = r.v, i = r.w;
637
+ n.hasEdge(t, i) || (t = r.w, i = r.v);
638
+ var o = e.node(t), a = e.node(i), u = o, d = !1;
639
+ o.lim > a.lim && (u = a, d = !0);
640
+ var f = C(n.edges(), function(c) {
641
+ return d === fe(e, e.node(c.v), u) && d !== fe(e, e.node(c.w), u);
642
+ });
643
+ return J(f, function(c) {
644
+ return _(n, c);
645
+ });
646
+ }
647
+ function Ae(e, n, r, t) {
648
+ var i = r.v, o = r.w;
649
+ e.removeEdge(i, o), e.setEdge(t.v, t.w, {}), ee(e), Q(e, n), yr(e, n);
650
+ }
651
+ function yr(e, n) {
652
+ var r = U(e.nodes(), function(i) {
653
+ return !n.node(i).parent;
654
+ }), t = mr(e, r);
655
+ t = t.slice(1), s(t, function(i) {
656
+ var o = e.node(i).parent, a = n.edge(i, o), u = !1;
657
+ a || (a = n.edge(o, i), u = !0), n.node(i).rank = n.node(o).rank + (u ? a.minlen : -a.minlen);
658
+ });
659
+ }
660
+ function xr(e, n, r) {
661
+ return e.hasEdge(n, r);
662
+ }
663
+ function fe(e, n, r) {
664
+ return r.low <= n.lim && n.lim <= r.lim;
665
+ }
666
+ function Er(e) {
667
+ switch (e.graph().ranker) {
668
+ case "network-simplex":
669
+ se(e);
670
+ break;
671
+ case "tight-tree":
672
+ Or(e);
673
+ break;
674
+ case "longest-path":
675
+ kr(e);
676
+ break;
677
+ default:
678
+ se(e);
679
+ }
680
+ }
681
+ var kr = Z;
682
+ function Or(e) {
683
+ Z(e), Ie(e);
684
+ }
685
+ function se(e) {
686
+ x(e);
687
+ }
688
+ function Nr(e) {
689
+ var n = N(e, "root", {}, "_root"), r = Lr(e), t = y(E(r)) - 1, i = 2 * t + 1;
690
+ e.graph().nestingRoot = n, s(e.edges(), function(a) {
691
+ e.edge(a).minlen *= i;
692
+ });
693
+ var o = Pr(e) + 1;
694
+ s(e.children(), function(a) {
695
+ Be(e, n, i, o, t, r, a);
696
+ }), e.graph().nodeRankFactor = i;
697
+ }
698
+ function Be(e, n, r, t, i, o, a) {
699
+ var u = e.children(a);
700
+ if (!u.length) {
701
+ a !== n && e.setEdge(n, a, { weight: 0, minlen: r });
702
+ return;
703
+ }
704
+ var d = oe(e, "_bt"), f = oe(e, "_bb"), c = e.node(a);
705
+ e.setParent(d, a), c.borderTop = d, e.setParent(f, a), c.borderBottom = f, s(u, function(l) {
706
+ Be(e, n, r, t, i, o, l);
707
+ var h = e.node(l), v = h.borderTop ? h.borderTop : l, p = h.borderBottom ? h.borderBottom : l, b = h.borderTop ? t : 2 * t, L = v !== p ? 1 : i - o[a] + 1;
708
+ e.setEdge(d, v, {
709
+ weight: b,
710
+ minlen: L,
711
+ nestingEdge: !0
712
+ }), e.setEdge(p, f, {
713
+ weight: b,
714
+ minlen: L,
715
+ nestingEdge: !0
716
+ });
717
+ }), e.parent(a) || e.setEdge(n, d, { weight: 0, minlen: i + o[a] });
718
+ }
719
+ function Lr(e) {
720
+ var n = {};
721
+ function r(t, i) {
722
+ var o = e.children(t);
723
+ o && o.length && s(o, function(a) {
724
+ r(a, i + 1);
725
+ }), n[t] = i;
726
+ }
727
+ return s(e.children(), function(t) {
728
+ r(t, 1);
729
+ }), n;
730
+ }
731
+ function Pr(e) {
732
+ return B(
733
+ e.edges(),
734
+ function(n, r) {
735
+ return n + e.edge(r).weight;
736
+ },
737
+ 0
738
+ );
739
+ }
740
+ function _r(e) {
741
+ var n = e.graph();
742
+ e.removeNode(n.nestingRoot), delete n.nestingRoot, s(e.edges(), function(r) {
743
+ var t = e.edge(r);
744
+ t.nestingEdge && e.removeEdge(r);
745
+ });
746
+ }
747
+ function Ir(e, n, r) {
748
+ var t = {}, i;
749
+ s(r, function(o) {
750
+ for (var a = e.parent(o), u, d; a; ) {
751
+ if (u = e.parent(a), u ? (d = t[u], t[u] = a) : (d = i, i = a), d && d !== a) {
752
+ n.setEdge(d, a);
753
+ return;
754
+ }
755
+ a = u;
756
+ }
757
+ });
758
+ }
759
+ function Cr(e, n, r) {
760
+ var t = Rr(e), i = new g({ compound: !0 }).setGraph({ root: t }).setDefaultNodeLabel(function(o) {
761
+ return e.node(o);
762
+ });
763
+ return s(e.nodes(), function(o) {
764
+ var a = e.node(o), u = e.parent(o);
765
+ (a.rank === n || a.minRank <= n && n <= a.maxRank) && (i.setNode(o), i.setParent(o, u || t), s(e[r](o), function(d) {
766
+ var f = d.v === o ? d.w : d.v, c = i.edge(f, o), l = m(c) ? 0 : c.weight;
767
+ i.setEdge(f, o, { weight: e.edge(d).weight + l });
768
+ }), Object.prototype.hasOwnProperty.call(a, "minRank") && i.setNode(o, {
769
+ borderLeft: a.borderLeft[n],
770
+ borderRight: a.borderRight[n]
771
+ }));
772
+ }), i;
773
+ }
774
+ function Rr(e) {
775
+ for (var n; e.hasNode(n = K("_root")); ) ;
776
+ return n;
777
+ }
778
+ function Tr(e, n) {
779
+ for (var r = 0, t = 1; t < n.length; ++t)
780
+ r += Mr(e, n[t - 1], n[t]);
781
+ return r;
782
+ }
783
+ function Mr(e, n, r) {
784
+ for (var t = Wn(
785
+ r,
786
+ w(r, function(f, c) {
787
+ return c;
788
+ })
789
+ ), i = O(
790
+ w(n, function(f) {
791
+ return R(
792
+ w(e.outEdges(f), function(c) {
793
+ return { pos: t[c.w], weight: e.edge(c).weight };
794
+ }),
795
+ "pos"
796
+ );
797
+ })
798
+ ), o = 1; o < r.length; ) o <<= 1;
799
+ var a = 2 * o - 1;
800
+ o -= 1;
801
+ var u = w(new Array(a), function() {
802
+ return 0;
803
+ }), d = 0;
804
+ return s(
805
+ // @ts-expect-error
806
+ i.forEach(function(f) {
807
+ var c = f.pos + o;
808
+ u[c] += f.weight;
809
+ for (var l = 0; c > 0; )
810
+ c % 2 && (l += u[c + 1]), c = c - 1 >> 1, u[c] += f.weight;
811
+ d += f.weight * l;
812
+ })
813
+ ), d;
814
+ }
815
+ function Sr(e) {
816
+ var n = {}, r = C(e.nodes(), function(u) {
817
+ return !e.children(u).length;
818
+ }), t = y(
819
+ w(r, function(u) {
820
+ return e.node(u).rank;
821
+ })
822
+ ), i = w(k(t + 1), function() {
823
+ return [];
824
+ });
825
+ function o(u) {
826
+ if (!Ne(n, u)) {
827
+ n[u] = !0;
828
+ var d = e.node(u);
829
+ i[d.rank].push(u), s(e.successors(u), o);
830
+ }
831
+ }
832
+ var a = R(r, function(u) {
833
+ return e.node(u).rank;
834
+ });
835
+ return s(a, o), i;
836
+ }
837
+ function Fr(e, n) {
838
+ return w(n, function(r) {
839
+ var t = e.inEdges(r);
840
+ if (t.length) {
841
+ var i = B(
842
+ t,
843
+ function(o, a) {
844
+ var u = e.edge(a), d = e.node(a.v);
845
+ return {
846
+ sum: o.sum + u.weight * d.order,
847
+ weight: o.weight + u.weight
848
+ };
849
+ },
850
+ { sum: 0, weight: 0 }
851
+ );
852
+ return {
853
+ v: r,
854
+ barycenter: i.sum / i.weight,
855
+ weight: i.weight
856
+ };
857
+ } else
858
+ return { v: r };
859
+ });
860
+ }
861
+ function Ar(e, n) {
862
+ var r = {};
863
+ s(e, function(i, o) {
864
+ var a = r[i.v] = {
865
+ indegree: 0,
866
+ in: [],
867
+ out: [],
868
+ vs: [i.v],
869
+ i: o
870
+ };
871
+ m(i.barycenter) || (a.barycenter = i.barycenter, a.weight = i.weight);
872
+ }), s(n.edges(), function(i) {
873
+ var o = r[i.v], a = r[i.w];
874
+ !m(o) && !m(a) && (a.indegree++, o.out.push(r[i.w]));
875
+ });
876
+ var t = C(r, function(i) {
877
+ return !i.indegree;
878
+ });
879
+ return Br(t);
880
+ }
881
+ function Br(e) {
882
+ var n = [];
883
+ function r(o) {
884
+ return function(a) {
885
+ a.merged || (m(a.barycenter) || m(o.barycenter) || a.barycenter >= o.barycenter) && jr(o, a);
886
+ };
887
+ }
888
+ function t(o) {
889
+ return function(a) {
890
+ a.in.push(o), --a.indegree === 0 && e.push(a);
891
+ };
892
+ }
893
+ for (; e.length; ) {
894
+ var i = e.pop();
895
+ n.push(i), s(i.in.reverse(), r(i)), s(i.out, t(i));
896
+ }
897
+ return w(
898
+ C(n, function(o) {
899
+ return !o.merged;
900
+ }),
901
+ function(o) {
902
+ return A(o, ["vs", "i", "barycenter", "weight"]);
903
+ }
904
+ );
905
+ }
906
+ function jr(e, n) {
907
+ var r = 0, t = 0;
908
+ e.weight && (r += e.barycenter * e.weight, t += e.weight), n.weight && (r += n.barycenter * n.weight, t += n.weight), e.vs = n.vs.concat(e.vs), e.barycenter = r / t, e.weight = t, e.i = Math.min(n.i, e.i), n.merged = !0;
909
+ }
910
+ function Vr(e, n) {
911
+ var r = ir(e, function(c) {
912
+ return Object.prototype.hasOwnProperty.call(c, "barycenter");
913
+ }), t = r.lhs, i = R(r.rhs, function(c) {
914
+ return -c.i;
915
+ }), o = [], a = 0, u = 0, d = 0;
916
+ t.sort(Gr(!!n)), d = ce(o, i, d), s(t, function(c) {
917
+ d += c.vs.length, o.push(c.vs), a += c.barycenter * c.weight, u += c.weight, d = ce(o, i, d);
918
+ });
919
+ var f = { vs: O(o) };
920
+ return u && (f.barycenter = a / u, f.weight = u), f;
921
+ }
922
+ function ce(e, n, r) {
923
+ for (var t; n.length && (t = F(n)).i <= r; )
924
+ n.pop(), e.push(t.vs), r++;
925
+ return r;
926
+ }
927
+ function Gr(e) {
928
+ return function(n, r) {
929
+ return n.barycenter < r.barycenter ? -1 : n.barycenter > r.barycenter ? 1 : e ? r.i - n.i : n.i - r.i;
930
+ };
931
+ }
932
+ function je(e, n, r, t) {
933
+ var i = e.children(n), o = e.node(n), a = o ? o.borderLeft : void 0, u = o ? o.borderRight : void 0, d = {};
934
+ a && (i = C(i, function(p) {
935
+ return p !== a && p !== u;
936
+ }));
937
+ var f = Fr(e, i);
938
+ s(f, function(p) {
939
+ if (e.children(p.v).length) {
940
+ var b = je(e, p.v, r, t);
941
+ d[p.v] = b, Object.prototype.hasOwnProperty.call(b, "barycenter") && $r(p, b);
942
+ }
943
+ });
944
+ var c = Ar(f, r);
945
+ Yr(c, d);
946
+ var l = Vr(c, t);
947
+ if (a && (l.vs = O([a, l.vs, u]), e.predecessors(a).length)) {
948
+ var h = e.node(e.predecessors(a)[0]), v = e.node(e.predecessors(u)[0]);
949
+ Object.prototype.hasOwnProperty.call(l, "barycenter") || (l.barycenter = 0, l.weight = 0), l.barycenter = (l.barycenter * l.weight + h.order + v.order) / (l.weight + 2), l.weight += 2;
950
+ }
951
+ return l;
952
+ }
953
+ function Yr(e, n) {
954
+ s(e, function(r) {
955
+ r.vs = O(
956
+ r.vs.map(function(t) {
957
+ return n[t] ? n[t].vs : t;
958
+ })
959
+ );
960
+ });
961
+ }
962
+ function $r(e, n) {
963
+ m(e.barycenter) ? (e.barycenter = n.barycenter, e.weight = n.weight) : (e.barycenter = (e.barycenter * e.weight + n.barycenter * n.weight) / (e.weight + n.weight), e.weight += n.weight);
964
+ }
965
+ function Dr(e) {
966
+ var n = Pe(e), r = le(e, k(1, n + 1), "inEdges"), t = le(e, k(n - 1, -1, -1), "outEdges"), i = Sr(e);
967
+ he(e, i);
968
+ for (var o = Number.POSITIVE_INFINITY, a, u = 0, d = 0; d < 4; ++u, ++d) {
969
+ qr(u % 2 ? r : t, u % 4 >= 2), i = V(e);
970
+ var f = Tr(e, i);
971
+ f < o && (d = 0, a = yn(i), o = f);
972
+ }
973
+ he(e, a);
974
+ }
975
+ function le(e, n, r) {
976
+ return w(n, function(t) {
977
+ return Cr(e, t, r);
978
+ });
979
+ }
980
+ function qr(e, n) {
981
+ var r = new g();
982
+ s(e, function(t) {
983
+ var i = t.graph().root, o = je(t, i, r, n);
984
+ s(o.vs, function(a, u) {
985
+ t.node(a).order = u;
986
+ }), Ir(t, r, o.vs);
987
+ });
988
+ }
989
+ function he(e, n) {
990
+ s(n, function(r) {
991
+ s(r, function(t, i) {
992
+ e.node(t).order = i;
993
+ });
994
+ });
995
+ }
996
+ function Wr(e) {
997
+ var n = Xr(e);
998
+ s(e.graph().dummyChains, function(r) {
999
+ for (var t = e.node(r), i = t.edgeObj, o = zr(e, n, i.v, i.w), a = o.path, u = o.lca, d = 0, f = a[d], c = !0; r !== i.w; ) {
1000
+ if (t = e.node(r), c) {
1001
+ for (; (f = a[d]) !== u && e.node(f).maxRank < t.rank; )
1002
+ d++;
1003
+ f === u && (c = !1);
1004
+ }
1005
+ if (!c) {
1006
+ for (; d < a.length - 1 && e.node(f = a[d + 1]).minRank <= t.rank; )
1007
+ d++;
1008
+ f = a[d];
1009
+ }
1010
+ e.setParent(r, f), r = e.successors(r)[0];
1011
+ }
1012
+ });
1013
+ }
1014
+ function zr(e, n, r, t) {
1015
+ var i = [], o = [], a = Math.min(n[r].low, n[t].low), u = Math.max(n[r].lim, n[t].lim), d, f;
1016
+ d = r;
1017
+ do
1018
+ d = e.parent(d), i.push(d);
1019
+ while (d && (n[d].low > a || u > n[d].lim));
1020
+ for (f = d, d = t; (d = e.parent(d)) !== f; )
1021
+ o.push(d);
1022
+ return { path: i.concat(o.reverse()), lca: f };
1023
+ }
1024
+ function Xr(e) {
1025
+ var n = {}, r = 0;
1026
+ function t(i) {
1027
+ var o = r;
1028
+ s(e.children(i), t), n[i] = { low: o, lim: r++ };
1029
+ }
1030
+ return s(e.children(), t), n;
1031
+ }
1032
+ function Hr(e, n) {
1033
+ var r = {};
1034
+ function t(i, o) {
1035
+ var a = 0, u = 0, d = i.length, f = F(o);
1036
+ return s(o, function(c, l) {
1037
+ var h = Jr(e, c), v = h ? e.node(h).order : d;
1038
+ (h || c === f) && (s(o.slice(u, l + 1), function(p) {
1039
+ s(e.predecessors(p), function(b) {
1040
+ var L = e.node(b), ne = L.order;
1041
+ (ne < a || v < ne) && !(L.dummy && e.node(p).dummy) && Ve(r, b, p);
1042
+ });
1043
+ }), u = l + 1, a = v);
1044
+ }), o;
1045
+ }
1046
+ return B(n, t), r;
1047
+ }
1048
+ function Ur(e, n) {
1049
+ var r = {};
1050
+ function t(o, a, u, d, f) {
1051
+ var c;
1052
+ s(k(a, u), function(l) {
1053
+ c = o[l], e.node(c).dummy && s(e.predecessors(c), function(h) {
1054
+ var v = e.node(h);
1055
+ v.dummy && (v.order < d || v.order > f) && Ve(r, h, c);
1056
+ });
1057
+ });
1058
+ }
1059
+ function i(o, a) {
1060
+ var u = -1, d, f = 0;
1061
+ return s(a, function(c, l) {
1062
+ if (e.node(c).dummy === "border") {
1063
+ var h = e.predecessors(c);
1064
+ h.length && (d = e.node(h[0]).order, t(a, f, l, u, d), f = l, u = d);
1065
+ }
1066
+ t(a, f, a.length, d, o.length);
1067
+ }), a;
1068
+ }
1069
+ return B(n, i), r;
1070
+ }
1071
+ function Jr(e, n) {
1072
+ if (e.node(n).dummy)
1073
+ return U(e.predecessors(n), function(r) {
1074
+ return e.node(r).dummy;
1075
+ });
1076
+ }
1077
+ function Ve(e, n, r) {
1078
+ if (n > r) {
1079
+ var t = n;
1080
+ n = r, r = t;
1081
+ }
1082
+ Object.prototype.hasOwnProperty.call(e, n) || Object.defineProperty(e, n, {
1083
+ enumerable: !0,
1084
+ configurable: !0,
1085
+ value: {},
1086
+ writable: !0
1087
+ });
1088
+ var i = e[n];
1089
+ Object.defineProperty(i, r, {
1090
+ enumerable: !0,
1091
+ configurable: !0,
1092
+ value: !0,
1093
+ writable: !0
1094
+ });
1095
+ }
1096
+ function Kr(e, n, r) {
1097
+ if (n > r) {
1098
+ var t = n;
1099
+ n = r, r = t;
1100
+ }
1101
+ return !!e[n] && Object.prototype.hasOwnProperty.call(e[n], r);
1102
+ }
1103
+ function Zr(e, n, r, t) {
1104
+ var i = {}, o = {}, a = {};
1105
+ return s(n, function(u) {
1106
+ s(u, function(d, f) {
1107
+ i[d] = d, o[d] = d, a[d] = f;
1108
+ });
1109
+ }), s(n, function(u) {
1110
+ var d = -1;
1111
+ s(u, function(f) {
1112
+ var c = t(f);
1113
+ if (c.length) {
1114
+ c = R(c, function(b) {
1115
+ return a[b];
1116
+ });
1117
+ for (var l = (c.length - 1) / 2, h = Math.floor(l), v = Math.ceil(l); h <= v; ++h) {
1118
+ var p = c[h];
1119
+ o[f] === f && d < a[p] && !Kr(r, f, p) && (o[p] = f, o[f] = i[f] = i[p], d = a[p]);
1120
+ }
1121
+ }
1122
+ });
1123
+ }), { root: i, align: o };
1124
+ }
1125
+ function Qr(e, n, r, t, i) {
1126
+ var o = {}, a = et(e, n, r, i), u = i ? "borderLeft" : "borderRight";
1127
+ function d(l, h) {
1128
+ for (var v = a.nodes(), p = v.pop(), b = {}; p; )
1129
+ b[p] ? l(p) : (b[p] = !0, v.push(p), v = v.concat(h(p))), p = v.pop();
1130
+ }
1131
+ function f(l) {
1132
+ o[l] = a.inEdges(l).reduce(function(h, v) {
1133
+ return Math.max(h, o[v.v] + a.edge(v));
1134
+ }, 0);
1135
+ }
1136
+ function c(l) {
1137
+ var h = a.outEdges(l).reduce(function(p, b) {
1138
+ return Math.min(p, o[b.w] - a.edge(b));
1139
+ }, Number.POSITIVE_INFINITY), v = e.node(l);
1140
+ h !== Number.POSITIVE_INFINITY && v.borderType !== u && (o[l] = Math.max(o[l], h));
1141
+ }
1142
+ return d(f, a.predecessors.bind(a)), d(c, a.successors.bind(a)), s(t, function(l) {
1143
+ o[l] = o[r[l]];
1144
+ }), o;
1145
+ }
1146
+ function et(e, n, r, t) {
1147
+ var i = new g(), o = e.graph(), a = at(o.nodesep, o.edgesep, t);
1148
+ return s(n, function(u) {
1149
+ var d;
1150
+ s(u, function(f) {
1151
+ var c = r[f];
1152
+ if (i.setNode(c), d) {
1153
+ var l = r[d], h = i.edge(l, c);
1154
+ i.setEdge(l, c, Math.max(a(e, f, d), h || 0));
1155
+ }
1156
+ d = f;
1157
+ });
1158
+ }), i;
1159
+ }
1160
+ function nt(e, n) {
1161
+ return J(E(n), function(r) {
1162
+ var t = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY;
1163
+ return Ln(r, function(o, a) {
1164
+ var u = ot(e, a) / 2;
1165
+ t = Math.max(o + u, t), i = Math.min(o - u, i);
1166
+ }), t - i;
1167
+ });
1168
+ }
1169
+ function rt(e, n) {
1170
+ var r = E(n), t = P(r), i = y(r);
1171
+ s(["u", "d"], function(o) {
1172
+ s(["l", "r"], function(a) {
1173
+ var u = o + a, d = e[u], f;
1174
+ if (d !== n) {
1175
+ var c = E(d);
1176
+ f = a === "l" ? t - P(c) : i - y(c), f && (e[u] = j(d, function(l) {
1177
+ return l + f;
1178
+ }));
1179
+ }
1180
+ });
1181
+ });
1182
+ }
1183
+ function tt(e, n) {
1184
+ return j(e.ul, function(r, t) {
1185
+ if (n)
1186
+ return e[n.toLowerCase()][t];
1187
+ var i = R(w(e, t));
1188
+ return (i[1] + i[2]) / 2;
1189
+ });
1190
+ }
1191
+ function it(e) {
1192
+ var n = V(e), r = X(Hr(e, n), Ur(e, n)), t = {}, i;
1193
+ s(["u", "d"], function(a) {
1194
+ i = a === "u" ? n : E(n).reverse(), s(["l", "r"], function(u) {
1195
+ u === "r" && (i = w(i, function(l) {
1196
+ return E(l).reverse();
1197
+ }));
1198
+ var d = (a === "u" ? e.predecessors : e.successors).bind(e), f = Zr(e, i, r, d), c = Qr(e, i, f.root, f.align, u === "r");
1199
+ u === "r" && (c = j(c, function(l) {
1200
+ return -l;
1201
+ })), t[a + u] = c;
1202
+ });
1203
+ });
1204
+ var o = nt(e, t);
1205
+ return rt(t, o), tt(t, e.graph().align);
1206
+ }
1207
+ function at(e, n, r) {
1208
+ return function(t, i, o) {
1209
+ var a = t.node(i), u = t.node(o), d = 0, f;
1210
+ if (d += a.width / 2, Object.prototype.hasOwnProperty.call(a, "labelpos"))
1211
+ switch (a.labelpos.toLowerCase()) {
1212
+ case "l":
1213
+ f = -a.width / 2;
1214
+ break;
1215
+ case "r":
1216
+ f = a.width / 2;
1217
+ break;
1218
+ }
1219
+ if (f && (d += r ? f : -f), f = 0, d += (a.dummy ? n : e) / 2, d += (u.dummy ? n : e) / 2, d += u.width / 2, Object.prototype.hasOwnProperty.call(u, "labelpos"))
1220
+ switch (u.labelpos.toLowerCase()) {
1221
+ case "l":
1222
+ f = u.width / 2;
1223
+ break;
1224
+ case "r":
1225
+ f = -u.width / 2;
1226
+ break;
1227
+ }
1228
+ return f && (d += r ? f : -f), f = 0, d;
1229
+ };
1230
+ }
1231
+ function ot(e, n) {
1232
+ return e.node(n).width;
1233
+ }
1234
+ function ut(e) {
1235
+ e = Le(e), dt(e), Pn(it(e), function(n, r) {
1236
+ e.node(r).x = n;
1237
+ });
1238
+ }
1239
+ function dt(e) {
1240
+ var n = V(e), r = e.graph().ranksep, t = 0;
1241
+ s(n, function(i) {
1242
+ var o = y(
1243
+ w(i, function(a) {
1244
+ return e.node(a).height;
1245
+ })
1246
+ );
1247
+ s(i, function(a) {
1248
+ e.node(a).y = t + o / 2;
1249
+ }), t += o + r;
1250
+ });
1251
+ }
1252
+ function At(e, n) {
1253
+ var r = ar;
1254
+ r("layout", () => {
1255
+ var t = r(" buildLayoutGraph", () => gt(e));
1256
+ r(" runLayout", () => ft(t, r)), r(" updateInputGraph", () => st(e, t));
1257
+ });
1258
+ }
1259
+ function ft(e, n) {
1260
+ n(" makeSpaceForEdgeLabels", () => yt(e)), n(" removeSelfEdges", () => It(e)), n(" acyclic", () => Zn(e)), n(" nestingGraph.run", () => Nr(e)), n(" rank", () => Er(Le(e))), n(" injectEdgeLabelProxies", () => xt(e)), n(" removeEmptyRanks", () => tr(e)), n(" nestingGraph.cleanup", () => _r(e)), n(" normalizeRanks", () => rr(e)), n(" assignRankMinMax", () => Et(e)), n(" removeEdgeLabelProxies", () => kt(e)), n(" normalize.run", () => cr(e)), n(" parentDummyChains", () => Wr(e)), n(" addBorderSegments", () => or(e)), n(" order", () => Dr(e)), n(" insertSelfEdges", () => Ct(e)), n(" adjustCoordinateSystem", () => ur(e)), n(" position", () => ut(e)), n(" positionSelfEdges", () => Rt(e)), n(" removeBorderNodes", () => _t(e)), n(" normalize.undo", () => hr(e)), n(" fixupEdgeLabelCoords", () => Lt(e)), n(" undoCoordinateSystem", () => dr(e)), n(" translateGraph", () => Ot(e)), n(" assignNodeIntersects", () => Nt(e)), n(" reversePoints", () => Pt(e)), n(" acyclic.undo", () => er(e));
1261
+ }
1262
+ function st(e, n) {
1263
+ s(e.nodes(), function(r) {
1264
+ var t = e.node(r), i = n.node(r);
1265
+ t && (t.x = i.x, t.y = i.y, n.children(r).length && (t.width = i.width, t.height = i.height));
1266
+ }), s(e.edges(), function(r) {
1267
+ var t = e.edge(r), i = n.edge(r);
1268
+ t.points = i.points, Object.prototype.hasOwnProperty.call(i, "x") && (t.x = i.x, t.y = i.y);
1269
+ }), e.graph().width = n.graph().width, e.graph().height = n.graph().height;
1270
+ }
1271
+ var ct = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], lt = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, ht = ["acyclicer", "ranker", "rankdir", "align"], vt = ["width", "height"], pt = { width: 0, height: 0 }, wt = ["minlen", "weight", "width", "height", "labeloffset"], bt = {
1272
+ minlen: 1,
1273
+ weight: 1,
1274
+ width: 0,
1275
+ height: 0,
1276
+ labeloffset: 10,
1277
+ labelpos: "r"
1278
+ }, mt = ["labelpos"];
1279
+ function gt(e) {
1280
+ var n = new g({ multigraph: !0, compound: !0 }), r = W(e.graph());
1281
+ return n.setGraph(
1282
+ X({}, lt, q(r, ct), A(r, ht))
1283
+ ), s(e.nodes(), function(t) {
1284
+ var i = W(e.node(t));
1285
+ n.setNode(t, En(q(i, vt), pt)), n.setParent(t, e.parent(t));
1286
+ }), s(e.edges(), function(t) {
1287
+ var i = W(e.edge(t));
1288
+ n.setEdge(
1289
+ t,
1290
+ X({}, bt, q(i, wt), A(i, mt))
1291
+ );
1292
+ }), n;
1293
+ }
1294
+ function yt(e) {
1295
+ var n = e.graph();
1296
+ n.ranksep /= 2, s(e.edges(), function(r) {
1297
+ var t = e.edge(r);
1298
+ t.minlen *= 2, t.labelpos.toLowerCase() !== "c" && (n.rankdir === "TB" || n.rankdir === "BT" ? t.width += t.labeloffset : t.height += t.labeloffset);
1299
+ });
1300
+ }
1301
+ function xt(e) {
1302
+ s(e.edges(), function(n) {
1303
+ var r = e.edge(n);
1304
+ if (r.width && r.height) {
1305
+ var t = e.node(n.v), i = e.node(n.w), o = { rank: (i.rank - t.rank) / 2 + t.rank, e: n };
1306
+ N(e, "edge-proxy", o, "_ep");
1307
+ }
1308
+ });
1309
+ }
1310
+ function Et(e) {
1311
+ var n = 0;
1312
+ s(e.nodes(), function(r) {
1313
+ var t = e.node(r);
1314
+ t.borderTop && (t.minRank = e.node(t.borderTop).rank, t.maxRank = e.node(t.borderBottom).rank, n = y(n));
1315
+ }), e.graph().maxRank = n;
1316
+ }
1317
+ function kt(e) {
1318
+ s(e.nodes(), function(n) {
1319
+ var r = e.node(n);
1320
+ r.dummy === "edge-proxy" && (e.edge(r.e).labelRank = r.rank, e.removeNode(n));
1321
+ });
1322
+ }
1323
+ function Ot(e) {
1324
+ var n = Number.POSITIVE_INFINITY, r = 0, t = Number.POSITIVE_INFINITY, i = 0, o = e.graph(), a = o.marginx || 0, u = o.marginy || 0;
1325
+ function d(f) {
1326
+ var c = f.x, l = f.y, h = f.width, v = f.height;
1327
+ n = Math.min(n, c - h / 2), r = Math.max(r, c + h / 2), t = Math.min(t, l - v / 2), i = Math.max(i, l + v / 2);
1328
+ }
1329
+ s(e.nodes(), function(f) {
1330
+ d(e.node(f));
1331
+ }), s(e.edges(), function(f) {
1332
+ var c = e.edge(f);
1333
+ Object.prototype.hasOwnProperty.call(c, "x") && d(c);
1334
+ }), n -= a, t -= u, s(e.nodes(), function(f) {
1335
+ var c = e.node(f);
1336
+ c.x -= n, c.y -= t;
1337
+ }), s(e.edges(), function(f) {
1338
+ var c = e.edge(f);
1339
+ s(c.points, function(l) {
1340
+ l.x -= n, l.y -= t;
1341
+ }), Object.prototype.hasOwnProperty.call(c, "x") && (c.x -= n), Object.prototype.hasOwnProperty.call(c, "y") && (c.y -= t);
1342
+ }), o.width = r - n + a, o.height = i - t + u;
1343
+ }
1344
+ function Nt(e) {
1345
+ s(e.edges(), function(n) {
1346
+ var r = e.edge(n), t = e.node(n.v), i = e.node(n.w), o, a;
1347
+ r.points ? (o = r.points[0], a = r.points[r.points.length - 1]) : (r.points = [], o = i, a = t), r.points.unshift(ae(t, o)), r.points.push(ae(i, a));
1348
+ });
1349
+ }
1350
+ function Lt(e) {
1351
+ s(e.edges(), function(n) {
1352
+ var r = e.edge(n);
1353
+ if (Object.prototype.hasOwnProperty.call(r, "x"))
1354
+ switch ((r.labelpos === "l" || r.labelpos === "r") && (r.width -= r.labeloffset), r.labelpos) {
1355
+ case "l":
1356
+ r.x -= r.width / 2 + r.labeloffset;
1357
+ break;
1358
+ case "r":
1359
+ r.x += r.width / 2 + r.labeloffset;
1360
+ break;
1361
+ }
1362
+ });
1363
+ }
1364
+ function Pt(e) {
1365
+ s(e.edges(), function(n) {
1366
+ var r = e.edge(n);
1367
+ r.reversed && r.points.reverse();
1368
+ });
1369
+ }
1370
+ function _t(e) {
1371
+ s(e.nodes(), function(n) {
1372
+ if (e.children(n).length) {
1373
+ var r = e.node(n), t = e.node(r.borderTop), i = e.node(r.borderBottom), o = e.node(F(r.borderLeft)), a = e.node(F(r.borderRight));
1374
+ r.width = Math.abs(a.x - o.x), r.height = Math.abs(i.y - t.y), r.x = o.x + r.width / 2, r.y = t.y + r.height / 2;
1375
+ }
1376
+ }), s(e.nodes(), function(n) {
1377
+ e.node(n).dummy === "border" && e.removeNode(n);
1378
+ });
1379
+ }
1380
+ function It(e) {
1381
+ s(e.edges(), function(n) {
1382
+ if (n.v === n.w) {
1383
+ var r = e.node(n.v);
1384
+ r.selfEdges || (r.selfEdges = []), r.selfEdges.push({ e: n, label: e.edge(n) }), e.removeEdge(n);
1385
+ }
1386
+ });
1387
+ }
1388
+ function Ct(e) {
1389
+ var n = V(e);
1390
+ s(n, function(r) {
1391
+ var t = 0;
1392
+ s(r, function(i, o) {
1393
+ var a = e.node(i);
1394
+ a.order = o + t, s(a.selfEdges, function(u) {
1395
+ N(
1396
+ e,
1397
+ "selfedge",
1398
+ {
1399
+ width: u.label.width,
1400
+ height: u.label.height,
1401
+ rank: a.rank,
1402
+ order: o + ++t,
1403
+ e: u.e,
1404
+ label: u.label
1405
+ },
1406
+ "_se"
1407
+ );
1408
+ }), delete a.selfEdges;
1409
+ });
1410
+ });
1411
+ }
1412
+ function Rt(e) {
1413
+ s(e.nodes(), function(n) {
1414
+ var r = e.node(n);
1415
+ if (r.dummy === "selfedge") {
1416
+ var t = e.node(r.e.v), i = t.x + t.width / 2, o = t.y, a = r.x - i, u = t.height / 2;
1417
+ e.setEdge(r.e, r.label), e.removeNode(n), r.label.points = [
1418
+ { x: i + 2 * a / 3, y: o - u },
1419
+ { x: i + 5 * a / 6, y: o - u },
1420
+ { x: i + a, y: o },
1421
+ { x: i + 5 * a / 6, y: o + u },
1422
+ { x: i + 2 * a / 3, y: o + u }
1423
+ ], r.label.x = r.x, r.label.y = r.y;
1424
+ }
1425
+ });
1426
+ }
1427
+ function q(e, n) {
1428
+ return j(A(e, n), Number);
1429
+ }
1430
+ function W(e) {
1431
+ var n = {};
1432
+ return s(e, function(r, t) {
1433
+ n[t.toLowerCase()] = r;
1434
+ }), n;
1435
+ }
1436
+ export {
1437
+ At as layout
1438
+ };