@pdf-viewer/react 1.9.0-beta.1 → 1.9.0-beta.2
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/{Popover-48c8394c.js → Popover-1faa77f6.js} +2 -2
- package/dist/RPLayout-81cd4970.js +3393 -0
- package/dist/{component-2aa6e53b.js → component-1da194e8.js} +1 -1
- package/dist/components/RPConfig.js +673 -691
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPDropFileZone.js +27 -26
- package/dist/components/RPPages.js +9 -3
- package/dist/components/layout/LayoutContainer.js +9 -3
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/RPLayout.js +9 -4
- package/dist/components/layout/WrapperLayout.js +8 -7
- package/dist/components/layout/sidebar/RPSidebar.js +3 -2
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DarkModeTool.js +20 -18
- package/dist/components/layout/toolbar/DocumentDialog.js +7 -4
- package/dist/components/layout/toolbar/DocumentProperties.js +19 -17
- package/dist/components/layout/toolbar/FileDownloadTool.js +4 -2
- package/dist/components/layout/toolbar/FileUploadTool.js +21 -19
- package/dist/components/layout/toolbar/FullScreenTool.js +45 -36
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +10 -4
- package/dist/components/layout/toolbar/OtherTool.js +4 -3
- package/dist/components/layout/toolbar/Paginate.js +4 -2
- package/dist/components/layout/toolbar/PrintTool.js +4 -2
- package/dist/components/layout/toolbar/RPToolbar.js +3 -2
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +27 -25
- package/dist/components/layout/toolbar/ScrollModeTool.js +43 -41
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +10 -4
- package/dist/components/layout/toolbar/SelectionModeTool.js +32 -30
- package/dist/components/layout/toolbar/ThumbnailTool.js +17 -0
- package/dist/components/layout/toolbar/ToolbarCustom.js +9 -3
- package/dist/components/layout/toolbar/ViewModeTool.js +33 -24
- package/dist/components/layout/toolbar/ZoomTool.js +5 -3
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +9 -13
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +10 -14
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +13 -17
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +10 -4
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +8 -12
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +55 -56
- package/dist/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.js +16 -0
- package/dist/components/layout/toolbar/tools/defaults/TopbarDefaultTools.js +59 -0
- package/dist/components/page/AnnotationLayer.js +9 -3
- package/dist/components/page/CanvasLayer.js +9 -3
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +9 -3
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +9 -3
- package/dist/components/page/TextLayer.js +9 -3
- package/dist/components/ui/Checkbox.js +116 -228
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/components/ui/RPTooltip.js +207 -207
- package/dist/contexts/DropFileZoneContext.js +28 -29
- package/dist/contexts/IconToolContext.js +13 -0
- package/dist/contexts/PaginationContext.js +3 -3
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ToolComponentContext.js +52 -0
- package/dist/contexts/ToolbarComponentContext.js +6 -3
- package/dist/{floating-ui.react-dom-4b1e2e46.js → floating-ui.react-dom-15b9b819.js} +380 -394
- package/dist/index-1cb41342.js +307 -0
- package/dist/{index-951f0f1f.js → index-7279fb4e.js} +456 -464
- package/dist/index-aa2d3884.js +140 -0
- package/dist/main.js +23 -19
- package/dist/types/components/layout/toolbar/ThumbnailTool.d.ts +2 -0
- package/dist/types/components/layout/toolbar/tools/defaults/LeftSidebarDefaultTools.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/defaults/TopbarDefaultTools.d.ts +3 -0
- package/dist/types/contexts/IconToolContext.d.ts +9 -0
- package/dist/types/contexts/ToolComponentContext.d.ts +12 -0
- package/dist/types/main.d.ts +3 -1
- package/dist/types/utils/types.d.ts +60 -42
- package/dist/utils/hooks/useFileDownload.js +9 -3
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +9 -3
- package/dist/utils/hooks/usePresentPage.js +9 -3
- package/dist/utils/hooks/usePrint.js +9 -3
- package/dist/utils/hooks/useScrollToPage.js +9 -3
- package/dist/utils/hooks/useSearch.js +9 -3
- package/dist/utils/hooks/useThumbnail.js +9 -3
- package/dist/utils/hooks/useVirtualReactWindow.js +9 -3
- package/package.json +1 -1
- package/dist/RPLayout-3042ec91.js +0 -3349
- package/dist/index-6e0e48fa.js +0 -332
- package/dist/index-e3a67935.js +0 -150
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useLayoutEffect as
|
|
3
|
-
import * as
|
|
4
|
-
const
|
|
1
|
+
import * as S from "react";
|
|
2
|
+
import { useLayoutEffect as jt, useEffect as It } from "react";
|
|
3
|
+
import * as Yt from "react-dom";
|
|
4
|
+
const qt = ["top", "right", "bottom", "left"], X = Math.min, F = Math.max, st = Math.round, it = Math.floor, V = (t) => ({
|
|
5
5
|
x: t,
|
|
6
6
|
y: t
|
|
7
|
-
}),
|
|
7
|
+
}), Xt = {
|
|
8
8
|
left: "right",
|
|
9
9
|
right: "left",
|
|
10
10
|
bottom: "top",
|
|
11
11
|
top: "bottom"
|
|
12
|
-
},
|
|
12
|
+
}, Ut = {
|
|
13
13
|
start: "end",
|
|
14
14
|
end: "start"
|
|
15
15
|
};
|
|
16
16
|
function gt(t, e, n) {
|
|
17
|
-
return F(t,
|
|
17
|
+
return F(t, X(e, n));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function I(t, e) {
|
|
20
20
|
return typeof t == "function" ? t(e) : t;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Y(t) {
|
|
23
23
|
return t.split("-")[0];
|
|
24
24
|
}
|
|
25
25
|
function Z(t) {
|
|
@@ -31,48 +31,47 @@ function xt(t) {
|
|
|
31
31
|
function yt(t) {
|
|
32
32
|
return t === "y" ? "height" : "width";
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return Jt.has(q(t)) ? "y" : "x";
|
|
34
|
+
function U(t) {
|
|
35
|
+
return ["top", "bottom"].includes(Y(t)) ? "y" : "x";
|
|
37
36
|
}
|
|
38
37
|
function vt(t) {
|
|
39
|
-
return xt(
|
|
38
|
+
return xt(U(t));
|
|
40
39
|
}
|
|
41
|
-
function
|
|
40
|
+
function Kt(t, e, n) {
|
|
42
41
|
n === void 0 && (n = !1);
|
|
43
42
|
const o = Z(t), i = vt(t), r = yt(i);
|
|
44
43
|
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
45
44
|
return e.reference[r] > e.floating[r] && (s = ct(s)), [s, ct(s)];
|
|
46
45
|
}
|
|
47
|
-
function
|
|
46
|
+
function Gt(t) {
|
|
48
47
|
const e = ct(t);
|
|
49
48
|
return [pt(t), e, pt(e)];
|
|
50
49
|
}
|
|
51
50
|
function pt(t) {
|
|
52
|
-
return t.replace(/start|end/g, (e) =>
|
|
51
|
+
return t.replace(/start|end/g, (e) => Ut[e]);
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
function Jt(t, e, n) {
|
|
54
|
+
const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
|
|
56
55
|
switch (t) {
|
|
57
56
|
case "top":
|
|
58
57
|
case "bottom":
|
|
59
|
-
return n ? e ?
|
|
58
|
+
return n ? e ? i : o : e ? o : i;
|
|
60
59
|
case "left":
|
|
61
60
|
case "right":
|
|
62
|
-
return e ?
|
|
61
|
+
return e ? r : s;
|
|
63
62
|
default:
|
|
64
63
|
return [];
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
function
|
|
66
|
+
function Qt(t, e, n, o) {
|
|
68
67
|
const i = Z(t);
|
|
69
|
-
let r =
|
|
68
|
+
let r = Jt(Y(t), n === "start", o);
|
|
70
69
|
return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(pt)))), r;
|
|
71
70
|
}
|
|
72
71
|
function ct(t) {
|
|
73
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
72
|
+
return t.replace(/left|right|bottom|top/g, (e) => Xt[e]);
|
|
74
73
|
}
|
|
75
|
-
function
|
|
74
|
+
function Zt(t) {
|
|
76
75
|
return {
|
|
77
76
|
top: 0,
|
|
78
77
|
right: 0,
|
|
@@ -81,8 +80,8 @@ function ie(t) {
|
|
|
81
80
|
...t
|
|
82
81
|
};
|
|
83
82
|
}
|
|
84
|
-
function
|
|
85
|
-
return typeof t != "number" ?
|
|
83
|
+
function kt(t) {
|
|
84
|
+
return typeof t != "number" ? Zt(t) : {
|
|
86
85
|
top: t,
|
|
87
86
|
right: t,
|
|
88
87
|
bottom: t,
|
|
@@ -107,55 +106,55 @@ function lt(t) {
|
|
|
107
106
|
y: n
|
|
108
107
|
};
|
|
109
108
|
}
|
|
110
|
-
function
|
|
109
|
+
function Ct(t, e, n) {
|
|
111
110
|
let {
|
|
112
111
|
reference: o,
|
|
113
112
|
floating: i
|
|
114
113
|
} = t;
|
|
115
|
-
const r =
|
|
116
|
-
let
|
|
114
|
+
const r = U(e), s = vt(e), c = yt(s), f = Y(e), l = r === "y", a = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
|
|
115
|
+
let d;
|
|
117
116
|
switch (f) {
|
|
118
117
|
case "top":
|
|
119
|
-
|
|
118
|
+
d = {
|
|
120
119
|
x: a,
|
|
121
120
|
y: o.y - i.height
|
|
122
121
|
};
|
|
123
122
|
break;
|
|
124
123
|
case "bottom":
|
|
125
|
-
|
|
124
|
+
d = {
|
|
126
125
|
x: a,
|
|
127
126
|
y: o.y + o.height
|
|
128
127
|
};
|
|
129
128
|
break;
|
|
130
129
|
case "right":
|
|
131
|
-
|
|
130
|
+
d = {
|
|
132
131
|
x: o.x + o.width,
|
|
133
|
-
y:
|
|
132
|
+
y: u
|
|
134
133
|
};
|
|
135
134
|
break;
|
|
136
135
|
case "left":
|
|
137
|
-
|
|
136
|
+
d = {
|
|
138
137
|
x: o.x - i.width,
|
|
139
|
-
y:
|
|
138
|
+
y: u
|
|
140
139
|
};
|
|
141
140
|
break;
|
|
142
141
|
default:
|
|
143
|
-
|
|
142
|
+
d = {
|
|
144
143
|
x: o.x,
|
|
145
144
|
y: o.y
|
|
146
145
|
};
|
|
147
146
|
}
|
|
148
147
|
switch (Z(e)) {
|
|
149
148
|
case "start":
|
|
150
|
-
|
|
149
|
+
d[s] -= m * (n && l ? -1 : 1);
|
|
151
150
|
break;
|
|
152
151
|
case "end":
|
|
153
|
-
|
|
152
|
+
d[s] += m * (n && l ? -1 : 1);
|
|
154
153
|
break;
|
|
155
154
|
}
|
|
156
|
-
return
|
|
155
|
+
return d;
|
|
157
156
|
}
|
|
158
|
-
const
|
|
157
|
+
const te = async (t, e, n) => {
|
|
159
158
|
const {
|
|
160
159
|
placement: o = "bottom",
|
|
161
160
|
strategy: i = "absolute",
|
|
@@ -168,24 +167,24 @@ const re = async (t, e, n) => {
|
|
|
168
167
|
strategy: i
|
|
169
168
|
}), {
|
|
170
169
|
x: a,
|
|
171
|
-
y:
|
|
172
|
-
} =
|
|
170
|
+
y: u
|
|
171
|
+
} = Ct(l, o, f), m = o, d = {}, h = 0;
|
|
173
172
|
for (let g = 0; g < c.length; g++) {
|
|
174
173
|
const {
|
|
175
174
|
name: p,
|
|
176
175
|
fn: w
|
|
177
176
|
} = c[g], {
|
|
178
|
-
x,
|
|
179
|
-
y
|
|
177
|
+
x: v,
|
|
178
|
+
y,
|
|
180
179
|
data: b,
|
|
181
|
-
reset:
|
|
180
|
+
reset: x
|
|
182
181
|
} = await w({
|
|
183
182
|
x: a,
|
|
184
|
-
y:
|
|
183
|
+
y: u,
|
|
185
184
|
initialPlacement: o,
|
|
186
185
|
placement: m,
|
|
187
186
|
strategy: i,
|
|
188
|
-
middlewareData:
|
|
187
|
+
middlewareData: d,
|
|
189
188
|
rects: l,
|
|
190
189
|
platform: s,
|
|
191
190
|
elements: {
|
|
@@ -193,27 +192,27 @@ const re = async (t, e, n) => {
|
|
|
193
192
|
floating: e
|
|
194
193
|
}
|
|
195
194
|
});
|
|
196
|
-
a =
|
|
197
|
-
...
|
|
195
|
+
a = v ?? a, u = y ?? u, d = {
|
|
196
|
+
...d,
|
|
198
197
|
[p]: {
|
|
199
|
-
...
|
|
198
|
+
...d[p],
|
|
200
199
|
...b
|
|
201
200
|
}
|
|
202
|
-
},
|
|
201
|
+
}, x && h <= 50 && (h++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (l = x.rects === !0 ? await s.getElementRects({
|
|
203
202
|
reference: t,
|
|
204
203
|
floating: e,
|
|
205
204
|
strategy: i
|
|
206
|
-
}) :
|
|
205
|
+
}) : x.rects), {
|
|
207
206
|
x: a,
|
|
208
|
-
y:
|
|
209
|
-
} =
|
|
207
|
+
y: u
|
|
208
|
+
} = Ct(l, m, f)), g = -1);
|
|
210
209
|
}
|
|
211
210
|
return {
|
|
212
211
|
x: a,
|
|
213
|
-
y:
|
|
212
|
+
y: u,
|
|
214
213
|
placement: m,
|
|
215
214
|
strategy: i,
|
|
216
|
-
middlewareData:
|
|
215
|
+
middlewareData: d
|
|
217
216
|
};
|
|
218
217
|
};
|
|
219
218
|
async function et(t, e) {
|
|
@@ -229,39 +228,39 @@ async function et(t, e) {
|
|
|
229
228
|
} = t, {
|
|
230
229
|
boundary: l = "clippingAncestors",
|
|
231
230
|
rootBoundary: a = "viewport",
|
|
232
|
-
elementContext:
|
|
231
|
+
elementContext: u = "floating",
|
|
233
232
|
altBoundary: m = !1,
|
|
234
|
-
padding:
|
|
235
|
-
} =
|
|
233
|
+
padding: d = 0
|
|
234
|
+
} = I(e, t), h = kt(d), p = c[m ? u === "floating" ? "reference" : "floating" : u], w = lt(await r.getClippingRect({
|
|
236
235
|
element: (n = await (r.isElement == null ? void 0 : r.isElement(p))) == null || n ? p : p.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
|
|
237
236
|
boundary: l,
|
|
238
237
|
rootBoundary: a,
|
|
239
238
|
strategy: f
|
|
240
|
-
})),
|
|
239
|
+
})), v = u === "floating" ? {
|
|
241
240
|
x: o,
|
|
242
241
|
y: i,
|
|
243
242
|
width: s.floating.width,
|
|
244
243
|
height: s.floating.height
|
|
245
|
-
} : s.reference,
|
|
244
|
+
} : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
|
|
246
245
|
x: 1,
|
|
247
246
|
y: 1
|
|
248
247
|
} : {
|
|
249
248
|
x: 1,
|
|
250
249
|
y: 1
|
|
251
|
-
},
|
|
250
|
+
}, x = lt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
252
251
|
elements: c,
|
|
253
|
-
rect:
|
|
254
|
-
offsetParent:
|
|
252
|
+
rect: v,
|
|
253
|
+
offsetParent: y,
|
|
255
254
|
strategy: f
|
|
256
|
-
}) :
|
|
255
|
+
}) : v);
|
|
257
256
|
return {
|
|
258
|
-
top: (w.top -
|
|
259
|
-
bottom: (
|
|
260
|
-
left: (w.left -
|
|
261
|
-
right: (
|
|
257
|
+
top: (w.top - x.top + h.top) / b.y,
|
|
258
|
+
bottom: (x.bottom - w.bottom + h.bottom) / b.y,
|
|
259
|
+
left: (w.left - x.left + h.left) / b.x,
|
|
260
|
+
right: (x.right - w.right + h.right) / b.x
|
|
262
261
|
};
|
|
263
262
|
}
|
|
264
|
-
const
|
|
263
|
+
const ee = (t) => ({
|
|
265
264
|
name: "arrow",
|
|
266
265
|
options: t,
|
|
267
266
|
async fn(e) {
|
|
@@ -276,29 +275,29 @@ const se = (t) => ({
|
|
|
276
275
|
} = e, {
|
|
277
276
|
element: l,
|
|
278
277
|
padding: a = 0
|
|
279
|
-
} =
|
|
278
|
+
} = I(t, e) || {};
|
|
280
279
|
if (l == null)
|
|
281
280
|
return {};
|
|
282
|
-
const
|
|
281
|
+
const u = kt(a), m = {
|
|
283
282
|
x: n,
|
|
284
283
|
y: o
|
|
285
|
-
},
|
|
286
|
-
let R = O ? O[
|
|
287
|
-
(!R || !await (s.isElement == null ? void 0 : s.isElement(O))) && (R = c.floating[
|
|
288
|
-
const L = b / 2 -
|
|
284
|
+
}, d = vt(i), h = yt(d), g = await s.getDimensions(l), p = d === "y", w = p ? "top" : "left", v = p ? "bottom" : "right", y = p ? "clientHeight" : "clientWidth", b = r.reference[h] + r.reference[d] - m[d] - r.floating[h], x = m[d] - r.reference[d], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
285
|
+
let R = O ? O[y] : 0;
|
|
286
|
+
(!R || !await (s.isElement == null ? void 0 : s.isElement(O))) && (R = c.floating[y] || r.floating[h]);
|
|
287
|
+
const L = b / 2 - x / 2, W = R / 2 - g[h] / 2 - 1, D = X(u[w], W), B = X(u[v], W), T = D, P = R - g[h] - B, C = R / 2 - g[h] / 2 + L, j = gt(T, C, P), E = !f.arrow && Z(i) != null && C !== j && r.reference[h] / 2 - (C < T ? D : B) - g[h] / 2 < 0, M = E ? C < T ? C - T : C - P : 0;
|
|
289
288
|
return {
|
|
290
|
-
[
|
|
289
|
+
[d]: m[d] + M,
|
|
291
290
|
data: {
|
|
292
|
-
[
|
|
293
|
-
centerOffset: C -
|
|
294
|
-
...
|
|
295
|
-
alignmentOffset:
|
|
291
|
+
[d]: j,
|
|
292
|
+
centerOffset: C - j - M,
|
|
293
|
+
...E && {
|
|
294
|
+
alignmentOffset: M
|
|
296
295
|
}
|
|
297
296
|
},
|
|
298
|
-
reset:
|
|
297
|
+
reset: E
|
|
299
298
|
};
|
|
300
299
|
}
|
|
301
|
-
}),
|
|
300
|
+
}), ne = function(t) {
|
|
302
301
|
return t === void 0 && (t = {}), {
|
|
303
302
|
name: "flip",
|
|
304
303
|
options: t,
|
|
@@ -313,66 +312,64 @@ const se = (t) => ({
|
|
|
313
312
|
elements: l
|
|
314
313
|
} = e, {
|
|
315
314
|
mainAxis: a = !0,
|
|
316
|
-
crossAxis:
|
|
315
|
+
crossAxis: u = !0,
|
|
317
316
|
fallbackPlacements: m,
|
|
318
|
-
fallbackStrategy:
|
|
317
|
+
fallbackStrategy: d = "bestFit",
|
|
319
318
|
fallbackAxisSideDirection: h = "none",
|
|
320
319
|
flipAlignment: g = !0,
|
|
321
320
|
...p
|
|
322
|
-
} =
|
|
321
|
+
} = I(t, e);
|
|
323
322
|
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
324
323
|
return {};
|
|
325
|
-
const w =
|
|
326
|
-
!m && O &&
|
|
327
|
-
const R = [c, ...
|
|
328
|
-
let
|
|
329
|
-
if (a && W.push(L[w]),
|
|
330
|
-
const C =
|
|
324
|
+
const w = Y(i), v = U(c), y = Y(c) === c, b = await (f.isRTL == null ? void 0 : f.isRTL(l.floating)), x = m || (y || !g ? [ct(c)] : Gt(c)), O = h !== "none";
|
|
325
|
+
!m && O && x.push(...Qt(c, g, h, b));
|
|
326
|
+
const R = [c, ...x], L = await et(e, p), W = [];
|
|
327
|
+
let D = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
328
|
+
if (a && W.push(L[w]), u) {
|
|
329
|
+
const C = Kt(i, s, b);
|
|
331
330
|
W.push(L[C[0]], L[C[1]]);
|
|
332
331
|
}
|
|
333
|
-
if (
|
|
332
|
+
if (D = [...D, {
|
|
334
333
|
placement: i,
|
|
335
334
|
overflows: W
|
|
336
335
|
}], !W.every((C) => C <= 0)) {
|
|
337
|
-
var B,
|
|
338
|
-
const C = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1,
|
|
339
|
-
if (
|
|
340
|
-
// overflows the main axis.
|
|
341
|
-
E.every((A) => A.overflows[0] > 0 && _(A.placement) === x)))
|
|
336
|
+
var B, T;
|
|
337
|
+
const C = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, j = R[C];
|
|
338
|
+
if (j)
|
|
342
339
|
return {
|
|
343
340
|
data: {
|
|
344
341
|
index: C,
|
|
345
|
-
overflows:
|
|
342
|
+
overflows: D
|
|
346
343
|
},
|
|
347
344
|
reset: {
|
|
348
|
-
placement:
|
|
345
|
+
placement: j
|
|
349
346
|
}
|
|
350
347
|
};
|
|
351
|
-
let
|
|
352
|
-
if (!
|
|
353
|
-
switch (
|
|
348
|
+
let E = (T = D.filter((M) => M.overflows[0] <= 0).sort((M, A) => M.overflows[1] - A.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
349
|
+
if (!E)
|
|
350
|
+
switch (d) {
|
|
354
351
|
case "bestFit": {
|
|
355
|
-
var
|
|
356
|
-
const
|
|
352
|
+
var P;
|
|
353
|
+
const M = (P = D.filter((A) => {
|
|
357
354
|
if (O) {
|
|
358
|
-
const k =
|
|
359
|
-
return k ===
|
|
355
|
+
const k = U(A.placement);
|
|
356
|
+
return k === v || // Create a bias to the `y` side axis due to horizontal
|
|
360
357
|
// reading directions favoring greater width.
|
|
361
358
|
k === "y";
|
|
362
359
|
}
|
|
363
360
|
return !0;
|
|
364
|
-
}).map((A) => [A.placement, A.overflows.filter((k) => k > 0).reduce((k,
|
|
365
|
-
|
|
361
|
+
}).map((A) => [A.placement, A.overflows.filter((k) => k > 0).reduce((k, q) => k + q, 0)]).sort((A, k) => A[1] - k[1])[0]) == null ? void 0 : P[0];
|
|
362
|
+
M && (E = M);
|
|
366
363
|
break;
|
|
367
364
|
}
|
|
368
365
|
case "initialPlacement":
|
|
369
|
-
|
|
366
|
+
E = c;
|
|
370
367
|
break;
|
|
371
368
|
}
|
|
372
|
-
if (i !==
|
|
369
|
+
if (i !== E)
|
|
373
370
|
return {
|
|
374
371
|
reset: {
|
|
375
|
-
placement:
|
|
372
|
+
placement: E
|
|
376
373
|
}
|
|
377
374
|
};
|
|
378
375
|
}
|
|
@@ -380,7 +377,7 @@ const se = (t) => ({
|
|
|
380
377
|
}
|
|
381
378
|
};
|
|
382
379
|
};
|
|
383
|
-
function
|
|
380
|
+
function Et(t, e) {
|
|
384
381
|
return {
|
|
385
382
|
top: t.top - e.height,
|
|
386
383
|
right: t.right - e.width,
|
|
@@ -388,10 +385,10 @@ function Pt(t, e) {
|
|
|
388
385
|
left: t.left - e.width
|
|
389
386
|
};
|
|
390
387
|
}
|
|
391
|
-
function
|
|
392
|
-
return
|
|
388
|
+
function St(t) {
|
|
389
|
+
return qt.some((e) => t[e] >= 0);
|
|
393
390
|
}
|
|
394
|
-
const
|
|
391
|
+
const oe = function(t) {
|
|
395
392
|
return t === void 0 && (t = {}), {
|
|
396
393
|
name: "hide",
|
|
397
394
|
options: t,
|
|
@@ -401,17 +398,17 @@ const le = function(t) {
|
|
|
401
398
|
} = e, {
|
|
402
399
|
strategy: o = "referenceHidden",
|
|
403
400
|
...i
|
|
404
|
-
} =
|
|
401
|
+
} = I(t, e);
|
|
405
402
|
switch (o) {
|
|
406
403
|
case "referenceHidden": {
|
|
407
404
|
const r = await et(e, {
|
|
408
405
|
...i,
|
|
409
406
|
elementContext: "reference"
|
|
410
|
-
}), s =
|
|
407
|
+
}), s = Et(r, n.reference);
|
|
411
408
|
return {
|
|
412
409
|
data: {
|
|
413
410
|
referenceHiddenOffsets: s,
|
|
414
|
-
referenceHidden:
|
|
411
|
+
referenceHidden: St(s)
|
|
415
412
|
}
|
|
416
413
|
};
|
|
417
414
|
}
|
|
@@ -419,11 +416,11 @@ const le = function(t) {
|
|
|
419
416
|
const r = await et(e, {
|
|
420
417
|
...i,
|
|
421
418
|
altBoundary: !0
|
|
422
|
-
}), s =
|
|
419
|
+
}), s = Et(r, n.floating);
|
|
423
420
|
return {
|
|
424
421
|
data: {
|
|
425
422
|
escapedOffsets: s,
|
|
426
|
-
escaped:
|
|
423
|
+
escaped: St(s)
|
|
427
424
|
}
|
|
428
425
|
};
|
|
429
426
|
}
|
|
@@ -432,35 +429,35 @@ const le = function(t) {
|
|
|
432
429
|
}
|
|
433
430
|
}
|
|
434
431
|
};
|
|
435
|
-
}
|
|
436
|
-
async function
|
|
432
|
+
};
|
|
433
|
+
async function ie(t, e) {
|
|
437
434
|
const {
|
|
438
435
|
placement: n,
|
|
439
436
|
platform: o,
|
|
440
437
|
elements: i
|
|
441
|
-
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s =
|
|
438
|
+
} = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = Y(n), c = Z(n), f = U(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, a = r && f ? -1 : 1, u = I(e, t);
|
|
442
439
|
let {
|
|
443
440
|
mainAxis: m,
|
|
444
|
-
crossAxis:
|
|
441
|
+
crossAxis: d,
|
|
445
442
|
alignmentAxis: h
|
|
446
|
-
} = typeof
|
|
447
|
-
mainAxis:
|
|
443
|
+
} = typeof u == "number" ? {
|
|
444
|
+
mainAxis: u,
|
|
448
445
|
crossAxis: 0,
|
|
449
446
|
alignmentAxis: null
|
|
450
447
|
} : {
|
|
451
|
-
mainAxis:
|
|
452
|
-
crossAxis:
|
|
453
|
-
alignmentAxis:
|
|
448
|
+
mainAxis: u.mainAxis || 0,
|
|
449
|
+
crossAxis: u.crossAxis || 0,
|
|
450
|
+
alignmentAxis: u.alignmentAxis
|
|
454
451
|
};
|
|
455
|
-
return c && typeof h == "number" && (
|
|
456
|
-
x:
|
|
452
|
+
return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), f ? {
|
|
453
|
+
x: d * a,
|
|
457
454
|
y: m * l
|
|
458
455
|
} : {
|
|
459
456
|
x: m * l,
|
|
460
|
-
y:
|
|
457
|
+
y: d * a
|
|
461
458
|
};
|
|
462
459
|
}
|
|
463
|
-
const
|
|
460
|
+
const re = function(t) {
|
|
464
461
|
return t === void 0 && (t = 0), {
|
|
465
462
|
name: "offset",
|
|
466
463
|
options: t,
|
|
@@ -471,7 +468,7 @@ const ae = function(t) {
|
|
|
471
468
|
y: r,
|
|
472
469
|
placement: s,
|
|
473
470
|
middlewareData: c
|
|
474
|
-
} = e, f = await
|
|
471
|
+
} = e, f = await ie(e, t);
|
|
475
472
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
|
|
476
473
|
x: i + f.x,
|
|
477
474
|
y: r + f.y,
|
|
@@ -482,7 +479,7 @@ const ae = function(t) {
|
|
|
482
479
|
};
|
|
483
480
|
}
|
|
484
481
|
};
|
|
485
|
-
},
|
|
482
|
+
}, se = function(t) {
|
|
486
483
|
return t === void 0 && (t = {}), {
|
|
487
484
|
name: "shift",
|
|
488
485
|
options: t,
|
|
@@ -498,32 +495,32 @@ const ae = function(t) {
|
|
|
498
495
|
fn: (p) => {
|
|
499
496
|
let {
|
|
500
497
|
x: w,
|
|
501
|
-
y:
|
|
498
|
+
y: v
|
|
502
499
|
} = p;
|
|
503
500
|
return {
|
|
504
501
|
x: w,
|
|
505
|
-
y:
|
|
502
|
+
y: v
|
|
506
503
|
};
|
|
507
504
|
}
|
|
508
505
|
},
|
|
509
506
|
...f
|
|
510
|
-
} =
|
|
507
|
+
} = I(t, e), l = {
|
|
511
508
|
x: n,
|
|
512
509
|
y: o
|
|
513
|
-
}, a = await et(e, f),
|
|
514
|
-
let
|
|
510
|
+
}, a = await et(e, f), u = U(Y(i)), m = xt(u);
|
|
511
|
+
let d = l[m], h = l[u];
|
|
515
512
|
if (r) {
|
|
516
|
-
const p = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right",
|
|
517
|
-
|
|
513
|
+
const p = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", v = d + a[p], y = d - a[w];
|
|
514
|
+
d = gt(v, d, y);
|
|
518
515
|
}
|
|
519
516
|
if (s) {
|
|
520
|
-
const p =
|
|
521
|
-
h = gt(
|
|
517
|
+
const p = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", v = h + a[p], y = h - a[w];
|
|
518
|
+
h = gt(v, h, y);
|
|
522
519
|
}
|
|
523
520
|
const g = c.fn({
|
|
524
521
|
...e,
|
|
525
|
-
[m]:
|
|
526
|
-
[
|
|
522
|
+
[m]: d,
|
|
523
|
+
[u]: h
|
|
527
524
|
});
|
|
528
525
|
return {
|
|
529
526
|
...g,
|
|
@@ -532,13 +529,13 @@ const ae = function(t) {
|
|
|
532
529
|
y: g.y - o,
|
|
533
530
|
enabled: {
|
|
534
531
|
[m]: r,
|
|
535
|
-
[
|
|
532
|
+
[u]: s
|
|
536
533
|
}
|
|
537
534
|
}
|
|
538
535
|
};
|
|
539
536
|
}
|
|
540
537
|
};
|
|
541
|
-
},
|
|
538
|
+
}, ce = function(t) {
|
|
542
539
|
return t === void 0 && (t = {}), {
|
|
543
540
|
options: t,
|
|
544
541
|
fn(e) {
|
|
@@ -552,12 +549,12 @@ const ae = function(t) {
|
|
|
552
549
|
offset: c = 0,
|
|
553
550
|
mainAxis: f = !0,
|
|
554
551
|
crossAxis: l = !0
|
|
555
|
-
} =
|
|
552
|
+
} = I(t, e), a = {
|
|
556
553
|
x: n,
|
|
557
554
|
y: o
|
|
558
|
-
},
|
|
559
|
-
let
|
|
560
|
-
const g =
|
|
555
|
+
}, u = U(i), m = xt(u);
|
|
556
|
+
let d = a[m], h = a[u];
|
|
557
|
+
const g = I(c, e), p = typeof g == "number" ? {
|
|
561
558
|
mainAxis: g,
|
|
562
559
|
crossAxis: 0
|
|
563
560
|
} : {
|
|
@@ -566,21 +563,21 @@ const ae = function(t) {
|
|
|
566
563
|
...g
|
|
567
564
|
};
|
|
568
565
|
if (f) {
|
|
569
|
-
const
|
|
570
|
-
|
|
566
|
+
const y = m === "y" ? "height" : "width", b = r.reference[m] - r.floating[y] + p.mainAxis, x = r.reference[m] + r.reference[y] - p.mainAxis;
|
|
567
|
+
d < b ? d = b : d > x && (d = x);
|
|
571
568
|
}
|
|
572
569
|
if (l) {
|
|
573
|
-
var w,
|
|
574
|
-
const
|
|
575
|
-
h <
|
|
570
|
+
var w, v;
|
|
571
|
+
const y = m === "y" ? "width" : "height", b = ["top", "left"].includes(Y(i)), x = r.reference[u] - r.floating[y] + (b && ((w = s.offset) == null ? void 0 : w[u]) || 0) + (b ? 0 : p.crossAxis), O = r.reference[u] + r.reference[y] + (b ? 0 : ((v = s.offset) == null ? void 0 : v[u]) || 0) - (b ? p.crossAxis : 0);
|
|
572
|
+
h < x ? h = x : h > O && (h = O);
|
|
576
573
|
}
|
|
577
574
|
return {
|
|
578
|
-
[m]:
|
|
579
|
-
[
|
|
575
|
+
[m]: d,
|
|
576
|
+
[u]: h
|
|
580
577
|
};
|
|
581
578
|
}
|
|
582
579
|
};
|
|
583
|
-
},
|
|
580
|
+
}, le = function(t) {
|
|
584
581
|
return t === void 0 && (t = {}), {
|
|
585
582
|
name: "size",
|
|
586
583
|
options: t,
|
|
@@ -595,17 +592,17 @@ const ae = function(t) {
|
|
|
595
592
|
apply: f = () => {
|
|
596
593
|
},
|
|
597
594
|
...l
|
|
598
|
-
} =
|
|
595
|
+
} = I(t, e), a = await et(e, l), u = Y(i), m = Z(i), d = U(i) === "y", {
|
|
599
596
|
width: h,
|
|
600
597
|
height: g
|
|
601
598
|
} = r.floating;
|
|
602
599
|
let p, w;
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
let R = b, L =
|
|
606
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (L =
|
|
607
|
-
const
|
|
608
|
-
|
|
600
|
+
u === "top" || u === "bottom" ? (p = u, w = m === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = u, p = m === "end" ? "top" : "bottom");
|
|
601
|
+
const v = g - a.top - a.bottom, y = h - a.left - a.right, b = X(g - a[p], v), x = X(h - a[w], y), O = !e.middlewareData.shift;
|
|
602
|
+
let R = b, L = x;
|
|
603
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (L = y), (o = e.middlewareData.shift) != null && o.enabled.y && (R = v), O && !m) {
|
|
604
|
+
const D = F(a.left, 0), B = F(a.right, 0), T = F(a.top, 0), P = F(a.bottom, 0);
|
|
605
|
+
d ? L = h - 2 * (D !== 0 || B !== 0 ? D + B : F(a.left, a.right)) : R = g - 2 * (T !== 0 || P !== 0 ? T + P : F(a.top, a.bottom));
|
|
609
606
|
}
|
|
610
607
|
await f({
|
|
611
608
|
...e,
|
|
@@ -625,45 +622,42 @@ function at() {
|
|
|
625
622
|
return typeof window < "u";
|
|
626
623
|
}
|
|
627
624
|
function tt(t) {
|
|
628
|
-
return
|
|
625
|
+
return Ft(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
629
626
|
}
|
|
630
627
|
function $(t) {
|
|
631
628
|
var e;
|
|
632
629
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
633
630
|
}
|
|
634
|
-
function
|
|
631
|
+
function z(t) {
|
|
635
632
|
var e;
|
|
636
|
-
return (e = (
|
|
633
|
+
return (e = (Ft(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
637
634
|
}
|
|
638
|
-
function
|
|
635
|
+
function Ft(t) {
|
|
639
636
|
return at() ? t instanceof Node || t instanceof $(t).Node : !1;
|
|
640
637
|
}
|
|
641
|
-
function
|
|
638
|
+
function H(t) {
|
|
642
639
|
return at() ? t instanceof Element || t instanceof $(t).Element : !1;
|
|
643
640
|
}
|
|
644
|
-
function
|
|
641
|
+
function _(t) {
|
|
645
642
|
return at() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
|
|
646
643
|
}
|
|
647
644
|
function Dt(t) {
|
|
648
645
|
return !at() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
|
|
649
646
|
}
|
|
650
|
-
const he = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
651
647
|
function ot(t) {
|
|
652
648
|
const {
|
|
653
649
|
overflow: e,
|
|
654
650
|
overflowX: n,
|
|
655
651
|
overflowY: o,
|
|
656
652
|
display: i
|
|
657
|
-
} =
|
|
658
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !
|
|
653
|
+
} = N(t);
|
|
654
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
|
|
659
655
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
return ge.has(tt(t));
|
|
656
|
+
function fe(t) {
|
|
657
|
+
return ["table", "td", "th"].includes(tt(t));
|
|
663
658
|
}
|
|
664
|
-
const we = [":popover-open", ":modal"];
|
|
665
659
|
function ut(t) {
|
|
666
|
-
return
|
|
660
|
+
return [":popover-open", ":modal"].some((e) => {
|
|
667
661
|
try {
|
|
668
662
|
return t.matches(e);
|
|
669
663
|
} catch {
|
|
@@ -671,14 +665,13 @@ function ut(t) {
|
|
|
671
665
|
}
|
|
672
666
|
});
|
|
673
667
|
}
|
|
674
|
-
const xe = ["transform", "translate", "scale", "rotate", "perspective"], ye = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ve = ["paint", "layout", "strict", "content"];
|
|
675
668
|
function bt(t) {
|
|
676
|
-
const e = At(), n =
|
|
677
|
-
return
|
|
669
|
+
const e = At(), n = H(t) ? N(t) : t;
|
|
670
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
678
671
|
}
|
|
679
|
-
function
|
|
672
|
+
function ae(t) {
|
|
680
673
|
let e = K(t);
|
|
681
|
-
for (;
|
|
674
|
+
for (; _(e) && !Q(e); ) {
|
|
682
675
|
if (bt(e))
|
|
683
676
|
return e;
|
|
684
677
|
if (ut(e))
|
|
@@ -690,15 +683,14 @@ function be(t) {
|
|
|
690
683
|
function At() {
|
|
691
684
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
692
685
|
}
|
|
693
|
-
const Ae = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
694
686
|
function Q(t) {
|
|
695
|
-
return
|
|
687
|
+
return ["html", "body", "#document"].includes(tt(t));
|
|
696
688
|
}
|
|
697
|
-
function
|
|
689
|
+
function N(t) {
|
|
698
690
|
return $(t).getComputedStyle(t);
|
|
699
691
|
}
|
|
700
692
|
function dt(t) {
|
|
701
|
-
return
|
|
693
|
+
return H(t) ? {
|
|
702
694
|
scrollLeft: t.scrollLeft,
|
|
703
695
|
scrollTop: t.scrollTop
|
|
704
696
|
} : {
|
|
@@ -714,18 +706,18 @@ function K(t) {
|
|
|
714
706
|
t.assignedSlot || // DOM Element detected.
|
|
715
707
|
t.parentNode || // ShadowRoot detected.
|
|
716
708
|
Dt(t) && t.host || // Fallback.
|
|
717
|
-
|
|
709
|
+
z(t)
|
|
718
710
|
);
|
|
719
711
|
return Dt(e) ? e.host : e;
|
|
720
712
|
}
|
|
721
|
-
function
|
|
713
|
+
function $t(t) {
|
|
722
714
|
const e = K(t);
|
|
723
|
-
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body :
|
|
715
|
+
return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : _(e) && ot(e) ? e : $t(e);
|
|
724
716
|
}
|
|
725
717
|
function nt(t, e, n) {
|
|
726
718
|
var o;
|
|
727
719
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
728
|
-
const i =
|
|
720
|
+
const i = $t(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = $(i);
|
|
729
721
|
if (r) {
|
|
730
722
|
const c = wt(s);
|
|
731
723
|
return e.concat(s, s.visualViewport || [], ot(i) ? i : [], c && n ? nt(c) : []);
|
|
@@ -735,10 +727,10 @@ function nt(t, e, n) {
|
|
|
735
727
|
function wt(t) {
|
|
736
728
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
737
729
|
}
|
|
738
|
-
function
|
|
739
|
-
const e =
|
|
730
|
+
function Wt(t) {
|
|
731
|
+
const e = N(t);
|
|
740
732
|
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
741
|
-
const i =
|
|
733
|
+
const i = _(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = st(n) !== r || st(o) !== s;
|
|
742
734
|
return c && (n = r, o = s), {
|
|
743
735
|
width: n,
|
|
744
736
|
height: o,
|
|
@@ -746,61 +738,61 @@ function Ht(t) {
|
|
|
746
738
|
};
|
|
747
739
|
}
|
|
748
740
|
function Rt(t) {
|
|
749
|
-
return
|
|
741
|
+
return H(t) ? t : t.contextElement;
|
|
750
742
|
}
|
|
751
743
|
function J(t) {
|
|
752
744
|
const e = Rt(t);
|
|
753
|
-
if (!
|
|
754
|
-
return
|
|
745
|
+
if (!_(e))
|
|
746
|
+
return V(1);
|
|
755
747
|
const n = e.getBoundingClientRect(), {
|
|
756
748
|
width: o,
|
|
757
749
|
height: i,
|
|
758
750
|
$: r
|
|
759
|
-
} =
|
|
751
|
+
} = Wt(e);
|
|
760
752
|
let s = (r ? st(n.width) : n.width) / o, c = (r ? st(n.height) : n.height) / i;
|
|
761
753
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
762
754
|
x: s,
|
|
763
755
|
y: c
|
|
764
756
|
};
|
|
765
757
|
}
|
|
766
|
-
const
|
|
767
|
-
function
|
|
758
|
+
const ue = /* @__PURE__ */ V(0);
|
|
759
|
+
function Bt(t) {
|
|
768
760
|
const e = $(t);
|
|
769
|
-
return !At() || !e.visualViewport ?
|
|
761
|
+
return !At() || !e.visualViewport ? ue : {
|
|
770
762
|
x: e.visualViewport.offsetLeft,
|
|
771
763
|
y: e.visualViewport.offsetTop
|
|
772
764
|
};
|
|
773
765
|
}
|
|
774
|
-
function
|
|
766
|
+
function de(t, e, n) {
|
|
775
767
|
return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
|
|
776
768
|
}
|
|
777
769
|
function G(t, e, n, o) {
|
|
778
770
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
779
771
|
const i = t.getBoundingClientRect(), r = Rt(t);
|
|
780
|
-
let s =
|
|
781
|
-
e && (o ?
|
|
782
|
-
const c =
|
|
783
|
-
let f = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, a = i.width / s.x,
|
|
772
|
+
let s = V(1);
|
|
773
|
+
e && (o ? H(o) && (s = J(o)) : s = J(t));
|
|
774
|
+
const c = de(r, n, o) ? Bt(r) : V(0);
|
|
775
|
+
let f = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, a = i.width / s.x, u = i.height / s.y;
|
|
784
776
|
if (r) {
|
|
785
|
-
const m = $(r),
|
|
777
|
+
const m = $(r), d = o && H(o) ? $(o) : o;
|
|
786
778
|
let h = m, g = wt(h);
|
|
787
|
-
for (; g && o &&
|
|
788
|
-
const p = J(g), w = g.getBoundingClientRect(),
|
|
789
|
-
f *= p.x, l *= p.y, a *= p.x,
|
|
779
|
+
for (; g && o && d !== h; ) {
|
|
780
|
+
const p = J(g), w = g.getBoundingClientRect(), v = N(g), y = w.left + (g.clientLeft + parseFloat(v.paddingLeft)) * p.x, b = w.top + (g.clientTop + parseFloat(v.paddingTop)) * p.y;
|
|
781
|
+
f *= p.x, l *= p.y, a *= p.x, u *= p.y, f += y, l += b, h = $(g), g = wt(h);
|
|
790
782
|
}
|
|
791
783
|
}
|
|
792
784
|
return lt({
|
|
793
785
|
width: a,
|
|
794
|
-
height:
|
|
786
|
+
height: u,
|
|
795
787
|
x: f,
|
|
796
788
|
y: l
|
|
797
789
|
});
|
|
798
790
|
}
|
|
799
791
|
function Ot(t, e) {
|
|
800
792
|
const n = dt(t).scrollLeft;
|
|
801
|
-
return e ? e.left + n : G(
|
|
793
|
+
return e ? e.left + n : G(z(t)).left + n;
|
|
802
794
|
}
|
|
803
|
-
function
|
|
795
|
+
function Ht(t, e, n) {
|
|
804
796
|
n === void 0 && (n = !1);
|
|
805
797
|
const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
|
|
806
798
|
// RTL <body> scrollbar.
|
|
@@ -811,26 +803,26 @@ function _t(t, e, n) {
|
|
|
811
803
|
y: r
|
|
812
804
|
};
|
|
813
805
|
}
|
|
814
|
-
function
|
|
806
|
+
function me(t) {
|
|
815
807
|
let {
|
|
816
808
|
elements: e,
|
|
817
809
|
rect: n,
|
|
818
810
|
offsetParent: o,
|
|
819
811
|
strategy: i
|
|
820
812
|
} = t;
|
|
821
|
-
const r = i === "fixed", s =
|
|
813
|
+
const r = i === "fixed", s = z(o), c = e ? ut(e.floating) : !1;
|
|
822
814
|
if (o === s || c && r)
|
|
823
815
|
return n;
|
|
824
816
|
let f = {
|
|
825
817
|
scrollLeft: 0,
|
|
826
818
|
scrollTop: 0
|
|
827
|
-
}, l =
|
|
828
|
-
const a =
|
|
829
|
-
if ((
|
|
830
|
-
const
|
|
831
|
-
l = J(o), a.x =
|
|
819
|
+
}, l = V(1);
|
|
820
|
+
const a = V(0), u = _(o);
|
|
821
|
+
if ((u || !u && !r) && ((tt(o) !== "body" || ot(s)) && (f = dt(o)), _(o))) {
|
|
822
|
+
const d = G(o);
|
|
823
|
+
l = J(o), a.x = d.x + o.clientLeft, a.y = d.y + o.clientTop;
|
|
832
824
|
}
|
|
833
|
-
const m = s && !
|
|
825
|
+
const m = s && !u && !r ? Ht(s, f, !0) : V(0);
|
|
834
826
|
return {
|
|
835
827
|
width: n.width * l.x,
|
|
836
828
|
height: n.height * l.y,
|
|
@@ -838,22 +830,22 @@ function Ce(t) {
|
|
|
838
830
|
y: n.y * l.y - f.scrollTop * l.y + a.y + m.y
|
|
839
831
|
};
|
|
840
832
|
}
|
|
841
|
-
function
|
|
833
|
+
function he(t) {
|
|
842
834
|
return Array.from(t.getClientRects());
|
|
843
835
|
}
|
|
844
|
-
function
|
|
845
|
-
const e =
|
|
836
|
+
function ge(t) {
|
|
837
|
+
const e = z(t), n = dt(t), o = t.ownerDocument.body, i = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
846
838
|
let s = -n.scrollLeft + Ot(t);
|
|
847
839
|
const c = -n.scrollTop;
|
|
848
|
-
return
|
|
840
|
+
return N(o).direction === "rtl" && (s += F(e.clientWidth, o.clientWidth) - i), {
|
|
849
841
|
width: i,
|
|
850
842
|
height: r,
|
|
851
843
|
x: s,
|
|
852
844
|
y: c
|
|
853
845
|
};
|
|
854
846
|
}
|
|
855
|
-
function
|
|
856
|
-
const n = $(t), o =
|
|
847
|
+
function pe(t, e) {
|
|
848
|
+
const n = $(t), o = z(t), i = n.visualViewport;
|
|
857
849
|
let r = o.clientWidth, s = o.clientHeight, c = 0, f = 0;
|
|
858
850
|
if (i) {
|
|
859
851
|
r = i.width, s = i.height;
|
|
@@ -867,9 +859,8 @@ function Pe(t, e) {
|
|
|
867
859
|
y: f
|
|
868
860
|
};
|
|
869
861
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = j(t) ? J(t) : z(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = i * r.x, l = o * r.y;
|
|
862
|
+
function we(t, e) {
|
|
863
|
+
const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = _(t) ? J(t) : V(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = i * r.x, l = o * r.y;
|
|
873
864
|
return {
|
|
874
865
|
width: s,
|
|
875
866
|
height: c,
|
|
@@ -877,16 +868,16 @@ function De(t, e) {
|
|
|
877
868
|
y: l
|
|
878
869
|
};
|
|
879
870
|
}
|
|
880
|
-
function
|
|
871
|
+
function Lt(t, e, n) {
|
|
881
872
|
let o;
|
|
882
873
|
if (e === "viewport")
|
|
883
|
-
o =
|
|
874
|
+
o = pe(t, n);
|
|
884
875
|
else if (e === "document")
|
|
885
|
-
o =
|
|
886
|
-
else if (
|
|
887
|
-
o =
|
|
876
|
+
o = ge(z(t));
|
|
877
|
+
else if (H(e))
|
|
878
|
+
o = we(e, n);
|
|
888
879
|
else {
|
|
889
|
-
const i =
|
|
880
|
+
const i = Bt(t);
|
|
890
881
|
o = {
|
|
891
882
|
x: e.x - i.x,
|
|
892
883
|
y: e.y - i.y,
|
|
@@ -896,34 +887,34 @@ function Tt(t, e, n) {
|
|
|
896
887
|
}
|
|
897
888
|
return lt(o);
|
|
898
889
|
}
|
|
899
|
-
function
|
|
890
|
+
function Nt(t, e) {
|
|
900
891
|
const n = K(t);
|
|
901
|
-
return n === e || !
|
|
892
|
+
return n === e || !H(n) || Q(n) ? !1 : N(n).position === "fixed" || Nt(n, e);
|
|
902
893
|
}
|
|
903
|
-
function
|
|
894
|
+
function xe(t, e) {
|
|
904
895
|
const n = e.get(t);
|
|
905
896
|
if (n)
|
|
906
897
|
return n;
|
|
907
|
-
let o = nt(t, [], !1).filter((c) =>
|
|
908
|
-
const r =
|
|
898
|
+
let o = nt(t, [], !1).filter((c) => H(c) && tt(c) !== "body"), i = null;
|
|
899
|
+
const r = N(t).position === "fixed";
|
|
909
900
|
let s = r ? K(t) : t;
|
|
910
|
-
for (;
|
|
911
|
-
const c =
|
|
912
|
-
!f && c.position === "fixed" && (i = null), (r ? !f && !i : !f && c.position === "static" && !!i &&
|
|
901
|
+
for (; H(s) && !Q(s); ) {
|
|
902
|
+
const c = N(s), f = bt(s);
|
|
903
|
+
!f && c.position === "fixed" && (i = null), (r ? !f && !i : !f && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || ot(s) && !f && Nt(t, s)) ? o = o.filter((a) => a !== s) : i = c, s = K(s);
|
|
913
904
|
}
|
|
914
905
|
return e.set(t, o), o;
|
|
915
906
|
}
|
|
916
|
-
function
|
|
907
|
+
function ye(t) {
|
|
917
908
|
let {
|
|
918
909
|
element: e,
|
|
919
910
|
boundary: n,
|
|
920
911
|
rootBoundary: o,
|
|
921
912
|
strategy: i
|
|
922
913
|
} = t;
|
|
923
|
-
const s = [...n === "clippingAncestors" ? ut(e) ? [] :
|
|
924
|
-
const
|
|
925
|
-
return l.top = F(
|
|
926
|
-
},
|
|
914
|
+
const s = [...n === "clippingAncestors" ? ut(e) ? [] : xe(e, this._c) : [].concat(n), o], c = s[0], f = s.reduce((l, a) => {
|
|
915
|
+
const u = Lt(e, a, i);
|
|
916
|
+
return l.top = F(u.top, l.top), l.right = X(u.right, l.right), l.bottom = X(u.bottom, l.bottom), l.left = F(u.left, l.left), l;
|
|
917
|
+
}, Lt(e, c, i));
|
|
927
918
|
return {
|
|
928
919
|
width: f.right - f.left,
|
|
929
920
|
height: f.bottom - f.top,
|
|
@@ -931,74 +922,70 @@ function Me(t) {
|
|
|
931
922
|
y: f.top
|
|
932
923
|
};
|
|
933
924
|
}
|
|
934
|
-
function
|
|
925
|
+
function ve(t) {
|
|
935
926
|
const {
|
|
936
927
|
width: e,
|
|
937
928
|
height: n
|
|
938
|
-
} =
|
|
929
|
+
} = Wt(t);
|
|
939
930
|
return {
|
|
940
931
|
width: e,
|
|
941
932
|
height: n
|
|
942
933
|
};
|
|
943
934
|
}
|
|
944
|
-
function
|
|
945
|
-
const o =
|
|
935
|
+
function be(t, e, n) {
|
|
936
|
+
const o = _(e), i = z(e), r = n === "fixed", s = G(t, !0, r, e);
|
|
946
937
|
let c = {
|
|
947
938
|
scrollLeft: 0,
|
|
948
939
|
scrollTop: 0
|
|
949
940
|
};
|
|
950
|
-
const f =
|
|
951
|
-
function l() {
|
|
952
|
-
f.x = Ot(i);
|
|
953
|
-
}
|
|
941
|
+
const f = V(0);
|
|
954
942
|
if (o || !o && !r)
|
|
955
943
|
if ((tt(e) !== "body" || ot(i)) && (c = dt(e)), o) {
|
|
956
|
-
const
|
|
957
|
-
f.x =
|
|
944
|
+
const m = G(e, !0, r, e);
|
|
945
|
+
f.x = m.x + e.clientLeft, f.y = m.y + e.clientTop;
|
|
958
946
|
} else
|
|
959
|
-
i &&
|
|
960
|
-
|
|
961
|
-
const a = i && !o && !r ? _t(i, c) : z(0), d = s.left + c.scrollLeft - f.x - a.x, m = s.top + c.scrollTop - f.y - a.y;
|
|
947
|
+
i && (f.x = Ot(i));
|
|
948
|
+
const l = i && !o && !r ? Ht(i, c) : V(0), a = s.left + c.scrollLeft - f.x - l.x, u = s.top + c.scrollTop - f.y - l.y;
|
|
962
949
|
return {
|
|
963
|
-
x:
|
|
964
|
-
y:
|
|
950
|
+
x: a,
|
|
951
|
+
y: u,
|
|
965
952
|
width: s.width,
|
|
966
953
|
height: s.height
|
|
967
954
|
};
|
|
968
955
|
}
|
|
969
956
|
function mt(t) {
|
|
970
|
-
return
|
|
957
|
+
return N(t).position === "static";
|
|
971
958
|
}
|
|
972
|
-
function
|
|
973
|
-
if (!
|
|
959
|
+
function Pt(t, e) {
|
|
960
|
+
if (!_(t) || N(t).position === "fixed")
|
|
974
961
|
return null;
|
|
975
962
|
if (e)
|
|
976
963
|
return e(t);
|
|
977
964
|
let n = t.offsetParent;
|
|
978
|
-
return
|
|
965
|
+
return z(t) === n && (n = n.ownerDocument.body), n;
|
|
979
966
|
}
|
|
980
|
-
function
|
|
967
|
+
function Vt(t, e) {
|
|
981
968
|
const n = $(t);
|
|
982
969
|
if (ut(t))
|
|
983
970
|
return n;
|
|
984
|
-
if (!
|
|
971
|
+
if (!_(t)) {
|
|
985
972
|
let i = K(t);
|
|
986
973
|
for (; i && !Q(i); ) {
|
|
987
|
-
if (
|
|
974
|
+
if (H(i) && !mt(i))
|
|
988
975
|
return i;
|
|
989
976
|
i = K(i);
|
|
990
977
|
}
|
|
991
978
|
return n;
|
|
992
979
|
}
|
|
993
|
-
let o =
|
|
994
|
-
for (; o &&
|
|
995
|
-
o =
|
|
996
|
-
return o && Q(o) && mt(o) && !bt(o) ? n : o ||
|
|
980
|
+
let o = Pt(t, e);
|
|
981
|
+
for (; o && fe(o) && mt(o); )
|
|
982
|
+
o = Pt(o, e);
|
|
983
|
+
return o && Q(o) && mt(o) && !bt(o) ? n : o || ae(t) || n;
|
|
997
984
|
}
|
|
998
|
-
const
|
|
999
|
-
const e = this.getOffsetParent ||
|
|
985
|
+
const Ae = async function(t) {
|
|
986
|
+
const e = this.getOffsetParent || Vt, n = this.getDimensions, o = await n(t.floating);
|
|
1000
987
|
return {
|
|
1001
|
-
reference:
|
|
988
|
+
reference: be(t.reference, await e(t.floating), t.strategy),
|
|
1002
989
|
floating: {
|
|
1003
990
|
x: 0,
|
|
1004
991
|
y: 0,
|
|
@@ -1007,27 +994,27 @@ const $e = async function(t) {
|
|
|
1007
994
|
}
|
|
1008
995
|
};
|
|
1009
996
|
};
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
1012
|
-
}
|
|
1013
|
-
const
|
|
1014
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1015
|
-
getDocumentElement:
|
|
1016
|
-
getClippingRect:
|
|
1017
|
-
getOffsetParent:
|
|
1018
|
-
getElementRects:
|
|
1019
|
-
getClientRects:
|
|
1020
|
-
getDimensions:
|
|
997
|
+
function Re(t) {
|
|
998
|
+
return N(t).direction === "rtl";
|
|
999
|
+
}
|
|
1000
|
+
const Oe = {
|
|
1001
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: me,
|
|
1002
|
+
getDocumentElement: z,
|
|
1003
|
+
getClippingRect: ye,
|
|
1004
|
+
getOffsetParent: Vt,
|
|
1005
|
+
getElementRects: Ae,
|
|
1006
|
+
getClientRects: he,
|
|
1007
|
+
getDimensions: ve,
|
|
1021
1008
|
getScale: J,
|
|
1022
|
-
isElement:
|
|
1023
|
-
isRTL:
|
|
1009
|
+
isElement: H,
|
|
1010
|
+
isRTL: Re
|
|
1024
1011
|
};
|
|
1025
|
-
function
|
|
1012
|
+
function _t(t, e) {
|
|
1026
1013
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1027
1014
|
}
|
|
1028
|
-
function
|
|
1015
|
+
function Ce(t, e) {
|
|
1029
1016
|
let n = null, o;
|
|
1030
|
-
const i =
|
|
1017
|
+
const i = z(t);
|
|
1031
1018
|
function r() {
|
|
1032
1019
|
var c;
|
|
1033
1020
|
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -1036,18 +1023,18 @@ function Ve(t, e) {
|
|
|
1036
1023
|
c === void 0 && (c = !1), f === void 0 && (f = 1), r();
|
|
1037
1024
|
const l = t.getBoundingClientRect(), {
|
|
1038
1025
|
left: a,
|
|
1039
|
-
top:
|
|
1026
|
+
top: u,
|
|
1040
1027
|
width: m,
|
|
1041
|
-
height:
|
|
1028
|
+
height: d
|
|
1042
1029
|
} = l;
|
|
1043
|
-
if (c || e(), !m || !
|
|
1030
|
+
if (c || e(), !m || !d)
|
|
1044
1031
|
return;
|
|
1045
|
-
const h = it(
|
|
1032
|
+
const h = it(u), g = it(i.clientWidth - (a + m)), p = it(i.clientHeight - (u + d)), w = it(a), y = {
|
|
1046
1033
|
rootMargin: -h + "px " + -g + "px " + -p + "px " + -w + "px",
|
|
1047
|
-
threshold: F(0,
|
|
1034
|
+
threshold: F(0, X(1, f)) || 1
|
|
1048
1035
|
};
|
|
1049
1036
|
let b = !0;
|
|
1050
|
-
function
|
|
1037
|
+
function x(O) {
|
|
1051
1038
|
const R = O[0].intersectionRatio;
|
|
1052
1039
|
if (R !== f) {
|
|
1053
1040
|
if (!b)
|
|
@@ -1056,22 +1043,22 @@ function Ve(t, e) {
|
|
|
1056
1043
|
s(!1, 1e-7);
|
|
1057
1044
|
}, 1e3);
|
|
1058
1045
|
}
|
|
1059
|
-
R === 1 && !
|
|
1046
|
+
R === 1 && !_t(l, t.getBoundingClientRect()) && s(), b = !1;
|
|
1060
1047
|
}
|
|
1061
1048
|
try {
|
|
1062
|
-
n = new IntersectionObserver(
|
|
1063
|
-
...
|
|
1049
|
+
n = new IntersectionObserver(x, {
|
|
1050
|
+
...y,
|
|
1064
1051
|
// Handle <iframe>s
|
|
1065
1052
|
root: i.ownerDocument
|
|
1066
1053
|
});
|
|
1067
1054
|
} catch {
|
|
1068
|
-
n = new IntersectionObserver(
|
|
1055
|
+
n = new IntersectionObserver(x, y);
|
|
1069
1056
|
}
|
|
1070
1057
|
n.observe(t);
|
|
1071
1058
|
}
|
|
1072
1059
|
return s(!0), r;
|
|
1073
1060
|
}
|
|
1074
|
-
function
|
|
1061
|
+
function $e(t, e, n, o) {
|
|
1075
1062
|
o === void 0 && (o = {});
|
|
1076
1063
|
const {
|
|
1077
1064
|
ancestorScroll: i = !0,
|
|
@@ -1085,43 +1072,42 @@ function Ge(t, e, n, o) {
|
|
|
1085
1072
|
passive: !0
|
|
1086
1073
|
}), r && w.addEventListener("resize", n);
|
|
1087
1074
|
});
|
|
1088
|
-
const
|
|
1089
|
-
let m = -1,
|
|
1090
|
-
s && (
|
|
1091
|
-
let [
|
|
1092
|
-
|
|
1093
|
-
var
|
|
1094
|
-
(
|
|
1075
|
+
const u = l && c ? Ce(l, n) : null;
|
|
1076
|
+
let m = -1, d = null;
|
|
1077
|
+
s && (d = new ResizeObserver((w) => {
|
|
1078
|
+
let [v] = w;
|
|
1079
|
+
v && v.target === l && d && (d.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1080
|
+
var y;
|
|
1081
|
+
(y = d) == null || y.observe(e);
|
|
1095
1082
|
})), n();
|
|
1096
|
-
}), l && !f &&
|
|
1083
|
+
}), l && !f && d.observe(l), d.observe(e));
|
|
1097
1084
|
let h, g = f ? G(t) : null;
|
|
1098
1085
|
f && p();
|
|
1099
1086
|
function p() {
|
|
1100
1087
|
const w = G(t);
|
|
1101
|
-
g && !
|
|
1088
|
+
g && !_t(g, w) && n(), g = w, h = requestAnimationFrame(p);
|
|
1102
1089
|
}
|
|
1103
1090
|
return n(), () => {
|
|
1104
1091
|
var w;
|
|
1105
|
-
a.forEach((
|
|
1106
|
-
i &&
|
|
1107
|
-
}),
|
|
1092
|
+
a.forEach((v) => {
|
|
1093
|
+
i && v.removeEventListener("scroll", n), r && v.removeEventListener("resize", n);
|
|
1094
|
+
}), u == null || u(), (w = d) == null || w.disconnect(), d = null, f && cancelAnimationFrame(h);
|
|
1108
1095
|
};
|
|
1109
1096
|
}
|
|
1110
|
-
const
|
|
1097
|
+
const Ee = re, Se = se, De = ne, Le = le, Pe = oe, Tt = ee, Te = ce, Me = (t, e, n) => {
|
|
1111
1098
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1112
|
-
platform:
|
|
1099
|
+
platform: Oe,
|
|
1113
1100
|
...n
|
|
1114
1101
|
}, r = {
|
|
1115
1102
|
...i.platform,
|
|
1116
1103
|
_c: o
|
|
1117
1104
|
};
|
|
1118
|
-
return
|
|
1105
|
+
return te(t, e, {
|
|
1119
1106
|
...i,
|
|
1120
1107
|
platform: r
|
|
1121
1108
|
});
|
|
1122
1109
|
};
|
|
1123
|
-
var
|
|
1124
|
-
}, rt = qe ? qt : Xe;
|
|
1110
|
+
var rt = typeof document < "u" ? jt : It;
|
|
1125
1111
|
function ft(t, e) {
|
|
1126
1112
|
if (t === e)
|
|
1127
1113
|
return !0;
|
|
@@ -1153,20 +1139,20 @@ function ft(t, e) {
|
|
|
1153
1139
|
}
|
|
1154
1140
|
return t !== t && e !== e;
|
|
1155
1141
|
}
|
|
1156
|
-
function
|
|
1142
|
+
function zt(t) {
|
|
1157
1143
|
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1158
1144
|
}
|
|
1159
|
-
function
|
|
1160
|
-
const n =
|
|
1145
|
+
function Mt(t, e) {
|
|
1146
|
+
const n = zt(t);
|
|
1161
1147
|
return Math.round(e * n) / n;
|
|
1162
1148
|
}
|
|
1163
1149
|
function ht(t) {
|
|
1164
|
-
const e =
|
|
1150
|
+
const e = S.useRef(t);
|
|
1165
1151
|
return rt(() => {
|
|
1166
1152
|
e.current = t;
|
|
1167
1153
|
}), e;
|
|
1168
1154
|
}
|
|
1169
|
-
function
|
|
1155
|
+
function We(t) {
|
|
1170
1156
|
t === void 0 && (t = {});
|
|
1171
1157
|
const {
|
|
1172
1158
|
placement: e = "bottom",
|
|
@@ -1180,20 +1166,20 @@ function Je(t) {
|
|
|
1180
1166
|
transform: c = !0,
|
|
1181
1167
|
whileElementsMounted: f,
|
|
1182
1168
|
open: l
|
|
1183
|
-
} = t, [a,
|
|
1169
|
+
} = t, [a, u] = S.useState({
|
|
1184
1170
|
x: 0,
|
|
1185
1171
|
y: 0,
|
|
1186
1172
|
strategy: n,
|
|
1187
1173
|
placement: e,
|
|
1188
1174
|
middlewareData: {},
|
|
1189
1175
|
isPositioned: !1
|
|
1190
|
-
}), [m,
|
|
1191
|
-
ft(m, o) ||
|
|
1192
|
-
const [h, g] =
|
|
1176
|
+
}), [m, d] = S.useState(o);
|
|
1177
|
+
ft(m, o) || d(o);
|
|
1178
|
+
const [h, g] = S.useState(null), [p, w] = S.useState(null), v = S.useCallback((A) => {
|
|
1193
1179
|
A !== O.current && (O.current = A, g(A));
|
|
1194
|
-
}, []),
|
|
1180
|
+
}, []), y = S.useCallback((A) => {
|
|
1195
1181
|
A !== R.current && (R.current = A, w(A));
|
|
1196
|
-
}, []), b = r || h,
|
|
1182
|
+
}, []), b = r || h, x = s || p, O = S.useRef(null), R = S.useRef(null), L = S.useRef(a), W = f != null, D = ht(f), B = ht(i), T = ht(l), P = S.useCallback(() => {
|
|
1197
1183
|
if (!O.current || !R.current)
|
|
1198
1184
|
return;
|
|
1199
1185
|
const A = {
|
|
@@ -1201,74 +1187,74 @@ function Je(t) {
|
|
|
1201
1187
|
strategy: n,
|
|
1202
1188
|
middleware: m
|
|
1203
1189
|
};
|
|
1204
|
-
B.current && (A.platform = B.current),
|
|
1205
|
-
const
|
|
1190
|
+
B.current && (A.platform = B.current), Me(O.current, R.current, A).then((k) => {
|
|
1191
|
+
const q = {
|
|
1206
1192
|
...k,
|
|
1207
1193
|
// The floating element's position may be recomputed while it's closed
|
|
1208
1194
|
// but still mounted (such as when transitioning out). To ensure
|
|
1209
1195
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1210
1196
|
// setting it to `true` when `open === false` (must be specified).
|
|
1211
|
-
isPositioned:
|
|
1197
|
+
isPositioned: T.current !== !1
|
|
1212
1198
|
};
|
|
1213
|
-
C.current && !ft(L.current,
|
|
1214
|
-
|
|
1199
|
+
C.current && !ft(L.current, q) && (L.current = q, Yt.flushSync(() => {
|
|
1200
|
+
u(q);
|
|
1215
1201
|
}));
|
|
1216
1202
|
});
|
|
1217
|
-
}, [m, e, n, B,
|
|
1203
|
+
}, [m, e, n, B, T]);
|
|
1218
1204
|
rt(() => {
|
|
1219
|
-
l === !1 && L.current.isPositioned && (L.current.isPositioned = !1,
|
|
1205
|
+
l === !1 && L.current.isPositioned && (L.current.isPositioned = !1, u((A) => ({
|
|
1220
1206
|
...A,
|
|
1221
1207
|
isPositioned: !1
|
|
1222
1208
|
})));
|
|
1223
1209
|
}, [l]);
|
|
1224
|
-
const C =
|
|
1210
|
+
const C = S.useRef(!1);
|
|
1225
1211
|
rt(() => (C.current = !0, () => {
|
|
1226
1212
|
C.current = !1;
|
|
1227
1213
|
}), []), rt(() => {
|
|
1228
|
-
if (b && (O.current = b),
|
|
1229
|
-
if (
|
|
1230
|
-
return
|
|
1231
|
-
|
|
1214
|
+
if (b && (O.current = b), x && (R.current = x), b && x) {
|
|
1215
|
+
if (D.current)
|
|
1216
|
+
return D.current(b, x, P);
|
|
1217
|
+
P();
|
|
1232
1218
|
}
|
|
1233
|
-
}, [b,
|
|
1234
|
-
const
|
|
1219
|
+
}, [b, x, P, D, W]);
|
|
1220
|
+
const j = S.useMemo(() => ({
|
|
1235
1221
|
reference: O,
|
|
1236
1222
|
floating: R,
|
|
1237
|
-
setReference:
|
|
1238
|
-
setFloating:
|
|
1239
|
-
}), [
|
|
1223
|
+
setReference: v,
|
|
1224
|
+
setFloating: y
|
|
1225
|
+
}), [v, y]), E = S.useMemo(() => ({
|
|
1240
1226
|
reference: b,
|
|
1241
|
-
floating:
|
|
1242
|
-
}), [b,
|
|
1227
|
+
floating: x
|
|
1228
|
+
}), [b, x]), M = S.useMemo(() => {
|
|
1243
1229
|
const A = {
|
|
1244
1230
|
position: n,
|
|
1245
1231
|
left: 0,
|
|
1246
1232
|
top: 0
|
|
1247
1233
|
};
|
|
1248
|
-
if (!
|
|
1234
|
+
if (!E.floating)
|
|
1249
1235
|
return A;
|
|
1250
|
-
const k =
|
|
1236
|
+
const k = Mt(E.floating, a.x), q = Mt(E.floating, a.y);
|
|
1251
1237
|
return c ? {
|
|
1252
1238
|
...A,
|
|
1253
|
-
transform: "translate(" + k + "px, " +
|
|
1254
|
-
...
|
|
1239
|
+
transform: "translate(" + k + "px, " + q + "px)",
|
|
1240
|
+
...zt(E.floating) >= 1.5 && {
|
|
1255
1241
|
willChange: "transform"
|
|
1256
1242
|
}
|
|
1257
1243
|
} : {
|
|
1258
1244
|
position: n,
|
|
1259
1245
|
left: k,
|
|
1260
|
-
top:
|
|
1246
|
+
top: q
|
|
1261
1247
|
};
|
|
1262
|
-
}, [n, c,
|
|
1263
|
-
return
|
|
1248
|
+
}, [n, c, E.floating, a.x, a.y]);
|
|
1249
|
+
return S.useMemo(() => ({
|
|
1264
1250
|
...a,
|
|
1265
|
-
update:
|
|
1266
|
-
refs:
|
|
1267
|
-
elements:
|
|
1268
|
-
floatingStyles:
|
|
1269
|
-
}), [a,
|
|
1251
|
+
update: P,
|
|
1252
|
+
refs: j,
|
|
1253
|
+
elements: E,
|
|
1254
|
+
floatingStyles: M
|
|
1255
|
+
}), [a, P, j, E, M]);
|
|
1270
1256
|
}
|
|
1271
|
-
const
|
|
1257
|
+
const ke = (t) => {
|
|
1272
1258
|
function e(n) {
|
|
1273
1259
|
return {}.hasOwnProperty.call(n, "current");
|
|
1274
1260
|
}
|
|
@@ -1280,45 +1266,45 @@ const Ue = (t) => {
|
|
|
1280
1266
|
element: o,
|
|
1281
1267
|
padding: i
|
|
1282
1268
|
} = typeof t == "function" ? t(n) : t;
|
|
1283
|
-
return o && e(o) ? o.current != null ?
|
|
1269
|
+
return o && e(o) ? o.current != null ? Tt({
|
|
1284
1270
|
element: o.current,
|
|
1285
1271
|
padding: i
|
|
1286
|
-
}).fn(n) : {} : o ?
|
|
1272
|
+
}).fn(n) : {} : o ? Tt({
|
|
1287
1273
|
element: o,
|
|
1288
1274
|
padding: i
|
|
1289
1275
|
}).fn(n) : {};
|
|
1290
1276
|
}
|
|
1291
1277
|
};
|
|
1292
|
-
},
|
|
1293
|
-
...
|
|
1278
|
+
}, Be = (t, e) => ({
|
|
1279
|
+
...Ee(t),
|
|
1294
1280
|
options: [t, e]
|
|
1295
|
-
}),
|
|
1296
|
-
...
|
|
1281
|
+
}), He = (t, e) => ({
|
|
1282
|
+
...Se(t),
|
|
1297
1283
|
options: [t, e]
|
|
1298
|
-
}),
|
|
1299
|
-
...
|
|
1284
|
+
}), Ne = (t, e) => ({
|
|
1285
|
+
...Te(t),
|
|
1300
1286
|
options: [t, e]
|
|
1301
|
-
}),
|
|
1302
|
-
...
|
|
1287
|
+
}), Ve = (t, e) => ({
|
|
1288
|
+
...De(t),
|
|
1303
1289
|
options: [t, e]
|
|
1304
|
-
}),
|
|
1305
|
-
...
|
|
1290
|
+
}), _e = (t, e) => ({
|
|
1291
|
+
...Le(t),
|
|
1306
1292
|
options: [t, e]
|
|
1307
|
-
}),
|
|
1308
|
-
...
|
|
1293
|
+
}), ze = (t, e) => ({
|
|
1294
|
+
...Pe(t),
|
|
1309
1295
|
options: [t, e]
|
|
1310
|
-
}),
|
|
1311
|
-
...
|
|
1296
|
+
}), je = (t, e) => ({
|
|
1297
|
+
...ke(t),
|
|
1312
1298
|
options: [t, e]
|
|
1313
1299
|
});
|
|
1314
1300
|
export {
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1301
|
+
$e as a,
|
|
1302
|
+
_e as b,
|
|
1303
|
+
je as c,
|
|
1304
|
+
Ve as f,
|
|
1305
|
+
ze as h,
|
|
1306
|
+
Ne as l,
|
|
1307
|
+
Be as o,
|
|
1308
|
+
He as s,
|
|
1309
|
+
We as u
|
|
1324
1310
|
};
|