@pdf-viewer/react 1.2.0-beta.1 → 1.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Container-8fea0875.js +39 -0
- package/dist/{RPDefaultLayout-17ed747f.js → RPDefaultLayout-197c5f1f.js} +1068 -1166
- package/dist/assets/Container.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +3 -4
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +166 -166
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/utils/annotations.d.ts +9 -0
- package/dist/types/utils/renderPage.d.ts +7 -1
- package/dist/types/utils/types.d.ts +21 -1
- package/dist/utils/annotations.js +304 -0
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePdfProperties.js +22 -25
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/renderPage.js +10 -8
- package/dist/utils/types.js +12 -11
- package/package.json +1 -1
- package/dist/Container-f68e1779.js +0 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as qn, jsx as Ge } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
|
-
import { useCallback as oe, createContext as
|
|
3
|
+
import { useCallback as oe, createContext as ye, useMemo as q, createElement as P, useContext as vt, forwardRef as k, Children as K, isValidElement as re, cloneElement as Ce, Fragment as qt, useEffect as N, useRef as M, useState as j, useLayoutEffect as Ue, useReducer as Qn } from "react";
|
|
4
4
|
import * as Jn from "react-dom";
|
|
5
5
|
import eo, { flushSync as Qt } from "react-dom";
|
|
6
6
|
import { c as to } from "../../clsx-0c6e471a.js";
|
|
@@ -34,7 +34,7 @@ function Pe(...e) {
|
|
|
34
34
|
function oo(e, t = []) {
|
|
35
35
|
let n = [];
|
|
36
36
|
function o(i, c) {
|
|
37
|
-
const s = /* @__PURE__ */
|
|
37
|
+
const s = /* @__PURE__ */ ye(c), a = n.length;
|
|
38
38
|
n = [
|
|
39
39
|
...n,
|
|
40
40
|
c
|
|
@@ -62,7 +62,7 @@ function oo(e, t = []) {
|
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
const r = () => {
|
|
65
|
-
const i = n.map((c) => /* @__PURE__ */
|
|
65
|
+
const i = n.map((c) => /* @__PURE__ */ ye(c));
|
|
66
66
|
return function(s) {
|
|
67
67
|
const a = (s == null ? void 0 : s[e]) || i;
|
|
68
68
|
return q(
|
|
@@ -223,7 +223,7 @@ function uo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
223
223
|
}
|
|
224
224
|
const st = "dismissableLayer.update", fo = "dismissableLayer.pointerDownOutside", po = "dismissableLayer.focusOutside";
|
|
225
225
|
let Ot;
|
|
226
|
-
const vo = /* @__PURE__ */
|
|
226
|
+
const vo = /* @__PURE__ */ ye({
|
|
227
227
|
layers: /* @__PURE__ */ new Set(),
|
|
228
228
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
229
229
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -234,13 +234,13 @@ const vo = /* @__PURE__ */ we({
|
|
|
234
234
|
(E) => v(E)
|
|
235
235
|
), h = Array.from(f.layers), [g] = [
|
|
236
236
|
...f.layersWithOutsidePointerEventsDisabled
|
|
237
|
-
].slice(-1),
|
|
237
|
+
].slice(-1), w = h.indexOf(g), b = l ? h.indexOf(l) : -1, $ = f.layersWithOutsidePointerEventsDisabled.size > 0, y = b >= w, A = mo((E) => {
|
|
238
238
|
const O = E.target, D = [
|
|
239
239
|
...f.branches
|
|
240
240
|
].some(
|
|
241
241
|
(_) => _.contains(O)
|
|
242
242
|
);
|
|
243
|
-
!
|
|
243
|
+
!y || D || (i == null || i(E), s == null || s(E), E.defaultPrevented || a == null || a());
|
|
244
244
|
}, d), C = go((E) => {
|
|
245
245
|
const O = E.target;
|
|
246
246
|
[
|
|
@@ -272,7 +272,7 @@ const vo = /* @__PURE__ */ we({
|
|
|
272
272
|
}, []), /* @__PURE__ */ P(Ve.div, F({}, u, {
|
|
273
273
|
ref: p,
|
|
274
274
|
style: {
|
|
275
|
-
pointerEvents: $ ?
|
|
275
|
+
pointerEvents: $ ? y ? "auto" : "none" : void 0,
|
|
276
276
|
...e.style
|
|
277
277
|
},
|
|
278
278
|
onFocusCapture: ae(e.onFocusCapture, C.onFocusCapture),
|
|
@@ -408,16 +408,16 @@ const Qe = "focusScope.autoFocusOnMount", Je = "focusScope.autoFocusOnUnmount",
|
|
|
408
408
|
}));
|
|
409
409
|
}, g = function(b) {
|
|
410
410
|
const $ = document.activeElement;
|
|
411
|
-
for (const
|
|
412
|
-
|
|
411
|
+
for (const y of b)
|
|
412
|
+
y.removedNodes.length > 0 && (s != null && s.contains($) || ne(s));
|
|
413
413
|
};
|
|
414
414
|
document.addEventListener("focusin", p), document.addEventListener("focusout", h);
|
|
415
|
-
const
|
|
416
|
-
return s &&
|
|
415
|
+
const w = new MutationObserver(g);
|
|
416
|
+
return s && w.observe(s, {
|
|
417
417
|
childList: !0,
|
|
418
418
|
subtree: !0
|
|
419
419
|
}), () => {
|
|
420
|
-
document.removeEventListener("focusin", p), document.removeEventListener("focusout", h),
|
|
420
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", h), w.disconnect();
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
}, [
|
|
@@ -430,7 +430,7 @@ const Qe = "focusScope.autoFocusOnMount", Je = "focusScope.autoFocusOnUnmount",
|
|
|
430
430
|
const p = document.activeElement;
|
|
431
431
|
if (!s.contains(p)) {
|
|
432
432
|
const g = new CustomEvent(Qe, _t);
|
|
433
|
-
s.addEventListener(Qe, u), s.dispatchEvent(g), g.defaultPrevented || (
|
|
433
|
+
s.addEventListener(Qe, u), s.dispatchEvent(g), g.defaultPrevented || (yo(Po(tn(s)), {
|
|
434
434
|
select: !0
|
|
435
435
|
}), document.activeElement === p && ne(s));
|
|
436
436
|
}
|
|
@@ -454,12 +454,12 @@ const Qe = "focusScope.autoFocusOnMount", Je = "focusScope.autoFocusOnUnmount",
|
|
|
454
454
|
return;
|
|
455
455
|
const h = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, g = document.activeElement;
|
|
456
456
|
if (h && g) {
|
|
457
|
-
const
|
|
457
|
+
const w = p.currentTarget, [b, $] = wo(w);
|
|
458
458
|
b && $ ? !p.shiftKey && g === $ ? (p.preventDefault(), n && ne(b, {
|
|
459
459
|
select: !0
|
|
460
460
|
})) : p.shiftKey && g === b && (p.preventDefault(), n && ne($, {
|
|
461
461
|
select: !0
|
|
462
|
-
})) : g ===
|
|
462
|
+
})) : g === w && p.preventDefault();
|
|
463
463
|
}
|
|
464
464
|
}, [
|
|
465
465
|
n,
|
|
@@ -473,7 +473,7 @@ const Qe = "focusScope.autoFocusOnMount", Je = "focusScope.autoFocusOnUnmount",
|
|
|
473
473
|
onKeyDown: m
|
|
474
474
|
}));
|
|
475
475
|
});
|
|
476
|
-
function
|
|
476
|
+
function yo(e, { select: t = !1 } = {}) {
|
|
477
477
|
const n = document.activeElement;
|
|
478
478
|
for (const o of e)
|
|
479
479
|
if (ne(o, {
|
|
@@ -481,7 +481,7 @@ function wo(e, { select: t = !1 } = {}) {
|
|
|
481
481
|
}), document.activeElement !== n)
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function wo(e) {
|
|
485
485
|
const t = tn(e), n = Nt(t, e), o = Nt(t.reverse(), e);
|
|
486
486
|
return [
|
|
487
487
|
n,
|
|
@@ -554,7 +554,7 @@ function Po(e) {
|
|
|
554
554
|
(t) => t.tagName !== "A"
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
|
-
const Ao = globalThis != null && globalThis.document ?
|
|
557
|
+
const Ao = globalThis != null && globalThis.document ? Ue : () => {
|
|
558
558
|
}, So = x["useId".toString()] || (() => {
|
|
559
559
|
});
|
|
560
560
|
let Oo = 0;
|
|
@@ -741,10 +741,10 @@ const Io = async (e, t, n) => {
|
|
|
741
741
|
name: h,
|
|
742
742
|
fn: g
|
|
743
743
|
} = s[p], {
|
|
744
|
-
x:
|
|
744
|
+
x: w,
|
|
745
745
|
y: b,
|
|
746
746
|
data: $,
|
|
747
|
-
reset:
|
|
747
|
+
reset: y
|
|
748
748
|
} = await g({
|
|
749
749
|
x: f,
|
|
750
750
|
y: l,
|
|
@@ -759,17 +759,17 @@ const Io = async (e, t, n) => {
|
|
|
759
759
|
floating: t
|
|
760
760
|
}
|
|
761
761
|
});
|
|
762
|
-
f =
|
|
762
|
+
f = w ?? f, l = b ?? l, d = {
|
|
763
763
|
...d,
|
|
764
764
|
[h]: {
|
|
765
765
|
...d[h],
|
|
766
766
|
...$
|
|
767
767
|
}
|
|
768
|
-
},
|
|
768
|
+
}, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (v = y.placement), y.rects && (u = y.rects === !0 ? await c.getElementRects({
|
|
769
769
|
reference: e,
|
|
770
770
|
floating: t,
|
|
771
771
|
strategy: r
|
|
772
|
-
}) :
|
|
772
|
+
}) : y.rects), {
|
|
773
773
|
x: f,
|
|
774
774
|
y: l
|
|
775
775
|
} = Mt(u, v, a)), p = -1);
|
|
@@ -782,7 +782,7 @@ const Io = async (e, t, n) => {
|
|
|
782
782
|
middlewareData: d
|
|
783
783
|
};
|
|
784
784
|
};
|
|
785
|
-
async function
|
|
785
|
+
async function we(e, t) {
|
|
786
786
|
var n;
|
|
787
787
|
t === void 0 && (t = {});
|
|
788
788
|
const {
|
|
@@ -803,7 +803,7 @@ async function ye(e, t) {
|
|
|
803
803
|
boundary: u,
|
|
804
804
|
rootBoundary: f,
|
|
805
805
|
strategy: a
|
|
806
|
-
})),
|
|
806
|
+
})), w = l === "floating" ? {
|
|
807
807
|
x: o,
|
|
808
808
|
y: r,
|
|
809
809
|
width: c.floating.width,
|
|
@@ -814,17 +814,17 @@ async function ye(e, t) {
|
|
|
814
814
|
} : {
|
|
815
815
|
x: 1,
|
|
816
816
|
y: 1
|
|
817
|
-
},
|
|
817
|
+
}, y = He(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
818
818
|
elements: s,
|
|
819
|
-
rect:
|
|
819
|
+
rect: w,
|
|
820
820
|
offsetParent: b,
|
|
821
821
|
strategy: a
|
|
822
|
-
}) :
|
|
822
|
+
}) : w);
|
|
823
823
|
return {
|
|
824
|
-
top: (g.top -
|
|
825
|
-
bottom: (
|
|
826
|
-
left: (g.left -
|
|
827
|
-
right: (
|
|
824
|
+
top: (g.top - y.top + m.top) / $.y,
|
|
825
|
+
bottom: (y.bottom - g.bottom + m.bottom) / $.y,
|
|
826
|
+
left: (g.left - y.left + m.left) / $.x,
|
|
827
|
+
right: (y.right - g.right + m.right) / $.x
|
|
828
828
|
};
|
|
829
829
|
}
|
|
830
830
|
const Wo = (e) => ({
|
|
@@ -848,15 +848,15 @@ const Wo = (e) => ({
|
|
|
848
848
|
const l = nn(f), v = {
|
|
849
849
|
x: n,
|
|
850
850
|
y: o
|
|
851
|
-
}, d = $t(r), m = bt(d), p = await c.getDimensions(u), h = d === "y", g = h ? "top" : "left",
|
|
851
|
+
}, d = $t(r), m = bt(d), p = await c.getDimensions(u), h = d === "y", g = h ? "top" : "left", w = h ? "bottom" : "right", b = h ? "clientHeight" : "clientWidth", $ = i.reference[m] + i.reference[d] - v[d] - i.floating[m], y = v[d] - i.reference[d], A = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(u));
|
|
852
852
|
let C = A ? A[b] : 0;
|
|
853
853
|
(!C || !await (c.isElement == null ? void 0 : c.isElement(A))) && (C = s.floating[b] || i.floating[m]);
|
|
854
|
-
const E = $ / 2 -
|
|
854
|
+
const E = $ / 2 - y / 2, O = C / 2 - p[m] / 2 - 1, D = ie(l[g], O), _ = ie(l[w], O), I = D, R = C - p[m] - _, T = C / 2 - p[m] / 2 + E, U = at(I, T, R), L = !a.arrow && ge(r) != null && T !== U && i.reference[m] / 2 - (T < I ? D : _) - p[m] / 2 < 0, W = L ? T < I ? T - I : T - R : 0;
|
|
855
855
|
return {
|
|
856
856
|
[d]: v[d] + W,
|
|
857
857
|
data: {
|
|
858
|
-
[d]:
|
|
859
|
-
centerOffset: T -
|
|
858
|
+
[d]: U,
|
|
859
|
+
centerOffset: T - U - W,
|
|
860
860
|
...L && {
|
|
861
861
|
alignmentOffset: W
|
|
862
862
|
}
|
|
@@ -888,9 +888,9 @@ const Wo = (e) => ({
|
|
|
888
888
|
} = ee(e, t);
|
|
889
889
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
890
890
|
return {};
|
|
891
|
-
const g = te(r),
|
|
892
|
-
!v && A &&
|
|
893
|
-
const C = [s, ...
|
|
891
|
+
const g = te(r), w = ce(s), b = te(s) === s, $ = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), y = v || (b || !p ? [Be(s)] : Fo(s)), A = m !== "none";
|
|
892
|
+
!v && A && y.push(...Mo(s, p, m, $));
|
|
893
|
+
const C = [s, ...y], E = await we(t, h), O = [];
|
|
894
894
|
let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
895
895
|
if (f && O.push(E[g]), l) {
|
|
896
896
|
const T = No(r, c, $);
|
|
@@ -901,15 +901,15 @@ const Wo = (e) => ({
|
|
|
901
901
|
overflows: O
|
|
902
902
|
}], !O.every((T) => T <= 0)) {
|
|
903
903
|
var _, I;
|
|
904
|
-
const T = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1,
|
|
905
|
-
if (
|
|
904
|
+
const T = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, U = C[T];
|
|
905
|
+
if (U)
|
|
906
906
|
return {
|
|
907
907
|
data: {
|
|
908
908
|
index: T,
|
|
909
909
|
overflows: D
|
|
910
910
|
},
|
|
911
911
|
reset: {
|
|
912
|
-
placement:
|
|
912
|
+
placement: U
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
let L = (I = D.filter((W) => W.overflows[0] <= 0).sort((W, S) => W.overflows[1] - S.overflows[1])[0]) == null ? void 0 : I.placement;
|
|
@@ -920,7 +920,7 @@ const Wo = (e) => ({
|
|
|
920
920
|
const W = (R = D.filter((S) => {
|
|
921
921
|
if (A) {
|
|
922
922
|
const B = ce(S.placement);
|
|
923
|
-
return B ===
|
|
923
|
+
return B === w || // Create a bias to the `y` side axis due to horizontal
|
|
924
924
|
// reading directions favoring greater width.
|
|
925
925
|
B === "y";
|
|
926
926
|
}
|
|
@@ -968,7 +968,7 @@ const Ho = function(e) {
|
|
|
968
968
|
} = ee(e, t);
|
|
969
969
|
switch (o) {
|
|
970
970
|
case "referenceHidden": {
|
|
971
|
-
const i = await
|
|
971
|
+
const i = await we(t, {
|
|
972
972
|
...r,
|
|
973
973
|
elementContext: "reference"
|
|
974
974
|
}), c = kt(i, n.reference);
|
|
@@ -980,7 +980,7 @@ const Ho = function(e) {
|
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
982
|
case "escaped": {
|
|
983
|
-
const i = await
|
|
983
|
+
const i = await we(t, {
|
|
984
984
|
...r,
|
|
985
985
|
altBoundary: !0
|
|
986
986
|
}), c = kt(i, n.floating);
|
|
@@ -997,7 +997,7 @@ const Ho = function(e) {
|
|
|
997
997
|
}
|
|
998
998
|
};
|
|
999
999
|
};
|
|
1000
|
-
async function
|
|
1000
|
+
async function zo(e, t) {
|
|
1001
1001
|
const {
|
|
1002
1002
|
placement: n,
|
|
1003
1003
|
platform: o,
|
|
@@ -1024,7 +1024,7 @@ async function Uo(e, t) {
|
|
|
1024
1024
|
y: d * f
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
const
|
|
1027
|
+
const Uo = function(e) {
|
|
1028
1028
|
return e === void 0 && (e = 0), {
|
|
1029
1029
|
name: "offset",
|
|
1030
1030
|
options: e,
|
|
@@ -1035,7 +1035,7 @@ const zo = function(e) {
|
|
|
1035
1035
|
y: i,
|
|
1036
1036
|
placement: c,
|
|
1037
1037
|
middlewareData: s
|
|
1038
|
-
} = t, a = await
|
|
1038
|
+
} = t, a = await zo(t, e);
|
|
1039
1039
|
return c === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
|
|
1040
1040
|
x: r + a.x,
|
|
1041
1041
|
y: i + a.y,
|
|
@@ -1062,11 +1062,11 @@ const zo = function(e) {
|
|
|
1062
1062
|
fn: (h) => {
|
|
1063
1063
|
let {
|
|
1064
1064
|
x: g,
|
|
1065
|
-
y
|
|
1065
|
+
y: w
|
|
1066
1066
|
} = h;
|
|
1067
1067
|
return {
|
|
1068
1068
|
x: g,
|
|
1069
|
-
y
|
|
1069
|
+
y: w
|
|
1070
1070
|
};
|
|
1071
1071
|
}
|
|
1072
1072
|
},
|
|
@@ -1074,15 +1074,15 @@ const zo = function(e) {
|
|
|
1074
1074
|
} = ee(e, t), u = {
|
|
1075
1075
|
x: n,
|
|
1076
1076
|
y: o
|
|
1077
|
-
}, f = await
|
|
1077
|
+
}, f = await we(t, a), l = ce(te(r)), v = gt(l);
|
|
1078
1078
|
let d = u[v], m = u[l];
|
|
1079
1079
|
if (i) {
|
|
1080
|
-
const h = v === "y" ? "top" : "left", g = v === "y" ? "bottom" : "right",
|
|
1081
|
-
d = at(
|
|
1080
|
+
const h = v === "y" ? "top" : "left", g = v === "y" ? "bottom" : "right", w = d + f[h], b = d - f[g];
|
|
1081
|
+
d = at(w, d, b);
|
|
1082
1082
|
}
|
|
1083
1083
|
if (c) {
|
|
1084
|
-
const h = l === "y" ? "top" : "left", g = l === "y" ? "bottom" : "right",
|
|
1085
|
-
m = at(
|
|
1084
|
+
const h = l === "y" ? "top" : "left", g = l === "y" ? "bottom" : "right", w = m + f[h], b = m - f[g];
|
|
1085
|
+
m = at(w, m, b);
|
|
1086
1086
|
}
|
|
1087
1087
|
const p = s.fn({
|
|
1088
1088
|
...t,
|
|
@@ -1130,13 +1130,13 @@ const zo = function(e) {
|
|
|
1130
1130
|
...p
|
|
1131
1131
|
};
|
|
1132
1132
|
if (a) {
|
|
1133
|
-
const b = v === "y" ? "height" : "width", $ = i.reference[v] - i.floating[b] + h.mainAxis,
|
|
1134
|
-
d < $ ? d = $ : d >
|
|
1133
|
+
const b = v === "y" ? "height" : "width", $ = i.reference[v] - i.floating[b] + h.mainAxis, y = i.reference[v] + i.reference[b] - h.mainAxis;
|
|
1134
|
+
d < $ ? d = $ : d > y && (d = y);
|
|
1135
1135
|
}
|
|
1136
1136
|
if (u) {
|
|
1137
|
-
var g,
|
|
1138
|
-
const b = v === "y" ? "width" : "height", $ = ["top", "left"].includes(te(r)),
|
|
1139
|
-
m <
|
|
1137
|
+
var g, w;
|
|
1138
|
+
const b = v === "y" ? "width" : "height", $ = ["top", "left"].includes(te(r)), y = i.reference[l] - i.floating[b] + ($ && ((g = c.offset) == null ? void 0 : g[l]) || 0) + ($ ? 0 : h.crossAxis), A = i.reference[l] + i.reference[b] + ($ ? 0 : ((w = c.offset) == null ? void 0 : w[l]) || 0) - ($ ? h.crossAxis : 0);
|
|
1139
|
+
m < y ? m = y : m > A && (m = A);
|
|
1140
1140
|
}
|
|
1141
1141
|
return {
|
|
1142
1142
|
[v]: d,
|
|
@@ -1159,15 +1159,15 @@ const zo = function(e) {
|
|
|
1159
1159
|
apply: a = () => {
|
|
1160
1160
|
},
|
|
1161
1161
|
...u
|
|
1162
|
-
} = ee(e, t), f = await
|
|
1162
|
+
} = ee(e, t), f = await we(t, u), l = te(r), v = ge(r), d = ce(r) === "y", {
|
|
1163
1163
|
width: m,
|
|
1164
1164
|
height: p
|
|
1165
1165
|
} = i.floating;
|
|
1166
1166
|
let h, g;
|
|
1167
1167
|
l === "top" || l === "bottom" ? (h = l, g = v === (await (c.isRTL == null ? void 0 : c.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (g = l, h = v === "end" ? "top" : "bottom");
|
|
1168
|
-
const
|
|
1169
|
-
let C = $, E =
|
|
1170
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = b), (o = t.middlewareData.shift) != null && o.enabled.y && (C =
|
|
1168
|
+
const w = p - f.top - f.bottom, b = m - f.left - f.right, $ = ie(p - f[h], w), y = ie(m - f[g], b), A = !t.middlewareData.shift;
|
|
1169
|
+
let C = $, E = y;
|
|
1170
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = b), (o = t.middlewareData.shift) != null && o.enabled.y && (C = w), A && !v) {
|
|
1171
1171
|
const D = H(f.left, 0), _ = H(f.right, 0), I = H(f.top, 0), R = H(f.bottom, 0);
|
|
1172
1172
|
d ? E = m - 2 * (D !== 0 || _ !== 0 ? D + _ : H(f.left, f.right)) : C = p - 2 * (I !== 0 || R !== 0 ? I + R : H(f.top, f.bottom));
|
|
1173
1173
|
}
|
|
@@ -1191,7 +1191,7 @@ function je() {
|
|
|
1191
1191
|
function be(e) {
|
|
1192
1192
|
return on(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function z(e) {
|
|
1195
1195
|
var t;
|
|
1196
1196
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1197
1197
|
}
|
|
@@ -1200,16 +1200,16 @@ function J(e) {
|
|
|
1200
1200
|
return (t = (on(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1201
1201
|
}
|
|
1202
1202
|
function on(e) {
|
|
1203
|
-
return je() ? e instanceof Node || e instanceof
|
|
1203
|
+
return je() ? e instanceof Node || e instanceof z(e).Node : !1;
|
|
1204
1204
|
}
|
|
1205
1205
|
function Y(e) {
|
|
1206
|
-
return je() ? e instanceof Element || e instanceof
|
|
1206
|
+
return je() ? e instanceof Element || e instanceof z(e).Element : !1;
|
|
1207
1207
|
}
|
|
1208
1208
|
function Q(e) {
|
|
1209
|
-
return je() ? e instanceof HTMLElement || e instanceof
|
|
1209
|
+
return je() ? e instanceof HTMLElement || e instanceof z(e).HTMLElement : !1;
|
|
1210
1210
|
}
|
|
1211
1211
|
function Wt(e) {
|
|
1212
|
-
return !je() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
1212
|
+
return !je() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof z(e).ShadowRoot;
|
|
1213
1213
|
}
|
|
1214
1214
|
function Ae(e) {
|
|
1215
1215
|
const {
|
|
@@ -1232,14 +1232,14 @@ function Ke(e) {
|
|
|
1232
1232
|
}
|
|
1233
1233
|
});
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const t =
|
|
1235
|
+
function yt(e) {
|
|
1236
|
+
const t = wt(), n = Y(e) ? X(e) : e;
|
|
1237
1237
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (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));
|
|
1238
1238
|
}
|
|
1239
1239
|
function Xo(e) {
|
|
1240
1240
|
let t = se(e);
|
|
1241
1241
|
for (; Q(t) && !me(t); ) {
|
|
1242
|
-
if (
|
|
1242
|
+
if (yt(t))
|
|
1243
1243
|
return t;
|
|
1244
1244
|
if (Ke(t))
|
|
1245
1245
|
return null;
|
|
@@ -1247,14 +1247,14 @@ function Xo(e) {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
return null;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function wt() {
|
|
1251
1251
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1252
1252
|
}
|
|
1253
1253
|
function me(e) {
|
|
1254
1254
|
return ["html", "body", "#document"].includes(be(e));
|
|
1255
1255
|
}
|
|
1256
1256
|
function X(e) {
|
|
1257
|
-
return
|
|
1257
|
+
return z(e).getComputedStyle(e);
|
|
1258
1258
|
}
|
|
1259
1259
|
function Ye(e) {
|
|
1260
1260
|
return Y(e) ? {
|
|
@@ -1284,7 +1284,7 @@ function rn(e) {
|
|
|
1284
1284
|
function xe(e, t, n) {
|
|
1285
1285
|
var o;
|
|
1286
1286
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1287
|
-
const r = rn(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), c =
|
|
1287
|
+
const r = rn(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), c = z(r);
|
|
1288
1288
|
if (i) {
|
|
1289
1289
|
const s = ut(c);
|
|
1290
1290
|
return t.concat(c, c.visualViewport || [], Ae(r) ? r : [], s && n ? xe(s) : []);
|
|
@@ -1324,14 +1324,14 @@ function ve(e) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
const Zo = /* @__PURE__ */ G(0);
|
|
1326
1326
|
function sn(e) {
|
|
1327
|
-
const t =
|
|
1328
|
-
return !
|
|
1327
|
+
const t = z(e);
|
|
1328
|
+
return !wt() || !t.visualViewport ? Zo : {
|
|
1329
1329
|
x: t.visualViewport.offsetLeft,
|
|
1330
1330
|
y: t.visualViewport.offsetTop
|
|
1331
1331
|
};
|
|
1332
1332
|
}
|
|
1333
1333
|
function Go(e, t, n) {
|
|
1334
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1334
|
+
return t === void 0 && (t = !1), !n || t && n !== z(e) ? !1 : t;
|
|
1335
1335
|
}
|
|
1336
1336
|
function le(e, t, n, o) {
|
|
1337
1337
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
@@ -1341,11 +1341,11 @@ function le(e, t, n, o) {
|
|
|
1341
1341
|
const s = Go(i, n, o) ? sn(i) : G(0);
|
|
1342
1342
|
let a = (r.left + s.x) / c.x, u = (r.top + s.y) / c.y, f = r.width / c.x, l = r.height / c.y;
|
|
1343
1343
|
if (i) {
|
|
1344
|
-
const v =
|
|
1344
|
+
const v = z(i), d = o && Y(o) ? z(o) : o;
|
|
1345
1345
|
let m = v, p = ut(m);
|
|
1346
1346
|
for (; p && o && d !== m; ) {
|
|
1347
|
-
const h = ve(p), g = p.getBoundingClientRect(),
|
|
1348
|
-
a *= h.x, u *= h.y, f *= h.x, l *= h.y, a += b, u += $, m =
|
|
1347
|
+
const h = ve(p), g = p.getBoundingClientRect(), w = X(p), b = g.left + (p.clientLeft + parseFloat(w.paddingLeft)) * h.x, $ = g.top + (p.clientTop + parseFloat(w.paddingTop)) * h.y;
|
|
1348
|
+
a *= h.x, u *= h.y, f *= h.x, l *= h.y, a += b, u += $, m = z(p), p = ut(m);
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
return He({
|
|
@@ -1412,11 +1412,11 @@ function Jo(e) {
|
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
1414
|
function er(e, t) {
|
|
1415
|
-
const n =
|
|
1415
|
+
const n = z(e), o = J(e), r = n.visualViewport;
|
|
1416
1416
|
let i = o.clientWidth, c = o.clientHeight, s = 0, a = 0;
|
|
1417
1417
|
if (r) {
|
|
1418
1418
|
i = r.width, c = r.height;
|
|
1419
|
-
const u =
|
|
1419
|
+
const u = wt();
|
|
1420
1420
|
(!u || u && t === "fixed") && (s = r.offsetLeft, a = r.offsetTop);
|
|
1421
1421
|
}
|
|
1422
1422
|
return {
|
|
@@ -1466,7 +1466,7 @@ function nr(e, t) {
|
|
|
1466
1466
|
const i = X(e).position === "fixed";
|
|
1467
1467
|
let c = i ? se(e) : e;
|
|
1468
1468
|
for (; Y(c) && !me(c); ) {
|
|
1469
|
-
const s = X(c), a =
|
|
1469
|
+
const s = X(c), a = yt(c);
|
|
1470
1470
|
!a && s.position === "fixed" && (r = null), (i ? !a && !r : !a && s.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || Ae(c) && !a && ln(e, c)) ? o = o.filter((f) => f !== c) : r = s, c = se(c);
|
|
1471
1471
|
}
|
|
1472
1472
|
return t.set(e, o), o;
|
|
@@ -1532,7 +1532,7 @@ function Ht(e, t) {
|
|
|
1532
1532
|
return J(e) === n && (n = n.ownerDocument.body), n;
|
|
1533
1533
|
}
|
|
1534
1534
|
function un(e, t) {
|
|
1535
|
-
const n =
|
|
1535
|
+
const n = z(e);
|
|
1536
1536
|
if (Ke(e))
|
|
1537
1537
|
return n;
|
|
1538
1538
|
if (!Q(e)) {
|
|
@@ -1547,7 +1547,7 @@ function un(e, t) {
|
|
|
1547
1547
|
let o = Ht(e, t);
|
|
1548
1548
|
for (; o && Yo(o) && et(o); )
|
|
1549
1549
|
o = Ht(o, t);
|
|
1550
|
-
return o && me(o) && et(o) && !
|
|
1550
|
+
return o && me(o) && et(o) && !yt(o) ? n : o || Xo(e) || n;
|
|
1551
1551
|
}
|
|
1552
1552
|
const cr = async function(e) {
|
|
1553
1553
|
const t = this.getOffsetParent || un, n = this.getDimensions, o = await n(e.floating);
|
|
@@ -1601,7 +1601,7 @@ function lr(e, t) {
|
|
|
1601
1601
|
threshold: H(0, ie(1, a)) || 1
|
|
1602
1602
|
};
|
|
1603
1603
|
let $ = !0;
|
|
1604
|
-
function
|
|
1604
|
+
function y(A) {
|
|
1605
1605
|
const C = A[0].intersectionRatio;
|
|
1606
1606
|
if (C !== a) {
|
|
1607
1607
|
if (!$)
|
|
@@ -1613,13 +1613,13 @@ function lr(e, t) {
|
|
|
1613
1613
|
C === 1 && !fn(u, e.getBoundingClientRect()) && c(), $ = !1;
|
|
1614
1614
|
}
|
|
1615
1615
|
try {
|
|
1616
|
-
n = new IntersectionObserver(
|
|
1616
|
+
n = new IntersectionObserver(y, {
|
|
1617
1617
|
...b,
|
|
1618
1618
|
// Handle <iframe>s
|
|
1619
1619
|
root: r.ownerDocument
|
|
1620
1620
|
});
|
|
1621
1621
|
} catch {
|
|
1622
|
-
n = new IntersectionObserver(
|
|
1622
|
+
n = new IntersectionObserver(y, b);
|
|
1623
1623
|
}
|
|
1624
1624
|
n.observe(e);
|
|
1625
1625
|
}
|
|
@@ -1642,8 +1642,8 @@ function ur(e, t, n, o) {
|
|
|
1642
1642
|
const l = u && s ? lr(u, n) : null;
|
|
1643
1643
|
let v = -1, d = null;
|
|
1644
1644
|
c && (d = new ResizeObserver((g) => {
|
|
1645
|
-
let [
|
|
1646
|
-
|
|
1645
|
+
let [w] = g;
|
|
1646
|
+
w && w.target === u && d && (d.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
1647
1647
|
var b;
|
|
1648
1648
|
(b = d) == null || b.observe(t);
|
|
1649
1649
|
})), n();
|
|
@@ -1656,12 +1656,12 @@ function ur(e, t, n, o) {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
return n(), () => {
|
|
1658
1658
|
var g;
|
|
1659
|
-
f.forEach((
|
|
1660
|
-
r &&
|
|
1659
|
+
f.forEach((w) => {
|
|
1660
|
+
r && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1661
1661
|
}), l == null || l(), (g = d) == null || g.disconnect(), d = null, a && cancelAnimationFrame(m);
|
|
1662
1662
|
};
|
|
1663
1663
|
}
|
|
1664
|
-
const fr =
|
|
1664
|
+
const fr = Uo, dr = Vo, pr = Bo, vr = Ko, hr = Ho, zt = Wo, mr = jo, gr = (e, t, n) => {
|
|
1665
1665
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1666
1666
|
platform: ar,
|
|
1667
1667
|
...n
|
|
@@ -1674,8 +1674,8 @@ const fr = zo, dr = Vo, pr = Bo, vr = Ko, hr = Ho, Ut = Wo, mr = jo, gr = (e, t,
|
|
|
1674
1674
|
platform: i
|
|
1675
1675
|
});
|
|
1676
1676
|
};
|
|
1677
|
-
var Me = typeof document < "u" ?
|
|
1678
|
-
function
|
|
1677
|
+
var Me = typeof document < "u" ? Ue : N;
|
|
1678
|
+
function ze(e, t) {
|
|
1679
1679
|
if (e === t)
|
|
1680
1680
|
return !0;
|
|
1681
1681
|
if (typeof e != typeof t)
|
|
@@ -1688,7 +1688,7 @@ function Ue(e, t) {
|
|
|
1688
1688
|
if (n = e.length, n !== t.length)
|
|
1689
1689
|
return !1;
|
|
1690
1690
|
for (o = n; o-- !== 0; )
|
|
1691
|
-
if (!
|
|
1691
|
+
if (!ze(e[o], t[o]))
|
|
1692
1692
|
return !1;
|
|
1693
1693
|
return !0;
|
|
1694
1694
|
}
|
|
@@ -1699,7 +1699,7 @@ function Ue(e, t) {
|
|
|
1699
1699
|
return !1;
|
|
1700
1700
|
for (o = n; o-- !== 0; ) {
|
|
1701
1701
|
const i = r[o];
|
|
1702
|
-
if (!(i === "_owner" && e.$$typeof) && !
|
|
1702
|
+
if (!(i === "_owner" && e.$$typeof) && !ze(e[i], t[i]))
|
|
1703
1703
|
return !1;
|
|
1704
1704
|
}
|
|
1705
1705
|
return !0;
|
|
@@ -1709,7 +1709,7 @@ function Ue(e, t) {
|
|
|
1709
1709
|
function dn(e) {
|
|
1710
1710
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function Ut(e, t) {
|
|
1713
1713
|
const n = dn(e);
|
|
1714
1714
|
return Math.round(t * n) / n;
|
|
1715
1715
|
}
|
|
@@ -1741,12 +1741,12 @@ function br(e) {
|
|
|
1741
1741
|
middlewareData: {},
|
|
1742
1742
|
isPositioned: !1
|
|
1743
1743
|
}), [v, d] = x.useState(o);
|
|
1744
|
-
|
|
1745
|
-
const [m, p] = x.useState(null), [h, g] = x.useState(null),
|
|
1744
|
+
ze(v, o) || d(o);
|
|
1745
|
+
const [m, p] = x.useState(null), [h, g] = x.useState(null), w = x.useCallback((S) => {
|
|
1746
1746
|
S !== A.current && (A.current = S, p(S));
|
|
1747
1747
|
}, []), b = x.useCallback((S) => {
|
|
1748
1748
|
S !== C.current && (C.current = S, g(S));
|
|
1749
|
-
}, []), $ = i || m,
|
|
1749
|
+
}, []), $ = i || m, y = c || h, A = x.useRef(null), C = x.useRef(null), E = x.useRef(f), O = a != null, D = tt(a), _ = tt(r), I = tt(u), R = x.useCallback(() => {
|
|
1750
1750
|
if (!A.current || !C.current)
|
|
1751
1751
|
return;
|
|
1752
1752
|
const S = {
|
|
@@ -1763,7 +1763,7 @@ function br(e) {
|
|
|
1763
1763
|
// setting it to `true` when `open === false` (must be specified).
|
|
1764
1764
|
isPositioned: I.current !== !1
|
|
1765
1765
|
};
|
|
1766
|
-
T.current && !
|
|
1766
|
+
T.current && !ze(E.current, V) && (E.current = V, Jn.flushSync(() => {
|
|
1767
1767
|
l(V);
|
|
1768
1768
|
}));
|
|
1769
1769
|
});
|
|
@@ -1778,21 +1778,21 @@ function br(e) {
|
|
|
1778
1778
|
Me(() => (T.current = !0, () => {
|
|
1779
1779
|
T.current = !1;
|
|
1780
1780
|
}), []), Me(() => {
|
|
1781
|
-
if ($ && (A.current = $),
|
|
1781
|
+
if ($ && (A.current = $), y && (C.current = y), $ && y) {
|
|
1782
1782
|
if (D.current)
|
|
1783
|
-
return D.current($,
|
|
1783
|
+
return D.current($, y, R);
|
|
1784
1784
|
R();
|
|
1785
1785
|
}
|
|
1786
|
-
}, [$,
|
|
1787
|
-
const
|
|
1786
|
+
}, [$, y, R, D, O]);
|
|
1787
|
+
const U = x.useMemo(() => ({
|
|
1788
1788
|
reference: A,
|
|
1789
1789
|
floating: C,
|
|
1790
|
-
setReference:
|
|
1790
|
+
setReference: w,
|
|
1791
1791
|
setFloating: b
|
|
1792
|
-
}), [
|
|
1792
|
+
}), [w, b]), L = x.useMemo(() => ({
|
|
1793
1793
|
reference: $,
|
|
1794
|
-
floating:
|
|
1795
|
-
}), [$,
|
|
1794
|
+
floating: y
|
|
1795
|
+
}), [$, y]), W = x.useMemo(() => {
|
|
1796
1796
|
const S = {
|
|
1797
1797
|
position: n,
|
|
1798
1798
|
left: 0,
|
|
@@ -1800,7 +1800,7 @@ function br(e) {
|
|
|
1800
1800
|
};
|
|
1801
1801
|
if (!L.floating)
|
|
1802
1802
|
return S;
|
|
1803
|
-
const B =
|
|
1803
|
+
const B = Ut(L.floating, f.x), V = Ut(L.floating, f.y);
|
|
1804
1804
|
return s ? {
|
|
1805
1805
|
...S,
|
|
1806
1806
|
transform: "translate(" + B + "px, " + V + "px)",
|
|
@@ -1816,10 +1816,10 @@ function br(e) {
|
|
|
1816
1816
|
return x.useMemo(() => ({
|
|
1817
1817
|
...f,
|
|
1818
1818
|
update: R,
|
|
1819
|
-
refs:
|
|
1819
|
+
refs: U,
|
|
1820
1820
|
elements: L,
|
|
1821
1821
|
floatingStyles: W
|
|
1822
|
-
}), [f, R,
|
|
1822
|
+
}), [f, R, U, L, W]);
|
|
1823
1823
|
}
|
|
1824
1824
|
const $r = (e) => {
|
|
1825
1825
|
function t(n) {
|
|
@@ -1833,19 +1833,19 @@ const $r = (e) => {
|
|
|
1833
1833
|
element: o,
|
|
1834
1834
|
padding: r
|
|
1835
1835
|
} = typeof e == "function" ? e(n) : e;
|
|
1836
|
-
return o && t(o) ? o.current != null ?
|
|
1836
|
+
return o && t(o) ? o.current != null ? zt({
|
|
1837
1837
|
element: o.current,
|
|
1838
1838
|
padding: r
|
|
1839
|
-
}).fn(n) : {} : o ?
|
|
1839
|
+
}).fn(n) : {} : o ? zt({
|
|
1840
1840
|
element: o,
|
|
1841
1841
|
padding: r
|
|
1842
1842
|
}).fn(n) : {};
|
|
1843
1843
|
}
|
|
1844
1844
|
};
|
|
1845
|
-
},
|
|
1845
|
+
}, yr = (e, t) => ({
|
|
1846
1846
|
...fr(e),
|
|
1847
1847
|
options: [e, t]
|
|
1848
|
-
}),
|
|
1848
|
+
}), wr = (e, t) => ({
|
|
1849
1849
|
...dr(e),
|
|
1850
1850
|
options: [e, t]
|
|
1851
1851
|
}), xr = (e, t) => ({
|
|
@@ -1878,7 +1878,7 @@ function vn(...e) {
|
|
|
1878
1878
|
function Or(e, t = []) {
|
|
1879
1879
|
let n = [];
|
|
1880
1880
|
function o(i, c) {
|
|
1881
|
-
const s = /* @__PURE__ */
|
|
1881
|
+
const s = /* @__PURE__ */ ye(c), a = n.length;
|
|
1882
1882
|
n = [
|
|
1883
1883
|
...n,
|
|
1884
1884
|
c
|
|
@@ -1906,7 +1906,7 @@ function Or(e, t = []) {
|
|
|
1906
1906
|
];
|
|
1907
1907
|
}
|
|
1908
1908
|
const r = () => {
|
|
1909
|
-
const i = n.map((c) => /* @__PURE__ */
|
|
1909
|
+
const i = n.map((c) => /* @__PURE__ */ ye(c));
|
|
1910
1910
|
return function(s) {
|
|
1911
1911
|
const a = (s == null ? void 0 : s[e]) || i;
|
|
1912
1912
|
return q(
|
|
@@ -2048,7 +2048,7 @@ function Fr(e) {
|
|
|
2048
2048
|
[]
|
|
2049
2049
|
);
|
|
2050
2050
|
}
|
|
2051
|
-
const dt = globalThis != null && globalThis.document ?
|
|
2051
|
+
const dt = globalThis != null && globalThis.document ? Ue : () => {
|
|
2052
2052
|
};
|
|
2053
2053
|
function Lr(e) {
|
|
2054
2054
|
const [t, n] = j(void 0);
|
|
@@ -2082,7 +2082,7 @@ function Lr(e) {
|
|
|
2082
2082
|
e
|
|
2083
2083
|
]), t;
|
|
2084
2084
|
}
|
|
2085
|
-
const gn = "Popper", [bn, $n] = Or(gn), [Mr,
|
|
2085
|
+
const gn = "Popper", [bn, $n] = Or(gn), [Mr, yn] = bn(gn), kr = (e) => {
|
|
2086
2086
|
const { __scopePopper: t, children: n } = e, [o, r] = j(null);
|
|
2087
2087
|
return /* @__PURE__ */ P(Mr, {
|
|
2088
2088
|
scope: t,
|
|
@@ -2090,18 +2090,18 @@ const gn = "Popper", [bn, $n] = Or(gn), [Mr, wn] = bn(gn), kr = (e) => {
|
|
|
2090
2090
|
onAnchorChange: r
|
|
2091
2091
|
}, n);
|
|
2092
2092
|
}, Ir = "PopperAnchor", Wr = /* @__PURE__ */ k((e, t) => {
|
|
2093
|
-
const { __scopePopper: n, virtualRef: o, ...r } = e, i =
|
|
2093
|
+
const { __scopePopper: n, virtualRef: o, ...r } = e, i = yn(Ir, n), c = M(null), s = vn(t, c);
|
|
2094
2094
|
return N(() => {
|
|
2095
2095
|
i.onAnchorChange((o == null ? void 0 : o.current) || c.current);
|
|
2096
2096
|
}), o ? null : /* @__PURE__ */ P(mn.div, F({}, r, {
|
|
2097
2097
|
ref: s
|
|
2098
2098
|
}));
|
|
2099
|
-
}),
|
|
2099
|
+
}), wn = "PopperContent", [Br, sc] = bn(wn), Hr = /* @__PURE__ */ k((e, t) => {
|
|
2100
2100
|
var n, o, r, i, c, s, a, u;
|
|
2101
|
-
const { __scopePopper: f, side: l = "bottom", sideOffset: v = 0, align: d = "center", alignOffset: m = 0, arrowPadding: p = 0, collisionBoundary: h = [], collisionPadding: g = 0, sticky:
|
|
2101
|
+
const { __scopePopper: f, side: l = "bottom", sideOffset: v = 0, align: d = "center", alignOffset: m = 0, arrowPadding: p = 0, collisionBoundary: h = [], collisionPadding: g = 0, sticky: w = "partial", hideWhenDetached: b = !1, avoidCollisions: $ = !0, onPlaced: y, ...A } = e, C = yn(wn, f), [E, O] = j(null), D = vn(
|
|
2102
2102
|
t,
|
|
2103
2103
|
(Ze) => O(Ze)
|
|
2104
|
-
), [_, I] = j(null), R = Lr(_), T = (n = R == null ? void 0 : R.width) !== null && n !== void 0 ? n : 0,
|
|
2104
|
+
), [_, I] = j(null), R = Lr(_), T = (n = R == null ? void 0 : R.width) !== null && n !== void 0 ? n : 0, U = (o = R == null ? void 0 : R.height) !== null && o !== void 0 ? o : 0, L = l + (d !== "center" ? "-" + d : ""), W = typeof g == "number" ? g : {
|
|
2105
2105
|
top: 0,
|
|
2106
2106
|
right: 0,
|
|
2107
2107
|
bottom: 0,
|
|
@@ -2111,7 +2111,7 @@ const gn = "Popper", [bn, $n] = Or(gn), [Mr, wn] = bn(gn), kr = (e) => {
|
|
|
2111
2111
|
h
|
|
2112
2112
|
], B = S.length > 0, V = {
|
|
2113
2113
|
padding: W,
|
|
2114
|
-
boundary: S.filter(
|
|
2114
|
+
boundary: S.filter(zr),
|
|
2115
2115
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2116
2116
|
altBoundary: B
|
|
2117
2117
|
}, { refs: In, floatingStyles: At, placement: Wn, isPositioned: Se, middlewareData: ue } = br({
|
|
@@ -2123,14 +2123,14 @@ const gn = "Popper", [bn, $n] = Or(gn), [Mr, wn] = bn(gn), kr = (e) => {
|
|
|
2123
2123
|
reference: C.anchor
|
|
2124
2124
|
},
|
|
2125
2125
|
middleware: [
|
|
2126
|
-
|
|
2127
|
-
mainAxis: v +
|
|
2126
|
+
yr({
|
|
2127
|
+
mainAxis: v + U,
|
|
2128
2128
|
alignmentAxis: m
|
|
2129
2129
|
}),
|
|
2130
|
-
$ &&
|
|
2130
|
+
$ && wr({
|
|
2131
2131
|
mainAxis: !0,
|
|
2132
2132
|
crossAxis: !1,
|
|
2133
|
-
limiter:
|
|
2133
|
+
limiter: w === "partial" ? xr() : void 0,
|
|
2134
2134
|
...V
|
|
2135
2135
|
}),
|
|
2136
2136
|
$ && Er({
|
|
@@ -2147,22 +2147,22 @@ const gn = "Popper", [bn, $n] = Or(gn), [Mr, wn] = bn(gn), kr = (e) => {
|
|
|
2147
2147
|
element: _,
|
|
2148
2148
|
padding: p
|
|
2149
2149
|
}),
|
|
2150
|
-
|
|
2150
|
+
Ur({
|
|
2151
2151
|
arrowWidth: T,
|
|
2152
|
-
arrowHeight:
|
|
2152
|
+
arrowHeight: U
|
|
2153
2153
|
}),
|
|
2154
2154
|
b && Pr({
|
|
2155
2155
|
strategy: "referenceHidden"
|
|
2156
2156
|
})
|
|
2157
2157
|
]
|
|
2158
|
-
}), [St, Bn] = xn(Wn), Oe = Fr(
|
|
2158
|
+
}), [St, Bn] = xn(Wn), Oe = Fr(y);
|
|
2159
2159
|
dt(() => {
|
|
2160
2160
|
Se && (Oe == null || Oe());
|
|
2161
2161
|
}, [
|
|
2162
2162
|
Se,
|
|
2163
2163
|
Oe
|
|
2164
2164
|
]);
|
|
2165
|
-
const Hn = (r = ue.arrow) === null || r === void 0 ? void 0 : r.x,
|
|
2165
|
+
const Hn = (r = ue.arrow) === null || r === void 0 ? void 0 : r.x, zn = (i = ue.arrow) === null || i === void 0 ? void 0 : i.y, Un = ((c = ue.arrow) === null || c === void 0 ? void 0 : c.centerOffset) !== 0, [Vn, jn] = j();
|
|
2166
2166
|
return dt(() => {
|
|
2167
2167
|
E && jn(window.getComputedStyle(E).zIndex);
|
|
2168
2168
|
}, [
|
|
@@ -2187,8 +2187,8 @@ const gn = "Popper", [bn, $n] = Or(gn), [Mr, wn] = bn(gn), kr = (e) => {
|
|
|
2187
2187
|
placedSide: St,
|
|
2188
2188
|
onArrowChange: I,
|
|
2189
2189
|
arrowX: Hn,
|
|
2190
|
-
arrowY:
|
|
2191
|
-
shouldHideArrow:
|
|
2190
|
+
arrowY: zn,
|
|
2191
|
+
shouldHideArrow: Un
|
|
2192
2192
|
}, /* @__PURE__ */ P(mn.div, F({
|
|
2193
2193
|
"data-side": St,
|
|
2194
2194
|
"data-align": Bn
|
|
@@ -2204,10 +2204,10 @@ const gn = "Popper", [bn, $n] = Or(gn), [Mr, wn] = bn(gn), kr = (e) => {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
}))));
|
|
2206
2206
|
});
|
|
2207
|
-
function
|
|
2207
|
+
function zr(e) {
|
|
2208
2208
|
return e !== null;
|
|
2209
2209
|
}
|
|
2210
|
-
const
|
|
2210
|
+
const Ur = (e) => ({
|
|
2211
2211
|
name: "transformOrigin",
|
|
2212
2212
|
options: e,
|
|
2213
2213
|
fn(t) {
|
|
@@ -2216,9 +2216,9 @@ const zr = (e) => ({
|
|
|
2216
2216
|
start: "0%",
|
|
2217
2217
|
center: "50%",
|
|
2218
2218
|
end: "100%"
|
|
2219
|
-
}[p], g = ((o = (r = u.arrow) === null || r === void 0 ? void 0 : r.x) !== null && o !== void 0 ? o : 0) + v / 2,
|
|
2219
|
+
}[p], g = ((o = (r = u.arrow) === null || r === void 0 ? void 0 : r.x) !== null && o !== void 0 ? o : 0) + v / 2, w = ((i = (c = u.arrow) === null || c === void 0 ? void 0 : c.y) !== null && i !== void 0 ? i : 0) + d / 2;
|
|
2220
2220
|
let b = "", $ = "";
|
|
2221
|
-
return m === "bottom" ? (b = l ? h : `${g}px`, $ = `${-d}px`) : m === "top" ? (b = l ? h : `${g}px`, $ = `${a.floating.height + d}px`) : m === "right" ? (b = `${-d}px`, $ = l ? h : `${
|
|
2221
|
+
return m === "bottom" ? (b = l ? h : `${g}px`, $ = `${-d}px`) : m === "top" ? (b = l ? h : `${g}px`, $ = `${a.floating.height + d}px`) : m === "right" ? (b = `${-d}px`, $ = l ? h : `${w}px`) : m === "left" && (b = `${a.floating.width + d}px`, $ = l ? h : `${w}px`), {
|
|
2222
2222
|
data: {
|
|
2223
2223
|
x: b,
|
|
2224
2224
|
y: $
|
|
@@ -2239,7 +2239,7 @@ const Vr = kr, jr = Wr, Kr = Hr, Yr = /* @__PURE__ */ k((e, t) => {
|
|
|
2239
2239
|
return o ? /* @__PURE__ */ eo.createPortal(/* @__PURE__ */ P(Ve.div, F({}, r, {
|
|
2240
2240
|
ref: t
|
|
2241
2241
|
})), o) : null;
|
|
2242
|
-
}), Vt = globalThis != null && globalThis.document ?
|
|
2242
|
+
}), Vt = globalThis != null && globalThis.document ? Ue : () => {
|
|
2243
2243
|
};
|
|
2244
2244
|
function Xr(e, t) {
|
|
2245
2245
|
return Qn((n, o) => {
|
|
@@ -2559,12 +2559,12 @@ var Sn = ui(), rt = function() {
|
|
|
2559
2559
|
onScrollCapture: rt,
|
|
2560
2560
|
onWheelCapture: rt,
|
|
2561
2561
|
onTouchMoveCapture: rt
|
|
2562
|
-
}), r = o[0], i = o[1], c = e.forwardProps, s = e.children, a = e.className, u = e.removeScrollBar, f = e.enabled, l = e.shards, v = e.sideCar, d = e.noIsolation, m = e.inert, p = e.allowPinchZoom, h = e.as, g = h === void 0 ? "div" : h,
|
|
2562
|
+
}), r = o[0], i = o[1], c = e.forwardProps, s = e.children, a = e.className, u = e.removeScrollBar, f = e.enabled, l = e.shards, v = e.sideCar, d = e.noIsolation, m = e.inert, p = e.allowPinchZoom, h = e.as, g = h === void 0 ? "div" : h, w = Pn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), b = v, $ = si([n, t]), y = Z(Z({}, w), r);
|
|
2563
2563
|
return x.createElement(
|
|
2564
2564
|
x.Fragment,
|
|
2565
2565
|
null,
|
|
2566
2566
|
f && x.createElement(b, { sideCar: Sn, removeScrollBar: u, shards: l, noIsolation: d, inert: m, setCallbacks: i, allowPinchZoom: !!p, lockRef: n }),
|
|
2567
|
-
c ? x.cloneElement(x.Children.only(s), Z(Z({},
|
|
2567
|
+
c ? x.cloneElement(x.Children.only(s), Z(Z({}, y), { ref: $ })) : x.createElement(g, Z({}, y, { className: a, ref: $ }), s)
|
|
2568
2568
|
);
|
|
2569
2569
|
});
|
|
2570
2570
|
Xe.defaultProps = {
|
|
@@ -2632,7 +2632,7 @@ var mi = function() {
|
|
|
2632
2632
|
}, $i = function(e) {
|
|
2633
2633
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
2634
2634
|
return [it(n), it(o), it(r)];
|
|
2635
|
-
},
|
|
2635
|
+
}, yi = function(e) {
|
|
2636
2636
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
2637
2637
|
return bi;
|
|
2638
2638
|
var t = $i(e), n = document.documentElement.clientWidth, o = window.innerWidth;
|
|
@@ -2642,7 +2642,7 @@ var mi = function() {
|
|
|
2642
2642
|
right: t[2],
|
|
2643
2643
|
gap: Math.max(0, o - n + t[2] - t[0])
|
|
2644
2644
|
};
|
|
2645
|
-
},
|
|
2645
|
+
}, wi = On(), he = "data-scroll-locked", xi = function(e, t, n, o) {
|
|
2646
2646
|
var r = e.left, i = e.top, c = e.right, s = e.gap;
|
|
2647
2647
|
return n === void 0 && (n = "margin"), `
|
|
2648
2648
|
.`.concat(oi, ` {
|
|
@@ -2700,9 +2700,9 @@ var mi = function() {
|
|
|
2700
2700
|
var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o;
|
|
2701
2701
|
Ei();
|
|
2702
2702
|
var i = x.useMemo(function() {
|
|
2703
|
-
return
|
|
2703
|
+
return yi(r);
|
|
2704
2704
|
}, [r]);
|
|
2705
|
-
return x.createElement(
|
|
2705
|
+
return x.createElement(wi, { styles: xi(i, !t, r, n ? "" : "!important") });
|
|
2706
2706
|
}, pt = !1;
|
|
2707
2707
|
if (typeof window < "u")
|
|
2708
2708
|
try {
|
|
@@ -2808,37 +2808,37 @@ function Li(e) {
|
|
|
2808
2808
|
var s = x.useCallback(function(p, h) {
|
|
2809
2809
|
if ("touches" in p && p.touches.length === 2)
|
|
2810
2810
|
return !c.current.allowPinchZoom;
|
|
2811
|
-
var g = Le(p),
|
|
2811
|
+
var g = Le(p), w = n.current, b = "deltaX" in p ? p.deltaX : w[0] - g[0], $ = "deltaY" in p ? p.deltaY : w[1] - g[1], y, A = p.target, C = Math.abs(b) > Math.abs($) ? "h" : "v";
|
|
2812
2812
|
if ("touches" in p && C === "h" && A.type === "range")
|
|
2813
2813
|
return !1;
|
|
2814
2814
|
var E = Xt(C, A);
|
|
2815
2815
|
if (!E)
|
|
2816
2816
|
return !0;
|
|
2817
|
-
if (E ?
|
|
2817
|
+
if (E ? y = C : (y = C === "v" ? "h" : "v", E = Xt(C, A)), !E)
|
|
2818
2818
|
return !1;
|
|
2819
|
-
if (!o.current && "changedTouches" in p && (b || $) && (o.current =
|
|
2819
|
+
if (!o.current && "changedTouches" in p && (b || $) && (o.current = y), !y)
|
|
2820
2820
|
return !0;
|
|
2821
|
-
var O = o.current ||
|
|
2821
|
+
var O = o.current || y;
|
|
2822
2822
|
return Di(O, h, p, O === "h" ? b : $, !0);
|
|
2823
2823
|
}, []), a = x.useCallback(function(p) {
|
|
2824
2824
|
var h = p;
|
|
2825
2825
|
if (!(!pe.length || pe[pe.length - 1] !== i)) {
|
|
2826
|
-
var g = "deltaY" in h ? Zt(h) : Le(h),
|
|
2827
|
-
return
|
|
2826
|
+
var g = "deltaY" in h ? Zt(h) : Le(h), w = t.current.filter(function(y) {
|
|
2827
|
+
return y.name === h.type && y.target === h.target && _i(y.delta, g);
|
|
2828
2828
|
})[0];
|
|
2829
|
-
if (
|
|
2829
|
+
if (w && w.should) {
|
|
2830
2830
|
h.cancelable && h.preventDefault();
|
|
2831
2831
|
return;
|
|
2832
2832
|
}
|
|
2833
|
-
if (!
|
|
2834
|
-
var b = (c.current.shards || []).map(Gt).filter(Boolean).filter(function(
|
|
2835
|
-
return
|
|
2833
|
+
if (!w) {
|
|
2834
|
+
var b = (c.current.shards || []).map(Gt).filter(Boolean).filter(function(y) {
|
|
2835
|
+
return y.contains(h.target);
|
|
2836
2836
|
}), $ = b.length > 0 ? s(h, b[0]) : !c.current.noIsolation;
|
|
2837
2837
|
$ && h.cancelable && h.preventDefault();
|
|
2838
2838
|
}
|
|
2839
2839
|
}
|
|
2840
|
-
}, []), u = x.useCallback(function(p, h, g,
|
|
2841
|
-
var b = { name: p, delta: h, target: g, should:
|
|
2840
|
+
}, []), u = x.useCallback(function(p, h, g, w) {
|
|
2841
|
+
var b = { name: p, delta: h, target: g, should: w };
|
|
2842
2842
|
t.current.push(b), setTimeout(function() {
|
|
2843
2843
|
t.current = t.current.filter(function($) {
|
|
2844
2844
|
return $ !== b;
|
|
@@ -2922,11 +2922,11 @@ const ki = _n, Nn = "Popover", [Fn, ac] = oo(Nn, [
|
|
|
2922
2922
|
return r.hasCustomAnchor ? s : /* @__PURE__ */ P(jr, F({
|
|
2923
2923
|
asChild: !0
|
|
2924
2924
|
}, i), s);
|
|
2925
|
-
}), Ln = "PopoverPortal", [
|
|
2925
|
+
}), Ln = "PopoverPortal", [zi, Ui] = Fn(Ln, {
|
|
2926
2926
|
forceMount: void 0
|
|
2927
2927
|
}), Vi = (e) => {
|
|
2928
2928
|
const { __scopePopover: t, forceMount: n, children: o, container: r } = e, i = $e(Ln, t);
|
|
2929
|
-
return /* @__PURE__ */ P(
|
|
2929
|
+
return /* @__PURE__ */ P(zi, {
|
|
2930
2930
|
scope: t,
|
|
2931
2931
|
forceMount: n
|
|
2932
2932
|
}, /* @__PURE__ */ P(Ct, {
|
|
@@ -2936,7 +2936,7 @@ const ki = _n, Nn = "Popover", [Fn, ac] = oo(Nn, [
|
|
|
2936
2936
|
container: r
|
|
2937
2937
|
}, o)));
|
|
2938
2938
|
}, Ee = "PopoverContent", ji = /* @__PURE__ */ k((e, t) => {
|
|
2939
|
-
const n =
|
|
2939
|
+
const n = Ui(Ee, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, i = $e(Ee, e.__scopePopover);
|
|
2940
2940
|
return /* @__PURE__ */ P(Ct, {
|
|
2941
2941
|
present: o || i.open
|
|
2942
2942
|
}, i.modal ? /* @__PURE__ */ P(Ki, F({}, r, {
|
|
@@ -3031,13 +3031,13 @@ const ki = _n, Nn = "Popover", [Fn, ac] = oo(Nn, [
|
|
|
3031
3031
|
function kn(e) {
|
|
3032
3032
|
return e ? "open" : "closed";
|
|
3033
3033
|
}
|
|
3034
|
-
const Xi = Wi, Zi = Hi, Gi = Vi, qi = ji, Qi = "
|
|
3035
|
-
"rp-popover-content": "_rp-popover-
|
|
3034
|
+
const Xi = Wi, Zi = Hi, Gi = Vi, qi = ji, Qi = "_slideDownAndFade_10z6a_1", Ji = "_slideLeftAndFade_10z6a_1", ec = "_slideUpAndFade_10z6a_1", tc = "_slideRightAndFade_10z6a_1", nc = {
|
|
3035
|
+
"rp-popover-content": "_rp-popover-content_10z6a_1",
|
|
3036
3036
|
slideDownAndFade: Qi,
|
|
3037
3037
|
slideLeftAndFade: Ji,
|
|
3038
3038
|
slideUpAndFade: ec,
|
|
3039
3039
|
slideRightAndFade: tc,
|
|
3040
|
-
"rp-popover-arrow": "_rp-popover-
|
|
3040
|
+
"rp-popover-arrow": "_rp-popover-arrow_10z6a_31"
|
|
3041
3041
|
}, lc = (e) => {
|
|
3042
3042
|
const { triggerComponent: t, children: n, container: o, className: r, open: i, ...c } = e;
|
|
3043
3043
|
return /* @__PURE__ */ qn(Xi, { modal: !1, open: i, children: [
|