@astrato-io/visualizations 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/THIRD_PARTY_NOTICES.md +403 -325
- package/VISUALIZATION_DEFINITIONS.md +319 -32
- package/chunks/{Button-BrGKp9Nm.js → Button-CCF851ea.js} +10 -10
- package/chunks/CircularProgress-yupH6YWs.js +765 -0
- package/chunks/FieldTypeIcon-D_MzsdfY.js +22 -0
- package/chunks/LinearProgress-CyFjN4px.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-CQpT79AP.js} +1391 -1008
- package/chunks/Title-C-p4ZarD.js +1804 -0
- package/chunks/_createAggregator-BF4qG9XK.js +50 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-8fxCo2q7.js} +10 -10
- package/chunks/bar-layout-DStC-GNV.js +9 -0
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-CQAu8KL8.js} +102 -84
- package/chunks/{builder-DEDvNq1k.js → builder-CScg1TOS.js} +156 -60
- package/chunks/color-rules-DYJL4fIW.js +15 -0
- package/chunks/color-settings-DJFoFTip.js +5 -0
- package/chunks/{coloring-CncX_JRX.js → coloring-9jU3s_-p.js} +41 -41
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/createSimplePaletteValueFilter-C4hZpCdn.js +2005 -0
- package/chunks/defaults-cyNhn37t.js +3 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-C4grxhye.js} +612 -400
- package/chunks/{escobar-DRhRMYRE.js → escobar-CjirINHP.js} +5354 -5473
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-D-l9u_we.js} +974 -909
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-lji2Acgn.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-C1zakrrX.js} +570 -390
- package/chunks/handlers-ZviIUC-j.js +15387 -0
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-Bj80ZUBK.js} +11 -11
- package/chunks/isEqual-Ch9OEye3.js +16 -0
- package/chunks/isFocusVisible-CgMP0qkR.js +144 -0
- package/chunks/label-format-type-C46pzgx7.js +17 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-De5fiKuR.js} +6 -6
- package/chunks/{logger-DpQtYQnX.js → logger-CKRjhSHQ.js} +77 -66
- package/chunks/map.compiler-CKzorLgK.js +345 -0
- package/chunks/{metadata-WABZrt7Y.js → metadata-Bb9pTXrq.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CaTmJkmi.js} +4 -4
- package/chunks/operations-DZoY50VX.js +31297 -0
- package/chunks/{range-Bi-7zT0k.js → range-D1BTmFMp.js} +2 -2
- package/chunks/react-dom-Dgv2azN2.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-_P3xwu5A.js} +1 -1
- package/chunks/{requirements-Dvd8jqYF.js → requirements-NHNrR8Ie.js} +55 -53
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/shared-UitWpq1J.js +1331 -0
- package/chunks/standalone-B0U6c3su.js +3638 -0
- package/chunks/{standalone-we5D5MIn.js → standalone-BBu90BhK.js} +113 -113
- package/chunks/standalone-BEekPuA12.js +357 -0
- package/chunks/{standalone-BMTCb10X.js → standalone-BOzHA_d4.js} +41 -41
- package/chunks/standalone-BR2JuRIC.js +422 -0
- package/chunks/{standalone-BGkmozIb.js → standalone-BapqaniK.js} +619 -619
- package/chunks/standalone-Bnnr87pc.js +2009 -0
- package/chunks/standalone-BwJqDj2Z.js +396 -0
- package/chunks/{standalone-BDhPQtzQ.js → standalone-ByKKqT5L.js} +308 -300
- package/chunks/{standalone-vBnBS2YC.js → standalone-CRdDZYeM.js} +1788 -1004
- package/chunks/standalone-CRfDOO1x.js +287 -0
- package/chunks/{standalone-D5Q5ngsD.js → standalone-CVknVdUC.js} +30 -27
- package/chunks/standalone-CbPk8bKn.js +580 -0
- package/chunks/{standalone-CJvIXsQE.js → standalone-Ck63MZzj.js} +234 -232
- package/chunks/{standalone-CM5XcAN5.js → standalone-DCFY1MAV.js} +8075 -7729
- package/chunks/{standalone-DW6NT205.js → standalone-DZDGX3aa.js} +168 -168
- package/chunks/standalone-DhfgeJIk.js +1012 -0
- package/chunks/{standalone-DT0wKji7.js → standalone-DibjA73M.js} +2 -2
- package/chunks/{standalone-XuGksArp.js → standalone-DtBk_iUz.js} +9 -8
- package/chunks/standalone-DxBAyqAu.js +772 -0
- package/chunks/standalone-KMQPsNsq.js +2 -0
- package/chunks/standalone-MBLSvsrY.js +2 -0
- package/chunks/standalone-U0WJwFlG.js +354 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-swGs70tD.js} +49 -51
- package/chunks/standalone-wgFAVnnm.js +355 -0
- package/chunks/standalone-xGV0dqPV.js +689 -0
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-OWSx5MOq.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-B8iCYyw1.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-3Igg6xmO.js} +7668 -12779
- package/chunks/{view-BuwQugKb.js → view-DdMLZySj.js} +2430 -2110
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-CzvFHE6M.js} +5205 -4438
- package/chunks/with-html-element-DOfkR3C1.js +16094 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +303 -2
- package/docs/operations/combo.md +262 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +148 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +262 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +8 -8
- package/docs/operations/line.md +262 -1
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +148 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +439 -157
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +2 -2
- package/index.js +523 -469
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +74 -68
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/available-fields.d.ts +2 -2
- package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
- package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +535 -349
- package/src/definitions/model/definitions/index.d.ts +2 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +406 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +10 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +33 -32
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
- package/src/definitions/model/definitions/types/compilation.types.d.ts +7 -2
- package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +45 -41
- package/src/visualization-catalog.d.ts +26 -26
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
- package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
- package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
- package/chunks/Title-CO5dP1ma.js +0 -1691
- package/chunks/ToggleButton-KOBAimC1.js +0 -112
- package/chunks/color-rules-CN7TcGrC.js +0 -6
- package/chunks/color-settings-3VRlf_Vw.js +0 -6
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/handlers-TOT-7INo.js +0 -12871
- package/chunks/isEqual-B8loyPsC.js +0 -12
- package/chunks/label-format-type-weq1XfcX.js +0 -8
- package/chunks/operations-Dh4v1Ovt.js +0 -26280
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/shared-Bn4N5QcZ.js +0 -1218
- package/chunks/standalone-B55oyW6c.js +0 -689
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-Bes8srx1.js +0 -354
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-BlMIwpEe.js +0 -1877
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-CLmGb7nn2.js +0 -355
- package/chunks/standalone-CXNP6-xD.js +0 -420
- package/chunks/standalone-DLlyRIE6.js +0 -287
- package/chunks/standalone-DMcI1afI.js +0 -396
- package/chunks/standalone-DN4S1MjT.js +0 -3874
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/standalone-D__XCp-h.js +0 -1003
- package/chunks/standalone-XTgSsTAa.js +0 -354
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
|
@@ -1,40 +1,824 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { s as
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "./
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
2
|
+
import { Ba as t, Bs as n, Da as r, Fs as i, Oa as a, Pc as o, Qr as s, ai as c, ci as l, fc as u, ka as d, oi as f, tn as p } from "./visualization-filters-CzvFHE6M.js";
|
|
3
|
+
import { Gt as m, M as h, Zt as g, bn as _, c as v, ci as y, d as b, it as x, j as S, jt as C, nt as w, o as T, rr as E, rt as ee, z as te, zr as D } from "./utils-3Igg6xmO.js";
|
|
4
|
+
import { Pi as ne } from "./handlers-ZviIUC-j.js";
|
|
5
|
+
import { n as re } from "./isEqual-Ch9OEye3.js";
|
|
6
|
+
import { s as ie } from "./logger-CKRjhSHQ.js";
|
|
7
|
+
import { A as ae, C as oe, E as se, Jt as ce, N as le, O as ue, P as O, Zt as de, _ as k, a as fe, g as pe, h as A, in as j, j as M, w as me, x as he, y as ge } from "./escobar-CjirINHP.js";
|
|
8
|
+
import { S as _e, T as ve, _ as ye, z as be } from "./MenuOption-CQpT79AP.js";
|
|
9
|
+
import { _ as xe, m as Se, v as Ce } from "./react-dom-Dgv2azN2.js";
|
|
10
|
+
import { d as we, t as Te, u as Ee } from "./isFocusVisible-CgMP0qkR.js";
|
|
11
|
+
import { d as De, m as Oe, u as ke } from "./Title-C-p4ZarD.js";
|
|
12
|
+
import "./coloring-9jU3s_-p.js";
|
|
13
|
+
import { s as Ae, t as je } from "./src-77e3mC7i.js";
|
|
14
|
+
import { f as Me, r as Ne, t as Pe, u as Fe, y as Ie } from "./src-D9XogOrc.js";
|
|
15
|
+
import { t as Le } from "./builder-CScg1TOS.js";
|
|
16
|
+
import { a as Re, c as ze, d as Be, i as Ve, l as He, n as Ue, o as We, r as Ge, s as Ke, t as qe, u as Je } from "./createSimplePaletteValueFilter-C4hZpCdn.js";
|
|
17
|
+
import { a as Ye, i as Xe, r as Ze, t as Qe } from "./accessors-DemrDevR.js";
|
|
18
|
+
import { r as $e, t as et } from "./src-BOS6SqkZ.js";
|
|
19
|
+
var N = D(), tt = ({ fillColor: e = r.grey2 }) => /* @__PURE__ */ (0, N.jsx)("svg", {
|
|
17
20
|
width: "16",
|
|
18
21
|
height: "16",
|
|
19
22
|
viewBox: "0 0 24 24",
|
|
20
23
|
fill: "none",
|
|
21
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
-
children: /* @__PURE__ */ (0,
|
|
25
|
+
children: /* @__PURE__ */ (0, N.jsx)("path", {
|
|
23
26
|
d: "M3 17.46V20.5C3 20.78 3.22 21 3.5 21H6.54C6.67 21 6.8 20.95 6.89 20.85L17.81 9.94L14.06 6.19L3.15 17.1C3.05 17.2 3 17.32 3 17.46ZM20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C17.98 2.9 17.35 2.9 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04Z",
|
|
24
27
|
fill: e
|
|
25
28
|
})
|
|
26
|
-
}),
|
|
27
|
-
|
|
29
|
+
}), P = /* @__PURE__ */ e(y(), 1);
|
|
30
|
+
function nt(e) {
|
|
31
|
+
return Object.keys(e).length === 0;
|
|
32
|
+
}
|
|
33
|
+
function rt(e = null) {
|
|
34
|
+
let t = P.useContext(Be);
|
|
35
|
+
return !t || nt(t) ? e : t;
|
|
36
|
+
}
|
|
37
|
+
var it = ze();
|
|
38
|
+
function at(e = it) {
|
|
39
|
+
return rt(e);
|
|
40
|
+
}
|
|
41
|
+
function ot() {
|
|
42
|
+
let e = at(We);
|
|
43
|
+
return e.$$material || e;
|
|
44
|
+
}
|
|
45
|
+
var st = we;
|
|
46
|
+
function ct(e) {
|
|
47
|
+
return Ce("MuiToggleButton", e);
|
|
48
|
+
}
|
|
49
|
+
var lt = xe("MuiToggleButton", [
|
|
50
|
+
"root",
|
|
51
|
+
"disabled",
|
|
52
|
+
"selected",
|
|
53
|
+
"standard",
|
|
54
|
+
"primary",
|
|
55
|
+
"secondary",
|
|
56
|
+
"sizeSmall",
|
|
57
|
+
"sizeMedium",
|
|
58
|
+
"sizeLarge",
|
|
59
|
+
"fullWidth"
|
|
60
|
+
]), F = Ee, ut = "(prefers-reduced-motion: reduce)", dt = 0, ft = "0ms", pt = () => {}, mt = () => !1, ht = () => !0, gt = () => pt;
|
|
61
|
+
function _t(e) {
|
|
62
|
+
let [t, n] = P.useState(() => ({
|
|
63
|
+
enabled: e,
|
|
64
|
+
matches: e ? null : !1
|
|
65
|
+
})), r = t.matches;
|
|
66
|
+
return t.enabled !== e && (r = null, e || (r = !1)), w(() => {
|
|
67
|
+
let r = (t) => {
|
|
68
|
+
n((n) => n.enabled === e && n.matches === t ? n : {
|
|
69
|
+
enabled: e,
|
|
70
|
+
matches: t
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
if (!e) {
|
|
74
|
+
t.enabled && r(!1);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (typeof window > "u" || typeof window.matchMedia != "function") {
|
|
78
|
+
r(!1);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
let i = window.matchMedia(ut), a = () => {
|
|
82
|
+
r(i.matches);
|
|
83
|
+
};
|
|
84
|
+
return a(), i.addEventListener("change", a), () => {
|
|
85
|
+
i.removeEventListener("change", a);
|
|
86
|
+
};
|
|
87
|
+
}, [e, t.enabled]), r;
|
|
88
|
+
}
|
|
89
|
+
var vt = { ...P }.useSyncExternalStore;
|
|
90
|
+
function yt(e) {
|
|
91
|
+
let t = e ? ht : mt, [n, r] = P.useMemo(() => {
|
|
92
|
+
if (!e || typeof window > "u" || typeof window.matchMedia != "function") return [mt, gt];
|
|
93
|
+
let t = window.matchMedia(ut);
|
|
94
|
+
return [() => t.matches, (e) => (t.addEventListener("change", e), () => {
|
|
95
|
+
t.removeEventListener("change", e);
|
|
96
|
+
})];
|
|
97
|
+
}, [e]);
|
|
98
|
+
return vt(r, n, t);
|
|
99
|
+
}
|
|
100
|
+
var bt = vt === void 0 ? _t : yt;
|
|
101
|
+
function xt(e, t) {
|
|
102
|
+
let n = bt(!t && e === "system"), r = !t && (e === "always" || e === "system" && n !== !1);
|
|
103
|
+
return P.useMemo(() => ({
|
|
104
|
+
shouldReduceMotion: r,
|
|
105
|
+
getTransitionTiming(e) {
|
|
106
|
+
return r ? {
|
|
107
|
+
duration: dt,
|
|
108
|
+
delay: ft
|
|
109
|
+
} : e;
|
|
110
|
+
}
|
|
111
|
+
}), [r]);
|
|
112
|
+
}
|
|
113
|
+
function St(e) {
|
|
114
|
+
let { focusableWhenDisabled: t, disabled: n, composite: r = !1, tabIndex: i = 0, isNativeButton: a } = e, o = r && t !== !1, s = r && t === !1;
|
|
115
|
+
return P.useMemo(() => {
|
|
116
|
+
let e = { onKeyDown(e) {
|
|
117
|
+
n && t && e.key !== "Tab" && e.preventDefault();
|
|
118
|
+
} };
|
|
119
|
+
return r || (e.tabIndex = i, !a && n && (e.tabIndex = t ? i : -1)), (a && (t || o) || !a && n) && (e["aria-disabled"] = n), a && (!t || s) && (e.disabled = n), e;
|
|
120
|
+
}, [
|
|
121
|
+
r,
|
|
122
|
+
n,
|
|
123
|
+
t,
|
|
124
|
+
o,
|
|
125
|
+
s,
|
|
126
|
+
a,
|
|
127
|
+
i
|
|
128
|
+
]);
|
|
129
|
+
}
|
|
130
|
+
var Ct = {};
|
|
131
|
+
function wt(e) {
|
|
132
|
+
let { nativeButton: t, nativeButtonProp: n, internalNativeButton: r = t, allowInferredHostMismatch: i = !1, disabled: a, type: o, hasFormAction: s = !1, tabIndex: c = 0, focusableWhenDisabled: l, stopEventPropagation: u = !1, onBeforeKeyDown: d, onBeforeKeyUp: f } = e, p = P.useRef(null), m = l === !0, h = St({
|
|
133
|
+
focusableWhenDisabled: m,
|
|
134
|
+
disabled: a,
|
|
135
|
+
isNativeButton: t,
|
|
136
|
+
tabIndex: c
|
|
137
|
+
}), g = P.useCallback(() => {
|
|
138
|
+
let e = p.current;
|
|
139
|
+
return e == null ? t : e.tagName === "BUTTON" || !!(e.tagName === "A" && e.href);
|
|
140
|
+
}, [t]), _ = P.useMemo(() => {
|
|
141
|
+
let e = m ? {} : { tabIndex: a ? -1 : c };
|
|
142
|
+
return t ? (e.type = o === void 0 && !s ? "button" : o, m || (e.disabled = a)) : (e.role = "button", !m && a && (e["aria-disabled"] = a)), m ? {
|
|
143
|
+
...e,
|
|
144
|
+
...h
|
|
145
|
+
} : e;
|
|
146
|
+
}, [
|
|
147
|
+
a,
|
|
148
|
+
m,
|
|
149
|
+
h,
|
|
150
|
+
s,
|
|
151
|
+
t,
|
|
152
|
+
c,
|
|
153
|
+
o
|
|
154
|
+
]);
|
|
155
|
+
return {
|
|
156
|
+
getButtonProps: P.useCallback((e = Ct) => {
|
|
157
|
+
let { onClick: t, onKeyDown: n, onKeyUp: r, ...i } = e, o = (e) => {
|
|
158
|
+
if (u && e.stopPropagation(), a) {
|
|
159
|
+
e.preventDefault();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
t?.(e);
|
|
163
|
+
}, s = (e) => {
|
|
164
|
+
if (m && h.onKeyDown(e), !a && (d?.(e), n?.(e), !(e.target !== e.currentTarget || g()))) {
|
|
165
|
+
if (e.key === " ") {
|
|
166
|
+
e.preventDefault();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
e.key === "Enter" && (e.preventDefault(), e.currentTarget.click());
|
|
170
|
+
}
|
|
171
|
+
}, c = (e) => {
|
|
172
|
+
a || (f?.(e), r?.(e), e.target === e.currentTarget && !g() && e.key === " " && !e.defaultPrevented && e.currentTarget.click());
|
|
173
|
+
};
|
|
174
|
+
return {
|
|
175
|
+
..._,
|
|
176
|
+
...i,
|
|
177
|
+
onClick: o,
|
|
178
|
+
onKeyDown: s,
|
|
179
|
+
onKeyUp: c
|
|
180
|
+
};
|
|
181
|
+
}, [
|
|
182
|
+
_,
|
|
183
|
+
a,
|
|
184
|
+
m,
|
|
185
|
+
h,
|
|
186
|
+
g,
|
|
187
|
+
d,
|
|
188
|
+
f,
|
|
189
|
+
u
|
|
190
|
+
]),
|
|
191
|
+
rootRef: p
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
var Tt = class e {
|
|
195
|
+
ref = { current: null };
|
|
196
|
+
shouldMount = !1;
|
|
197
|
+
mounted = null;
|
|
198
|
+
didMount = !1;
|
|
199
|
+
setShouldMount = null;
|
|
200
|
+
static create() {
|
|
201
|
+
return new e();
|
|
202
|
+
}
|
|
203
|
+
static use() {
|
|
204
|
+
let t = Oe(e.create).current, [n, r] = P.useState(!1);
|
|
205
|
+
return t.shouldMount = n, t.setShouldMount = r, P.useEffect(t.mountEffect, [n]), t;
|
|
206
|
+
}
|
|
207
|
+
mount() {
|
|
208
|
+
return this.mounted || (this.mounted = Dt(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
|
|
209
|
+
}
|
|
210
|
+
mountEffect = () => {
|
|
211
|
+
this.shouldMount && !this.didMount && (this.ref.current !== null && (this.didMount = !0), this.mounted.resolve());
|
|
212
|
+
};
|
|
213
|
+
start(...e) {
|
|
214
|
+
this.mount().then(() => this.ref.current?.start(...e));
|
|
215
|
+
}
|
|
216
|
+
stop(...e) {
|
|
217
|
+
this.mount().then(() => this.ref.current?.stop(...e));
|
|
218
|
+
}
|
|
219
|
+
pulsate(...e) {
|
|
220
|
+
this.mount().then(() => this.ref.current?.pulsate(...e));
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
function Et() {
|
|
224
|
+
return Tt.use();
|
|
225
|
+
}
|
|
226
|
+
function Dt() {
|
|
227
|
+
let e, t, n = new Promise((n, r) => {
|
|
228
|
+
e = n, t = r;
|
|
229
|
+
});
|
|
230
|
+
return n.resolve = e, n.reject = t, n;
|
|
231
|
+
}
|
|
232
|
+
function Ot(e) {
|
|
233
|
+
let { className: t, classes: n, pulsate: r = !1, rippleX: i, rippleY: a, rippleSize: o, in: s, onExited: c, timeout: l } = e, [u, d] = P.useState(!1), f = ke(), p = P.useRef(!1), m = P.useRef(c);
|
|
234
|
+
m.current = c;
|
|
235
|
+
let h = c != null, g = x(t, n.ripple, n.rippleVisible, r && n.ripplePulsate), _ = {
|
|
236
|
+
width: o,
|
|
237
|
+
height: o,
|
|
238
|
+
top: -(o / 2) + a,
|
|
239
|
+
left: -(o / 2) + i
|
|
240
|
+
}, v = x(n.child, u && n.childLeaving, r && n.childPulsate);
|
|
241
|
+
return !s && !u && d(!0), P.useEffect(() => {
|
|
242
|
+
!s && h ? p.current || (p.current = !0, f.start(l, () => {
|
|
243
|
+
p.current = !1, m.current?.();
|
|
244
|
+
})) : (p.current = !1, f.clear());
|
|
245
|
+
}, [
|
|
246
|
+
f,
|
|
247
|
+
h,
|
|
248
|
+
s,
|
|
249
|
+
l
|
|
250
|
+
]), /*#__PURE__*/ (0, N.jsx)("span", {
|
|
251
|
+
className: g,
|
|
252
|
+
style: _,
|
|
253
|
+
children: /*#__PURE__*/ (0, N.jsx)("span", { className: v })
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
var I = xe("MuiTouchRipple", [
|
|
257
|
+
"root",
|
|
258
|
+
"ripple",
|
|
259
|
+
"rippleVisible",
|
|
260
|
+
"ripplePulsate",
|
|
261
|
+
"child",
|
|
262
|
+
"childLeaving",
|
|
263
|
+
"childPulsate"
|
|
264
|
+
]), kt = 550, At = {}, jt = [], Mt = () => {};
|
|
265
|
+
function Nt(e, t) {
|
|
266
|
+
let n = new Set(t), r = /* @__PURE__ */ new Map(), i = [];
|
|
267
|
+
for (let t of e) n.has(t) ? i.length > 0 && (r.set(t, i), i = []) : i.push(t);
|
|
268
|
+
let a = [];
|
|
269
|
+
for (let e of t) {
|
|
270
|
+
let t = r.get(e);
|
|
271
|
+
t && a.push(...t), a.push(e);
|
|
272
|
+
}
|
|
273
|
+
return a.push(...i), a;
|
|
274
|
+
}
|
|
275
|
+
function Pt({ event: e, element: t, center: n }) {
|
|
276
|
+
let r = t ? t.getBoundingClientRect() : {
|
|
277
|
+
width: 0,
|
|
278
|
+
height: 0,
|
|
279
|
+
left: 0,
|
|
280
|
+
top: 0
|
|
281
|
+
}, i, a;
|
|
282
|
+
if (n || e === void 0 || e.clientX === 0 && e.clientY === 0 || !e.clientX && !e.touches) i = Math.round(r.width / 2), a = Math.round(r.height / 2);
|
|
283
|
+
else {
|
|
284
|
+
let { clientX: t, clientY: n } = e.touches && e.touches.length > 0 ? e.touches[0] : e;
|
|
285
|
+
i = Math.round(t - r.left), a = Math.round(n - r.top);
|
|
286
|
+
}
|
|
287
|
+
let o;
|
|
288
|
+
if (n) o = Math.sqrt((2 * r.width ** 2 + r.height ** 2) / 3), o % 2 == 0 && (o += 1);
|
|
289
|
+
else {
|
|
290
|
+
let e = Math.max(Math.abs((t ? t.clientWidth : 0) - i), i) * 2 + 2, n = Math.max(Math.abs((t ? t.clientHeight : 0) - a), a) * 2 + 2;
|
|
291
|
+
o = Math.sqrt(e ** 2 + n ** 2);
|
|
292
|
+
}
|
|
293
|
+
return {
|
|
294
|
+
rippleX: i,
|
|
295
|
+
rippleY: a,
|
|
296
|
+
rippleSize: o
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
var Ft = Je`
|
|
300
|
+
0% {
|
|
301
|
+
transform: scale(0);
|
|
302
|
+
opacity: 0.1;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
100% {
|
|
306
|
+
transform: scale(1);
|
|
307
|
+
opacity: 0.3;
|
|
308
|
+
}
|
|
309
|
+
`, It = Je`
|
|
310
|
+
0% {
|
|
311
|
+
opacity: 1;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
100% {
|
|
315
|
+
opacity: 0;
|
|
316
|
+
}
|
|
317
|
+
`, Lt = Je`
|
|
318
|
+
0% {
|
|
319
|
+
transform: scale(1);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
50% {
|
|
323
|
+
transform: scale(0.92);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
100% {
|
|
327
|
+
transform: scale(1);
|
|
328
|
+
}
|
|
329
|
+
`;
|
|
330
|
+
function Rt(e) {
|
|
331
|
+
if (e.motion.reducedMotion === "always") return null;
|
|
332
|
+
let t = He`
|
|
333
|
+
&.${I.rippleVisible} {
|
|
334
|
+
animation-name: ${Ft};
|
|
335
|
+
animation-duration: ${kt}ms;
|
|
336
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&.${I.ripplePulsate} {
|
|
340
|
+
animation-duration: ${e.transitions.duration.shorter}ms;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
& .${I.childLeaving} {
|
|
344
|
+
animation-name: ${It};
|
|
345
|
+
animation-duration: ${kt}ms;
|
|
346
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
& .${I.childPulsate} {
|
|
350
|
+
animation-name: ${Lt};
|
|
351
|
+
animation-duration: 2500ms;
|
|
352
|
+
animation-timing-function: ${e.transitions.easing.easeInOut};
|
|
353
|
+
animation-iteration-count: infinite;
|
|
354
|
+
animation-delay: 200ms;
|
|
355
|
+
}
|
|
356
|
+
`;
|
|
357
|
+
return e.motion.reducedMotion === "system" ? He`
|
|
358
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
359
|
+
${t}
|
|
360
|
+
}
|
|
361
|
+
` : t;
|
|
362
|
+
}
|
|
363
|
+
var zt = Re("span", {
|
|
364
|
+
name: "MuiTouchRipple",
|
|
365
|
+
slot: "Root"
|
|
366
|
+
})({
|
|
367
|
+
overflow: "hidden",
|
|
368
|
+
pointerEvents: "none",
|
|
369
|
+
position: "absolute",
|
|
370
|
+
zIndex: 0,
|
|
371
|
+
top: 0,
|
|
372
|
+
right: 0,
|
|
373
|
+
bottom: 0,
|
|
374
|
+
left: 0,
|
|
375
|
+
borderRadius: "inherit"
|
|
376
|
+
}), Bt = Re(Ot, {
|
|
377
|
+
name: "MuiTouchRipple",
|
|
378
|
+
slot: "Ripple"
|
|
379
|
+
})`
|
|
380
|
+
opacity: 0;
|
|
381
|
+
position: absolute;
|
|
382
|
+
|
|
383
|
+
&.${I.rippleVisible} {
|
|
384
|
+
opacity: 0.3;
|
|
385
|
+
transform: scale(1);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/*
|
|
389
|
+
* Order matters: 'child', 'childLeaving' and 'childPulsate' apply to the same
|
|
390
|
+
* element with equal specificity, so the later rule wins. 'child' must come
|
|
391
|
+
* before 'childLeaving' so the leaving 'opacity: 0' takes precedence. A focus
|
|
392
|
+
* (pulsate) ripple keeps 'pulsateKeyframe' (no opacity animation) on exit, so
|
|
393
|
+
* it relies on this static 'opacity: 0' to disappear on blur instead of
|
|
394
|
+
* lingering until removal.
|
|
395
|
+
*/
|
|
396
|
+
& .${I.child} {
|
|
397
|
+
opacity: 1;
|
|
398
|
+
display: block;
|
|
399
|
+
width: 100%;
|
|
400
|
+
height: 100%;
|
|
401
|
+
border-radius: 50%;
|
|
402
|
+
background-color: currentColor;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
& .${I.childLeaving} {
|
|
406
|
+
opacity: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
& .${I.childPulsate} {
|
|
410
|
+
position: absolute;
|
|
411
|
+
/* @noflip */
|
|
412
|
+
left: 0px;
|
|
413
|
+
top: 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
${({ theme: e }) => Rt(e)}
|
|
417
|
+
`, Vt = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
418
|
+
let n = Ge({
|
|
419
|
+
props: e,
|
|
420
|
+
name: "MuiTouchRipple"
|
|
421
|
+
}), r = xt(ot().motion.reducedMotion, !1), { center: i = !1, classes: a = At, className: o, ...s } = n, [c, l] = P.useState({
|
|
422
|
+
items: jt,
|
|
423
|
+
order: jt
|
|
424
|
+
}), u = c.items, d = P.useRef(0), f = P.useRef(null), p = P.useRef(!1);
|
|
425
|
+
De(() => (p.current = !0, () => {
|
|
426
|
+
p.current = !1;
|
|
427
|
+
})), P.useEffect(() => {
|
|
428
|
+
f.current &&= (f.current(), null);
|
|
429
|
+
}, [u]);
|
|
430
|
+
let m = P.useRef(!1), h = ke(), g = P.useRef(null), _ = P.useRef(null), v = F((e) => {
|
|
431
|
+
p.current && l((t) => {
|
|
432
|
+
let n = t.items.filter((t) => t.key !== e);
|
|
433
|
+
return {
|
|
434
|
+
items: n,
|
|
435
|
+
order: Nt(t.order.filter((t) => t !== e), n.filter((e) => !e.exiting).map((e) => e.key))
|
|
436
|
+
};
|
|
437
|
+
});
|
|
438
|
+
}), y = F((e) => {
|
|
439
|
+
let { pulsate: t, rippleX: n, rippleY: r, rippleSize: i, cb: a } = e, o = d.current;
|
|
440
|
+
d.current += 1, l((e) => {
|
|
441
|
+
let a = [...e.items, {
|
|
442
|
+
key: o,
|
|
443
|
+
pulsate: t,
|
|
444
|
+
rippleX: n,
|
|
445
|
+
rippleY: r,
|
|
446
|
+
rippleSize: i,
|
|
447
|
+
exiting: !1
|
|
448
|
+
}];
|
|
449
|
+
return {
|
|
450
|
+
items: a,
|
|
451
|
+
order: Nt(e.order, a.filter((e) => !e.exiting).map((e) => e.key))
|
|
452
|
+
};
|
|
453
|
+
}), f.current = a;
|
|
454
|
+
}), b = F((e = At, t = At, n = Mt) => {
|
|
455
|
+
let { pulsate: r = !1, center: a = i || t.pulsate, fakeElement: o = !1 } = t;
|
|
456
|
+
if (e?.type === "mousedown" && m.current) {
|
|
457
|
+
m.current = !1;
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
e?.type === "touchstart" && (m.current = !0);
|
|
461
|
+
let { rippleX: s, rippleY: c, rippleSize: l } = Pt({
|
|
462
|
+
event: e,
|
|
463
|
+
element: o ? null : _.current,
|
|
464
|
+
center: a
|
|
465
|
+
});
|
|
466
|
+
e?.touches ? g.current === null && (g.current = () => {
|
|
467
|
+
y({
|
|
468
|
+
pulsate: r,
|
|
469
|
+
rippleX: s,
|
|
470
|
+
rippleY: c,
|
|
471
|
+
rippleSize: l,
|
|
472
|
+
cb: n
|
|
473
|
+
});
|
|
474
|
+
}, h.start(80, () => {
|
|
475
|
+
g.current &&= (g.current(), null);
|
|
476
|
+
})) : y({
|
|
477
|
+
pulsate: r,
|
|
478
|
+
rippleX: s,
|
|
479
|
+
rippleY: c,
|
|
480
|
+
rippleSize: l,
|
|
481
|
+
cb: n
|
|
482
|
+
});
|
|
483
|
+
}), S = F(() => {
|
|
484
|
+
b(At, { pulsate: !0 });
|
|
485
|
+
}), C = F((e, t) => {
|
|
486
|
+
if (h.clear(), e?.type === "touchend" && g.current) {
|
|
487
|
+
g.current(), g.current = null, h.start(0, () => {
|
|
488
|
+
C(e, t);
|
|
489
|
+
});
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
g.current = null, l((e) => {
|
|
493
|
+
let t = e.items.findIndex((e) => !e.exiting);
|
|
494
|
+
if (t === -1) return e;
|
|
495
|
+
let n = e.items.slice();
|
|
496
|
+
return n[t] = {
|
|
497
|
+
...n[t],
|
|
498
|
+
exiting: !0
|
|
499
|
+
}, {
|
|
500
|
+
items: n,
|
|
501
|
+
order: Nt(e.order, n.filter((e) => !e.exiting).map((e) => e.key))
|
|
502
|
+
};
|
|
503
|
+
}), f.current = t;
|
|
504
|
+
});
|
|
505
|
+
P.useImperativeHandle(t, () => ({
|
|
506
|
+
pulsate: S,
|
|
507
|
+
start: b,
|
|
508
|
+
stop: C
|
|
509
|
+
}), [
|
|
510
|
+
S,
|
|
511
|
+
b,
|
|
512
|
+
C
|
|
513
|
+
]);
|
|
514
|
+
let w = new Map(u.map((e) => [e.key, e])), T = c.order.map((e) => w.get(e)).filter(Boolean);
|
|
515
|
+
return /*#__PURE__*/ (0, N.jsx)(zt, {
|
|
516
|
+
className: x(I.root, a.root, o),
|
|
517
|
+
ref: _,
|
|
518
|
+
...s,
|
|
519
|
+
children: T.map((e) => /*#__PURE__*/ (0, N.jsx)(Bt, {
|
|
520
|
+
classes: {
|
|
521
|
+
ripple: x(a.ripple, I.ripple),
|
|
522
|
+
rippleVisible: x(a.rippleVisible, I.rippleVisible),
|
|
523
|
+
ripplePulsate: x(a.ripplePulsate, I.ripplePulsate),
|
|
524
|
+
child: x(a.child, I.child),
|
|
525
|
+
childLeaving: x(a.childLeaving, I.childLeaving),
|
|
526
|
+
childPulsate: x(a.childPulsate, I.childPulsate)
|
|
527
|
+
},
|
|
528
|
+
timeout: r.shouldReduceMotion ? 0 : kt,
|
|
529
|
+
pulsate: e.pulsate,
|
|
530
|
+
rippleX: e.rippleX,
|
|
531
|
+
rippleY: e.rippleY,
|
|
532
|
+
rippleSize: e.rippleSize,
|
|
533
|
+
in: !e.exiting,
|
|
534
|
+
onExited: () => v(e.key)
|
|
535
|
+
}, e.key))
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
function Ht(e) {
|
|
539
|
+
return Ce("MuiButtonBase", e);
|
|
540
|
+
}
|
|
541
|
+
var Ut = xe("MuiButtonBase", [
|
|
542
|
+
"root",
|
|
543
|
+
"disabled",
|
|
544
|
+
"focusVisible"
|
|
545
|
+
]), Wt = (e) => {
|
|
546
|
+
let { disabled: t, focusVisible: n, focusVisibleClassName: r, suppressFocusVisible: i, classes: a } = e, o = Se({ root: [
|
|
547
|
+
"root",
|
|
548
|
+
t && "disabled",
|
|
549
|
+
n && !i && "focusVisible"
|
|
550
|
+
] }, Ht, a);
|
|
551
|
+
return n && !i && r && (o.root += ` ${r}`), o;
|
|
552
|
+
}, Gt = Re("button", {
|
|
553
|
+
name: "MuiButtonBase",
|
|
554
|
+
slot: "Root"
|
|
555
|
+
})(Ve(({ theme: e }) => ({
|
|
556
|
+
display: "inline-flex",
|
|
557
|
+
alignItems: "center",
|
|
558
|
+
justifyContent: "center",
|
|
559
|
+
position: "relative",
|
|
560
|
+
boxSizing: "border-box",
|
|
561
|
+
WebkitTapHighlightColor: "transparent",
|
|
562
|
+
backgroundColor: "transparent",
|
|
563
|
+
outline: 0,
|
|
564
|
+
border: 0,
|
|
565
|
+
margin: 0,
|
|
566
|
+
borderRadius: 0,
|
|
567
|
+
padding: 0,
|
|
568
|
+
cursor: "pointer",
|
|
569
|
+
userSelect: "none",
|
|
570
|
+
verticalAlign: "middle",
|
|
571
|
+
MozAppearance: "none",
|
|
572
|
+
WebkitAppearance: "none",
|
|
573
|
+
textDecoration: "none",
|
|
574
|
+
color: "inherit",
|
|
575
|
+
"&::-moz-focus-inner": { borderStyle: "none" },
|
|
576
|
+
[`&.${Ut.disabled}`]: {
|
|
577
|
+
pointerEvents: "none",
|
|
578
|
+
cursor: "default"
|
|
579
|
+
},
|
|
580
|
+
"@media print": { colorAdjust: "exact" },
|
|
581
|
+
variants: [{
|
|
582
|
+
props: { internalDisabledThemeFocusVisible: !1 },
|
|
583
|
+
style: e.focusVisible && {
|
|
584
|
+
...Ke,
|
|
585
|
+
[`&.${Ut.focusVisible}`]: e.focusVisible
|
|
586
|
+
}
|
|
587
|
+
}]
|
|
588
|
+
}))), Kt = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
589
|
+
let n = Ge({
|
|
590
|
+
props: e,
|
|
591
|
+
name: "MuiButtonBase"
|
|
592
|
+
}), { action: r, centerRipple: i = !1, children: a, className: o, component: s = "button", disabled: c = !1, disableRipple: l = !1, disableTouchRipple: u = !1, focusRipple: d = !1, focusVisibleClassName: f, focusableWhenDisabled: p, suppressFocusVisible: m = !1, internalNativeButton: h, internalDisabledThemeFocusVisible: g = !1, LinkComponent: _ = "a", nativeButton: v, onBlur: y, onClick: b, onContextMenu: S, onDragLeave: C, onFocus: w, onFocusVisible: T, onKeyDown: E, onKeyUp: ee, onMouseDown: te, onMouseLeave: D, onMouseUp: ne, onTouchEnd: re, onTouchMove: ie, onTouchStart: ae, tabIndex: oe = 0, TouchRippleProps: se, touchRippleRef: ce, type: le, ...ue } = n, O = !!(ue.href || ue.to), de = !!ue.formAction, k = s;
|
|
593
|
+
k === "button" && O && (k = _);
|
|
594
|
+
let fe = typeof k == "string" ? k === "button" : h ?? !1, pe = v ?? fe, A = Et(), j = st(A.ref, ce), [M, me] = P.useState(!1);
|
|
595
|
+
(c || m) && M && me(!1);
|
|
596
|
+
let he = F((e) => {
|
|
597
|
+
d && !e.repeat && M && e.key === " " && A.stop(e, () => {
|
|
598
|
+
A.start(e);
|
|
599
|
+
});
|
|
600
|
+
}), ge = F((e) => {
|
|
601
|
+
d && e.key === " " && M && !e.defaultPrevented && A.stop(e, () => {
|
|
602
|
+
A.pulsate(e);
|
|
603
|
+
});
|
|
604
|
+
}), { getButtonProps: _e, rootRef: ve } = wt({
|
|
605
|
+
nativeButton: pe,
|
|
606
|
+
nativeButtonProp: v,
|
|
607
|
+
internalNativeButton: fe,
|
|
608
|
+
allowInferredHostMismatch: O || typeof k == "string",
|
|
609
|
+
disabled: c,
|
|
610
|
+
type: le,
|
|
611
|
+
hasFormAction: de,
|
|
612
|
+
tabIndex: oe,
|
|
613
|
+
onBeforeKeyDown: he,
|
|
614
|
+
onBeforeKeyUp: ge
|
|
615
|
+
}), { onClick: ye, onKeyDown: be, onKeyUp: xe, ...Se } = _e({
|
|
616
|
+
onClick: b,
|
|
617
|
+
onKeyDown: E,
|
|
618
|
+
onKeyUp: ee
|
|
619
|
+
});
|
|
620
|
+
P.useImperativeHandle(r, () => ({ focusVisible: () => {
|
|
621
|
+
me(!0), ve.current.focus();
|
|
622
|
+
} }), [ve]);
|
|
623
|
+
let Ce = A.shouldMount && !l && !c;
|
|
624
|
+
P.useEffect(() => {
|
|
625
|
+
M && d && !l && A.pulsate();
|
|
626
|
+
}, [
|
|
627
|
+
l,
|
|
628
|
+
d,
|
|
629
|
+
M,
|
|
630
|
+
A
|
|
631
|
+
]);
|
|
632
|
+
let we = L(A, "start", te, u), Ee = L(A, "stop", S, u), De = L(A, "stop", C, u), Oe = L(A, "stop", ne, u), ke = L(A, "stop", (e) => {
|
|
633
|
+
M && e.preventDefault(), D && D(e);
|
|
634
|
+
}, u), Ae = L(A, "start", ae, u), je = L(A, "stop", re, u), Me = L(A, "stop", ie, u), Ne = L(A, "stop", (e) => {
|
|
635
|
+
Te(e.target) || me(!1), y && y(e);
|
|
636
|
+
}, !1), Pe = F((e) => {
|
|
637
|
+
ve.current ||= e.currentTarget, !m && Te(e.target) && (me(!0), T && T(e)), w && w(e);
|
|
638
|
+
}), Fe = {};
|
|
639
|
+
O && (Fe.tabIndex = c ? -1 : oe, c && (Fe["aria-disabled"] = c), Fe.type = le);
|
|
640
|
+
let Ie = st(t, ve), Le = {
|
|
28
641
|
...n,
|
|
29
|
-
|
|
642
|
+
centerRipple: i,
|
|
643
|
+
component: s,
|
|
644
|
+
disabled: c,
|
|
645
|
+
disableRipple: l,
|
|
646
|
+
disableTouchRipple: u,
|
|
647
|
+
focusRipple: d,
|
|
648
|
+
suppressFocusVisible: m,
|
|
649
|
+
tabIndex: oe,
|
|
650
|
+
focusVisible: M,
|
|
651
|
+
internalDisabledThemeFocusVisible: g
|
|
652
|
+
}, Re = Wt(Le);
|
|
653
|
+
return /*#__PURE__*/ (0, N.jsxs)(Gt, {
|
|
654
|
+
as: k,
|
|
655
|
+
className: x(Re.root, o),
|
|
656
|
+
ownerState: Le,
|
|
657
|
+
onBlur: Ne,
|
|
658
|
+
onClick: ye,
|
|
659
|
+
onContextMenu: Ee,
|
|
660
|
+
onFocus: Pe,
|
|
661
|
+
onKeyDown: be,
|
|
662
|
+
onKeyUp: xe,
|
|
663
|
+
onMouseDown: we,
|
|
664
|
+
onMouseLeave: ke,
|
|
665
|
+
onMouseUp: Oe,
|
|
666
|
+
onDragLeave: De,
|
|
667
|
+
onTouchEnd: je,
|
|
668
|
+
onTouchMove: Me,
|
|
669
|
+
onTouchStart: Ae,
|
|
670
|
+
ref: Ie,
|
|
671
|
+
...O ? Fe : Se,
|
|
672
|
+
...ue,
|
|
673
|
+
children: [a, Ce ? /*#__PURE__*/ (0, N.jsx)(Vt, {
|
|
674
|
+
ref: j,
|
|
675
|
+
center: i,
|
|
676
|
+
...se
|
|
677
|
+
}) : null]
|
|
678
|
+
});
|
|
679
|
+
});
|
|
680
|
+
function L(e, t, n, r = !1) {
|
|
681
|
+
return F((i) => (n && n(i), r || e[t](i), !0));
|
|
682
|
+
}
|
|
683
|
+
var qt = /*#__PURE__*/ P.createContext({}), Jt = /*#__PURE__*/ P.createContext(void 0);
|
|
684
|
+
function Yt(e, t) {
|
|
685
|
+
return t === void 0 || e === void 0 ? !1 : Array.isArray(t) ? t.includes(e) : e === t;
|
|
686
|
+
}
|
|
687
|
+
function Xt(e, t) {
|
|
688
|
+
let { children: n, disabled: r = !1, selected: i = !1, value: a } = e, o = ve(), s = _e({
|
|
689
|
+
id: a,
|
|
690
|
+
ref: t,
|
|
691
|
+
disabled: r,
|
|
692
|
+
selected: i
|
|
693
|
+
}), c = o.getItemMap().size === 0 && i ? 0 : s.tabIndex;
|
|
694
|
+
return /*#__PURE__*/ P.cloneElement(P.Children.only(n), {
|
|
695
|
+
...s,
|
|
696
|
+
tabIndex: n.props.tabIndex ?? c
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
var Zt = /*#__PURE__*/ P.forwardRef(Xt), Qt = (e) => {
|
|
700
|
+
let { classes: t, fullWidth: n, selected: r, disabled: i, size: a, color: o } = e;
|
|
701
|
+
return Se({ root: [
|
|
702
|
+
"root",
|
|
703
|
+
r && "selected",
|
|
704
|
+
i && "disabled",
|
|
705
|
+
n && "fullWidth",
|
|
706
|
+
`size${Ue(a)}`,
|
|
707
|
+
o
|
|
708
|
+
] }, ct, t);
|
|
709
|
+
}, $t = Re(Kt, {
|
|
710
|
+
name: "MuiToggleButton",
|
|
711
|
+
slot: "Root",
|
|
712
|
+
overridesResolver: (e, t) => {
|
|
713
|
+
let { ownerState: n } = e;
|
|
714
|
+
return [t.root, t[`size${Ue(n.size)}`]];
|
|
715
|
+
}
|
|
716
|
+
})(Ve(({ theme: e }) => ({
|
|
717
|
+
...e.typography.button,
|
|
718
|
+
borderRadius: (e.vars || e).shape.borderRadius,
|
|
719
|
+
padding: 11,
|
|
720
|
+
border: `1px solid ${(e.vars || e).palette.divider}`,
|
|
721
|
+
color: (e.vars || e).palette.action.active,
|
|
722
|
+
[`&.${lt.disabled}`]: {
|
|
723
|
+
color: (e.vars || e).palette.action.disabled,
|
|
724
|
+
border: `1px solid ${(e.vars || e).palette.action.disabledBackground}`
|
|
725
|
+
},
|
|
726
|
+
"&:hover": {
|
|
727
|
+
textDecoration: "none",
|
|
728
|
+
backgroundColor: e.alpha((e.vars || e).palette.text.primary, (e.vars || e).palette.action.hoverOpacity),
|
|
729
|
+
"@media (hover: none)": { backgroundColor: "transparent" }
|
|
730
|
+
},
|
|
731
|
+
variants: [
|
|
732
|
+
{
|
|
733
|
+
props: { color: "standard" },
|
|
734
|
+
style: { [`&.${lt.selected}`]: {
|
|
735
|
+
color: (e.vars || e).palette.text.primary,
|
|
736
|
+
backgroundColor: e.alpha((e.vars || e).palette.text.primary, (e.vars || e).palette.action.selectedOpacity),
|
|
737
|
+
"&:hover": {
|
|
738
|
+
backgroundColor: e.alpha((e.vars || e).palette.text.primary, `${(e.vars || e).palette.action.selectedOpacity} + ${(e.vars || e).palette.action.hoverOpacity}`),
|
|
739
|
+
"@media (hover: none)": { backgroundColor: e.alpha((e.vars || e).palette.text.primary, (e.vars || e).palette.action.selectedOpacity) }
|
|
740
|
+
}
|
|
741
|
+
} }
|
|
742
|
+
},
|
|
743
|
+
...Object.entries(e.palette).filter(qe()).map(([t]) => ({
|
|
744
|
+
props: { color: t },
|
|
745
|
+
style: { [`&.${lt.selected}`]: {
|
|
746
|
+
color: (e.vars || e).palette[t].main,
|
|
747
|
+
backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.selectedOpacity),
|
|
748
|
+
"&:hover": {
|
|
749
|
+
backgroundColor: e.alpha((e.vars || e).palette[t].main, `${(e.vars || e).palette.action.selectedOpacity} + ${(e.vars || e).palette.action.hoverOpacity}`),
|
|
750
|
+
"@media (hover: none)": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.selectedOpacity) }
|
|
751
|
+
}
|
|
752
|
+
} }
|
|
753
|
+
})),
|
|
754
|
+
{
|
|
755
|
+
props: { fullWidth: !0 },
|
|
756
|
+
style: { width: "100%" }
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
props: { size: "small" },
|
|
760
|
+
style: {
|
|
761
|
+
padding: 7,
|
|
762
|
+
fontSize: e.typography.pxToRem(13)
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
props: { size: "large" },
|
|
767
|
+
style: {
|
|
768
|
+
padding: 15,
|
|
769
|
+
fontSize: e.typography.pxToRem(15)
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
]
|
|
773
|
+
}))), en = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
774
|
+
let { value: n, isRovingTabIndex: r, ...i } = P.useContext(qt), a = P.useContext(Jt), o = Ge({
|
|
775
|
+
props: ee({
|
|
776
|
+
...i,
|
|
777
|
+
selected: Yt(e.value, n)
|
|
778
|
+
}, e),
|
|
779
|
+
name: "MuiToggleButton"
|
|
780
|
+
}), { children: s, className: c, color: l = "standard", disabled: u = !1, disableFocusRipple: d = !1, fullWidth: f = !1, onChange: p, onClick: m, selected: h, size: g = "medium", value: _, ...v } = o, y = {
|
|
781
|
+
...o,
|
|
782
|
+
color: l,
|
|
783
|
+
disabled: u,
|
|
784
|
+
disableFocusRipple: d,
|
|
785
|
+
fullWidth: f,
|
|
786
|
+
size: g
|
|
787
|
+
}, b = Qt(y), S = (e) => {
|
|
788
|
+
m && (m(e, _), e.defaultPrevented) || p && p(e, _);
|
|
789
|
+
}, C = a || "", w = /*#__PURE__*/ (0, N.jsx)($t, {
|
|
790
|
+
className: x(i.className, b.root, c, C),
|
|
791
|
+
internalNativeButton: !0,
|
|
792
|
+
disabled: u,
|
|
793
|
+
focusRipple: !d,
|
|
794
|
+
ref: r ? void 0 : t,
|
|
795
|
+
onClick: S,
|
|
796
|
+
onChange: p,
|
|
797
|
+
value: _,
|
|
798
|
+
ownerState: y,
|
|
799
|
+
"aria-pressed": h,
|
|
800
|
+
...v,
|
|
801
|
+
children: s
|
|
802
|
+
});
|
|
803
|
+
return r ? /*#__PURE__*/ (0, N.jsx)(Zt, {
|
|
804
|
+
disabled: u,
|
|
805
|
+
selected: h,
|
|
806
|
+
ref: t,
|
|
807
|
+
value: _,
|
|
808
|
+
children: w
|
|
809
|
+
}) : w;
|
|
810
|
+
}), tn = ({ vTheme: e, vSpec: t, id: n, layout: i }) => {
|
|
811
|
+
let a = e?.fonts?.general.fontFamily ?? "Roboto", o = {
|
|
812
|
+
...c,
|
|
813
|
+
...t.treeChartSettings?.nodeLayout?.border
|
|
30
814
|
};
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
...
|
|
34
|
-
...
|
|
35
|
-
},
|
|
815
|
+
o.enabled === !1 && (o.borderWidth = 0);
|
|
816
|
+
let s = {
|
|
817
|
+
...f,
|
|
818
|
+
...t.treeChartSettings?.nodeLayout.hoverStyle
|
|
819
|
+
}, u = t.treeChartSettings?.nodeLayout?.backgroundColor ?? l.backgroundColor, d = new ye(u).isLight() ? r.grey1 : r.grey5;
|
|
36
820
|
return `
|
|
37
|
-
#${
|
|
821
|
+
#${n} {
|
|
38
822
|
&[data-mode="view"] .tree-toolbar {
|
|
39
823
|
display: none;
|
|
40
824
|
}
|
|
@@ -42,20 +826,20 @@ var O = S(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("sv
|
|
|
42
826
|
display: flex;
|
|
43
827
|
}
|
|
44
828
|
|
|
45
|
-
--link-color: ${
|
|
829
|
+
--link-color: ${r.grey3};
|
|
46
830
|
|
|
47
|
-
--border-color: ${
|
|
48
|
-
--border-width: ${
|
|
49
|
-
--border-color-edit: ${
|
|
50
|
-
--border-radius: ${
|
|
51
|
-
--border-color-selected: ${
|
|
831
|
+
--border-color: ${o.borderColor};
|
|
832
|
+
--border-width: ${o.borderWidth}px;
|
|
833
|
+
--border-color-edit: ${r.secondaryPurple};
|
|
834
|
+
--border-radius: ${o.borderRadius}px;
|
|
835
|
+
--border-color-selected: ${r.grey2};
|
|
52
836
|
|
|
53
|
-
--border-hover-width: ${
|
|
54
|
-
--border-hover-color: ${
|
|
837
|
+
--border-hover-width: ${s.borderWidth}px;
|
|
838
|
+
--border-hover-color: ${s.borderColor || o.borderColor};
|
|
55
839
|
|
|
56
|
-
--node-background: ${
|
|
57
|
-
--node-background-highlight: ${
|
|
58
|
-
--font-color: ${
|
|
840
|
+
--node-background: ${u};
|
|
841
|
+
--node-background-highlight: ${r.grey2};
|
|
842
|
+
--font-color: ${d};
|
|
59
843
|
|
|
60
844
|
.links-wrapper path {
|
|
61
845
|
stroke: var(--link-color);
|
|
@@ -81,14 +865,14 @@ var O = S(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("sv
|
|
|
81
865
|
|
|
82
866
|
.button-content {
|
|
83
867
|
border:1px solid var(--border-color);
|
|
84
|
-
border-radius: ${Math.ceil(
|
|
868
|
+
border-radius: ${Math.ceil(o.borderRadius / 2)}px;
|
|
85
869
|
padding:1px 3px;
|
|
86
870
|
font-size:9px;
|
|
87
871
|
margin:auto auto;
|
|
88
872
|
background-color: var(--node-background);
|
|
89
873
|
}
|
|
90
874
|
&:hover .button-content {
|
|
91
|
-
background-color: ${
|
|
875
|
+
background-color: ${r.grey5};
|
|
92
876
|
}
|
|
93
877
|
}
|
|
94
878
|
|
|
@@ -106,7 +890,7 @@ var O = S(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("sv
|
|
|
106
890
|
.node-content {
|
|
107
891
|
color: var(--font-color);
|
|
108
892
|
font-size: 12px;
|
|
109
|
-
font-family: ${
|
|
893
|
+
font-family: ${a}, sans-serif;
|
|
110
894
|
width: 100%;
|
|
111
895
|
height: 100%;
|
|
112
896
|
border: var(--border-width) solid var(--border-color);
|
|
@@ -144,7 +928,7 @@ var O = S(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("sv
|
|
|
144
928
|
}
|
|
145
929
|
|
|
146
930
|
.dragging-active .drop-target .node-content::after {
|
|
147
|
-
background-color: ${
|
|
931
|
+
background-color: ${r.feedbackBlue};
|
|
148
932
|
opacity: 1;
|
|
149
933
|
}
|
|
150
934
|
|
|
@@ -163,7 +947,7 @@ var O = S(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("sv
|
|
|
163
947
|
width: 100%;
|
|
164
948
|
height: 100%;
|
|
165
949
|
border-radius: var(--border-radius);
|
|
166
|
-
background-color: ${
|
|
950
|
+
background-color: ${r.grey2};
|
|
167
951
|
opacity: 0.2;
|
|
168
952
|
}
|
|
169
953
|
.node-excluded .node-foreign-object-div {
|
|
@@ -171,27 +955,27 @@ var O = S(), Ie = ({ fillColor: e = t.grey2 }) => /* @__PURE__ */ (0, O.jsx)("sv
|
|
|
171
955
|
}
|
|
172
956
|
}
|
|
173
957
|
|
|
174
|
-
${
|
|
175
|
-
},
|
|
176
|
-
function
|
|
958
|
+
${i.getCSS(n, t)}`;
|
|
959
|
+
}, nn = { depth: -1 }, rn = {}, an = {};
|
|
960
|
+
function on(e) {
|
|
177
961
|
return e.id;
|
|
178
962
|
}
|
|
179
|
-
function
|
|
963
|
+
function sn(e) {
|
|
180
964
|
return e.parentId;
|
|
181
965
|
}
|
|
182
|
-
function
|
|
183
|
-
var e =
|
|
966
|
+
function cn() {
|
|
967
|
+
var e = on, t = sn, n;
|
|
184
968
|
function r(r) {
|
|
185
969
|
var i = Array.from(r), a = e, o = t, s, c, l, u, d, f, p, m, h = /* @__PURE__ */ new Map();
|
|
186
970
|
if (n != null) {
|
|
187
|
-
let e = i.map((e, t) =>
|
|
188
|
-
for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(
|
|
971
|
+
let e = i.map((e, t) => ln(n(e, t, r))), t = e.map(un), s = new Set(e).add("");
|
|
972
|
+
for (let n of t) s.has(n) || (s.add(n), e.push(n), t.push(un(n)), i.push(an));
|
|
189
973
|
a = (t, n) => e[n], o = (e, n) => t[n];
|
|
190
974
|
}
|
|
191
|
-
for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new
|
|
975
|
+
for (l = 0, s = i.length; l < s; ++l) c = i[l], f = i[l] = new Ze(c), (p = a(c, l, r)) != null && (p += "") && (m = f.id = p, h.set(m, h.has(m) ? rn : f)), (p = o(c, l, r)) != null && (p += "") && (f.parent = p);
|
|
192
976
|
for (l = 0; l < s; ++l) if (f = i[l], p = f.parent) {
|
|
193
977
|
if (d = h.get(p), !d) throw Error("missing: " + p);
|
|
194
|
-
if (d ===
|
|
978
|
+
if (d === rn) throw Error("ambiguous: " + p);
|
|
195
979
|
d.children ? d.children.push(f) : d.children = [f], f.parent = d;
|
|
196
980
|
} else {
|
|
197
981
|
if (u) throw Error("multiple roots");
|
|
@@ -199,34 +983,34 @@ function Ue() {
|
|
|
199
983
|
}
|
|
200
984
|
if (!u) throw Error("no root");
|
|
201
985
|
if (n != null) {
|
|
202
|
-
for (; u.data ===
|
|
203
|
-
for (let e = i.length - 1; e >= 0 && (f = i[e], f.data ===
|
|
986
|
+
for (; u.data === an && u.children.length === 1;) u = u.children[0], --s;
|
|
987
|
+
for (let e = i.length - 1; e >= 0 && (f = i[e], f.data === an); --e) f.data = null;
|
|
204
988
|
}
|
|
205
|
-
if (u.parent =
|
|
989
|
+
if (u.parent = nn, u.eachBefore(function(e) {
|
|
206
990
|
e.depth = e.parent.depth + 1, --s;
|
|
207
|
-
}).eachBefore(
|
|
991
|
+
}).eachBefore(Xe), u.parent = null, s > 0) throw Error("cycle");
|
|
208
992
|
return u;
|
|
209
993
|
}
|
|
210
994
|
return r.id = function(t) {
|
|
211
|
-
return arguments.length ? (e =
|
|
995
|
+
return arguments.length ? (e = Qe(t), r) : e;
|
|
212
996
|
}, r.parentId = function(e) {
|
|
213
|
-
return arguments.length ? (t =
|
|
997
|
+
return arguments.length ? (t = Qe(e), r) : t;
|
|
214
998
|
}, r.path = function(e) {
|
|
215
|
-
return arguments.length ? (n =
|
|
999
|
+
return arguments.length ? (n = Qe(e), r) : n;
|
|
216
1000
|
}, r;
|
|
217
1001
|
}
|
|
218
|
-
function
|
|
1002
|
+
function ln(e) {
|
|
219
1003
|
e = `${e}`;
|
|
220
1004
|
let t = e.length;
|
|
221
|
-
return
|
|
1005
|
+
return dn(e, t - 1) && !dn(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
|
|
222
1006
|
}
|
|
223
|
-
function
|
|
1007
|
+
function un(e) {
|
|
224
1008
|
let t = e.length;
|
|
225
1009
|
if (t < 2) return "";
|
|
226
|
-
for (; --t > 1 && !
|
|
1010
|
+
for (; --t > 1 && !dn(e, t););
|
|
227
1011
|
return e.slice(0, t);
|
|
228
1012
|
}
|
|
229
|
-
function
|
|
1013
|
+
function dn(e, t) {
|
|
230
1014
|
if (e[t] === "/") {
|
|
231
1015
|
let n = 0;
|
|
232
1016
|
for (; t > 0 && e[--t] === "\\";) ++n;
|
|
@@ -234,39 +1018,39 @@ function Ke(e, t) {
|
|
|
234
1018
|
}
|
|
235
1019
|
return !1;
|
|
236
1020
|
}
|
|
237
|
-
function
|
|
1021
|
+
function fn(e, t) {
|
|
238
1022
|
return e.parent === t.parent ? 1 : 2;
|
|
239
1023
|
}
|
|
240
|
-
function
|
|
1024
|
+
function pn(e) {
|
|
241
1025
|
var t = e.children;
|
|
242
1026
|
return t ? t[0] : e.t;
|
|
243
1027
|
}
|
|
244
|
-
function
|
|
1028
|
+
function mn(e) {
|
|
245
1029
|
var t = e.children;
|
|
246
1030
|
return t ? t[t.length - 1] : e.t;
|
|
247
1031
|
}
|
|
248
|
-
function
|
|
1032
|
+
function hn(e, t, n) {
|
|
249
1033
|
var r = n / (t.i - e.i);
|
|
250
1034
|
t.c -= r, t.s += n, e.c += r, t.z += n, t.m += n;
|
|
251
1035
|
}
|
|
252
|
-
function
|
|
1036
|
+
function gn(e) {
|
|
253
1037
|
for (var t = 0, n = 0, r = e.children, i = r.length, a; --i >= 0;) a = r[i], a.z += t, a.m += t, t += a.s + (n += a.c);
|
|
254
1038
|
}
|
|
255
|
-
function
|
|
1039
|
+
function _n(e, t, n) {
|
|
256
1040
|
return e.a.parent === t.parent ? e.a : n;
|
|
257
1041
|
}
|
|
258
|
-
function
|
|
1042
|
+
function vn(e, t) {
|
|
259
1043
|
this._ = e, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = t;
|
|
260
1044
|
}
|
|
261
|
-
|
|
262
|
-
function
|
|
263
|
-
for (var t = new
|
|
264
|
-
return (t.parent = new
|
|
1045
|
+
vn.prototype = Object.create(Ze.prototype);
|
|
1046
|
+
function yn(e) {
|
|
1047
|
+
for (var t = new vn(e, 0), n, r = [t], i, a, o, s; n = r.pop();) if (a = n._.children) for (n.children = Array(s = a.length), o = s - 1; o >= 0; --o) r.push(i = n.children[o] = new vn(a[o], o)), i.parent = n;
|
|
1048
|
+
return (t.parent = new vn(null, 0)).children = [t], t;
|
|
265
1049
|
}
|
|
266
|
-
function
|
|
267
|
-
var e =
|
|
1050
|
+
function bn() {
|
|
1051
|
+
var e = fn, t = 1, n = 1, r = null;
|
|
268
1052
|
function i(i) {
|
|
269
|
-
var s =
|
|
1053
|
+
var s = yn(i);
|
|
270
1054
|
if (s.eachAfter(a), s.parent.m = -s.z, s.eachBefore(o), r) i.eachBefore(c);
|
|
271
1055
|
else {
|
|
272
1056
|
var l = i, u = i, d = i;
|
|
@@ -283,7 +1067,7 @@ function tt() {
|
|
|
283
1067
|
function a(t) {
|
|
284
1068
|
var n = t.children, r = t.parent.children, i = t.i ? r[t.i - 1] : null;
|
|
285
1069
|
if (n) {
|
|
286
|
-
|
|
1070
|
+
gn(t);
|
|
287
1071
|
var a = (n[0].z + n[n.length - 1].z) / 2;
|
|
288
1072
|
i ? (t.z = i.z + e(t._, i._), t.m = t.z - a) : t.z = a;
|
|
289
1073
|
} else i && (t.z = i.z + e(t._, i._));
|
|
@@ -294,8 +1078,8 @@ function tt() {
|
|
|
294
1078
|
}
|
|
295
1079
|
function s(t, n, r) {
|
|
296
1080
|
if (n) {
|
|
297
|
-
for (var i = t, a = t, o = n, s = i.parent.children[0], c = i.m, l = a.m, u = o.m, d = s.m, f; o =
|
|
298
|
-
o && !
|
|
1081
|
+
for (var i = t, a = t, o = n, s = i.parent.children[0], c = i.m, l = a.m, u = o.m, d = s.m, f; o = mn(o), i = pn(i), o && i;) s = pn(s), a = mn(a), a.a = t, f = o.z + u - i.z - c + e(o._, i._), f > 0 && (hn(_n(o, t, r), t, f), c += f, l += f), u += o.m, c += i.m, d += s.m, l += a.m;
|
|
1082
|
+
o && !mn(a) && (a.t = o, a.m += u - l), i && !pn(s) && (s.t = i, s.m += c - d, r = t);
|
|
299
1083
|
}
|
|
300
1084
|
return r;
|
|
301
1085
|
}
|
|
@@ -310,14 +1094,14 @@ function tt() {
|
|
|
310
1094
|
return arguments.length ? (r = !0, t = +e[0], n = +e[1], i) : r ? [t, n] : null;
|
|
311
1095
|
}, i;
|
|
312
1096
|
}
|
|
313
|
-
var
|
|
1097
|
+
var R = "__root__", xn = "__total__", Sn = (e) => `__dimension__${JSON.stringify(e)}`, Cn = (e, t) => {
|
|
314
1098
|
let n = e[t];
|
|
315
1099
|
return n == null ? ["nil"] : [
|
|
316
1100
|
"value",
|
|
317
1101
|
typeof n,
|
|
318
1102
|
n
|
|
319
1103
|
];
|
|
320
|
-
},
|
|
1104
|
+
}, wn = (e, t) => {
|
|
321
1105
|
if (t?.indicator !== "custom") return;
|
|
322
1106
|
let n = t?.indicatorThreshold;
|
|
323
1107
|
if (!n || e == null) return {
|
|
@@ -343,64 +1127,64 @@ var A = "__root__", nt = "__total__", rt = (e) => `__dimension__${JSON.stringify
|
|
|
343
1127
|
color: null,
|
|
344
1128
|
icon: void 0
|
|
345
1129
|
};
|
|
346
|
-
},
|
|
347
|
-
let
|
|
1130
|
+
}, Tn = (e, t, n, r) => {
|
|
1131
|
+
let i = {};
|
|
348
1132
|
return e.slots?.forEach((n) => {
|
|
349
1133
|
if (n.key === "main") return;
|
|
350
|
-
let
|
|
1134
|
+
let a = {
|
|
351
1135
|
enabled: n.enabled === !0,
|
|
352
1136
|
label: "-",
|
|
353
1137
|
value: null,
|
|
354
1138
|
indicator: n.indicator ?? null
|
|
355
1139
|
};
|
|
356
|
-
if (
|
|
357
|
-
let
|
|
1140
|
+
if (a.enabled) {
|
|
1141
|
+
let i = e.formatter;
|
|
358
1142
|
if (n.source === "field") {
|
|
359
1143
|
let s = r?.find((t) => t.parentId === e.dataItem.uniqueSignature && t.role === `tree-${n.key}`);
|
|
360
1144
|
if (s) {
|
|
361
|
-
let e =
|
|
362
|
-
s.formatter && (
|
|
1145
|
+
let e = o(s.dataItem);
|
|
1146
|
+
s.formatter && (i = s.formatter), e && (a.value = t?.[e], a.label = a.value === null ? "-" : m(i?.format, a.value) ?? "-");
|
|
363
1147
|
}
|
|
364
|
-
} else n.source === "variable" && (
|
|
365
|
-
|
|
1148
|
+
} else n.source === "variable" && (a.value = n.propertyValue, a.label = a.value === null ? "-" : m(i?.format, a.value) ?? "-");
|
|
1149
|
+
a.customIndicator = wn(a.value, n);
|
|
366
1150
|
}
|
|
367
|
-
|
|
368
|
-
}),
|
|
369
|
-
},
|
|
1151
|
+
i[n.key] = { ...a };
|
|
1152
|
+
}), i;
|
|
1153
|
+
}, En = (e, t, n, r = !1) => {
|
|
370
1154
|
if (n === 0 || e.data.id === "__total__") return !0;
|
|
371
1155
|
let i = t ?? 2;
|
|
372
1156
|
return e.depth - +!!r < i;
|
|
373
|
-
},
|
|
1157
|
+
}, Dn = (e, t, n) => {
|
|
374
1158
|
let r = [{
|
|
375
|
-
id:
|
|
1159
|
+
id: R,
|
|
376
1160
|
parentId: null,
|
|
377
1161
|
disabled: !1
|
|
378
|
-
}],
|
|
1162
|
+
}], i = /* @__PURE__ */ new Set();
|
|
379
1163
|
e.measures.forEach((e) => {
|
|
380
|
-
|
|
1164
|
+
i.add(e.dataItem.uniqueSignature);
|
|
381
1165
|
});
|
|
382
|
-
let
|
|
1166
|
+
let a = e.measures.filter((e) => s(e));
|
|
383
1167
|
e.measures.forEach((e) => {
|
|
384
|
-
let t = e.dataItem.uniqueSignature, n = e.parentId &&
|
|
1168
|
+
let t = e.dataItem.uniqueSignature, n = e.parentId && i.has(e.parentId) ? e.parentId : R;
|
|
385
1169
|
r.push({
|
|
386
1170
|
id: t,
|
|
387
1171
|
parentId: n,
|
|
388
|
-
disabled: !
|
|
1172
|
+
disabled: !s(e)
|
|
389
1173
|
});
|
|
390
1174
|
});
|
|
391
|
-
let
|
|
392
|
-
|
|
1175
|
+
let c = cn().id((e) => e.id).parentId((e) => e.parentId)(r), l = [];
|
|
1176
|
+
c.descendants().forEach((e) => {
|
|
393
1177
|
if (e.data.disabled) return;
|
|
394
1178
|
let t = e.ancestors().slice(1).find((e) => !e.data.disabled);
|
|
395
|
-
t ?
|
|
1179
|
+
t ? l.push({
|
|
396
1180
|
id: e.data.id,
|
|
397
1181
|
parentId: t.data.id
|
|
398
|
-
}) :
|
|
1182
|
+
}) : l.push({
|
|
399
1183
|
id: e.data.id,
|
|
400
1184
|
parentId: null
|
|
401
1185
|
});
|
|
402
1186
|
});
|
|
403
|
-
let u =
|
|
1187
|
+
let u = l.flatMap((n) => {
|
|
404
1188
|
if (n.id === "__root__") return [{
|
|
405
1189
|
id: n.id,
|
|
406
1190
|
parentId: null,
|
|
@@ -410,127 +1194,127 @@ var A = "__root__", nt = "__total__", rt = (e) => `__dimension__${JSON.stringify
|
|
|
410
1194
|
value: null
|
|
411
1195
|
}
|
|
412
1196
|
}];
|
|
413
|
-
let r =
|
|
1197
|
+
let r = a.find((e) => e.dataItem.uniqueSignature === n.id);
|
|
414
1198
|
if (!r) return [];
|
|
415
|
-
let
|
|
1199
|
+
let i = o(r.dataItem), s = t[0].items?.[0], c = r ? Tn(r, s, a, e.supportingMeasures) : {}, l = s?.[i], u = r?.slots?.find((e) => e.key === "main");
|
|
416
1200
|
return [{
|
|
417
1201
|
id: n.id,
|
|
418
1202
|
parentId: n.parentId,
|
|
419
|
-
label:
|
|
1203
|
+
label: p(r),
|
|
420
1204
|
value: {
|
|
421
|
-
label:
|
|
422
|
-
value:
|
|
1205
|
+
label: m(r.formatter?.format, t[0].items?.[0]?.[i]) ?? "-",
|
|
1206
|
+
value: l
|
|
423
1207
|
},
|
|
424
|
-
indicator:
|
|
425
|
-
customIndicator:
|
|
1208
|
+
indicator: u?.indicator ?? null,
|
|
1209
|
+
customIndicator: wn(l, u),
|
|
426
1210
|
brush: {
|
|
427
|
-
key: [
|
|
428
|
-
value:
|
|
1211
|
+
key: [de.sourceKey, de.field].join("/"),
|
|
1212
|
+
value: ce(r)
|
|
429
1213
|
},
|
|
430
1214
|
...c
|
|
431
1215
|
}];
|
|
432
|
-
}), d =
|
|
1216
|
+
}), d = cn().id((e) => e.id).parentId((e) => e.parentId)(u), f = a.map((e) => e.dataItem.uniqueSignature);
|
|
433
1217
|
return d.sort((e, t) => f.indexOf(e.data.id) - f.indexOf(t.data.id)), d.descendants().forEach((e) => {
|
|
434
1218
|
let t = !1;
|
|
435
1219
|
t = e.data.id in n ? n[e.data.id] === !1 : e.data.expanded?.enabled ? e.data.expanded.value === !1 : !1, t && (e._children = e.children, e.children = void 0);
|
|
436
1220
|
}), d;
|
|
437
|
-
},
|
|
1221
|
+
}, On = (e, t, n) => {
|
|
438
1222
|
if (t.itemsNotAffectedByFiltering?.pattern?.length && e.staticFilters.ignoreGlobalFilters && e.staticFilters.showGlobalFiltersEffect) {
|
|
439
1223
|
let e = [0, ...t.itemsNotAffectedByFiltering.pattern.map((e) => n[e]).filter((e) => e !== null)].join("-");
|
|
440
1224
|
return !t.itemsNotAffectedByFiltering.itemsMap?.[e];
|
|
441
1225
|
}
|
|
442
1226
|
return !1;
|
|
443
|
-
},
|
|
444
|
-
let { id: o, parentId: s, prop: c, measureProp: l, dataItemIdx: u, engineKey: d } = a, f = n?.slots?.find((e) => e.key === "main"), p = i && n ?
|
|
1227
|
+
}, kn = (e, t, n, r, i, a) => {
|
|
1228
|
+
let { id: o, parentId: s, prop: c, measureProp: l, dataItemIdx: u, engineKey: d } = a, f = n?.slots?.find((e) => e.key === "main"), p = i && n ? Tn(n, r, [n], e.supportingMeasures) : {};
|
|
445
1229
|
return {
|
|
446
1230
|
id: o,
|
|
447
1231
|
parentId: s,
|
|
448
1232
|
label: String(r[c]),
|
|
449
1233
|
row: +u,
|
|
450
1234
|
value: i && n && l ? {
|
|
451
|
-
label:
|
|
1235
|
+
label: m(n.formatter?.format, r[l]) ?? "-",
|
|
452
1236
|
value: r[l]
|
|
453
1237
|
} : null,
|
|
454
1238
|
indicator: f?.indicator ?? null,
|
|
455
|
-
customIndicator:
|
|
1239
|
+
customIndicator: wn(l ? r[l] : null, f),
|
|
456
1240
|
brush: {
|
|
457
1241
|
key: d,
|
|
458
1242
|
value: r[c]
|
|
459
1243
|
},
|
|
460
|
-
_excluded:
|
|
1244
|
+
_excluded: On(e, t, r),
|
|
461
1245
|
...p
|
|
462
1246
|
};
|
|
463
1247
|
};
|
|
464
|
-
function
|
|
465
|
-
let r = t[0], a = e.dimensions.filter((e) =>
|
|
466
|
-
|
|
467
|
-
let n =
|
|
1248
|
+
function An(e, t, n) {
|
|
1249
|
+
let r = t[0], a = e.dimensions.filter((e) => s(e)), c = {}, l = a.map((t) => [o(t.dataItem), i(e.referencedData, t.dataItem.internalKey) ?? o(t.dataItem)]), u = e.measures.filter((e) => s(e))[0], d = u ? o(u.dataItem) : null, f = e.totals?.enabled ?? !1, p = u?.slots?.find((e) => e.key === "main"), h, g, _ = /* @__PURE__ */ new Set(), v = r.groupings, y = v ? Object.keys(v) : void 0;
|
|
1250
|
+
v && y && y.forEach((t) => {
|
|
1251
|
+
let n = v[t], i = r.items[+t], a = l.filter(([e]) => n[e] === 0);
|
|
468
1252
|
if (!a.length) {
|
|
469
|
-
|
|
1253
|
+
h = d ? i[d] : void 0, g = i;
|
|
470
1254
|
return;
|
|
471
1255
|
}
|
|
472
|
-
let [o,
|
|
473
|
-
a.length <
|
|
474
|
-
engineKey:
|
|
1256
|
+
let [o, s] = a.length ? a[a.length - 1] : ["", ""], p = Sn(a.map((e) => Cn(i, e[0]))), m = a.slice(0, -1), y = m.length ? Sn(m.map((e) => Cn(i, e[0]))) : f ? xn : R;
|
|
1257
|
+
a.length < l.length && _.add(p), c[p] || (c[p] = kn(e, r, u, i, !!u, {
|
|
1258
|
+
engineKey: s,
|
|
475
1259
|
id: p,
|
|
476
1260
|
parentId: y,
|
|
477
|
-
measureProp:
|
|
1261
|
+
measureProp: d,
|
|
478
1262
|
prop: o,
|
|
479
1263
|
dataItemIdx: +t
|
|
480
1264
|
}));
|
|
481
1265
|
}), r.items.forEach((t, n) => {
|
|
482
|
-
|
|
1266
|
+
y?.includes(String(n)) || l.forEach(([i, a], o, s) => {
|
|
483
1267
|
if (t[i] === void 0) {
|
|
484
1268
|
console.warn(`Dimension property ${i} is missing in data item at index ${n}, skipping this dimension for this item`);
|
|
485
1269
|
return;
|
|
486
1270
|
}
|
|
487
|
-
let
|
|
488
|
-
|
|
1271
|
+
let l = Sn(s.slice(0, o + 1).map((e) => Cn(t, e[0]))), p = o === 0 ? f ? xn : R : Sn(s.slice(0, o).map((e) => Cn(t, e[0])));
|
|
1272
|
+
c[l] || (c[l] = kn(e, r, u, t, o === s.length - 1 && !!u, {
|
|
489
1273
|
engineKey: a,
|
|
490
1274
|
dataItemIdx: n,
|
|
491
|
-
id:
|
|
1275
|
+
id: l,
|
|
492
1276
|
parentId: p,
|
|
493
|
-
measureProp:
|
|
1277
|
+
measureProp: d,
|
|
494
1278
|
prop: i
|
|
495
1279
|
}));
|
|
496
1280
|
});
|
|
497
1281
|
});
|
|
498
|
-
let
|
|
499
|
-
|
|
500
|
-
id:
|
|
501
|
-
parentId:
|
|
1282
|
+
let b = h ?? Object.values(c).reduce((e, t) => e + (_.has(t.id) ? 0 : t.value?.value ?? 0), 0), x = g ?? r.totals, S = Object.values(c);
|
|
1283
|
+
f && S.unshift({
|
|
1284
|
+
id: xn,
|
|
1285
|
+
parentId: R,
|
|
502
1286
|
label: "Total",
|
|
503
1287
|
row: -1,
|
|
504
|
-
value:
|
|
505
|
-
label:
|
|
506
|
-
value:
|
|
1288
|
+
value: u ? {
|
|
1289
|
+
label: m(u.formatter?.format, b) ?? "-",
|
|
1290
|
+
value: b
|
|
507
1291
|
} : null,
|
|
508
|
-
indicator:
|
|
509
|
-
customIndicator:
|
|
510
|
-
...
|
|
1292
|
+
indicator: p?.indicator ?? null,
|
|
1293
|
+
customIndicator: wn(b, p),
|
|
1294
|
+
...u ? Tn(u, x, [u], e.supportingMeasures) : {}
|
|
511
1295
|
}), S.unshift({
|
|
512
|
-
id:
|
|
1296
|
+
id: R,
|
|
513
1297
|
parentId: null,
|
|
514
1298
|
label: "Dummy Root",
|
|
515
1299
|
row: -1,
|
|
516
1300
|
value: null
|
|
517
1301
|
});
|
|
518
|
-
let C =
|
|
1302
|
+
let C = cn().id((e) => e.id).parentId((e) => e.parentId)(S);
|
|
519
1303
|
return C.sort((e, t) => (e.data.row ?? 0) - (t.data.row ?? 0)), C.descendants().forEach((t) => {
|
|
520
1304
|
if (t.data.id === "__total__") return;
|
|
521
1305
|
let r = !1;
|
|
522
|
-
r = t.data.id in n ? n[t.data.id] === !1 : !
|
|
1306
|
+
r = t.data.id in n ? n[t.data.id] === !1 : !En(t, e.treeChartSettings?.initialExpandedLevels, a.length, f), r && (t._children = t.children, t.children = void 0);
|
|
523
1307
|
}), C;
|
|
524
1308
|
}
|
|
525
|
-
var
|
|
526
|
-
let r = e.dimensions.filter(
|
|
527
|
-
return (0,
|
|
1309
|
+
var jn = ({ vSpec: e, data: t, nodeExpandState: n }) => {
|
|
1310
|
+
let r = e.dimensions.filter(s).length, [i, a] = (0, P.useState)(null);
|
|
1311
|
+
return (0, P.useEffect)(() => {
|
|
528
1312
|
if (r > 0) {
|
|
529
|
-
let r =
|
|
1313
|
+
let r = An(e, t, n.current);
|
|
530
1314
|
a(r);
|
|
531
1315
|
return;
|
|
532
1316
|
}
|
|
533
|
-
let i =
|
|
1317
|
+
let i = Dn(e, t, n.current);
|
|
534
1318
|
a(i);
|
|
535
1319
|
}, [
|
|
536
1320
|
t,
|
|
@@ -540,117 +1324,117 @@ var ft = ({ vSpec: e, data: t, nodeExpandState: n }) => {
|
|
|
540
1324
|
e.treeChartSettings?.nodeExpandState,
|
|
541
1325
|
e.totals?.enabled
|
|
542
1326
|
]), i;
|
|
543
|
-
},
|
|
1327
|
+
}, Mn = {
|
|
544
1328
|
svg: "http://www.w3.org/2000/svg",
|
|
545
1329
|
xhtml: "http://www.w3.org/1999/xhtml",
|
|
546
1330
|
xlink: "http://www.w3.org/1999/xlink",
|
|
547
1331
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
548
1332
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
549
1333
|
};
|
|
550
|
-
function
|
|
1334
|
+
function Nn(e) {
|
|
551
1335
|
var t = e += "", n = t.indexOf(":");
|
|
552
|
-
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)),
|
|
553
|
-
space:
|
|
1336
|
+
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Mn.hasOwnProperty(t) ? {
|
|
1337
|
+
space: Mn[t],
|
|
554
1338
|
local: e
|
|
555
1339
|
} : e;
|
|
556
1340
|
}
|
|
557
|
-
function
|
|
1341
|
+
function Pn(e) {
|
|
558
1342
|
return function() {
|
|
559
1343
|
var t = this.ownerDocument, n = this.namespaceURI;
|
|
560
1344
|
return n === "http://www.w3.org/1999/xhtml" && t.documentElement.namespaceURI === "http://www.w3.org/1999/xhtml" ? t.createElement(e) : t.createElementNS(n, e);
|
|
561
1345
|
};
|
|
562
1346
|
}
|
|
563
|
-
function
|
|
1347
|
+
function Fn(e) {
|
|
564
1348
|
return function() {
|
|
565
1349
|
return this.ownerDocument.createElementNS(e.space, e.local);
|
|
566
1350
|
};
|
|
567
1351
|
}
|
|
568
|
-
function
|
|
569
|
-
var t =
|
|
570
|
-
return (t.local ?
|
|
1352
|
+
function In(e) {
|
|
1353
|
+
var t = Nn(e);
|
|
1354
|
+
return (t.local ? Fn : Pn)(t);
|
|
571
1355
|
}
|
|
572
|
-
function
|
|
573
|
-
function
|
|
574
|
-
return e == null ?
|
|
1356
|
+
function Ln() {}
|
|
1357
|
+
function Rn(e) {
|
|
1358
|
+
return e == null ? Ln : function() {
|
|
575
1359
|
return this.querySelector(e);
|
|
576
1360
|
};
|
|
577
1361
|
}
|
|
578
|
-
function
|
|
579
|
-
typeof e != "function" && (e =
|
|
1362
|
+
function zn(e) {
|
|
1363
|
+
typeof e != "function" && (e = Rn(e));
|
|
580
1364
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = Array(o), c, l, u = 0; u < o; ++u) (c = a[u]) && (l = e.call(c, c.__data__, u, a)) && ("__data__" in c && (l.__data__ = c.__data__), s[u] = l);
|
|
581
|
-
return new
|
|
1365
|
+
return new B(r, this._parents);
|
|
582
1366
|
}
|
|
583
|
-
function
|
|
1367
|
+
function Bn(e) {
|
|
584
1368
|
return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
|
|
585
1369
|
}
|
|
586
|
-
function
|
|
1370
|
+
function Vn() {
|
|
587
1371
|
return [];
|
|
588
1372
|
}
|
|
589
|
-
function
|
|
590
|
-
return e == null ?
|
|
1373
|
+
function Hn(e) {
|
|
1374
|
+
return e == null ? Vn : function() {
|
|
591
1375
|
return this.querySelectorAll(e);
|
|
592
1376
|
};
|
|
593
1377
|
}
|
|
594
|
-
function
|
|
1378
|
+
function Un(e) {
|
|
595
1379
|
return function() {
|
|
596
|
-
return
|
|
1380
|
+
return Bn(e.apply(this, arguments));
|
|
597
1381
|
};
|
|
598
1382
|
}
|
|
599
|
-
function
|
|
600
|
-
e = typeof e == "function" ?
|
|
1383
|
+
function Wn(e) {
|
|
1384
|
+
e = typeof e == "function" ? Un(e) : Hn(e);
|
|
601
1385
|
for (var t = this._groups, n = t.length, r = [], i = [], a = 0; a < n; ++a) for (var o = t[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && (r.push(e.call(c, c.__data__, l, o)), i.push(c));
|
|
602
|
-
return new
|
|
1386
|
+
return new B(r, i);
|
|
603
1387
|
}
|
|
604
|
-
function
|
|
1388
|
+
function Gn(e) {
|
|
605
1389
|
return function() {
|
|
606
1390
|
return this.matches(e);
|
|
607
1391
|
};
|
|
608
1392
|
}
|
|
609
|
-
function
|
|
1393
|
+
function Kn(e) {
|
|
610
1394
|
return function(t) {
|
|
611
1395
|
return t.matches(e);
|
|
612
1396
|
};
|
|
613
1397
|
}
|
|
614
|
-
var
|
|
615
|
-
function
|
|
1398
|
+
var qn = Array.prototype.find;
|
|
1399
|
+
function Jn(e) {
|
|
616
1400
|
return function() {
|
|
617
|
-
return
|
|
1401
|
+
return qn.call(this.children, e);
|
|
618
1402
|
};
|
|
619
1403
|
}
|
|
620
|
-
function
|
|
1404
|
+
function Yn() {
|
|
621
1405
|
return this.firstElementChild;
|
|
622
1406
|
}
|
|
623
|
-
function
|
|
624
|
-
return this.select(e == null ?
|
|
1407
|
+
function Xn(e) {
|
|
1408
|
+
return this.select(e == null ? Yn : Jn(typeof e == "function" ? e : Kn(e)));
|
|
625
1409
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
1410
|
+
var Zn = Array.prototype.filter;
|
|
1411
|
+
function Qn() {
|
|
628
1412
|
return Array.from(this.children);
|
|
629
1413
|
}
|
|
630
|
-
function
|
|
1414
|
+
function $n(e) {
|
|
631
1415
|
return function() {
|
|
632
|
-
return
|
|
1416
|
+
return Zn.call(this.children, e);
|
|
633
1417
|
};
|
|
634
1418
|
}
|
|
635
|
-
function
|
|
636
|
-
return this.selectAll(e == null ?
|
|
1419
|
+
function er(e) {
|
|
1420
|
+
return this.selectAll(e == null ? Qn : $n(typeof e == "function" ? e : Kn(e)));
|
|
637
1421
|
}
|
|
638
|
-
function
|
|
639
|
-
typeof e != "function" && (e =
|
|
1422
|
+
function tr(e) {
|
|
1423
|
+
typeof e != "function" && (e = Gn(e));
|
|
640
1424
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
641
|
-
return new
|
|
1425
|
+
return new B(r, this._parents);
|
|
642
1426
|
}
|
|
643
|
-
function
|
|
1427
|
+
function nr(e) {
|
|
644
1428
|
return Array(e.length);
|
|
645
1429
|
}
|
|
646
|
-
function
|
|
647
|
-
return new
|
|
1430
|
+
function rr() {
|
|
1431
|
+
return new B(this._enter || this._groups.map(nr), this._parents);
|
|
648
1432
|
}
|
|
649
|
-
function
|
|
1433
|
+
function ir(e, t) {
|
|
650
1434
|
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
|
|
651
1435
|
}
|
|
652
|
-
|
|
653
|
-
constructor:
|
|
1436
|
+
ir.prototype = {
|
|
1437
|
+
constructor: ir,
|
|
654
1438
|
appendChild: function(e) {
|
|
655
1439
|
return this._parent.insertBefore(e, this._next);
|
|
656
1440
|
},
|
|
@@ -664,59 +1448,59 @@ zt.prototype = {
|
|
|
664
1448
|
return this._parent.querySelectorAll(e);
|
|
665
1449
|
}
|
|
666
1450
|
};
|
|
667
|
-
function
|
|
1451
|
+
function ar(e) {
|
|
668
1452
|
return function() {
|
|
669
1453
|
return e;
|
|
670
1454
|
};
|
|
671
1455
|
}
|
|
672
|
-
function
|
|
673
|
-
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new
|
|
1456
|
+
function or(e, t, n, r, i, a) {
|
|
1457
|
+
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new ir(e, a[o]);
|
|
674
1458
|
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
|
|
675
1459
|
}
|
|
676
|
-
function
|
|
1460
|
+
function sr(e, t, n, r, i, a, o) {
|
|
677
1461
|
var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
|
|
678
1462
|
for (s = 0; s < u; ++s) (c = t[s]) && (f[s] = p = o.call(c, c.__data__, s, t) + "", l.has(p) ? i[s] = c : l.set(p, c));
|
|
679
|
-
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new
|
|
1463
|
+
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new ir(e, a[s]);
|
|
680
1464
|
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
|
|
681
1465
|
}
|
|
682
|
-
function
|
|
1466
|
+
function cr(e) {
|
|
683
1467
|
return e.__data__;
|
|
684
1468
|
}
|
|
685
|
-
function
|
|
686
|
-
if (!arguments.length) return Array.from(this,
|
|
687
|
-
var n = t ?
|
|
688
|
-
typeof e != "function" && (e =
|
|
1469
|
+
function lr(e, t) {
|
|
1470
|
+
if (!arguments.length) return Array.from(this, cr);
|
|
1471
|
+
var n = t ? sr : or, r = this._parents, i = this._groups;
|
|
1472
|
+
typeof e != "function" && (e = ar(e));
|
|
689
1473
|
for (var a = i.length, o = Array(a), s = Array(a), c = Array(a), l = 0; l < a; ++l) {
|
|
690
|
-
var u = r[l], d = i[l], f = d.length, p =
|
|
1474
|
+
var u = r[l], d = i[l], f = d.length, p = ur(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
|
|
691
1475
|
n(u, d, h, g, c[l] = Array(f), p, t);
|
|
692
1476
|
for (var _ = 0, v = 0, y, b; _ < m; ++_) if (y = h[_]) {
|
|
693
1477
|
for (_ >= v && (v = _ + 1); !(b = g[v]) && ++v < m;);
|
|
694
1478
|
y._next = b || null;
|
|
695
1479
|
}
|
|
696
1480
|
}
|
|
697
|
-
return o = new
|
|
1481
|
+
return o = new B(o, r), o._enter = s, o._exit = c, o;
|
|
698
1482
|
}
|
|
699
|
-
function
|
|
1483
|
+
function ur(e) {
|
|
700
1484
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
701
1485
|
}
|
|
702
|
-
function
|
|
703
|
-
return new
|
|
1486
|
+
function dr() {
|
|
1487
|
+
return new B(this._exit || this._groups.map(nr), this._parents);
|
|
704
1488
|
}
|
|
705
|
-
function
|
|
1489
|
+
function fr(e, t, n) {
|
|
706
1490
|
var r = this.enter(), i = this, a = this.exit();
|
|
707
1491
|
return typeof e == "function" ? (r = e(r), r &&= r.selection()) : r = r.append(e + ""), t != null && (i = t(i), i &&= i.selection()), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
|
|
708
1492
|
}
|
|
709
|
-
function
|
|
1493
|
+
function pr(e) {
|
|
710
1494
|
for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, a = r.length, o = Math.min(i, a), s = Array(i), c = 0; c < o; ++c) for (var l = n[c], u = r[c], d = l.length, f = s[c] = Array(d), p, m = 0; m < d; ++m) (p = l[m] || u[m]) && (f[m] = p);
|
|
711
1495
|
for (; c < i; ++c) s[c] = n[c];
|
|
712
|
-
return new
|
|
1496
|
+
return new B(s, this._parents);
|
|
713
1497
|
}
|
|
714
|
-
function
|
|
1498
|
+
function mr() {
|
|
715
1499
|
for (var e = this._groups, t = -1, n = e.length; ++t < n;) for (var r = e[t], i = r.length - 1, a = r[i], o; --i >= 0;) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
|
|
716
1500
|
return this;
|
|
717
1501
|
}
|
|
718
|
-
function
|
|
719
|
-
e ||=
|
|
1502
|
+
function hr(e) {
|
|
1503
|
+
e ||= gr;
|
|
720
1504
|
function t(t, n) {
|
|
721
1505
|
return t && n ? e(t.__data__, n.__data__) : !t - !n;
|
|
722
1506
|
}
|
|
@@ -724,131 +1508,131 @@ function Xt(e) {
|
|
|
724
1508
|
for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
|
|
725
1509
|
c.sort(t);
|
|
726
1510
|
}
|
|
727
|
-
return new
|
|
1511
|
+
return new B(i, this._parents).order();
|
|
728
1512
|
}
|
|
729
|
-
function
|
|
1513
|
+
function gr(e, t) {
|
|
730
1514
|
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
731
1515
|
}
|
|
732
|
-
function
|
|
1516
|
+
function _r() {
|
|
733
1517
|
var e = arguments[0];
|
|
734
1518
|
return arguments[0] = this, e.apply(null, arguments), this;
|
|
735
1519
|
}
|
|
736
|
-
function
|
|
1520
|
+
function vr() {
|
|
737
1521
|
return Array.from(this);
|
|
738
1522
|
}
|
|
739
|
-
function
|
|
1523
|
+
function yr() {
|
|
740
1524
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length; i < a; ++i) {
|
|
741
1525
|
var o = r[i];
|
|
742
1526
|
if (o) return o;
|
|
743
1527
|
}
|
|
744
1528
|
return null;
|
|
745
1529
|
}
|
|
746
|
-
function
|
|
1530
|
+
function br() {
|
|
747
1531
|
let e = 0;
|
|
748
1532
|
for (let t of this) ++e;
|
|
749
1533
|
return e;
|
|
750
1534
|
}
|
|
751
|
-
function
|
|
1535
|
+
function xr() {
|
|
752
1536
|
return !this.node();
|
|
753
1537
|
}
|
|
754
|
-
function
|
|
1538
|
+
function Sr(e) {
|
|
755
1539
|
for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && e.call(s, s.__data__, a, i);
|
|
756
1540
|
return this;
|
|
757
1541
|
}
|
|
758
|
-
function
|
|
1542
|
+
function Cr(e) {
|
|
759
1543
|
return function() {
|
|
760
1544
|
this.removeAttribute(e);
|
|
761
1545
|
};
|
|
762
1546
|
}
|
|
763
|
-
function
|
|
1547
|
+
function wr(e) {
|
|
764
1548
|
return function() {
|
|
765
1549
|
this.removeAttributeNS(e.space, e.local);
|
|
766
1550
|
};
|
|
767
1551
|
}
|
|
768
|
-
function
|
|
1552
|
+
function Tr(e, t) {
|
|
769
1553
|
return function() {
|
|
770
1554
|
this.setAttribute(e, t);
|
|
771
1555
|
};
|
|
772
1556
|
}
|
|
773
|
-
function
|
|
1557
|
+
function Er(e, t) {
|
|
774
1558
|
return function() {
|
|
775
1559
|
this.setAttributeNS(e.space, e.local, t);
|
|
776
1560
|
};
|
|
777
1561
|
}
|
|
778
|
-
function
|
|
1562
|
+
function Dr(e, t) {
|
|
779
1563
|
return function() {
|
|
780
1564
|
var n = t.apply(this, arguments);
|
|
781
1565
|
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
|
|
782
1566
|
};
|
|
783
1567
|
}
|
|
784
|
-
function
|
|
1568
|
+
function Or(e, t) {
|
|
785
1569
|
return function() {
|
|
786
1570
|
var n = t.apply(this, arguments);
|
|
787
1571
|
n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
|
|
788
1572
|
};
|
|
789
1573
|
}
|
|
790
|
-
function
|
|
791
|
-
var n =
|
|
1574
|
+
function kr(e, t) {
|
|
1575
|
+
var n = Nn(e);
|
|
792
1576
|
if (arguments.length < 2) {
|
|
793
1577
|
var r = this.node();
|
|
794
1578
|
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
795
1579
|
}
|
|
796
|
-
return this.each((t == null ? n.local ?
|
|
1580
|
+
return this.each((t == null ? n.local ? wr : Cr : typeof t == "function" ? n.local ? Or : Dr : n.local ? Er : Tr)(n, t));
|
|
797
1581
|
}
|
|
798
|
-
function
|
|
1582
|
+
function Ar(e) {
|
|
799
1583
|
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
|
|
800
1584
|
}
|
|
801
|
-
function
|
|
1585
|
+
function jr(e) {
|
|
802
1586
|
return function() {
|
|
803
1587
|
this.style.removeProperty(e);
|
|
804
1588
|
};
|
|
805
1589
|
}
|
|
806
|
-
function
|
|
1590
|
+
function Mr(e, t, n) {
|
|
807
1591
|
return function() {
|
|
808
1592
|
this.style.setProperty(e, t, n);
|
|
809
1593
|
};
|
|
810
1594
|
}
|
|
811
|
-
function
|
|
1595
|
+
function Nr(e, t, n) {
|
|
812
1596
|
return function() {
|
|
813
1597
|
var r = t.apply(this, arguments);
|
|
814
1598
|
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
|
|
815
1599
|
};
|
|
816
1600
|
}
|
|
817
|
-
function
|
|
818
|
-
return arguments.length > 1 ? this.each((t == null ?
|
|
1601
|
+
function Pr(e, t, n) {
|
|
1602
|
+
return arguments.length > 1 ? this.each((t == null ? jr : typeof t == "function" ? Nr : Mr)(e, t, n ?? "")) : z(this.node(), e);
|
|
819
1603
|
}
|
|
820
|
-
function
|
|
821
|
-
return e.style.getPropertyValue(t) ||
|
|
1604
|
+
function z(e, t) {
|
|
1605
|
+
return e.style.getPropertyValue(t) || Ar(e).getComputedStyle(e, null).getPropertyValue(t);
|
|
822
1606
|
}
|
|
823
|
-
function
|
|
1607
|
+
function Fr(e) {
|
|
824
1608
|
return function() {
|
|
825
1609
|
delete this[e];
|
|
826
1610
|
};
|
|
827
1611
|
}
|
|
828
|
-
function
|
|
1612
|
+
function Ir(e, t) {
|
|
829
1613
|
return function() {
|
|
830
1614
|
this[e] = t;
|
|
831
1615
|
};
|
|
832
1616
|
}
|
|
833
|
-
function
|
|
1617
|
+
function Lr(e, t) {
|
|
834
1618
|
return function() {
|
|
835
1619
|
var n = t.apply(this, arguments);
|
|
836
1620
|
n == null ? delete this[e] : this[e] = n;
|
|
837
1621
|
};
|
|
838
1622
|
}
|
|
839
|
-
function
|
|
840
|
-
return arguments.length > 1 ? this.each((t == null ?
|
|
1623
|
+
function Rr(e, t) {
|
|
1624
|
+
return arguments.length > 1 ? this.each((t == null ? Fr : typeof t == "function" ? Lr : Ir)(e, t)) : this.node()[e];
|
|
841
1625
|
}
|
|
842
|
-
function
|
|
1626
|
+
function zr(e) {
|
|
843
1627
|
return e.trim().split(/^|\s+/);
|
|
844
1628
|
}
|
|
845
|
-
function
|
|
846
|
-
return e.classList || new
|
|
1629
|
+
function Br(e) {
|
|
1630
|
+
return e.classList || new Vr(e);
|
|
847
1631
|
}
|
|
848
|
-
function
|
|
849
|
-
this._node = e, this._names =
|
|
1632
|
+
function Vr(e) {
|
|
1633
|
+
this._node = e, this._names = zr(e.getAttribute("class") || "");
|
|
850
1634
|
}
|
|
851
|
-
|
|
1635
|
+
Vr.prototype = {
|
|
852
1636
|
add: function(e) {
|
|
853
1637
|
this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
|
|
854
1638
|
},
|
|
@@ -860,123 +1644,123 @@ Cn.prototype = {
|
|
|
860
1644
|
return this._names.indexOf(e) >= 0;
|
|
861
1645
|
}
|
|
862
1646
|
};
|
|
863
|
-
function
|
|
864
|
-
for (var n =
|
|
1647
|
+
function Hr(e, t) {
|
|
1648
|
+
for (var n = Br(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
|
|
865
1649
|
}
|
|
866
|
-
function
|
|
867
|
-
for (var n =
|
|
1650
|
+
function Ur(e, t) {
|
|
1651
|
+
for (var n = Br(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
|
|
868
1652
|
}
|
|
869
|
-
function
|
|
1653
|
+
function Wr(e) {
|
|
870
1654
|
return function() {
|
|
871
|
-
|
|
1655
|
+
Hr(this, e);
|
|
872
1656
|
};
|
|
873
1657
|
}
|
|
874
|
-
function
|
|
1658
|
+
function Gr(e) {
|
|
875
1659
|
return function() {
|
|
876
|
-
|
|
1660
|
+
Ur(this, e);
|
|
877
1661
|
};
|
|
878
1662
|
}
|
|
879
|
-
function
|
|
1663
|
+
function Kr(e, t) {
|
|
880
1664
|
return function() {
|
|
881
|
-
(t.apply(this, arguments) ?
|
|
1665
|
+
(t.apply(this, arguments) ? Hr : Ur)(this, e);
|
|
882
1666
|
};
|
|
883
1667
|
}
|
|
884
|
-
function
|
|
885
|
-
var n =
|
|
1668
|
+
function qr(e, t) {
|
|
1669
|
+
var n = zr(e + "");
|
|
886
1670
|
if (arguments.length < 2) {
|
|
887
|
-
for (var r =
|
|
1671
|
+
for (var r = Br(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
|
|
888
1672
|
return !0;
|
|
889
1673
|
}
|
|
890
|
-
return this.each((typeof t == "function" ?
|
|
1674
|
+
return this.each((typeof t == "function" ? Kr : t ? Wr : Gr)(n, t));
|
|
891
1675
|
}
|
|
892
|
-
function
|
|
1676
|
+
function Jr() {
|
|
893
1677
|
this.textContent = "";
|
|
894
1678
|
}
|
|
895
|
-
function
|
|
1679
|
+
function Yr(e) {
|
|
896
1680
|
return function() {
|
|
897
1681
|
this.textContent = e;
|
|
898
1682
|
};
|
|
899
1683
|
}
|
|
900
|
-
function
|
|
1684
|
+
function Xr(e) {
|
|
901
1685
|
return function() {
|
|
902
1686
|
var t = e.apply(this, arguments);
|
|
903
1687
|
this.textContent = t ?? "";
|
|
904
1688
|
};
|
|
905
1689
|
}
|
|
906
|
-
function
|
|
907
|
-
return arguments.length ? this.each(e == null ?
|
|
1690
|
+
function Zr(e) {
|
|
1691
|
+
return arguments.length ? this.each(e == null ? Jr : (typeof e == "function" ? Xr : Yr)(e)) : this.node().textContent;
|
|
908
1692
|
}
|
|
909
|
-
function
|
|
1693
|
+
function Qr() {
|
|
910
1694
|
this.innerHTML = "";
|
|
911
1695
|
}
|
|
912
|
-
function
|
|
1696
|
+
function $r(e) {
|
|
913
1697
|
return function() {
|
|
914
1698
|
this.innerHTML = e;
|
|
915
1699
|
};
|
|
916
1700
|
}
|
|
917
|
-
function
|
|
1701
|
+
function ei(e) {
|
|
918
1702
|
return function() {
|
|
919
1703
|
var t = e.apply(this, arguments);
|
|
920
1704
|
this.innerHTML = t ?? "";
|
|
921
1705
|
};
|
|
922
1706
|
}
|
|
923
|
-
function
|
|
924
|
-
return arguments.length ? this.each(e == null ?
|
|
1707
|
+
function ti(e) {
|
|
1708
|
+
return arguments.length ? this.each(e == null ? Qr : (typeof e == "function" ? ei : $r)(e)) : this.node().innerHTML;
|
|
925
1709
|
}
|
|
926
|
-
function
|
|
1710
|
+
function ni() {
|
|
927
1711
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
928
1712
|
}
|
|
929
|
-
function
|
|
930
|
-
return this.each(
|
|
1713
|
+
function ri() {
|
|
1714
|
+
return this.each(ni);
|
|
931
1715
|
}
|
|
932
|
-
function
|
|
1716
|
+
function ii() {
|
|
933
1717
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
934
1718
|
}
|
|
935
|
-
function
|
|
936
|
-
return this.each(
|
|
1719
|
+
function ai() {
|
|
1720
|
+
return this.each(ii);
|
|
937
1721
|
}
|
|
938
|
-
function
|
|
939
|
-
var t = typeof e == "function" ? e :
|
|
1722
|
+
function oi(e) {
|
|
1723
|
+
var t = typeof e == "function" ? e : In(e);
|
|
940
1724
|
return this.select(function() {
|
|
941
1725
|
return this.appendChild(t.apply(this, arguments));
|
|
942
1726
|
});
|
|
943
1727
|
}
|
|
944
|
-
function
|
|
1728
|
+
function si() {
|
|
945
1729
|
return null;
|
|
946
1730
|
}
|
|
947
|
-
function
|
|
948
|
-
var n = typeof e == "function" ? e :
|
|
1731
|
+
function ci(e, t) {
|
|
1732
|
+
var n = typeof e == "function" ? e : In(e), r = t == null ? si : typeof t == "function" ? t : Rn(t);
|
|
949
1733
|
return this.select(function() {
|
|
950
1734
|
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
951
1735
|
});
|
|
952
1736
|
}
|
|
953
|
-
function
|
|
1737
|
+
function li() {
|
|
954
1738
|
var e = this.parentNode;
|
|
955
1739
|
e && e.removeChild(this);
|
|
956
1740
|
}
|
|
957
|
-
function
|
|
958
|
-
return this.each(
|
|
1741
|
+
function ui() {
|
|
1742
|
+
return this.each(li);
|
|
959
1743
|
}
|
|
960
|
-
function
|
|
1744
|
+
function di() {
|
|
961
1745
|
var e = this.cloneNode(!1), t = this.parentNode;
|
|
962
1746
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
963
1747
|
}
|
|
964
|
-
function
|
|
1748
|
+
function fi() {
|
|
965
1749
|
var e = this.cloneNode(!0), t = this.parentNode;
|
|
966
1750
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
967
1751
|
}
|
|
968
|
-
function
|
|
969
|
-
return this.select(e ?
|
|
1752
|
+
function pi(e) {
|
|
1753
|
+
return this.select(e ? fi : di);
|
|
970
1754
|
}
|
|
971
|
-
function
|
|
1755
|
+
function mi(e) {
|
|
972
1756
|
return arguments.length ? this.property("__data__", e) : this.node().__data__;
|
|
973
1757
|
}
|
|
974
|
-
function
|
|
1758
|
+
function hi(e) {
|
|
975
1759
|
return function(t) {
|
|
976
1760
|
e.call(this, t, this.__data__);
|
|
977
1761
|
};
|
|
978
1762
|
}
|
|
979
|
-
function
|
|
1763
|
+
function gi(e) {
|
|
980
1764
|
return e.trim().split(/^|\s+/).map(function(e) {
|
|
981
1765
|
var t = "", n = e.indexOf(".");
|
|
982
1766
|
return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
|
|
@@ -985,7 +1769,7 @@ function Qn(e) {
|
|
|
985
1769
|
};
|
|
986
1770
|
});
|
|
987
1771
|
}
|
|
988
|
-
function
|
|
1772
|
+
function _i(e) {
|
|
989
1773
|
return function() {
|
|
990
1774
|
var t = this.__on;
|
|
991
1775
|
if (t) {
|
|
@@ -994,9 +1778,9 @@ function $n(e) {
|
|
|
994
1778
|
}
|
|
995
1779
|
};
|
|
996
1780
|
}
|
|
997
|
-
function
|
|
1781
|
+
function vi(e, t, n) {
|
|
998
1782
|
return function() {
|
|
999
|
-
var r = this.__on, i, a =
|
|
1783
|
+
var r = this.__on, i, a = hi(t);
|
|
1000
1784
|
if (r) {
|
|
1001
1785
|
for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
|
|
1002
1786
|
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
|
|
@@ -1012,8 +1796,8 @@ function er(e, t, n) {
|
|
|
1012
1796
|
}, r ? r.push(i) : this.__on = [i];
|
|
1013
1797
|
};
|
|
1014
1798
|
}
|
|
1015
|
-
function
|
|
1016
|
-
var r =
|
|
1799
|
+
function yi(e, t, n) {
|
|
1800
|
+
var r = gi(e + ""), i, a = r.length, o;
|
|
1017
1801
|
if (arguments.length < 2) {
|
|
1018
1802
|
var s = this.node().__on;
|
|
1019
1803
|
if (s) {
|
|
@@ -1021,87 +1805,87 @@ function tr(e, t, n) {
|
|
|
1021
1805
|
}
|
|
1022
1806
|
return;
|
|
1023
1807
|
}
|
|
1024
|
-
for (s = t ?
|
|
1808
|
+
for (s = t ? vi : _i, i = 0; i < a; ++i) this.each(s(r[i], t, n));
|
|
1025
1809
|
return this;
|
|
1026
1810
|
}
|
|
1027
|
-
function
|
|
1028
|
-
var r =
|
|
1811
|
+
function bi(e, t, n) {
|
|
1812
|
+
var r = Ar(e), i = r.CustomEvent;
|
|
1029
1813
|
typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
|
|
1030
1814
|
}
|
|
1031
|
-
function
|
|
1815
|
+
function xi(e, t) {
|
|
1032
1816
|
return function() {
|
|
1033
|
-
return
|
|
1817
|
+
return bi(this, e, t);
|
|
1034
1818
|
};
|
|
1035
1819
|
}
|
|
1036
|
-
function
|
|
1820
|
+
function Si(e, t) {
|
|
1037
1821
|
return function() {
|
|
1038
|
-
return
|
|
1822
|
+
return bi(this, e, t.apply(this, arguments));
|
|
1039
1823
|
};
|
|
1040
1824
|
}
|
|
1041
|
-
function
|
|
1042
|
-
return this.each((typeof t == "function" ?
|
|
1825
|
+
function Ci(e, t) {
|
|
1826
|
+
return this.each((typeof t == "function" ? Si : xi)(e, t));
|
|
1043
1827
|
}
|
|
1044
|
-
function*
|
|
1828
|
+
function* wi() {
|
|
1045
1829
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o);
|
|
1046
1830
|
}
|
|
1047
|
-
var
|
|
1048
|
-
function
|
|
1831
|
+
var Ti = [null];
|
|
1832
|
+
function B(e, t) {
|
|
1049
1833
|
this._groups = e, this._parents = t;
|
|
1050
1834
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return new
|
|
1835
|
+
function V() {
|
|
1836
|
+
return new B([[document.documentElement]], Ti);
|
|
1053
1837
|
}
|
|
1054
|
-
function
|
|
1838
|
+
function Ei() {
|
|
1055
1839
|
return this;
|
|
1056
1840
|
}
|
|
1057
|
-
|
|
1058
|
-
constructor:
|
|
1059
|
-
select:
|
|
1060
|
-
selectAll:
|
|
1061
|
-
selectChild:
|
|
1062
|
-
selectChildren:
|
|
1063
|
-
filter:
|
|
1064
|
-
data:
|
|
1065
|
-
enter:
|
|
1066
|
-
exit:
|
|
1067
|
-
join:
|
|
1068
|
-
merge:
|
|
1069
|
-
selection:
|
|
1070
|
-
order:
|
|
1071
|
-
sort:
|
|
1072
|
-
call:
|
|
1073
|
-
nodes:
|
|
1074
|
-
node:
|
|
1075
|
-
size:
|
|
1076
|
-
empty:
|
|
1077
|
-
each:
|
|
1078
|
-
attr:
|
|
1079
|
-
style:
|
|
1080
|
-
property:
|
|
1081
|
-
classed:
|
|
1082
|
-
text:
|
|
1083
|
-
html:
|
|
1084
|
-
raise:
|
|
1085
|
-
lower:
|
|
1086
|
-
append:
|
|
1087
|
-
insert:
|
|
1088
|
-
remove:
|
|
1089
|
-
clone:
|
|
1090
|
-
datum:
|
|
1091
|
-
on:
|
|
1092
|
-
dispatch:
|
|
1093
|
-
[Symbol.iterator]:
|
|
1841
|
+
B.prototype = V.prototype = {
|
|
1842
|
+
constructor: B,
|
|
1843
|
+
select: zn,
|
|
1844
|
+
selectAll: Wn,
|
|
1845
|
+
selectChild: Xn,
|
|
1846
|
+
selectChildren: er,
|
|
1847
|
+
filter: tr,
|
|
1848
|
+
data: lr,
|
|
1849
|
+
enter: rr,
|
|
1850
|
+
exit: dr,
|
|
1851
|
+
join: fr,
|
|
1852
|
+
merge: pr,
|
|
1853
|
+
selection: Ei,
|
|
1854
|
+
order: mr,
|
|
1855
|
+
sort: hr,
|
|
1856
|
+
call: _r,
|
|
1857
|
+
nodes: vr,
|
|
1858
|
+
node: yr,
|
|
1859
|
+
size: br,
|
|
1860
|
+
empty: xr,
|
|
1861
|
+
each: Sr,
|
|
1862
|
+
attr: kr,
|
|
1863
|
+
style: Pr,
|
|
1864
|
+
property: Rr,
|
|
1865
|
+
classed: qr,
|
|
1866
|
+
text: Zr,
|
|
1867
|
+
html: ti,
|
|
1868
|
+
raise: ri,
|
|
1869
|
+
lower: ai,
|
|
1870
|
+
append: oi,
|
|
1871
|
+
insert: ci,
|
|
1872
|
+
remove: ui,
|
|
1873
|
+
clone: pi,
|
|
1874
|
+
datum: mi,
|
|
1875
|
+
on: yi,
|
|
1876
|
+
dispatch: Ci,
|
|
1877
|
+
[Symbol.iterator]: wi
|
|
1094
1878
|
};
|
|
1095
|
-
function
|
|
1096
|
-
return typeof e == "string" ? new
|
|
1879
|
+
function H(e) {
|
|
1880
|
+
return typeof e == "string" ? new B([[document.querySelector(e)]], [document.documentElement]) : new B([[e]], Ti);
|
|
1097
1881
|
}
|
|
1098
|
-
function
|
|
1882
|
+
function Di(e) {
|
|
1099
1883
|
let t;
|
|
1100
1884
|
for (; t = e.sourceEvent;) e = t;
|
|
1101
1885
|
return e;
|
|
1102
1886
|
}
|
|
1103
|
-
function
|
|
1104
|
-
if (e =
|
|
1887
|
+
function U(e, t) {
|
|
1888
|
+
if (e = Di(e), t === void 0 && (t = e.currentTarget), t) {
|
|
1105
1889
|
var n = t.ownerSVGElement || t;
|
|
1106
1890
|
if (n.createSVGPoint) {
|
|
1107
1891
|
var r = n.createSVGPoint();
|
|
@@ -1114,94 +1898,94 @@ function F(e, t) {
|
|
|
1114
1898
|
}
|
|
1115
1899
|
return [e.pageX, e.pageY];
|
|
1116
1900
|
}
|
|
1117
|
-
function
|
|
1118
|
-
return typeof e == "string" ? new
|
|
1901
|
+
function Oi(e) {
|
|
1902
|
+
return typeof e == "string" ? new B([document.querySelectorAll(e)], [document.documentElement]) : new B([Bn(e)], Ti);
|
|
1119
1903
|
}
|
|
1120
|
-
var
|
|
1121
|
-
let n = new
|
|
1122
|
-
return (new
|
|
1123
|
-
},
|
|
1904
|
+
var ki = /* @__PURE__ */ e(be()), W = a[t.KPIChange], G = W.slots, Ai = "#577f56", ji = "#9e4d53", Mi = (e) => typeof e == "number" && Number.isFinite(e), Ni = (e, t) => {
|
|
1905
|
+
let n = new ki.default(e);
|
|
1906
|
+
return (new ki.default(t).isLight() ? n.lighten(.5).alpha(.5) : n.darken(.5).alpha(.5)).rgb().string();
|
|
1907
|
+
}, Pi = (e, t) => {
|
|
1124
1908
|
if (!e.enabled) return "";
|
|
1125
|
-
let n =
|
|
1909
|
+
let n = Mi(e.value) ? e.value : null, r = n === null ? "" : n < 0 ? "negative" : "positive", i = "", a = "";
|
|
1126
1910
|
if (e.indicator === "inverse") r = r === "negative" ? "positive" : "negative";
|
|
1127
1911
|
else if (e.indicator === "none") r = "";
|
|
1128
1912
|
else if (e.indicator === "custom") {
|
|
1129
1913
|
r = "";
|
|
1130
|
-
let n = e.customIndicator?.color ?
|
|
1131
|
-
i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${
|
|
1914
|
+
let n = e.customIndicator?.color ? Ni(e.customIndicator.color, t) : "inherit";
|
|
1915
|
+
i = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, e.customIndicator?.icon && (a = `<span class="footer-icon">${_.sanitize(e.customIndicator.icon)}</span>`);
|
|
1132
1916
|
}
|
|
1133
|
-
return `<div class="footer ${r}" style="${i}"><span class="footer-label">${
|
|
1134
|
-
},
|
|
1917
|
+
return `<div class="footer ${r}" style="${i}"><span class="footer-label">${_.sanitize(e.label ?? "-")}</span>${a}</div>`;
|
|
1918
|
+
}, Fi = (e, t) => {
|
|
1135
1919
|
if (!e.enabled) return "";
|
|
1136
|
-
let n = e.indicator, r =
|
|
1920
|
+
let n = e.indicator, r = Mi(e.value) ? e.value : null, i = r === null ? "neutral" : r < 0 ? "negative" : "positive", a = "", o = r === null ? "" : r < 0 ? "arrow_downward" : "arrow_upward";
|
|
1137
1921
|
if (n === "inverse") i = i === "negative" ? "positive" : "negative";
|
|
1138
1922
|
else if (n === "none") i = "", o = void 0;
|
|
1139
1923
|
else if (n === "custom") {
|
|
1140
1924
|
i = "";
|
|
1141
|
-
let n = e.customIndicator?.color ?
|
|
1925
|
+
let n = e.customIndicator?.color ? Ni(e.customIndicator.color, t) : "inherit";
|
|
1142
1926
|
a = `color: ${e.customIndicator?.color ?? "inherit"}; background-color: ${n};`, o = e.customIndicator?.icon;
|
|
1143
1927
|
}
|
|
1144
|
-
let s = o ? `<span class="pill-icon">${
|
|
1145
|
-
return `<div class="pill ${i}" style="${a}"><span class="pill-label">${
|
|
1146
|
-
},
|
|
1928
|
+
let s = o ? `<span class="pill-icon">${_.sanitize(o)}</span>` : "";
|
|
1929
|
+
return `<div class="pill ${i}" style="${a}"><span class="pill-label">${_.sanitize(e.label ?? "-")}</span>${s}</div>`;
|
|
1930
|
+
}, Ii = (e, t) => {
|
|
1147
1931
|
let n = e.value ?? {
|
|
1148
1932
|
label: "-",
|
|
1149
1933
|
value: null,
|
|
1150
1934
|
enabled: !1
|
|
1151
1935
|
}, r = "", i = "";
|
|
1152
|
-
return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${
|
|
1153
|
-
},
|
|
1154
|
-
let n = e.data.diff ??
|
|
1155
|
-
return e.data._upToTheRootHighlighted &&
|
|
1156
|
-
<div class="node-content layout-a ${
|
|
1157
|
-
<div class="label">${
|
|
1936
|
+
return e.indicator === "custom" && (e.customIndicator?.color && (r = `color: ${e.customIndicator.color};`), e.customIndicator?.icon && (i = `<span class="value-icon">${_.sanitize(e.customIndicator.icon)}</span>`)), `<div class="value ${t ? "value-space" : ""}" style="${r}"><span class="value-label">${_.sanitize(n.label)}</span>${i}</div>`;
|
|
1937
|
+
}, Li = (e, t) => {
|
|
1938
|
+
let n = e.data.diff ?? d.diff.defaults, r = e.data.change ?? d.change.defaults, i = t.config.nodeDefaultBackground ?? "#ffffff", a = Ii(e.data, !r.enabled), o = Pi(n, i), s = Fi(r, i), c = [];
|
|
1939
|
+
return e.data._upToTheRootHighlighted && c.push("node-highlight"), `
|
|
1940
|
+
<div class="node-content layout-a ${c.join(" ")}">
|
|
1941
|
+
<div class="label">${_.sanitize(e.data.label)}</div>
|
|
1158
1942
|
<div class="flex-row">
|
|
1159
|
-
${
|
|
1160
|
-
${
|
|
1943
|
+
${a}
|
|
1944
|
+
${s}
|
|
1161
1945
|
</div>
|
|
1162
|
-
${
|
|
1946
|
+
${o}
|
|
1163
1947
|
|
|
1164
1948
|
</div>
|
|
1165
1949
|
`;
|
|
1166
|
-
},
|
|
1950
|
+
}, Ri = ({ node: e, config: t }) => e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
|
|
1167
1951
|
left: (e) => e ? "◀" : "▶",
|
|
1168
1952
|
bottom: (e) => e ? "▼" : "▲",
|
|
1169
1953
|
right: (e) => e ? "▶" : "◀",
|
|
1170
1954
|
top: (e) => e ? "▲" : "▼"
|
|
1171
1955
|
}[t.layout](e.children)} </div>`;
|
|
1172
|
-
function
|
|
1956
|
+
function zi(e) {
|
|
1173
1957
|
if (e.data._upToTheRootHighlighted) {
|
|
1174
|
-
|
|
1958
|
+
H(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
|
|
1175
1959
|
return;
|
|
1176
1960
|
}
|
|
1177
1961
|
if (!e.data.diff?.enabled) {
|
|
1178
|
-
|
|
1962
|
+
H(this).style("stroke-width", null).style("stroke", null);
|
|
1179
1963
|
return;
|
|
1180
1964
|
}
|
|
1181
|
-
let t = (
|
|
1182
|
-
|
|
1183
|
-
let
|
|
1184
|
-
|
|
1965
|
+
let t = (Mi(e.data.diff?.value) ? e.data.diff.value : null) ?? (Mi(d.diff.defaults.value) ? d.diff.defaults.value : 0), n = e.parent?.children?.flatMap((t) => t.id === e.id || !t.data.diff?.enabled || !Mi(t.data.diff?.value) ? [] : [Math.abs(t.data.diff.value)]) ?? [], r = n.length ? Math.max(...n) : 0, i = Math.abs(t) > r, a = t < 0, o = a ? ji : Ai, s = e.data.diff?.indicator;
|
|
1966
|
+
s === "inverse" ? o = a ? Ai : ji : s === "none" ? o = "var(--link-color)" : s === "custom" && (o = e.data.diff?.customIndicator?.color ?? "var(--link-color)");
|
|
1967
|
+
let c = i ? 2 : 1;
|
|
1968
|
+
H(this).style("stroke", o).style("stroke-width", c);
|
|
1185
1969
|
}
|
|
1186
|
-
var
|
|
1970
|
+
var Bi = (e, t) => {
|
|
1187
1971
|
let n = {
|
|
1188
|
-
...
|
|
1972
|
+
...W.labelStyle,
|
|
1189
1973
|
...t.treeChartSettings.nodeLayout?.labelStyle,
|
|
1190
|
-
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
1974
|
+
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? W.labelStyle?.fontSize
|
|
1191
1975
|
}, r = {
|
|
1192
|
-
...
|
|
1976
|
+
...W.valueStyle,
|
|
1193
1977
|
...t.treeChartSettings.nodeLayout?.valueStyle,
|
|
1194
|
-
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
1978
|
+
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? W.valueStyle?.fontSize
|
|
1195
1979
|
}, i = {
|
|
1196
|
-
...
|
|
1197
|
-
...
|
|
1980
|
+
...G.change?.styling,
|
|
1981
|
+
...G.change?.styling?.fontStyle,
|
|
1198
1982
|
...t.treeChartSettings.nodeLayout?.slots?.change,
|
|
1199
|
-
fontSize: t.treeChartSettings.nodeLayout?.slots?.change?.fontSize ??
|
|
1983
|
+
fontSize: t.treeChartSettings.nodeLayout?.slots?.change?.fontSize ?? G.change?.styling?.fontSize
|
|
1200
1984
|
}, a = {
|
|
1201
|
-
...
|
|
1202
|
-
...
|
|
1985
|
+
...G.diff?.styling,
|
|
1986
|
+
...G.diff?.styling?.fontStyle,
|
|
1203
1987
|
...t.treeChartSettings.nodeLayout?.slots?.diff,
|
|
1204
|
-
fontSize: t.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ??
|
|
1988
|
+
fontSize: t.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ?? G.diff?.styling?.fontSize
|
|
1205
1989
|
};
|
|
1206
1990
|
return `
|
|
1207
1991
|
#${e} {
|
|
@@ -1329,68 +2113,68 @@ var xr = (e, t) => {
|
|
|
1329
2113
|
}
|
|
1330
2114
|
|
|
1331
2115
|
.positive {
|
|
1332
|
-
color: ${
|
|
2116
|
+
color: ${Ai};
|
|
1333
2117
|
background-color: #e4fae8;
|
|
1334
2118
|
}
|
|
1335
2119
|
|
|
1336
2120
|
.negative {
|
|
1337
|
-
color: ${
|
|
2121
|
+
color: ${ji};
|
|
1338
2122
|
background-color: #fcecec;
|
|
1339
2123
|
}
|
|
1340
2124
|
}
|
|
1341
2125
|
}`;
|
|
1342
|
-
},
|
|
2126
|
+
}, Vi = {
|
|
1343
2127
|
name: "KPI Change",
|
|
1344
|
-
...
|
|
1345
|
-
getNodeContent:
|
|
1346
|
-
getButtonContent:
|
|
1347
|
-
linkUpdate:
|
|
1348
|
-
getCSS:
|
|
2128
|
+
...W,
|
|
2129
|
+
getNodeContent: Li,
|
|
2130
|
+
getButtonContent: Ri,
|
|
2131
|
+
linkUpdate: zi,
|
|
2132
|
+
getCSS: Bi,
|
|
1349
2133
|
width: 180,
|
|
1350
2134
|
sizes: (e) => {
|
|
1351
2135
|
let t = {
|
|
1352
|
-
...
|
|
1353
|
-
...
|
|
2136
|
+
...G.diff?.styling,
|
|
2137
|
+
...G.diff?.styling?.fontStyle,
|
|
1354
2138
|
...e.treeChartSettings.nodeLayout?.slots?.diff,
|
|
1355
|
-
fontSize: e.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ??
|
|
2139
|
+
fontSize: e.treeChartSettings.nodeLayout?.slots?.diff?.fontSize ?? G.diff?.styling?.fontSize
|
|
1356
2140
|
}, n = {
|
|
1357
|
-
...
|
|
2141
|
+
...W.labelStyle,
|
|
1358
2142
|
...e.treeChartSettings.nodeLayout?.labelStyle,
|
|
1359
|
-
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
2143
|
+
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? W.labelStyle?.fontSize
|
|
1360
2144
|
}, r = {
|
|
1361
|
-
...
|
|
2145
|
+
...W.valueStyle,
|
|
1362
2146
|
...e.treeChartSettings.nodeLayout?.valueStyle,
|
|
1363
|
-
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
2147
|
+
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? W.valueStyle?.fontSize
|
|
1364
2148
|
};
|
|
1365
2149
|
return {
|
|
1366
|
-
label: Math.ceil(
|
|
1367
|
-
value: Math.ceil(
|
|
1368
|
-
diff: Math.ceil(
|
|
2150
|
+
label: Math.ceil(j(n.fontSize)) + 8,
|
|
2151
|
+
value: Math.ceil(j(r.fontSize)) + 8,
|
|
2152
|
+
diff: Math.ceil(j(t.fontSize)) + 16
|
|
1369
2153
|
};
|
|
1370
2154
|
},
|
|
1371
2155
|
height: (e, t) => {
|
|
1372
2156
|
let n = 20;
|
|
1373
|
-
return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ??
|
|
2157
|
+
return n += t?.label ?? 0, n += t?.value ?? 0, (e.data.diff ?? d.diff.defaults)?.enabled && (n += t?.diff ?? 0), n;
|
|
1374
2158
|
}
|
|
1375
|
-
},
|
|
2159
|
+
}, K = a[t.Basic], Hi = (e) => {
|
|
1376
2160
|
if (e.id === "__root__") return null;
|
|
1377
2161
|
let t = "", n = "";
|
|
1378
|
-
e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${
|
|
1379
|
-
let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${
|
|
2162
|
+
e.data.indicator === "custom" && (e.data.customIndicator?.color && (t = `color: ${e.data.customIndicator.color};`), e.data.customIndicator?.icon && (n = `<span class="value-icon">${_.sanitize(e.data.customIndicator.icon)}</span>`));
|
|
2163
|
+
let r = e.data.value ? `<div class="value" style="${t}"><span class="value-label">${_.sanitize(e.data.value.label)}</span>${n}</div>` : "", i = [];
|
|
1380
2164
|
return e.data._upToTheRootHighlighted && i.push("node-highlight"), `
|
|
1381
2165
|
<div class="node-content layout-b ${i.join(" ")}">
|
|
1382
|
-
<div class="label">${
|
|
2166
|
+
<div class="label">${_.sanitize(e.data.label)}</div>
|
|
1383
2167
|
${r}
|
|
1384
2168
|
</div>`;
|
|
1385
|
-
},
|
|
2169
|
+
}, Ui = (e, t) => {
|
|
1386
2170
|
let n = {
|
|
1387
|
-
...
|
|
2171
|
+
...K.labelStyle,
|
|
1388
2172
|
...t.treeChartSettings.nodeLayout?.labelStyle,
|
|
1389
|
-
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
2173
|
+
fontSize: t.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? K.labelStyle?.fontSize
|
|
1390
2174
|
}, r = {
|
|
1391
|
-
...
|
|
2175
|
+
...K.valueStyle,
|
|
1392
2176
|
...t.treeChartSettings.nodeLayout?.valueStyle,
|
|
1393
|
-
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
2177
|
+
fontSize: t.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? K.valueStyle?.fontSize
|
|
1394
2178
|
};
|
|
1395
2179
|
return `
|
|
1396
2180
|
#${e} {
|
|
@@ -1434,56 +2218,56 @@ var xr = (e, t) => {
|
|
|
1434
2218
|
}
|
|
1435
2219
|
}
|
|
1436
2220
|
}`;
|
|
1437
|
-
},
|
|
2221
|
+
}, Wi = {
|
|
1438
2222
|
name: "Basic",
|
|
1439
|
-
...
|
|
1440
|
-
getNodeContent:
|
|
1441
|
-
getCSS:
|
|
2223
|
+
...K,
|
|
2224
|
+
getNodeContent: Hi,
|
|
2225
|
+
getCSS: Ui,
|
|
1442
2226
|
width: 140,
|
|
1443
2227
|
sizes: (e) => {
|
|
1444
2228
|
let t = {
|
|
1445
|
-
...
|
|
2229
|
+
...K.labelStyle,
|
|
1446
2230
|
...e.treeChartSettings.nodeLayout?.labelStyle,
|
|
1447
|
-
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ??
|
|
2231
|
+
fontSize: e.treeChartSettings.nodeLayout?.labelStyle?.fontSize ?? K.labelStyle?.fontSize
|
|
1448
2232
|
}, n = {
|
|
1449
|
-
...
|
|
2233
|
+
...K.valueStyle,
|
|
1450
2234
|
...e.treeChartSettings.nodeLayout?.valueStyle,
|
|
1451
|
-
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ??
|
|
2235
|
+
fontSize: e.treeChartSettings.nodeLayout?.valueStyle?.fontSize ?? K.valueStyle?.fontSize
|
|
1452
2236
|
};
|
|
1453
2237
|
return {
|
|
1454
|
-
label:
|
|
1455
|
-
value:
|
|
2238
|
+
label: j(t.fontSize) + 8,
|
|
2239
|
+
value: j(n.fontSize) + 8
|
|
1456
2240
|
};
|
|
1457
2241
|
},
|
|
1458
2242
|
height: (e, t) => {
|
|
1459
2243
|
let n = 8 + (t?.label ?? 0);
|
|
1460
2244
|
return e.data.value && (n += 8 + (t?.value ?? 0)), n;
|
|
1461
2245
|
}
|
|
1462
|
-
},
|
|
1463
|
-
[
|
|
1464
|
-
[
|
|
1465
|
-
},
|
|
2246
|
+
}, Gi = {
|
|
2247
|
+
[t.KPIChange]: Vi,
|
|
2248
|
+
[t.Basic]: Wi
|
|
2249
|
+
}, Ki = { passive: !1 }, qi = {
|
|
1466
2250
|
capture: !0,
|
|
1467
2251
|
passive: !1
|
|
1468
2252
|
};
|
|
1469
|
-
function
|
|
2253
|
+
function Ji(e) {
|
|
1470
2254
|
e.stopImmediatePropagation();
|
|
1471
2255
|
}
|
|
1472
|
-
function
|
|
2256
|
+
function q(e) {
|
|
1473
2257
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
1474
2258
|
}
|
|
1475
|
-
function
|
|
1476
|
-
var t = e.document.documentElement, n =
|
|
1477
|
-
"onselectstart" in t ? n.on("selectstart.drag",
|
|
2259
|
+
function Yi(e) {
|
|
2260
|
+
var t = e.document.documentElement, n = H(e).on("dragstart.drag", q, qi);
|
|
2261
|
+
"onselectstart" in t ? n.on("selectstart.drag", q, qi) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
1478
2262
|
}
|
|
1479
|
-
function
|
|
1480
|
-
var n = e.document.documentElement, r =
|
|
1481
|
-
t && (r.on("click.drag",
|
|
2263
|
+
function Xi(e, t) {
|
|
2264
|
+
var n = e.document.documentElement, r = H(e).on("dragstart.drag", null);
|
|
2265
|
+
t && (r.on("click.drag", q, qi), setTimeout(function() {
|
|
1482
2266
|
r.on("click.drag", null);
|
|
1483
2267
|
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
1484
2268
|
}
|
|
1485
|
-
var
|
|
1486
|
-
function
|
|
2269
|
+
var Zi = (e) => () => e;
|
|
2270
|
+
function Qi(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
|
|
1487
2271
|
Object.defineProperties(this, {
|
|
1488
2272
|
type: {
|
|
1489
2273
|
value: e,
|
|
@@ -1538,65 +2322,65 @@ function Mr(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a
|
|
|
1538
2322
|
_: { value: u }
|
|
1539
2323
|
});
|
|
1540
2324
|
}
|
|
1541
|
-
|
|
2325
|
+
Qi.prototype.on = function() {
|
|
1542
2326
|
var e = this._.on.apply(this._, arguments);
|
|
1543
2327
|
return e === this._ ? this : e;
|
|
1544
|
-
},
|
|
1545
|
-
function
|
|
2328
|
+
}, et();
|
|
2329
|
+
function $i(e) {
|
|
1546
2330
|
return !e.ctrlKey && !e.button;
|
|
1547
2331
|
}
|
|
1548
|
-
function
|
|
2332
|
+
function ea() {
|
|
1549
2333
|
return this.parentNode;
|
|
1550
2334
|
}
|
|
1551
|
-
function
|
|
2335
|
+
function ta(e, t) {
|
|
1552
2336
|
return t ?? {
|
|
1553
2337
|
x: e.x,
|
|
1554
2338
|
y: e.y
|
|
1555
2339
|
};
|
|
1556
2340
|
}
|
|
1557
|
-
function
|
|
2341
|
+
function na() {
|
|
1558
2342
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1559
2343
|
}
|
|
1560
|
-
function
|
|
1561
|
-
var e =
|
|
2344
|
+
function ra() {
|
|
2345
|
+
var e = $i, t = ea, n = ta, r = na, i = {}, a = $e("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
|
|
1562
2346
|
function f(e) {
|
|
1563
|
-
e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _,
|
|
2347
|
+
e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _, Ki).on("touchend.drag touchcancel.drag", v).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1564
2348
|
}
|
|
1565
2349
|
function p(n, r) {
|
|
1566
2350
|
if (!(u || !e.call(this, n, r))) {
|
|
1567
2351
|
var i = y(this, t.call(this, n, r), n, r, "mouse");
|
|
1568
|
-
i && (
|
|
2352
|
+
i && (H(n.view).on("mousemove.drag", m, qi).on("mouseup.drag", h, qi), Yi(n.view), Ji(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
|
|
1569
2353
|
}
|
|
1570
2354
|
}
|
|
1571
2355
|
function m(e) {
|
|
1572
|
-
if (
|
|
2356
|
+
if (q(e), !l) {
|
|
1573
2357
|
var t = e.clientX - s, n = e.clientY - c;
|
|
1574
2358
|
l = t * t + n * n > d;
|
|
1575
2359
|
}
|
|
1576
2360
|
i.mouse("drag", e);
|
|
1577
2361
|
}
|
|
1578
2362
|
function h(e) {
|
|
1579
|
-
|
|
2363
|
+
H(e.view).on("mousemove.drag mouseup.drag", null), Xi(e.view, l), q(e), i.mouse("end", e);
|
|
1580
2364
|
}
|
|
1581
2365
|
function g(n, r) {
|
|
1582
2366
|
if (e.call(this, n, r)) {
|
|
1583
2367
|
var i = n.changedTouches, a = t.call(this, n, r), o = i.length, s, c;
|
|
1584
|
-
for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (
|
|
2368
|
+
for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (Ji(n), c("start", n, i[s]));
|
|
1585
2369
|
}
|
|
1586
2370
|
}
|
|
1587
2371
|
function _(e) {
|
|
1588
2372
|
var t = e.changedTouches, n = t.length, r, a;
|
|
1589
|
-
for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (
|
|
2373
|
+
for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (q(e), a("drag", e, t[r]));
|
|
1590
2374
|
}
|
|
1591
2375
|
function v(e) {
|
|
1592
2376
|
var t = e.changedTouches, n = t.length, r, a;
|
|
1593
2377
|
for (u && clearTimeout(u), u = setTimeout(function() {
|
|
1594
2378
|
u = null;
|
|
1595
|
-
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (
|
|
2379
|
+
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (Ji(e), a("end", e, t[r]));
|
|
1596
2380
|
}
|
|
1597
2381
|
function y(e, t, r, s, c, l) {
|
|
1598
|
-
var u = a.copy(), d =
|
|
1599
|
-
if ((h = n.call(e, new
|
|
2382
|
+
var u = a.copy(), d = U(l || r, t), p, m, h;
|
|
2383
|
+
if ((h = n.call(e, new Qi("beforestart", {
|
|
1600
2384
|
sourceEvent: r,
|
|
1601
2385
|
target: f,
|
|
1602
2386
|
identifier: c,
|
|
@@ -1614,10 +2398,10 @@ function Lr() {
|
|
|
1614
2398
|
break;
|
|
1615
2399
|
case "end": delete i[c], --o;
|
|
1616
2400
|
case "drag":
|
|
1617
|
-
d =
|
|
2401
|
+
d = U(l || a, t), _ = o;
|
|
1618
2402
|
break;
|
|
1619
2403
|
}
|
|
1620
|
-
u.call(r, e, new
|
|
2404
|
+
u.call(r, e, new Qi(r, {
|
|
1621
2405
|
sourceEvent: a,
|
|
1622
2406
|
subject: h,
|
|
1623
2407
|
target: f,
|
|
@@ -1632,13 +2416,13 @@ function Lr() {
|
|
|
1632
2416
|
};
|
|
1633
2417
|
}
|
|
1634
2418
|
return f.filter = function(t) {
|
|
1635
|
-
return arguments.length ? (e = typeof t == "function" ? t :
|
|
2419
|
+
return arguments.length ? (e = typeof t == "function" ? t : Zi(!!t), f) : e;
|
|
1636
2420
|
}, f.container = function(e) {
|
|
1637
|
-
return arguments.length ? (t = typeof e == "function" ? e :
|
|
2421
|
+
return arguments.length ? (t = typeof e == "function" ? e : Zi(e), f) : t;
|
|
1638
2422
|
}, f.subject = function(e) {
|
|
1639
|
-
return arguments.length ? (n = typeof e == "function" ? e :
|
|
2423
|
+
return arguments.length ? (n = typeof e == "function" ? e : Zi(e), f) : n;
|
|
1640
2424
|
}, f.touchable = function(e) {
|
|
1641
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
2425
|
+
return arguments.length ? (r = typeof e == "function" ? e : Zi(!!e), f) : r;
|
|
1642
2426
|
}, f.on = function() {
|
|
1643
2427
|
var e = a.on.apply(a, arguments);
|
|
1644
2428
|
return e === a ? f : e;
|
|
@@ -1646,74 +2430,74 @@ function Lr() {
|
|
|
1646
2430
|
return arguments.length ? (d = (e = +e) * e, f) : Math.sqrt(d);
|
|
1647
2431
|
}, f;
|
|
1648
2432
|
}
|
|
1649
|
-
var
|
|
2433
|
+
var ia = 0, aa = 0, oa = 0, sa = 1e3, ca, la, ua = 0, da = 0, fa = 0, pa = typeof performance == "object" && performance.now ? performance : Date, ma = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
1650
2434
|
setTimeout(e, 17);
|
|
1651
2435
|
};
|
|
1652
|
-
function
|
|
1653
|
-
return
|
|
2436
|
+
function ha() {
|
|
2437
|
+
return da ||= (ma(ga), pa.now() + fa);
|
|
1654
2438
|
}
|
|
1655
|
-
function
|
|
1656
|
-
|
|
2439
|
+
function ga() {
|
|
2440
|
+
da = 0;
|
|
1657
2441
|
}
|
|
1658
|
-
function
|
|
2442
|
+
function _a() {
|
|
1659
2443
|
this._call = this._time = this._next = null;
|
|
1660
2444
|
}
|
|
1661
|
-
|
|
1662
|
-
constructor:
|
|
2445
|
+
_a.prototype = va.prototype = {
|
|
2446
|
+
constructor: _a,
|
|
1663
2447
|
restart: function(e, t, n) {
|
|
1664
2448
|
if (typeof e != "function") throw TypeError("callback is not a function");
|
|
1665
|
-
n = (n == null ?
|
|
2449
|
+
n = (n == null ? ha() : +n) + (t == null ? 0 : +t), !this._next && la !== this && (la ? la._next = this : ca = this, la = this), this._call = e, this._time = n, Ca();
|
|
1666
2450
|
},
|
|
1667
2451
|
stop: function() {
|
|
1668
|
-
this._call && (this._call = null, this._time = Infinity,
|
|
2452
|
+
this._call && (this._call = null, this._time = Infinity, Ca());
|
|
1669
2453
|
}
|
|
1670
2454
|
};
|
|
1671
|
-
function
|
|
1672
|
-
var r = new
|
|
2455
|
+
function va(e, t, n) {
|
|
2456
|
+
var r = new _a();
|
|
1673
2457
|
return r.restart(e, t, n), r;
|
|
1674
2458
|
}
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1677
|
-
for (var e =
|
|
1678
|
-
--
|
|
2459
|
+
function ya() {
|
|
2460
|
+
ha(), ++ia;
|
|
2461
|
+
for (var e = ca, t; e;) (t = da - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
2462
|
+
--ia;
|
|
1679
2463
|
}
|
|
1680
|
-
function
|
|
1681
|
-
|
|
2464
|
+
function ba() {
|
|
2465
|
+
da = (ua = pa.now()) + fa, ia = aa = 0;
|
|
1682
2466
|
try {
|
|
1683
|
-
|
|
2467
|
+
ya();
|
|
1684
2468
|
} finally {
|
|
1685
|
-
|
|
2469
|
+
ia = 0, Sa(), da = 0;
|
|
1686
2470
|
}
|
|
1687
2471
|
}
|
|
1688
|
-
function
|
|
1689
|
-
var e =
|
|
1690
|
-
t >
|
|
2472
|
+
function xa() {
|
|
2473
|
+
var e = pa.now(), t = e - ua;
|
|
2474
|
+
t > sa && (fa -= t, ua = e);
|
|
1691
2475
|
}
|
|
1692
|
-
function
|
|
1693
|
-
for (var e, t =
|
|
1694
|
-
|
|
2476
|
+
function Sa() {
|
|
2477
|
+
for (var e, t = ca, n, r = Infinity; t;) t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : ca = n);
|
|
2478
|
+
la = e, Ca(r);
|
|
1695
2479
|
}
|
|
1696
|
-
function
|
|
1697
|
-
|
|
2480
|
+
function Ca(e) {
|
|
2481
|
+
ia || (aa &&= clearTimeout(aa), e - da > 24 ? (e < Infinity && (aa = setTimeout(ba, e - pa.now() - fa)), oa &&= clearInterval(oa)) : (oa ||= (ua = pa.now(), setInterval(xa, sa)), ia = 1, ma(ba)));
|
|
1698
2482
|
}
|
|
1699
|
-
function
|
|
1700
|
-
var r = new
|
|
2483
|
+
function wa(e, t, n) {
|
|
2484
|
+
var r = new _a();
|
|
1701
2485
|
return t = t == null ? 0 : +t, r.restart((n) => {
|
|
1702
2486
|
r.stop(), e(n + t);
|
|
1703
2487
|
}, t, n), r;
|
|
1704
2488
|
}
|
|
1705
|
-
|
|
1706
|
-
var
|
|
1707
|
-
function
|
|
2489
|
+
je(), ge(), et();
|
|
2490
|
+
var Ta = $e("start", "end", "cancel", "interrupt"), Ea = [];
|
|
2491
|
+
function Da(e, t, n, r, i, a) {
|
|
1708
2492
|
var o = e.__transition;
|
|
1709
2493
|
if (!o) e.__transition = {};
|
|
1710
2494
|
else if (n in o) return;
|
|
1711
|
-
|
|
2495
|
+
ka(e, n, {
|
|
1712
2496
|
name: t,
|
|
1713
2497
|
index: r,
|
|
1714
2498
|
group: i,
|
|
1715
|
-
on:
|
|
1716
|
-
tween:
|
|
2499
|
+
on: Ta,
|
|
2500
|
+
tween: Ea,
|
|
1717
2501
|
time: a.time,
|
|
1718
2502
|
delay: a.delay,
|
|
1719
2503
|
duration: a.duration,
|
|
@@ -1722,24 +2506,24 @@ function ri(e, t, n, r, i, a) {
|
|
|
1722
2506
|
state: 0
|
|
1723
2507
|
});
|
|
1724
2508
|
}
|
|
1725
|
-
function
|
|
1726
|
-
var n =
|
|
2509
|
+
function Oa(e, t) {
|
|
2510
|
+
var n = Y(e, t);
|
|
1727
2511
|
if (n.state > 0) throw Error("too late; already scheduled");
|
|
1728
2512
|
return n;
|
|
1729
2513
|
}
|
|
1730
|
-
function
|
|
1731
|
-
var n =
|
|
2514
|
+
function J(e, t) {
|
|
2515
|
+
var n = Y(e, t);
|
|
1732
2516
|
if (n.state > 3) throw Error("too late; already running");
|
|
1733
2517
|
return n;
|
|
1734
2518
|
}
|
|
1735
|
-
function
|
|
2519
|
+
function Y(e, t) {
|
|
1736
2520
|
var n = e.__transition;
|
|
1737
2521
|
if (!n || !(n = n[t])) throw Error("transition not found");
|
|
1738
2522
|
return n;
|
|
1739
2523
|
}
|
|
1740
|
-
function
|
|
2524
|
+
function ka(e, t, n) {
|
|
1741
2525
|
var r = e.__transition, i;
|
|
1742
|
-
r[t] = n, n.timer =
|
|
2526
|
+
r[t] = n, n.timer = va(a, 0, n.time);
|
|
1743
2527
|
function a(e) {
|
|
1744
2528
|
n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
|
|
1745
2529
|
}
|
|
@@ -1747,10 +2531,10 @@ function ai(e, t, n) {
|
|
|
1747
2531
|
var l, u, d, f;
|
|
1748
2532
|
if (n.state !== 1) return c();
|
|
1749
2533
|
for (l in r) if (f = r[l], f.name === n.name) {
|
|
1750
|
-
if (f.state === 3) return
|
|
2534
|
+
if (f.state === 3) return wa(o);
|
|
1751
2535
|
f.state === 4 ? (f.state = 6, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = 6, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
|
|
1752
2536
|
}
|
|
1753
|
-
if (
|
|
2537
|
+
if (wa(function() {
|
|
1754
2538
|
n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
|
|
1755
2539
|
}), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
|
|
1756
2540
|
for (n.state = 3, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
|
|
@@ -1766,7 +2550,7 @@ function ai(e, t, n) {
|
|
|
1766
2550
|
delete e.__transition;
|
|
1767
2551
|
}
|
|
1768
2552
|
}
|
|
1769
|
-
function
|
|
2553
|
+
function Aa(e, t) {
|
|
1770
2554
|
var n = e.__transition, r, i, a = !0, o;
|
|
1771
2555
|
if (n) {
|
|
1772
2556
|
for (o in t = t == null ? null : t + "", n) {
|
|
@@ -1779,15 +2563,15 @@ function oi(e, t) {
|
|
|
1779
2563
|
a && delete e.__transition;
|
|
1780
2564
|
}
|
|
1781
2565
|
}
|
|
1782
|
-
function
|
|
2566
|
+
function ja(e) {
|
|
1783
2567
|
return this.each(function() {
|
|
1784
|
-
|
|
2568
|
+
Aa(this, e);
|
|
1785
2569
|
});
|
|
1786
2570
|
}
|
|
1787
|
-
function
|
|
2571
|
+
function Ma(e, t) {
|
|
1788
2572
|
var n, r;
|
|
1789
2573
|
return function() {
|
|
1790
|
-
var i =
|
|
2574
|
+
var i = J(this, e), a = i.tween;
|
|
1791
2575
|
if (a !== n) {
|
|
1792
2576
|
r = n = a;
|
|
1793
2577
|
for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
|
|
@@ -1798,11 +2582,11 @@ function ci(e, t) {
|
|
|
1798
2582
|
i.tween = r;
|
|
1799
2583
|
};
|
|
1800
2584
|
}
|
|
1801
|
-
function
|
|
2585
|
+
function Na(e, t, n) {
|
|
1802
2586
|
var r, i;
|
|
1803
2587
|
if (typeof n != "function") throw Error();
|
|
1804
2588
|
return function() {
|
|
1805
|
-
var a =
|
|
2589
|
+
var a = J(this, e), o = a.tween;
|
|
1806
2590
|
if (o !== r) {
|
|
1807
2591
|
i = (r = o).slice();
|
|
1808
2592
|
for (var s = {
|
|
@@ -1817,388 +2601,388 @@ function li(e, t, n) {
|
|
|
1817
2601
|
a.tween = i;
|
|
1818
2602
|
};
|
|
1819
2603
|
}
|
|
1820
|
-
function
|
|
2604
|
+
function Pa(e, t) {
|
|
1821
2605
|
var n = this._id;
|
|
1822
2606
|
if (e += "", arguments.length < 2) {
|
|
1823
|
-
for (var r =
|
|
2607
|
+
for (var r = Y(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
|
|
1824
2608
|
return null;
|
|
1825
2609
|
}
|
|
1826
|
-
return this.each((t == null ?
|
|
2610
|
+
return this.each((t == null ? Ma : Na)(n, e, t));
|
|
1827
2611
|
}
|
|
1828
|
-
function
|
|
2612
|
+
function Fa(e, t, n) {
|
|
1829
2613
|
var r = e._id;
|
|
1830
2614
|
return e.each(function() {
|
|
1831
|
-
var e =
|
|
2615
|
+
var e = J(this, r);
|
|
1832
2616
|
(e.value ||= {})[t] = n.apply(this, arguments);
|
|
1833
2617
|
}), function(e) {
|
|
1834
|
-
return
|
|
2618
|
+
return Y(e, r).value[t];
|
|
1835
2619
|
};
|
|
1836
2620
|
}
|
|
1837
|
-
function
|
|
2621
|
+
function Ia(e, t) {
|
|
1838
2622
|
var n;
|
|
1839
|
-
return (typeof t == "number" ?
|
|
2623
|
+
return (typeof t == "number" ? ue : t instanceof Ae ? ae : (n = Ae(t)) ? (t = n, ae) : se)(e, t);
|
|
1840
2624
|
}
|
|
1841
|
-
|
|
1842
|
-
function
|
|
2625
|
+
ge();
|
|
2626
|
+
function La(e) {
|
|
1843
2627
|
return function() {
|
|
1844
2628
|
this.removeAttribute(e);
|
|
1845
2629
|
};
|
|
1846
2630
|
}
|
|
1847
|
-
function
|
|
2631
|
+
function Ra(e) {
|
|
1848
2632
|
return function() {
|
|
1849
2633
|
this.removeAttributeNS(e.space, e.local);
|
|
1850
2634
|
};
|
|
1851
2635
|
}
|
|
1852
|
-
function
|
|
2636
|
+
function za(e, t, n) {
|
|
1853
2637
|
var r, i = n + "", a;
|
|
1854
2638
|
return function() {
|
|
1855
2639
|
var o = this.getAttribute(e);
|
|
1856
2640
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1857
2641
|
};
|
|
1858
2642
|
}
|
|
1859
|
-
function
|
|
2643
|
+
function Ba(e, t, n) {
|
|
1860
2644
|
var r, i = n + "", a;
|
|
1861
2645
|
return function() {
|
|
1862
2646
|
var o = this.getAttributeNS(e.space, e.local);
|
|
1863
2647
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1864
2648
|
};
|
|
1865
2649
|
}
|
|
1866
|
-
function
|
|
2650
|
+
function Va(e, t, n) {
|
|
1867
2651
|
var r, i, a;
|
|
1868
2652
|
return function() {
|
|
1869
2653
|
var o, s = n(this), c;
|
|
1870
2654
|
return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
1871
2655
|
};
|
|
1872
2656
|
}
|
|
1873
|
-
function
|
|
2657
|
+
function Ha(e, t, n) {
|
|
1874
2658
|
var r, i, a;
|
|
1875
2659
|
return function() {
|
|
1876
2660
|
var o, s = n(this), c;
|
|
1877
2661
|
return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
1878
2662
|
};
|
|
1879
2663
|
}
|
|
1880
|
-
function
|
|
1881
|
-
var n =
|
|
1882
|
-
return this.attrTween(e, typeof t == "function" ? (n.local ?
|
|
2664
|
+
function Ua(e, t) {
|
|
2665
|
+
var n = Nn(e), r = n === "transform" ? me : Ia;
|
|
2666
|
+
return this.attrTween(e, typeof t == "function" ? (n.local ? Ha : Va)(n, r, Fa(this, "attr." + e, t)) : t == null ? (n.local ? Ra : La)(n) : (n.local ? Ba : za)(n, r, t));
|
|
1883
2667
|
}
|
|
1884
|
-
function
|
|
2668
|
+
function Wa(e, t) {
|
|
1885
2669
|
return function(n) {
|
|
1886
2670
|
this.setAttribute(e, t.call(this, n));
|
|
1887
2671
|
};
|
|
1888
2672
|
}
|
|
1889
|
-
function
|
|
2673
|
+
function Ga(e, t) {
|
|
1890
2674
|
return function(n) {
|
|
1891
2675
|
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
1892
2676
|
};
|
|
1893
2677
|
}
|
|
1894
|
-
function
|
|
2678
|
+
function Ka(e, t) {
|
|
1895
2679
|
var n, r;
|
|
1896
2680
|
function i() {
|
|
1897
2681
|
var i = t.apply(this, arguments);
|
|
1898
|
-
return i !== r && (n = (r = i) &&
|
|
2682
|
+
return i !== r && (n = (r = i) && Ga(e, i)), n;
|
|
1899
2683
|
}
|
|
1900
2684
|
return i._value = t, i;
|
|
1901
2685
|
}
|
|
1902
|
-
function
|
|
2686
|
+
function qa(e, t) {
|
|
1903
2687
|
var n, r;
|
|
1904
2688
|
function i() {
|
|
1905
2689
|
var i = t.apply(this, arguments);
|
|
1906
|
-
return i !== r && (n = (r = i) &&
|
|
2690
|
+
return i !== r && (n = (r = i) && Wa(e, i)), n;
|
|
1907
2691
|
}
|
|
1908
2692
|
return i._value = t, i;
|
|
1909
2693
|
}
|
|
1910
|
-
function
|
|
2694
|
+
function Ja(e, t) {
|
|
1911
2695
|
var n = "attr." + e;
|
|
1912
2696
|
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
|
|
1913
2697
|
if (t == null) return this.tween(n, null);
|
|
1914
2698
|
if (typeof t != "function") throw Error();
|
|
1915
|
-
var r =
|
|
1916
|
-
return this.tween(n, (r.local ?
|
|
2699
|
+
var r = Nn(e);
|
|
2700
|
+
return this.tween(n, (r.local ? Ka : qa)(r, t));
|
|
1917
2701
|
}
|
|
1918
|
-
function
|
|
2702
|
+
function Ya(e, t) {
|
|
1919
2703
|
return function() {
|
|
1920
|
-
|
|
2704
|
+
Oa(this, e).delay = +t.apply(this, arguments);
|
|
1921
2705
|
};
|
|
1922
2706
|
}
|
|
1923
|
-
function
|
|
2707
|
+
function Xa(e, t) {
|
|
1924
2708
|
return t = +t, function() {
|
|
1925
|
-
|
|
2709
|
+
Oa(this, e).delay = t;
|
|
1926
2710
|
};
|
|
1927
2711
|
}
|
|
1928
|
-
function
|
|
2712
|
+
function Za(e) {
|
|
1929
2713
|
var t = this._id;
|
|
1930
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
2714
|
+
return arguments.length ? this.each((typeof e == "function" ? Ya : Xa)(t, e)) : Y(this.node(), t).delay;
|
|
1931
2715
|
}
|
|
1932
|
-
function
|
|
2716
|
+
function Qa(e, t) {
|
|
1933
2717
|
return function() {
|
|
1934
|
-
|
|
2718
|
+
J(this, e).duration = +t.apply(this, arguments);
|
|
1935
2719
|
};
|
|
1936
2720
|
}
|
|
1937
|
-
function
|
|
2721
|
+
function $a(e, t) {
|
|
1938
2722
|
return t = +t, function() {
|
|
1939
|
-
|
|
2723
|
+
J(this, e).duration = t;
|
|
1940
2724
|
};
|
|
1941
2725
|
}
|
|
1942
|
-
function
|
|
2726
|
+
function eo(e) {
|
|
1943
2727
|
var t = this._id;
|
|
1944
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
2728
|
+
return arguments.length ? this.each((typeof e == "function" ? Qa : $a)(t, e)) : Y(this.node(), t).duration;
|
|
1945
2729
|
}
|
|
1946
|
-
function
|
|
2730
|
+
function to(e, t) {
|
|
1947
2731
|
if (typeof t != "function") throw Error();
|
|
1948
2732
|
return function() {
|
|
1949
|
-
|
|
2733
|
+
J(this, e).ease = t;
|
|
1950
2734
|
};
|
|
1951
2735
|
}
|
|
1952
|
-
function
|
|
2736
|
+
function no(e) {
|
|
1953
2737
|
var t = this._id;
|
|
1954
|
-
return arguments.length ? this.each(
|
|
2738
|
+
return arguments.length ? this.each(to(t, e)) : Y(this.node(), t).ease;
|
|
1955
2739
|
}
|
|
1956
|
-
function
|
|
2740
|
+
function ro(e, t) {
|
|
1957
2741
|
return function() {
|
|
1958
2742
|
var n = t.apply(this, arguments);
|
|
1959
2743
|
if (typeof n != "function") throw Error();
|
|
1960
|
-
|
|
2744
|
+
J(this, e).ease = n;
|
|
1961
2745
|
};
|
|
1962
2746
|
}
|
|
1963
|
-
function
|
|
2747
|
+
function io(e) {
|
|
1964
2748
|
if (typeof e != "function") throw Error();
|
|
1965
|
-
return this.each(
|
|
2749
|
+
return this.each(ro(this._id, e));
|
|
1966
2750
|
}
|
|
1967
|
-
function
|
|
1968
|
-
typeof e != "function" && (e =
|
|
2751
|
+
function ao(e) {
|
|
2752
|
+
typeof e != "function" && (e = Gn(e));
|
|
1969
2753
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
1970
|
-
return new
|
|
2754
|
+
return new X(r, this._parents, this._name, this._id);
|
|
1971
2755
|
}
|
|
1972
|
-
function
|
|
2756
|
+
function oo(e) {
|
|
1973
2757
|
if (e._id !== this._id) throw Error();
|
|
1974
2758
|
for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
|
|
1975
2759
|
for (; s < r; ++s) o[s] = t[s];
|
|
1976
|
-
return new
|
|
2760
|
+
return new X(o, this._parents, this._name, this._id);
|
|
1977
2761
|
}
|
|
1978
|
-
function
|
|
2762
|
+
function so(e) {
|
|
1979
2763
|
return (e + "").trim().split(/^|\s+/).every(function(e) {
|
|
1980
2764
|
var t = e.indexOf(".");
|
|
1981
2765
|
return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
|
|
1982
2766
|
});
|
|
1983
2767
|
}
|
|
1984
|
-
function
|
|
1985
|
-
var r, i, a =
|
|
2768
|
+
function co(e, t, n) {
|
|
2769
|
+
var r, i, a = so(t) ? Oa : J;
|
|
1986
2770
|
return function() {
|
|
1987
2771
|
var o = a(this, e), s = o.on;
|
|
1988
2772
|
s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
|
|
1989
2773
|
};
|
|
1990
2774
|
}
|
|
1991
|
-
function
|
|
2775
|
+
function lo(e, t) {
|
|
1992
2776
|
var n = this._id;
|
|
1993
|
-
return arguments.length < 2 ?
|
|
2777
|
+
return arguments.length < 2 ? Y(this.node(), n).on.on(e) : this.each(co(n, e, t));
|
|
1994
2778
|
}
|
|
1995
|
-
function
|
|
2779
|
+
function uo(e) {
|
|
1996
2780
|
return function() {
|
|
1997
2781
|
var t = this.parentNode;
|
|
1998
2782
|
for (var n in this.__transition) if (+n !== e) return;
|
|
1999
2783
|
t && t.removeChild(this);
|
|
2000
2784
|
};
|
|
2001
2785
|
}
|
|
2002
|
-
function
|
|
2003
|
-
return this.on("end.remove",
|
|
2786
|
+
function fo() {
|
|
2787
|
+
return this.on("end.remove", uo(this._id));
|
|
2004
2788
|
}
|
|
2005
|
-
function
|
|
2789
|
+
function po(e) {
|
|
2006
2790
|
var t = this._name, n = this._id;
|
|
2007
|
-
typeof e != "function" && (e =
|
|
2008
|
-
for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d,
|
|
2009
|
-
return new
|
|
2791
|
+
typeof e != "function" && (e = Rn(e));
|
|
2792
|
+
for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d, Da(l[f], t, n, f, l, Y(u, n)));
|
|
2793
|
+
return new X(a, this._parents, t, n);
|
|
2010
2794
|
}
|
|
2011
|
-
function
|
|
2795
|
+
function mo(e) {
|
|
2012
2796
|
var t = this._name, n = this._id;
|
|
2013
|
-
typeof e != "function" && (e =
|
|
2797
|
+
typeof e != "function" && (e = Hn(e));
|
|
2014
2798
|
for (var r = this._groups, i = r.length, a = [], o = [], s = 0; s < i; ++s) for (var c = r[s], l = c.length, u, d = 0; d < l; ++d) if (u = c[d]) {
|
|
2015
|
-
for (var f = e.call(u, u.__data__, d, c), p, m =
|
|
2799
|
+
for (var f = e.call(u, u.__data__, d, c), p, m = Y(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) && Da(p, t, n, h, f, m);
|
|
2016
2800
|
a.push(f), o.push(u);
|
|
2017
2801
|
}
|
|
2018
|
-
return new
|
|
2802
|
+
return new X(a, o, t, n);
|
|
2019
2803
|
}
|
|
2020
|
-
var
|
|
2021
|
-
function
|
|
2022
|
-
return new
|
|
2804
|
+
var ho = V.prototype.constructor;
|
|
2805
|
+
function go() {
|
|
2806
|
+
return new ho(this._groups, this._parents);
|
|
2023
2807
|
}
|
|
2024
|
-
|
|
2025
|
-
function
|
|
2808
|
+
ge();
|
|
2809
|
+
function _o(e, t) {
|
|
2026
2810
|
var n, r, i;
|
|
2027
2811
|
return function() {
|
|
2028
|
-
var a =
|
|
2812
|
+
var a = z(this, e), o = (this.style.removeProperty(e), z(this, e));
|
|
2029
2813
|
return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
|
|
2030
2814
|
};
|
|
2031
2815
|
}
|
|
2032
|
-
function
|
|
2816
|
+
function vo(e) {
|
|
2033
2817
|
return function() {
|
|
2034
2818
|
this.style.removeProperty(e);
|
|
2035
2819
|
};
|
|
2036
2820
|
}
|
|
2037
|
-
function
|
|
2821
|
+
function yo(e, t, n) {
|
|
2038
2822
|
var r, i = n + "", a;
|
|
2039
2823
|
return function() {
|
|
2040
|
-
var o =
|
|
2824
|
+
var o = z(this, e);
|
|
2041
2825
|
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
2042
2826
|
};
|
|
2043
2827
|
}
|
|
2044
|
-
function
|
|
2828
|
+
function bo(e, t, n) {
|
|
2045
2829
|
var r, i, a;
|
|
2046
2830
|
return function() {
|
|
2047
|
-
var o =
|
|
2048
|
-
return s ?? (c = s = (this.style.removeProperty(e),
|
|
2831
|
+
var o = z(this, e), s = n(this), c = s + "";
|
|
2832
|
+
return s ?? (c = s = (this.style.removeProperty(e), z(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
|
|
2049
2833
|
};
|
|
2050
2834
|
}
|
|
2051
|
-
function
|
|
2835
|
+
function xo(e, t) {
|
|
2052
2836
|
var n, r, i, a = "style." + t, o = "end." + a, s;
|
|
2053
2837
|
return function() {
|
|
2054
|
-
var c =
|
|
2838
|
+
var c = J(this, e), l = c.on, u = c.value[a] == null ? s ||= vo(t) : void 0;
|
|
2055
2839
|
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
|
|
2056
2840
|
};
|
|
2057
2841
|
}
|
|
2058
|
-
function
|
|
2059
|
-
var r = (e += "") == "transform" ?
|
|
2060
|
-
return t == null ? this.styleTween(e,
|
|
2842
|
+
function So(e, t, n) {
|
|
2843
|
+
var r = (e += "") == "transform" ? oe : Ia;
|
|
2844
|
+
return t == null ? this.styleTween(e, _o(e, r)).on("end.style." + e, vo(e)) : typeof t == "function" ? this.styleTween(e, bo(e, r, Fa(this, "style." + e, t))).each(xo(this._id, e)) : this.styleTween(e, yo(e, r, t), n).on("end.style." + e, null);
|
|
2061
2845
|
}
|
|
2062
|
-
function
|
|
2846
|
+
function Co(e, t, n) {
|
|
2063
2847
|
return function(r) {
|
|
2064
2848
|
this.style.setProperty(e, t.call(this, r), n);
|
|
2065
2849
|
};
|
|
2066
2850
|
}
|
|
2067
|
-
function
|
|
2851
|
+
function wo(e, t, n) {
|
|
2068
2852
|
var r, i;
|
|
2069
2853
|
function a() {
|
|
2070
2854
|
var a = t.apply(this, arguments);
|
|
2071
|
-
return a !== i && (r = (i = a) &&
|
|
2855
|
+
return a !== i && (r = (i = a) && Co(e, a, n)), r;
|
|
2072
2856
|
}
|
|
2073
2857
|
return a._value = t, a;
|
|
2074
2858
|
}
|
|
2075
|
-
function
|
|
2859
|
+
function To(e, t, n) {
|
|
2076
2860
|
var r = "style." + (e += "");
|
|
2077
2861
|
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
2078
2862
|
if (t == null) return this.tween(r, null);
|
|
2079
2863
|
if (typeof t != "function") throw Error();
|
|
2080
|
-
return this.tween(r,
|
|
2864
|
+
return this.tween(r, wo(e, t, n ?? ""));
|
|
2081
2865
|
}
|
|
2082
|
-
function
|
|
2866
|
+
function Eo(e) {
|
|
2083
2867
|
return function() {
|
|
2084
2868
|
this.textContent = e;
|
|
2085
2869
|
};
|
|
2086
2870
|
}
|
|
2087
|
-
function
|
|
2871
|
+
function Do(e) {
|
|
2088
2872
|
return function() {
|
|
2089
2873
|
var t = e(this);
|
|
2090
2874
|
this.textContent = t ?? "";
|
|
2091
2875
|
};
|
|
2092
2876
|
}
|
|
2093
|
-
function
|
|
2094
|
-
return this.tween("text", typeof e == "function" ?
|
|
2877
|
+
function Oo(e) {
|
|
2878
|
+
return this.tween("text", typeof e == "function" ? Do(Fa(this, "text", e)) : Eo(e == null ? "" : e + ""));
|
|
2095
2879
|
}
|
|
2096
|
-
function
|
|
2880
|
+
function ko(e) {
|
|
2097
2881
|
return function(t) {
|
|
2098
2882
|
this.textContent = e.call(this, t);
|
|
2099
2883
|
};
|
|
2100
2884
|
}
|
|
2101
|
-
function
|
|
2885
|
+
function Ao(e) {
|
|
2102
2886
|
var t, n;
|
|
2103
2887
|
function r() {
|
|
2104
2888
|
var r = e.apply(this, arguments);
|
|
2105
|
-
return r !== n && (t = (n = r) &&
|
|
2889
|
+
return r !== n && (t = (n = r) && ko(r)), t;
|
|
2106
2890
|
}
|
|
2107
2891
|
return r._value = e, r;
|
|
2108
2892
|
}
|
|
2109
|
-
function
|
|
2893
|
+
function jo(e) {
|
|
2110
2894
|
var t = "text";
|
|
2111
2895
|
if (arguments.length < 1) return (t = this.tween(t)) && t._value;
|
|
2112
2896
|
if (e == null) return this.tween(t, null);
|
|
2113
2897
|
if (typeof e != "function") throw Error();
|
|
2114
|
-
return this.tween(t,
|
|
2898
|
+
return this.tween(t, Ao(e));
|
|
2115
2899
|
}
|
|
2116
|
-
function
|
|
2117
|
-
for (var e = this._name, t = this._id, n =
|
|
2118
|
-
var u =
|
|
2119
|
-
|
|
2900
|
+
function Mo() {
|
|
2901
|
+
for (var e = this._name, t = this._id, n = Io(), r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) if (c = o[l]) {
|
|
2902
|
+
var u = Y(c, t);
|
|
2903
|
+
Da(c, e, n, l, o, {
|
|
2120
2904
|
time: u.time + u.delay + u.duration,
|
|
2121
2905
|
delay: 0,
|
|
2122
2906
|
duration: u.duration,
|
|
2123
2907
|
ease: u.ease
|
|
2124
2908
|
});
|
|
2125
2909
|
}
|
|
2126
|
-
return new
|
|
2910
|
+
return new X(r, this._parents, e, n);
|
|
2127
2911
|
}
|
|
2128
|
-
function
|
|
2912
|
+
function No() {
|
|
2129
2913
|
var e, t, n = this, r = n._id, i = n.size();
|
|
2130
2914
|
return new Promise(function(a, o) {
|
|
2131
2915
|
var s = { value: o }, c = { value: function() {
|
|
2132
2916
|
--i === 0 && a();
|
|
2133
2917
|
} };
|
|
2134
2918
|
n.each(function() {
|
|
2135
|
-
var n =
|
|
2919
|
+
var n = J(this, r), i = n.on;
|
|
2136
2920
|
i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
|
|
2137
2921
|
}), i === 0 && a();
|
|
2138
2922
|
});
|
|
2139
2923
|
}
|
|
2140
|
-
var
|
|
2141
|
-
function
|
|
2924
|
+
var Po = 0;
|
|
2925
|
+
function X(e, t, n, r) {
|
|
2142
2926
|
this._groups = e, this._parents = t, this._name = n, this._id = r;
|
|
2143
2927
|
}
|
|
2144
|
-
function
|
|
2145
|
-
return
|
|
2146
|
-
}
|
|
2147
|
-
function
|
|
2148
|
-
return ++
|
|
2149
|
-
}
|
|
2150
|
-
var
|
|
2151
|
-
|
|
2152
|
-
constructor:
|
|
2153
|
-
select:
|
|
2154
|
-
selectAll:
|
|
2155
|
-
selectChild:
|
|
2156
|
-
selectChildren:
|
|
2157
|
-
filter:
|
|
2158
|
-
merge:
|
|
2159
|
-
selection:
|
|
2160
|
-
transition:
|
|
2161
|
-
call:
|
|
2162
|
-
nodes:
|
|
2163
|
-
node:
|
|
2164
|
-
size:
|
|
2165
|
-
empty:
|
|
2166
|
-
each:
|
|
2167
|
-
on:
|
|
2168
|
-
attr:
|
|
2169
|
-
attrTween:
|
|
2170
|
-
style:
|
|
2171
|
-
styleTween:
|
|
2172
|
-
text:
|
|
2173
|
-
textTween:
|
|
2174
|
-
remove:
|
|
2175
|
-
tween:
|
|
2176
|
-
delay:
|
|
2177
|
-
duration:
|
|
2178
|
-
ease:
|
|
2179
|
-
easeVarying:
|
|
2180
|
-
end:
|
|
2181
|
-
[Symbol.iterator]:
|
|
2182
|
-
},
|
|
2183
|
-
var
|
|
2928
|
+
function Fo(e) {
|
|
2929
|
+
return V().transition(e);
|
|
2930
|
+
}
|
|
2931
|
+
function Io() {
|
|
2932
|
+
return ++Po;
|
|
2933
|
+
}
|
|
2934
|
+
var Z = V.prototype;
|
|
2935
|
+
X.prototype = Fo.prototype = {
|
|
2936
|
+
constructor: X,
|
|
2937
|
+
select: po,
|
|
2938
|
+
selectAll: mo,
|
|
2939
|
+
selectChild: Z.selectChild,
|
|
2940
|
+
selectChildren: Z.selectChildren,
|
|
2941
|
+
filter: ao,
|
|
2942
|
+
merge: oo,
|
|
2943
|
+
selection: go,
|
|
2944
|
+
transition: Mo,
|
|
2945
|
+
call: Z.call,
|
|
2946
|
+
nodes: Z.nodes,
|
|
2947
|
+
node: Z.node,
|
|
2948
|
+
size: Z.size,
|
|
2949
|
+
empty: Z.empty,
|
|
2950
|
+
each: Z.each,
|
|
2951
|
+
on: lo,
|
|
2952
|
+
attr: Ua,
|
|
2953
|
+
attrTween: Ja,
|
|
2954
|
+
style: So,
|
|
2955
|
+
styleTween: To,
|
|
2956
|
+
text: Oo,
|
|
2957
|
+
textTween: jo,
|
|
2958
|
+
remove: fo,
|
|
2959
|
+
tween: Pa,
|
|
2960
|
+
delay: Za,
|
|
2961
|
+
duration: eo,
|
|
2962
|
+
ease: no,
|
|
2963
|
+
easeVarying: io,
|
|
2964
|
+
end: No,
|
|
2965
|
+
[Symbol.iterator]: Z[Symbol.iterator]
|
|
2966
|
+
}, pe();
|
|
2967
|
+
var Lo = {
|
|
2184
2968
|
time: null,
|
|
2185
2969
|
delay: 0,
|
|
2186
2970
|
duration: 250,
|
|
2187
|
-
ease:
|
|
2971
|
+
ease: k
|
|
2188
2972
|
};
|
|
2189
|
-
function
|
|
2973
|
+
function Ro(e, t) {
|
|
2190
2974
|
for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
|
|
2191
2975
|
return n;
|
|
2192
2976
|
}
|
|
2193
|
-
function
|
|
2977
|
+
function zo(e) {
|
|
2194
2978
|
var t, n;
|
|
2195
|
-
e instanceof
|
|
2196
|
-
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) &&
|
|
2197
|
-
return new
|
|
2979
|
+
e instanceof X ? (t = e._id, e = e._name) : (t = Io(), (n = Lo).time = ha(), e = e == null ? null : e + "");
|
|
2980
|
+
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && Da(c, e, t, l, o, n || Ro(c, t));
|
|
2981
|
+
return new X(r, this._parents, e, t);
|
|
2198
2982
|
}
|
|
2199
|
-
|
|
2200
|
-
var
|
|
2201
|
-
function
|
|
2983
|
+
V.prototype.interrupt = ja, V.prototype.transition = zo;
|
|
2984
|
+
var Bo = (e) => () => e;
|
|
2985
|
+
function Vo(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
|
|
2202
2986
|
Object.defineProperties(this, {
|
|
2203
2987
|
type: {
|
|
2204
2988
|
value: e,
|
|
@@ -2223,16 +3007,16 @@ function ga(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
|
|
|
2223
3007
|
_: { value: i }
|
|
2224
3008
|
});
|
|
2225
3009
|
}
|
|
2226
|
-
function
|
|
3010
|
+
function Q(e, t, n) {
|
|
2227
3011
|
this.k = e, this.x = t, this.y = n;
|
|
2228
3012
|
}
|
|
2229
|
-
|
|
2230
|
-
constructor:
|
|
3013
|
+
Q.prototype = {
|
|
3014
|
+
constructor: Q,
|
|
2231
3015
|
scale: function(e) {
|
|
2232
|
-
return e === 1 ? this : new
|
|
3016
|
+
return e === 1 ? this : new Q(this.k * e, this.x, this.y);
|
|
2233
3017
|
},
|
|
2234
3018
|
translate: function(e, t) {
|
|
2235
|
-
return e === 0 & t === 0 ? this : new
|
|
3019
|
+
return e === 0 & t === 0 ? this : new Q(this.k, this.x + this.k * e, this.y + this.k * t);
|
|
2236
3020
|
},
|
|
2237
3021
|
apply: function(e) {
|
|
2238
3022
|
return [e[0] * this.k + this.x, e[1] * this.k + this.y];
|
|
@@ -2262,47 +3046,47 @@ X.prototype = {
|
|
|
2262
3046
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
2263
3047
|
}
|
|
2264
3048
|
};
|
|
2265
|
-
var
|
|
2266
|
-
|
|
2267
|
-
function
|
|
2268
|
-
for (; !e.__zoom;) if (!(e = e.parentNode)) return
|
|
3049
|
+
var Ho = new Q(1, 0, 0);
|
|
3050
|
+
Uo.prototype = Q.prototype;
|
|
3051
|
+
function Uo(e) {
|
|
3052
|
+
for (; !e.__zoom;) if (!(e = e.parentNode)) return Ho;
|
|
2269
3053
|
return e.__zoom;
|
|
2270
3054
|
}
|
|
2271
|
-
function
|
|
3055
|
+
function Wo(e) {
|
|
2272
3056
|
e.stopImmediatePropagation();
|
|
2273
3057
|
}
|
|
2274
|
-
function
|
|
3058
|
+
function Go(e) {
|
|
2275
3059
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
2276
3060
|
}
|
|
2277
|
-
|
|
2278
|
-
function
|
|
3061
|
+
et(), ge();
|
|
3062
|
+
function Ko(e) {
|
|
2279
3063
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
2280
3064
|
}
|
|
2281
|
-
function
|
|
3065
|
+
function qo() {
|
|
2282
3066
|
var e = this;
|
|
2283
3067
|
return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
2284
3068
|
}
|
|
2285
|
-
function
|
|
2286
|
-
return this.__zoom ||
|
|
3069
|
+
function Jo() {
|
|
3070
|
+
return this.__zoom || Ho;
|
|
2287
3071
|
}
|
|
2288
|
-
function
|
|
3072
|
+
function Yo(e) {
|
|
2289
3073
|
return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
|
|
2290
3074
|
}
|
|
2291
|
-
function
|
|
3075
|
+
function Xo() {
|
|
2292
3076
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
2293
3077
|
}
|
|
2294
|
-
function
|
|
3078
|
+
function Zo(e, t, n) {
|
|
2295
3079
|
var r = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], a = e.invertY(t[0][1]) - n[0][1], o = e.invertY(t[1][1]) - n[1][1];
|
|
2296
3080
|
return e.translate(i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i), o > a ? (a + o) / 2 : Math.min(0, a) || Math.max(0, o));
|
|
2297
3081
|
}
|
|
2298
|
-
function
|
|
2299
|
-
var e =
|
|
3082
|
+
function Qo() {
|
|
3083
|
+
var e = Ko, t = qo, n = Zo, r = Yo, i = Xo, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = he, l = $e("start", "zoom", "end"), u, d, f, p = 500, m = 150, h = 0, g = 10;
|
|
2300
3084
|
function _(e) {
|
|
2301
|
-
e.property("__zoom",
|
|
3085
|
+
e.property("__zoom", Jo).on("wheel.zoom", w, { passive: !1 }).on("mousedown.zoom", T).on("dblclick.zoom", E).filter(i).on("touchstart.zoom", ee).on("touchmove.zoom", te).on("touchend.zoom touchcancel.zoom", D).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2302
3086
|
}
|
|
2303
3087
|
_.transform = function(e, t, n, r) {
|
|
2304
3088
|
var i = e.selection ? e.selection() : e;
|
|
2305
|
-
i.property("__zoom",
|
|
3089
|
+
i.property("__zoom", Jo), e === i ? i.interrupt().each(function() {
|
|
2306
3090
|
S(this, arguments).event(r).start().zoom(null, typeof t == "function" ? t.apply(this, arguments) : t).end();
|
|
2307
3091
|
}) : x(e, t, n, r);
|
|
2308
3092
|
}, _.scaleBy = function(e, t, n, r) {
|
|
@@ -2321,15 +3105,15 @@ function Ea() {
|
|
|
2321
3105
|
}, _.translateTo = function(e, r, i, a, s) {
|
|
2322
3106
|
_.transform(e, function() {
|
|
2323
3107
|
var e = t.apply(this, arguments), s = this.__zoom, c = a == null ? b(e) : typeof a == "function" ? a.apply(this, arguments) : a;
|
|
2324
|
-
return n(
|
|
3108
|
+
return n(Ho.translate(c[0], c[1]).scale(s.k).translate(typeof r == "function" ? -r.apply(this, arguments) : -r, typeof i == "function" ? -i.apply(this, arguments) : -i), e, o);
|
|
2325
3109
|
}, a, s);
|
|
2326
3110
|
};
|
|
2327
3111
|
function v(e, t) {
|
|
2328
|
-
return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new
|
|
3112
|
+
return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new Q(t, e.x, e.y);
|
|
2329
3113
|
}
|
|
2330
3114
|
function y(e, t, n) {
|
|
2331
3115
|
var r = t[0] - n[0] * e.k, i = t[1] - n[1] * e.k;
|
|
2332
|
-
return r === e.x && i === e.y ? e : new
|
|
3116
|
+
return r === e.x && i === e.y ? e : new Q(e.k, r, i);
|
|
2333
3117
|
}
|
|
2334
3118
|
function b(e) {
|
|
2335
3119
|
return [(+e[0][0] + +e[1][0]) / 2, (+e[0][1] + +e[1][1]) / 2];
|
|
@@ -2345,7 +3129,7 @@ function Ea() {
|
|
|
2345
3129
|
if (e === 1) e = f;
|
|
2346
3130
|
else {
|
|
2347
3131
|
var t = p(e), n = u / t[2];
|
|
2348
|
-
e = new
|
|
3132
|
+
e = new Q(n, l[0] - t[0] * n, l[1] - t[1] * n);
|
|
2349
3133
|
}
|
|
2350
3134
|
o.zoom(null, e);
|
|
2351
3135
|
};
|
|
@@ -2371,8 +3155,8 @@ function Ea() {
|
|
|
2371
3155
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
2372
3156
|
},
|
|
2373
3157
|
emit: function(e) {
|
|
2374
|
-
var t =
|
|
2375
|
-
l.call(e, this.that, new
|
|
3158
|
+
var t = H(this.that).datum();
|
|
3159
|
+
l.call(e, this.that, new Vo(e, {
|
|
2376
3160
|
sourceEvent: this.sourceEvent,
|
|
2377
3161
|
target: _,
|
|
2378
3162
|
type: e,
|
|
@@ -2381,55 +3165,55 @@ function Ea() {
|
|
|
2381
3165
|
}), t);
|
|
2382
3166
|
}
|
|
2383
3167
|
};
|
|
2384
|
-
function
|
|
3168
|
+
function w(t, ...i) {
|
|
2385
3169
|
if (!e.apply(this, arguments)) return;
|
|
2386
|
-
var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u =
|
|
3170
|
+
var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u = U(t);
|
|
2387
3171
|
if (s.wheel) (s.mouse[0][0] !== u[0] || s.mouse[0][1] !== u[1]) && (s.mouse[1] = c.invert(s.mouse[0] = u)), clearTimeout(s.wheel);
|
|
2388
3172
|
else if (c.k === l) return;
|
|
2389
|
-
else s.mouse = [u, c.invert(u)],
|
|
2390
|
-
|
|
3173
|
+
else s.mouse = [u, c.invert(u)], Aa(this), s.start();
|
|
3174
|
+
Go(t), s.wheel = setTimeout(d, m), s.zoom("mouse", n(y(v(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
|
|
2391
3175
|
function d() {
|
|
2392
3176
|
s.wheel = null, s.end();
|
|
2393
3177
|
}
|
|
2394
3178
|
}
|
|
2395
|
-
function
|
|
3179
|
+
function T(t, ...r) {
|
|
2396
3180
|
if (f || !e.apply(this, arguments)) return;
|
|
2397
|
-
var i = t.currentTarget, a = S(this, r, !0).event(t), s =
|
|
2398
|
-
|
|
3181
|
+
var i = t.currentTarget, a = S(this, r, !0).event(t), s = H(t.view).on("mousemove.zoom", d, !0).on("mouseup.zoom", p, !0), c = U(t, i), l = t.clientX, u = t.clientY;
|
|
3182
|
+
Yi(t.view), Wo(t), a.mouse = [c, this.__zoom.invert(c)], Aa(this), a.start();
|
|
2399
3183
|
function d(e) {
|
|
2400
|
-
if (
|
|
3184
|
+
if (Go(e), !a.moved) {
|
|
2401
3185
|
var t = e.clientX - l, r = e.clientY - u;
|
|
2402
3186
|
a.moved = t * t + r * r > h;
|
|
2403
3187
|
}
|
|
2404
|
-
a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] =
|
|
3188
|
+
a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] = U(e, i), a.mouse[1]), a.extent, o));
|
|
2405
3189
|
}
|
|
2406
3190
|
function p(e) {
|
|
2407
|
-
s.on("mousemove.zoom mouseup.zoom", null),
|
|
3191
|
+
s.on("mousemove.zoom mouseup.zoom", null), Xi(e.view, a.moved), Go(e), a.event(e).end();
|
|
2408
3192
|
}
|
|
2409
3193
|
}
|
|
2410
|
-
function
|
|
3194
|
+
function E(r, ...i) {
|
|
2411
3195
|
if (e.apply(this, arguments)) {
|
|
2412
|
-
var a = this.__zoom, c =
|
|
2413
|
-
|
|
3196
|
+
var a = this.__zoom, c = U(r.changedTouches ? r.changedTouches[0] : r, this), l = a.invert(c), u = a.k * (r.shiftKey ? .5 : 2), d = n(y(v(a, u), c, l), t.apply(this, i), o);
|
|
3197
|
+
Go(r), s > 0 ? H(this).transition().duration(s).call(x, d, c, r) : H(this).call(_.transform, d, c, r);
|
|
2414
3198
|
}
|
|
2415
3199
|
}
|
|
2416
|
-
function
|
|
3200
|
+
function ee(t, ...n) {
|
|
2417
3201
|
if (e.apply(this, arguments)) {
|
|
2418
3202
|
var r = t.touches, i = r.length, a = S(this, n, t.changedTouches.length === i).event(t), o, s, c, l;
|
|
2419
|
-
for (
|
|
3203
|
+
for (Wo(t), s = 0; s < i; ++s) c = r[s], l = U(c, this), l = [
|
|
2420
3204
|
l,
|
|
2421
3205
|
this.__zoom.invert(l),
|
|
2422
3206
|
c.identifier
|
|
2423
3207
|
], a.touch0 ? !a.touch1 && a.touch0[2] !== l[2] && (a.touch1 = l, a.taps = 0) : (a.touch0 = l, o = !0, a.taps = 1 + !!u);
|
|
2424
3208
|
u &&= clearTimeout(u), o && (a.taps < 2 && (d = l[0], u = setTimeout(function() {
|
|
2425
3209
|
u = null;
|
|
2426
|
-
}, p)),
|
|
3210
|
+
}, p)), Aa(this), a.start());
|
|
2427
3211
|
}
|
|
2428
3212
|
}
|
|
2429
|
-
function
|
|
3213
|
+
function te(e, ...t) {
|
|
2430
3214
|
if (this.__zooming) {
|
|
2431
3215
|
var r = S(this, t).event(e), i = e.changedTouches, a = i.length, s, c, l, u;
|
|
2432
|
-
for (
|
|
3216
|
+
for (Go(e), s = 0; s < a; ++s) c = i[s], l = U(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
|
|
2433
3217
|
if (c = r.that.__zoom, r.touch1) {
|
|
2434
3218
|
var d = r.touch0[0], f = r.touch0[1], p = r.touch1[0], m = r.touch1[1], h = (h = p[0] - d[0]) * h + (h = p[1] - d[1]) * h, g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g;
|
|
2435
3219
|
c = v(c, Math.sqrt(h / g)), l = [(d[0] + p[0]) / 2, (d[1] + p[1]) / 2], u = [(f[0] + m[0]) / 2, (f[1] + m[1]) / 2];
|
|
@@ -2438,27 +3222,27 @@ function Ea() {
|
|
|
2438
3222
|
r.zoom("touch", n(y(c, l, u), r.extent, o));
|
|
2439
3223
|
}
|
|
2440
3224
|
}
|
|
2441
|
-
function
|
|
3225
|
+
function D(e, ...t) {
|
|
2442
3226
|
if (this.__zooming) {
|
|
2443
3227
|
var n = S(this, t).event(e), r = e.changedTouches, i = r.length, a, o;
|
|
2444
|
-
for (
|
|
3228
|
+
for (Wo(e), f && clearTimeout(f), f = setTimeout(function() {
|
|
2445
3229
|
f = null;
|
|
2446
3230
|
}, p), a = 0; a < i; ++a) o = r[a], n.touch0 && n.touch0[2] === o.identifier ? delete n.touch0 : n.touch1 && n.touch1[2] === o.identifier && delete n.touch1;
|
|
2447
3231
|
if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
|
|
2448
|
-
else if (n.end(), n.taps === 2 && (o =
|
|
2449
|
-
var s =
|
|
3232
|
+
else if (n.end(), n.taps === 2 && (o = U(o, this), Math.hypot(d[0] - o[0], d[1] - o[1]) < g)) {
|
|
3233
|
+
var s = H(this).on("dblclick.zoom");
|
|
2450
3234
|
s && s.apply(this, arguments);
|
|
2451
3235
|
}
|
|
2452
3236
|
}
|
|
2453
3237
|
}
|
|
2454
3238
|
return _.wheelDelta = function(e) {
|
|
2455
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
3239
|
+
return arguments.length ? (r = typeof e == "function" ? e : Bo(+e), _) : r;
|
|
2456
3240
|
}, _.filter = function(t) {
|
|
2457
|
-
return arguments.length ? (e = typeof t == "function" ? t :
|
|
3241
|
+
return arguments.length ? (e = typeof t == "function" ? t : Bo(!!t), _) : e;
|
|
2458
3242
|
}, _.touchable = function(e) {
|
|
2459
|
-
return arguments.length ? (i = typeof e == "function" ? e :
|
|
3243
|
+
return arguments.length ? (i = typeof e == "function" ? e : Bo(!!e), _) : i;
|
|
2460
3244
|
}, _.extent = function(e) {
|
|
2461
|
-
return arguments.length ? (t = typeof e == "function" ? e :
|
|
3245
|
+
return arguments.length ? (t = typeof e == "function" ? e : Bo([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), _) : t;
|
|
2462
3246
|
}, _.scaleExtent = function(e) {
|
|
2463
3247
|
return arguments.length ? (a[0] = +e[0], a[1] = +e[1], _) : [a[0], a[1]];
|
|
2464
3248
|
}, _.translateExtent = function(e) {
|
|
@@ -2478,8 +3262,8 @@ function Ea() {
|
|
|
2478
3262
|
return arguments.length ? (g = +e, _) : g;
|
|
2479
3263
|
}, _;
|
|
2480
3264
|
}
|
|
2481
|
-
|
|
2482
|
-
var
|
|
3265
|
+
M();
|
|
3266
|
+
var $o = (e) => ({
|
|
2483
3267
|
left: {
|
|
2484
3268
|
nodeLeftX: () => 0,
|
|
2485
3269
|
nodeRightX: (e) => e.width,
|
|
@@ -2613,7 +3397,7 @@ var Da = (e) => ({
|
|
|
2613
3397
|
nodeUpdateTransform: ({ x: e, y: t, width: n, height: r }) => `translate(${e - n},${t - r / 2})`
|
|
2614
3398
|
}
|
|
2615
3399
|
});
|
|
2616
|
-
function
|
|
3400
|
+
function es(e, t, n) {
|
|
2617
3401
|
let r = e.x, i = e.y, a = t.x, o = t.y, s = n && n.x != null ? n.x : r, c = n && n.y != null ? n.y : i, l = a - r < 0 ? -1 : 1, u = o - i < 0 ? -1 : 1, d = Math.abs(a - r) / 2 < 35 ? Math.abs(a - r) / 2 : 35;
|
|
2618
3402
|
d = Math.abs(o - i) / 2 < d ? Math.abs(o - i) / 2 : d;
|
|
2619
3403
|
let f = Math.abs(a - r) / 2 - d;
|
|
@@ -2631,7 +3415,7 @@ function Oa(e, t, n) {
|
|
|
2631
3415
|
${a - f * l} ${o}
|
|
2632
3416
|
L ${a} ${o}`;
|
|
2633
3417
|
}
|
|
2634
|
-
function
|
|
3418
|
+
function ts(e, t, n, r = { sy: 0 }) {
|
|
2635
3419
|
let i = e.x, a = e.y, o = t.x, s = t.y, c = n && n.x != null ? n.x : i, l = n && n.y != null ? n.y : a, u = o - i < 0 ? -1 : 1, d = s - a < 0 ? -1 : 1;
|
|
2636
3420
|
a += r.sy;
|
|
2637
3421
|
let f = Math.abs(o - i) / 2 < 15 ? Math.abs(o - i) / 2 : 15;
|
|
@@ -2647,7 +3431,7 @@ function ka(e, t, n, r = { sy: 0 }) {
|
|
|
2647
3431
|
C ${o} ${a + p * d + f * d} ${o} ${a + p * d + f * d} ${o} ${s - p * d}
|
|
2648
3432
|
L ${o} ${s}`;
|
|
2649
3433
|
}
|
|
2650
|
-
function
|
|
3434
|
+
function ns({ node: e, config: t }) {
|
|
2651
3435
|
return e.data?.id === "__root__" ? null : `<div class="button-content"> ${{
|
|
2652
3436
|
left: (t) => t ? `<div style="display:flex;"><span style="align-items:center;display:flex;"><svg width="8" height="8" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2653
3437
|
<path d="M14.283 3.50094L6.51 11.4749C6.37348 11.615 6.29707 11.8029 6.29707 11.9984C6.29707 12.194 6.37348 12.3819 6.51 12.5219L14.283 20.4989C14.3466 20.5643 14.4226 20.6162 14.5066 20.6516C14.5906 20.6871 14.6808 20.7053 14.772 20.7053C14.8632 20.7053 14.9534 20.6871 15.0374 20.6516C15.1214 20.6162 15.1974 20.5643 15.261 20.4989C15.3918 20.365 15.4651 20.1852 15.4651 19.9979C15.4651 19.8107 15.3918 19.6309 15.261 19.4969L7.9515 11.9984L15.261 4.50144C15.3914 4.36756 15.4643 4.18807 15.4643 4.00119C15.4643 3.81431 15.3914 3.63482 15.261 3.50094C15.1974 3.43563 15.1214 3.38371 15.0374 3.34827C14.9534 3.31282 14.8632 3.29456 14.772 3.29456C14.6808 3.29456 14.5906 3.31282 14.5066 3.34827C14.4226 3.38371 14.3466 3.43563 14.283 3.50094V3.50094Z" fill="#716E7B" stroke="#716E7B"/>
|
|
@@ -2675,7 +3459,7 @@ function Aa({ node: e, config: t }) {
|
|
|
2675
3459
|
`
|
|
2676
3460
|
}[t.layout](e.children)} </div>`;
|
|
2677
3461
|
}
|
|
2678
|
-
function
|
|
3462
|
+
function rs(e, t, n, r) {
|
|
2679
3463
|
if (!e.parent) return "";
|
|
2680
3464
|
let i = r.pagingStep(e.parent), a = e.parent.data._pagingStep ?? 0, o = (e.parent.data._directSubordinatesPaging ?? 0) - a;
|
|
2681
3465
|
return `
|
|
@@ -2688,7 +3472,7 @@ function ja(e, t, n, r) {
|
|
|
2688
3472
|
</div>
|
|
2689
3473
|
`;
|
|
2690
3474
|
}
|
|
2691
|
-
var
|
|
3475
|
+
var is = () => {
|
|
2692
3476
|
let e = {
|
|
2693
3477
|
svgWidth: 800,
|
|
2694
3478
|
svgHeight: window.innerHeight - 100,
|
|
@@ -2729,7 +3513,7 @@ var Ma = () => {
|
|
|
2729
3513
|
compact: !0,
|
|
2730
3514
|
gridEnabled: !1,
|
|
2731
3515
|
gridRows: 0,
|
|
2732
|
-
createZoom: () =>
|
|
3516
|
+
createZoom: () => Qo(),
|
|
2733
3517
|
onZoomStart: () => {},
|
|
2734
3518
|
onZoom: () => {},
|
|
2735
3519
|
onZoomEnd: () => {},
|
|
@@ -2743,166 +3527,166 @@ var Ma = () => {
|
|
|
2743
3527
|
onNodeParentChange() {},
|
|
2744
3528
|
onExpandOrCollapse: (e) => e,
|
|
2745
3529
|
nodeContent: (e) => e.id === "__root__" ? null : "<div class=\"node-content\"></div>",
|
|
2746
|
-
buttonContent:
|
|
2747
|
-
pagingButton:
|
|
3530
|
+
buttonContent: ns,
|
|
3531
|
+
pagingButton: rs,
|
|
2748
3532
|
nodeUpdate: function() {
|
|
2749
|
-
|
|
3533
|
+
H(this).select(".node-rect").attr("stroke", null).attr("stroke-width", null);
|
|
2750
3534
|
},
|
|
2751
3535
|
nodeEnter: (e) => e,
|
|
2752
3536
|
nodeExit: (e) => e,
|
|
2753
3537
|
linkUpdate: function(e) {
|
|
2754
3538
|
if (e.data._upToTheRootHighlighted) {
|
|
2755
|
-
|
|
3539
|
+
H(this).style("stroke-width", "var(--border-hover-width)").style("stroke", "var(--border-hover-color)");
|
|
2756
3540
|
return;
|
|
2757
3541
|
}
|
|
2758
|
-
|
|
3542
|
+
H(this).style("stroke", null).style("stroke-width", null), e.data._upToTheRootHighlighted && H(this).raise();
|
|
2759
3543
|
},
|
|
2760
|
-
hdiagonal:
|
|
2761
|
-
diagonal:
|
|
2762
|
-
linkGroupArc:
|
|
3544
|
+
hdiagonal: es,
|
|
3545
|
+
diagonal: ts,
|
|
3546
|
+
linkGroupArc: le().x((e) => e.x).y((e) => e.y)
|
|
2763
3547
|
};
|
|
2764
|
-
return e.layoutBindings =
|
|
2765
|
-
},
|
|
3548
|
+
return e.layoutBindings = $o(e), e;
|
|
3549
|
+
}, as = (e) => Math.min(1, 9 / e), os = (e, t, n, r) => {
|
|
2766
3550
|
if (r === void 0 || t - e <= n) return (e + t) / 2;
|
|
2767
3551
|
let i = n / 2;
|
|
2768
3552
|
return Math.min(t - i, Math.max(e + i, r));
|
|
2769
|
-
},
|
|
3553
|
+
}, ss = ({ bounds: e, viewport: t, scaleExtent: n, minScale: r = 0, scale: i, focus: a }) => {
|
|
2770
3554
|
let { x0: o, x1: s, y0: c, y1: l } = e, { width: u, height: d } = t, [f, p] = n, m = 1 / Math.max((s - o) / u, (l - c) / d), h = i ?? Math.min(p, Math.max(Math.max(f, Math.min(r, p)), m));
|
|
2771
3555
|
return {
|
|
2772
3556
|
k: h,
|
|
2773
|
-
x: u / 2 - h *
|
|
2774
|
-
y: d / 2 - h *
|
|
2775
|
-
};
|
|
2776
|
-
},
|
|
2777
|
-
let
|
|
2778
|
-
return
|
|
2779
|
-
let
|
|
2780
|
-
linkUpdate:
|
|
2781
|
-
getButtonContent:
|
|
2782
|
-
...
|
|
2783
|
-
},
|
|
2784
|
-
...
|
|
3557
|
+
x: u / 2 - h * os(o, s, u / h, a?.x),
|
|
3558
|
+
y: d / 2 - h * os(c, l, d / h, a?.y)
|
|
3559
|
+
};
|
|
3560
|
+
}, cs = (e, t, n) => {
|
|
3561
|
+
let r = (0, P.useRef)(e.treeChartSettings?.transform), i = (0, P.useRef)(null);
|
|
3562
|
+
return i.current = (t) => {
|
|
3563
|
+
let r = is(), i = t.treeOptions, a = {
|
|
3564
|
+
linkUpdate: r.linkUpdate,
|
|
3565
|
+
getButtonContent: r.buttonContent,
|
|
3566
|
+
...Gi[i.layoutPreset]
|
|
3567
|
+
}, o = a.sizes ? a.sizes(e) : {}, s = {
|
|
3568
|
+
...a.labelStyle,
|
|
2785
3569
|
...e.treeChartSettings?.nodeLayout?.labelStyle,
|
|
2786
|
-
fontSize: e.treeChartSettings?.nodeLayout?.labelStyle?.fontSize ??
|
|
2787
|
-
},
|
|
2788
|
-
...
|
|
3570
|
+
fontSize: e.treeChartSettings?.nodeLayout?.labelStyle?.fontSize ?? a.labelStyle?.fontSize
|
|
3571
|
+
}, u = {
|
|
3572
|
+
...c,
|
|
2789
3573
|
...e.treeChartSettings?.nodeLayout?.border
|
|
2790
3574
|
};
|
|
2791
|
-
|
|
2792
|
-
let
|
|
2793
|
-
...
|
|
3575
|
+
u.enabled === !1 && (u.borderWidth = 0);
|
|
3576
|
+
let d = {
|
|
3577
|
+
...f,
|
|
2794
3578
|
...e.treeChartSettings?.nodeLayout.hoverStyle
|
|
2795
|
-
}, p =
|
|
2796
|
-
|
|
3579
|
+
}, p = d.enabled ? d.borderWidth : 0;
|
|
3580
|
+
n.nodeWidth((e) => (i.nodeWidth ? i.nodeWidth : typeof a.width == "function" ? a.width(e) : a.width) + (u.borderWidth ?? 0) * 2).nodeHeight((e) => (e.id === "__root__" ? 0 : typeof a.height == "function" ? a.height(e, o) : a.height) + (u.borderWidth ?? 0) * 2).nodeDefaultBackground(e.treeChartSettings?.nodeLayout?.backgroundColor ?? l.backgroundColor).compact(i.compact).layout(i.directionOrigin).padding({
|
|
2797
3581
|
top: p,
|
|
2798
3582
|
right: p,
|
|
2799
3583
|
bottom: p,
|
|
2800
3584
|
left: p
|
|
2801
|
-
}).gridEnabled(
|
|
3585
|
+
}).gridEnabled(i.gridLayoutEnabled).gridRows(i.gridLayoutRows).forceAutoFit(i.forceAutoFit).minFitScale(i.keepFitReadable ? as(j(s.fontSize)) : 0).setActiveNodeCentered(!i.forceAutoFit).duration(i.animate === !1 ? 0 : 400).root(t.root).linkUpdate(a.linkUpdate).buttonContent(a.getButtonContent).container(t.container).nodeContent((e) => a.getNodeContent(e, { config: n.getConfig() })).render({
|
|
2802
3586
|
zoomToFit: t.zoomToFit ?? !1,
|
|
2803
3587
|
transform: t.transform
|
|
2804
3588
|
});
|
|
2805
|
-
}, (0,
|
|
2806
|
-
!e || !t.current ||
|
|
3589
|
+
}, (0, P.useCallback)((e, n) => {
|
|
3590
|
+
!e || !t.current || i.current?.({
|
|
2807
3591
|
root: e,
|
|
2808
3592
|
container: t.current,
|
|
2809
3593
|
treeOptions: n,
|
|
2810
3594
|
zoomToFit: !0,
|
|
2811
|
-
transform:
|
|
3595
|
+
transform: r.current ?? void 0
|
|
2812
3596
|
});
|
|
2813
3597
|
}, []);
|
|
2814
|
-
},
|
|
3598
|
+
}, ls = {
|
|
2815
3599
|
directionOrigin: "top",
|
|
2816
3600
|
compact: !1,
|
|
2817
|
-
layoutPreset:
|
|
3601
|
+
layoutPreset: t.Basic,
|
|
2818
3602
|
forceAutoFit: !1,
|
|
2819
3603
|
keepFitReadable: !0,
|
|
2820
3604
|
animate: !0,
|
|
2821
3605
|
interactive: !0,
|
|
2822
3606
|
gridLayoutEnabled: !1,
|
|
2823
3607
|
gridLayoutRows: 0
|
|
2824
|
-
},
|
|
2825
|
-
let
|
|
2826
|
-
directionOrigin: e.treeChartSettings?.directionOrigin ??
|
|
2827
|
-
compact: e.treeChartSettings?.compact ??
|
|
2828
|
-
layoutPreset: e.treeChartSettings?.nodeLayout?.preset ??
|
|
2829
|
-
forceAutoFit:
|
|
2830
|
-
keepFitReadable: !
|
|
3608
|
+
}, us = (e, n) => {
|
|
3609
|
+
let r = n?.isPrintMode ?? !1, i = e.treeChartSettings?.forceAutoFit ?? ls.forceAutoFit, a = {
|
|
3610
|
+
directionOrigin: e.treeChartSettings?.directionOrigin ?? ls.directionOrigin,
|
|
3611
|
+
compact: e.treeChartSettings?.compact ?? ls.compact,
|
|
3612
|
+
layoutPreset: e.treeChartSettings?.nodeLayout?.preset ?? ls.layoutPreset,
|
|
3613
|
+
forceAutoFit: i,
|
|
3614
|
+
keepFitReadable: !i && !r,
|
|
2831
3615
|
nodeWidth: e.treeChartSettings?.nodeLayout?.width,
|
|
2832
|
-
animate: !
|
|
2833
|
-
interactive:
|
|
3616
|
+
animate: !r,
|
|
3617
|
+
interactive: n.disable?.interactions !== !0,
|
|
2834
3618
|
gridLayoutEnabled: e.treeChartSettings.gridLayout?.enabled ?? !1,
|
|
2835
3619
|
gridLayoutRows: e.treeChartSettings.gridLayout?.rows ?? 0
|
|
2836
3620
|
};
|
|
2837
3621
|
return {
|
|
2838
|
-
treeSettings:
|
|
2839
|
-
layout:
|
|
3622
|
+
treeSettings: a,
|
|
3623
|
+
layout: Gi[a.layoutPreset || t.Basic]
|
|
2840
3624
|
};
|
|
2841
3625
|
};
|
|
2842
|
-
function
|
|
3626
|
+
function ds(e) {
|
|
2843
3627
|
var t = 0, n = e.children, r = n && n.length;
|
|
2844
3628
|
if (!r) t = 1;
|
|
2845
3629
|
else for (; --r >= 0;) t += n[r].value;
|
|
2846
3630
|
e.value = t;
|
|
2847
3631
|
}
|
|
2848
|
-
function
|
|
2849
|
-
return this.eachAfter(
|
|
3632
|
+
function fs() {
|
|
3633
|
+
return this.eachAfter(ds);
|
|
2850
3634
|
}
|
|
2851
|
-
function
|
|
3635
|
+
function ps(e) {
|
|
2852
3636
|
var t = this, n, r = [t], i, a, o;
|
|
2853
3637
|
do
|
|
2854
3638
|
for (n = r.reverse(), r = []; t = n.pop();) if (e(t), i = t.children, i) for (a = 0, o = i.length; a < o; ++a) r.push(i[a]);
|
|
2855
3639
|
while (r.length);
|
|
2856
3640
|
return this;
|
|
2857
3641
|
}
|
|
2858
|
-
function
|
|
3642
|
+
function ms(e) {
|
|
2859
3643
|
for (var t = this, n = [t], r, i; t = n.pop();) if (e(t), r = t.children, r) for (i = r.length - 1; i >= 0; --i) n.push(r[i]);
|
|
2860
3644
|
return this;
|
|
2861
3645
|
}
|
|
2862
|
-
function
|
|
3646
|
+
function hs(e) {
|
|
2863
3647
|
for (var t = this, n = [t], r = [], i, a, o; t = n.pop();) if (r.push(t), i = t.children, i) for (a = 0, o = i.length; a < o; ++a) n.push(i[a]);
|
|
2864
3648
|
for (; t = r.pop();) e(t);
|
|
2865
3649
|
return this;
|
|
2866
3650
|
}
|
|
2867
|
-
function
|
|
3651
|
+
function gs(e) {
|
|
2868
3652
|
return this.eachAfter(function(t) {
|
|
2869
3653
|
for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
|
|
2870
3654
|
t.value = n;
|
|
2871
3655
|
});
|
|
2872
3656
|
}
|
|
2873
|
-
function
|
|
3657
|
+
function _s(e) {
|
|
2874
3658
|
return this.eachBefore(function(t) {
|
|
2875
3659
|
t.children && t.children.sort(e);
|
|
2876
3660
|
});
|
|
2877
3661
|
}
|
|
2878
|
-
function
|
|
2879
|
-
for (var t = this, n =
|
|
3662
|
+
function vs(e) {
|
|
3663
|
+
for (var t = this, n = ys(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
|
|
2880
3664
|
for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
|
|
2881
3665
|
return r;
|
|
2882
3666
|
}
|
|
2883
|
-
function
|
|
3667
|
+
function ys(e, t) {
|
|
2884
3668
|
if (e === t) return e;
|
|
2885
3669
|
var n = e.ancestors(), r = t.ancestors(), i = null;
|
|
2886
3670
|
for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
|
|
2887
3671
|
return i;
|
|
2888
3672
|
}
|
|
2889
|
-
function
|
|
3673
|
+
function bs() {
|
|
2890
3674
|
for (var e = this, t = [e]; e = e.parent;) t.push(e);
|
|
2891
3675
|
return t;
|
|
2892
3676
|
}
|
|
2893
|
-
function
|
|
3677
|
+
function xs() {
|
|
2894
3678
|
var e = [];
|
|
2895
3679
|
return this.each(function(t) {
|
|
2896
3680
|
e.push(t);
|
|
2897
3681
|
}), e;
|
|
2898
3682
|
}
|
|
2899
|
-
function
|
|
3683
|
+
function Ss() {
|
|
2900
3684
|
var e = [];
|
|
2901
3685
|
return this.eachBefore(function(t) {
|
|
2902
3686
|
t.children || e.push(t);
|
|
2903
3687
|
}), e;
|
|
2904
3688
|
}
|
|
2905
|
-
function
|
|
3689
|
+
function Cs() {
|
|
2906
3690
|
var e = this, t = [];
|
|
2907
3691
|
return e.each(function(n) {
|
|
2908
3692
|
n !== e && t.push({
|
|
@@ -2911,47 +3695,47 @@ function Za() {
|
|
|
2911
3695
|
});
|
|
2912
3696
|
}), t;
|
|
2913
3697
|
}
|
|
2914
|
-
function
|
|
2915
|
-
var n = new
|
|
2916
|
-
for (t ??=
|
|
2917
|
-
return n.eachBefore(
|
|
3698
|
+
function ws(e, t) {
|
|
3699
|
+
var n = new ks(e), r = +e.value && (n.value = e.value), i, a = [n], o, s, c, l;
|
|
3700
|
+
for (t ??= Es; i = a.pop();) if (r && (i.value = +i.data.value), (s = t(i.data)) && (l = s.length)) for (i.children = Array(l), c = l - 1; c >= 0; --c) a.push(o = i.children[c] = new ks(s[c])), o.parent = i, o.depth = i.depth + 1;
|
|
3701
|
+
return n.eachBefore(Os);
|
|
2918
3702
|
}
|
|
2919
|
-
function
|
|
2920
|
-
return
|
|
3703
|
+
function Ts() {
|
|
3704
|
+
return ws(this).eachBefore(Ds);
|
|
2921
3705
|
}
|
|
2922
|
-
function
|
|
3706
|
+
function Es(e) {
|
|
2923
3707
|
return e.children;
|
|
2924
3708
|
}
|
|
2925
|
-
function
|
|
3709
|
+
function Ds(e) {
|
|
2926
3710
|
e.data = e.data.data;
|
|
2927
3711
|
}
|
|
2928
|
-
function
|
|
3712
|
+
function Os(e) {
|
|
2929
3713
|
var t = 0;
|
|
2930
3714
|
do
|
|
2931
3715
|
e.height = t;
|
|
2932
3716
|
while ((e = e.parent) && e.height < ++t);
|
|
2933
3717
|
}
|
|
2934
|
-
function
|
|
3718
|
+
function ks(e) {
|
|
2935
3719
|
this.data = e, this.depth = this.height = 0, this.parent = null;
|
|
2936
3720
|
}
|
|
2937
|
-
|
|
2938
|
-
constructor:
|
|
2939
|
-
count:
|
|
2940
|
-
each:
|
|
2941
|
-
eachAfter:
|
|
2942
|
-
eachBefore:
|
|
2943
|
-
sum:
|
|
2944
|
-
sort:
|
|
2945
|
-
path:
|
|
2946
|
-
ancestors:
|
|
2947
|
-
descendants:
|
|
2948
|
-
leaves:
|
|
2949
|
-
links:
|
|
2950
|
-
copy:
|
|
3721
|
+
ks.prototype = ws.prototype = {
|
|
3722
|
+
constructor: ks,
|
|
3723
|
+
count: fs,
|
|
3724
|
+
each: ps,
|
|
3725
|
+
eachAfter: hs,
|
|
3726
|
+
eachBefore: ms,
|
|
3727
|
+
sum: gs,
|
|
3728
|
+
sort: _s,
|
|
3729
|
+
path: vs,
|
|
3730
|
+
ancestors: bs,
|
|
3731
|
+
descendants: xs,
|
|
3732
|
+
leaves: Ss,
|
|
3733
|
+
links: Cs,
|
|
3734
|
+
copy: Ts
|
|
2951
3735
|
};
|
|
2952
|
-
var
|
|
2953
|
-
|
|
2954
|
-
var { version:
|
|
3736
|
+
var As = ie();
|
|
3737
|
+
Pe();
|
|
3738
|
+
var { version: js } = {
|
|
2955
3739
|
name: "d3-flextree",
|
|
2956
3740
|
version: "2.1.2",
|
|
2957
3741
|
main: "build/d3-flextree.js",
|
|
@@ -3012,13 +3796,13 @@ var { version: ao } = {
|
|
|
3012
3796
|
"rollup-plugin-uglify": "^3.0.0",
|
|
3013
3797
|
"uglify-es": "^3.3.9"
|
|
3014
3798
|
}
|
|
3015
|
-
},
|
|
3799
|
+
}, Ms = Object.freeze({
|
|
3016
3800
|
children: (e) => e.children,
|
|
3017
3801
|
nodeSize: (e) => e.data.size,
|
|
3018
3802
|
spacing: 0
|
|
3019
3803
|
});
|
|
3020
|
-
function
|
|
3021
|
-
let t = Object.assign({},
|
|
3804
|
+
function Ns(e) {
|
|
3805
|
+
let t = Object.assign({}, Ms, e);
|
|
3022
3806
|
function n(e) {
|
|
3023
3807
|
let n = t[e];
|
|
3024
3808
|
return typeof n == "function" ? n : () => n;
|
|
@@ -3029,7 +3813,7 @@ function so(e) {
|
|
|
3029
3813
|
}
|
|
3030
3814
|
function i() {
|
|
3031
3815
|
let e = n("nodeSize"), t = n("spacing");
|
|
3032
|
-
return class n extends
|
|
3816
|
+
return class n extends ws.prototype.constructor {
|
|
3033
3817
|
constructor(e) {
|
|
3034
3818
|
super(e);
|
|
3035
3819
|
}
|
|
@@ -3142,7 +3926,7 @@ function so(e) {
|
|
|
3142
3926
|
this.data.y = e;
|
|
3143
3927
|
}
|
|
3144
3928
|
update() {
|
|
3145
|
-
return
|
|
3929
|
+
return Ps(this), Fs(this), this;
|
|
3146
3930
|
}
|
|
3147
3931
|
};
|
|
3148
3932
|
}
|
|
@@ -3186,52 +3970,52 @@ function so(e) {
|
|
|
3186
3970
|
}
|
|
3187
3971
|
}), r;
|
|
3188
3972
|
}
|
|
3189
|
-
|
|
3190
|
-
var
|
|
3973
|
+
Ns.version = js;
|
|
3974
|
+
var Ps = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
3191
3975
|
let [r, i] = t;
|
|
3192
|
-
|
|
3976
|
+
Ps(n, e.y + e.ySize);
|
|
3193
3977
|
let a = (r === 0 ? n.lExt : n.rExt).bottom;
|
|
3194
|
-
r !== 0 &&
|
|
3195
|
-
let o =
|
|
3978
|
+
r !== 0 && Ls(e, r, i);
|
|
3979
|
+
let o = Gs(a, r, i);
|
|
3196
3980
|
return [r + 1, o];
|
|
3197
|
-
}, [0, null]),
|
|
3981
|
+
}, [0, null]), Is(e), Ws(e), e), Fs = (e, t, n) => {
|
|
3198
3982
|
t === void 0 && (t = -e.relX - e.prelim, n = 0);
|
|
3199
3983
|
let r = t + e.relX;
|
|
3200
|
-
return e.relX = r + e.prelim - n, e.prelim = 0, e.x = n + e.relX, (e.children || []).forEach((t) =>
|
|
3201
|
-
},
|
|
3984
|
+
return e.relX = r + e.prelim - n, e.prelim = 0, e.x = n + e.relX, (e.children || []).forEach((t) => Fs(t, r, e.x)), e;
|
|
3985
|
+
}, Is = (e) => {
|
|
3202
3986
|
(e.children || []).reduce((e, t) => {
|
|
3203
3987
|
let [n, r] = e, i = n + t.shift, a = r + i + t.change;
|
|
3204
3988
|
return t.relX += a, [i, a];
|
|
3205
3989
|
}, [0, 0]);
|
|
3206
|
-
},
|
|
3990
|
+
}, Ls = (e, t, n) => {
|
|
3207
3991
|
let r = e.children[t - 1], i = e.children[t], a = r, o = r.relX, s = i, c = i.relX, l = !0;
|
|
3208
3992
|
for (; a && s;) {
|
|
3209
3993
|
a.bottom > n.lowY && (n = n.next);
|
|
3210
3994
|
let r = o + a.prelim - (c + s.prelim) + a.xSize / 2 + s.xSize / 2 + a.spacing(s);
|
|
3211
|
-
(r > 0 || r < 0 && l) && (c += r,
|
|
3995
|
+
(r > 0 || r < 0 && l) && (c += r, Rs(i, r), zs(e, t, n.index, r)), l = !1;
|
|
3212
3996
|
let u = a.bottom, d = s.bottom;
|
|
3213
|
-
u <= d && (a =
|
|
3997
|
+
u <= d && (a = Vs(a), a && (o += a.relX)), u >= d && (s = Bs(s), s && (c += s.relX));
|
|
3214
3998
|
}
|
|
3215
|
-
!a && s ?
|
|
3216
|
-
},
|
|
3999
|
+
!a && s ? Hs(e, t, s, c) : a && !s && Us(e, t, a, o);
|
|
4000
|
+
}, Rs = (e, t) => {
|
|
3217
4001
|
e.relX += t, e.lExtRelX += t, e.rExtRelX += t;
|
|
3218
|
-
},
|
|
4002
|
+
}, zs = (e, t, n, r) => {
|
|
3219
4003
|
let i = e.children[t], a = t - n;
|
|
3220
4004
|
if (a > 1) {
|
|
3221
4005
|
let t = r / a;
|
|
3222
4006
|
e.children[n + 1].shift += t, i.shift -= t, i.change -= r - t;
|
|
3223
4007
|
}
|
|
3224
|
-
},
|
|
4008
|
+
}, Bs = (e) => e.hasChildren ? e.firstChild : e.lThr, Vs = (e) => e.hasChildren ? e.lastChild : e.rThr, Hs = (e, t, n, r) => {
|
|
3225
4009
|
let i = e.firstChild, a = i.lExt, o = e.children[t];
|
|
3226
4010
|
a.lThr = n;
|
|
3227
4011
|
let s = r - n.relX - i.lExtRelX;
|
|
3228
4012
|
a.relX += s, a.prelim -= s, i.lExt = o.lExt, i.lExtRelX = o.lExtRelX;
|
|
3229
|
-
},
|
|
4013
|
+
}, Us = (e, t, n, r) => {
|
|
3230
4014
|
let i = e.children[t], a = i.rExt, o = e.children[t - 1];
|
|
3231
4015
|
a.rThr = n;
|
|
3232
4016
|
let s = r - n.relX - i.rExtRelX;
|
|
3233
4017
|
a.relX += s, a.prelim -= s, i.rExt = o.rExt, i.rExtRelX = o.rExtRelX;
|
|
3234
|
-
},
|
|
4018
|
+
}, Ws = (e) => {
|
|
3235
4019
|
if (e.hasChildren) {
|
|
3236
4020
|
let t = e.firstChild, n = e.lastChild, r = (t.prelim + t.relX - t.xSize / 2 + n.relX + n.prelim + n.xSize / 2) / 2;
|
|
3237
4021
|
Object.assign(e, {
|
|
@@ -3242,7 +4026,7 @@ var co = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
|
3242
4026
|
rExtRelX: n.rExtRelX
|
|
3243
4027
|
});
|
|
3244
4028
|
}
|
|
3245
|
-
},
|
|
4029
|
+
}, Gs = (e, t, n) => {
|
|
3246
4030
|
for (; n !== null && e >= n.lowY;) n = n.next;
|
|
3247
4031
|
return {
|
|
3248
4032
|
lowY: e,
|
|
@@ -3250,21 +4034,21 @@ var co = (e, t = 0) => (e.y = t, (e.children || []).reduce((t, n) => {
|
|
|
3250
4034
|
next: n
|
|
3251
4035
|
};
|
|
3252
4036
|
};
|
|
3253
|
-
|
|
3254
|
-
var
|
|
3255
|
-
selection:
|
|
3256
|
-
select:
|
|
3257
|
-
max:
|
|
3258
|
-
min:
|
|
3259
|
-
sum:
|
|
3260
|
-
cumsum:
|
|
3261
|
-
tree:
|
|
3262
|
-
stratify:
|
|
3263
|
-
zoom:
|
|
3264
|
-
zoomIdentity:
|
|
3265
|
-
linkHorizontal:
|
|
3266
|
-
flextree:
|
|
3267
|
-
},
|
|
4037
|
+
M();
|
|
4038
|
+
var $ = {
|
|
4039
|
+
selection: V,
|
|
4040
|
+
select: H,
|
|
4041
|
+
max: Me,
|
|
4042
|
+
min: Fe,
|
|
4043
|
+
sum: Ne,
|
|
4044
|
+
cumsum: Ie,
|
|
4045
|
+
tree: bn,
|
|
4046
|
+
stratify: cn,
|
|
4047
|
+
zoom: Qo,
|
|
4048
|
+
zoomIdentity: Ho,
|
|
4049
|
+
linkHorizontal: le,
|
|
4050
|
+
flextree: Ns
|
|
4051
|
+
}, Ks = class {
|
|
3268
4052
|
stateInternal = {
|
|
3269
4053
|
allNodes: [],
|
|
3270
4054
|
dragStartX: 0,
|
|
@@ -3279,7 +4063,7 @@ var Q = {
|
|
|
3279
4063
|
};
|
|
3280
4064
|
getConfig;
|
|
3281
4065
|
constructor() {
|
|
3282
|
-
let e =
|
|
4066
|
+
let e = is();
|
|
3283
4067
|
this.getConfig = () => e, Object.keys(e).forEach((t) => {
|
|
3284
4068
|
Object.assign(this, { [t]: function(...n) {
|
|
3285
4069
|
return n.length ? (e[t] = n[0], this) : e[t];
|
|
@@ -3287,7 +4071,7 @@ var Q = {
|
|
|
3287
4071
|
}), this.initializeEnterExitUpdatePattern(), this.extendHierarchyNodePrototype();
|
|
3288
4072
|
}
|
|
3289
4073
|
init() {
|
|
3290
|
-
let e = this.getChartState(), t = this.getConfig(), n =
|
|
4074
|
+
let e = this.getChartState(), t = this.getConfig(), n = $.select(t.container), r = t.container.getBoundingClientRect();
|
|
3291
4075
|
e.containerRect = r;
|
|
3292
4076
|
let i = n.patternify({
|
|
3293
4077
|
tag: "svg",
|
|
@@ -3313,7 +4097,7 @@ var Q = {
|
|
|
3313
4097
|
o &&= (t.onNodeLeave(o), null);
|
|
3314
4098
|
}).on("mousemove", (e) => {
|
|
3315
4099
|
let n = e.target.closest("g.node"), r = null;
|
|
3316
|
-
n && ([...e.target.classList].includes("node-button-foreign-object") || (r =
|
|
4100
|
+
n && ([...e.target.classList].includes("node-button-foreign-object") || (r = $.select(n).datum(), r.parent || (r = null))), o && o !== r && t.onNodeLeave(o), r && o !== r && t.onNodeHover(r), o = r;
|
|
3317
4101
|
}), e.chart = a;
|
|
3318
4102
|
let s = { zoom: t.createZoom() }, c = !1;
|
|
3319
4103
|
s.zoom = s.zoom.clickDistance(10).on("start", (e) => {
|
|
@@ -3341,13 +4125,13 @@ var Q = {
|
|
|
3341
4125
|
return this.stateInternal;
|
|
3342
4126
|
}
|
|
3343
4127
|
initializeEnterExitUpdatePattern() {
|
|
3344
|
-
|
|
4128
|
+
$.selection.prototype.patternify = function(e) {
|
|
3345
4129
|
let t = e.selector, n = e.tag, r = e.data ?? [t], i = this.selectAll("." + t).data(r, (e, t) => e && typeof e == "object" && "id" in e && typeof e.id == "string" ? e.id : t);
|
|
3346
4130
|
return i.exit().remove(), i = i.enter().append(n).merge(i), i.attr("class", t), i;
|
|
3347
4131
|
};
|
|
3348
4132
|
}
|
|
3349
4133
|
extendHierarchyNodePrototype() {
|
|
3350
|
-
|
|
4134
|
+
Ye.prototype.allDescendants || (Ye.prototype.allDescendants = function() {
|
|
3351
4135
|
let e = [];
|
|
3352
4136
|
this.each((t) => {
|
|
3353
4137
|
e.push(t);
|
|
@@ -3380,7 +4164,7 @@ var Q = {
|
|
|
3380
4164
|
chartWidth: r.width,
|
|
3381
4165
|
chartHeight: r.height
|
|
3382
4166
|
};
|
|
3383
|
-
n.calc = i, n.calc.centerX = i.chartWidth / 2, n.calc.centerY = i.chartHeight / 2, n.flexTreeLayout =
|
|
4167
|
+
n.calc = i, n.calc.centerX = i.chartWidth / 2, n.calc.centerY = i.chartHeight / 2, n.flexTreeLayout = Ns({ nodeSize: (e) => {
|
|
3384
4168
|
let n = t.nodeWidth(e), r = t.nodeHeight(e), i = t.siblingsMargin(e), a = t.childrenMargin(e);
|
|
3385
4169
|
return t.layoutBindings[t.layout].nodeFlexSize({
|
|
3386
4170
|
config: t,
|
|
@@ -3412,7 +4196,7 @@ var Q = {
|
|
|
3412
4196
|
n.forEach((e, t) => {
|
|
3413
4197
|
t || (e.firstCompact = !0), t % 2 ? e.compactEven = !1 : e.compactEven = !0, e.row = Math.floor(t / 2);
|
|
3414
4198
|
});
|
|
3415
|
-
let r =
|
|
4199
|
+
let r = $.max(n.filter((e) => e.compactEven), t.layoutBindings[t.layout].compactDimension.sizeColumn), i = $.max(n.filter((e) => !e.compactEven), t.layoutBindings[t.layout].compactDimension.sizeColumn), a = Math.max(r ?? 0, i ?? 0) * 2, o = this.groupBy(n, (e) => e.row, (e) => $.max(e, (e) => t.layoutBindings[t.layout].compactDimension.sizeRow(e) + t.compactMarginBetween()) ?? 0), s = $.sum(o.map((e) => e[1]));
|
|
3416
4200
|
n.forEach((e) => {
|
|
3417
4201
|
e.firstCompactNode = n[0], e.firstCompact ? e.flexCompactDim = [a + t.compactMarginPair(e), s - t.compactMarginBetween()] : e.flexCompactDim = [0, 0];
|
|
3418
4202
|
}), e.flexCompactDim = null;
|
|
@@ -3433,7 +4217,7 @@ var Q = {
|
|
|
3433
4217
|
r.x = r.x + i * .25 - t.compactMarginPair(r) / 4;
|
|
3434
4218
|
let o = e.x - a;
|
|
3435
4219
|
Math.abs(o) < 10 && n.forEach((e) => e.x += o);
|
|
3436
|
-
let s = this.groupBy(n, (e) => e.row, (e) =>
|
|
4220
|
+
let s = this.groupBy(n, (e) => e.row, (e) => $.max(e, (e) => t.layoutBindings[t.layout].compactDimension.sizeRow(e)) ?? 0), c = $.cumsum(s.map((e) => e[1] + t.compactMarginBetween()));
|
|
3437
4221
|
n.forEach((e) => {
|
|
3438
4222
|
e.row ? e.y = r.y + c[e.row - 1] : e.y = r.y;
|
|
3439
4223
|
});
|
|
@@ -3443,7 +4227,7 @@ var Q = {
|
|
|
3443
4227
|
calculateGridLayout(e) {
|
|
3444
4228
|
let t = this.getChartState(), n = this.getConfig(), r = e.descendants().slice(1);
|
|
3445
4229
|
if (e.x = 0, e.y = 0, !r.length) return e;
|
|
3446
|
-
let i =
|
|
4230
|
+
let i = $.max(r, (e) => e.width) ?? 0, a = $.max(r, (e) => e.height) ?? 0, o = $.max(r, (e) => n.siblingsMargin(e)) ?? 0, s = Math.max(1, i + o), c = Math.max(1, a + o), l = Math.max(1, Math.floor((t.calc?.chartWidth ?? s) / s)), u = n.layout === "top" || n.layout === "bottom", d = Math.max(0, Math.floor(n.gridRows)), f = d === 0 ? l : u ? Math.ceil(r.length / d) : d, p = Math.ceil(r.length / f);
|
|
3447
4231
|
return r.forEach((e, t) => {
|
|
3448
4232
|
let i, a;
|
|
3449
4233
|
if (u) {
|
|
@@ -3509,7 +4293,7 @@ var Q = {
|
|
|
3509
4293
|
}).remove();
|
|
3510
4294
|
let d = this, f = r.nodesWrapper.selectAll("g.node").data(o, ({ data: e }) => i.nodeId(e) ?? ""), p = f.enter().append("g").attr("data-brush", (e) => e.data.brush?.key ?? null).attr("class", "node").attr("transform", (n) => n == r.root ? `translate(${e},${t})` : `translate(${i.layoutBindings[i.layout].nodeJoinX(n.parent || n)},${i.layoutBindings[i.layout].nodeJoinY(n.parent || n)})`).classed("draggable droppable", !0).on("click.node", (e, t) => {
|
|
3511
4295
|
[...e.srcElement.classList].includes("node-button-foreign-object") || i.onNodeClick(t);
|
|
3512
|
-
}).call(
|
|
4296
|
+
}).call(ra().filter(function(e, t) {
|
|
3513
4297
|
return r.dragEnabled === !0 && t.depth > 0;
|
|
3514
4298
|
}).on("start", function(e, t) {
|
|
3515
4299
|
d.onDragStart(this, e, t);
|
|
@@ -3576,7 +4360,7 @@ var Q = {
|
|
|
3576
4360
|
height: r
|
|
3577
4361
|
})})`;
|
|
3578
4362
|
}).on("end", function() {
|
|
3579
|
-
|
|
4363
|
+
$.select(this).remove();
|
|
3580
4364
|
}).attr("opacity", 0), o.forEach((e) => {
|
|
3581
4365
|
e.x0 = e.x, e.y0 = e.y;
|
|
3582
4366
|
});
|
|
@@ -3654,12 +4438,12 @@ var Q = {
|
|
|
3654
4438
|
let r = this.getChartState();
|
|
3655
4439
|
r.dragNode = n;
|
|
3656
4440
|
let i = t.subject.width / 2;
|
|
3657
|
-
r.dragStartX = t.x - i, r.dragStartY = t.y, r.isDragStarting = !0,
|
|
4441
|
+
r.dragStartX = t.x - i, r.dragStartY = t.y, r.isDragStarting = !0, H(e).classed("dragging", !0);
|
|
3658
4442
|
}
|
|
3659
4443
|
onDrag(e, t) {
|
|
3660
4444
|
let n = this.getChartState(), r = this.getConfig();
|
|
3661
4445
|
if (!n.dragNode) return;
|
|
3662
|
-
let i =
|
|
4446
|
+
let i = H(e);
|
|
3663
4447
|
if (n.isDragStarting) {
|
|
3664
4448
|
n.isDragStarting = !1, r.container.classList.add("dragging-active"), i.raise();
|
|
3665
4449
|
let e = t.subject.descendants(), a = [...e || [], t.subject], o = e.filter((e) => e.data.id !== t.subject.id);
|
|
@@ -3675,7 +4459,7 @@ var Q = {
|
|
|
3675
4459
|
bottom: t.y + t.subject.height,
|
|
3676
4460
|
midX: t.x + t.subject.width / 2,
|
|
3677
4461
|
midY: t.y + t.subject.height / 2
|
|
3678
|
-
}, o =
|
|
4462
|
+
}, o = Oi("g.node:not(.dragging)");
|
|
3679
4463
|
o.classed("drop-target", !1), o.filter(function(e) {
|
|
3680
4464
|
let t = {
|
|
3681
4465
|
left: e.x,
|
|
@@ -3690,7 +4474,7 @@ var Q = {
|
|
|
3690
4474
|
this.getConfig().container.classList.remove("dragging-active");
|
|
3691
4475
|
let n = this.getChartState();
|
|
3692
4476
|
if (n.dragNode) {
|
|
3693
|
-
if (
|
|
4477
|
+
if (H(e).classed("dragging", !1), !n.dropNode) {
|
|
3694
4478
|
this.render();
|
|
3695
4479
|
return;
|
|
3696
4480
|
}
|
|
@@ -3698,7 +4482,7 @@ var Q = {
|
|
|
3698
4482
|
this.render();
|
|
3699
4483
|
return;
|
|
3700
4484
|
}
|
|
3701
|
-
|
|
4485
|
+
H(e).remove(), n.dragNode.parent = n.dropNode, n.dragNode.parent && (n.dragNode.parent.children = n.dragNode.parent.children?.filter((e) => e.id !== n.dragNode?.id) || void 0), this.getConfig().onNodeParentChange?.(n.dragNode), n.dropNode = null, n.dragNode = null, this.render();
|
|
3702
4486
|
}
|
|
3703
4487
|
}
|
|
3704
4488
|
zoomed(e) {
|
|
@@ -3714,7 +4498,7 @@ var Q = {
|
|
|
3714
4498
|
} }) {
|
|
3715
4499
|
let { svg: o, zoomBehavior: s, lastTransform: c, containerRect: l } = this.getChartState();
|
|
3716
4500
|
if (!o || !s || !l) return;
|
|
3717
|
-
let { width: u, height: d } = l, { duration: f, scaleExtent: p, minFitScale: m } = this.getConfig(), { k: h, x: g, y: _ } =
|
|
4501
|
+
let { width: u, height: d } = l, { duration: f, scaleExtent: p, minFitScale: m } = this.getConfig(), { k: h, x: g, y: _ } = ss({
|
|
3718
4502
|
bounds: {
|
|
3719
4503
|
x0: e,
|
|
3720
4504
|
x1: t,
|
|
@@ -3729,19 +4513,19 @@ var Q = {
|
|
|
3729
4513
|
minScale: m,
|
|
3730
4514
|
scale: a.scale ? void 0 : c.k,
|
|
3731
4515
|
focus: i
|
|
3732
|
-
}), v =
|
|
4516
|
+
}), v = $.zoomIdentity.translate(g, _).scale(h);
|
|
3733
4517
|
o.transition().duration(a.animate ? f : 0).call(s.transform, v);
|
|
3734
4518
|
}
|
|
3735
4519
|
applyTransform(e, t = !1) {
|
|
3736
4520
|
let { zoomBehavior: n, lastTransform: r, svg: i } = this.getChartState(), { duration: a } = this.getConfig();
|
|
3737
4521
|
if (e.k === r.k && e.x === r.x && e.y === r.y) return;
|
|
3738
|
-
let o =
|
|
4522
|
+
let o = $.zoomIdentity.translate(e.x, e.y).scale(e.k);
|
|
3739
4523
|
i && n && i.transition().duration(t ? 0 : a).call(n.transform, o);
|
|
3740
4524
|
}
|
|
3741
4525
|
fit({ animate: e = !0, nodes: t, scale: n = !0, onCompleted: r } = {}) {
|
|
3742
4526
|
let i = this.getChartState(), a = this.getConfig(), { root: o } = i;
|
|
3743
4527
|
if (!o) return this;
|
|
3744
|
-
let s = a.layoutBindings[a.layout], c = t || (a.gridEnabled ? o.descendants().slice(1) : o.descendants()), l =
|
|
4528
|
+
let s = a.layoutBindings[a.layout], c = t || (a.gridEnabled ? o.descendants().slice(1) : o.descendants()), l = $.min(c, (e) => e.x + s.nodeLeftX(e)), u = $.max(c, (e) => e.x + s.nodeRightX(e)), d = $.min(c, (e) => e.y + s.nodeTopY(e)), f = $.max(c, (e) => e.y + s.nodeBottomY(e));
|
|
3745
4529
|
if (l === void 0 || u === void 0 || d === void 0 || f === void 0) return this;
|
|
3746
4530
|
let p = t ? void 0 : o.id === "__root__" ? o.children?.[0] : o;
|
|
3747
4531
|
return this.zoomTreeBounds({
|
|
@@ -3776,14 +4560,14 @@ var Q = {
|
|
|
3776
4560
|
let e = this.getChartState();
|
|
3777
4561
|
e.svg && (e.svg.selectAll("*").remove(), e.svg = null, e.chart = null);
|
|
3778
4562
|
}
|
|
3779
|
-
},
|
|
4563
|
+
}, qs = A(), Js = (e, t, n) => {
|
|
3780
4564
|
let r = String(n);
|
|
3781
4565
|
return Array.from(e.querySelectorAll(".node[data-brush][data-value]")).find((e) => e.getAttribute("data-brush") === t && e.getAttribute("data-value") === r);
|
|
3782
|
-
},
|
|
3783
|
-
let r =
|
|
3784
|
-
t.data.brush && r.daedalus.emitEvent(
|
|
4566
|
+
}, Ys = (e, t, n) => {
|
|
4567
|
+
let r = g(), i = (0, P.useCallback)((t) => {
|
|
4568
|
+
t.data.brush && r.daedalus.emitEvent(O.Brush, {
|
|
3785
4569
|
data: {
|
|
3786
|
-
action:
|
|
4570
|
+
action: qs.BrushEventAction.Hover,
|
|
3787
4571
|
data: [{
|
|
3788
4572
|
id: t.data.brush.key,
|
|
3789
4573
|
values: [t.data.brush.value]
|
|
@@ -3791,10 +4575,10 @@ var Q = {
|
|
|
3791
4575
|
},
|
|
3792
4576
|
emitter: e
|
|
3793
4577
|
});
|
|
3794
|
-
}, [r, e]), a = (0,
|
|
3795
|
-
t.data.brush && r.daedalus.emitEvent(
|
|
4578
|
+
}, [r, e]), a = (0, P.useCallback)((t) => {
|
|
4579
|
+
t.data.brush && r.daedalus.emitEvent(O.Brush, {
|
|
3796
4580
|
data: {
|
|
3797
|
-
action:
|
|
4581
|
+
action: qs.BrushEventAction.Blur,
|
|
3798
4582
|
data: [{
|
|
3799
4583
|
id: t.data.brush.key,
|
|
3800
4584
|
values: [t.data.brush.value]
|
|
@@ -3802,50 +4586,50 @@ var Q = {
|
|
|
3802
4586
|
},
|
|
3803
4587
|
emitter: e
|
|
3804
4588
|
});
|
|
3805
|
-
}, [r, e]), o = (0,
|
|
4589
|
+
}, [r, e]), o = (0, P.useRef)(void 0);
|
|
3806
4590
|
return o.current = (r) => {
|
|
3807
4591
|
if (r.emitter !== e && !(!t || !n.interactive)) switch (r.data.action) {
|
|
3808
|
-
case
|
|
4592
|
+
case qs.BrushEventAction.Hover:
|
|
3809
4593
|
r.data.data.forEach(({ id: e, values: n }) => {
|
|
3810
4594
|
n.forEach((n) => {
|
|
3811
|
-
|
|
4595
|
+
Js(t, e, n)?.classList.add("hovered");
|
|
3812
4596
|
});
|
|
3813
4597
|
});
|
|
3814
4598
|
break;
|
|
3815
|
-
case
|
|
4599
|
+
case qs.BrushEventAction.Blur:
|
|
3816
4600
|
r.data.data.forEach(({ id: e, values: n }) => {
|
|
3817
4601
|
n.forEach((n) => {
|
|
3818
|
-
|
|
4602
|
+
Js(t, e, n)?.classList.remove("hovered");
|
|
3819
4603
|
});
|
|
3820
4604
|
});
|
|
3821
4605
|
break;
|
|
3822
|
-
case
|
|
4606
|
+
case qs.BrushEventAction.End:
|
|
3823
4607
|
t.querySelectorAll(".node.hovered").forEach((e) => e.classList.remove("hovered"));
|
|
3824
4608
|
break;
|
|
3825
4609
|
}
|
|
3826
|
-
},
|
|
3827
|
-
action:
|
|
4610
|
+
}, S({
|
|
4611
|
+
action: O.Brush,
|
|
3828
4612
|
handler: ({ payload: e }) => e && o.current?.(e)
|
|
3829
4613
|
}, []), {
|
|
3830
4614
|
onTreeNodeHover: i,
|
|
3831
4615
|
onTreeNodeLeave: a
|
|
3832
4616
|
};
|
|
3833
|
-
},
|
|
3834
|
-
let { variables: t, variablesFetched: n, updateVariable: r } =
|
|
4617
|
+
}, Xs = (e) => {
|
|
4618
|
+
let { variables: t, variablesFetched: n, updateVariable: r } = T();
|
|
3835
4619
|
return {
|
|
3836
|
-
variables: (0,
|
|
4620
|
+
variables: (0, P.useMemo)(() => {
|
|
3837
4621
|
let n = {};
|
|
3838
4622
|
return e.measures?.forEach((e) => {
|
|
3839
|
-
!e.slots || !
|
|
3840
|
-
let
|
|
3841
|
-
if (!
|
|
3842
|
-
let
|
|
3843
|
-
n[
|
|
3844
|
-
id:
|
|
4623
|
+
!e.slots || !s(e) || Object.values(e.slots).filter((e) => e.enabled && e.source === "variable" && e.propertyValue?.type === "variable").forEach((r) => {
|
|
4624
|
+
let i = r.propertyValue.variableName;
|
|
4625
|
+
if (!i) return;
|
|
4626
|
+
let a = t.find((e) => e.name === i);
|
|
4627
|
+
n[i] || (n[i] = {
|
|
4628
|
+
id: a?.id ?? null,
|
|
3845
4629
|
measureId: []
|
|
3846
4630
|
});
|
|
3847
|
-
let s =
|
|
3848
|
-
n[
|
|
4631
|
+
let s = o(e.dataItem);
|
|
4632
|
+
n[i].measureId.includes(s) || n[i].measureId.push(s);
|
|
3849
4633
|
});
|
|
3850
4634
|
}), n;
|
|
3851
4635
|
}, [
|
|
@@ -3856,133 +4640,133 @@ var Q = {
|
|
|
3856
4640
|
updateVariable: r,
|
|
3857
4641
|
variablesFetched: n
|
|
3858
4642
|
};
|
|
3859
|
-
},
|
|
3860
|
-
let n = e.dimensions.filter(
|
|
4643
|
+
}, Zs = (e, t) => {
|
|
4644
|
+
let n = e.dimensions.filter(s), r = n.map((e) => o(e.dataItem)), i = n.length, a = (0, P.useMemo)(() => v(n.map((e) => ({
|
|
3861
4645
|
dataItem: e.dataItem,
|
|
3862
4646
|
dateLevel: void 0,
|
|
3863
4647
|
datePart: void 0,
|
|
3864
|
-
operator:
|
|
3865
|
-
})), { ignoreApplied: !0 }), [r]),
|
|
3866
|
-
if (!
|
|
3867
|
-
let { key: t, value: n } = e.data.brush, r =
|
|
4648
|
+
operator: As.FilterOperator.InList
|
|
4649
|
+
})), { ignoreApplied: !0 }), [r]), c = (0, P.useCallback)((e) => {
|
|
4650
|
+
if (!i || !a?.length || !e.data.brush) return;
|
|
4651
|
+
let { key: t, value: n } = e.data.brush, r = a.find((e) => e.fieldKey === t && fe(e.operators));
|
|
3868
4652
|
if (!r) return;
|
|
3869
|
-
let
|
|
3870
|
-
r.state.pending && r.state.pending.includes(n) && (
|
|
3871
|
-
}, [
|
|
3872
|
-
return (0,
|
|
3873
|
-
t && (t.querySelectorAll(".node.selected").forEach((e) => e.classList.remove("selected")),
|
|
4653
|
+
let o = (r.operators.pending ?? r.operators.applied ?? r.operators.initial) === As.FilterOperator.NotInList ? "off" : "on";
|
|
4654
|
+
r.state.pending && r.state.pending.includes(n) && (o = o === "off" ? "on" : "off"), r.onClick(n, { [o]: !0 });
|
|
4655
|
+
}, [a, r]);
|
|
4656
|
+
return (0, P.useEffect)(() => {
|
|
4657
|
+
t && (t.querySelectorAll(".node.selected").forEach((e) => e.classList.remove("selected")), a.forEach(({ fieldKey: e, state: n }) => {
|
|
3874
4658
|
n.pending !== null && n.pending.forEach((n) => {
|
|
3875
|
-
e &&
|
|
4659
|
+
e && Js(t, e, n)?.classList.add("selected");
|
|
3876
4660
|
});
|
|
3877
4661
|
}));
|
|
3878
|
-
}, [t, JSON.stringify(
|
|
3879
|
-
},
|
|
4662
|
+
}, [t, JSON.stringify(a)]), { onTreeNodeClick: c };
|
|
4663
|
+
}, Qs = (e, t) => {
|
|
3880
4664
|
e.next({
|
|
3881
|
-
action:
|
|
4665
|
+
action: re.SaveLocalVSpec,
|
|
3882
4666
|
payload: { vSpecChange: { treeChartSettings: { ...t } } },
|
|
3883
4667
|
mergeWith(e, t, n) {
|
|
3884
4668
|
if (n === "nodeExpandState") return t;
|
|
3885
4669
|
}
|
|
3886
4670
|
});
|
|
3887
|
-
},
|
|
3888
|
-
let
|
|
4671
|
+
}, $s = 80, ec = (e, t, n, r) => {
|
|
4672
|
+
let i = (0, P.useRef)(e.treeChartSettings?.nodeExpandState ?? {}), a = r.forceAutoFit, c = b(), l = Xs(c), u = h(), d = te(), f = g(), p = e.dimensions.filter(s), m = p.length, [_] = (0, P.useState)(e.treeChartSettings?.transform ?? null), [v, y] = (0, P.useState)(_ ?? {
|
|
3889
4673
|
k: 1,
|
|
3890
4674
|
x: 0,
|
|
3891
4675
|
y: 0
|
|
3892
|
-
}),
|
|
3893
|
-
|
|
4676
|
+
}), x = (0, P.useRef)(e.treeChartSettings?.transform), { onTreeNodeHover: S, onTreeNodeLeave: C } = Ys(n, t.current, r), { onTreeNodeClick: w } = Zs(e, t.current), T = (0, P.useRef)(new Ks()), E = (0, P.useRef)(null), ee = !e.treeChartSettings.gridLayout?.enabled && e.treeChartSettings?.nodeLayout?.hoverStyle?.enabled, D = (0, P.useCallback)(() => {
|
|
4677
|
+
E.current &&= (clearTimeout(E.current), null);
|
|
3894
4678
|
}, []);
|
|
3895
|
-
return
|
|
3896
|
-
r.interactive &&
|
|
4679
|
+
return T.current.onNodeHover((e) => {
|
|
4680
|
+
r.interactive && S(e), ee && (D(), T.current.highlight(e));
|
|
3897
4681
|
}).onNodeLeave((e) => {
|
|
3898
|
-
r.interactive &&
|
|
3899
|
-
|
|
3900
|
-
},
|
|
4682
|
+
r.interactive && C(e), ee && (D(), E.current = setTimeout(() => {
|
|
4683
|
+
T.current.highlight(null), E.current = null;
|
|
4684
|
+
}, $s));
|
|
3901
4685
|
}).onNodeClick((e) => {
|
|
3902
4686
|
if (!r.interactive) return;
|
|
3903
4687
|
let t = m > 0 ? e.data.id === "__total__" ? "total" : "dimension" : "measure", n = e.data.value?.value, i = t === "dimension" ? e.data.brush?.value : n;
|
|
3904
|
-
|
|
4688
|
+
Le({
|
|
3905
4689
|
id: "onNodeClick",
|
|
3906
4690
|
nodeName: e.data.label,
|
|
3907
4691
|
nodeType: t,
|
|
3908
4692
|
...i == null ? {} : { nodeValue: i },
|
|
3909
4693
|
...n == null ? {} : { measureValue: n }
|
|
3910
|
-
}, { vBackendAPI:
|
|
4694
|
+
}, { vBackendAPI: f }), w(e);
|
|
3911
4695
|
}).onNodeParentChange((t) => {
|
|
3912
4696
|
if (m > 0) return;
|
|
3913
4697
|
let n = e.measures.find((e) => e.dataItem.uniqueSignature === t.data.id);
|
|
3914
|
-
n && ne(
|
|
4698
|
+
n && ne(d, e.measures, o(n.dataItem), !t.parent || t.parent.data.id === "__root__" ? void 0 : t.parent.data.id);
|
|
3915
4699
|
}).onExpandOrCollapse((t) => {
|
|
3916
|
-
let n =
|
|
3917
|
-
r === n ? delete
|
|
3918
|
-
e.id &&
|
|
4700
|
+
let n = En(t, e.treeChartSettings?.initialExpandedLevels, p.length, e.totals?.enabled ?? !1), r = !((t._children?.length ?? 0) > 0 && !t.children?.length);
|
|
4701
|
+
r === n ? delete i.current[t.data.id] : i.current[t.data.id] = r, Qs(u, { nodeExpandState: i.current }), !(m > 0) && Object.values(l.variables).filter((e) => e.measureId.includes(t.data.id)).forEach((e) => {
|
|
4702
|
+
e.id && l.updateVariable(e.id, r, As.VariableType.boolean);
|
|
3919
4703
|
});
|
|
3920
4704
|
}).onUserZoom(() => {
|
|
3921
|
-
|
|
4705
|
+
x.current = null;
|
|
3922
4706
|
}).onZoomEnd((e) => {
|
|
3923
|
-
if (
|
|
4707
|
+
if (a) return;
|
|
3924
4708
|
let t = {
|
|
3925
4709
|
k: e.transform.k,
|
|
3926
4710
|
x: e.transform.x,
|
|
3927
4711
|
y: e.transform.y
|
|
3928
4712
|
};
|
|
3929
|
-
t.k ===
|
|
3930
|
-
nodeExpandState:
|
|
4713
|
+
t.k === v.k && t.x === v.x && t.y === v.y || (y(t), Qs(u, {
|
|
4714
|
+
nodeExpandState: i.current,
|
|
3931
4715
|
transform: t
|
|
3932
4716
|
}));
|
|
3933
|
-
}), (0,
|
|
3934
|
-
e.treeChartSettings?.nodeExpandState && (
|
|
3935
|
-
}, [e.treeChartSettings?.nodeExpandState]), (0,
|
|
3936
|
-
|
|
3937
|
-
}, [
|
|
3938
|
-
|
|
4717
|
+
}), (0, P.useEffect)(() => () => D(), [D]), (0, P.useEffect)(() => {
|
|
4718
|
+
e.treeChartSettings?.nodeExpandState && (i.current = e.treeChartSettings.nodeExpandState ?? {});
|
|
4719
|
+
}, [e.treeChartSettings?.nodeExpandState]), (0, P.useEffect)(() => {
|
|
4720
|
+
c.treeChartSettings?.nodeExpandState || (i.current = {});
|
|
4721
|
+
}, [c.treeChartSettings?.initialExpandedLevels]), (0, P.useEffect)(() => {
|
|
4722
|
+
x.current = e.treeChartSettings?.transform, T.current && T.current.unsetUserTransform(), !(!e.treeChartSettings?.transform || !T.current) && T.current.applyTransform(e.treeChartSettings.transform);
|
|
3939
4723
|
}, [e.treeChartSettings?.transform]), {
|
|
3940
|
-
chart:
|
|
3941
|
-
expandedState:
|
|
4724
|
+
chart: T.current,
|
|
4725
|
+
expandedState: i
|
|
3942
4726
|
};
|
|
3943
|
-
},
|
|
4727
|
+
}, tc = ({ vSpec: e, vTheme: t, data: r, elementSize: i = {
|
|
3944
4728
|
width: 0,
|
|
3945
4729
|
height: 0
|
|
3946
|
-
}, vizProperties:
|
|
3947
|
-
let
|
|
4730
|
+
}, vizProperties: a }) => {
|
|
4731
|
+
let o = a?.isEditMode ?? !1, c = a?.isPrintMode ?? !1, l = e?.treeChartSettings?.gridLayout?.enabled, u = e.dimensions.filter(s).length, d = e.measures.filter(s), f = (0, P.useRef)("tree-" + n(10)), p = (0, P.useRef)(null), m = e.treeChartSettings?.forceAutoFit === !0, { layout: h, treeSettings: g } = us(e, a), { chart: _, expandedState: v } = ec(e, p, f.current, g), y = cs(e, p, _), b = jn({
|
|
3948
4732
|
vSpec: e,
|
|
3949
|
-
data:
|
|
4733
|
+
data: r,
|
|
3950
4734
|
nodeExpandState: v
|
|
3951
|
-
}), [x, S] = (0,
|
|
3952
|
-
(0,
|
|
4735
|
+
}), [x, S] = (0, P.useState)(!1);
|
|
4736
|
+
(0, P.useLayoutEffect)(() => (p.current && _.container(p.current).init(), () => {
|
|
3953
4737
|
_.destroy();
|
|
3954
|
-
}), [_]), (0,
|
|
4738
|
+
}), [_]), (0, P.useEffect)(() => {
|
|
3955
4739
|
x ? _.enableDrag() : _.disableDrag();
|
|
3956
|
-
}, [x]), (0,
|
|
3957
|
-
!
|
|
4740
|
+
}, [x]), (0, P.useEffect)(() => {
|
|
4741
|
+
!p.current || !_ || !i.width || !i.height || y(b, g);
|
|
3958
4742
|
}, [
|
|
3959
|
-
|
|
3960
|
-
|
|
4743
|
+
i.width,
|
|
4744
|
+
i.height,
|
|
3961
4745
|
y
|
|
3962
4746
|
]);
|
|
3963
|
-
let C =
|
|
3964
|
-
(0,
|
|
3965
|
-
|
|
4747
|
+
let C = o && u === 0 && !l;
|
|
4748
|
+
(0, P.useEffect)(() => {
|
|
4749
|
+
p.current && y(b, g);
|
|
3966
4750
|
}, [
|
|
3967
4751
|
b,
|
|
3968
4752
|
JSON.stringify(g),
|
|
3969
4753
|
y
|
|
3970
4754
|
]);
|
|
3971
|
-
let
|
|
4755
|
+
let w = tn({
|
|
3972
4756
|
vTheme: t,
|
|
3973
4757
|
vSpec: e,
|
|
3974
|
-
id:
|
|
4758
|
+
id: f.current,
|
|
3975
4759
|
layout: h
|
|
3976
4760
|
});
|
|
3977
|
-
return /* @__PURE__ */ (0,
|
|
4761
|
+
return /* @__PURE__ */ (0, N.jsxs)("div", {
|
|
3978
4762
|
style: {
|
|
3979
4763
|
width: "100%",
|
|
3980
4764
|
height: "100%"
|
|
3981
4765
|
},
|
|
3982
|
-
id:
|
|
3983
|
-
"data-mode":
|
|
4766
|
+
id: f.current,
|
|
4767
|
+
"data-mode": o ? "edit" : "view",
|
|
3984
4768
|
children: [
|
|
3985
|
-
!
|
|
4769
|
+
!c && /* @__PURE__ */ (0, N.jsxs)("div", {
|
|
3986
4770
|
className: "tree-toolbar",
|
|
3987
4771
|
style: {
|
|
3988
4772
|
position: "absolute",
|
|
@@ -3992,36 +4776,36 @@ var Q = {
|
|
|
3992
4776
|
top: 0,
|
|
3993
4777
|
gap: 10
|
|
3994
4778
|
},
|
|
3995
|
-
children: [C && /* @__PURE__ */ (0,
|
|
4779
|
+
children: [C && /* @__PURE__ */ (0, N.jsx)(en, {
|
|
3996
4780
|
size: "small",
|
|
3997
4781
|
value: "organize",
|
|
3998
4782
|
selected: x,
|
|
3999
4783
|
onChange: () => S(!x),
|
|
4000
|
-
disabled:
|
|
4001
|
-
children: /* @__PURE__ */ (0,
|
|
4002
|
-
}), !m && /* @__PURE__ */ (0,
|
|
4784
|
+
disabled: d.length < 2,
|
|
4785
|
+
children: /* @__PURE__ */ (0, N.jsx)(tt, {})
|
|
4786
|
+
}), !m && /* @__PURE__ */ (0, N.jsx)(en, {
|
|
4003
4787
|
value: "",
|
|
4004
4788
|
size: "small",
|
|
4005
4789
|
onClick: () => _?.fit(),
|
|
4006
|
-
children: /* @__PURE__ */ (0,
|
|
4790
|
+
children: /* @__PURE__ */ (0, N.jsx)(E, {})
|
|
4007
4791
|
})]
|
|
4008
4792
|
}),
|
|
4009
|
-
/* @__PURE__ */ (0,
|
|
4010
|
-
/* @__PURE__ */ (0,
|
|
4793
|
+
/* @__PURE__ */ (0, N.jsx)("style", { children: w }),
|
|
4794
|
+
/* @__PURE__ */ (0, N.jsx)("div", {
|
|
4011
4795
|
style: {
|
|
4012
4796
|
width: "100%",
|
|
4013
4797
|
height: "100%"
|
|
4014
4798
|
},
|
|
4015
|
-
ref:
|
|
4799
|
+
ref: p
|
|
4016
4800
|
})
|
|
4017
4801
|
]
|
|
4018
4802
|
});
|
|
4019
|
-
},
|
|
4803
|
+
}, nc = C((e) => {
|
|
4020
4804
|
let { vSpec: t, data: n } = e;
|
|
4021
|
-
return !t || !n || !
|
|
4805
|
+
return !t || !n || !u(t) ? null : /* @__PURE__ */ (0, N.jsx)(tc, {
|
|
4022
4806
|
...e,
|
|
4023
4807
|
vSpec: t,
|
|
4024
4808
|
data: n
|
|
4025
4809
|
});
|
|
4026
4810
|
});
|
|
4027
|
-
export {
|
|
4811
|
+
export { nc as Tree };
|