@pdf-viewer/react 1.11.0-beta.0 → 1.11.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RotateTool.module-03987eba.js +6 -0
- package/dist/ToolbarLayout.module-082ff242.js +3405 -0
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +2 -2
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +2 -3
- package/dist/components/layout/RPLayout.js +2 -2
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +2 -2
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -2
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +3 -3
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +2 -2
- package/dist/components/layout/toolbar/RPMenuItem.js +23 -0
- package/dist/components/layout/toolbar/RPMoreOptions.js +147 -0
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +20 -21
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +3 -3
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +2 -2
- package/dist/components/layout/toolbar/ToolbarDefault.js +6 -3
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +28 -0
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +17 -0
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +25 -0
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +6 -3
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +16 -0
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +69 -0
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +78 -0
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +20 -0
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +26 -0
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +43 -0
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +30 -0
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +32 -0
- package/dist/components/page/AnnotationLayer.js +2 -2
- package/dist/components/page/CanvasLayer.js +2 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +2 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +2 -2
- package/dist/components/page/TextLayer.js +2 -2
- package/dist/components/ui/Checkbox.js +13 -14
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +329 -687
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/floating-ui.react-dom-88a86594.js +1447 -0
- package/dist/index-48ca3f30.js +307 -0
- package/dist/index-4ba3ab9a.js +1877 -0
- package/dist/main.js +29 -23
- package/dist/types/components/layout/toolbar/RPMenuItem.d.ts +11 -0
- package/dist/types/components/layout/toolbar/RPMoreOptions.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/DocumentPropertiesTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateClockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/RotateCounterclockwiseTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/DocumentProperties.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileDownloadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FileUploadTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/FullScreenTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/MostPageTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/PrintTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/RotateTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ScrollModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/SelectionModeTool.d.ts +3 -0
- package/dist/types/components/layout/toolbar/tools/more-options/ViewModeTool.d.ts +3 -0
- package/dist/types/contexts/SelectionModeContext.d.ts +2 -2
- package/dist/types/main.d.ts +4 -1
- package/dist/types/utils/calculatePage.d.ts +7 -0
- package/dist/types/utils/elementPagePosition.d.ts +17 -0
- package/dist/types/utils/getWordPositionInPage.d.ts +3 -6
- package/dist/types/utils/hooks/useVirtualReactWindow.d.ts +8 -0
- package/dist/types/utils/types.d.ts +85 -7
- package/dist/utils/calculatePage.js +12 -5
- package/dist/utils/elementPagePosition.js +11 -0
- package/dist/utils/getScrollDistance.js +2 -2
- package/dist/utils/getWordPositionInPage.js +20 -21
- package/dist/utils/getZoomLevel.js +7 -7
- package/dist/utils/hooks/useFileDownload.js +2 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +2 -2
- package/dist/utils/hooks/usePresentPage.js +2 -2
- package/dist/utils/hooks/usePrint.js +2 -2
- package/dist/utils/hooks/useScrollToPage.js +4 -3
- package/dist/utils/hooks/useSearch.js +2 -2
- package/dist/utils/hooks/useThumbnail.js +2 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +4 -3
- package/package.json +1 -1
- package/dist/ToolbarLayout.module-310f3470.js +0 -3368
- package/dist/floating-ui.react-dom-bbd2b1a7.js +0 -1330
- package/dist/index-54351a14.js +0 -1995
- package/dist/index-94df4e25.js +0 -139
- package/dist/index-e620205e.js +0 -172
package/dist/index-54351a14.js
DELETED
|
@@ -1,1995 +0,0 @@
|
|
|
1
|
-
import * as a from "react";
|
|
2
|
-
import z, { useState as Kn } from "react";
|
|
3
|
-
import { u as L, S as Ge, P as x, c as R, d as yt, a as Pe, b as Et } from "./index-e620205e.js";
|
|
4
|
-
import { c as pe, d as V, a as Un, b as Ke, u as Ct } from "./index-94df4e25.js";
|
|
5
|
-
import { jsx as p } from "react/jsx-runtime";
|
|
6
|
-
import { u as $n, a as Wn, b as Hn, o as Yn, s as Vn, l as Xn, f as jn, c as zn, d as Zn, h as qn, e as Ue } from "./floating-ui.react-dom-bbd2b1a7.js";
|
|
7
|
-
import Qn from "react-dom";
|
|
8
|
-
function bt(e) {
|
|
9
|
-
const t = e + "CollectionProvider", [n, r] = pe(t), [o, c] = n(
|
|
10
|
-
t,
|
|
11
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
12
|
-
), s = (y) => {
|
|
13
|
-
const { scope: h, children: l } = y, w = z.useRef(null), g = z.useRef(/* @__PURE__ */ new Map()).current;
|
|
14
|
-
return /* @__PURE__ */ p(o, { scope: h, itemMap: g, collectionRef: w, children: l });
|
|
15
|
-
};
|
|
16
|
-
s.displayName = t;
|
|
17
|
-
const i = e + "CollectionSlot", m = z.forwardRef(
|
|
18
|
-
(y, h) => {
|
|
19
|
-
const { scope: l, children: w } = y, g = c(i, l), E = L(h, g.collectionRef);
|
|
20
|
-
return /* @__PURE__ */ p(Ge, { ref: E, children: w });
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
m.displayName = i;
|
|
24
|
-
const d = e + "CollectionItemSlot", f = "data-radix-collection-item", u = z.forwardRef(
|
|
25
|
-
(y, h) => {
|
|
26
|
-
const { scope: l, children: w, ...g } = y, E = z.useRef(null), b = L(h, E), S = c(d, l);
|
|
27
|
-
return z.useEffect(() => (S.itemMap.set(E, { ref: E, ...g }), () => void S.itemMap.delete(E))), /* @__PURE__ */ p(Ge, { [f]: "", ref: b, children: w });
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
u.displayName = d;
|
|
31
|
-
function v(y) {
|
|
32
|
-
const h = c(e + "CollectionConsumer", y);
|
|
33
|
-
return z.useCallback(() => {
|
|
34
|
-
const w = h.collectionRef.current;
|
|
35
|
-
if (!w)
|
|
36
|
-
return [];
|
|
37
|
-
const g = Array.from(w.querySelectorAll(`[${f}]`));
|
|
38
|
-
return Array.from(h.itemMap.values()).sort(
|
|
39
|
-
(S, P) => g.indexOf(S.ref.current) - g.indexOf(P.ref.current)
|
|
40
|
-
);
|
|
41
|
-
}, [h.collectionRef, h.itemMap]);
|
|
42
|
-
}
|
|
43
|
-
return [
|
|
44
|
-
{ Provider: s, Slot: m, ItemSlot: u },
|
|
45
|
-
v,
|
|
46
|
-
r
|
|
47
|
-
];
|
|
48
|
-
}
|
|
49
|
-
var Jn = a.createContext(void 0);
|
|
50
|
-
function St(e) {
|
|
51
|
-
const t = a.useContext(Jn);
|
|
52
|
-
return e || t || "ltr";
|
|
53
|
-
}
|
|
54
|
-
var er = "DismissableLayer", $e = "dismissableLayer.update", tr = "dismissableLayer.pointerDownOutside", nr = "dismissableLayer.focusOutside", at, Mt = a.createContext({
|
|
55
|
-
layers: /* @__PURE__ */ new Set(),
|
|
56
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
57
|
-
branches: /* @__PURE__ */ new Set()
|
|
58
|
-
}), Rt = a.forwardRef(
|
|
59
|
-
(e, t) => {
|
|
60
|
-
const {
|
|
61
|
-
disableOutsidePointerEvents: n = !1,
|
|
62
|
-
onEscapeKeyDown: r,
|
|
63
|
-
onPointerDownOutside: o,
|
|
64
|
-
onFocusOutside: c,
|
|
65
|
-
onInteractOutside: s,
|
|
66
|
-
onDismiss: i,
|
|
67
|
-
...m
|
|
68
|
-
} = e, d = a.useContext(Mt), [f, u] = a.useState(null), v = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = a.useState({}), h = L(t, (M) => u(M)), l = Array.from(d.layers), [w] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), g = l.indexOf(w), E = f ? l.indexOf(f) : -1, b = d.layersWithOutsidePointerEventsDisabled.size > 0, S = E >= g, P = ar((M) => {
|
|
69
|
-
const _ = M.target, D = [...d.branches].some((O) => O.contains(_));
|
|
70
|
-
!S || D || (o == null || o(M), s == null || s(M), M.defaultPrevented || i == null || i());
|
|
71
|
-
}, v), I = cr((M) => {
|
|
72
|
-
const _ = M.target;
|
|
73
|
-
[...d.branches].some((O) => O.contains(_)) || (c == null || c(M), s == null || s(M), M.defaultPrevented || i == null || i());
|
|
74
|
-
}, v);
|
|
75
|
-
return $n((M) => {
|
|
76
|
-
E === d.layers.size - 1 && (r == null || r(M), !M.defaultPrevented && i && (M.preventDefault(), i()));
|
|
77
|
-
}, v), a.useEffect(() => {
|
|
78
|
-
if (f)
|
|
79
|
-
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (at = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), ct(), () => {
|
|
80
|
-
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = at);
|
|
81
|
-
};
|
|
82
|
-
}, [f, v, n, d]), a.useEffect(() => () => {
|
|
83
|
-
f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f), ct());
|
|
84
|
-
}, [f, d]), a.useEffect(() => {
|
|
85
|
-
const M = () => y({});
|
|
86
|
-
return document.addEventListener($e, M), () => document.removeEventListener($e, M);
|
|
87
|
-
}, []), /* @__PURE__ */ p(
|
|
88
|
-
x.div,
|
|
89
|
-
{
|
|
90
|
-
...m,
|
|
91
|
-
ref: h,
|
|
92
|
-
style: {
|
|
93
|
-
pointerEvents: b ? S ? "auto" : "none" : void 0,
|
|
94
|
-
...e.style
|
|
95
|
-
},
|
|
96
|
-
onFocusCapture: R(e.onFocusCapture, I.onFocusCapture),
|
|
97
|
-
onBlurCapture: R(e.onBlurCapture, I.onBlurCapture),
|
|
98
|
-
onPointerDownCapture: R(
|
|
99
|
-
e.onPointerDownCapture,
|
|
100
|
-
P.onPointerDownCapture
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
Rt.displayName = er;
|
|
107
|
-
var rr = "DismissableLayerBranch", or = a.forwardRef((e, t) => {
|
|
108
|
-
const n = a.useContext(Mt), r = a.useRef(null), o = L(t, r);
|
|
109
|
-
return a.useEffect(() => {
|
|
110
|
-
const c = r.current;
|
|
111
|
-
if (c)
|
|
112
|
-
return n.branches.add(c), () => {
|
|
113
|
-
n.branches.delete(c);
|
|
114
|
-
};
|
|
115
|
-
}, [n.branches]), /* @__PURE__ */ p(x.div, { ...e, ref: o });
|
|
116
|
-
});
|
|
117
|
-
or.displayName = rr;
|
|
118
|
-
function ar(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
119
|
-
const n = V(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
120
|
-
});
|
|
121
|
-
return a.useEffect(() => {
|
|
122
|
-
const c = (i) => {
|
|
123
|
-
if (i.target && !r.current) {
|
|
124
|
-
let m = function() {
|
|
125
|
-
Pt(
|
|
126
|
-
tr,
|
|
127
|
-
n,
|
|
128
|
-
d,
|
|
129
|
-
{ discrete: !0 }
|
|
130
|
-
);
|
|
131
|
-
};
|
|
132
|
-
const d = { originalEvent: i };
|
|
133
|
-
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = m, t.addEventListener("click", o.current, { once: !0 })) : m();
|
|
134
|
-
} else
|
|
135
|
-
t.removeEventListener("click", o.current);
|
|
136
|
-
r.current = !1;
|
|
137
|
-
}, s = window.setTimeout(() => {
|
|
138
|
-
t.addEventListener("pointerdown", c);
|
|
139
|
-
}, 0);
|
|
140
|
-
return () => {
|
|
141
|
-
window.clearTimeout(s), t.removeEventListener("pointerdown", c), t.removeEventListener("click", o.current);
|
|
142
|
-
};
|
|
143
|
-
}, [t, n]), {
|
|
144
|
-
// ensures we check React component tree (not just DOM tree)
|
|
145
|
-
onPointerDownCapture: () => r.current = !0
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function cr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
149
|
-
const n = V(e), r = a.useRef(!1);
|
|
150
|
-
return a.useEffect(() => {
|
|
151
|
-
const o = (c) => {
|
|
152
|
-
c.target && !r.current && Pt(nr, n, { originalEvent: c }, {
|
|
153
|
-
discrete: !1
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
157
|
-
}, [t, n]), {
|
|
158
|
-
onFocusCapture: () => r.current = !0,
|
|
159
|
-
onBlurCapture: () => r.current = !1
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
function ct() {
|
|
163
|
-
const e = new CustomEvent($e);
|
|
164
|
-
document.dispatchEvent(e);
|
|
165
|
-
}
|
|
166
|
-
function Pt(e, t, n, { discrete: r }) {
|
|
167
|
-
const o = n.originalEvent.target, c = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
168
|
-
t && o.addEventListener(e, t, { once: !0 }), r ? yt(o, c) : o.dispatchEvent(c);
|
|
169
|
-
}
|
|
170
|
-
var Te = 0;
|
|
171
|
-
function ir() {
|
|
172
|
-
a.useEffect(() => {
|
|
173
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
174
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? it()), document.body.insertAdjacentElement("beforeend", e[1] ?? it()), Te++, () => {
|
|
175
|
-
Te === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Te--;
|
|
176
|
-
};
|
|
177
|
-
}, []);
|
|
178
|
-
}
|
|
179
|
-
function it() {
|
|
180
|
-
const e = document.createElement("span");
|
|
181
|
-
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;
|
|
182
|
-
}
|
|
183
|
-
var De = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", st = { bubbles: !1, cancelable: !0 }, sr = "FocusScope", _t = a.forwardRef((e, t) => {
|
|
184
|
-
const {
|
|
185
|
-
loop: n = !1,
|
|
186
|
-
trapped: r = !1,
|
|
187
|
-
onMountAutoFocus: o,
|
|
188
|
-
onUnmountAutoFocus: c,
|
|
189
|
-
...s
|
|
190
|
-
} = e, [i, m] = a.useState(null), d = V(o), f = V(c), u = a.useRef(null), v = L(t, (l) => m(l)), y = a.useRef({
|
|
191
|
-
paused: !1,
|
|
192
|
-
pause() {
|
|
193
|
-
this.paused = !0;
|
|
194
|
-
},
|
|
195
|
-
resume() {
|
|
196
|
-
this.paused = !1;
|
|
197
|
-
}
|
|
198
|
-
}).current;
|
|
199
|
-
a.useEffect(() => {
|
|
200
|
-
if (r) {
|
|
201
|
-
let l = function(b) {
|
|
202
|
-
if (y.paused || !i)
|
|
203
|
-
return;
|
|
204
|
-
const S = b.target;
|
|
205
|
-
i.contains(S) ? u.current = S : Y(u.current, { select: !0 });
|
|
206
|
-
}, w = function(b) {
|
|
207
|
-
if (y.paused || !i)
|
|
208
|
-
return;
|
|
209
|
-
const S = b.relatedTarget;
|
|
210
|
-
S !== null && (i.contains(S) || Y(u.current, { select: !0 }));
|
|
211
|
-
}, g = function(b) {
|
|
212
|
-
if (document.activeElement === document.body)
|
|
213
|
-
for (const P of b)
|
|
214
|
-
P.removedNodes.length > 0 && Y(i);
|
|
215
|
-
};
|
|
216
|
-
document.addEventListener("focusin", l), document.addEventListener("focusout", w);
|
|
217
|
-
const E = new MutationObserver(g);
|
|
218
|
-
return i && E.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
219
|
-
document.removeEventListener("focusin", l), document.removeEventListener("focusout", w), E.disconnect();
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}, [r, i, y.paused]), a.useEffect(() => {
|
|
223
|
-
if (i) {
|
|
224
|
-
lt.add(y);
|
|
225
|
-
const l = document.activeElement;
|
|
226
|
-
if (!i.contains(l)) {
|
|
227
|
-
const g = new CustomEvent(De, st);
|
|
228
|
-
i.addEventListener(De, d), i.dispatchEvent(g), g.defaultPrevented || (ur(vr(It(i)), { select: !0 }), document.activeElement === l && Y(i));
|
|
229
|
-
}
|
|
230
|
-
return () => {
|
|
231
|
-
i.removeEventListener(De, d), setTimeout(() => {
|
|
232
|
-
const g = new CustomEvent(Ne, st);
|
|
233
|
-
i.addEventListener(Ne, f), i.dispatchEvent(g), g.defaultPrevented || Y(l ?? document.body, { select: !0 }), i.removeEventListener(Ne, f), lt.remove(y);
|
|
234
|
-
}, 0);
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
}, [i, d, f, y]);
|
|
238
|
-
const h = a.useCallback(
|
|
239
|
-
(l) => {
|
|
240
|
-
if (!n && !r || y.paused)
|
|
241
|
-
return;
|
|
242
|
-
const w = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, g = document.activeElement;
|
|
243
|
-
if (w && g) {
|
|
244
|
-
const E = l.currentTarget, [b, S] = lr(E);
|
|
245
|
-
b && S ? !l.shiftKey && g === S ? (l.preventDefault(), n && Y(b, { select: !0 })) : l.shiftKey && g === b && (l.preventDefault(), n && Y(S, { select: !0 })) : g === E && l.preventDefault();
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
[n, r, y.paused]
|
|
249
|
-
);
|
|
250
|
-
return /* @__PURE__ */ p(x.div, { tabIndex: -1, ...s, ref: v, onKeyDown: h });
|
|
251
|
-
});
|
|
252
|
-
_t.displayName = sr;
|
|
253
|
-
function ur(e, { select: t = !1 } = {}) {
|
|
254
|
-
const n = document.activeElement;
|
|
255
|
-
for (const r of e)
|
|
256
|
-
if (Y(r, { select: t }), document.activeElement !== n)
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
function lr(e) {
|
|
260
|
-
const t = It(e), n = ut(t, e), r = ut(t.reverse(), e);
|
|
261
|
-
return [n, r];
|
|
262
|
-
}
|
|
263
|
-
function It(e) {
|
|
264
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
265
|
-
acceptNode: (r) => {
|
|
266
|
-
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
267
|
-
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
for (; n.nextNode(); )
|
|
271
|
-
t.push(n.currentNode);
|
|
272
|
-
return t;
|
|
273
|
-
}
|
|
274
|
-
function ut(e, t) {
|
|
275
|
-
for (const n of e)
|
|
276
|
-
if (!dr(n, { upTo: t }))
|
|
277
|
-
return n;
|
|
278
|
-
}
|
|
279
|
-
function dr(e, { upTo: t }) {
|
|
280
|
-
if (getComputedStyle(e).visibility === "hidden")
|
|
281
|
-
return !0;
|
|
282
|
-
for (; e; ) {
|
|
283
|
-
if (t !== void 0 && e === t)
|
|
284
|
-
return !1;
|
|
285
|
-
if (getComputedStyle(e).display === "none")
|
|
286
|
-
return !0;
|
|
287
|
-
e = e.parentElement;
|
|
288
|
-
}
|
|
289
|
-
return !1;
|
|
290
|
-
}
|
|
291
|
-
function fr(e) {
|
|
292
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
293
|
-
}
|
|
294
|
-
function Y(e, { select: t = !1 } = {}) {
|
|
295
|
-
if (e && e.focus) {
|
|
296
|
-
const n = document.activeElement;
|
|
297
|
-
e.focus({ preventScroll: !0 }), e !== n && fr(e) && t && e.select();
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
var lt = pr();
|
|
301
|
-
function pr() {
|
|
302
|
-
let e = [];
|
|
303
|
-
return {
|
|
304
|
-
add(t) {
|
|
305
|
-
const n = e[0];
|
|
306
|
-
t !== n && (n == null || n.pause()), e = dt(e, t), e.unshift(t);
|
|
307
|
-
},
|
|
308
|
-
remove(t) {
|
|
309
|
-
var n;
|
|
310
|
-
e = dt(e, t), (n = e[0]) == null || n.resume();
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
function dt(e, t) {
|
|
315
|
-
const n = [...e], r = n.indexOf(t);
|
|
316
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
317
|
-
}
|
|
318
|
-
function vr(e) {
|
|
319
|
-
return e.filter((t) => t.tagName !== "A");
|
|
320
|
-
}
|
|
321
|
-
var mr = "Arrow", At = a.forwardRef((e, t) => {
|
|
322
|
-
const { children: n, width: r = 10, height: o = 5, ...c } = e;
|
|
323
|
-
return /* @__PURE__ */ p(
|
|
324
|
-
x.svg,
|
|
325
|
-
{
|
|
326
|
-
...c,
|
|
327
|
-
ref: t,
|
|
328
|
-
width: r,
|
|
329
|
-
height: o,
|
|
330
|
-
viewBox: "0 0 30 10",
|
|
331
|
-
preserveAspectRatio: "none",
|
|
332
|
-
children: e.asChild ? n : /* @__PURE__ */ p("polygon", { points: "0,0 30,0 15,10" })
|
|
333
|
-
}
|
|
334
|
-
);
|
|
335
|
-
});
|
|
336
|
-
At.displayName = mr;
|
|
337
|
-
var hr = At, Ve = "Popper", [xt, Tt] = pe(Ve), [gr, Dt] = xt(Ve), Nt = (e) => {
|
|
338
|
-
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
339
|
-
return /* @__PURE__ */ p(gr, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
340
|
-
};
|
|
341
|
-
Nt.displayName = Ve;
|
|
342
|
-
var Ot = "PopperAnchor", Ft = a.forwardRef(
|
|
343
|
-
(e, t) => {
|
|
344
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, c = Dt(Ot, n), s = a.useRef(null), i = L(t, s);
|
|
345
|
-
return a.useEffect(() => {
|
|
346
|
-
c.onAnchorChange((r == null ? void 0 : r.current) || s.current);
|
|
347
|
-
}), r ? null : /* @__PURE__ */ p(x.div, { ...o, ref: i });
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
Ft.displayName = Ot;
|
|
351
|
-
var Xe = "PopperContent", [wr, yr] = xt(Xe), Lt = a.forwardRef(
|
|
352
|
-
(e, t) => {
|
|
353
|
-
var W, ie, k, se, nt, rt;
|
|
354
|
-
const {
|
|
355
|
-
__scopePopper: n,
|
|
356
|
-
side: r = "bottom",
|
|
357
|
-
sideOffset: o = 0,
|
|
358
|
-
align: c = "center",
|
|
359
|
-
alignOffset: s = 0,
|
|
360
|
-
arrowPadding: i = 0,
|
|
361
|
-
avoidCollisions: m = !0,
|
|
362
|
-
collisionBoundary: d = [],
|
|
363
|
-
collisionPadding: f = 0,
|
|
364
|
-
sticky: u = "partial",
|
|
365
|
-
hideWhenDetached: v = !1,
|
|
366
|
-
updatePositionStrategy: y = "optimized",
|
|
367
|
-
onPlaced: h,
|
|
368
|
-
...l
|
|
369
|
-
} = e, w = Dt(Xe, n), [g, E] = a.useState(null), b = L(t, (ue) => E(ue)), [S, P] = a.useState(null), I = Un(S), M = (I == null ? void 0 : I.width) ?? 0, _ = (I == null ? void 0 : I.height) ?? 0, D = r + (c !== "center" ? "-" + c : ""), O = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, H = Array.isArray(d) ? d : [d], X = H.length > 0, $ = {
|
|
370
|
-
padding: O,
|
|
371
|
-
boundary: H.filter(Cr),
|
|
372
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
373
|
-
altBoundary: X
|
|
374
|
-
}, { refs: Q, floatingStyles: J, placement: G, isPositioned: ee, middlewareData: F } = Wn({
|
|
375
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
376
|
-
strategy: "fixed",
|
|
377
|
-
placement: D,
|
|
378
|
-
whileElementsMounted: (...ue) => Hn(...ue, {
|
|
379
|
-
animationFrame: y === "always"
|
|
380
|
-
}),
|
|
381
|
-
elements: {
|
|
382
|
-
reference: w.anchor
|
|
383
|
-
},
|
|
384
|
-
middleware: [
|
|
385
|
-
Yn({ mainAxis: o + _, alignmentAxis: s }),
|
|
386
|
-
m && Vn({
|
|
387
|
-
mainAxis: !0,
|
|
388
|
-
crossAxis: !1,
|
|
389
|
-
limiter: u === "partial" ? Xn() : void 0,
|
|
390
|
-
...$
|
|
391
|
-
}),
|
|
392
|
-
m && jn({ ...$ }),
|
|
393
|
-
zn({
|
|
394
|
-
...$,
|
|
395
|
-
apply: ({ elements: ue, rects: ot, availableWidth: Ln, availableHeight: kn }) => {
|
|
396
|
-
const { width: Bn, height: Gn } = ot.reference, ge = ue.floating.style;
|
|
397
|
-
ge.setProperty("--radix-popper-available-width", `${Ln}px`), ge.setProperty("--radix-popper-available-height", `${kn}px`), ge.setProperty("--radix-popper-anchor-width", `${Bn}px`), ge.setProperty("--radix-popper-anchor-height", `${Gn}px`);
|
|
398
|
-
}
|
|
399
|
-
}),
|
|
400
|
-
S && Zn({ element: S, padding: i }),
|
|
401
|
-
br({ arrowWidth: M, arrowHeight: _ }),
|
|
402
|
-
v && qn({ strategy: "referenceHidden", ...$ })
|
|
403
|
-
]
|
|
404
|
-
}), [C, N] = Gt(G), A = V(h);
|
|
405
|
-
Ke(() => {
|
|
406
|
-
ee && (A == null || A());
|
|
407
|
-
}, [ee, A]);
|
|
408
|
-
const K = (W = F.arrow) == null ? void 0 : W.x, ae = (ie = F.arrow) == null ? void 0 : ie.y, ce = ((k = F.arrow) == null ? void 0 : k.centerOffset) !== 0, [he, j] = a.useState();
|
|
409
|
-
return Ke(() => {
|
|
410
|
-
g && j(window.getComputedStyle(g).zIndex);
|
|
411
|
-
}, [g]), /* @__PURE__ */ p(
|
|
412
|
-
"div",
|
|
413
|
-
{
|
|
414
|
-
ref: Q.setFloating,
|
|
415
|
-
"data-radix-popper-content-wrapper": "",
|
|
416
|
-
style: {
|
|
417
|
-
...J,
|
|
418
|
-
transform: ee ? J.transform : "translate(0, -200%)",
|
|
419
|
-
// keep off the page when measuring
|
|
420
|
-
minWidth: "max-content",
|
|
421
|
-
zIndex: he,
|
|
422
|
-
"--radix-popper-transform-origin": [
|
|
423
|
-
(se = F.transformOrigin) == null ? void 0 : se.x,
|
|
424
|
-
(nt = F.transformOrigin) == null ? void 0 : nt.y
|
|
425
|
-
].join(" "),
|
|
426
|
-
// hide the content if using the hide middleware and should be hidden
|
|
427
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
428
|
-
// as if the PopperContent isn't there at all
|
|
429
|
-
...((rt = F.hide) == null ? void 0 : rt.referenceHidden) && {
|
|
430
|
-
visibility: "hidden",
|
|
431
|
-
pointerEvents: "none"
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
dir: e.dir,
|
|
435
|
-
children: /* @__PURE__ */ p(
|
|
436
|
-
wr,
|
|
437
|
-
{
|
|
438
|
-
scope: n,
|
|
439
|
-
placedSide: C,
|
|
440
|
-
onArrowChange: P,
|
|
441
|
-
arrowX: K,
|
|
442
|
-
arrowY: ae,
|
|
443
|
-
shouldHideArrow: ce,
|
|
444
|
-
children: /* @__PURE__ */ p(
|
|
445
|
-
x.div,
|
|
446
|
-
{
|
|
447
|
-
"data-side": C,
|
|
448
|
-
"data-align": N,
|
|
449
|
-
...l,
|
|
450
|
-
ref: b,
|
|
451
|
-
style: {
|
|
452
|
-
...l.style,
|
|
453
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
454
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
455
|
-
animation: ee ? void 0 : "none"
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
)
|
|
459
|
-
}
|
|
460
|
-
)
|
|
461
|
-
}
|
|
462
|
-
);
|
|
463
|
-
}
|
|
464
|
-
);
|
|
465
|
-
Lt.displayName = Xe;
|
|
466
|
-
var kt = "PopperArrow", Er = {
|
|
467
|
-
top: "bottom",
|
|
468
|
-
right: "left",
|
|
469
|
-
bottom: "top",
|
|
470
|
-
left: "right"
|
|
471
|
-
}, Bt = a.forwardRef(function(t, n) {
|
|
472
|
-
const { __scopePopper: r, ...o } = t, c = yr(kt, r), s = Er[c.placedSide];
|
|
473
|
-
return (
|
|
474
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
475
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
476
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
477
|
-
/* @__PURE__ */ p(
|
|
478
|
-
"span",
|
|
479
|
-
{
|
|
480
|
-
ref: c.onArrowChange,
|
|
481
|
-
style: {
|
|
482
|
-
position: "absolute",
|
|
483
|
-
left: c.arrowX,
|
|
484
|
-
top: c.arrowY,
|
|
485
|
-
[s]: 0,
|
|
486
|
-
transformOrigin: {
|
|
487
|
-
top: "",
|
|
488
|
-
right: "0 0",
|
|
489
|
-
bottom: "center 0",
|
|
490
|
-
left: "100% 0"
|
|
491
|
-
}[c.placedSide],
|
|
492
|
-
transform: {
|
|
493
|
-
top: "translateY(100%)",
|
|
494
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
495
|
-
bottom: "rotate(180deg)",
|
|
496
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
497
|
-
}[c.placedSide],
|
|
498
|
-
visibility: c.shouldHideArrow ? "hidden" : void 0
|
|
499
|
-
},
|
|
500
|
-
children: /* @__PURE__ */ p(
|
|
501
|
-
hr,
|
|
502
|
-
{
|
|
503
|
-
...o,
|
|
504
|
-
ref: n,
|
|
505
|
-
style: {
|
|
506
|
-
...o.style,
|
|
507
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
508
|
-
display: "block"
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
)
|
|
512
|
-
}
|
|
513
|
-
)
|
|
514
|
-
);
|
|
515
|
-
});
|
|
516
|
-
Bt.displayName = kt;
|
|
517
|
-
function Cr(e) {
|
|
518
|
-
return e !== null;
|
|
519
|
-
}
|
|
520
|
-
var br = (e) => ({
|
|
521
|
-
name: "transformOrigin",
|
|
522
|
-
options: e,
|
|
523
|
-
fn(t) {
|
|
524
|
-
var w, g, E;
|
|
525
|
-
const { placement: n, rects: r, middlewareData: o } = t, s = ((w = o.arrow) == null ? void 0 : w.centerOffset) !== 0, i = s ? 0 : e.arrowWidth, m = s ? 0 : e.arrowHeight, [d, f] = Gt(n), u = { start: "0%", center: "50%", end: "100%" }[f], v = (((g = o.arrow) == null ? void 0 : g.x) ?? 0) + i / 2, y = (((E = o.arrow) == null ? void 0 : E.y) ?? 0) + m / 2;
|
|
526
|
-
let h = "", l = "";
|
|
527
|
-
return d === "bottom" ? (h = s ? u : `${v}px`, l = `${-m}px`) : d === "top" ? (h = s ? u : `${v}px`, l = `${r.floating.height + m}px`) : d === "right" ? (h = `${-m}px`, l = s ? u : `${y}px`) : d === "left" && (h = `${r.floating.width + m}px`, l = s ? u : `${y}px`), { data: { x: h, y: l } };
|
|
528
|
-
}
|
|
529
|
-
});
|
|
530
|
-
function Gt(e) {
|
|
531
|
-
const [t, n = "center"] = e.split("-");
|
|
532
|
-
return [t, n];
|
|
533
|
-
}
|
|
534
|
-
var Sr = Nt, Mr = Ft, Rr = Lt, Pr = Bt, _r = "Portal", Kt = a.forwardRef((e, t) => {
|
|
535
|
-
var i;
|
|
536
|
-
const { container: n, ...r } = e, [o, c] = a.useState(!1);
|
|
537
|
-
Ke(() => c(!0), []);
|
|
538
|
-
const s = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
539
|
-
return s ? Qn.createPortal(/* @__PURE__ */ p(x.div, { ...r, ref: t }), s) : null;
|
|
540
|
-
});
|
|
541
|
-
Kt.displayName = _r;
|
|
542
|
-
var Oe = "rovingFocusGroup.onEntryFocus", Ir = { bubbles: !1, cancelable: !0 }, _e = "RovingFocusGroup", [We, Ut, Ar] = bt(_e), [xr, $t] = pe(
|
|
543
|
-
_e,
|
|
544
|
-
[Ar]
|
|
545
|
-
), [Tr, Dr] = xr(_e), Wt = a.forwardRef(
|
|
546
|
-
(e, t) => /* @__PURE__ */ p(We.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ p(We.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ p(Nr, { ...e, ref: t }) }) })
|
|
547
|
-
);
|
|
548
|
-
Wt.displayName = _e;
|
|
549
|
-
var Nr = a.forwardRef((e, t) => {
|
|
550
|
-
const {
|
|
551
|
-
__scopeRovingFocusGroup: n,
|
|
552
|
-
orientation: r,
|
|
553
|
-
loop: o = !1,
|
|
554
|
-
dir: c,
|
|
555
|
-
currentTabStopId: s,
|
|
556
|
-
defaultCurrentTabStopId: i,
|
|
557
|
-
onCurrentTabStopIdChange: m,
|
|
558
|
-
onEntryFocus: d,
|
|
559
|
-
preventScrollOnEntryFocus: f = !1,
|
|
560
|
-
...u
|
|
561
|
-
} = e, v = a.useRef(null), y = L(t, v), h = St(c), [l = null, w] = Ct({
|
|
562
|
-
prop: s,
|
|
563
|
-
defaultProp: i,
|
|
564
|
-
onChange: m
|
|
565
|
-
}), [g, E] = a.useState(!1), b = V(d), S = Ut(n), P = a.useRef(!1), [I, M] = a.useState(0);
|
|
566
|
-
return a.useEffect(() => {
|
|
567
|
-
const _ = v.current;
|
|
568
|
-
if (_)
|
|
569
|
-
return _.addEventListener(Oe, b), () => _.removeEventListener(Oe, b);
|
|
570
|
-
}, [b]), /* @__PURE__ */ p(
|
|
571
|
-
Tr,
|
|
572
|
-
{
|
|
573
|
-
scope: n,
|
|
574
|
-
orientation: r,
|
|
575
|
-
dir: h,
|
|
576
|
-
loop: o,
|
|
577
|
-
currentTabStopId: l,
|
|
578
|
-
onItemFocus: a.useCallback(
|
|
579
|
-
(_) => w(_),
|
|
580
|
-
[w]
|
|
581
|
-
),
|
|
582
|
-
onItemShiftTab: a.useCallback(() => E(!0), []),
|
|
583
|
-
onFocusableItemAdd: a.useCallback(
|
|
584
|
-
() => M((_) => _ + 1),
|
|
585
|
-
[]
|
|
586
|
-
),
|
|
587
|
-
onFocusableItemRemove: a.useCallback(
|
|
588
|
-
() => M((_) => _ - 1),
|
|
589
|
-
[]
|
|
590
|
-
),
|
|
591
|
-
children: /* @__PURE__ */ p(
|
|
592
|
-
x.div,
|
|
593
|
-
{
|
|
594
|
-
tabIndex: g || I === 0 ? -1 : 0,
|
|
595
|
-
"data-orientation": r,
|
|
596
|
-
...u,
|
|
597
|
-
ref: y,
|
|
598
|
-
style: { outline: "none", ...e.style },
|
|
599
|
-
onMouseDown: R(e.onMouseDown, () => {
|
|
600
|
-
P.current = !0;
|
|
601
|
-
}),
|
|
602
|
-
onFocus: R(e.onFocus, (_) => {
|
|
603
|
-
const D = !P.current;
|
|
604
|
-
if (_.target === _.currentTarget && D && !g) {
|
|
605
|
-
const O = new CustomEvent(Oe, Ir);
|
|
606
|
-
if (_.currentTarget.dispatchEvent(O), !O.defaultPrevented) {
|
|
607
|
-
const H = S().filter((G) => G.focusable), X = H.find((G) => G.active), $ = H.find((G) => G.id === l), J = [X, $, ...H].filter(
|
|
608
|
-
Boolean
|
|
609
|
-
).map((G) => G.ref.current);
|
|
610
|
-
Vt(J, f);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
P.current = !1;
|
|
614
|
-
}),
|
|
615
|
-
onBlur: R(e.onBlur, () => E(!1))
|
|
616
|
-
}
|
|
617
|
-
)
|
|
618
|
-
}
|
|
619
|
-
);
|
|
620
|
-
}), Ht = "RovingFocusGroupItem", Yt = a.forwardRef(
|
|
621
|
-
(e, t) => {
|
|
622
|
-
const {
|
|
623
|
-
__scopeRovingFocusGroup: n,
|
|
624
|
-
focusable: r = !0,
|
|
625
|
-
active: o = !1,
|
|
626
|
-
tabStopId: c,
|
|
627
|
-
...s
|
|
628
|
-
} = e, i = Ue(), m = c || i, d = Dr(Ht, n), f = d.currentTabStopId === m, u = Ut(n), { onFocusableItemAdd: v, onFocusableItemRemove: y } = d;
|
|
629
|
-
return a.useEffect(() => {
|
|
630
|
-
if (r)
|
|
631
|
-
return v(), () => y();
|
|
632
|
-
}, [r, v, y]), /* @__PURE__ */ p(
|
|
633
|
-
We.ItemSlot,
|
|
634
|
-
{
|
|
635
|
-
scope: n,
|
|
636
|
-
id: m,
|
|
637
|
-
focusable: r,
|
|
638
|
-
active: o,
|
|
639
|
-
children: /* @__PURE__ */ p(
|
|
640
|
-
x.span,
|
|
641
|
-
{
|
|
642
|
-
tabIndex: f ? 0 : -1,
|
|
643
|
-
"data-orientation": d.orientation,
|
|
644
|
-
...s,
|
|
645
|
-
ref: t,
|
|
646
|
-
onMouseDown: R(e.onMouseDown, (h) => {
|
|
647
|
-
r ? d.onItemFocus(m) : h.preventDefault();
|
|
648
|
-
}),
|
|
649
|
-
onFocus: R(e.onFocus, () => d.onItemFocus(m)),
|
|
650
|
-
onKeyDown: R(e.onKeyDown, (h) => {
|
|
651
|
-
if (h.key === "Tab" && h.shiftKey) {
|
|
652
|
-
d.onItemShiftTab();
|
|
653
|
-
return;
|
|
654
|
-
}
|
|
655
|
-
if (h.target !== h.currentTarget)
|
|
656
|
-
return;
|
|
657
|
-
const l = Lr(h, d.orientation, d.dir);
|
|
658
|
-
if (l !== void 0) {
|
|
659
|
-
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey)
|
|
660
|
-
return;
|
|
661
|
-
h.preventDefault();
|
|
662
|
-
let g = u().filter((E) => E.focusable).map((E) => E.ref.current);
|
|
663
|
-
if (l === "last")
|
|
664
|
-
g.reverse();
|
|
665
|
-
else if (l === "prev" || l === "next") {
|
|
666
|
-
l === "prev" && g.reverse();
|
|
667
|
-
const E = g.indexOf(h.currentTarget);
|
|
668
|
-
g = d.loop ? kr(g, E + 1) : g.slice(E + 1);
|
|
669
|
-
}
|
|
670
|
-
setTimeout(() => Vt(g));
|
|
671
|
-
}
|
|
672
|
-
})
|
|
673
|
-
}
|
|
674
|
-
)
|
|
675
|
-
}
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
);
|
|
679
|
-
Yt.displayName = Ht;
|
|
680
|
-
var Or = {
|
|
681
|
-
ArrowLeft: "prev",
|
|
682
|
-
ArrowUp: "prev",
|
|
683
|
-
ArrowRight: "next",
|
|
684
|
-
ArrowDown: "next",
|
|
685
|
-
PageUp: "first",
|
|
686
|
-
Home: "first",
|
|
687
|
-
PageDown: "last",
|
|
688
|
-
End: "last"
|
|
689
|
-
};
|
|
690
|
-
function Fr(e, t) {
|
|
691
|
-
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
692
|
-
}
|
|
693
|
-
function Lr(e, t, n) {
|
|
694
|
-
const r = Fr(e.key, n);
|
|
695
|
-
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
696
|
-
return Or[r];
|
|
697
|
-
}
|
|
698
|
-
function Vt(e, t = !1) {
|
|
699
|
-
const n = document.activeElement;
|
|
700
|
-
for (const r of e)
|
|
701
|
-
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n))
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
function kr(e, t) {
|
|
705
|
-
return e.map((n, r) => e[(t + r) % e.length]);
|
|
706
|
-
}
|
|
707
|
-
var Br = Wt, Gr = Yt, Kr = function(e) {
|
|
708
|
-
if (typeof document > "u")
|
|
709
|
-
return null;
|
|
710
|
-
var t = Array.isArray(e) ? e[0] : e;
|
|
711
|
-
return t.ownerDocument.body;
|
|
712
|
-
}, te = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), ye = {}, Fe = 0, Xt = function(e) {
|
|
713
|
-
return e && (e.host || Xt(e.parentNode));
|
|
714
|
-
}, Ur = function(e, t) {
|
|
715
|
-
return t.map(function(n) {
|
|
716
|
-
if (e.contains(n))
|
|
717
|
-
return n;
|
|
718
|
-
var r = Xt(n);
|
|
719
|
-
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
720
|
-
}).filter(function(n) {
|
|
721
|
-
return !!n;
|
|
722
|
-
});
|
|
723
|
-
}, $r = function(e, t, n, r) {
|
|
724
|
-
var o = Ur(t, Array.isArray(e) ? e : [e]);
|
|
725
|
-
ye[n] || (ye[n] = /* @__PURE__ */ new WeakMap());
|
|
726
|
-
var c = ye[n], s = [], i = /* @__PURE__ */ new Set(), m = new Set(o), d = function(u) {
|
|
727
|
-
!u || i.has(u) || (i.add(u), d(u.parentNode));
|
|
728
|
-
};
|
|
729
|
-
o.forEach(d);
|
|
730
|
-
var f = function(u) {
|
|
731
|
-
!u || m.has(u) || Array.prototype.forEach.call(u.children, function(v) {
|
|
732
|
-
if (i.has(v))
|
|
733
|
-
f(v);
|
|
734
|
-
else
|
|
735
|
-
try {
|
|
736
|
-
var y = v.getAttribute(r), h = y !== null && y !== "false", l = (te.get(v) || 0) + 1, w = (c.get(v) || 0) + 1;
|
|
737
|
-
te.set(v, l), c.set(v, w), s.push(v), l === 1 && h && we.set(v, !0), w === 1 && v.setAttribute(n, "true"), h || v.setAttribute(r, "true");
|
|
738
|
-
} catch (g) {
|
|
739
|
-
console.error("aria-hidden: cannot operate on ", v, g);
|
|
740
|
-
}
|
|
741
|
-
});
|
|
742
|
-
};
|
|
743
|
-
return f(t), i.clear(), Fe++, function() {
|
|
744
|
-
s.forEach(function(u) {
|
|
745
|
-
var v = te.get(u) - 1, y = c.get(u) - 1;
|
|
746
|
-
te.set(u, v), c.set(u, y), v || (we.has(u) || u.removeAttribute(r), we.delete(u)), y || u.removeAttribute(n);
|
|
747
|
-
}), Fe--, Fe || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), ye = {});
|
|
748
|
-
};
|
|
749
|
-
}, Wr = function(e, t, n) {
|
|
750
|
-
n === void 0 && (n = "data-aria-hidden");
|
|
751
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o = t || Kr(e);
|
|
752
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), $r(r, o, n, "aria-hidden")) : function() {
|
|
753
|
-
return null;
|
|
754
|
-
};
|
|
755
|
-
}, U = function() {
|
|
756
|
-
return U = Object.assign || function(t) {
|
|
757
|
-
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
758
|
-
n = arguments[r];
|
|
759
|
-
for (var c in n)
|
|
760
|
-
Object.prototype.hasOwnProperty.call(n, c) && (t[c] = n[c]);
|
|
761
|
-
}
|
|
762
|
-
return t;
|
|
763
|
-
}, U.apply(this, arguments);
|
|
764
|
-
};
|
|
765
|
-
function jt(e, t) {
|
|
766
|
-
var n = {};
|
|
767
|
-
for (var r in e)
|
|
768
|
-
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
769
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
770
|
-
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
771
|
-
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
772
|
-
return n;
|
|
773
|
-
}
|
|
774
|
-
function Hr(e, t, n) {
|
|
775
|
-
if (n || arguments.length === 2)
|
|
776
|
-
for (var r = 0, o = t.length, c; r < o; r++)
|
|
777
|
-
(c || !(r in t)) && (c || (c = Array.prototype.slice.call(t, 0, r)), c[r] = t[r]);
|
|
778
|
-
return e.concat(c || Array.prototype.slice.call(t));
|
|
779
|
-
}
|
|
780
|
-
var be = "right-scroll-bar-position", Se = "width-before-scroll-bar", Yr = "with-scroll-bars-hidden", Vr = "--removed-body-scroll-bar-size";
|
|
781
|
-
function Le(e, t) {
|
|
782
|
-
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
783
|
-
}
|
|
784
|
-
function Xr(e, t) {
|
|
785
|
-
var n = Kn(function() {
|
|
786
|
-
return {
|
|
787
|
-
// value
|
|
788
|
-
value: e,
|
|
789
|
-
// last callback
|
|
790
|
-
callback: t,
|
|
791
|
-
// "memoized" public interface
|
|
792
|
-
facade: {
|
|
793
|
-
get current() {
|
|
794
|
-
return n.value;
|
|
795
|
-
},
|
|
796
|
-
set current(r) {
|
|
797
|
-
var o = n.value;
|
|
798
|
-
o !== r && (n.value = r, n.callback(r, o));
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
};
|
|
802
|
-
})[0];
|
|
803
|
-
return n.callback = t, n.facade;
|
|
804
|
-
}
|
|
805
|
-
var jr = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ft = /* @__PURE__ */ new WeakMap();
|
|
806
|
-
function zr(e, t) {
|
|
807
|
-
var n = Xr(t || null, function(r) {
|
|
808
|
-
return e.forEach(function(o) {
|
|
809
|
-
return Le(o, r);
|
|
810
|
-
});
|
|
811
|
-
});
|
|
812
|
-
return jr(function() {
|
|
813
|
-
var r = ft.get(n);
|
|
814
|
-
if (r) {
|
|
815
|
-
var o = new Set(r), c = new Set(e), s = n.current;
|
|
816
|
-
o.forEach(function(i) {
|
|
817
|
-
c.has(i) || Le(i, null);
|
|
818
|
-
}), c.forEach(function(i) {
|
|
819
|
-
o.has(i) || Le(i, s);
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
ft.set(n, e);
|
|
823
|
-
}, [e]), n;
|
|
824
|
-
}
|
|
825
|
-
function Zr(e) {
|
|
826
|
-
return e;
|
|
827
|
-
}
|
|
828
|
-
function qr(e, t) {
|
|
829
|
-
t === void 0 && (t = Zr);
|
|
830
|
-
var n = [], r = !1, o = {
|
|
831
|
-
read: function() {
|
|
832
|
-
if (r)
|
|
833
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
834
|
-
return n.length ? n[n.length - 1] : e;
|
|
835
|
-
},
|
|
836
|
-
useMedium: function(c) {
|
|
837
|
-
var s = t(c, r);
|
|
838
|
-
return n.push(s), function() {
|
|
839
|
-
n = n.filter(function(i) {
|
|
840
|
-
return i !== s;
|
|
841
|
-
});
|
|
842
|
-
};
|
|
843
|
-
},
|
|
844
|
-
assignSyncMedium: function(c) {
|
|
845
|
-
for (r = !0; n.length; ) {
|
|
846
|
-
var s = n;
|
|
847
|
-
n = [], s.forEach(c);
|
|
848
|
-
}
|
|
849
|
-
n = {
|
|
850
|
-
push: function(i) {
|
|
851
|
-
return c(i);
|
|
852
|
-
},
|
|
853
|
-
filter: function() {
|
|
854
|
-
return n;
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
},
|
|
858
|
-
assignMedium: function(c) {
|
|
859
|
-
r = !0;
|
|
860
|
-
var s = [];
|
|
861
|
-
if (n.length) {
|
|
862
|
-
var i = n;
|
|
863
|
-
n = [], i.forEach(c), s = n;
|
|
864
|
-
}
|
|
865
|
-
var m = function() {
|
|
866
|
-
var f = s;
|
|
867
|
-
s = [], f.forEach(c);
|
|
868
|
-
}, d = function() {
|
|
869
|
-
return Promise.resolve().then(m);
|
|
870
|
-
};
|
|
871
|
-
d(), n = {
|
|
872
|
-
push: function(f) {
|
|
873
|
-
s.push(f), d();
|
|
874
|
-
},
|
|
875
|
-
filter: function(f) {
|
|
876
|
-
return s = s.filter(f), n;
|
|
877
|
-
}
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
};
|
|
881
|
-
return o;
|
|
882
|
-
}
|
|
883
|
-
function Qr(e) {
|
|
884
|
-
e === void 0 && (e = {});
|
|
885
|
-
var t = qr(null);
|
|
886
|
-
return t.options = U({ async: !0, ssr: !1 }, e), t;
|
|
887
|
-
}
|
|
888
|
-
var zt = function(e) {
|
|
889
|
-
var t = e.sideCar, n = jt(e, ["sideCar"]);
|
|
890
|
-
if (!t)
|
|
891
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
892
|
-
var r = t.read();
|
|
893
|
-
if (!r)
|
|
894
|
-
throw new Error("Sidecar medium not found");
|
|
895
|
-
return a.createElement(r, U({}, n));
|
|
896
|
-
};
|
|
897
|
-
zt.isSideCarExport = !0;
|
|
898
|
-
function Jr(e, t) {
|
|
899
|
-
return e.useMedium(t), zt;
|
|
900
|
-
}
|
|
901
|
-
var Zt = Qr(), ke = function() {
|
|
902
|
-
}, Ie = a.forwardRef(function(e, t) {
|
|
903
|
-
var n = a.useRef(null), r = a.useState({
|
|
904
|
-
onScrollCapture: ke,
|
|
905
|
-
onWheelCapture: ke,
|
|
906
|
-
onTouchMoveCapture: ke
|
|
907
|
-
}), o = r[0], c = r[1], s = e.forwardProps, i = e.children, m = e.className, d = e.removeScrollBar, f = e.enabled, u = e.shards, v = e.sideCar, y = e.noIsolation, h = e.inert, l = e.allowPinchZoom, w = e.as, g = w === void 0 ? "div" : w, E = e.gapMode, b = jt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, P = zr([n, t]), I = U(U({}, b), o);
|
|
908
|
-
return a.createElement(
|
|
909
|
-
a.Fragment,
|
|
910
|
-
null,
|
|
911
|
-
f && a.createElement(S, { sideCar: Zt, removeScrollBar: d, shards: u, noIsolation: y, inert: h, setCallbacks: c, allowPinchZoom: !!l, lockRef: n, gapMode: E }),
|
|
912
|
-
s ? a.cloneElement(a.Children.only(i), U(U({}, I), { ref: P })) : a.createElement(g, U({}, I, { className: m, ref: P }), i)
|
|
913
|
-
);
|
|
914
|
-
});
|
|
915
|
-
Ie.defaultProps = {
|
|
916
|
-
enabled: !0,
|
|
917
|
-
removeScrollBar: !0,
|
|
918
|
-
inert: !1
|
|
919
|
-
};
|
|
920
|
-
Ie.classNames = {
|
|
921
|
-
fullWidth: Se,
|
|
922
|
-
zeroRight: be
|
|
923
|
-
};
|
|
924
|
-
var pt, eo = function() {
|
|
925
|
-
if (pt)
|
|
926
|
-
return pt;
|
|
927
|
-
if (typeof __webpack_nonce__ < "u")
|
|
928
|
-
return __webpack_nonce__;
|
|
929
|
-
};
|
|
930
|
-
function to() {
|
|
931
|
-
if (!document)
|
|
932
|
-
return null;
|
|
933
|
-
var e = document.createElement("style");
|
|
934
|
-
e.type = "text/css";
|
|
935
|
-
var t = eo();
|
|
936
|
-
return t && e.setAttribute("nonce", t), e;
|
|
937
|
-
}
|
|
938
|
-
function no(e, t) {
|
|
939
|
-
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
940
|
-
}
|
|
941
|
-
function ro(e) {
|
|
942
|
-
var t = document.head || document.getElementsByTagName("head")[0];
|
|
943
|
-
t.appendChild(e);
|
|
944
|
-
}
|
|
945
|
-
var oo = function() {
|
|
946
|
-
var e = 0, t = null;
|
|
947
|
-
return {
|
|
948
|
-
add: function(n) {
|
|
949
|
-
e == 0 && (t = to()) && (no(t, n), ro(t)), e++;
|
|
950
|
-
},
|
|
951
|
-
remove: function() {
|
|
952
|
-
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
953
|
-
}
|
|
954
|
-
};
|
|
955
|
-
}, ao = function() {
|
|
956
|
-
var e = oo();
|
|
957
|
-
return function(t, n) {
|
|
958
|
-
a.useEffect(function() {
|
|
959
|
-
return e.add(t), function() {
|
|
960
|
-
e.remove();
|
|
961
|
-
};
|
|
962
|
-
}, [t && n]);
|
|
963
|
-
};
|
|
964
|
-
}, qt = function() {
|
|
965
|
-
var e = ao(), t = function(n) {
|
|
966
|
-
var r = n.styles, o = n.dynamic;
|
|
967
|
-
return e(r, o), null;
|
|
968
|
-
};
|
|
969
|
-
return t;
|
|
970
|
-
}, co = {
|
|
971
|
-
left: 0,
|
|
972
|
-
top: 0,
|
|
973
|
-
right: 0,
|
|
974
|
-
gap: 0
|
|
975
|
-
}, Be = function(e) {
|
|
976
|
-
return parseInt(e || "", 10) || 0;
|
|
977
|
-
}, io = function(e) {
|
|
978
|
-
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
979
|
-
return [Be(n), Be(r), Be(o)];
|
|
980
|
-
}, so = function(e) {
|
|
981
|
-
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
982
|
-
return co;
|
|
983
|
-
var t = io(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
984
|
-
return {
|
|
985
|
-
left: t[0],
|
|
986
|
-
top: t[1],
|
|
987
|
-
right: t[2],
|
|
988
|
-
gap: Math.max(0, r - n + t[2] - t[0])
|
|
989
|
-
};
|
|
990
|
-
}, uo = qt(), oe = "data-scroll-locked", lo = function(e, t, n, r) {
|
|
991
|
-
var o = e.left, c = e.top, s = e.right, i = e.gap;
|
|
992
|
-
return n === void 0 && (n = "margin"), `
|
|
993
|
-
.`.concat(Yr, ` {
|
|
994
|
-
overflow: hidden `).concat(r, `;
|
|
995
|
-
padding-right: `).concat(i, "px ").concat(r, `;
|
|
996
|
-
}
|
|
997
|
-
body[`).concat(oe, `] {
|
|
998
|
-
overflow: hidden `).concat(r, `;
|
|
999
|
-
overscroll-behavior: contain;
|
|
1000
|
-
`).concat([
|
|
1001
|
-
t && "position: relative ".concat(r, ";"),
|
|
1002
|
-
n === "margin" && `
|
|
1003
|
-
padding-left: `.concat(o, `px;
|
|
1004
|
-
padding-top: `).concat(c, `px;
|
|
1005
|
-
padding-right: `).concat(s, `px;
|
|
1006
|
-
margin-left:0;
|
|
1007
|
-
margin-top:0;
|
|
1008
|
-
margin-right: `).concat(i, "px ").concat(r, `;
|
|
1009
|
-
`),
|
|
1010
|
-
n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
|
|
1011
|
-
].filter(Boolean).join(""), `
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
.`).concat(be, ` {
|
|
1015
|
-
right: `).concat(i, "px ").concat(r, `;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
.`).concat(Se, ` {
|
|
1019
|
-
margin-right: `).concat(i, "px ").concat(r, `;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.`).concat(be, " .").concat(be, ` {
|
|
1023
|
-
right: 0 `).concat(r, `;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
.`).concat(Se, " .").concat(Se, ` {
|
|
1027
|
-
margin-right: 0 `).concat(r, `;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
body[`).concat(oe, `] {
|
|
1031
|
-
`).concat(Vr, ": ").concat(i, `px;
|
|
1032
|
-
}
|
|
1033
|
-
`);
|
|
1034
|
-
}, vt = function() {
|
|
1035
|
-
var e = parseInt(document.body.getAttribute(oe) || "0", 10);
|
|
1036
|
-
return isFinite(e) ? e : 0;
|
|
1037
|
-
}, fo = function() {
|
|
1038
|
-
a.useEffect(function() {
|
|
1039
|
-
return document.body.setAttribute(oe, (vt() + 1).toString()), function() {
|
|
1040
|
-
var e = vt() - 1;
|
|
1041
|
-
e <= 0 ? document.body.removeAttribute(oe) : document.body.setAttribute(oe, e.toString());
|
|
1042
|
-
};
|
|
1043
|
-
}, []);
|
|
1044
|
-
}, po = function(e) {
|
|
1045
|
-
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
1046
|
-
fo();
|
|
1047
|
-
var c = a.useMemo(function() {
|
|
1048
|
-
return so(o);
|
|
1049
|
-
}, [o]);
|
|
1050
|
-
return a.createElement(uo, { styles: lo(c, !t, o, n ? "" : "!important") });
|
|
1051
|
-
}, He = !1;
|
|
1052
|
-
if (typeof window < "u")
|
|
1053
|
-
try {
|
|
1054
|
-
var Ee = Object.defineProperty({}, "passive", {
|
|
1055
|
-
get: function() {
|
|
1056
|
-
return He = !0, !0;
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
window.addEventListener("test", Ee, Ee), window.removeEventListener("test", Ee, Ee);
|
|
1060
|
-
} catch {
|
|
1061
|
-
He = !1;
|
|
1062
|
-
}
|
|
1063
|
-
var ne = He ? { passive: !1 } : !1, vo = function(e) {
|
|
1064
|
-
return e.tagName === "TEXTAREA";
|
|
1065
|
-
}, Qt = function(e, t) {
|
|
1066
|
-
if (!(e instanceof Element))
|
|
1067
|
-
return !1;
|
|
1068
|
-
var n = window.getComputedStyle(e);
|
|
1069
|
-
return (
|
|
1070
|
-
// not-not-scrollable
|
|
1071
|
-
n[t] !== "hidden" && // contains scroll inside self
|
|
1072
|
-
!(n.overflowY === n.overflowX && !vo(e) && n[t] === "visible")
|
|
1073
|
-
);
|
|
1074
|
-
}, mo = function(e) {
|
|
1075
|
-
return Qt(e, "overflowY");
|
|
1076
|
-
}, ho = function(e) {
|
|
1077
|
-
return Qt(e, "overflowX");
|
|
1078
|
-
}, mt = function(e, t) {
|
|
1079
|
-
var n = t.ownerDocument, r = t;
|
|
1080
|
-
do {
|
|
1081
|
-
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
1082
|
-
var o = Jt(e, r);
|
|
1083
|
-
if (o) {
|
|
1084
|
-
var c = en(e, r), s = c[1], i = c[2];
|
|
1085
|
-
if (s > i)
|
|
1086
|
-
return !0;
|
|
1087
|
-
}
|
|
1088
|
-
r = r.parentNode;
|
|
1089
|
-
} while (r && r !== n.body);
|
|
1090
|
-
return !1;
|
|
1091
|
-
}, go = function(e) {
|
|
1092
|
-
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
1093
|
-
return [
|
|
1094
|
-
t,
|
|
1095
|
-
n,
|
|
1096
|
-
r
|
|
1097
|
-
];
|
|
1098
|
-
}, wo = function(e) {
|
|
1099
|
-
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
1100
|
-
return [
|
|
1101
|
-
t,
|
|
1102
|
-
n,
|
|
1103
|
-
r
|
|
1104
|
-
];
|
|
1105
|
-
}, Jt = function(e, t) {
|
|
1106
|
-
return e === "v" ? mo(t) : ho(t);
|
|
1107
|
-
}, en = function(e, t) {
|
|
1108
|
-
return e === "v" ? go(t) : wo(t);
|
|
1109
|
-
}, yo = function(e, t) {
|
|
1110
|
-
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1111
|
-
}, Eo = function(e, t, n, r, o) {
|
|
1112
|
-
var c = yo(e, window.getComputedStyle(t).direction), s = c * r, i = n.target, m = t.contains(i), d = !1, f = s > 0, u = 0, v = 0;
|
|
1113
|
-
do {
|
|
1114
|
-
var y = en(e, i), h = y[0], l = y[1], w = y[2], g = l - w - c * h;
|
|
1115
|
-
(h || g) && Jt(e, i) && (u += g, v += h), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
|
|
1116
|
-
} while (
|
|
1117
|
-
// portaled content
|
|
1118
|
-
!m && i !== document.body || // self content
|
|
1119
|
-
m && (t.contains(i) || t === i)
|
|
1120
|
-
);
|
|
1121
|
-
return (f && (o && Math.abs(u) < 1 || !o && s > u) || !f && (o && Math.abs(v) < 1 || !o && -s > v)) && (d = !0), d;
|
|
1122
|
-
}, Ce = function(e) {
|
|
1123
|
-
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1124
|
-
}, ht = function(e) {
|
|
1125
|
-
return [e.deltaX, e.deltaY];
|
|
1126
|
-
}, gt = function(e) {
|
|
1127
|
-
return e && "current" in e ? e.current : e;
|
|
1128
|
-
}, Co = function(e, t) {
|
|
1129
|
-
return e[0] === t[0] && e[1] === t[1];
|
|
1130
|
-
}, bo = function(e) {
|
|
1131
|
-
return `
|
|
1132
|
-
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1133
|
-
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1134
|
-
`);
|
|
1135
|
-
}, So = 0, re = [];
|
|
1136
|
-
function Mo(e) {
|
|
1137
|
-
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(So++)[0], c = a.useState(qt)[0], s = a.useRef(e);
|
|
1138
|
-
a.useEffect(function() {
|
|
1139
|
-
s.current = e;
|
|
1140
|
-
}, [e]), a.useEffect(function() {
|
|
1141
|
-
if (e.inert) {
|
|
1142
|
-
document.body.classList.add("block-interactivity-".concat(o));
|
|
1143
|
-
var l = Hr([e.lockRef.current], (e.shards || []).map(gt), !0).filter(Boolean);
|
|
1144
|
-
return l.forEach(function(w) {
|
|
1145
|
-
return w.classList.add("allow-interactivity-".concat(o));
|
|
1146
|
-
}), function() {
|
|
1147
|
-
document.body.classList.remove("block-interactivity-".concat(o)), l.forEach(function(w) {
|
|
1148
|
-
return w.classList.remove("allow-interactivity-".concat(o));
|
|
1149
|
-
});
|
|
1150
|
-
};
|
|
1151
|
-
}
|
|
1152
|
-
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1153
|
-
var i = a.useCallback(function(l, w) {
|
|
1154
|
-
if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
|
|
1155
|
-
return !s.current.allowPinchZoom;
|
|
1156
|
-
var g = Ce(l), E = n.current, b = "deltaX" in l ? l.deltaX : E[0] - g[0], S = "deltaY" in l ? l.deltaY : E[1] - g[1], P, I = l.target, M = Math.abs(b) > Math.abs(S) ? "h" : "v";
|
|
1157
|
-
if ("touches" in l && M === "h" && I.type === "range")
|
|
1158
|
-
return !1;
|
|
1159
|
-
var _ = mt(M, I);
|
|
1160
|
-
if (!_)
|
|
1161
|
-
return !0;
|
|
1162
|
-
if (_ ? P = M : (P = M === "v" ? "h" : "v", _ = mt(M, I)), !_)
|
|
1163
|
-
return !1;
|
|
1164
|
-
if (!r.current && "changedTouches" in l && (b || S) && (r.current = P), !P)
|
|
1165
|
-
return !0;
|
|
1166
|
-
var D = r.current || P;
|
|
1167
|
-
return Eo(D, w, l, D === "h" ? b : S, !0);
|
|
1168
|
-
}, []), m = a.useCallback(function(l) {
|
|
1169
|
-
var w = l;
|
|
1170
|
-
if (!(!re.length || re[re.length - 1] !== c)) {
|
|
1171
|
-
var g = "deltaY" in w ? ht(w) : Ce(w), E = t.current.filter(function(P) {
|
|
1172
|
-
return P.name === w.type && (P.target === w.target || w.target === P.shadowParent) && Co(P.delta, g);
|
|
1173
|
-
})[0];
|
|
1174
|
-
if (E && E.should) {
|
|
1175
|
-
w.cancelable && w.preventDefault();
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
if (!E) {
|
|
1179
|
-
var b = (s.current.shards || []).map(gt).filter(Boolean).filter(function(P) {
|
|
1180
|
-
return P.contains(w.target);
|
|
1181
|
-
}), S = b.length > 0 ? i(w, b[0]) : !s.current.noIsolation;
|
|
1182
|
-
S && w.cancelable && w.preventDefault();
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
}, []), d = a.useCallback(function(l, w, g, E) {
|
|
1186
|
-
var b = { name: l, delta: w, target: g, should: E, shadowParent: Ro(g) };
|
|
1187
|
-
t.current.push(b), setTimeout(function() {
|
|
1188
|
-
t.current = t.current.filter(function(S) {
|
|
1189
|
-
return S !== b;
|
|
1190
|
-
});
|
|
1191
|
-
}, 1);
|
|
1192
|
-
}, []), f = a.useCallback(function(l) {
|
|
1193
|
-
n.current = Ce(l), r.current = void 0;
|
|
1194
|
-
}, []), u = a.useCallback(function(l) {
|
|
1195
|
-
d(l.type, ht(l), l.target, i(l, e.lockRef.current));
|
|
1196
|
-
}, []), v = a.useCallback(function(l) {
|
|
1197
|
-
d(l.type, Ce(l), l.target, i(l, e.lockRef.current));
|
|
1198
|
-
}, []);
|
|
1199
|
-
a.useEffect(function() {
|
|
1200
|
-
return re.push(c), e.setCallbacks({
|
|
1201
|
-
onScrollCapture: u,
|
|
1202
|
-
onWheelCapture: u,
|
|
1203
|
-
onTouchMoveCapture: v
|
|
1204
|
-
}), document.addEventListener("wheel", m, ne), document.addEventListener("touchmove", m, ne), document.addEventListener("touchstart", f, ne), function() {
|
|
1205
|
-
re = re.filter(function(l) {
|
|
1206
|
-
return l !== c;
|
|
1207
|
-
}), document.removeEventListener("wheel", m, ne), document.removeEventListener("touchmove", m, ne), document.removeEventListener("touchstart", f, ne);
|
|
1208
|
-
};
|
|
1209
|
-
}, []);
|
|
1210
|
-
var y = e.removeScrollBar, h = e.inert;
|
|
1211
|
-
return a.createElement(
|
|
1212
|
-
a.Fragment,
|
|
1213
|
-
null,
|
|
1214
|
-
h ? a.createElement(c, { styles: bo(o) }) : null,
|
|
1215
|
-
y ? a.createElement(po, { gapMode: e.gapMode }) : null
|
|
1216
|
-
);
|
|
1217
|
-
}
|
|
1218
|
-
function Ro(e) {
|
|
1219
|
-
for (var t = null; e !== null; )
|
|
1220
|
-
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1221
|
-
return t;
|
|
1222
|
-
}
|
|
1223
|
-
const Po = Jr(Zt, Mo);
|
|
1224
|
-
var tn = a.forwardRef(function(e, t) {
|
|
1225
|
-
return a.createElement(Ie, U({}, e, { ref: t, sideCar: Po }));
|
|
1226
|
-
});
|
|
1227
|
-
tn.classNames = Ie.classNames;
|
|
1228
|
-
const _o = tn;
|
|
1229
|
-
var Ye = ["Enter", " "], Io = ["ArrowDown", "PageUp", "Home"], nn = ["ArrowUp", "PageDown", "End"], Ao = [...Io, ...nn], xo = {
|
|
1230
|
-
ltr: [...Ye, "ArrowRight"],
|
|
1231
|
-
rtl: [...Ye, "ArrowLeft"]
|
|
1232
|
-
}, To = {
|
|
1233
|
-
ltr: ["ArrowLeft"],
|
|
1234
|
-
rtl: ["ArrowRight"]
|
|
1235
|
-
}, ve = "Menu", [de, Do, No] = bt(ve), [Z, rn] = pe(ve, [
|
|
1236
|
-
No,
|
|
1237
|
-
Tt,
|
|
1238
|
-
$t
|
|
1239
|
-
]), Ae = Tt(), on = $t(), [Oo, q] = Z(ve), [Fo, me] = Z(ve), an = (e) => {
|
|
1240
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: c, modal: s = !0 } = e, i = Ae(t), [m, d] = a.useState(null), f = a.useRef(!1), u = V(c), v = St(o);
|
|
1241
|
-
return a.useEffect(() => {
|
|
1242
|
-
const y = () => {
|
|
1243
|
-
f.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
|
|
1244
|
-
}, h = () => f.current = !1;
|
|
1245
|
-
return document.addEventListener("keydown", y, { capture: !0 }), () => {
|
|
1246
|
-
document.removeEventListener("keydown", y, { capture: !0 }), document.removeEventListener("pointerdown", h, { capture: !0 }), document.removeEventListener("pointermove", h, { capture: !0 });
|
|
1247
|
-
};
|
|
1248
|
-
}, []), /* @__PURE__ */ p(Sr, { ...i, children: /* @__PURE__ */ p(
|
|
1249
|
-
Oo,
|
|
1250
|
-
{
|
|
1251
|
-
scope: t,
|
|
1252
|
-
open: n,
|
|
1253
|
-
onOpenChange: u,
|
|
1254
|
-
content: m,
|
|
1255
|
-
onContentChange: d,
|
|
1256
|
-
children: /* @__PURE__ */ p(
|
|
1257
|
-
Fo,
|
|
1258
|
-
{
|
|
1259
|
-
scope: t,
|
|
1260
|
-
onClose: a.useCallback(() => u(!1), [u]),
|
|
1261
|
-
isUsingKeyboardRef: f,
|
|
1262
|
-
dir: v,
|
|
1263
|
-
modal: s,
|
|
1264
|
-
children: r
|
|
1265
|
-
}
|
|
1266
|
-
)
|
|
1267
|
-
}
|
|
1268
|
-
) });
|
|
1269
|
-
};
|
|
1270
|
-
an.displayName = ve;
|
|
1271
|
-
var Lo = "MenuAnchor", je = a.forwardRef(
|
|
1272
|
-
(e, t) => {
|
|
1273
|
-
const { __scopeMenu: n, ...r } = e, o = Ae(n);
|
|
1274
|
-
return /* @__PURE__ */ p(Mr, { ...o, ...r, ref: t });
|
|
1275
|
-
}
|
|
1276
|
-
);
|
|
1277
|
-
je.displayName = Lo;
|
|
1278
|
-
var ze = "MenuPortal", [ko, cn] = Z(ze, {
|
|
1279
|
-
forceMount: void 0
|
|
1280
|
-
}), sn = (e) => {
|
|
1281
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, c = q(ze, t);
|
|
1282
|
-
return /* @__PURE__ */ p(ko, { scope: t, forceMount: n, children: /* @__PURE__ */ p(Pe, { present: n || c.open, children: /* @__PURE__ */ p(Kt, { asChild: !0, container: o, children: r }) }) });
|
|
1283
|
-
};
|
|
1284
|
-
sn.displayName = ze;
|
|
1285
|
-
var B = "MenuContent", [Bo, Ze] = Z(B), un = a.forwardRef(
|
|
1286
|
-
(e, t) => {
|
|
1287
|
-
const n = cn(B, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, c = q(B, e.__scopeMenu), s = me(B, e.__scopeMenu);
|
|
1288
|
-
return /* @__PURE__ */ p(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ p(Pe, { present: r || c.open, children: /* @__PURE__ */ p(de.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ p(Go, { ...o, ref: t }) : /* @__PURE__ */ p(Ko, { ...o, ref: t }) }) }) });
|
|
1289
|
-
}
|
|
1290
|
-
), Go = a.forwardRef(
|
|
1291
|
-
(e, t) => {
|
|
1292
|
-
const n = q(B, e.__scopeMenu), r = a.useRef(null), o = L(t, r);
|
|
1293
|
-
return a.useEffect(() => {
|
|
1294
|
-
const c = r.current;
|
|
1295
|
-
if (c)
|
|
1296
|
-
return Wr(c);
|
|
1297
|
-
}, []), /* @__PURE__ */ p(
|
|
1298
|
-
qe,
|
|
1299
|
-
{
|
|
1300
|
-
...e,
|
|
1301
|
-
ref: o,
|
|
1302
|
-
trapFocus: n.open,
|
|
1303
|
-
disableOutsidePointerEvents: n.open,
|
|
1304
|
-
disableOutsideScroll: !0,
|
|
1305
|
-
onFocusOutside: R(
|
|
1306
|
-
e.onFocusOutside,
|
|
1307
|
-
(c) => c.preventDefault(),
|
|
1308
|
-
{ checkForDefaultPrevented: !1 }
|
|
1309
|
-
),
|
|
1310
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
1311
|
-
}
|
|
1312
|
-
);
|
|
1313
|
-
}
|
|
1314
|
-
), Ko = a.forwardRef((e, t) => {
|
|
1315
|
-
const n = q(B, e.__scopeMenu);
|
|
1316
|
-
return /* @__PURE__ */ p(
|
|
1317
|
-
qe,
|
|
1318
|
-
{
|
|
1319
|
-
...e,
|
|
1320
|
-
ref: t,
|
|
1321
|
-
trapFocus: !1,
|
|
1322
|
-
disableOutsidePointerEvents: !1,
|
|
1323
|
-
disableOutsideScroll: !1,
|
|
1324
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
1325
|
-
}
|
|
1326
|
-
);
|
|
1327
|
-
}), qe = a.forwardRef(
|
|
1328
|
-
(e, t) => {
|
|
1329
|
-
const {
|
|
1330
|
-
__scopeMenu: n,
|
|
1331
|
-
loop: r = !1,
|
|
1332
|
-
trapFocus: o,
|
|
1333
|
-
onOpenAutoFocus: c,
|
|
1334
|
-
onCloseAutoFocus: s,
|
|
1335
|
-
disableOutsidePointerEvents: i,
|
|
1336
|
-
onEntryFocus: m,
|
|
1337
|
-
onEscapeKeyDown: d,
|
|
1338
|
-
onPointerDownOutside: f,
|
|
1339
|
-
onFocusOutside: u,
|
|
1340
|
-
onInteractOutside: v,
|
|
1341
|
-
onDismiss: y,
|
|
1342
|
-
disableOutsideScroll: h,
|
|
1343
|
-
...l
|
|
1344
|
-
} = e, w = q(B, n), g = me(B, n), E = Ae(n), b = on(n), S = Do(n), [P, I] = a.useState(null), M = a.useRef(null), _ = L(t, M, w.onContentChange), D = a.useRef(0), O = a.useRef(""), H = a.useRef(0), X = a.useRef(null), $ = a.useRef("right"), Q = a.useRef(0), J = h ? _o : a.Fragment, G = h ? { as: Ge, allowPinchZoom: !0 } : void 0, ee = (C) => {
|
|
1345
|
-
var W, ie;
|
|
1346
|
-
const N = O.current + C, A = S().filter((k) => !k.disabled), K = document.activeElement, ae = (W = A.find((k) => k.ref.current === K)) == null ? void 0 : W.textValue, ce = A.map((k) => k.textValue), he = Qo(ce, N, ae), j = (ie = A.find((k) => k.textValue === he)) == null ? void 0 : ie.ref.current;
|
|
1347
|
-
(function k(se) {
|
|
1348
|
-
O.current = se, window.clearTimeout(D.current), se !== "" && (D.current = window.setTimeout(() => k(""), 1e3));
|
|
1349
|
-
})(N), j && setTimeout(() => j.focus());
|
|
1350
|
-
};
|
|
1351
|
-
a.useEffect(() => () => window.clearTimeout(D.current), []), ir();
|
|
1352
|
-
const F = a.useCallback((C) => {
|
|
1353
|
-
var A, K;
|
|
1354
|
-
return $.current === ((A = X.current) == null ? void 0 : A.side) && ea(C, (K = X.current) == null ? void 0 : K.area);
|
|
1355
|
-
}, []);
|
|
1356
|
-
return /* @__PURE__ */ p(
|
|
1357
|
-
Bo,
|
|
1358
|
-
{
|
|
1359
|
-
scope: n,
|
|
1360
|
-
searchRef: O,
|
|
1361
|
-
onItemEnter: a.useCallback(
|
|
1362
|
-
(C) => {
|
|
1363
|
-
F(C) && C.preventDefault();
|
|
1364
|
-
},
|
|
1365
|
-
[F]
|
|
1366
|
-
),
|
|
1367
|
-
onItemLeave: a.useCallback(
|
|
1368
|
-
(C) => {
|
|
1369
|
-
var N;
|
|
1370
|
-
F(C) || ((N = M.current) == null || N.focus(), I(null));
|
|
1371
|
-
},
|
|
1372
|
-
[F]
|
|
1373
|
-
),
|
|
1374
|
-
onTriggerLeave: a.useCallback(
|
|
1375
|
-
(C) => {
|
|
1376
|
-
F(C) && C.preventDefault();
|
|
1377
|
-
},
|
|
1378
|
-
[F]
|
|
1379
|
-
),
|
|
1380
|
-
pointerGraceTimerRef: H,
|
|
1381
|
-
onPointerGraceIntentChange: a.useCallback((C) => {
|
|
1382
|
-
X.current = C;
|
|
1383
|
-
}, []),
|
|
1384
|
-
children: /* @__PURE__ */ p(J, { ...G, children: /* @__PURE__ */ p(
|
|
1385
|
-
_t,
|
|
1386
|
-
{
|
|
1387
|
-
asChild: !0,
|
|
1388
|
-
trapped: o,
|
|
1389
|
-
onMountAutoFocus: R(c, (C) => {
|
|
1390
|
-
var N;
|
|
1391
|
-
C.preventDefault(), (N = M.current) == null || N.focus({ preventScroll: !0 });
|
|
1392
|
-
}),
|
|
1393
|
-
onUnmountAutoFocus: s,
|
|
1394
|
-
children: /* @__PURE__ */ p(
|
|
1395
|
-
Rt,
|
|
1396
|
-
{
|
|
1397
|
-
asChild: !0,
|
|
1398
|
-
disableOutsidePointerEvents: i,
|
|
1399
|
-
onEscapeKeyDown: d,
|
|
1400
|
-
onPointerDownOutside: f,
|
|
1401
|
-
onFocusOutside: u,
|
|
1402
|
-
onInteractOutside: v,
|
|
1403
|
-
onDismiss: y,
|
|
1404
|
-
children: /* @__PURE__ */ p(
|
|
1405
|
-
Br,
|
|
1406
|
-
{
|
|
1407
|
-
asChild: !0,
|
|
1408
|
-
...b,
|
|
1409
|
-
dir: g.dir,
|
|
1410
|
-
orientation: "vertical",
|
|
1411
|
-
loop: r,
|
|
1412
|
-
currentTabStopId: P,
|
|
1413
|
-
onCurrentTabStopIdChange: I,
|
|
1414
|
-
onEntryFocus: R(m, (C) => {
|
|
1415
|
-
g.isUsingKeyboardRef.current || C.preventDefault();
|
|
1416
|
-
}),
|
|
1417
|
-
preventScrollOnEntryFocus: !0,
|
|
1418
|
-
children: /* @__PURE__ */ p(
|
|
1419
|
-
Rr,
|
|
1420
|
-
{
|
|
1421
|
-
role: "menu",
|
|
1422
|
-
"aria-orientation": "vertical",
|
|
1423
|
-
"data-state": Rn(w.open),
|
|
1424
|
-
"data-radix-menu-content": "",
|
|
1425
|
-
dir: g.dir,
|
|
1426
|
-
...E,
|
|
1427
|
-
...l,
|
|
1428
|
-
ref: _,
|
|
1429
|
-
style: { outline: "none", ...l.style },
|
|
1430
|
-
onKeyDown: R(l.onKeyDown, (C) => {
|
|
1431
|
-
const A = C.target.closest("[data-radix-menu-content]") === C.currentTarget, K = C.ctrlKey || C.altKey || C.metaKey, ae = C.key.length === 1;
|
|
1432
|
-
A && (C.key === "Tab" && C.preventDefault(), !K && ae && ee(C.key));
|
|
1433
|
-
const ce = M.current;
|
|
1434
|
-
if (C.target !== ce || !Ao.includes(C.key))
|
|
1435
|
-
return;
|
|
1436
|
-
C.preventDefault();
|
|
1437
|
-
const j = S().filter((W) => !W.disabled).map((W) => W.ref.current);
|
|
1438
|
-
nn.includes(C.key) && j.reverse(), Zo(j);
|
|
1439
|
-
}),
|
|
1440
|
-
onBlur: R(e.onBlur, (C) => {
|
|
1441
|
-
C.currentTarget.contains(C.target) || (window.clearTimeout(D.current), O.current = "");
|
|
1442
|
-
}),
|
|
1443
|
-
onPointerMove: R(
|
|
1444
|
-
e.onPointerMove,
|
|
1445
|
-
fe((C) => {
|
|
1446
|
-
const N = C.target, A = Q.current !== C.clientX;
|
|
1447
|
-
if (C.currentTarget.contains(N) && A) {
|
|
1448
|
-
const K = C.clientX > Q.current ? "right" : "left";
|
|
1449
|
-
$.current = K, Q.current = C.clientX;
|
|
1450
|
-
}
|
|
1451
|
-
})
|
|
1452
|
-
)
|
|
1453
|
-
}
|
|
1454
|
-
)
|
|
1455
|
-
}
|
|
1456
|
-
)
|
|
1457
|
-
}
|
|
1458
|
-
)
|
|
1459
|
-
}
|
|
1460
|
-
) })
|
|
1461
|
-
}
|
|
1462
|
-
);
|
|
1463
|
-
}
|
|
1464
|
-
);
|
|
1465
|
-
un.displayName = B;
|
|
1466
|
-
var Uo = "MenuGroup", Qe = a.forwardRef(
|
|
1467
|
-
(e, t) => {
|
|
1468
|
-
const { __scopeMenu: n, ...r } = e;
|
|
1469
|
-
return /* @__PURE__ */ p(x.div, { role: "group", ...r, ref: t });
|
|
1470
|
-
}
|
|
1471
|
-
);
|
|
1472
|
-
Qe.displayName = Uo;
|
|
1473
|
-
var $o = "MenuLabel", ln = a.forwardRef(
|
|
1474
|
-
(e, t) => {
|
|
1475
|
-
const { __scopeMenu: n, ...r } = e;
|
|
1476
|
-
return /* @__PURE__ */ p(x.div, { ...r, ref: t });
|
|
1477
|
-
}
|
|
1478
|
-
);
|
|
1479
|
-
ln.displayName = $o;
|
|
1480
|
-
var Me = "MenuItem", wt = "menu.itemSelect", xe = a.forwardRef(
|
|
1481
|
-
(e, t) => {
|
|
1482
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, c = a.useRef(null), s = me(Me, e.__scopeMenu), i = Ze(Me, e.__scopeMenu), m = L(t, c), d = a.useRef(!1), f = () => {
|
|
1483
|
-
const u = c.current;
|
|
1484
|
-
if (!n && u) {
|
|
1485
|
-
const v = new CustomEvent(wt, { bubbles: !0, cancelable: !0 });
|
|
1486
|
-
u.addEventListener(wt, (y) => r == null ? void 0 : r(y), { once: !0 }), yt(u, v), v.defaultPrevented ? d.current = !1 : s.onClose();
|
|
1487
|
-
}
|
|
1488
|
-
};
|
|
1489
|
-
return /* @__PURE__ */ p(
|
|
1490
|
-
dn,
|
|
1491
|
-
{
|
|
1492
|
-
...o,
|
|
1493
|
-
ref: m,
|
|
1494
|
-
disabled: n,
|
|
1495
|
-
onClick: R(e.onClick, f),
|
|
1496
|
-
onPointerDown: (u) => {
|
|
1497
|
-
var v;
|
|
1498
|
-
(v = e.onPointerDown) == null || v.call(e, u), d.current = !0;
|
|
1499
|
-
},
|
|
1500
|
-
onPointerUp: R(e.onPointerUp, (u) => {
|
|
1501
|
-
var v;
|
|
1502
|
-
d.current || (v = u.currentTarget) == null || v.click();
|
|
1503
|
-
}),
|
|
1504
|
-
onKeyDown: R(e.onKeyDown, (u) => {
|
|
1505
|
-
const v = i.searchRef.current !== "";
|
|
1506
|
-
n || v && u.key === " " || Ye.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
|
|
1507
|
-
})
|
|
1508
|
-
}
|
|
1509
|
-
);
|
|
1510
|
-
}
|
|
1511
|
-
);
|
|
1512
|
-
xe.displayName = Me;
|
|
1513
|
-
var dn = a.forwardRef(
|
|
1514
|
-
(e, t) => {
|
|
1515
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...c } = e, s = Ze(Me, n), i = on(n), m = a.useRef(null), d = L(t, m), [f, u] = a.useState(!1), [v, y] = a.useState("");
|
|
1516
|
-
return a.useEffect(() => {
|
|
1517
|
-
const h = m.current;
|
|
1518
|
-
h && y((h.textContent ?? "").trim());
|
|
1519
|
-
}, [c.children]), /* @__PURE__ */ p(
|
|
1520
|
-
de.ItemSlot,
|
|
1521
|
-
{
|
|
1522
|
-
scope: n,
|
|
1523
|
-
disabled: r,
|
|
1524
|
-
textValue: o ?? v,
|
|
1525
|
-
children: /* @__PURE__ */ p(Gr, { asChild: !0, ...i, focusable: !r, children: /* @__PURE__ */ p(
|
|
1526
|
-
x.div,
|
|
1527
|
-
{
|
|
1528
|
-
role: "menuitem",
|
|
1529
|
-
"data-highlighted": f ? "" : void 0,
|
|
1530
|
-
"aria-disabled": r || void 0,
|
|
1531
|
-
"data-disabled": r ? "" : void 0,
|
|
1532
|
-
...c,
|
|
1533
|
-
ref: d,
|
|
1534
|
-
onPointerMove: R(
|
|
1535
|
-
e.onPointerMove,
|
|
1536
|
-
fe((h) => {
|
|
1537
|
-
r ? s.onItemLeave(h) : (s.onItemEnter(h), h.defaultPrevented || h.currentTarget.focus({ preventScroll: !0 }));
|
|
1538
|
-
})
|
|
1539
|
-
),
|
|
1540
|
-
onPointerLeave: R(
|
|
1541
|
-
e.onPointerLeave,
|
|
1542
|
-
fe((h) => s.onItemLeave(h))
|
|
1543
|
-
),
|
|
1544
|
-
onFocus: R(e.onFocus, () => u(!0)),
|
|
1545
|
-
onBlur: R(e.onBlur, () => u(!1))
|
|
1546
|
-
}
|
|
1547
|
-
) })
|
|
1548
|
-
}
|
|
1549
|
-
);
|
|
1550
|
-
}
|
|
1551
|
-
), Wo = "MenuCheckboxItem", fn = a.forwardRef(
|
|
1552
|
-
(e, t) => {
|
|
1553
|
-
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1554
|
-
return /* @__PURE__ */ p(gn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ p(
|
|
1555
|
-
xe,
|
|
1556
|
-
{
|
|
1557
|
-
role: "menuitemcheckbox",
|
|
1558
|
-
"aria-checked": Re(n) ? "mixed" : n,
|
|
1559
|
-
...o,
|
|
1560
|
-
ref: t,
|
|
1561
|
-
"data-state": et(n),
|
|
1562
|
-
onSelect: R(
|
|
1563
|
-
o.onSelect,
|
|
1564
|
-
() => r == null ? void 0 : r(Re(n) ? !0 : !n),
|
|
1565
|
-
{ checkForDefaultPrevented: !1 }
|
|
1566
|
-
)
|
|
1567
|
-
}
|
|
1568
|
-
) });
|
|
1569
|
-
}
|
|
1570
|
-
);
|
|
1571
|
-
fn.displayName = Wo;
|
|
1572
|
-
var pn = "MenuRadioGroup", [Ho, Yo] = Z(
|
|
1573
|
-
pn,
|
|
1574
|
-
{ value: void 0, onValueChange: () => {
|
|
1575
|
-
} }
|
|
1576
|
-
), vn = a.forwardRef(
|
|
1577
|
-
(e, t) => {
|
|
1578
|
-
const { value: n, onValueChange: r, ...o } = e, c = V(r);
|
|
1579
|
-
return /* @__PURE__ */ p(Ho, { scope: e.__scopeMenu, value: n, onValueChange: c, children: /* @__PURE__ */ p(Qe, { ...o, ref: t }) });
|
|
1580
|
-
}
|
|
1581
|
-
);
|
|
1582
|
-
vn.displayName = pn;
|
|
1583
|
-
var mn = "MenuRadioItem", hn = a.forwardRef(
|
|
1584
|
-
(e, t) => {
|
|
1585
|
-
const { value: n, ...r } = e, o = Yo(mn, e.__scopeMenu), c = n === o.value;
|
|
1586
|
-
return /* @__PURE__ */ p(gn, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ p(
|
|
1587
|
-
xe,
|
|
1588
|
-
{
|
|
1589
|
-
role: "menuitemradio",
|
|
1590
|
-
"aria-checked": c,
|
|
1591
|
-
...r,
|
|
1592
|
-
ref: t,
|
|
1593
|
-
"data-state": et(c),
|
|
1594
|
-
onSelect: R(
|
|
1595
|
-
r.onSelect,
|
|
1596
|
-
() => {
|
|
1597
|
-
var s;
|
|
1598
|
-
return (s = o.onValueChange) == null ? void 0 : s.call(o, n);
|
|
1599
|
-
},
|
|
1600
|
-
{ checkForDefaultPrevented: !1 }
|
|
1601
|
-
)
|
|
1602
|
-
}
|
|
1603
|
-
) });
|
|
1604
|
-
}
|
|
1605
|
-
);
|
|
1606
|
-
hn.displayName = mn;
|
|
1607
|
-
var Je = "MenuItemIndicator", [gn, Vo] = Z(
|
|
1608
|
-
Je,
|
|
1609
|
-
{ checked: !1 }
|
|
1610
|
-
), wn = a.forwardRef(
|
|
1611
|
-
(e, t) => {
|
|
1612
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, c = Vo(Je, n);
|
|
1613
|
-
return /* @__PURE__ */ p(
|
|
1614
|
-
Pe,
|
|
1615
|
-
{
|
|
1616
|
-
present: r || Re(c.checked) || c.checked === !0,
|
|
1617
|
-
children: /* @__PURE__ */ p(
|
|
1618
|
-
x.span,
|
|
1619
|
-
{
|
|
1620
|
-
...o,
|
|
1621
|
-
ref: t,
|
|
1622
|
-
"data-state": et(c.checked)
|
|
1623
|
-
}
|
|
1624
|
-
)
|
|
1625
|
-
}
|
|
1626
|
-
);
|
|
1627
|
-
}
|
|
1628
|
-
);
|
|
1629
|
-
wn.displayName = Je;
|
|
1630
|
-
var Xo = "MenuSeparator", yn = a.forwardRef(
|
|
1631
|
-
(e, t) => {
|
|
1632
|
-
const { __scopeMenu: n, ...r } = e;
|
|
1633
|
-
return /* @__PURE__ */ p(
|
|
1634
|
-
x.div,
|
|
1635
|
-
{
|
|
1636
|
-
role: "separator",
|
|
1637
|
-
"aria-orientation": "horizontal",
|
|
1638
|
-
...r,
|
|
1639
|
-
ref: t
|
|
1640
|
-
}
|
|
1641
|
-
);
|
|
1642
|
-
}
|
|
1643
|
-
);
|
|
1644
|
-
yn.displayName = Xo;
|
|
1645
|
-
var jo = "MenuArrow", En = a.forwardRef(
|
|
1646
|
-
(e, t) => {
|
|
1647
|
-
const { __scopeMenu: n, ...r } = e, o = Ae(n);
|
|
1648
|
-
return /* @__PURE__ */ p(Pr, { ...o, ...r, ref: t });
|
|
1649
|
-
}
|
|
1650
|
-
);
|
|
1651
|
-
En.displayName = jo;
|
|
1652
|
-
var zo = "MenuSub", [Ha, Cn] = Z(zo), le = "MenuSubTrigger", bn = a.forwardRef(
|
|
1653
|
-
(e, t) => {
|
|
1654
|
-
const n = q(le, e.__scopeMenu), r = me(le, e.__scopeMenu), o = Cn(le, e.__scopeMenu), c = Ze(le, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: m } = c, d = { __scopeMenu: e.__scopeMenu }, f = a.useCallback(() => {
|
|
1655
|
-
s.current && window.clearTimeout(s.current), s.current = null;
|
|
1656
|
-
}, []);
|
|
1657
|
-
return a.useEffect(() => f, [f]), a.useEffect(() => {
|
|
1658
|
-
const u = i.current;
|
|
1659
|
-
return () => {
|
|
1660
|
-
window.clearTimeout(u), m(null);
|
|
1661
|
-
};
|
|
1662
|
-
}, [i, m]), /* @__PURE__ */ p(je, { asChild: !0, ...d, children: /* @__PURE__ */ p(
|
|
1663
|
-
dn,
|
|
1664
|
-
{
|
|
1665
|
-
id: o.triggerId,
|
|
1666
|
-
"aria-haspopup": "menu",
|
|
1667
|
-
"aria-expanded": n.open,
|
|
1668
|
-
"aria-controls": o.contentId,
|
|
1669
|
-
"data-state": Rn(n.open),
|
|
1670
|
-
...e,
|
|
1671
|
-
ref: Et(t, o.onTriggerChange),
|
|
1672
|
-
onClick: (u) => {
|
|
1673
|
-
var v;
|
|
1674
|
-
(v = e.onClick) == null || v.call(e, u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1675
|
-
},
|
|
1676
|
-
onPointerMove: R(
|
|
1677
|
-
e.onPointerMove,
|
|
1678
|
-
fe((u) => {
|
|
1679
|
-
c.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !s.current && (c.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
|
|
1680
|
-
n.onOpenChange(!0), f();
|
|
1681
|
-
}, 100));
|
|
1682
|
-
})
|
|
1683
|
-
),
|
|
1684
|
-
onPointerLeave: R(
|
|
1685
|
-
e.onPointerLeave,
|
|
1686
|
-
fe((u) => {
|
|
1687
|
-
var y, h;
|
|
1688
|
-
f();
|
|
1689
|
-
const v = (y = n.content) == null ? void 0 : y.getBoundingClientRect();
|
|
1690
|
-
if (v) {
|
|
1691
|
-
const l = (h = n.content) == null ? void 0 : h.dataset.side, w = l === "right", g = w ? -5 : 5, E = v[w ? "left" : "right"], b = v[w ? "right" : "left"];
|
|
1692
|
-
c.onPointerGraceIntentChange({
|
|
1693
|
-
area: [
|
|
1694
|
-
// Apply a bleed on clientX to ensure that our exit point is
|
|
1695
|
-
// consistently within polygon bounds
|
|
1696
|
-
{ x: u.clientX + g, y: u.clientY },
|
|
1697
|
-
{ x: E, y: v.top },
|
|
1698
|
-
{ x: b, y: v.top },
|
|
1699
|
-
{ x: b, y: v.bottom },
|
|
1700
|
-
{ x: E, y: v.bottom }
|
|
1701
|
-
],
|
|
1702
|
-
side: l
|
|
1703
|
-
}), window.clearTimeout(i.current), i.current = window.setTimeout(
|
|
1704
|
-
() => c.onPointerGraceIntentChange(null),
|
|
1705
|
-
300
|
|
1706
|
-
);
|
|
1707
|
-
} else {
|
|
1708
|
-
if (c.onTriggerLeave(u), u.defaultPrevented)
|
|
1709
|
-
return;
|
|
1710
|
-
c.onPointerGraceIntentChange(null);
|
|
1711
|
-
}
|
|
1712
|
-
})
|
|
1713
|
-
),
|
|
1714
|
-
onKeyDown: R(e.onKeyDown, (u) => {
|
|
1715
|
-
var y;
|
|
1716
|
-
const v = c.searchRef.current !== "";
|
|
1717
|
-
e.disabled || v && u.key === " " || xo[r.dir].includes(u.key) && (n.onOpenChange(!0), (y = n.content) == null || y.focus(), u.preventDefault());
|
|
1718
|
-
})
|
|
1719
|
-
}
|
|
1720
|
-
) });
|
|
1721
|
-
}
|
|
1722
|
-
);
|
|
1723
|
-
bn.displayName = le;
|
|
1724
|
-
var Sn = "MenuSubContent", Mn = a.forwardRef(
|
|
1725
|
-
(e, t) => {
|
|
1726
|
-
const n = cn(B, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, c = q(B, e.__scopeMenu), s = me(B, e.__scopeMenu), i = Cn(Sn, e.__scopeMenu), m = a.useRef(null), d = L(t, m);
|
|
1727
|
-
return /* @__PURE__ */ p(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ p(Pe, { present: r || c.open, children: /* @__PURE__ */ p(de.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ p(
|
|
1728
|
-
qe,
|
|
1729
|
-
{
|
|
1730
|
-
id: i.contentId,
|
|
1731
|
-
"aria-labelledby": i.triggerId,
|
|
1732
|
-
...o,
|
|
1733
|
-
ref: d,
|
|
1734
|
-
align: "start",
|
|
1735
|
-
side: s.dir === "rtl" ? "left" : "right",
|
|
1736
|
-
disableOutsidePointerEvents: !1,
|
|
1737
|
-
disableOutsideScroll: !1,
|
|
1738
|
-
trapFocus: !1,
|
|
1739
|
-
onOpenAutoFocus: (f) => {
|
|
1740
|
-
var u;
|
|
1741
|
-
s.isUsingKeyboardRef.current && ((u = m.current) == null || u.focus()), f.preventDefault();
|
|
1742
|
-
},
|
|
1743
|
-
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
1744
|
-
onFocusOutside: R(e.onFocusOutside, (f) => {
|
|
1745
|
-
f.target !== i.trigger && c.onOpenChange(!1);
|
|
1746
|
-
}),
|
|
1747
|
-
onEscapeKeyDown: R(e.onEscapeKeyDown, (f) => {
|
|
1748
|
-
s.onClose(), f.preventDefault();
|
|
1749
|
-
}),
|
|
1750
|
-
onKeyDown: R(e.onKeyDown, (f) => {
|
|
1751
|
-
var y;
|
|
1752
|
-
const u = f.currentTarget.contains(f.target), v = To[s.dir].includes(f.key);
|
|
1753
|
-
u && v && (c.onOpenChange(!1), (y = i.trigger) == null || y.focus(), f.preventDefault());
|
|
1754
|
-
})
|
|
1755
|
-
}
|
|
1756
|
-
) }) }) });
|
|
1757
|
-
}
|
|
1758
|
-
);
|
|
1759
|
-
Mn.displayName = Sn;
|
|
1760
|
-
function Rn(e) {
|
|
1761
|
-
return e ? "open" : "closed";
|
|
1762
|
-
}
|
|
1763
|
-
function Re(e) {
|
|
1764
|
-
return e === "indeterminate";
|
|
1765
|
-
}
|
|
1766
|
-
function et(e) {
|
|
1767
|
-
return Re(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1768
|
-
}
|
|
1769
|
-
function Zo(e) {
|
|
1770
|
-
const t = document.activeElement;
|
|
1771
|
-
for (const n of e)
|
|
1772
|
-
if (n === t || (n.focus(), document.activeElement !== t))
|
|
1773
|
-
return;
|
|
1774
|
-
}
|
|
1775
|
-
function qo(e, t) {
|
|
1776
|
-
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1777
|
-
}
|
|
1778
|
-
function Qo(e, t, n) {
|
|
1779
|
-
const o = t.length > 1 && Array.from(t).every((d) => d === t[0]) ? t[0] : t, c = n ? e.indexOf(n) : -1;
|
|
1780
|
-
let s = qo(e, Math.max(c, 0));
|
|
1781
|
-
o.length === 1 && (s = s.filter((d) => d !== n));
|
|
1782
|
-
const m = s.find(
|
|
1783
|
-
(d) => d.toLowerCase().startsWith(o.toLowerCase())
|
|
1784
|
-
);
|
|
1785
|
-
return m !== n ? m : void 0;
|
|
1786
|
-
}
|
|
1787
|
-
function Jo(e, t) {
|
|
1788
|
-
const { x: n, y: r } = e;
|
|
1789
|
-
let o = !1;
|
|
1790
|
-
for (let c = 0, s = t.length - 1; c < t.length; s = c++) {
|
|
1791
|
-
const i = t[c].x, m = t[c].y, d = t[s].x, f = t[s].y;
|
|
1792
|
-
m > r != f > r && n < (d - i) * (r - m) / (f - m) + i && (o = !o);
|
|
1793
|
-
}
|
|
1794
|
-
return o;
|
|
1795
|
-
}
|
|
1796
|
-
function ea(e, t) {
|
|
1797
|
-
if (!t)
|
|
1798
|
-
return !1;
|
|
1799
|
-
const n = { x: e.clientX, y: e.clientY };
|
|
1800
|
-
return Jo(n, t);
|
|
1801
|
-
}
|
|
1802
|
-
function fe(e) {
|
|
1803
|
-
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1804
|
-
}
|
|
1805
|
-
var ta = an, na = je, ra = sn, oa = un, aa = Qe, ca = ln, ia = xe, sa = fn, ua = vn, la = hn, da = wn, fa = yn, pa = En, va = bn, ma = Mn, tt = "DropdownMenu", [ha, Ya] = pe(
|
|
1806
|
-
tt,
|
|
1807
|
-
[rn]
|
|
1808
|
-
), T = rn(), [ga, Pn] = ha(tt), _n = (e) => {
|
|
1809
|
-
const {
|
|
1810
|
-
__scopeDropdownMenu: t,
|
|
1811
|
-
children: n,
|
|
1812
|
-
dir: r,
|
|
1813
|
-
open: o,
|
|
1814
|
-
defaultOpen: c,
|
|
1815
|
-
onOpenChange: s,
|
|
1816
|
-
modal: i = !0
|
|
1817
|
-
} = e, m = T(t), d = a.useRef(null), [f = !1, u] = Ct({
|
|
1818
|
-
prop: o,
|
|
1819
|
-
defaultProp: c,
|
|
1820
|
-
onChange: s
|
|
1821
|
-
});
|
|
1822
|
-
return /* @__PURE__ */ p(
|
|
1823
|
-
ga,
|
|
1824
|
-
{
|
|
1825
|
-
scope: t,
|
|
1826
|
-
triggerId: Ue(),
|
|
1827
|
-
triggerRef: d,
|
|
1828
|
-
contentId: Ue(),
|
|
1829
|
-
open: f,
|
|
1830
|
-
onOpenChange: u,
|
|
1831
|
-
onOpenToggle: a.useCallback(() => u((v) => !v), [u]),
|
|
1832
|
-
modal: i,
|
|
1833
|
-
children: /* @__PURE__ */ p(ta, { ...m, open: f, onOpenChange: u, dir: r, modal: i, children: n })
|
|
1834
|
-
}
|
|
1835
|
-
);
|
|
1836
|
-
};
|
|
1837
|
-
_n.displayName = tt;
|
|
1838
|
-
var In = "DropdownMenuTrigger", An = a.forwardRef(
|
|
1839
|
-
(e, t) => {
|
|
1840
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, c = Pn(In, n), s = T(n);
|
|
1841
|
-
return /* @__PURE__ */ p(na, { asChild: !0, ...s, children: /* @__PURE__ */ p(
|
|
1842
|
-
x.button,
|
|
1843
|
-
{
|
|
1844
|
-
type: "button",
|
|
1845
|
-
id: c.triggerId,
|
|
1846
|
-
"aria-haspopup": "menu",
|
|
1847
|
-
"aria-expanded": c.open,
|
|
1848
|
-
"aria-controls": c.open ? c.contentId : void 0,
|
|
1849
|
-
"data-state": c.open ? "open" : "closed",
|
|
1850
|
-
"data-disabled": r ? "" : void 0,
|
|
1851
|
-
disabled: r,
|
|
1852
|
-
...o,
|
|
1853
|
-
ref: Et(t, c.triggerRef),
|
|
1854
|
-
onPointerDown: R(e.onPointerDown, (i) => {
|
|
1855
|
-
!r && i.button === 0 && i.ctrlKey === !1 && (c.onOpenToggle(), c.open || i.preventDefault());
|
|
1856
|
-
}),
|
|
1857
|
-
onKeyDown: R(e.onKeyDown, (i) => {
|
|
1858
|
-
r || (["Enter", " "].includes(i.key) && c.onOpenToggle(), i.key === "ArrowDown" && c.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(i.key) && i.preventDefault());
|
|
1859
|
-
})
|
|
1860
|
-
}
|
|
1861
|
-
) });
|
|
1862
|
-
}
|
|
1863
|
-
);
|
|
1864
|
-
An.displayName = In;
|
|
1865
|
-
var wa = "DropdownMenuPortal", xn = (e) => {
|
|
1866
|
-
const { __scopeDropdownMenu: t, ...n } = e, r = T(t);
|
|
1867
|
-
return /* @__PURE__ */ p(ra, { ...r, ...n });
|
|
1868
|
-
};
|
|
1869
|
-
xn.displayName = wa;
|
|
1870
|
-
var Tn = "DropdownMenuContent", Dn = a.forwardRef(
|
|
1871
|
-
(e, t) => {
|
|
1872
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = Pn(Tn, n), c = T(n), s = a.useRef(!1);
|
|
1873
|
-
return /* @__PURE__ */ p(
|
|
1874
|
-
oa,
|
|
1875
|
-
{
|
|
1876
|
-
id: o.contentId,
|
|
1877
|
-
"aria-labelledby": o.triggerId,
|
|
1878
|
-
...c,
|
|
1879
|
-
...r,
|
|
1880
|
-
ref: t,
|
|
1881
|
-
onCloseAutoFocus: R(e.onCloseAutoFocus, (i) => {
|
|
1882
|
-
var m;
|
|
1883
|
-
s.current || (m = o.triggerRef.current) == null || m.focus(), s.current = !1, i.preventDefault();
|
|
1884
|
-
}),
|
|
1885
|
-
onInteractOutside: R(e.onInteractOutside, (i) => {
|
|
1886
|
-
const m = i.detail.originalEvent, d = m.button === 0 && m.ctrlKey === !0, f = m.button === 2 || d;
|
|
1887
|
-
(!o.modal || f) && (s.current = !0);
|
|
1888
|
-
}),
|
|
1889
|
-
style: {
|
|
1890
|
-
...e.style,
|
|
1891
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1892
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
1893
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
1894
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1895
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
);
|
|
1899
|
-
}
|
|
1900
|
-
);
|
|
1901
|
-
Dn.displayName = Tn;
|
|
1902
|
-
var ya = "DropdownMenuGroup", Nn = a.forwardRef(
|
|
1903
|
-
(e, t) => {
|
|
1904
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1905
|
-
return /* @__PURE__ */ p(aa, { ...o, ...r, ref: t });
|
|
1906
|
-
}
|
|
1907
|
-
);
|
|
1908
|
-
Nn.displayName = ya;
|
|
1909
|
-
var Ea = "DropdownMenuLabel", Ca = a.forwardRef(
|
|
1910
|
-
(e, t) => {
|
|
1911
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1912
|
-
return /* @__PURE__ */ p(ca, { ...o, ...r, ref: t });
|
|
1913
|
-
}
|
|
1914
|
-
);
|
|
1915
|
-
Ca.displayName = Ea;
|
|
1916
|
-
var ba = "DropdownMenuItem", On = a.forwardRef(
|
|
1917
|
-
(e, t) => {
|
|
1918
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1919
|
-
return /* @__PURE__ */ p(ia, { ...o, ...r, ref: t });
|
|
1920
|
-
}
|
|
1921
|
-
);
|
|
1922
|
-
On.displayName = ba;
|
|
1923
|
-
var Sa = "DropdownMenuCheckboxItem", Ma = a.forwardRef((e, t) => {
|
|
1924
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1925
|
-
return /* @__PURE__ */ p(sa, { ...o, ...r, ref: t });
|
|
1926
|
-
});
|
|
1927
|
-
Ma.displayName = Sa;
|
|
1928
|
-
var Ra = "DropdownMenuRadioGroup", Pa = a.forwardRef((e, t) => {
|
|
1929
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1930
|
-
return /* @__PURE__ */ p(ua, { ...o, ...r, ref: t });
|
|
1931
|
-
});
|
|
1932
|
-
Pa.displayName = Ra;
|
|
1933
|
-
var _a = "DropdownMenuRadioItem", Ia = a.forwardRef((e, t) => {
|
|
1934
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1935
|
-
return /* @__PURE__ */ p(la, { ...o, ...r, ref: t });
|
|
1936
|
-
});
|
|
1937
|
-
Ia.displayName = _a;
|
|
1938
|
-
var Aa = "DropdownMenuItemIndicator", xa = a.forwardRef((e, t) => {
|
|
1939
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1940
|
-
return /* @__PURE__ */ p(da, { ...o, ...r, ref: t });
|
|
1941
|
-
});
|
|
1942
|
-
xa.displayName = Aa;
|
|
1943
|
-
var Ta = "DropdownMenuSeparator", Fn = a.forwardRef((e, t) => {
|
|
1944
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1945
|
-
return /* @__PURE__ */ p(fa, { ...o, ...r, ref: t });
|
|
1946
|
-
});
|
|
1947
|
-
Fn.displayName = Ta;
|
|
1948
|
-
var Da = "DropdownMenuArrow", Na = a.forwardRef(
|
|
1949
|
-
(e, t) => {
|
|
1950
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1951
|
-
return /* @__PURE__ */ p(pa, { ...o, ...r, ref: t });
|
|
1952
|
-
}
|
|
1953
|
-
);
|
|
1954
|
-
Na.displayName = Da;
|
|
1955
|
-
var Oa = "DropdownMenuSubTrigger", Fa = a.forwardRef((e, t) => {
|
|
1956
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1957
|
-
return /* @__PURE__ */ p(va, { ...o, ...r, ref: t });
|
|
1958
|
-
});
|
|
1959
|
-
Fa.displayName = Oa;
|
|
1960
|
-
var La = "DropdownMenuSubContent", ka = a.forwardRef((e, t) => {
|
|
1961
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = T(n);
|
|
1962
|
-
return /* @__PURE__ */ p(
|
|
1963
|
-
ma,
|
|
1964
|
-
{
|
|
1965
|
-
...o,
|
|
1966
|
-
...r,
|
|
1967
|
-
ref: t,
|
|
1968
|
-
style: {
|
|
1969
|
-
...e.style,
|
|
1970
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1971
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
1972
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
1973
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1974
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
);
|
|
1978
|
-
});
|
|
1979
|
-
ka.displayName = La;
|
|
1980
|
-
var Va = _n, Xa = An, ja = xn, za = Dn, Za = Nn, qa = On, Qa = Fn;
|
|
1981
|
-
export {
|
|
1982
|
-
za as C,
|
|
1983
|
-
Rt as D,
|
|
1984
|
-
_t as F,
|
|
1985
|
-
Za as G,
|
|
1986
|
-
qa as I,
|
|
1987
|
-
ja as P,
|
|
1988
|
-
Va as R,
|
|
1989
|
-
Qa as S,
|
|
1990
|
-
Xa as T,
|
|
1991
|
-
_o as a,
|
|
1992
|
-
Kt as b,
|
|
1993
|
-
Wr as h,
|
|
1994
|
-
ir as u
|
|
1995
|
-
};
|