@carto/ps-react-ui 4.6.3 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{download-config-C3I0jWIL.js → download-config-DNLkypdN.js} +8 -7
- package/dist/{download-config-C3I0jWIL.js.map → download-config-DNLkypdN.js.map} +1 -1
- package/dist/shared-resize-observer-98b1SK1e.js +17 -0
- package/dist/shared-resize-observer-98b1SK1e.js.map +1 -0
- package/dist/types/widgets/actions/brush-toggle/brush-overlay.d.ts +24 -0
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +15 -10
- package/dist/types/widgets/actions/brush-toggle/hit-test.d.ts +19 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.test.d.ts +1 -0
- package/dist/types/widgets/actions/brush-toggle/style.d.ts +8 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +35 -1
- package/dist/widgets/actions.js +1020 -787
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +1 -1
- package/dist/widgets/category.js +9 -8
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +79 -91
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/formula.js +43 -42
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +37 -36
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +15 -14
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/pie.js +1 -1
- package/dist/widgets/scatterplot.js +1 -1
- package/dist/widgets/spread.js +47 -46
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/table.js +17 -16
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +1 -1
- package/dist/widgets/utils.js +1 -1
- package/package.json +3 -1
- package/src/widgets/actions/brush-toggle/brush-overlay.tsx +408 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +88 -152
- package/src/widgets/actions/brush-toggle/hit-test.test.ts +65 -0
- package/src/widgets/actions/brush-toggle/hit-test.ts +45 -0
- package/src/widgets/actions/brush-toggle/style.ts +32 -0
- package/src/widgets/actions/brush-toggle/types.ts +36 -1
- package/src/widgets/histogram/config.ts +1 -3
package/dist/widgets/actions.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { IconButton as
|
|
4
|
-
import { w as
|
|
5
|
-
import { u as
|
|
6
|
-
import { FullscreenOutlined as
|
|
7
|
-
import { useState as
|
|
8
|
-
import { a as
|
|
1
|
+
import { jsx as x, jsxs as oe, Fragment as ue } from "react/jsx-runtime";
|
|
2
|
+
import { c as Q } from "react/compiler-runtime";
|
|
3
|
+
import { IconButton as ee, DialogContent as Ae, Dialog as Be, Typography as We, DialogTitle as Fe, CircularProgress as $e, MenuItem as we, ListItemIcon as Ne, ListItemText as Pe, Menu as Re, useTheme as Ge, Box as De, TextField as Ze, InputAdornment as xe, SvgIcon as Ve } from "@mui/material";
|
|
4
|
+
import { w as p, u as He } from "../widget-store-Bw5zRUGg.js";
|
|
5
|
+
import { u as ne } from "../use-widget-selector-DFl2hW0R.js";
|
|
6
|
+
import { FullscreenOutlined as je, Close as Ue, FileDownloadOutlined as Xe, PercentOutlined as Ye, SubdirectoryArrowLeftOutlined as Ke, ZoomInOutlined as qe, CheckBoxOutlined as Je, SearchOutlined as ze, ClearOutlined as Qe, HighlightAltOutlined as et } from "@mui/icons-material";
|
|
7
|
+
import { useState as ie, useRef as le, useEffect as H, useSyncExternalStore as ve } from "react";
|
|
8
|
+
import { a as Pn, d as Rn } from "../exports-Cr43OCul.js";
|
|
9
9
|
import "../lasso-tool-BYbxrJ-7.js";
|
|
10
10
|
import "../cjs-D4KH3azB.js";
|
|
11
|
-
import { T as
|
|
12
|
-
import { b as
|
|
13
|
-
import { useSensors as
|
|
14
|
-
import { useSortable as
|
|
15
|
-
import { CSS as
|
|
16
|
-
|
|
11
|
+
import { T as re } from "../tooltip-BDnrRKrp.js";
|
|
12
|
+
import { b as tt, a as nt, D as ot } from "../utils-BOhInag6.js";
|
|
13
|
+
import { useSensors as lt, useSensor as ye, PointerSensor as rt, KeyboardSensor as it, DndContext as st, closestCenter as ct } from "@dnd-kit/core";
|
|
14
|
+
import { useSortable as at, sortableKeyboardCoordinates as dt, arrayMove as ut, SortableContext as ft, verticalListSortingStrategy as gt } from "@dnd-kit/sortable";
|
|
15
|
+
import { CSS as mt } from "@dnd-kit/utilities";
|
|
16
|
+
import { createPortal as ht } from "react-dom";
|
|
17
|
+
import { o as pt } from "../shared-resize-observer-98b1SK1e.js";
|
|
18
|
+
const Ie = {
|
|
17
19
|
title: {
|
|
18
20
|
container: {
|
|
19
21
|
display: "flex",
|
|
@@ -29,302 +31,302 @@ const ve = {
|
|
|
29
31
|
spacing: n
|
|
30
32
|
}) => n(1)
|
|
31
33
|
}
|
|
32
|
-
},
|
|
33
|
-
function
|
|
34
|
-
const e =
|
|
34
|
+
}, bt = {};
|
|
35
|
+
function bn(n) {
|
|
36
|
+
const e = Q(42), {
|
|
35
37
|
id: t,
|
|
36
|
-
labels:
|
|
37
|
-
children:
|
|
38
|
-
Icon:
|
|
39
|
-
IconButtonProps:
|
|
40
|
-
DialogContentProps:
|
|
41
|
-
DialogProps:
|
|
42
|
-
} = n, o =
|
|
43
|
-
let
|
|
38
|
+
labels: r,
|
|
39
|
+
children: u,
|
|
40
|
+
Icon: c,
|
|
41
|
+
IconButtonProps: b,
|
|
42
|
+
DialogContentProps: C,
|
|
43
|
+
DialogProps: S
|
|
44
|
+
} = n, o = C === void 0 ? bt : C;
|
|
45
|
+
let i, l;
|
|
44
46
|
e[0] !== o ? ({
|
|
45
|
-
sx:
|
|
46
|
-
...
|
|
47
|
-
} = o, e[0] = o, e[1] =
|
|
47
|
+
sx: l,
|
|
48
|
+
...i
|
|
49
|
+
} = o, e[0] = o, e[1] = i, e[2] = l) : (i = e[1], l = e[2]);
|
|
48
50
|
const {
|
|
49
|
-
isFullScreen:
|
|
50
|
-
title:
|
|
51
|
-
} =
|
|
52
|
-
let
|
|
53
|
-
e[3] !== t ? (
|
|
54
|
-
|
|
55
|
-
isFullScreen:
|
|
51
|
+
isFullScreen: a,
|
|
52
|
+
title: d
|
|
53
|
+
} = ne(t, St);
|
|
54
|
+
let g;
|
|
55
|
+
e[3] !== t ? (g = (M) => {
|
|
56
|
+
p.setWidget(t, {
|
|
57
|
+
isFullScreen: M.isFullScreen
|
|
56
58
|
});
|
|
57
|
-
}, e[3] = t, e[4] =
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
e[5] !==
|
|
59
|
+
}, e[3] = t, e[4] = g) : g = e[4];
|
|
60
|
+
const f = g;
|
|
61
|
+
let h;
|
|
62
|
+
e[5] !== f ? (h = () => f({
|
|
61
63
|
isFullScreen: !0
|
|
62
|
-
}), e[5] =
|
|
63
|
-
let
|
|
64
|
-
e[7] !==
|
|
65
|
-
let
|
|
66
|
-
e[9] !==
|
|
67
|
-
const
|
|
68
|
-
let
|
|
69
|
-
e[13] !==
|
|
64
|
+
}), e[5] = f, e[6] = h) : h = e[6];
|
|
65
|
+
let m;
|
|
66
|
+
e[7] !== c ? (m = c ?? /* @__PURE__ */ x(je, {}), e[7] = c, e[8] = m) : m = e[8];
|
|
67
|
+
let I;
|
|
68
|
+
e[9] !== b || e[10] !== h || e[11] !== m ? (I = /* @__PURE__ */ x(ee, { ...b, onClick: h, children: m }), e[9] = b, e[10] = h, e[11] = m, e[12] = I) : I = e[12];
|
|
69
|
+
const s = !!a, w = r?.ariaLabel ?? `fullscreen-dialog-title-${t}`;
|
|
70
|
+
let L;
|
|
71
|
+
e[13] !== f ? (L = () => f({
|
|
70
72
|
isFullScreen: !1
|
|
71
|
-
}), e[13] =
|
|
72
|
-
const
|
|
73
|
-
let w;
|
|
74
|
-
e[15] !== a ? (w = /* @__PURE__ */ b(Pe, { variant: "subtitle1", component: "span", children: a }), e[15] = a, e[16] = w) : w = e[16];
|
|
73
|
+
}), e[13] = f, e[14] = L) : L = e[14];
|
|
74
|
+
const P = `fullscreen-dialog-title-${t}`;
|
|
75
75
|
let D;
|
|
76
|
-
e[
|
|
76
|
+
e[15] !== d ? (D = /* @__PURE__ */ x(We, { variant: "subtitle1", component: "span", children: d }), e[15] = d, e[16] = D) : D = e[16];
|
|
77
|
+
let O;
|
|
78
|
+
e[17] !== f ? (O = () => f({
|
|
77
79
|
isFullScreen: !1
|
|
78
|
-
}), e[17] =
|
|
79
|
-
let x;
|
|
80
|
-
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ b(Ve, {}), e[19] = x) : x = e[19];
|
|
80
|
+
}), e[17] = f, e[18] = O) : O = e[18];
|
|
81
81
|
let E;
|
|
82
|
-
e[
|
|
82
|
+
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ x(Ue, {}), e[19] = E) : E = e[19];
|
|
83
|
+
let R;
|
|
84
|
+
e[20] !== O ? (R = /* @__PURE__ */ x(ee, { onClick: O, children: E }), e[20] = O, e[21] = R) : R = e[21];
|
|
85
|
+
let k;
|
|
86
|
+
e[22] !== P || e[23] !== D || e[24] !== R ? (k = /* @__PURE__ */ oe(Fe, { id: P, sx: Ie.title.container, children: [
|
|
87
|
+
D,
|
|
88
|
+
R
|
|
89
|
+
] }), e[22] = P, e[23] = D, e[24] = R, e[25] = k) : k = e[25];
|
|
90
|
+
let v;
|
|
91
|
+
e[26] !== l ? (v = {
|
|
92
|
+
...Ie.content,
|
|
93
|
+
...l
|
|
94
|
+
}, e[26] = l, e[27] = v) : v = e[27];
|
|
95
|
+
let T;
|
|
96
|
+
e[28] !== i || e[29] !== u || e[30] !== v ? (T = /* @__PURE__ */ x(Ae, { sx: v, ...i, children: u }), e[28] = i, e[29] = u, e[30] = v, e[31] = T) : T = e[31];
|
|
97
|
+
let _;
|
|
98
|
+
e[32] !== S || e[33] !== k || e[34] !== T || e[35] !== s || e[36] !== w || e[37] !== L ? (_ = /* @__PURE__ */ oe(Be, { maxWidth: !1, open: s, keepMounted: !0, "aria-labelledby": w, ...S, onClose: L, children: [
|
|
99
|
+
k,
|
|
100
|
+
T
|
|
101
|
+
] }), e[32] = S, e[33] = k, e[34] = T, e[35] = s, e[36] = w, e[37] = L, e[38] = _) : _ = e[38];
|
|
83
102
|
let z;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
] }), e[
|
|
88
|
-
let y;
|
|
89
|
-
e[26] !== r ? (y = {
|
|
90
|
-
...ve.content,
|
|
91
|
-
...r
|
|
92
|
-
}, e[26] = r, e[27] = y) : y = e[27];
|
|
93
|
-
let h;
|
|
94
|
-
e[28] !== l || e[29] !== p || e[30] !== y ? (h = /* @__PURE__ */ b(Ae, { sx: y, ...l, children: p }), e[28] = l, e[29] = p, e[30] = y, e[31] = h) : h = e[31];
|
|
95
|
-
let I;
|
|
96
|
-
e[32] !== T || e[33] !== z || e[34] !== h || e[35] !== O || e[36] !== C || e[37] !== k ? (I = /* @__PURE__ */ ne(We, { maxWidth: !1, open: O, keepMounted: !0, "aria-labelledby": C, ...T, onClose: k, children: [
|
|
97
|
-
z,
|
|
98
|
-
h
|
|
99
|
-
] }), e[32] = T, e[33] = z, e[34] = h, e[35] = O, e[36] = C, e[37] = k, e[38] = I) : I = e[38];
|
|
100
|
-
let L;
|
|
101
|
-
return e[39] !== I || e[40] !== v ? (L = /* @__PURE__ */ ne(he, { children: [
|
|
102
|
-
v,
|
|
103
|
-
I
|
|
104
|
-
] }), e[39] = I, e[40] = v, e[41] = L) : L = e[41], L;
|
|
103
|
+
return e[39] !== _ || e[40] !== I ? (z = /* @__PURE__ */ oe(ue, { children: [
|
|
104
|
+
I,
|
|
105
|
+
_
|
|
106
|
+
] }), e[39] = _, e[40] = I, e[41] = z) : z = e[41], z;
|
|
105
107
|
}
|
|
106
|
-
function
|
|
108
|
+
function St(n) {
|
|
107
109
|
return {
|
|
108
110
|
isFullScreen: n?.isFullScreen,
|
|
109
111
|
title: n?.title
|
|
110
112
|
};
|
|
111
113
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
114
|
-
const e =
|
|
114
|
+
const xt = {};
|
|
115
|
+
function Sn(n) {
|
|
116
|
+
const e = Q(31), {
|
|
115
117
|
id: t,
|
|
116
|
-
items:
|
|
117
|
-
labels:
|
|
118
|
-
Icon:
|
|
119
|
-
IconButtonProps:
|
|
120
|
-
} = n,
|
|
121
|
-
data:
|
|
122
|
-
} =
|
|
123
|
-
let a;
|
|
124
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = (W) => {
|
|
125
|
-
W.stopPropagation(), s(W.currentTarget);
|
|
126
|
-
}, e[0] = a) : a = e[0];
|
|
127
|
-
const u = a;
|
|
128
|
-
let i;
|
|
129
|
-
e[1] !== t ? (i = (W, P) => {
|
|
130
|
-
const B = document.createElement("a");
|
|
131
|
-
B.href = W, B.download = P.filename ?? t, B.style.display = "none", document.body.appendChild(B), B.click(), document.body.removeChild(B), P.callback?.(B.href);
|
|
132
|
-
}, e[1] = t, e[2] = i) : i = e[2];
|
|
133
|
-
const c = i;
|
|
118
|
+
items: r,
|
|
119
|
+
labels: u,
|
|
120
|
+
Icon: c,
|
|
121
|
+
IconButtonProps: b
|
|
122
|
+
} = n, C = u === void 0 ? xt : u, {
|
|
123
|
+
data: S
|
|
124
|
+
} = ne(t, vt), [o, i] = ie(!1), [l, a] = ie(null);
|
|
134
125
|
let d;
|
|
135
|
-
e[
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = (M) => {
|
|
127
|
+
M.stopPropagation(), a(M.currentTarget);
|
|
128
|
+
}, e[0] = d) : d = e[0];
|
|
129
|
+
const g = d;
|
|
130
|
+
let f;
|
|
131
|
+
e[1] !== t ? (f = (M, A) => {
|
|
132
|
+
const W = document.createElement("a");
|
|
133
|
+
W.href = M, W.download = A.filename ?? t, W.style.display = "none", document.body.appendChild(W), W.click(), document.body.removeChild(W), A.callback?.(W.href);
|
|
134
|
+
}, e[1] = t, e[2] = f) : f = e[2];
|
|
135
|
+
const h = f;
|
|
136
|
+
let m;
|
|
137
|
+
e[3] !== S || e[4] !== h ? (m = async (M, A) => {
|
|
138
|
+
M.stopPropagation(), i(!0), a(null);
|
|
139
|
+
const W = await A.modifier(S);
|
|
140
|
+
if (!W) {
|
|
141
|
+
i(!1);
|
|
140
142
|
return;
|
|
141
143
|
}
|
|
142
|
-
|
|
143
|
-
}, e[3] =
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
e[6] !==
|
|
147
|
-
let
|
|
148
|
-
e[9] !==
|
|
149
|
-
let
|
|
150
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
144
|
+
h(W, A), i(!1);
|
|
145
|
+
}, e[3] = S, e[4] = h, e[5] = m) : m = e[5];
|
|
146
|
+
const I = m, s = C.ariaLabel ?? "download options", w = o || r.length === 0, L = o || l ? "active" : "";
|
|
147
|
+
let P;
|
|
148
|
+
e[6] !== c || e[7] !== o ? (P = o ? /* @__PURE__ */ x($e, { size: 18, color: "inherit" }) : c ?? /* @__PURE__ */ x(Xe, {}), e[6] = c, e[7] = o, e[8] = P) : P = e[8];
|
|
149
|
+
let D;
|
|
150
|
+
e[9] !== b || e[10] !== s || e[11] !== w || e[12] !== L || e[13] !== P ? (D = /* @__PURE__ */ x(ee, { size: "small", "aria-label": s, "aria-controls": "options-menu", "aria-haspopup": "true", onClick: g, ...b, disabled: w, className: L, children: P }), e[9] = b, e[10] = s, e[11] = w, e[12] = L, e[13] = P, e[14] = D) : D = e[14];
|
|
151
|
+
let O, E;
|
|
152
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = {
|
|
151
153
|
vertical: "bottom",
|
|
152
154
|
horizontal: "right"
|
|
153
|
-
},
|
|
155
|
+
}, E = {
|
|
154
156
|
vertical: "top",
|
|
155
157
|
horizontal: "right"
|
|
156
|
-
}, e[15] =
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
158
|
+
}, e[15] = O, e[16] = E) : (O = e[15], E = e[16]);
|
|
159
|
+
const R = !!l;
|
|
160
|
+
let k, v;
|
|
161
|
+
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = () => a(null), v = {
|
|
160
162
|
sx: {
|
|
161
163
|
paddingBottom: 0
|
|
162
164
|
}
|
|
163
|
-
}, e[17] =
|
|
164
|
-
let
|
|
165
|
-
if (e[19] !==
|
|
166
|
-
let
|
|
167
|
-
e[22] !==
|
|
168
|
-
|
|
165
|
+
}, e[17] = k, e[18] = v) : (k = e[17], v = e[18]);
|
|
166
|
+
let T;
|
|
167
|
+
if (e[19] !== I || e[20] !== r) {
|
|
168
|
+
let M;
|
|
169
|
+
e[22] !== I ? (M = (A) => /* @__PURE__ */ oe(we, { disabled: A.disabled, onClick: (W) => {
|
|
170
|
+
I(W, A);
|
|
169
171
|
}, children: [
|
|
170
|
-
|
|
172
|
+
A.icon && /* @__PURE__ */ x(Ne, { sx: {
|
|
171
173
|
color: "text.primary"
|
|
172
|
-
}, children:
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
] },
|
|
174
|
+
}, children: A.icon }),
|
|
175
|
+
/* @__PURE__ */ x(Pe, { children: A.label })
|
|
176
|
+
] }, A.id), e[22] = I, e[23] = M) : M = e[23], T = r.map(M), e[19] = I, e[20] = r, e[21] = T;
|
|
175
177
|
} else
|
|
176
|
-
|
|
177
|
-
let
|
|
178
|
-
e[24] !==
|
|
179
|
-
let
|
|
180
|
-
return e[28] !==
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
] }), e[28] =
|
|
178
|
+
T = e[21];
|
|
179
|
+
let _;
|
|
180
|
+
e[24] !== l || e[25] !== R || e[26] !== T ? (_ = /* @__PURE__ */ x(Re, { variant: "menu", elevation: 8, anchorOrigin: O, transformOrigin: E, anchorEl: l, open: R, onClose: k, MenuListProps: v, children: T }), e[24] = l, e[25] = R, e[26] = T, e[27] = _) : _ = e[27];
|
|
181
|
+
let z;
|
|
182
|
+
return e[28] !== _ || e[29] !== D ? (z = /* @__PURE__ */ oe(ue, { children: [
|
|
183
|
+
D,
|
|
184
|
+
_
|
|
185
|
+
] }), e[28] = _, e[29] = D, e[30] = z) : z = e[30], z;
|
|
184
186
|
}
|
|
185
|
-
function
|
|
187
|
+
function vt(n) {
|
|
186
188
|
return {
|
|
187
189
|
data: n?.data
|
|
188
190
|
};
|
|
189
191
|
}
|
|
190
|
-
const
|
|
192
|
+
const se = {
|
|
191
193
|
trigger: {
|
|
192
194
|
'&[data-active="true"]': {
|
|
193
195
|
background: (n) => n.palette.primary.relatedLight
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
};
|
|
197
|
-
function
|
|
198
|
-
return n.reduce((e, t) => t.reduce((
|
|
199
|
-
if (Array.isArray(
|
|
200
|
-
const
|
|
201
|
-
return typeof
|
|
199
|
+
function yt(n) {
|
|
200
|
+
return n.reduce((e, t) => t.reduce((r, u) => {
|
|
201
|
+
if (Array.isArray(u)) {
|
|
202
|
+
const c = u.at(-1);
|
|
203
|
+
return typeof c == "number" ? r + c : r;
|
|
202
204
|
}
|
|
203
|
-
return Object.entries(
|
|
205
|
+
return Object.entries(u).reduce((c, [b, C]) => b === "name" ? c : typeof C == "number" ? c + C : c, r);
|
|
204
206
|
}, e), 0);
|
|
205
207
|
}
|
|
206
|
-
function
|
|
207
|
-
return e === 0 ? n : n.map((t) => t.map((
|
|
208
|
-
if (Array.isArray(
|
|
209
|
-
return
|
|
210
|
-
const
|
|
211
|
-
for (const [
|
|
212
|
-
if (
|
|
213
|
-
|
|
208
|
+
function It(n, e) {
|
|
209
|
+
return e === 0 ? n : n.map((t) => t.map((r) => {
|
|
210
|
+
if (Array.isArray(r))
|
|
211
|
+
return r.map((c, b) => b === r.length - 1 && typeof c == "number" ? c / e * 100 : c);
|
|
212
|
+
const u = {};
|
|
213
|
+
for (const [c, b] of Object.entries(r)) {
|
|
214
|
+
if (c === "name") {
|
|
215
|
+
u[c] = b;
|
|
214
216
|
continue;
|
|
215
217
|
}
|
|
216
|
-
|
|
218
|
+
u[c] = typeof b == "number" ? b / e * 100 : b;
|
|
217
219
|
}
|
|
218
|
-
return
|
|
220
|
+
return u;
|
|
219
221
|
}));
|
|
220
222
|
}
|
|
221
|
-
const
|
|
222
|
-
function
|
|
223
|
-
const e =
|
|
223
|
+
const me = "relative-data", Te = "relative-data-config";
|
|
224
|
+
function xn(n) {
|
|
225
|
+
const e = Q(36), {
|
|
224
226
|
id: t,
|
|
225
|
-
order:
|
|
226
|
-
defaultIsRelative:
|
|
227
|
-
labels:
|
|
228
|
-
Icon:
|
|
229
|
-
IconButtonProps:
|
|
230
|
-
} = n,
|
|
231
|
-
let
|
|
232
|
-
e[0] !== o ? (
|
|
233
|
-
isRelative:
|
|
234
|
-
}), e[0] = o, e[1] =
|
|
227
|
+
order: r,
|
|
228
|
+
defaultIsRelative: u,
|
|
229
|
+
labels: c,
|
|
230
|
+
Icon: b,
|
|
231
|
+
IconButtonProps: C
|
|
232
|
+
} = n, S = r === void 0 ? 10 : r, o = u === void 0 ? !1 : u, i = le(void 0);
|
|
233
|
+
let l;
|
|
234
|
+
e[0] !== o ? (l = (v) => ({
|
|
235
|
+
isRelative: v?.isRelative ?? o
|
|
236
|
+
}), e[0] = o, e[1] = l) : l = e[1];
|
|
235
237
|
const {
|
|
236
|
-
isRelative:
|
|
237
|
-
} =
|
|
238
|
-
let
|
|
239
|
-
e[2] !== o || e[3] !== t ? (
|
|
240
|
-
const
|
|
241
|
-
|
|
238
|
+
isRelative: a
|
|
239
|
+
} = ne(t, l);
|
|
240
|
+
let d, g;
|
|
241
|
+
e[2] !== o || e[3] !== t ? (d = () => {
|
|
242
|
+
const v = p.getWidget(t);
|
|
243
|
+
v?.isRelative === void 0 && (o ? p.setWidget(t, {
|
|
242
244
|
isRelative: !0,
|
|
243
|
-
originalFormatter:
|
|
244
|
-
originalMax:
|
|
245
|
-
}) :
|
|
245
|
+
originalFormatter: v?.formatter,
|
|
246
|
+
originalMax: v?.max
|
|
247
|
+
}) : p.setWidget(t, {
|
|
246
248
|
isRelative: o
|
|
247
249
|
}));
|
|
248
|
-
},
|
|
249
|
-
let
|
|
250
|
-
e[6] !== o || e[7] !== t || e[8] !==
|
|
251
|
-
id:
|
|
252
|
-
order:
|
|
250
|
+
}, g = [t, o], e[2] = o, e[3] = t, e[4] = d, e[5] = g) : (d = e[4], g = e[5]), H(d, g);
|
|
251
|
+
let f, h;
|
|
252
|
+
e[6] !== o || e[7] !== t || e[8] !== S ? (f = () => (p.registerTool(t, {
|
|
253
|
+
id: me,
|
|
254
|
+
order: S,
|
|
253
255
|
enabled: o,
|
|
254
|
-
fn:
|
|
255
|
-
}), () =>
|
|
256
|
-
let
|
|
257
|
-
e[11] !== t || e[12] !==
|
|
258
|
-
|
|
259
|
-
},
|
|
260
|
-
let
|
|
261
|
-
e[15] !== t || e[16] !==
|
|
262
|
-
id:
|
|
256
|
+
fn: Tt
|
|
257
|
+
}), () => p.unregisterTool(t, me)), h = [t, S, o], e[6] = o, e[7] = t, e[8] = S, e[9] = f, e[10] = h) : (f = e[9], h = e[10]), H(f, h);
|
|
258
|
+
let m, I;
|
|
259
|
+
e[11] !== t || e[12] !== a ? (m = () => {
|
|
260
|
+
p.setToolEnabled(t, me, a);
|
|
261
|
+
}, I = [t, a], e[11] = t, e[12] = a, e[13] = m, e[14] = I) : (m = e[13], I = e[14]), H(m, I);
|
|
262
|
+
let s;
|
|
263
|
+
e[15] !== t || e[16] !== S ? (s = () => (p.registerTool(t, {
|
|
264
|
+
id: Te,
|
|
263
265
|
type: "config",
|
|
264
|
-
order:
|
|
266
|
+
order: S,
|
|
265
267
|
enabled: !0,
|
|
266
|
-
fn: (
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
if (!
|
|
270
|
-
return
|
|
271
|
-
if (!
|
|
272
|
-
const
|
|
273
|
-
|
|
268
|
+
fn: (v) => {
|
|
269
|
+
const T = v, _ = p.getWidget(t), z = _?.sourceData != null && !(Array.isArray(_.sourceData) && _.sourceData.length === 0);
|
|
270
|
+
if (_?.isRelative) {
|
|
271
|
+
if (!z)
|
|
272
|
+
return T;
|
|
273
|
+
if (!i.current) {
|
|
274
|
+
const M = _?.locale;
|
|
275
|
+
i.current = (A) => new Intl.NumberFormat(M, {
|
|
274
276
|
style: "percent",
|
|
275
277
|
minimumFractionDigits: 1,
|
|
276
278
|
maximumFractionDigits: 1
|
|
277
|
-
}).format(
|
|
279
|
+
}).format(A / 100);
|
|
278
280
|
}
|
|
279
281
|
return {
|
|
280
|
-
...
|
|
281
|
-
formatter:
|
|
282
|
+
...T,
|
|
283
|
+
formatter: i.current,
|
|
282
284
|
max: 100
|
|
283
285
|
};
|
|
284
286
|
}
|
|
285
|
-
return
|
|
286
|
-
...
|
|
287
|
-
formatter:
|
|
288
|
-
max:
|
|
289
|
-
} :
|
|
287
|
+
return i.current = void 0, _ != null && "originalFormatter" in _ ? {
|
|
288
|
+
...T,
|
|
289
|
+
formatter: _.originalFormatter,
|
|
290
|
+
max: _.originalMax
|
|
291
|
+
} : T;
|
|
290
292
|
}
|
|
291
293
|
}), () => {
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
formatter:
|
|
295
|
-
max:
|
|
296
|
-
}),
|
|
297
|
-
}), e[15] = t, e[16] =
|
|
298
|
-
let
|
|
299
|
-
e[18] !== o || e[19] !== t || e[20] !==
|
|
300
|
-
let
|
|
301
|
-
e[22] !== t || e[23] !==
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
|
|
294
|
+
const v = p.getWidget(t);
|
|
295
|
+
v?.isRelative && "originalFormatter" in v && p.setWidget(t, {
|
|
296
|
+
formatter: v.originalFormatter,
|
|
297
|
+
max: v.originalMax
|
|
298
|
+
}), i.current = void 0, p.unregisterTool(t, Te);
|
|
299
|
+
}), e[15] = t, e[16] = S, e[17] = s) : s = e[17];
|
|
300
|
+
let w;
|
|
301
|
+
e[18] !== o || e[19] !== t || e[20] !== S ? (w = [t, S, o], e[18] = o, e[19] = t, e[20] = S, e[21] = w) : w = e[21], H(s, w);
|
|
302
|
+
let L;
|
|
303
|
+
e[22] !== t || e[23] !== a ? (L = () => {
|
|
304
|
+
const v = !a;
|
|
305
|
+
if (i.current = void 0, v) {
|
|
306
|
+
const T = p.getWidget(t);
|
|
307
|
+
p.setWidget(t, {
|
|
306
308
|
isRelative: !0,
|
|
307
|
-
originalFormatter:
|
|
308
|
-
originalMax:
|
|
309
|
+
originalFormatter: T?.formatter,
|
|
310
|
+
originalMax: T?.max
|
|
309
311
|
});
|
|
310
312
|
} else
|
|
311
|
-
|
|
313
|
+
p.setWidget(t, {
|
|
312
314
|
isRelative: !1
|
|
313
315
|
});
|
|
314
|
-
}, e[22] = t, e[23] =
|
|
315
|
-
const
|
|
316
|
-
let x;
|
|
317
|
-
e[25] !== S ? (x = S ?? /* @__PURE__ */ b(Ne, {}), e[25] = S, e[26] = x) : x = e[26];
|
|
316
|
+
}, e[22] = t, e[23] = a, e[24] = L) : L = e[24];
|
|
317
|
+
const P = L, D = a ? c?.absolute ?? "Show absolute values" : c?.relative ?? "Show relative values", O = c?.ariaLabel ?? D;
|
|
318
318
|
let E;
|
|
319
|
-
e[
|
|
320
|
-
let
|
|
321
|
-
|
|
319
|
+
e[25] !== b ? (E = b ?? /* @__PURE__ */ x(Ye, {}), e[25] = b, e[26] = E) : E = e[26];
|
|
320
|
+
let R;
|
|
321
|
+
e[27] !== C || e[28] !== P || e[29] !== a || e[30] !== O || e[31] !== E ? (R = /* @__PURE__ */ x(ee, { size: "small", "aria-label": O, onClick: P, sx: se.trigger, "data-active": a, ...C, children: E }), e[27] = C, e[28] = P, e[29] = a, e[30] = O, e[31] = E, e[32] = R) : R = e[32];
|
|
322
|
+
let k;
|
|
323
|
+
return e[33] !== R || e[34] !== D ? (k = /* @__PURE__ */ x(re, { title: D, children: R }), e[33] = R, e[34] = D, e[35] = k) : k = e[35], k;
|
|
322
324
|
}
|
|
323
|
-
function
|
|
324
|
-
const e = n, t =
|
|
325
|
-
return
|
|
325
|
+
function Tt(n) {
|
|
326
|
+
const e = n, t = yt(e);
|
|
327
|
+
return It(e, t);
|
|
326
328
|
}
|
|
327
|
-
const
|
|
329
|
+
const _e = {
|
|
328
330
|
container: {
|
|
329
331
|
display: "flex",
|
|
330
332
|
alignItems: "center",
|
|
@@ -337,596 +339,596 @@ const ye = {
|
|
|
337
339
|
background: (n) => n.palette.primary.relatedLight
|
|
338
340
|
}
|
|
339
341
|
}
|
|
340
|
-
},
|
|
341
|
-
function
|
|
342
|
-
const e =
|
|
342
|
+
}, he = "zoom-toggle";
|
|
343
|
+
function vn(n) {
|
|
344
|
+
const e = Q(63), {
|
|
343
345
|
id: t,
|
|
344
|
-
defaultZoom:
|
|
345
|
-
defaultZoomStart:
|
|
346
|
-
defaultZoomEnd:
|
|
347
|
-
labels:
|
|
348
|
-
Icon:
|
|
349
|
-
ResetIcon:
|
|
346
|
+
defaultZoom: r,
|
|
347
|
+
defaultZoomStart: u,
|
|
348
|
+
defaultZoomEnd: c,
|
|
349
|
+
labels: b,
|
|
350
|
+
Icon: C,
|
|
351
|
+
ResetIcon: S,
|
|
350
352
|
IconButtonProps: o
|
|
351
|
-
} = n,
|
|
352
|
-
let
|
|
353
|
-
e[0] !==
|
|
354
|
-
zoom:
|
|
355
|
-
zoomStart:
|
|
356
|
-
zoomEnd:
|
|
357
|
-
}), e[0] =
|
|
353
|
+
} = n, i = r === void 0 ? !1 : r, l = u === void 0 ? 0 : u, a = c === void 0 ? 100 : c, d = Ge();
|
|
354
|
+
let g;
|
|
355
|
+
e[0] !== i || e[1] !== a || e[2] !== l ? (g = (y) => ({
|
|
356
|
+
zoom: y?.zoom ?? i,
|
|
357
|
+
zoomStart: y?.zoomStart ?? l,
|
|
358
|
+
zoomEnd: y?.zoomEnd ?? a
|
|
359
|
+
}), e[0] = i, e[1] = a, e[2] = l, e[3] = g) : g = e[3];
|
|
358
360
|
const {
|
|
359
|
-
zoom:
|
|
360
|
-
zoomStart:
|
|
361
|
-
zoomEnd:
|
|
362
|
-
} =
|
|
363
|
-
let
|
|
364
|
-
e[4] !==
|
|
365
|
-
|
|
366
|
-
zoom:
|
|
367
|
-
zoomStart:
|
|
368
|
-
zoomEnd:
|
|
361
|
+
zoom: f,
|
|
362
|
+
zoomStart: h,
|
|
363
|
+
zoomEnd: m
|
|
364
|
+
} = ne(t, g);
|
|
365
|
+
let I, s;
|
|
366
|
+
e[4] !== i || e[5] !== a || e[6] !== l || e[7] !== t ? (I = () => {
|
|
367
|
+
p.getWidget(t)?.zoom === void 0 && p.setWidget(t, {
|
|
368
|
+
zoom: i,
|
|
369
|
+
zoomStart: l,
|
|
370
|
+
zoomEnd: a
|
|
369
371
|
});
|
|
370
|
-
},
|
|
371
|
-
let
|
|
372
|
-
e[10] !== t ? (
|
|
373
|
-
const
|
|
374
|
-
|
|
372
|
+
}, s = [t, i, l, a], e[4] = i, e[5] = a, e[6] = l, e[7] = t, e[8] = I, e[9] = s) : (I = e[8], s = e[9]), H(I, s);
|
|
373
|
+
let w;
|
|
374
|
+
e[10] !== t ? (w = (y) => {
|
|
375
|
+
const B = y, F = B.start ?? B.batch?.[0]?.start, V = B.end ?? B.batch?.[0]?.end;
|
|
376
|
+
F !== void 0 && V !== void 0 && p.setWidget(t, {
|
|
375
377
|
zoom: !0,
|
|
376
|
-
zoomStart:
|
|
377
|
-
zoomEnd:
|
|
378
|
+
zoomStart: F,
|
|
379
|
+
zoomEnd: V
|
|
378
380
|
});
|
|
379
|
-
}, e[10] = t, e[11] =
|
|
380
|
-
const
|
|
381
|
-
let
|
|
382
|
-
e[12] !==
|
|
383
|
-
id:
|
|
381
|
+
}, e[10] = t, e[11] = w) : w = e[11];
|
|
382
|
+
const L = w;
|
|
383
|
+
let P;
|
|
384
|
+
e[12] !== i || e[13] !== L || e[14] !== t || e[15] !== d ? (P = () => (p.registerTool(t, {
|
|
385
|
+
id: he,
|
|
384
386
|
type: "config",
|
|
385
387
|
order: 20,
|
|
386
|
-
enabled:
|
|
387
|
-
fn: (
|
|
388
|
-
const
|
|
389
|
-
start:
|
|
390
|
-
end:
|
|
388
|
+
enabled: i,
|
|
389
|
+
fn: (y) => {
|
|
390
|
+
const B = y, F = B.option, V = B.onEvents ?? {}, X = p.getWidget(t), q = X?.zoomStart ?? 0, te = X?.zoomEnd ?? 100, Y = F?.legend, J = Y?.show !== !1 && Y !== void 0, ce = parseInt(d?.spacing?.(4) ?? "32"), ge = tt({
|
|
391
|
+
start: q,
|
|
392
|
+
end: te
|
|
391
393
|
}, {
|
|
392
394
|
inside: !0,
|
|
393
395
|
xSlider: !0,
|
|
394
396
|
ySlider: !1,
|
|
395
|
-
bottomOffset:
|
|
396
|
-
},
|
|
397
|
-
...
|
|
398
|
-
dataZoom:
|
|
397
|
+
bottomOffset: J ? 28 : 0
|
|
398
|
+
}, d), ae = F?.grid, Oe = (typeof ae?.bottom == "number" ? ae.bottom : parseInt(ae?.bottom ?? "24")) + ce + 8, Me = {
|
|
399
|
+
...V,
|
|
400
|
+
dataZoom: L
|
|
399
401
|
};
|
|
400
402
|
return {
|
|
401
|
-
...
|
|
403
|
+
...B,
|
|
402
404
|
option: {
|
|
403
|
-
...
|
|
404
|
-
...
|
|
405
|
+
...F,
|
|
406
|
+
...ge,
|
|
405
407
|
grid: {
|
|
406
|
-
...
|
|
407
|
-
bottom:
|
|
408
|
+
...ae,
|
|
409
|
+
bottom: Oe
|
|
408
410
|
}
|
|
409
411
|
},
|
|
410
|
-
onEvents:
|
|
412
|
+
onEvents: Me
|
|
411
413
|
};
|
|
412
414
|
}
|
|
413
|
-
}), () =>
|
|
414
|
-
let
|
|
415
|
-
e[17] !==
|
|
416
|
-
let
|
|
417
|
-
e[24] !== t || e[25] !==
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
let
|
|
421
|
-
e[28] !== t ? (
|
|
422
|
-
|
|
423
|
-
}, e[28] = t, e[29] =
|
|
424
|
-
let
|
|
425
|
-
e[30] !== t || e[31] !==
|
|
426
|
-
let
|
|
427
|
-
e[34] !== t || e[35] !==
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
zoom:
|
|
431
|
-
zoomStart:
|
|
432
|
-
zoomEnd:
|
|
415
|
+
}), () => p.unregisterTool(t, he)), e[12] = i, e[13] = L, e[14] = t, e[15] = d, e[16] = P) : P = e[16];
|
|
416
|
+
let D;
|
|
417
|
+
e[17] !== i || e[18] !== a || e[19] !== l || e[20] !== L || e[21] !== t || e[22] !== d ? (D = [t, d, L, i, l, a], e[17] = i, e[18] = a, e[19] = l, e[20] = L, e[21] = t, e[22] = d, e[23] = D) : D = e[23], H(P, D);
|
|
418
|
+
let O, E;
|
|
419
|
+
e[24] !== t || e[25] !== f ? (O = () => {
|
|
420
|
+
p.setToolEnabled(t, he, f);
|
|
421
|
+
}, E = [t, f], e[24] = t, e[25] = f, e[26] = O, e[27] = E) : (O = e[26], E = e[27]), H(O, E);
|
|
422
|
+
let R;
|
|
423
|
+
e[28] !== t ? (R = () => {
|
|
424
|
+
p.triggerToolPipeline(t);
|
|
425
|
+
}, e[28] = t, e[29] = R) : R = e[29];
|
|
426
|
+
let k;
|
|
427
|
+
e[30] !== t || e[31] !== m || e[32] !== h ? (k = [t, h, m], e[30] = t, e[31] = m, e[32] = h, e[33] = k) : k = e[33], H(R, k);
|
|
428
|
+
let v;
|
|
429
|
+
e[34] !== t || e[35] !== f || e[36] !== m || e[37] !== h ? (v = () => {
|
|
430
|
+
const y = !f;
|
|
431
|
+
p.setWidget(t, {
|
|
432
|
+
zoom: y,
|
|
433
|
+
zoomStart: y ? h : 0,
|
|
434
|
+
zoomEnd: y ? m : 100
|
|
433
435
|
});
|
|
434
|
-
}, e[34] = t, e[35] =
|
|
435
|
-
const
|
|
436
|
-
let
|
|
437
|
-
e[39] !==
|
|
438
|
-
|
|
436
|
+
}, e[34] = t, e[35] = f, e[36] = m, e[37] = h, e[38] = v) : v = e[38];
|
|
437
|
+
const T = v;
|
|
438
|
+
let _;
|
|
439
|
+
e[39] !== a || e[40] !== l || e[41] !== t ? (_ = () => {
|
|
440
|
+
p.setWidget(t, {
|
|
439
441
|
zoom: !0,
|
|
440
|
-
zoomStart:
|
|
441
|
-
zoomEnd:
|
|
442
|
+
zoomStart: l,
|
|
443
|
+
zoomEnd: a
|
|
442
444
|
});
|
|
443
|
-
}, e[39] =
|
|
444
|
-
const
|
|
445
|
-
let
|
|
446
|
-
e[43] !==
|
|
445
|
+
}, e[39] = a, e[40] = l, e[41] = t, e[42] = _) : _ = e[42];
|
|
446
|
+
const z = _, M = b?.enable ?? "Enable zoom", A = b?.disable ?? "Disable zoom", W = b?.reset ?? "Reset zoom", U = f ? A : M, j = b?.ariaLabel ?? U;
|
|
447
|
+
let $;
|
|
448
|
+
e[43] !== C ? ($ = C ?? /* @__PURE__ */ x(qe, {}), e[43] = C, e[44] = $) : $ = e[44];
|
|
447
449
|
let G;
|
|
448
|
-
e[45] !== o || e[46] !==
|
|
449
|
-
let
|
|
450
|
-
e[51] !== G || e[52] !==
|
|
451
|
-
let
|
|
452
|
-
e[54] !== o || e[55] !==
|
|
453
|
-
let
|
|
454
|
-
return e[60] !==
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
] }), e[60] =
|
|
450
|
+
e[45] !== o || e[46] !== T || e[47] !== j || e[48] !== $ || e[49] !== f ? (G = /* @__PURE__ */ x(ee, { size: "small", "aria-label": j, onClick: T, sx: _e.trigger, "data-active": f, ...o, children: $ }), e[45] = o, e[46] = T, e[47] = j, e[48] = $, e[49] = f, e[50] = G) : G = e[50];
|
|
451
|
+
let Z;
|
|
452
|
+
e[51] !== G || e[52] !== U ? (Z = /* @__PURE__ */ x(re, { title: U, children: G }), e[51] = G, e[52] = U, e[53] = Z) : Z = e[53];
|
|
453
|
+
let N;
|
|
454
|
+
e[54] !== o || e[55] !== S || e[56] !== z || e[57] !== W || e[58] !== f ? (N = f && /* @__PURE__ */ x(re, { title: W, children: /* @__PURE__ */ x(ee, { size: "small", "aria-label": W, onClick: z, ...o, children: S ?? /* @__PURE__ */ x(Ke, {}) }) }), e[54] = o, e[55] = S, e[56] = z, e[57] = W, e[58] = f, e[59] = N) : N = e[59];
|
|
455
|
+
let K;
|
|
456
|
+
return e[60] !== Z || e[61] !== N ? (K = /* @__PURE__ */ oe(De, { sx: _e.container, children: [
|
|
457
|
+
Z,
|
|
458
|
+
N
|
|
459
|
+
] }), e[60] = Z, e[61] = N, e[62] = K) : K = e[62], K;
|
|
458
460
|
}
|
|
459
|
-
const
|
|
460
|
-
const n =
|
|
461
|
+
const _t = () => {
|
|
462
|
+
const n = Q(1);
|
|
461
463
|
let e;
|
|
462
|
-
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
463
|
-
},
|
|
464
|
-
function
|
|
465
|
-
const e =
|
|
464
|
+
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ x("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ x("path", { d: "M4 20V8H8V20H4ZM9 20V13H13V20H9ZM16 20V4H20V20H16Z", fill: "currentColor" }) }), n[0] = e) : e = n[0], e;
|
|
465
|
+
}, pe = "stack-toggle";
|
|
466
|
+
function yn(n) {
|
|
467
|
+
const e = Q(35), {
|
|
466
468
|
id: t,
|
|
467
|
-
defaultIsStacked:
|
|
468
|
-
labels:
|
|
469
|
-
Icon:
|
|
470
|
-
IconButtonProps:
|
|
471
|
-
} = n,
|
|
472
|
-
storeIsStacked:
|
|
469
|
+
defaultIsStacked: r,
|
|
470
|
+
labels: u,
|
|
471
|
+
Icon: c,
|
|
472
|
+
IconButtonProps: b
|
|
473
|
+
} = n, C = r === void 0 ? !1 : r, {
|
|
474
|
+
storeIsStacked: S,
|
|
473
475
|
option: o
|
|
474
|
-
} =
|
|
475
|
-
let
|
|
476
|
+
} = ne(t, kt);
|
|
477
|
+
let i;
|
|
476
478
|
e: {
|
|
477
479
|
if (!o) {
|
|
478
|
-
let
|
|
479
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
480
|
+
let A;
|
|
481
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
|
|
480
482
|
hasMultiSeries: !1,
|
|
481
483
|
hasStackInSeries: !1
|
|
482
|
-
}, e[0] =
|
|
484
|
+
}, e[0] = A) : A = e[0], i = A;
|
|
483
485
|
break e;
|
|
484
486
|
}
|
|
485
|
-
let
|
|
486
|
-
e[1] !== o.series ? (
|
|
487
|
-
const
|
|
488
|
-
let
|
|
489
|
-
e[3] !==
|
|
490
|
-
let
|
|
491
|
-
e[5] !==
|
|
492
|
-
hasMultiSeries:
|
|
493
|
-
hasStackInSeries:
|
|
494
|
-
}, e[5] =
|
|
487
|
+
let v;
|
|
488
|
+
e[1] !== o.series ? (v = Array.isArray(o.series) ? o.series : [o.series], e[1] = o.series, e[2] = v) : v = e[2];
|
|
489
|
+
const T = v, _ = T.length > 1;
|
|
490
|
+
let z;
|
|
491
|
+
e[3] !== T ? (z = T.some(Lt), e[3] = T, e[4] = z) : z = e[4];
|
|
492
|
+
let M;
|
|
493
|
+
e[5] !== _ || e[6] !== z ? (M = {
|
|
494
|
+
hasMultiSeries: _,
|
|
495
|
+
hasStackInSeries: z
|
|
496
|
+
}, e[5] = _, e[6] = z, e[7] = M) : M = e[7], i = M;
|
|
495
497
|
}
|
|
496
498
|
const {
|
|
497
|
-
hasMultiSeries:
|
|
498
|
-
hasStackInSeries:
|
|
499
|
-
} =
|
|
500
|
-
let
|
|
501
|
-
e[8] !== t ? (
|
|
502
|
-
id:
|
|
499
|
+
hasMultiSeries: l,
|
|
500
|
+
hasStackInSeries: a
|
|
501
|
+
} = i, d = a || C, g = S ?? d;
|
|
502
|
+
let f, h;
|
|
503
|
+
e[8] !== t ? (f = () => (p.registerTool(t, {
|
|
504
|
+
id: pe,
|
|
503
505
|
type: "config",
|
|
504
506
|
order: 10,
|
|
505
507
|
enabled: !1,
|
|
506
|
-
fn:
|
|
507
|
-
}), () =>
|
|
508
|
-
let
|
|
509
|
-
e[11] !==
|
|
510
|
-
|
|
511
|
-
},
|
|
512
|
-
let
|
|
513
|
-
e[16] !==
|
|
514
|
-
|
|
515
|
-
isStacked:
|
|
508
|
+
fn: Et
|
|
509
|
+
}), () => p.unregisterTool(t, pe)), h = [t], e[8] = t, e[9] = f, e[10] = h) : (f = e[9], h = e[10]), H(f, h);
|
|
510
|
+
let m, I;
|
|
511
|
+
e[11] !== l || e[12] !== t || e[13] !== g ? (m = () => {
|
|
512
|
+
p.setToolEnabled(t, pe, g && l);
|
|
513
|
+
}, I = [t, g, l], e[11] = l, e[12] = t, e[13] = g, e[14] = m, e[15] = I) : (m = e[14], I = e[15]), H(m, I);
|
|
514
|
+
let s, w;
|
|
515
|
+
e[16] !== d || e[17] !== t || e[18] !== S ? (s = () => {
|
|
516
|
+
S === void 0 && p.setWidget(t, {
|
|
517
|
+
isStacked: d
|
|
516
518
|
});
|
|
517
|
-
},
|
|
518
|
-
let
|
|
519
|
-
e[21] !== t || e[22] !==
|
|
520
|
-
|
|
521
|
-
isStacked: !
|
|
519
|
+
}, w = [d, t, S], e[16] = d, e[17] = t, e[18] = S, e[19] = s, e[20] = w) : (s = e[19], w = e[20]), H(s, w);
|
|
520
|
+
let L;
|
|
521
|
+
e[21] !== t || e[22] !== g ? (L = () => {
|
|
522
|
+
p.setWidget(t, {
|
|
523
|
+
isStacked: !g
|
|
522
524
|
});
|
|
523
|
-
}, e[21] = t, e[22] =
|
|
524
|
-
const
|
|
525
|
-
if (!
|
|
525
|
+
}, e[21] = t, e[22] = g, e[23] = L) : L = e[23];
|
|
526
|
+
const P = L, D = g ? u?.unstacked ?? "Disable stacking" : u?.stacked ?? "Enable stacking";
|
|
527
|
+
if (!l)
|
|
526
528
|
return null;
|
|
527
|
-
const
|
|
528
|
-
let x;
|
|
529
|
-
e[24] !== m ? (x = m ?? /* @__PURE__ */ b(St, {}), e[24] = m, e[25] = x) : x = e[25];
|
|
529
|
+
const O = u?.ariaLabel ?? D;
|
|
530
530
|
let E;
|
|
531
|
-
e[
|
|
532
|
-
let
|
|
533
|
-
|
|
531
|
+
e[24] !== c ? (E = c ?? /* @__PURE__ */ x(_t, {}), e[24] = c, e[25] = E) : E = e[25];
|
|
532
|
+
let R;
|
|
533
|
+
e[26] !== b || e[27] !== P || e[28] !== g || e[29] !== O || e[30] !== E ? (R = /* @__PURE__ */ x(ee, { size: "small", "aria-label": O, onClick: P, sx: se.trigger, "data-active": g, ...b, children: E }), e[26] = b, e[27] = P, e[28] = g, e[29] = O, e[30] = E, e[31] = R) : R = e[31];
|
|
534
|
+
let k;
|
|
535
|
+
return e[32] !== R || e[33] !== D ? (k = /* @__PURE__ */ x(re, { title: D, children: R }), e[32] = R, e[33] = D, e[34] = k) : k = e[34], k;
|
|
534
536
|
}
|
|
535
|
-
function
|
|
537
|
+
function Et(n) {
|
|
536
538
|
const e = n, t = e.option;
|
|
537
539
|
if (!t)
|
|
538
540
|
return n;
|
|
539
|
-
const
|
|
541
|
+
const u = (Array.isArray(t.series) ? t.series : [t.series]).map(Ct);
|
|
540
542
|
return {
|
|
541
543
|
...e,
|
|
542
544
|
option: {
|
|
543
545
|
...t,
|
|
544
|
-
series:
|
|
546
|
+
series: u
|
|
545
547
|
}
|
|
546
548
|
};
|
|
547
549
|
}
|
|
548
|
-
function
|
|
550
|
+
function Ct(n) {
|
|
549
551
|
const e = n?.stack;
|
|
550
552
|
return {
|
|
551
553
|
...n,
|
|
552
|
-
...
|
|
554
|
+
...nt(typeof e == "string" ? e : ot)
|
|
553
555
|
};
|
|
554
556
|
}
|
|
555
|
-
function
|
|
557
|
+
function Lt(n) {
|
|
556
558
|
return n?.stack;
|
|
557
559
|
}
|
|
558
|
-
function
|
|
560
|
+
function kt(n) {
|
|
559
561
|
return {
|
|
560
562
|
storeIsStacked: n?.isStacked,
|
|
561
563
|
option: n?.option
|
|
562
564
|
};
|
|
563
565
|
}
|
|
564
|
-
const
|
|
565
|
-
function
|
|
566
|
-
const e =
|
|
566
|
+
const de = "lock-selection";
|
|
567
|
+
function In(n) {
|
|
568
|
+
const e = Q(24), {
|
|
567
569
|
id: t,
|
|
568
|
-
selectedItems:
|
|
569
|
-
order:
|
|
570
|
-
labels:
|
|
571
|
-
Icon:
|
|
572
|
-
IconButtonProps:
|
|
573
|
-
} = n,
|
|
570
|
+
selectedItems: r,
|
|
571
|
+
order: u,
|
|
572
|
+
labels: c,
|
|
573
|
+
Icon: b,
|
|
574
|
+
IconButtonProps: C
|
|
575
|
+
} = n, S = u === void 0 ? 30 : u, {
|
|
574
576
|
storeIsLocked: o
|
|
575
|
-
} =
|
|
576
|
-
let
|
|
577
|
-
e[0] !== t || e[1] !==
|
|
578
|
-
id:
|
|
579
|
-
order:
|
|
577
|
+
} = ne(t, wt), i = o ?? !1;
|
|
578
|
+
let l, a;
|
|
579
|
+
e[0] !== t || e[1] !== S ? (l = () => (p.registerTool(t, {
|
|
580
|
+
id: de,
|
|
581
|
+
order: S,
|
|
580
582
|
enabled: !1,
|
|
581
|
-
fn: (
|
|
582
|
-
const
|
|
583
|
-
return
|
|
583
|
+
fn: (P) => {
|
|
584
|
+
const O = p.getWidget(t)?.lockedItems ?? [];
|
|
585
|
+
return O.length === 0 ? P : Pt(P, O);
|
|
584
586
|
}
|
|
585
|
-
}), () =>
|
|
586
|
-
let
|
|
587
|
-
e[4] !== t || e[5] !==
|
|
588
|
-
if (
|
|
589
|
-
|
|
587
|
+
}), () => p.unregisterTool(t, de)), a = [t, S], e[0] = t, e[1] = S, e[2] = l, e[3] = a) : (l = e[2], a = e[3]), H(l, a);
|
|
588
|
+
let d, g;
|
|
589
|
+
e[4] !== t || e[5] !== i || e[6] !== r.length ? (d = () => {
|
|
590
|
+
if (i && r.length === 0) {
|
|
591
|
+
p.setWidget(t, {
|
|
590
592
|
isLocked: !1,
|
|
591
593
|
lockedItems: []
|
|
592
594
|
});
|
|
593
595
|
return;
|
|
594
596
|
}
|
|
595
|
-
|
|
596
|
-
},
|
|
597
|
-
let
|
|
598
|
-
e[9] !== t || e[10] !==
|
|
599
|
-
|
|
597
|
+
p.setToolEnabled(t, de, i);
|
|
598
|
+
}, g = [t, i, r.length], e[4] = t, e[5] = i, e[6] = r.length, e[7] = d, e[8] = g) : (d = e[7], g = e[8]), H(d, g);
|
|
599
|
+
let f;
|
|
600
|
+
e[9] !== t || e[10] !== i || e[11] !== r ? (f = () => {
|
|
601
|
+
i ? p.setWidget(t, {
|
|
600
602
|
isLocked: !1,
|
|
601
603
|
lockedItems: []
|
|
602
|
-
}) :
|
|
604
|
+
}) : p.setWidget(t, {
|
|
603
605
|
isLocked: !0,
|
|
604
|
-
lockedItems:
|
|
606
|
+
lockedItems: r
|
|
605
607
|
});
|
|
606
|
-
}, e[9] = t, e[10] =
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
608
|
+
}, e[9] = t, e[10] = i, e[11] = r, e[12] = f) : f = e[12];
|
|
609
|
+
const h = f;
|
|
610
|
+
if (r.length === 0)
|
|
609
611
|
return null;
|
|
610
|
-
const
|
|
611
|
-
let
|
|
612
|
-
e[13] !==
|
|
613
|
-
let
|
|
614
|
-
e[15] !==
|
|
615
|
-
let
|
|
616
|
-
return e[21] !==
|
|
612
|
+
const m = i ? c?.unlock ?? "Unlock selection" : c?.lock ?? "Lock selection", I = c?.ariaLabel ?? m;
|
|
613
|
+
let s;
|
|
614
|
+
e[13] !== b ? (s = b ?? /* @__PURE__ */ x(Je, { fontSize: "small" }), e[13] = b, e[14] = s) : s = e[14];
|
|
615
|
+
let w;
|
|
616
|
+
e[15] !== C || e[16] !== I || e[17] !== h || e[18] !== i || e[19] !== s ? (w = /* @__PURE__ */ x(ee, { size: "small", "aria-label": I, onClick: h, sx: se.trigger, "data-active": i, ...C, children: s }), e[15] = C, e[16] = I, e[17] = h, e[18] = i, e[19] = s, e[20] = w) : w = e[20];
|
|
617
|
+
let L;
|
|
618
|
+
return e[21] !== w || e[22] !== m ? (L = /* @__PURE__ */ x(re, { title: m, children: w }), e[21] = w, e[22] = m, e[23] = L) : L = e[23], L;
|
|
617
619
|
}
|
|
618
|
-
function
|
|
620
|
+
function wt(n) {
|
|
619
621
|
return {
|
|
620
622
|
storeIsLocked: n?.isLocked
|
|
621
623
|
};
|
|
622
624
|
}
|
|
623
|
-
function
|
|
624
|
-
return n.map((t) => t.filter((
|
|
625
|
-
const
|
|
626
|
-
return typeof
|
|
625
|
+
function Pt(n, e) {
|
|
626
|
+
return n.map((t) => t.filter((r) => {
|
|
627
|
+
const u = r.name;
|
|
628
|
+
return typeof u == "string" && e.includes(u);
|
|
627
629
|
}));
|
|
628
630
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
const e =
|
|
631
|
+
const be = "searcher", Rt = 300;
|
|
632
|
+
function Tn(n) {
|
|
633
|
+
const e = Q(39), {
|
|
632
634
|
id: t,
|
|
633
|
-
filterFn:
|
|
634
|
-
order:
|
|
635
|
-
labels:
|
|
636
|
-
TextFieldProps:
|
|
637
|
-
ClearIcon:
|
|
638
|
-
debounceDelay:
|
|
639
|
-
} = n, o =
|
|
640
|
-
enabled:
|
|
641
|
-
searchText:
|
|
642
|
-
} =
|
|
643
|
-
let
|
|
644
|
-
e[0] !== t ? (
|
|
645
|
-
|
|
646
|
-
searchText:
|
|
635
|
+
filterFn: r,
|
|
636
|
+
order: u,
|
|
637
|
+
labels: c,
|
|
638
|
+
TextFieldProps: b,
|
|
639
|
+
ClearIcon: C,
|
|
640
|
+
debounceDelay: S
|
|
641
|
+
} = n, o = u === void 0 ? 20 : u, i = S === void 0 ? Rt : S, l = le(null), a = le(null), {
|
|
642
|
+
enabled: d,
|
|
643
|
+
searchText: g
|
|
644
|
+
} = ne(t, Dt), f = le(d), h = r ?? zt;
|
|
645
|
+
let m;
|
|
646
|
+
e[0] !== t ? (m = (Z) => {
|
|
647
|
+
p.setWidget(t, {
|
|
648
|
+
searchText: Z
|
|
647
649
|
});
|
|
648
|
-
}, e[0] = t, e[1] =
|
|
649
|
-
const
|
|
650
|
-
let
|
|
651
|
-
e[2] !==
|
|
652
|
-
id:
|
|
650
|
+
}, e[0] = t, e[1] = m) : m = e[1];
|
|
651
|
+
const I = m;
|
|
652
|
+
let s, w;
|
|
653
|
+
e[2] !== h || e[3] !== t || e[4] !== o ? (s = () => (p.registerTool(t, {
|
|
654
|
+
id: be,
|
|
653
655
|
order: o,
|
|
654
656
|
enabled: !1,
|
|
655
|
-
fn: async (
|
|
656
|
-
const
|
|
657
|
-
return
|
|
657
|
+
fn: async (Z) => {
|
|
658
|
+
const K = p.getWidget(t)?.searchText ?? "";
|
|
659
|
+
return h(Z, K);
|
|
658
660
|
},
|
|
659
|
-
disables: [
|
|
660
|
-
}), () =>
|
|
661
|
-
let
|
|
662
|
-
e[7] !==
|
|
663
|
-
|
|
664
|
-
},
|
|
665
|
-
let
|
|
666
|
-
e[11] !==
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
},
|
|
670
|
-
}, e[11] =
|
|
671
|
-
const
|
|
672
|
-
let
|
|
673
|
-
e[14] !==
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
let
|
|
677
|
-
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
678
|
-
|
|
679
|
-
},
|
|
680
|
-
let
|
|
681
|
-
e[19] !==
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
}, e[19] =
|
|
685
|
-
const
|
|
686
|
-
let
|
|
687
|
-
e[22] !== t || e[23] !==
|
|
688
|
-
|
|
689
|
-
}, e[22] = t, e[23] =
|
|
690
|
-
const
|
|
691
|
-
if (!
|
|
661
|
+
disables: [de]
|
|
662
|
+
}), () => p.unregisterTool(t, be)), w = [t, o, h], e[2] = h, e[3] = t, e[4] = o, e[5] = s, e[6] = w) : (s = e[5], w = e[6]), H(s, w);
|
|
663
|
+
let L, P;
|
|
664
|
+
e[7] !== d || e[8] !== t ? (L = () => {
|
|
665
|
+
p.setToolEnabled(t, be, d);
|
|
666
|
+
}, P = [t, d], e[7] = d, e[8] = t, e[9] = L, e[10] = P) : (L = e[9], P = e[10]), H(L, P);
|
|
667
|
+
let D;
|
|
668
|
+
e[11] !== i || e[12] !== t ? (D = () => {
|
|
669
|
+
a.current && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
670
|
+
p.triggerToolPipeline(t);
|
|
671
|
+
}, i);
|
|
672
|
+
}, e[11] = i, e[12] = t, e[13] = D) : D = e[13];
|
|
673
|
+
const O = D;
|
|
674
|
+
let E, R;
|
|
675
|
+
e[14] !== d ? (R = () => {
|
|
676
|
+
d && !f.current && l.current && l.current.focus(), f.current = d;
|
|
677
|
+
}, E = [d], e[14] = d, e[15] = E, e[16] = R) : (E = e[15], R = e[16]), H(R, E);
|
|
678
|
+
let k, v;
|
|
679
|
+
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = () => () => {
|
|
680
|
+
a.current && clearTimeout(a.current);
|
|
681
|
+
}, v = [], e[17] = k, e[18] = v) : (k = e[17], v = e[18]), H(k, v);
|
|
682
|
+
let T;
|
|
683
|
+
e[19] !== O || e[20] !== I ? (T = (Z) => {
|
|
684
|
+
const N = Z.target.value;
|
|
685
|
+
I(N), O();
|
|
686
|
+
}, e[19] = O, e[20] = I, e[21] = T) : T = e[21];
|
|
687
|
+
const _ = T;
|
|
688
|
+
let z;
|
|
689
|
+
e[22] !== t || e[23] !== I ? (z = () => {
|
|
690
|
+
I(""), p.triggerToolPipeline(t), l.current && l.current.focus();
|
|
691
|
+
}, e[22] = t, e[23] = I, e[24] = z) : z = e[24];
|
|
692
|
+
const M = z;
|
|
693
|
+
if (!d)
|
|
692
694
|
return null;
|
|
693
|
-
const
|
|
694
|
-
let
|
|
695
|
-
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
696
|
-
let
|
|
697
|
-
e[26] !==
|
|
698
|
-
let
|
|
699
|
-
e[31] !==
|
|
700
|
-
startAdornment:
|
|
701
|
-
endAdornment:
|
|
702
|
-
}, e[31] =
|
|
695
|
+
const A = c?.placeholder ?? "Search...", W = c?.clearAriaLabel ?? "Clear search";
|
|
696
|
+
let U;
|
|
697
|
+
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ x(xe, { position: "start", children: /* @__PURE__ */ x(ze, {}) }), e[25] = U) : U = e[25];
|
|
698
|
+
let j;
|
|
699
|
+
e[26] !== C || e[27] !== W || e[28] !== M || e[29] !== g ? (j = g ? /* @__PURE__ */ x(xe, { position: "end", children: /* @__PURE__ */ x(ee, { size: "small", "aria-label": W, onClick: M, edge: "end", children: C ?? /* @__PURE__ */ x(Qe, { fontSize: "small" }) }) }) : null, e[26] = C, e[27] = W, e[28] = M, e[29] = g, e[30] = j) : j = e[30];
|
|
700
|
+
let $;
|
|
701
|
+
e[31] !== j ? ($ = {
|
|
702
|
+
startAdornment: U,
|
|
703
|
+
endAdornment: j
|
|
704
|
+
}, e[31] = j, e[32] = $) : $ = e[32];
|
|
703
705
|
let G;
|
|
704
|
-
return e[33] !==
|
|
706
|
+
return e[33] !== b || e[34] !== _ || e[35] !== A || e[36] !== g || e[37] !== $ ? (G = /* @__PURE__ */ x(Ze, { inputRef: l, size: "small", fullWidth: !0, variant: "filled", placeholder: A, value: g, onChange: _, InputProps: $, ...b }), e[33] = b, e[34] = _, e[35] = A, e[36] = g, e[37] = $, e[38] = G) : G = e[38], G;
|
|
705
707
|
}
|
|
706
|
-
function
|
|
708
|
+
function Dt(n) {
|
|
707
709
|
return {
|
|
708
710
|
enabled: n?.isSearchEnabled ?? !1,
|
|
709
711
|
searchText: n?.searchText ?? ""
|
|
710
712
|
};
|
|
711
713
|
}
|
|
712
|
-
const
|
|
714
|
+
const zt = (n, e) => {
|
|
713
715
|
if (!e.trim()) return Promise.resolve(n);
|
|
714
716
|
const t = e.toLowerCase();
|
|
715
|
-
return Promise.resolve(n.map((
|
|
717
|
+
return Promise.resolve(n.map((r) => r.filter((u) => Object.values(u).some((c) => String(c).toLowerCase().includes(t)))));
|
|
716
718
|
};
|
|
717
|
-
function
|
|
718
|
-
const e =
|
|
719
|
+
function _n(n) {
|
|
720
|
+
const e = Q(18), {
|
|
719
721
|
id: t,
|
|
720
|
-
defaultEnabled:
|
|
721
|
-
labels:
|
|
722
|
-
Icon:
|
|
723
|
-
IconButtonProps:
|
|
724
|
-
} = n,
|
|
725
|
-
storeIsEnabled:
|
|
726
|
-
} =
|
|
727
|
-
let
|
|
728
|
-
e[0] !==
|
|
729
|
-
|
|
730
|
-
isSearchEnabled:
|
|
722
|
+
defaultEnabled: r,
|
|
723
|
+
labels: u,
|
|
724
|
+
Icon: c,
|
|
725
|
+
IconButtonProps: b
|
|
726
|
+
} = n, C = r === void 0 ? !1 : r, {
|
|
727
|
+
storeIsEnabled: S
|
|
728
|
+
} = ne(t, Ot), o = S ?? C;
|
|
729
|
+
let i, l;
|
|
730
|
+
e[0] !== C || e[1] !== t ? (i = () => {
|
|
731
|
+
p.getWidget(t)?.isSearchEnabled === void 0 && p.setWidget(t, {
|
|
732
|
+
isSearchEnabled: C
|
|
731
733
|
});
|
|
732
|
-
},
|
|
733
|
-
let
|
|
734
|
-
e[4] !== t || e[5] !== o ? (
|
|
735
|
-
|
|
734
|
+
}, l = [C, t], e[0] = C, e[1] = t, e[2] = i, e[3] = l) : (i = e[2], l = e[3]), H(i, l);
|
|
735
|
+
let a;
|
|
736
|
+
e[4] !== t || e[5] !== o ? (a = () => {
|
|
737
|
+
p.setWidget(t, {
|
|
736
738
|
isSearchEnabled: !o
|
|
737
739
|
});
|
|
738
|
-
}, e[4] = t, e[5] = o, e[6] =
|
|
739
|
-
const
|
|
740
|
-
let
|
|
741
|
-
e[7] !==
|
|
742
|
-
let
|
|
743
|
-
e[9] !==
|
|
744
|
-
let
|
|
745
|
-
return e[15] !==
|
|
740
|
+
}, e[4] = t, e[5] = o, e[6] = a) : a = e[6];
|
|
741
|
+
const d = a, g = o ? u?.disable ?? "Disable search" : u?.enable ?? "Enable search", f = u?.ariaLabel ?? g;
|
|
742
|
+
let h;
|
|
743
|
+
e[7] !== c ? (h = c ?? /* @__PURE__ */ x(ze, { fontSize: "small" }), e[7] = c, e[8] = h) : h = e[8];
|
|
744
|
+
let m;
|
|
745
|
+
e[9] !== b || e[10] !== f || e[11] !== d || e[12] !== o || e[13] !== h ? (m = /* @__PURE__ */ x(ee, { size: "small", "aria-label": f, onClick: d, sx: se.trigger, "data-active": o, ...b, children: h }), e[9] = b, e[10] = f, e[11] = d, e[12] = o, e[13] = h, e[14] = m) : m = e[14];
|
|
746
|
+
let I;
|
|
747
|
+
return e[15] !== m || e[16] !== g ? (I = /* @__PURE__ */ x(re, { title: g, children: m }), e[15] = m, e[16] = g, e[17] = I) : I = e[17], I;
|
|
746
748
|
}
|
|
747
|
-
function
|
|
749
|
+
function Ot(n) {
|
|
748
750
|
return {
|
|
749
751
|
storeIsEnabled: n?.isSearchEnabled
|
|
750
752
|
};
|
|
751
753
|
}
|
|
752
|
-
const
|
|
753
|
-
const n =
|
|
754
|
+
const Mt = () => {
|
|
755
|
+
const n = Q(1);
|
|
754
756
|
let e;
|
|
755
|
-
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
757
|
+
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ x("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 18 18", children: /* @__PURE__ */ x("path", { fill: "currentColor", fillRule: "evenodd", d: "M14.25 2.25H3.75c-.825 0-1.5.675-1.5 1.5v10.5c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5V3.75c0-.825-.675-1.5-1.5-1.5m-3.75 12h-3V3.75h3zM3.75 3.75H6v10.5H3.75zM12 14.25V3.75h2.25v10.5z", clipRule: "evenodd" }) }), n[0] = e) : e = n[0], e;
|
|
756
758
|
};
|
|
757
|
-
function
|
|
758
|
-
const e =
|
|
759
|
+
function At(n) {
|
|
760
|
+
const e = Q(18), {
|
|
759
761
|
column: t
|
|
760
762
|
} = n;
|
|
761
|
-
let
|
|
762
|
-
e[0] !== t.id ? (
|
|
763
|
+
let r;
|
|
764
|
+
e[0] !== t.id ? (r = {
|
|
763
765
|
id: t.id
|
|
764
|
-
}, e[0] = t.id, e[1] =
|
|
766
|
+
}, e[0] = t.id, e[1] = r) : r = e[1];
|
|
765
767
|
const {
|
|
766
|
-
attributes:
|
|
767
|
-
listeners:
|
|
768
|
-
setNodeRef:
|
|
769
|
-
transform:
|
|
770
|
-
transition:
|
|
768
|
+
attributes: u,
|
|
769
|
+
listeners: c,
|
|
770
|
+
setNodeRef: b,
|
|
771
|
+
transform: C,
|
|
772
|
+
transition: S,
|
|
771
773
|
isDragging: o
|
|
772
|
-
} =
|
|
773
|
-
let l;
|
|
774
|
-
e[2] !== _ ? (l = dt.Transform.toString(_ ? {
|
|
775
|
-
..._,
|
|
776
|
-
x: 0
|
|
777
|
-
} : null), e[2] = _, e[3] = l) : l = e[3];
|
|
778
|
-
const r = o ? 0.5 : 1, s = o ? "grabbing" : "grab";
|
|
779
|
-
let a;
|
|
780
|
-
e[4] !== l || e[5] !== r || e[6] !== s || e[7] !== T ? (a = {
|
|
781
|
-
transform: l,
|
|
782
|
-
transition: T,
|
|
783
|
-
opacity: r,
|
|
784
|
-
cursor: s
|
|
785
|
-
}, e[4] = l, e[5] = r, e[6] = s, e[7] = T, e[8] = a) : a = e[8];
|
|
786
|
-
const u = a;
|
|
774
|
+
} = at(r);
|
|
787
775
|
let i;
|
|
788
|
-
e[
|
|
776
|
+
e[2] !== C ? (i = mt.Transform.toString(C ? {
|
|
777
|
+
...C,
|
|
778
|
+
x: 0
|
|
779
|
+
} : null), e[2] = C, e[3] = i) : i = e[3];
|
|
780
|
+
const l = o ? 0.5 : 1, a = o ? "grabbing" : "grab";
|
|
781
|
+
let d;
|
|
782
|
+
e[4] !== i || e[5] !== l || e[6] !== a || e[7] !== S ? (d = {
|
|
783
|
+
transform: i,
|
|
784
|
+
transition: S,
|
|
785
|
+
opacity: l,
|
|
786
|
+
cursor: a
|
|
787
|
+
}, e[4] = i, e[5] = l, e[6] = a, e[7] = S, e[8] = d) : d = e[8];
|
|
788
|
+
const g = d;
|
|
789
|
+
let f;
|
|
790
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
789
791
|
"&:focus-visible": {
|
|
790
|
-
outline:
|
|
792
|
+
outline: Bt,
|
|
791
793
|
outlineOffset: -2
|
|
792
794
|
}
|
|
793
|
-
}, e[9] =
|
|
794
|
-
let
|
|
795
|
-
e[10] !== t.label ? (
|
|
796
|
-
let
|
|
797
|
-
return e[12] !==
|
|
795
|
+
}, e[9] = f) : f = e[9];
|
|
796
|
+
let h;
|
|
797
|
+
e[10] !== t.label ? (h = /* @__PURE__ */ x(Pe, { children: t.label }), e[10] = t.label, e[11] = h) : h = e[11];
|
|
798
|
+
let m;
|
|
799
|
+
return e[12] !== u || e[13] !== c || e[14] !== b || e[15] !== g || e[16] !== h ? (m = /* @__PURE__ */ x(we, { ref: b, style: g, ...u, ...c, role: "menuitem", tabIndex: 0, sx: f, children: h }), e[12] = u, e[13] = c, e[14] = b, e[15] = g, e[16] = h, e[17] = m) : m = e[17], m;
|
|
798
800
|
}
|
|
799
|
-
function
|
|
801
|
+
function Bt(n) {
|
|
800
802
|
return `2px solid ${n.palette.primary.main}`;
|
|
801
803
|
}
|
|
802
|
-
const
|
|
803
|
-
function
|
|
804
|
-
const e =
|
|
804
|
+
const Ee = "change-column";
|
|
805
|
+
function En(n) {
|
|
806
|
+
const e = Q(46), {
|
|
805
807
|
id: t,
|
|
806
|
-
labels:
|
|
807
|
-
Icon:
|
|
808
|
-
IconButtonProps:
|
|
809
|
-
MenuProps:
|
|
810
|
-
} = n, [
|
|
808
|
+
labels: r,
|
|
809
|
+
Icon: u,
|
|
810
|
+
IconButtonProps: c,
|
|
811
|
+
MenuProps: b
|
|
812
|
+
} = n, [C, S] = ie(null), {
|
|
811
813
|
columns: o
|
|
812
|
-
} =
|
|
813
|
-
let
|
|
814
|
-
e[0] !== t ? (
|
|
815
|
-
const
|
|
816
|
-
if (!
|
|
817
|
-
return
|
|
818
|
-
const
|
|
819
|
-
if (!
|
|
820
|
-
return
|
|
821
|
-
const
|
|
822
|
-
for (const
|
|
823
|
-
const
|
|
824
|
-
|
|
814
|
+
} = ne(t, Nt);
|
|
815
|
+
let i;
|
|
816
|
+
e[0] !== t ? (i = (N) => {
|
|
817
|
+
const y = p.getWidget(t)?.columns;
|
|
818
|
+
if (!y || y.length === 0)
|
|
819
|
+
return N;
|
|
820
|
+
const B = N, F = B.columns;
|
|
821
|
+
if (!F || F.length === 0 || F.length === y.length && F.every((Y, J) => Y.id === y[J]?.id))
|
|
822
|
+
return N;
|
|
823
|
+
const X = new Map(F.map($t)), q = [];
|
|
824
|
+
for (const Y of y) {
|
|
825
|
+
const J = X.get(Y.id);
|
|
826
|
+
J && (q.push(J), X.delete(Y.id));
|
|
825
827
|
}
|
|
826
|
-
for (const
|
|
827
|
-
|
|
828
|
-
const
|
|
828
|
+
for (const Y of X.values())
|
|
829
|
+
q.push(Y);
|
|
830
|
+
const te = q.length === y.length && q.every((Y, J) => Y.id === y[J]?.id);
|
|
829
831
|
return {
|
|
830
|
-
...
|
|
831
|
-
columns:
|
|
832
|
+
...B,
|
|
833
|
+
columns: te ? y : q
|
|
832
834
|
};
|
|
833
|
-
}, e[0] = t, e[1] =
|
|
834
|
-
const
|
|
835
|
-
let
|
|
836
|
-
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
837
|
-
coordinateGetter:
|
|
838
|
-
}, e[2] =
|
|
839
|
-
const
|
|
840
|
-
let
|
|
841
|
-
e[3] !== o ? (
|
|
842
|
-
const
|
|
843
|
-
let
|
|
844
|
-
e[5] !== t || e[6] !==
|
|
845
|
-
id:
|
|
835
|
+
}, e[0] = t, e[1] = i) : i = e[1];
|
|
836
|
+
const l = i;
|
|
837
|
+
let a;
|
|
838
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = {
|
|
839
|
+
coordinateGetter: dt
|
|
840
|
+
}, e[2] = a) : a = e[2];
|
|
841
|
+
const d = lt(ye(rt), ye(it, a));
|
|
842
|
+
let g;
|
|
843
|
+
e[3] !== o ? (g = o?.map(Ft) ?? [], e[3] = o, e[4] = g) : g = e[4];
|
|
844
|
+
const f = g;
|
|
845
|
+
let h, m;
|
|
846
|
+
e[5] !== t || e[6] !== l ? (h = () => (p.registerTool(t, {
|
|
847
|
+
id: Ee,
|
|
846
848
|
type: "config",
|
|
847
849
|
order: 100,
|
|
848
850
|
enabled: !0,
|
|
849
|
-
fn:
|
|
850
|
-
}), () =>
|
|
851
|
-
let
|
|
852
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
853
|
-
|
|
854
|
-
}, e[9] =
|
|
855
|
-
const
|
|
856
|
-
let
|
|
857
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
858
|
-
|
|
859
|
-
}, e[10] =
|
|
860
|
-
const
|
|
861
|
-
let
|
|
862
|
-
e[11] !== o || e[12] !== t ? (
|
|
851
|
+
fn: l
|
|
852
|
+
}), () => p.unregisterTool(t, Ee)), m = [t, l], e[5] = t, e[6] = l, e[7] = h, e[8] = m) : (h = e[7], m = e[8]), H(h, m);
|
|
853
|
+
let I;
|
|
854
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = (N) => {
|
|
855
|
+
N.stopPropagation(), S(N.currentTarget);
|
|
856
|
+
}, e[9] = I) : I = e[9];
|
|
857
|
+
const s = I;
|
|
858
|
+
let w;
|
|
859
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = () => {
|
|
860
|
+
S(null);
|
|
861
|
+
}, e[10] = w) : w = e[10];
|
|
862
|
+
const L = w;
|
|
863
|
+
let P;
|
|
864
|
+
e[11] !== o || e[12] !== t ? (P = (N) => {
|
|
863
865
|
const {
|
|
864
|
-
active:
|
|
865
|
-
over:
|
|
866
|
-
} =
|
|
867
|
-
if (!
|
|
866
|
+
active: K,
|
|
867
|
+
over: y
|
|
868
|
+
} = N;
|
|
869
|
+
if (!y || K.id === y.id || !o)
|
|
868
870
|
return;
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
columns:
|
|
871
|
+
const B = o.findIndex((V) => V.id === K.id), F = o.findIndex((V) => V.id === y.id);
|
|
872
|
+
if (B !== -1 && F !== -1) {
|
|
873
|
+
const V = ut(o, B, F);
|
|
874
|
+
p.setWidget(t, {
|
|
875
|
+
columns: V
|
|
874
876
|
});
|
|
875
877
|
}
|
|
876
|
-
}, e[11] = o, e[12] = t, e[13] =
|
|
877
|
-
const
|
|
878
|
+
}, e[11] = o, e[12] = t, e[13] = P) : P = e[13];
|
|
879
|
+
const D = P;
|
|
878
880
|
if (!o || o.length < 2)
|
|
879
881
|
return null;
|
|
880
|
-
const
|
|
881
|
-
let
|
|
882
|
-
e[14] !==
|
|
883
|
-
let
|
|
884
|
-
e[16] !==
|
|
885
|
-
let
|
|
886
|
-
e[23] !==
|
|
887
|
-
let
|
|
888
|
-
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
882
|
+
const O = r?.tooltip ?? "Change column", E = !!C, R = r?.ariaLabel ?? O, k = E ? "change-column-menu" : void 0, v = E ? "true" : void 0;
|
|
883
|
+
let T;
|
|
884
|
+
e[14] !== u ? (T = u ?? /* @__PURE__ */ x(Ve, { children: /* @__PURE__ */ x(Mt, {}) }), e[14] = u, e[15] = T) : T = e[15];
|
|
885
|
+
let _;
|
|
886
|
+
e[16] !== c || e[17] !== E || e[18] !== k || e[19] !== v || e[20] !== T || e[21] !== R ? (_ = /* @__PURE__ */ x(ee, { size: "small", "aria-label": R, "aria-controls": k, "aria-haspopup": "true", "aria-expanded": v, onClick: s, "data-active": E, sx: se.trigger, ...c, children: T }), e[16] = c, e[17] = E, e[18] = k, e[19] = v, e[20] = T, e[21] = R, e[22] = _) : _ = e[22];
|
|
887
|
+
let z;
|
|
888
|
+
e[23] !== _ || e[24] !== O ? (z = /* @__PURE__ */ x(re, { title: O, children: _ }), e[23] = _, e[24] = O, e[25] = z) : z = e[25];
|
|
889
|
+
let M, A, W;
|
|
890
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = {
|
|
889
891
|
vertical: "bottom",
|
|
890
892
|
horizontal: "right"
|
|
891
|
-
},
|
|
893
|
+
}, A = {
|
|
892
894
|
vertical: "top",
|
|
893
895
|
horizontal: "right"
|
|
894
|
-
},
|
|
896
|
+
}, W = {
|
|
895
897
|
paper: {
|
|
896
898
|
sx: {
|
|
897
899
|
overflow: "hidden"
|
|
898
900
|
}
|
|
899
901
|
}
|
|
900
|
-
}, e[26] =
|
|
901
|
-
let
|
|
902
|
-
e[29] !== o ? (
|
|
903
|
-
let
|
|
904
|
-
e[31] !==
|
|
905
|
-
let
|
|
906
|
-
e[34] !==
|
|
902
|
+
}, e[26] = M, e[27] = A, e[28] = W) : (M = e[26], A = e[27], W = e[28]);
|
|
903
|
+
let U;
|
|
904
|
+
e[29] !== o ? (U = o.map(Wt), e[29] = o, e[30] = U) : U = e[30];
|
|
905
|
+
let j;
|
|
906
|
+
e[31] !== f || e[32] !== U ? (j = /* @__PURE__ */ x(ft, { items: f, strategy: gt, children: U }), e[31] = f, e[32] = U, e[33] = j) : j = e[33];
|
|
907
|
+
let $;
|
|
908
|
+
e[34] !== b || e[35] !== C || e[36] !== E || e[37] !== j ? ($ = /* @__PURE__ */ x(Re, { id: "change-column-menu", anchorEl: C, open: E, onClose: L, anchorOrigin: M, transformOrigin: A, slotProps: W, ...b, children: j }), e[34] = b, e[35] = C, e[36] = E, e[37] = j, e[38] = $) : $ = e[38];
|
|
907
909
|
let G;
|
|
908
|
-
e[39] !==
|
|
909
|
-
let
|
|
910
|
-
return e[43] !==
|
|
911
|
-
|
|
910
|
+
e[39] !== D || e[40] !== d || e[41] !== $ ? (G = /* @__PURE__ */ x(st, { sensors: d, collisionDetection: ct, onDragEnd: D, children: $ }), e[39] = D, e[40] = d, e[41] = $, e[42] = G) : G = e[42];
|
|
911
|
+
let Z;
|
|
912
|
+
return e[43] !== z || e[44] !== G ? (Z = /* @__PURE__ */ oe(ue, { children: [
|
|
913
|
+
z,
|
|
912
914
|
G
|
|
913
|
-
] }), e[43] =
|
|
915
|
+
] }), e[43] = z, e[44] = G, e[45] = Z) : Z = e[45], Z;
|
|
914
916
|
}
|
|
915
|
-
function
|
|
916
|
-
return /* @__PURE__ */
|
|
917
|
+
function Wt(n) {
|
|
918
|
+
return /* @__PURE__ */ x(At, { column: n }, n.id);
|
|
917
919
|
}
|
|
918
|
-
function
|
|
920
|
+
function Ft(n) {
|
|
919
921
|
return n.id;
|
|
920
922
|
}
|
|
921
|
-
function
|
|
923
|
+
function $t(n) {
|
|
922
924
|
return [n.id, n];
|
|
923
925
|
}
|
|
924
|
-
function
|
|
926
|
+
function Nt(n) {
|
|
925
927
|
return {
|
|
926
928
|
columns: n?.columns
|
|
927
929
|
};
|
|
928
930
|
}
|
|
929
|
-
const
|
|
931
|
+
const Ce = {
|
|
930
932
|
container: {
|
|
931
933
|
display: "flex",
|
|
932
934
|
alignItems: "center",
|
|
@@ -939,145 +941,376 @@ const _e = {
|
|
|
939
941
|
background: (n) => n.palette.primary.relatedLight
|
|
940
942
|
}
|
|
941
943
|
}
|
|
942
|
-
},
|
|
943
|
-
|
|
944
|
-
|
|
944
|
+
}, Le = {
|
|
945
|
+
// `top` and `height` are filled in at render time from the chart's plot
|
|
946
|
+
// rect so rectangles don't bleed over the legend / axis labels.
|
|
947
|
+
//
|
|
948
|
+
// Colors track ECharts 6's `backgroundTint` token (used by the default
|
|
949
|
+
// brush) — a barely-visible pale blue-gray translucent fill that washes
|
|
950
|
+
// bars underneath rather than masking them. Border is a hairline dark
|
|
951
|
+
// alpha so the selection edges are just findable, not prominent.
|
|
952
|
+
rect: {
|
|
953
|
+
position: "absolute",
|
|
954
|
+
background: "rgba(234, 237, 245, 0.2)",
|
|
955
|
+
border: "1px dashed rgba(0, 0, 0, 0.15)",
|
|
956
|
+
pointerEvents: "none"
|
|
957
|
+
},
|
|
958
|
+
// Live drag preview — identical to committed rect (no "in-progress" vs
|
|
959
|
+
// "committed" visual distinction; the preview just disappears on
|
|
960
|
+
// `pointerup` as the rect takes its place).
|
|
961
|
+
rectPreview: {
|
|
962
|
+
position: "absolute",
|
|
963
|
+
background: "rgba(234, 237, 245, 0.6)",
|
|
964
|
+
border: "1px dashed rgba(0, 0, 0, 0.15)",
|
|
965
|
+
pointerEvents: "none"
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
function Gt(n, e, t) {
|
|
969
|
+
if (t <= 0) return [];
|
|
970
|
+
const [r, u] = n <= e ? [n, e] : [e, n], c = Math.max(0, Math.floor(r)), b = Math.min(t - 1, Math.ceil(u));
|
|
971
|
+
if (c > b) return [];
|
|
972
|
+
const C = [];
|
|
973
|
+
for (let S = c; S <= b; S += 1) C.push(S);
|
|
974
|
+
return C;
|
|
975
|
+
}
|
|
976
|
+
function Zt(n, e) {
|
|
977
|
+
if (n.length === 0) return [];
|
|
978
|
+
const t = /* @__PURE__ */ new Set();
|
|
979
|
+
for (const r of n)
|
|
980
|
+
for (const u of Gt(r.xStart, r.xEnd, e))
|
|
981
|
+
t.add(u);
|
|
982
|
+
return Array.from(t).sort((r, u) => r - u);
|
|
983
|
+
}
|
|
984
|
+
const Vt = 2, Ht = Object.freeze([]), ke = Object.freeze([]);
|
|
985
|
+
function jt(n) {
|
|
986
|
+
try {
|
|
987
|
+
const r = n.getModel().getComponent("grid", 0)?.coordinateSystem?.getRect();
|
|
988
|
+
return !r || !Number.isFinite(r.x) || !Number.isFinite(r.y) || !Number.isFinite(r.width) || !Number.isFinite(r.height) ? null : {
|
|
989
|
+
x: r.x,
|
|
990
|
+
y: r.y,
|
|
991
|
+
width: r.width,
|
|
992
|
+
height: r.height
|
|
993
|
+
};
|
|
994
|
+
} catch {
|
|
995
|
+
return null;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
function Ut(n, e) {
|
|
999
|
+
return n === e ? !0 : !n || !e ? !1 : n.x === e.x && n.y === e.y && n.width === e.width && n.height === e.height;
|
|
1000
|
+
}
|
|
1001
|
+
function Xt(n) {
|
|
1002
|
+
const e = Q(55), {
|
|
945
1003
|
id: t,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
e[1] !== o || e[2] !== t || e[3] !== f ? (l = () => {
|
|
961
|
-
const h = !o;
|
|
962
|
-
g.setWidget(t, {
|
|
963
|
-
brush: h
|
|
964
|
-
}), h && f?.({
|
|
965
|
-
dataIndex: [],
|
|
966
|
-
seriesIndex: 0
|
|
967
|
-
});
|
|
968
|
-
}, e[1] = o, e[2] = t, e[3] = f, e[4] = l) : l = e[4];
|
|
969
|
-
const r = l;
|
|
970
|
-
let s, a;
|
|
971
|
-
e[5] !== o || e[6] !== t ? (s = () => {
|
|
1004
|
+
multiBrush: r
|
|
1005
|
+
} = n, {
|
|
1006
|
+
enabled: u,
|
|
1007
|
+
rects: c,
|
|
1008
|
+
dataLength: b
|
|
1009
|
+
} = ne(t, Jt), C = qt;
|
|
1010
|
+
let S;
|
|
1011
|
+
e[0] !== t ? (S = () => p.getWidget(t)?.refUI?.current ?? null, e[0] = t, e[1] = S) : S = e[1];
|
|
1012
|
+
const o = ve(C, S, Kt);
|
|
1013
|
+
let i;
|
|
1014
|
+
e[2] !== t ? (i = () => p.getWidget(t)?.instance?.current ?? null, e[2] = t, e[3] = i) : i = e[3];
|
|
1015
|
+
const l = ve(C, i, Yt), a = le(null), d = le(null), g = le(null), [f, h] = ie(ke), [m, I] = ie(null), [s, w] = ie(null);
|
|
1016
|
+
let L, P;
|
|
1017
|
+
e[4] !== o || e[5] !== t ? (L = () => {
|
|
972
1018
|
if (!o)
|
|
973
1019
|
return;
|
|
974
|
-
const
|
|
975
|
-
if (!
|
|
1020
|
+
const y = document.getElementById(t);
|
|
1021
|
+
if (!y)
|
|
976
1022
|
return;
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
type: "takeGlobalCursor",
|
|
981
|
-
key: "brush",
|
|
982
|
-
brushOption: {
|
|
983
|
-
brushType: L.brush.brushType,
|
|
984
|
-
brushMode: L.brush.brushMode
|
|
985
|
-
}
|
|
986
|
-
});
|
|
1023
|
+
const B = y.style.position;
|
|
1024
|
+
return B || (y.style.position = "relative"), () => {
|
|
1025
|
+
B || (y.style.position = "");
|
|
987
1026
|
};
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
let u;
|
|
993
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = (h) => {
|
|
994
|
-
const L = h.batch?.flatMap(Rt) ?? [];
|
|
995
|
-
if (!L.length) {
|
|
996
|
-
T.current = {
|
|
997
|
-
dataIndex: [],
|
|
998
|
-
seriesIndex: 0
|
|
999
|
-
};
|
|
1027
|
+
}, P = [t, o], e[4] = o, e[5] = t, e[6] = L, e[7] = P) : (L = e[6], P = e[7]), H(L, P);
|
|
1028
|
+
let D, O;
|
|
1029
|
+
e[8] !== o || e[9] !== l || e[10] !== c ? (D = () => {
|
|
1030
|
+
if (!l || !o)
|
|
1000
1031
|
return;
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1032
|
+
const y = () => {
|
|
1033
|
+
const F = jt(l);
|
|
1034
|
+
if (w((X) => Ut(X, F) ? X : F), !F)
|
|
1035
|
+
return;
|
|
1036
|
+
const V = [];
|
|
1037
|
+
for (const X of c) {
|
|
1038
|
+
const q = l.convertToPixel({
|
|
1039
|
+
xAxisIndex: 0
|
|
1040
|
+
}, X.xStart), te = l.convertToPixel({
|
|
1041
|
+
xAxisIndex: 0
|
|
1042
|
+
}, X.xEnd);
|
|
1043
|
+
if (typeof q != "number" || typeof te != "number" || !Number.isFinite(q) || !Number.isFinite(te))
|
|
1044
|
+
continue;
|
|
1045
|
+
const Y = Math.max(F.x, Math.min(q, te)), J = Math.min(F.x + F.width, Math.max(q, te));
|
|
1046
|
+
J <= Y || V.push({
|
|
1047
|
+
left: Y,
|
|
1048
|
+
right: J
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
h(V.length === 0 ? ke : V);
|
|
1006
1052
|
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1053
|
+
y(), l.on("finished", y);
|
|
1054
|
+
const B = pt(o, y);
|
|
1055
|
+
return () => {
|
|
1056
|
+
l.off("finished", y), B();
|
|
1057
|
+
};
|
|
1058
|
+
}, O = [l, o, c], e[8] = o, e[9] = l, e[10] = c, e[11] = D, e[12] = O) : (D = e[11], O = e[12]), H(D, O);
|
|
1059
|
+
let E;
|
|
1060
|
+
e[13] !== o || e[14] !== u || e[15] !== l || e[16] !== s ? (E = (y) => {
|
|
1061
|
+
if (!u || !o || !s)
|
|
1062
|
+
return;
|
|
1063
|
+
const B = a.current;
|
|
1064
|
+
if (!B)
|
|
1065
|
+
return;
|
|
1066
|
+
y.preventDefault(), B.setPointerCapture(y.pointerId), g.current = y.pointerId, l?.dispatchAction({
|
|
1067
|
+
type: "hideTip"
|
|
1013
1068
|
});
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
},
|
|
1034
|
-
onEvents: B
|
|
1035
|
-
};
|
|
1069
|
+
const F = o.getBoundingClientRect(), V = Se(y.clientX - F.left, s);
|
|
1070
|
+
d.current = V, I({
|
|
1071
|
+
left: V,
|
|
1072
|
+
right: V
|
|
1073
|
+
});
|
|
1074
|
+
}, e[13] = o, e[14] = u, e[15] = l, e[16] = s, e[17] = E) : E = e[17];
|
|
1075
|
+
const R = E;
|
|
1076
|
+
let k;
|
|
1077
|
+
e[18] !== o || e[19] !== l || e[20] !== s ? (k = (y) => {
|
|
1078
|
+
if (g.current === null) {
|
|
1079
|
+
if (l && o) {
|
|
1080
|
+
const X = o.getBoundingClientRect();
|
|
1081
|
+
l.dispatchAction({
|
|
1082
|
+
type: "showTip",
|
|
1083
|
+
x: y.clientX - X.left,
|
|
1084
|
+
y: y.clientY - X.top
|
|
1085
|
+
});
|
|
1086
|
+
}
|
|
1087
|
+
return;
|
|
1036
1088
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1089
|
+
if (g.current !== y.pointerId)
|
|
1090
|
+
return;
|
|
1091
|
+
const B = d.current;
|
|
1092
|
+
if (B === null || !o || !s)
|
|
1093
|
+
return;
|
|
1094
|
+
const F = o.getBoundingClientRect(), V = Se(y.clientX - F.left, s);
|
|
1095
|
+
I({
|
|
1096
|
+
left: Math.min(B, V),
|
|
1097
|
+
right: Math.max(B, V)
|
|
1098
|
+
});
|
|
1099
|
+
}, e[18] = o, e[19] = l, e[20] = s, e[21] = k) : k = e[21];
|
|
1100
|
+
const v = k;
|
|
1101
|
+
let T;
|
|
1102
|
+
e[22] !== l ? (T = () => {
|
|
1103
|
+
g.current === null && l?.dispatchAction({
|
|
1104
|
+
type: "hideTip"
|
|
1105
|
+
});
|
|
1106
|
+
}, e[22] = l, e[23] = T) : T = e[23];
|
|
1107
|
+
const _ = T;
|
|
1045
1108
|
let z;
|
|
1046
|
-
e[
|
|
1047
|
-
|
|
1048
|
-
|
|
1109
|
+
e[24] !== o || e[25] !== b || e[26] !== t || e[27] !== l || e[28] !== r || e[29] !== s || e[30] !== c ? (z = (y) => {
|
|
1110
|
+
if (g.current !== y.pointerId)
|
|
1111
|
+
return;
|
|
1112
|
+
const B = d.current, F = a.current;
|
|
1113
|
+
if (g.current = null, d.current = null, I(null), B === null || !F || !l || !o || !s)
|
|
1114
|
+
return;
|
|
1115
|
+
try {
|
|
1116
|
+
F.releasePointerCapture(y.pointerId);
|
|
1117
|
+
} catch {
|
|
1118
|
+
}
|
|
1119
|
+
const V = o.getBoundingClientRect(), X = Se(y.clientX - V.left, s), q = Math.min(B, X), te = Math.max(B, X);
|
|
1120
|
+
if (te - q < Vt)
|
|
1121
|
+
return;
|
|
1122
|
+
const Y = l.convertFromPixel({
|
|
1123
|
+
xAxisIndex: 0
|
|
1124
|
+
}, q), J = l.convertFromPixel({
|
|
1125
|
+
xAxisIndex: 0
|
|
1126
|
+
}, te);
|
|
1127
|
+
if (typeof Y != "number" || typeof J != "number" || !Number.isFinite(Y) || !Number.isFinite(J))
|
|
1128
|
+
return;
|
|
1129
|
+
const ce = {
|
|
1130
|
+
xStart: Y,
|
|
1131
|
+
xEnd: J
|
|
1132
|
+
}, fe = r ? [...c, ce] : [ce], ge = {
|
|
1133
|
+
dataIndex: Zt(fe, b),
|
|
1134
|
+
seriesIndex: 0
|
|
1135
|
+
};
|
|
1136
|
+
p.setWidget(t, {
|
|
1137
|
+
brushRects: fe,
|
|
1138
|
+
brushSelection: ge,
|
|
1139
|
+
...r ? {} : {
|
|
1140
|
+
brush: !1
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
}, e[24] = o, e[25] = b, e[26] = t, e[27] = l, e[28] = r, e[29] = s, e[30] = c, e[31] = z) : z = e[31];
|
|
1144
|
+
const M = z;
|
|
1145
|
+
if (!o)
|
|
1146
|
+
return null;
|
|
1147
|
+
let A;
|
|
1148
|
+
e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
|
|
1149
|
+
position: "absolute",
|
|
1150
|
+
inset: 0,
|
|
1151
|
+
pointerEvents: "none",
|
|
1152
|
+
zIndex: 1
|
|
1153
|
+
}, e[32] = A) : A = e[32];
|
|
1154
|
+
const W = A;
|
|
1155
|
+
let U;
|
|
1156
|
+
e[33] !== u || e[34] !== s ? (U = s ? {
|
|
1157
|
+
position: "absolute",
|
|
1158
|
+
left: s.x,
|
|
1159
|
+
top: s.y,
|
|
1160
|
+
width: s.width,
|
|
1161
|
+
height: s.height,
|
|
1162
|
+
pointerEvents: u ? "auto" : "none",
|
|
1163
|
+
cursor: u ? "crosshair" : "default",
|
|
1164
|
+
userSelect: "none",
|
|
1165
|
+
touchAction: "none"
|
|
1166
|
+
} : void 0, e[33] = u, e[34] = s, e[35] = U) : U = e[35];
|
|
1167
|
+
const j = U;
|
|
1168
|
+
let $;
|
|
1169
|
+
e[36] !== j || e[37] !== R || e[38] !== _ || e[39] !== v || e[40] !== M ? ($ = j && /* @__PURE__ */ x("div", { ref: a, style: j, onPointerDown: R, onPointerMove: v, onPointerUp: M, onPointerCancel: M, onPointerLeave: _ }), e[36] = j, e[37] = R, e[38] = _, e[39] = v, e[40] = M, e[41] = $) : $ = e[41];
|
|
1170
|
+
let G;
|
|
1171
|
+
e[42] !== s || e[43] !== f ? (G = s && f.map((y, B) => /* @__PURE__ */ x("div", { style: {
|
|
1172
|
+
...Le.rect,
|
|
1173
|
+
left: y.left,
|
|
1174
|
+
width: Math.max(0, y.right - y.left),
|
|
1175
|
+
top: s.y,
|
|
1176
|
+
height: s.height
|
|
1177
|
+
} }, `${y.left}-${y.right}-${B}`)), e[42] = s, e[43] = f, e[44] = G) : G = e[44];
|
|
1178
|
+
let Z;
|
|
1179
|
+
e[45] !== m || e[46] !== s ? (Z = s && m && /* @__PURE__ */ x("div", { style: {
|
|
1180
|
+
...Le.rectPreview,
|
|
1181
|
+
left: m.left,
|
|
1182
|
+
width: Math.max(0, m.right - m.left),
|
|
1183
|
+
top: s.y,
|
|
1184
|
+
height: s.height
|
|
1185
|
+
} }), e[45] = m, e[46] = s, e[47] = Z) : Z = e[47];
|
|
1186
|
+
let N;
|
|
1187
|
+
e[48] !== $ || e[49] !== G || e[50] !== Z ? (N = /* @__PURE__ */ oe("div", { style: W, children: [
|
|
1188
|
+
$,
|
|
1189
|
+
G,
|
|
1190
|
+
Z
|
|
1191
|
+
] }), e[48] = $, e[49] = G, e[50] = Z, e[51] = N) : N = e[51];
|
|
1192
|
+
let K;
|
|
1193
|
+
return e[52] !== o || e[53] !== N ? (K = ht(N, o), e[52] = o, e[53] = N, e[54] = K) : K = e[54], K;
|
|
1049
1194
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1195
|
+
function Yt() {
|
|
1196
|
+
return null;
|
|
1052
1197
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1198
|
+
function Kt() {
|
|
1199
|
+
return null;
|
|
1055
1200
|
}
|
|
1056
|
-
function
|
|
1201
|
+
function qt(n) {
|
|
1202
|
+
return He.subscribe(n);
|
|
1203
|
+
}
|
|
1204
|
+
function Jt(n) {
|
|
1205
|
+
const e = n, r = n?.data?.[0], u = Array.isArray(r) ? r.length : 0;
|
|
1057
1206
|
return {
|
|
1058
|
-
|
|
1207
|
+
enabled: e?.brush ?? !1,
|
|
1208
|
+
rects: e?.brushRects ?? Ht,
|
|
1209
|
+
dataLength: u
|
|
1059
1210
|
};
|
|
1060
1211
|
}
|
|
1212
|
+
function Se(n, e) {
|
|
1213
|
+
return Math.max(e.x, Math.min(e.x + e.width, n));
|
|
1214
|
+
}
|
|
1215
|
+
const Cn = "brush-toggle";
|
|
1216
|
+
function Ln(n) {
|
|
1217
|
+
const e = Q(35), {
|
|
1218
|
+
id: t,
|
|
1219
|
+
onBrushSelected: r,
|
|
1220
|
+
multiBrush: u,
|
|
1221
|
+
selections: c,
|
|
1222
|
+
defaultEnabled: b,
|
|
1223
|
+
labels: C,
|
|
1224
|
+
Icon: S,
|
|
1225
|
+
IconButtonProps: o
|
|
1226
|
+
} = n, i = b === void 0 ? !1 : b;
|
|
1227
|
+
let l;
|
|
1228
|
+
e[0] !== i ? (l = (M) => {
|
|
1229
|
+
const A = M;
|
|
1230
|
+
return {
|
|
1231
|
+
brush: A?.brush ?? i,
|
|
1232
|
+
selection: A?.brushSelection
|
|
1233
|
+
};
|
|
1234
|
+
}, e[0] = i, e[1] = l) : l = e[1];
|
|
1235
|
+
const {
|
|
1236
|
+
brush: a,
|
|
1237
|
+
selection: d
|
|
1238
|
+
} = ne(t, l);
|
|
1239
|
+
let g, f;
|
|
1240
|
+
e[2] !== i || e[3] !== t ? (g = () => {
|
|
1241
|
+
p.getWidget(t)?.brush === void 0 && p.setWidget(t, {
|
|
1242
|
+
brush: i
|
|
1243
|
+
});
|
|
1244
|
+
}, f = [t, i], e[2] = i, e[3] = t, e[4] = g, e[5] = f) : (g = e[4], f = e[5]), H(g, f);
|
|
1245
|
+
let h;
|
|
1246
|
+
e[6] !== a || e[7] !== t || e[8] !== r ? (h = () => {
|
|
1247
|
+
a ? p.setWidget(t, {
|
|
1248
|
+
brush: !1
|
|
1249
|
+
}) : (p.setWidget(t, {
|
|
1250
|
+
brush: !0,
|
|
1251
|
+
brushRects: [],
|
|
1252
|
+
brushSelection: {
|
|
1253
|
+
dataIndex: [],
|
|
1254
|
+
seriesIndex: 0
|
|
1255
|
+
}
|
|
1256
|
+
}), r?.({
|
|
1257
|
+
dataIndex: [],
|
|
1258
|
+
seriesIndex: 0
|
|
1259
|
+
}));
|
|
1260
|
+
}, e[6] = a, e[7] = t, e[8] = r, e[9] = h) : h = e[9];
|
|
1261
|
+
const m = h, I = le(void 0);
|
|
1262
|
+
let s, w;
|
|
1263
|
+
e[10] !== r || e[11] !== d ? (s = () => {
|
|
1264
|
+
d && I.current !== d && (I.current = d, r?.(d));
|
|
1265
|
+
}, w = [d, r], e[10] = r, e[11] = d, e[12] = s, e[13] = w) : (s = e[12], w = e[13]), H(s, w);
|
|
1266
|
+
let L, P;
|
|
1267
|
+
e[14] !== t || e[15] !== c ? (L = () => {
|
|
1268
|
+
if (c !== 0)
|
|
1269
|
+
return;
|
|
1270
|
+
const M = p.getWidget(t), A = (M?.brushRects?.length ?? 0) > 0, W = (M?.brushSelection?.dataIndex?.length ?? 0) > 0;
|
|
1271
|
+
!A && !W || p.setWidget(t, {
|
|
1272
|
+
brushRects: [],
|
|
1273
|
+
brushSelection: {
|
|
1274
|
+
dataIndex: [],
|
|
1275
|
+
seriesIndex: 0
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
}, P = [c, t], e[14] = t, e[15] = c, e[16] = L, e[17] = P) : (L = e[16], P = e[17]), H(L, P);
|
|
1279
|
+
const D = C?.enable ?? "Enable brush selection", O = C?.disable ?? "Disable brush selection", E = a ? O : D, R = C?.ariaLabel ?? E;
|
|
1280
|
+
let k;
|
|
1281
|
+
e[18] !== S ? (k = S ?? /* @__PURE__ */ x(et, {}), e[18] = S, e[19] = k) : k = e[19];
|
|
1282
|
+
let v;
|
|
1283
|
+
e[20] !== o || e[21] !== a || e[22] !== m || e[23] !== R || e[24] !== k ? (v = /* @__PURE__ */ x(ee, { size: "small", "aria-label": R, onClick: m, sx: Ce.trigger, "data-active": a, ...o, children: k }), e[20] = o, e[21] = a, e[22] = m, e[23] = R, e[24] = k, e[25] = v) : v = e[25];
|
|
1284
|
+
let T;
|
|
1285
|
+
e[26] !== v || e[27] !== E ? (T = /* @__PURE__ */ x(De, { sx: Ce.container, children: /* @__PURE__ */ x(re, { title: E, children: v }) }), e[26] = v, e[27] = E, e[28] = T) : T = e[28];
|
|
1286
|
+
let _;
|
|
1287
|
+
e[29] !== t || e[30] !== u ? (_ = /* @__PURE__ */ x(Xt, { id: t, multiBrush: u }), e[29] = t, e[30] = u, e[31] = _) : _ = e[31];
|
|
1288
|
+
let z;
|
|
1289
|
+
return e[32] !== T || e[33] !== _ ? (z = /* @__PURE__ */ oe(ue, { children: [
|
|
1290
|
+
T,
|
|
1291
|
+
_
|
|
1292
|
+
] }), e[32] = T, e[33] = _, e[34] = z) : z = e[34], z;
|
|
1293
|
+
}
|
|
1061
1294
|
export {
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1295
|
+
Cn as BRUSH_TOGGLE_TOOL_ID,
|
|
1296
|
+
Ln as BrushToggle,
|
|
1297
|
+
Ee as CHANGE_COLUMN_TOOL_ID,
|
|
1298
|
+
En as ChangeColumn,
|
|
1299
|
+
Sn as Download,
|
|
1300
|
+
bn as FullScreen,
|
|
1301
|
+
de as LOCK_SELECTION_TOOL_ID,
|
|
1302
|
+
In as LockSelection,
|
|
1303
|
+
Te as RELATIVE_DATA_CONFIG_TOOL_ID,
|
|
1304
|
+
me as RELATIVE_DATA_TOOL_ID,
|
|
1305
|
+
xn as RelativeData,
|
|
1306
|
+
be as SEARCHER_TOOL_ID,
|
|
1307
|
+
pe as STACK_TOGGLE_TOOL_ID,
|
|
1308
|
+
Tn as Searcher,
|
|
1309
|
+
_n as SearcherToggle,
|
|
1310
|
+
yn as StackToggle,
|
|
1311
|
+
he as ZOOM_TOGGLE_TOOL_ID,
|
|
1312
|
+
vn as ZoomToggle,
|
|
1313
|
+
Pn as downloadToCSV,
|
|
1314
|
+
Rn as downloadToPNG
|
|
1082
1315
|
};
|
|
1083
1316
|
//# sourceMappingURL=actions.js.map
|