@hortiview/shared-components 0.0.11155 → 0.0.11528
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 +41 -8
- package/dist/BigLoadingSpinner-D7H28pr5.js +16 -0
- package/dist/{GenericCard-B8x1DMa8.js → GenericCard-jlt8ZsHi.js} +18 -19
- package/dist/ListAreaService-YS_UUPh5.js +107 -0
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/Select.css +1 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
- package/dist/components/AlertBanner/AlertBanner.js +7 -8
- package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +24 -25
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
- package/dist/components/BasicHeading/BasicHeading.js +11 -12
- package/dist/components/BasicHeading/BasicHeading.test.js +3 -3
- package/dist/components/BlockView/BlockView.d.ts +1 -0
- package/dist/components/BlockView/BlockView.js +24 -25
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +6 -7
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
- package/dist/components/ContextMenu/ContextMenu.js +11 -12
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.d.ts +6 -2
- package/dist/components/DeleteModal/DeleteModal.js +48 -46
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +9 -10
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.d.ts +1 -0
- package/dist/components/EmptyView/EmptyView.js +1 -1
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.d.ts +1 -0
- package/dist/components/Filter/Filter.js +62 -62
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +629 -630
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +11 -12
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
- package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +5 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1 -1
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +14 -15
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +1 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -0
- package/dist/components/GenericTable/GenericTable.js +23 -24
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
- package/dist/components/GenericTable/GenericTableService.js +41 -41
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +2 -2
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.d.ts +6 -1
- package/dist/components/HashTabView/HashTabView.js +53 -53
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +12 -12
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +7 -8
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.d.ts +2 -2
- package/dist/components/Iconify/Iconify.js +4 -5
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
- package/dist/components/InfoGroup/InfoGroup.js +4 -5
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +2 -2
- package/dist/components/ListArea/ListArea.test.js +5 -5
- package/dist/components/ListArea/ListAreaService.d.ts +9 -8
- package/dist/components/ListArea/ListAreaService.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +5 -6
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Modal/Modal.js +5 -6
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +10 -11
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
- package/dist/components/Scrollbar/Scrollbar.js +5 -6
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +10 -11
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/Select.js +34 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +28 -0
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +1 -0
- package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
- package/dist/main.d.ts +2 -0
- package/dist/main.js +33 -31
- package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
- package/dist/react-tooltip.min-Czs4RGD1.js +1400 -0
- package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
- package/dist/services/BlockService.d.ts +1 -0
- package/dist/services/NumberService.d.ts +1 -0
- package/dist/services/UtilService.d.ts +1 -0
- package/dist/services/services.test.js +1 -1
- package/dist/types/GenericTable.d.ts +2 -2
- package/dist/types/HashTab.d.ts +0 -1
- package/dist/types/ListElement.d.ts +0 -1
- package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
- package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
- package/package.json +15 -15
- package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
- package/dist/ListAreaService-CRX4eEUJ.js +0 -108
- package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
|
@@ -1,1354 +0,0 @@
|
|
|
1
|
-
import Ee, { createContext as dn, useState as B, useRef as ne, useEffect as R, useContext as pn, useLayoutEffect as mn, useCallback as hn, useImperativeHandle as yn } from "react";
|
|
2
|
-
import { g as gn } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
3
|
-
const je = Math.min, Se = Math.max, pt = Math.round, dt = Math.floor, ye = (e) => ({
|
|
4
|
-
x: e,
|
|
5
|
-
y: e
|
|
6
|
-
}), wn = {
|
|
7
|
-
left: "right",
|
|
8
|
-
right: "left",
|
|
9
|
-
bottom: "top",
|
|
10
|
-
top: "bottom"
|
|
11
|
-
}, vn = {
|
|
12
|
-
start: "end",
|
|
13
|
-
end: "start"
|
|
14
|
-
};
|
|
15
|
-
function St(e, t, o) {
|
|
16
|
-
return Se(e, je(t, o));
|
|
17
|
-
}
|
|
18
|
-
function nt(e, t) {
|
|
19
|
-
return typeof e == "function" ? e(t) : e;
|
|
20
|
-
}
|
|
21
|
-
function Oe(e) {
|
|
22
|
-
return e.split("-")[0];
|
|
23
|
-
}
|
|
24
|
-
function ot(e) {
|
|
25
|
-
return e.split("-")[1];
|
|
26
|
-
}
|
|
27
|
-
function Qt(e) {
|
|
28
|
-
return e === "x" ? "y" : "x";
|
|
29
|
-
}
|
|
30
|
-
function Ct(e) {
|
|
31
|
-
return e === "y" ? "height" : "width";
|
|
32
|
-
}
|
|
33
|
-
function yt(e) {
|
|
34
|
-
return ["top", "bottom"].includes(Oe(e)) ? "y" : "x";
|
|
35
|
-
}
|
|
36
|
-
function Lt(e) {
|
|
37
|
-
return Qt(yt(e));
|
|
38
|
-
}
|
|
39
|
-
function bn(e, t, o) {
|
|
40
|
-
o === void 0 && (o = !1);
|
|
41
|
-
const n = ot(e), l = Lt(e), r = Ct(l);
|
|
42
|
-
let i = l === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
43
|
-
return t.reference[r] > t.floating[r] && (i = mt(i)), [i, mt(i)];
|
|
44
|
-
}
|
|
45
|
-
function xn(e) {
|
|
46
|
-
const t = mt(e);
|
|
47
|
-
return [Ot(e), t, Ot(t)];
|
|
48
|
-
}
|
|
49
|
-
function Ot(e) {
|
|
50
|
-
return e.replace(/start|end/g, (t) => vn[t]);
|
|
51
|
-
}
|
|
52
|
-
function _n(e, t, o) {
|
|
53
|
-
const n = ["left", "right"], l = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
54
|
-
switch (e) {
|
|
55
|
-
case "top":
|
|
56
|
-
case "bottom":
|
|
57
|
-
return o ? t ? l : n : t ? n : l;
|
|
58
|
-
case "left":
|
|
59
|
-
case "right":
|
|
60
|
-
return t ? r : i;
|
|
61
|
-
default:
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function An(e, t, o, n) {
|
|
66
|
-
const l = ot(e);
|
|
67
|
-
let r = _n(Oe(e), o === "start", n);
|
|
68
|
-
return l && (r = r.map((i) => i + "-" + l), t && (r = r.concat(r.map(Ot)))), r;
|
|
69
|
-
}
|
|
70
|
-
function mt(e) {
|
|
71
|
-
return e.replace(/left|right|bottom|top/g, (t) => wn[t]);
|
|
72
|
-
}
|
|
73
|
-
function En(e) {
|
|
74
|
-
return {
|
|
75
|
-
top: 0,
|
|
76
|
-
right: 0,
|
|
77
|
-
bottom: 0,
|
|
78
|
-
left: 0,
|
|
79
|
-
...e
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
function Jt(e) {
|
|
83
|
-
return typeof e != "number" ? En(e) : {
|
|
84
|
-
top: e,
|
|
85
|
-
right: e,
|
|
86
|
-
bottom: e,
|
|
87
|
-
left: e
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function ht(e) {
|
|
91
|
-
const {
|
|
92
|
-
x: t,
|
|
93
|
-
y: o,
|
|
94
|
-
width: n,
|
|
95
|
-
height: l
|
|
96
|
-
} = e;
|
|
97
|
-
return {
|
|
98
|
-
width: n,
|
|
99
|
-
height: l,
|
|
100
|
-
top: o,
|
|
101
|
-
left: t,
|
|
102
|
-
right: t + n,
|
|
103
|
-
bottom: o + l,
|
|
104
|
-
x: t,
|
|
105
|
-
y: o
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
function jt(e, t, o) {
|
|
109
|
-
let {
|
|
110
|
-
reference: n,
|
|
111
|
-
floating: l
|
|
112
|
-
} = e;
|
|
113
|
-
const r = yt(t), i = Lt(t), s = Ct(i), c = Oe(t), a = r === "y", p = n.x + n.width / 2 - l.width / 2, d = n.y + n.height / 2 - l.height / 2, b = n[s] / 2 - l[s] / 2;
|
|
114
|
-
let f;
|
|
115
|
-
switch (c) {
|
|
116
|
-
case "top":
|
|
117
|
-
f = {
|
|
118
|
-
x: p,
|
|
119
|
-
y: n.y - l.height
|
|
120
|
-
};
|
|
121
|
-
break;
|
|
122
|
-
case "bottom":
|
|
123
|
-
f = {
|
|
124
|
-
x: p,
|
|
125
|
-
y: n.y + n.height
|
|
126
|
-
};
|
|
127
|
-
break;
|
|
128
|
-
case "right":
|
|
129
|
-
f = {
|
|
130
|
-
x: n.x + n.width,
|
|
131
|
-
y: d
|
|
132
|
-
};
|
|
133
|
-
break;
|
|
134
|
-
case "left":
|
|
135
|
-
f = {
|
|
136
|
-
x: n.x - l.width,
|
|
137
|
-
y: d
|
|
138
|
-
};
|
|
139
|
-
break;
|
|
140
|
-
default:
|
|
141
|
-
f = {
|
|
142
|
-
x: n.x,
|
|
143
|
-
y: n.y
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
switch (ot(t)) {
|
|
147
|
-
case "start":
|
|
148
|
-
f[i] -= b * (o && a ? -1 : 1);
|
|
149
|
-
break;
|
|
150
|
-
case "end":
|
|
151
|
-
f[i] += b * (o && a ? -1 : 1);
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
return f;
|
|
155
|
-
}
|
|
156
|
-
const Sn = async (e, t, o) => {
|
|
157
|
-
const {
|
|
158
|
-
placement: n = "bottom",
|
|
159
|
-
strategy: l = "absolute",
|
|
160
|
-
middleware: r = [],
|
|
161
|
-
platform: i
|
|
162
|
-
} = o, s = r.filter(Boolean), c = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
163
|
-
let a = await i.getElementRects({
|
|
164
|
-
reference: e,
|
|
165
|
-
floating: t,
|
|
166
|
-
strategy: l
|
|
167
|
-
}), {
|
|
168
|
-
x: p,
|
|
169
|
-
y: d
|
|
170
|
-
} = jt(a, n, c), b = n, f = {}, m = 0;
|
|
171
|
-
for (let y = 0; y < s.length; y++) {
|
|
172
|
-
const {
|
|
173
|
-
name: x,
|
|
174
|
-
fn: w
|
|
175
|
-
} = s[y], {
|
|
176
|
-
x: _,
|
|
177
|
-
y: A,
|
|
178
|
-
data: O,
|
|
179
|
-
reset: S
|
|
180
|
-
} = await w({
|
|
181
|
-
x: p,
|
|
182
|
-
y: d,
|
|
183
|
-
initialPlacement: n,
|
|
184
|
-
placement: b,
|
|
185
|
-
strategy: l,
|
|
186
|
-
middlewareData: f,
|
|
187
|
-
rects: a,
|
|
188
|
-
platform: i,
|
|
189
|
-
elements: {
|
|
190
|
-
reference: e,
|
|
191
|
-
floating: t
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
p = _ ?? p, d = A ?? d, f = {
|
|
195
|
-
...f,
|
|
196
|
-
[x]: {
|
|
197
|
-
...f[x],
|
|
198
|
-
...O
|
|
199
|
-
}
|
|
200
|
-
}, S && m <= 50 && (m++, typeof S == "object" && (S.placement && (b = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
|
|
201
|
-
reference: e,
|
|
202
|
-
floating: t,
|
|
203
|
-
strategy: l
|
|
204
|
-
}) : S.rects), {
|
|
205
|
-
x: p,
|
|
206
|
-
y: d
|
|
207
|
-
} = jt(a, b, c)), y = -1);
|
|
208
|
-
}
|
|
209
|
-
return {
|
|
210
|
-
x: p,
|
|
211
|
-
y: d,
|
|
212
|
-
placement: b,
|
|
213
|
-
strategy: l,
|
|
214
|
-
middlewareData: f
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
async function en(e, t) {
|
|
218
|
-
var o;
|
|
219
|
-
t === void 0 && (t = {});
|
|
220
|
-
const {
|
|
221
|
-
x: n,
|
|
222
|
-
y: l,
|
|
223
|
-
platform: r,
|
|
224
|
-
rects: i,
|
|
225
|
-
elements: s,
|
|
226
|
-
strategy: c
|
|
227
|
-
} = e, {
|
|
228
|
-
boundary: a = "clippingAncestors",
|
|
229
|
-
rootBoundary: p = "viewport",
|
|
230
|
-
elementContext: d = "floating",
|
|
231
|
-
altBoundary: b = !1,
|
|
232
|
-
padding: f = 0
|
|
233
|
-
} = nt(t, e), m = Jt(f), x = s[b ? d === "floating" ? "reference" : "floating" : d], w = ht(await r.getClippingRect({
|
|
234
|
-
element: (o = await (r.isElement == null ? void 0 : r.isElement(x))) == null || o ? x : x.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(s.floating)),
|
|
235
|
-
boundary: a,
|
|
236
|
-
rootBoundary: p,
|
|
237
|
-
strategy: c
|
|
238
|
-
})), _ = d === "floating" ? {
|
|
239
|
-
x: n,
|
|
240
|
-
y: l,
|
|
241
|
-
width: i.floating.width,
|
|
242
|
-
height: i.floating.height
|
|
243
|
-
} : i.reference, A = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(s.floating)), O = await (r.isElement == null ? void 0 : r.isElement(A)) ? await (r.getScale == null ? void 0 : r.getScale(A)) || {
|
|
244
|
-
x: 1,
|
|
245
|
-
y: 1
|
|
246
|
-
} : {
|
|
247
|
-
x: 1,
|
|
248
|
-
y: 1
|
|
249
|
-
}, S = ht(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
250
|
-
elements: s,
|
|
251
|
-
rect: _,
|
|
252
|
-
offsetParent: A,
|
|
253
|
-
strategy: c
|
|
254
|
-
}) : _);
|
|
255
|
-
return {
|
|
256
|
-
top: (w.top - S.top + m.top) / O.y,
|
|
257
|
-
bottom: (S.bottom - w.bottom + m.bottom) / O.y,
|
|
258
|
-
left: (w.left - S.left + m.left) / O.x,
|
|
259
|
-
right: (S.right - w.right + m.right) / O.x
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
const On = (e) => ({
|
|
263
|
-
name: "arrow",
|
|
264
|
-
options: e,
|
|
265
|
-
async fn(t) {
|
|
266
|
-
const {
|
|
267
|
-
x: o,
|
|
268
|
-
y: n,
|
|
269
|
-
placement: l,
|
|
270
|
-
rects: r,
|
|
271
|
-
platform: i,
|
|
272
|
-
elements: s,
|
|
273
|
-
middlewareData: c
|
|
274
|
-
} = t, {
|
|
275
|
-
element: a,
|
|
276
|
-
padding: p = 0
|
|
277
|
-
} = nt(e, t) || {};
|
|
278
|
-
if (a == null)
|
|
279
|
-
return {};
|
|
280
|
-
const d = Jt(p), b = {
|
|
281
|
-
x: o,
|
|
282
|
-
y: n
|
|
283
|
-
}, f = Lt(l), m = Ct(f), y = await i.getDimensions(a), x = f === "y", w = x ? "top" : "left", _ = x ? "bottom" : "right", A = x ? "clientHeight" : "clientWidth", O = r.reference[m] + r.reference[f] - b[f] - r.floating[m], S = b[f] - r.reference[f], V = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a));
|
|
284
|
-
let k = V ? V[A] : 0;
|
|
285
|
-
(!k || !await (i.isElement == null ? void 0 : i.isElement(V))) && (k = s.floating[A] || r.floating[m]);
|
|
286
|
-
const X = O / 2 - S / 2, ee = k / 2 - y[m] / 2 - 1, ue = je(d[w], ee), re = je(d[_], ee), j = ue, le = k - y[m] - re, C = k / 2 - y[m] / 2 + X, F = St(j, C, le), P = !c.arrow && ot(l) != null && C !== F && r.reference[m] / 2 - (C < j ? ue : re) - y[m] / 2 < 0, M = P ? C < j ? C - j : C - le : 0;
|
|
287
|
-
return {
|
|
288
|
-
[f]: b[f] + M,
|
|
289
|
-
data: {
|
|
290
|
-
[f]: F,
|
|
291
|
-
centerOffset: C - F - M,
|
|
292
|
-
...P && {
|
|
293
|
-
alignmentOffset: M
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
reset: P
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
}), Tn = function(e) {
|
|
300
|
-
return e === void 0 && (e = {}), {
|
|
301
|
-
name: "flip",
|
|
302
|
-
options: e,
|
|
303
|
-
async fn(t) {
|
|
304
|
-
var o, n;
|
|
305
|
-
const {
|
|
306
|
-
placement: l,
|
|
307
|
-
middlewareData: r,
|
|
308
|
-
rects: i,
|
|
309
|
-
initialPlacement: s,
|
|
310
|
-
platform: c,
|
|
311
|
-
elements: a
|
|
312
|
-
} = t, {
|
|
313
|
-
mainAxis: p = !0,
|
|
314
|
-
crossAxis: d = !0,
|
|
315
|
-
fallbackPlacements: b,
|
|
316
|
-
fallbackStrategy: f = "bestFit",
|
|
317
|
-
fallbackAxisSideDirection: m = "none",
|
|
318
|
-
flipAlignment: y = !0,
|
|
319
|
-
...x
|
|
320
|
-
} = nt(e, t);
|
|
321
|
-
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
322
|
-
return {};
|
|
323
|
-
const w = Oe(l), _ = Oe(s) === s, A = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), O = b || (_ || !y ? [mt(s)] : xn(s));
|
|
324
|
-
!b && m !== "none" && O.push(...An(s, y, m, A));
|
|
325
|
-
const S = [s, ...O], V = await en(t, x), k = [];
|
|
326
|
-
let X = ((n = r.flip) == null ? void 0 : n.overflows) || [];
|
|
327
|
-
if (p && k.push(V[w]), d) {
|
|
328
|
-
const j = bn(l, i, A);
|
|
329
|
-
k.push(V[j[0]], V[j[1]]);
|
|
330
|
-
}
|
|
331
|
-
if (X = [...X, {
|
|
332
|
-
placement: l,
|
|
333
|
-
overflows: k
|
|
334
|
-
}], !k.every((j) => j <= 0)) {
|
|
335
|
-
var ee, ue;
|
|
336
|
-
const j = (((ee = r.flip) == null ? void 0 : ee.index) || 0) + 1, le = S[j];
|
|
337
|
-
if (le)
|
|
338
|
-
return {
|
|
339
|
-
data: {
|
|
340
|
-
index: j,
|
|
341
|
-
overflows: X
|
|
342
|
-
},
|
|
343
|
-
reset: {
|
|
344
|
-
placement: le
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
let C = (ue = X.filter((F) => F.overflows[0] <= 0).sort((F, P) => F.overflows[1] - P.overflows[1])[0]) == null ? void 0 : ue.placement;
|
|
348
|
-
if (!C)
|
|
349
|
-
switch (f) {
|
|
350
|
-
case "bestFit": {
|
|
351
|
-
var re;
|
|
352
|
-
const F = (re = X.map((P) => [P.placement, P.overflows.filter((M) => M > 0).reduce((M, fe) => M + fe, 0)]).sort((P, M) => P[1] - M[1])[0]) == null ? void 0 : re[0];
|
|
353
|
-
F && (C = F);
|
|
354
|
-
break;
|
|
355
|
-
}
|
|
356
|
-
case "initialPlacement":
|
|
357
|
-
C = s;
|
|
358
|
-
break;
|
|
359
|
-
}
|
|
360
|
-
if (l !== C)
|
|
361
|
-
return {
|
|
362
|
-
reset: {
|
|
363
|
-
placement: C
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
return {};
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
async function Rn(e, t) {
|
|
372
|
-
const {
|
|
373
|
-
placement: o,
|
|
374
|
-
platform: n,
|
|
375
|
-
elements: l
|
|
376
|
-
} = e, r = await (n.isRTL == null ? void 0 : n.isRTL(l.floating)), i = Oe(o), s = ot(o), c = yt(o) === "y", a = ["left", "top"].includes(i) ? -1 : 1, p = r && c ? -1 : 1, d = nt(t, e);
|
|
377
|
-
let {
|
|
378
|
-
mainAxis: b,
|
|
379
|
-
crossAxis: f,
|
|
380
|
-
alignmentAxis: m
|
|
381
|
-
} = typeof d == "number" ? {
|
|
382
|
-
mainAxis: d,
|
|
383
|
-
crossAxis: 0,
|
|
384
|
-
alignmentAxis: null
|
|
385
|
-
} : {
|
|
386
|
-
mainAxis: 0,
|
|
387
|
-
crossAxis: 0,
|
|
388
|
-
alignmentAxis: null,
|
|
389
|
-
...d
|
|
390
|
-
};
|
|
391
|
-
return s && typeof m == "number" && (f = s === "end" ? m * -1 : m), c ? {
|
|
392
|
-
x: f * p,
|
|
393
|
-
y: b * a
|
|
394
|
-
} : {
|
|
395
|
-
x: b * a,
|
|
396
|
-
y: f * p
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
const Cn = function(e) {
|
|
400
|
-
return e === void 0 && (e = 0), {
|
|
401
|
-
name: "offset",
|
|
402
|
-
options: e,
|
|
403
|
-
async fn(t) {
|
|
404
|
-
var o, n;
|
|
405
|
-
const {
|
|
406
|
-
x: l,
|
|
407
|
-
y: r,
|
|
408
|
-
placement: i,
|
|
409
|
-
middlewareData: s
|
|
410
|
-
} = t, c = await Rn(t, e);
|
|
411
|
-
return i === ((o = s.offset) == null ? void 0 : o.placement) && (n = s.arrow) != null && n.alignmentOffset ? {} : {
|
|
412
|
-
x: l + c.x,
|
|
413
|
-
y: r + c.y,
|
|
414
|
-
data: {
|
|
415
|
-
...c,
|
|
416
|
-
placement: i
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
}, Ln = function(e) {
|
|
422
|
-
return e === void 0 && (e = {}), {
|
|
423
|
-
name: "shift",
|
|
424
|
-
options: e,
|
|
425
|
-
async fn(t) {
|
|
426
|
-
const {
|
|
427
|
-
x: o,
|
|
428
|
-
y: n,
|
|
429
|
-
placement: l
|
|
430
|
-
} = t, {
|
|
431
|
-
mainAxis: r = !0,
|
|
432
|
-
crossAxis: i = !1,
|
|
433
|
-
limiter: s = {
|
|
434
|
-
fn: (x) => {
|
|
435
|
-
let {
|
|
436
|
-
x: w,
|
|
437
|
-
y: _
|
|
438
|
-
} = x;
|
|
439
|
-
return {
|
|
440
|
-
x: w,
|
|
441
|
-
y: _
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
...c
|
|
446
|
-
} = nt(e, t), a = {
|
|
447
|
-
x: o,
|
|
448
|
-
y: n
|
|
449
|
-
}, p = await en(t, c), d = yt(Oe(l)), b = Qt(d);
|
|
450
|
-
let f = a[b], m = a[d];
|
|
451
|
-
if (r) {
|
|
452
|
-
const x = b === "y" ? "top" : "left", w = b === "y" ? "bottom" : "right", _ = f + p[x], A = f - p[w];
|
|
453
|
-
f = St(_, f, A);
|
|
454
|
-
}
|
|
455
|
-
if (i) {
|
|
456
|
-
const x = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", _ = m + p[x], A = m - p[w];
|
|
457
|
-
m = St(_, m, A);
|
|
458
|
-
}
|
|
459
|
-
const y = s.fn({
|
|
460
|
-
...t,
|
|
461
|
-
[b]: f,
|
|
462
|
-
[d]: m
|
|
463
|
-
});
|
|
464
|
-
return {
|
|
465
|
-
...y,
|
|
466
|
-
data: {
|
|
467
|
-
x: y.x - o,
|
|
468
|
-
y: y.y - n
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
};
|
|
474
|
-
function Fe(e) {
|
|
475
|
-
return tn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
476
|
-
}
|
|
477
|
-
function U(e) {
|
|
478
|
-
var t;
|
|
479
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
480
|
-
}
|
|
481
|
-
function pe(e) {
|
|
482
|
-
var t;
|
|
483
|
-
return (t = (tn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
484
|
-
}
|
|
485
|
-
function tn(e) {
|
|
486
|
-
return e instanceof Node || e instanceof U(e).Node;
|
|
487
|
-
}
|
|
488
|
-
function ce(e) {
|
|
489
|
-
return e instanceof Element || e instanceof U(e).Element;
|
|
490
|
-
}
|
|
491
|
-
function ae(e) {
|
|
492
|
-
return e instanceof HTMLElement || e instanceof U(e).HTMLElement;
|
|
493
|
-
}
|
|
494
|
-
function Mt(e) {
|
|
495
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
496
|
-
}
|
|
497
|
-
function rt(e) {
|
|
498
|
-
const {
|
|
499
|
-
overflow: t,
|
|
500
|
-
overflowX: o,
|
|
501
|
-
overflowY: n,
|
|
502
|
-
display: l
|
|
503
|
-
} = oe(e);
|
|
504
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + n + o) && !["inline", "contents"].includes(l);
|
|
505
|
-
}
|
|
506
|
-
function kn(e) {
|
|
507
|
-
return ["table", "td", "th"].includes(Fe(e));
|
|
508
|
-
}
|
|
509
|
-
function kt(e) {
|
|
510
|
-
const t = Nt(), o = oe(e);
|
|
511
|
-
return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
512
|
-
}
|
|
513
|
-
function Nn(e) {
|
|
514
|
-
let t = ge(e);
|
|
515
|
-
for (; ae(t) && !Me(t); ) {
|
|
516
|
-
if (kt(t))
|
|
517
|
-
return t;
|
|
518
|
-
t = ge(t);
|
|
519
|
-
}
|
|
520
|
-
return null;
|
|
521
|
-
}
|
|
522
|
-
function Nt() {
|
|
523
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
524
|
-
}
|
|
525
|
-
function Me(e) {
|
|
526
|
-
return ["html", "body", "#document"].includes(Fe(e));
|
|
527
|
-
}
|
|
528
|
-
function oe(e) {
|
|
529
|
-
return U(e).getComputedStyle(e);
|
|
530
|
-
}
|
|
531
|
-
function gt(e) {
|
|
532
|
-
return ce(e) ? {
|
|
533
|
-
scrollLeft: e.scrollLeft,
|
|
534
|
-
scrollTop: e.scrollTop
|
|
535
|
-
} : {
|
|
536
|
-
scrollLeft: e.pageXOffset,
|
|
537
|
-
scrollTop: e.pageYOffset
|
|
538
|
-
};
|
|
539
|
-
}
|
|
540
|
-
function ge(e) {
|
|
541
|
-
if (Fe(e) === "html")
|
|
542
|
-
return e;
|
|
543
|
-
const t = (
|
|
544
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
545
|
-
e.assignedSlot || // DOM Element detected.
|
|
546
|
-
e.parentNode || // ShadowRoot detected.
|
|
547
|
-
Mt(e) && e.host || // Fallback.
|
|
548
|
-
pe(e)
|
|
549
|
-
);
|
|
550
|
-
return Mt(t) ? t.host : t;
|
|
551
|
-
}
|
|
552
|
-
function nn(e) {
|
|
553
|
-
const t = ge(e);
|
|
554
|
-
return Me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ae(t) && rt(t) ? t : nn(t);
|
|
555
|
-
}
|
|
556
|
-
function tt(e, t, o) {
|
|
557
|
-
var n;
|
|
558
|
-
t === void 0 && (t = []), o === void 0 && (o = !0);
|
|
559
|
-
const l = nn(e), r = l === ((n = e.ownerDocument) == null ? void 0 : n.body), i = U(l);
|
|
560
|
-
return r ? t.concat(i, i.visualViewport || [], rt(l) ? l : [], i.frameElement && o ? tt(i.frameElement) : []) : t.concat(l, tt(l, [], o));
|
|
561
|
-
}
|
|
562
|
-
function on(e) {
|
|
563
|
-
const t = oe(e);
|
|
564
|
-
let o = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
565
|
-
const l = ae(e), r = l ? e.offsetWidth : o, i = l ? e.offsetHeight : n, s = pt(o) !== r || pt(n) !== i;
|
|
566
|
-
return s && (o = r, n = i), {
|
|
567
|
-
width: o,
|
|
568
|
-
height: n,
|
|
569
|
-
$: s
|
|
570
|
-
};
|
|
571
|
-
}
|
|
572
|
-
function Dt(e) {
|
|
573
|
-
return ce(e) ? e : e.contextElement;
|
|
574
|
-
}
|
|
575
|
-
function We(e) {
|
|
576
|
-
const t = Dt(e);
|
|
577
|
-
if (!ae(t))
|
|
578
|
-
return ye(1);
|
|
579
|
-
const o = t.getBoundingClientRect(), {
|
|
580
|
-
width: n,
|
|
581
|
-
height: l,
|
|
582
|
-
$: r
|
|
583
|
-
} = on(t);
|
|
584
|
-
let i = (r ? pt(o.width) : o.width) / n, s = (r ? pt(o.height) : o.height) / l;
|
|
585
|
-
return (!i || !Number.isFinite(i)) && (i = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
586
|
-
x: i,
|
|
587
|
-
y: s
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
const Dn = /* @__PURE__ */ ye(0);
|
|
591
|
-
function rn(e) {
|
|
592
|
-
const t = U(e);
|
|
593
|
-
return !Nt() || !t.visualViewport ? Dn : {
|
|
594
|
-
x: t.visualViewport.offsetLeft,
|
|
595
|
-
y: t.visualViewport.offsetTop
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
function $n(e, t, o) {
|
|
599
|
-
return t === void 0 && (t = !1), !o || t && o !== U(e) ? !1 : t;
|
|
600
|
-
}
|
|
601
|
-
function Te(e, t, o, n) {
|
|
602
|
-
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
603
|
-
const l = e.getBoundingClientRect(), r = Dt(e);
|
|
604
|
-
let i = ye(1);
|
|
605
|
-
t && (n ? ce(n) && (i = We(n)) : i = We(e));
|
|
606
|
-
const s = $n(r, o, n) ? rn(r) : ye(0);
|
|
607
|
-
let c = (l.left + s.x) / i.x, a = (l.top + s.y) / i.y, p = l.width / i.x, d = l.height / i.y;
|
|
608
|
-
if (r) {
|
|
609
|
-
const b = U(r), f = n && ce(n) ? U(n) : n;
|
|
610
|
-
let m = b, y = m.frameElement;
|
|
611
|
-
for (; y && n && f !== m; ) {
|
|
612
|
-
const x = We(y), w = y.getBoundingClientRect(), _ = oe(y), A = w.left + (y.clientLeft + parseFloat(_.paddingLeft)) * x.x, O = w.top + (y.clientTop + parseFloat(_.paddingTop)) * x.y;
|
|
613
|
-
c *= x.x, a *= x.y, p *= x.x, d *= x.y, c += A, a += O, m = U(y), y = m.frameElement;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
return ht({
|
|
617
|
-
width: p,
|
|
618
|
-
height: d,
|
|
619
|
-
x: c,
|
|
620
|
-
y: a
|
|
621
|
-
});
|
|
622
|
-
}
|
|
623
|
-
const Bn = [":popover-open", ":modal"];
|
|
624
|
-
function $t(e) {
|
|
625
|
-
return Bn.some((t) => {
|
|
626
|
-
try {
|
|
627
|
-
return e.matches(t);
|
|
628
|
-
} catch {
|
|
629
|
-
return !1;
|
|
630
|
-
}
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
function Pn(e) {
|
|
634
|
-
let {
|
|
635
|
-
elements: t,
|
|
636
|
-
rect: o,
|
|
637
|
-
offsetParent: n,
|
|
638
|
-
strategy: l
|
|
639
|
-
} = e;
|
|
640
|
-
const r = l === "fixed", i = pe(n), s = t ? $t(t.floating) : !1;
|
|
641
|
-
if (n === i || s && r)
|
|
642
|
-
return o;
|
|
643
|
-
let c = {
|
|
644
|
-
scrollLeft: 0,
|
|
645
|
-
scrollTop: 0
|
|
646
|
-
}, a = ye(1);
|
|
647
|
-
const p = ye(0), d = ae(n);
|
|
648
|
-
if ((d || !d && !r) && ((Fe(n) !== "body" || rt(i)) && (c = gt(n)), ae(n))) {
|
|
649
|
-
const b = Te(n);
|
|
650
|
-
a = We(n), p.x = b.x + n.clientLeft, p.y = b.y + n.clientTop;
|
|
651
|
-
}
|
|
652
|
-
return {
|
|
653
|
-
width: o.width * a.x,
|
|
654
|
-
height: o.height * a.y,
|
|
655
|
-
x: o.x * a.x - c.scrollLeft * a.x + p.x,
|
|
656
|
-
y: o.y * a.y - c.scrollTop * a.y + p.y
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
function In(e) {
|
|
660
|
-
return Array.from(e.getClientRects());
|
|
661
|
-
}
|
|
662
|
-
function ln(e) {
|
|
663
|
-
return Te(pe(e)).left + gt(e).scrollLeft;
|
|
664
|
-
}
|
|
665
|
-
function Wn(e) {
|
|
666
|
-
const t = pe(e), o = gt(e), n = e.ownerDocument.body, l = Se(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), r = Se(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
667
|
-
let i = -o.scrollLeft + ln(e);
|
|
668
|
-
const s = -o.scrollTop;
|
|
669
|
-
return oe(n).direction === "rtl" && (i += Se(t.clientWidth, n.clientWidth) - l), {
|
|
670
|
-
width: l,
|
|
671
|
-
height: r,
|
|
672
|
-
x: i,
|
|
673
|
-
y: s
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
function jn(e, t) {
|
|
677
|
-
const o = U(e), n = pe(e), l = o.visualViewport;
|
|
678
|
-
let r = n.clientWidth, i = n.clientHeight, s = 0, c = 0;
|
|
679
|
-
if (l) {
|
|
680
|
-
r = l.width, i = l.height;
|
|
681
|
-
const a = Nt();
|
|
682
|
-
(!a || a && t === "fixed") && (s = l.offsetLeft, c = l.offsetTop);
|
|
683
|
-
}
|
|
684
|
-
return {
|
|
685
|
-
width: r,
|
|
686
|
-
height: i,
|
|
687
|
-
x: s,
|
|
688
|
-
y: c
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
function Mn(e, t) {
|
|
692
|
-
const o = Te(e, !0, t === "fixed"), n = o.top + e.clientTop, l = o.left + e.clientLeft, r = ae(e) ? We(e) : ye(1), i = e.clientWidth * r.x, s = e.clientHeight * r.y, c = l * r.x, a = n * r.y;
|
|
693
|
-
return {
|
|
694
|
-
width: i,
|
|
695
|
-
height: s,
|
|
696
|
-
x: c,
|
|
697
|
-
y: a
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
function Ft(e, t, o) {
|
|
701
|
-
let n;
|
|
702
|
-
if (t === "viewport")
|
|
703
|
-
n = jn(e, o);
|
|
704
|
-
else if (t === "document")
|
|
705
|
-
n = Wn(pe(e));
|
|
706
|
-
else if (ce(t))
|
|
707
|
-
n = Mn(t, o);
|
|
708
|
-
else {
|
|
709
|
-
const l = rn(e);
|
|
710
|
-
n = {
|
|
711
|
-
...t,
|
|
712
|
-
x: t.x - l.x,
|
|
713
|
-
y: t.y - l.y
|
|
714
|
-
};
|
|
715
|
-
}
|
|
716
|
-
return ht(n);
|
|
717
|
-
}
|
|
718
|
-
function sn(e, t) {
|
|
719
|
-
const o = ge(e);
|
|
720
|
-
return o === t || !ce(o) || Me(o) ? !1 : oe(o).position === "fixed" || sn(o, t);
|
|
721
|
-
}
|
|
722
|
-
function Fn(e, t) {
|
|
723
|
-
const o = t.get(e);
|
|
724
|
-
if (o)
|
|
725
|
-
return o;
|
|
726
|
-
let n = tt(e, [], !1).filter((s) => ce(s) && Fe(s) !== "body"), l = null;
|
|
727
|
-
const r = oe(e).position === "fixed";
|
|
728
|
-
let i = r ? ge(e) : e;
|
|
729
|
-
for (; ce(i) && !Me(i); ) {
|
|
730
|
-
const s = oe(i), c = kt(i);
|
|
731
|
-
!c && s.position === "fixed" && (l = null), (r ? !c && !l : !c && s.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) || rt(i) && !c && sn(e, i)) ? n = n.filter((p) => p !== i) : l = s, i = ge(i);
|
|
732
|
-
}
|
|
733
|
-
return t.set(e, n), n;
|
|
734
|
-
}
|
|
735
|
-
function Hn(e) {
|
|
736
|
-
let {
|
|
737
|
-
element: t,
|
|
738
|
-
boundary: o,
|
|
739
|
-
rootBoundary: n,
|
|
740
|
-
strategy: l
|
|
741
|
-
} = e;
|
|
742
|
-
const i = [...o === "clippingAncestors" ? $t(t) ? [] : Fn(t, this._c) : [].concat(o), n], s = i[0], c = i.reduce((a, p) => {
|
|
743
|
-
const d = Ft(t, p, l);
|
|
744
|
-
return a.top = Se(d.top, a.top), a.right = je(d.right, a.right), a.bottom = je(d.bottom, a.bottom), a.left = Se(d.left, a.left), a;
|
|
745
|
-
}, Ft(t, s, l));
|
|
746
|
-
return {
|
|
747
|
-
width: c.right - c.left,
|
|
748
|
-
height: c.bottom - c.top,
|
|
749
|
-
x: c.left,
|
|
750
|
-
y: c.top
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
function zn(e) {
|
|
754
|
-
const {
|
|
755
|
-
width: t,
|
|
756
|
-
height: o
|
|
757
|
-
} = on(e);
|
|
758
|
-
return {
|
|
759
|
-
width: t,
|
|
760
|
-
height: o
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
function Vn(e, t, o) {
|
|
764
|
-
const n = ae(t), l = pe(t), r = o === "fixed", i = Te(e, !0, r, t);
|
|
765
|
-
let s = {
|
|
766
|
-
scrollLeft: 0,
|
|
767
|
-
scrollTop: 0
|
|
768
|
-
};
|
|
769
|
-
const c = ye(0);
|
|
770
|
-
if (n || !n && !r)
|
|
771
|
-
if ((Fe(t) !== "body" || rt(l)) && (s = gt(t)), n) {
|
|
772
|
-
const d = Te(t, !0, r, t);
|
|
773
|
-
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
|
|
774
|
-
} else l && (c.x = ln(l));
|
|
775
|
-
const a = i.left + s.scrollLeft - c.x, p = i.top + s.scrollTop - c.y;
|
|
776
|
-
return {
|
|
777
|
-
x: a,
|
|
778
|
-
y: p,
|
|
779
|
-
width: i.width,
|
|
780
|
-
height: i.height
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
function _t(e) {
|
|
784
|
-
return oe(e).position === "static";
|
|
785
|
-
}
|
|
786
|
-
function Ht(e, t) {
|
|
787
|
-
return !ae(e) || oe(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
788
|
-
}
|
|
789
|
-
function cn(e, t) {
|
|
790
|
-
const o = U(e);
|
|
791
|
-
if ($t(e))
|
|
792
|
-
return o;
|
|
793
|
-
if (!ae(e)) {
|
|
794
|
-
let l = ge(e);
|
|
795
|
-
for (; l && !Me(l); ) {
|
|
796
|
-
if (ce(l) && !_t(l))
|
|
797
|
-
return l;
|
|
798
|
-
l = ge(l);
|
|
799
|
-
}
|
|
800
|
-
return o;
|
|
801
|
-
}
|
|
802
|
-
let n = Ht(e, t);
|
|
803
|
-
for (; n && kn(n) && _t(n); )
|
|
804
|
-
n = Ht(n, t);
|
|
805
|
-
return n && Me(n) && _t(n) && !kt(n) ? o : n || Nn(e) || o;
|
|
806
|
-
}
|
|
807
|
-
const Kn = async function(e) {
|
|
808
|
-
const t = this.getOffsetParent || cn, o = this.getDimensions, n = await o(e.floating);
|
|
809
|
-
return {
|
|
810
|
-
reference: Vn(e.reference, await t(e.floating), e.strategy),
|
|
811
|
-
floating: {
|
|
812
|
-
x: 0,
|
|
813
|
-
y: 0,
|
|
814
|
-
width: n.width,
|
|
815
|
-
height: n.height
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
};
|
|
819
|
-
function qn(e) {
|
|
820
|
-
return oe(e).direction === "rtl";
|
|
821
|
-
}
|
|
822
|
-
const Xn = {
|
|
823
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Pn,
|
|
824
|
-
getDocumentElement: pe,
|
|
825
|
-
getClippingRect: Hn,
|
|
826
|
-
getOffsetParent: cn,
|
|
827
|
-
getElementRects: Kn,
|
|
828
|
-
getClientRects: In,
|
|
829
|
-
getDimensions: zn,
|
|
830
|
-
getScale: We,
|
|
831
|
-
isElement: ce,
|
|
832
|
-
isRTL: qn
|
|
833
|
-
};
|
|
834
|
-
function Yn(e, t) {
|
|
835
|
-
let o = null, n;
|
|
836
|
-
const l = pe(e);
|
|
837
|
-
function r() {
|
|
838
|
-
var s;
|
|
839
|
-
clearTimeout(n), (s = o) == null || s.disconnect(), o = null;
|
|
840
|
-
}
|
|
841
|
-
function i(s, c) {
|
|
842
|
-
s === void 0 && (s = !1), c === void 0 && (c = 1), r();
|
|
843
|
-
const {
|
|
844
|
-
left: a,
|
|
845
|
-
top: p,
|
|
846
|
-
width: d,
|
|
847
|
-
height: b
|
|
848
|
-
} = e.getBoundingClientRect();
|
|
849
|
-
if (s || t(), !d || !b)
|
|
850
|
-
return;
|
|
851
|
-
const f = dt(p), m = dt(l.clientWidth - (a + d)), y = dt(l.clientHeight - (p + b)), x = dt(a), _ = {
|
|
852
|
-
rootMargin: -f + "px " + -m + "px " + -y + "px " + -x + "px",
|
|
853
|
-
threshold: Se(0, je(1, c)) || 1
|
|
854
|
-
};
|
|
855
|
-
let A = !0;
|
|
856
|
-
function O(S) {
|
|
857
|
-
const V = S[0].intersectionRatio;
|
|
858
|
-
if (V !== c) {
|
|
859
|
-
if (!A)
|
|
860
|
-
return i();
|
|
861
|
-
V ? i(!1, V) : n = setTimeout(() => {
|
|
862
|
-
i(!1, 1e-7);
|
|
863
|
-
}, 1e3);
|
|
864
|
-
}
|
|
865
|
-
A = !1;
|
|
866
|
-
}
|
|
867
|
-
try {
|
|
868
|
-
o = new IntersectionObserver(O, {
|
|
869
|
-
..._,
|
|
870
|
-
// Handle <iframe>s
|
|
871
|
-
root: l.ownerDocument
|
|
872
|
-
});
|
|
873
|
-
} catch {
|
|
874
|
-
o = new IntersectionObserver(O, _);
|
|
875
|
-
}
|
|
876
|
-
o.observe(e);
|
|
877
|
-
}
|
|
878
|
-
return i(!0), r;
|
|
879
|
-
}
|
|
880
|
-
function Gn(e, t, o, n) {
|
|
881
|
-
n === void 0 && (n = {});
|
|
882
|
-
const {
|
|
883
|
-
ancestorScroll: l = !0,
|
|
884
|
-
ancestorResize: r = !0,
|
|
885
|
-
elementResize: i = typeof ResizeObserver == "function",
|
|
886
|
-
layoutShift: s = typeof IntersectionObserver == "function",
|
|
887
|
-
animationFrame: c = !1
|
|
888
|
-
} = n, a = Dt(e), p = l || r ? [...a ? tt(a) : [], ...tt(t)] : [];
|
|
889
|
-
p.forEach((w) => {
|
|
890
|
-
l && w.addEventListener("scroll", o, {
|
|
891
|
-
passive: !0
|
|
892
|
-
}), r && w.addEventListener("resize", o);
|
|
893
|
-
});
|
|
894
|
-
const d = a && s ? Yn(a, o) : null;
|
|
895
|
-
let b = -1, f = null;
|
|
896
|
-
i && (f = new ResizeObserver((w) => {
|
|
897
|
-
let [_] = w;
|
|
898
|
-
_ && _.target === a && f && (f.unobserve(t), cancelAnimationFrame(b), b = requestAnimationFrame(() => {
|
|
899
|
-
var A;
|
|
900
|
-
(A = f) == null || A.observe(t);
|
|
901
|
-
})), o();
|
|
902
|
-
}), a && !c && f.observe(a), f.observe(t));
|
|
903
|
-
let m, y = c ? Te(e) : null;
|
|
904
|
-
c && x();
|
|
905
|
-
function x() {
|
|
906
|
-
const w = Te(e);
|
|
907
|
-
y && (w.x !== y.x || w.y !== y.y || w.width !== y.width || w.height !== y.height) && o(), y = w, m = requestAnimationFrame(x);
|
|
908
|
-
}
|
|
909
|
-
return o(), () => {
|
|
910
|
-
var w;
|
|
911
|
-
p.forEach((_) => {
|
|
912
|
-
l && _.removeEventListener("scroll", o), r && _.removeEventListener("resize", o);
|
|
913
|
-
}), d?.(), (w = f) == null || w.disconnect(), f = null, c && cancelAnimationFrame(m);
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
const Un = Cn, Zn = Ln, Qn = Tn, Jn = On, zt = (e, t, o) => {
|
|
917
|
-
const n = /* @__PURE__ */ new Map(), l = {
|
|
918
|
-
platform: Xn,
|
|
919
|
-
...o
|
|
920
|
-
}, r = {
|
|
921
|
-
...l.platform,
|
|
922
|
-
_c: n
|
|
923
|
-
};
|
|
924
|
-
return Sn(e, t, {
|
|
925
|
-
...l,
|
|
926
|
-
platform: r
|
|
927
|
-
});
|
|
928
|
-
};
|
|
929
|
-
var At = { exports: {} };
|
|
930
|
-
/*!
|
|
931
|
-
Copyright (c) 2018 Jed Watson.
|
|
932
|
-
Licensed under the MIT License (MIT), see
|
|
933
|
-
http://jedwatson.github.io/classnames
|
|
934
|
-
*/
|
|
935
|
-
var Vt;
|
|
936
|
-
function eo() {
|
|
937
|
-
return Vt || (Vt = 1, function(e) {
|
|
938
|
-
(function() {
|
|
939
|
-
var t = {}.hasOwnProperty;
|
|
940
|
-
function o() {
|
|
941
|
-
for (var r = "", i = 0; i < arguments.length; i++) {
|
|
942
|
-
var s = arguments[i];
|
|
943
|
-
s && (r = l(r, n(s)));
|
|
944
|
-
}
|
|
945
|
-
return r;
|
|
946
|
-
}
|
|
947
|
-
function n(r) {
|
|
948
|
-
if (typeof r == "string" || typeof r == "number")
|
|
949
|
-
return r;
|
|
950
|
-
if (typeof r != "object")
|
|
951
|
-
return "";
|
|
952
|
-
if (Array.isArray(r))
|
|
953
|
-
return o.apply(null, r);
|
|
954
|
-
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
955
|
-
return r.toString();
|
|
956
|
-
var i = "";
|
|
957
|
-
for (var s in r)
|
|
958
|
-
t.call(r, s) && r[s] && (i = l(i, s));
|
|
959
|
-
return i;
|
|
960
|
-
}
|
|
961
|
-
function l(r, i) {
|
|
962
|
-
return i ? r ? r + " " + i : r + i : r;
|
|
963
|
-
}
|
|
964
|
-
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
965
|
-
})();
|
|
966
|
-
}(At)), At.exports;
|
|
967
|
-
}
|
|
968
|
-
var to = eo();
|
|
969
|
-
const Tt = /* @__PURE__ */ gn(to);
|
|
970
|
-
/*
|
|
971
|
-
* React Tooltip
|
|
972
|
-
* {@link https://github.com/ReactTooltip/react-tooltip}
|
|
973
|
-
* @copyright ReactTooltip Team
|
|
974
|
-
* @license MIT
|
|
975
|
-
*/
|
|
976
|
-
const no = "react-tooltip-core-styles", oo = "react-tooltip-base-styles", Kt = { core: !1, base: !1 };
|
|
977
|
-
function qt({ css: e, id: t = oo, type: o = "base", ref: n }) {
|
|
978
|
-
var l, r;
|
|
979
|
-
if (!e || typeof document > "u" || Kt[o] || o === "core" && typeof process < "u" && (!((l = process == null ? void 0 : process.env) === null || l === void 0) && l.REACT_TOOLTIP_DISABLE_CORE_STYLES) || o !== "base" && typeof process < "u" && (!((r = process == null ? void 0 : process.env) === null || r === void 0) && r.REACT_TOOLTIP_DISABLE_BASE_STYLES)) return;
|
|
980
|
-
o === "core" && (t = no), n || (n = {});
|
|
981
|
-
const { insertAt: i } = n;
|
|
982
|
-
if (document.getElementById(t)) return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);
|
|
983
|
-
const s = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style");
|
|
984
|
-
c.id = t, c.type = "text/css", i === "top" && s.firstChild ? s.insertBefore(c, s.firstChild) : s.appendChild(c), c.styleSheet ? c.styleSheet.cssText = e : c.appendChild(document.createTextNode(e)), Kt[o] = !0;
|
|
985
|
-
}
|
|
986
|
-
const Xt = async ({ elementReference: e = null, tooltipReference: t = null, tooltipArrowReference: o = null, place: n = "top", offset: l = 10, strategy: r = "absolute", middlewares: i = [Un(Number(l)), Qn({ fallbackAxisSideDirection: "start" }), Zn({ padding: 5 })], border: s }) => {
|
|
987
|
-
if (!e) return { tooltipStyles: {}, tooltipArrowStyles: {}, place: n };
|
|
988
|
-
if (t === null) return { tooltipStyles: {}, tooltipArrowStyles: {}, place: n };
|
|
989
|
-
const c = i;
|
|
990
|
-
return o ? (c.push(Jn({ element: o, padding: 5 })), zt(e, t, { placement: n, strategy: r, middleware: c }).then(({ x: a, y: p, placement: d, middlewareData: b }) => {
|
|
991
|
-
var f, m;
|
|
992
|
-
const y = { left: `${a}px`, top: `${p}px`, border: s }, { x, y: w } = (f = b.arrow) !== null && f !== void 0 ? f : { x: 0, y: 0 }, _ = (m = { top: "bottom", right: "left", bottom: "top", left: "right" }[d.split("-")[0]]) !== null && m !== void 0 ? m : "bottom", A = s && { borderBottom: s, borderRight: s };
|
|
993
|
-
let O = 0;
|
|
994
|
-
if (s) {
|
|
995
|
-
const S = `${s}`.match(/(\d+)px/);
|
|
996
|
-
O = S?.[1] ? Number(S[1]) : 1;
|
|
997
|
-
}
|
|
998
|
-
return { tooltipStyles: y, tooltipArrowStyles: { left: x != null ? `${x}px` : "", top: w != null ? `${w}px` : "", right: "", bottom: "", ...A, [_]: `-${4 + O}px` }, place: d };
|
|
999
|
-
})) : zt(e, t, { placement: "bottom", strategy: r, middleware: c }).then(({ x: a, y: p, placement: d }) => ({ tooltipStyles: { left: `${a}px`, top: `${p}px` }, tooltipArrowStyles: {}, place: d }));
|
|
1000
|
-
}, Yt = (e, t) => !("CSS" in window && "supports" in window.CSS) || window.CSS.supports(e, t), Gt = (e, t, o) => {
|
|
1001
|
-
let n = null;
|
|
1002
|
-
const l = function(...r) {
|
|
1003
|
-
const i = () => {
|
|
1004
|
-
n = null;
|
|
1005
|
-
};
|
|
1006
|
-
!n && (e.apply(this, r), n = setTimeout(i, t));
|
|
1007
|
-
};
|
|
1008
|
-
return l.cancel = () => {
|
|
1009
|
-
n && (clearTimeout(n), n = null);
|
|
1010
|
-
}, l;
|
|
1011
|
-
}, Ut = (e) => e !== null && !Array.isArray(e) && typeof e == "object", Rt = (e, t) => {
|
|
1012
|
-
if (e === t) return !0;
|
|
1013
|
-
if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length && e.every((l, r) => Rt(l, t[r]));
|
|
1014
|
-
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1015
|
-
if (!Ut(e) || !Ut(t)) return e === t;
|
|
1016
|
-
const o = Object.keys(e), n = Object.keys(t);
|
|
1017
|
-
return o.length === n.length && o.every((l) => Rt(e[l], t[l]));
|
|
1018
|
-
}, ro = (e) => {
|
|
1019
|
-
if (!(e instanceof HTMLElement || e instanceof SVGElement)) return !1;
|
|
1020
|
-
const t = getComputedStyle(e);
|
|
1021
|
-
return ["overflow", "overflow-x", "overflow-y"].some((o) => {
|
|
1022
|
-
const n = t.getPropertyValue(o);
|
|
1023
|
-
return n === "auto" || n === "scroll";
|
|
1024
|
-
});
|
|
1025
|
-
}, Zt = (e) => {
|
|
1026
|
-
if (!e) return null;
|
|
1027
|
-
let t = e.parentElement;
|
|
1028
|
-
for (; t; ) {
|
|
1029
|
-
if (ro(t)) return t;
|
|
1030
|
-
t = t.parentElement;
|
|
1031
|
-
}
|
|
1032
|
-
return document.scrollingElement || document.documentElement;
|
|
1033
|
-
}, lo = typeof window < "u" ? mn : R, io = "DEFAULT_TOOLTIP_ID", so = { anchorRefs: /* @__PURE__ */ new Set(), activeAnchor: { current: null }, attach: () => {
|
|
1034
|
-
}, detach: () => {
|
|
1035
|
-
}, setActiveAnchor: () => {
|
|
1036
|
-
} }, co = dn({ getTooltipData: () => so });
|
|
1037
|
-
function an(e = io) {
|
|
1038
|
-
return pn(co).getTooltipData(e);
|
|
1039
|
-
}
|
|
1040
|
-
var Ie = { tooltip: "core-styles-module_tooltip__3vRRp", fixed: "core-styles-module_fixed__pcSol", arrow: "core-styles-module_arrow__cvMwQ", noArrow: "core-styles-module_noArrow__xock6", clickable: "core-styles-module_clickable__ZuTTB", show: "core-styles-module_show__Nt9eE", closing: "core-styles-module_closing__sGnxF" }, Et = { tooltip: "styles-module_tooltip__mnnfp", arrow: "styles-module_arrow__K0L3T", dark: "styles-module_dark__xNqje", light: "styles-module_light__Z6W-X", success: "styles-module_success__A2AKt", warning: "styles-module_warning__SCK0X", error: "styles-module_error__JvumD", info: "styles-module_info__BWdHW" };
|
|
1041
|
-
const ao = ({ forwardRef: e, id: t, className: o, classNameArrow: n, variant: l = "dark", anchorId: r, anchorSelect: i, place: s = "top", offset: c = 10, events: a = ["hover"], openOnClick: p = !1, positionStrategy: d = "absolute", middlewares: b, wrapper: f, delayShow: m = 0, delayHide: y = 0, float: x = !1, hidden: w = !1, noArrow: _ = !1, clickable: A = !1, closeOnEsc: O = !1, closeOnScroll: S = !1, closeOnResize: V = !1, openEvents: k, closeEvents: X, globalCloseEvents: ee, imperativeModeOnly: ue, style: re, position: j, afterShow: le, afterHide: C, content: F, contentWrapperRef: P, isOpen: M, defaultIsOpen: fe = !1, setIsOpen: we, activeAnchor: D, setActiveAnchor: Re, border: lt, opacity: it, arrowColor: st, role: wt = "tooltip" }) => {
|
|
1042
|
-
var He;
|
|
1043
|
-
const K = ne(null), Ce = ne(null), H = ne(null), Z = ne(null), ve = ne(null), [me, vt] = B({ tooltipStyles: {}, tooltipArrowStyles: {}, place: s }), [Y, ct] = B(!1), [be, xe] = B(!1), [N, ze] = B(null), Ve = ne(!1), Ke = ne(null), { anchorRefs: qe, setActiveAnchor: at } = an(t), Le = ne(!1), [he, Xe] = B([]), _e = ne(!1), ke = p || a.includes("click"), Ye = ke || k?.click || k?.dblclick || k?.mousedown, Ne = k ? { ...k } : { mouseenter: !0, focus: !0, click: !1, dblclick: !1, mousedown: !1 };
|
|
1044
|
-
!k && ke && Object.assign(Ne, { mouseenter: !1, focus: !1, click: !0 });
|
|
1045
|
-
const Ge = X ? { ...X } : { mouseleave: !0, blur: !0, click: !1, dblclick: !1, mouseup: !1 };
|
|
1046
|
-
!X && ke && Object.assign(Ge, { mouseleave: !1, blur: !1 });
|
|
1047
|
-
const te = ee ? { ...ee } : { escape: O || !1, scroll: S || !1, resize: V || !1, clickOutsideAnchor: Ye || !1 };
|
|
1048
|
-
ue && (Object.assign(Ne, { mouseenter: !1, focus: !1, click: !1, dblclick: !1, mousedown: !1 }), Object.assign(Ge, { mouseleave: !1, blur: !1, click: !1, dblclick: !1, mouseup: !1 }), Object.assign(te, { escape: !1, scroll: !1, resize: !1, clickOutsideAnchor: !1 })), lo(() => (_e.current = !0, () => {
|
|
1049
|
-
_e.current = !1;
|
|
1050
|
-
}), []);
|
|
1051
|
-
const $ = (u) => {
|
|
1052
|
-
_e.current && (u && xe(!0), setTimeout(() => {
|
|
1053
|
-
_e.current && (we?.(u), M === void 0 && ct(u));
|
|
1054
|
-
}, 10));
|
|
1055
|
-
};
|
|
1056
|
-
R(() => {
|
|
1057
|
-
if (M === void 0) return () => null;
|
|
1058
|
-
M && xe(!0);
|
|
1059
|
-
const u = setTimeout(() => {
|
|
1060
|
-
ct(M);
|
|
1061
|
-
}, 10);
|
|
1062
|
-
return () => {
|
|
1063
|
-
clearTimeout(u);
|
|
1064
|
-
};
|
|
1065
|
-
}, [M]), R(() => {
|
|
1066
|
-
if (Y !== Ve.current) if (ve.current && clearTimeout(ve.current), Ve.current = Y, Y) le?.();
|
|
1067
|
-
else {
|
|
1068
|
-
const u = ((g) => {
|
|
1069
|
-
const v = g.match(/^([\d.]+)(ms|s)$/);
|
|
1070
|
-
if (!v) return 0;
|
|
1071
|
-
const [, W, z] = v;
|
|
1072
|
-
return Number(W) * (z === "ms" ? 1 : 1e3);
|
|
1073
|
-
})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));
|
|
1074
|
-
ve.current = setTimeout(() => {
|
|
1075
|
-
xe(!1), ze(null), C?.();
|
|
1076
|
-
}, u + 25);
|
|
1077
|
-
}
|
|
1078
|
-
}, [Y]);
|
|
1079
|
-
const ut = (u) => {
|
|
1080
|
-
vt((g) => Rt(g, u) ? g : u);
|
|
1081
|
-
}, Ue = (u = m) => {
|
|
1082
|
-
H.current && clearTimeout(H.current), be ? $(!0) : H.current = setTimeout(() => {
|
|
1083
|
-
$(!0);
|
|
1084
|
-
}, u);
|
|
1085
|
-
}, De = (u = y) => {
|
|
1086
|
-
Z.current && clearTimeout(Z.current), Z.current = setTimeout(() => {
|
|
1087
|
-
Le.current || $(!1);
|
|
1088
|
-
}, u);
|
|
1089
|
-
}, Ze = (u) => {
|
|
1090
|
-
var g;
|
|
1091
|
-
if (!u) return;
|
|
1092
|
-
const v = (g = u.currentTarget) !== null && g !== void 0 ? g : u.target;
|
|
1093
|
-
if (!v?.isConnected) return Re(null), void at({ current: null });
|
|
1094
|
-
m ? Ue() : $(!0), Re(v), at({ current: v }), Z.current && clearTimeout(Z.current);
|
|
1095
|
-
}, $e = () => {
|
|
1096
|
-
A ? De(y || 100) : y ? De() : $(!1), H.current && clearTimeout(H.current);
|
|
1097
|
-
}, Be = ({ x: u, y: g }) => {
|
|
1098
|
-
var v;
|
|
1099
|
-
const W = { getBoundingClientRect: () => ({ x: u, y: g, width: 0, height: 0, top: g, left: u, right: u, bottom: g }) };
|
|
1100
|
-
Xt({ place: (v = N?.place) !== null && v !== void 0 ? v : s, offset: c, elementReference: W, tooltipReference: K.current, tooltipArrowReference: Ce.current, strategy: d, middlewares: b, border: lt }).then((z) => {
|
|
1101
|
-
ut(z);
|
|
1102
|
-
});
|
|
1103
|
-
}, Pe = (u) => {
|
|
1104
|
-
if (!u) return;
|
|
1105
|
-
const g = u, v = { x: g.clientX, y: g.clientY };
|
|
1106
|
-
Be(v), Ke.current = v;
|
|
1107
|
-
}, Qe = (u) => {
|
|
1108
|
-
var g;
|
|
1109
|
-
if (!Y) return;
|
|
1110
|
-
const v = u.target;
|
|
1111
|
-
v.isConnected && (!((g = K.current) === null || g === void 0) && g.contains(v) || [document.querySelector(`[id='${r}']`), ...he].some((W) => W?.contains(v)) || ($(!1), H.current && clearTimeout(H.current)));
|
|
1112
|
-
}, ft = Gt(Ze, 50), I = Gt($e, 50), Q = (u) => {
|
|
1113
|
-
I.cancel(), ft(u);
|
|
1114
|
-
}, h = () => {
|
|
1115
|
-
ft.cancel(), I();
|
|
1116
|
-
}, E = hn(() => {
|
|
1117
|
-
var u, g;
|
|
1118
|
-
const v = (u = N?.position) !== null && u !== void 0 ? u : j;
|
|
1119
|
-
v ? Be(v) : x ? Ke.current && Be(Ke.current) : D?.isConnected && Xt({ place: (g = N?.place) !== null && g !== void 0 ? g : s, offset: c, elementReference: D, tooltipReference: K.current, tooltipArrowReference: Ce.current, strategy: d, middlewares: b, border: lt }).then((W) => {
|
|
1120
|
-
_e.current && ut(W);
|
|
1121
|
-
});
|
|
1122
|
-
}, [Y, D, F, re, s, N?.place, c, d, j, N?.position, x]);
|
|
1123
|
-
R(() => {
|
|
1124
|
-
var u, g;
|
|
1125
|
-
const v = new Set(qe);
|
|
1126
|
-
he.forEach((T) => {
|
|
1127
|
-
v.add({ current: T });
|
|
1128
|
-
});
|
|
1129
|
-
const W = document.querySelector(`[id='${r}']`);
|
|
1130
|
-
W && v.add({ current: W });
|
|
1131
|
-
const z = () => {
|
|
1132
|
-
$(!1);
|
|
1133
|
-
}, ie = Zt(D), se = Zt(K.current);
|
|
1134
|
-
te.scroll && (window.addEventListener("scroll", z), ie?.addEventListener("scroll", z), se?.addEventListener("scroll", z));
|
|
1135
|
-
let q = null;
|
|
1136
|
-
te.resize ? window.addEventListener("resize", z) : D && K.current && (q = Gn(D, K.current, E, { ancestorResize: !0, elementResize: !0, layoutShift: !0 }));
|
|
1137
|
-
const J = (T) => {
|
|
1138
|
-
T.key === "Escape" && $(!1);
|
|
1139
|
-
};
|
|
1140
|
-
te.escape && window.addEventListener("keydown", J), te.clickOutsideAnchor && window.addEventListener("click", Qe);
|
|
1141
|
-
const L = [], Je = (T) => {
|
|
1142
|
-
Y && T?.target === D || Ze(T);
|
|
1143
|
-
}, un = (T) => {
|
|
1144
|
-
Y && T?.target === D && $e();
|
|
1145
|
-
}, Bt = ["mouseenter", "mouseleave", "focus", "blur"], Pt = ["click", "dblclick", "mousedown", "mouseup"];
|
|
1146
|
-
Object.entries(Ne).forEach(([T, de]) => {
|
|
1147
|
-
de && (Bt.includes(T) ? L.push({ event: T, listener: Q }) : Pt.includes(T) && L.push({ event: T, listener: Je }));
|
|
1148
|
-
}), Object.entries(Ge).forEach(([T, de]) => {
|
|
1149
|
-
de && (Bt.includes(T) ? L.push({ event: T, listener: h }) : Pt.includes(T) && L.push({ event: T, listener: un }));
|
|
1150
|
-
}), x && L.push({ event: "pointermove", listener: Pe });
|
|
1151
|
-
const It = () => {
|
|
1152
|
-
Le.current = !0;
|
|
1153
|
-
}, Wt = () => {
|
|
1154
|
-
Le.current = !1, $e();
|
|
1155
|
-
};
|
|
1156
|
-
return A && !Ye && ((u = K.current) === null || u === void 0 || u.addEventListener("mouseenter", It), (g = K.current) === null || g === void 0 || g.addEventListener("mouseleave", Wt)), L.forEach(({ event: T, listener: de }) => {
|
|
1157
|
-
v.forEach((bt) => {
|
|
1158
|
-
var et;
|
|
1159
|
-
(et = bt.current) === null || et === void 0 || et.addEventListener(T, de);
|
|
1160
|
-
});
|
|
1161
|
-
}), () => {
|
|
1162
|
-
var T, de;
|
|
1163
|
-
te.scroll && (window.removeEventListener("scroll", z), ie?.removeEventListener("scroll", z), se?.removeEventListener("scroll", z)), te.resize ? window.removeEventListener("resize", z) : q?.(), te.clickOutsideAnchor && window.removeEventListener("click", Qe), te.escape && window.removeEventListener("keydown", J), A && !Ye && ((T = K.current) === null || T === void 0 || T.removeEventListener("mouseenter", It), (de = K.current) === null || de === void 0 || de.removeEventListener("mouseleave", Wt)), L.forEach(({ event: bt, listener: et }) => {
|
|
1164
|
-
v.forEach((fn) => {
|
|
1165
|
-
var xt;
|
|
1166
|
-
(xt = fn.current) === null || xt === void 0 || xt.removeEventListener(bt, et);
|
|
1167
|
-
});
|
|
1168
|
-
});
|
|
1169
|
-
};
|
|
1170
|
-
}, [D, E, be, qe, he, k, X, ee, ke, m, y]), R(() => {
|
|
1171
|
-
var u, g;
|
|
1172
|
-
let v = (g = (u = N?.anchorSelect) !== null && u !== void 0 ? u : i) !== null && g !== void 0 ? g : "";
|
|
1173
|
-
!v && t && (v = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`);
|
|
1174
|
-
const W = new MutationObserver((z) => {
|
|
1175
|
-
const ie = [], se = [];
|
|
1176
|
-
z.forEach((q) => {
|
|
1177
|
-
if (q.type === "attributes" && q.attributeName === "data-tooltip-id" && (q.target.getAttribute("data-tooltip-id") === t ? ie.push(q.target) : q.oldValue === t && se.push(q.target)), q.type === "childList") {
|
|
1178
|
-
if (D) {
|
|
1179
|
-
const J = [...q.removedNodes].filter((L) => L.nodeType === 1);
|
|
1180
|
-
if (v) try {
|
|
1181
|
-
se.push(...J.filter((L) => L.matches(v))), se.push(...J.flatMap((L) => [...L.querySelectorAll(v)]));
|
|
1182
|
-
} catch {
|
|
1183
|
-
}
|
|
1184
|
-
J.some((L) => {
|
|
1185
|
-
var Je;
|
|
1186
|
-
return !!(!((Je = L?.contains) === null || Je === void 0) && Je.call(L, D)) && (xe(!1), $(!1), Re(null), H.current && clearTimeout(H.current), Z.current && clearTimeout(Z.current), !0);
|
|
1187
|
-
});
|
|
1188
|
-
}
|
|
1189
|
-
if (v) try {
|
|
1190
|
-
const J = [...q.addedNodes].filter((L) => L.nodeType === 1);
|
|
1191
|
-
ie.push(...J.filter((L) => L.matches(v))), ie.push(...J.flatMap((L) => [...L.querySelectorAll(v)]));
|
|
1192
|
-
} catch {
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
}), (ie.length || se.length) && Xe((q) => [...q.filter((J) => !se.includes(J)), ...ie]);
|
|
1196
|
-
});
|
|
1197
|
-
return W.observe(document.body, { childList: !0, subtree: !0, attributes: !0, attributeFilter: ["data-tooltip-id"], attributeOldValue: !0 }), () => {
|
|
1198
|
-
W.disconnect();
|
|
1199
|
-
};
|
|
1200
|
-
}, [t, i, N?.anchorSelect, D]), R(() => {
|
|
1201
|
-
E();
|
|
1202
|
-
}, [E]), R(() => {
|
|
1203
|
-
if (!P?.current) return () => null;
|
|
1204
|
-
const u = new ResizeObserver(() => {
|
|
1205
|
-
setTimeout(() => E());
|
|
1206
|
-
});
|
|
1207
|
-
return u.observe(P.current), () => {
|
|
1208
|
-
u.disconnect();
|
|
1209
|
-
};
|
|
1210
|
-
}, [F, P?.current]), R(() => {
|
|
1211
|
-
var u;
|
|
1212
|
-
const g = document.querySelector(`[id='${r}']`), v = [...he, g];
|
|
1213
|
-
D && v.includes(D) || Re((u = he[0]) !== null && u !== void 0 ? u : g);
|
|
1214
|
-
}, [r, he, D]), R(() => (fe && $(!0), () => {
|
|
1215
|
-
H.current && clearTimeout(H.current), Z.current && clearTimeout(Z.current);
|
|
1216
|
-
}), []), R(() => {
|
|
1217
|
-
var u;
|
|
1218
|
-
let g = (u = N?.anchorSelect) !== null && u !== void 0 ? u : i;
|
|
1219
|
-
if (!g && t && (g = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`), g) try {
|
|
1220
|
-
const v = Array.from(document.querySelectorAll(g));
|
|
1221
|
-
Xe(v);
|
|
1222
|
-
} catch {
|
|
1223
|
-
Xe([]);
|
|
1224
|
-
}
|
|
1225
|
-
}, [t, i, N?.anchorSelect]), R(() => {
|
|
1226
|
-
H.current && (clearTimeout(H.current), Ue(m));
|
|
1227
|
-
}, [m]);
|
|
1228
|
-
const G = (He = N?.content) !== null && He !== void 0 ? He : F, Ae = Y && Object.keys(me.tooltipStyles).length > 0;
|
|
1229
|
-
return yn(e, () => ({ open: (u) => {
|
|
1230
|
-
if (u?.anchorSelect) try {
|
|
1231
|
-
document.querySelector(u.anchorSelect);
|
|
1232
|
-
} catch {
|
|
1233
|
-
return void console.warn(`[react-tooltip] "${u.anchorSelect}" is not a valid CSS selector`);
|
|
1234
|
-
}
|
|
1235
|
-
ze(u ?? null), u?.delay ? Ue(u.delay) : $(!0);
|
|
1236
|
-
}, close: (u) => {
|
|
1237
|
-
u?.delay ? De(u.delay) : $(!1);
|
|
1238
|
-
}, activeAnchor: D, place: me.place, isOpen: !!(be && !w && G && Ae) })), be && !w && G ? Ee.createElement(f, { id: t, role: wt, className: Tt("react-tooltip", Ie.tooltip, Et.tooltip, Et[l], o, `react-tooltip__place-${me.place}`, Ie[Ae ? "show" : "closing"], Ae ? "react-tooltip__show" : "react-tooltip__closing", d === "fixed" && Ie.fixed, A && Ie.clickable), onTransitionEnd: (u) => {
|
|
1239
|
-
ve.current && clearTimeout(ve.current), Y || u.propertyName !== "opacity" || (xe(!1), ze(null), C?.());
|
|
1240
|
-
}, style: { ...re, ...me.tooltipStyles, opacity: it !== void 0 && Ae ? it : void 0 }, ref: K }, G, Ee.createElement(f, { className: Tt("react-tooltip-arrow", Ie.arrow, Et.arrow, n, _ && Ie.noArrow), style: { ...me.tooltipArrowStyles, background: st ? `linear-gradient(to right bottom, transparent 50%, ${st} 50%)` : void 0 }, ref: Ce })) : null;
|
|
1241
|
-
}, uo = ({ content: e }) => Ee.createElement("span", { dangerouslySetInnerHTML: { __html: e } }), mo = Ee.forwardRef(({ id: e, anchorId: t, anchorSelect: o, content: n, html: l, render: r, className: i, classNameArrow: s, variant: c = "dark", place: a = "top", offset: p = 10, wrapper: d = "div", children: b = null, events: f = ["hover"], openOnClick: m = !1, positionStrategy: y = "absolute", middlewares: x, delayShow: w = 0, delayHide: _ = 0, float: A = !1, hidden: O = !1, noArrow: S = !1, clickable: V = !1, closeOnEsc: k = !1, closeOnScroll: X = !1, closeOnResize: ee = !1, openEvents: ue, closeEvents: re, globalCloseEvents: j, imperativeModeOnly: le = !1, style: C, position: F, isOpen: P, defaultIsOpen: M = !1, disableStyleInjection: fe = !1, border: we, opacity: D, arrowColor: Re, setIsOpen: lt, afterShow: it, afterHide: st, role: wt = "tooltip" }, He) => {
|
|
1242
|
-
const [K, Ce] = B(n), [H, Z] = B(l), [ve, me] = B(a), [vt, Y] = B(c), [ct, be] = B(p), [xe, N] = B(w), [ze, Ve] = B(_), [Ke, qe] = B(A), [at, Le] = B(O), [he, Xe] = B(d), [_e, ke] = B(f), [Ye, Ne] = B(y), [Ge, te] = B(null), [$, ut] = B(null), Ue = ne(fe), { anchorRefs: De, activeAnchor: Ze } = an(e), $e = (I) => I?.getAttributeNames().reduce((Q, h) => {
|
|
1243
|
-
var E;
|
|
1244
|
-
return h.startsWith("data-tooltip-") && (Q[h.replace(/^data-tooltip-/, "")] = (E = I?.getAttribute(h)) !== null && E !== void 0 ? E : null), Q;
|
|
1245
|
-
}, {}), Be = (I) => {
|
|
1246
|
-
const Q = { place: (h) => {
|
|
1247
|
-
var E;
|
|
1248
|
-
me((E = h) !== null && E !== void 0 ? E : a);
|
|
1249
|
-
}, content: (h) => {
|
|
1250
|
-
Ce(h ?? n);
|
|
1251
|
-
}, html: (h) => {
|
|
1252
|
-
Z(h ?? l);
|
|
1253
|
-
}, variant: (h) => {
|
|
1254
|
-
var E;
|
|
1255
|
-
Y((E = h) !== null && E !== void 0 ? E : c);
|
|
1256
|
-
}, offset: (h) => {
|
|
1257
|
-
be(h === null ? p : Number(h));
|
|
1258
|
-
}, wrapper: (h) => {
|
|
1259
|
-
var E;
|
|
1260
|
-
Xe((E = h) !== null && E !== void 0 ? E : d);
|
|
1261
|
-
}, events: (h) => {
|
|
1262
|
-
const E = h?.split(" ");
|
|
1263
|
-
ke(E ?? f);
|
|
1264
|
-
}, "position-strategy": (h) => {
|
|
1265
|
-
var E;
|
|
1266
|
-
Ne((E = h) !== null && E !== void 0 ? E : y);
|
|
1267
|
-
}, "delay-show": (h) => {
|
|
1268
|
-
N(h === null ? w : Number(h));
|
|
1269
|
-
}, "delay-hide": (h) => {
|
|
1270
|
-
Ve(h === null ? _ : Number(h));
|
|
1271
|
-
}, float: (h) => {
|
|
1272
|
-
qe(h === null ? A : h === "true");
|
|
1273
|
-
}, hidden: (h) => {
|
|
1274
|
-
Le(h === null ? O : h === "true");
|
|
1275
|
-
}, "class-name": (h) => {
|
|
1276
|
-
te(h);
|
|
1277
|
-
} };
|
|
1278
|
-
Object.values(Q).forEach((h) => h(null)), Object.entries(I).forEach(([h, E]) => {
|
|
1279
|
-
var G;
|
|
1280
|
-
(G = Q[h]) === null || G === void 0 || G.call(Q, E);
|
|
1281
|
-
});
|
|
1282
|
-
};
|
|
1283
|
-
R(() => {
|
|
1284
|
-
Ce(n);
|
|
1285
|
-
}, [n]), R(() => {
|
|
1286
|
-
Z(l);
|
|
1287
|
-
}, [l]), R(() => {
|
|
1288
|
-
me(a);
|
|
1289
|
-
}, [a]), R(() => {
|
|
1290
|
-
Y(c);
|
|
1291
|
-
}, [c]), R(() => {
|
|
1292
|
-
be(p);
|
|
1293
|
-
}, [p]), R(() => {
|
|
1294
|
-
N(w);
|
|
1295
|
-
}, [w]), R(() => {
|
|
1296
|
-
Ve(_);
|
|
1297
|
-
}, [_]), R(() => {
|
|
1298
|
-
qe(A);
|
|
1299
|
-
}, [A]), R(() => {
|
|
1300
|
-
Le(O);
|
|
1301
|
-
}, [O]), R(() => {
|
|
1302
|
-
Ne(y);
|
|
1303
|
-
}, [y]), R(() => {
|
|
1304
|
-
Ue.current !== fe && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
|
|
1305
|
-
}, [fe]), R(() => {
|
|
1306
|
-
typeof window < "u" && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", { detail: { disableCore: fe === "core", disableBase: fe } }));
|
|
1307
|
-
}, []), R(() => {
|
|
1308
|
-
var I;
|
|
1309
|
-
const Q = new Set(De);
|
|
1310
|
-
let h = o;
|
|
1311
|
-
if (!h && e && (h = `[data-tooltip-id='${e.replace(/'/g, "\\'")}']`), h) try {
|
|
1312
|
-
document.querySelectorAll(h).forEach((g) => {
|
|
1313
|
-
Q.add({ current: g });
|
|
1314
|
-
});
|
|
1315
|
-
} catch {
|
|
1316
|
-
console.warn(`[react-tooltip] "${h}" is not a valid CSS selector`);
|
|
1317
|
-
}
|
|
1318
|
-
const E = document.querySelector(`[id='${t}']`);
|
|
1319
|
-
if (E && Q.add({ current: E }), !Q.size) return () => null;
|
|
1320
|
-
const G = (I = $ ?? E) !== null && I !== void 0 ? I : Ze.current, Ae = new MutationObserver((g) => {
|
|
1321
|
-
g.forEach((v) => {
|
|
1322
|
-
var W;
|
|
1323
|
-
if (!G || v.type !== "attributes" || !(!((W = v.attributeName) === null || W === void 0) && W.startsWith("data-tooltip-"))) return;
|
|
1324
|
-
const z = $e(G);
|
|
1325
|
-
Be(z);
|
|
1326
|
-
});
|
|
1327
|
-
}), u = { attributes: !0, childList: !1, subtree: !1 };
|
|
1328
|
-
if (G) {
|
|
1329
|
-
const g = $e(G);
|
|
1330
|
-
Be(g), Ae.observe(G, u);
|
|
1331
|
-
}
|
|
1332
|
-
return () => {
|
|
1333
|
-
Ae.disconnect();
|
|
1334
|
-
};
|
|
1335
|
-
}, [De, Ze, $, t, o]), R(() => {
|
|
1336
|
-
C?.border && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), we && !Yt("border", `${we}`) && console.warn(`[react-tooltip] "${we}" is not a valid \`border\`.`), C?.opacity && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), D && !Yt("opacity", `${D}`) && console.warn(`[react-tooltip] "${D}" is not a valid \`opacity\`.`);
|
|
1337
|
-
}, []);
|
|
1338
|
-
let Pe = b;
|
|
1339
|
-
const Qe = ne(null);
|
|
1340
|
-
if (r) {
|
|
1341
|
-
const I = r({ content: $?.getAttribute("data-tooltip-content") || K || null, activeAnchor: $ });
|
|
1342
|
-
Pe = I ? Ee.createElement("div", { ref: Qe, className: "react-tooltip-content-wrapper" }, I) : null;
|
|
1343
|
-
} else K && (Pe = K);
|
|
1344
|
-
H && (Pe = Ee.createElement(uo, { content: H }));
|
|
1345
|
-
const ft = { forwardRef: He, id: e, anchorId: t, anchorSelect: o, className: Tt(i, Ge), classNameArrow: s, content: Pe, contentWrapperRef: Qe, place: ve, variant: vt, offset: ct, wrapper: he, events: _e, openOnClick: m, positionStrategy: Ye, middlewares: x, delayShow: xe, delayHide: ze, float: Ke, hidden: at, noArrow: S, clickable: V, closeOnEsc: k, closeOnScroll: X, closeOnResize: ee, openEvents: ue, closeEvents: re, globalCloseEvents: j, imperativeModeOnly: le, style: C, position: F, isOpen: P, defaultIsOpen: M, border: we, opacity: D, arrowColor: Re, setIsOpen: lt, afterShow: it, afterHide: st, activeAnchor: $, setActiveAnchor: (I) => ut(I), role: wt };
|
|
1346
|
-
return Ee.createElement(ao, { ...ft });
|
|
1347
|
-
});
|
|
1348
|
-
typeof window < "u" && window.addEventListener("react-tooltip-inject-styles", (e) => {
|
|
1349
|
-
e.detail.disableCore || qt({ css: ":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}", type: "core" }), e.detail.disableBase || qt({ css: `
|
|
1350
|
-
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`, type: "base" });
|
|
1351
|
-
});
|
|
1352
|
-
export {
|
|
1353
|
-
mo as H
|
|
1354
|
-
};
|