@odynn/awayz-core 0.6.45 → 0.6.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Combination-Bx3lWLOq.js +2291 -0
- package/dist/{TripsService-CUPnO2tz.js → TripsService-DywrB9bi.js} +1 -1
- package/dist/{_styles.flight-booking-BhlwjkAV.js → _styles.flight-booking-DEUJthTJ.js} +1 -1
- package/dist/assets/_styles4.css +1 -1
- package/dist/assets/_styles5.css +1 -0
- package/dist/assets/noRetryInstance.css +1 -1
- package/dist/{cashUtils-BDa0CVyi.js → cashUtils-sBirmFfL.js} +4 -4
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +2 -2
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +7 -7
- package/dist/components/CashValue/CashValue.js +77 -841
- package/dist/components/CashValue/CashValue.stories.js +2 -2
- package/dist/components/Menu/Menu.js +812 -1529
- package/dist/components/Tooltip/Tooltip.js +1502 -0
- package/dist/components/Wallet/Card/Card.js +3 -3
- package/dist/components/Wallet/Card/Card.stories.js +10 -9
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +79 -77
- package/dist/hooks/useBookingManagement/useBookingManagement.js +12 -11
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +4 -3
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +7 -6
- package/dist/hooks/useTripManagement/useTripManagement.test.js +5 -4
- package/dist/hooks/useWallet/useWallet.js +6 -5
- package/dist/hooks/useWallet/useWallet.test.js +4 -3
- package/dist/{index-c5toY3Pm.js → index-Bt2pq2GP.js} +4 -4
- package/dist/lib/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/lib/services/account/AccountService.d.ts +2 -1
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-BMCc2uw4.js → noRetryInstance-Y6wcm2ZM.js} +32 -29
- package/dist/providers/AwayzProvider.js +8 -7
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +6 -5
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +2 -2
- package/dist/services/instanceConfig.js +11 -10
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +2 -1
- package/dist/index-BC-KTkxU.js +0 -1571
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as u, jsxs as Me } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
3
|
+
import Y from "react";
|
|
4
|
+
import { c as ce, a as ue, u as D, b as bn, d as y, e as X, f as Cn, g as yn, o as En, s as Mn, h as wn, i as Rn, j as Sn, k as Pn, l as _n, m as In, n as Se, p as Q, q as Ne, P as Ce, r as xn, R as An, F as On } from "../../Combination-Bx3lWLOq.js";
|
|
5
|
+
import { r as Nn, R as Tn } from "../../index-Cv-wvFlM.js";
|
|
6
6
|
import '../../assets/_styles2.css';/* empty css */
|
|
7
|
-
import { d as
|
|
7
|
+
import { d as Dn, e as Fn } from "../../index-Bt2pq2GP.js";
|
|
8
8
|
// @__NO_SIDE_EFFECTS__
|
|
9
|
-
function
|
|
10
|
-
const t = /* @__PURE__ */
|
|
11
|
-
const { children:
|
|
12
|
-
if (
|
|
13
|
-
const l =
|
|
14
|
-
return /* @__PURE__ */
|
|
9
|
+
function Ze(e) {
|
|
10
|
+
const t = /* @__PURE__ */ Ln(e), n = a.forwardRef((r, o) => {
|
|
11
|
+
const { children: s, ...i } = r, c = a.Children.toArray(s), f = c.find(kn);
|
|
12
|
+
if (f) {
|
|
13
|
+
const l = f.props.children, d = c.map((p) => p === f ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : p);
|
|
14
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
|
|
15
15
|
}
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: s });
|
|
17
17
|
});
|
|
18
18
|
return n.displayName = `${e}.Slot`, n;
|
|
19
19
|
}
|
|
20
20
|
// @__NO_SIDE_EFFECTS__
|
|
21
|
-
function
|
|
21
|
+
function Ln(e) {
|
|
22
22
|
const t = a.forwardRef((n, r) => {
|
|
23
|
-
const { children: o, ...
|
|
23
|
+
const { children: o, ...s } = n;
|
|
24
24
|
if (a.isValidElement(o)) {
|
|
25
|
-
const
|
|
26
|
-
return o.type !== a.Fragment && (c.ref = r ?
|
|
25
|
+
const i = Kn(o), c = Gn(s, o.props);
|
|
26
|
+
return o.type !== a.Fragment && (c.ref = r ? ce(r, i) : i), a.cloneElement(o, c);
|
|
27
27
|
}
|
|
28
28
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
29
29
|
});
|
|
30
30
|
return t.displayName = `${e}.SlotClone`, t;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
32
|
+
var $n = Symbol("radix.slottable");
|
|
33
|
+
function kn(e) {
|
|
34
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === $n;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Gn(e, t) {
|
|
37
37
|
const n = { ...t };
|
|
38
38
|
for (const r in t) {
|
|
39
|
-
const o = e[r],
|
|
40
|
-
/^on[A-Z]/.test(r) ? o &&
|
|
41
|
-
const
|
|
42
|
-
return o(...c),
|
|
43
|
-
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...
|
|
39
|
+
const o = e[r], s = t[r];
|
|
40
|
+
/^on[A-Z]/.test(r) ? o && s ? n[r] = (...c) => {
|
|
41
|
+
const f = s(...c);
|
|
42
|
+
return o(...c), f;
|
|
43
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" "));
|
|
44
44
|
}
|
|
45
45
|
return { ...e, ...n };
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Kn(e) {
|
|
48
48
|
var r, o;
|
|
49
49
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
50
50
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const t = e + "CollectionProvider", [n, r] =
|
|
52
|
+
function Te(e) {
|
|
53
|
+
const t = e + "CollectionProvider", [n, r] = ue(t), [o, s] = n(
|
|
54
54
|
t,
|
|
55
55
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
56
|
-
),
|
|
57
|
-
const { scope:
|
|
58
|
-
return /* @__PURE__ */
|
|
56
|
+
), i = (h) => {
|
|
57
|
+
const { scope: b, children: w } = h, E = Y.useRef(null), M = Y.useRef(/* @__PURE__ */ new Map()).current;
|
|
58
|
+
return /* @__PURE__ */ u(o, { scope: b, itemMap: M, collectionRef: E, children: w });
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
const c = e + "CollectionSlot",
|
|
62
|
-
(
|
|
63
|
-
const { scope:
|
|
64
|
-
return /* @__PURE__ */ f
|
|
60
|
+
i.displayName = t;
|
|
61
|
+
const c = e + "CollectionSlot", f = /* @__PURE__ */ Ze(c), l = Y.forwardRef(
|
|
62
|
+
(h, b) => {
|
|
63
|
+
const { scope: w, children: E } = h, M = s(c, w), S = D(b, M.collectionRef);
|
|
64
|
+
return /* @__PURE__ */ u(f, { ref: S, children: E });
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
l.displayName = c;
|
|
68
|
-
const d = e + "CollectionItemSlot",
|
|
69
|
-
(
|
|
70
|
-
const { scope:
|
|
71
|
-
return
|
|
68
|
+
const d = e + "CollectionItemSlot", p = "data-radix-collection-item", m = /* @__PURE__ */ Ze(d), g = Y.forwardRef(
|
|
69
|
+
(h, b) => {
|
|
70
|
+
const { scope: w, children: E, ...M } = h, S = Y.useRef(null), I = D(b, S), _ = s(d, w);
|
|
71
|
+
return Y.useEffect(() => (_.itemMap.set(S, { ref: S, ...M }), () => void _.itemMap.delete(S))), /* @__PURE__ */ u(m, { [p]: "", ref: I, children: E });
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
g.displayName = d;
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
const
|
|
81
|
-
return Array.from(
|
|
82
|
-
(
|
|
75
|
+
function v(h) {
|
|
76
|
+
const b = s(e + "CollectionConsumer", h);
|
|
77
|
+
return Y.useCallback(() => {
|
|
78
|
+
const E = b.collectionRef.current;
|
|
79
|
+
if (!E) return [];
|
|
80
|
+
const M = Array.from(E.querySelectorAll(`[${p}]`));
|
|
81
|
+
return Array.from(b.itemMap.values()).sort(
|
|
82
|
+
(_, R) => M.indexOf(_.ref.current) - M.indexOf(R.ref.current)
|
|
83
83
|
);
|
|
84
|
-
}, [
|
|
84
|
+
}, [b.collectionRef, b.itemMap]);
|
|
85
85
|
}
|
|
86
86
|
return [
|
|
87
|
-
{ Provider:
|
|
88
|
-
|
|
87
|
+
{ Provider: i, Slot: l, ItemSlot: g },
|
|
88
|
+
v,
|
|
89
89
|
r
|
|
90
90
|
];
|
|
91
91
|
}
|
|
92
|
-
var
|
|
93
|
-
function
|
|
94
|
-
const t = a.useContext(
|
|
92
|
+
var Bn = a.createContext(void 0);
|
|
93
|
+
function De(e) {
|
|
94
|
+
const t = a.useContext(Bn);
|
|
95
95
|
return e || t || "ltr";
|
|
96
96
|
}
|
|
97
97
|
// @__NO_SIDE_EFFECTS__
|
|
98
|
-
function
|
|
99
|
-
const t = /* @__PURE__ */
|
|
100
|
-
const { children:
|
|
101
|
-
if (
|
|
102
|
-
const l =
|
|
103
|
-
return /* @__PURE__ */
|
|
98
|
+
function rt(e) {
|
|
99
|
+
const t = /* @__PURE__ */ Vn(e), n = a.forwardRef((r, o) => {
|
|
100
|
+
const { children: s, ...i } = r, c = a.Children.toArray(s), f = c.find(Wn);
|
|
101
|
+
if (f) {
|
|
102
|
+
const l = f.props.children, d = c.map((p) => p === f ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : p);
|
|
103
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
|
|
104
104
|
}
|
|
105
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: s });
|
|
106
106
|
});
|
|
107
107
|
return n.displayName = `${e}.Slot`, n;
|
|
108
108
|
}
|
|
109
109
|
// @__NO_SIDE_EFFECTS__
|
|
110
|
-
function
|
|
110
|
+
function Vn(e) {
|
|
111
111
|
const t = a.forwardRef((n, r) => {
|
|
112
|
-
const { children: o, ...
|
|
112
|
+
const { children: o, ...s } = n;
|
|
113
113
|
if (a.isValidElement(o)) {
|
|
114
|
-
const
|
|
115
|
-
return o.type !== a.Fragment && (c.ref = r ?
|
|
114
|
+
const i = jn(o), c = Hn(s, o.props);
|
|
115
|
+
return o.type !== a.Fragment && (c.ref = r ? ce(r, i) : i), a.cloneElement(o, c);
|
|
116
116
|
}
|
|
117
117
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
118
118
|
});
|
|
119
119
|
return t.displayName = `${e}.SlotClone`, t;
|
|
120
120
|
}
|
|
121
|
-
var
|
|
122
|
-
function
|
|
123
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
121
|
+
var Un = Symbol("radix.slottable");
|
|
122
|
+
function Wn(e) {
|
|
123
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Un;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Hn(e, t) {
|
|
126
126
|
const n = { ...t };
|
|
127
127
|
for (const r in t) {
|
|
128
|
-
const o = e[r],
|
|
129
|
-
/^on[A-Z]/.test(r) ? o &&
|
|
130
|
-
const
|
|
131
|
-
return o(...c),
|
|
132
|
-
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...
|
|
128
|
+
const o = e[r], s = t[r];
|
|
129
|
+
/^on[A-Z]/.test(r) ? o && s ? n[r] = (...c) => {
|
|
130
|
+
const f = s(...c);
|
|
131
|
+
return o(...c), f;
|
|
132
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" "));
|
|
133
133
|
}
|
|
134
134
|
return { ...e, ...n };
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function jn(e) {
|
|
137
137
|
var r, o;
|
|
138
138
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
139
139
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
140
140
|
}
|
|
141
|
-
var
|
|
141
|
+
var Yn = [
|
|
142
142
|
"a",
|
|
143
143
|
"button",
|
|
144
144
|
"div",
|
|
@@ -156,115 +156,115 @@ var Or = [
|
|
|
156
156
|
"span",
|
|
157
157
|
"svg",
|
|
158
158
|
"ul"
|
|
159
|
-
],
|
|
160
|
-
const n = /* @__PURE__ */
|
|
161
|
-
const { asChild:
|
|
162
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f
|
|
159
|
+
], G = Yn.reduce((e, t) => {
|
|
160
|
+
const n = /* @__PURE__ */ rt(`Primitive.${t}`), r = a.forwardRef((o, s) => {
|
|
161
|
+
const { asChild: i, ...c } = o, f = i ? n : t;
|
|
162
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(f, { ...c, ref: s });
|
|
163
163
|
});
|
|
164
164
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
165
165
|
}, {});
|
|
166
|
-
function
|
|
167
|
-
e &&
|
|
166
|
+
function ot(e, t) {
|
|
167
|
+
e && Nn.flushSync(() => e.dispatchEvent(t));
|
|
168
168
|
}
|
|
169
|
-
var
|
|
169
|
+
var Xn = "DismissableLayer", Pe = "dismissableLayer.update", zn = "dismissableLayer.pointerDownOutside", Zn = "dismissableLayer.focusOutside", qe, at = a.createContext({
|
|
170
170
|
layers: /* @__PURE__ */ new Set(),
|
|
171
171
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
172
172
|
branches: /* @__PURE__ */ new Set()
|
|
173
|
-
}),
|
|
173
|
+
}), st = a.forwardRef(
|
|
174
174
|
(e, t) => {
|
|
175
175
|
const {
|
|
176
176
|
disableOutsidePointerEvents: n = !1,
|
|
177
177
|
onEscapeKeyDown: r,
|
|
178
178
|
onPointerDownOutside: o,
|
|
179
|
-
onFocusOutside:
|
|
180
|
-
onInteractOutside:
|
|
179
|
+
onFocusOutside: s,
|
|
180
|
+
onInteractOutside: i,
|
|
181
181
|
onDismiss: c,
|
|
182
|
-
...
|
|
183
|
-
} = e, l = a.useContext(
|
|
184
|
-
const
|
|
185
|
-
!S ||
|
|
186
|
-
}, m),
|
|
187
|
-
const
|
|
188
|
-
[...l.branches].some((
|
|
182
|
+
...f
|
|
183
|
+
} = e, l = a.useContext(at), [d, p] = a.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = a.useState({}), v = D(t, (R) => p(R)), h = Array.from(l.layers), [b] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = h.indexOf(b), E = d ? h.indexOf(d) : -1, M = l.layersWithOutsidePointerEventsDisabled.size > 0, S = E >= w, I = Qn((R) => {
|
|
184
|
+
const P = R.target, $ = [...l.branches].some((N) => N.contains(P));
|
|
185
|
+
!S || $ || (o == null || o(R), i == null || i(R), R.defaultPrevented || c == null || c());
|
|
186
|
+
}, m), _ = er((R) => {
|
|
187
|
+
const P = R.target;
|
|
188
|
+
[...l.branches].some((N) => N.contains(P)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || c == null || c());
|
|
189
189
|
}, m);
|
|
190
|
-
return
|
|
191
|
-
|
|
190
|
+
return bn((R) => {
|
|
191
|
+
E === l.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && c && (R.preventDefault(), c()));
|
|
192
192
|
}, m), a.useEffect(() => {
|
|
193
193
|
if (d)
|
|
194
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
195
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents =
|
|
194
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (qe = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), Je(), () => {
|
|
195
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = qe);
|
|
196
196
|
};
|
|
197
197
|
}, [d, m, n, l]), a.useEffect(() => () => {
|
|
198
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
198
|
+
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), Je());
|
|
199
199
|
}, [d, l]), a.useEffect(() => {
|
|
200
|
-
const
|
|
201
|
-
return document.addEventListener(
|
|
202
|
-
}, []), /* @__PURE__ */
|
|
203
|
-
|
|
200
|
+
const R = () => g({});
|
|
201
|
+
return document.addEventListener(Pe, R), () => document.removeEventListener(Pe, R);
|
|
202
|
+
}, []), /* @__PURE__ */ u(
|
|
203
|
+
G.div,
|
|
204
204
|
{
|
|
205
|
-
...
|
|
206
|
-
ref:
|
|
205
|
+
...f,
|
|
206
|
+
ref: v,
|
|
207
207
|
style: {
|
|
208
|
-
pointerEvents:
|
|
208
|
+
pointerEvents: M ? S ? "auto" : "none" : void 0,
|
|
209
209
|
...e.style
|
|
210
210
|
},
|
|
211
|
-
onFocusCapture:
|
|
212
|
-
onBlurCapture:
|
|
213
|
-
onPointerDownCapture:
|
|
211
|
+
onFocusCapture: y(e.onFocusCapture, _.onFocusCapture),
|
|
212
|
+
onBlurCapture: y(e.onBlurCapture, _.onBlurCapture),
|
|
213
|
+
onPointerDownCapture: y(
|
|
214
214
|
e.onPointerDownCapture,
|
|
215
|
-
|
|
215
|
+
I.onPointerDownCapture
|
|
216
216
|
)
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
220
|
);
|
|
221
|
-
|
|
222
|
-
var
|
|
223
|
-
const n = a.useContext(
|
|
221
|
+
st.displayName = Xn;
|
|
222
|
+
var qn = "DismissableLayerBranch", Jn = a.forwardRef((e, t) => {
|
|
223
|
+
const n = a.useContext(at), r = a.useRef(null), o = D(t, r);
|
|
224
224
|
return a.useEffect(() => {
|
|
225
|
-
const
|
|
226
|
-
if (
|
|
227
|
-
return n.branches.add(
|
|
228
|
-
n.branches.delete(
|
|
225
|
+
const s = r.current;
|
|
226
|
+
if (s)
|
|
227
|
+
return n.branches.add(s), () => {
|
|
228
|
+
n.branches.delete(s);
|
|
229
229
|
};
|
|
230
|
-
}, [n.branches]), /* @__PURE__ */
|
|
230
|
+
}, [n.branches]), /* @__PURE__ */ u(G.div, { ...e, ref: o });
|
|
231
231
|
});
|
|
232
|
-
|
|
233
|
-
function
|
|
234
|
-
const n =
|
|
232
|
+
Jn.displayName = qn;
|
|
233
|
+
function Qn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
234
|
+
const n = X(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
235
235
|
});
|
|
236
236
|
return a.useEffect(() => {
|
|
237
|
-
const
|
|
237
|
+
const s = (c) => {
|
|
238
238
|
if (c.target && !r.current) {
|
|
239
|
-
let
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
let f = function() {
|
|
240
|
+
it(
|
|
241
|
+
zn,
|
|
242
242
|
n,
|
|
243
243
|
l,
|
|
244
244
|
{ discrete: !0 }
|
|
245
245
|
);
|
|
246
246
|
};
|
|
247
247
|
const l = { originalEvent: c };
|
|
248
|
-
c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current =
|
|
248
|
+
c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = f, t.addEventListener("click", o.current, { once: !0 })) : f();
|
|
249
249
|
} else
|
|
250
250
|
t.removeEventListener("click", o.current);
|
|
251
251
|
r.current = !1;
|
|
252
|
-
},
|
|
253
|
-
t.addEventListener("pointerdown",
|
|
252
|
+
}, i = window.setTimeout(() => {
|
|
253
|
+
t.addEventListener("pointerdown", s);
|
|
254
254
|
}, 0);
|
|
255
255
|
return () => {
|
|
256
|
-
window.clearTimeout(
|
|
256
|
+
window.clearTimeout(i), t.removeEventListener("pointerdown", s), t.removeEventListener("click", o.current);
|
|
257
257
|
};
|
|
258
258
|
}, [t, n]), {
|
|
259
259
|
// ensures we check React component tree (not just DOM tree)
|
|
260
260
|
onPointerDownCapture: () => r.current = !0
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const n =
|
|
263
|
+
function er(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
264
|
+
const n = X(e), r = a.useRef(!1);
|
|
265
265
|
return a.useEffect(() => {
|
|
266
|
-
const o = (
|
|
267
|
-
|
|
266
|
+
const o = (s) => {
|
|
267
|
+
s.target && !r.current && it(Zn, n, { originalEvent: s }, {
|
|
268
268
|
discrete: !1
|
|
269
269
|
});
|
|
270
270
|
};
|
|
@@ -274,359 +274,162 @@ function $r(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
274
274
|
onBlurCapture: () => r.current = !1
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
const e = new CustomEvent(
|
|
277
|
+
function Je() {
|
|
278
|
+
const e = new CustomEvent(Pe);
|
|
279
279
|
document.dispatchEvent(e);
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
const o = n.originalEvent.target,
|
|
283
|
-
t && o.addEventListener(e, t, { once: !0 }), r ?
|
|
281
|
+
function it(e, t, n, { discrete: r }) {
|
|
282
|
+
const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
283
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? ot(o, s) : o.dispatchEvent(s);
|
|
284
284
|
}
|
|
285
|
-
var
|
|
286
|
-
function
|
|
285
|
+
var we = 0;
|
|
286
|
+
function tr() {
|
|
287
287
|
a.useEffect(() => {
|
|
288
288
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
289
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
290
|
-
|
|
289
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Qe()), document.body.insertAdjacentElement("beforeend", e[1] ?? Qe()), we++, () => {
|
|
290
|
+
we === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), we--;
|
|
291
291
|
};
|
|
292
292
|
}, []);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Qe() {
|
|
295
295
|
const e = document.createElement("span");
|
|
296
296
|
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;
|
|
297
297
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
if (p) {
|
|
303
|
-
const l = p.props.children, d = c.map((u) => u === p ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : u);
|
|
304
|
-
return /* @__PURE__ */ f(t, { ...s, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
|
|
305
|
-
}
|
|
306
|
-
return /* @__PURE__ */ f(t, { ...s, ref: o, children: i });
|
|
307
|
-
});
|
|
308
|
-
return n.displayName = `${e}.Slot`, n;
|
|
309
|
-
}
|
|
310
|
-
// @__NO_SIDE_EFFECTS__
|
|
311
|
-
function Kr(e) {
|
|
312
|
-
const t = a.forwardRef((n, r) => {
|
|
313
|
-
const { children: o, ...i } = n;
|
|
314
|
-
if (a.isValidElement(o)) {
|
|
315
|
-
const s = Hr(o), c = Ur(i, o.props);
|
|
316
|
-
return o.type !== a.Fragment && (c.ref = r ? ie(r, s) : s), a.cloneElement(o, c);
|
|
317
|
-
}
|
|
318
|
-
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
319
|
-
});
|
|
320
|
-
return t.displayName = `${e}.SlotClone`, t;
|
|
321
|
-
}
|
|
322
|
-
var Vr = Symbol("radix.slottable");
|
|
323
|
-
function Gr(e) {
|
|
324
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Vr;
|
|
325
|
-
}
|
|
326
|
-
function Ur(e, t) {
|
|
327
|
-
const n = { ...t };
|
|
328
|
-
for (const r in t) {
|
|
329
|
-
const o = e[r], i = t[r];
|
|
330
|
-
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
|
|
331
|
-
const p = i(...c);
|
|
332
|
-
return o(...c), p;
|
|
333
|
-
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
|
|
334
|
-
}
|
|
335
|
-
return { ...e, ...n };
|
|
336
|
-
}
|
|
337
|
-
function Hr(e) {
|
|
338
|
-
var r, o;
|
|
339
|
-
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
340
|
-
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
341
|
-
}
|
|
342
|
-
var jr = [
|
|
343
|
-
"a",
|
|
344
|
-
"button",
|
|
345
|
-
"div",
|
|
346
|
-
"form",
|
|
347
|
-
"h2",
|
|
348
|
-
"h3",
|
|
349
|
-
"img",
|
|
350
|
-
"input",
|
|
351
|
-
"label",
|
|
352
|
-
"li",
|
|
353
|
-
"nav",
|
|
354
|
-
"ol",
|
|
355
|
-
"p",
|
|
356
|
-
"select",
|
|
357
|
-
"span",
|
|
358
|
-
"svg",
|
|
359
|
-
"ul"
|
|
360
|
-
], Yr = jr.reduce((e, t) => {
|
|
361
|
-
const n = /* @__PURE__ */ Wr(`Primitive.${t}`), r = a.forwardRef((o, i) => {
|
|
362
|
-
const { asChild: s, ...c } = o, p = s ? n : t;
|
|
363
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(p, { ...c, ref: i });
|
|
364
|
-
});
|
|
365
|
-
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
366
|
-
}, {}), ke = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount", Ct = { bubbles: !1, cancelable: !0 }, Xr = "FocusScope", kt = a.forwardRef((e, t) => {
|
|
367
|
-
const {
|
|
368
|
-
loop: n = !1,
|
|
369
|
-
trapped: r = !1,
|
|
370
|
-
onMountAutoFocus: o,
|
|
371
|
-
onUnmountAutoFocus: i,
|
|
372
|
-
...s
|
|
373
|
-
} = e, [c, p] = a.useState(null), l = U(o), d = U(i), u = a.useRef(null), m = T(t, (v) => p(v)), g = a.useRef({
|
|
374
|
-
paused: !1,
|
|
375
|
-
pause() {
|
|
376
|
-
this.paused = !0;
|
|
377
|
-
},
|
|
378
|
-
resume() {
|
|
379
|
-
this.paused = !1;
|
|
380
|
-
}
|
|
381
|
-
}).current;
|
|
382
|
-
a.useEffect(() => {
|
|
383
|
-
if (r) {
|
|
384
|
-
let v = function(E) {
|
|
385
|
-
if (g.paused || !c) return;
|
|
386
|
-
const S = E.target;
|
|
387
|
-
c.contains(S) ? u.current = S : j(u.current, { select: !0 });
|
|
388
|
-
}, h = function(E) {
|
|
389
|
-
if (g.paused || !c) return;
|
|
390
|
-
const S = E.relatedTarget;
|
|
391
|
-
S !== null && (c.contains(S) || j(u.current, { select: !0 }));
|
|
392
|
-
}, y = function(E) {
|
|
393
|
-
if (document.activeElement === document.body)
|
|
394
|
-
for (const P of E)
|
|
395
|
-
P.removedNodes.length > 0 && j(c);
|
|
396
|
-
};
|
|
397
|
-
document.addEventListener("focusin", v), document.addEventListener("focusout", h);
|
|
398
|
-
const C = new MutationObserver(y);
|
|
399
|
-
return c && C.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
400
|
-
document.removeEventListener("focusin", v), document.removeEventListener("focusout", h), C.disconnect();
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
}, [r, c, g.paused]), a.useEffect(() => {
|
|
404
|
-
if (c) {
|
|
405
|
-
St.add(g);
|
|
406
|
-
const v = document.activeElement;
|
|
407
|
-
if (!c.contains(v)) {
|
|
408
|
-
const y = new CustomEvent(ke, Ct);
|
|
409
|
-
c.addEventListener(ke, l), c.dispatchEvent(y), y.defaultPrevented || (zr(eo($t(c)), { select: !0 }), document.activeElement === v && j(c));
|
|
410
|
-
}
|
|
411
|
-
return () => {
|
|
412
|
-
c.removeEventListener(ke, l), setTimeout(() => {
|
|
413
|
-
const y = new CustomEvent($e, Ct);
|
|
414
|
-
c.addEventListener($e, d), c.dispatchEvent(y), y.defaultPrevented || j(v ?? document.body, { select: !0 }), c.removeEventListener($e, d), St.remove(g);
|
|
415
|
-
}, 0);
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
}, [c, l, d, g]);
|
|
419
|
-
const b = a.useCallback(
|
|
420
|
-
(v) => {
|
|
421
|
-
if (!n && !r || g.paused) return;
|
|
422
|
-
const h = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, y = document.activeElement;
|
|
423
|
-
if (h && y) {
|
|
424
|
-
const C = v.currentTarget, [E, S] = Zr(C);
|
|
425
|
-
E && S ? !v.shiftKey && y === S ? (v.preventDefault(), n && j(E, { select: !0 })) : v.shiftKey && y === E && (v.preventDefault(), n && j(S, { select: !0 })) : y === C && v.preventDefault();
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
[n, r, g.paused]
|
|
429
|
-
);
|
|
430
|
-
return /* @__PURE__ */ f(Yr.div, { tabIndex: -1, ...s, ref: m, onKeyDown: b });
|
|
431
|
-
});
|
|
432
|
-
kt.displayName = Xr;
|
|
433
|
-
function zr(e, { select: t = !1 } = {}) {
|
|
434
|
-
const n = document.activeElement;
|
|
435
|
-
for (const r of e)
|
|
436
|
-
if (j(r, { select: t }), document.activeElement !== n) return;
|
|
437
|
-
}
|
|
438
|
-
function Zr(e) {
|
|
439
|
-
const t = $t(e), n = Et(t, e), r = Et(t.reverse(), e);
|
|
440
|
-
return [n, r];
|
|
441
|
-
}
|
|
442
|
-
function $t(e) {
|
|
443
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
444
|
-
acceptNode: (r) => {
|
|
445
|
-
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
446
|
-
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
450
|
-
return t;
|
|
451
|
-
}
|
|
452
|
-
function Et(e, t) {
|
|
453
|
-
for (const n of e)
|
|
454
|
-
if (!qr(n, { upTo: t })) return n;
|
|
455
|
-
}
|
|
456
|
-
function qr(e, { upTo: t }) {
|
|
457
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
458
|
-
for (; e; ) {
|
|
459
|
-
if (t !== void 0 && e === t) return !1;
|
|
460
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
461
|
-
e = e.parentElement;
|
|
462
|
-
}
|
|
463
|
-
return !1;
|
|
464
|
-
}
|
|
465
|
-
function Qr(e) {
|
|
466
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
467
|
-
}
|
|
468
|
-
function j(e, { select: t = !1 } = {}) {
|
|
469
|
-
if (e && e.focus) {
|
|
470
|
-
const n = document.activeElement;
|
|
471
|
-
e.focus({ preventScroll: !0 }), e !== n && Qr(e) && t && e.select();
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
var St = Jr();
|
|
475
|
-
function Jr() {
|
|
476
|
-
let e = [];
|
|
477
|
-
return {
|
|
478
|
-
add(t) {
|
|
479
|
-
const n = e[0];
|
|
480
|
-
t !== n && (n == null || n.pause()), e = wt(e, t), e.unshift(t);
|
|
481
|
-
},
|
|
482
|
-
remove(t) {
|
|
483
|
-
var n;
|
|
484
|
-
e = wt(e, t), (n = e[0]) == null || n.resume();
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
function wt(e, t) {
|
|
489
|
-
const n = [...e], r = n.indexOf(t);
|
|
490
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
491
|
-
}
|
|
492
|
-
function eo(e) {
|
|
493
|
-
return e.filter((t) => t.tagName !== "A");
|
|
494
|
-
}
|
|
495
|
-
var to = "Arrow", Bt = a.forwardRef((e, t) => {
|
|
496
|
-
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
497
|
-
return /* @__PURE__ */ f(
|
|
498
|
-
B.svg,
|
|
298
|
+
var nr = "Arrow", ct = a.forwardRef((e, t) => {
|
|
299
|
+
const { children: n, width: r = 10, height: o = 5, ...s } = e;
|
|
300
|
+
return /* @__PURE__ */ u(
|
|
301
|
+
G.svg,
|
|
499
302
|
{
|
|
500
|
-
...
|
|
303
|
+
...s,
|
|
501
304
|
ref: t,
|
|
502
305
|
width: r,
|
|
503
306
|
height: o,
|
|
504
307
|
viewBox: "0 0 30 10",
|
|
505
308
|
preserveAspectRatio: "none",
|
|
506
|
-
children: e.asChild ? n : /* @__PURE__ */
|
|
309
|
+
children: e.asChild ? n : /* @__PURE__ */ u("polygon", { points: "0,0 30,0 15,10" })
|
|
507
310
|
}
|
|
508
311
|
);
|
|
509
312
|
});
|
|
510
|
-
|
|
511
|
-
var
|
|
313
|
+
ct.displayName = nr;
|
|
314
|
+
var rr = ct, Fe = "Popper", [ut, lt] = ue(Fe), [or, dt] = ut(Fe), ft = (e) => {
|
|
512
315
|
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
513
|
-
return /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ u(or, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
514
317
|
};
|
|
515
|
-
|
|
516
|
-
var
|
|
318
|
+
ft.displayName = Fe;
|
|
319
|
+
var pt = "PopperAnchor", mt = a.forwardRef(
|
|
517
320
|
(e, t) => {
|
|
518
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e,
|
|
321
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, s = dt(pt, n), i = a.useRef(null), c = D(t, i);
|
|
519
322
|
return a.useEffect(() => {
|
|
520
|
-
|
|
521
|
-
}), r ? null : /* @__PURE__ */
|
|
323
|
+
s.onAnchorChange((r == null ? void 0 : r.current) || i.current);
|
|
324
|
+
}), r ? null : /* @__PURE__ */ u(G.div, { ...o, ref: c });
|
|
522
325
|
}
|
|
523
326
|
);
|
|
524
|
-
|
|
525
|
-
var
|
|
327
|
+
mt.displayName = pt;
|
|
328
|
+
var Le = "PopperContent", [ar, sr] = ut(Le), vt = a.forwardRef(
|
|
526
329
|
(e, t) => {
|
|
527
|
-
var
|
|
330
|
+
var V, ne, F, re, Ye, Xe;
|
|
528
331
|
const {
|
|
529
332
|
__scopePopper: n,
|
|
530
333
|
side: r = "bottom",
|
|
531
334
|
sideOffset: o = 0,
|
|
532
|
-
align:
|
|
533
|
-
alignOffset:
|
|
335
|
+
align: s = "center",
|
|
336
|
+
alignOffset: i = 0,
|
|
534
337
|
arrowPadding: c = 0,
|
|
535
|
-
avoidCollisions:
|
|
338
|
+
avoidCollisions: f = !0,
|
|
536
339
|
collisionBoundary: l = [],
|
|
537
340
|
collisionPadding: d = 0,
|
|
538
|
-
sticky:
|
|
341
|
+
sticky: p = "partial",
|
|
539
342
|
hideWhenDetached: m = !1,
|
|
540
343
|
updatePositionStrategy: g = "optimized",
|
|
541
|
-
onPlaced:
|
|
542
|
-
...
|
|
543
|
-
} = e,
|
|
544
|
-
padding:
|
|
545
|
-
boundary:
|
|
344
|
+
onPlaced: v,
|
|
345
|
+
...h
|
|
346
|
+
} = e, b = dt(Le, n), [w, E] = a.useState(null), M = D(t, (oe) => E(oe)), [S, I] = a.useState(null), _ = Cn(S), R = (_ == null ? void 0 : _.width) ?? 0, P = (_ == null ? void 0 : _.height) ?? 0, $ = r + (s !== "center" ? "-" + s : ""), N = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, U = Array.isArray(l) ? l : [l], H = U.length > 0, B = {
|
|
347
|
+
padding: N,
|
|
348
|
+
boundary: U.filter(cr),
|
|
546
349
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
547
|
-
altBoundary:
|
|
548
|
-
}, { refs:
|
|
350
|
+
altBoundary: H
|
|
351
|
+
}, { refs: Z, floatingStyles: q, placement: k, isPositioned: J, middlewareData: T } = yn({
|
|
549
352
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
550
353
|
strategy: "fixed",
|
|
551
|
-
placement:
|
|
552
|
-
whileElementsMounted: (...
|
|
354
|
+
placement: $,
|
|
355
|
+
whileElementsMounted: (...oe) => In(...oe, {
|
|
553
356
|
animationFrame: g === "always"
|
|
554
357
|
}),
|
|
555
358
|
elements: {
|
|
556
|
-
reference:
|
|
359
|
+
reference: b.anchor
|
|
557
360
|
},
|
|
558
361
|
middleware: [
|
|
559
|
-
|
|
560
|
-
|
|
362
|
+
En({ mainAxis: o + P, alignmentAxis: i }),
|
|
363
|
+
f && Mn({
|
|
561
364
|
mainAxis: !0,
|
|
562
365
|
crossAxis: !1,
|
|
563
|
-
limiter:
|
|
564
|
-
...
|
|
366
|
+
limiter: p === "partial" ? _n() : void 0,
|
|
367
|
+
...B
|
|
565
368
|
}),
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
...
|
|
569
|
-
apply: ({ elements:
|
|
570
|
-
const { width:
|
|
571
|
-
|
|
369
|
+
f && wn({ ...B }),
|
|
370
|
+
Rn({
|
|
371
|
+
...B,
|
|
372
|
+
apply: ({ elements: oe, rects: ze, availableWidth: mn, availableHeight: vn }) => {
|
|
373
|
+
const { width: gn, height: hn } = ze.reference, ge = oe.floating.style;
|
|
374
|
+
ge.setProperty("--radix-popper-available-width", `${mn}px`), ge.setProperty("--radix-popper-available-height", `${vn}px`), ge.setProperty("--radix-popper-anchor-width", `${gn}px`), ge.setProperty("--radix-popper-anchor-height", `${hn}px`);
|
|
572
375
|
}
|
|
573
376
|
}),
|
|
574
|
-
S &&
|
|
575
|
-
|
|
576
|
-
m &&
|
|
377
|
+
S && Sn({ element: S, padding: c }),
|
|
378
|
+
ur({ arrowWidth: R, arrowHeight: P }),
|
|
379
|
+
m && Pn({ strategy: "referenceHidden", ...B })
|
|
577
380
|
]
|
|
578
|
-
}), [
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}, [
|
|
582
|
-
const
|
|
583
|
-
return
|
|
584
|
-
|
|
585
|
-
}, [
|
|
381
|
+
}), [C, O] = bt(k), A = X(v);
|
|
382
|
+
Se(() => {
|
|
383
|
+
J && (A == null || A());
|
|
384
|
+
}, [J, A]);
|
|
385
|
+
const K = (V = T.arrow) == null ? void 0 : V.x, ee = (ne = T.arrow) == null ? void 0 : ne.y, te = ((F = T.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, j] = a.useState();
|
|
386
|
+
return Se(() => {
|
|
387
|
+
w && j(window.getComputedStyle(w).zIndex);
|
|
388
|
+
}, [w]), /* @__PURE__ */ u(
|
|
586
389
|
"div",
|
|
587
390
|
{
|
|
588
|
-
ref:
|
|
391
|
+
ref: Z.setFloating,
|
|
589
392
|
"data-radix-popper-content-wrapper": "",
|
|
590
393
|
style: {
|
|
591
|
-
...
|
|
592
|
-
transform:
|
|
394
|
+
...q,
|
|
395
|
+
transform: J ? q.transform : "translate(0, -200%)",
|
|
593
396
|
// keep off the page when measuring
|
|
594
397
|
minWidth: "max-content",
|
|
595
|
-
zIndex:
|
|
398
|
+
zIndex: ve,
|
|
596
399
|
"--radix-popper-transform-origin": [
|
|
597
|
-
(
|
|
598
|
-
(
|
|
400
|
+
(re = T.transformOrigin) == null ? void 0 : re.x,
|
|
401
|
+
(Ye = T.transformOrigin) == null ? void 0 : Ye.y
|
|
599
402
|
].join(" "),
|
|
600
403
|
// hide the content if using the hide middleware and should be hidden
|
|
601
404
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
602
405
|
// as if the PopperContent isn't there at all
|
|
603
|
-
...((
|
|
406
|
+
...((Xe = T.hide) == null ? void 0 : Xe.referenceHidden) && {
|
|
604
407
|
visibility: "hidden",
|
|
605
408
|
pointerEvents: "none"
|
|
606
409
|
}
|
|
607
410
|
},
|
|
608
411
|
dir: e.dir,
|
|
609
|
-
children: /* @__PURE__ */
|
|
610
|
-
|
|
412
|
+
children: /* @__PURE__ */ u(
|
|
413
|
+
ar,
|
|
611
414
|
{
|
|
612
415
|
scope: n,
|
|
613
|
-
placedSide:
|
|
614
|
-
onArrowChange:
|
|
615
|
-
arrowX:
|
|
616
|
-
arrowY:
|
|
617
|
-
shouldHideArrow:
|
|
618
|
-
children: /* @__PURE__ */
|
|
619
|
-
|
|
416
|
+
placedSide: C,
|
|
417
|
+
onArrowChange: I,
|
|
418
|
+
arrowX: K,
|
|
419
|
+
arrowY: ee,
|
|
420
|
+
shouldHideArrow: te,
|
|
421
|
+
children: /* @__PURE__ */ u(
|
|
422
|
+
G.div,
|
|
620
423
|
{
|
|
621
|
-
"data-side":
|
|
622
|
-
"data-align":
|
|
623
|
-
...
|
|
624
|
-
ref:
|
|
424
|
+
"data-side": C,
|
|
425
|
+
"data-align": O,
|
|
426
|
+
...h,
|
|
427
|
+
ref: M,
|
|
625
428
|
style: {
|
|
626
|
-
...
|
|
429
|
+
...h.style,
|
|
627
430
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
628
431
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
629
|
-
animation:
|
|
432
|
+
animation: J ? void 0 : "none"
|
|
630
433
|
}
|
|
631
434
|
}
|
|
632
435
|
)
|
|
@@ -636,43 +439,43 @@ var nt = "PopperContent", [oo, ao] = Wt(nt), jt = a.forwardRef(
|
|
|
636
439
|
);
|
|
637
440
|
}
|
|
638
441
|
);
|
|
639
|
-
|
|
640
|
-
var
|
|
442
|
+
vt.displayName = Le;
|
|
443
|
+
var gt = "PopperArrow", ir = {
|
|
641
444
|
top: "bottom",
|
|
642
445
|
right: "left",
|
|
643
446
|
bottom: "top",
|
|
644
447
|
left: "right"
|
|
645
|
-
},
|
|
646
|
-
const { __scopePopper: r, ...o } = t,
|
|
448
|
+
}, ht = a.forwardRef(function(t, n) {
|
|
449
|
+
const { __scopePopper: r, ...o } = t, s = sr(gt, r), i = ir[s.placedSide];
|
|
647
450
|
return (
|
|
648
451
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
649
452
|
// doesn't report size as we'd expect on SVG elements.
|
|
650
453
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
651
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ u(
|
|
652
455
|
"span",
|
|
653
456
|
{
|
|
654
|
-
ref:
|
|
457
|
+
ref: s.onArrowChange,
|
|
655
458
|
style: {
|
|
656
459
|
position: "absolute",
|
|
657
|
-
left:
|
|
658
|
-
top:
|
|
659
|
-
[
|
|
460
|
+
left: s.arrowX,
|
|
461
|
+
top: s.arrowY,
|
|
462
|
+
[i]: 0,
|
|
660
463
|
transformOrigin: {
|
|
661
464
|
top: "",
|
|
662
465
|
right: "0 0",
|
|
663
466
|
bottom: "center 0",
|
|
664
467
|
left: "100% 0"
|
|
665
|
-
}[
|
|
468
|
+
}[s.placedSide],
|
|
666
469
|
transform: {
|
|
667
470
|
top: "translateY(100%)",
|
|
668
471
|
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
669
472
|
bottom: "rotate(180deg)",
|
|
670
473
|
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
671
|
-
}[
|
|
672
|
-
visibility:
|
|
474
|
+
}[s.placedSide],
|
|
475
|
+
visibility: s.shouldHideArrow ? "hidden" : void 0
|
|
673
476
|
},
|
|
674
|
-
children: /* @__PURE__ */
|
|
675
|
-
|
|
477
|
+
children: /* @__PURE__ */ u(
|
|
478
|
+
rr,
|
|
676
479
|
{
|
|
677
480
|
...o,
|
|
678
481
|
ref: n,
|
|
@@ -687,77 +490,77 @@ var Yt = "PopperArrow", io = {
|
|
|
687
490
|
)
|
|
688
491
|
);
|
|
689
492
|
});
|
|
690
|
-
|
|
691
|
-
function
|
|
493
|
+
ht.displayName = gt;
|
|
494
|
+
function cr(e) {
|
|
692
495
|
return e !== null;
|
|
693
496
|
}
|
|
694
|
-
var
|
|
497
|
+
var ur = (e) => ({
|
|
695
498
|
name: "transformOrigin",
|
|
696
499
|
options: e,
|
|
697
500
|
fn(t) {
|
|
698
|
-
var
|
|
699
|
-
const { placement: n, rects: r, middlewareData: o } = t,
|
|
700
|
-
let
|
|
701
|
-
return l === "bottom" ? (
|
|
501
|
+
var b, w, E;
|
|
502
|
+
const { placement: n, rects: r, middlewareData: o } = t, i = ((b = o.arrow) == null ? void 0 : b.centerOffset) !== 0, c = i ? 0 : e.arrowWidth, f = i ? 0 : e.arrowHeight, [l, d] = bt(n), p = { start: "0%", center: "50%", end: "100%" }[d], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + c / 2, g = (((E = o.arrow) == null ? void 0 : E.y) ?? 0) + f / 2;
|
|
503
|
+
let v = "", h = "";
|
|
504
|
+
return l === "bottom" ? (v = i ? p : `${m}px`, h = `${-f}px`) : l === "top" ? (v = i ? p : `${m}px`, h = `${r.floating.height + f}px`) : l === "right" ? (v = `${-f}px`, h = i ? p : `${g}px`) : l === "left" && (v = `${r.floating.width + f}px`, h = i ? p : `${g}px`), { data: { x: v, y: h } };
|
|
702
505
|
}
|
|
703
506
|
});
|
|
704
|
-
function
|
|
507
|
+
function bt(e) {
|
|
705
508
|
const [t, n = "center"] = e.split("-");
|
|
706
509
|
return [t, n];
|
|
707
510
|
}
|
|
708
|
-
var
|
|
511
|
+
var Ct = ft, lr = mt, dr = vt, fr = ht, pr = "Portal", yt = a.forwardRef((e, t) => {
|
|
709
512
|
var c;
|
|
710
|
-
const { container: n, ...r } = e, [o,
|
|
711
|
-
|
|
712
|
-
const
|
|
713
|
-
return
|
|
513
|
+
const { container: n, ...r } = e, [o, s] = a.useState(!1);
|
|
514
|
+
Se(() => s(!0), []);
|
|
515
|
+
const i = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
|
|
516
|
+
return i ? Tn.createPortal(/* @__PURE__ */ u(G.div, { ...r, ref: t }), i) : null;
|
|
714
517
|
});
|
|
715
|
-
|
|
518
|
+
yt.displayName = pr;
|
|
716
519
|
// @__NO_SIDE_EFFECTS__
|
|
717
|
-
function
|
|
718
|
-
const t = /* @__PURE__ */
|
|
719
|
-
const { children:
|
|
720
|
-
if (
|
|
721
|
-
const l =
|
|
722
|
-
return /* @__PURE__ */
|
|
520
|
+
function mr(e) {
|
|
521
|
+
const t = /* @__PURE__ */ vr(e), n = a.forwardRef((r, o) => {
|
|
522
|
+
const { children: s, ...i } = r, c = a.Children.toArray(s), f = c.find(hr);
|
|
523
|
+
if (f) {
|
|
524
|
+
const l = f.props.children, d = c.map((p) => p === f ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : p);
|
|
525
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
|
|
723
526
|
}
|
|
724
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: s });
|
|
725
528
|
});
|
|
726
529
|
return n.displayName = `${e}.Slot`, n;
|
|
727
530
|
}
|
|
728
531
|
// @__NO_SIDE_EFFECTS__
|
|
729
|
-
function
|
|
532
|
+
function vr(e) {
|
|
730
533
|
const t = a.forwardRef((n, r) => {
|
|
731
|
-
const { children: o, ...
|
|
534
|
+
const { children: o, ...s } = n;
|
|
732
535
|
if (a.isValidElement(o)) {
|
|
733
|
-
const
|
|
734
|
-
return o.type !== a.Fragment && (c.ref = r ?
|
|
536
|
+
const i = Cr(o), c = br(s, o.props);
|
|
537
|
+
return o.type !== a.Fragment && (c.ref = r ? ce(r, i) : i), a.cloneElement(o, c);
|
|
735
538
|
}
|
|
736
539
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
737
540
|
});
|
|
738
541
|
return t.displayName = `${e}.SlotClone`, t;
|
|
739
542
|
}
|
|
740
|
-
var
|
|
741
|
-
function
|
|
742
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
543
|
+
var gr = Symbol("radix.slottable");
|
|
544
|
+
function hr(e) {
|
|
545
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === gr;
|
|
743
546
|
}
|
|
744
|
-
function
|
|
547
|
+
function br(e, t) {
|
|
745
548
|
const n = { ...t };
|
|
746
549
|
for (const r in t) {
|
|
747
|
-
const o = e[r],
|
|
748
|
-
/^on[A-Z]/.test(r) ? o &&
|
|
749
|
-
const
|
|
750
|
-
return o(...c),
|
|
751
|
-
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...
|
|
550
|
+
const o = e[r], s = t[r];
|
|
551
|
+
/^on[A-Z]/.test(r) ? o && s ? n[r] = (...c) => {
|
|
552
|
+
const f = s(...c);
|
|
553
|
+
return o(...c), f;
|
|
554
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" "));
|
|
752
555
|
}
|
|
753
556
|
return { ...e, ...n };
|
|
754
557
|
}
|
|
755
|
-
function
|
|
558
|
+
function Cr(e) {
|
|
756
559
|
var r, o;
|
|
757
560
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
758
561
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
759
562
|
}
|
|
760
|
-
var
|
|
563
|
+
var yr = [
|
|
761
564
|
"a",
|
|
762
565
|
"button",
|
|
763
566
|
"div",
|
|
@@ -775,151 +578,151 @@ var Co = [
|
|
|
775
578
|
"span",
|
|
776
579
|
"svg",
|
|
777
580
|
"ul"
|
|
778
|
-
],
|
|
779
|
-
const n = /* @__PURE__ */
|
|
780
|
-
const { asChild:
|
|
781
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f
|
|
581
|
+
], Et = yr.reduce((e, t) => {
|
|
582
|
+
const n = /* @__PURE__ */ mr(`Primitive.${t}`), r = a.forwardRef((o, s) => {
|
|
583
|
+
const { asChild: i, ...c } = o, f = i ? n : t;
|
|
584
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(f, { ...c, ref: s });
|
|
782
585
|
});
|
|
783
586
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
784
|
-
}, {}),
|
|
785
|
-
|
|
786
|
-
[
|
|
787
|
-
), [
|
|
788
|
-
(e, t) => /* @__PURE__ */
|
|
587
|
+
}, {}), Re = "rovingFocusGroup.onEntryFocus", Er = { bubbles: !1, cancelable: !0 }, le = "RovingFocusGroup", [_e, Mt, Mr] = Te(le), [wr, ye] = ue(
|
|
588
|
+
le,
|
|
589
|
+
[Mr]
|
|
590
|
+
), [Rr, Sr] = wr(le), wt = a.forwardRef(
|
|
591
|
+
(e, t) => /* @__PURE__ */ u(_e.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(_e.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Pr, { ...e, ref: t }) }) })
|
|
789
592
|
);
|
|
790
|
-
|
|
791
|
-
var
|
|
593
|
+
wt.displayName = le;
|
|
594
|
+
var Pr = a.forwardRef((e, t) => {
|
|
792
595
|
const {
|
|
793
596
|
__scopeRovingFocusGroup: n,
|
|
794
597
|
orientation: r,
|
|
795
598
|
loop: o = !1,
|
|
796
|
-
dir:
|
|
797
|
-
currentTabStopId:
|
|
599
|
+
dir: s,
|
|
600
|
+
currentTabStopId: i,
|
|
798
601
|
defaultCurrentTabStopId: c,
|
|
799
|
-
onCurrentTabStopIdChange:
|
|
602
|
+
onCurrentTabStopIdChange: f,
|
|
800
603
|
onEntryFocus: l,
|
|
801
604
|
preventScrollOnEntryFocus: d = !1,
|
|
802
|
-
...
|
|
803
|
-
} = e, m = a.useRef(null), g =
|
|
804
|
-
prop:
|
|
605
|
+
...p
|
|
606
|
+
} = e, m = a.useRef(null), g = D(t, m), v = De(s), [h, b] = Ne({
|
|
607
|
+
prop: i,
|
|
805
608
|
defaultProp: c ?? null,
|
|
806
|
-
onChange:
|
|
807
|
-
caller:
|
|
808
|
-
}), [
|
|
609
|
+
onChange: f,
|
|
610
|
+
caller: le
|
|
611
|
+
}), [w, E] = a.useState(!1), M = X(l), S = Mt(n), I = a.useRef(!1), [_, R] = a.useState(0);
|
|
809
612
|
return a.useEffect(() => {
|
|
810
|
-
const
|
|
811
|
-
if (
|
|
812
|
-
return
|
|
813
|
-
}, [
|
|
814
|
-
|
|
613
|
+
const P = m.current;
|
|
614
|
+
if (P)
|
|
615
|
+
return P.addEventListener(Re, M), () => P.removeEventListener(Re, M);
|
|
616
|
+
}, [M]), /* @__PURE__ */ u(
|
|
617
|
+
Rr,
|
|
815
618
|
{
|
|
816
619
|
scope: n,
|
|
817
620
|
orientation: r,
|
|
818
|
-
dir:
|
|
621
|
+
dir: v,
|
|
819
622
|
loop: o,
|
|
820
|
-
currentTabStopId:
|
|
623
|
+
currentTabStopId: h,
|
|
821
624
|
onItemFocus: a.useCallback(
|
|
822
|
-
(
|
|
823
|
-
[
|
|
625
|
+
(P) => b(P),
|
|
626
|
+
[b]
|
|
824
627
|
),
|
|
825
|
-
onItemShiftTab: a.useCallback(() =>
|
|
628
|
+
onItemShiftTab: a.useCallback(() => E(!0), []),
|
|
826
629
|
onFocusableItemAdd: a.useCallback(
|
|
827
|
-
() =>
|
|
630
|
+
() => R((P) => P + 1),
|
|
828
631
|
[]
|
|
829
632
|
),
|
|
830
633
|
onFocusableItemRemove: a.useCallback(
|
|
831
|
-
() =>
|
|
634
|
+
() => R((P) => P - 1),
|
|
832
635
|
[]
|
|
833
636
|
),
|
|
834
|
-
children: /* @__PURE__ */
|
|
835
|
-
|
|
637
|
+
children: /* @__PURE__ */ u(
|
|
638
|
+
Et.div,
|
|
836
639
|
{
|
|
837
|
-
tabIndex:
|
|
640
|
+
tabIndex: w || _ === 0 ? -1 : 0,
|
|
838
641
|
"data-orientation": r,
|
|
839
|
-
...
|
|
642
|
+
...p,
|
|
840
643
|
ref: g,
|
|
841
644
|
style: { outline: "none", ...e.style },
|
|
842
|
-
onMouseDown:
|
|
843
|
-
|
|
645
|
+
onMouseDown: y(e.onMouseDown, () => {
|
|
646
|
+
I.current = !0;
|
|
844
647
|
}),
|
|
845
|
-
onFocus:
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
const
|
|
849
|
-
if (
|
|
850
|
-
const
|
|
648
|
+
onFocus: y(e.onFocus, (P) => {
|
|
649
|
+
const $ = !I.current;
|
|
650
|
+
if (P.target === P.currentTarget && $ && !w) {
|
|
651
|
+
const N = new CustomEvent(Re, Er);
|
|
652
|
+
if (P.currentTarget.dispatchEvent(N), !N.defaultPrevented) {
|
|
653
|
+
const U = S().filter((k) => k.focusable), H = U.find((k) => k.active), B = U.find((k) => k.id === h), q = [H, B, ...U].filter(
|
|
851
654
|
Boolean
|
|
852
|
-
).map((
|
|
853
|
-
|
|
655
|
+
).map((k) => k.ref.current);
|
|
656
|
+
Pt(q, d);
|
|
854
657
|
}
|
|
855
658
|
}
|
|
856
|
-
|
|
659
|
+
I.current = !1;
|
|
857
660
|
}),
|
|
858
|
-
onBlur:
|
|
661
|
+
onBlur: y(e.onBlur, () => E(!1))
|
|
859
662
|
}
|
|
860
663
|
)
|
|
861
664
|
}
|
|
862
665
|
);
|
|
863
|
-
}),
|
|
666
|
+
}), Rt = "RovingFocusGroupItem", St = a.forwardRef(
|
|
864
667
|
(e, t) => {
|
|
865
668
|
const {
|
|
866
669
|
__scopeRovingFocusGroup: n,
|
|
867
670
|
focusable: r = !0,
|
|
868
671
|
active: o = !1,
|
|
869
|
-
tabStopId:
|
|
870
|
-
children:
|
|
672
|
+
tabStopId: s,
|
|
673
|
+
children: i,
|
|
871
674
|
...c
|
|
872
|
-
} = e,
|
|
675
|
+
} = e, f = Q(), l = s || f, d = Sr(Rt, n), p = d.currentTabStopId === l, m = Mt(n), { onFocusableItemAdd: g, onFocusableItemRemove: v, currentTabStopId: h } = d;
|
|
873
676
|
return a.useEffect(() => {
|
|
874
677
|
if (r)
|
|
875
|
-
return g(), () =>
|
|
876
|
-
}, [r, g,
|
|
877
|
-
|
|
678
|
+
return g(), () => v();
|
|
679
|
+
}, [r, g, v]), /* @__PURE__ */ u(
|
|
680
|
+
_e.ItemSlot,
|
|
878
681
|
{
|
|
879
682
|
scope: n,
|
|
880
683
|
id: l,
|
|
881
684
|
focusable: r,
|
|
882
685
|
active: o,
|
|
883
|
-
children: /* @__PURE__ */
|
|
884
|
-
|
|
686
|
+
children: /* @__PURE__ */ u(
|
|
687
|
+
Et.span,
|
|
885
688
|
{
|
|
886
|
-
tabIndex:
|
|
689
|
+
tabIndex: p ? 0 : -1,
|
|
887
690
|
"data-orientation": d.orientation,
|
|
888
691
|
...c,
|
|
889
692
|
ref: t,
|
|
890
|
-
onMouseDown:
|
|
891
|
-
r ? d.onItemFocus(l) :
|
|
693
|
+
onMouseDown: y(e.onMouseDown, (b) => {
|
|
694
|
+
r ? d.onItemFocus(l) : b.preventDefault();
|
|
892
695
|
}),
|
|
893
|
-
onFocus:
|
|
894
|
-
onKeyDown:
|
|
895
|
-
if (
|
|
696
|
+
onFocus: y(e.onFocus, () => d.onItemFocus(l)),
|
|
697
|
+
onKeyDown: y(e.onKeyDown, (b) => {
|
|
698
|
+
if (b.key === "Tab" && b.shiftKey) {
|
|
896
699
|
d.onItemShiftTab();
|
|
897
700
|
return;
|
|
898
701
|
}
|
|
899
|
-
if (
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
-
if (
|
|
903
|
-
|
|
904
|
-
let
|
|
905
|
-
if (
|
|
906
|
-
else if (
|
|
907
|
-
|
|
908
|
-
const S =
|
|
909
|
-
|
|
702
|
+
if (b.target !== b.currentTarget) return;
|
|
703
|
+
const w = xr(b, d.orientation, d.dir);
|
|
704
|
+
if (w !== void 0) {
|
|
705
|
+
if (b.metaKey || b.ctrlKey || b.altKey || b.shiftKey) return;
|
|
706
|
+
b.preventDefault();
|
|
707
|
+
let M = m().filter((S) => S.focusable).map((S) => S.ref.current);
|
|
708
|
+
if (w === "last") M.reverse();
|
|
709
|
+
else if (w === "prev" || w === "next") {
|
|
710
|
+
w === "prev" && M.reverse();
|
|
711
|
+
const S = M.indexOf(b.currentTarget);
|
|
712
|
+
M = d.loop ? Ar(M, S + 1) : M.slice(S + 1);
|
|
910
713
|
}
|
|
911
|
-
setTimeout(() =>
|
|
714
|
+
setTimeout(() => Pt(M));
|
|
912
715
|
}
|
|
913
716
|
}),
|
|
914
|
-
children: typeof
|
|
717
|
+
children: typeof i == "function" ? i({ isCurrentTabStop: p, hasTabStop: h != null }) : i
|
|
915
718
|
}
|
|
916
719
|
)
|
|
917
720
|
}
|
|
918
721
|
);
|
|
919
722
|
}
|
|
920
723
|
);
|
|
921
|
-
|
|
922
|
-
var
|
|
724
|
+
St.displayName = Rt;
|
|
725
|
+
var _r = {
|
|
923
726
|
ArrowLeft: "prev",
|
|
924
727
|
ArrowUp: "prev",
|
|
925
728
|
ArrowRight: "next",
|
|
@@ -929,630 +732,110 @@ var _o = {
|
|
|
929
732
|
PageDown: "last",
|
|
930
733
|
End: "last"
|
|
931
734
|
};
|
|
932
|
-
function
|
|
735
|
+
function Ir(e, t) {
|
|
933
736
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
934
737
|
}
|
|
935
|
-
function
|
|
936
|
-
const r =
|
|
738
|
+
function xr(e, t, n) {
|
|
739
|
+
const r = Ir(e.key, n);
|
|
937
740
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
938
|
-
return
|
|
741
|
+
return _r[r];
|
|
939
742
|
}
|
|
940
|
-
function
|
|
743
|
+
function Pt(e, t = !1) {
|
|
941
744
|
const n = document.activeElement;
|
|
942
745
|
for (const r of e)
|
|
943
746
|
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
944
747
|
}
|
|
945
|
-
function
|
|
748
|
+
function Ar(e, t) {
|
|
946
749
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
947
750
|
}
|
|
948
|
-
var
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
return t.ownerDocument.body;
|
|
953
|
-
}, te = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Me = {}, We = 0, cn = function(e) {
|
|
954
|
-
return e && (e.host || cn(e.parentNode));
|
|
955
|
-
}, No = function(e, t) {
|
|
956
|
-
return t.map(function(n) {
|
|
957
|
-
if (e.contains(n))
|
|
958
|
-
return n;
|
|
959
|
-
var r = cn(n);
|
|
960
|
-
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
961
|
-
}).filter(function(n) {
|
|
962
|
-
return !!n;
|
|
963
|
-
});
|
|
964
|
-
}, To = function(e, t, n, r) {
|
|
965
|
-
var o = No(t, Array.isArray(e) ? e : [e]);
|
|
966
|
-
Me[n] || (Me[n] = /* @__PURE__ */ new WeakMap());
|
|
967
|
-
var i = Me[n], s = [], c = /* @__PURE__ */ new Set(), p = new Set(o), l = function(u) {
|
|
968
|
-
!u || c.has(u) || (c.add(u), l(u.parentNode));
|
|
969
|
-
};
|
|
970
|
-
o.forEach(l);
|
|
971
|
-
var d = function(u) {
|
|
972
|
-
!u || p.has(u) || Array.prototype.forEach.call(u.children, function(m) {
|
|
973
|
-
if (c.has(m))
|
|
974
|
-
d(m);
|
|
975
|
-
else
|
|
976
|
-
try {
|
|
977
|
-
var g = m.getAttribute(r), b = g !== null && g !== "false", v = (te.get(m) || 0) + 1, h = (i.get(m) || 0) + 1;
|
|
978
|
-
te.set(m, v), i.set(m, h), s.push(m), v === 1 && b && we.set(m, !0), h === 1 && m.setAttribute(n, "true"), b || m.setAttribute(r, "true");
|
|
979
|
-
} catch (y) {
|
|
980
|
-
console.error("aria-hidden: cannot operate on ", m, y);
|
|
981
|
-
}
|
|
982
|
-
});
|
|
983
|
-
};
|
|
984
|
-
return d(t), c.clear(), We++, function() {
|
|
985
|
-
s.forEach(function(u) {
|
|
986
|
-
var m = te.get(u) - 1, g = i.get(u) - 1;
|
|
987
|
-
te.set(u, m), i.set(u, g), m || (we.has(u) || u.removeAttribute(r), we.delete(u)), g || u.removeAttribute(n);
|
|
988
|
-
}), We--, We || (te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Me = {});
|
|
989
|
-
};
|
|
990
|
-
}, Do = function(e, t, n) {
|
|
991
|
-
n === void 0 && (n = "data-aria-hidden");
|
|
992
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o = Oo(e);
|
|
993
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), To(r, o, n, "aria-hidden")) : function() {
|
|
994
|
-
return null;
|
|
995
|
-
};
|
|
996
|
-
}, K = function() {
|
|
997
|
-
return K = Object.assign || function(t) {
|
|
998
|
-
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
999
|
-
n = arguments[r];
|
|
1000
|
-
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
1001
|
-
}
|
|
1002
|
-
return t;
|
|
1003
|
-
}, K.apply(this, arguments);
|
|
1004
|
-
};
|
|
1005
|
-
function sn(e, t) {
|
|
1006
|
-
var n = {};
|
|
1007
|
-
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
1008
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1009
|
-
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
1010
|
-
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
1011
|
-
return n;
|
|
1012
|
-
}
|
|
1013
|
-
function Fo(e, t, n) {
|
|
1014
|
-
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
1015
|
-
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
1016
|
-
return e.concat(i || Array.prototype.slice.call(t));
|
|
1017
|
-
}
|
|
1018
|
-
var _e = "right-scroll-bar-position", Ie = "width-before-scroll-bar", Lo = "with-scroll-bars-hidden", ko = "--removed-body-scroll-bar-size";
|
|
1019
|
-
function Ke(e, t) {
|
|
1020
|
-
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
1021
|
-
}
|
|
1022
|
-
function $o(e, t) {
|
|
1023
|
-
var n = or(function() {
|
|
1024
|
-
return {
|
|
1025
|
-
// value
|
|
1026
|
-
value: e,
|
|
1027
|
-
// last callback
|
|
1028
|
-
callback: t,
|
|
1029
|
-
// "memoized" public interface
|
|
1030
|
-
facade: {
|
|
1031
|
-
get current() {
|
|
1032
|
-
return n.value;
|
|
1033
|
-
},
|
|
1034
|
-
set current(r) {
|
|
1035
|
-
var o = n.value;
|
|
1036
|
-
o !== r && (n.value = r, n.callback(r, o));
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
};
|
|
1040
|
-
})[0];
|
|
1041
|
-
return n.callback = t, n.facade;
|
|
1042
|
-
}
|
|
1043
|
-
var Bo = typeof window < "u" ? a.useLayoutEffect : a.useEffect, Mt = /* @__PURE__ */ new WeakMap();
|
|
1044
|
-
function Wo(e, t) {
|
|
1045
|
-
var n = $o(null, function(r) {
|
|
1046
|
-
return e.forEach(function(o) {
|
|
1047
|
-
return Ke(o, r);
|
|
1048
|
-
});
|
|
1049
|
-
});
|
|
1050
|
-
return Bo(function() {
|
|
1051
|
-
var r = Mt.get(n);
|
|
1052
|
-
if (r) {
|
|
1053
|
-
var o = new Set(r), i = new Set(e), s = n.current;
|
|
1054
|
-
o.forEach(function(c) {
|
|
1055
|
-
i.has(c) || Ke(c, null);
|
|
1056
|
-
}), i.forEach(function(c) {
|
|
1057
|
-
o.has(c) || Ke(c, s);
|
|
1058
|
-
});
|
|
1059
|
-
}
|
|
1060
|
-
Mt.set(n, e);
|
|
1061
|
-
}, [e]), n;
|
|
1062
|
-
}
|
|
1063
|
-
function Ko(e) {
|
|
1064
|
-
return e;
|
|
1065
|
-
}
|
|
1066
|
-
function Vo(e, t) {
|
|
1067
|
-
t === void 0 && (t = Ko);
|
|
1068
|
-
var n = [], r = !1, o = {
|
|
1069
|
-
read: function() {
|
|
1070
|
-
if (r)
|
|
1071
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
1072
|
-
return n.length ? n[n.length - 1] : e;
|
|
1073
|
-
},
|
|
1074
|
-
useMedium: function(i) {
|
|
1075
|
-
var s = t(i, r);
|
|
1076
|
-
return n.push(s), function() {
|
|
1077
|
-
n = n.filter(function(c) {
|
|
1078
|
-
return c !== s;
|
|
1079
|
-
});
|
|
1080
|
-
};
|
|
1081
|
-
},
|
|
1082
|
-
assignSyncMedium: function(i) {
|
|
1083
|
-
for (r = !0; n.length; ) {
|
|
1084
|
-
var s = n;
|
|
1085
|
-
n = [], s.forEach(i);
|
|
1086
|
-
}
|
|
1087
|
-
n = {
|
|
1088
|
-
push: function(c) {
|
|
1089
|
-
return i(c);
|
|
1090
|
-
},
|
|
1091
|
-
filter: function() {
|
|
1092
|
-
return n;
|
|
1093
|
-
}
|
|
1094
|
-
};
|
|
1095
|
-
},
|
|
1096
|
-
assignMedium: function(i) {
|
|
1097
|
-
r = !0;
|
|
1098
|
-
var s = [];
|
|
1099
|
-
if (n.length) {
|
|
1100
|
-
var c = n;
|
|
1101
|
-
n = [], c.forEach(i), s = n;
|
|
1102
|
-
}
|
|
1103
|
-
var p = function() {
|
|
1104
|
-
var d = s;
|
|
1105
|
-
s = [], d.forEach(i);
|
|
1106
|
-
}, l = function() {
|
|
1107
|
-
return Promise.resolve().then(p);
|
|
1108
|
-
};
|
|
1109
|
-
l(), n = {
|
|
1110
|
-
push: function(d) {
|
|
1111
|
-
s.push(d), l();
|
|
1112
|
-
},
|
|
1113
|
-
filter: function(d) {
|
|
1114
|
-
return s = s.filter(d), n;
|
|
1115
|
-
}
|
|
1116
|
-
};
|
|
1117
|
-
}
|
|
1118
|
-
};
|
|
1119
|
-
return o;
|
|
1120
|
-
}
|
|
1121
|
-
function Go(e) {
|
|
1122
|
-
e === void 0 && (e = {});
|
|
1123
|
-
var t = Vo(null);
|
|
1124
|
-
return t.options = K({ async: !0, ssr: !1 }, e), t;
|
|
1125
|
-
}
|
|
1126
|
-
var un = function(e) {
|
|
1127
|
-
var t = e.sideCar, n = sn(e, ["sideCar"]);
|
|
1128
|
-
if (!t)
|
|
1129
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
1130
|
-
var r = t.read();
|
|
1131
|
-
if (!r)
|
|
1132
|
-
throw new Error("Sidecar medium not found");
|
|
1133
|
-
return a.createElement(r, K({}, n));
|
|
1134
|
-
};
|
|
1135
|
-
un.isSideCarExport = !0;
|
|
1136
|
-
function Uo(e, t) {
|
|
1137
|
-
return e.useMedium(t), un;
|
|
1138
|
-
}
|
|
1139
|
-
var ln = Go(), Ve = function() {
|
|
1140
|
-
}, Te = a.forwardRef(function(e, t) {
|
|
1141
|
-
var n = a.useRef(null), r = a.useState({
|
|
1142
|
-
onScrollCapture: Ve,
|
|
1143
|
-
onWheelCapture: Ve,
|
|
1144
|
-
onTouchMoveCapture: Ve
|
|
1145
|
-
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, p = e.className, l = e.removeScrollBar, d = e.enabled, u = e.shards, m = e.sideCar, g = e.noRelative, b = e.noIsolation, v = e.inert, h = e.allowPinchZoom, y = e.as, C = y === void 0 ? "div" : y, E = e.gapMode, S = sn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), P = m, I = Wo([n, t]), M = K(K({}, S), o);
|
|
1146
|
-
return a.createElement(
|
|
1147
|
-
a.Fragment,
|
|
1148
|
-
null,
|
|
1149
|
-
d && a.createElement(P, { sideCar: ln, removeScrollBar: l, shards: u, noRelative: g, noIsolation: b, inert: v, setCallbacks: i, allowPinchZoom: !!h, lockRef: n, gapMode: E }),
|
|
1150
|
-
s ? a.cloneElement(a.Children.only(c), K(K({}, M), { ref: I })) : a.createElement(C, K({}, M, { className: p, ref: I }), c)
|
|
1151
|
-
);
|
|
1152
|
-
});
|
|
1153
|
-
Te.defaultProps = {
|
|
1154
|
-
enabled: !0,
|
|
1155
|
-
removeScrollBar: !0,
|
|
1156
|
-
inert: !1
|
|
1157
|
-
};
|
|
1158
|
-
Te.classNames = {
|
|
1159
|
-
fullWidth: Ie,
|
|
1160
|
-
zeroRight: _e
|
|
1161
|
-
};
|
|
1162
|
-
var Ho = function() {
|
|
1163
|
-
if (typeof __webpack_nonce__ < "u")
|
|
1164
|
-
return __webpack_nonce__;
|
|
1165
|
-
};
|
|
1166
|
-
function jo() {
|
|
1167
|
-
if (!document)
|
|
1168
|
-
return null;
|
|
1169
|
-
var e = document.createElement("style");
|
|
1170
|
-
e.type = "text/css";
|
|
1171
|
-
var t = Ho();
|
|
1172
|
-
return t && e.setAttribute("nonce", t), e;
|
|
1173
|
-
}
|
|
1174
|
-
function Yo(e, t) {
|
|
1175
|
-
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1176
|
-
}
|
|
1177
|
-
function Xo(e) {
|
|
1178
|
-
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1179
|
-
t.appendChild(e);
|
|
1180
|
-
}
|
|
1181
|
-
var zo = function() {
|
|
1182
|
-
var e = 0, t = null;
|
|
1183
|
-
return {
|
|
1184
|
-
add: function(n) {
|
|
1185
|
-
e == 0 && (t = jo()) && (Yo(t, n), Xo(t)), e++;
|
|
1186
|
-
},
|
|
1187
|
-
remove: function() {
|
|
1188
|
-
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1189
|
-
}
|
|
1190
|
-
};
|
|
1191
|
-
}, Zo = function() {
|
|
1192
|
-
var e = zo();
|
|
1193
|
-
return function(t, n) {
|
|
1194
|
-
a.useEffect(function() {
|
|
1195
|
-
return e.add(t), function() {
|
|
1196
|
-
e.remove();
|
|
1197
|
-
};
|
|
1198
|
-
}, [t && n]);
|
|
1199
|
-
};
|
|
1200
|
-
}, dn = function() {
|
|
1201
|
-
var e = Zo(), t = function(n) {
|
|
1202
|
-
var r = n.styles, o = n.dynamic;
|
|
1203
|
-
return e(r, o), null;
|
|
1204
|
-
};
|
|
1205
|
-
return t;
|
|
1206
|
-
}, qo = {
|
|
1207
|
-
left: 0,
|
|
1208
|
-
top: 0,
|
|
1209
|
-
right: 0,
|
|
1210
|
-
gap: 0
|
|
1211
|
-
}, Ge = function(e) {
|
|
1212
|
-
return parseInt(e || "", 10) || 0;
|
|
1213
|
-
}, Qo = function(e) {
|
|
1214
|
-
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1215
|
-
return [Ge(n), Ge(r), Ge(o)];
|
|
1216
|
-
}, Jo = function(e) {
|
|
1217
|
-
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1218
|
-
return qo;
|
|
1219
|
-
var t = Qo(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1220
|
-
return {
|
|
1221
|
-
left: t[0],
|
|
1222
|
-
top: t[1],
|
|
1223
|
-
right: t[2],
|
|
1224
|
-
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1225
|
-
};
|
|
1226
|
-
}, ea = dn(), ae = "data-scroll-locked", ta = function(e, t, n, r) {
|
|
1227
|
-
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
1228
|
-
return n === void 0 && (n = "margin"), `
|
|
1229
|
-
.`.concat(Lo, ` {
|
|
1230
|
-
overflow: hidden `).concat(r, `;
|
|
1231
|
-
padding-right: `).concat(c, "px ").concat(r, `;
|
|
1232
|
-
}
|
|
1233
|
-
body[`).concat(ae, `] {
|
|
1234
|
-
overflow: hidden `).concat(r, `;
|
|
1235
|
-
overscroll-behavior: contain;
|
|
1236
|
-
`).concat([
|
|
1237
|
-
t && "position: relative ".concat(r, ";"),
|
|
1238
|
-
n === "margin" && `
|
|
1239
|
-
padding-left: `.concat(o, `px;
|
|
1240
|
-
padding-top: `).concat(i, `px;
|
|
1241
|
-
padding-right: `).concat(s, `px;
|
|
1242
|
-
margin-left:0;
|
|
1243
|
-
margin-top:0;
|
|
1244
|
-
margin-right: `).concat(c, "px ").concat(r, `;
|
|
1245
|
-
`),
|
|
1246
|
-
n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
|
|
1247
|
-
].filter(Boolean).join(""), `
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
.`).concat(_e, ` {
|
|
1251
|
-
right: `).concat(c, "px ").concat(r, `;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.`).concat(Ie, ` {
|
|
1255
|
-
margin-right: `).concat(c, "px ").concat(r, `;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
.`).concat(_e, " .").concat(_e, ` {
|
|
1259
|
-
right: 0 `).concat(r, `;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
.`).concat(Ie, " .").concat(Ie, ` {
|
|
1263
|
-
margin-right: 0 `).concat(r, `;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
body[`).concat(ae, `] {
|
|
1267
|
-
`).concat(ko, ": ").concat(c, `px;
|
|
1268
|
-
}
|
|
1269
|
-
`);
|
|
1270
|
-
}, Rt = function() {
|
|
1271
|
-
var e = parseInt(document.body.getAttribute(ae) || "0", 10);
|
|
1272
|
-
return isFinite(e) ? e : 0;
|
|
1273
|
-
}, na = function() {
|
|
1274
|
-
a.useEffect(function() {
|
|
1275
|
-
return document.body.setAttribute(ae, (Rt() + 1).toString()), function() {
|
|
1276
|
-
var e = Rt() - 1;
|
|
1277
|
-
e <= 0 ? document.body.removeAttribute(ae) : document.body.setAttribute(ae, e.toString());
|
|
1278
|
-
};
|
|
1279
|
-
}, []);
|
|
1280
|
-
}, ra = function(e) {
|
|
1281
|
-
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
1282
|
-
na();
|
|
1283
|
-
var i = a.useMemo(function() {
|
|
1284
|
-
return Jo(o);
|
|
1285
|
-
}, [o]);
|
|
1286
|
-
return a.createElement(ea, { styles: ta(i, !t, o, n ? "" : "!important") });
|
|
1287
|
-
}, Ye = !1;
|
|
1288
|
-
if (typeof window < "u")
|
|
1289
|
-
try {
|
|
1290
|
-
var Re = Object.defineProperty({}, "passive", {
|
|
1291
|
-
get: function() {
|
|
1292
|
-
return Ye = !0, !0;
|
|
1293
|
-
}
|
|
1294
|
-
});
|
|
1295
|
-
window.addEventListener("test", Re, Re), window.removeEventListener("test", Re, Re);
|
|
1296
|
-
} catch {
|
|
1297
|
-
Ye = !1;
|
|
1298
|
-
}
|
|
1299
|
-
var ne = Ye ? { passive: !1 } : !1, oa = function(e) {
|
|
1300
|
-
return e.tagName === "TEXTAREA";
|
|
1301
|
-
}, fn = function(e, t) {
|
|
1302
|
-
if (!(e instanceof Element))
|
|
1303
|
-
return !1;
|
|
1304
|
-
var n = window.getComputedStyle(e);
|
|
1305
|
-
return (
|
|
1306
|
-
// not-not-scrollable
|
|
1307
|
-
n[t] !== "hidden" && // contains scroll inside self
|
|
1308
|
-
!(n.overflowY === n.overflowX && !oa(e) && n[t] === "visible")
|
|
1309
|
-
);
|
|
1310
|
-
}, aa = function(e) {
|
|
1311
|
-
return fn(e, "overflowY");
|
|
1312
|
-
}, ia = function(e) {
|
|
1313
|
-
return fn(e, "overflowX");
|
|
1314
|
-
}, Pt = function(e, t) {
|
|
1315
|
-
var n = t.ownerDocument, r = t;
|
|
1316
|
-
do {
|
|
1317
|
-
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
1318
|
-
var o = pn(e, r);
|
|
1319
|
-
if (o) {
|
|
1320
|
-
var i = vn(e, r), s = i[1], c = i[2];
|
|
1321
|
-
if (s > c)
|
|
1322
|
-
return !0;
|
|
1323
|
-
}
|
|
1324
|
-
r = r.parentNode;
|
|
1325
|
-
} while (r && r !== n.body);
|
|
1326
|
-
return !1;
|
|
1327
|
-
}, ca = function(e) {
|
|
1328
|
-
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
1329
|
-
return [
|
|
1330
|
-
t,
|
|
1331
|
-
n,
|
|
1332
|
-
r
|
|
1333
|
-
];
|
|
1334
|
-
}, sa = function(e) {
|
|
1335
|
-
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
1336
|
-
return [
|
|
1337
|
-
t,
|
|
1338
|
-
n,
|
|
1339
|
-
r
|
|
1340
|
-
];
|
|
1341
|
-
}, pn = function(e, t) {
|
|
1342
|
-
return e === "v" ? aa(t) : ia(t);
|
|
1343
|
-
}, vn = function(e, t) {
|
|
1344
|
-
return e === "v" ? ca(t) : sa(t);
|
|
1345
|
-
}, ua = function(e, t) {
|
|
1346
|
-
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1347
|
-
}, la = function(e, t, n, r, o) {
|
|
1348
|
-
var i = ua(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, p = t.contains(c), l = !1, d = s > 0, u = 0, m = 0;
|
|
1349
|
-
do {
|
|
1350
|
-
if (!c)
|
|
1351
|
-
break;
|
|
1352
|
-
var g = vn(e, c), b = g[0], v = g[1], h = g[2], y = v - h - i * b;
|
|
1353
|
-
(b || y) && pn(e, c) && (u += y, m += b);
|
|
1354
|
-
var C = c.parentNode;
|
|
1355
|
-
c = C && C.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? C.host : C;
|
|
1356
|
-
} while (
|
|
1357
|
-
// portaled content
|
|
1358
|
-
!p && c !== document.body || // self content
|
|
1359
|
-
p && (t.contains(c) || t === c)
|
|
1360
|
-
);
|
|
1361
|
-
return (d && Math.abs(u) < 1 || !d && Math.abs(m) < 1) && (l = !0), l;
|
|
1362
|
-
}, Pe = function(e) {
|
|
1363
|
-
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1364
|
-
}, _t = function(e) {
|
|
1365
|
-
return [e.deltaX, e.deltaY];
|
|
1366
|
-
}, It = function(e) {
|
|
1367
|
-
return e && "current" in e ? e.current : e;
|
|
1368
|
-
}, da = function(e, t) {
|
|
1369
|
-
return e[0] === t[0] && e[1] === t[1];
|
|
1370
|
-
}, fa = function(e) {
|
|
1371
|
-
return `
|
|
1372
|
-
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1373
|
-
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1374
|
-
`);
|
|
1375
|
-
}, pa = 0, re = [];
|
|
1376
|
-
function va(e) {
|
|
1377
|
-
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(pa++)[0], i = a.useState(dn)[0], s = a.useRef(e);
|
|
1378
|
-
a.useEffect(function() {
|
|
1379
|
-
s.current = e;
|
|
1380
|
-
}, [e]), a.useEffect(function() {
|
|
1381
|
-
if (e.inert) {
|
|
1382
|
-
document.body.classList.add("block-interactivity-".concat(o));
|
|
1383
|
-
var v = Fo([e.lockRef.current], (e.shards || []).map(It), !0).filter(Boolean);
|
|
1384
|
-
return v.forEach(function(h) {
|
|
1385
|
-
return h.classList.add("allow-interactivity-".concat(o));
|
|
1386
|
-
}), function() {
|
|
1387
|
-
document.body.classList.remove("block-interactivity-".concat(o)), v.forEach(function(h) {
|
|
1388
|
-
return h.classList.remove("allow-interactivity-".concat(o));
|
|
1389
|
-
});
|
|
1390
|
-
};
|
|
1391
|
-
}
|
|
1392
|
-
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1393
|
-
var c = a.useCallback(function(v, h) {
|
|
1394
|
-
if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
|
|
1395
|
-
return !s.current.allowPinchZoom;
|
|
1396
|
-
var y = Pe(v), C = n.current, E = "deltaX" in v ? v.deltaX : C[0] - y[0], S = "deltaY" in v ? v.deltaY : C[1] - y[1], P, I = v.target, M = Math.abs(E) > Math.abs(S) ? "h" : "v";
|
|
1397
|
-
if ("touches" in v && M === "h" && I.type === "range")
|
|
1398
|
-
return !1;
|
|
1399
|
-
var _ = Pt(M, I);
|
|
1400
|
-
if (!_)
|
|
1401
|
-
return !0;
|
|
1402
|
-
if (_ ? P = M : (P = M === "v" ? "h" : "v", _ = Pt(M, I)), !_)
|
|
1403
|
-
return !1;
|
|
1404
|
-
if (!r.current && "changedTouches" in v && (E || S) && (r.current = P), !P)
|
|
1405
|
-
return !0;
|
|
1406
|
-
var O = r.current || P;
|
|
1407
|
-
return la(O, h, v, O === "h" ? E : S);
|
|
1408
|
-
}, []), p = a.useCallback(function(v) {
|
|
1409
|
-
var h = v;
|
|
1410
|
-
if (!(!re.length || re[re.length - 1] !== i)) {
|
|
1411
|
-
var y = "deltaY" in h ? _t(h) : Pe(h), C = t.current.filter(function(P) {
|
|
1412
|
-
return P.name === h.type && (P.target === h.target || h.target === P.shadowParent) && da(P.delta, y);
|
|
1413
|
-
})[0];
|
|
1414
|
-
if (C && C.should) {
|
|
1415
|
-
h.cancelable && h.preventDefault();
|
|
1416
|
-
return;
|
|
1417
|
-
}
|
|
1418
|
-
if (!C) {
|
|
1419
|
-
var E = (s.current.shards || []).map(It).filter(Boolean).filter(function(P) {
|
|
1420
|
-
return P.contains(h.target);
|
|
1421
|
-
}), S = E.length > 0 ? c(h, E[0]) : !s.current.noIsolation;
|
|
1422
|
-
S && h.cancelable && h.preventDefault();
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
}, []), l = a.useCallback(function(v, h, y, C) {
|
|
1426
|
-
var E = { name: v, delta: h, target: y, should: C, shadowParent: ma(y) };
|
|
1427
|
-
t.current.push(E), setTimeout(function() {
|
|
1428
|
-
t.current = t.current.filter(function(S) {
|
|
1429
|
-
return S !== E;
|
|
1430
|
-
});
|
|
1431
|
-
}, 1);
|
|
1432
|
-
}, []), d = a.useCallback(function(v) {
|
|
1433
|
-
n.current = Pe(v), r.current = void 0;
|
|
1434
|
-
}, []), u = a.useCallback(function(v) {
|
|
1435
|
-
l(v.type, _t(v), v.target, c(v, e.lockRef.current));
|
|
1436
|
-
}, []), m = a.useCallback(function(v) {
|
|
1437
|
-
l(v.type, Pe(v), v.target, c(v, e.lockRef.current));
|
|
1438
|
-
}, []);
|
|
1439
|
-
a.useEffect(function() {
|
|
1440
|
-
return re.push(i), e.setCallbacks({
|
|
1441
|
-
onScrollCapture: u,
|
|
1442
|
-
onWheelCapture: u,
|
|
1443
|
-
onTouchMoveCapture: m
|
|
1444
|
-
}), document.addEventListener("wheel", p, ne), document.addEventListener("touchmove", p, ne), document.addEventListener("touchstart", d, ne), function() {
|
|
1445
|
-
re = re.filter(function(v) {
|
|
1446
|
-
return v !== i;
|
|
1447
|
-
}), document.removeEventListener("wheel", p, ne), document.removeEventListener("touchmove", p, ne), document.removeEventListener("touchstart", d, ne);
|
|
1448
|
-
};
|
|
1449
|
-
}, []);
|
|
1450
|
-
var g = e.removeScrollBar, b = e.inert;
|
|
1451
|
-
return a.createElement(
|
|
1452
|
-
a.Fragment,
|
|
1453
|
-
null,
|
|
1454
|
-
b ? a.createElement(i, { styles: fa(o) }) : null,
|
|
1455
|
-
g ? a.createElement(ra, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1456
|
-
);
|
|
1457
|
-
}
|
|
1458
|
-
function ma(e) {
|
|
1459
|
-
for (var t = null; e !== null; )
|
|
1460
|
-
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1461
|
-
return t;
|
|
1462
|
-
}
|
|
1463
|
-
const ha = Uo(ln, va);
|
|
1464
|
-
var mn = a.forwardRef(function(e, t) {
|
|
1465
|
-
return a.createElement(Te, K({}, e, { ref: t, sideCar: ha }));
|
|
1466
|
-
});
|
|
1467
|
-
mn.classNames = Te.classNames;
|
|
1468
|
-
var Xe = ["Enter", " "], ga = ["ArrowDown", "PageUp", "Home"], hn = ["ArrowUp", "PageDown", "End"], ba = [...ga, ...hn], ya = {
|
|
1469
|
-
ltr: [...Xe, "ArrowRight"],
|
|
1470
|
-
rtl: [...Xe, "ArrowLeft"]
|
|
1471
|
-
}, Ca = {
|
|
751
|
+
var _t = wt, It = St, Ie = ["Enter", " "], Or = ["ArrowDown", "PageUp", "Home"], xt = ["ArrowUp", "PageDown", "End"], Nr = [...Or, ...xt], Tr = {
|
|
752
|
+
ltr: [...Ie, "ArrowRight"],
|
|
753
|
+
rtl: [...Ie, "ArrowLeft"]
|
|
754
|
+
}, Dr = {
|
|
1472
755
|
ltr: ["ArrowLeft"],
|
|
1473
756
|
rtl: ["ArrowRight"]
|
|
1474
|
-
},
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
]),
|
|
1479
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange:
|
|
757
|
+
}, de = "Menu", [se, Fr, Lr] = Te(de), [z, $r] = ue(de, [
|
|
758
|
+
Lr,
|
|
759
|
+
lt,
|
|
760
|
+
ye
|
|
761
|
+
]), fe = lt(), At = ye(), [Ot, W] = z(de), [kr, pe] = z(de), Nt = (e) => {
|
|
762
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, c = fe(t), [f, l] = a.useState(null), d = a.useRef(!1), p = X(s), m = De(o);
|
|
1480
763
|
return a.useEffect(() => {
|
|
1481
764
|
const g = () => {
|
|
1482
|
-
d.current = !0, document.addEventListener("pointerdown",
|
|
1483
|
-
},
|
|
765
|
+
d.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
|
|
766
|
+
}, v = () => d.current = !1;
|
|
1484
767
|
return document.addEventListener("keydown", g, { capture: !0 }), () => {
|
|
1485
|
-
document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown",
|
|
768
|
+
document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
|
|
1486
769
|
};
|
|
1487
|
-
}, []), /* @__PURE__ */
|
|
1488
|
-
|
|
770
|
+
}, []), /* @__PURE__ */ u(Ct, { ...c, children: /* @__PURE__ */ u(
|
|
771
|
+
Ot,
|
|
1489
772
|
{
|
|
1490
773
|
scope: t,
|
|
1491
774
|
open: n,
|
|
1492
|
-
onOpenChange:
|
|
1493
|
-
content:
|
|
775
|
+
onOpenChange: p,
|
|
776
|
+
content: f,
|
|
1494
777
|
onContentChange: l,
|
|
1495
|
-
children: /* @__PURE__ */
|
|
1496
|
-
|
|
778
|
+
children: /* @__PURE__ */ u(
|
|
779
|
+
kr,
|
|
1497
780
|
{
|
|
1498
781
|
scope: t,
|
|
1499
|
-
onClose: a.useCallback(() =>
|
|
782
|
+
onClose: a.useCallback(() => p(!1), [p]),
|
|
1500
783
|
isUsingKeyboardRef: d,
|
|
1501
784
|
dir: m,
|
|
1502
|
-
modal:
|
|
785
|
+
modal: i,
|
|
1503
786
|
children: r
|
|
1504
787
|
}
|
|
1505
788
|
)
|
|
1506
789
|
}
|
|
1507
790
|
) });
|
|
1508
791
|
};
|
|
1509
|
-
|
|
1510
|
-
var
|
|
792
|
+
Nt.displayName = de;
|
|
793
|
+
var Gr = "MenuAnchor", $e = a.forwardRef(
|
|
1511
794
|
(e, t) => {
|
|
1512
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
1513
|
-
return /* @__PURE__ */
|
|
795
|
+
const { __scopeMenu: n, ...r } = e, o = fe(n);
|
|
796
|
+
return /* @__PURE__ */ u(lr, { ...o, ...r, ref: t });
|
|
1514
797
|
}
|
|
1515
798
|
);
|
|
1516
|
-
|
|
1517
|
-
var
|
|
799
|
+
$e.displayName = Gr;
|
|
800
|
+
var ke = "MenuPortal", [Kr, Tt] = z(ke, {
|
|
1518
801
|
forceMount: void 0
|
|
1519
|
-
}),
|
|
1520
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e,
|
|
1521
|
-
return /* @__PURE__ */
|
|
802
|
+
}), Dt = (e) => {
|
|
803
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = W(ke, t);
|
|
804
|
+
return /* @__PURE__ */ u(Kr, { scope: t, forceMount: n, children: /* @__PURE__ */ u(Ce, { present: n || s.open, children: /* @__PURE__ */ u(yt, { asChild: !0, container: o, children: r }) }) });
|
|
1522
805
|
};
|
|
1523
|
-
|
|
1524
|
-
var
|
|
806
|
+
Dt.displayName = ke;
|
|
807
|
+
var L = "MenuContent", [Br, Ge] = z(L), Ft = a.forwardRef(
|
|
1525
808
|
(e, t) => {
|
|
1526
|
-
const n =
|
|
1527
|
-
return /* @__PURE__ */
|
|
809
|
+
const n = Tt(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = W(L, e.__scopeMenu), i = pe(L, e.__scopeMenu);
|
|
810
|
+
return /* @__PURE__ */ u(se.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(Ce, { present: r || s.open, children: /* @__PURE__ */ u(se.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u(Vr, { ...o, ref: t }) : /* @__PURE__ */ u(Ur, { ...o, ref: t }) }) }) });
|
|
1528
811
|
}
|
|
1529
|
-
),
|
|
812
|
+
), Vr = a.forwardRef(
|
|
1530
813
|
(e, t) => {
|
|
1531
|
-
const n =
|
|
814
|
+
const n = W(L, e.__scopeMenu), r = a.useRef(null), o = D(t, r);
|
|
1532
815
|
return a.useEffect(() => {
|
|
1533
|
-
const
|
|
1534
|
-
if (
|
|
1535
|
-
}, []), /* @__PURE__ */
|
|
1536
|
-
|
|
816
|
+
const s = r.current;
|
|
817
|
+
if (s) return xn(s);
|
|
818
|
+
}, []), /* @__PURE__ */ u(
|
|
819
|
+
Ke,
|
|
1537
820
|
{
|
|
1538
821
|
...e,
|
|
1539
822
|
ref: o,
|
|
1540
823
|
trapFocus: n.open,
|
|
1541
824
|
disableOutsidePointerEvents: n.open,
|
|
1542
825
|
disableOutsideScroll: !0,
|
|
1543
|
-
onFocusOutside:
|
|
826
|
+
onFocusOutside: y(
|
|
1544
827
|
e.onFocusOutside,
|
|
1545
|
-
(
|
|
828
|
+
(s) => s.preventDefault(),
|
|
1546
829
|
{ checkForDefaultPrevented: !1 }
|
|
1547
830
|
),
|
|
1548
831
|
onDismiss: () => n.onOpenChange(!1)
|
|
1549
832
|
}
|
|
1550
833
|
);
|
|
1551
834
|
}
|
|
1552
|
-
),
|
|
1553
|
-
const n =
|
|
1554
|
-
return /* @__PURE__ */
|
|
1555
|
-
|
|
835
|
+
), Ur = a.forwardRef((e, t) => {
|
|
836
|
+
const n = W(L, e.__scopeMenu);
|
|
837
|
+
return /* @__PURE__ */ u(
|
|
838
|
+
Ke,
|
|
1556
839
|
{
|
|
1557
840
|
...e,
|
|
1558
841
|
ref: t,
|
|
@@ -1562,128 +845,128 @@ var k = "MenuContent", [_a, at] = q(k), Sn = a.forwardRef(
|
|
|
1562
845
|
onDismiss: () => n.onOpenChange(!1)
|
|
1563
846
|
}
|
|
1564
847
|
);
|
|
1565
|
-
}),
|
|
848
|
+
}), Wr = /* @__PURE__ */ rt("MenuContent.ScrollLock"), Ke = a.forwardRef(
|
|
1566
849
|
(e, t) => {
|
|
1567
850
|
const {
|
|
1568
851
|
__scopeMenu: n,
|
|
1569
852
|
loop: r = !1,
|
|
1570
853
|
trapFocus: o,
|
|
1571
|
-
onOpenAutoFocus:
|
|
1572
|
-
onCloseAutoFocus:
|
|
854
|
+
onOpenAutoFocus: s,
|
|
855
|
+
onCloseAutoFocus: i,
|
|
1573
856
|
disableOutsidePointerEvents: c,
|
|
1574
|
-
onEntryFocus:
|
|
857
|
+
onEntryFocus: f,
|
|
1575
858
|
onEscapeKeyDown: l,
|
|
1576
859
|
onPointerDownOutside: d,
|
|
1577
|
-
onFocusOutside:
|
|
860
|
+
onFocusOutside: p,
|
|
1578
861
|
onInteractOutside: m,
|
|
1579
862
|
onDismiss: g,
|
|
1580
|
-
disableOutsideScroll:
|
|
1581
|
-
...
|
|
1582
|
-
} = e,
|
|
1583
|
-
var
|
|
1584
|
-
const
|
|
1585
|
-
(function
|
|
1586
|
-
|
|
1587
|
-
})(
|
|
863
|
+
disableOutsideScroll: v,
|
|
864
|
+
...h
|
|
865
|
+
} = e, b = W(L, n), w = pe(L, n), E = fe(n), M = At(n), S = Fr(n), [I, _] = a.useState(null), R = a.useRef(null), P = D(t, R, b.onContentChange), $ = a.useRef(0), N = a.useRef(""), U = a.useRef(0), H = a.useRef(null), B = a.useRef("right"), Z = a.useRef(0), q = v ? An : a.Fragment, k = v ? { as: Wr, allowPinchZoom: !0 } : void 0, J = (C) => {
|
|
866
|
+
var V, ne;
|
|
867
|
+
const O = N.current + C, A = S().filter((F) => !F.disabled), K = document.activeElement, ee = (V = A.find((F) => F.ref.current === K)) == null ? void 0 : V.textValue, te = A.map((F) => F.textValue), ve = no(te, O, ee), j = (ne = A.find((F) => F.textValue === ve)) == null ? void 0 : ne.ref.current;
|
|
868
|
+
(function F(re) {
|
|
869
|
+
N.current = re, window.clearTimeout($.current), re !== "" && ($.current = window.setTimeout(() => F(""), 1e3));
|
|
870
|
+
})(O), j && setTimeout(() => j.focus());
|
|
1588
871
|
};
|
|
1589
|
-
a.useEffect(() => () => window.clearTimeout(
|
|
1590
|
-
const
|
|
1591
|
-
var
|
|
1592
|
-
return
|
|
872
|
+
a.useEffect(() => () => window.clearTimeout($.current), []), tr();
|
|
873
|
+
const T = a.useCallback((C) => {
|
|
874
|
+
var A, K;
|
|
875
|
+
return B.current === ((A = H.current) == null ? void 0 : A.side) && oo(C, (K = H.current) == null ? void 0 : K.area);
|
|
1593
876
|
}, []);
|
|
1594
|
-
return /* @__PURE__ */
|
|
1595
|
-
|
|
877
|
+
return /* @__PURE__ */ u(
|
|
878
|
+
Br,
|
|
1596
879
|
{
|
|
1597
880
|
scope: n,
|
|
1598
|
-
searchRef:
|
|
881
|
+
searchRef: N,
|
|
1599
882
|
onItemEnter: a.useCallback(
|
|
1600
|
-
(
|
|
1601
|
-
|
|
883
|
+
(C) => {
|
|
884
|
+
T(C) && C.preventDefault();
|
|
1602
885
|
},
|
|
1603
|
-
[
|
|
886
|
+
[T]
|
|
1604
887
|
),
|
|
1605
888
|
onItemLeave: a.useCallback(
|
|
1606
|
-
(
|
|
1607
|
-
var
|
|
1608
|
-
|
|
889
|
+
(C) => {
|
|
890
|
+
var O;
|
|
891
|
+
T(C) || ((O = R.current) == null || O.focus(), _(null));
|
|
1609
892
|
},
|
|
1610
|
-
[
|
|
893
|
+
[T]
|
|
1611
894
|
),
|
|
1612
895
|
onTriggerLeave: a.useCallback(
|
|
1613
|
-
(
|
|
1614
|
-
|
|
896
|
+
(C) => {
|
|
897
|
+
T(C) && C.preventDefault();
|
|
1615
898
|
},
|
|
1616
|
-
[
|
|
899
|
+
[T]
|
|
1617
900
|
),
|
|
1618
|
-
pointerGraceTimerRef:
|
|
1619
|
-
onPointerGraceIntentChange: a.useCallback((
|
|
1620
|
-
|
|
901
|
+
pointerGraceTimerRef: U,
|
|
902
|
+
onPointerGraceIntentChange: a.useCallback((C) => {
|
|
903
|
+
H.current = C;
|
|
1621
904
|
}, []),
|
|
1622
|
-
children: /* @__PURE__ */
|
|
1623
|
-
|
|
905
|
+
children: /* @__PURE__ */ u(q, { ...k, children: /* @__PURE__ */ u(
|
|
906
|
+
On,
|
|
1624
907
|
{
|
|
1625
908
|
asChild: !0,
|
|
1626
909
|
trapped: o,
|
|
1627
|
-
onMountAutoFocus:
|
|
1628
|
-
var
|
|
1629
|
-
|
|
910
|
+
onMountAutoFocus: y(s, (C) => {
|
|
911
|
+
var O;
|
|
912
|
+
C.preventDefault(), (O = R.current) == null || O.focus({ preventScroll: !0 });
|
|
1630
913
|
}),
|
|
1631
|
-
onUnmountAutoFocus:
|
|
1632
|
-
children: /* @__PURE__ */
|
|
1633
|
-
|
|
914
|
+
onUnmountAutoFocus: i,
|
|
915
|
+
children: /* @__PURE__ */ u(
|
|
916
|
+
st,
|
|
1634
917
|
{
|
|
1635
918
|
asChild: !0,
|
|
1636
919
|
disableOutsidePointerEvents: c,
|
|
1637
920
|
onEscapeKeyDown: l,
|
|
1638
921
|
onPointerDownOutside: d,
|
|
1639
|
-
onFocusOutside:
|
|
922
|
+
onFocusOutside: p,
|
|
1640
923
|
onInteractOutside: m,
|
|
1641
924
|
onDismiss: g,
|
|
1642
|
-
children: /* @__PURE__ */
|
|
1643
|
-
|
|
925
|
+
children: /* @__PURE__ */ u(
|
|
926
|
+
_t,
|
|
1644
927
|
{
|
|
1645
928
|
asChild: !0,
|
|
1646
|
-
...
|
|
1647
|
-
dir:
|
|
929
|
+
...M,
|
|
930
|
+
dir: w.dir,
|
|
1648
931
|
orientation: "vertical",
|
|
1649
932
|
loop: r,
|
|
1650
|
-
currentTabStopId:
|
|
1651
|
-
onCurrentTabStopIdChange:
|
|
1652
|
-
onEntryFocus:
|
|
1653
|
-
|
|
933
|
+
currentTabStopId: I,
|
|
934
|
+
onCurrentTabStopIdChange: _,
|
|
935
|
+
onEntryFocus: y(f, (C) => {
|
|
936
|
+
w.isUsingKeyboardRef.current || C.preventDefault();
|
|
1654
937
|
}),
|
|
1655
938
|
preventScrollOnEntryFocus: !0,
|
|
1656
|
-
children: /* @__PURE__ */
|
|
1657
|
-
|
|
939
|
+
children: /* @__PURE__ */ u(
|
|
940
|
+
dr,
|
|
1658
941
|
{
|
|
1659
942
|
role: "menu",
|
|
1660
943
|
"aria-orientation": "vertical",
|
|
1661
|
-
"data-state":
|
|
944
|
+
"data-state": Jt(b.open),
|
|
1662
945
|
"data-radix-menu-content": "",
|
|
1663
|
-
dir:
|
|
1664
|
-
...
|
|
1665
|
-
...
|
|
1666
|
-
ref:
|
|
1667
|
-
style: { outline: "none", ...
|
|
1668
|
-
onKeyDown:
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1671
|
-
const
|
|
1672
|
-
if (
|
|
1673
|
-
|
|
1674
|
-
const
|
|
1675
|
-
|
|
946
|
+
dir: w.dir,
|
|
947
|
+
...E,
|
|
948
|
+
...h,
|
|
949
|
+
ref: P,
|
|
950
|
+
style: { outline: "none", ...h.style },
|
|
951
|
+
onKeyDown: y(h.onKeyDown, (C) => {
|
|
952
|
+
const A = C.target.closest("[data-radix-menu-content]") === C.currentTarget, K = C.ctrlKey || C.altKey || C.metaKey, ee = C.key.length === 1;
|
|
953
|
+
A && (C.key === "Tab" && C.preventDefault(), !K && ee && J(C.key));
|
|
954
|
+
const te = R.current;
|
|
955
|
+
if (C.target !== te || !Nr.includes(C.key)) return;
|
|
956
|
+
C.preventDefault();
|
|
957
|
+
const j = S().filter((V) => !V.disabled).map((V) => V.ref.current);
|
|
958
|
+
xt.includes(C.key) && j.reverse(), eo(j);
|
|
1676
959
|
}),
|
|
1677
|
-
onBlur:
|
|
1678
|
-
|
|
960
|
+
onBlur: y(e.onBlur, (C) => {
|
|
961
|
+
C.currentTarget.contains(C.target) || (window.clearTimeout($.current), N.current = "");
|
|
1679
962
|
}),
|
|
1680
|
-
onPointerMove:
|
|
963
|
+
onPointerMove: y(
|
|
1681
964
|
e.onPointerMove,
|
|
1682
|
-
|
|
1683
|
-
const
|
|
1684
|
-
if (
|
|
1685
|
-
const
|
|
1686
|
-
|
|
965
|
+
ie((C) => {
|
|
966
|
+
const O = C.target, A = Z.current !== C.clientX;
|
|
967
|
+
if (C.currentTarget.contains(O) && A) {
|
|
968
|
+
const K = C.clientX > Z.current ? "right" : "left";
|
|
969
|
+
B.current = K, Z.current = C.clientX;
|
|
1687
970
|
}
|
|
1688
971
|
})
|
|
1689
972
|
)
|
|
@@ -1699,140 +982,140 @@ var k = "MenuContent", [_a, at] = q(k), Sn = a.forwardRef(
|
|
|
1699
982
|
);
|
|
1700
983
|
}
|
|
1701
984
|
);
|
|
1702
|
-
|
|
1703
|
-
var
|
|
985
|
+
Ft.displayName = L;
|
|
986
|
+
var Hr = "MenuGroup", Be = a.forwardRef(
|
|
1704
987
|
(e, t) => {
|
|
1705
988
|
const { __scopeMenu: n, ...r } = e;
|
|
1706
|
-
return /* @__PURE__ */
|
|
989
|
+
return /* @__PURE__ */ u(G.div, { role: "group", ...r, ref: t });
|
|
1707
990
|
}
|
|
1708
991
|
);
|
|
1709
|
-
|
|
1710
|
-
var
|
|
992
|
+
Be.displayName = Hr;
|
|
993
|
+
var jr = "MenuLabel", Lt = a.forwardRef(
|
|
1711
994
|
(e, t) => {
|
|
1712
995
|
const { __scopeMenu: n, ...r } = e;
|
|
1713
|
-
return /* @__PURE__ */
|
|
996
|
+
return /* @__PURE__ */ u(G.div, { ...r, ref: t });
|
|
1714
997
|
}
|
|
1715
998
|
);
|
|
1716
|
-
|
|
1717
|
-
var
|
|
999
|
+
Lt.displayName = jr;
|
|
1000
|
+
var he = "MenuItem", et = "menu.itemSelect", Ee = a.forwardRef(
|
|
1718
1001
|
(e, t) => {
|
|
1719
|
-
const { disabled: n = !1, onSelect: r, ...o } = e,
|
|
1720
|
-
const
|
|
1721
|
-
if (!n &&
|
|
1722
|
-
const m = new CustomEvent(
|
|
1723
|
-
|
|
1002
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = a.useRef(null), i = pe(he, e.__scopeMenu), c = Ge(he, e.__scopeMenu), f = D(t, s), l = a.useRef(!1), d = () => {
|
|
1003
|
+
const p = s.current;
|
|
1004
|
+
if (!n && p) {
|
|
1005
|
+
const m = new CustomEvent(et, { bubbles: !0, cancelable: !0 });
|
|
1006
|
+
p.addEventListener(et, (g) => r == null ? void 0 : r(g), { once: !0 }), ot(p, m), m.defaultPrevented ? l.current = !1 : i.onClose();
|
|
1724
1007
|
}
|
|
1725
1008
|
};
|
|
1726
|
-
return /* @__PURE__ */
|
|
1727
|
-
|
|
1009
|
+
return /* @__PURE__ */ u(
|
|
1010
|
+
$t,
|
|
1728
1011
|
{
|
|
1729
1012
|
...o,
|
|
1730
|
-
ref:
|
|
1013
|
+
ref: f,
|
|
1731
1014
|
disabled: n,
|
|
1732
|
-
onClick:
|
|
1733
|
-
onPointerDown: (
|
|
1015
|
+
onClick: y(e.onClick, d),
|
|
1016
|
+
onPointerDown: (p) => {
|
|
1734
1017
|
var m;
|
|
1735
|
-
(m = e.onPointerDown) == null || m.call(e,
|
|
1018
|
+
(m = e.onPointerDown) == null || m.call(e, p), l.current = !0;
|
|
1736
1019
|
},
|
|
1737
|
-
onPointerUp:
|
|
1020
|
+
onPointerUp: y(e.onPointerUp, (p) => {
|
|
1738
1021
|
var m;
|
|
1739
|
-
l.current || (m =
|
|
1022
|
+
l.current || (m = p.currentTarget) == null || m.click();
|
|
1740
1023
|
}),
|
|
1741
|
-
onKeyDown:
|
|
1024
|
+
onKeyDown: y(e.onKeyDown, (p) => {
|
|
1742
1025
|
const m = c.searchRef.current !== "";
|
|
1743
|
-
n || m &&
|
|
1026
|
+
n || m && p.key === " " || Ie.includes(p.key) && (p.currentTarget.click(), p.preventDefault());
|
|
1744
1027
|
})
|
|
1745
1028
|
}
|
|
1746
1029
|
);
|
|
1747
1030
|
}
|
|
1748
1031
|
);
|
|
1749
|
-
|
|
1750
|
-
var
|
|
1032
|
+
Ee.displayName = he;
|
|
1033
|
+
var $t = a.forwardRef(
|
|
1751
1034
|
(e, t) => {
|
|
1752
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...
|
|
1035
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Ge(he, n), c = At(n), f = a.useRef(null), l = D(t, f), [d, p] = a.useState(!1), [m, g] = a.useState("");
|
|
1753
1036
|
return a.useEffect(() => {
|
|
1754
|
-
const
|
|
1755
|
-
|
|
1756
|
-
}, [
|
|
1757
|
-
|
|
1037
|
+
const v = f.current;
|
|
1038
|
+
v && g((v.textContent ?? "").trim());
|
|
1039
|
+
}, [s.children]), /* @__PURE__ */ u(
|
|
1040
|
+
se.ItemSlot,
|
|
1758
1041
|
{
|
|
1759
1042
|
scope: n,
|
|
1760
1043
|
disabled: r,
|
|
1761
1044
|
textValue: o ?? m,
|
|
1762
|
-
children: /* @__PURE__ */
|
|
1763
|
-
|
|
1045
|
+
children: /* @__PURE__ */ u(It, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ u(
|
|
1046
|
+
G.div,
|
|
1764
1047
|
{
|
|
1765
1048
|
role: "menuitem",
|
|
1766
1049
|
"data-highlighted": d ? "" : void 0,
|
|
1767
1050
|
"aria-disabled": r || void 0,
|
|
1768
1051
|
"data-disabled": r ? "" : void 0,
|
|
1769
|
-
...
|
|
1052
|
+
...s,
|
|
1770
1053
|
ref: l,
|
|
1771
|
-
onPointerMove:
|
|
1054
|
+
onPointerMove: y(
|
|
1772
1055
|
e.onPointerMove,
|
|
1773
|
-
|
|
1774
|
-
r ?
|
|
1056
|
+
ie((v) => {
|
|
1057
|
+
r ? i.onItemLeave(v) : (i.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
|
|
1775
1058
|
})
|
|
1776
1059
|
),
|
|
1777
|
-
onPointerLeave:
|
|
1060
|
+
onPointerLeave: y(
|
|
1778
1061
|
e.onPointerLeave,
|
|
1779
|
-
|
|
1062
|
+
ie((v) => i.onItemLeave(v))
|
|
1780
1063
|
),
|
|
1781
|
-
onFocus:
|
|
1782
|
-
onBlur:
|
|
1064
|
+
onFocus: y(e.onFocus, () => p(!0)),
|
|
1065
|
+
onBlur: y(e.onBlur, () => p(!1))
|
|
1783
1066
|
}
|
|
1784
1067
|
) })
|
|
1785
1068
|
}
|
|
1786
1069
|
);
|
|
1787
1070
|
}
|
|
1788
|
-
),
|
|
1071
|
+
), Yr = "MenuCheckboxItem", kt = a.forwardRef(
|
|
1789
1072
|
(e, t) => {
|
|
1790
1073
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1791
|
-
return /* @__PURE__ */
|
|
1792
|
-
|
|
1074
|
+
return /* @__PURE__ */ u(Ut, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ u(
|
|
1075
|
+
Ee,
|
|
1793
1076
|
{
|
|
1794
1077
|
role: "menuitemcheckbox",
|
|
1795
|
-
"aria-checked":
|
|
1078
|
+
"aria-checked": be(n) ? "mixed" : n,
|
|
1796
1079
|
...o,
|
|
1797
1080
|
ref: t,
|
|
1798
|
-
"data-state":
|
|
1799
|
-
onSelect:
|
|
1081
|
+
"data-state": We(n),
|
|
1082
|
+
onSelect: y(
|
|
1800
1083
|
o.onSelect,
|
|
1801
|
-
() => r == null ? void 0 : r(
|
|
1084
|
+
() => r == null ? void 0 : r(be(n) ? !0 : !n),
|
|
1802
1085
|
{ checkForDefaultPrevented: !1 }
|
|
1803
1086
|
)
|
|
1804
1087
|
}
|
|
1805
1088
|
) });
|
|
1806
1089
|
}
|
|
1807
1090
|
);
|
|
1808
|
-
|
|
1809
|
-
var
|
|
1810
|
-
|
|
1091
|
+
kt.displayName = Yr;
|
|
1092
|
+
var Gt = "MenuRadioGroup", [Xr, zr] = z(
|
|
1093
|
+
Gt,
|
|
1811
1094
|
{ value: void 0, onValueChange: () => {
|
|
1812
1095
|
} }
|
|
1813
|
-
),
|
|
1096
|
+
), Kt = a.forwardRef(
|
|
1814
1097
|
(e, t) => {
|
|
1815
|
-
const { value: n, onValueChange: r, ...o } = e,
|
|
1816
|
-
return /* @__PURE__ */
|
|
1098
|
+
const { value: n, onValueChange: r, ...o } = e, s = X(r);
|
|
1099
|
+
return /* @__PURE__ */ u(Xr, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ u(Be, { ...o, ref: t }) });
|
|
1817
1100
|
}
|
|
1818
1101
|
);
|
|
1819
|
-
|
|
1820
|
-
var
|
|
1102
|
+
Kt.displayName = Gt;
|
|
1103
|
+
var Bt = "MenuRadioItem", Vt = a.forwardRef(
|
|
1821
1104
|
(e, t) => {
|
|
1822
|
-
const { value: n, ...r } = e, o =
|
|
1823
|
-
return /* @__PURE__ */
|
|
1824
|
-
|
|
1105
|
+
const { value: n, ...r } = e, o = zr(Bt, e.__scopeMenu), s = n === o.value;
|
|
1106
|
+
return /* @__PURE__ */ u(Ut, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ u(
|
|
1107
|
+
Ee,
|
|
1825
1108
|
{
|
|
1826
1109
|
role: "menuitemradio",
|
|
1827
|
-
"aria-checked":
|
|
1110
|
+
"aria-checked": s,
|
|
1828
1111
|
...r,
|
|
1829
1112
|
ref: t,
|
|
1830
|
-
"data-state":
|
|
1831
|
-
onSelect:
|
|
1113
|
+
"data-state": We(s),
|
|
1114
|
+
onSelect: y(
|
|
1832
1115
|
r.onSelect,
|
|
1833
1116
|
() => {
|
|
1834
|
-
var
|
|
1835
|
-
return (
|
|
1117
|
+
var i;
|
|
1118
|
+
return (i = o.onValueChange) == null ? void 0 : i.call(o, n);
|
|
1836
1119
|
},
|
|
1837
1120
|
{ checkForDefaultPrevented: !1 }
|
|
1838
1121
|
)
|
|
@@ -1840,35 +1123,35 @@ var In = "MenuRadioItem", An = a.forwardRef(
|
|
|
1840
1123
|
) });
|
|
1841
1124
|
}
|
|
1842
1125
|
);
|
|
1843
|
-
|
|
1844
|
-
var
|
|
1845
|
-
|
|
1126
|
+
Vt.displayName = Bt;
|
|
1127
|
+
var Ve = "MenuItemIndicator", [Ut, Zr] = z(
|
|
1128
|
+
Ve,
|
|
1846
1129
|
{ checked: !1 }
|
|
1847
|
-
),
|
|
1130
|
+
), Wt = a.forwardRef(
|
|
1848
1131
|
(e, t) => {
|
|
1849
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e,
|
|
1850
|
-
return /* @__PURE__ */
|
|
1851
|
-
|
|
1132
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = Zr(Ve, n);
|
|
1133
|
+
return /* @__PURE__ */ u(
|
|
1134
|
+
Ce,
|
|
1852
1135
|
{
|
|
1853
|
-
present: r ||
|
|
1854
|
-
children: /* @__PURE__ */
|
|
1855
|
-
|
|
1136
|
+
present: r || be(s.checked) || s.checked === !0,
|
|
1137
|
+
children: /* @__PURE__ */ u(
|
|
1138
|
+
G.span,
|
|
1856
1139
|
{
|
|
1857
1140
|
...o,
|
|
1858
1141
|
ref: t,
|
|
1859
|
-
"data-state":
|
|
1142
|
+
"data-state": We(s.checked)
|
|
1860
1143
|
}
|
|
1861
1144
|
)
|
|
1862
1145
|
}
|
|
1863
1146
|
);
|
|
1864
1147
|
}
|
|
1865
1148
|
);
|
|
1866
|
-
|
|
1867
|
-
var
|
|
1149
|
+
Wt.displayName = Ve;
|
|
1150
|
+
var qr = "MenuSeparator", Ht = a.forwardRef(
|
|
1868
1151
|
(e, t) => {
|
|
1869
1152
|
const { __scopeMenu: n, ...r } = e;
|
|
1870
|
-
return /* @__PURE__ */
|
|
1871
|
-
|
|
1153
|
+
return /* @__PURE__ */ u(
|
|
1154
|
+
G.div,
|
|
1872
1155
|
{
|
|
1873
1156
|
role: "separator",
|
|
1874
1157
|
"aria-orientation": "horizontal",
|
|
@@ -1878,235 +1161,235 @@ var ka = "MenuSeparator", Nn = a.forwardRef(
|
|
|
1878
1161
|
);
|
|
1879
1162
|
}
|
|
1880
1163
|
);
|
|
1881
|
-
|
|
1882
|
-
var
|
|
1164
|
+
Ht.displayName = qr;
|
|
1165
|
+
var Jr = "MenuArrow", jt = a.forwardRef(
|
|
1883
1166
|
(e, t) => {
|
|
1884
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
1885
|
-
return /* @__PURE__ */
|
|
1167
|
+
const { __scopeMenu: n, ...r } = e, o = fe(n);
|
|
1168
|
+
return /* @__PURE__ */ u(fr, { ...o, ...r, ref: t });
|
|
1886
1169
|
}
|
|
1887
1170
|
);
|
|
1888
|
-
|
|
1889
|
-
var
|
|
1890
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e,
|
|
1891
|
-
return a.useEffect(() => (
|
|
1892
|
-
|
|
1171
|
+
jt.displayName = Jr;
|
|
1172
|
+
var Ue = "MenuSub", [Qr, Yt] = z(Ue), Xt = (e) => {
|
|
1173
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = W(Ue, t), i = fe(t), [c, f] = a.useState(null), [l, d] = a.useState(null), p = X(o);
|
|
1174
|
+
return a.useEffect(() => (s.open === !1 && p(!1), () => p(!1)), [s.open, p]), /* @__PURE__ */ u(Ct, { ...i, children: /* @__PURE__ */ u(
|
|
1175
|
+
Ot,
|
|
1893
1176
|
{
|
|
1894
1177
|
scope: t,
|
|
1895
1178
|
open: r,
|
|
1896
|
-
onOpenChange:
|
|
1179
|
+
onOpenChange: p,
|
|
1897
1180
|
content: l,
|
|
1898
1181
|
onContentChange: d,
|
|
1899
|
-
children: /* @__PURE__ */
|
|
1900
|
-
|
|
1182
|
+
children: /* @__PURE__ */ u(
|
|
1183
|
+
Qr,
|
|
1901
1184
|
{
|
|
1902
1185
|
scope: t,
|
|
1903
|
-
contentId:
|
|
1904
|
-
triggerId:
|
|
1186
|
+
contentId: Q(),
|
|
1187
|
+
triggerId: Q(),
|
|
1905
1188
|
trigger: c,
|
|
1906
|
-
onTriggerChange:
|
|
1189
|
+
onTriggerChange: f,
|
|
1907
1190
|
children: n
|
|
1908
1191
|
}
|
|
1909
1192
|
)
|
|
1910
1193
|
}
|
|
1911
1194
|
) });
|
|
1912
1195
|
};
|
|
1913
|
-
|
|
1914
|
-
var
|
|
1196
|
+
Xt.displayName = Ue;
|
|
1197
|
+
var ae = "MenuSubTrigger", zt = a.forwardRef(
|
|
1915
1198
|
(e, t) => {
|
|
1916
|
-
const n =
|
|
1917
|
-
|
|
1199
|
+
const n = W(ae, e.__scopeMenu), r = pe(ae, e.__scopeMenu), o = Yt(ae, e.__scopeMenu), s = Ge(ae, e.__scopeMenu), i = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: f } = s, l = { __scopeMenu: e.__scopeMenu }, d = a.useCallback(() => {
|
|
1200
|
+
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1918
1201
|
}, []);
|
|
1919
1202
|
return a.useEffect(() => d, [d]), a.useEffect(() => {
|
|
1920
|
-
const
|
|
1203
|
+
const p = c.current;
|
|
1921
1204
|
return () => {
|
|
1922
|
-
window.clearTimeout(
|
|
1205
|
+
window.clearTimeout(p), f(null);
|
|
1923
1206
|
};
|
|
1924
|
-
}, [c,
|
|
1925
|
-
|
|
1207
|
+
}, [c, f]), /* @__PURE__ */ u($e, { asChild: !0, ...l, children: /* @__PURE__ */ u(
|
|
1208
|
+
$t,
|
|
1926
1209
|
{
|
|
1927
1210
|
id: o.triggerId,
|
|
1928
1211
|
"aria-haspopup": "menu",
|
|
1929
1212
|
"aria-expanded": n.open,
|
|
1930
1213
|
"aria-controls": o.contentId,
|
|
1931
|
-
"data-state":
|
|
1214
|
+
"data-state": Jt(n.open),
|
|
1932
1215
|
...e,
|
|
1933
|
-
ref:
|
|
1934
|
-
onClick: (
|
|
1216
|
+
ref: ce(t, o.onTriggerChange),
|
|
1217
|
+
onClick: (p) => {
|
|
1935
1218
|
var m;
|
|
1936
|
-
(m = e.onClick) == null || m.call(e,
|
|
1219
|
+
(m = e.onClick) == null || m.call(e, p), !(e.disabled || p.defaultPrevented) && (p.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1937
1220
|
},
|
|
1938
|
-
onPointerMove:
|
|
1221
|
+
onPointerMove: y(
|
|
1939
1222
|
e.onPointerMove,
|
|
1940
|
-
|
|
1941
|
-
|
|
1223
|
+
ie((p) => {
|
|
1224
|
+
s.onItemEnter(p), !p.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1942
1225
|
n.onOpenChange(!0), d();
|
|
1943
1226
|
}, 100));
|
|
1944
1227
|
})
|
|
1945
1228
|
),
|
|
1946
|
-
onPointerLeave:
|
|
1229
|
+
onPointerLeave: y(
|
|
1947
1230
|
e.onPointerLeave,
|
|
1948
|
-
|
|
1949
|
-
var g,
|
|
1231
|
+
ie((p) => {
|
|
1232
|
+
var g, v;
|
|
1950
1233
|
d();
|
|
1951
1234
|
const m = (g = n.content) == null ? void 0 : g.getBoundingClientRect();
|
|
1952
1235
|
if (m) {
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1236
|
+
const h = (v = n.content) == null ? void 0 : v.dataset.side, b = h === "right", w = b ? -5 : 5, E = m[b ? "left" : "right"], M = m[b ? "right" : "left"];
|
|
1237
|
+
s.onPointerGraceIntentChange({
|
|
1955
1238
|
area: [
|
|
1956
1239
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1957
1240
|
// consistently within polygon bounds
|
|
1958
|
-
{ x:
|
|
1959
|
-
{ x: C, y: m.top },
|
|
1241
|
+
{ x: p.clientX + w, y: p.clientY },
|
|
1960
1242
|
{ x: E, y: m.top },
|
|
1961
|
-
{ x:
|
|
1962
|
-
{ x:
|
|
1243
|
+
{ x: M, y: m.top },
|
|
1244
|
+
{ x: M, y: m.bottom },
|
|
1245
|
+
{ x: E, y: m.bottom }
|
|
1963
1246
|
],
|
|
1964
|
-
side:
|
|
1247
|
+
side: h
|
|
1965
1248
|
}), window.clearTimeout(c.current), c.current = window.setTimeout(
|
|
1966
|
-
() =>
|
|
1249
|
+
() => s.onPointerGraceIntentChange(null),
|
|
1967
1250
|
300
|
|
1968
1251
|
);
|
|
1969
1252
|
} else {
|
|
1970
|
-
if (
|
|
1971
|
-
|
|
1253
|
+
if (s.onTriggerLeave(p), p.defaultPrevented) return;
|
|
1254
|
+
s.onPointerGraceIntentChange(null);
|
|
1972
1255
|
}
|
|
1973
1256
|
})
|
|
1974
1257
|
),
|
|
1975
|
-
onKeyDown:
|
|
1258
|
+
onKeyDown: y(e.onKeyDown, (p) => {
|
|
1976
1259
|
var g;
|
|
1977
|
-
const m =
|
|
1978
|
-
e.disabled || m &&
|
|
1260
|
+
const m = s.searchRef.current !== "";
|
|
1261
|
+
e.disabled || m && p.key === " " || Tr[r.dir].includes(p.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), p.preventDefault());
|
|
1979
1262
|
})
|
|
1980
1263
|
}
|
|
1981
1264
|
) });
|
|
1982
1265
|
}
|
|
1983
1266
|
);
|
|
1984
|
-
|
|
1985
|
-
var
|
|
1267
|
+
zt.displayName = ae;
|
|
1268
|
+
var Zt = "MenuSubContent", qt = a.forwardRef(
|
|
1986
1269
|
(e, t) => {
|
|
1987
|
-
const n =
|
|
1988
|
-
return /* @__PURE__ */
|
|
1989
|
-
|
|
1270
|
+
const n = Tt(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = W(L, e.__scopeMenu), i = pe(L, e.__scopeMenu), c = Yt(Zt, e.__scopeMenu), f = a.useRef(null), l = D(t, f);
|
|
1271
|
+
return /* @__PURE__ */ u(se.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(Ce, { present: r || s.open, children: /* @__PURE__ */ u(se.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(
|
|
1272
|
+
Ke,
|
|
1990
1273
|
{
|
|
1991
1274
|
id: c.contentId,
|
|
1992
1275
|
"aria-labelledby": c.triggerId,
|
|
1993
1276
|
...o,
|
|
1994
1277
|
ref: l,
|
|
1995
1278
|
align: "start",
|
|
1996
|
-
side:
|
|
1279
|
+
side: i.dir === "rtl" ? "left" : "right",
|
|
1997
1280
|
disableOutsidePointerEvents: !1,
|
|
1998
1281
|
disableOutsideScroll: !1,
|
|
1999
1282
|
trapFocus: !1,
|
|
2000
1283
|
onOpenAutoFocus: (d) => {
|
|
2001
|
-
var
|
|
2002
|
-
|
|
1284
|
+
var p;
|
|
1285
|
+
i.isUsingKeyboardRef.current && ((p = f.current) == null || p.focus()), d.preventDefault();
|
|
2003
1286
|
},
|
|
2004
1287
|
onCloseAutoFocus: (d) => d.preventDefault(),
|
|
2005
|
-
onFocusOutside:
|
|
2006
|
-
d.target !== c.trigger &&
|
|
1288
|
+
onFocusOutside: y(e.onFocusOutside, (d) => {
|
|
1289
|
+
d.target !== c.trigger && s.onOpenChange(!1);
|
|
2007
1290
|
}),
|
|
2008
|
-
onEscapeKeyDown:
|
|
2009
|
-
|
|
1291
|
+
onEscapeKeyDown: y(e.onEscapeKeyDown, (d) => {
|
|
1292
|
+
i.onClose(), d.preventDefault();
|
|
2010
1293
|
}),
|
|
2011
|
-
onKeyDown:
|
|
1294
|
+
onKeyDown: y(e.onKeyDown, (d) => {
|
|
2012
1295
|
var g;
|
|
2013
|
-
const
|
|
2014
|
-
|
|
1296
|
+
const p = d.currentTarget.contains(d.target), m = Dr[i.dir].includes(d.key);
|
|
1297
|
+
p && m && (s.onOpenChange(!1), (g = c.trigger) == null || g.focus(), d.preventDefault());
|
|
2015
1298
|
})
|
|
2016
1299
|
}
|
|
2017
1300
|
) }) }) });
|
|
2018
1301
|
}
|
|
2019
1302
|
);
|
|
2020
|
-
|
|
2021
|
-
function
|
|
1303
|
+
qt.displayName = Zt;
|
|
1304
|
+
function Jt(e) {
|
|
2022
1305
|
return e ? "open" : "closed";
|
|
2023
1306
|
}
|
|
2024
|
-
function
|
|
1307
|
+
function be(e) {
|
|
2025
1308
|
return e === "indeterminate";
|
|
2026
1309
|
}
|
|
2027
|
-
function
|
|
2028
|
-
return
|
|
1310
|
+
function We(e) {
|
|
1311
|
+
return be(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
2029
1312
|
}
|
|
2030
|
-
function
|
|
1313
|
+
function eo(e) {
|
|
2031
1314
|
const t = document.activeElement;
|
|
2032
1315
|
for (const n of e)
|
|
2033
1316
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
2034
1317
|
}
|
|
2035
|
-
function
|
|
1318
|
+
function to(e, t) {
|
|
2036
1319
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2037
1320
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const o = t.length > 1 && Array.from(t).every((l) => l === t[0]) ? t[0] : t,
|
|
2040
|
-
let
|
|
2041
|
-
o.length === 1 && (
|
|
2042
|
-
const
|
|
1321
|
+
function no(e, t, n) {
|
|
1322
|
+
const o = t.length > 1 && Array.from(t).every((l) => l === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1323
|
+
let i = to(e, Math.max(s, 0));
|
|
1324
|
+
o.length === 1 && (i = i.filter((l) => l !== n));
|
|
1325
|
+
const f = i.find(
|
|
2043
1326
|
(l) => l.toLowerCase().startsWith(o.toLowerCase())
|
|
2044
1327
|
);
|
|
2045
|
-
return
|
|
1328
|
+
return f !== n ? f : void 0;
|
|
2046
1329
|
}
|
|
2047
|
-
function
|
|
1330
|
+
function ro(e, t) {
|
|
2048
1331
|
const { x: n, y: r } = e;
|
|
2049
1332
|
let o = !1;
|
|
2050
|
-
for (let
|
|
2051
|
-
const c = t[
|
|
2052
|
-
d > r != m > r && n < (
|
|
1333
|
+
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
1334
|
+
const c = t[s], f = t[i], l = c.x, d = c.y, p = f.x, m = f.y;
|
|
1335
|
+
d > r != m > r && n < (p - l) * (r - d) / (m - d) + l && (o = !o);
|
|
2053
1336
|
}
|
|
2054
1337
|
return o;
|
|
2055
1338
|
}
|
|
2056
|
-
function
|
|
1339
|
+
function oo(e, t) {
|
|
2057
1340
|
if (!t) return !1;
|
|
2058
1341
|
const n = { x: e.clientX, y: e.clientY };
|
|
2059
|
-
return
|
|
1342
|
+
return ro(n, t);
|
|
2060
1343
|
}
|
|
2061
|
-
function
|
|
1344
|
+
function ie(e) {
|
|
2062
1345
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
2063
1346
|
}
|
|
2064
|
-
var
|
|
1347
|
+
var ao = Nt, so = $e, io = Dt, co = Ft, uo = Be, lo = Lt, fo = Ee, po = kt, mo = Kt, vo = Vt, go = Wt, ho = Ht, bo = jt, Co = Xt, yo = zt, Eo = qt;
|
|
2065
1348
|
// @__NO_SIDE_EFFECTS__
|
|
2066
|
-
function
|
|
2067
|
-
const t = /* @__PURE__ */
|
|
2068
|
-
const { children:
|
|
2069
|
-
if (
|
|
2070
|
-
const l =
|
|
2071
|
-
return /* @__PURE__ */
|
|
1349
|
+
function Mo(e) {
|
|
1350
|
+
const t = /* @__PURE__ */ wo(e), n = a.forwardRef((r, o) => {
|
|
1351
|
+
const { children: s, ...i } = r, c = a.Children.toArray(s), f = c.find(So);
|
|
1352
|
+
if (f) {
|
|
1353
|
+
const l = f.props.children, d = c.map((p) => p === f ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : p);
|
|
1354
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, d) : null });
|
|
2072
1355
|
}
|
|
2073
|
-
return /* @__PURE__ */
|
|
1356
|
+
return /* @__PURE__ */ u(t, { ...i, ref: o, children: s });
|
|
2074
1357
|
});
|
|
2075
1358
|
return n.displayName = `${e}.Slot`, n;
|
|
2076
1359
|
}
|
|
2077
1360
|
// @__NO_SIDE_EFFECTS__
|
|
2078
|
-
function
|
|
1361
|
+
function wo(e) {
|
|
2079
1362
|
const t = a.forwardRef((n, r) => {
|
|
2080
|
-
const { children: o, ...
|
|
1363
|
+
const { children: o, ...s } = n;
|
|
2081
1364
|
if (a.isValidElement(o)) {
|
|
2082
|
-
const
|
|
2083
|
-
return o.type !== a.Fragment && (c.ref = r ?
|
|
1365
|
+
const i = _o(o), c = Po(s, o.props);
|
|
1366
|
+
return o.type !== a.Fragment && (c.ref = r ? ce(r, i) : i), a.cloneElement(o, c);
|
|
2084
1367
|
}
|
|
2085
1368
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
2086
1369
|
});
|
|
2087
1370
|
return t.displayName = `${e}.SlotClone`, t;
|
|
2088
1371
|
}
|
|
2089
|
-
var
|
|
2090
|
-
function
|
|
2091
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
1372
|
+
var Ro = Symbol("radix.slottable");
|
|
1373
|
+
function So(e) {
|
|
1374
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ro;
|
|
2092
1375
|
}
|
|
2093
|
-
function
|
|
1376
|
+
function Po(e, t) {
|
|
2094
1377
|
const n = { ...t };
|
|
2095
1378
|
for (const r in t) {
|
|
2096
|
-
const o = e[r],
|
|
2097
|
-
/^on[A-Z]/.test(r) ? o &&
|
|
2098
|
-
const
|
|
2099
|
-
return o(...c),
|
|
2100
|
-
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...
|
|
1379
|
+
const o = e[r], s = t[r];
|
|
1380
|
+
/^on[A-Z]/.test(r) ? o && s ? n[r] = (...c) => {
|
|
1381
|
+
const f = s(...c);
|
|
1382
|
+
return o(...c), f;
|
|
1383
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" "));
|
|
2101
1384
|
}
|
|
2102
1385
|
return { ...e, ...n };
|
|
2103
1386
|
}
|
|
2104
|
-
function
|
|
1387
|
+
function _o(e) {
|
|
2105
1388
|
var r, o;
|
|
2106
1389
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
2107
1390
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2108
1391
|
}
|
|
2109
|
-
var
|
|
1392
|
+
var Io = [
|
|
2110
1393
|
"a",
|
|
2111
1394
|
"button",
|
|
2112
1395
|
"div",
|
|
@@ -2124,190 +1407,190 @@ var pi = [
|
|
|
2124
1407
|
"span",
|
|
2125
1408
|
"svg",
|
|
2126
1409
|
"ul"
|
|
2127
|
-
],
|
|
2128
|
-
const n = /* @__PURE__ */
|
|
2129
|
-
const { asChild:
|
|
2130
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f
|
|
1410
|
+
], Qt = Io.reduce((e, t) => {
|
|
1411
|
+
const n = /* @__PURE__ */ Mo(`Primitive.${t}`), r = a.forwardRef((o, s) => {
|
|
1412
|
+
const { asChild: i, ...c } = o, f = i ? n : t;
|
|
1413
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(f, { ...c, ref: s });
|
|
2131
1414
|
});
|
|
2132
1415
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2133
|
-
}, {}),
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
]),
|
|
1416
|
+
}, {}), me = "Menubar", [xe, xo, Ao] = Te(me), [en, pa] = ue(me, [
|
|
1417
|
+
Ao,
|
|
1418
|
+
ye
|
|
1419
|
+
]), x = $r(), tn = ye(), [Oo, He] = en(me), nn = a.forwardRef(
|
|
2137
1420
|
(e, t) => {
|
|
2138
1421
|
const {
|
|
2139
1422
|
__scopeMenubar: n,
|
|
2140
1423
|
value: r,
|
|
2141
1424
|
onValueChange: o,
|
|
2142
|
-
defaultValue:
|
|
2143
|
-
loop:
|
|
1425
|
+
defaultValue: s,
|
|
1426
|
+
loop: i = !0,
|
|
2144
1427
|
dir: c,
|
|
2145
|
-
...
|
|
2146
|
-
} = e, l =
|
|
1428
|
+
...f
|
|
1429
|
+
} = e, l = De(c), d = tn(n), [p, m] = Ne({
|
|
2147
1430
|
prop: r,
|
|
2148
1431
|
onChange: o,
|
|
2149
|
-
defaultProp:
|
|
2150
|
-
caller:
|
|
2151
|
-
}), [g,
|
|
2152
|
-
return /* @__PURE__ */
|
|
2153
|
-
|
|
1432
|
+
defaultProp: s ?? "",
|
|
1433
|
+
caller: me
|
|
1434
|
+
}), [g, v] = a.useState(null);
|
|
1435
|
+
return /* @__PURE__ */ u(
|
|
1436
|
+
Oo,
|
|
2154
1437
|
{
|
|
2155
1438
|
scope: n,
|
|
2156
|
-
value:
|
|
1439
|
+
value: p,
|
|
2157
1440
|
onMenuOpen: a.useCallback(
|
|
2158
|
-
(
|
|
2159
|
-
m(
|
|
1441
|
+
(h) => {
|
|
1442
|
+
m(h), v(h);
|
|
2160
1443
|
},
|
|
2161
1444
|
[m]
|
|
2162
1445
|
),
|
|
2163
1446
|
onMenuClose: a.useCallback(() => m(""), [m]),
|
|
2164
1447
|
onMenuToggle: a.useCallback(
|
|
2165
|
-
(
|
|
2166
|
-
m((
|
|
1448
|
+
(h) => {
|
|
1449
|
+
m((b) => b ? "" : h), v(h);
|
|
2167
1450
|
},
|
|
2168
1451
|
[m]
|
|
2169
1452
|
),
|
|
2170
1453
|
dir: l,
|
|
2171
|
-
loop:
|
|
2172
|
-
children: /* @__PURE__ */
|
|
2173
|
-
|
|
1454
|
+
loop: i,
|
|
1455
|
+
children: /* @__PURE__ */ u(xe.Provider, { scope: n, children: /* @__PURE__ */ u(xe.Slot, { scope: n, children: /* @__PURE__ */ u(
|
|
1456
|
+
_t,
|
|
2174
1457
|
{
|
|
2175
1458
|
asChild: !0,
|
|
2176
1459
|
...d,
|
|
2177
1460
|
orientation: "horizontal",
|
|
2178
|
-
loop:
|
|
1461
|
+
loop: i,
|
|
2179
1462
|
dir: l,
|
|
2180
1463
|
currentTabStopId: g,
|
|
2181
|
-
onCurrentTabStopIdChange:
|
|
2182
|
-
children: /* @__PURE__ */
|
|
1464
|
+
onCurrentTabStopIdChange: v,
|
|
1465
|
+
children: /* @__PURE__ */ u(Qt.div, { role: "menubar", ...f, ref: t })
|
|
2183
1466
|
}
|
|
2184
1467
|
) }) })
|
|
2185
1468
|
}
|
|
2186
1469
|
);
|
|
2187
1470
|
}
|
|
2188
1471
|
);
|
|
2189
|
-
|
|
2190
|
-
var
|
|
2191
|
-
const { __scopeMenubar: t, value: n, ...r } = e, o =
|
|
1472
|
+
nn.displayName = me;
|
|
1473
|
+
var je = "MenubarMenu", [No, rn] = en(je), on = (e) => {
|
|
1474
|
+
const { __scopeMenubar: t, value: n, ...r } = e, o = Q(), s = n || o || "LEGACY_REACT_AUTO_VALUE", i = He(je, t), c = x(t), f = a.useRef(null), l = a.useRef(!1), d = i.value === s;
|
|
2192
1475
|
return a.useEffect(() => {
|
|
2193
1476
|
d || (l.current = !1);
|
|
2194
|
-
}, [d]), /* @__PURE__ */
|
|
2195
|
-
|
|
1477
|
+
}, [d]), /* @__PURE__ */ u(
|
|
1478
|
+
No,
|
|
2196
1479
|
{
|
|
2197
1480
|
scope: t,
|
|
2198
|
-
value:
|
|
2199
|
-
triggerId:
|
|
2200
|
-
triggerRef:
|
|
2201
|
-
contentId:
|
|
1481
|
+
value: s,
|
|
1482
|
+
triggerId: Q(),
|
|
1483
|
+
triggerRef: f,
|
|
1484
|
+
contentId: Q(),
|
|
2202
1485
|
wasKeyboardTriggerOpenRef: l,
|
|
2203
|
-
children: /* @__PURE__ */
|
|
2204
|
-
|
|
1486
|
+
children: /* @__PURE__ */ u(
|
|
1487
|
+
ao,
|
|
2205
1488
|
{
|
|
2206
1489
|
...c,
|
|
2207
1490
|
open: d,
|
|
2208
|
-
onOpenChange: (
|
|
2209
|
-
|
|
1491
|
+
onOpenChange: (p) => {
|
|
1492
|
+
p || i.onMenuClose();
|
|
2210
1493
|
},
|
|
2211
1494
|
modal: !1,
|
|
2212
|
-
dir:
|
|
1495
|
+
dir: i.dir,
|
|
2213
1496
|
...r
|
|
2214
1497
|
}
|
|
2215
1498
|
)
|
|
2216
1499
|
}
|
|
2217
1500
|
);
|
|
2218
1501
|
};
|
|
2219
|
-
|
|
2220
|
-
var
|
|
1502
|
+
on.displayName = je;
|
|
1503
|
+
var Ae = "MenubarTrigger", an = a.forwardRef(
|
|
2221
1504
|
(e, t) => {
|
|
2222
|
-
const { __scopeMenubar: n, disabled: r = !1, ...o } = e,
|
|
2223
|
-
return /* @__PURE__ */
|
|
2224
|
-
|
|
1505
|
+
const { __scopeMenubar: n, disabled: r = !1, ...o } = e, s = tn(n), i = x(n), c = He(Ae, n), f = rn(Ae, n), l = a.useRef(null), d = D(t, l, f.triggerRef), [p, m] = a.useState(!1), g = c.value === f.value;
|
|
1506
|
+
return /* @__PURE__ */ u(xe.ItemSlot, { scope: n, value: f.value, disabled: r, children: /* @__PURE__ */ u(
|
|
1507
|
+
It,
|
|
2225
1508
|
{
|
|
2226
1509
|
asChild: !0,
|
|
2227
|
-
...
|
|
1510
|
+
...s,
|
|
2228
1511
|
focusable: !r,
|
|
2229
|
-
tabStopId:
|
|
2230
|
-
children: /* @__PURE__ */
|
|
2231
|
-
|
|
1512
|
+
tabStopId: f.value,
|
|
1513
|
+
children: /* @__PURE__ */ u(so, { asChild: !0, ...i, children: /* @__PURE__ */ u(
|
|
1514
|
+
Qt.button,
|
|
2232
1515
|
{
|
|
2233
1516
|
type: "button",
|
|
2234
1517
|
role: "menuitem",
|
|
2235
|
-
id:
|
|
1518
|
+
id: f.triggerId,
|
|
2236
1519
|
"aria-haspopup": "menu",
|
|
2237
1520
|
"aria-expanded": g,
|
|
2238
|
-
"aria-controls": g ?
|
|
2239
|
-
"data-highlighted":
|
|
1521
|
+
"aria-controls": g ? f.contentId : void 0,
|
|
1522
|
+
"data-highlighted": p ? "" : void 0,
|
|
2240
1523
|
"data-state": g ? "open" : "closed",
|
|
2241
1524
|
"data-disabled": r ? "" : void 0,
|
|
2242
1525
|
disabled: r,
|
|
2243
1526
|
...o,
|
|
2244
1527
|
ref: d,
|
|
2245
|
-
onPointerDown:
|
|
2246
|
-
!r &&
|
|
1528
|
+
onPointerDown: y(e.onPointerDown, (v) => {
|
|
1529
|
+
!r && v.button === 0 && v.ctrlKey === !1 && (c.onMenuOpen(f.value), g || v.preventDefault());
|
|
2247
1530
|
}),
|
|
2248
|
-
onPointerEnter:
|
|
2249
|
-
var
|
|
2250
|
-
!!c.value && !g && (c.onMenuOpen(
|
|
1531
|
+
onPointerEnter: y(e.onPointerEnter, () => {
|
|
1532
|
+
var h;
|
|
1533
|
+
!!c.value && !g && (c.onMenuOpen(f.value), (h = l.current) == null || h.focus());
|
|
2251
1534
|
}),
|
|
2252
|
-
onKeyDown:
|
|
2253
|
-
r || (["Enter", " "].includes(
|
|
1535
|
+
onKeyDown: y(e.onKeyDown, (v) => {
|
|
1536
|
+
r || (["Enter", " "].includes(v.key) && c.onMenuToggle(f.value), v.key === "ArrowDown" && c.onMenuOpen(f.value), ["Enter", " ", "ArrowDown"].includes(v.key) && (f.wasKeyboardTriggerOpenRef.current = !0, v.preventDefault()));
|
|
2254
1537
|
}),
|
|
2255
|
-
onFocus:
|
|
2256
|
-
onBlur:
|
|
1538
|
+
onFocus: y(e.onFocus, () => m(!0)),
|
|
1539
|
+
onBlur: y(e.onBlur, () => m(!1))
|
|
2257
1540
|
}
|
|
2258
1541
|
) })
|
|
2259
1542
|
}
|
|
2260
1543
|
) });
|
|
2261
1544
|
}
|
|
2262
1545
|
);
|
|
2263
|
-
|
|
2264
|
-
var
|
|
2265
|
-
const { __scopeMenubar: t, ...n } = e, r =
|
|
2266
|
-
return /* @__PURE__ */
|
|
1546
|
+
an.displayName = Ae;
|
|
1547
|
+
var To = "MenubarPortal", sn = (e) => {
|
|
1548
|
+
const { __scopeMenubar: t, ...n } = e, r = x(t);
|
|
1549
|
+
return /* @__PURE__ */ u(io, { ...r, ...n });
|
|
2267
1550
|
};
|
|
2268
|
-
|
|
2269
|
-
var
|
|
1551
|
+
sn.displayName = To;
|
|
1552
|
+
var Oe = "MenubarContent", cn = a.forwardRef(
|
|
2270
1553
|
(e, t) => {
|
|
2271
|
-
const { __scopeMenubar: n, align: r = "start", ...o } = e,
|
|
2272
|
-
return /* @__PURE__ */
|
|
2273
|
-
|
|
1554
|
+
const { __scopeMenubar: n, align: r = "start", ...o } = e, s = x(n), i = He(Oe, n), c = rn(Oe, n), f = xo(n), l = a.useRef(!1);
|
|
1555
|
+
return /* @__PURE__ */ u(
|
|
1556
|
+
co,
|
|
2274
1557
|
{
|
|
2275
1558
|
id: c.contentId,
|
|
2276
1559
|
"aria-labelledby": c.triggerId,
|
|
2277
1560
|
"data-radix-menubar-content": "",
|
|
2278
|
-
...
|
|
1561
|
+
...s,
|
|
2279
1562
|
...o,
|
|
2280
1563
|
ref: t,
|
|
2281
1564
|
align: r,
|
|
2282
|
-
onCloseAutoFocus:
|
|
1565
|
+
onCloseAutoFocus: y(e.onCloseAutoFocus, (d) => {
|
|
2283
1566
|
var m;
|
|
2284
|
-
!!!
|
|
1567
|
+
!!!i.value && !l.current && ((m = c.triggerRef.current) == null || m.focus()), l.current = !1, d.preventDefault();
|
|
2285
1568
|
}),
|
|
2286
|
-
onFocusOutside:
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2289
|
-
var
|
|
2290
|
-
return (
|
|
1569
|
+
onFocusOutside: y(e.onFocusOutside, (d) => {
|
|
1570
|
+
const p = d.target;
|
|
1571
|
+
f().some((g) => {
|
|
1572
|
+
var v;
|
|
1573
|
+
return (v = g.ref.current) == null ? void 0 : v.contains(p);
|
|
2291
1574
|
}) && d.preventDefault();
|
|
2292
1575
|
}),
|
|
2293
|
-
onInteractOutside:
|
|
1576
|
+
onInteractOutside: y(e.onInteractOutside, () => {
|
|
2294
1577
|
l.current = !0;
|
|
2295
1578
|
}),
|
|
2296
1579
|
onEntryFocus: (d) => {
|
|
2297
1580
|
c.wasKeyboardTriggerOpenRef.current || d.preventDefault();
|
|
2298
1581
|
},
|
|
2299
|
-
onKeyDown:
|
|
1582
|
+
onKeyDown: y(
|
|
2300
1583
|
e.onKeyDown,
|
|
2301
1584
|
(d) => {
|
|
2302
1585
|
if (["ArrowRight", "ArrowLeft"].includes(d.key)) {
|
|
2303
|
-
const
|
|
2304
|
-
if (!
|
|
2305
|
-
let
|
|
2306
|
-
|
|
2307
|
-
const
|
|
2308
|
-
|
|
2309
|
-
const [S] =
|
|
2310
|
-
S &&
|
|
1586
|
+
const p = d.target, m = p.hasAttribute("data-radix-menubar-subtrigger"), g = p.closest("[data-radix-menubar-content]") !== d.currentTarget, h = (i.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === d.key;
|
|
1587
|
+
if (!h && m || g && h) return;
|
|
1588
|
+
let E = f().filter((I) => !I.disabled).map((I) => I.value);
|
|
1589
|
+
h && E.reverse();
|
|
1590
|
+
const M = E.indexOf(c.value);
|
|
1591
|
+
E = i.loop ? Qo(E, M + 1) : E.slice(M + 1);
|
|
1592
|
+
const [S] = E;
|
|
1593
|
+
S && i.onMenuOpen(S);
|
|
2311
1594
|
}
|
|
2312
1595
|
},
|
|
2313
1596
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -2324,83 +1607,83 @@ var qe = "MenubarContent", Xn = a.forwardRef(
|
|
|
2324
1607
|
);
|
|
2325
1608
|
}
|
|
2326
1609
|
);
|
|
2327
|
-
|
|
2328
|
-
var
|
|
1610
|
+
cn.displayName = Oe;
|
|
1611
|
+
var Do = "MenubarGroup", Fo = a.forwardRef(
|
|
2329
1612
|
(e, t) => {
|
|
2330
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2331
|
-
return /* @__PURE__ */
|
|
1613
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1614
|
+
return /* @__PURE__ */ u(uo, { ...o, ...r, ref: t });
|
|
2332
1615
|
}
|
|
2333
1616
|
);
|
|
2334
|
-
|
|
2335
|
-
var
|
|
1617
|
+
Fo.displayName = Do;
|
|
1618
|
+
var Lo = "MenubarLabel", $o = a.forwardRef(
|
|
2336
1619
|
(e, t) => {
|
|
2337
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2338
|
-
return /* @__PURE__ */
|
|
1620
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1621
|
+
return /* @__PURE__ */ u(lo, { ...o, ...r, ref: t });
|
|
2339
1622
|
}
|
|
2340
1623
|
);
|
|
2341
|
-
|
|
2342
|
-
var
|
|
1624
|
+
$o.displayName = Lo;
|
|
1625
|
+
var ko = "MenubarItem", un = a.forwardRef(
|
|
2343
1626
|
(e, t) => {
|
|
2344
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2345
|
-
return /* @__PURE__ */
|
|
1627
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1628
|
+
return /* @__PURE__ */ u(fo, { ...o, ...r, ref: t });
|
|
2346
1629
|
}
|
|
2347
1630
|
);
|
|
2348
|
-
|
|
2349
|
-
var
|
|
1631
|
+
un.displayName = ko;
|
|
1632
|
+
var Go = "MenubarCheckboxItem", Ko = a.forwardRef(
|
|
2350
1633
|
(e, t) => {
|
|
2351
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2352
|
-
return /* @__PURE__ */
|
|
1634
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1635
|
+
return /* @__PURE__ */ u(po, { ...o, ...r, ref: t });
|
|
2353
1636
|
}
|
|
2354
1637
|
);
|
|
2355
|
-
|
|
2356
|
-
var
|
|
1638
|
+
Ko.displayName = Go;
|
|
1639
|
+
var Bo = "MenubarRadioGroup", Vo = a.forwardRef(
|
|
2357
1640
|
(e, t) => {
|
|
2358
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2359
|
-
return /* @__PURE__ */
|
|
1641
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1642
|
+
return /* @__PURE__ */ u(mo, { ...o, ...r, ref: t });
|
|
2360
1643
|
}
|
|
2361
1644
|
);
|
|
2362
|
-
|
|
2363
|
-
var
|
|
1645
|
+
Vo.displayName = Bo;
|
|
1646
|
+
var Uo = "MenubarRadioItem", Wo = a.forwardRef(
|
|
2364
1647
|
(e, t) => {
|
|
2365
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2366
|
-
return /* @__PURE__ */
|
|
1648
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1649
|
+
return /* @__PURE__ */ u(vo, { ...o, ...r, ref: t });
|
|
2367
1650
|
}
|
|
2368
1651
|
);
|
|
2369
|
-
|
|
2370
|
-
var
|
|
2371
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2372
|
-
return /* @__PURE__ */
|
|
1652
|
+
Wo.displayName = Uo;
|
|
1653
|
+
var Ho = "MenubarItemIndicator", jo = a.forwardRef((e, t) => {
|
|
1654
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1655
|
+
return /* @__PURE__ */ u(go, { ...o, ...r, ref: t });
|
|
2373
1656
|
});
|
|
2374
|
-
|
|
2375
|
-
var
|
|
1657
|
+
jo.displayName = Ho;
|
|
1658
|
+
var Yo = "MenubarSeparator", Xo = a.forwardRef(
|
|
2376
1659
|
(e, t) => {
|
|
2377
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2378
|
-
return /* @__PURE__ */
|
|
1660
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1661
|
+
return /* @__PURE__ */ u(ho, { ...o, ...r, ref: t });
|
|
2379
1662
|
}
|
|
2380
1663
|
);
|
|
2381
|
-
|
|
2382
|
-
var
|
|
1664
|
+
Xo.displayName = Yo;
|
|
1665
|
+
var zo = "MenubarArrow", Zo = a.forwardRef(
|
|
2383
1666
|
(e, t) => {
|
|
2384
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2385
|
-
return /* @__PURE__ */
|
|
1667
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1668
|
+
return /* @__PURE__ */ u(bo, { ...o, ...r, ref: t });
|
|
2386
1669
|
}
|
|
2387
1670
|
);
|
|
2388
|
-
|
|
2389
|
-
var
|
|
2390
|
-
const { __scopeMenubar: t, children: n, open: r, onOpenChange: o, defaultOpen:
|
|
1671
|
+
Zo.displayName = zo;
|
|
1672
|
+
var ln = "MenubarSub", dn = (e) => {
|
|
1673
|
+
const { __scopeMenubar: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = x(t), [c, f] = Ne({
|
|
2391
1674
|
prop: r,
|
|
2392
|
-
defaultProp:
|
|
1675
|
+
defaultProp: s ?? !1,
|
|
2393
1676
|
onChange: o,
|
|
2394
|
-
caller:
|
|
1677
|
+
caller: ln
|
|
2395
1678
|
});
|
|
2396
|
-
return /* @__PURE__ */
|
|
1679
|
+
return /* @__PURE__ */ u(Co, { ...i, open: c, onOpenChange: f, children: n });
|
|
2397
1680
|
};
|
|
2398
|
-
|
|
2399
|
-
var
|
|
1681
|
+
dn.displayName = ln;
|
|
1682
|
+
var qo = "MenubarSubTrigger", fn = a.forwardRef(
|
|
2400
1683
|
(e, t) => {
|
|
2401
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2402
|
-
return /* @__PURE__ */
|
|
2403
|
-
|
|
1684
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1685
|
+
return /* @__PURE__ */ u(
|
|
1686
|
+
yo,
|
|
2404
1687
|
{
|
|
2405
1688
|
"data-radix-menubar-subtrigger": "",
|
|
2406
1689
|
...o,
|
|
@@ -2410,12 +1693,12 @@ var Li = "MenubarSubTrigger", Qn = a.forwardRef(
|
|
|
2410
1693
|
);
|
|
2411
1694
|
}
|
|
2412
1695
|
);
|
|
2413
|
-
|
|
2414
|
-
var
|
|
1696
|
+
fn.displayName = qo;
|
|
1697
|
+
var Jo = "MenubarSubContent", pn = a.forwardRef(
|
|
2415
1698
|
(e, t) => {
|
|
2416
|
-
const { __scopeMenubar: n, ...r } = e, o =
|
|
2417
|
-
return /* @__PURE__ */
|
|
2418
|
-
|
|
1699
|
+
const { __scopeMenubar: n, ...r } = e, o = x(n);
|
|
1700
|
+
return /* @__PURE__ */ u(
|
|
1701
|
+
Eo,
|
|
2419
1702
|
{
|
|
2420
1703
|
...o,
|
|
2421
1704
|
"data-radix-menubar-content": "",
|
|
@@ -2433,40 +1716,40 @@ var ki = "MenubarSubContent", Jn = a.forwardRef(
|
|
|
2433
1716
|
);
|
|
2434
1717
|
}
|
|
2435
1718
|
);
|
|
2436
|
-
|
|
2437
|
-
function
|
|
1719
|
+
pn.displayName = Jo;
|
|
1720
|
+
function Qo(e, t) {
|
|
2438
1721
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2439
1722
|
}
|
|
2440
|
-
var
|
|
2441
|
-
const
|
|
2442
|
-
/* @__PURE__ */
|
|
2443
|
-
/* @__PURE__ */
|
|
2444
|
-
|
|
1723
|
+
var ea = nn, ta = on, na = an, tt = sn, ra = cn, nt = un, oa = dn, aa = fn, sa = pn;
|
|
1724
|
+
const ma = ({ options: e }) => /* @__PURE__ */ u(ea, { className: "menubar-root", children: /* @__PURE__ */ Me(ta, { children: [
|
|
1725
|
+
/* @__PURE__ */ u(na, { className: "menubar-trigger", children: /* @__PURE__ */ u(Dn, {}) }),
|
|
1726
|
+
/* @__PURE__ */ u(tt, { children: /* @__PURE__ */ u(
|
|
1727
|
+
ra,
|
|
2445
1728
|
{
|
|
2446
1729
|
className: "menubar-content",
|
|
2447
1730
|
align: "center",
|
|
2448
1731
|
side: "left",
|
|
2449
1732
|
sideOffset: 5,
|
|
2450
1733
|
alignOffset: -3,
|
|
2451
|
-
children: e == null ? void 0 : e.map((t, n) => t.subOptions ? /* @__PURE__ */
|
|
2452
|
-
/* @__PURE__ */
|
|
2453
|
-
|
|
1734
|
+
children: e == null ? void 0 : e.map((t, n) => t.subOptions ? /* @__PURE__ */ Me(oa, { children: [
|
|
1735
|
+
/* @__PURE__ */ Me(
|
|
1736
|
+
aa,
|
|
2454
1737
|
{
|
|
2455
1738
|
className: "menubar-sub-trigger",
|
|
2456
1739
|
onPointerLeave: (r) => r.preventDefault(),
|
|
2457
1740
|
children: [
|
|
2458
1741
|
t.label,
|
|
2459
|
-
/* @__PURE__ */
|
|
1742
|
+
/* @__PURE__ */ u("div", { className: "right-slot", children: /* @__PURE__ */ u(Fn, {}) })
|
|
2460
1743
|
]
|
|
2461
1744
|
}
|
|
2462
1745
|
),
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
|
|
1746
|
+
/* @__PURE__ */ u(tt, { children: /* @__PURE__ */ u(
|
|
1747
|
+
sa,
|
|
2465
1748
|
{
|
|
2466
1749
|
className: "menubar-sub-content",
|
|
2467
1750
|
alignOffset: -5,
|
|
2468
|
-
children: t.subOptions.map((r, o) => /* @__PURE__ */
|
|
2469
|
-
|
|
1751
|
+
children: t.subOptions.map((r, o) => /* @__PURE__ */ u(
|
|
1752
|
+
nt,
|
|
2470
1753
|
{
|
|
2471
1754
|
className: "menubar-item",
|
|
2472
1755
|
onClick: r.action,
|
|
@@ -2476,8 +1759,8 @@ const Ji = ({ options: e }) => /* @__PURE__ */ f(Bi, { className: "menubar-root"
|
|
|
2476
1759
|
))
|
|
2477
1760
|
}
|
|
2478
1761
|
) })
|
|
2479
|
-
] }, n) : /* @__PURE__ */
|
|
2480
|
-
|
|
1762
|
+
] }, n) : /* @__PURE__ */ u(
|
|
1763
|
+
nt,
|
|
2481
1764
|
{
|
|
2482
1765
|
className: "menubar-item",
|
|
2483
1766
|
onClick: t.action,
|
|
@@ -2489,5 +1772,5 @@ const Ji = ({ options: e }) => /* @__PURE__ */ f(Bi, { className: "menubar-root"
|
|
|
2489
1772
|
) })
|
|
2490
1773
|
] }) });
|
|
2491
1774
|
export {
|
|
2492
|
-
|
|
1775
|
+
ma as default
|
|
2493
1776
|
};
|