@react-pdf-kit/viewer 2.0.0-beta.10 → 2.0.0-beta.12
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/{Combination-54a77a7a.js → Combination-136ff99c.js} +184 -187
- package/dist/Paginate.module-4eef00aa.js +8 -0
- package/dist/RPLayout.module-b4b23e29.js +14 -0
- package/dist/RPSplitter-f6acf13b.js +71 -0
- package/dist/ToolbarLayout.module-6e339802.js +12 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +32 -30
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPDropFileZone.js +1 -1
- package/dist/components/RPPages.js +544 -497
- package/dist/components/RPProvider.js +32 -22
- package/dist/components/icons/DualPageWithCoverIcon.js +22 -0
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/LayoutWrapper.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +58 -36
- package/dist/components/layout/RPLayout.js +32 -28
- package/dist/components/layout/SkipLink.js +29 -0
- package/dist/components/layout/WrapperLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +32 -37
- package/dist/components/layout/sidebar/RPSplitter.js +6 -59
- package/dist/components/layout/sidebar/Thumbnail.js +57 -48
- package/dist/components/layout/sidebar/Thumbnails.js +9 -9
- package/dist/components/layout/toolbar/DarkModeTool.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +28 -28
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +3 -3
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +2 -2
- package/dist/components/layout/toolbar/MenuSeparator.js +2 -2
- package/dist/components/layout/toolbar/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/OtherTool.js +43 -34
- package/dist/components/layout/toolbar/Paginate.js +53 -46
- package/dist/components/layout/toolbar/PrintTool.js +3 -3
- package/dist/components/layout/toolbar/RPMenuItem.js +2 -2
- package/dist/components/layout/toolbar/RPMoreOptions.js +45 -44
- package/dist/components/layout/toolbar/RPToolbar.js +7 -6
- package/dist/components/layout/toolbar/RPToolbarEnd.js +6 -5
- package/dist/components/layout/toolbar/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/ScrollModeTool.js +37 -37
- package/dist/components/layout/toolbar/SearchCloseButton.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +44 -24
- package/dist/components/layout/toolbar/SearchTool.js +138 -117
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +43 -27
- package/dist/components/layout/toolbar/ToolbarDefault.js +42 -33
- package/dist/components/layout/toolbar/ToolbarLayout.js +9 -8
- package/dist/components/layout/toolbar/ViewModeTool.js +43 -34
- package/dist/components/layout/toolbar/ZoomTool.js +3 -3
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +2 -2
- package/dist/components/layout/toolbar/tools/DualPageTool.js +3 -3
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +202 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +6 -6
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +16 -15
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/InputPageTool.js +35 -28
- package/dist/components/layout/toolbar/tools/LastPageTool.js +197 -0
- package/dist/components/layout/toolbar/tools/NextPageTool.js +9 -8
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +15 -14
- package/dist/components/layout/toolbar/tools/PrintTool.js +4 -4
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +12 -5
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +9 -9
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +18 -10
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +10 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +13 -12
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +37 -0
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +15 -14
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +75 -41
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +12 -11
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +7 -6
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +11 -11
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +22 -15
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +20 -13
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +22 -14
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +35 -19
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +21 -14
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +33 -19
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +54 -36
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +39 -23
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +52 -29
- package/dist/components/page/AnnotationLayer.js +76 -69
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/CustomElement.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/DualPageWithCover.js +131 -0
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Button.js +14 -12
- package/dist/components/ui/Checkbox.js +84 -77
- package/dist/components/ui/DropDown.js +2 -2
- package/dist/components/ui/Input.js +12 -11
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/PasswordModal.js +44 -30
- package/dist/contexts/DimensionPagesContext.js +1 -1
- package/dist/contexts/DropFileZoneContext.js +1 -1
- package/dist/contexts/ElementPageContext.js +1 -1
- package/dist/contexts/EventCallbackContext.js +12 -8
- package/dist/contexts/FileInputContext.js +1 -1
- package/dist/contexts/HighlightContext.js +1 -1
- package/dist/contexts/LocalizationContext.js +1 -1
- package/dist/contexts/PagesRotateContext.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RPDocumentContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/RotationContext.js +1 -1
- package/dist/contexts/ScrollModeContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/SelectionModeContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ViewModeContext.js +19 -15
- package/dist/contexts/ZoomContext.js +1 -1
- package/dist/de_DE-a553b162.js +489 -0
- package/dist/{index-4baea9b5.js → index-61f59539.js} +1 -1
- package/dist/main.js +115 -99
- package/dist/types/components/icons/DualPageWithCoverIcon.d.ts +2 -0
- package/dist/types/components/layout/LayoutContainer.d.ts +1 -5
- package/dist/types/components/layout/LayoutWrapper.d.ts +1 -5
- package/dist/types/components/layout/SkipLink.d.ts +7 -0
- package/dist/types/components/layout/sidebar/Thumbnails.d.ts +1 -3
- package/dist/types/components/layout/toolbar/RPToolbar.d.ts +1 -3
- package/dist/types/components/layout/toolbar/tools/DualPageWithCoverTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/FirstPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/HorizontalScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/LastPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/PageScrollingTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/VerticalScrollingTool.d.ts +3 -0
- package/dist/types/components/page/DualPageWithCover.d.ts +5 -0
- package/dist/types/components/page/RPPage.d.ts +1 -3
- package/dist/types/components/ui/Button.d.ts +1 -3
- package/dist/types/components/ui/Checkbox.d.ts +1 -0
- package/dist/types/components/ui/Input.d.ts +1 -3
- package/dist/types/components/ui/RPTooltip.d.ts +1 -3
- package/dist/types/locales/de_DE.json.d.ts +83 -0
- package/dist/types/locales/en_US.json.d.ts +2 -0
- package/dist/types/locales/it_IT.json.d.ts +2 -0
- package/dist/types/locales/pt_PT.json.d.ts +2 -0
- package/dist/types/locales/th_TH.json.d.ts +2 -0
- package/dist/types/locales/zh_CN.json.d.ts +2 -0
- package/dist/types/main.d.ts +7 -1
- package/dist/types/utils/annotations.d.ts +10 -1
- package/dist/types/utils/calculatePage.d.ts +3 -3
- package/dist/types/utils/hooks/usePresentPage.d.ts +2 -1
- package/dist/types/utils/hooks/useTextSelection.d.ts +7 -0
- package/dist/types/utils/types.d.ts +34 -3
- package/dist/types/utils/withRef.d.ts +5 -4
- package/dist/utils/annotations.js +145 -150
- package/dist/utils/calculatePage.js +17 -11
- package/dist/utils/getZoomLevel.js +9 -9
- package/dist/utils/highlight.js +139 -139
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +1 -1
- package/dist/utils/hooks/useLocalization.js +12 -11
- package/dist/utils/hooks/usePageRotateContext.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +45 -45
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useRotate.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +76 -62
- package/dist/utils/hooks/useTextSelection.js +76 -0
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +60 -42
- package/dist/utils/types.js +14 -13
- package/dist/utils/withRef.js +5 -5
- package/package.json +5 -6
- package/dist/Paginate.module-206a7d7d.js +0 -8
- package/dist/RPLayout.module-967bf4bc.js +0 -13
- package/dist/ToolbarLayout.module-1fee0a18.js +0 -11
- package/dist/th_TH-d627cd51.js +0 -398
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { u as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { a as
|
|
7
|
-
var
|
|
2
|
+
import { useState as ye } from "react";
|
|
3
|
+
import be from "react-dom";
|
|
4
|
+
import { u as Ee, P as ce, a as Se } from "./index-c0faa594.js";
|
|
5
|
+
import { jsx as ue } from "react/jsx-runtime";
|
|
6
|
+
import { a as z } from "./index-e3ee9457.js";
|
|
7
|
+
var we = "Portal", Ce = u.forwardRef((e, t) => {
|
|
8
8
|
var a;
|
|
9
9
|
const { container: n, ...r } = e, [c, i] = u.useState(!1);
|
|
10
|
-
|
|
10
|
+
Ee(() => i(!0), []);
|
|
11
11
|
const l = n || c && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
12
|
-
return l ?
|
|
12
|
+
return l ? be.createPortal(/* @__PURE__ */ ue(ce.div, { ...r, ref: t }), l) : null;
|
|
13
13
|
});
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
function
|
|
14
|
+
Ce.displayName = we;
|
|
15
|
+
var _ = 0;
|
|
16
|
+
function wt() {
|
|
17
17
|
u.useEffect(() => {
|
|
18
18
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
19
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
20
|
-
|
|
19
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Z()), document.body.insertAdjacentElement("beforeend", e[1] ?? Z()), _++, () => {
|
|
20
|
+
_ === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _--;
|
|
21
21
|
};
|
|
22
22
|
}, []);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Z() {
|
|
25
25
|
const e = document.createElement("span");
|
|
26
26
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", q = { bubbles: !1, cancelable: !0 }, Re = "FocusScope", Ae = u.forwardRef((e, t) => {
|
|
29
29
|
const {
|
|
30
30
|
loop: n = !1,
|
|
31
31
|
trapped: r = !1,
|
|
32
32
|
onMountAutoFocus: c,
|
|
33
33
|
onUnmountAutoFocus: i,
|
|
34
34
|
...l
|
|
35
|
-
} = e, [a, S] = u.useState(null), b =
|
|
35
|
+
} = e, [a, S] = u.useState(null), b = z(c), g = z(i), f = u.useRef(null), v = Se(t, (o) => S(o)), h = u.useRef({
|
|
36
36
|
paused: !1,
|
|
37
37
|
pause() {
|
|
38
38
|
this.paused = !0;
|
|
@@ -47,16 +47,16 @@ var j = "focusScope.autoFocusOnMount", K = "focusScope.autoFocusOnUnmount", $ =
|
|
|
47
47
|
if (h.paused || !a)
|
|
48
48
|
return;
|
|
49
49
|
const y = p.target;
|
|
50
|
-
a.contains(y) ? f.current = y :
|
|
50
|
+
a.contains(y) ? f.current = y : A(f.current, { select: !0 });
|
|
51
51
|
}, s = function(p) {
|
|
52
52
|
if (h.paused || !a)
|
|
53
53
|
return;
|
|
54
54
|
const y = p.relatedTarget;
|
|
55
|
-
y !== null && (a.contains(y) ||
|
|
55
|
+
y !== null && (a.contains(y) || A(f.current, { select: !0 }));
|
|
56
56
|
}, d = function(p) {
|
|
57
57
|
if (document.activeElement === document.body)
|
|
58
58
|
for (const E of p)
|
|
59
|
-
E.removedNodes.length > 0 &&
|
|
59
|
+
E.removedNodes.length > 0 && A(a);
|
|
60
60
|
};
|
|
61
61
|
document.addEventListener("focusin", o), document.addEventListener("focusout", s);
|
|
62
62
|
const m = new MutationObserver(d);
|
|
@@ -66,16 +66,16 @@ var j = "focusScope.autoFocusOnMount", K = "focusScope.autoFocusOnUnmount", $ =
|
|
|
66
66
|
}
|
|
67
67
|
}, [r, a, h.paused]), u.useEffect(() => {
|
|
68
68
|
if (a) {
|
|
69
|
-
|
|
69
|
+
$.add(h);
|
|
70
70
|
const o = document.activeElement;
|
|
71
71
|
if (!a.contains(o)) {
|
|
72
|
-
const d = new CustomEvent(
|
|
73
|
-
a.addEventListener(
|
|
72
|
+
const d = new CustomEvent(U, q);
|
|
73
|
+
a.addEventListener(U, b), a.dispatchEvent(d), d.defaultPrevented || (Te(Fe(ie(a)), { select: !0 }), document.activeElement === o && A(a));
|
|
74
74
|
}
|
|
75
75
|
return () => {
|
|
76
|
-
a.removeEventListener(
|
|
77
|
-
const d = new CustomEvent(
|
|
78
|
-
a.addEventListener(
|
|
76
|
+
a.removeEventListener(U, b), setTimeout(() => {
|
|
77
|
+
const d = new CustomEvent(j, q);
|
|
78
|
+
a.addEventListener(j, g), a.dispatchEvent(d), d.defaultPrevented || A(o ?? document.body, { select: !0 }), a.removeEventListener(j, g), $.remove(h);
|
|
79
79
|
}, 0);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
@@ -86,26 +86,26 @@ var j = "focusScope.autoFocusOnMount", K = "focusScope.autoFocusOnUnmount", $ =
|
|
|
86
86
|
return;
|
|
87
87
|
const s = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
|
|
88
88
|
if (s && d) {
|
|
89
|
-
const m = o.currentTarget, [p, y] =
|
|
90
|
-
p && y ? !o.shiftKey && d === y ? (o.preventDefault(), n &&
|
|
89
|
+
const m = o.currentTarget, [p, y] = ke(m);
|
|
90
|
+
p && y ? !o.shiftKey && d === y ? (o.preventDefault(), n && A(p, { select: !0 })) : o.shiftKey && d === p && (o.preventDefault(), n && A(y, { select: !0 })) : d === m && o.preventDefault();
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
[n, r, h.paused]
|
|
94
94
|
);
|
|
95
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ ue(ce.div, { tabIndex: -1, ...l, ref: v, onKeyDown: w });
|
|
96
96
|
});
|
|
97
|
-
|
|
98
|
-
function
|
|
97
|
+
Ae.displayName = Re;
|
|
98
|
+
function Te(e, { select: t = !1 } = {}) {
|
|
99
99
|
const n = document.activeElement;
|
|
100
100
|
for (const r of e)
|
|
101
|
-
if (
|
|
101
|
+
if (A(r, { select: t }), document.activeElement !== n)
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
const t =
|
|
104
|
+
function ke(e) {
|
|
105
|
+
const t = ie(e), n = Q(t, e), r = Q(t.reverse(), e);
|
|
106
106
|
return [n, r];
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ie(e) {
|
|
109
109
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
110
110
|
acceptNode: (r) => {
|
|
111
111
|
const c = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -116,12 +116,12 @@ function se(e) {
|
|
|
116
116
|
t.push(n.currentNode);
|
|
117
117
|
return t;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Q(e, t) {
|
|
120
120
|
for (const n of e)
|
|
121
|
-
if (!
|
|
121
|
+
if (!Pe(n, { upTo: t }))
|
|
122
122
|
return n;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Pe(e, { upTo: t }) {
|
|
125
125
|
if (getComputedStyle(e).visibility === "hidden")
|
|
126
126
|
return !0;
|
|
127
127
|
for (; e; ) {
|
|
@@ -133,54 +133,54 @@ function Fe(e, { upTo: t }) {
|
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Me(e) {
|
|
137
137
|
return e instanceof HTMLInputElement && "select" in e;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function A(e, { select: t = !1 } = {}) {
|
|
140
140
|
if (e && e.focus) {
|
|
141
141
|
const n = document.activeElement;
|
|
142
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
142
|
+
e.focus({ preventScroll: !0 }), e !== n && Me(e) && t && e.select();
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
function
|
|
145
|
+
var $ = Ne();
|
|
146
|
+
function Ne() {
|
|
147
147
|
let e = [];
|
|
148
148
|
return {
|
|
149
149
|
add(t) {
|
|
150
150
|
const n = e[0];
|
|
151
|
-
t !== n && (n == null || n.pause()), e =
|
|
151
|
+
t !== n && (n == null || n.pause()), e = J(e, t), e.unshift(t);
|
|
152
152
|
},
|
|
153
153
|
remove(t) {
|
|
154
154
|
var n;
|
|
155
|
-
e =
|
|
155
|
+
e = J(e, t), (n = e[0]) == null || n.resume();
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function J(e, t) {
|
|
160
160
|
const n = [...e], r = n.indexOf(t);
|
|
161
161
|
return r !== -1 && n.splice(r, 1), n;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Fe(e) {
|
|
164
164
|
return e.filter((t) => t.tagName !== "A");
|
|
165
165
|
}
|
|
166
|
-
var
|
|
166
|
+
var Le = function(e) {
|
|
167
167
|
if (typeof document > "u")
|
|
168
168
|
return null;
|
|
169
169
|
var t = Array.isArray(e) ? e[0] : e;
|
|
170
170
|
return t.ownerDocument.body;
|
|
171
|
-
}, k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {},
|
|
172
|
-
return e && (e.host ||
|
|
173
|
-
},
|
|
171
|
+
}, k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {}, K = 0, le = function(e) {
|
|
172
|
+
return e && (e.host || le(e.parentNode));
|
|
173
|
+
}, Oe = function(e, t) {
|
|
174
174
|
return t.map(function(n) {
|
|
175
175
|
if (e.contains(n))
|
|
176
176
|
return n;
|
|
177
|
-
var r =
|
|
177
|
+
var r = le(n);
|
|
178
178
|
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
179
179
|
}).filter(function(n) {
|
|
180
180
|
return !!n;
|
|
181
181
|
});
|
|
182
|
-
},
|
|
183
|
-
var c =
|
|
182
|
+
}, Ie = function(e, t, n, r) {
|
|
183
|
+
var c = Oe(t, Array.isArray(e) ? e : [e]);
|
|
184
184
|
O[n] || (O[n] = /* @__PURE__ */ new WeakMap());
|
|
185
185
|
var i = O[n], l = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
|
|
186
186
|
!f || a.has(f) || (a.add(f), b(f.parentNode));
|
|
@@ -199,16 +199,16 @@ var xe = function(e) {
|
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
201
|
};
|
|
202
|
-
return g(t), a.clear(),
|
|
202
|
+
return g(t), a.clear(), K++, function() {
|
|
203
203
|
l.forEach(function(f) {
|
|
204
204
|
var v = k.get(f) - 1, h = i.get(f) - 1;
|
|
205
205
|
k.set(f, v), i.set(f, h), v || (L.has(f) || f.removeAttribute(r), L.delete(f)), h || f.removeAttribute(n);
|
|
206
|
-
}),
|
|
206
|
+
}), K--, K || (k = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), O = {});
|
|
207
207
|
};
|
|
208
|
-
},
|
|
208
|
+
}, Ct = function(e, t, n) {
|
|
209
209
|
n === void 0 && (n = "data-aria-hidden");
|
|
210
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), c = t ||
|
|
211
|
-
return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))),
|
|
210
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), c = t || Le(e);
|
|
211
|
+
return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), Ie(r, c, n, "aria-hidden")) : function() {
|
|
212
212
|
return null;
|
|
213
213
|
};
|
|
214
214
|
}, C = function() {
|
|
@@ -221,7 +221,7 @@ var xe = function(e) {
|
|
|
221
221
|
return t;
|
|
222
222
|
}, C.apply(this, arguments);
|
|
223
223
|
};
|
|
224
|
-
function
|
|
224
|
+
function se(e, t) {
|
|
225
225
|
var n = {};
|
|
226
226
|
for (var r in e)
|
|
227
227
|
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
@@ -230,18 +230,18 @@ function de(e, t) {
|
|
|
230
230
|
t.indexOf(r[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[c]) && (n[r[c]] = e[r[c]]);
|
|
231
231
|
return n;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function xe(e, t, n) {
|
|
234
234
|
if (n || arguments.length === 2)
|
|
235
235
|
for (var r = 0, c = t.length, i; r < c; r++)
|
|
236
236
|
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
237
237
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
238
238
|
}
|
|
239
|
-
var W = "right-scroll-bar-position", B = "width-before-scroll-bar",
|
|
240
|
-
function
|
|
239
|
+
var W = "right-scroll-bar-position", B = "width-before-scroll-bar", We = "with-scroll-bars-hidden", Be = "--removed-body-scroll-bar-size";
|
|
240
|
+
function H(e, t) {
|
|
241
241
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
var n =
|
|
243
|
+
function De(e, t) {
|
|
244
|
+
var n = ye(function() {
|
|
245
245
|
return {
|
|
246
246
|
// value
|
|
247
247
|
value: e,
|
|
@@ -261,31 +261,31 @@ function je(e, t) {
|
|
|
261
261
|
})[0];
|
|
262
262
|
return n.callback = t, n.facade;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
265
|
-
function
|
|
266
|
-
var n =
|
|
264
|
+
var _e = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
|
|
265
|
+
function Ue(e, t) {
|
|
266
|
+
var n = De(t || null, function(r) {
|
|
267
267
|
return e.forEach(function(c) {
|
|
268
|
-
return
|
|
268
|
+
return H(c, r);
|
|
269
269
|
});
|
|
270
270
|
});
|
|
271
|
-
return
|
|
272
|
-
var r =
|
|
271
|
+
return _e(function() {
|
|
272
|
+
var r = ee.get(n);
|
|
273
273
|
if (r) {
|
|
274
274
|
var c = new Set(r), i = new Set(e), l = n.current;
|
|
275
275
|
c.forEach(function(a) {
|
|
276
|
-
i.has(a) ||
|
|
276
|
+
i.has(a) || H(a, null);
|
|
277
277
|
}), i.forEach(function(a) {
|
|
278
|
-
c.has(a) ||
|
|
278
|
+
c.has(a) || H(a, l);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
ee.set(n, e);
|
|
282
282
|
}, [e]), n;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function je(e) {
|
|
285
285
|
return e;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
t === void 0 && (t =
|
|
287
|
+
function Ke(e, t) {
|
|
288
|
+
t === void 0 && (t = je);
|
|
289
289
|
var n = [], r = !1, c = {
|
|
290
290
|
read: function() {
|
|
291
291
|
if (r)
|
|
@@ -339,13 +339,13 @@ function Xe(e, t) {
|
|
|
339
339
|
};
|
|
340
340
|
return c;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function He(e) {
|
|
343
343
|
e === void 0 && (e = {});
|
|
344
|
-
var t =
|
|
344
|
+
var t = Ke(null);
|
|
345
345
|
return t.options = C({ async: !0, ssr: !1 }, e), t;
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
var t = e.sideCar, n =
|
|
347
|
+
var fe = function(e) {
|
|
348
|
+
var t = e.sideCar, n = se(e, ["sideCar"]);
|
|
349
349
|
if (!t)
|
|
350
350
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
351
351
|
var r = t.read();
|
|
@@ -353,22 +353,22 @@ var ve = function(e) {
|
|
|
353
353
|
throw new Error("Sidecar medium not found");
|
|
354
354
|
return u.createElement(r, C({}, n));
|
|
355
355
|
};
|
|
356
|
-
|
|
357
|
-
function
|
|
358
|
-
return e.useMedium(t),
|
|
356
|
+
fe.isSideCarExport = !0;
|
|
357
|
+
function Ve(e, t) {
|
|
358
|
+
return e.useMedium(t), fe;
|
|
359
359
|
}
|
|
360
|
-
var
|
|
360
|
+
var de = He(), V = function() {
|
|
361
361
|
}, D = u.forwardRef(function(e, t) {
|
|
362
362
|
var n = u.useRef(null), r = u.useState({
|
|
363
|
-
onScrollCapture:
|
|
364
|
-
onWheelCapture:
|
|
365
|
-
onTouchMoveCapture:
|
|
366
|
-
}), c = r[0], i = r[1], l = e.forwardProps, a = e.children, S = e.className, b = e.removeScrollBar, g = e.enabled, f = e.shards, v = e.sideCar, h = e.noRelative, w = e.noIsolation, o = e.inert, s = e.allowPinchZoom, d = e.as, m = d === void 0 ? "div" : d, p = e.gapMode, y =
|
|
363
|
+
onScrollCapture: V,
|
|
364
|
+
onWheelCapture: V,
|
|
365
|
+
onTouchMoveCapture: V
|
|
366
|
+
}), c = r[0], i = r[1], l = e.forwardProps, a = e.children, S = e.className, b = e.removeScrollBar, g = e.enabled, f = e.shards, v = e.sideCar, h = e.noRelative, w = e.noIsolation, o = e.inert, s = e.allowPinchZoom, d = e.as, m = d === void 0 ? "div" : d, p = e.gapMode, y = se(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, T = Ue([n, t]), R = C(C({}, y), c);
|
|
367
367
|
return u.createElement(
|
|
368
368
|
u.Fragment,
|
|
369
369
|
null,
|
|
370
|
-
g && u.createElement(E, { sideCar:
|
|
371
|
-
l ? u.cloneElement(u.Children.only(a), C(C({},
|
|
370
|
+
g && u.createElement(E, { sideCar: de, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!s, lockRef: n, gapMode: p }),
|
|
371
|
+
l ? u.cloneElement(u.Children.only(a), C(C({}, R), { ref: T })) : u.createElement(m, C({}, R, { className: S, ref: T }), a)
|
|
372
372
|
);
|
|
373
373
|
});
|
|
374
374
|
D.defaultProps = {
|
|
@@ -380,39 +380,39 @@ D.classNames = {
|
|
|
380
380
|
fullWidth: B,
|
|
381
381
|
zeroRight: W
|
|
382
382
|
};
|
|
383
|
-
var
|
|
384
|
-
if (
|
|
385
|
-
return
|
|
383
|
+
var te, Xe = function() {
|
|
384
|
+
if (te)
|
|
385
|
+
return te;
|
|
386
386
|
if (typeof __webpack_nonce__ < "u")
|
|
387
387
|
return __webpack_nonce__;
|
|
388
388
|
};
|
|
389
|
-
function
|
|
389
|
+
function Ye() {
|
|
390
390
|
if (!document)
|
|
391
391
|
return null;
|
|
392
392
|
var e = document.createElement("style");
|
|
393
393
|
e.type = "text/css";
|
|
394
|
-
var t =
|
|
394
|
+
var t = Xe();
|
|
395
395
|
return t && e.setAttribute("nonce", t), e;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Ge(e, t) {
|
|
398
398
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function ze(e) {
|
|
401
401
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
402
402
|
t.appendChild(e);
|
|
403
403
|
}
|
|
404
|
-
var
|
|
404
|
+
var Ze = function() {
|
|
405
405
|
var e = 0, t = null;
|
|
406
406
|
return {
|
|
407
407
|
add: function(n) {
|
|
408
|
-
e == 0 && (t =
|
|
408
|
+
e == 0 && (t = Ye()) && (Ge(t, n), ze(t)), e++;
|
|
409
409
|
},
|
|
410
410
|
remove: function() {
|
|
411
411
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
},
|
|
415
|
-
var e =
|
|
414
|
+
}, qe = function() {
|
|
415
|
+
var e = Ze();
|
|
416
416
|
return function(t, n) {
|
|
417
417
|
u.useEffect(function() {
|
|
418
418
|
return e.add(t), function() {
|
|
@@ -420,40 +420,40 @@ var $e = function() {
|
|
|
420
420
|
};
|
|
421
421
|
}, [t && n]);
|
|
422
422
|
};
|
|
423
|
-
},
|
|
424
|
-
var e =
|
|
423
|
+
}, ve = function() {
|
|
424
|
+
var e = qe(), t = function(n) {
|
|
425
425
|
var r = n.styles, c = n.dynamic;
|
|
426
426
|
return e(r, c), null;
|
|
427
427
|
};
|
|
428
428
|
return t;
|
|
429
|
-
},
|
|
429
|
+
}, Qe = {
|
|
430
430
|
left: 0,
|
|
431
431
|
top: 0,
|
|
432
432
|
right: 0,
|
|
433
433
|
gap: 0
|
|
434
|
-
},
|
|
434
|
+
}, X = function(e) {
|
|
435
435
|
return parseInt(e || "", 10) || 0;
|
|
436
|
-
},
|
|
436
|
+
}, $e = function(e) {
|
|
437
437
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
438
|
-
return [
|
|
439
|
-
},
|
|
438
|
+
return [X(n), X(r), X(c)];
|
|
439
|
+
}, Je = function(e) {
|
|
440
440
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
441
|
-
return
|
|
442
|
-
var t =
|
|
441
|
+
return Qe;
|
|
442
|
+
var t = $e(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
443
443
|
return {
|
|
444
444
|
left: t[0],
|
|
445
445
|
top: t[1],
|
|
446
446
|
right: t[2],
|
|
447
447
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
448
448
|
};
|
|
449
|
-
},
|
|
449
|
+
}, et = ve(), N = "data-scroll-locked", tt = function(e, t, n, r) {
|
|
450
450
|
var c = e.left, i = e.top, l = e.right, a = e.gap;
|
|
451
451
|
return n === void 0 && (n = "margin"), `
|
|
452
|
-
.`.concat(
|
|
452
|
+
.`.concat(We, ` {
|
|
453
453
|
overflow: hidden `).concat(r, `;
|
|
454
454
|
padding-right: `).concat(a, "px ").concat(r, `;
|
|
455
455
|
}
|
|
456
|
-
body[`).concat(
|
|
456
|
+
body[`).concat(N, `] {
|
|
457
457
|
overflow: hidden `).concat(r, `;
|
|
458
458
|
overscroll-behavior: contain;
|
|
459
459
|
`).concat([
|
|
@@ -486,94 +486,94 @@ var $e = function() {
|
|
|
486
486
|
margin-right: 0 `).concat(r, `;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
body[`).concat(
|
|
490
|
-
`).concat(
|
|
489
|
+
body[`).concat(N, `] {
|
|
490
|
+
`).concat(Be, ": ").concat(a, `px;
|
|
491
491
|
}
|
|
492
492
|
`);
|
|
493
|
-
},
|
|
494
|
-
var e = parseInt(document.body.getAttribute(
|
|
493
|
+
}, ne = function() {
|
|
494
|
+
var e = parseInt(document.body.getAttribute(N) || "0", 10);
|
|
495
495
|
return isFinite(e) ? e : 0;
|
|
496
|
-
},
|
|
496
|
+
}, nt = function() {
|
|
497
497
|
u.useEffect(function() {
|
|
498
|
-
return document.body.setAttribute(
|
|
499
|
-
var e =
|
|
500
|
-
e <= 0 ? document.body.removeAttribute(
|
|
498
|
+
return document.body.setAttribute(N, (ne() + 1).toString()), function() {
|
|
499
|
+
var e = ne() - 1;
|
|
500
|
+
e <= 0 ? document.body.removeAttribute(N) : document.body.setAttribute(N, e.toString());
|
|
501
501
|
};
|
|
502
502
|
}, []);
|
|
503
|
-
},
|
|
503
|
+
}, rt = function(e) {
|
|
504
504
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, c = r === void 0 ? "margin" : r;
|
|
505
|
-
|
|
505
|
+
nt();
|
|
506
506
|
var i = u.useMemo(function() {
|
|
507
|
-
return
|
|
507
|
+
return Je(c);
|
|
508
508
|
}, [c]);
|
|
509
|
-
return u.createElement(
|
|
510
|
-
},
|
|
509
|
+
return u.createElement(et, { styles: tt(i, !t, c, n ? "" : "!important") });
|
|
510
|
+
}, Y = !1;
|
|
511
511
|
if (typeof window < "u")
|
|
512
512
|
try {
|
|
513
513
|
var I = Object.defineProperty({}, "passive", {
|
|
514
514
|
get: function() {
|
|
515
|
-
return
|
|
515
|
+
return Y = !0, !0;
|
|
516
516
|
}
|
|
517
517
|
});
|
|
518
518
|
window.addEventListener("test", I, I), window.removeEventListener("test", I, I);
|
|
519
519
|
} catch {
|
|
520
|
-
|
|
520
|
+
Y = !1;
|
|
521
521
|
}
|
|
522
|
-
var P =
|
|
522
|
+
var P = Y ? { passive: !1 } : !1, at = function(e) {
|
|
523
523
|
return e.tagName === "TEXTAREA";
|
|
524
|
-
},
|
|
524
|
+
}, he = function(e, t) {
|
|
525
525
|
if (!(e instanceof Element))
|
|
526
526
|
return !1;
|
|
527
527
|
var n = window.getComputedStyle(e);
|
|
528
528
|
return (
|
|
529
529
|
// not-not-scrollable
|
|
530
530
|
n[t] !== "hidden" && // contains scroll inside self
|
|
531
|
-
!(n.overflowY === n.overflowX && !
|
|
531
|
+
!(n.overflowY === n.overflowX && !at(e) && n[t] === "visible")
|
|
532
532
|
);
|
|
533
|
-
},
|
|
534
|
-
return
|
|
535
|
-
},
|
|
536
|
-
return
|
|
537
|
-
},
|
|
533
|
+
}, ot = function(e) {
|
|
534
|
+
return he(e, "overflowY");
|
|
535
|
+
}, ct = function(e) {
|
|
536
|
+
return he(e, "overflowX");
|
|
537
|
+
}, re = function(e, t) {
|
|
538
538
|
var n = t.ownerDocument, r = t;
|
|
539
539
|
do {
|
|
540
540
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
541
|
-
var c =
|
|
541
|
+
var c = me(e, r);
|
|
542
542
|
if (c) {
|
|
543
|
-
var i =
|
|
543
|
+
var i = pe(e, r), l = i[1], a = i[2];
|
|
544
544
|
if (l > a)
|
|
545
545
|
return !0;
|
|
546
546
|
}
|
|
547
547
|
r = r.parentNode;
|
|
548
548
|
} while (r && r !== n.body);
|
|
549
549
|
return !1;
|
|
550
|
-
},
|
|
550
|
+
}, ut = function(e) {
|
|
551
551
|
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
552
552
|
return [
|
|
553
553
|
t,
|
|
554
554
|
n,
|
|
555
555
|
r
|
|
556
556
|
];
|
|
557
|
-
},
|
|
557
|
+
}, it = function(e) {
|
|
558
558
|
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
559
559
|
return [
|
|
560
560
|
t,
|
|
561
561
|
n,
|
|
562
562
|
r
|
|
563
563
|
];
|
|
564
|
-
},
|
|
565
|
-
return e === "v" ?
|
|
566
|
-
},
|
|
567
|
-
return e === "v" ?
|
|
568
|
-
},
|
|
564
|
+
}, me = function(e, t) {
|
|
565
|
+
return e === "v" ? ot(t) : ct(t);
|
|
566
|
+
}, pe = function(e, t) {
|
|
567
|
+
return e === "v" ? ut(t) : it(t);
|
|
568
|
+
}, lt = function(e, t) {
|
|
569
569
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
570
|
-
},
|
|
571
|
-
var i =
|
|
570
|
+
}, st = function(e, t, n, r, c) {
|
|
571
|
+
var i = lt(e, window.getComputedStyle(t).direction), l = i * r, a = n.target, S = t.contains(a), b = !1, g = l > 0, f = 0, v = 0;
|
|
572
572
|
do {
|
|
573
573
|
if (!a)
|
|
574
574
|
break;
|
|
575
|
-
var h =
|
|
576
|
-
(w || d) &&
|
|
575
|
+
var h = pe(e, a), w = h[0], o = h[1], s = h[2], d = o - s - i * w;
|
|
576
|
+
(w || d) && me(e, a) && (f += d, v += w);
|
|
577
577
|
var m = a.parentNode;
|
|
578
578
|
a = m && m.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? m.host : m;
|
|
579
579
|
} while (
|
|
@@ -584,26 +584,26 @@ var P = G ? { passive: !1 } : !1, ut = function(e) {
|
|
|
584
584
|
return (g && (c && Math.abs(f) < 1 || !c && l > f) || !g && (c && Math.abs(v) < 1 || !c && -l > v)) && (b = !0), b;
|
|
585
585
|
}, x = function(e) {
|
|
586
586
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
587
|
-
},
|
|
587
|
+
}, ae = function(e) {
|
|
588
588
|
return [e.deltaX, e.deltaY];
|
|
589
|
-
},
|
|
589
|
+
}, oe = function(e) {
|
|
590
590
|
return e && "current" in e ? e.current : e;
|
|
591
|
-
},
|
|
591
|
+
}, ft = function(e, t) {
|
|
592
592
|
return e[0] === t[0] && e[1] === t[1];
|
|
593
|
-
},
|
|
593
|
+
}, dt = function(e) {
|
|
594
594
|
return `
|
|
595
595
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
596
596
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
597
597
|
`);
|
|
598
|
-
},
|
|
599
|
-
function
|
|
600
|
-
var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(
|
|
598
|
+
}, vt = 0, M = [];
|
|
599
|
+
function ht(e) {
|
|
600
|
+
var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(vt++)[0], i = u.useState(ve)[0], l = u.useRef(e);
|
|
601
601
|
u.useEffect(function() {
|
|
602
602
|
l.current = e;
|
|
603
603
|
}, [e]), u.useEffect(function() {
|
|
604
604
|
if (e.inert) {
|
|
605
605
|
document.body.classList.add("block-interactivity-".concat(c));
|
|
606
|
-
var o =
|
|
606
|
+
var o = xe([e.lockRef.current], (e.shards || []).map(oe), !0).filter(Boolean);
|
|
607
607
|
return o.forEach(function(s) {
|
|
608
608
|
return s.classList.add("allow-interactivity-".concat(c));
|
|
609
609
|
}), function() {
|
|
@@ -616,40 +616,37 @@ function gt(e) {
|
|
|
616
616
|
var a = u.useCallback(function(o, s) {
|
|
617
617
|
if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
|
|
618
618
|
return !l.current.allowPinchZoom;
|
|
619
|
-
var d = x(o), m = n.current, p = "deltaX" in o ? o.deltaX : m[0] - d[0], y = "deltaY" in o ? o.deltaY : m[1] - d[1], E,
|
|
620
|
-
if ("touches" in o &&
|
|
621
|
-
return !1;
|
|
622
|
-
var z = window.getSelection(), _ = z && z.anchorNode, Ee = _ ? _ === R || _.contains(R) : !1;
|
|
623
|
-
if (Ee)
|
|
619
|
+
var d = x(o), m = n.current, p = "deltaX" in o ? o.deltaX : m[0] - d[0], y = "deltaY" in o ? o.deltaY : m[1] - d[1], E, T = o.target, R = Math.abs(p) > Math.abs(y) ? "h" : "v";
|
|
620
|
+
if ("touches" in o && R === "h" && T.type === "range")
|
|
624
621
|
return !1;
|
|
625
|
-
var F =
|
|
622
|
+
var F = re(R, T);
|
|
626
623
|
if (!F)
|
|
627
624
|
return !0;
|
|
628
|
-
if (F ? E =
|
|
625
|
+
if (F ? E = R : (E = R === "v" ? "h" : "v", F = re(R, T)), !F)
|
|
629
626
|
return !1;
|
|
630
627
|
if (!r.current && "changedTouches" in o && (p || y) && (r.current = E), !E)
|
|
631
628
|
return !0;
|
|
632
|
-
var
|
|
633
|
-
return
|
|
629
|
+
var G = r.current || E;
|
|
630
|
+
return st(G, s, o, G === "h" ? p : y, !0);
|
|
634
631
|
}, []), S = u.useCallback(function(o) {
|
|
635
632
|
var s = o;
|
|
636
|
-
if (!(!
|
|
637
|
-
var d = "deltaY" in s ?
|
|
638
|
-
return E.name === s.type && (E.target === s.target || s.target === E.shadowParent) &&
|
|
633
|
+
if (!(!M.length || M[M.length - 1] !== i)) {
|
|
634
|
+
var d = "deltaY" in s ? ae(s) : x(s), m = t.current.filter(function(E) {
|
|
635
|
+
return E.name === s.type && (E.target === s.target || s.target === E.shadowParent) && ft(E.delta, d);
|
|
639
636
|
})[0];
|
|
640
637
|
if (m && m.should) {
|
|
641
638
|
s.cancelable && s.preventDefault();
|
|
642
639
|
return;
|
|
643
640
|
}
|
|
644
641
|
if (!m) {
|
|
645
|
-
var p = (l.current.shards || []).map(
|
|
642
|
+
var p = (l.current.shards || []).map(oe).filter(Boolean).filter(function(E) {
|
|
646
643
|
return E.contains(s.target);
|
|
647
644
|
}), y = p.length > 0 ? a(s, p[0]) : !l.current.noIsolation;
|
|
648
645
|
y && s.cancelable && s.preventDefault();
|
|
649
646
|
}
|
|
650
647
|
}
|
|
651
648
|
}, []), b = u.useCallback(function(o, s, d, m) {
|
|
652
|
-
var p = { name: o, delta: s, target: d, should: m, shadowParent:
|
|
649
|
+
var p = { name: o, delta: s, target: d, should: m, shadowParent: mt(d) };
|
|
653
650
|
t.current.push(p), setTimeout(function() {
|
|
654
651
|
t.current = t.current.filter(function(y) {
|
|
655
652
|
return y !== p;
|
|
@@ -658,17 +655,17 @@ function gt(e) {
|
|
|
658
655
|
}, []), g = u.useCallback(function(o) {
|
|
659
656
|
n.current = x(o), r.current = void 0;
|
|
660
657
|
}, []), f = u.useCallback(function(o) {
|
|
661
|
-
b(o.type,
|
|
658
|
+
b(o.type, ae(o), o.target, a(o, e.lockRef.current));
|
|
662
659
|
}, []), v = u.useCallback(function(o) {
|
|
663
660
|
b(o.type, x(o), o.target, a(o, e.lockRef.current));
|
|
664
661
|
}, []);
|
|
665
662
|
u.useEffect(function() {
|
|
666
|
-
return
|
|
663
|
+
return M.push(i), e.setCallbacks({
|
|
667
664
|
onScrollCapture: f,
|
|
668
665
|
onWheelCapture: f,
|
|
669
666
|
onTouchMoveCapture: v
|
|
670
667
|
}), document.addEventListener("wheel", S, P), document.addEventListener("touchmove", S, P), document.addEventListener("touchstart", g, P), function() {
|
|
671
|
-
|
|
668
|
+
M = M.filter(function(o) {
|
|
672
669
|
return o !== i;
|
|
673
670
|
}), document.removeEventListener("wheel", S, P), document.removeEventListener("touchmove", S, P), document.removeEventListener("touchstart", g, P);
|
|
674
671
|
};
|
|
@@ -677,25 +674,25 @@ function gt(e) {
|
|
|
677
674
|
return u.createElement(
|
|
678
675
|
u.Fragment,
|
|
679
676
|
null,
|
|
680
|
-
w ? u.createElement(i, { styles:
|
|
681
|
-
h ? u.createElement(
|
|
677
|
+
w ? u.createElement(i, { styles: dt(c) }) : null,
|
|
678
|
+
h ? u.createElement(rt, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
682
679
|
);
|
|
683
680
|
}
|
|
684
|
-
function
|
|
681
|
+
function mt(e) {
|
|
685
682
|
for (var t = null; e !== null; )
|
|
686
683
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
687
684
|
return t;
|
|
688
685
|
}
|
|
689
|
-
const
|
|
690
|
-
var
|
|
691
|
-
return u.createElement(D, C({}, e, { ref: t, sideCar:
|
|
686
|
+
const pt = Ve(de, ht);
|
|
687
|
+
var ge = u.forwardRef(function(e, t) {
|
|
688
|
+
return u.createElement(D, C({}, e, { ref: t, sideCar: pt }));
|
|
692
689
|
});
|
|
693
|
-
|
|
694
|
-
const
|
|
690
|
+
ge.classNames = D.classNames;
|
|
691
|
+
const Rt = ge;
|
|
695
692
|
export {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
693
|
+
Ae as F,
|
|
694
|
+
Ce as P,
|
|
695
|
+
Rt as R,
|
|
696
|
+
Ct as h,
|
|
697
|
+
wt as u
|
|
701
698
|
};
|