@dpuse/dpuse-tool-d3-visualiser 0.0.33 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +660 -201
- package/dist/{band-DbExrcif.js → band-C1twWuW2.js} +3 -2
- package/dist/{band-DbExrcif.js.map → band-C1twWuW2.js.map} +1 -1
- package/dist/{billboardJs-jmaH9Gag.js → billboardJs-DS82ViEw.js} +1081 -1747
- package/dist/billboardJs-DS82ViEw.js.map +1 -0
- package/dist/chordDiagram-Cz0sVVgD.js +2911 -0
- package/dist/chordDiagram-Cz0sVVgD.js.map +1 -0
- package/dist/{d3BarChart-DEzayAyh.js → d3BarChart-DIN2KQsU.js} +7 -6
- package/dist/{d3BarChart-DEzayAyh.js.map → d3BarChart-DIN2KQsU.js.map} +1 -1
- package/dist/dpuse-tool-d3-visualiser.es.js +17 -7
- package/dist/dpuse-tool-d3-visualiser.es.js.map +1 -1
- package/dist/{drag-DLokvdmv.js → drag-DfL4uwqz.js} +25 -24
- package/dist/{drag-DLokvdmv.js.map → drag-DfL4uwqz.js.map} +1 -1
- package/dist/hierarchy-CDFAetye.js +151 -0
- package/dist/hierarchy-CDFAetye.js.map +1 -0
- package/dist/{linear-D3BD7E1p.js → linear-BnhqTvdX.js} +59 -85
- package/dist/linear-BnhqTvdX.js.map +1 -0
- package/dist/{link-DKK0Q0lG.js → link-D-9z7kEr.js} +16 -39
- package/dist/link-D-9z7kEr.js.map +1 -0
- package/dist/math-C5EhTgJw.js +12 -0
- package/dist/math-C5EhTgJw.js.map +1 -0
- package/dist/max-CPVNm4tn.js +14 -0
- package/dist/max-CPVNm4tn.js.map +1 -0
- package/dist/{networkDiagram-HS-SgOZ0.js → networkDiagram-yraPhqxN.js} +28 -28
- package/dist/{networkDiagram-HS-SgOZ0.js.map → networkDiagram-yraPhqxN.js.map} +1 -1
- package/dist/nodrag-Dq2tlBbe.js +51 -0
- package/dist/nodrag-Dq2tlBbe.js.map +1 -0
- package/dist/{observablePlot-B1CSEvcU.js → observablePlot-C7764aFq.js} +2366 -2417
- package/dist/observablePlot-C7764aFq.js.map +1 -0
- package/dist/ordinal-uZdoVxAx.js +30 -0
- package/dist/ordinal-uZdoVxAx.js.map +1 -0
- package/dist/palette-BuTjISrV.js +64 -0
- package/dist/palette-BuTjISrV.js.map +1 -0
- package/dist/{path-Bt1sPr2f.js → path-6kmCrmEz.js} +7 -4
- package/dist/{path-Bt1sPr2f.js.map → path-6kmCrmEz.js.map} +1 -1
- package/dist/point-6cHftmvM.js +27 -0
- package/dist/point-6cHftmvM.js.map +1 -0
- package/dist/pow-BFDPqS3s.js +86 -0
- package/dist/pow-BFDPqS3s.js.map +1 -0
- package/dist/{sankeyDiagram-BXTYCHPV.js → sankeyDiagram-BT2RCRpi.js} +93 -152
- package/dist/sankeyDiagram-BT2RCRpi.js.map +1 -0
- package/dist/{src-Br_t1-IV.js → src-WDualLFV.js} +40 -39
- package/dist/{src-Br_t1-IV.js.map → src-WDualLFV.js.map} +1 -1
- package/dist/{math-Dc0ICuib.js → src-Xlr4CcSw.js} +70 -75
- package/dist/src-Xlr4CcSw.js.map +1 -0
- package/dist/{src-Du_hPZAX.js → src-yL3ZdoR1.js} +235 -282
- package/dist/src-yL3ZdoR1.js.map +1 -0
- package/dist/step-DgCcZZ3W.js +670 -0
- package/dist/step-DgCcZZ3W.js.map +1 -0
- package/dist/{sum-BAZU479z.js → sum-CNP0Xric.js} +4 -15
- package/dist/sum-CNP0Xric.js.map +1 -0
- package/dist/{tanStackCharts-vvQteV9z.js → tanStackCharts-BJAX22lS.js} +164 -151
- package/dist/tanStackCharts-BJAX22lS.js.map +1 -0
- package/dist/treeDiagram-DsHUD8ou.js +130 -0
- package/dist/treeDiagram-DsHUD8ou.js.map +1 -0
- package/dist/types/src/chordDiagram.d.ts +25 -0
- package/dist/types/src/index.d.ts +3 -0
- package/package.json +6 -4
- package/dist/billboardJs-jmaH9Gag.js.map +0 -1
- package/dist/linear-D3BD7E1p.js.map +0 -1
- package/dist/link-DKK0Q0lG.js.map +0 -1
- package/dist/math-Dc0ICuib.js.map +0 -1
- package/dist/observablePlot-B1CSEvcU.js.map +0 -1
- package/dist/sankeyDiagram-BXTYCHPV.js.map +0 -1
- package/dist/src-Du_hPZAX.js.map +0 -1
- package/dist/sum-BAZU479z.js.map +0 -1
- package/dist/tanStackCharts-vvQteV9z.js.map +0 -1
- package/dist/treeDiagram-DemHfVnX.js +0 -277
- package/dist/treeDiagram-DemHfVnX.js.map +0 -1
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./select-BIuoFcZG.js";
|
|
2
|
-
import { t } from "./link-DKK0Q0lG.js";
|
|
3
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/count.js
|
|
4
|
-
function n(e) {
|
|
5
|
-
var t = 0, n = e.children, r = n && n.length;
|
|
6
|
-
if (!r) t = 1;
|
|
7
|
-
else for (; --r >= 0;) t += n[r].value;
|
|
8
|
-
e.value = t;
|
|
9
|
-
}
|
|
10
|
-
function r() {
|
|
11
|
-
return this.eachAfter(n);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/each.js
|
|
15
|
-
function i(e, t) {
|
|
16
|
-
let n = -1;
|
|
17
|
-
for (let r of this) e.call(t, r, ++n, this);
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
|
|
22
|
-
function a(e, t) {
|
|
23
|
-
for (var n = this, r = [n], i, a, o = -1; n = r.pop();) if (e.call(t, n, ++o, this), i = n.children) for (a = i.length - 1; a >= 0; --a) r.push(i[a]);
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
|
|
28
|
-
function o(e, t) {
|
|
29
|
-
for (var n = this, r = [n], i = [], a, o, s, c = -1; n = r.pop();) if (i.push(n), a = n.children) for (o = 0, s = a.length; o < s; ++o) r.push(a[o]);
|
|
30
|
-
for (; n = i.pop();) e.call(t, n, ++c, this);
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/find.js
|
|
35
|
-
function s(e, t) {
|
|
36
|
-
let n = -1;
|
|
37
|
-
for (let r of this) if (e.call(t, r, ++n, this)) return r;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/sum.js
|
|
41
|
-
function c(e) {
|
|
42
|
-
return this.eachAfter(function(t) {
|
|
43
|
-
for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
|
|
44
|
-
t.value = n;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/sort.js
|
|
49
|
-
function l(e) {
|
|
50
|
-
return this.eachBefore(function(t) {
|
|
51
|
-
t.children && t.children.sort(e);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/path.js
|
|
56
|
-
function u(e) {
|
|
57
|
-
for (var t = this, n = d(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
|
|
58
|
-
for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
|
|
59
|
-
return r;
|
|
60
|
-
}
|
|
61
|
-
function d(e, t) {
|
|
62
|
-
if (e === t) return e;
|
|
63
|
-
var n = e.ancestors(), r = t.ancestors(), i = null;
|
|
64
|
-
for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
|
|
65
|
-
return i;
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/ancestors.js
|
|
69
|
-
function f() {
|
|
70
|
-
for (var e = this, t = [e]; e = e.parent;) t.push(e);
|
|
71
|
-
return t;
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/descendants.js
|
|
75
|
-
function p() {
|
|
76
|
-
return Array.from(this);
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/leaves.js
|
|
80
|
-
function m() {
|
|
81
|
-
var e = [];
|
|
82
|
-
return this.eachBefore(function(t) {
|
|
83
|
-
t.children || e.push(t);
|
|
84
|
-
}), e;
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/links.js
|
|
88
|
-
function h() {
|
|
89
|
-
var e = this, t = [];
|
|
90
|
-
return e.each(function(n) {
|
|
91
|
-
n !== e && t.push({
|
|
92
|
-
source: n.parent,
|
|
93
|
-
target: n
|
|
94
|
-
});
|
|
95
|
-
}), t;
|
|
96
|
-
}
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/iterator.js
|
|
99
|
-
function* g() {
|
|
100
|
-
var e = this, t, n = [e], r, i, a;
|
|
101
|
-
do
|
|
102
|
-
for (t = n.reverse(), n = []; e = t.pop();) if (yield e, r = e.children) for (i = 0, a = r.length; i < a; ++i) n.push(r[i]);
|
|
103
|
-
while (n.length);
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region node_modules/d3-hierarchy/src/hierarchy/index.js
|
|
107
|
-
function _(e, t) {
|
|
108
|
-
e instanceof Map ? (e = [void 0, e], t === void 0 && (t = b)) : t === void 0 && (t = y);
|
|
109
|
-
for (var n = new C(e), r, i = [n], a, o, s, c; r = i.pop();) if ((o = t(r.data)) && (c = (o = Array.from(o)).length)) for (r.children = o, s = c - 1; s >= 0; --s) i.push(a = o[s] = new C(o[s])), a.parent = r, a.depth = r.depth + 1;
|
|
110
|
-
return n.eachBefore(S);
|
|
111
|
-
}
|
|
112
|
-
function v() {
|
|
113
|
-
return _(this).eachBefore(x);
|
|
114
|
-
}
|
|
115
|
-
function y(e) {
|
|
116
|
-
return e.children;
|
|
117
|
-
}
|
|
118
|
-
function b(e) {
|
|
119
|
-
return Array.isArray(e) ? e[1] : null;
|
|
120
|
-
}
|
|
121
|
-
function x(e) {
|
|
122
|
-
e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
|
|
123
|
-
}
|
|
124
|
-
function S(e) {
|
|
125
|
-
var t = 0;
|
|
126
|
-
do
|
|
127
|
-
e.height = t;
|
|
128
|
-
while ((e = e.parent) && e.height < ++t);
|
|
129
|
-
}
|
|
130
|
-
function C(e) {
|
|
131
|
-
this.data = e, this.depth = this.height = 0, this.parent = null;
|
|
132
|
-
}
|
|
133
|
-
C.prototype = _.prototype = {
|
|
134
|
-
constructor: C,
|
|
135
|
-
count: r,
|
|
136
|
-
each: i,
|
|
137
|
-
eachAfter: o,
|
|
138
|
-
eachBefore: a,
|
|
139
|
-
find: s,
|
|
140
|
-
sum: c,
|
|
141
|
-
sort: l,
|
|
142
|
-
path: u,
|
|
143
|
-
ancestors: f,
|
|
144
|
-
descendants: p,
|
|
145
|
-
leaves: m,
|
|
146
|
-
links: h,
|
|
147
|
-
copy: v,
|
|
148
|
-
[Symbol.iterator]: g
|
|
149
|
-
};
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region node_modules/d3-hierarchy/src/tree.js
|
|
152
|
-
function w(e, t) {
|
|
153
|
-
return e.parent === t.parent ? 1 : 2;
|
|
154
|
-
}
|
|
155
|
-
function T(e) {
|
|
156
|
-
var t = e.children;
|
|
157
|
-
return t ? t[0] : e.t;
|
|
158
|
-
}
|
|
159
|
-
function E(e) {
|
|
160
|
-
var t = e.children;
|
|
161
|
-
return t ? t[t.length - 1] : e.t;
|
|
162
|
-
}
|
|
163
|
-
function D(e, t, n) {
|
|
164
|
-
var r = n / (t.i - e.i);
|
|
165
|
-
t.c -= r, t.s += n, e.c += r, t.z += n, t.m += n;
|
|
166
|
-
}
|
|
167
|
-
function O(e) {
|
|
168
|
-
for (var t = 0, n = 0, r = e.children, i = r.length, a; --i >= 0;) a = r[i], a.z += t, a.m += t, t += a.s + (n += a.c);
|
|
169
|
-
}
|
|
170
|
-
function k(e, t, n) {
|
|
171
|
-
return e.a.parent === t.parent ? e.a : n;
|
|
172
|
-
}
|
|
173
|
-
function A(e, t) {
|
|
174
|
-
this._ = e, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = t;
|
|
175
|
-
}
|
|
176
|
-
A.prototype = Object.create(C.prototype);
|
|
177
|
-
function j(e) {
|
|
178
|
-
for (var t = new A(e, 0), n, r = [t], i, a, o, s; n = r.pop();) if (a = n._.children) for (n.children = Array(s = a.length), o = s - 1; o >= 0; --o) r.push(i = n.children[o] = new A(a[o], o)), i.parent = n;
|
|
179
|
-
return (t.parent = new A(null, 0)).children = [t], t;
|
|
180
|
-
}
|
|
181
|
-
function M() {
|
|
182
|
-
var e = w, t = 1, n = 1, r = null;
|
|
183
|
-
function i(i) {
|
|
184
|
-
var s = j(i);
|
|
185
|
-
if (s.eachAfter(a), s.parent.m = -s.z, s.eachBefore(o), r) i.eachBefore(c);
|
|
186
|
-
else {
|
|
187
|
-
var l = i, u = i, d = i;
|
|
188
|
-
i.eachBefore(function(e) {
|
|
189
|
-
e.x < l.x && (l = e), e.x > u.x && (u = e), e.depth > d.depth && (d = e);
|
|
190
|
-
});
|
|
191
|
-
var f = l === u ? 1 : e(l, u) / 2, p = f - l.x, m = t / (u.x + f + p), h = n / (d.depth || 1);
|
|
192
|
-
i.eachBefore(function(e) {
|
|
193
|
-
e.x = (e.x + p) * m, e.y = e.depth * h;
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
return i;
|
|
197
|
-
}
|
|
198
|
-
function a(t) {
|
|
199
|
-
var n = t.children, r = t.parent.children, i = t.i ? r[t.i - 1] : null;
|
|
200
|
-
if (n) {
|
|
201
|
-
O(t);
|
|
202
|
-
var a = (n[0].z + n[n.length - 1].z) / 2;
|
|
203
|
-
i ? (t.z = i.z + e(t._, i._), t.m = t.z - a) : t.z = a;
|
|
204
|
-
} else i && (t.z = i.z + e(t._, i._));
|
|
205
|
-
t.parent.A = s(t, i, t.parent.A || r[0]);
|
|
206
|
-
}
|
|
207
|
-
function o(e) {
|
|
208
|
-
e._.x = e.z + e.parent.m, e.m += e.parent.m;
|
|
209
|
-
}
|
|
210
|
-
function s(t, n, r) {
|
|
211
|
-
if (n) {
|
|
212
|
-
for (var i = t, a = t, o = n, s = i.parent.children[0], c = i.m, l = a.m, u = o.m, d = s.m, f; o = E(o), i = T(i), o && i;) s = T(s), a = E(a), a.a = t, f = o.z + u - i.z - c + e(o._, i._), f > 0 && (D(k(o, t, r), t, f), c += f, l += f), u += o.m, c += i.m, d += s.m, l += a.m;
|
|
213
|
-
o && !E(a) && (a.t = o, a.m += u - l), i && !T(s) && (s.t = i, s.m += c - d, r = t);
|
|
214
|
-
}
|
|
215
|
-
return r;
|
|
216
|
-
}
|
|
217
|
-
function c(e) {
|
|
218
|
-
e.x *= t, e.y = e.depth * n;
|
|
219
|
-
}
|
|
220
|
-
return i.separation = function(t) {
|
|
221
|
-
return arguments.length ? (e = t, i) : e;
|
|
222
|
-
}, i.size = function(e) {
|
|
223
|
-
return arguments.length ? (r = !1, t = +e[0], n = +e[1], i) : r ? null : [t, n];
|
|
224
|
-
}, i.nodeSize = function(e) {
|
|
225
|
-
return arguments.length ? (r = !0, t = +e[0], n = +e[1], i) : r ? [t, n] : null;
|
|
226
|
-
}, i;
|
|
227
|
-
}
|
|
228
|
-
//#endregion
|
|
229
|
-
//#region src/treeDiagram.ts
|
|
230
|
-
var N = 140, P = 40, F = 24, I = 50, L = 8, R = {
|
|
231
|
-
branch: {
|
|
232
|
-
fill: "#ffe6cc",
|
|
233
|
-
stroke: "#d79b00"
|
|
234
|
-
},
|
|
235
|
-
leaf: {
|
|
236
|
-
fill: "#dae8fc",
|
|
237
|
-
stroke: "#6c8ebf"
|
|
238
|
-
},
|
|
239
|
-
root: {
|
|
240
|
-
fill: "#d5e8d4",
|
|
241
|
-
stroke: "#82b366"
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
function z(n, r, i = {}) {
|
|
245
|
-
let a = i.nodeWidth ?? N, o = i.nodeHeight ?? P, s = i.siblingGap ?? F, c = i.levelGap ?? I, l = i.padding ?? L, u = i.nodeColors ?? R;
|
|
246
|
-
function d(e) {
|
|
247
|
-
return e.depth === 0 ? "root" : e.children ? "branch" : "leaf";
|
|
248
|
-
}
|
|
249
|
-
function f() {
|
|
250
|
-
e(r).selectAll("svg").remove();
|
|
251
|
-
let i = _(n, (e) => e.children), f = M().nodeSize([o + s, a + c]).separation(() => 1)(i);
|
|
252
|
-
f.eachAfter((e) => {
|
|
253
|
-
let [t] = e.children ?? [];
|
|
254
|
-
t && (e.x = t.x);
|
|
255
|
-
});
|
|
256
|
-
let p = f.descendants(), m = Math.min(...p.map((e) => e.y)) - a / 2, h = Math.max(...p.map((e) => e.y)) + a / 2, g = Math.min(...p.map((e) => e.x)) - o / 2, v = Math.max(...p.map((e) => e.x)) + o / 2, y = h - m + l * 2, b = v - g + l * 2, x = e(r).append("svg").attr("viewBox", `0 0 ${String(y)} ${String(b)}`).attr("width", y).attr("height", b), S = x.append("g").attr("transform", `translate(${String(l - m)}, ${String(l - g)})`), C = t().x((e) => e.y).y((e) => e.x);
|
|
257
|
-
S.append("g").attr("fill", "none").attr("stroke", "#999999").attr("stroke-width", 1.5).selectAll("path").data(f.links()).join("path").attr("d", C);
|
|
258
|
-
let w = S.append("g").selectAll("g").data(p).join("g").attr("transform", (e) => `translate(${String(e.y - a / 2)}, ${String(e.x - o / 2)})`);
|
|
259
|
-
w.append("rect").attr("width", a).attr("height", o).attr("rx", 6).attr("fill", (e) => u[d(e)].fill).attr("stroke", (e) => u[d(e)].stroke), w.append("text").attr("x", a / 2).attr("y", o / 2).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "Helvetica, Arial, sans-serif").attr("font-size", 12).attr("fill", "#000000").text((e) => e.data.label);
|
|
260
|
-
let T = x.node();
|
|
261
|
-
if (T == null) throw Error("Failed to create tree diagram SVG element.");
|
|
262
|
-
return T;
|
|
263
|
-
}
|
|
264
|
-
let p = f();
|
|
265
|
-
return {
|
|
266
|
-
resize: () => {
|
|
267
|
-
p = f();
|
|
268
|
-
},
|
|
269
|
-
get svg() {
|
|
270
|
-
return p;
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
//#endregion
|
|
275
|
-
export { z as renderTreeDiagram };
|
|
276
|
-
|
|
277
|
-
//# sourceMappingURL=treeDiagram-DemHfVnX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"treeDiagram-DemHfVnX.js","names":["node_count","node_each","node_eachAfter","node_eachBefore","node_find","node_sum","node_sort","node_path","node_ancestors","node_descendants","node_leaves","node_links","node_iterator"],"sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/tree.js","../src/treeDiagram.ts"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","import {Node} from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n this.a = this; // ancestor\n this.z = 0; // prelim\n this.m = 0; // mod\n this.c = 0; // change\n this.s = 0; // shift\n this.t = null; // thread\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root);\n\n // Compute the layout using Buchheim et al.’s algorithm.\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk);\n\n // If a fixed node size is specified, scale x and y.\n if (nodeSize) root.eachBefore(sizeNode);\n\n // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n\n return root;\n }\n\n // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n\n // Computes all real x-coordinates by summing up the modifiers recursively.\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n\n // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function(x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n };\n\n tree.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n };\n\n return tree;\n}\n","// ── External Dependencies & Registrations\nimport { linkHorizontal } from 'd3-shape';\nimport { select } from 'd3-selection';\nimport { hierarchy, type HierarchyPointLink, type HierarchyPointNode, tree } from 'd3-hierarchy';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport type TreeDiagramNodeRoleId = 'branch' | 'leaf' | 'root';\n\nexport interface TreeDiagramNode {\n children?: TreeDiagramNode[];\n id: string;\n label: string;\n}\n\nexport interface TreeDiagramOptions {\n levelGap?: number;\n nodeColors?: Record<TreeDiagramNodeRoleId, { fill: string; stroke: string }>;\n nodeHeight?: number;\n nodeWidth?: number;\n padding?: number;\n siblingGap?: number;\n}\n\nexport interface TreeDiagramHandle {\n resize: () => void;\n svg: SVGSVGElement;\n}\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst DEFAULT_NODE_WIDTH = 140;\nconst DEFAULT_NODE_HEIGHT = 40;\nconst DEFAULT_SIBLING_GAP = 24;\nconst DEFAULT_LEVEL_GAP = 50;\nconst DEFAULT_PADDING = 8;\nconst DEFAULT_NODE_COLORS: Record<TreeDiagramNodeRoleId, { fill: string; stroke: string }> = {\n branch: { fill: '#ffe6cc', stroke: '#d79b00' },\n leaf: { fill: '#dae8fc', stroke: '#6c8ebf' },\n root: { fill: '#d5e8d4', stroke: '#82b366' }\n};\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function renderTreeDiagram(data: TreeDiagramNode, renderTo: HTMLElement, options: TreeDiagramOptions = {}): TreeDiagramHandle {\n const nodeWidth = options.nodeWidth ?? DEFAULT_NODE_WIDTH;\n const nodeHeight = options.nodeHeight ?? DEFAULT_NODE_HEIGHT;\n const siblingGap = options.siblingGap ?? DEFAULT_SIBLING_GAP;\n const levelGap = options.levelGap ?? DEFAULT_LEVEL_GAP;\n const padding = options.padding ?? DEFAULT_PADDING;\n const nodeColors = options.nodeColors ?? DEFAULT_NODE_COLORS;\n\n function getNodeRole(node: HierarchyPointNode<TreeDiagramNode>): TreeDiagramNodeRoleId {\n if (node.depth === 0) return 'root';\n return node.children ? 'branch' : 'leaf';\n }\n\n function draw(): SVGSVGElement {\n select(renderTo).selectAll('svg').remove();\n\n const root = hierarchy(data, (node) => node.children);\n const treeLayout = tree<TreeDiagramNode>()\n .nodeSize([nodeHeight + siblingGap, nodeWidth + levelGap])\n .separation(() => 1);\n const treeRoot = treeLayout(root);\n\n // Align each parent with its first child (instead of d3's default centering over all children) so the root sits at the top and the tree cascades downward.\n treeRoot.eachAfter((node) => {\n const [firstChild] = node.children ?? [];\n if (!firstChild) return;\n node.x = firstChild.x;\n });\n\n const treeNodes = treeRoot.descendants();\n\n // Screen axes are swapped for a left-to-right tree: node.y (depth) drives horizontal position, node.x (sibling spread) drives vertical.\n const minX = Math.min(...treeNodes.map((node) => node.y)) - nodeWidth / 2;\n const maxX = Math.max(...treeNodes.map((node) => node.y)) + nodeWidth / 2;\n const minY = Math.min(...treeNodes.map((node) => node.x)) - nodeHeight / 2;\n const maxY = Math.max(...treeNodes.map((node) => node.x)) + nodeHeight / 2;\n\n const viewBoxWidth = maxX - minX + padding * 2;\n const viewBoxHeight = maxY - minY + padding * 2;\n\n const svgSelection = select(renderTo)\n .append('svg')\n .attr('viewBox', `0 0 ${String(viewBoxWidth)} ${String(viewBoxHeight)}`)\n .attr('width', viewBoxWidth)\n .attr('height', viewBoxHeight);\n\n const canvas = svgSelection.append('g').attr('transform', `translate(${String(padding - minX)}, ${String(padding - minY)})`);\n\n const linkGenerator = linkHorizontal<HierarchyPointLink<TreeDiagramNode>, HierarchyPointNode<TreeDiagramNode>>()\n .x((node) => node.y)\n .y((node) => node.x);\n\n canvas.append('g').attr('fill', 'none').attr('stroke', '#999999').attr('stroke-width', 1.5).selectAll('path').data(treeRoot.links()).join('path').attr('d', linkGenerator);\n\n const nodeGroups = canvas\n .append('g')\n .selectAll('g')\n .data(treeNodes)\n .join('g')\n .attr('transform', (node) => `translate(${String(node.y - nodeWidth / 2)}, ${String(node.x - nodeHeight / 2)})`);\n\n nodeGroups\n .append('rect')\n .attr('width', nodeWidth)\n .attr('height', nodeHeight)\n .attr('rx', 6)\n .attr('fill', (node) => nodeColors[getNodeRole(node)].fill)\n .attr('stroke', (node) => nodeColors[getNodeRole(node)].stroke);\n\n nodeGroups\n .append('text')\n .attr('x', nodeWidth / 2)\n .attr('y', nodeHeight / 2)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('font-family', 'Helvetica, Arial, sans-serif')\n .attr('font-size', 12)\n .attr('fill', '#000000')\n .text((node) => node.data.label);\n\n const svgNode = svgSelection.node();\n if (svgNode == null) throw new Error('Failed to create tree diagram SVG element.');\n return svgNode;\n }\n\n let svg = draw();\n\n return {\n resize: () => {\n svg = draw();\n },\n get svg() {\n return svg;\n }\n };\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"mappings":";;;AAAA,SAAS,EAAM,GAAM;CACnB,IAAI,IAAM,GACN,IAAW,EAAK,UAChB,IAAI,KAAY,EAAS;CAC7B,IAAI,CAAC,GAAG,IAAM;MACT,OAAO,EAAE,KAAK,IAAG,KAAO,EAAS,EAAE,CAAC;CACzC,EAAK,QAAQ;AACf;AAEA,SAAA,IAA0B;CACxB,OAAO,KAAK,UAAU,CAAK;AAC7B;;;ACXA,SAAA,EAAwB,GAAU,GAAM;CACtC,IAAI,IAAQ;CACZ,KAAK,IAAM,KAAQ,MACjB,EAAS,KAAK,GAAM,GAAM,EAAE,GAAO,IAAI;CAEzC,OAAO;AACT;;;ACN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