chartformers 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chartformers.es.js +1310 -1302
- package/dist/chartformers.umd.js +13 -13
- package/package.json +1 -6
package/dist/chartformers.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import aa, { useRef as
|
|
1
|
+
import aa, { useRef as Pt, useEffect as vt, useState as ct } from "react";
|
|
2
2
|
import { createPortal as kn } from "react-dom";
|
|
3
|
-
var
|
|
3
|
+
var Xe = { exports: {} }, Se = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -45,239 +45,239 @@ var Me = {};
|
|
|
45
45
|
var mr;
|
|
46
46
|
function oa() {
|
|
47
47
|
return mr || (mr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
48
|
-
function t(
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
51
|
-
return
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (
|
|
48
|
+
function t(m) {
|
|
49
|
+
if (m == null) return null;
|
|
50
|
+
if (typeof m == "function")
|
|
51
|
+
return m.$$typeof === C ? null : m.displayName || m.name || null;
|
|
52
|
+
if (typeof m == "string") return m;
|
|
53
|
+
switch (m) {
|
|
54
54
|
case K:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case q:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case T:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case V:
|
|
61
61
|
return "Suspense";
|
|
62
62
|
case J:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case B:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
|
-
if (typeof
|
|
68
|
-
switch (typeof
|
|
67
|
+
if (typeof m == "object")
|
|
68
|
+
switch (typeof m.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
|
-
),
|
|
71
|
-
case
|
|
70
|
+
), m.$$typeof) {
|
|
71
|
+
case j:
|
|
72
72
|
return "Portal";
|
|
73
|
+
case A:
|
|
74
|
+
return m.displayName || "Context";
|
|
73
75
|
case k:
|
|
74
|
-
return
|
|
75
|
-
case
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return
|
|
80
|
-
case F:
|
|
81
|
-
return I = y.displayName || null, I !== null ? I : t(y.type) || "Memo";
|
|
76
|
+
return (m._context.displayName || "Context") + ".Consumer";
|
|
77
|
+
case O:
|
|
78
|
+
var D = m.render;
|
|
79
|
+
return m = m.displayName, m || (m = D.displayName || D.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
|
|
80
|
+
case Z:
|
|
81
|
+
return D = m.displayName || null, D !== null ? D : t(m.type) || "Memo";
|
|
82
82
|
case W:
|
|
83
|
-
|
|
83
|
+
D = m._payload, m = m._init;
|
|
84
84
|
try {
|
|
85
|
-
return t(
|
|
85
|
+
return t(m(D));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function e(
|
|
92
|
-
return "" +
|
|
91
|
+
function e(m) {
|
|
92
|
+
return "" + m;
|
|
93
93
|
}
|
|
94
|
-
function n(
|
|
94
|
+
function n(m) {
|
|
95
95
|
try {
|
|
96
|
-
e(
|
|
97
|
-
var
|
|
96
|
+
e(m);
|
|
97
|
+
var D = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
D = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var P =
|
|
101
|
+
if (D) {
|
|
102
|
+
D = console;
|
|
103
|
+
var P = D.error, F = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
104
104
|
return P.call(
|
|
105
|
-
|
|
105
|
+
D,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
108
|
-
), e(
|
|
107
|
+
F
|
|
108
|
+
), e(m);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function r(
|
|
112
|
-
if (
|
|
113
|
-
if (typeof
|
|
111
|
+
function r(m) {
|
|
112
|
+
if (m === K) return "<>";
|
|
113
|
+
if (typeof m == "object" && m !== null && m.$$typeof === W)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var D = t(m);
|
|
117
|
+
return D ? "<" + D + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function i() {
|
|
123
|
-
var
|
|
124
|
-
return
|
|
123
|
+
var m = L.A;
|
|
124
|
+
return m === null ? null : m.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function a() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function s(
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
129
|
+
function s(m) {
|
|
130
|
+
if (w.call(m, "key")) {
|
|
131
|
+
var D = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
132
|
+
if (D && D.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return m.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function o(
|
|
136
|
+
function o(m, D) {
|
|
137
137
|
function P() {
|
|
138
|
-
|
|
138
|
+
R || (R = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
|
-
|
|
140
|
+
D
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
P.isReactWarning = !0, Object.defineProperty(
|
|
143
|
+
P.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
144
144
|
get: P,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
function c() {
|
|
149
|
-
var
|
|
150
|
-
return M[
|
|
149
|
+
var m = t(this.type);
|
|
150
|
+
return M[m] || (M[m] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
|
-
)),
|
|
152
|
+
)), m = this.props.ref, m !== void 0 ? m : null;
|
|
153
153
|
}
|
|
154
|
-
function l(
|
|
155
|
-
var
|
|
156
|
-
return
|
|
154
|
+
function l(m, D, P, F, Q, tt) {
|
|
155
|
+
var z = P.ref;
|
|
156
|
+
return m = {
|
|
157
157
|
$$typeof: _,
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
158
|
+
type: m,
|
|
159
|
+
key: D,
|
|
160
160
|
props: P,
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
161
|
+
_owner: F
|
|
162
|
+
}, (z !== void 0 ? z : null) !== null ? Object.defineProperty(m, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
get: c
|
|
165
|
-
}) : Object.defineProperty(
|
|
165
|
+
}) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
166
166
|
configurable: !1,
|
|
167
167
|
enumerable: !1,
|
|
168
168
|
writable: !0,
|
|
169
169
|
value: 0
|
|
170
|
-
}), Object.defineProperty(
|
|
170
|
+
}), Object.defineProperty(m, "_debugInfo", {
|
|
171
171
|
configurable: !1,
|
|
172
172
|
enumerable: !1,
|
|
173
173
|
writable: !0,
|
|
174
174
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
175
|
+
}), Object.defineProperty(m, "_debugStack", {
|
|
176
176
|
configurable: !1,
|
|
177
177
|
enumerable: !1,
|
|
178
178
|
writable: !0,
|
|
179
|
-
value:
|
|
180
|
-
}), Object.defineProperty(
|
|
179
|
+
value: Q
|
|
180
|
+
}), Object.defineProperty(m, "_debugTask", {
|
|
181
181
|
configurable: !1,
|
|
182
182
|
enumerable: !1,
|
|
183
183
|
writable: !0,
|
|
184
|
-
value:
|
|
185
|
-
}), Object.freeze && (Object.freeze(
|
|
184
|
+
value: tt
|
|
185
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
186
186
|
}
|
|
187
|
-
function u(
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (z
|
|
192
|
-
for (
|
|
193
|
-
h(
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function u(m, D, P, F, Q, tt) {
|
|
188
|
+
var z = D.children;
|
|
189
|
+
if (z !== void 0)
|
|
190
|
+
if (F)
|
|
191
|
+
if (E(z)) {
|
|
192
|
+
for (F = 0; F < z.length; F++)
|
|
193
|
+
h(z[F]);
|
|
194
|
+
Object.freeze && Object.freeze(z);
|
|
195
195
|
} else
|
|
196
196
|
console.error(
|
|
197
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
198
198
|
);
|
|
199
|
-
else h(
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
199
|
+
else h(z);
|
|
200
|
+
if (w.call(D, "key")) {
|
|
201
|
+
z = t(m);
|
|
202
|
+
var g = Object.keys(D).filter(function(b) {
|
|
203
|
+
return b !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
F = 0 < g.length ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}", S[z + F] || (g = 0 < g.length ? "{" + g.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
209
209
|
React keys must be passed directly to JSX without using spread:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
212
|
+
F,
|
|
213
|
+
z,
|
|
213
214
|
g,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
), T[g + Y] = !0);
|
|
215
|
+
z
|
|
216
|
+
), S[z + F] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
218
|
+
if (z = null, P !== void 0 && (n(P), z = "" + P), s(D) && (n(D.key), z = "" + D.key), "key" in D) {
|
|
219
219
|
P = {};
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else P =
|
|
223
|
-
return
|
|
220
|
+
for (var y in D)
|
|
221
|
+
y !== "key" && (P[y] = D[y]);
|
|
222
|
+
} else P = D;
|
|
223
|
+
return z && o(
|
|
224
224
|
P,
|
|
225
|
-
typeof
|
|
225
|
+
typeof m == "function" ? m.displayName || m.name || "Unknown" : m
|
|
226
226
|
), l(
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
m,
|
|
228
|
+
z,
|
|
229
229
|
P,
|
|
230
230
|
i(),
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
Q,
|
|
232
|
+
tt
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function h(
|
|
236
|
-
f(
|
|
235
|
+
function h(m) {
|
|
236
|
+
f(m) ? m._store && (m._store.validated = 1) : typeof m == "object" && m !== null && m.$$typeof === W && (m._payload.status === "fulfilled" ? f(m._payload.value) && m._payload.value._store && (m._payload.value._store.validated = 1) : m._store && (m._store.validated = 1));
|
|
237
237
|
}
|
|
238
|
-
function f(
|
|
239
|
-
return typeof
|
|
238
|
+
function f(m) {
|
|
239
|
+
return typeof m == "object" && m !== null && m.$$typeof === _;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var p = aa, _ = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), K = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), A = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, E = Array.isArray, d = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
245
|
-
react_stack_bottom_frame: function(
|
|
246
|
-
return
|
|
244
|
+
p = {
|
|
245
|
+
react_stack_bottom_frame: function(m) {
|
|
246
|
+
return m();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
249
|
+
var R, M = {}, N = p.react_stack_bottom_frame.bind(
|
|
250
|
+
p,
|
|
251
251
|
a
|
|
252
|
-
)(), x =
|
|
253
|
-
Me.Fragment = K, Me.jsx = function(
|
|
254
|
-
var
|
|
252
|
+
)(), x = d(r(a)), S = {};
|
|
253
|
+
Me.Fragment = K, Me.jsx = function(m, D, P) {
|
|
254
|
+
var F = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
255
255
|
return u(
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
m,
|
|
257
|
+
D,
|
|
258
258
|
P,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
F ? Error("react-stack-top-frame") : N,
|
|
261
|
+
F ? d(r(m)) : x
|
|
262
262
|
);
|
|
263
|
-
}, Me.jsxs = function(
|
|
264
|
-
var
|
|
263
|
+
}, Me.jsxs = function(m, D, P) {
|
|
264
|
+
var F = 1e4 > L.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return u(
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
m,
|
|
267
|
+
D,
|
|
268
268
|
P,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
F ? Error("react-stack-top-frame") : N,
|
|
271
|
+
F ? d(r(m)) : x
|
|
272
272
|
);
|
|
273
273
|
};
|
|
274
274
|
})()), Me;
|
|
275
275
|
}
|
|
276
276
|
var xr;
|
|
277
277
|
function la() {
|
|
278
|
-
return xr || (xr = 1, process.env.NODE_ENV === "production" ?
|
|
278
|
+
return xr || (xr = 1, process.env.NODE_ENV === "production" ? Xe.exports = sa() : Xe.exports = oa()), Xe.exports;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
280
|
+
var H = la();
|
|
281
281
|
function je(t, e) {
|
|
282
282
|
return t == null || e == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
283
283
|
}
|
|
@@ -430,39 +430,39 @@ function Ra() {
|
|
|
430
430
|
}
|
|
431
431
|
function fi(t, e) {
|
|
432
432
|
var n = [], r = null, i = null, a = 6, s = 6, o = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, l = t === En || t === Re ? -1 : 1, u = t === Re || t === Cn ? "x" : "y", h = t === En || t === Yn ? Na : Sa;
|
|
433
|
-
function f(
|
|
434
|
-
var _ = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()),
|
|
435
|
-
|
|
436
|
-
return isFinite(
|
|
437
|
-
}), W.attr("opacity", br).attr("transform", function(
|
|
438
|
-
var
|
|
439
|
-
return h((
|
|
440
|
-
})),
|
|
441
|
-
return h(
|
|
442
|
-
}),
|
|
443
|
-
this.__axis =
|
|
433
|
+
function f(p) {
|
|
434
|
+
var _ = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), j = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Aa), K = Math.max(a, 0) + o, T = e.range(), q = +T[0] + c, k = +T[T.length - 1] + c, A = (e.bandwidth ? Ta : Ma)(e.copy(), c), O = p.selection ? p.selection() : p, V = O.selectAll(".domain").data([null]), J = O.selectAll(".tick").data(_, e).order(), Z = J.exit(), W = J.enter().append("g").attr("class", "tick"), B = J.select("line"), C = J.select("text");
|
|
435
|
+
V = V.merge(V.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), J = J.merge(W), B = B.merge(W.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), C = C.merge(W.append("text").attr("fill", "currentColor").attr(u, l * K).attr("dy", t === En ? "0em" : t === Yn ? "0.71em" : "0.32em")), p !== O && (V = V.transition(p), J = J.transition(p), B = B.transition(p), C = C.transition(p), Z = Z.transition(p).attr("opacity", br).attr("transform", function(L) {
|
|
436
|
+
return isFinite(L = A(L)) ? h(L + c) : this.getAttribute("transform");
|
|
437
|
+
}), W.attr("opacity", br).attr("transform", function(L) {
|
|
438
|
+
var w = this.parentNode.__axis;
|
|
439
|
+
return h((w && isFinite(w = w(L)) ? w : A(L)) + c);
|
|
440
|
+
})), Z.remove(), V.attr("d", t === Re || t === Cn ? s ? "M" + l * s + "," + q + "H" + c + "V" + k + "H" + l * s : "M" + c + "," + q + "V" + k : s ? "M" + q + "," + l * s + "V" + c + "H" + k + "V" + l * s : "M" + q + "," + c + "H" + k), J.attr("opacity", 1).attr("transform", function(L) {
|
|
441
|
+
return h(A(L) + c);
|
|
442
|
+
}), B.attr(u + "2", l * a), C.attr(u, l * K).text(j), O.filter(Ra).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === Cn ? "start" : t === Re ? "end" : "middle"), O.each(function() {
|
|
443
|
+
this.__axis = A;
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
return f.scale = function(
|
|
447
|
-
return arguments.length ? (e =
|
|
446
|
+
return f.scale = function(p) {
|
|
447
|
+
return arguments.length ? (e = p, f) : e;
|
|
448
448
|
}, f.ticks = function() {
|
|
449
449
|
return n = Array.from(arguments), f;
|
|
450
|
-
}, f.tickArguments = function(
|
|
451
|
-
return arguments.length ? (n =
|
|
452
|
-
}, f.tickValues = function(
|
|
453
|
-
return arguments.length ? (r =
|
|
454
|
-
}, f.tickFormat = function(
|
|
455
|
-
return arguments.length ? (i =
|
|
456
|
-
}, f.tickSize = function(
|
|
457
|
-
return arguments.length ? (a = s = +
|
|
458
|
-
}, f.tickSizeInner = function(
|
|
459
|
-
return arguments.length ? (a = +
|
|
460
|
-
}, f.tickSizeOuter = function(
|
|
461
|
-
return arguments.length ? (s = +
|
|
462
|
-
}, f.tickPadding = function(
|
|
463
|
-
return arguments.length ? (o = +
|
|
464
|
-
}, f.offset = function(
|
|
465
|
-
return arguments.length ? (c = +
|
|
450
|
+
}, f.tickArguments = function(p) {
|
|
451
|
+
return arguments.length ? (n = p == null ? [] : Array.from(p), f) : n.slice();
|
|
452
|
+
}, f.tickValues = function(p) {
|
|
453
|
+
return arguments.length ? (r = p == null ? null : Array.from(p), f) : r && r.slice();
|
|
454
|
+
}, f.tickFormat = function(p) {
|
|
455
|
+
return arguments.length ? (i = p, f) : i;
|
|
456
|
+
}, f.tickSize = function(p) {
|
|
457
|
+
return arguments.length ? (a = s = +p, f) : a;
|
|
458
|
+
}, f.tickSizeInner = function(p) {
|
|
459
|
+
return arguments.length ? (a = +p, f) : a;
|
|
460
|
+
}, f.tickSizeOuter = function(p) {
|
|
461
|
+
return arguments.length ? (s = +p, f) : s;
|
|
462
|
+
}, f.tickPadding = function(p) {
|
|
463
|
+
return arguments.length ? (o = +p, f) : o;
|
|
464
|
+
}, f.offset = function(p) {
|
|
465
|
+
return arguments.length ? (c = +p, f) : c;
|
|
466
466
|
}, f;
|
|
467
467
|
}
|
|
468
468
|
function Gt(t) {
|
|
@@ -532,10 +532,10 @@ function wr(t, e, n) {
|
|
|
532
532
|
}
|
|
533
533
|
return n != null && t.push({ name: e, value: n }), t;
|
|
534
534
|
}
|
|
535
|
-
var
|
|
535
|
+
var Bn = "http://www.w3.org/1999/xhtml";
|
|
536
536
|
const kr = {
|
|
537
537
|
svg: "http://www.w3.org/2000/svg",
|
|
538
|
-
xhtml:
|
|
538
|
+
xhtml: Bn,
|
|
539
539
|
xlink: "http://www.w3.org/1999/xlink",
|
|
540
540
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
541
541
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
@@ -547,7 +547,7 @@ function $n(t) {
|
|
|
547
547
|
function Da(t) {
|
|
548
548
|
return function() {
|
|
549
549
|
var e = this.ownerDocument, n = this.namespaceURI;
|
|
550
|
-
return n ===
|
|
550
|
+
return n === Bn && e.documentElement.namespaceURI === Bn ? e.createElement(t) : e.createElementNS(n, t);
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
553
|
function ja(t) {
|
|
@@ -618,17 +618,17 @@ function Wa() {
|
|
|
618
618
|
function Ya(t) {
|
|
619
619
|
return this.select(t == null ? Wa : Fa(typeof t == "function" ? t : yi(t)));
|
|
620
620
|
}
|
|
621
|
-
var
|
|
622
|
-
function
|
|
621
|
+
var Ba = Array.prototype.filter;
|
|
622
|
+
function Xa() {
|
|
623
623
|
return Array.from(this.children);
|
|
624
624
|
}
|
|
625
625
|
function Ka(t) {
|
|
626
626
|
return function() {
|
|
627
|
-
return
|
|
627
|
+
return Ba.call(this.children, t);
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
630
|
function Ua(t) {
|
|
631
|
-
return this.selectAll(t == null ?
|
|
631
|
+
return this.selectAll(t == null ? Xa : Ka(typeof t == "function" ? t : yi(t)));
|
|
632
632
|
}
|
|
633
633
|
function Ja(t) {
|
|
634
634
|
typeof t != "function" && (t = gi(t));
|
|
@@ -673,11 +673,11 @@ function Qa(t, e, n, r, i, a) {
|
|
|
673
673
|
(o = e[s]) && (i[s] = o);
|
|
674
674
|
}
|
|
675
675
|
function ts(t, e, n, r, i, a, s) {
|
|
676
|
-
var o, c, l = /* @__PURE__ */ new Map(), u = e.length, h = a.length, f = new Array(u),
|
|
676
|
+
var o, c, l = /* @__PURE__ */ new Map(), u = e.length, h = a.length, f = new Array(u), p;
|
|
677
677
|
for (o = 0; o < u; ++o)
|
|
678
|
-
(c = e[o]) && (f[o] =
|
|
678
|
+
(c = e[o]) && (f[o] = p = s.call(c, c.__data__, o, e) + "", l.has(p) ? i[o] = c : l.set(p, c));
|
|
679
679
|
for (o = 0; o < h; ++o)
|
|
680
|
-
|
|
680
|
+
p = s.call(t, a[o], o, a) + "", (c = l.get(p)) ? (r[o] = c, c.__data__ = a[o], l.delete(p)) : n[o] = new cn(t, a[o]);
|
|
681
681
|
for (o = 0; o < u; ++o)
|
|
682
682
|
(c = e[o]) && l.get(f[o]) === c && (i[o] = c);
|
|
683
683
|
}
|
|
@@ -689,12 +689,12 @@ function ns(t, e) {
|
|
|
689
689
|
var n = e ? ts : Qa, r = this._parents, i = this._groups;
|
|
690
690
|
typeof t != "function" && (t = Za(t));
|
|
691
691
|
for (var a = i.length, s = new Array(a), o = new Array(a), c = new Array(a), l = 0; l < a; ++l) {
|
|
692
|
-
var u = r[l], h = i[l], f = h.length,
|
|
693
|
-
n(u, h,
|
|
694
|
-
for (var
|
|
695
|
-
if (
|
|
696
|
-
for (
|
|
697
|
-
|
|
692
|
+
var u = r[l], h = i[l], f = h.length, p = rs(t.call(u, u && u.__data__, l, r)), _ = p.length, j = o[l] = new Array(_), K = s[l] = new Array(_), T = c[l] = new Array(f);
|
|
693
|
+
n(u, h, j, K, T, p, e);
|
|
694
|
+
for (var q = 0, k = 0, A, O; q < _; ++q)
|
|
695
|
+
if (A = j[q]) {
|
|
696
|
+
for (q >= k && (k = q + 1); !(O = K[k]) && ++k < _; ) ;
|
|
697
|
+
A._next = O || null;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
return s = new At(s, r), s._enter = o, s._exit = c, s;
|
|
@@ -711,8 +711,8 @@ function as(t, e, n) {
|
|
|
711
711
|
}
|
|
712
712
|
function ss(t) {
|
|
713
713
|
for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, a = r.length, s = Math.min(i, a), o = new Array(i), c = 0; c < s; ++c)
|
|
714
|
-
for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h),
|
|
715
|
-
(
|
|
714
|
+
for (var l = n[c], u = r[c], h = l.length, f = o[c] = new Array(h), p, _ = 0; _ < h; ++_)
|
|
715
|
+
(p = l[_] || u[_]) && (f[_] = p);
|
|
716
716
|
for (; c < i; ++c)
|
|
717
717
|
o[c] = n[c];
|
|
718
718
|
return new At(o, this._parents);
|
|
@@ -945,10 +945,10 @@ function Ws() {
|
|
|
945
945
|
function Ys() {
|
|
946
946
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Bs() {
|
|
949
949
|
return this.each(Ys);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Xs(t) {
|
|
952
952
|
var e = typeof t == "function" ? t : di(t);
|
|
953
953
|
return this.select(function() {
|
|
954
954
|
return this.appendChild(e.apply(this, arguments));
|
|
@@ -1093,8 +1093,8 @@ At.prototype = qe.prototype = {
|
|
|
1093
1093
|
text: zs,
|
|
1094
1094
|
html: Vs,
|
|
1095
1095
|
raise: Ws,
|
|
1096
|
-
lower:
|
|
1097
|
-
append:
|
|
1096
|
+
lower: Bs,
|
|
1097
|
+
append: Xs,
|
|
1098
1098
|
insert: Us,
|
|
1099
1099
|
remove: Gs,
|
|
1100
1100
|
clone: to,
|
|
@@ -1116,7 +1116,7 @@ function An(t, e) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
function ue() {
|
|
1118
1118
|
}
|
|
1119
|
-
var Ie = 0.7, un = 1 / Ie, ve = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
1119
|
+
var Ie = 0.7, un = 1 / Ie, ve = "\\s*([+-]?\\d+)\\s*", ze = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", It = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ho = /^#([0-9a-f]{3,8})$/, po = new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`), go = new RegExp(`^rgb\\(${It},${It},${It}\\)$`), yo = new RegExp(`^rgba\\(${ve},${ve},${ve},${ze}\\)$`), mo = new RegExp(`^rgba\\(${It},${It},${It},${ze}\\)$`), xo = new RegExp(`^hsl\\(${ze},${It},${It}\\)$`), vo = new RegExp(`^hsla\\(${ze},${It},${It},${ze}\\)$`), $r = {
|
|
1120
1120
|
aliceblue: 15792383,
|
|
1121
1121
|
antiquewhite: 16444375,
|
|
1122
1122
|
aqua: 65535,
|
|
@@ -1306,13 +1306,13 @@ function Ke(t, e, n, r) {
|
|
|
1306
1306
|
function Ai(t) {
|
|
1307
1307
|
return t instanceof ue || (t = se(t)), t ? (t = t.rgb(), new mt(t.r, t.g, t.b, t.opacity)) : new mt();
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Xn(t, e, n, r) {
|
|
1310
1310
|
return arguments.length === 1 ? Ai(t) : new mt(t, e, n, r ?? 1);
|
|
1311
1311
|
}
|
|
1312
1312
|
function mt(t, e, n, r) {
|
|
1313
1313
|
this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
|
|
1314
1314
|
}
|
|
1315
|
-
Ve(mt,
|
|
1315
|
+
Ve(mt, Xn, An(ue, {
|
|
1316
1316
|
brighter(t) {
|
|
1317
1317
|
return t = t == null ? un : Math.pow(un, t), new mt(this.r * t, this.g * t, this.b * t, this.opacity);
|
|
1318
1318
|
},
|
|
@@ -1409,24 +1409,24 @@ function Ln(t, e, n) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
const $o = Math.PI / 180, Ao = 180 / Math.PI, hn = 18, Si = 0.96422, Mi = 1, Ti = 0.82521, Ri = 4 / 29, _e = 6 / 29, Ei = 3 * _e * _e, No = _e * _e * _e;
|
|
1411
1411
|
function Ci(t) {
|
|
1412
|
-
if (t instanceof
|
|
1413
|
-
if (t instanceof
|
|
1412
|
+
if (t instanceof zt) return new zt(t.l, t.a, t.b, t.opacity);
|
|
1413
|
+
if (t instanceof Wt) return Li(t);
|
|
1414
1414
|
t instanceof mt || (t = Ai(t));
|
|
1415
1415
|
var e = In(t.r), n = In(t.g), r = In(t.b), i = Dn((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / Mi), a, s;
|
|
1416
|
-
return e === n && n === r ? a = s = i : (a = Dn((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / Si), s = Dn((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / Ti)), new
|
|
1416
|
+
return e === n && n === r ? a = s = i : (a = Dn((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / Si), s = Dn((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / Ti)), new zt(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
|
|
1417
1417
|
}
|
|
1418
1418
|
function So(t, e, n, r) {
|
|
1419
|
-
return arguments.length === 1 ? Ci(t) : new
|
|
1419
|
+
return arguments.length === 1 ? Ci(t) : new zt(t, e, n, r ?? 1);
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function zt(t, e, n, r) {
|
|
1422
1422
|
this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
|
|
1423
1423
|
}
|
|
1424
|
-
Ve(
|
|
1424
|
+
Ve(zt, So, An(ue, {
|
|
1425
1425
|
brighter(t) {
|
|
1426
|
-
return new
|
|
1426
|
+
return new zt(this.l + hn * (t ?? 1), this.a, this.b, this.opacity);
|
|
1427
1427
|
},
|
|
1428
1428
|
darker(t) {
|
|
1429
|
-
return new
|
|
1429
|
+
return new zt(this.l - hn * (t ?? 1), this.a, this.b, this.opacity);
|
|
1430
1430
|
},
|
|
1431
1431
|
rgb() {
|
|
1432
1432
|
var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
|
|
@@ -1451,28 +1451,28 @@ function In(t) {
|
|
|
1451
1451
|
return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
1452
1452
|
}
|
|
1453
1453
|
function Mo(t) {
|
|
1454
|
-
if (t instanceof
|
|
1455
|
-
if (t instanceof
|
|
1454
|
+
if (t instanceof Wt) return new Wt(t.h, t.c, t.l, t.opacity);
|
|
1455
|
+
if (t instanceof zt || (t = Ci(t)), t.a === 0 && t.b === 0) return new Wt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
|
|
1456
1456
|
var e = Math.atan2(t.b, t.a) * Ao;
|
|
1457
|
-
return new
|
|
1457
|
+
return new Wt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
|
|
1458
1458
|
}
|
|
1459
1459
|
function Kn(t, e, n, r) {
|
|
1460
|
-
return arguments.length === 1 ? Mo(t) : new
|
|
1460
|
+
return arguments.length === 1 ? Mo(t) : new Wt(t, e, n, r ?? 1);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function Wt(t, e, n, r) {
|
|
1463
1463
|
this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
|
|
1464
1464
|
}
|
|
1465
1465
|
function Li(t) {
|
|
1466
|
-
if (isNaN(t.h)) return new
|
|
1466
|
+
if (isNaN(t.h)) return new zt(t.l, 0, 0, t.opacity);
|
|
1467
1467
|
var e = t.h * $o;
|
|
1468
|
-
return new
|
|
1468
|
+
return new zt(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
|
|
1469
1469
|
}
|
|
1470
|
-
Ve(
|
|
1470
|
+
Ve(Wt, Kn, An(ue, {
|
|
1471
1471
|
brighter(t) {
|
|
1472
|
-
return new
|
|
1472
|
+
return new Wt(this.h, this.c, this.l + hn * (t ?? 1), this.opacity);
|
|
1473
1473
|
},
|
|
1474
1474
|
darker(t) {
|
|
1475
|
-
return new
|
|
1475
|
+
return new Wt(this.h, this.c, this.l - hn * (t ?? 1), this.opacity);
|
|
1476
1476
|
},
|
|
1477
1477
|
rgb() {
|
|
1478
1478
|
return Li(this).rgb();
|
|
@@ -1505,7 +1505,7 @@ function Pe(t, e) {
|
|
|
1505
1505
|
const dn = (function t(e) {
|
|
1506
1506
|
var n = Eo(e);
|
|
1507
1507
|
function r(i, a) {
|
|
1508
|
-
var s = n((i =
|
|
1508
|
+
var s = n((i = Xn(i)).r, (a = Xn(a)).r), o = n(i.g, a.g), c = n(i.b, a.b), l = Pe(i.opacity, a.opacity);
|
|
1509
1509
|
return function(u) {
|
|
1510
1510
|
return i.r = s(u), i.g = o(u), i.b = c(u), i.opacity = l(u), i + "";
|
|
1511
1511
|
};
|
|
@@ -1613,11 +1613,11 @@ function Ii(t, e, n, r) {
|
|
|
1613
1613
|
function i(l) {
|
|
1614
1614
|
return l.length ? l.pop() + " " : "";
|
|
1615
1615
|
}
|
|
1616
|
-
function a(l, u, h, f,
|
|
1616
|
+
function a(l, u, h, f, p, _) {
|
|
1617
1617
|
if (l !== h || u !== f) {
|
|
1618
|
-
var
|
|
1619
|
-
_.push({ i:
|
|
1620
|
-
} else (h || f) &&
|
|
1618
|
+
var j = p.push("translate(", null, e, null, n);
|
|
1619
|
+
_.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
|
|
1620
|
+
} else (h || f) && p.push("translate(" + h + e + f + n);
|
|
1621
1621
|
}
|
|
1622
1622
|
function s(l, u, h, f) {
|
|
1623
1623
|
l !== u ? (l - u > 180 ? u += 360 : u - l > 180 && (l += 360), f.push({ i: h.push(i(h) + "rotate(", null, r) - 2, x: Nt(l, u) })) : u && h.push(i(h) + "rotate(" + u + r);
|
|
@@ -1625,16 +1625,16 @@ function Ii(t, e, n, r) {
|
|
|
1625
1625
|
function o(l, u, h, f) {
|
|
1626
1626
|
l !== u ? f.push({ i: h.push(i(h) + "skewX(", null, r) - 2, x: Nt(l, u) }) : u && h.push(i(h) + "skewX(" + u + r);
|
|
1627
1627
|
}
|
|
1628
|
-
function c(l, u, h, f,
|
|
1628
|
+
function c(l, u, h, f, p, _) {
|
|
1629
1629
|
if (l !== h || u !== f) {
|
|
1630
|
-
var
|
|
1631
|
-
_.push({ i:
|
|
1632
|
-
} else (h !== 1 || f !== 1) &&
|
|
1630
|
+
var j = p.push(i(p) + "scale(", null, ",", null, ")");
|
|
1631
|
+
_.push({ i: j - 4, x: Nt(l, h) }, { i: j - 2, x: Nt(u, f) });
|
|
1632
|
+
} else (h !== 1 || f !== 1) && p.push(i(p) + "scale(" + h + "," + f + ")");
|
|
1633
1633
|
}
|
|
1634
1634
|
return function(l, u) {
|
|
1635
1635
|
var h = [], f = [];
|
|
1636
|
-
return l = t(l), u = t(u), a(l.translateX, l.translateY, u.translateX, u.translateY, h, f), s(l.rotate, u.rotate, h, f), o(l.skewX, u.skewX, h, f), c(l.scaleX, l.scaleY, u.scaleX, u.scaleY, h, f), l = u = null, function(
|
|
1637
|
-
for (var _ = -1,
|
|
1636
|
+
return l = t(l), u = t(u), a(l.translateX, l.translateY, u.translateX, u.translateY, h, f), s(l.rotate, u.rotate, h, f), o(l.skewX, u.skewX, h, f), c(l.scaleX, l.scaleY, u.scaleX, u.scaleY, h, f), l = u = null, function(p) {
|
|
1637
|
+
for (var _ = -1, j = f.length, K; ++_ < j; ) h[(K = f[_]).i] = K.x(p);
|
|
1638
1638
|
return h.join("");
|
|
1639
1639
|
};
|
|
1640
1640
|
};
|
|
@@ -1653,9 +1653,9 @@ var we = 0, Ee = 0, Te = 0, zi = 1e3, pn, Ce, gn = 0, oe = 0, Sn = 0, He = typeo
|
|
|
1653
1653
|
setTimeout(t, 17);
|
|
1654
1654
|
};
|
|
1655
1655
|
function ur() {
|
|
1656
|
-
return oe || (Hi(
|
|
1656
|
+
return oe || (Hi(Bo), oe = He.now() + Sn);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function Bo() {
|
|
1659
1659
|
oe = 0;
|
|
1660
1660
|
}
|
|
1661
1661
|
function yn() {
|
|
@@ -1675,7 +1675,7 @@ function Oi(t, e, n) {
|
|
|
1675
1675
|
var r = new yn();
|
|
1676
1676
|
return r.restart(t, e, n), r;
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function Xo() {
|
|
1679
1679
|
ur(), ++we;
|
|
1680
1680
|
for (var t = pn, e; t; )
|
|
1681
1681
|
(e = oe - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
|
|
@@ -1684,7 +1684,7 @@ function Bo() {
|
|
|
1684
1684
|
function Lr() {
|
|
1685
1685
|
oe = (gn = He.now()) + Sn, we = Ee = 0;
|
|
1686
1686
|
try {
|
|
1687
|
-
|
|
1687
|
+
Xo();
|
|
1688
1688
|
} finally {
|
|
1689
1689
|
we = 0, Uo(), oe = 0;
|
|
1690
1690
|
}
|
|
@@ -1737,7 +1737,7 @@ function fr(t, e) {
|
|
|
1737
1737
|
if (n.state > qi) throw new Error("too late; already scheduled");
|
|
1738
1738
|
return n;
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function Ht(t, e) {
|
|
1741
1741
|
var n = Ct(t, e);
|
|
1742
1742
|
if (n.state > an) throw new Error("too late; already running");
|
|
1743
1743
|
return n;
|
|
@@ -1754,18 +1754,18 @@ function Zo(t, e, n) {
|
|
|
1754
1754
|
n.state = jr, n.timer.restart(s, n.delay, n.time), n.delay <= l && s(l - n.delay);
|
|
1755
1755
|
}
|
|
1756
1756
|
function s(l) {
|
|
1757
|
-
var u, h, f,
|
|
1757
|
+
var u, h, f, p;
|
|
1758
1758
|
if (n.state !== jr) return c();
|
|
1759
1759
|
for (u in r)
|
|
1760
|
-
if (
|
|
1761
|
-
if (
|
|
1762
|
-
|
|
1760
|
+
if (p = r[u], p.name === n.name) {
|
|
1761
|
+
if (p.state === an) return Dr(s);
|
|
1762
|
+
p.state === Pr ? (p.state = sn, p.timer.stop(), p.on.call("interrupt", t, t.__data__, p.index, p.group), delete r[u]) : +u < e && (p.state = sn, p.timer.stop(), p.on.call("cancel", t, t.__data__, p.index, p.group), delete r[u]);
|
|
1763
1763
|
}
|
|
1764
1764
|
if (Dr(function() {
|
|
1765
1765
|
n.state === an && (n.state = Pr, n.timer.restart(o, n.delay, n.time), o(l));
|
|
1766
1766
|
}), n.state = Zn, n.on.call("start", t, t.__data__, n.index, n.group), n.state === Zn) {
|
|
1767
1767
|
for (n.state = an, i = new Array(f = n.tween.length), u = 0, h = -1; u < f; ++u)
|
|
1768
|
-
(
|
|
1768
|
+
(p = n.tween[u].value.call(t, t.__data__, n.index, n.group)) && (i[++h] = p);
|
|
1769
1769
|
i.length = h + 1;
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
@@ -1802,7 +1802,7 @@ function tl(t) {
|
|
|
1802
1802
|
function el(t, e) {
|
|
1803
1803
|
var n, r;
|
|
1804
1804
|
return function() {
|
|
1805
|
-
var i =
|
|
1805
|
+
var i = Ht(this, t), a = i.tween;
|
|
1806
1806
|
if (a !== n) {
|
|
1807
1807
|
r = n = a;
|
|
1808
1808
|
for (var s = 0, o = r.length; s < o; ++s)
|
|
@@ -1818,7 +1818,7 @@ function nl(t, e, n) {
|
|
|
1818
1818
|
var r, i;
|
|
1819
1819
|
if (typeof n != "function") throw new Error();
|
|
1820
1820
|
return function() {
|
|
1821
|
-
var a =
|
|
1821
|
+
var a = Ht(this, t), s = a.tween;
|
|
1822
1822
|
if (s !== r) {
|
|
1823
1823
|
i = (r = s).slice();
|
|
1824
1824
|
for (var o = { name: e, value: n }, c = 0, l = i.length; c < l; ++c)
|
|
@@ -1844,7 +1844,7 @@ function rl(t, e) {
|
|
|
1844
1844
|
function hr(t, e, n) {
|
|
1845
1845
|
var r = t._id;
|
|
1846
1846
|
return t.each(function() {
|
|
1847
|
-
var i =
|
|
1847
|
+
var i = Ht(this, r);
|
|
1848
1848
|
(i.value || (i.value = {}))[e] = n.apply(this, arguments);
|
|
1849
1849
|
}), function(i) {
|
|
1850
1850
|
return Ct(i, r).value[e];
|
|
@@ -1946,12 +1946,12 @@ function xl(t) {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
function vl(t, e) {
|
|
1948
1948
|
return function() {
|
|
1949
|
-
|
|
1949
|
+
Ht(this, t).duration = +e.apply(this, arguments);
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
1952
|
function _l(t, e) {
|
|
1953
1953
|
return e = +e, function() {
|
|
1954
|
-
|
|
1954
|
+
Ht(this, t).duration = e;
|
|
1955
1955
|
};
|
|
1956
1956
|
}
|
|
1957
1957
|
function bl(t) {
|
|
@@ -1961,7 +1961,7 @@ function bl(t) {
|
|
|
1961
1961
|
function wl(t, e) {
|
|
1962
1962
|
if (typeof e != "function") throw new Error();
|
|
1963
1963
|
return function() {
|
|
1964
|
-
|
|
1964
|
+
Ht(this, t).ease = e;
|
|
1965
1965
|
};
|
|
1966
1966
|
}
|
|
1967
1967
|
function kl(t) {
|
|
@@ -1972,7 +1972,7 @@ function $l(t, e) {
|
|
|
1972
1972
|
return function() {
|
|
1973
1973
|
var n = e.apply(this, arguments);
|
|
1974
1974
|
if (typeof n != "function") throw new Error();
|
|
1975
|
-
|
|
1975
|
+
Ht(this, t).ease = n;
|
|
1976
1976
|
};
|
|
1977
1977
|
}
|
|
1978
1978
|
function Al(t) {
|
|
@@ -1984,16 +1984,16 @@ function Nl(t) {
|
|
|
1984
1984
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
1985
1985
|
for (var a = e[i], s = a.length, o = r[i] = [], c, l = 0; l < s; ++l)
|
|
1986
1986
|
(c = a[l]) && t.call(c, c.__data__, l, a) && o.push(c);
|
|
1987
|
-
return new
|
|
1987
|
+
return new Bt(r, this._parents, this._name, this._id);
|
|
1988
1988
|
}
|
|
1989
1989
|
function Sl(t) {
|
|
1990
1990
|
if (t._id !== this._id) throw new Error();
|
|
1991
1991
|
for (var e = this._groups, n = t._groups, r = e.length, i = n.length, a = Math.min(r, i), s = new Array(r), o = 0; o < a; ++o)
|
|
1992
|
-
for (var c = e[o], l = n[o], u = c.length, h = s[o] = new Array(u), f,
|
|
1993
|
-
(f = c[
|
|
1992
|
+
for (var c = e[o], l = n[o], u = c.length, h = s[o] = new Array(u), f, p = 0; p < u; ++p)
|
|
1993
|
+
(f = c[p] || l[p]) && (h[p] = f);
|
|
1994
1994
|
for (; o < r; ++o)
|
|
1995
1995
|
s[o] = e[o];
|
|
1996
|
-
return new
|
|
1996
|
+
return new Bt(s, this._parents, this._name, this._id);
|
|
1997
1997
|
}
|
|
1998
1998
|
function Ml(t) {
|
|
1999
1999
|
return (t + "").trim().split(/^|\s+/).every(function(e) {
|
|
@@ -2002,7 +2002,7 @@ function Ml(t) {
|
|
|
2002
2002
|
});
|
|
2003
2003
|
}
|
|
2004
2004
|
function Tl(t, e, n) {
|
|
2005
|
-
var r, i, a = Ml(e) ? fr :
|
|
2005
|
+
var r, i, a = Ml(e) ? fr : Ht;
|
|
2006
2006
|
return function() {
|
|
2007
2007
|
var s = a(this, t), o = s.on;
|
|
2008
2008
|
o !== r && (i = (r = o).copy()).on(e, n), s.on = i;
|
|
@@ -2028,7 +2028,7 @@ function Ll(t) {
|
|
|
2028
2028
|
for (var r = this._groups, i = r.length, a = new Array(i), s = 0; s < i; ++s)
|
|
2029
2029
|
for (var o = r[s], c = o.length, l = a[s] = new Array(c), u, h, f = 0; f < c; ++f)
|
|
2030
2030
|
(u = o[f]) && (h = t.call(u, u.__data__, f, o)) && ("__data__" in u && (h.__data__ = u.__data__), l[f] = h, Mn(l[f], e, n, f, l, Ct(u, n)));
|
|
2031
|
-
return new
|
|
2031
|
+
return new Bt(a, this._parents, e, n);
|
|
2032
2032
|
}
|
|
2033
2033
|
function Dl(t) {
|
|
2034
2034
|
var e = this._name, n = this._id;
|
|
@@ -2036,11 +2036,11 @@ function Dl(t) {
|
|
|
2036
2036
|
for (var r = this._groups, i = r.length, a = [], s = [], o = 0; o < i; ++o)
|
|
2037
2037
|
for (var c = r[o], l = c.length, u, h = 0; h < l; ++h)
|
|
2038
2038
|
if (u = c[h]) {
|
|
2039
|
-
for (var f = t.call(u, u.__data__, h, c),
|
|
2040
|
-
(
|
|
2039
|
+
for (var f = t.call(u, u.__data__, h, c), p, _ = Ct(u, n), j = 0, K = f.length; j < K; ++j)
|
|
2040
|
+
(p = f[j]) && Mn(p, e, n, j, f, _);
|
|
2041
2041
|
a.push(f), s.push(u);
|
|
2042
2042
|
}
|
|
2043
|
-
return new
|
|
2043
|
+
return new Bt(a, s, e, n);
|
|
2044
2044
|
}
|
|
2045
2045
|
var jl = qe.prototype.constructor;
|
|
2046
2046
|
function Pl() {
|
|
@@ -2075,7 +2075,7 @@ function Hl(t, e, n) {
|
|
|
2075
2075
|
function Ol(t, e) {
|
|
2076
2076
|
var n, r, i, a = "style." + e, s = "end." + a, o;
|
|
2077
2077
|
return function() {
|
|
2078
|
-
var c =
|
|
2078
|
+
var c = Ht(this, t), l = c.on, u = c.value[a] == null ? o || (o = Fi(e)) : void 0;
|
|
2079
2079
|
(l !== n || i !== u) && (r = (n = l).copy()).on(s, i = u), c.on = r;
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
@@ -2108,14 +2108,14 @@ function Yl(t) {
|
|
|
2108
2108
|
this.textContent = t;
|
|
2109
2109
|
};
|
|
2110
2110
|
}
|
|
2111
|
-
function
|
|
2111
|
+
function Bl(t) {
|
|
2112
2112
|
return function() {
|
|
2113
2113
|
var e = t(this);
|
|
2114
2114
|
this.textContent = e ?? "";
|
|
2115
2115
|
};
|
|
2116
2116
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return this.tween("text", typeof t == "function" ?
|
|
2117
|
+
function Xl(t) {
|
|
2118
|
+
return this.tween("text", typeof t == "function" ? Bl(hr(this, "text", t)) : Yl(t == null ? "" : t + ""));
|
|
2119
2119
|
}
|
|
2120
2120
|
function Kl(t) {
|
|
2121
2121
|
return function(e) {
|
|
@@ -2149,7 +2149,7 @@ function Gl() {
|
|
|
2149
2149
|
ease: u.ease
|
|
2150
2150
|
});
|
|
2151
2151
|
}
|
|
2152
|
-
return new
|
|
2152
|
+
return new Bt(r, this._parents, t, n);
|
|
2153
2153
|
}
|
|
2154
2154
|
function Zl() {
|
|
2155
2155
|
var t, e, n = this, r = n._id, i = n.size();
|
|
@@ -2158,41 +2158,41 @@ function Zl() {
|
|
|
2158
2158
|
--i === 0 && a();
|
|
2159
2159
|
} };
|
|
2160
2160
|
n.each(function() {
|
|
2161
|
-
var l =
|
|
2161
|
+
var l = Ht(this, r), u = l.on;
|
|
2162
2162
|
u !== t && (e = (t = u).copy(), e._.cancel.push(o), e._.interrupt.push(o), e._.end.push(c)), l.on = e;
|
|
2163
2163
|
}), i === 0 && a();
|
|
2164
2164
|
});
|
|
2165
2165
|
}
|
|
2166
2166
|
var Ql = 0;
|
|
2167
|
-
function
|
|
2167
|
+
function Bt(t, e, n, r) {
|
|
2168
2168
|
this._groups = t, this._parents = e, this._name = n, this._id = r;
|
|
2169
2169
|
}
|
|
2170
2170
|
function Wi() {
|
|
2171
2171
|
return ++Ql;
|
|
2172
2172
|
}
|
|
2173
|
-
var
|
|
2174
|
-
|
|
2175
|
-
constructor:
|
|
2173
|
+
var Vt = qe.prototype;
|
|
2174
|
+
Bt.prototype = {
|
|
2175
|
+
constructor: Bt,
|
|
2176
2176
|
select: Ll,
|
|
2177
2177
|
selectAll: Dl,
|
|
2178
|
-
selectChild:
|
|
2179
|
-
selectChildren:
|
|
2178
|
+
selectChild: Vt.selectChild,
|
|
2179
|
+
selectChildren: Vt.selectChildren,
|
|
2180
2180
|
filter: Nl,
|
|
2181
2181
|
merge: Sl,
|
|
2182
2182
|
selection: Pl,
|
|
2183
2183
|
transition: Gl,
|
|
2184
|
-
call:
|
|
2185
|
-
nodes:
|
|
2186
|
-
node:
|
|
2187
|
-
size:
|
|
2188
|
-
empty:
|
|
2189
|
-
each:
|
|
2184
|
+
call: Vt.call,
|
|
2185
|
+
nodes: Vt.nodes,
|
|
2186
|
+
node: Vt.node,
|
|
2187
|
+
size: Vt.size,
|
|
2188
|
+
empty: Vt.empty,
|
|
2189
|
+
each: Vt.each,
|
|
2190
2190
|
on: Rl,
|
|
2191
2191
|
attr: ul,
|
|
2192
2192
|
attrTween: gl,
|
|
2193
2193
|
style: ql,
|
|
2194
2194
|
styleTween: Wl,
|
|
2195
|
-
text:
|
|
2195
|
+
text: Xl,
|
|
2196
2196
|
textTween: Jl,
|
|
2197
2197
|
remove: Cl,
|
|
2198
2198
|
tween: rl,
|
|
@@ -2201,7 +2201,7 @@ Xt.prototype = {
|
|
|
2201
2201
|
ease: kl,
|
|
2202
2202
|
easeVarying: Al,
|
|
2203
2203
|
end: Zl,
|
|
2204
|
-
[Symbol.iterator]:
|
|
2204
|
+
[Symbol.iterator]: Vt[Symbol.iterator]
|
|
2205
2205
|
};
|
|
2206
2206
|
function tc(t) {
|
|
2207
2207
|
return --t * t * t + 1;
|
|
@@ -2224,11 +2224,11 @@ function rc(t, e) {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
function ic(t) {
|
|
2226
2226
|
var e, n;
|
|
2227
|
-
t instanceof
|
|
2227
|
+
t instanceof Bt ? (e = t._id, t = t._name) : (e = Wi(), (n = nc).time = ur(), t = t == null ? null : t + "");
|
|
2228
2228
|
for (var r = this._groups, i = r.length, a = 0; a < i; ++a)
|
|
2229
2229
|
for (var s = r[a], o = s.length, c, l = 0; l < o; ++l)
|
|
2230
2230
|
(c = s[l]) && Mn(c, t, e, l, s, n || rc(c, e));
|
|
2231
|
-
return new
|
|
2231
|
+
return new Bt(r, this._parents, t, e);
|
|
2232
2232
|
}
|
|
2233
2233
|
qe.prototype.interrupt = tl;
|
|
2234
2234
|
qe.prototype.transition = ic;
|
|
@@ -2277,8 +2277,8 @@ let oc = class {
|
|
|
2277
2277
|
else if (f > ne) if (!(Math.abs(h * c - l * u) > ne) || !a)
|
|
2278
2278
|
this._append`L${this._x1 = e},${this._y1 = n}`;
|
|
2279
2279
|
else {
|
|
2280
|
-
let
|
|
2281
|
-
Math.abs(
|
|
2280
|
+
let p = r - s, _ = i - o, j = c * c + l * l, K = p * p + _ * _, T = Math.sqrt(j), q = Math.sqrt(f), k = a * Math.tan((tr - Math.acos((j + f - K) / (2 * T * q))) / 2), A = k / q, O = k / T;
|
|
2281
|
+
Math.abs(A - 1) > ne && this._append`L${e + A * u},${n + A * h}`, this._append`A${a},${a},0,0,${+(h * p > u * _)},${this._x1 = e + O * c},${this._y1 = n + O * l}`;
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
2284
2284
|
arc(e, n, r, i, a, s) {
|
|
@@ -2361,11 +2361,11 @@ function hc(t) {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
return r > 0 ? t.slice(0, r) + t.slice(i + 1) : t;
|
|
2363
2363
|
}
|
|
2364
|
-
var
|
|
2364
|
+
var Bi;
|
|
2365
2365
|
function dc(t, e) {
|
|
2366
2366
|
var n = mn(t, e);
|
|
2367
2367
|
if (!n) return t + "";
|
|
2368
|
-
var r = n[0], i = n[1], a = i - (
|
|
2368
|
+
var r = n[0], i = n[1], a = i - (Bi = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, s = r.length;
|
|
2369
2369
|
return a === s ? r : a > s ? r + new Array(a - s + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + mn(t, Math.max(0, e + a - 1))[0];
|
|
2370
2370
|
}
|
|
2371
2371
|
function Ir(t, e) {
|
|
@@ -2397,51 +2397,51 @@ function pc(t) {
|
|
|
2397
2397
|
var e = t.grouping === void 0 || t.thousands === void 0 ? Hr : cc(Or.call(t.grouping, Number), t.thousands + ""), n = t.currency === void 0 ? "" : t.currency[0] + "", r = t.currency === void 0 ? "" : t.currency[1] + "", i = t.decimal === void 0 ? "." : t.decimal + "", a = t.numerals === void 0 ? Hr : uc(Or.call(t.numerals, String)), s = t.percent === void 0 ? "%" : t.percent + "", o = t.minus === void 0 ? "−" : t.minus + "", c = t.nan === void 0 ? "NaN" : t.nan + "";
|
|
2398
2398
|
function l(h) {
|
|
2399
2399
|
h = xn(h);
|
|
2400
|
-
var f = h.fill,
|
|
2401
|
-
|
|
2402
|
-
var
|
|
2403
|
-
|
|
2404
|
-
function
|
|
2405
|
-
var
|
|
2406
|
-
if (
|
|
2407
|
-
|
|
2400
|
+
var f = h.fill, p = h.align, _ = h.sign, j = h.symbol, K = h.zero, T = h.width, q = h.comma, k = h.precision, A = h.trim, O = h.type;
|
|
2401
|
+
O === "n" ? (q = !0, O = "g") : zr[O] || (k === void 0 && (k = 12), A = !0, O = "g"), (K || f === "0" && p === "=") && (K = !0, f = "0", p = "=");
|
|
2402
|
+
var V = j === "$" ? n : j === "#" && /[boxX]/.test(O) ? "0" + O.toLowerCase() : "", J = j === "$" ? r : /[%p]/.test(O) ? s : "", Z = zr[O], W = /[defgprs%]/.test(O);
|
|
2403
|
+
k = k === void 0 ? 6 : /[gprs]/.test(O) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
|
|
2404
|
+
function B(C) {
|
|
2405
|
+
var L = V, w = J, E, d, R;
|
|
2406
|
+
if (O === "c")
|
|
2407
|
+
w = Z(C) + w, C = "";
|
|
2408
2408
|
else {
|
|
2409
|
-
|
|
2410
|
-
var M =
|
|
2411
|
-
if (
|
|
2412
|
-
for (
|
|
2413
|
-
if (
|
|
2414
|
-
|
|
2409
|
+
C = +C;
|
|
2410
|
+
var M = C < 0 || 1 / C < 0;
|
|
2411
|
+
if (C = isNaN(C) ? c : Z(Math.abs(C), k), A && (C = hc(C)), M && +C == 0 && _ !== "+" && (M = !1), L = (M ? _ === "(" ? _ : o : _ === "-" || _ === "(" ? "" : _) + L, w = (O === "s" ? qr[8 + Bi / 3] : "") + w + (M && _ === "(" ? ")" : ""), W) {
|
|
2412
|
+
for (E = -1, d = C.length; ++E < d; )
|
|
2413
|
+
if (R = C.charCodeAt(E), 48 > R || R > 57) {
|
|
2414
|
+
w = (R === 46 ? i + C.slice(E + 1) : C.slice(E)) + w, C = C.slice(0, E);
|
|
2415
2415
|
break;
|
|
2416
2416
|
}
|
|
2417
2417
|
}
|
|
2418
2418
|
}
|
|
2419
|
-
|
|
2420
|
-
var
|
|
2421
|
-
switch (
|
|
2419
|
+
q && !K && (C = e(C, 1 / 0));
|
|
2420
|
+
var N = L.length + C.length + w.length, x = N < T ? new Array(T - N + 1).join(f) : "";
|
|
2421
|
+
switch (q && K && (C = e(x + C, x.length ? T - w.length : 1 / 0), x = ""), p) {
|
|
2422
2422
|
case "<":
|
|
2423
|
-
|
|
2423
|
+
C = L + C + w + x;
|
|
2424
2424
|
break;
|
|
2425
2425
|
case "=":
|
|
2426
|
-
|
|
2426
|
+
C = L + x + C + w;
|
|
2427
2427
|
break;
|
|
2428
2428
|
case "^":
|
|
2429
|
-
|
|
2429
|
+
C = x.slice(0, N = x.length >> 1) + L + C + w + x.slice(N);
|
|
2430
2430
|
break;
|
|
2431
2431
|
default:
|
|
2432
|
-
|
|
2432
|
+
C = x + L + C + w;
|
|
2433
2433
|
break;
|
|
2434
2434
|
}
|
|
2435
|
-
return a(
|
|
2435
|
+
return a(C);
|
|
2436
2436
|
}
|
|
2437
|
-
return
|
|
2437
|
+
return B.toString = function() {
|
|
2438
2438
|
return h + "";
|
|
2439
|
-
},
|
|
2439
|
+
}, B;
|
|
2440
2440
|
}
|
|
2441
2441
|
function u(h, f) {
|
|
2442
|
-
var
|
|
2443
|
-
return function(
|
|
2444
|
-
return
|
|
2442
|
+
var p = l((h = xn(h), h.type = "f", h)), _ = Math.max(-8, Math.min(8, Math.floor(ke(f) / 3))) * 3, j = Math.pow(10, -_), K = qr[8 + _ / 3];
|
|
2443
|
+
return function(T) {
|
|
2444
|
+
return p(j * T) + K;
|
|
2445
2445
|
};
|
|
2446
2446
|
}
|
|
2447
2447
|
return {
|
|
@@ -2449,14 +2449,14 @@ function pc(t) {
|
|
|
2449
2449
|
formatPrefix: u
|
|
2450
2450
|
};
|
|
2451
2451
|
}
|
|
2452
|
-
var Ge, fe,
|
|
2452
|
+
var Ge, fe, Xi;
|
|
2453
2453
|
gc({
|
|
2454
2454
|
thousands: ",",
|
|
2455
2455
|
grouping: [3],
|
|
2456
2456
|
currency: ["$", ""]
|
|
2457
2457
|
});
|
|
2458
2458
|
function gc(t) {
|
|
2459
|
-
return Ge = pc(t), fe = Ge.format,
|
|
2459
|
+
return Ge = pc(t), fe = Ge.format, Xi = Ge.formatPrefix, Ge;
|
|
2460
2460
|
}
|
|
2461
2461
|
function yc(t) {
|
|
2462
2462
|
return Math.max(0, -ke(Math.abs(t)));
|
|
@@ -2627,14 +2627,14 @@ function Wc() {
|
|
|
2627
2627
|
function Yc(t) {
|
|
2628
2628
|
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2630
|
+
function Bc(t, e) {
|
|
2631
2631
|
let n = t.length, r, i;
|
|
2632
2632
|
for (; n; )
|
|
2633
2633
|
i = e() * n-- | 0, r = t[n], t[n] = t[i], t[i] = r;
|
|
2634
2634
|
return t;
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2637
|
-
for (var n = 0, r = (t =
|
|
2636
|
+
function Xc(t, e) {
|
|
2637
|
+
for (var n = 0, r = (t = Bc(Array.from(t), e)).length, i = [], a, s; n < r; )
|
|
2638
2638
|
a = t[n], s && Ki(s, a) ? ++n : (s = Uc(i = Kc(i, a)), n = 0);
|
|
2639
2639
|
return s;
|
|
2640
2640
|
}
|
|
@@ -2690,11 +2690,11 @@ function Le(t, e) {
|
|
|
2690
2690
|
};
|
|
2691
2691
|
}
|
|
2692
2692
|
function Ui(t, e, n) {
|
|
2693
|
-
var r = t.x, i = t.y, a = t.r, s = e.x, o = e.y, c = e.r, l = n.x, u = n.y, h = n.r, f = r - s,
|
|
2693
|
+
var r = t.x, i = t.y, a = t.r, s = e.x, o = e.y, c = e.r, l = n.x, u = n.y, h = n.r, f = r - s, p = r - l, _ = i - o, j = i - u, K = c - a, T = h - a, q = r * r + i * i - a * a, k = q - s * s - o * o + c * c, A = q - l * l - u * u + h * h, O = p * _ - f * j, V = (_ * A - j * k) / (O * 2) - r, J = (j * K - _ * T) / O, Z = (p * k - f * A) / (O * 2) - i, W = (f * T - p * K) / O, B = J * J + W * W - 1, C = 2 * (a + V * J + Z * W), L = V * V + Z * Z - a * a, w = -(Math.abs(B) > 1e-6 ? (C + Math.sqrt(C * C - 4 * B * L)) / (2 * B) : L / C);
|
|
2694
2694
|
return {
|
|
2695
|
-
x: r +
|
|
2696
|
-
y: i +
|
|
2697
|
-
r:
|
|
2695
|
+
x: r + V + J * w,
|
|
2696
|
+
y: i + Z + W * w,
|
|
2697
|
+
r: w
|
|
2698
2698
|
};
|
|
2699
2699
|
}
|
|
2700
2700
|
function Wr(t, e, n) {
|
|
@@ -2705,7 +2705,7 @@ function Yr(t, e) {
|
|
|
2705
2705
|
var n = t.r + e.r - 1e-6, r = e.x - t.x, i = e.y - t.y;
|
|
2706
2706
|
return n > 0 && n * n > r * r + i * i;
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2708
|
+
function Br(t) {
|
|
2709
2709
|
var e = t._, n = t.next._, r = e.r + n.r, i = (e.x * n.r + n.x * e.r) / r, a = (e.y * n.r + n.y * e.r) / r;
|
|
2710
2710
|
return i * i + a * a;
|
|
2711
2711
|
}
|
|
@@ -2735,12 +2735,12 @@ function Gc(t, e) {
|
|
|
2735
2735
|
f += u._.r, u = u.previous;
|
|
2736
2736
|
}
|
|
2737
2737
|
while (l !== u.next);
|
|
2738
|
-
for (i.previous = n, i.next = r, n.next = r.previous = r = i, s =
|
|
2739
|
-
(o =
|
|
2738
|
+
for (i.previous = n, i.next = r, n.next = r.previous = r = i, s = Br(n); (i = i.next) !== r; )
|
|
2739
|
+
(o = Br(i)) < s && (n = i, s = o);
|
|
2740
2740
|
r = n.next;
|
|
2741
2741
|
}
|
|
2742
2742
|
for (n = [r._], i = r; (i = i.next) !== r; ) n.push(i._);
|
|
2743
|
-
for (i =
|
|
2743
|
+
for (i = Xc(n, e), c = 0; c < a; ++c) n = t[c], n.x -= i.x, n.y -= i.y;
|
|
2744
2744
|
return i.r;
|
|
2745
2745
|
}
|
|
2746
2746
|
function Zc(t) {
|
|
@@ -2750,7 +2750,7 @@ function Qc() {
|
|
|
2750
2750
|
var t = null, e = 1, n = 1, r = Vr;
|
|
2751
2751
|
function i(a) {
|
|
2752
2752
|
const s = Wc();
|
|
2753
|
-
return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(
|
|
2753
|
+
return a.x = e / 2, a.y = n / 2, t ? a.eachBefore(Xr(t)).eachAfter(On(r, 0.5, s)).eachBefore(Kr(1)) : a.eachBefore(Xr(Zc)).eachAfter(On(Vr, 1, s)).eachAfter(On(r, a.r / Math.min(e, n), s)).eachBefore(Kr(Math.min(e, n) / (2 * a.r))), a;
|
|
2754
2754
|
}
|
|
2755
2755
|
return i.radius = function(a) {
|
|
2756
2756
|
return arguments.length ? (t = Hc(a), i) : t;
|
|
@@ -2760,7 +2760,7 @@ function Qc() {
|
|
|
2760
2760
|
return arguments.length ? (r = typeof a == "function" ? a : qc(+a), i) : r;
|
|
2761
2761
|
}, i;
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2763
|
+
function Xr(t) {
|
|
2764
2764
|
return function(e) {
|
|
2765
2765
|
e.children || (e.r = Math.max(0, +t(e) || 0));
|
|
2766
2766
|
};
|
|
@@ -2823,12 +2823,12 @@ function $e() {
|
|
|
2823
2823
|
var t = Ji().unknown(void 0), e = t.domain, n = t.range, r = 0, i = 1, a, s, o = !1, c = 0, l = 0, u = 0.5;
|
|
2824
2824
|
delete t.unknown;
|
|
2825
2825
|
function h() {
|
|
2826
|
-
var f = e().length,
|
|
2827
|
-
a = (
|
|
2828
|
-
var K = wa(f).map(function(
|
|
2829
|
-
return _ + a *
|
|
2826
|
+
var f = e().length, p = i < r, _ = p ? i : r, j = p ? r : i;
|
|
2827
|
+
a = (j - _) / Math.max(1, f - c + l * 2), o && (a = Math.floor(a)), _ += (j - _ - a * (f - c)) * u, s = a * (1 - c), o && (_ = Math.round(_), s = Math.round(s));
|
|
2828
|
+
var K = wa(f).map(function(T) {
|
|
2829
|
+
return _ + a * T;
|
|
2830
2830
|
});
|
|
2831
|
-
return n(
|
|
2831
|
+
return n(p ? K.reverse() : K);
|
|
2832
2832
|
}
|
|
2833
2833
|
return t.domain = function(f) {
|
|
2834
2834
|
return arguments.length ? (e(f), h()) : e();
|
|
@@ -2918,8 +2918,8 @@ function su() {
|
|
|
2918
2918
|
return arguments.length ? (n = f, u()) : n;
|
|
2919
2919
|
}, h.unknown = function(f) {
|
|
2920
2920
|
return arguments.length ? (a = f, h) : a;
|
|
2921
|
-
}, function(f,
|
|
2922
|
-
return r = f, i =
|
|
2921
|
+
}, function(f, p) {
|
|
2922
|
+
return r = f, i = p, u();
|
|
2923
2923
|
};
|
|
2924
2924
|
}
|
|
2925
2925
|
function ou() {
|
|
@@ -2930,7 +2930,7 @@ function lu(t, e, n, r) {
|
|
|
2930
2930
|
switch (r = xn(r ?? ",f"), r.type) {
|
|
2931
2931
|
case "s": {
|
|
2932
2932
|
var s = Math.max(Math.abs(t), Math.abs(e));
|
|
2933
|
-
return r.precision == null && !isNaN(a = mc(i, s)) && (r.precision = a),
|
|
2933
|
+
return r.precision == null && !isNaN(a = mc(i, s)) && (r.precision = a), Xi(r, s);
|
|
2934
2934
|
}
|
|
2935
2935
|
case "":
|
|
2936
2936
|
case "e":
|
|
@@ -3031,40 +3031,40 @@ function xu(t, e, n, r, i, a, s, o) {
|
|
|
3031
3031
|
return f = (u * (e - a) - h * (t - i)) / f, [t + f * c, e + f * l];
|
|
3032
3032
|
}
|
|
3033
3033
|
function tn(t, e, n, r, i, a, s) {
|
|
3034
|
-
var o = t - n, c = e - r, l = (s ? a : -a) / ye(o * o + c * c), u = l * c, h = -l * o, f = t + u,
|
|
3035
|
-
return
|
|
3036
|
-
cx:
|
|
3034
|
+
var o = t - n, c = e - r, l = (s ? a : -a) / ye(o * o + c * c), u = l * c, h = -l * o, f = t + u, p = e + h, _ = n + u, j = r + h, K = (f + _) / 2, T = (p + j) / 2, q = _ - f, k = j - p, A = q * q + k * k, O = i - a, V = f * j - _ * p, J = (k < 0 ? -1 : 1) * ye(uu(0, O * O * A - V * V)), Z = (V * k - q * J) / A, W = (-V * q - k * J) / A, B = (V * k + q * J) / A, C = (-V * q + k * J) / A, L = Z - K, w = W - T, E = B - K, d = C - T;
|
|
3035
|
+
return L * L + w * w > E * E + d * d && (Z = B, W = C), {
|
|
3036
|
+
cx: Z,
|
|
3037
3037
|
cy: W,
|
|
3038
3038
|
x01: -u,
|
|
3039
3039
|
y01: -h,
|
|
3040
|
-
x11:
|
|
3041
|
-
y11: W * (i /
|
|
3040
|
+
x11: Z * (i / O - 1),
|
|
3041
|
+
y11: W * (i / O - 1)
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
3044
|
function Qr() {
|
|
3045
3045
|
var t = du, e = pu, n = dt(0), r = null, i = gu, a = yu, s = mu, o = null, c = hu(l);
|
|
3046
3046
|
function l() {
|
|
3047
|
-
var u, h, f = +t.apply(this, arguments),
|
|
3048
|
-
if (o || (o = u = c()),
|
|
3047
|
+
var u, h, f = +t.apply(this, arguments), p = +e.apply(this, arguments), _ = i.apply(this, arguments) - _n, j = a.apply(this, arguments) - _n, K = Gr(j - _), T = j > _;
|
|
3048
|
+
if (o || (o = u = c()), p < f && (h = p, p = f, f = h), !(p > wt)) o.moveTo(0, 0);
|
|
3049
3049
|
else if (K > on - wt)
|
|
3050
|
-
o.moveTo(
|
|
3050
|
+
o.moveTo(p * te(_), p * Dt(_)), o.arc(0, 0, p, _, j, !T), f > wt && (o.moveTo(f * te(j), f * Dt(j)), o.arc(0, 0, f, j, _, T));
|
|
3051
3051
|
else {
|
|
3052
|
-
var
|
|
3052
|
+
var q = _, k = j, A = _, O = j, V = K, J = K, Z = s.apply(this, arguments) / 2, W = Z > wt && (r ? +r.apply(this, arguments) : ye(f * f + p * p)), B = qn(Gr(p - f) / 2, +n.apply(this, arguments)), C = B, L = B, w, E;
|
|
3053
3053
|
if (W > wt) {
|
|
3054
|
-
var
|
|
3055
|
-
(
|
|
3054
|
+
var d = Zr(W / f * Dt(Z)), R = Zr(W / p * Dt(Z));
|
|
3055
|
+
(V -= d * 2) > wt ? (d *= T ? 1 : -1, A += d, O -= d) : (V = 0, A = O = (_ + j) / 2), (J -= R * 2) > wt ? (R *= T ? 1 : -1, q += R, k -= R) : (J = 0, q = k = (_ + j) / 2);
|
|
3056
3056
|
}
|
|
3057
|
-
var M =
|
|
3058
|
-
if (
|
|
3059
|
-
var
|
|
3057
|
+
var M = p * te(q), N = p * Dt(q), x = f * te(O), S = f * Dt(O);
|
|
3058
|
+
if (B > wt) {
|
|
3059
|
+
var m = p * te(k), D = p * Dt(k), P = f * te(A), F = f * Dt(A), Q;
|
|
3060
3060
|
if (K < Oe)
|
|
3061
|
-
if (
|
|
3062
|
-
var
|
|
3063
|
-
|
|
3061
|
+
if (Q = xu(M, N, P, F, m, D, x, S)) {
|
|
3062
|
+
var tt = M - Q[0], z = N - Q[1], g = m - Q[0], y = D - Q[1], b = 1 / Dt(fu((tt * g + z * y) / (ye(tt * tt + z * z) * ye(g * g + y * y))) / 2), v = ye(Q[0] * Q[0] + Q[1] * Q[1]);
|
|
3063
|
+
C = qn(B, (f - v) / (b - 1)), L = qn(B, (p - v) / (b + 1));
|
|
3064
3064
|
} else
|
|
3065
|
-
|
|
3065
|
+
C = L = 0;
|
|
3066
3066
|
}
|
|
3067
|
-
J > wt ?
|
|
3067
|
+
J > wt ? L > wt ? (w = tn(P, F, M, N, p, L, T), E = tn(m, D, x, S, p, L, T), o.moveTo(w.cx + w.x01, w.cy + w.y01), L < B ? o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, L, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, p, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), !T), o.arc(E.cx, E.cy, L, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : (o.moveTo(M, N), o.arc(0, 0, p, q, k, !T)) : o.moveTo(M, N), !(f > wt) || !(V > wt) ? o.lineTo(x, S) : C > wt ? (w = tn(x, S, m, D, f, -C, T), E = tn(M, N, P, F, f, -C, T), o.lineTo(w.cx + w.x01, w.cy + w.y01), C < B ? o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(E.y01, E.x01), !T) : (o.arc(w.cx, w.cy, C, yt(w.y01, w.x01), yt(w.y11, w.x11), !T), o.arc(0, 0, f, yt(w.cy + w.y11, w.cx + w.x11), yt(E.cy + E.y11, E.cx + E.x11), T), o.arc(E.cx, E.cy, C, yt(E.y11, E.x11), yt(E.y01, E.x01), !T))) : o.arc(0, 0, f, O, A, T);
|
|
3068
3068
|
}
|
|
3069
3069
|
if (o.closePath(), u) return o = null, u + "" || null;
|
|
3070
3070
|
}
|
|
@@ -3101,21 +3101,21 @@ function _u(t) {
|
|
|
3101
3101
|
function bu() {
|
|
3102
3102
|
var t = _u, e = vu, n = null, r = dt(0), i = dt(on), a = dt(0);
|
|
3103
3103
|
function s(o) {
|
|
3104
|
-
var c, l = (o = na(o)).length, u, h, f = 0,
|
|
3104
|
+
var c, l = (o = na(o)).length, u, h, f = 0, p = new Array(l), _ = new Array(l), j = +r.apply(this, arguments), K = Math.min(on, Math.max(-on, i.apply(this, arguments) - j)), T, q = Math.min(Math.abs(K) / l, a.apply(this, arguments)), k = q * (K < 0 ? -1 : 1), A;
|
|
3105
3105
|
for (c = 0; c < l; ++c)
|
|
3106
|
-
(
|
|
3107
|
-
for (e != null ?
|
|
3108
|
-
return e(_[
|
|
3109
|
-
}) : n != null &&
|
|
3110
|
-
return n(o[
|
|
3111
|
-
}), c = 0, h = f ? (K - l *
|
|
3112
|
-
u =
|
|
3106
|
+
(A = _[p[c] = c] = +t(o[c], c, o)) > 0 && (f += A);
|
|
3107
|
+
for (e != null ? p.sort(function(O, V) {
|
|
3108
|
+
return e(_[O], _[V]);
|
|
3109
|
+
}) : n != null && p.sort(function(O, V) {
|
|
3110
|
+
return n(o[O], o[V]);
|
|
3111
|
+
}), c = 0, h = f ? (K - l * k) / f : 0; c < l; ++c, j = T)
|
|
3112
|
+
u = p[c], A = _[u], T = j + (A > 0 ? A * h : 0) + k, _[u] = {
|
|
3113
3113
|
data: o[u],
|
|
3114
3114
|
index: c,
|
|
3115
|
-
value:
|
|
3116
|
-
startAngle:
|
|
3117
|
-
endAngle:
|
|
3118
|
-
padAngle:
|
|
3115
|
+
value: A,
|
|
3116
|
+
startAngle: j,
|
|
3117
|
+
endAngle: T,
|
|
3118
|
+
padAngle: q
|
|
3119
3119
|
};
|
|
3120
3120
|
return _;
|
|
3121
3121
|
}
|
|
@@ -3221,14 +3221,14 @@ De.prototype = {
|
|
|
3221
3221
|
};
|
|
3222
3222
|
De.prototype;
|
|
3223
3223
|
const Et = (t, e) => {
|
|
3224
|
-
const n =
|
|
3225
|
-
return
|
|
3224
|
+
const n = Pt(null);
|
|
3225
|
+
return vt(() => {
|
|
3226
3226
|
e !== void 0 && n.current && t(ht(n.current));
|
|
3227
3227
|
}, e === null ? void 0 : e), n;
|
|
3228
3228
|
};
|
|
3229
3229
|
function he() {
|
|
3230
|
-
const t =
|
|
3231
|
-
return
|
|
3230
|
+
const t = Pt(null), [e, n] = ct({ width: 0, height: 0 });
|
|
3231
|
+
return vt(() => {
|
|
3232
3232
|
const r = t.current;
|
|
3233
3233
|
if (!r || !r.parentElement) return;
|
|
3234
3234
|
const i = r.parentElement, a = () => {
|
|
@@ -3241,8 +3241,8 @@ function he() {
|
|
|
3241
3241
|
}, []), [t, e];
|
|
3242
3242
|
}
|
|
3243
3243
|
function Tn() {
|
|
3244
|
-
const [t, e] =
|
|
3245
|
-
return
|
|
3244
|
+
const [t, e] = ct(null);
|
|
3245
|
+
return vt(() => {
|
|
3246
3246
|
const n = typeof document < "u" ? document.getElementById("UI-controls") : null;
|
|
3247
3247
|
e(n);
|
|
3248
3248
|
}, []), t;
|
|
@@ -3340,18 +3340,18 @@ const Nu = "_tooltip_vth6t_3", Su = "_title_vth6t_167", kt = {
|
|
|
3340
3340
|
title: Su,
|
|
3341
3341
|
"text-small": "_text-small_vth6t_199",
|
|
3342
3342
|
"right-label": "_right-label_vth6t_227"
|
|
3343
|
-
}, We = ({ pCount: t }) => /* @__PURE__ */
|
|
3344
|
-
!t && /* @__PURE__ */
|
|
3345
|
-
t === 2 && /* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3343
|
+
}, We = ({ pCount: t }) => /* @__PURE__ */ H.jsxs("div", { id: "tooltip", className: `${kt.tooltip}`, children: [
|
|
3344
|
+
!t && /* @__PURE__ */ H.jsx("p", { className: `top-label ${kt["text-small"]}` }),
|
|
3345
|
+
t === 2 && /* @__PURE__ */ H.jsxs(H.Fragment, { children: [
|
|
3346
|
+
/* @__PURE__ */ H.jsx("p", { className: `top-label ${kt["text-small"]}` }),
|
|
3347
|
+
/* @__PURE__ */ H.jsx("p", { className: `bottom-label ${kt["text-small"]}` })
|
|
3348
3348
|
] }),
|
|
3349
|
-
/* @__PURE__ */
|
|
3350
|
-
/* @__PURE__ */
|
|
3351
|
-
/* @__PURE__ */
|
|
3352
|
-
/* @__PURE__ */
|
|
3349
|
+
/* @__PURE__ */ H.jsxs(H.Fragment, { children: [
|
|
3350
|
+
/* @__PURE__ */ H.jsx("p", { className: `title ${kt.title}` }),
|
|
3351
|
+
/* @__PURE__ */ H.jsx("p", { className: `top-label ${kt["right-label"]}` }),
|
|
3352
|
+
/* @__PURE__ */ H.jsx("p", { className: `bottom-label ${kt["right-label"]}` })
|
|
3353
3353
|
] }),
|
|
3354
|
-
t === 4 && /* @__PURE__ */
|
|
3354
|
+
t === 4 && /* @__PURE__ */ H.jsx("p", { className: `small-text ${kt["right-label"]} ${kt["small-text"]}` })
|
|
3355
3355
|
] }), Ye = (t, e = "tooltip") => t.select(`#${e}`).style("pointer-events", "none").style("position", "fixed").style("left", "auto").style("top", "auto").style("bottom", "auto").style("right", "auto").style("padding", "8px 5px").style("max-width", "200px").style("opacity", 0);
|
|
3356
3356
|
function Rn(t, e) {
|
|
3357
3357
|
const { e: n, svg: r, yScale: i } = e, { pixelY: a } = Au(n, r, i), s = a < 100 ? "bottom" : "top", { offsetWidth: o, offsetHeight: c } = t.node() || {}, l = typeof document < "u" ? document.documentElement.clientWidth : 0, u = n.x - o / 2;
|
|
@@ -3359,8 +3359,8 @@ function Rn(t, e) {
|
|
|
3359
3359
|
if (u < 0)
|
|
3360
3360
|
h = 0;
|
|
3361
3361
|
else if (u + o > l) {
|
|
3362
|
-
const
|
|
3363
|
-
h = u -
|
|
3362
|
+
const p = u + o - l;
|
|
3363
|
+
h = u - p;
|
|
3364
3364
|
} else
|
|
3365
3365
|
h = u;
|
|
3366
3366
|
const f = s === "top" ? kt["tooltip--arrow-down"] : kt["tooltip--arrow-up"];
|
|
@@ -3381,7 +3381,7 @@ function ei(t, e) {
|
|
|
3381
3381
|
s = a;
|
|
3382
3382
|
e.style("left", s + "px").attr("class", `${kt.tooltip} ${kt["tooltip--arrow-down"]}`).style("top", t.y - (r + 10) + "px");
|
|
3383
3383
|
}
|
|
3384
|
-
const
|
|
3384
|
+
const Ft = "#d1d5db", Mu = "_disabled_6kkmf_99", et = {
|
|
3385
3385
|
"controls-container": "_controls-container_6kkmf_1",
|
|
3386
3386
|
"controls-container-sm": "_controls-container-sm_6kkmf_1",
|
|
3387
3387
|
"fill-container": "_fill-container_6kkmf_39",
|
|
@@ -3394,8 +3394,8 @@ const Vt = "#d1d5db", Mu = "_disabled_6kkmf_99", tt = {
|
|
|
3394
3394
|
axisText: Ru,
|
|
3395
3395
|
"value-axis": "_value-axis_1tba7_21"
|
|
3396
3396
|
}, Ae = (t) => {
|
|
3397
|
-
const e =
|
|
3398
|
-
return
|
|
3397
|
+
const e = Pt([]);
|
|
3398
|
+
return vt(() => {
|
|
3399
3399
|
const n = e.current;
|
|
3400
3400
|
if (t.length === 0) {
|
|
3401
3401
|
e.current = [];
|
|
@@ -3427,128 +3427,128 @@ function wf({
|
|
|
3427
3427
|
formatType: s = "long"
|
|
3428
3428
|
} = { prefix: "", suffix: "", formatType: "long" }
|
|
3429
3429
|
}) {
|
|
3430
|
-
const [o, c] = he(), { width: l, height: u } = c, [h, f] =
|
|
3430
|
+
const [o, c] = he(), { width: l, height: u } = c, [h, f] = ct(!1), p = Ae(t.map((A) => A.label)), _ = Tn(), j = l > 576, K = /* @__PURE__ */ H.jsx(
|
|
3431
3431
|
"div",
|
|
3432
3432
|
{
|
|
3433
3433
|
id: "controls",
|
|
3434
|
-
className: `${
|
|
3435
|
-
children: /* @__PURE__ */
|
|
3436
|
-
/* @__PURE__ */
|
|
3434
|
+
className: `${et[j ? "controls-container" : "controls-container-sm"]} ${_ ? et["fill-container"] : ""}`,
|
|
3435
|
+
children: /* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], children: [
|
|
3436
|
+
/* @__PURE__ */ H.jsx(
|
|
3437
3437
|
"input",
|
|
3438
3438
|
{
|
|
3439
3439
|
type: "checkbox",
|
|
3440
|
-
className:
|
|
3440
|
+
className: et["controls-checkbox"],
|
|
3441
3441
|
checked: h,
|
|
3442
|
-
onChange: (
|
|
3442
|
+
onChange: (A) => f(A.target.checked)
|
|
3443
3443
|
}
|
|
3444
3444
|
),
|
|
3445
3445
|
"Sort"
|
|
3446
3446
|
] })
|
|
3447
3447
|
}
|
|
3448
|
-
),
|
|
3448
|
+
), T = { idx: e, type: n }, q = 750, k = Et((A) => {
|
|
3449
3449
|
if (l === 0 || u === 0) return;
|
|
3450
|
-
const
|
|
3450
|
+
const O = {
|
|
3451
3451
|
top: 20,
|
|
3452
3452
|
right: 30,
|
|
3453
3453
|
bottom: r === "vertical" ? 50 : 30,
|
|
3454
3454
|
left: r === "vertical" ? 25 : 50
|
|
3455
|
-
},
|
|
3456
|
-
W.select(".x-axis").attr("transform", `translate(0, ${
|
|
3457
|
-
const M = r === "vertical" ? Zt(
|
|
3458
|
-
W.select(".y-axis").attr("transform", "translate(0, 0)").transition().duration(
|
|
3459
|
-
const
|
|
3460
|
-
const { idx:
|
|
3461
|
-
return xe(
|
|
3455
|
+
}, V = h ? Mt(t).sort((x, S) => S.value - x.value) : Mt(t), J = A.select("svg"), Z = J.node(), W = J.select(".plot-area").attr("transform", "translate(" + O.left + "," + O.top + ")"), B = Ye(A).style("opacity", 0), C = j ? en.axisText : en.rotatedAxisText, L = l - O.left - O.right, w = u - O.top - O.bottom, E = $e().domain(V.map((x) => x.label)).rangeRound(r === "vertical" ? [0, L] : [w, 0]).paddingInner(j ? 0.4 : 0.25).paddingOuter(0.1), d = le().domain([0, Yt(V, (x) => x.value) ?? 0]).rangeRound(r === "vertical" ? [w, 0] : [0, L]), R = r === "vertical" ? Gt(E).tickValues(E.domain()).scale(E).tickSizeOuter(0) : Gt(d).ticks(5, "s").tickSizeOuter(0).tickSize(-w);
|
|
3456
|
+
W.select(".x-axis").attr("transform", `translate(0, ${w})`).transition().duration(q).call(R).selectAll("text").attr("class", C);
|
|
3457
|
+
const M = r === "vertical" ? Zt(d).ticks(5, "s").tickSize(-L) : Zt(E).tickSizeOuter(0);
|
|
3458
|
+
W.select(".y-axis").attr("transform", "translate(0, 0)").transition().duration(q).call(M);
|
|
3459
|
+
const N = (x) => {
|
|
3460
|
+
const { idx: S, type: m } = T, D = p.current.findIndex((P) => P === x.label);
|
|
3461
|
+
return xe(m === "fixed" ? S : S + D);
|
|
3462
3462
|
};
|
|
3463
|
-
W.selectAll(".bar").data(
|
|
3464
|
-
(x) => x.append("rect").attr("class", "bar").attr("x", function(
|
|
3465
|
-
return r === "vertical" ?
|
|
3466
|
-
}).attr("width", function(
|
|
3467
|
-
return r === "vertical" ?
|
|
3468
|
-
}).attr("y", function(
|
|
3469
|
-
return r === "vertical" ?
|
|
3463
|
+
W.selectAll(".bar").data(V, (x) => x.label).join(
|
|
3464
|
+
(x) => x.append("rect").attr("class", "bar").attr("x", function(S) {
|
|
3465
|
+
return r === "vertical" ? E(S.label) ?? 0 : d(0);
|
|
3466
|
+
}).attr("width", function(S) {
|
|
3467
|
+
return r === "vertical" ? E.bandwidth() : 0;
|
|
3468
|
+
}).attr("y", function(S) {
|
|
3469
|
+
return r === "vertical" ? d(0) : E(S.label) ?? 0;
|
|
3470
3470
|
}).attr("height", function() {
|
|
3471
|
-
return r === "vertical" ? 0 :
|
|
3472
|
-
}).attr("fill",
|
|
3473
|
-
return r === "vertical" ?
|
|
3474
|
-
}).attr("width", function(
|
|
3475
|
-
return r === "vertical" ?
|
|
3476
|
-
}).attr("height", function(
|
|
3477
|
-
return r === "vertical" ?
|
|
3471
|
+
return r === "vertical" ? 0 : E.bandwidth();
|
|
3472
|
+
}).attr("fill", N).transition().duration(q).attr("y", function(S) {
|
|
3473
|
+
return r === "vertical" ? d(S.value) : E(S.label) ?? 0;
|
|
3474
|
+
}).attr("width", function(S) {
|
|
3475
|
+
return r === "vertical" ? E.bandwidth() : d(S.value);
|
|
3476
|
+
}).attr("height", function(S) {
|
|
3477
|
+
return r === "vertical" ? d(0) - d(S.value) : E.bandwidth();
|
|
3478
3478
|
}),
|
|
3479
3479
|
void 0,
|
|
3480
|
-
(x) => x.transition().duration(
|
|
3480
|
+
(x) => x.transition().duration(q).attr("fill", Ft).attr("height", 0).attr("y", u).style("opacity", 0).remove()
|
|
3481
3481
|
).on(
|
|
3482
3482
|
"mouseover",
|
|
3483
|
-
(x,
|
|
3484
|
-
W.selectAll("rect.bar").filter((
|
|
3483
|
+
(x, S) => {
|
|
3484
|
+
W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "#71717a").style("stroke-width", 1), B.style("opacity", 1).select("p").text(S.label + ` :
|
|
3485
3485
|
${i}
|
|
3486
|
-
${fe(s === "long" ? "," : "~s")(
|
|
3487
|
-
${a}`), ht(".x-axis").selectAll("text").filter((
|
|
3486
|
+
${fe(s === "long" ? "," : "~s")(S.value)}
|
|
3487
|
+
${a}`), ht(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "bold");
|
|
3488
3488
|
}
|
|
3489
|
-
).on("mousemove", (x,
|
|
3490
|
-
Rn(
|
|
3489
|
+
).on("mousemove", (x, S) => {
|
|
3490
|
+
Rn(B, { e: x, svg: Z, yScale: d });
|
|
3491
3491
|
}).on(
|
|
3492
3492
|
"mouseout",
|
|
3493
|
-
(x,
|
|
3494
|
-
W.selectAll("rect.bar").filter((
|
|
3493
|
+
(x, S) => {
|
|
3494
|
+
W.selectAll("rect.bar").filter((m) => m.label === S.label).style("stroke", "none").style("stroke-width", 0), B.style("opacity", 0), ht(".x-axis").selectAll("text").filter((m) => m === S.label).style("font-weight", "normal");
|
|
3495
3495
|
}
|
|
3496
|
-
).transition().duration(
|
|
3497
|
-
return r === "vertical" ?
|
|
3496
|
+
).transition().duration(q).attr("fill", N).attr("x", function(x) {
|
|
3497
|
+
return r === "vertical" ? E(x.label) ?? 0 : d(0);
|
|
3498
3498
|
}).attr("width", function(x) {
|
|
3499
|
-
return r === "vertical" ?
|
|
3499
|
+
return r === "vertical" ? E.bandwidth() : d(x.value);
|
|
3500
3500
|
}).attr("y", function(x) {
|
|
3501
|
-
return r === "vertical" ?
|
|
3501
|
+
return r === "vertical" ? d(x.value) : E(x.label) ?? 0;
|
|
3502
3502
|
}).attr("height", function(x) {
|
|
3503
|
-
return r === "vertical" ?
|
|
3503
|
+
return r === "vertical" ? d(0) - d(x.value) : E.bandwidth();
|
|
3504
3504
|
});
|
|
3505
|
-
}, [t,
|
|
3506
|
-
return /* @__PURE__ */
|
|
3505
|
+
}, [t, T, l, u, h, r, { prefix: i, suffix: a, formatType: s }]);
|
|
3506
|
+
return /* @__PURE__ */ H.jsxs(
|
|
3507
3507
|
"div",
|
|
3508
3508
|
{
|
|
3509
3509
|
ref: o,
|
|
3510
3510
|
style: { width: l, height: u, display: "flex", flexDirection: "column" },
|
|
3511
3511
|
children: [
|
|
3512
3512
|
_ && kn(K, _),
|
|
3513
|
-
/* @__PURE__ */
|
|
3513
|
+
/* @__PURE__ */ H.jsxs(
|
|
3514
3514
|
"div",
|
|
3515
3515
|
{
|
|
3516
|
-
ref:
|
|
3517
|
-
className: `${
|
|
3516
|
+
ref: k,
|
|
3517
|
+
className: `${et["fill-container"]}`,
|
|
3518
3518
|
style: { display: "flex", flexDirection: "column", position: "relative" },
|
|
3519
3519
|
children: [
|
|
3520
|
-
/* @__PURE__ */
|
|
3520
|
+
/* @__PURE__ */ H.jsx(
|
|
3521
3521
|
"svg",
|
|
3522
3522
|
{
|
|
3523
|
-
className: `${
|
|
3523
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
3524
3524
|
style: {},
|
|
3525
3525
|
viewBox: `0 0 ${l} ${u}`,
|
|
3526
|
-
children: /* @__PURE__ */
|
|
3527
|
-
/* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3526
|
+
children: /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
|
|
3527
|
+
/* @__PURE__ */ H.jsx("g", { className: `${r === "vertical" ? en["value-axis"] : ""} y-axis` }),
|
|
3528
|
+
/* @__PURE__ */ H.jsx("g", { className: `${r === "horizontal" ? en["value-axis"] : ""} x-axis` })
|
|
3529
3529
|
] })
|
|
3530
3530
|
}
|
|
3531
3531
|
),
|
|
3532
|
-
!_ && /* @__PURE__ */
|
|
3532
|
+
!_ && /* @__PURE__ */ H.jsxs(
|
|
3533
3533
|
"label",
|
|
3534
3534
|
{
|
|
3535
|
-
className:
|
|
3535
|
+
className: et["controls-label"],
|
|
3536
3536
|
style: { position: "absolute", right: "12px", top: "6px" },
|
|
3537
3537
|
children: [
|
|
3538
|
-
/* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ H.jsx(
|
|
3539
3539
|
"input",
|
|
3540
3540
|
{
|
|
3541
3541
|
type: "checkbox",
|
|
3542
|
-
className:
|
|
3542
|
+
className: et["controls-checkbox"],
|
|
3543
3543
|
checked: h,
|
|
3544
|
-
onChange: (
|
|
3544
|
+
onChange: (A) => f(A.target.checked)
|
|
3545
3545
|
}
|
|
3546
3546
|
),
|
|
3547
3547
|
"Sort"
|
|
3548
3548
|
]
|
|
3549
3549
|
}
|
|
3550
3550
|
),
|
|
3551
|
-
/* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ H.jsx(We, {})
|
|
3552
3552
|
]
|
|
3553
3553
|
}
|
|
3554
3554
|
)
|
|
@@ -3557,8 +3557,8 @@ function wf({
|
|
|
3557
3557
|
);
|
|
3558
3558
|
}
|
|
3559
3559
|
function ce() {
|
|
3560
|
-
const t =
|
|
3561
|
-
return
|
|
3560
|
+
const t = Pt(null), [e, n] = ct({ width: 0, height: 0 });
|
|
3561
|
+
return vt(() => {
|
|
3562
3562
|
const r = t.current;
|
|
3563
3563
|
if (!r) return;
|
|
3564
3564
|
const i = new ResizeObserver(([a]) => {
|
|
@@ -3592,109 +3592,109 @@ const Eu = "_legend_7ftsg_1", Cu = "_pieSlice_7ftsg_77", Lu = "_pieSliceNotHover
|
|
|
3592
3592
|
pieLabelExit: qu
|
|
3593
3593
|
};
|
|
3594
3594
|
function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r = 0 }) {
|
|
3595
|
-
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { width: u, height: h } = l, f = Ae(t.map((J) => J.label)), [
|
|
3596
|
-
const W = (n &&
|
|
3597
|
-
J.selectAll(".legend-item").data([...W], (
|
|
3598
|
-
(
|
|
3599
|
-
const
|
|
3600
|
-
return `${jt[
|
|
3601
|
-
}).style("left", "-10px").style("top", function(
|
|
3602
|
-
return `${
|
|
3595
|
+
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { width: u, height: h } = l, f = Ae(t.map((J) => J.label)), [p, _] = ct([]), [j, K] = ct(!1), [T, q] = ct(""), k = 750, A = Et((J) => {
|
|
3596
|
+
const W = (n && j ? Mt(t).sort((C, L) => C.value - L.value) : t).map((C) => C.label);
|
|
3597
|
+
J.selectAll(".legend-item").data([...W], (C) => C).join(
|
|
3598
|
+
(C) => {
|
|
3599
|
+
const L = C.append("div").attr("class", function(w) {
|
|
3600
|
+
return `${jt[w === T ? "legend-active" : "legend"]} legend-item`;
|
|
3601
|
+
}).style("left", "-10px").style("top", function(w, E) {
|
|
3602
|
+
return `${E * 20 + 10}px`;
|
|
3603
3603
|
}).style("opacity", 0);
|
|
3604
|
-
return
|
|
3604
|
+
return L.append("div").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (w) => xe(f.current.findIndex((E) => E === w) + r)), L.append("span").attr("class", jt["legend-label"]).style("color", (w) => "#333").text((w) => w), L.transition().duration(k).style("left", "6px").style("opacity", 1), L;
|
|
3605
3605
|
},
|
|
3606
|
-
(
|
|
3607
|
-
${jt[
|
|
3608
|
-
return `${
|
|
3609
|
-
}).style("left", "6px").style("opacity", 1).select("div.rect").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (
|
|
3610
|
-
(
|
|
3611
|
-
).on("mouseover", (
|
|
3612
|
-
|
|
3606
|
+
(C) => (C.attr("class", (L) => `
|
|
3607
|
+
${jt[L === T ? "legend-active" : "legend"]} legend-item`).transition().duration(k).style("top", function(L, w) {
|
|
3608
|
+
return `${w * 20 + 10}px`;
|
|
3609
|
+
}).style("left", "6px").style("opacity", 1).select("div.rect").attr("class", `rect ${jt["legend-rect"]}`).style("background-color", (L) => xe(f.current.findIndex((w) => w === L) + r)), C.select("span").style("color", (L) => "#333").text((L) => L), C),
|
|
3610
|
+
(C) => C.transition().duration(k).style("opacity", 0).style("left", "30px").remove()
|
|
3611
|
+
).on("mouseover", (C, L) => {
|
|
3612
|
+
q(L);
|
|
3613
3613
|
}).on("mouseout", () => {
|
|
3614
|
-
|
|
3614
|
+
q("");
|
|
3615
3615
|
});
|
|
3616
|
-
}, [t, r, u, h,
|
|
3616
|
+
}, [t, r, u, h, T, j, n]), O = Et((J) => {
|
|
3617
3617
|
if (u === 0 || h === 0) return;
|
|
3618
|
-
const
|
|
3619
|
-
return
|
|
3620
|
-
}).sort(function(
|
|
3621
|
-
return
|
|
3622
|
-
}), M = Mt(
|
|
3623
|
-
_(
|
|
3624
|
-
let
|
|
3625
|
-
const
|
|
3626
|
-
|
|
3627
|
-
const P =
|
|
3618
|
+
const Z = { x: u / 2, y: h / 2 }, W = { top: 10, right: 20, bottom: 10, left: 20 }, B = t, C = u - (W.left + W.right), L = h - (W.top + W.bottom), w = Math.min(C, L) / 2, E = B.reduce((v, U) => v + U.value, 0), d = J.select(".plot-area").attr("transform", "translate(" + Z.x + "," + Z.y + ")"), R = bu().value(function(v) {
|
|
3619
|
+
return v.value;
|
|
3620
|
+
}).sort(function(v, U) {
|
|
3621
|
+
return j ? je(v.value, U.value) : 0;
|
|
3622
|
+
}), M = Mt(B), N = R(M), x = Mt(M);
|
|
3623
|
+
_(R(x));
|
|
3624
|
+
let S = x.length > M.length;
|
|
3625
|
+
const m = p.map((v) => v.data.label), D = N.map((v) => v.data.label);
|
|
3626
|
+
m.every((v) => S ? !1 : D.includes(v) ? !0 : (S = !0, !1));
|
|
3627
|
+
const P = p.length === 0, Q = Qr().innerRadius(e * w).outerRadius(w - 12), tt = Qr().innerRadius(e * w).outerRadius(w), z = (v, U) => {
|
|
3628
3628
|
const nt = Jt(
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
),
|
|
3632
|
-
return function(
|
|
3633
|
-
return
|
|
3629
|
+
U === "exit" ? v.endAngle : v.startAngle,
|
|
3630
|
+
U === "exit" ? v.startAngle : v.endAngle
|
|
3631
|
+
), ot = v.data.label === T;
|
|
3632
|
+
return function(lt) {
|
|
3633
|
+
return v.endAngle = nt(lt), ot ? tt(v) || "" : Q(v) || "";
|
|
3634
3634
|
};
|
|
3635
3635
|
};
|
|
3636
|
-
|
|
3637
|
-
return
|
|
3636
|
+
d.selectAll("path").data(N, function(v) {
|
|
3637
|
+
return v.data.label;
|
|
3638
3638
|
}).join(
|
|
3639
|
-
(
|
|
3640
|
-
const
|
|
3641
|
-
const
|
|
3642
|
-
return xe(
|
|
3639
|
+
(v) => {
|
|
3640
|
+
const U = v.append("path").attr("class", jt.pieSlice).attr("fill", function(nt) {
|
|
3641
|
+
const ot = f.current.findIndex((lt) => lt === nt.data.label) + r;
|
|
3642
|
+
return xe(ot);
|
|
3643
3643
|
});
|
|
3644
|
-
return
|
|
3644
|
+
return U.transition().duration(k).delay(P ? 0 : k).attr("d", Q).attrTween("d", function(nt) {
|
|
3645
3645
|
if (!P)
|
|
3646
|
-
return
|
|
3647
|
-
const
|
|
3646
|
+
return z(nt, "not exit");
|
|
3647
|
+
const ot = Jt(0, nt.startAngle), lt = Jt(0, nt.endAngle), pt = nt.data.label === T;
|
|
3648
3648
|
return function(ft) {
|
|
3649
|
-
return nt.startAngle =
|
|
3649
|
+
return nt.startAngle = ot(ft), nt.endAngle = lt(ft), pt ? tt(nt) : Q(nt);
|
|
3650
3650
|
};
|
|
3651
|
-
}),
|
|
3651
|
+
}), U;
|
|
3652
3652
|
},
|
|
3653
|
-
(
|
|
3654
|
-
const
|
|
3655
|
-
return
|
|
3656
|
-
const
|
|
3657
|
-
return xe(
|
|
3653
|
+
(v) => {
|
|
3654
|
+
const U = v;
|
|
3655
|
+
return v.transition().duration(k).attr("fill", function(nt, ot) {
|
|
3656
|
+
const lt = f.current.findIndex((pt) => pt === nt.data.label) + r;
|
|
3657
|
+
return xe(lt);
|
|
3658
3658
|
}).attrTween("d", function(nt) {
|
|
3659
|
-
const
|
|
3660
|
-
return function(
|
|
3661
|
-
return nt.startAngle = pt(
|
|
3659
|
+
const ot = p.find((Ot) => Ot.data.label === nt.data.label), lt = ot && ot.startAngle ? ot.startAngle : 0, pt = Jt(lt, nt.startAngle), ft = ot && ot.endAngle ? ot.endAngle : 0, ut = Jt(ft, nt.endAngle), _t = nt.data.label === T;
|
|
3660
|
+
return function(Ot) {
|
|
3661
|
+
return nt.startAngle = pt(Ot), nt.endAngle = ut(Ot), _t ? tt(nt) || "" : Q(nt) || "";
|
|
3662
3662
|
};
|
|
3663
|
-
}),
|
|
3663
|
+
}), U;
|
|
3664
3664
|
},
|
|
3665
|
-
(
|
|
3666
|
-
return
|
|
3665
|
+
(v) => v.attr("class", jt.pieSliceExit).transition().duration(k).attr("fill", Ft).attrTween("d", function(U) {
|
|
3666
|
+
return z(U, "exit");
|
|
3667
3667
|
}).remove()
|
|
3668
|
-
).on("mouseover", function(
|
|
3669
|
-
|
|
3668
|
+
).on("mouseover", function(v, U) {
|
|
3669
|
+
q(U.data.label);
|
|
3670
3670
|
}).on("mouseout", () => {
|
|
3671
|
-
|
|
3671
|
+
q("");
|
|
3672
3672
|
});
|
|
3673
|
-
const
|
|
3674
|
-
const
|
|
3675
|
-
return fe(".1%")(
|
|
3673
|
+
const y = (v) => B.length === 1 ? "translate(0, 0)" : `translate(${Q.centroid(v)})`, b = (v) => {
|
|
3674
|
+
const U = v.value / E;
|
|
3675
|
+
return fe(".1%")(U);
|
|
3676
3676
|
};
|
|
3677
|
-
|
|
3678
|
-
return
|
|
3677
|
+
d.selectAll("text").data(N, function(v) {
|
|
3678
|
+
return v.data.label;
|
|
3679
3679
|
}).join(
|
|
3680
|
-
(
|
|
3681
|
-
const
|
|
3682
|
-
return
|
|
3683
|
-
|
|
3680
|
+
(v) => {
|
|
3681
|
+
const U = v.append("text").text(b).attr("class", jt.pieLabelEnter);
|
|
3682
|
+
return U.merge(U).transition().duration(k).delay(
|
|
3683
|
+
k
|
|
3684
3684
|
/* + exitDelay*/
|
|
3685
|
-
).attr("transform",
|
|
3685
|
+
).attr("transform", y), U;
|
|
3686
3686
|
},
|
|
3687
|
-
(
|
|
3688
|
-
const
|
|
3689
|
-
return
|
|
3690
|
-
const
|
|
3691
|
-
return
|
|
3692
|
-
}).attr("transform",
|
|
3687
|
+
(v) => {
|
|
3688
|
+
const U = v.text(b);
|
|
3689
|
+
return v.merge(U).attr("class", jt.pieLabelUpdate).transition().duration(T !== "" ? 250 : k).style("opacity", function(nt) {
|
|
3690
|
+
const ot = T === nt.data.label;
|
|
3691
|
+
return T === "" || ot ? 1 : 0;
|
|
3692
|
+
}).attr("transform", y), U;
|
|
3693
3693
|
},
|
|
3694
|
-
(
|
|
3694
|
+
(v) => v.transition().duration(k / 2).attr("class", jt.pieLabelExit).remove()
|
|
3695
3695
|
);
|
|
3696
|
-
}, [t, r, e, u, h,
|
|
3697
|
-
return /* @__PURE__ */
|
|
3696
|
+
}, [t, r, e, u, h, j, T]), V = s > o;
|
|
3697
|
+
return /* @__PURE__ */ H.jsxs(
|
|
3698
3698
|
"div",
|
|
3699
3699
|
{
|
|
3700
3700
|
ref: i,
|
|
@@ -3703,11 +3703,11 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
|
|
|
3703
3703
|
height: o,
|
|
3704
3704
|
position: "relative",
|
|
3705
3705
|
display: "flex",
|
|
3706
|
-
flexDirection:
|
|
3706
|
+
flexDirection: V ? "row" : "column",
|
|
3707
3707
|
overflow: "hidden"
|
|
3708
3708
|
},
|
|
3709
3709
|
children: [
|
|
3710
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ H.jsx(
|
|
3711
3711
|
"div",
|
|
3712
3712
|
{
|
|
3713
3713
|
ref: c,
|
|
@@ -3716,34 +3716,34 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
|
|
|
3716
3716
|
position: "relative",
|
|
3717
3717
|
display: "flex"
|
|
3718
3718
|
},
|
|
3719
|
-
children: /* @__PURE__ */
|
|
3719
|
+
children: /* @__PURE__ */ H.jsx(
|
|
3720
3720
|
"svg",
|
|
3721
3721
|
{
|
|
3722
|
-
ref:
|
|
3723
|
-
className: `${
|
|
3722
|
+
ref: O,
|
|
3723
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
3724
3724
|
viewBox: `0 0 ${u} ${h}`,
|
|
3725
|
-
children: /* @__PURE__ */
|
|
3725
|
+
children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
|
|
3726
3726
|
}
|
|
3727
3727
|
)
|
|
3728
3728
|
}
|
|
3729
3729
|
),
|
|
3730
|
-
/* @__PURE__ */
|
|
3730
|
+
/* @__PURE__ */ H.jsx(
|
|
3731
3731
|
"div",
|
|
3732
3732
|
{
|
|
3733
3733
|
style: {
|
|
3734
|
-
width:
|
|
3735
|
-
height:
|
|
3734
|
+
width: V ? s > 480 ? "180px" : "100px" : "100%",
|
|
3735
|
+
height: V ? "100%" : o > 400 ? "180px" : "100px",
|
|
3736
3736
|
flexShrink: 0,
|
|
3737
3737
|
overflowY: "auto",
|
|
3738
3738
|
background: "rgba(255, 255, 255)",
|
|
3739
|
-
borderLeft:
|
|
3740
|
-
borderTop:
|
|
3739
|
+
borderLeft: V ? "1px solid #ddd" : "none",
|
|
3740
|
+
borderTop: V ? "none" : "1px solid #ddd",
|
|
3741
3741
|
padding: "0px"
|
|
3742
3742
|
},
|
|
3743
|
-
children: /* @__PURE__ */
|
|
3743
|
+
children: /* @__PURE__ */ H.jsx(
|
|
3744
3744
|
"div",
|
|
3745
3745
|
{
|
|
3746
|
-
ref:
|
|
3746
|
+
ref: A,
|
|
3747
3747
|
className: "legends-content",
|
|
3748
3748
|
style: {
|
|
3749
3749
|
display: "flex",
|
|
@@ -3757,18 +3757,18 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
|
|
|
3757
3757
|
)
|
|
3758
3758
|
}
|
|
3759
3759
|
),
|
|
3760
|
-
/* @__PURE__ */
|
|
3760
|
+
/* @__PURE__ */ H.jsxs(
|
|
3761
3761
|
"label",
|
|
3762
3762
|
{
|
|
3763
|
-
className:
|
|
3763
|
+
className: et["controls-label"],
|
|
3764
3764
|
style: { position: "absolute", left: "12px", top: "6px" },
|
|
3765
3765
|
children: [
|
|
3766
|
-
/* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ H.jsx(
|
|
3767
3767
|
"input",
|
|
3768
3768
|
{
|
|
3769
3769
|
type: "checkbox",
|
|
3770
|
-
className:
|
|
3771
|
-
checked:
|
|
3770
|
+
className: et["controls-checkbox"],
|
|
3771
|
+
checked: j,
|
|
3772
3772
|
onChange: (J) => K(J.target.checked)
|
|
3773
3773
|
}
|
|
3774
3774
|
),
|
|
@@ -3780,7 +3780,7 @@ function kf({ data: t, innerRadius: e = 0, sortWithLegends: n = !1, colorIdx: r
|
|
|
3780
3780
|
}
|
|
3781
3781
|
);
|
|
3782
3782
|
}
|
|
3783
|
-
const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHovered_aemvq_297", Yu = "_legend_aemvq_1",
|
|
3783
|
+
const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHovered_aemvq_297", Yu = "_legend_aemvq_1", Bu = "_rectHoveredLegend_aemvq_333", Xu = "_rectCardLegendHovered_aemvq_343", Ku = "_rectLegendHovered_aemvq_355", Uu = "_rotatedAxisText_aemvq_377", Ju = "_axisText_aemvq_387", Gu = "_hoveredAxisText_aemvq_397", Zu = "_yAxisLabel_aemvq_411", rt = {
|
|
3784
3784
|
"legends-container": "_legends-container_aemvq_1",
|
|
3785
3785
|
"legend-container": "_legend-container_aemvq_61",
|
|
3786
3786
|
"legend-container-active": "_legend-container-active_aemvq_61",
|
|
@@ -3794,8 +3794,8 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
|
|
|
3794
3794
|
rectCard: Fu,
|
|
3795
3795
|
rectLegendNotHovered: Wu,
|
|
3796
3796
|
legend: Yu,
|
|
3797
|
-
rectHoveredLegend:
|
|
3798
|
-
rectCardLegendHovered:
|
|
3797
|
+
rectHoveredLegend: Bu,
|
|
3798
|
+
rectCardLegendHovered: Xu,
|
|
3799
3799
|
rectLegendHovered: Ku,
|
|
3800
3800
|
rotatedAxisText: Uu,
|
|
3801
3801
|
axisText: Ju,
|
|
@@ -3804,109 +3804,109 @@ const Vu = "_rect_aemvq_277", Fu = "_rectCard_aemvq_277", Wu = "_rectLegendNotHo
|
|
|
3804
3804
|
"value-axis": "_value-axis_aemvq_421"
|
|
3805
3805
|
};
|
|
3806
3806
|
function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "vertical", tooltipFormat: i }) {
|
|
3807
|
-
const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f,
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
}, [
|
|
3811
|
-
|
|
3807
|
+
const [a, s] = he(), { width: o, height: c } = s, [l, u] = ce(), { height: h } = u, [f, p] = ce(), { width: _, height: j } = p, [K, T] = ct(null), [q, k] = ct(!1), [A, O] = ct(["all"]), [V, J] = ct(!1), [Z, W] = ct(""), [B, C] = ct(!1), L = Tn(), w = t;
|
|
3808
|
+
vt(() => {
|
|
3809
|
+
O(["all"]), k(!0);
|
|
3810
|
+
}, [w]), vt(() => {
|
|
3811
|
+
O(["all"]);
|
|
3812
3812
|
}, [e]);
|
|
3813
|
-
const
|
|
3814
|
-
|
|
3813
|
+
const E = 750;
|
|
3814
|
+
vt(() => {
|
|
3815
3815
|
let P;
|
|
3816
|
-
return
|
|
3817
|
-
|
|
3818
|
-
},
|
|
3816
|
+
return q && (P = setTimeout(() => {
|
|
3817
|
+
k(!1);
|
|
3818
|
+
}, E + 500)), () => {
|
|
3819
3819
|
clearTimeout(P);
|
|
3820
3820
|
};
|
|
3821
|
-
}, [
|
|
3822
|
-
const
|
|
3823
|
-
if (
|
|
3821
|
+
}, [q]);
|
|
3822
|
+
const d = [_, j, A, n, e], R = Mt(w), M = R.length === 0 ? [] : Object.keys(R[0]).filter((P) => P !== "label" && P !== "total"), N = Ae(M), x = _ > 576, S = Et((P) => {
|
|
3823
|
+
if (q)
|
|
3824
3824
|
return;
|
|
3825
|
-
const
|
|
3826
|
-
const
|
|
3825
|
+
const F = x ? 80 : 50, Q = function(z) {
|
|
3826
|
+
const g = rt[x ? "legend-container" : "legend-container-sm"], y = rt[x ? "legend-container-active" : "legend-container-active-sm"], b = rt[x ? "legend-container-inactive" : "legend-container-inactive-sm"];
|
|
3827
3827
|
return `
|
|
3828
|
-
${
|
|
3828
|
+
${A.includes(z) ? e ? y : b : g}
|
|
3829
3829
|
legend-item
|
|
3830
3830
|
`;
|
|
3831
3831
|
};
|
|
3832
|
-
P.selectAll(".legend-item").data([...M], (
|
|
3833
|
-
(
|
|
3834
|
-
const
|
|
3835
|
-
return
|
|
3836
|
-
if (!e &&
|
|
3837
|
-
return
|
|
3838
|
-
const
|
|
3839
|
-
return xt(
|
|
3840
|
-
}),
|
|
3832
|
+
P.selectAll(".legend-item").data([...M], (z) => z).join(
|
|
3833
|
+
(z) => {
|
|
3834
|
+
const g = z.append("div").attr("class", Q).style("left", (y, b) => `${b * F}px`).style("top", "-53px").style("opacity", 0);
|
|
3835
|
+
return g.append("div").attr("class", rt["legend-rect"]).style("background", (y) => {
|
|
3836
|
+
if (!e && A.includes(y))
|
|
3837
|
+
return Ft;
|
|
3838
|
+
const b = N.current.findIndex((v) => v === y) + n;
|
|
3839
|
+
return xt(b);
|
|
3840
|
+
}), g.append("span").attr("class", rt["legend-label"]).style("color", (y) => !e && A.includes(y) ? "#d1d5db" : "#333").text((y) => y), g.transition().duration(E).style("top", "0px").style("opacity", 1), g;
|
|
3841
3841
|
},
|
|
3842
|
-
(
|
|
3843
|
-
if (!e &&
|
|
3844
|
-
return
|
|
3845
|
-
const
|
|
3846
|
-
return xt(
|
|
3847
|
-
}),
|
|
3848
|
-
(
|
|
3849
|
-
).on("mouseover", function(
|
|
3850
|
-
|
|
3851
|
-
}).on("mouseout", function(
|
|
3852
|
-
|
|
3853
|
-
}).on("click", (
|
|
3854
|
-
|
|
3855
|
-
let
|
|
3856
|
-
return e ?
|
|
3842
|
+
(z) => (z.attr("class", Q).transition().duration(E).style("top", "0px").style("left", (g, y) => `${y * F}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (g) => {
|
|
3843
|
+
if (!e && A.includes(g))
|
|
3844
|
+
return Ft;
|
|
3845
|
+
const y = N.current.findIndex((b) => b === g) + n;
|
|
3846
|
+
return xt(y);
|
|
3847
|
+
}), z.select(`.${rt["legend-label"]}`).style("color", (g) => !e && A.includes(g) ? Ft : "#333").text((g) => g), z),
|
|
3848
|
+
(z) => z.style("color", Ft).transition().duration(E).style("opacity", 0).style("top", "53px").remove()
|
|
3849
|
+
).on("mouseover", function(z, g) {
|
|
3850
|
+
q || W(g);
|
|
3851
|
+
}).on("mouseout", function(z, g) {
|
|
3852
|
+
q || (W(""), V && J(!1));
|
|
3853
|
+
}).on("click", (z, g) => {
|
|
3854
|
+
O((y) => {
|
|
3855
|
+
let b = [];
|
|
3856
|
+
return e ? y[0] === g ? b = ["all"] : b = [g] : y.includes(g) ? b = y.filter((v) => v !== g) : b = [...y, g], b;
|
|
3857
3857
|
}), J(!0);
|
|
3858
3858
|
});
|
|
3859
|
-
}, [...
|
|
3859
|
+
}, [...d, M, q]), m = /* @__PURE__ */ H.jsxs(
|
|
3860
3860
|
"div",
|
|
3861
3861
|
{
|
|
3862
3862
|
ref: l,
|
|
3863
|
-
className: `${
|
|
3863
|
+
className: `${et[x ? "controls-container" : "controls-container-sm"]} ${L ? et["fill-container"] : ""}`,
|
|
3864
3864
|
children: [
|
|
3865
|
-
/* @__PURE__ */
|
|
3866
|
-
/* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], style: { paddingRight: "12px" }, children: [
|
|
3866
|
+
/* @__PURE__ */ H.jsx(
|
|
3867
3867
|
"input",
|
|
3868
3868
|
{
|
|
3869
3869
|
type: "checkbox",
|
|
3870
|
-
className:
|
|
3871
|
-
checked:
|
|
3872
|
-
onChange: (P) =>
|
|
3870
|
+
className: et["controls-checkbox"],
|
|
3871
|
+
checked: B,
|
|
3872
|
+
onChange: (P) => C(P.target.checked)
|
|
3873
3873
|
}
|
|
3874
3874
|
),
|
|
3875
3875
|
"Sort"
|
|
3876
3876
|
] }),
|
|
3877
|
-
/* @__PURE__ */
|
|
3877
|
+
/* @__PURE__ */ H.jsx(
|
|
3878
3878
|
"div",
|
|
3879
3879
|
{
|
|
3880
|
-
ref:
|
|
3880
|
+
ref: S,
|
|
3881
3881
|
id: "stacked-barchart-legends",
|
|
3882
3882
|
className: `${rt["legends-container"]}`
|
|
3883
3883
|
}
|
|
3884
3884
|
)
|
|
3885
3885
|
]
|
|
3886
3886
|
}
|
|
3887
|
-
),
|
|
3888
|
-
if (_ === 0 ||
|
|
3889
|
-
const
|
|
3890
|
-
|
|
3891
|
-
const G =
|
|
3892
|
-
const bt =
|
|
3893
|
-
return
|
|
3887
|
+
), D = Et((P) => {
|
|
3888
|
+
if (_ === 0 || j === 0 || Z !== "" && q) return;
|
|
3889
|
+
const F = { top: 20, right: 20, bottom: 30, left: 40 }, Q = e ? M : M.filter(($) => !A.includes($));
|
|
3890
|
+
R.forEach(($) => {
|
|
3891
|
+
const G = Q.reduce((X, gt) => {
|
|
3892
|
+
const bt = $[gt];
|
|
3893
|
+
return X + (typeof bt == "number" ? bt : 0);
|
|
3894
3894
|
}, 0);
|
|
3895
|
-
|
|
3895
|
+
$.total = G;
|
|
3896
3896
|
});
|
|
3897
|
-
const
|
|
3898
|
-
return e ?
|
|
3899
|
-
}) :
|
|
3900
|
-
let
|
|
3901
|
-
K === null && (
|
|
3902
|
-
const
|
|
3903
|
-
return
|
|
3904
|
-
}), pt = $e().domain(
|
|
3905
|
-
|
|
3906
|
-
const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-
|
|
3907
|
-
|
|
3908
|
-
const Qt = bn().keys(
|
|
3909
|
-
const G =
|
|
3897
|
+
const tt = R, z = B ? Mt(tt).sort(function($, G) {
|
|
3898
|
+
return e ? A[0] === "all" ? $.total - G.total : Number($[A[0]]) - Number(G[A[0]]) : $.total - G.total;
|
|
3899
|
+
}) : tt, g = _ - F.left - F.right, y = j - F.top - F.bottom, b = P.select("svg"), v = b.node(), U = b.select(".plot-area").attr("transform", "translate(" + F.left + "," + F.top + ")"), nt = Ye(P).style("opacity", 0);
|
|
3900
|
+
let ot = !1;
|
|
3901
|
+
K === null && (ot = !0, T(Mt(R)));
|
|
3902
|
+
const lt = z.map(function($) {
|
|
3903
|
+
return $.label;
|
|
3904
|
+
}), pt = $e().domain(lt).rangeRound(r === "vertical" ? [0, g] : [y, 0]).paddingInner(x ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), ft = e ? A[0] === "all" ? Yt(R, ($) => $.total) : Yt(R, ($) => $[A[0]]) : Yt(R, ($) => $.total), ut = le().domain([0, ft ?? 0]).range(r === "vertical" ? [y, 0] : [0, g]), _t = !x && r === "vertical" ? rt.rotatedAxisText : rt.axisText, Ot = [], Be = r === "vertical" ? Gt(pt).tickValues(pt.domain()).tickSizeOuter(0) : Gt(ut).ticks(4, "s").tickSizeOuter(0).tickSize(-y);
|
|
3905
|
+
U.select(".x-axis").attr("transform", `translate(0,${y})`).transition().duration(E).call(Be).selectAll("text").style("cursor", "pointer").attr("dy", x ? "1em" : ".20em").attr("dx", x ? "0em" : "-.8em").attr("class", _t).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
|
|
3906
|
+
const de = r === "vertical" ? Zt(ut).ticks(4, "s").tickSize(-g) : Zt(pt).tickSizeOuter(0);
|
|
3907
|
+
U.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(ot ? 0 : E).call(de).selectAll(".tick").filter(($) => $ === 0).select("line").remove();
|
|
3908
|
+
const Qt = bn().keys(Q)(z).map(($) => {
|
|
3909
|
+
const G = $.key, X = $.map((gt) => {
|
|
3910
3910
|
const bt = gt.data.label;
|
|
3911
3911
|
return {
|
|
3912
3912
|
...gt,
|
|
@@ -3914,122 +3914,122 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
|
|
|
3914
3914
|
barKey: G
|
|
3915
3915
|
};
|
|
3916
3916
|
});
|
|
3917
|
-
return
|
|
3918
|
-
}),
|
|
3919
|
-
(
|
|
3920
|
-
const gt =
|
|
3917
|
+
return X.key = G, X;
|
|
3918
|
+
}), Xt = U.selectAll(".serie").data(Qt, ($) => $.key).join(
|
|
3919
|
+
($) => $.append("g").attr("class", "serie").attr("fill", (X) => {
|
|
3920
|
+
const gt = N.current.findIndex((Ne) => Ne === X.key) + n;
|
|
3921
3921
|
return xt(gt);
|
|
3922
|
-
}).style("opacity", (
|
|
3923
|
-
if (
|
|
3922
|
+
}).style("opacity", (X) => {
|
|
3923
|
+
if (Z !== "")
|
|
3924
3924
|
if (e) {
|
|
3925
|
-
if (
|
|
3926
|
-
return
|
|
3925
|
+
if (A[0] === "all")
|
|
3926
|
+
return X.key === Z || V ? 1 : 0.25;
|
|
3927
3927
|
} else
|
|
3928
|
-
return
|
|
3929
|
-
return e ?
|
|
3930
|
-
}).style("pointer-events", (
|
|
3931
|
-
(
|
|
3932
|
-
const gt =
|
|
3928
|
+
return V ? 1 : X.key === Z ? 0.25 : 1;
|
|
3929
|
+
return e ? A[0] === "all" || X.key === A[0] ? 1 : 0 : 1;
|
|
3930
|
+
}).style("pointer-events", (X) => e ? A[0] === "all" || X.key === A[0] ? "auto" : "none" : "auto"),
|
|
3931
|
+
($) => $.transition().duration(E).attr("fill", (X) => {
|
|
3932
|
+
const gt = N.current.findIndex((Ne) => Ne === X.key) + n;
|
|
3933
3933
|
return xt(gt);
|
|
3934
|
-
}).style("opacity", (
|
|
3935
|
-
if (
|
|
3934
|
+
}).style("opacity", (X) => {
|
|
3935
|
+
if (Z !== "")
|
|
3936
3936
|
if (e) {
|
|
3937
|
-
if (
|
|
3938
|
-
return
|
|
3937
|
+
if (A[0] === "all")
|
|
3938
|
+
return X.key === Z || V ? 1 : 0.25;
|
|
3939
3939
|
} else
|
|
3940
|
-
return
|
|
3941
|
-
return e ?
|
|
3942
|
-
}).style("pointer-events", (
|
|
3943
|
-
(
|
|
3944
|
-
), Kt = (
|
|
3945
|
-
const G = r === "vertical" ?
|
|
3946
|
-
return
|
|
3940
|
+
return V ? 1 : X.key === Z ? 0.25 : 1;
|
|
3941
|
+
return e ? A[0] === "all" || X.key === A[0] ? 1 : 0 : 1;
|
|
3942
|
+
}).style("pointer-events", (X) => e ? A[0] === "all" || X.key === A[0] ? "auto" : "none" : "auto"),
|
|
3943
|
+
($) => $.transition().duration(E).attr("fill", Ft).style("opacity", 0).selectAll("rect").attr("y", y).attr("height", 0).remove()
|
|
3944
|
+
), Kt = ($) => pt($.data.label + "") ?? 0, Ut = pt.bandwidth(), qt = ($) => {
|
|
3945
|
+
const G = r === "vertical" ? y : g;
|
|
3946
|
+
return ot ? 0 : A[0] === "all" ? ut(r === "vertical" ? $[1] : $[0]) : (
|
|
3947
3947
|
/*d.key.startsWith(plotted)
|
|
3948
3948
|
?*/
|
|
3949
|
-
e && r !== "vertical" ? ut(0) : G - (ut(
|
|
3949
|
+
e && r !== "vertical" ? ut(0) : G - (ut($[0]) - ut($[1]))
|
|
3950
3950
|
);
|
|
3951
|
-
}, Lt = (
|
|
3952
|
-
const G = r === "vertical" ? ut(
|
|
3951
|
+
}, Lt = ($) => {
|
|
3952
|
+
const G = r === "vertical" ? ut($[0]) - ut($[1]) : ut($[1]) - ut($[0]);
|
|
3953
3953
|
return isNaN(G) || G < 0 ? 0 : G;
|
|
3954
|
-
}, Tt = (
|
|
3955
|
-
if (
|
|
3954
|
+
}, Tt = ($) => r === "vertical" ? Kt($) : qt($), $t = ($) => r === "vertical" ? Ut : Lt($), Y = ($) => r === "vertical" ? qt($) : Kt($), it = ($) => r === "vertical" ? Lt($) : Ut, st = ($) => {
|
|
3955
|
+
if ($.barKey === Z)
|
|
3956
3956
|
return "none";
|
|
3957
|
-
const G = $t(
|
|
3958
|
-
return
|
|
3959
|
-
},
|
|
3960
|
-
const G = $t(
|
|
3961
|
-
return r === "vertical" ?
|
|
3962
|
-
}, at = (
|
|
3963
|
-
|
|
3964
|
-
(
|
|
3957
|
+
const G = $t($), X = it($);
|
|
3958
|
+
return Q.indexOf($.barKey) === Q.length - 1 || $.barKey === A[0] ? r === "vertical" ? `${G + X} ${G} ${X}` : `${G + X + G}` : r === "vertical" ? `${X} ${G}` : `${G} ${X}`;
|
|
3959
|
+
}, I = ($) => {
|
|
3960
|
+
const G = $t($), X = Q.indexOf($.barKey) === Q.length - 1 || $.barKey === A[0];
|
|
3961
|
+
return r === "vertical" ? X ? 0 : G * -1 : 0;
|
|
3962
|
+
}, at = ($) => Z !== "" && Z === $.barKey && e ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
|
|
3963
|
+
Xt.selectAll("rect").data(
|
|
3964
|
+
($) => $,
|
|
3965
3965
|
// each group binds its stacked points
|
|
3966
|
-
(
|
|
3966
|
+
($) => $.data.label
|
|
3967
3967
|
// unique key per bar
|
|
3968
3968
|
).join(
|
|
3969
|
-
(
|
|
3970
|
-
return r === "vertical" ? Tt(
|
|
3971
|
-
}).attr("width", function(
|
|
3972
|
-
return r === "vertical" ? $t(
|
|
3973
|
-
}).attr("y", (
|
|
3969
|
+
($) => $.append("rect").attr("class", `rect ${et.rect}`).attr("x", function(X) {
|
|
3970
|
+
return r === "vertical" ? Tt(X) : ut(0);
|
|
3971
|
+
}).attr("width", function(X) {
|
|
3972
|
+
return r === "vertical" ? $t(X) : 0;
|
|
3973
|
+
}).attr("y", (X) => {
|
|
3974
3974
|
if (r === "vertical") {
|
|
3975
|
-
if (!
|
|
3976
|
-
const gt =
|
|
3977
|
-
return
|
|
3975
|
+
if (!Ot.includes(X.data.label)) return y;
|
|
3976
|
+
const gt = A[0] === "all" ? ut(X[1]) : X.key.startsWith(A[0]) ? y - (ut(X[0]) - ut(X[1])) : ut(X[1]), bt = ut(X[0]) - ut(X[1]), Ne = isNaN(bt) || bt < 0 ? 0 : bt, ia = gt + Ne;
|
|
3977
|
+
return ot ? y - (F.bottom + F.top) : ia;
|
|
3978
3978
|
} else
|
|
3979
|
-
return X
|
|
3980
|
-
}).attr("height", function(
|
|
3981
|
-
return r === "vertical" ? 0 : it(
|
|
3982
|
-
}).attr("stroke-dasharray", st).attr("stroke-dashoffset",
|
|
3979
|
+
return Y(X);
|
|
3980
|
+
}).attr("height", function(X) {
|
|
3981
|
+
return r === "vertical" ? 0 : it(X);
|
|
3982
|
+
}).attr("stroke-dasharray", st).attr("stroke-dashoffset", I).transition().duration(E).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", Y),
|
|
3983
3983
|
void 0,
|
|
3984
3984
|
// no custom update handler
|
|
3985
|
-
(
|
|
3986
|
-
).attr("class", at).attr("stroke-dasharray", st).attr("stroke-dashoffset",
|
|
3985
|
+
($) => $.transition().duration(E).attr("opacity", 0).attr("y", y).attr("height", 0).remove()
|
|
3986
|
+
).attr("class", at).attr("stroke-dasharray", st).attr("stroke-dashoffset", I).transition().duration(E).attr("x", Tt).attr("width", $t).attr("height", it).attr("y", Y).on("start", function() {
|
|
3987
3987
|
}).on("end", function() {
|
|
3988
|
-
}),
|
|
3989
|
-
ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ?
|
|
3990
|
-
const
|
|
3991
|
-
nt.select("p.top-label").text(G.barKey + " : " + St(
|
|
3992
|
-
}).on("touch", function(
|
|
3993
|
-
ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((
|
|
3994
|
-
}).on("mousemove", (
|
|
3995
|
-
Rn(nt, { e:
|
|
3996
|
-
}).on("mouseout", function(
|
|
3997
|
-
ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((
|
|
3988
|
+
}), Xt.selectAll("rect").on("mouseover", function($, G) {
|
|
3989
|
+
ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((bt) => bt === G.data.label).attr("class", (r === "vertical" ? _t : "") + " " + rt.hoveredAxisText), nt.style("opacity", 1).select("p.title").text(G.data.label);
|
|
3990
|
+
const X = G.data[G.barKey], { total: gt } = G.data;
|
|
3991
|
+
nt.select("p.top-label").text(G.barKey + " : " + St(X, i)), nt.select("p.bottom-label").text(A[0] === "all" ? `Total : ${St(gt, i)}` : "~");
|
|
3992
|
+
}).on("touch", function($, G) {
|
|
3993
|
+
ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label);
|
|
3994
|
+
}).on("mousemove", ($, G) => {
|
|
3995
|
+
Rn(nt, { e: $, svg: v, yScale: ut });
|
|
3996
|
+
}).on("mouseout", function($, G) {
|
|
3997
|
+
ht(r === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((X) => X === G.data.label).attr("class", r === "vertical" ? _t : ""), nt.style("opacity", 0);
|
|
3998
3998
|
});
|
|
3999
|
-
}, [...
|
|
4000
|
-
return /* @__PURE__ */
|
|
3999
|
+
}, [...d, B, R, M, Z, V, q, r, i]);
|
|
4000
|
+
return /* @__PURE__ */ H.jsxs(
|
|
4001
4001
|
"div",
|
|
4002
4002
|
{
|
|
4003
4003
|
ref: a,
|
|
4004
4004
|
style: { width: `${o}px`, height: `${c}px`, display: "flex", flexDirection: "column" },
|
|
4005
4005
|
children: [
|
|
4006
|
-
|
|
4007
|
-
/* @__PURE__ */
|
|
4006
|
+
L ? kn(m, L) : m,
|
|
4007
|
+
/* @__PURE__ */ H.jsx(
|
|
4008
4008
|
"div",
|
|
4009
4009
|
{
|
|
4010
4010
|
ref: f,
|
|
4011
|
-
className: `${
|
|
4011
|
+
className: `${et["fill-container"]}`,
|
|
4012
4012
|
style: { display: "flex", flexDirection: "column" },
|
|
4013
|
-
children: /* @__PURE__ */
|
|
4013
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4014
4014
|
"div",
|
|
4015
4015
|
{
|
|
4016
|
-
ref:
|
|
4017
|
-
className: `${
|
|
4016
|
+
ref: D,
|
|
4017
|
+
className: `${et["fill-container"]}`,
|
|
4018
4018
|
style: { display: "flex", flexDirection: "column" },
|
|
4019
4019
|
children: [
|
|
4020
|
-
/* @__PURE__ */
|
|
4020
|
+
/* @__PURE__ */ H.jsx(
|
|
4021
4021
|
"svg",
|
|
4022
4022
|
{
|
|
4023
|
-
className: `${
|
|
4024
|
-
viewBox: `0 0 ${_} ${
|
|
4025
|
-
children: _ > 0 && /* @__PURE__ */
|
|
4026
|
-
/* @__PURE__ */
|
|
4027
|
-
/* @__PURE__ */
|
|
4028
|
-
/* @__PURE__ */
|
|
4023
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
4024
|
+
viewBox: `0 0 ${_} ${j}`,
|
|
4025
|
+
children: _ > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
|
|
4026
|
+
/* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
|
|
4027
|
+
/* @__PURE__ */ H.jsx("g", { className: `${r === "vertical" ? rt["value-axis"] : ""} y-axis` }),
|
|
4028
|
+
/* @__PURE__ */ H.jsx("g", { className: `${r === "horizontal" ? rt["value-axis"] : ""} x-axis` })
|
|
4029
4029
|
] })
|
|
4030
4030
|
}
|
|
4031
4031
|
),
|
|
4032
|
-
/* @__PURE__ */
|
|
4032
|
+
/* @__PURE__ */ H.jsx(We, { pCount: 3 })
|
|
4033
4033
|
]
|
|
4034
4034
|
}
|
|
4035
4035
|
)
|
|
@@ -4040,68 +4040,68 @@ function $f({ data: t, focusOnPlot: e = !1, colorIdx: n = 0, orientation: r = "v
|
|
|
4040
4040
|
);
|
|
4041
4041
|
}
|
|
4042
4042
|
function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipFormat: r }) {
|
|
4043
|
-
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width:
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
}, [
|
|
4047
|
-
const
|
|
4048
|
-
|
|
4049
|
-
let
|
|
4050
|
-
return
|
|
4051
|
-
|
|
4052
|
-
},
|
|
4053
|
-
clearTimeout(
|
|
4043
|
+
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: _ } = f, [j, K] = ct(null), [T, q] = ct(!1), [k, A] = ct("all"), [O, V] = ct(!1), [J, Z] = ct(""), [W, B] = ct(!1), C = Tn(), L = t;
|
|
4044
|
+
vt(() => {
|
|
4045
|
+
A("all"), q(!0), B(!1);
|
|
4046
|
+
}, [L]);
|
|
4047
|
+
const w = 750;
|
|
4048
|
+
vt(() => {
|
|
4049
|
+
let D;
|
|
4050
|
+
return T && (D = setTimeout(() => {
|
|
4051
|
+
q(!1);
|
|
4052
|
+
}, w + 500)), () => {
|
|
4053
|
+
clearTimeout(D);
|
|
4054
4054
|
};
|
|
4055
|
-
}, [
|
|
4056
|
-
const
|
|
4057
|
-
if (
|
|
4058
|
-
const P =
|
|
4059
|
-
const
|
|
4055
|
+
}, [T]);
|
|
4056
|
+
const E = [p, _, k, e], d = Mt(L), R = d.length === 0 ? [] : Object.keys(d[0]).filter((D) => D !== "label" && D !== "total"), M = Ae(R), N = p > 576, x = Et((D) => {
|
|
4057
|
+
if (T) return;
|
|
4058
|
+
const P = N ? 80 : 50, F = function(tt) {
|
|
4059
|
+
const z = rt[N ? "legend-container" : "legend-container-sm"], g = rt[N ? "legend-container-active" : "legend-container-active-sm"], y = rt[N ? "legend-container-inactive" : "legend-container-inactive-sm"];
|
|
4060
4060
|
return `
|
|
4061
|
-
${
|
|
4061
|
+
${k.includes(tt) ? k === tt ? g : y : z}
|
|
4062
4062
|
legend-item
|
|
4063
4063
|
`;
|
|
4064
4064
|
};
|
|
4065
|
-
|
|
4066
|
-
(
|
|
4067
|
-
const
|
|
4068
|
-
return
|
|
4069
|
-
const
|
|
4070
|
-
return xt(
|
|
4071
|
-
}),
|
|
4065
|
+
D.selectAll(".legend-item").data([...R], (tt) => tt).join(
|
|
4066
|
+
(tt) => {
|
|
4067
|
+
const z = tt.append("div").attr("class", F).style("left", (g, y) => `${y * P}px`).style("top", "-53px").style("opacity", 0);
|
|
4068
|
+
return z.append("div").attr("class", rt["legend-rect"]).style("background", (g) => {
|
|
4069
|
+
const y = M.current.findIndex((b) => b === g) + e;
|
|
4070
|
+
return xt(y);
|
|
4071
|
+
}), z.append("span").attr("class", rt["legend-label"]).text((g) => g), z.transition().duration(w).style("top", "0px").style("opacity", 1), z;
|
|
4072
4072
|
},
|
|
4073
|
-
(
|
|
4074
|
-
const
|
|
4075
|
-
return xt(
|
|
4076
|
-
}),
|
|
4077
|
-
(
|
|
4078
|
-
).on("click", (
|
|
4079
|
-
|
|
4080
|
-
}).on("mouseover", (
|
|
4081
|
-
|
|
4082
|
-
}).on("mouseout", (
|
|
4083
|
-
|
|
4073
|
+
(tt) => (tt.attr("class", F).transition().duration(w).style("top", "0px").style("left", (z, g) => `${g * P}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (z) => {
|
|
4074
|
+
const g = M.current.findIndex((y) => y === z) + e;
|
|
4075
|
+
return xt(g);
|
|
4076
|
+
}), tt.select(`.${rt["legend-label"]}`).text((z) => z), tt),
|
|
4077
|
+
(tt) => tt.transition().duration(w).style("opacity", 0).style("top", "53px").remove().remove()
|
|
4078
|
+
).on("click", (tt, z) => {
|
|
4079
|
+
A((g) => g === z ? (B(!1), "all") : z);
|
|
4080
|
+
}).on("mouseover", (tt, z) => {
|
|
4081
|
+
Z(z);
|
|
4082
|
+
}).on("mouseout", (tt, z) => {
|
|
4083
|
+
Z("");
|
|
4084
4084
|
});
|
|
4085
|
-
}, [...
|
|
4085
|
+
}, [...E, R, T]), S = /* @__PURE__ */ H.jsxs(
|
|
4086
4086
|
"div",
|
|
4087
4087
|
{
|
|
4088
4088
|
ref: c,
|
|
4089
|
-
className: `${
|
|
4089
|
+
className: `${et[N ? "controls-container" : "controls-container-sm"]} ${C ? et["fill-container"] : ""}`,
|
|
4090
4090
|
children: [
|
|
4091
|
-
/* @__PURE__ */
|
|
4092
|
-
/* @__PURE__ */
|
|
4091
|
+
/* @__PURE__ */ H.jsxs("label", { className: `${et["controls-label"]} ${k === "all" ? et.disabled : ""}`, style: { paddingRight: "12px" }, children: [
|
|
4092
|
+
/* @__PURE__ */ H.jsx(
|
|
4093
4093
|
"input",
|
|
4094
4094
|
{
|
|
4095
4095
|
type: "checkbox",
|
|
4096
|
-
className: `${
|
|
4096
|
+
className: `${et["controls-checkbox"]}`,
|
|
4097
4097
|
checked: W,
|
|
4098
|
-
onChange: (
|
|
4099
|
-
disabled:
|
|
4098
|
+
onChange: (D) => B(D.target.checked),
|
|
4099
|
+
disabled: k === "all"
|
|
4100
4100
|
}
|
|
4101
4101
|
),
|
|
4102
4102
|
"Sort"
|
|
4103
4103
|
] }),
|
|
4104
|
-
/* @__PURE__ */
|
|
4104
|
+
/* @__PURE__ */ H.jsx(
|
|
4105
4105
|
"div",
|
|
4106
4106
|
{
|
|
4107
4107
|
ref: x,
|
|
@@ -4111,131 +4111,131 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
|
|
|
4111
4111
|
)
|
|
4112
4112
|
]
|
|
4113
4113
|
}
|
|
4114
|
-
),
|
|
4115
|
-
if (
|
|
4114
|
+
), m = Et((D) => {
|
|
4115
|
+
if (p === 0 || _ === 0 || J !== "" && T) return;
|
|
4116
4116
|
const P = { top: 20, right: 30, bottom: 30, left: 40 };
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
const
|
|
4120
|
-
return it + (typeof
|
|
4117
|
+
d.forEach(function(Y) {
|
|
4118
|
+
Y.total = R.reduce((it, st) => {
|
|
4119
|
+
const I = Y[st];
|
|
4120
|
+
return it + (typeof I == "number" ? I : Number(I));
|
|
4121
4121
|
}, 0);
|
|
4122
4122
|
});
|
|
4123
|
-
const
|
|
4124
|
-
return Number(
|
|
4125
|
-
}) :
|
|
4126
|
-
|
|
4127
|
-
const
|
|
4128
|
-
return
|
|
4129
|
-
}),
|
|
4130
|
-
|
|
4131
|
-
(
|
|
4132
|
-
Object.entries(
|
|
4123
|
+
const F = d, Q = W ? Mt(F).sort(function(Y, it) {
|
|
4124
|
+
return Number(Y[k]) - Number(it[k]);
|
|
4125
|
+
}) : F, tt = p - P.left - P.right, z = _ - P.top - P.bottom, g = D.select("svg"), y = g.node(), b = g.select(".plot-area").attr("transform", "translate(" + P.left + "," + P.top + ")"), v = Ye(D).style("opacity", 0);
|
|
4126
|
+
j === null && K(Mt(d));
|
|
4127
|
+
const U = k === "all", nt = !N && n === "vertical" ? rt.rotatedAxisText : rt.axisText, ot = Q.map(function(Y) {
|
|
4128
|
+
return Y.label;
|
|
4129
|
+
}), lt = $e().domain(ot).rangeRound(n === "vertical" ? [0, tt] : [z, 0]).paddingInner(U ? 0.15 : N ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), pt = k === "all" ? Yt(
|
|
4130
|
+
d,
|
|
4131
|
+
(Y) => Yt(
|
|
4132
|
+
Object.entries(Y).filter(([it]) => it !== "total" && it !== "label").map(([, it]) => it)
|
|
4133
4133
|
// value is number | string | undefined
|
|
4134
4134
|
)
|
|
4135
|
-
) : Yt(
|
|
4136
|
-
|
|
4137
|
-
const
|
|
4138
|
-
|
|
4139
|
-
const
|
|
4140
|
-
(
|
|
4141
|
-
const it =
|
|
4142
|
-
...
|
|
4143
|
-
key: `${it} - ${
|
|
4135
|
+
) : Yt(d, (Y) => Y[k]), ft = le().domain([0, pt ?? 0]).range(n === "vertical" ? [z, 0] : [0, tt]), ut = n === "vertical" ? Gt(lt).tickValues(lt.domain()).tickSizeOuter(0) : Gt(ft).ticks(4, "s").tickSizeOuter(0).tickSize(-z);
|
|
4136
|
+
b.select(".x-axis").attr("transform", `translate(0,${z})`).transition().duration(w).call(ut).selectAll("text").style("cursor", "pointer").attr("dy", N ? "1em" : ".20em").attr("dx", N ? "0em" : "-.8em").attr("class", nt).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
|
|
4137
|
+
const _t = n === "vertical" ? Zt(ft).ticks(4, "s").tickSize(-tt) : Zt(lt).tickSizeOuter(0);
|
|
4138
|
+
b.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(w).call(_t).selectAll(".tick").filter((Y) => Y === 0).select("line").remove();
|
|
4139
|
+
const Be = bn().keys(R)(Q).map(
|
|
4140
|
+
(Y) => {
|
|
4141
|
+
const it = Y.key, st = Y.map((I) => ({
|
|
4142
|
+
...I,
|
|
4143
|
+
key: `${it} - ${I.data.label}`,
|
|
4144
4144
|
barKey: it
|
|
4145
4145
|
}));
|
|
4146
4146
|
return st.key = it, st;
|
|
4147
4147
|
}
|
|
4148
|
-
), de = (
|
|
4149
|
-
${J ===
|
|
4150
|
-
let pe =
|
|
4151
|
-
return
|
|
4148
|
+
), de = (Y) => J !== "" ? `rect
|
|
4149
|
+
${J === Y.barKey ? rt.rectLegendHovered : rt.rectLegendNotHovered}` : `rect ${rt.rect}`;
|
|
4150
|
+
let pe = b.selectAll(".serie").data(Be, function(Y) {
|
|
4151
|
+
return Y.key;
|
|
4152
4152
|
}).join(
|
|
4153
|
-
(
|
|
4154
|
-
const
|
|
4155
|
-
return xt(
|
|
4156
|
-
}).style("opacity", (st) =>
|
|
4157
|
-
(
|
|
4158
|
-
const
|
|
4159
|
-
return xt(
|
|
4160
|
-
}).style("opacity", (st) =>
|
|
4161
|
-
(
|
|
4153
|
+
(Y) => Y.append("g").attr("class", "serie").attr("fill", function(st) {
|
|
4154
|
+
const I = M.current.findIndex((at) => at === st.key) + e;
|
|
4155
|
+
return xt(I);
|
|
4156
|
+
}).style("opacity", (st) => k === "all" || st.key === k ? 1 : 0).style("pointer-events", (st) => k === "all" || st.key === k ? "auto" : "none"),
|
|
4157
|
+
(Y) => Y.transition().duration(w).attr("fill", function(st) {
|
|
4158
|
+
const I = M.current.findIndex((at) => at === st.key) + e;
|
|
4159
|
+
return xt(I);
|
|
4160
|
+
}).style("opacity", (st) => k === "all" || st.key === k ? 1 : 0).style("pointer-events", (st) => k === "all" || st.key === k ? "auto" : "none"),
|
|
4161
|
+
(Y) => Y.transition().duration(w).style("opacity", 0).attr("fill", "grey").selectAll("rect").attr("y", z).attr("height", 0).remove()
|
|
4162
4162
|
);
|
|
4163
|
-
const Qt = (
|
|
4164
|
-
const it =
|
|
4165
|
-
if (
|
|
4166
|
-
const st =
|
|
4167
|
-
return it + st * (
|
|
4163
|
+
const Qt = (Y) => {
|
|
4164
|
+
const it = lt(Y.data.label + "") ?? 0;
|
|
4165
|
+
if (k === "all") {
|
|
4166
|
+
const st = R.indexOf(Y.barKey) || 0;
|
|
4167
|
+
return it + st * (lt.bandwidth() / R.length);
|
|
4168
4168
|
}
|
|
4169
4169
|
return it;
|
|
4170
|
-
},
|
|
4171
|
-
const it = n === "vertical" ? ft(
|
|
4170
|
+
}, Xt = () => k === "all" ? lt.bandwidth() / R.length : lt.bandwidth(), Kt = (Y) => n === "vertical" ? z - (ft(Y[0]) - ft(Y[1])) : ft(0), Ut = (Y) => {
|
|
4171
|
+
const it = n === "vertical" ? ft(Y[0]) - ft(Y[1]) : ft(Y[1]) - ft(Y[0]);
|
|
4172
4172
|
return isNaN(it) || it < 0 ? 0 : it;
|
|
4173
|
-
},
|
|
4173
|
+
}, qt = (Y) => n === "vertical" ? Qt(Y) : Kt(Y), Lt = (Y) => n === "vertical" ? Xt() : Ut(Y), Tt = (Y) => n === "vertical" ? Kt(Y) : Qt(Y), $t = (Y) => n === "vertical" ? Ut(Y) : Xt();
|
|
4174
4174
|
pe.selectAll("rect").data(
|
|
4175
|
-
(
|
|
4176
|
-
(
|
|
4175
|
+
(Y) => Y,
|
|
4176
|
+
(Y) => Y.data.label
|
|
4177
4177
|
).join(
|
|
4178
|
-
(
|
|
4178
|
+
(Y) => {
|
|
4179
4179
|
let it;
|
|
4180
|
-
return it =
|
|
4181
|
-
return n === "vertical" ?
|
|
4180
|
+
return it = Y.append("rect").attr("class", de).attr("x", function(st) {
|
|
4181
|
+
return n === "vertical" ? qt(st) : 0;
|
|
4182
4182
|
}).attr("width", function(st) {
|
|
4183
|
-
return n === "vertical" ?
|
|
4183
|
+
return n === "vertical" ? k === "all" ? lt.bandwidth() / R.length : lt.bandwidth() : 0;
|
|
4184
4184
|
}).attr("y", function(st) {
|
|
4185
|
-
return n === "vertical" ?
|
|
4185
|
+
return n === "vertical" ? z : Tt(st);
|
|
4186
4186
|
}).attr("height", function(st) {
|
|
4187
|
-
return n === "vertical" ? 0 :
|
|
4188
|
-
}).transition().duration(
|
|
4187
|
+
return n === "vertical" ? 0 : k === "all" ? lt.bandwidth() / R.length : lt.bandwidth();
|
|
4188
|
+
}).transition().duration(w).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), it;
|
|
4189
4189
|
},
|
|
4190
4190
|
void 0,
|
|
4191
|
-
(
|
|
4192
|
-
).attr("class", de).transition().duration(
|
|
4193
|
-
ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((
|
|
4194
|
-
const st = it.data[it.barKey], { total:
|
|
4195
|
-
fe(".1f")(at) + "",
|
|
4196
|
-
|
|
4191
|
+
(Y) => Y.attr("fill", Ft).transition().duration(w).attr("opacity", 0).attr("height", 0).attr("y", z + P.bottom).remove()
|
|
4192
|
+
).attr("class", de).transition().duration(w).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(Y, it) {
|
|
4193
|
+
ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter(($) => $ === it.data.label).attr("class", (n === "vertical" ? nt : "") + " " + rt.hoveredAxisText), v.style("opacity", 1).select("p.title").text(it.data.label);
|
|
4194
|
+
const st = it.data[it.barKey], { total: I } = it.data, at = st / I * 100;
|
|
4195
|
+
fe(".1f")(at) + "", v.select("p.top-label").text(it.barKey + " : " + St(st, r)), v.select("p.bottom-label").text(
|
|
4196
|
+
k === "all" ? `Total : ${St(I, r)}` : "~"
|
|
4197
4197
|
);
|
|
4198
|
-
}).on("touch", function(
|
|
4198
|
+
}).on("touch", function(Y, it) {
|
|
4199
4199
|
ht(".x-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", nt);
|
|
4200
|
-
}).on("mousemove", (
|
|
4201
|
-
Rn(
|
|
4202
|
-
}).on("mouseout", function(
|
|
4203
|
-
ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? nt : ""),
|
|
4200
|
+
}).on("mousemove", (Y, it) => {
|
|
4201
|
+
Rn(v, { e: Y, svg: y, yScale: ft });
|
|
4202
|
+
}).on("mouseout", function(Y, it) {
|
|
4203
|
+
ht(n === "vertical" ? ".x-axis" : ".y-axis").selectAll("text").filter((st) => st === it.data.label).attr("class", n === "vertical" ? nt : ""), v.style("opacity", 0);
|
|
4204
4204
|
});
|
|
4205
|
-
}, [...
|
|
4206
|
-
return /* @__PURE__ */
|
|
4205
|
+
}, [...E, W, d, R, J, O, n, T, r]);
|
|
4206
|
+
return /* @__PURE__ */ H.jsxs(
|
|
4207
4207
|
"div",
|
|
4208
4208
|
{
|
|
4209
4209
|
ref: i,
|
|
4210
4210
|
style: { width: s, height: o, display: "flex", flexDirection: "column" },
|
|
4211
4211
|
children: [
|
|
4212
|
-
|
|
4213
|
-
/* @__PURE__ */
|
|
4212
|
+
C ? kn(S, C) : S,
|
|
4213
|
+
/* @__PURE__ */ H.jsx(
|
|
4214
4214
|
"div",
|
|
4215
4215
|
{
|
|
4216
4216
|
ref: h,
|
|
4217
|
-
className: `${
|
|
4217
|
+
className: `${et["fill-container"]}`,
|
|
4218
4218
|
style: { display: "flex", flexDirection: "column" },
|
|
4219
|
-
children: /* @__PURE__ */
|
|
4219
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4220
4220
|
"div",
|
|
4221
4221
|
{
|
|
4222
|
-
ref:
|
|
4223
|
-
className: `${
|
|
4222
|
+
ref: m,
|
|
4223
|
+
className: `${et["fill-container"]}`,
|
|
4224
4224
|
style: { display: "flex", flexDirection: "column" },
|
|
4225
4225
|
children: [
|
|
4226
|
-
/* @__PURE__ */
|
|
4226
|
+
/* @__PURE__ */ H.jsx(
|
|
4227
4227
|
"svg",
|
|
4228
4228
|
{
|
|
4229
|
-
className: `${
|
|
4230
|
-
viewBox: `0 0 ${
|
|
4231
|
-
children:
|
|
4232
|
-
/* @__PURE__ */
|
|
4233
|
-
/* @__PURE__ */
|
|
4234
|
-
/* @__PURE__ */
|
|
4229
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
4230
|
+
viewBox: `0 0 ${p} ${_}`,
|
|
4231
|
+
children: p > 0 && /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
|
|
4232
|
+
/* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
|
|
4233
|
+
/* @__PURE__ */ H.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
|
|
4234
|
+
/* @__PURE__ */ H.jsx("g", { className: `${n === "horizontal" ? rt["value-axis"] : ""} x-axis` })
|
|
4235
4235
|
] })
|
|
4236
4236
|
}
|
|
4237
4237
|
),
|
|
4238
|
-
/* @__PURE__ */
|
|
4238
|
+
/* @__PURE__ */ H.jsx(We, { pCount: 3 })
|
|
4239
4239
|
]
|
|
4240
4240
|
}
|
|
4241
4241
|
)
|
|
@@ -4246,203 +4246,203 @@ function Af({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipForm
|
|
|
4246
4246
|
);
|
|
4247
4247
|
}
|
|
4248
4248
|
function Nf({ data: t, colorIdx: e = 0, orientation: n = "vertical", tooltipFormat: r }) {
|
|
4249
|
-
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width:
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
}, [
|
|
4249
|
+
const [i, a] = he(), { width: s, height: o } = a, [c, l] = ce(), { height: u } = l, [h, f] = ce(), { width: p, height: _ } = f, [j, K] = ct(""), [T, q] = ct(!0), [k, A] = ct(!1), [O, V] = ct("all"), J = Tn(), Z = t;
|
|
4250
|
+
vt(() => {
|
|
4251
|
+
V("all"), q(!0), A(!0);
|
|
4252
|
+
}, [Z]);
|
|
4253
4253
|
const W = 750;
|
|
4254
|
-
|
|
4255
|
-
let
|
|
4256
|
-
return
|
|
4257
|
-
|
|
4254
|
+
vt(() => {
|
|
4255
|
+
let N;
|
|
4256
|
+
return k && (N = setTimeout(() => {
|
|
4257
|
+
A(!1);
|
|
4258
4258
|
}, W + 500)), () => {
|
|
4259
|
-
clearTimeout(
|
|
4259
|
+
clearTimeout(N);
|
|
4260
4260
|
};
|
|
4261
|
-
}, [
|
|
4262
|
-
const
|
|
4263
|
-
if (
|
|
4264
|
-
const x =
|
|
4265
|
-
const P = rt[
|
|
4261
|
+
}, [k]);
|
|
4262
|
+
const B = [p, _, O, e], C = Mt(Z), L = C.length === 0 ? [] : Object.keys(C[0]).filter((N) => N !== "label" && N !== "total"), w = Ae(L), E = p > 576, d = Et((N) => {
|
|
4263
|
+
if (k) return;
|
|
4264
|
+
const x = E ? 80 : 50, S = function(D) {
|
|
4265
|
+
const P = rt[E ? "legend-container" : "legend-container-sm"], F = rt[E ? "legend-container-active" : "legend-container-active-sm"], Q = rt[E ? "legend-container-inactive" : "legend-container-inactive-sm"];
|
|
4266
4266
|
return `
|
|
4267
|
-
${
|
|
4267
|
+
${O.includes(D) ? O === D ? F : Q : P}
|
|
4268
4268
|
legend-item
|
|
4269
4269
|
`;
|
|
4270
4270
|
};
|
|
4271
|
-
|
|
4272
|
-
(
|
|
4273
|
-
const P =
|
|
4274
|
-
return P.append("div").attr("class", rt["legend-rect"]).style("background", (
|
|
4275
|
-
const
|
|
4276
|
-
return xt(
|
|
4277
|
-
}), P.append("span").attr("class", rt["legend-label"]).text((
|
|
4271
|
+
N.selectAll(".legend-item").data([...L], (D) => D).join(
|
|
4272
|
+
(D) => {
|
|
4273
|
+
const P = D.append("div").attr("class", S).style("left", (F, Q) => `${Q * x}px`).style("top", "-53px").style("opacity", 0);
|
|
4274
|
+
return P.append("div").attr("class", rt["legend-rect"]).style("background", (F) => {
|
|
4275
|
+
const Q = w.current.findIndex((tt) => tt === F) + e;
|
|
4276
|
+
return xt(Q);
|
|
4277
|
+
}), P.append("span").attr("class", rt["legend-label"]).text((F) => F), P.transition().duration(W).style("top", "0px").style("opacity", 1), P;
|
|
4278
4278
|
},
|
|
4279
|
-
(
|
|
4280
|
-
const
|
|
4281
|
-
return xt(
|
|
4282
|
-
}),
|
|
4283
|
-
(
|
|
4284
|
-
).on("mouseover", (
|
|
4279
|
+
(D) => (D.attr("class", S).transition().duration(W).style("top", "0px").style("left", (P, F) => `${F * x}px`).style("opacity", 1).select(`.${rt["legend-rect"]}`).style("background", (P) => {
|
|
4280
|
+
const F = w.current.findIndex((Q) => Q === P) + e;
|
|
4281
|
+
return xt(F);
|
|
4282
|
+
}), D.select(`.${rt["legend-label"]}`).text((P) => P), D),
|
|
4283
|
+
(D) => D.transition().duration(W).style("opacity", 0).style("top", "53px").remove().remove().remove()
|
|
4284
|
+
).on("mouseover", (D, P) => {
|
|
4285
4285
|
K(P);
|
|
4286
|
-
}).on("mouseout", function(
|
|
4286
|
+
}).on("mouseout", function(D) {
|
|
4287
4287
|
K("");
|
|
4288
4288
|
});
|
|
4289
|
-
}, [...
|
|
4289
|
+
}, [...B, L, k]), R = /* @__PURE__ */ H.jsxs(
|
|
4290
4290
|
"div",
|
|
4291
4291
|
{
|
|
4292
4292
|
ref: c,
|
|
4293
|
-
className: `${
|
|
4293
|
+
className: `${et["controls-container"]} ${J ? et["fill-container"] : ""}`,
|
|
4294
4294
|
children: [
|
|
4295
|
-
/* @__PURE__ */
|
|
4296
|
-
/* @__PURE__ */
|
|
4295
|
+
/* @__PURE__ */ H.jsxs("label", { className: et["controls-label"], style: { paddingRight: "12px" }, children: [
|
|
4296
|
+
/* @__PURE__ */ H.jsx(
|
|
4297
4297
|
"input",
|
|
4298
4298
|
{
|
|
4299
4299
|
type: "checkbox",
|
|
4300
|
-
className:
|
|
4301
|
-
checked:
|
|
4302
|
-
onChange: (
|
|
4300
|
+
className: et["controls-checkbox"],
|
|
4301
|
+
checked: T,
|
|
4302
|
+
onChange: (N) => q(N.target.checked)
|
|
4303
4303
|
}
|
|
4304
4304
|
),
|
|
4305
4305
|
"Percentage"
|
|
4306
4306
|
] }),
|
|
4307
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ H.jsx(
|
|
4308
4308
|
"div",
|
|
4309
4309
|
{
|
|
4310
|
-
ref:
|
|
4310
|
+
ref: d,
|
|
4311
4311
|
id: "stacked-barchart-legends",
|
|
4312
4312
|
className: `${rt["legends-container"]}`
|
|
4313
4313
|
}
|
|
4314
4314
|
)
|
|
4315
4315
|
]
|
|
4316
4316
|
}
|
|
4317
|
-
), M = Et((
|
|
4318
|
-
if (
|
|
4317
|
+
), M = Et((N) => {
|
|
4318
|
+
if (p === 0 || _ === 0 || j !== "" && k) return;
|
|
4319
4319
|
const x = { top: 20, right: 30, bottom: 30, left: 40 };
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
const G =
|
|
4320
|
+
C.forEach(function(I) {
|
|
4321
|
+
I.total = L.reduce((at, $) => {
|
|
4322
|
+
const G = I[$];
|
|
4323
4323
|
return at + (typeof G == "number" ? G : Number(G));
|
|
4324
4324
|
}, 0);
|
|
4325
4325
|
});
|
|
4326
|
-
const
|
|
4327
|
-
return
|
|
4328
|
-
}),
|
|
4329
|
-
return
|
|
4326
|
+
const m = C.filter((I) => I?.total && I.total > 0), D = p - x.left - x.right, P = _ - x.top - x.bottom, F = N.select("svg"), Q = F.node(), tt = F.select(".plot-area").attr("transform", "translate(" + x.left + "," + x.top + ")"), z = Ye(N).style("opacity", 0), g = !E && n === "vertical" ? rt.rotatedAxisText : rt.axisText, y = m.map(function(I) {
|
|
4327
|
+
return I.label;
|
|
4328
|
+
}), b = $e().domain(y).rangeRound(n === "vertical" ? [0, D] : [P, 0]).paddingInner(E ? 0.4 : 0.25).paddingOuter(0.2).align(0.2), v = Yt(C, (I) => I.total), U = le().domain([0, T ? 1 : v || 0]).nice().range(n === "vertical" ? [P, 0] : [0, D]), nt = $e().rangeRound([0, D]).paddingInner(0.1).align(0.2), ot = m.map(function(I) {
|
|
4329
|
+
return I.label;
|
|
4330
4330
|
});
|
|
4331
|
-
nt.domain(
|
|
4332
|
-
const
|
|
4333
|
-
|
|
4334
|
-
const ft = Yt(
|
|
4335
|
-
|
|
4336
|
-
const
|
|
4337
|
-
const at =
|
|
4338
|
-
const
|
|
4331
|
+
nt.domain(ot);
|
|
4332
|
+
const lt = [], pt = n === "vertical" ? Gt(b).tickValues(b.domain()).tickSizeOuter(0) : Gt(U).ticks(4, T ? ".0%" : "s").tickSizeOuter(0).tickSize(-P);
|
|
4333
|
+
tt.select(".x-axis").attr("transform", `translate(0,${P})`).transition().duration(W).call(pt).selectAll("text").style("cursor", "pointer").attr("dy", E ? "1em" : ".20em").attr("dx", E ? "0em" : "-.8em").attr("class", g).selectAll(".tick").filter((I) => I === 0).select("line").remove();
|
|
4334
|
+
const ft = Yt(C, (I) => I.total), ut = le().domain([0, T ? 1 : ft || 0]).nice().range([P, 0]), _t = n === "vertical" ? Zt(U).ticks(4, T ? ".0%" : "s").tickSize(-D) : Zt(b).tickSizeOuter(0);
|
|
4335
|
+
tt.select(".y-axis").attr("transform", "translate(0,0)").transition().duration(W).call(_t).selectAll(".tick").filter((I) => I === 0).select("line").remove();
|
|
4336
|
+
const Ot = bn().order(ir).offset($u), de = (T ? Ot.keys(L)(m) : bn().keys(L)(m)).map((I) => {
|
|
4337
|
+
const at = I.key, $ = I.map((G) => {
|
|
4338
|
+
const X = G.data.label;
|
|
4339
4339
|
return {
|
|
4340
4340
|
...G,
|
|
4341
|
-
key: `${at} - ${
|
|
4341
|
+
key: `${at} - ${X}`,
|
|
4342
4342
|
barKey: at
|
|
4343
4343
|
};
|
|
4344
4344
|
});
|
|
4345
|
-
return
|
|
4345
|
+
return $.key = at, $;
|
|
4346
4346
|
});
|
|
4347
|
-
let pe =
|
|
4348
|
-
return
|
|
4347
|
+
let pe = tt.selectAll(".serie").data(de, function(I) {
|
|
4348
|
+
return I.key;
|
|
4349
4349
|
}).join(
|
|
4350
|
-
(
|
|
4351
|
-
const G =
|
|
4350
|
+
(I) => I.append("g").attr("class", "serie").attr("fill", function($) {
|
|
4351
|
+
const G = w.current.findIndex((X) => X === $.key) + e;
|
|
4352
4352
|
return xt(G);
|
|
4353
4353
|
}).style("opacity", 1).style("pointer-events", "auto"),
|
|
4354
|
-
(
|
|
4355
|
-
const G =
|
|
4354
|
+
(I) => I.transition().duration(W).attr("fill", function($) {
|
|
4355
|
+
const G = w.current.findIndex((X) => X === $.key) + e;
|
|
4356
4356
|
return xt(G);
|
|
4357
4357
|
}).style("opacity", 1).style("pointer-events", "auto"),
|
|
4358
|
-
(
|
|
4358
|
+
(I) => I.transition().duration(W).style("opacity", 0).attr("fill", Ft).selectAll("rect").attr("y", P).attr("height", 0).remove()
|
|
4359
4359
|
);
|
|
4360
|
-
const Qt = (
|
|
4361
|
-
const at = n === "vertical" ?
|
|
4360
|
+
const Qt = (I) => b(I.data.label + "") ?? 0, Xt = b.bandwidth(), Kt = (I) => U(n === "vertical" ? I[1] : I[0]), Ut = (I) => {
|
|
4361
|
+
const at = n === "vertical" ? U(I[0]) - U(I[1]) : U(I[1]) - U(I[0]);
|
|
4362
4362
|
return isNaN(at) || at < 0 ? 0 : at;
|
|
4363
|
-
},
|
|
4364
|
-
function
|
|
4365
|
-
if (
|
|
4363
|
+
}, qt = (I) => n === "vertical" ? Qt(I) : Kt(I), Lt = (I) => n === "vertical" ? Xt : Ut(I), Tt = (I) => n === "vertical" ? Kt(I) : Qt(I), $t = (I) => n === "vertical" ? Ut(I) : Xt;
|
|
4364
|
+
function Y(I) {
|
|
4365
|
+
if (I.barKey === j)
|
|
4366
4366
|
return "none";
|
|
4367
|
-
const at = Lt(
|
|
4368
|
-
return
|
|
4367
|
+
const at = Lt(I), $ = $t(I);
|
|
4368
|
+
return L.indexOf(I.barKey) === L.length - 1 || I.barKey === O[0] ? n === "vertical" ? `${at + $} ${at} ${$}` : `${at + $ + at}` : n === "vertical" ? `${$} ${at}` : `${at} ${$}`;
|
|
4369
4369
|
}
|
|
4370
|
-
function it(
|
|
4371
|
-
const at = Lt(
|
|
4372
|
-
return n === "vertical" ?
|
|
4370
|
+
function it(I) {
|
|
4371
|
+
const at = Lt(I), $ = L.indexOf(I.barKey) === L.length - 1;
|
|
4372
|
+
return n === "vertical" ? $ ? 0 : at * -1 : 0;
|
|
4373
4373
|
}
|
|
4374
|
-
const st = (
|
|
4374
|
+
const st = (I) => j !== "" && j === I.barKey ? `rect ${rt.rectLegendHovered}` : `rect ${rt.rect}`;
|
|
4375
4375
|
pe.selectAll("rect").data(
|
|
4376
|
-
(
|
|
4377
|
-
(
|
|
4376
|
+
(I) => I,
|
|
4377
|
+
(I) => I.data.label
|
|
4378
4378
|
).join(
|
|
4379
|
-
(
|
|
4379
|
+
(I) => {
|
|
4380
4380
|
let at;
|
|
4381
|
-
return at =
|
|
4382
|
-
return n === "vertical" ? nt(
|
|
4383
|
-
}).attr("width", function(
|
|
4384
|
-
return n === "vertical" ?
|
|
4385
|
-
}).attr("y", function(
|
|
4381
|
+
return at = I.append("rect").attr("class", st).attr("x", function($) {
|
|
4382
|
+
return n === "vertical" ? nt($.data.label + "") ?? 0 : U(0);
|
|
4383
|
+
}).attr("width", function($) {
|
|
4384
|
+
return n === "vertical" ? b.bandwidth() : 0;
|
|
4385
|
+
}).attr("y", function($) {
|
|
4386
4386
|
if (n === "vertical") {
|
|
4387
|
-
if (!
|
|
4387
|
+
if (!lt.includes($.data.label + ""))
|
|
4388
4388
|
return P;
|
|
4389
|
-
const G =
|
|
4389
|
+
const G = U($[1]), X = U($[0]) - U($[1]), gt = isNaN(X) || X < 0 ? 0 : X;
|
|
4390
4390
|
return G + gt;
|
|
4391
4391
|
} else
|
|
4392
|
-
return Tt(
|
|
4393
|
-
}).attr("height", function(
|
|
4394
|
-
return n === "vertical" ? 0 : $t(
|
|
4395
|
-
}).attr("stroke-dasharray",
|
|
4392
|
+
return Tt($);
|
|
4393
|
+
}).attr("height", function($) {
|
|
4394
|
+
return n === "vertical" ? 0 : $t($);
|
|
4395
|
+
}).attr("stroke-dasharray", Y).attr("stroke-dashoffset", it).transition().duration(W).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), at;
|
|
4396
4396
|
},
|
|
4397
4397
|
void 0,
|
|
4398
|
-
(
|
|
4399
|
-
).attr("class", st).attr("stroke-dasharray",
|
|
4400
|
-
ht(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class",
|
|
4401
|
-
const
|
|
4402
|
-
|
|
4403
|
-
|
|
4398
|
+
(I) => I.transition().duration(W).attr("opacity", 0).attr("height", 0).attr("y", P).remove()
|
|
4399
|
+
).attr("class", st).attr("stroke-dasharray", Y).attr("stroke-dashoffset", it).transition().duration(W).attr("x", qt).attr("width", Lt).attr("height", $t).attr("y", Tt), pe.selectAll("rect").on("mouseover", function(I, at) {
|
|
4400
|
+
ht(".x-axis").selectAll("text").filter((bt) => bt === at.data.name).attr("class", g + " " + et.hoveredAxisText), z.style("opacity", 1).select("p.title").text(at.data.label);
|
|
4401
|
+
const $ = at.data[at.barKey] || 0, G = at.data.total || 0, X = $ / G * 100, gt = fe(".1f")(X) + "%";
|
|
4402
|
+
z.select("p.top-label").text(at.barKey + " : " + (T ? gt : St($, r))), z.select("p.bottom-label").text(
|
|
4403
|
+
T ? `(${St($, r)} of ${St(G, r)})` : `Total : ${St(G, r)}`
|
|
4404
4404
|
);
|
|
4405
|
-
}).on("touch", function(
|
|
4406
|
-
ht(".x-axis").selectAll("text").filter((
|
|
4407
|
-
}).on("mousemove", (
|
|
4408
|
-
Rn(
|
|
4409
|
-
}).on("mouseout", function(
|
|
4410
|
-
ht(".x-axis").selectAll("text").filter((
|
|
4405
|
+
}).on("touch", function(I, at) {
|
|
4406
|
+
ht(".x-axis").selectAll("text").filter(($) => $ === at.data.label).attr("class", g);
|
|
4407
|
+
}).on("mousemove", (I, at) => {
|
|
4408
|
+
Rn(z, { e: I, svg: Q, yScale: ut });
|
|
4409
|
+
}).on("mouseout", function(I, at) {
|
|
4410
|
+
ht(".x-axis").selectAll("text").filter(($) => $ === at.data.name).attr("class", g), z.style("opacity", 0);
|
|
4411
4411
|
});
|
|
4412
|
-
}, [...
|
|
4413
|
-
return /* @__PURE__ */
|
|
4412
|
+
}, [...B, C, L, T, j, n, k, r]);
|
|
4413
|
+
return /* @__PURE__ */ H.jsxs(
|
|
4414
4414
|
"div",
|
|
4415
4415
|
{
|
|
4416
4416
|
ref: i,
|
|
4417
4417
|
style: { width: s, height: o, display: "flex", flexDirection: "column" },
|
|
4418
4418
|
children: [
|
|
4419
|
-
J ? kn(
|
|
4420
|
-
/* @__PURE__ */
|
|
4419
|
+
J ? kn(R, J) : R,
|
|
4420
|
+
/* @__PURE__ */ H.jsx(
|
|
4421
4421
|
"div",
|
|
4422
4422
|
{
|
|
4423
4423
|
ref: h,
|
|
4424
|
-
className: `${
|
|
4424
|
+
className: `${et["fill-container"]}`,
|
|
4425
4425
|
style: { display: "flex", flexDirection: "column" },
|
|
4426
|
-
children: /* @__PURE__ */
|
|
4426
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4427
4427
|
"div",
|
|
4428
4428
|
{
|
|
4429
4429
|
ref: M,
|
|
4430
|
-
className: `${
|
|
4430
|
+
className: `${et["fill-container"]}`,
|
|
4431
4431
|
style: { display: "flex", flexDirection: "column" },
|
|
4432
4432
|
children: [
|
|
4433
|
-
/* @__PURE__ */
|
|
4433
|
+
/* @__PURE__ */ H.jsx(
|
|
4434
4434
|
"svg",
|
|
4435
4435
|
{
|
|
4436
|
-
className: `${
|
|
4437
|
-
viewBox: `0 0 ${
|
|
4438
|
-
children: /* @__PURE__ */
|
|
4439
|
-
/* @__PURE__ */
|
|
4440
|
-
/* @__PURE__ */
|
|
4441
|
-
/* @__PURE__ */
|
|
4436
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
4437
|
+
viewBox: `0 0 ${p} ${_}`,
|
|
4438
|
+
children: /* @__PURE__ */ H.jsxs("g", { className: "plot-area", children: [
|
|
4439
|
+
/* @__PURE__ */ H.jsx("g", { className: "plot-rects" }),
|
|
4440
|
+
/* @__PURE__ */ H.jsx("g", { className: `${n === "vertical" ? rt["value-axis"] : ""} y-axis` }),
|
|
4441
|
+
/* @__PURE__ */ H.jsx("g", { className: `${n === "horizontal" ? rt["value-axis"] : ""} x-axis` })
|
|
4442
4442
|
] })
|
|
4443
4443
|
}
|
|
4444
4444
|
),
|
|
4445
|
-
/* @__PURE__ */
|
|
4445
|
+
/* @__PURE__ */ H.jsx(We, { pCount: 3 })
|
|
4446
4446
|
]
|
|
4447
4447
|
}
|
|
4448
4448
|
)
|
|
@@ -4532,195 +4532,195 @@ function si({ nodes: t }) {
|
|
|
4532
4532
|
}
|
|
4533
4533
|
}
|
|
4534
4534
|
function af() {
|
|
4535
|
-
let t = 0, e = 0, n = 1, r = 1, i = 24, a = 8, s, o = ef, c = tf, l, u, h = nf, f = rf,
|
|
4535
|
+
let t = 0, e = 0, n = 1, r = 1, i = 24, a = 8, s, o = ef, c = tf, l, u, h = nf, f = rf, p = 6;
|
|
4536
4536
|
function _() {
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
4537
|
+
const d = { nodes: h.apply(null, arguments), links: f.apply(null, arguments) };
|
|
4538
|
+
return j(d), K(d), T(d), q(d), O(d), si(d), d;
|
|
4539
4539
|
}
|
|
4540
|
-
_.update = function(
|
|
4541
|
-
return si(
|
|
4542
|
-
}, _.nodeId = function(
|
|
4543
|
-
return arguments.length ? (o = typeof
|
|
4544
|
-
}, _.nodeAlign = function(
|
|
4545
|
-
return arguments.length ? (c = typeof
|
|
4546
|
-
}, _.nodeSort = function(
|
|
4547
|
-
return arguments.length ? (l =
|
|
4548
|
-
}, _.nodeWidth = function(
|
|
4549
|
-
return arguments.length ? (i = +
|
|
4550
|
-
}, _.nodePadding = function(
|
|
4551
|
-
return arguments.length ? (a = s = +
|
|
4552
|
-
}, _.nodes = function(
|
|
4553
|
-
return arguments.length ? (h = typeof
|
|
4554
|
-
}, _.links = function(
|
|
4555
|
-
return arguments.length ? (f = typeof
|
|
4556
|
-
}, _.linkSort = function(
|
|
4557
|
-
return arguments.length ? (u =
|
|
4558
|
-
}, _.size = function(
|
|
4559
|
-
return arguments.length ? (t = e = 0, n = +
|
|
4560
|
-
}, _.extent = function(
|
|
4561
|
-
return arguments.length ? (t = +
|
|
4562
|
-
}, _.iterations = function(
|
|
4563
|
-
return arguments.length ? (
|
|
4540
|
+
_.update = function(d) {
|
|
4541
|
+
return si(d), d;
|
|
4542
|
+
}, _.nodeId = function(d) {
|
|
4543
|
+
return arguments.length ? (o = typeof d == "function" ? d : nn(d), _) : o;
|
|
4544
|
+
}, _.nodeAlign = function(d) {
|
|
4545
|
+
return arguments.length ? (c = typeof d == "function" ? d : nn(d), _) : c;
|
|
4546
|
+
}, _.nodeSort = function(d) {
|
|
4547
|
+
return arguments.length ? (l = d, _) : l;
|
|
4548
|
+
}, _.nodeWidth = function(d) {
|
|
4549
|
+
return arguments.length ? (i = +d, _) : i;
|
|
4550
|
+
}, _.nodePadding = function(d) {
|
|
4551
|
+
return arguments.length ? (a = s = +d, _) : a;
|
|
4552
|
+
}, _.nodes = function(d) {
|
|
4553
|
+
return arguments.length ? (h = typeof d == "function" ? d : nn(d), _) : h;
|
|
4554
|
+
}, _.links = function(d) {
|
|
4555
|
+
return arguments.length ? (f = typeof d == "function" ? d : nn(d), _) : f;
|
|
4556
|
+
}, _.linkSort = function(d) {
|
|
4557
|
+
return arguments.length ? (u = d, _) : u;
|
|
4558
|
+
}, _.size = function(d) {
|
|
4559
|
+
return arguments.length ? (t = e = 0, n = +d[0], r = +d[1], _) : [n - t, r - e];
|
|
4560
|
+
}, _.extent = function(d) {
|
|
4561
|
+
return arguments.length ? (t = +d[0][0], n = +d[1][0], e = +d[0][1], r = +d[1][1], _) : [[t, e], [n, r]];
|
|
4562
|
+
}, _.iterations = function(d) {
|
|
4563
|
+
return arguments.length ? (p = +d, _) : p;
|
|
4564
4564
|
};
|
|
4565
|
-
function
|
|
4566
|
-
for (const [
|
|
4567
|
-
x.index =
|
|
4568
|
-
const M = new Map(
|
|
4569
|
-
for (const [
|
|
4570
|
-
x.index =
|
|
4571
|
-
let { source:
|
|
4572
|
-
typeof
|
|
4565
|
+
function j({ nodes: d, links: R }) {
|
|
4566
|
+
for (const [N, x] of d.entries())
|
|
4567
|
+
x.index = N, x.sourceLinks = [], x.targetLinks = [];
|
|
4568
|
+
const M = new Map(d.map((N, x) => [o(N, x, d), N]));
|
|
4569
|
+
for (const [N, x] of R.entries()) {
|
|
4570
|
+
x.index = N;
|
|
4571
|
+
let { source: S, target: m } = x;
|
|
4572
|
+
typeof S != "object" && (S = x.source = ai(M, S)), typeof m != "object" && (m = x.target = ai(M, m)), S.sourceLinks.push(x), m.targetLinks.push(x);
|
|
4573
4573
|
}
|
|
4574
4574
|
if (u != null)
|
|
4575
|
-
for (const { sourceLinks:
|
|
4576
|
-
|
|
4575
|
+
for (const { sourceLinks: N, targetLinks: x } of d)
|
|
4576
|
+
N.sort(u), x.sort(u);
|
|
4577
4577
|
}
|
|
4578
|
-
function K({ nodes:
|
|
4579
|
-
for (const
|
|
4580
|
-
|
|
4578
|
+
function K({ nodes: d }) {
|
|
4579
|
+
for (const R of d)
|
|
4580
|
+
R.value = R.fixedValue === void 0 ? Math.max(Vn(R.sourceLinks, Fn), Vn(R.targetLinks, Fn)) : R.fixedValue;
|
|
4581
4581
|
}
|
|
4582
|
-
function
|
|
4583
|
-
const
|
|
4584
|
-
let M = new Set(
|
|
4582
|
+
function T({ nodes: d }) {
|
|
4583
|
+
const R = d.length;
|
|
4584
|
+
let M = new Set(d), N = /* @__PURE__ */ new Set(), x = 0;
|
|
4585
4585
|
for (; M.size; ) {
|
|
4586
|
-
for (const
|
|
4587
|
-
|
|
4588
|
-
for (const { target:
|
|
4589
|
-
|
|
4586
|
+
for (const S of M) {
|
|
4587
|
+
S.depth = x;
|
|
4588
|
+
for (const { target: m } of S.sourceLinks)
|
|
4589
|
+
N.add(m);
|
|
4590
4590
|
}
|
|
4591
|
-
if (++x >
|
|
4592
|
-
M =
|
|
4591
|
+
if (++x > R) throw new Error("circular link");
|
|
4592
|
+
M = N, N = /* @__PURE__ */ new Set();
|
|
4593
4593
|
}
|
|
4594
4594
|
}
|
|
4595
|
-
function
|
|
4596
|
-
const
|
|
4597
|
-
let M = new Set(
|
|
4595
|
+
function q({ nodes: d }) {
|
|
4596
|
+
const R = d.length;
|
|
4597
|
+
let M = new Set(d), N = /* @__PURE__ */ new Set(), x = 0;
|
|
4598
4598
|
for (; M.size; ) {
|
|
4599
|
-
for (const
|
|
4600
|
-
|
|
4601
|
-
for (const { source:
|
|
4602
|
-
|
|
4599
|
+
for (const S of M) {
|
|
4600
|
+
S.height = x;
|
|
4601
|
+
for (const { source: m } of S.targetLinks)
|
|
4602
|
+
N.add(m);
|
|
4603
4603
|
}
|
|
4604
|
-
if (++x >
|
|
4605
|
-
M =
|
|
4604
|
+
if (++x > R) throw new Error("circular link");
|
|
4605
|
+
M = N, N = /* @__PURE__ */ new Set();
|
|
4606
4606
|
}
|
|
4607
4607
|
}
|
|
4608
|
-
function
|
|
4609
|
-
const
|
|
4610
|
-
for (const x of
|
|
4611
|
-
const
|
|
4612
|
-
x.layer =
|
|
4608
|
+
function k({ nodes: d }) {
|
|
4609
|
+
const R = ni(d, (x) => x.depth) + 1, M = (n - t - i) / (R - 1), N = new Array(R);
|
|
4610
|
+
for (const x of d) {
|
|
4611
|
+
const S = Math.max(0, Math.min(R - 1, Math.floor(c.call(null, x, R))));
|
|
4612
|
+
x.layer = S, x.x0 = t + S * M, x.x1 = x.x0 + i, N[S] ? N[S].push(x) : N[S] = [x];
|
|
4613
4613
|
}
|
|
4614
|
-
if (l) for (const x of
|
|
4614
|
+
if (l) for (const x of N)
|
|
4615
4615
|
x.sort(l);
|
|
4616
|
-
return
|
|
4616
|
+
return N;
|
|
4617
4617
|
}
|
|
4618
|
-
function
|
|
4619
|
-
const
|
|
4620
|
-
for (const M of
|
|
4621
|
-
let
|
|
4618
|
+
function A(d) {
|
|
4619
|
+
const R = Qu(d, (M) => (r - e - (M.length - 1) * s) / Vn(M, Fn));
|
|
4620
|
+
for (const M of d) {
|
|
4621
|
+
let N = e;
|
|
4622
4622
|
for (const x of M) {
|
|
4623
|
-
x.y0 =
|
|
4624
|
-
for (const
|
|
4625
|
-
|
|
4623
|
+
x.y0 = N, x.y1 = N + x.value * R, N = x.y1 + s;
|
|
4624
|
+
for (const S of x.sourceLinks)
|
|
4625
|
+
S.width = S.value * R;
|
|
4626
4626
|
}
|
|
4627
|
-
|
|
4627
|
+
N = (r - N + s) / (M.length + 1);
|
|
4628
4628
|
for (let x = 0; x < M.length; ++x) {
|
|
4629
|
-
const
|
|
4630
|
-
|
|
4629
|
+
const S = M[x];
|
|
4630
|
+
S.y0 += N * (x + 1), S.y1 += N * (x + 1);
|
|
4631
4631
|
}
|
|
4632
|
-
|
|
4632
|
+
L(M);
|
|
4633
4633
|
}
|
|
4634
4634
|
}
|
|
4635
|
-
function
|
|
4636
|
-
const
|
|
4637
|
-
s = Math.min(a, (r - e) / (ni(
|
|
4638
|
-
for (let M = 0; M <
|
|
4639
|
-
const
|
|
4640
|
-
J(
|
|
4635
|
+
function O(d) {
|
|
4636
|
+
const R = k(d);
|
|
4637
|
+
s = Math.min(a, (r - e) / (ni(R, (M) => M.length) - 1)), A(R);
|
|
4638
|
+
for (let M = 0; M < p; ++M) {
|
|
4639
|
+
const N = Math.pow(0.99, M), x = Math.max(1 - N, (M + 1) / p);
|
|
4640
|
+
J(R, N, x), V(R, N, x);
|
|
4641
4641
|
}
|
|
4642
4642
|
}
|
|
4643
|
-
function
|
|
4644
|
-
for (let
|
|
4645
|
-
const
|
|
4646
|
-
for (const
|
|
4647
|
-
let
|
|
4648
|
-
for (const { source:
|
|
4649
|
-
let
|
|
4650
|
-
|
|
4643
|
+
function V(d, R, M) {
|
|
4644
|
+
for (let N = 1, x = d.length; N < x; ++N) {
|
|
4645
|
+
const S = d[N];
|
|
4646
|
+
for (const m of S) {
|
|
4647
|
+
let D = 0, P = 0;
|
|
4648
|
+
for (const { source: Q, value: tt } of m.targetLinks) {
|
|
4649
|
+
let z = tt * (m.layer - Q.layer);
|
|
4650
|
+
D += w(Q, m) * z, P += z;
|
|
4651
4651
|
}
|
|
4652
4652
|
if (!(P > 0)) continue;
|
|
4653
|
-
let
|
|
4654
|
-
|
|
4653
|
+
let F = (D / P - m.y0) * R;
|
|
4654
|
+
m.y0 += F, m.y1 += F, C(m);
|
|
4655
4655
|
}
|
|
4656
|
-
l === void 0 &&
|
|
4656
|
+
l === void 0 && S.sort(wn), Z(S, M);
|
|
4657
4657
|
}
|
|
4658
4658
|
}
|
|
4659
|
-
function J(
|
|
4660
|
-
for (let
|
|
4661
|
-
const
|
|
4662
|
-
for (const
|
|
4663
|
-
let
|
|
4664
|
-
for (const { target:
|
|
4665
|
-
let
|
|
4666
|
-
|
|
4659
|
+
function J(d, R, M) {
|
|
4660
|
+
for (let N = d.length, x = N - 2; x >= 0; --x) {
|
|
4661
|
+
const S = d[x];
|
|
4662
|
+
for (const m of S) {
|
|
4663
|
+
let D = 0, P = 0;
|
|
4664
|
+
for (const { target: Q, value: tt } of m.sourceLinks) {
|
|
4665
|
+
let z = tt * (Q.layer - m.layer);
|
|
4666
|
+
D += E(m, Q) * z, P += z;
|
|
4667
4667
|
}
|
|
4668
4668
|
if (!(P > 0)) continue;
|
|
4669
|
-
let
|
|
4670
|
-
|
|
4669
|
+
let F = (D / P - m.y0) * R;
|
|
4670
|
+
m.y0 += F, m.y1 += F, C(m);
|
|
4671
4671
|
}
|
|
4672
|
-
l === void 0 &&
|
|
4672
|
+
l === void 0 && S.sort(wn), Z(S, M);
|
|
4673
4673
|
}
|
|
4674
4674
|
}
|
|
4675
|
-
function
|
|
4676
|
-
const M =
|
|
4677
|
-
|
|
4675
|
+
function Z(d, R) {
|
|
4676
|
+
const M = d.length >> 1, N = d[M];
|
|
4677
|
+
B(d, N.y0 - s, M - 1, R), W(d, N.y1 + s, M + 1, R), B(d, r, d.length - 1, R), W(d, e, 0, R);
|
|
4678
4678
|
}
|
|
4679
|
-
function W(
|
|
4680
|
-
for (; M <
|
|
4681
|
-
const x =
|
|
4682
|
-
|
|
4679
|
+
function W(d, R, M, N) {
|
|
4680
|
+
for (; M < d.length; ++M) {
|
|
4681
|
+
const x = d[M], S = (R - x.y0) * N;
|
|
4682
|
+
S > 1e-6 && (x.y0 += S, x.y1 += S), R = x.y1 + s;
|
|
4683
4683
|
}
|
|
4684
4684
|
}
|
|
4685
|
-
function
|
|
4685
|
+
function B(d, R, M, N) {
|
|
4686
4686
|
for (; M >= 0; --M) {
|
|
4687
|
-
const x =
|
|
4688
|
-
|
|
4687
|
+
const x = d[M], S = (x.y1 - R) * N;
|
|
4688
|
+
S > 1e-6 && (x.y0 -= S, x.y1 -= S), R = x.y0 - s;
|
|
4689
4689
|
}
|
|
4690
4690
|
}
|
|
4691
|
-
function
|
|
4691
|
+
function C({ sourceLinks: d, targetLinks: R }) {
|
|
4692
4692
|
if (u === void 0) {
|
|
4693
|
-
for (const { source: { sourceLinks: M } } of
|
|
4693
|
+
for (const { source: { sourceLinks: M } } of R)
|
|
4694
4694
|
M.sort(ii);
|
|
4695
|
-
for (const { target: { targetLinks: M } } of
|
|
4695
|
+
for (const { target: { targetLinks: M } } of d)
|
|
4696
4696
|
M.sort(ri);
|
|
4697
4697
|
}
|
|
4698
4698
|
}
|
|
4699
|
-
function
|
|
4699
|
+
function L(d) {
|
|
4700
4700
|
if (u === void 0)
|
|
4701
|
-
for (const { sourceLinks:
|
|
4702
|
-
|
|
4701
|
+
for (const { sourceLinks: R, targetLinks: M } of d)
|
|
4702
|
+
R.sort(ii), M.sort(ri);
|
|
4703
4703
|
}
|
|
4704
|
-
function
|
|
4705
|
-
let M =
|
|
4706
|
-
for (const { target:
|
|
4707
|
-
if (
|
|
4704
|
+
function w(d, R) {
|
|
4705
|
+
let M = d.y0 - (d.sourceLinks.length - 1) * s / 2;
|
|
4706
|
+
for (const { target: N, width: x } of d.sourceLinks) {
|
|
4707
|
+
if (N === R) break;
|
|
4708
4708
|
M += x + s;
|
|
4709
4709
|
}
|
|
4710
|
-
for (const { source:
|
|
4711
|
-
if (
|
|
4710
|
+
for (const { source: N, width: x } of R.targetLinks) {
|
|
4711
|
+
if (N === d) break;
|
|
4712
4712
|
M -= x;
|
|
4713
4713
|
}
|
|
4714
4714
|
return M;
|
|
4715
4715
|
}
|
|
4716
|
-
function
|
|
4717
|
-
let M =
|
|
4718
|
-
for (const { source:
|
|
4719
|
-
if (
|
|
4716
|
+
function E(d, R) {
|
|
4717
|
+
let M = R.y0 - (R.targetLinks.length - 1) * s / 2;
|
|
4718
|
+
for (const { source: N, width: x } of R.targetLinks) {
|
|
4719
|
+
if (N === d) break;
|
|
4720
4720
|
M += x + s;
|
|
4721
4721
|
}
|
|
4722
|
-
for (const { target:
|
|
4723
|
-
if (
|
|
4722
|
+
for (const { target: N, width: x } of d.sourceLinks) {
|
|
4723
|
+
if (N === R) break;
|
|
4724
4724
|
M -= x;
|
|
4725
4725
|
}
|
|
4726
4726
|
return M;
|
|
@@ -4761,8 +4761,8 @@ or.prototype = ra.prototype = {
|
|
|
4761
4761
|
else if (h > re) if (!(Math.abs(u * o - c * l) > re) || !i)
|
|
4762
4762
|
this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
|
|
4763
4763
|
else {
|
|
4764
|
-
var f = n - a,
|
|
4765
|
-
Math.abs(
|
|
4764
|
+
var f = n - a, p = r - s, _ = o * o + c * c, j = f * f + p * p, K = Math.sqrt(_), T = Math.sqrt(h), q = i * Math.tan((ar - Math.acos((_ + h - j) / (2 * K * T))) / 2), k = q / T, A = q / K;
|
|
4765
|
+
Math.abs(k - 1) > re && (this._ += "L" + (t + k * l) + "," + (e + k * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = t + A * o) + "," + (this._y1 = e + A * c);
|
|
4766
4766
|
}
|
|
4767
4767
|
},
|
|
4768
4768
|
arc: function(t, e, n, r, i, a) {
|
|
@@ -4834,144 +4834,146 @@ const mf = "_sankeyEnergyLink_10fud_285", xf = "_sankeyLabel_10fud_323", ci = {
|
|
|
4834
4834
|
sankeyLabel: xf
|
|
4835
4835
|
};
|
|
4836
4836
|
function Sf({ data: t, tooltipFormat: e }) {
|
|
4837
|
-
const [n, r] =
|
|
4838
|
-
|
|
4839
|
-
r((
|
|
4840
|
-
const
|
|
4841
|
-
return c.current =
|
|
4837
|
+
const [n, r] = ct(null), [i, a] = ct(!1), [s, o] = ct(!1), c = Pt(!0), l = Pt(!0), u = Pt("data"), [h, f] = he(), { width: p, height: _ } = f, j = Ae(n ? n.nodes.map((k) => k.name) : []);
|
|
4838
|
+
vt(() => {
|
|
4839
|
+
r((k) => {
|
|
4840
|
+
const A = k === null ? [] : k.nodes.map((V) => V.name), O = t.nodes.map((V) => V.name);
|
|
4841
|
+
return c.current = O.every((V) => !A.includes(V)), k !== null && (l.current = !1), u.current = "data", t;
|
|
4842
4842
|
}), s && o(!1), i && a(!1);
|
|
4843
|
-
}, [t])
|
|
4844
|
-
|
|
4845
|
-
|
|
4843
|
+
}, [t]), vt(() => {
|
|
4844
|
+
p !== 0 && _ !== 0 && (u.current = "dimension");
|
|
4845
|
+
}, [p, _]);
|
|
4846
|
+
const K = p <= 768, T = 1e3, q = Et(
|
|
4847
|
+
(k) => {
|
|
4846
4848
|
if (!n)
|
|
4847
4849
|
return;
|
|
4848
|
-
const
|
|
4849
|
-
if (
|
|
4850
|
+
const A = p, O = _;
|
|
4851
|
+
if (A === 0 || O === 0)
|
|
4850
4852
|
return;
|
|
4851
|
-
const
|
|
4852
|
-
|
|
4853
|
-
const
|
|
4854
|
-
|
|
4853
|
+
const V = { top: 30, right: 20, bottom: 20, left: 20 }, J = O - (V.top + V.bottom), Z = A - (V.left + V.right), W = J, B = Z, C = n.links.map((g) => ({ ...g })), L = n.nodes.map((g) => ({ ...g }));
|
|
4854
|
+
C.forEach(function(g) {
|
|
4855
|
+
const y = n.nodes[g.source].name, b = n.nodes[g.target].name, v = y + " → " + b;
|
|
4856
|
+
g.sourceName = y, g.targetName = b, g.id = v;
|
|
4855
4857
|
});
|
|
4856
|
-
const
|
|
4857
|
-
|
|
4858
|
-
const E =
|
|
4859
|
-
const
|
|
4860
|
-
return { enteringValue:
|
|
4861
|
-
},
|
|
4862
|
-
s ? (
|
|
4863
|
-
const { enteringValue:
|
|
4864
|
-
return Math.max(
|
|
4858
|
+
const w = k.select("svg");
|
|
4859
|
+
w.node();
|
|
4860
|
+
const E = w.select(".plot-area").attr("transform", "translate(" + V.left + "," + V.top + ")"), d = Ye(k).style("opacity", 0), R = (g) => {
|
|
4861
|
+
const y = g.targetLinks?.reduce((v, U) => v + U.value, 0) ?? 0, b = g.sourceLinks?.reduce((v, U) => v + U.value, 0) ?? 0;
|
|
4862
|
+
return { enteringValue: y, exitingValue: b };
|
|
4863
|
+
}, N = af().nodeSort(
|
|
4864
|
+
s ? (g, y) => {
|
|
4865
|
+
const { enteringValue: b, exitingValue: v } = R(g), { enteringValue: U, exitingValue: nt } = R(y);
|
|
4866
|
+
return Math.max(b, v) - Math.max(U, nt);
|
|
4865
4867
|
} : null
|
|
4866
4868
|
).linkSort(
|
|
4867
|
-
i ? (
|
|
4868
|
-
).nodeWidth(
|
|
4869
|
-
nodes:
|
|
4870
|
-
links:
|
|
4871
|
-
}), { nodes:
|
|
4869
|
+
i ? (g, y) => g.value - y.value : null
|
|
4870
|
+
).nodeWidth(B <= 540 ? 8 : B > 540 && B <= 768 ? 12 : 15).nodePadding(B <= 540 ? 5 : 8).extent([[0, 0], [B, W]])({
|
|
4871
|
+
nodes: L.map((g) => Object.assign({}, g)),
|
|
4872
|
+
links: C.map((g) => Object.assign({}, g))
|
|
4873
|
+
}), { nodes: x, links: S } = N;
|
|
4872
4874
|
E.selectAll("linearGradient").remove();
|
|
4873
|
-
const
|
|
4874
|
-
|
|
4875
|
-
const
|
|
4876
|
-
return xt(
|
|
4877
|
-
}),
|
|
4878
|
-
const
|
|
4879
|
-
return xt(
|
|
4875
|
+
const m = E.selectAll("linearGradient").data(S).join("linearGradient").attr("id", (g, y) => y.toString()).attr("gradientUnits", "userSpaceOnUse").attr("x1", (g) => g.source.x0).attr("x2", (g) => g.target.x0);
|
|
4876
|
+
m.append("stop").attr("offset", "0%").attr("stop-color", (g) => {
|
|
4877
|
+
const y = j.current.findIndex((b) => b === g.sourceName);
|
|
4878
|
+
return xt(y, !1);
|
|
4879
|
+
}), m.append("stop").attr("offset", "100%").attr("stop-color", (g) => {
|
|
4880
|
+
const y = j.current.findIndex((b) => b === g.targetName);
|
|
4881
|
+
return xt(y, !1);
|
|
4880
4882
|
});
|
|
4881
|
-
const
|
|
4882
|
-
const
|
|
4883
|
-
return
|
|
4884
|
-
},
|
|
4885
|
-
E.selectAll(".link").data(
|
|
4886
|
-
(
|
|
4887
|
-
return `url(#${
|
|
4888
|
-
}).attr("stroke-dasharray",
|
|
4889
|
-
return
|
|
4883
|
+
const D = (g) => {
|
|
4884
|
+
const y = g.source, b = g.target, v = Math.abs(b.depth - y.depth);
|
|
4885
|
+
return B * 1.5 * v;
|
|
4886
|
+
}, P = (g) => D(g) + " " + D(g), F = (g) => !c.current || u.current !== "data" ? 0 : g.target.depth * T;
|
|
4887
|
+
E.selectAll(".link").data(S, (g) => g.id).join(
|
|
4888
|
+
(g) => g.append("path").attr("class", `link ${ci.sankeyEnergyLink}`).attr("d", li()).style("stroke", function(y) {
|
|
4889
|
+
return `url(#${m.filter((U) => U.sourceName === y.sourceName && U.targetName === y.targetName).node()?.id})`;
|
|
4890
|
+
}).attr("stroke-dasharray", P).attr("stroke-dashoffset", D).attr("stroke-width", (y) => Math.max(1, y.width)).transition().duration(T).delay(function(y) {
|
|
4891
|
+
return c.current ? F(y) : T;
|
|
4890
4892
|
}).attr("stroke-dashoffset", 0).on("end", function() {
|
|
4891
4893
|
ht(this).attr("stroke-dasharray", "none");
|
|
4892
4894
|
}),
|
|
4893
|
-
(
|
|
4895
|
+
(g) => (g.attr("stroke-width", (y) => Math.max(1, y.width || 0)).transition().duration(T).delay(F).attr("d", li()).attr("stroke-dashoffset", 0).on("end", function() {
|
|
4894
4896
|
ht(this).attr("stroke-dasharray", "none");
|
|
4895
|
-
}),
|
|
4896
|
-
(
|
|
4897
|
-
).on("mouseover", (
|
|
4898
|
-
E.selectAll("path.link").filter((
|
|
4899
|
-
const
|
|
4900
|
-
return
|
|
4901
|
-
}).style("opacity", 0),
|
|
4902
|
-
}).on("mousemove", (
|
|
4903
|
-
ei(
|
|
4904
|
-
}).on("mouseout", (
|
|
4905
|
-
|
|
4906
|
-
const
|
|
4907
|
-
return `url(#${
|
|
4908
|
-
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${
|
|
4897
|
+
}), g),
|
|
4898
|
+
(g) => c.current ? g.remove() : g.transition().duration(T / 4).style("opacity", 0).remove()
|
|
4899
|
+
).on("mouseover", (g, y) => {
|
|
4900
|
+
E.selectAll("path.link").filter((b) => b.id !== y.id).style("stroke", "#1f2937").style("stroke-opacity", 0.15), E.selectAll("text.label").filter((b) => {
|
|
4901
|
+
const v = b;
|
|
4902
|
+
return v.name !== y.sourceName && v.name !== y.targetName;
|
|
4903
|
+
}).style("opacity", 0), d.style("opacity", 1), d.select("p.title").text(y.id + St(y.value, e)), d.select("p.top-label").style("display", "none"), d.select("p.bottom-label").style("display", "none");
|
|
4904
|
+
}).on("mousemove", (g, y) => {
|
|
4905
|
+
ei(g, d);
|
|
4906
|
+
}).on("mouseout", (g, y) => {
|
|
4907
|
+
d.style("opacity", 0), E.selectAll("path.link").style("stroke", function(b) {
|
|
4908
|
+
const v = b;
|
|
4909
|
+
return `url(#${m.filter((ot) => ot.sourceName === v.sourceName && ot.targetName === v.targetName).node()?.id})`;
|
|
4910
|
+
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${et.sankeyEnergyLink}`), E.selectAll("text.label").style("opacity", 1);
|
|
4909
4911
|
});
|
|
4910
|
-
const
|
|
4911
|
-
const { enteringValue:
|
|
4912
|
-
return { nodeState:
|
|
4913
|
-
},
|
|
4914
|
-
const { nodeState:
|
|
4915
|
-
return { enteringValue:
|
|
4912
|
+
const Q = (g) => !c.current || g.depth === 0 || u.current !== "data" ? 0 : g.depth * T + T / 4, tt = (g) => {
|
|
4913
|
+
const { enteringValue: y, exitingValue: b } = R(g);
|
|
4914
|
+
return { nodeState: g.sourceLinks?.length === 0 && g.targetLinks?.length === 0 ? "stray node" : g.sourceLinks?.length === 0 ? "leaf node" : g.targetLinks?.length === 0 ? "source node" : y > b ? "surplus" : y < b ? "minus" : "balanced", enteringValue: y, exitingValue: b };
|
|
4915
|
+
}, z = (g) => {
|
|
4916
|
+
const { nodeState: y, enteringValue: b, exitingValue: v } = tt(g);
|
|
4917
|
+
return { enteringValue: b, exitingValue: v, nodeState: y, stateColor: y === "surplus" ? "#4ade80" : y === "minus" ? "#f87171" : "#e7e7e7" };
|
|
4916
4918
|
};
|
|
4917
|
-
E.selectAll("rect.node").data(
|
|
4918
|
-
(
|
|
4919
|
-
const
|
|
4920
|
-
return xt(
|
|
4921
|
-
}).attr("opacity", 1).attr("width", function(
|
|
4922
|
-
return
|
|
4919
|
+
E.selectAll("rect.node").data(x, ((g) => g.name)).join(
|
|
4920
|
+
(g) => g.append("rect").attr("class", `node ${et.baseNode}`).attr("x", (y) => y.x0).attr("y", (y) => y.y0).attr("height", (y) => c.current ? Math.abs(y.y1 - y.y0) : 0).attr("width", (y) => c.current ? 0 : y.x1 - y.x0).attr("opacity", 0).attr("stroke-width", 2.5).transition().duration(T).delay(Q).attr("fill", (y) => {
|
|
4921
|
+
const b = j.current.findIndex((v) => v === y.name);
|
|
4922
|
+
return xt(b, !1);
|
|
4923
|
+
}).attr("opacity", 1).attr("width", function(y) {
|
|
4924
|
+
return y.x1 - y.x0;
|
|
4923
4925
|
}),
|
|
4924
4926
|
void 0,
|
|
4925
|
-
(
|
|
4926
|
-
).on("mouseover", (
|
|
4927
|
-
E.selectAll("path.link").filter((
|
|
4928
|
-
const
|
|
4929
|
-
return !(
|
|
4927
|
+
(g) => c.current ? g.remove() : g.transition().duration(T / 4).style("opacity", 0).remove()
|
|
4928
|
+
).on("mouseover", (g, y) => {
|
|
4929
|
+
E.selectAll("path.link").filter((ot) => {
|
|
4930
|
+
const lt = ot;
|
|
4931
|
+
return !(lt.sourceName === y.name || lt.targetName === y.name);
|
|
4930
4932
|
}).style("stroke", "#1f2937").style("stroke-opacity", 0.1);
|
|
4931
|
-
const { enteringValue:
|
|
4932
|
-
|
|
4933
|
-
}).on("mousemove", (
|
|
4934
|
-
ei(
|
|
4935
|
-
}).on("mouseout", (
|
|
4936
|
-
|
|
4937
|
-
const
|
|
4938
|
-
return `url(#${
|
|
4939
|
-
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${
|
|
4940
|
-
}).transition().duration(
|
|
4941
|
-
const { stateColor:
|
|
4942
|
-
return
|
|
4943
|
-
}).attr("opacity", 1).attr("x", (
|
|
4944
|
-
const
|
|
4945
|
-
return xt(
|
|
4946
|
-
}), E.selectAll("text.label").data(
|
|
4947
|
-
(
|
|
4933
|
+
const { enteringValue: b, exitingValue: v, nodeState: U, stateColor: nt } = z(y);
|
|
4934
|
+
d.style("opacity", 1), d.select("p.title").text(y.name + " :"), d.select("p.top-label").style("display", "block").text("in " + St(b, e)), d.select("p.bottom-label").style("display", "block").text("out " + St(v, e)), d.select("p.small-text").style("display", "block").text(`${U}`).style("color", `${nt}`);
|
|
4935
|
+
}).on("mousemove", (g, y) => {
|
|
4936
|
+
ei(g, d);
|
|
4937
|
+
}).on("mouseout", (g, y) => {
|
|
4938
|
+
d.style("opacity", 0), d.select("p.small-text").style("display", "none"), E.selectAll("path.link").style("stroke", function(b) {
|
|
4939
|
+
const v = b;
|
|
4940
|
+
return `url(#${m.filter((ot) => ot.sourceName === v.sourceName && ot.targetName === v.targetName).node()?.id})`;
|
|
4941
|
+
}).style("stroke-opacity", 0.5).style("fill", "none").attr("class", `link ${et.sankeyEnergyLink}`);
|
|
4942
|
+
}).transition().duration(T).delay(Q).attr("stroke-width", K ? 2 : 2.5).style("stroke", function(g) {
|
|
4943
|
+
const { stateColor: y, nodeState: b } = z(g);
|
|
4944
|
+
return b === "surplus" || b === "minus" ? y : "#52525b";
|
|
4945
|
+
}).attr("opacity", 1).attr("x", (g) => g.x0).attr("y", (g) => g.y0).attr("height", (g) => Math.abs(g.y1 - g.y0)).attr("width", (g) => g.x1 - g.x0).attr("fill", (g) => {
|
|
4946
|
+
const y = j.current.findIndex((b) => b === g.name);
|
|
4947
|
+
return xt(y, !1);
|
|
4948
|
+
}), E.selectAll("text.label").data(x, (g) => g.name).join(
|
|
4949
|
+
(g) => g.append("text").attr("class", `label ${ci.sankeyLabel}`).attr("x", (y) => y.x0 < B / 2 ? y.x1 + 6 : y.x0 - 6).attr("y", (y) => (y.y1 + y.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (y) => y.x0 < B / 2 ? "start" : "end").style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").style("stroke", "#eff1f4").text((y) => y.name).attr("opacity", 0),
|
|
4948
4950
|
void 0,
|
|
4949
|
-
(
|
|
4950
|
-
).style("font-size",
|
|
4951
|
+
(g) => g.remove()
|
|
4952
|
+
).style("font-size", B < 648 ? "12px" : "16px").style("font-weight", B < 648 ? "normal" : "bold").style("stroke-width", B < 648 ? "0px" : "0.25px").transition().duration(T).delay(Q).attr("x", (g) => g.x0 < B / 2 ? g.x1 + 6 : g.x0 - 6).attr("y", (g) => (g.y1 + g.y0) / 2).attr("dy", "0.35em").attr("text-anchor", (g) => g.x0 < B / 2 ? "start" : "end").attr("opacity", 1);
|
|
4951
4953
|
},
|
|
4952
|
-
[n, i, s,
|
|
4954
|
+
[n, i, s, p, _, e]
|
|
4953
4955
|
);
|
|
4954
|
-
return /* @__PURE__ */
|
|
4956
|
+
return /* @__PURE__ */ H.jsx(
|
|
4955
4957
|
"div",
|
|
4956
4958
|
{
|
|
4957
|
-
ref:
|
|
4958
|
-
style: { width:
|
|
4959
|
-
children: /* @__PURE__ */
|
|
4959
|
+
ref: h,
|
|
4960
|
+
style: { width: p, height: _, display: "flex", flexDirection: "column" },
|
|
4961
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
4960
4962
|
"div",
|
|
4961
4963
|
{
|
|
4962
|
-
ref:
|
|
4963
|
-
className: `${
|
|
4964
|
+
ref: q,
|
|
4965
|
+
className: `${et["fill-container"]}`,
|
|
4964
4966
|
style: { display: "flex", flexDirection: "column", position: "relative" },
|
|
4965
4967
|
children: [
|
|
4966
|
-
/* @__PURE__ */
|
|
4968
|
+
/* @__PURE__ */ H.jsx(
|
|
4967
4969
|
"svg",
|
|
4968
4970
|
{
|
|
4969
|
-
className: `${
|
|
4970
|
-
viewBox: `0 0 ${
|
|
4971
|
-
children: /* @__PURE__ */
|
|
4971
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
4972
|
+
viewBox: `0 0 ${p} ${_}`,
|
|
4973
|
+
children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
|
|
4972
4974
|
}
|
|
4973
4975
|
),
|
|
4974
|
-
/* @__PURE__ */
|
|
4976
|
+
/* @__PURE__ */ H.jsxs(
|
|
4975
4977
|
"div",
|
|
4976
4978
|
{
|
|
4977
4979
|
style: {
|
|
@@ -4982,36 +4984,42 @@ function Sf({ data: t, tooltipFormat: e }) {
|
|
|
4982
4984
|
alignItems: "center"
|
|
4983
4985
|
},
|
|
4984
4986
|
children: [
|
|
4985
|
-
/* @__PURE__ */
|
|
4987
|
+
/* @__PURE__ */ H.jsxs(
|
|
4986
4988
|
"label",
|
|
4987
4989
|
{
|
|
4988
|
-
className:
|
|
4990
|
+
className: et["controls-label"],
|
|
4989
4991
|
children: [
|
|
4990
|
-
/* @__PURE__ */
|
|
4992
|
+
/* @__PURE__ */ H.jsx(
|
|
4991
4993
|
"input",
|
|
4992
4994
|
{
|
|
4993
4995
|
type: "checkbox",
|
|
4994
|
-
className:
|
|
4996
|
+
className: et["controls-checkbox"],
|
|
4995
4997
|
checked: i,
|
|
4996
|
-
onChange: (
|
|
4998
|
+
onChange: (k) => {
|
|
4999
|
+
const A = k.target.checked;
|
|
5000
|
+
A && (u.current = "sort link"), a(A);
|
|
5001
|
+
}
|
|
4997
5002
|
}
|
|
4998
5003
|
),
|
|
4999
5004
|
"Sort link"
|
|
5000
5005
|
]
|
|
5001
5006
|
}
|
|
5002
5007
|
),
|
|
5003
|
-
/* @__PURE__ */
|
|
5008
|
+
/* @__PURE__ */ H.jsxs(
|
|
5004
5009
|
"label",
|
|
5005
5010
|
{
|
|
5006
|
-
className:
|
|
5011
|
+
className: et["controls-label"],
|
|
5007
5012
|
children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5013
|
+
/* @__PURE__ */ H.jsx(
|
|
5009
5014
|
"input",
|
|
5010
5015
|
{
|
|
5011
5016
|
type: "checkbox",
|
|
5012
|
-
className:
|
|
5017
|
+
className: et["controls-checkbox"],
|
|
5013
5018
|
checked: s,
|
|
5014
|
-
onChange: (
|
|
5019
|
+
onChange: (k) => {
|
|
5020
|
+
const A = k.target.checked;
|
|
5021
|
+
A && (u.current = "sort node"), o(A);
|
|
5022
|
+
}
|
|
5015
5023
|
}
|
|
5016
5024
|
),
|
|
5017
5025
|
"Sort node"
|
|
@@ -5021,7 +5029,7 @@ function Sf({ data: t, tooltipFormat: e }) {
|
|
|
5021
5029
|
]
|
|
5022
5030
|
}
|
|
5023
5031
|
),
|
|
5024
|
-
/* @__PURE__ */
|
|
5032
|
+
/* @__PURE__ */ H.jsx(We, { pCount: 4 })
|
|
5025
5033
|
]
|
|
5026
5034
|
}
|
|
5027
5035
|
)
|
|
@@ -5030,189 +5038,189 @@ function Sf({ data: t, tooltipFormat: e }) {
|
|
|
5030
5038
|
}
|
|
5031
5039
|
const ee = {};
|
|
5032
5040
|
function Mf({ data: t, tooltipFormat: e }) {
|
|
5033
|
-
const [n, r] =
|
|
5034
|
-
|
|
5035
|
-
if (!_.current || !
|
|
5036
|
-
const
|
|
5037
|
-
function
|
|
5038
|
-
const
|
|
5041
|
+
const [n, r] = ct(null), [i, a] = ct({ name: "", value: 0 }), [s, o] = ct({ name: "", value: 0 }), c = Pt(!0), [l, u] = he(), { width: h, height: f } = u, p = Pt(null), _ = Pt(null);
|
|
5042
|
+
vt(() => {
|
|
5043
|
+
if (!_.current || !p.current) return;
|
|
5044
|
+
const T = p.current;
|
|
5045
|
+
function q(A, O) {
|
|
5046
|
+
const V = Math.max(A.length, O.length);
|
|
5039
5047
|
return function(J) {
|
|
5040
|
-
let
|
|
5041
|
-
for (let W = 0; W <
|
|
5042
|
-
|
|
5043
|
-
return
|
|
5048
|
+
let Z = "";
|
|
5049
|
+
for (let W = 0; W < V; W++)
|
|
5050
|
+
Z += J < 0.5 ? A[W] ?? "" : O[W] ?? "";
|
|
5051
|
+
return Z;
|
|
5044
5052
|
};
|
|
5045
5053
|
}
|
|
5046
|
-
ht(
|
|
5047
|
-
const
|
|
5048
|
-
return function(
|
|
5049
|
-
|
|
5054
|
+
ht(T).transition().duration(250).tween("text", function() {
|
|
5055
|
+
const A = q(s.name, i.name);
|
|
5056
|
+
return function(O) {
|
|
5057
|
+
T.textContent = A(O);
|
|
5050
5058
|
};
|
|
5051
5059
|
});
|
|
5052
|
-
const
|
|
5053
|
-
ht(
|
|
5054
|
-
const
|
|
5055
|
-
return function(
|
|
5056
|
-
|
|
5060
|
+
const k = _.current;
|
|
5061
|
+
ht(k).transition().duration(250).ease(tc).tween("text", function() {
|
|
5062
|
+
const A = Nt(s.value, i.value);
|
|
5063
|
+
return function(O) {
|
|
5064
|
+
k.textContent = St(Math.round(A(O)), e).toLocaleString();
|
|
5057
5065
|
};
|
|
5058
5066
|
});
|
|
5059
|
-
}, [i, s]),
|
|
5060
|
-
r((
|
|
5067
|
+
}, [i, s]), vt(() => {
|
|
5068
|
+
r((T) => (T !== null && (c.current = !1), t));
|
|
5061
5069
|
}, [t]);
|
|
5062
|
-
const
|
|
5063
|
-
(
|
|
5070
|
+
const j = 1e3, K = Et(
|
|
5071
|
+
(T) => {
|
|
5064
5072
|
if (!n)
|
|
5065
5073
|
return;
|
|
5066
|
-
const
|
|
5067
|
-
if (
|
|
5074
|
+
const q = h, k = f, A = 12, O = 1.5;
|
|
5075
|
+
if (q === 0 || k === 0)
|
|
5068
5076
|
return;
|
|
5069
|
-
const
|
|
5070
|
-
return
|
|
5071
|
-
}).sort(function(
|
|
5072
|
-
return
|
|
5073
|
-
}),
|
|
5074
|
-
let
|
|
5075
|
-
const
|
|
5076
|
-
|
|
5077
|
-
const P =
|
|
5078
|
-
(
|
|
5079
|
-
return
|
|
5080
|
-
}).style("fill", function(
|
|
5081
|
-
return
|
|
5082
|
-
}).style("cursor", "pointer").transition().duration(
|
|
5083
|
-
const
|
|
5084
|
-
return
|
|
5085
|
-
}).attr("cx", function(
|
|
5086
|
-
const
|
|
5087
|
-
return (
|
|
5088
|
-
}).attr("cy", function(
|
|
5089
|
-
const
|
|
5090
|
-
return (
|
|
5091
|
-
}).style("stroke", "#737373").style("stroke-width",
|
|
5092
|
-
return
|
|
5077
|
+
const V = 25, J = k - V * 2, Z = q - V * 2, W = J, B = Z, C = { name: "branches", children: n }, L = Math.min(B, W), w = pr(C).sum(function(y) {
|
|
5078
|
+
return y.value;
|
|
5079
|
+
}).sort(function(y, b) {
|
|
5080
|
+
return y.value - b.value;
|
|
5081
|
+
}), E = Qc().size([L - 20, L - 20]).padding(2);
|
|
5082
|
+
let d = w, R = 1, M = 1;
|
|
5083
|
+
const N = E(w), x = N.descendants(), S = [N.x, N.y, N.r * 2 + V], m = ht("#tooltip").style("opacity", 0), D = T.select("svg");
|
|
5084
|
+
D.node();
|
|
5085
|
+
const P = D.select(".plot-area").attr("transform", "translate(" + q / 2 + "," + k / 2 + ")"), F = le().domain([-1, 2]).range(["hsl(152,80%,80%)", "hsl(228,30%,40%)"]).interpolate(Yo), Q = P.selectAll("circle").data(x, (y) => y.data.name).join(
|
|
5086
|
+
(y) => y.append("circle").attr("class", function(b) {
|
|
5087
|
+
return b.parent ? b.children ? ee.node : `${ee.node} ${ee["node--leaf"]}` : `${ee.node} ${ee["node--root"]}`;
|
|
5088
|
+
}).style("fill", function(b) {
|
|
5089
|
+
return b.children ? F(b.depth) : "#f0fdfa";
|
|
5090
|
+
}).style("cursor", "pointer").transition().duration(j).attr("r", function(b) {
|
|
5091
|
+
const v = L / S[2];
|
|
5092
|
+
return b.r * v;
|
|
5093
|
+
}).attr("cx", function(b) {
|
|
5094
|
+
const v = L / S[2];
|
|
5095
|
+
return (b.x - S[0]) * v;
|
|
5096
|
+
}).attr("cy", function(b) {
|
|
5097
|
+
const v = L / S[2];
|
|
5098
|
+
return (b.y - S[1]) * v;
|
|
5099
|
+
}).style("stroke", "#737373").style("stroke-width", O * M).style("fill", function(b) {
|
|
5100
|
+
return b.children ? F(b.depth) : "#f0fdfa";
|
|
5093
5101
|
}),
|
|
5094
|
-
(
|
|
5095
|
-
const
|
|
5096
|
-
return (
|
|
5097
|
-
}).attr("cy", function(
|
|
5098
|
-
const
|
|
5099
|
-
return (
|
|
5100
|
-
}).attr("r", function(
|
|
5101
|
-
const
|
|
5102
|
-
return
|
|
5103
|
-
}).style("stroke", function(
|
|
5102
|
+
(y) => y.transition().duration(j).attr("cx", function(b) {
|
|
5103
|
+
const v = L / S[2];
|
|
5104
|
+
return (b.x - S[0]) * v;
|
|
5105
|
+
}).attr("cy", function(b) {
|
|
5106
|
+
const v = L / S[2];
|
|
5107
|
+
return (b.y - S[1]) * v;
|
|
5108
|
+
}).attr("r", function(b) {
|
|
5109
|
+
const v = L / S[2];
|
|
5110
|
+
return b.r * v;
|
|
5111
|
+
}).style("stroke", function(b) {
|
|
5104
5112
|
return "#737373";
|
|
5105
|
-
}).style("stroke-width",
|
|
5106
|
-
return
|
|
5113
|
+
}).style("stroke-width", O * M).style("fill", function(b) {
|
|
5114
|
+
return b.children ? F(b.depth) : "#f0fdfa";
|
|
5107
5115
|
}),
|
|
5108
|
-
(
|
|
5109
|
-
).on("mouseover", function(
|
|
5110
|
-
|
|
5111
|
-
return
|
|
5112
|
-
}).style("font-size",
|
|
5113
|
-
return
|
|
5114
|
-
}).style("display", function(
|
|
5115
|
-
return
|
|
5116
|
-
}) :
|
|
5117
|
-
return
|
|
5118
|
-
}).style("font-size",
|
|
5119
|
-
return
|
|
5120
|
-
}).style("display", function(
|
|
5121
|
-
return
|
|
5122
|
-
}) : (
|
|
5123
|
-
return
|
|
5124
|
-
}).style("fill-opacity", 0).style("display", "none"),
|
|
5125
|
-
return
|
|
5126
|
-
}).style("fill-opacity", 1).style("display", "inline")), ht(this).style("stroke"),
|
|
5127
|
-
}).on("mouseout", function(
|
|
5128
|
-
|
|
5129
|
-
return
|
|
5130
|
-
}).style("fill-opacity", function(
|
|
5131
|
-
return
|
|
5132
|
-
}).style("display", function(
|
|
5133
|
-
return
|
|
5134
|
-
}), ht(this).style("stroke-width",
|
|
5116
|
+
(y) => y.transition().duration(j).style("opacity", 0).remove()
|
|
5117
|
+
).on("mouseover", function(y, b) {
|
|
5118
|
+
d.parent === b ? tt.filter(function(v) {
|
|
5119
|
+
return v.parent === d || this.style.display === "inline";
|
|
5120
|
+
}).style("font-size", A * M).style("fill-opacity", function(v) {
|
|
5121
|
+
return v.parent === d ? 1 : 0;
|
|
5122
|
+
}).style("display", function(v) {
|
|
5123
|
+
return v.parent === d ? "inline" : "none";
|
|
5124
|
+
}) : b === d ? tt.filter(function(v) {
|
|
5125
|
+
return v.parent === d || this.style.display === "inline";
|
|
5126
|
+
}).style("font-size", A * M).style("fill-opacity", function(v) {
|
|
5127
|
+
return v.parent === d ? 1 : 0;
|
|
5128
|
+
}).style("display", function(v) {
|
|
5129
|
+
return v.parent === d ? "inline" : "none";
|
|
5130
|
+
}) : (tt.filter(function(v) {
|
|
5131
|
+
return v.data.name != b.data.name;
|
|
5132
|
+
}).style("fill-opacity", 0).style("display", "none"), tt.filter(function(v) {
|
|
5133
|
+
return v.data.name === b.data.name;
|
|
5134
|
+
}).style("fill-opacity", 1).style("display", "inline")), ht(this).style("stroke"), b != w && ht(this).style("stroke-width", O * M * 2.5).style("stroke", "#e4e4e7"), m.transition().duration(250).style("opacity", 1), a((v) => (o(v), { name: b.data.name === "branches" ? "Total" : b.data.name, value: b.value ? b.value : 0 }));
|
|
5135
|
+
}).on("mouseout", function(y, b) {
|
|
5136
|
+
tt.filter(function(v) {
|
|
5137
|
+
return v.parent === d || this.style.display === "inline";
|
|
5138
|
+
}).style("fill-opacity", function(v) {
|
|
5139
|
+
return v.parent === d ? 1 : 0;
|
|
5140
|
+
}).style("display", function(v) {
|
|
5141
|
+
return v.parent === d ? "inline" : "none";
|
|
5142
|
+
}), ht(this).style("stroke-width", O * M).style("stroke", function(v) {
|
|
5135
5143
|
return "#737373";
|
|
5136
|
-
}),
|
|
5137
|
-
}).on("click", function(
|
|
5138
|
-
if (
|
|
5139
|
-
|
|
5144
|
+
}), m.transition().duration(250).style("opacity", 0);
|
|
5145
|
+
}).on("click", function(y, b) {
|
|
5146
|
+
if (b === w) {
|
|
5147
|
+
g();
|
|
5140
5148
|
return;
|
|
5141
5149
|
}
|
|
5142
|
-
|
|
5143
|
-
}),
|
|
5144
|
-
return
|
|
5150
|
+
d != b ? z(b) : g(), Q.style("stroke-width", O * M), y.stopPropagation();
|
|
5151
|
+
}), tt = P.selectAll("text").data(x, function(y) {
|
|
5152
|
+
return y.data.name;
|
|
5145
5153
|
}).join(
|
|
5146
|
-
(
|
|
5147
|
-
return
|
|
5148
|
-
}).style("font-size", 12).style("text-anchor", "middle").style("fill-opacity", 0).style("stroke-opacity", 0).style("display", "none").style("pointer-events", "none").style("text-shadow", "0 1px 0 lightblue, 1px 0 0 lightblue, -1px 0 0 lightblue, 0 -1px 0 lightblue").transition().duration(
|
|
5149
|
-
const
|
|
5150
|
-
return "translate(" + (
|
|
5151
|
-
}).style("fill-opacity", function(
|
|
5152
|
-
return
|
|
5153
|
-
}).style("display", function(
|
|
5154
|
-
return
|
|
5154
|
+
(y) => y.append("text").attr("class", ee.circle_pack_label).text(function(b) {
|
|
5155
|
+
return b.data.name;
|
|
5156
|
+
}).style("font-size", 12).style("text-anchor", "middle").style("fill-opacity", 0).style("stroke-opacity", 0).style("display", "none").style("pointer-events", "none").style("text-shadow", "0 1px 0 lightblue, 1px 0 0 lightblue, -1px 0 0 lightblue, 0 -1px 0 lightblue").transition().duration(j).attr("transform", function(b) {
|
|
5157
|
+
const v = L / S[2];
|
|
5158
|
+
return "translate(" + (b.x - S[0]) * v + "," + (b.y - S[1]) * v + ")";
|
|
5159
|
+
}).style("fill-opacity", function(b) {
|
|
5160
|
+
return b.parent === w ? 1 : 0;
|
|
5161
|
+
}).style("display", function(b) {
|
|
5162
|
+
return b.parent === w ? "inline" : "none";
|
|
5155
5163
|
}),
|
|
5156
|
-
(
|
|
5157
|
-
const
|
|
5158
|
-
return "translate(" + (
|
|
5159
|
-
}).style("fill-opacity", function(
|
|
5160
|
-
return
|
|
5161
|
-
}).style("display", function(
|
|
5162
|
-
return
|
|
5164
|
+
(y) => y.attr("class", ee.circle_pack_label).transition().duration(j).attr("transform", function(b) {
|
|
5165
|
+
const v = L / S[2];
|
|
5166
|
+
return "translate(" + (b.x - S[0]) * v + "," + (b.y - S[1]) * v + ")";
|
|
5167
|
+
}).style("fill-opacity", function(b) {
|
|
5168
|
+
return b.parent === w ? 1 : 0;
|
|
5169
|
+
}).style("display", function(b) {
|
|
5170
|
+
return b.parent === w ? "inline" : "none";
|
|
5163
5171
|
}),
|
|
5164
|
-
(
|
|
5172
|
+
(y) => y.transition().duration(j).style("opacity", 0).remove()
|
|
5165
5173
|
);
|
|
5166
|
-
|
|
5167
|
-
function
|
|
5168
|
-
|
|
5169
|
-
const
|
|
5174
|
+
tt.raise();
|
|
5175
|
+
function z(y) {
|
|
5176
|
+
d = y;
|
|
5177
|
+
const b = L / 2 - V, v = q / 2, U = k / 2, nt = L / S[2], ot = (
|
|
5170
5178
|
/*currentData==="---"?Math.max((d.r * k),0.25):*/
|
|
5171
|
-
|
|
5179
|
+
y.r * nt
|
|
5172
5180
|
);
|
|
5173
|
-
M =
|
|
5174
|
-
const
|
|
5175
|
-
P.transition().duration(1e3).attr("transform", "translate(" + pt + "," + ut + ")scale(" +
|
|
5176
|
-
return
|
|
5177
|
-
}).style("fill-opacity", function(
|
|
5178
|
-
return
|
|
5179
|
-
}).style("display", function(
|
|
5180
|
-
return
|
|
5181
|
+
M = ot / b, R = b / ot;
|
|
5182
|
+
const lt = (y.x - S[0]) * nt, pt = v - lt * R, ft = (y.y - S[0]) * nt, ut = U - ft * R;
|
|
5183
|
+
P.transition().duration(1e3).attr("transform", "translate(" + pt + "," + ut + ")scale(" + R + ")"), tt.style("font-size", A * M + "px").filter(function(_t) {
|
|
5184
|
+
return _t.parent === d || this.style.display === "inline";
|
|
5185
|
+
}).style("fill-opacity", function(_t) {
|
|
5186
|
+
return _t.parent === d ? 1 : 0;
|
|
5187
|
+
}).style("display", function(_t) {
|
|
5188
|
+
return _t.parent === d ? "inline" : "none";
|
|
5181
5189
|
});
|
|
5182
5190
|
}
|
|
5183
|
-
function
|
|
5184
|
-
P.transition().duration(1e3).attr("transform", "translate(" +
|
|
5185
|
-
return
|
|
5186
|
-
}).style("fill-opacity", function(
|
|
5187
|
-
return
|
|
5188
|
-
}).style("display", function(
|
|
5189
|
-
return
|
|
5191
|
+
function g() {
|
|
5192
|
+
P.transition().duration(1e3).attr("transform", "translate(" + q / 2 + ", " + k / 2 + ")scale(1)"), d = w, R = 1, M = 1, tt.style("font-size", A * M + "px").filter(function(y) {
|
|
5193
|
+
return y.parent === d || this.style.display === "inline";
|
|
5194
|
+
}).style("fill-opacity", function(y) {
|
|
5195
|
+
return y.parent === d ? 1 : 0;
|
|
5196
|
+
}).style("display", function(y) {
|
|
5197
|
+
return y.parent === d ? "inline" : "none";
|
|
5190
5198
|
});
|
|
5191
5199
|
}
|
|
5192
5200
|
},
|
|
5193
5201
|
[n, h, f]
|
|
5194
5202
|
);
|
|
5195
|
-
return /* @__PURE__ */
|
|
5203
|
+
return /* @__PURE__ */ H.jsx(
|
|
5196
5204
|
"div",
|
|
5197
5205
|
{
|
|
5198
5206
|
ref: l,
|
|
5199
5207
|
style: { width: h, height: f, display: "flex", flexDirection: "column" },
|
|
5200
|
-
children: /* @__PURE__ */
|
|
5208
|
+
children: /* @__PURE__ */ H.jsxs(
|
|
5201
5209
|
"div",
|
|
5202
5210
|
{
|
|
5203
5211
|
ref: K,
|
|
5204
|
-
className: `${
|
|
5212
|
+
className: `${et["fill-container"]}`,
|
|
5205
5213
|
style: { display: "flex", flexDirection: "column", position: "relative" },
|
|
5206
5214
|
children: [
|
|
5207
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ H.jsx(
|
|
5208
5216
|
"svg",
|
|
5209
5217
|
{
|
|
5210
|
-
className: `${
|
|
5218
|
+
className: `${et["chart-svg"]} ${et["fill-container"]}`,
|
|
5211
5219
|
viewBox: `0 0 ${h} ${f}`,
|
|
5212
|
-
children: /* @__PURE__ */
|
|
5220
|
+
children: /* @__PURE__ */ H.jsx("g", { className: "plot-area" })
|
|
5213
5221
|
}
|
|
5214
5222
|
),
|
|
5215
|
-
/* @__PURE__ */
|
|
5223
|
+
/* @__PURE__ */ H.jsxs(
|
|
5216
5224
|
"div",
|
|
5217
5225
|
{
|
|
5218
5226
|
id: "tooltip",
|
|
@@ -5227,8 +5235,8 @@ function Mf({ data: t, tooltipFormat: e }) {
|
|
|
5227
5235
|
gap: 2
|
|
5228
5236
|
},
|
|
5229
5237
|
children: [
|
|
5230
|
-
/* @__PURE__ */
|
|
5231
|
-
/* @__PURE__ */
|
|
5238
|
+
/* @__PURE__ */ H.jsx("p", { ref: p, id: "name", children: "Test tooltip" }),
|
|
5239
|
+
/* @__PURE__ */ H.jsx("p", { ref: _, id: "value", children: "Test tooltip" })
|
|
5232
5240
|
]
|
|
5233
5241
|
}
|
|
5234
5242
|
)
|