groove-dev 0.27.71 → 0.27.73
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/node_modules/@groove-dev/cli/package.json +1 -1
- package/node_modules/@groove-dev/daemon/package.json +1 -1
- package/node_modules/@groove-dev/daemon/src/api.js +38 -27
- package/node_modules/@groove-dev/daemon/src/providers/claude-code.js +2 -0
- package/node_modules/@groove-dev/daemon/src/providers/codex.js +1 -0
- package/node_modules/@groove-dev/daemon/src/providers/index.js +3 -3
- package/node_modules/@groove-dev/gui/dist/assets/index-BFc7Ov6v.css +1 -0
- package/node_modules/@groove-dev/gui/dist/assets/{index-BK6tvmxx.js → index-Deza1S0i.js} +160 -160
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/package.json +1 -1
- package/node_modules/@groove-dev/gui/src/components/editor/editor-tabs.jsx +5 -5
- package/node_modules/@groove-dev/gui/src/components/editor/file-tree.jsx +11 -0
- package/node_modules/@groove-dev/gui/src/components/settings/ProviderSetupWizard.jsx +7 -2
- package/node_modules/@groove-dev/gui/src/stores/groove.js +46 -54
- package/node_modules/@groove-dev/gui/src/views/editor.jsx +4 -3
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/api.js +38 -27
- package/packages/daemon/src/providers/claude-code.js +2 -0
- package/packages/daemon/src/providers/codex.js +1 -0
- package/packages/daemon/src/providers/index.js +3 -3
- package/packages/gui/dist/assets/index-BFc7Ov6v.css +1 -0
- package/packages/gui/dist/assets/{index-BK6tvmxx.js → index-Deza1S0i.js} +160 -160
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/components/editor/editor-tabs.jsx +5 -5
- package/packages/gui/src/components/editor/file-tree.jsx +11 -0
- package/packages/gui/src/components/settings/ProviderSetupWizard.jsx +7 -2
- package/packages/gui/src/stores/groove.js +46 -54
- package/packages/gui/src/views/editor.jsx +4 -3
- package/node_modules/@groove-dev/gui/dist/assets/index-74E3YTkT.css +0 -1
- package/packages/gui/dist/assets/index-74E3YTkT.css +0 -1
- package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js +0 -68
- package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js +0 -1420
- package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js +0 -17
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js +0 -22
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js +0 -34
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js +0 -101
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js +0 -2534
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js +0 -789
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_language.js +0 -115
- package/packages/gui/node_modules/.vite/deps/@codemirror_language.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_search.js +0 -1136
- package/packages/gui/node_modules/.vite/deps/@codemirror_search.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_state.js +0 -63
- package/packages/gui/node_modules/.vite/deps/@codemirror_state.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js +0 -179
- package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_view.js +0 -104
- package/packages/gui/node_modules/.vite/deps/@codemirror_view.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-context-menu.js +0 -1202
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-context-menu.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js +0 -365
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js +0 -757
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js +0 -219
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js +0 -562
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js +0 -46
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js +0 -121
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js +0 -9237
- package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xyflow_react.js +0 -9934
- package/packages/gui/node_modules/.vite/deps/@xyflow_react.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/_metadata.json +0 -259
- package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js +0 -5169
- package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js +0 -2000
- package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js +0 -1776
- package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-4JHIKDUF.js +0 -435
- package/packages/gui/node_modules/.vite/deps/chunk-4JHIKDUF.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js +0 -292
- package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js +0 -1004
- package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-FOR2E6IR.js +0 -105
- package/packages/gui/node_modules/.vite/deps/chunk-FOR2E6IR.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js +0 -23
- package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js +0 -1062
- package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-PGL3TTJA.js +0 -1115
- package/packages/gui/node_modules/.vite/deps/chunk-PGL3TTJA.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-PGMATLPZ.js +0 -2294
- package/packages/gui/node_modules/.vite/deps/chunk-PGMATLPZ.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js +0 -42
- package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-QX3PPTYO.js +0 -315
- package/packages/gui/node_modules/.vite/deps/chunk-QX3PPTYO.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js +0 -10985
- package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-SPKVQGZX.js +0 -701
- package/packages/gui/node_modules/.vite/deps/chunk-SPKVQGZX.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js +0 -280
- package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-YEUURE4V.js +0 -264
- package/packages/gui/node_modules/.vite/deps/chunk-YEUURE4V.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js +0 -3459
- package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-Z5NIFSCT.js +0 -1106
- package/packages/gui/node_modules/.vite/deps/chunk-Z5NIFSCT.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/clsx.js +0 -22
- package/packages/gui/node_modules/.vite/deps/clsx.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/framer-motion.js +0 -12732
- package/packages/gui/node_modules/.vite/deps/framer-motion.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/lucide-react.js +0 -29653
- package/packages/gui/node_modules/.vite/deps/lucide-react.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/package.json +0 -3
- package/packages/gui/node_modules/.vite/deps/react-dom.js +0 -6
- package/packages/gui/node_modules/.vite/deps/react-dom.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react-dom_client.js +0 -20217
- package/packages/gui/node_modules/.vite/deps/react-dom_client.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react.js +0 -5
- package/packages/gui/node_modules/.vite/deps/react.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -278
- package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js +0 -6
- package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/tailwind-merge.js +0 -3263
- package/packages/gui/node_modules/.vite/deps/tailwind-merge.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/zustand.js +0 -56
- package/packages/gui/node_modules/.vite/deps/zustand.js.map +0 -7
|
@@ -1,1106 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Primitive,
|
|
3
|
-
useCallbackRef,
|
|
4
|
-
useComposedRefs
|
|
5
|
-
} from "./chunk-4JHIKDUF.js";
|
|
6
|
-
import {
|
|
7
|
-
require_jsx_runtime
|
|
8
|
-
} from "./chunk-ACEP5X2F.js";
|
|
9
|
-
import {
|
|
10
|
-
require_react
|
|
11
|
-
} from "./chunk-CDLO3JFW.js";
|
|
12
|
-
import {
|
|
13
|
-
__toESM
|
|
14
|
-
} from "./chunk-PR4QN5HX.js";
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
17
|
-
var React = __toESM(require_react(), 1);
|
|
18
|
-
var count = 0;
|
|
19
|
-
function useFocusGuards() {
|
|
20
|
-
React.useEffect(() => {
|
|
21
|
-
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
22
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
23
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
24
|
-
count++;
|
|
25
|
-
return () => {
|
|
26
|
-
if (count === 1) {
|
|
27
|
-
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
28
|
-
}
|
|
29
|
-
count--;
|
|
30
|
-
};
|
|
31
|
-
}, []);
|
|
32
|
-
}
|
|
33
|
-
function createFocusGuard() {
|
|
34
|
-
const element = document.createElement("span");
|
|
35
|
-
element.setAttribute("data-radix-focus-guard", "");
|
|
36
|
-
element.tabIndex = 0;
|
|
37
|
-
element.style.outline = "none";
|
|
38
|
-
element.style.opacity = "0";
|
|
39
|
-
element.style.position = "fixed";
|
|
40
|
-
element.style.pointerEvents = "none";
|
|
41
|
-
return element;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// ../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
45
|
-
var React2 = __toESM(require_react(), 1);
|
|
46
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
47
|
-
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
48
|
-
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
49
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
50
|
-
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
51
|
-
var FocusScope = React2.forwardRef((props, forwardedRef) => {
|
|
52
|
-
const {
|
|
53
|
-
loop = false,
|
|
54
|
-
trapped = false,
|
|
55
|
-
onMountAutoFocus: onMountAutoFocusProp,
|
|
56
|
-
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
57
|
-
...scopeProps
|
|
58
|
-
} = props;
|
|
59
|
-
const [container, setContainer] = React2.useState(null);
|
|
60
|
-
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
61
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
62
|
-
const lastFocusedElementRef = React2.useRef(null);
|
|
63
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
64
|
-
const focusScope = React2.useRef({
|
|
65
|
-
paused: false,
|
|
66
|
-
pause() {
|
|
67
|
-
this.paused = true;
|
|
68
|
-
},
|
|
69
|
-
resume() {
|
|
70
|
-
this.paused = false;
|
|
71
|
-
}
|
|
72
|
-
}).current;
|
|
73
|
-
React2.useEffect(() => {
|
|
74
|
-
if (trapped) {
|
|
75
|
-
let handleFocusIn2 = function(event) {
|
|
76
|
-
if (focusScope.paused || !container) return;
|
|
77
|
-
const target = event.target;
|
|
78
|
-
if (container.contains(target)) {
|
|
79
|
-
lastFocusedElementRef.current = target;
|
|
80
|
-
} else {
|
|
81
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
82
|
-
}
|
|
83
|
-
}, handleFocusOut2 = function(event) {
|
|
84
|
-
if (focusScope.paused || !container) return;
|
|
85
|
-
const relatedTarget = event.relatedTarget;
|
|
86
|
-
if (relatedTarget === null) return;
|
|
87
|
-
if (!container.contains(relatedTarget)) {
|
|
88
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
89
|
-
}
|
|
90
|
-
}, handleMutations2 = function(mutations) {
|
|
91
|
-
const focusedElement = document.activeElement;
|
|
92
|
-
if (focusedElement !== document.body) return;
|
|
93
|
-
for (const mutation of mutations) {
|
|
94
|
-
if (mutation.removedNodes.length > 0) focus(container);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
98
|
-
document.addEventListener("focusin", handleFocusIn2);
|
|
99
|
-
document.addEventListener("focusout", handleFocusOut2);
|
|
100
|
-
const mutationObserver = new MutationObserver(handleMutations2);
|
|
101
|
-
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
102
|
-
return () => {
|
|
103
|
-
document.removeEventListener("focusin", handleFocusIn2);
|
|
104
|
-
document.removeEventListener("focusout", handleFocusOut2);
|
|
105
|
-
mutationObserver.disconnect();
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}, [trapped, container, focusScope.paused]);
|
|
109
|
-
React2.useEffect(() => {
|
|
110
|
-
if (container) {
|
|
111
|
-
focusScopesStack.add(focusScope);
|
|
112
|
-
const previouslyFocusedElement = document.activeElement;
|
|
113
|
-
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
114
|
-
if (!hasFocusedCandidate) {
|
|
115
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
116
|
-
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
117
|
-
container.dispatchEvent(mountEvent);
|
|
118
|
-
if (!mountEvent.defaultPrevented) {
|
|
119
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
120
|
-
if (document.activeElement === previouslyFocusedElement) {
|
|
121
|
-
focus(container);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return () => {
|
|
126
|
-
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
127
|
-
setTimeout(() => {
|
|
128
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
129
|
-
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
130
|
-
container.dispatchEvent(unmountEvent);
|
|
131
|
-
if (!unmountEvent.defaultPrevented) {
|
|
132
|
-
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
133
|
-
}
|
|
134
|
-
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
135
|
-
focusScopesStack.remove(focusScope);
|
|
136
|
-
}, 0);
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
140
|
-
const handleKeyDown = React2.useCallback(
|
|
141
|
-
(event) => {
|
|
142
|
-
if (!loop && !trapped) return;
|
|
143
|
-
if (focusScope.paused) return;
|
|
144
|
-
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
145
|
-
const focusedElement = document.activeElement;
|
|
146
|
-
if (isTabKey && focusedElement) {
|
|
147
|
-
const container2 = event.currentTarget;
|
|
148
|
-
const [first, last] = getTabbableEdges(container2);
|
|
149
|
-
const hasTabbableElementsInside = first && last;
|
|
150
|
-
if (!hasTabbableElementsInside) {
|
|
151
|
-
if (focusedElement === container2) event.preventDefault();
|
|
152
|
-
} else {
|
|
153
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
154
|
-
event.preventDefault();
|
|
155
|
-
if (loop) focus(first, { select: true });
|
|
156
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
157
|
-
event.preventDefault();
|
|
158
|
-
if (loop) focus(last, { select: true });
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
[loop, trapped, focusScope.paused]
|
|
164
|
-
);
|
|
165
|
-
return (0, import_jsx_runtime.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
166
|
-
});
|
|
167
|
-
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
168
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
169
|
-
const previouslyFocusedElement = document.activeElement;
|
|
170
|
-
for (const candidate of candidates) {
|
|
171
|
-
focus(candidate, { select });
|
|
172
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
function getTabbableEdges(container) {
|
|
176
|
-
const candidates = getTabbableCandidates(container);
|
|
177
|
-
const first = findVisible(candidates, container);
|
|
178
|
-
const last = findVisible(candidates.reverse(), container);
|
|
179
|
-
return [first, last];
|
|
180
|
-
}
|
|
181
|
-
function getTabbableCandidates(container) {
|
|
182
|
-
const nodes = [];
|
|
183
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
184
|
-
acceptNode: (node) => {
|
|
185
|
-
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
186
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
187
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
191
|
-
return nodes;
|
|
192
|
-
}
|
|
193
|
-
function findVisible(elements, container) {
|
|
194
|
-
for (const element of elements) {
|
|
195
|
-
if (!isHidden(element, { upTo: container })) return element;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
function isHidden(node, { upTo }) {
|
|
199
|
-
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
200
|
-
while (node) {
|
|
201
|
-
if (upTo !== void 0 && node === upTo) return false;
|
|
202
|
-
if (getComputedStyle(node).display === "none") return true;
|
|
203
|
-
node = node.parentElement;
|
|
204
|
-
}
|
|
205
|
-
return false;
|
|
206
|
-
}
|
|
207
|
-
function isSelectableInput(element) {
|
|
208
|
-
return element instanceof HTMLInputElement && "select" in element;
|
|
209
|
-
}
|
|
210
|
-
function focus(element, { select = false } = {}) {
|
|
211
|
-
if (element && element.focus) {
|
|
212
|
-
const previouslyFocusedElement = document.activeElement;
|
|
213
|
-
element.focus({ preventScroll: true });
|
|
214
|
-
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
215
|
-
element.select();
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
var focusScopesStack = createFocusScopesStack();
|
|
219
|
-
function createFocusScopesStack() {
|
|
220
|
-
let stack = [];
|
|
221
|
-
return {
|
|
222
|
-
add(focusScope) {
|
|
223
|
-
const activeFocusScope = stack[0];
|
|
224
|
-
if (focusScope !== activeFocusScope) {
|
|
225
|
-
activeFocusScope == null ? void 0 : activeFocusScope.pause();
|
|
226
|
-
}
|
|
227
|
-
stack = arrayRemove(stack, focusScope);
|
|
228
|
-
stack.unshift(focusScope);
|
|
229
|
-
},
|
|
230
|
-
remove(focusScope) {
|
|
231
|
-
var _a;
|
|
232
|
-
stack = arrayRemove(stack, focusScope);
|
|
233
|
-
(_a = stack[0]) == null ? void 0 : _a.resume();
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function arrayRemove(array, item) {
|
|
238
|
-
const updatedArray = [...array];
|
|
239
|
-
const index = updatedArray.indexOf(item);
|
|
240
|
-
if (index !== -1) {
|
|
241
|
-
updatedArray.splice(index, 1);
|
|
242
|
-
}
|
|
243
|
-
return updatedArray;
|
|
244
|
-
}
|
|
245
|
-
function removeLinks(items) {
|
|
246
|
-
return items.filter((item) => item.tagName !== "A");
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// ../../node_modules/aria-hidden/dist/es2015/index.js
|
|
250
|
-
var getDefaultParent = function(originalTarget) {
|
|
251
|
-
if (typeof document === "undefined") {
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
255
|
-
return sampleTarget.ownerDocument.body;
|
|
256
|
-
};
|
|
257
|
-
var counterMap = /* @__PURE__ */ new WeakMap();
|
|
258
|
-
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
259
|
-
var markerMap = {};
|
|
260
|
-
var lockCount = 0;
|
|
261
|
-
var unwrapHost = function(node) {
|
|
262
|
-
return node && (node.host || unwrapHost(node.parentNode));
|
|
263
|
-
};
|
|
264
|
-
var correctTargets = function(parent, targets) {
|
|
265
|
-
return targets.map(function(target) {
|
|
266
|
-
if (parent.contains(target)) {
|
|
267
|
-
return target;
|
|
268
|
-
}
|
|
269
|
-
var correctedTarget = unwrapHost(target);
|
|
270
|
-
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
271
|
-
return correctedTarget;
|
|
272
|
-
}
|
|
273
|
-
console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
|
|
274
|
-
return null;
|
|
275
|
-
}).filter(function(x) {
|
|
276
|
-
return Boolean(x);
|
|
277
|
-
});
|
|
278
|
-
};
|
|
279
|
-
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
280
|
-
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
281
|
-
if (!markerMap[markerName]) {
|
|
282
|
-
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
283
|
-
}
|
|
284
|
-
var markerCounter = markerMap[markerName];
|
|
285
|
-
var hiddenNodes = [];
|
|
286
|
-
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
287
|
-
var elementsToStop = new Set(targets);
|
|
288
|
-
var keep = function(el) {
|
|
289
|
-
if (!el || elementsToKeep.has(el)) {
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
elementsToKeep.add(el);
|
|
293
|
-
keep(el.parentNode);
|
|
294
|
-
};
|
|
295
|
-
targets.forEach(keep);
|
|
296
|
-
var deep = function(parent) {
|
|
297
|
-
if (!parent || elementsToStop.has(parent)) {
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
Array.prototype.forEach.call(parent.children, function(node) {
|
|
301
|
-
if (elementsToKeep.has(node)) {
|
|
302
|
-
deep(node);
|
|
303
|
-
} else {
|
|
304
|
-
try {
|
|
305
|
-
var attr = node.getAttribute(controlAttribute);
|
|
306
|
-
var alreadyHidden = attr !== null && attr !== "false";
|
|
307
|
-
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
308
|
-
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
309
|
-
counterMap.set(node, counterValue);
|
|
310
|
-
markerCounter.set(node, markerValue);
|
|
311
|
-
hiddenNodes.push(node);
|
|
312
|
-
if (counterValue === 1 && alreadyHidden) {
|
|
313
|
-
uncontrolledNodes.set(node, true);
|
|
314
|
-
}
|
|
315
|
-
if (markerValue === 1) {
|
|
316
|
-
node.setAttribute(markerName, "true");
|
|
317
|
-
}
|
|
318
|
-
if (!alreadyHidden) {
|
|
319
|
-
node.setAttribute(controlAttribute, "true");
|
|
320
|
-
}
|
|
321
|
-
} catch (e) {
|
|
322
|
-
console.error("aria-hidden: cannot operate on ", node, e);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
};
|
|
327
|
-
deep(parentNode);
|
|
328
|
-
elementsToKeep.clear();
|
|
329
|
-
lockCount++;
|
|
330
|
-
return function() {
|
|
331
|
-
hiddenNodes.forEach(function(node) {
|
|
332
|
-
var counterValue = counterMap.get(node) - 1;
|
|
333
|
-
var markerValue = markerCounter.get(node) - 1;
|
|
334
|
-
counterMap.set(node, counterValue);
|
|
335
|
-
markerCounter.set(node, markerValue);
|
|
336
|
-
if (!counterValue) {
|
|
337
|
-
if (!uncontrolledNodes.has(node)) {
|
|
338
|
-
node.removeAttribute(controlAttribute);
|
|
339
|
-
}
|
|
340
|
-
uncontrolledNodes.delete(node);
|
|
341
|
-
}
|
|
342
|
-
if (!markerValue) {
|
|
343
|
-
node.removeAttribute(markerName);
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
lockCount--;
|
|
347
|
-
if (!lockCount) {
|
|
348
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
349
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
350
|
-
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
351
|
-
markerMap = {};
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
};
|
|
355
|
-
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
356
|
-
if (markerName === void 0) {
|
|
357
|
-
markerName = "data-aria-hidden";
|
|
358
|
-
}
|
|
359
|
-
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
360
|
-
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
361
|
-
if (!activeParentNode) {
|
|
362
|
-
return function() {
|
|
363
|
-
return null;
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
367
|
-
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
// ../../node_modules/tslib/tslib.es6.mjs
|
|
371
|
-
var __assign = function() {
|
|
372
|
-
__assign = Object.assign || function __assign2(t) {
|
|
373
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
374
|
-
s = arguments[i];
|
|
375
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
376
|
-
}
|
|
377
|
-
return t;
|
|
378
|
-
};
|
|
379
|
-
return __assign.apply(this, arguments);
|
|
380
|
-
};
|
|
381
|
-
function __rest(s, e) {
|
|
382
|
-
var t = {};
|
|
383
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
384
|
-
t[p] = s[p];
|
|
385
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
386
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
387
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
388
|
-
t[p[i]] = s[p[i]];
|
|
389
|
-
}
|
|
390
|
-
return t;
|
|
391
|
-
}
|
|
392
|
-
function __spreadArray(to, from, pack) {
|
|
393
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
394
|
-
if (ar || !(i in from)) {
|
|
395
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
396
|
-
ar[i] = from[i];
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
403
|
-
var React11 = __toESM(require_react());
|
|
404
|
-
|
|
405
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
406
|
-
var React7 = __toESM(require_react());
|
|
407
|
-
|
|
408
|
-
// ../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
409
|
-
var zeroRightClassName = "right-scroll-bar-position";
|
|
410
|
-
var fullWidthClassName = "width-before-scroll-bar";
|
|
411
|
-
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
412
|
-
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
413
|
-
|
|
414
|
-
// ../../node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
415
|
-
function assignRef(ref, value) {
|
|
416
|
-
if (typeof ref === "function") {
|
|
417
|
-
ref(value);
|
|
418
|
-
} else if (ref) {
|
|
419
|
-
ref.current = value;
|
|
420
|
-
}
|
|
421
|
-
return ref;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// ../../node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
425
|
-
var import_react = __toESM(require_react());
|
|
426
|
-
function useCallbackRef2(initialValue, callback) {
|
|
427
|
-
var ref = (0, import_react.useState)(function() {
|
|
428
|
-
return {
|
|
429
|
-
// value
|
|
430
|
-
value: initialValue,
|
|
431
|
-
// last callback
|
|
432
|
-
callback,
|
|
433
|
-
// "memoized" public interface
|
|
434
|
-
facade: {
|
|
435
|
-
get current() {
|
|
436
|
-
return ref.value;
|
|
437
|
-
},
|
|
438
|
-
set current(value) {
|
|
439
|
-
var last = ref.value;
|
|
440
|
-
if (last !== value) {
|
|
441
|
-
ref.value = value;
|
|
442
|
-
ref.callback(value, last);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
})[0];
|
|
448
|
-
ref.callback = callback;
|
|
449
|
-
return ref.facade;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
// ../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
453
|
-
var React3 = __toESM(require_react());
|
|
454
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React3.useLayoutEffect : React3.useEffect;
|
|
455
|
-
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
456
|
-
function useMergeRefs(refs, defaultValue) {
|
|
457
|
-
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
458
|
-
return refs.forEach(function(ref) {
|
|
459
|
-
return assignRef(ref, newValue);
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
|
-
useIsomorphicLayoutEffect(function() {
|
|
463
|
-
var oldValue = currentValues.get(callbackRef);
|
|
464
|
-
if (oldValue) {
|
|
465
|
-
var prevRefs_1 = new Set(oldValue);
|
|
466
|
-
var nextRefs_1 = new Set(refs);
|
|
467
|
-
var current_1 = callbackRef.current;
|
|
468
|
-
prevRefs_1.forEach(function(ref) {
|
|
469
|
-
if (!nextRefs_1.has(ref)) {
|
|
470
|
-
assignRef(ref, null);
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
nextRefs_1.forEach(function(ref) {
|
|
474
|
-
if (!prevRefs_1.has(ref)) {
|
|
475
|
-
assignRef(ref, current_1);
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
currentValues.set(callbackRef, refs);
|
|
480
|
-
}, [refs]);
|
|
481
|
-
return callbackRef;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// ../../node_modules/use-sidecar/dist/es2015/hoc.js
|
|
485
|
-
var React4 = __toESM(require_react());
|
|
486
|
-
|
|
487
|
-
// ../../node_modules/use-sidecar/dist/es2015/hook.js
|
|
488
|
-
var import_react2 = __toESM(require_react());
|
|
489
|
-
|
|
490
|
-
// ../../node_modules/use-sidecar/dist/es2015/medium.js
|
|
491
|
-
function ItoI(a) {
|
|
492
|
-
return a;
|
|
493
|
-
}
|
|
494
|
-
function innerCreateMedium(defaults, middleware) {
|
|
495
|
-
if (middleware === void 0) {
|
|
496
|
-
middleware = ItoI;
|
|
497
|
-
}
|
|
498
|
-
var buffer = [];
|
|
499
|
-
var assigned = false;
|
|
500
|
-
var medium = {
|
|
501
|
-
read: function() {
|
|
502
|
-
if (assigned) {
|
|
503
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
504
|
-
}
|
|
505
|
-
if (buffer.length) {
|
|
506
|
-
return buffer[buffer.length - 1];
|
|
507
|
-
}
|
|
508
|
-
return defaults;
|
|
509
|
-
},
|
|
510
|
-
useMedium: function(data) {
|
|
511
|
-
var item = middleware(data, assigned);
|
|
512
|
-
buffer.push(item);
|
|
513
|
-
return function() {
|
|
514
|
-
buffer = buffer.filter(function(x) {
|
|
515
|
-
return x !== item;
|
|
516
|
-
});
|
|
517
|
-
};
|
|
518
|
-
},
|
|
519
|
-
assignSyncMedium: function(cb) {
|
|
520
|
-
assigned = true;
|
|
521
|
-
while (buffer.length) {
|
|
522
|
-
var cbs = buffer;
|
|
523
|
-
buffer = [];
|
|
524
|
-
cbs.forEach(cb);
|
|
525
|
-
}
|
|
526
|
-
buffer = {
|
|
527
|
-
push: function(x) {
|
|
528
|
-
return cb(x);
|
|
529
|
-
},
|
|
530
|
-
filter: function() {
|
|
531
|
-
return buffer;
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
},
|
|
535
|
-
assignMedium: function(cb) {
|
|
536
|
-
assigned = true;
|
|
537
|
-
var pendingQueue = [];
|
|
538
|
-
if (buffer.length) {
|
|
539
|
-
var cbs = buffer;
|
|
540
|
-
buffer = [];
|
|
541
|
-
cbs.forEach(cb);
|
|
542
|
-
pendingQueue = buffer;
|
|
543
|
-
}
|
|
544
|
-
var executeQueue = function() {
|
|
545
|
-
var cbs2 = pendingQueue;
|
|
546
|
-
pendingQueue = [];
|
|
547
|
-
cbs2.forEach(cb);
|
|
548
|
-
};
|
|
549
|
-
var cycle = function() {
|
|
550
|
-
return Promise.resolve().then(executeQueue);
|
|
551
|
-
};
|
|
552
|
-
cycle();
|
|
553
|
-
buffer = {
|
|
554
|
-
push: function(x) {
|
|
555
|
-
pendingQueue.push(x);
|
|
556
|
-
cycle();
|
|
557
|
-
},
|
|
558
|
-
filter: function(filter) {
|
|
559
|
-
pendingQueue = pendingQueue.filter(filter);
|
|
560
|
-
return buffer;
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
|
-
return medium;
|
|
566
|
-
}
|
|
567
|
-
function createSidecarMedium(options) {
|
|
568
|
-
if (options === void 0) {
|
|
569
|
-
options = {};
|
|
570
|
-
}
|
|
571
|
-
var medium = innerCreateMedium(null);
|
|
572
|
-
medium.options = __assign({ async: true, ssr: false }, options);
|
|
573
|
-
return medium;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
// ../../node_modules/use-sidecar/dist/es2015/renderProp.js
|
|
577
|
-
var React5 = __toESM(require_react());
|
|
578
|
-
var import_react3 = __toESM(require_react());
|
|
579
|
-
|
|
580
|
-
// ../../node_modules/use-sidecar/dist/es2015/exports.js
|
|
581
|
-
var React6 = __toESM(require_react());
|
|
582
|
-
var SideCar = function(_a) {
|
|
583
|
-
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
584
|
-
if (!sideCar) {
|
|
585
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
586
|
-
}
|
|
587
|
-
var Target = sideCar.read();
|
|
588
|
-
if (!Target) {
|
|
589
|
-
throw new Error("Sidecar medium not found");
|
|
590
|
-
}
|
|
591
|
-
return React6.createElement(Target, __assign({}, rest));
|
|
592
|
-
};
|
|
593
|
-
SideCar.isSideCarExport = true;
|
|
594
|
-
function exportSidecar(medium, exported) {
|
|
595
|
-
medium.useMedium(exported);
|
|
596
|
-
return SideCar;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
600
|
-
var effectCar = createSidecarMedium();
|
|
601
|
-
|
|
602
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
603
|
-
var nothing = function() {
|
|
604
|
-
return;
|
|
605
|
-
};
|
|
606
|
-
var RemoveScroll = React7.forwardRef(function(props, parentRef) {
|
|
607
|
-
var ref = React7.useRef(null);
|
|
608
|
-
var _a = React7.useState({
|
|
609
|
-
onScrollCapture: nothing,
|
|
610
|
-
onWheelCapture: nothing,
|
|
611
|
-
onTouchMoveCapture: nothing
|
|
612
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
613
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
614
|
-
var SideCar2 = sideCar;
|
|
615
|
-
var containerRef = useMergeRefs([ref, parentRef]);
|
|
616
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
617
|
-
return React7.createElement(
|
|
618
|
-
React7.Fragment,
|
|
619
|
-
null,
|
|
620
|
-
enabled && React7.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
621
|
-
forwardProps ? React7.cloneElement(React7.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React7.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
622
|
-
);
|
|
623
|
-
});
|
|
624
|
-
RemoveScroll.defaultProps = {
|
|
625
|
-
enabled: true,
|
|
626
|
-
removeScrollBar: true,
|
|
627
|
-
inert: false
|
|
628
|
-
};
|
|
629
|
-
RemoveScroll.classNames = {
|
|
630
|
-
fullWidth: fullWidthClassName,
|
|
631
|
-
zeroRight: zeroRightClassName
|
|
632
|
-
};
|
|
633
|
-
|
|
634
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
635
|
-
var React10 = __toESM(require_react());
|
|
636
|
-
|
|
637
|
-
// ../../node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
638
|
-
var React9 = __toESM(require_react());
|
|
639
|
-
|
|
640
|
-
// ../../node_modules/react-style-singleton/dist/es2015/hook.js
|
|
641
|
-
var React8 = __toESM(require_react());
|
|
642
|
-
|
|
643
|
-
// ../../node_modules/get-nonce/dist/es2015/index.js
|
|
644
|
-
var currentNonce;
|
|
645
|
-
var getNonce = function() {
|
|
646
|
-
if (currentNonce) {
|
|
647
|
-
return currentNonce;
|
|
648
|
-
}
|
|
649
|
-
if (typeof __webpack_nonce__ !== "undefined") {
|
|
650
|
-
return __webpack_nonce__;
|
|
651
|
-
}
|
|
652
|
-
return void 0;
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
// ../../node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
656
|
-
function makeStyleTag() {
|
|
657
|
-
if (!document)
|
|
658
|
-
return null;
|
|
659
|
-
var tag = document.createElement("style");
|
|
660
|
-
tag.type = "text/css";
|
|
661
|
-
var nonce = getNonce();
|
|
662
|
-
if (nonce) {
|
|
663
|
-
tag.setAttribute("nonce", nonce);
|
|
664
|
-
}
|
|
665
|
-
return tag;
|
|
666
|
-
}
|
|
667
|
-
function injectStyles(tag, css) {
|
|
668
|
-
if (tag.styleSheet) {
|
|
669
|
-
tag.styleSheet.cssText = css;
|
|
670
|
-
} else {
|
|
671
|
-
tag.appendChild(document.createTextNode(css));
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
function insertStyleTag(tag) {
|
|
675
|
-
var head = document.head || document.getElementsByTagName("head")[0];
|
|
676
|
-
head.appendChild(tag);
|
|
677
|
-
}
|
|
678
|
-
var stylesheetSingleton = function() {
|
|
679
|
-
var counter = 0;
|
|
680
|
-
var stylesheet = null;
|
|
681
|
-
return {
|
|
682
|
-
add: function(style) {
|
|
683
|
-
if (counter == 0) {
|
|
684
|
-
if (stylesheet = makeStyleTag()) {
|
|
685
|
-
injectStyles(stylesheet, style);
|
|
686
|
-
insertStyleTag(stylesheet);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
counter++;
|
|
690
|
-
},
|
|
691
|
-
remove: function() {
|
|
692
|
-
counter--;
|
|
693
|
-
if (!counter && stylesheet) {
|
|
694
|
-
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
695
|
-
stylesheet = null;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
// ../../node_modules/react-style-singleton/dist/es2015/hook.js
|
|
702
|
-
var styleHookSingleton = function() {
|
|
703
|
-
var sheet = stylesheetSingleton();
|
|
704
|
-
return function(styles, isDynamic) {
|
|
705
|
-
React8.useEffect(function() {
|
|
706
|
-
sheet.add(styles);
|
|
707
|
-
return function() {
|
|
708
|
-
sheet.remove();
|
|
709
|
-
};
|
|
710
|
-
}, [styles && isDynamic]);
|
|
711
|
-
};
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
// ../../node_modules/react-style-singleton/dist/es2015/component.js
|
|
715
|
-
var styleSingleton = function() {
|
|
716
|
-
var useStyle = styleHookSingleton();
|
|
717
|
-
var Sheet = function(_a) {
|
|
718
|
-
var styles = _a.styles, dynamic = _a.dynamic;
|
|
719
|
-
useStyle(styles, dynamic);
|
|
720
|
-
return null;
|
|
721
|
-
};
|
|
722
|
-
return Sheet;
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
// ../../node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
726
|
-
var zeroGap = {
|
|
727
|
-
left: 0,
|
|
728
|
-
top: 0,
|
|
729
|
-
right: 0,
|
|
730
|
-
gap: 0
|
|
731
|
-
};
|
|
732
|
-
var parse = function(x) {
|
|
733
|
-
return parseInt(x || "", 10) || 0;
|
|
734
|
-
};
|
|
735
|
-
var getOffset = function(gapMode) {
|
|
736
|
-
var cs = window.getComputedStyle(document.body);
|
|
737
|
-
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
738
|
-
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
739
|
-
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
740
|
-
return [parse(left), parse(top), parse(right)];
|
|
741
|
-
};
|
|
742
|
-
var getGapWidth = function(gapMode) {
|
|
743
|
-
if (gapMode === void 0) {
|
|
744
|
-
gapMode = "margin";
|
|
745
|
-
}
|
|
746
|
-
if (typeof window === "undefined") {
|
|
747
|
-
return zeroGap;
|
|
748
|
-
}
|
|
749
|
-
var offsets = getOffset(gapMode);
|
|
750
|
-
var documentWidth = document.documentElement.clientWidth;
|
|
751
|
-
var windowWidth = window.innerWidth;
|
|
752
|
-
return {
|
|
753
|
-
left: offsets[0],
|
|
754
|
-
top: offsets[1],
|
|
755
|
-
right: offsets[2],
|
|
756
|
-
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
|
-
|
|
760
|
-
// ../../node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
761
|
-
var Style = styleSingleton();
|
|
762
|
-
var lockAttribute = "data-scroll-locked";
|
|
763
|
-
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
764
|
-
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
|
|
765
|
-
if (gapMode === void 0) {
|
|
766
|
-
gapMode = "margin";
|
|
767
|
-
}
|
|
768
|
-
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
|
|
769
|
-
allowRelative && "position: relative ".concat(important, ";"),
|
|
770
|
-
gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
|
|
771
|
-
gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
|
|
772
|
-
].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
773
|
-
};
|
|
774
|
-
var getCurrentUseCounter = function() {
|
|
775
|
-
var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
|
|
776
|
-
return isFinite(counter) ? counter : 0;
|
|
777
|
-
};
|
|
778
|
-
var useLockAttribute = function() {
|
|
779
|
-
React9.useEffect(function() {
|
|
780
|
-
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
781
|
-
return function() {
|
|
782
|
-
var newCounter = getCurrentUseCounter() - 1;
|
|
783
|
-
if (newCounter <= 0) {
|
|
784
|
-
document.body.removeAttribute(lockAttribute);
|
|
785
|
-
} else {
|
|
786
|
-
document.body.setAttribute(lockAttribute, newCounter.toString());
|
|
787
|
-
}
|
|
788
|
-
};
|
|
789
|
-
}, []);
|
|
790
|
-
};
|
|
791
|
-
var RemoveScrollBar = function(_a) {
|
|
792
|
-
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
793
|
-
useLockAttribute();
|
|
794
|
-
var gap = React9.useMemo(function() {
|
|
795
|
-
return getGapWidth(gapMode);
|
|
796
|
-
}, [gapMode]);
|
|
797
|
-
return React9.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
801
|
-
var passiveSupported = false;
|
|
802
|
-
if (typeof window !== "undefined") {
|
|
803
|
-
try {
|
|
804
|
-
options = Object.defineProperty({}, "passive", {
|
|
805
|
-
get: function() {
|
|
806
|
-
passiveSupported = true;
|
|
807
|
-
return true;
|
|
808
|
-
}
|
|
809
|
-
});
|
|
810
|
-
window.addEventListener("test", options, options);
|
|
811
|
-
window.removeEventListener("test", options, options);
|
|
812
|
-
} catch (err) {
|
|
813
|
-
passiveSupported = false;
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
var options;
|
|
817
|
-
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
818
|
-
|
|
819
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
820
|
-
var alwaysContainsScroll = function(node) {
|
|
821
|
-
return node.tagName === "TEXTAREA";
|
|
822
|
-
};
|
|
823
|
-
var elementCanBeScrolled = function(node, overflow) {
|
|
824
|
-
if (!(node instanceof Element)) {
|
|
825
|
-
return false;
|
|
826
|
-
}
|
|
827
|
-
var styles = window.getComputedStyle(node);
|
|
828
|
-
return (
|
|
829
|
-
// not-not-scrollable
|
|
830
|
-
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
831
|
-
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
|
|
832
|
-
);
|
|
833
|
-
};
|
|
834
|
-
var elementCouldBeVScrolled = function(node) {
|
|
835
|
-
return elementCanBeScrolled(node, "overflowY");
|
|
836
|
-
};
|
|
837
|
-
var elementCouldBeHScrolled = function(node) {
|
|
838
|
-
return elementCanBeScrolled(node, "overflowX");
|
|
839
|
-
};
|
|
840
|
-
var locationCouldBeScrolled = function(axis, node) {
|
|
841
|
-
var ownerDocument = node.ownerDocument;
|
|
842
|
-
var current = node;
|
|
843
|
-
do {
|
|
844
|
-
if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
|
|
845
|
-
current = current.host;
|
|
846
|
-
}
|
|
847
|
-
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
848
|
-
if (isScrollable) {
|
|
849
|
-
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
|
|
850
|
-
if (scrollHeight > clientHeight) {
|
|
851
|
-
return true;
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
current = current.parentNode;
|
|
855
|
-
} while (current && current !== ownerDocument.body);
|
|
856
|
-
return false;
|
|
857
|
-
};
|
|
858
|
-
var getVScrollVariables = function(_a) {
|
|
859
|
-
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
860
|
-
return [
|
|
861
|
-
scrollTop,
|
|
862
|
-
scrollHeight,
|
|
863
|
-
clientHeight
|
|
864
|
-
];
|
|
865
|
-
};
|
|
866
|
-
var getHScrollVariables = function(_a) {
|
|
867
|
-
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
868
|
-
return [
|
|
869
|
-
scrollLeft,
|
|
870
|
-
scrollWidth,
|
|
871
|
-
clientWidth
|
|
872
|
-
];
|
|
873
|
-
};
|
|
874
|
-
var elementCouldBeScrolled = function(axis, node) {
|
|
875
|
-
return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
|
|
876
|
-
};
|
|
877
|
-
var getScrollVariables = function(axis, node) {
|
|
878
|
-
return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
|
|
879
|
-
};
|
|
880
|
-
var getDirectionFactor = function(axis, direction) {
|
|
881
|
-
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
882
|
-
};
|
|
883
|
-
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
884
|
-
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
885
|
-
var delta = directionFactor * sourceDelta;
|
|
886
|
-
var target = event.target;
|
|
887
|
-
var targetInLock = endTarget.contains(target);
|
|
888
|
-
var shouldCancelScroll = false;
|
|
889
|
-
var isDeltaPositive = delta > 0;
|
|
890
|
-
var availableScroll = 0;
|
|
891
|
-
var availableScrollTop = 0;
|
|
892
|
-
do {
|
|
893
|
-
if (!target) {
|
|
894
|
-
break;
|
|
895
|
-
}
|
|
896
|
-
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
897
|
-
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
898
|
-
if (position || elementScroll) {
|
|
899
|
-
if (elementCouldBeScrolled(axis, target)) {
|
|
900
|
-
availableScroll += elementScroll;
|
|
901
|
-
availableScrollTop += position;
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
var parent_1 = target.parentNode;
|
|
905
|
-
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
906
|
-
} while (
|
|
907
|
-
// portaled content
|
|
908
|
-
!targetInLock && target !== document.body || // self content
|
|
909
|
-
targetInLock && (endTarget.contains(target) || endTarget === target)
|
|
910
|
-
);
|
|
911
|
-
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
912
|
-
shouldCancelScroll = true;
|
|
913
|
-
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
914
|
-
shouldCancelScroll = true;
|
|
915
|
-
}
|
|
916
|
-
return shouldCancelScroll;
|
|
917
|
-
};
|
|
918
|
-
|
|
919
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
920
|
-
var getTouchXY = function(event) {
|
|
921
|
-
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
922
|
-
};
|
|
923
|
-
var getDeltaXY = function(event) {
|
|
924
|
-
return [event.deltaX, event.deltaY];
|
|
925
|
-
};
|
|
926
|
-
var extractRef = function(ref) {
|
|
927
|
-
return ref && "current" in ref ? ref.current : ref;
|
|
928
|
-
};
|
|
929
|
-
var deltaCompare = function(x, y) {
|
|
930
|
-
return x[0] === y[0] && x[1] === y[1];
|
|
931
|
-
};
|
|
932
|
-
var generateStyle = function(id) {
|
|
933
|
-
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
934
|
-
};
|
|
935
|
-
var idCounter = 0;
|
|
936
|
-
var lockStack = [];
|
|
937
|
-
function RemoveScrollSideCar(props) {
|
|
938
|
-
var shouldPreventQueue = React10.useRef([]);
|
|
939
|
-
var touchStartRef = React10.useRef([0, 0]);
|
|
940
|
-
var activeAxis = React10.useRef();
|
|
941
|
-
var id = React10.useState(idCounter++)[0];
|
|
942
|
-
var Style2 = React10.useState(styleSingleton)[0];
|
|
943
|
-
var lastProps = React10.useRef(props);
|
|
944
|
-
React10.useEffect(function() {
|
|
945
|
-
lastProps.current = props;
|
|
946
|
-
}, [props]);
|
|
947
|
-
React10.useEffect(function() {
|
|
948
|
-
if (props.inert) {
|
|
949
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
950
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
951
|
-
allow_1.forEach(function(el) {
|
|
952
|
-
return el.classList.add("allow-interactivity-".concat(id));
|
|
953
|
-
});
|
|
954
|
-
return function() {
|
|
955
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
956
|
-
allow_1.forEach(function(el) {
|
|
957
|
-
return el.classList.remove("allow-interactivity-".concat(id));
|
|
958
|
-
});
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
return;
|
|
962
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
963
|
-
var shouldCancelEvent = React10.useCallback(function(event, parent) {
|
|
964
|
-
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
965
|
-
return !lastProps.current.allowPinchZoom;
|
|
966
|
-
}
|
|
967
|
-
var touch = getTouchXY(event);
|
|
968
|
-
var touchStart = touchStartRef.current;
|
|
969
|
-
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
970
|
-
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
971
|
-
var currentAxis;
|
|
972
|
-
var target = event.target;
|
|
973
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
974
|
-
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
975
|
-
return false;
|
|
976
|
-
}
|
|
977
|
-
var selection = window.getSelection();
|
|
978
|
-
var anchorNode = selection && selection.anchorNode;
|
|
979
|
-
var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
|
|
980
|
-
if (isTouchingSelection) {
|
|
981
|
-
return false;
|
|
982
|
-
}
|
|
983
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
984
|
-
if (!canBeScrolledInMainDirection) {
|
|
985
|
-
return true;
|
|
986
|
-
}
|
|
987
|
-
if (canBeScrolledInMainDirection) {
|
|
988
|
-
currentAxis = moveDirection;
|
|
989
|
-
} else {
|
|
990
|
-
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
991
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
992
|
-
}
|
|
993
|
-
if (!canBeScrolledInMainDirection) {
|
|
994
|
-
return false;
|
|
995
|
-
}
|
|
996
|
-
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
|
997
|
-
activeAxis.current = currentAxis;
|
|
998
|
-
}
|
|
999
|
-
if (!currentAxis) {
|
|
1000
|
-
return true;
|
|
1001
|
-
}
|
|
1002
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
1003
|
-
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
1004
|
-
}, []);
|
|
1005
|
-
var shouldPrevent = React10.useCallback(function(_event) {
|
|
1006
|
-
var event = _event;
|
|
1007
|
-
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
1008
|
-
return;
|
|
1009
|
-
}
|
|
1010
|
-
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
|
1011
|
-
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
1012
|
-
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
1013
|
-
})[0];
|
|
1014
|
-
if (sourceEvent && sourceEvent.should) {
|
|
1015
|
-
if (event.cancelable) {
|
|
1016
|
-
event.preventDefault();
|
|
1017
|
-
}
|
|
1018
|
-
return;
|
|
1019
|
-
}
|
|
1020
|
-
if (!sourceEvent) {
|
|
1021
|
-
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
|
|
1022
|
-
return node.contains(event.target);
|
|
1023
|
-
});
|
|
1024
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
1025
|
-
if (shouldStop) {
|
|
1026
|
-
if (event.cancelable) {
|
|
1027
|
-
event.preventDefault();
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
}, []);
|
|
1032
|
-
var shouldCancel = React10.useCallback(function(name, delta, target, should) {
|
|
1033
|
-
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
1034
|
-
shouldPreventQueue.current.push(event);
|
|
1035
|
-
setTimeout(function() {
|
|
1036
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
1037
|
-
return e !== event;
|
|
1038
|
-
});
|
|
1039
|
-
}, 1);
|
|
1040
|
-
}, []);
|
|
1041
|
-
var scrollTouchStart = React10.useCallback(function(event) {
|
|
1042
|
-
touchStartRef.current = getTouchXY(event);
|
|
1043
|
-
activeAxis.current = void 0;
|
|
1044
|
-
}, []);
|
|
1045
|
-
var scrollWheel = React10.useCallback(function(event) {
|
|
1046
|
-
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1047
|
-
}, []);
|
|
1048
|
-
var scrollTouchMove = React10.useCallback(function(event) {
|
|
1049
|
-
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1050
|
-
}, []);
|
|
1051
|
-
React10.useEffect(function() {
|
|
1052
|
-
lockStack.push(Style2);
|
|
1053
|
-
props.setCallbacks({
|
|
1054
|
-
onScrollCapture: scrollWheel,
|
|
1055
|
-
onWheelCapture: scrollWheel,
|
|
1056
|
-
onTouchMoveCapture: scrollTouchMove
|
|
1057
|
-
});
|
|
1058
|
-
document.addEventListener("wheel", shouldPrevent, nonPassive);
|
|
1059
|
-
document.addEventListener("touchmove", shouldPrevent, nonPassive);
|
|
1060
|
-
document.addEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
1061
|
-
return function() {
|
|
1062
|
-
lockStack = lockStack.filter(function(inst) {
|
|
1063
|
-
return inst !== Style2;
|
|
1064
|
-
});
|
|
1065
|
-
document.removeEventListener("wheel", shouldPrevent, nonPassive);
|
|
1066
|
-
document.removeEventListener("touchmove", shouldPrevent, nonPassive);
|
|
1067
|
-
document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
1068
|
-
};
|
|
1069
|
-
}, []);
|
|
1070
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
1071
|
-
return React10.createElement(
|
|
1072
|
-
React10.Fragment,
|
|
1073
|
-
null,
|
|
1074
|
-
inert ? React10.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
1075
|
-
removeScrollBar ? React10.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
1076
|
-
);
|
|
1077
|
-
}
|
|
1078
|
-
function getOutermostShadowParent(node) {
|
|
1079
|
-
var shadowParent = null;
|
|
1080
|
-
while (node !== null) {
|
|
1081
|
-
if (node instanceof ShadowRoot) {
|
|
1082
|
-
shadowParent = node.host;
|
|
1083
|
-
node = node.host;
|
|
1084
|
-
}
|
|
1085
|
-
node = node.parentNode;
|
|
1086
|
-
}
|
|
1087
|
-
return shadowParent;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
1091
|
-
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
1092
|
-
|
|
1093
|
-
// ../../node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
1094
|
-
var ReactRemoveScroll = React11.forwardRef(function(props, ref) {
|
|
1095
|
-
return React11.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
1096
|
-
});
|
|
1097
|
-
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
1098
|
-
var Combination_default = ReactRemoveScroll;
|
|
1099
|
-
|
|
1100
|
-
export {
|
|
1101
|
-
useFocusGuards,
|
|
1102
|
-
FocusScope,
|
|
1103
|
-
hideOthers,
|
|
1104
|
-
Combination_default
|
|
1105
|
-
};
|
|
1106
|
-
//# sourceMappingURL=chunk-Z5NIFSCT.js.map
|