@fluid-app/fluid-cli-theme-dev 0.1.433 → 0.1.434
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/dist-cli-preview/.vite/manifest.json +311 -314
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{Breadcrumb-D_SqXp7d.js → Breadcrumb-BKdVGms9.js} +1 -1
- package/dist/dist-cli-preview/chunks/{Combobox-Km3Vrphp.js → Combobox-CyU4gagO.js} +27 -27
- package/dist/dist-cli-preview/chunks/{ContactsScreen-kuRxflCD.js → ContactsScreen-nqNyMwxa.js} +370 -370
- package/dist/dist-cli-preview/chunks/MediaScreen-BGWqRFE4.js +8 -0
- package/dist/dist-cli-preview/chunks/{MemberManagementProviders-BS6VVAvZ.js → MemberManagementProviders-D8tSqPWo.js} +6 -6
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-DMuIxGxX.js → MemberShareablesScreen-nYcxHAnv.js} +1313 -1329
- package/dist/dist-cli-preview/chunks/MessagingScreen-DaCvmrAU.js +50551 -0
- package/dist/dist-cli-preview/chunks/MobileActionSheet-DaIBkwQD.js +3884 -0
- package/dist/dist-cli-preview/chunks/{MySiteScreen-Ch1cOkKp.js → MySiteScreen-BYY4CFhu.js} +15 -15
- package/dist/dist-cli-preview/chunks/OrdersScreen-DDdLpJ-7.js +9 -0
- package/dist/dist-cli-preview/chunks/{OrdersScreen-DFqHUrkC.js → OrdersScreen-DkZKc0Z_.js} +7 -7
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-F04j44L-.js +8 -0
- package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-DWOzWTBJ.js → PortalTenantClientProvider-D6a79po2.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-C_gqCV47.js → ProfileScreen-BPw0o_kl.js} +222 -237
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DiXGHeoZ.js → SubscriptionsScreen-DuiI_9iF.js} +3 -3
- package/dist/dist-cli-preview/chunks/{account-screen-runtime-BjzMc3GU.js → account-screen-runtime-BYj9PrHT.js} +2326 -2358
- package/dist/dist-cli-preview/chunks/ar-1KIG4DjU.js +1032 -0
- package/dist/dist-cli-preview/chunks/{arrow-left-D62DJteK.js → arrow-left-DnjGVTam.js} +1 -1
- package/dist/dist-cli-preview/chunks/bg-yBy5d6ww.js +1032 -0
- package/dist/dist-cli-preview/chunks/bn-BDIXtBiu.js +1032 -0
- package/dist/dist-cli-preview/chunks/{cli-preview-c45YGC1E.js → cli-preview-C-nTMZQi.js} +10 -10
- package/dist/dist-cli-preview/chunks/{client.gen-DfWiOTes.js → client.gen-DO8I8bB0.js} +9 -9
- package/dist/dist-cli-preview/chunks/{copy-zqKnEIeM.js → copy-COLmacny.js} +1 -1
- package/dist/dist-cli-preview/chunks/{countries-api-adapter-DRty_8ei.js → countries-api-adapter-B2ub-v6x.js} +2 -2
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-4VLe3B5O.js → create-card-entry-container-C7h1cYNe.js} +7380 -7374
- package/dist/dist-cli-preview/chunks/cs-eyeSjS66.js +1032 -0
- package/dist/dist-cli-preview/chunks/da-BMwLUsWZ.js +1032 -0
- package/dist/dist-cli-preview/chunks/de-CWgvDnNQ.js +1032 -0
- package/dist/dist-cli-preview/chunks/el-BhX-RBtB.js +1032 -0
- package/dist/dist-cli-preview/chunks/ellipsis-wdxlMcjt.js +15 -0
- package/dist/dist-cli-preview/chunks/es-fIpwOat4.js +1032 -0
- package/dist/dist-cli-preview/chunks/{eye-Ce93vUsx.js → eye-Cs-LW2s_.js} +1 -1
- package/dist/dist-cli-preview/chunks/fi-BI9n529u.js +1032 -0
- package/dist/dist-cli-preview/chunks/fr-DMDmmtDd.js +1032 -0
- package/dist/dist-cli-preview/chunks/he-BQxAPia2.js +1032 -0
- package/dist/dist-cli-preview/chunks/{hey-api-client-GUem9W6L.js → hey-api-client-C0XYGcOp.js} +1 -1
- package/dist/dist-cli-preview/chunks/hi--CH25zD0.js +1032 -0
- package/dist/dist-cli-preview/chunks/hr-vHPscpGv.js +1032 -0
- package/dist/dist-cli-preview/chunks/hu-BQTLt458.js +1032 -0
- package/dist/dist-cli-preview/chunks/id-R9lUJSOz.js +1032 -0
- package/dist/dist-cli-preview/chunks/{index-B_xDY7q5.js → index-C3BTHcpz.js} +249 -232
- package/dist/dist-cli-preview/chunks/{index-DotYg_8P.js → index-DSTWchdg.js} +2294 -2088
- package/dist/dist-cli-preview/chunks/index-qwhiPvOP.js +135 -0
- package/dist/dist-cli-preview/chunks/isAfter-CcghMy5x.js +1324 -0
- package/dist/dist-cli-preview/chunks/it-iN8sGAC0.js +1032 -0
- package/dist/dist-cli-preview/chunks/ja-BGIZaAW0.js +1032 -0
- package/dist/dist-cli-preview/chunks/ko-Cr6Wl_2I.js +1032 -0
- package/dist/dist-cli-preview/chunks/log-out-BIykSy7b.js +30 -0
- package/dist/dist-cli-preview/chunks/{map-pin-C_2_P4BZ.js → map-pin-Be34_dU6.js} +1 -1
- package/dist/dist-cli-preview/chunks/messaging-D7ENrup9.js +4 -0
- package/dist/dist-cli-preview/chunks/{mount-account-screen-DLu4WsoN.js → mount-account-screen-BfLjUsgR.js} +8 -8
- package/dist/dist-cli-preview/chunks/ms-CVPERbjz.js +1032 -0
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-Zm16FA01.js → navigate-account-screen-CiKHtySl.js} +1 -1
- package/dist/dist-cli-preview/chunks/nl-38XjLPxf.js +1032 -0
- package/dist/dist-cli-preview/chunks/no-C9CyNben.js +1032 -0
- package/dist/dist-cli-preview/chunks/pause-BBpqu34U.js +41 -0
- package/dist/dist-cli-preview/chunks/pl-DmR9h5su.js +1032 -0
- package/dist/dist-cli-preview/chunks/pt-t-mbd11H.js +1032 -0
- package/dist/dist-cli-preview/chunks/ro-T2DyDJMM.js +1032 -0
- package/dist/dist-cli-preview/chunks/ru-DEgbQN8m.js +1032 -0
- package/dist/dist-cli-preview/chunks/{schemas-CcDaDYH8.js → schemas-EHBiwcQ2.js} +1748 -1618
- package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-CKharc6_.js → screen-route-slug-utils-Bq-L-ohr.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sheet-haptics-context-DTfySPrq.js → sheet-haptics-context-DT2_eUzd.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sidebar-CkC-f9zG.js → sidebar-C09syHYk.js} +10 -10
- package/dist/dist-cli-preview/chunks/sk-CFYGY_a5.js +1032 -0
- package/dist/dist-cli-preview/chunks/{sortable.esm-e9hcrOle.js → sortable.esm-ClljxXn3.js} +2 -2
- package/dist/dist-cli-preview/chunks/{store-api-context-CDtl_X71.js → store-api-context-DzwRm7gt.js} +1 -1
- package/dist/dist-cli-preview/chunks/sv-i61vcDan.js +1032 -0
- package/dist/dist-cli-preview/chunks/th-DfFRan1t.js +1032 -0
- package/dist/dist-cli-preview/chunks/tl-olBNOPcn.js +1032 -0
- package/dist/dist-cli-preview/chunks/tr-LZKZ4tKb.js +1032 -0
- package/dist/dist-cli-preview/chunks/trash-2-CZhp1ODr.js +17 -0
- package/dist/dist-cli-preview/chunks/uk-BtXttbkl.js +1032 -0
- package/dist/dist-cli-preview/chunks/{use-mobile-DF76-293.js → use-mobile-B7ojcHh2.js} +3 -3
- package/dist/dist-cli-preview/chunks/{use-optional-store-DT9WAQPd.js → use-optional-store-DJYDCvhI.js} +2 -2
- package/dist/dist-cli-preview/chunks/use-store-DeK8QAFv.js +400 -0
- package/dist/dist-cli-preview/chunks/{useInfiniteQuery-CDXQnWw0.js → useInfiniteQuery-FHeNizQM.js} +1 -1
- package/dist/dist-cli-preview/chunks/{user-B-jZvwGL.js → user-ozIT6Hhj.js} +1 -1
- package/dist/dist-cli-preview/chunks/{users-TuK7MiQN.js → users-JoDv7hjw.js} +1 -1
- package/dist/dist-cli-preview/chunks/vi-BHWnhETf.js +1032 -0
- package/dist/dist-cli-preview/chunks/zh_CN-CTgClYOF.js +1032 -0
- package/dist/dist-cli-preview/chunks/zh_TW-aQ6cE6PF.js +1032 -0
- package/package.json +2 -2
- package/dist/dist-cli-preview/chunks/MediaScreen-BvJdBMeQ.js +0 -8
- package/dist/dist-cli-preview/chunks/MessagingScreen-BKHqT1Ej.js +0 -35760
- package/dist/dist-cli-preview/chunks/MobileActionSheet-CBoGiv4j.js +0 -2950
- package/dist/dist-cli-preview/chunks/OrdersScreen-BGgj4BZS.js +0 -9
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-Bx1XIkZA.js +0 -8
- package/dist/dist-cli-preview/chunks/Select-sVTiAmsy.js +0 -952
- package/dist/dist-cli-preview/chunks/Textarea-D-fkMEdH.js +0 -349
- package/dist/dist-cli-preview/chunks/ar-2rvzIrIR.js +0 -626
- package/dist/dist-cli-preview/chunks/bg-BYPRLePV.js +0 -626
- package/dist/dist-cli-preview/chunks/bn-C0wttE43.js +0 -626
- package/dist/dist-cli-preview/chunks/cs-C7Irs0-j.js +0 -626
- package/dist/dist-cli-preview/chunks/da-80sKijLl.js +0 -626
- package/dist/dist-cli-preview/chunks/de-tvILU4R6.js +0 -626
- package/dist/dist-cli-preview/chunks/el-B3kxyML7.js +0 -626
- package/dist/dist-cli-preview/chunks/es-BTQqBZ3c.js +0 -626
- package/dist/dist-cli-preview/chunks/fi-B3aiDLBd.js +0 -626
- package/dist/dist-cli-preview/chunks/fr-C6aLQLnC.js +0 -626
- package/dist/dist-cli-preview/chunks/he-yMMGeZ3u.js +0 -626
- package/dist/dist-cli-preview/chunks/hi-Cnovv3v0.js +0 -626
- package/dist/dist-cli-preview/chunks/hr-B9M6sJu9.js +0 -626
- package/dist/dist-cli-preview/chunks/hu-D__s9KvX.js +0 -626
- package/dist/dist-cli-preview/chunks/id-CrrK_-vk.js +0 -626
- package/dist/dist-cli-preview/chunks/index-BF-Yok75.js +0 -341
- package/dist/dist-cli-preview/chunks/it-C_g-lMfy.js +0 -626
- package/dist/dist-cli-preview/chunks/ja-Dmdbg-it.js +0 -626
- package/dist/dist-cli-preview/chunks/ko-C-jyYnAw.js +0 -626
- package/dist/dist-cli-preview/chunks/lock-B3ps7XBv.js +0 -14
- package/dist/dist-cli-preview/chunks/log-out-CDzQuZ5N.js +0 -15
- package/dist/dist-cli-preview/chunks/messaging-BETZIbiu.js +0 -4
- package/dist/dist-cli-preview/chunks/ms-Bk6rBm7W.js +0 -626
- package/dist/dist-cli-preview/chunks/nl-Bh5tyFlK.js +0 -626
- package/dist/dist-cli-preview/chunks/no-BqMQtHFU.js +0 -626
- package/dist/dist-cli-preview/chunks/pl-B4xTBpA_.js +0 -626
- package/dist/dist-cli-preview/chunks/pt-Biz6F-Fo.js +0 -626
- package/dist/dist-cli-preview/chunks/ro-BKd4fPGi.js +0 -626
- package/dist/dist-cli-preview/chunks/ru-CD8HG55y.js +0 -626
- package/dist/dist-cli-preview/chunks/sk-5vqOdyEq.js +0 -626
- package/dist/dist-cli-preview/chunks/sv-D-_y-QCE.js +0 -626
- package/dist/dist-cli-preview/chunks/th-BHVHNGsc.js +0 -626
- package/dist/dist-cli-preview/chunks/tl-DdaRIJXv.js +0 -626
- package/dist/dist-cli-preview/chunks/tr-CP55XLFp.js +0 -626
- package/dist/dist-cli-preview/chunks/trash-2-C5c1weGY.js +0 -137
- package/dist/dist-cli-preview/chunks/uk-C5cwrSwu.js +0 -626
- package/dist/dist-cli-preview/chunks/use-store-DUukxuYV.js +0 -92
- package/dist/dist-cli-preview/chunks/vi-7y-mSoow.js +0 -626
- package/dist/dist-cli-preview/chunks/zh_CN-cvRqvqNw.js +0 -626
- package/dist/dist-cli-preview/chunks/zh_TW-_Qzm5B74.js +0 -626
|
@@ -0,0 +1,3884 @@
|
|
|
1
|
+
import { c as Dt, l as c, j as l, ab as B, a7 as jt, aa as Oe, aj as U, aM as Rr, ac as Ne, ad as le, b5 as kt, aY as me, am as M, ak as Lt, aK as Ae, al as De, aZ as Ft, b3 as Mn, b6 as $t, b7 as Bt, b8 as Vt, b9 as Ht, ba as Kt, a_ as Wt, bb as Pr, aL as Mr, an as pn, aN as Gt, M as q, R as _r, K as Er } from "./account-screen-runtime-BYj9PrHT.js";
|
|
2
|
+
import { C as _n, M as Ar } from "./schemas-EHBiwcQ2.js";
|
|
3
|
+
/**
|
|
4
|
+
* @license lucide-react v0.575.0 - ISC
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the ISC license.
|
|
7
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
const Ir = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], En = Dt("chevron-down", Ir);
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v0.575.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
const Tr = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Or = Dt("chevron-up", Tr);
|
|
17
|
+
/**
|
|
18
|
+
* @license lucide-react v0.575.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
const Nr = [
|
|
24
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
25
|
+
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
26
|
+
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
27
|
+
], Ic = Dt("ellipsis-vertical", Nr);
|
|
28
|
+
var An = Object.freeze({
|
|
29
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
30
|
+
position: "absolute",
|
|
31
|
+
border: 0,
|
|
32
|
+
width: 1,
|
|
33
|
+
height: 1,
|
|
34
|
+
padding: 0,
|
|
35
|
+
margin: -1,
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
clip: "rect(0, 0, 0, 0)",
|
|
38
|
+
whiteSpace: "nowrap",
|
|
39
|
+
wordWrap: "normal"
|
|
40
|
+
}), Dr = "VisuallyHidden", In = c.forwardRef(
|
|
41
|
+
(e, t) => /* @__PURE__ */ l.jsx(
|
|
42
|
+
B.span,
|
|
43
|
+
{
|
|
44
|
+
...e,
|
|
45
|
+
ref: t,
|
|
46
|
+
style: { ...An, ...e.style }
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
In.displayName = Dr;
|
|
51
|
+
var Tc = In;
|
|
52
|
+
const jr = ["top", "right", "bottom", "left"], ve = Math.min, J = Math.max, Qe = Math.round, Ze = Math.floor, ce = (e) => ({
|
|
53
|
+
x: e,
|
|
54
|
+
y: e
|
|
55
|
+
}), kr = {
|
|
56
|
+
left: "right",
|
|
57
|
+
right: "left",
|
|
58
|
+
bottom: "top",
|
|
59
|
+
top: "bottom"
|
|
60
|
+
}, Lr = {
|
|
61
|
+
start: "end",
|
|
62
|
+
end: "start"
|
|
63
|
+
};
|
|
64
|
+
function Rt(e, t, n) {
|
|
65
|
+
return J(e, ve(t, n));
|
|
66
|
+
}
|
|
67
|
+
function he(e, t) {
|
|
68
|
+
return typeof e == "function" ? e(t) : e;
|
|
69
|
+
}
|
|
70
|
+
function ge(e) {
|
|
71
|
+
return e.split("-")[0];
|
|
72
|
+
}
|
|
73
|
+
function je(e) {
|
|
74
|
+
return e.split("-")[1];
|
|
75
|
+
}
|
|
76
|
+
function Ut(e) {
|
|
77
|
+
return e === "x" ? "y" : "x";
|
|
78
|
+
}
|
|
79
|
+
function zt(e) {
|
|
80
|
+
return e === "y" ? "height" : "width";
|
|
81
|
+
}
|
|
82
|
+
const Fr = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
83
|
+
function ae(e) {
|
|
84
|
+
return Fr.has(ge(e)) ? "y" : "x";
|
|
85
|
+
}
|
|
86
|
+
function Yt(e) {
|
|
87
|
+
return Ut(ae(e));
|
|
88
|
+
}
|
|
89
|
+
function $r(e, t, n) {
|
|
90
|
+
n === void 0 && (n = !1);
|
|
91
|
+
const o = je(e), r = Yt(e), s = zt(r);
|
|
92
|
+
let i = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
93
|
+
return t.reference[s] > t.floating[s] && (i = et(i)), [i, et(i)];
|
|
94
|
+
}
|
|
95
|
+
function Br(e) {
|
|
96
|
+
const t = et(e);
|
|
97
|
+
return [Pt(e), t, Pt(t)];
|
|
98
|
+
}
|
|
99
|
+
function Pt(e) {
|
|
100
|
+
return e.replace(/start|end/g, (t) => Lr[t]);
|
|
101
|
+
}
|
|
102
|
+
const mn = ["left", "right"], hn = ["right", "left"], Vr = ["top", "bottom"], Hr = ["bottom", "top"];
|
|
103
|
+
function Kr(e, t, n) {
|
|
104
|
+
switch (e) {
|
|
105
|
+
case "top":
|
|
106
|
+
case "bottom":
|
|
107
|
+
return n ? t ? hn : mn : t ? mn : hn;
|
|
108
|
+
case "left":
|
|
109
|
+
case "right":
|
|
110
|
+
return t ? Vr : Hr;
|
|
111
|
+
default:
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function Wr(e, t, n, o) {
|
|
116
|
+
const r = je(e);
|
|
117
|
+
let s = Kr(ge(e), n === "start", o);
|
|
118
|
+
return r && (s = s.map((i) => i + "-" + r), t && (s = s.concat(s.map(Pt)))), s;
|
|
119
|
+
}
|
|
120
|
+
function et(e) {
|
|
121
|
+
return e.replace(/left|right|bottom|top/g, (t) => kr[t]);
|
|
122
|
+
}
|
|
123
|
+
function Gr(e) {
|
|
124
|
+
return {
|
|
125
|
+
top: 0,
|
|
126
|
+
right: 0,
|
|
127
|
+
bottom: 0,
|
|
128
|
+
left: 0,
|
|
129
|
+
...e
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function Tn(e) {
|
|
133
|
+
return typeof e != "number" ? Gr(e) : {
|
|
134
|
+
top: e,
|
|
135
|
+
right: e,
|
|
136
|
+
bottom: e,
|
|
137
|
+
left: e
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function tt(e) {
|
|
141
|
+
const {
|
|
142
|
+
x: t,
|
|
143
|
+
y: n,
|
|
144
|
+
width: o,
|
|
145
|
+
height: r
|
|
146
|
+
} = e;
|
|
147
|
+
return {
|
|
148
|
+
width: o,
|
|
149
|
+
height: r,
|
|
150
|
+
top: n,
|
|
151
|
+
left: t,
|
|
152
|
+
right: t + o,
|
|
153
|
+
bottom: n + r,
|
|
154
|
+
x: t,
|
|
155
|
+
y: n
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function gn(e, t, n) {
|
|
159
|
+
let {
|
|
160
|
+
reference: o,
|
|
161
|
+
floating: r
|
|
162
|
+
} = e;
|
|
163
|
+
const s = ae(t), i = Yt(t), a = zt(i), u = ge(t), d = s === "y", f = o.x + o.width / 2 - r.width / 2, p = o.y + o.height / 2 - r.height / 2, m = o[a] / 2 - r[a] / 2;
|
|
164
|
+
let h;
|
|
165
|
+
switch (u) {
|
|
166
|
+
case "top":
|
|
167
|
+
h = {
|
|
168
|
+
x: f,
|
|
169
|
+
y: o.y - r.height
|
|
170
|
+
};
|
|
171
|
+
break;
|
|
172
|
+
case "bottom":
|
|
173
|
+
h = {
|
|
174
|
+
x: f,
|
|
175
|
+
y: o.y + o.height
|
|
176
|
+
};
|
|
177
|
+
break;
|
|
178
|
+
case "right":
|
|
179
|
+
h = {
|
|
180
|
+
x: o.x + o.width,
|
|
181
|
+
y: p
|
|
182
|
+
};
|
|
183
|
+
break;
|
|
184
|
+
case "left":
|
|
185
|
+
h = {
|
|
186
|
+
x: o.x - r.width,
|
|
187
|
+
y: p
|
|
188
|
+
};
|
|
189
|
+
break;
|
|
190
|
+
default:
|
|
191
|
+
h = {
|
|
192
|
+
x: o.x,
|
|
193
|
+
y: o.y
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
switch (je(t)) {
|
|
197
|
+
case "start":
|
|
198
|
+
h[i] -= m * (n && d ? -1 : 1);
|
|
199
|
+
break;
|
|
200
|
+
case "end":
|
|
201
|
+
h[i] += m * (n && d ? -1 : 1);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
return h;
|
|
205
|
+
}
|
|
206
|
+
const Ur = async (e, t, n) => {
|
|
207
|
+
const {
|
|
208
|
+
placement: o = "bottom",
|
|
209
|
+
strategy: r = "absolute",
|
|
210
|
+
middleware: s = [],
|
|
211
|
+
platform: i
|
|
212
|
+
} = n, a = s.filter(Boolean), u = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
213
|
+
let d = await i.getElementRects({
|
|
214
|
+
reference: e,
|
|
215
|
+
floating: t,
|
|
216
|
+
strategy: r
|
|
217
|
+
}), {
|
|
218
|
+
x: f,
|
|
219
|
+
y: p
|
|
220
|
+
} = gn(d, o, u), m = o, h = {}, v = 0;
|
|
221
|
+
for (let g = 0; g < a.length; g++) {
|
|
222
|
+
const {
|
|
223
|
+
name: x,
|
|
224
|
+
fn: w
|
|
225
|
+
} = a[g], {
|
|
226
|
+
x: y,
|
|
227
|
+
y: C,
|
|
228
|
+
data: R,
|
|
229
|
+
reset: P
|
|
230
|
+
} = await w({
|
|
231
|
+
x: f,
|
|
232
|
+
y: p,
|
|
233
|
+
initialPlacement: o,
|
|
234
|
+
placement: m,
|
|
235
|
+
strategy: r,
|
|
236
|
+
middlewareData: h,
|
|
237
|
+
rects: d,
|
|
238
|
+
platform: i,
|
|
239
|
+
elements: {
|
|
240
|
+
reference: e,
|
|
241
|
+
floating: t
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
f = y ?? f, p = C ?? p, h = {
|
|
245
|
+
...h,
|
|
246
|
+
[x]: {
|
|
247
|
+
...h[x],
|
|
248
|
+
...R
|
|
249
|
+
}
|
|
250
|
+
}, P && v <= 50 && (v++, typeof P == "object" && (P.placement && (m = P.placement), P.rects && (d = P.rects === !0 ? await i.getElementRects({
|
|
251
|
+
reference: e,
|
|
252
|
+
floating: t,
|
|
253
|
+
strategy: r
|
|
254
|
+
}) : P.rects), {
|
|
255
|
+
x: f,
|
|
256
|
+
y: p
|
|
257
|
+
} = gn(d, m, u)), g = -1);
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
x: f,
|
|
261
|
+
y: p,
|
|
262
|
+
placement: m,
|
|
263
|
+
strategy: r,
|
|
264
|
+
middlewareData: h
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
async function Ve(e, t) {
|
|
268
|
+
var n;
|
|
269
|
+
t === void 0 && (t = {});
|
|
270
|
+
const {
|
|
271
|
+
x: o,
|
|
272
|
+
y: r,
|
|
273
|
+
platform: s,
|
|
274
|
+
rects: i,
|
|
275
|
+
elements: a,
|
|
276
|
+
strategy: u
|
|
277
|
+
} = e, {
|
|
278
|
+
boundary: d = "clippingAncestors",
|
|
279
|
+
rootBoundary: f = "viewport",
|
|
280
|
+
elementContext: p = "floating",
|
|
281
|
+
altBoundary: m = !1,
|
|
282
|
+
padding: h = 0
|
|
283
|
+
} = he(t, e), v = Tn(h), x = a[m ? p === "floating" ? "reference" : "floating" : p], w = tt(await s.getClippingRect({
|
|
284
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(x))) == null || n ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
|
|
285
|
+
boundary: d,
|
|
286
|
+
rootBoundary: f,
|
|
287
|
+
strategy: u
|
|
288
|
+
})), y = p === "floating" ? {
|
|
289
|
+
x: o,
|
|
290
|
+
y: r,
|
|
291
|
+
width: i.floating.width,
|
|
292
|
+
height: i.floating.height
|
|
293
|
+
} : i.reference, C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), R = await (s.isElement == null ? void 0 : s.isElement(C)) ? await (s.getScale == null ? void 0 : s.getScale(C)) || {
|
|
294
|
+
x: 1,
|
|
295
|
+
y: 1
|
|
296
|
+
} : {
|
|
297
|
+
x: 1,
|
|
298
|
+
y: 1
|
|
299
|
+
}, P = tt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
300
|
+
elements: a,
|
|
301
|
+
rect: y,
|
|
302
|
+
offsetParent: C,
|
|
303
|
+
strategy: u
|
|
304
|
+
}) : y);
|
|
305
|
+
return {
|
|
306
|
+
top: (w.top - P.top + v.top) / R.y,
|
|
307
|
+
bottom: (P.bottom - w.bottom + v.bottom) / R.y,
|
|
308
|
+
left: (w.left - P.left + v.left) / R.x,
|
|
309
|
+
right: (P.right - w.right + v.right) / R.x
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
const zr = (e) => ({
|
|
313
|
+
name: "arrow",
|
|
314
|
+
options: e,
|
|
315
|
+
async fn(t) {
|
|
316
|
+
const {
|
|
317
|
+
x: n,
|
|
318
|
+
y: o,
|
|
319
|
+
placement: r,
|
|
320
|
+
rects: s,
|
|
321
|
+
platform: i,
|
|
322
|
+
elements: a,
|
|
323
|
+
middlewareData: u
|
|
324
|
+
} = t, {
|
|
325
|
+
element: d,
|
|
326
|
+
padding: f = 0
|
|
327
|
+
} = he(e, t) || {};
|
|
328
|
+
if (d == null)
|
|
329
|
+
return {};
|
|
330
|
+
const p = Tn(f), m = {
|
|
331
|
+
x: n,
|
|
332
|
+
y: o
|
|
333
|
+
}, h = Yt(r), v = zt(h), g = await i.getDimensions(d), x = h === "y", w = x ? "top" : "left", y = x ? "bottom" : "right", C = x ? "clientHeight" : "clientWidth", R = s.reference[v] + s.reference[h] - m[h] - s.floating[v], P = m[h] - s.reference[h], O = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
334
|
+
let E = O ? O[C] : 0;
|
|
335
|
+
(!E || !await (i.isElement == null ? void 0 : i.isElement(O))) && (E = a.floating[C] || s.floating[v]);
|
|
336
|
+
const A = R / 2 - P / 2, F = E / 2 - g[v] / 2 - 1, N = ve(p[w], F), k = ve(p[y], F), L = N, D = E - g[v] - k, T = E / 2 - g[v] / 2 + A, $ = Rt(L, T, D), I = !u.arrow && je(r) != null && T !== $ && s.reference[v] / 2 - (T < L ? N : k) - g[v] / 2 < 0, j = I ? T < L ? T - L : T - D : 0;
|
|
337
|
+
return {
|
|
338
|
+
[h]: m[h] + j,
|
|
339
|
+
data: {
|
|
340
|
+
[h]: $,
|
|
341
|
+
centerOffset: T - $ - j,
|
|
342
|
+
...I && {
|
|
343
|
+
alignmentOffset: j
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
reset: I
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
}), Yr = function(e) {
|
|
350
|
+
return e === void 0 && (e = {}), {
|
|
351
|
+
name: "flip",
|
|
352
|
+
options: e,
|
|
353
|
+
async fn(t) {
|
|
354
|
+
var n, o;
|
|
355
|
+
const {
|
|
356
|
+
placement: r,
|
|
357
|
+
middlewareData: s,
|
|
358
|
+
rects: i,
|
|
359
|
+
initialPlacement: a,
|
|
360
|
+
platform: u,
|
|
361
|
+
elements: d
|
|
362
|
+
} = t, {
|
|
363
|
+
mainAxis: f = !0,
|
|
364
|
+
crossAxis: p = !0,
|
|
365
|
+
fallbackPlacements: m,
|
|
366
|
+
fallbackStrategy: h = "bestFit",
|
|
367
|
+
fallbackAxisSideDirection: v = "none",
|
|
368
|
+
flipAlignment: g = !0,
|
|
369
|
+
...x
|
|
370
|
+
} = he(e, t);
|
|
371
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
372
|
+
return {};
|
|
373
|
+
const w = ge(r), y = ae(a), C = ge(a) === a, R = await (u.isRTL == null ? void 0 : u.isRTL(d.floating)), P = m || (C || !g ? [et(a)] : Br(a)), O = v !== "none";
|
|
374
|
+
!m && O && P.push(...Wr(a, g, v, R));
|
|
375
|
+
const E = [a, ...P], A = await Ve(t, x), F = [];
|
|
376
|
+
let N = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
377
|
+
if (f && F.push(A[w]), p) {
|
|
378
|
+
const T = $r(r, i, R);
|
|
379
|
+
F.push(A[T[0]], A[T[1]]);
|
|
380
|
+
}
|
|
381
|
+
if (N = [...N, {
|
|
382
|
+
placement: r,
|
|
383
|
+
overflows: F
|
|
384
|
+
}], !F.every((T) => T <= 0)) {
|
|
385
|
+
var k, L;
|
|
386
|
+
const T = (((k = s.flip) == null ? void 0 : k.index) || 0) + 1, $ = E[T];
|
|
387
|
+
if ($ && (!(p === "alignment" ? y !== ae($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
388
|
+
// overflows the main axis.
|
|
389
|
+
N.every((_) => ae(_.placement) === y ? _.overflows[0] > 0 : !0)))
|
|
390
|
+
return {
|
|
391
|
+
data: {
|
|
392
|
+
index: T,
|
|
393
|
+
overflows: N
|
|
394
|
+
},
|
|
395
|
+
reset: {
|
|
396
|
+
placement: $
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
let I = (L = N.filter((j) => j.overflows[0] <= 0).sort((j, _) => j.overflows[1] - _.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
400
|
+
if (!I)
|
|
401
|
+
switch (h) {
|
|
402
|
+
case "bestFit": {
|
|
403
|
+
var D;
|
|
404
|
+
const j = (D = N.filter((_) => {
|
|
405
|
+
if (O) {
|
|
406
|
+
const S = ae(_.placement);
|
|
407
|
+
return S === y || // Create a bias to the `y` side axis due to horizontal
|
|
408
|
+
// reading directions favoring greater width.
|
|
409
|
+
S === "y";
|
|
410
|
+
}
|
|
411
|
+
return !0;
|
|
412
|
+
}).map((_) => [_.placement, _.overflows.filter((S) => S > 0).reduce((S, W) => S + W, 0)]).sort((_, S) => _[1] - S[1])[0]) == null ? void 0 : D[0];
|
|
413
|
+
j && (I = j);
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
case "initialPlacement":
|
|
417
|
+
I = a;
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
if (r !== I)
|
|
421
|
+
return {
|
|
422
|
+
reset: {
|
|
423
|
+
placement: I
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
return {};
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
function vn(e, t) {
|
|
432
|
+
return {
|
|
433
|
+
top: e.top - t.height,
|
|
434
|
+
right: e.right - t.width,
|
|
435
|
+
bottom: e.bottom - t.height,
|
|
436
|
+
left: e.left - t.width
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
function xn(e) {
|
|
440
|
+
return jr.some((t) => e[t] >= 0);
|
|
441
|
+
}
|
|
442
|
+
const Xr = function(e) {
|
|
443
|
+
return e === void 0 && (e = {}), {
|
|
444
|
+
name: "hide",
|
|
445
|
+
options: e,
|
|
446
|
+
async fn(t) {
|
|
447
|
+
const {
|
|
448
|
+
rects: n
|
|
449
|
+
} = t, {
|
|
450
|
+
strategy: o = "referenceHidden",
|
|
451
|
+
...r
|
|
452
|
+
} = he(e, t);
|
|
453
|
+
switch (o) {
|
|
454
|
+
case "referenceHidden": {
|
|
455
|
+
const s = await Ve(t, {
|
|
456
|
+
...r,
|
|
457
|
+
elementContext: "reference"
|
|
458
|
+
}), i = vn(s, n.reference);
|
|
459
|
+
return {
|
|
460
|
+
data: {
|
|
461
|
+
referenceHiddenOffsets: i,
|
|
462
|
+
referenceHidden: xn(i)
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
case "escaped": {
|
|
467
|
+
const s = await Ve(t, {
|
|
468
|
+
...r,
|
|
469
|
+
altBoundary: !0
|
|
470
|
+
}), i = vn(s, n.floating);
|
|
471
|
+
return {
|
|
472
|
+
data: {
|
|
473
|
+
escapedOffsets: i,
|
|
474
|
+
escaped: xn(i)
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
default:
|
|
479
|
+
return {};
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}, On = /* @__PURE__ */ new Set(["left", "top"]);
|
|
484
|
+
async function qr(e, t) {
|
|
485
|
+
const {
|
|
486
|
+
placement: n,
|
|
487
|
+
platform: o,
|
|
488
|
+
elements: r
|
|
489
|
+
} = e, s = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), i = ge(n), a = je(n), u = ae(n) === "y", d = On.has(i) ? -1 : 1, f = s && u ? -1 : 1, p = he(t, e);
|
|
490
|
+
let {
|
|
491
|
+
mainAxis: m,
|
|
492
|
+
crossAxis: h,
|
|
493
|
+
alignmentAxis: v
|
|
494
|
+
} = typeof p == "number" ? {
|
|
495
|
+
mainAxis: p,
|
|
496
|
+
crossAxis: 0,
|
|
497
|
+
alignmentAxis: null
|
|
498
|
+
} : {
|
|
499
|
+
mainAxis: p.mainAxis || 0,
|
|
500
|
+
crossAxis: p.crossAxis || 0,
|
|
501
|
+
alignmentAxis: p.alignmentAxis
|
|
502
|
+
};
|
|
503
|
+
return a && typeof v == "number" && (h = a === "end" ? v * -1 : v), u ? {
|
|
504
|
+
x: h * f,
|
|
505
|
+
y: m * d
|
|
506
|
+
} : {
|
|
507
|
+
x: m * d,
|
|
508
|
+
y: h * f
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
const Zr = function(e) {
|
|
512
|
+
return e === void 0 && (e = 0), {
|
|
513
|
+
name: "offset",
|
|
514
|
+
options: e,
|
|
515
|
+
async fn(t) {
|
|
516
|
+
var n, o;
|
|
517
|
+
const {
|
|
518
|
+
x: r,
|
|
519
|
+
y: s,
|
|
520
|
+
placement: i,
|
|
521
|
+
middlewareData: a
|
|
522
|
+
} = t, u = await qr(t, e);
|
|
523
|
+
return i === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
524
|
+
x: r + u.x,
|
|
525
|
+
y: s + u.y,
|
|
526
|
+
data: {
|
|
527
|
+
...u,
|
|
528
|
+
placement: i
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
}, Jr = function(e) {
|
|
534
|
+
return e === void 0 && (e = {}), {
|
|
535
|
+
name: "shift",
|
|
536
|
+
options: e,
|
|
537
|
+
async fn(t) {
|
|
538
|
+
const {
|
|
539
|
+
x: n,
|
|
540
|
+
y: o,
|
|
541
|
+
placement: r
|
|
542
|
+
} = t, {
|
|
543
|
+
mainAxis: s = !0,
|
|
544
|
+
crossAxis: i = !1,
|
|
545
|
+
limiter: a = {
|
|
546
|
+
fn: (x) => {
|
|
547
|
+
let {
|
|
548
|
+
x: w,
|
|
549
|
+
y
|
|
550
|
+
} = x;
|
|
551
|
+
return {
|
|
552
|
+
x: w,
|
|
553
|
+
y
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
...u
|
|
558
|
+
} = he(e, t), d = {
|
|
559
|
+
x: n,
|
|
560
|
+
y: o
|
|
561
|
+
}, f = await Ve(t, u), p = ae(ge(r)), m = Ut(p);
|
|
562
|
+
let h = d[m], v = d[p];
|
|
563
|
+
if (s) {
|
|
564
|
+
const x = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", y = h + f[x], C = h - f[w];
|
|
565
|
+
h = Rt(y, h, C);
|
|
566
|
+
}
|
|
567
|
+
if (i) {
|
|
568
|
+
const x = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", y = v + f[x], C = v - f[w];
|
|
569
|
+
v = Rt(y, v, C);
|
|
570
|
+
}
|
|
571
|
+
const g = a.fn({
|
|
572
|
+
...t,
|
|
573
|
+
[m]: h,
|
|
574
|
+
[p]: v
|
|
575
|
+
});
|
|
576
|
+
return {
|
|
577
|
+
...g,
|
|
578
|
+
data: {
|
|
579
|
+
x: g.x - n,
|
|
580
|
+
y: g.y - o,
|
|
581
|
+
enabled: {
|
|
582
|
+
[m]: s,
|
|
583
|
+
[p]: i
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
}, Qr = function(e) {
|
|
590
|
+
return e === void 0 && (e = {}), {
|
|
591
|
+
options: e,
|
|
592
|
+
fn(t) {
|
|
593
|
+
const {
|
|
594
|
+
x: n,
|
|
595
|
+
y: o,
|
|
596
|
+
placement: r,
|
|
597
|
+
rects: s,
|
|
598
|
+
middlewareData: i
|
|
599
|
+
} = t, {
|
|
600
|
+
offset: a = 0,
|
|
601
|
+
mainAxis: u = !0,
|
|
602
|
+
crossAxis: d = !0
|
|
603
|
+
} = he(e, t), f = {
|
|
604
|
+
x: n,
|
|
605
|
+
y: o
|
|
606
|
+
}, p = ae(r), m = Ut(p);
|
|
607
|
+
let h = f[m], v = f[p];
|
|
608
|
+
const g = he(a, t), x = typeof g == "number" ? {
|
|
609
|
+
mainAxis: g,
|
|
610
|
+
crossAxis: 0
|
|
611
|
+
} : {
|
|
612
|
+
mainAxis: 0,
|
|
613
|
+
crossAxis: 0,
|
|
614
|
+
...g
|
|
615
|
+
};
|
|
616
|
+
if (u) {
|
|
617
|
+
const C = m === "y" ? "height" : "width", R = s.reference[m] - s.floating[C] + x.mainAxis, P = s.reference[m] + s.reference[C] - x.mainAxis;
|
|
618
|
+
h < R ? h = R : h > P && (h = P);
|
|
619
|
+
}
|
|
620
|
+
if (d) {
|
|
621
|
+
var w, y;
|
|
622
|
+
const C = m === "y" ? "width" : "height", R = On.has(ge(r)), P = s.reference[p] - s.floating[C] + (R && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (R ? 0 : x.crossAxis), O = s.reference[p] + s.reference[C] + (R ? 0 : ((y = i.offset) == null ? void 0 : y[p]) || 0) - (R ? x.crossAxis : 0);
|
|
623
|
+
v < P ? v = P : v > O && (v = O);
|
|
624
|
+
}
|
|
625
|
+
return {
|
|
626
|
+
[m]: h,
|
|
627
|
+
[p]: v
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
}, es = function(e) {
|
|
632
|
+
return e === void 0 && (e = {}), {
|
|
633
|
+
name: "size",
|
|
634
|
+
options: e,
|
|
635
|
+
async fn(t) {
|
|
636
|
+
var n, o;
|
|
637
|
+
const {
|
|
638
|
+
placement: r,
|
|
639
|
+
rects: s,
|
|
640
|
+
platform: i,
|
|
641
|
+
elements: a
|
|
642
|
+
} = t, {
|
|
643
|
+
apply: u = () => {
|
|
644
|
+
},
|
|
645
|
+
...d
|
|
646
|
+
} = he(e, t), f = await Ve(t, d), p = ge(r), m = je(r), h = ae(r) === "y", {
|
|
647
|
+
width: v,
|
|
648
|
+
height: g
|
|
649
|
+
} = s.floating;
|
|
650
|
+
let x, w;
|
|
651
|
+
p === "top" || p === "bottom" ? (x = p, w = m === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (w = p, x = m === "end" ? "top" : "bottom");
|
|
652
|
+
const y = g - f.top - f.bottom, C = v - f.left - f.right, R = ve(g - f[x], y), P = ve(v - f[w], C), O = !t.middlewareData.shift;
|
|
653
|
+
let E = R, A = P;
|
|
654
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = C), (o = t.middlewareData.shift) != null && o.enabled.y && (E = y), O && !m) {
|
|
655
|
+
const N = J(f.left, 0), k = J(f.right, 0), L = J(f.top, 0), D = J(f.bottom, 0);
|
|
656
|
+
h ? A = v - 2 * (N !== 0 || k !== 0 ? N + k : J(f.left, f.right)) : E = g - 2 * (L !== 0 || D !== 0 ? L + D : J(f.top, f.bottom));
|
|
657
|
+
}
|
|
658
|
+
await u({
|
|
659
|
+
...t,
|
|
660
|
+
availableWidth: A,
|
|
661
|
+
availableHeight: E
|
|
662
|
+
});
|
|
663
|
+
const F = await i.getDimensions(a.floating);
|
|
664
|
+
return v !== F.width || g !== F.height ? {
|
|
665
|
+
reset: {
|
|
666
|
+
rects: !0
|
|
667
|
+
}
|
|
668
|
+
} : {};
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
function it() {
|
|
673
|
+
return typeof window < "u";
|
|
674
|
+
}
|
|
675
|
+
function ke(e) {
|
|
676
|
+
return Nn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
677
|
+
}
|
|
678
|
+
function Q(e) {
|
|
679
|
+
var t;
|
|
680
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
681
|
+
}
|
|
682
|
+
function de(e) {
|
|
683
|
+
var t;
|
|
684
|
+
return (t = (Nn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
685
|
+
}
|
|
686
|
+
function Nn(e) {
|
|
687
|
+
return it() ? e instanceof Node || e instanceof Q(e).Node : !1;
|
|
688
|
+
}
|
|
689
|
+
function se(e) {
|
|
690
|
+
return it() ? e instanceof Element || e instanceof Q(e).Element : !1;
|
|
691
|
+
}
|
|
692
|
+
function ue(e) {
|
|
693
|
+
return it() ? e instanceof HTMLElement || e instanceof Q(e).HTMLElement : !1;
|
|
694
|
+
}
|
|
695
|
+
function wn(e) {
|
|
696
|
+
return !it() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Q(e).ShadowRoot;
|
|
697
|
+
}
|
|
698
|
+
const ts = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
699
|
+
function Ge(e) {
|
|
700
|
+
const {
|
|
701
|
+
overflow: t,
|
|
702
|
+
overflowX: n,
|
|
703
|
+
overflowY: o,
|
|
704
|
+
display: r
|
|
705
|
+
} = ie(e);
|
|
706
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !ts.has(r);
|
|
707
|
+
}
|
|
708
|
+
const ns = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
709
|
+
function os(e) {
|
|
710
|
+
return ns.has(ke(e));
|
|
711
|
+
}
|
|
712
|
+
const rs = [":popover-open", ":modal"];
|
|
713
|
+
function at(e) {
|
|
714
|
+
return rs.some((t) => {
|
|
715
|
+
try {
|
|
716
|
+
return e.matches(t);
|
|
717
|
+
} catch {
|
|
718
|
+
return !1;
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
const ss = ["transform", "translate", "scale", "rotate", "perspective"], is = ["transform", "translate", "scale", "rotate", "perspective", "filter"], as = ["paint", "layout", "strict", "content"];
|
|
723
|
+
function Xt(e) {
|
|
724
|
+
const t = qt(), n = se(e) ? ie(e) : e;
|
|
725
|
+
return ss.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || is.some((o) => (n.willChange || "").includes(o)) || as.some((o) => (n.contain || "").includes(o));
|
|
726
|
+
}
|
|
727
|
+
function cs(e) {
|
|
728
|
+
let t = xe(e);
|
|
729
|
+
for (; ue(t) && !Ie(t); ) {
|
|
730
|
+
if (Xt(t))
|
|
731
|
+
return t;
|
|
732
|
+
if (at(t))
|
|
733
|
+
return null;
|
|
734
|
+
t = xe(t);
|
|
735
|
+
}
|
|
736
|
+
return null;
|
|
737
|
+
}
|
|
738
|
+
function qt() {
|
|
739
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
740
|
+
}
|
|
741
|
+
const ls = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
742
|
+
function Ie(e) {
|
|
743
|
+
return ls.has(ke(e));
|
|
744
|
+
}
|
|
745
|
+
function ie(e) {
|
|
746
|
+
return Q(e).getComputedStyle(e);
|
|
747
|
+
}
|
|
748
|
+
function ct(e) {
|
|
749
|
+
return se(e) ? {
|
|
750
|
+
scrollLeft: e.scrollLeft,
|
|
751
|
+
scrollTop: e.scrollTop
|
|
752
|
+
} : {
|
|
753
|
+
scrollLeft: e.scrollX,
|
|
754
|
+
scrollTop: e.scrollY
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
function xe(e) {
|
|
758
|
+
if (ke(e) === "html")
|
|
759
|
+
return e;
|
|
760
|
+
const t = (
|
|
761
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
762
|
+
e.assignedSlot || // DOM Element detected.
|
|
763
|
+
e.parentNode || // ShadowRoot detected.
|
|
764
|
+
wn(e) && e.host || // Fallback.
|
|
765
|
+
de(e)
|
|
766
|
+
);
|
|
767
|
+
return wn(t) ? t.host : t;
|
|
768
|
+
}
|
|
769
|
+
function Dn(e) {
|
|
770
|
+
const t = xe(e);
|
|
771
|
+
return Ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ue(t) && Ge(t) ? t : Dn(t);
|
|
772
|
+
}
|
|
773
|
+
function He(e, t, n) {
|
|
774
|
+
var o;
|
|
775
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
776
|
+
const r = Dn(e), s = r === ((o = e.ownerDocument) == null ? void 0 : o.body), i = Q(r);
|
|
777
|
+
if (s) {
|
|
778
|
+
const a = Mt(i);
|
|
779
|
+
return t.concat(i, i.visualViewport || [], Ge(r) ? r : [], a && n ? He(a) : []);
|
|
780
|
+
}
|
|
781
|
+
return t.concat(r, He(r, [], n));
|
|
782
|
+
}
|
|
783
|
+
function Mt(e) {
|
|
784
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
785
|
+
}
|
|
786
|
+
function jn(e) {
|
|
787
|
+
const t = ie(e);
|
|
788
|
+
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
789
|
+
const r = ue(e), s = r ? e.offsetWidth : n, i = r ? e.offsetHeight : o, a = Qe(n) !== s || Qe(o) !== i;
|
|
790
|
+
return a && (n = s, o = i), {
|
|
791
|
+
width: n,
|
|
792
|
+
height: o,
|
|
793
|
+
$: a
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
function Zt(e) {
|
|
797
|
+
return se(e) ? e : e.contextElement;
|
|
798
|
+
}
|
|
799
|
+
function Ee(e) {
|
|
800
|
+
const t = Zt(e);
|
|
801
|
+
if (!ue(t))
|
|
802
|
+
return ce(1);
|
|
803
|
+
const n = t.getBoundingClientRect(), {
|
|
804
|
+
width: o,
|
|
805
|
+
height: r,
|
|
806
|
+
$: s
|
|
807
|
+
} = jn(t);
|
|
808
|
+
let i = (s ? Qe(n.width) : n.width) / o, a = (s ? Qe(n.height) : n.height) / r;
|
|
809
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
810
|
+
x: i,
|
|
811
|
+
y: a
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
const us = /* @__PURE__ */ ce(0);
|
|
815
|
+
function kn(e) {
|
|
816
|
+
const t = Q(e);
|
|
817
|
+
return !qt() || !t.visualViewport ? us : {
|
|
818
|
+
x: t.visualViewport.offsetLeft,
|
|
819
|
+
y: t.visualViewport.offsetTop
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
function ds(e, t, n) {
|
|
823
|
+
return t === void 0 && (t = !1), !n || t && n !== Q(e) ? !1 : t;
|
|
824
|
+
}
|
|
825
|
+
function Re(e, t, n, o) {
|
|
826
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
827
|
+
const r = e.getBoundingClientRect(), s = Zt(e);
|
|
828
|
+
let i = ce(1);
|
|
829
|
+
t && (o ? se(o) && (i = Ee(o)) : i = Ee(e));
|
|
830
|
+
const a = ds(s, n, o) ? kn(s) : ce(0);
|
|
831
|
+
let u = (r.left + a.x) / i.x, d = (r.top + a.y) / i.y, f = r.width / i.x, p = r.height / i.y;
|
|
832
|
+
if (s) {
|
|
833
|
+
const m = Q(s), h = o && se(o) ? Q(o) : o;
|
|
834
|
+
let v = m, g = Mt(v);
|
|
835
|
+
for (; g && o && h !== v; ) {
|
|
836
|
+
const x = Ee(g), w = g.getBoundingClientRect(), y = ie(g), C = w.left + (g.clientLeft + parseFloat(y.paddingLeft)) * x.x, R = w.top + (g.clientTop + parseFloat(y.paddingTop)) * x.y;
|
|
837
|
+
u *= x.x, d *= x.y, f *= x.x, p *= x.y, u += C, d += R, v = Q(g), g = Mt(v);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
return tt({
|
|
841
|
+
width: f,
|
|
842
|
+
height: p,
|
|
843
|
+
x: u,
|
|
844
|
+
y: d
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
function lt(e, t) {
|
|
848
|
+
const n = ct(e).scrollLeft;
|
|
849
|
+
return t ? t.left + n : Re(de(e)).left + n;
|
|
850
|
+
}
|
|
851
|
+
function Ln(e, t) {
|
|
852
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - lt(e, n), r = n.top + t.scrollTop;
|
|
853
|
+
return {
|
|
854
|
+
x: o,
|
|
855
|
+
y: r
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
function fs(e) {
|
|
859
|
+
let {
|
|
860
|
+
elements: t,
|
|
861
|
+
rect: n,
|
|
862
|
+
offsetParent: o,
|
|
863
|
+
strategy: r
|
|
864
|
+
} = e;
|
|
865
|
+
const s = r === "fixed", i = de(o), a = t ? at(t.floating) : !1;
|
|
866
|
+
if (o === i || a && s)
|
|
867
|
+
return n;
|
|
868
|
+
let u = {
|
|
869
|
+
scrollLeft: 0,
|
|
870
|
+
scrollTop: 0
|
|
871
|
+
}, d = ce(1);
|
|
872
|
+
const f = ce(0), p = ue(o);
|
|
873
|
+
if ((p || !p && !s) && ((ke(o) !== "body" || Ge(i)) && (u = ct(o)), ue(o))) {
|
|
874
|
+
const h = Re(o);
|
|
875
|
+
d = Ee(o), f.x = h.x + o.clientLeft, f.y = h.y + o.clientTop;
|
|
876
|
+
}
|
|
877
|
+
const m = i && !p && !s ? Ln(i, u) : ce(0);
|
|
878
|
+
return {
|
|
879
|
+
width: n.width * d.x,
|
|
880
|
+
height: n.height * d.y,
|
|
881
|
+
x: n.x * d.x - u.scrollLeft * d.x + f.x + m.x,
|
|
882
|
+
y: n.y * d.y - u.scrollTop * d.y + f.y + m.y
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
function ps(e) {
|
|
886
|
+
return Array.from(e.getClientRects());
|
|
887
|
+
}
|
|
888
|
+
function ms(e) {
|
|
889
|
+
const t = de(e), n = ct(e), o = e.ownerDocument.body, r = J(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), s = J(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
890
|
+
let i = -n.scrollLeft + lt(e);
|
|
891
|
+
const a = -n.scrollTop;
|
|
892
|
+
return ie(o).direction === "rtl" && (i += J(t.clientWidth, o.clientWidth) - r), {
|
|
893
|
+
width: r,
|
|
894
|
+
height: s,
|
|
895
|
+
x: i,
|
|
896
|
+
y: a
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
const yn = 25;
|
|
900
|
+
function hs(e, t) {
|
|
901
|
+
const n = Q(e), o = de(e), r = n.visualViewport;
|
|
902
|
+
let s = o.clientWidth, i = o.clientHeight, a = 0, u = 0;
|
|
903
|
+
if (r) {
|
|
904
|
+
s = r.width, i = r.height;
|
|
905
|
+
const f = qt();
|
|
906
|
+
(!f || f && t === "fixed") && (a = r.offsetLeft, u = r.offsetTop);
|
|
907
|
+
}
|
|
908
|
+
const d = lt(o);
|
|
909
|
+
if (d <= 0) {
|
|
910
|
+
const f = o.ownerDocument, p = f.body, m = getComputedStyle(p), h = f.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, v = Math.abs(o.clientWidth - p.clientWidth - h);
|
|
911
|
+
v <= yn && (s -= v);
|
|
912
|
+
} else d <= yn && (s += d);
|
|
913
|
+
return {
|
|
914
|
+
width: s,
|
|
915
|
+
height: i,
|
|
916
|
+
x: a,
|
|
917
|
+
y: u
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
const gs = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
921
|
+
function vs(e, t) {
|
|
922
|
+
const n = Re(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, s = ue(e) ? Ee(e) : ce(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, u = r * s.x, d = o * s.y;
|
|
923
|
+
return {
|
|
924
|
+
width: i,
|
|
925
|
+
height: a,
|
|
926
|
+
x: u,
|
|
927
|
+
y: d
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
function Cn(e, t, n) {
|
|
931
|
+
let o;
|
|
932
|
+
if (t === "viewport")
|
|
933
|
+
o = hs(e, n);
|
|
934
|
+
else if (t === "document")
|
|
935
|
+
o = ms(de(e));
|
|
936
|
+
else if (se(t))
|
|
937
|
+
o = vs(t, n);
|
|
938
|
+
else {
|
|
939
|
+
const r = kn(e);
|
|
940
|
+
o = {
|
|
941
|
+
x: t.x - r.x,
|
|
942
|
+
y: t.y - r.y,
|
|
943
|
+
width: t.width,
|
|
944
|
+
height: t.height
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
return tt(o);
|
|
948
|
+
}
|
|
949
|
+
function Fn(e, t) {
|
|
950
|
+
const n = xe(e);
|
|
951
|
+
return n === t || !se(n) || Ie(n) ? !1 : ie(n).position === "fixed" || Fn(n, t);
|
|
952
|
+
}
|
|
953
|
+
function xs(e, t) {
|
|
954
|
+
const n = t.get(e);
|
|
955
|
+
if (n)
|
|
956
|
+
return n;
|
|
957
|
+
let o = He(e, [], !1).filter((a) => se(a) && ke(a) !== "body"), r = null;
|
|
958
|
+
const s = ie(e).position === "fixed";
|
|
959
|
+
let i = s ? xe(e) : e;
|
|
960
|
+
for (; se(i) && !Ie(i); ) {
|
|
961
|
+
const a = ie(i), u = Xt(i);
|
|
962
|
+
!u && a.position === "fixed" && (r = null), (s ? !u && !r : !u && a.position === "static" && !!r && gs.has(r.position) || Ge(i) && !u && Fn(e, i)) ? o = o.filter((f) => f !== i) : r = a, i = xe(i);
|
|
963
|
+
}
|
|
964
|
+
return t.set(e, o), o;
|
|
965
|
+
}
|
|
966
|
+
function ws(e) {
|
|
967
|
+
let {
|
|
968
|
+
element: t,
|
|
969
|
+
boundary: n,
|
|
970
|
+
rootBoundary: o,
|
|
971
|
+
strategy: r
|
|
972
|
+
} = e;
|
|
973
|
+
const i = [...n === "clippingAncestors" ? at(t) ? [] : xs(t, this._c) : [].concat(n), o], a = i[0], u = i.reduce((d, f) => {
|
|
974
|
+
const p = Cn(t, f, r);
|
|
975
|
+
return d.top = J(p.top, d.top), d.right = ve(p.right, d.right), d.bottom = ve(p.bottom, d.bottom), d.left = J(p.left, d.left), d;
|
|
976
|
+
}, Cn(t, a, r));
|
|
977
|
+
return {
|
|
978
|
+
width: u.right - u.left,
|
|
979
|
+
height: u.bottom - u.top,
|
|
980
|
+
x: u.left,
|
|
981
|
+
y: u.top
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
function ys(e) {
|
|
985
|
+
const {
|
|
986
|
+
width: t,
|
|
987
|
+
height: n
|
|
988
|
+
} = jn(e);
|
|
989
|
+
return {
|
|
990
|
+
width: t,
|
|
991
|
+
height: n
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
function Cs(e, t, n) {
|
|
995
|
+
const o = ue(t), r = de(t), s = n === "fixed", i = Re(e, !0, s, t);
|
|
996
|
+
let a = {
|
|
997
|
+
scrollLeft: 0,
|
|
998
|
+
scrollTop: 0
|
|
999
|
+
};
|
|
1000
|
+
const u = ce(0);
|
|
1001
|
+
function d() {
|
|
1002
|
+
u.x = lt(r);
|
|
1003
|
+
}
|
|
1004
|
+
if (o || !o && !s)
|
|
1005
|
+
if ((ke(t) !== "body" || Ge(r)) && (a = ct(t)), o) {
|
|
1006
|
+
const h = Re(t, !0, s, t);
|
|
1007
|
+
u.x = h.x + t.clientLeft, u.y = h.y + t.clientTop;
|
|
1008
|
+
} else r && d();
|
|
1009
|
+
s && !o && r && d();
|
|
1010
|
+
const f = r && !o && !s ? Ln(r, a) : ce(0), p = i.left + a.scrollLeft - u.x - f.x, m = i.top + a.scrollTop - u.y - f.y;
|
|
1011
|
+
return {
|
|
1012
|
+
x: p,
|
|
1013
|
+
y: m,
|
|
1014
|
+
width: i.width,
|
|
1015
|
+
height: i.height
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
function Ct(e) {
|
|
1019
|
+
return ie(e).position === "static";
|
|
1020
|
+
}
|
|
1021
|
+
function Sn(e, t) {
|
|
1022
|
+
if (!ue(e) || ie(e).position === "fixed")
|
|
1023
|
+
return null;
|
|
1024
|
+
if (t)
|
|
1025
|
+
return t(e);
|
|
1026
|
+
let n = e.offsetParent;
|
|
1027
|
+
return de(e) === n && (n = n.ownerDocument.body), n;
|
|
1028
|
+
}
|
|
1029
|
+
function $n(e, t) {
|
|
1030
|
+
const n = Q(e);
|
|
1031
|
+
if (at(e))
|
|
1032
|
+
return n;
|
|
1033
|
+
if (!ue(e)) {
|
|
1034
|
+
let r = xe(e);
|
|
1035
|
+
for (; r && !Ie(r); ) {
|
|
1036
|
+
if (se(r) && !Ct(r))
|
|
1037
|
+
return r;
|
|
1038
|
+
r = xe(r);
|
|
1039
|
+
}
|
|
1040
|
+
return n;
|
|
1041
|
+
}
|
|
1042
|
+
let o = Sn(e, t);
|
|
1043
|
+
for (; o && os(o) && Ct(o); )
|
|
1044
|
+
o = Sn(o, t);
|
|
1045
|
+
return o && Ie(o) && Ct(o) && !Xt(o) ? n : o || cs(e) || n;
|
|
1046
|
+
}
|
|
1047
|
+
const Ss = async function(e) {
|
|
1048
|
+
const t = this.getOffsetParent || $n, n = this.getDimensions, o = await n(e.floating);
|
|
1049
|
+
return {
|
|
1050
|
+
reference: Cs(e.reference, await t(e.floating), e.strategy),
|
|
1051
|
+
floating: {
|
|
1052
|
+
x: 0,
|
|
1053
|
+
y: 0,
|
|
1054
|
+
width: o.width,
|
|
1055
|
+
height: o.height
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
function bs(e) {
|
|
1060
|
+
return ie(e).direction === "rtl";
|
|
1061
|
+
}
|
|
1062
|
+
const Rs = {
|
|
1063
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: fs,
|
|
1064
|
+
getDocumentElement: de,
|
|
1065
|
+
getClippingRect: ws,
|
|
1066
|
+
getOffsetParent: $n,
|
|
1067
|
+
getElementRects: Ss,
|
|
1068
|
+
getClientRects: ps,
|
|
1069
|
+
getDimensions: ys,
|
|
1070
|
+
getScale: Ee,
|
|
1071
|
+
isElement: se,
|
|
1072
|
+
isRTL: bs
|
|
1073
|
+
};
|
|
1074
|
+
function Bn(e, t) {
|
|
1075
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1076
|
+
}
|
|
1077
|
+
function Ps(e, t) {
|
|
1078
|
+
let n = null, o;
|
|
1079
|
+
const r = de(e);
|
|
1080
|
+
function s() {
|
|
1081
|
+
var a;
|
|
1082
|
+
clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
|
|
1083
|
+
}
|
|
1084
|
+
function i(a, u) {
|
|
1085
|
+
a === void 0 && (a = !1), u === void 0 && (u = 1), s();
|
|
1086
|
+
const d = e.getBoundingClientRect(), {
|
|
1087
|
+
left: f,
|
|
1088
|
+
top: p,
|
|
1089
|
+
width: m,
|
|
1090
|
+
height: h
|
|
1091
|
+
} = d;
|
|
1092
|
+
if (a || t(), !m || !h)
|
|
1093
|
+
return;
|
|
1094
|
+
const v = Ze(p), g = Ze(r.clientWidth - (f + m)), x = Ze(r.clientHeight - (p + h)), w = Ze(f), C = {
|
|
1095
|
+
rootMargin: -v + "px " + -g + "px " + -x + "px " + -w + "px",
|
|
1096
|
+
threshold: J(0, ve(1, u)) || 1
|
|
1097
|
+
};
|
|
1098
|
+
let R = !0;
|
|
1099
|
+
function P(O) {
|
|
1100
|
+
const E = O[0].intersectionRatio;
|
|
1101
|
+
if (E !== u) {
|
|
1102
|
+
if (!R)
|
|
1103
|
+
return i();
|
|
1104
|
+
E ? i(!1, E) : o = setTimeout(() => {
|
|
1105
|
+
i(!1, 1e-7);
|
|
1106
|
+
}, 1e3);
|
|
1107
|
+
}
|
|
1108
|
+
E === 1 && !Bn(d, e.getBoundingClientRect()) && i(), R = !1;
|
|
1109
|
+
}
|
|
1110
|
+
try {
|
|
1111
|
+
n = new IntersectionObserver(P, {
|
|
1112
|
+
...C,
|
|
1113
|
+
// Handle <iframe>s
|
|
1114
|
+
root: r.ownerDocument
|
|
1115
|
+
});
|
|
1116
|
+
} catch {
|
|
1117
|
+
n = new IntersectionObserver(P, C);
|
|
1118
|
+
}
|
|
1119
|
+
n.observe(e);
|
|
1120
|
+
}
|
|
1121
|
+
return i(!0), s;
|
|
1122
|
+
}
|
|
1123
|
+
function Ms(e, t, n, o) {
|
|
1124
|
+
o === void 0 && (o = {});
|
|
1125
|
+
const {
|
|
1126
|
+
ancestorScroll: r = !0,
|
|
1127
|
+
ancestorResize: s = !0,
|
|
1128
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
1129
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1130
|
+
animationFrame: u = !1
|
|
1131
|
+
} = o, d = Zt(e), f = r || s ? [...d ? He(d) : [], ...He(t)] : [];
|
|
1132
|
+
f.forEach((w) => {
|
|
1133
|
+
r && w.addEventListener("scroll", n, {
|
|
1134
|
+
passive: !0
|
|
1135
|
+
}), s && w.addEventListener("resize", n);
|
|
1136
|
+
});
|
|
1137
|
+
const p = d && a ? Ps(d, n) : null;
|
|
1138
|
+
let m = -1, h = null;
|
|
1139
|
+
i && (h = new ResizeObserver((w) => {
|
|
1140
|
+
let [y] = w;
|
|
1141
|
+
y && y.target === d && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1142
|
+
var C;
|
|
1143
|
+
(C = h) == null || C.observe(t);
|
|
1144
|
+
})), n();
|
|
1145
|
+
}), d && !u && h.observe(d), h.observe(t));
|
|
1146
|
+
let v, g = u ? Re(e) : null;
|
|
1147
|
+
u && x();
|
|
1148
|
+
function x() {
|
|
1149
|
+
const w = Re(e);
|
|
1150
|
+
g && !Bn(g, w) && n(), g = w, v = requestAnimationFrame(x);
|
|
1151
|
+
}
|
|
1152
|
+
return n(), () => {
|
|
1153
|
+
var w;
|
|
1154
|
+
f.forEach((y) => {
|
|
1155
|
+
r && y.removeEventListener("scroll", n), s && y.removeEventListener("resize", n);
|
|
1156
|
+
}), p?.(), (w = h) == null || w.disconnect(), h = null, u && cancelAnimationFrame(v);
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
const _s = Zr, Es = Jr, As = Yr, Is = es, Ts = Xr, bn = zr, Os = Qr, Ns = (e, t, n) => {
|
|
1160
|
+
const o = /* @__PURE__ */ new Map(), r = {
|
|
1161
|
+
platform: Rs,
|
|
1162
|
+
...n
|
|
1163
|
+
}, s = {
|
|
1164
|
+
...r.platform,
|
|
1165
|
+
_c: o
|
|
1166
|
+
};
|
|
1167
|
+
return Ur(e, t, {
|
|
1168
|
+
...r,
|
|
1169
|
+
platform: s
|
|
1170
|
+
});
|
|
1171
|
+
};
|
|
1172
|
+
var Ds = typeof document < "u", js = function() {
|
|
1173
|
+
}, Je = Ds ? c.useLayoutEffect : js;
|
|
1174
|
+
function nt(e, t) {
|
|
1175
|
+
if (e === t)
|
|
1176
|
+
return !0;
|
|
1177
|
+
if (typeof e != typeof t)
|
|
1178
|
+
return !1;
|
|
1179
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
1180
|
+
return !0;
|
|
1181
|
+
let n, o, r;
|
|
1182
|
+
if (e && t && typeof e == "object") {
|
|
1183
|
+
if (Array.isArray(e)) {
|
|
1184
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1185
|
+
for (o = n; o-- !== 0; )
|
|
1186
|
+
if (!nt(e[o], t[o]))
|
|
1187
|
+
return !1;
|
|
1188
|
+
return !0;
|
|
1189
|
+
}
|
|
1190
|
+
if (r = Object.keys(e), n = r.length, n !== Object.keys(t).length)
|
|
1191
|
+
return !1;
|
|
1192
|
+
for (o = n; o-- !== 0; )
|
|
1193
|
+
if (!{}.hasOwnProperty.call(t, r[o]))
|
|
1194
|
+
return !1;
|
|
1195
|
+
for (o = n; o-- !== 0; ) {
|
|
1196
|
+
const s = r[o];
|
|
1197
|
+
if (!(s === "_owner" && e.$$typeof) && !nt(e[s], t[s]))
|
|
1198
|
+
return !1;
|
|
1199
|
+
}
|
|
1200
|
+
return !0;
|
|
1201
|
+
}
|
|
1202
|
+
return e !== e && t !== t;
|
|
1203
|
+
}
|
|
1204
|
+
function Vn(e) {
|
|
1205
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1206
|
+
}
|
|
1207
|
+
function Rn(e, t) {
|
|
1208
|
+
const n = Vn(e);
|
|
1209
|
+
return Math.round(t * n) / n;
|
|
1210
|
+
}
|
|
1211
|
+
function St(e) {
|
|
1212
|
+
const t = c.useRef(e);
|
|
1213
|
+
return Je(() => {
|
|
1214
|
+
t.current = e;
|
|
1215
|
+
}), t;
|
|
1216
|
+
}
|
|
1217
|
+
function ks(e) {
|
|
1218
|
+
e === void 0 && (e = {});
|
|
1219
|
+
const {
|
|
1220
|
+
placement: t = "bottom",
|
|
1221
|
+
strategy: n = "absolute",
|
|
1222
|
+
middleware: o = [],
|
|
1223
|
+
platform: r,
|
|
1224
|
+
elements: {
|
|
1225
|
+
reference: s,
|
|
1226
|
+
floating: i
|
|
1227
|
+
} = {},
|
|
1228
|
+
transform: a = !0,
|
|
1229
|
+
whileElementsMounted: u,
|
|
1230
|
+
open: d
|
|
1231
|
+
} = e, [f, p] = c.useState({
|
|
1232
|
+
x: 0,
|
|
1233
|
+
y: 0,
|
|
1234
|
+
strategy: n,
|
|
1235
|
+
placement: t,
|
|
1236
|
+
middlewareData: {},
|
|
1237
|
+
isPositioned: !1
|
|
1238
|
+
}), [m, h] = c.useState(o);
|
|
1239
|
+
nt(m, o) || h(o);
|
|
1240
|
+
const [v, g] = c.useState(null), [x, w] = c.useState(null), y = c.useCallback((_) => {
|
|
1241
|
+
_ !== O.current && (O.current = _, g(_));
|
|
1242
|
+
}, []), C = c.useCallback((_) => {
|
|
1243
|
+
_ !== E.current && (E.current = _, w(_));
|
|
1244
|
+
}, []), R = s || v, P = i || x, O = c.useRef(null), E = c.useRef(null), A = c.useRef(f), F = u != null, N = St(u), k = St(r), L = St(d), D = c.useCallback(() => {
|
|
1245
|
+
if (!O.current || !E.current)
|
|
1246
|
+
return;
|
|
1247
|
+
const _ = {
|
|
1248
|
+
placement: t,
|
|
1249
|
+
strategy: n,
|
|
1250
|
+
middleware: m
|
|
1251
|
+
};
|
|
1252
|
+
k.current && (_.platform = k.current), Ns(O.current, E.current, _).then((S) => {
|
|
1253
|
+
const W = {
|
|
1254
|
+
...S,
|
|
1255
|
+
// The floating element's position may be recomputed while it's closed
|
|
1256
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1257
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1258
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1259
|
+
isPositioned: L.current !== !1
|
|
1260
|
+
};
|
|
1261
|
+
T.current && !nt(A.current, W) && (A.current = W, jt.flushSync(() => {
|
|
1262
|
+
p(W);
|
|
1263
|
+
}));
|
|
1264
|
+
});
|
|
1265
|
+
}, [m, t, n, k, L]);
|
|
1266
|
+
Je(() => {
|
|
1267
|
+
d === !1 && A.current.isPositioned && (A.current.isPositioned = !1, p((_) => ({
|
|
1268
|
+
..._,
|
|
1269
|
+
isPositioned: !1
|
|
1270
|
+
})));
|
|
1271
|
+
}, [d]);
|
|
1272
|
+
const T = c.useRef(!1);
|
|
1273
|
+
Je(() => (T.current = !0, () => {
|
|
1274
|
+
T.current = !1;
|
|
1275
|
+
}), []), Je(() => {
|
|
1276
|
+
if (R && (O.current = R), P && (E.current = P), R && P) {
|
|
1277
|
+
if (N.current)
|
|
1278
|
+
return N.current(R, P, D);
|
|
1279
|
+
D();
|
|
1280
|
+
}
|
|
1281
|
+
}, [R, P, D, N, F]);
|
|
1282
|
+
const $ = c.useMemo(() => ({
|
|
1283
|
+
reference: O,
|
|
1284
|
+
floating: E,
|
|
1285
|
+
setReference: y,
|
|
1286
|
+
setFloating: C
|
|
1287
|
+
}), [y, C]), I = c.useMemo(() => ({
|
|
1288
|
+
reference: R,
|
|
1289
|
+
floating: P
|
|
1290
|
+
}), [R, P]), j = c.useMemo(() => {
|
|
1291
|
+
const _ = {
|
|
1292
|
+
position: n,
|
|
1293
|
+
left: 0,
|
|
1294
|
+
top: 0
|
|
1295
|
+
};
|
|
1296
|
+
if (!I.floating)
|
|
1297
|
+
return _;
|
|
1298
|
+
const S = Rn(I.floating, f.x), W = Rn(I.floating, f.y);
|
|
1299
|
+
return a ? {
|
|
1300
|
+
..._,
|
|
1301
|
+
transform: "translate(" + S + "px, " + W + "px)",
|
|
1302
|
+
...Vn(I.floating) >= 1.5 && {
|
|
1303
|
+
willChange: "transform"
|
|
1304
|
+
}
|
|
1305
|
+
} : {
|
|
1306
|
+
position: n,
|
|
1307
|
+
left: S,
|
|
1308
|
+
top: W
|
|
1309
|
+
};
|
|
1310
|
+
}, [n, a, I.floating, f.x, f.y]);
|
|
1311
|
+
return c.useMemo(() => ({
|
|
1312
|
+
...f,
|
|
1313
|
+
update: D,
|
|
1314
|
+
refs: $,
|
|
1315
|
+
elements: I,
|
|
1316
|
+
floatingStyles: j
|
|
1317
|
+
}), [f, D, $, I, j]);
|
|
1318
|
+
}
|
|
1319
|
+
const Ls = (e) => {
|
|
1320
|
+
function t(n) {
|
|
1321
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
1322
|
+
}
|
|
1323
|
+
return {
|
|
1324
|
+
name: "arrow",
|
|
1325
|
+
options: e,
|
|
1326
|
+
fn(n) {
|
|
1327
|
+
const {
|
|
1328
|
+
element: o,
|
|
1329
|
+
padding: r
|
|
1330
|
+
} = typeof e == "function" ? e(n) : e;
|
|
1331
|
+
return o && t(o) ? o.current != null ? bn({
|
|
1332
|
+
element: o.current,
|
|
1333
|
+
padding: r
|
|
1334
|
+
}).fn(n) : {} : o ? bn({
|
|
1335
|
+
element: o,
|
|
1336
|
+
padding: r
|
|
1337
|
+
}).fn(n) : {};
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
}, Fs = (e, t) => ({
|
|
1341
|
+
..._s(e),
|
|
1342
|
+
options: [e, t]
|
|
1343
|
+
}), $s = (e, t) => ({
|
|
1344
|
+
...Es(e),
|
|
1345
|
+
options: [e, t]
|
|
1346
|
+
}), Bs = (e, t) => ({
|
|
1347
|
+
...Os(e),
|
|
1348
|
+
options: [e, t]
|
|
1349
|
+
}), Vs = (e, t) => ({
|
|
1350
|
+
...As(e),
|
|
1351
|
+
options: [e, t]
|
|
1352
|
+
}), Hs = (e, t) => ({
|
|
1353
|
+
...Is(e),
|
|
1354
|
+
options: [e, t]
|
|
1355
|
+
}), Ks = (e, t) => ({
|
|
1356
|
+
...Ts(e),
|
|
1357
|
+
options: [e, t]
|
|
1358
|
+
}), Ws = (e, t) => ({
|
|
1359
|
+
...Ls(e),
|
|
1360
|
+
options: [e, t]
|
|
1361
|
+
});
|
|
1362
|
+
var Gs = "Arrow", Hn = c.forwardRef((e, t) => {
|
|
1363
|
+
const { children: n, width: o = 10, height: r = 5, ...s } = e;
|
|
1364
|
+
return /* @__PURE__ */ l.jsx(
|
|
1365
|
+
B.svg,
|
|
1366
|
+
{
|
|
1367
|
+
...s,
|
|
1368
|
+
ref: t,
|
|
1369
|
+
width: o,
|
|
1370
|
+
height: r,
|
|
1371
|
+
viewBox: "0 0 30 10",
|
|
1372
|
+
preserveAspectRatio: "none",
|
|
1373
|
+
children: e.asChild ? n : /* @__PURE__ */ l.jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
1374
|
+
}
|
|
1375
|
+
);
|
|
1376
|
+
});
|
|
1377
|
+
Hn.displayName = Gs;
|
|
1378
|
+
var Us = Hn, Jt = "Popper", [Kn, Le] = Oe(Jt), [zs, Wn] = Kn(Jt), Gn = (e) => {
|
|
1379
|
+
const { __scopePopper: t, children: n } = e, [o, r] = c.useState(null);
|
|
1380
|
+
return /* @__PURE__ */ l.jsx(zs, { scope: t, anchor: o, onAnchorChange: r, children: n });
|
|
1381
|
+
};
|
|
1382
|
+
Gn.displayName = Jt;
|
|
1383
|
+
var Un = "PopperAnchor", zn = c.forwardRef(
|
|
1384
|
+
(e, t) => {
|
|
1385
|
+
const { __scopePopper: n, virtualRef: o, ...r } = e, s = Wn(Un, n), i = c.useRef(null), a = U(t, i), u = c.useRef(null);
|
|
1386
|
+
return c.useEffect(() => {
|
|
1387
|
+
const d = u.current;
|
|
1388
|
+
u.current = o?.current || i.current, d !== u.current && s.onAnchorChange(u.current);
|
|
1389
|
+
}), o ? null : /* @__PURE__ */ l.jsx(B.div, { ...r, ref: a });
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1392
|
+
zn.displayName = Un;
|
|
1393
|
+
var Qt = "PopperContent", [Ys, Xs] = Kn(Qt), Yn = c.forwardRef(
|
|
1394
|
+
(e, t) => {
|
|
1395
|
+
const {
|
|
1396
|
+
__scopePopper: n,
|
|
1397
|
+
side: o = "bottom",
|
|
1398
|
+
sideOffset: r = 0,
|
|
1399
|
+
align: s = "center",
|
|
1400
|
+
alignOffset: i = 0,
|
|
1401
|
+
arrowPadding: a = 0,
|
|
1402
|
+
avoidCollisions: u = !0,
|
|
1403
|
+
collisionBoundary: d = [],
|
|
1404
|
+
collisionPadding: f = 0,
|
|
1405
|
+
sticky: p = "partial",
|
|
1406
|
+
hideWhenDetached: m = !1,
|
|
1407
|
+
updatePositionStrategy: h = "optimized",
|
|
1408
|
+
onPlaced: v,
|
|
1409
|
+
...g
|
|
1410
|
+
} = e, x = Wn(Qt, n), [w, y] = c.useState(null), C = U(t, (b) => y(b)), [R, P] = c.useState(null), O = Rr(R), E = O?.width ?? 0, A = O?.height ?? 0, F = o + (s !== "center" ? "-" + s : ""), N = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, k = Array.isArray(d) ? d : [d], L = k.length > 0, D = {
|
|
1411
|
+
padding: N,
|
|
1412
|
+
boundary: k.filter(Zs),
|
|
1413
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1414
|
+
altBoundary: L
|
|
1415
|
+
}, { refs: T, floatingStyles: $, placement: I, isPositioned: j, middlewareData: _ } = ks({
|
|
1416
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1417
|
+
strategy: "fixed",
|
|
1418
|
+
placement: F,
|
|
1419
|
+
whileElementsMounted: (...b) => Ms(...b, {
|
|
1420
|
+
animationFrame: h === "always"
|
|
1421
|
+
}),
|
|
1422
|
+
elements: {
|
|
1423
|
+
reference: x.anchor
|
|
1424
|
+
},
|
|
1425
|
+
middleware: [
|
|
1426
|
+
Fs({ mainAxis: r + A, alignmentAxis: i }),
|
|
1427
|
+
u && $s({
|
|
1428
|
+
mainAxis: !0,
|
|
1429
|
+
crossAxis: !1,
|
|
1430
|
+
limiter: p === "partial" ? Bs() : void 0,
|
|
1431
|
+
...D
|
|
1432
|
+
}),
|
|
1433
|
+
u && Vs({ ...D }),
|
|
1434
|
+
Hs({
|
|
1435
|
+
...D,
|
|
1436
|
+
apply: ({ elements: b, rects: V, availableWidth: X, availableHeight: H }) => {
|
|
1437
|
+
const { width: K, height: G } = V.reference, te = b.floating.style;
|
|
1438
|
+
te.setProperty("--radix-popper-available-width", `${X}px`), te.setProperty("--radix-popper-available-height", `${H}px`), te.setProperty("--radix-popper-anchor-width", `${K}px`), te.setProperty("--radix-popper-anchor-height", `${G}px`);
|
|
1439
|
+
}
|
|
1440
|
+
}),
|
|
1441
|
+
R && Ws({ element: R, padding: a }),
|
|
1442
|
+
Js({ arrowWidth: E, arrowHeight: A }),
|
|
1443
|
+
m && Ks({ strategy: "referenceHidden", ...D })
|
|
1444
|
+
]
|
|
1445
|
+
}), [S, W] = Zn(I), Y = Ne(v);
|
|
1446
|
+
le(() => {
|
|
1447
|
+
j && Y?.();
|
|
1448
|
+
}, [j, Y]);
|
|
1449
|
+
const oe = _.arrow?.x, fe = _.arrow?.y, ee = _.arrow?.centerOffset !== 0, [pe, Z] = c.useState();
|
|
1450
|
+
return le(() => {
|
|
1451
|
+
w && Z(window.getComputedStyle(w).zIndex);
|
|
1452
|
+
}, [w]), /* @__PURE__ */ l.jsx(
|
|
1453
|
+
"div",
|
|
1454
|
+
{
|
|
1455
|
+
ref: T.setFloating,
|
|
1456
|
+
"data-radix-popper-content-wrapper": "",
|
|
1457
|
+
style: {
|
|
1458
|
+
...$,
|
|
1459
|
+
transform: j ? $.transform : "translate(0, -200%)",
|
|
1460
|
+
// keep off the page when measuring
|
|
1461
|
+
minWidth: "max-content",
|
|
1462
|
+
zIndex: pe,
|
|
1463
|
+
"--radix-popper-transform-origin": [
|
|
1464
|
+
_.transformOrigin?.x,
|
|
1465
|
+
_.transformOrigin?.y
|
|
1466
|
+
].join(" "),
|
|
1467
|
+
// hide the content if using the hide middleware and should be hidden
|
|
1468
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1469
|
+
// as if the PopperContent isn't there at all
|
|
1470
|
+
..._.hide?.referenceHidden && {
|
|
1471
|
+
visibility: "hidden",
|
|
1472
|
+
pointerEvents: "none"
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
dir: e.dir,
|
|
1476
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1477
|
+
Ys,
|
|
1478
|
+
{
|
|
1479
|
+
scope: n,
|
|
1480
|
+
placedSide: S,
|
|
1481
|
+
onArrowChange: P,
|
|
1482
|
+
arrowX: oe,
|
|
1483
|
+
arrowY: fe,
|
|
1484
|
+
shouldHideArrow: ee,
|
|
1485
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1486
|
+
B.div,
|
|
1487
|
+
{
|
|
1488
|
+
"data-side": S,
|
|
1489
|
+
"data-align": W,
|
|
1490
|
+
...g,
|
|
1491
|
+
ref: C,
|
|
1492
|
+
style: {
|
|
1493
|
+
...g.style,
|
|
1494
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
1495
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
1496
|
+
animation: j ? void 0 : "none"
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
)
|
|
1500
|
+
}
|
|
1501
|
+
)
|
|
1502
|
+
}
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
);
|
|
1506
|
+
Yn.displayName = Qt;
|
|
1507
|
+
var Xn = "PopperArrow", qs = {
|
|
1508
|
+
top: "bottom",
|
|
1509
|
+
right: "left",
|
|
1510
|
+
bottom: "top",
|
|
1511
|
+
left: "right"
|
|
1512
|
+
}, qn = c.forwardRef(function(t, n) {
|
|
1513
|
+
const { __scopePopper: o, ...r } = t, s = Xs(Xn, o), i = qs[s.placedSide];
|
|
1514
|
+
return (
|
|
1515
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1516
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
1517
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1518
|
+
/* @__PURE__ */ l.jsx(
|
|
1519
|
+
"span",
|
|
1520
|
+
{
|
|
1521
|
+
ref: s.onArrowChange,
|
|
1522
|
+
style: {
|
|
1523
|
+
position: "absolute",
|
|
1524
|
+
left: s.arrowX,
|
|
1525
|
+
top: s.arrowY,
|
|
1526
|
+
[i]: 0,
|
|
1527
|
+
transformOrigin: {
|
|
1528
|
+
top: "",
|
|
1529
|
+
right: "0 0",
|
|
1530
|
+
bottom: "center 0",
|
|
1531
|
+
left: "100% 0"
|
|
1532
|
+
}[s.placedSide],
|
|
1533
|
+
transform: {
|
|
1534
|
+
top: "translateY(100%)",
|
|
1535
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1536
|
+
bottom: "rotate(180deg)",
|
|
1537
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1538
|
+
}[s.placedSide],
|
|
1539
|
+
visibility: s.shouldHideArrow ? "hidden" : void 0
|
|
1540
|
+
},
|
|
1541
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1542
|
+
Us,
|
|
1543
|
+
{
|
|
1544
|
+
...r,
|
|
1545
|
+
ref: n,
|
|
1546
|
+
style: {
|
|
1547
|
+
...r.style,
|
|
1548
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
1549
|
+
display: "block"
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
)
|
|
1553
|
+
}
|
|
1554
|
+
)
|
|
1555
|
+
);
|
|
1556
|
+
});
|
|
1557
|
+
qn.displayName = Xn;
|
|
1558
|
+
function Zs(e) {
|
|
1559
|
+
return e !== null;
|
|
1560
|
+
}
|
|
1561
|
+
var Js = (e) => ({
|
|
1562
|
+
name: "transformOrigin",
|
|
1563
|
+
options: e,
|
|
1564
|
+
fn(t) {
|
|
1565
|
+
const { placement: n, rects: o, middlewareData: r } = t, i = r.arrow?.centerOffset !== 0, a = i ? 0 : e.arrowWidth, u = i ? 0 : e.arrowHeight, [d, f] = Zn(n), p = { start: "0%", center: "50%", end: "100%" }[f], m = (r.arrow?.x ?? 0) + a / 2, h = (r.arrow?.y ?? 0) + u / 2;
|
|
1566
|
+
let v = "", g = "";
|
|
1567
|
+
return d === "bottom" ? (v = i ? p : `${m}px`, g = `${-u}px`) : d === "top" ? (v = i ? p : `${m}px`, g = `${o.floating.height + u}px`) : d === "right" ? (v = `${-u}px`, g = i ? p : `${h}px`) : d === "left" && (v = `${o.floating.width + u}px`, g = i ? p : `${h}px`), { data: { x: v, y: g } };
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
function Zn(e) {
|
|
1571
|
+
const [t, n = "center"] = e.split("-");
|
|
1572
|
+
return [t, n];
|
|
1573
|
+
}
|
|
1574
|
+
var ut = Gn, dt = zn, en = Yn, tn = qn, bt = "rovingFocusGroup.onEntryFocus", Qs = { bubbles: !1, cancelable: !0 }, Ue = "RovingFocusGroup", [_t, Jn, ei] = kt(Ue), [ti, Qn] = Oe(
|
|
1575
|
+
Ue,
|
|
1576
|
+
[ei]
|
|
1577
|
+
), [ni, oi] = ti(Ue), eo = c.forwardRef(
|
|
1578
|
+
(e, t) => /* @__PURE__ */ l.jsx(_t.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(_t.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(ri, { ...e, ref: t }) }) })
|
|
1579
|
+
);
|
|
1580
|
+
eo.displayName = Ue;
|
|
1581
|
+
var ri = c.forwardRef((e, t) => {
|
|
1582
|
+
const {
|
|
1583
|
+
__scopeRovingFocusGroup: n,
|
|
1584
|
+
orientation: o,
|
|
1585
|
+
loop: r = !1,
|
|
1586
|
+
dir: s,
|
|
1587
|
+
currentTabStopId: i,
|
|
1588
|
+
defaultCurrentTabStopId: a,
|
|
1589
|
+
onCurrentTabStopIdChange: u,
|
|
1590
|
+
onEntryFocus: d,
|
|
1591
|
+
preventScrollOnEntryFocus: f = !1,
|
|
1592
|
+
...p
|
|
1593
|
+
} = e, m = c.useRef(null), h = U(t, m), v = Lt(s), [g, x] = Ae({
|
|
1594
|
+
prop: i,
|
|
1595
|
+
defaultProp: a ?? null,
|
|
1596
|
+
onChange: u,
|
|
1597
|
+
caller: Ue
|
|
1598
|
+
}), [w, y] = c.useState(!1), C = Ne(d), R = Jn(n), P = c.useRef(!1), [O, E] = c.useState(0);
|
|
1599
|
+
return c.useEffect(() => {
|
|
1600
|
+
const A = m.current;
|
|
1601
|
+
if (A)
|
|
1602
|
+
return A.addEventListener(bt, C), () => A.removeEventListener(bt, C);
|
|
1603
|
+
}, [C]), /* @__PURE__ */ l.jsx(
|
|
1604
|
+
ni,
|
|
1605
|
+
{
|
|
1606
|
+
scope: n,
|
|
1607
|
+
orientation: o,
|
|
1608
|
+
dir: v,
|
|
1609
|
+
loop: r,
|
|
1610
|
+
currentTabStopId: g,
|
|
1611
|
+
onItemFocus: c.useCallback(
|
|
1612
|
+
(A) => x(A),
|
|
1613
|
+
[x]
|
|
1614
|
+
),
|
|
1615
|
+
onItemShiftTab: c.useCallback(() => y(!0), []),
|
|
1616
|
+
onFocusableItemAdd: c.useCallback(
|
|
1617
|
+
() => E((A) => A + 1),
|
|
1618
|
+
[]
|
|
1619
|
+
),
|
|
1620
|
+
onFocusableItemRemove: c.useCallback(
|
|
1621
|
+
() => E((A) => A - 1),
|
|
1622
|
+
[]
|
|
1623
|
+
),
|
|
1624
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1625
|
+
B.div,
|
|
1626
|
+
{
|
|
1627
|
+
tabIndex: w || O === 0 ? -1 : 0,
|
|
1628
|
+
"data-orientation": o,
|
|
1629
|
+
...p,
|
|
1630
|
+
ref: h,
|
|
1631
|
+
style: { outline: "none", ...e.style },
|
|
1632
|
+
onMouseDown: M(e.onMouseDown, () => {
|
|
1633
|
+
P.current = !0;
|
|
1634
|
+
}),
|
|
1635
|
+
onFocus: M(e.onFocus, (A) => {
|
|
1636
|
+
const F = !P.current;
|
|
1637
|
+
if (A.target === A.currentTarget && F && !w) {
|
|
1638
|
+
const N = new CustomEvent(bt, Qs);
|
|
1639
|
+
if (A.currentTarget.dispatchEvent(N), !N.defaultPrevented) {
|
|
1640
|
+
const k = R().filter((I) => I.focusable), L = k.find((I) => I.active), D = k.find((I) => I.id === g), $ = [L, D, ...k].filter(
|
|
1641
|
+
Boolean
|
|
1642
|
+
).map((I) => I.ref.current);
|
|
1643
|
+
oo($, f);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
P.current = !1;
|
|
1647
|
+
}),
|
|
1648
|
+
onBlur: M(e.onBlur, () => y(!1))
|
|
1649
|
+
}
|
|
1650
|
+
)
|
|
1651
|
+
}
|
|
1652
|
+
);
|
|
1653
|
+
}), to = "RovingFocusGroupItem", no = c.forwardRef(
|
|
1654
|
+
(e, t) => {
|
|
1655
|
+
const {
|
|
1656
|
+
__scopeRovingFocusGroup: n,
|
|
1657
|
+
focusable: o = !0,
|
|
1658
|
+
active: r = !1,
|
|
1659
|
+
tabStopId: s,
|
|
1660
|
+
children: i,
|
|
1661
|
+
...a
|
|
1662
|
+
} = e, u = me(), d = s || u, f = oi(to, n), p = f.currentTabStopId === d, m = Jn(n), { onFocusableItemAdd: h, onFocusableItemRemove: v, currentTabStopId: g } = f;
|
|
1663
|
+
return c.useEffect(() => {
|
|
1664
|
+
if (o)
|
|
1665
|
+
return h(), () => v();
|
|
1666
|
+
}, [o, h, v]), /* @__PURE__ */ l.jsx(
|
|
1667
|
+
_t.ItemSlot,
|
|
1668
|
+
{
|
|
1669
|
+
scope: n,
|
|
1670
|
+
id: d,
|
|
1671
|
+
focusable: o,
|
|
1672
|
+
active: r,
|
|
1673
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1674
|
+
B.span,
|
|
1675
|
+
{
|
|
1676
|
+
tabIndex: p ? 0 : -1,
|
|
1677
|
+
"data-orientation": f.orientation,
|
|
1678
|
+
...a,
|
|
1679
|
+
ref: t,
|
|
1680
|
+
onMouseDown: M(e.onMouseDown, (x) => {
|
|
1681
|
+
o ? f.onItemFocus(d) : x.preventDefault();
|
|
1682
|
+
}),
|
|
1683
|
+
onFocus: M(e.onFocus, () => f.onItemFocus(d)),
|
|
1684
|
+
onKeyDown: M(e.onKeyDown, (x) => {
|
|
1685
|
+
if (x.key === "Tab" && x.shiftKey) {
|
|
1686
|
+
f.onItemShiftTab();
|
|
1687
|
+
return;
|
|
1688
|
+
}
|
|
1689
|
+
if (x.target !== x.currentTarget) return;
|
|
1690
|
+
const w = ai(x, f.orientation, f.dir);
|
|
1691
|
+
if (w !== void 0) {
|
|
1692
|
+
if (x.metaKey || x.ctrlKey || x.altKey || x.shiftKey) return;
|
|
1693
|
+
x.preventDefault();
|
|
1694
|
+
let C = m().filter((R) => R.focusable).map((R) => R.ref.current);
|
|
1695
|
+
if (w === "last") C.reverse();
|
|
1696
|
+
else if (w === "prev" || w === "next") {
|
|
1697
|
+
w === "prev" && C.reverse();
|
|
1698
|
+
const R = C.indexOf(x.currentTarget);
|
|
1699
|
+
C = f.loop ? ci(C, R + 1) : C.slice(R + 1);
|
|
1700
|
+
}
|
|
1701
|
+
setTimeout(() => oo(C));
|
|
1702
|
+
}
|
|
1703
|
+
}),
|
|
1704
|
+
children: typeof i == "function" ? i({ isCurrentTabStop: p, hasTabStop: g != null }) : i
|
|
1705
|
+
}
|
|
1706
|
+
)
|
|
1707
|
+
}
|
|
1708
|
+
);
|
|
1709
|
+
}
|
|
1710
|
+
);
|
|
1711
|
+
no.displayName = to;
|
|
1712
|
+
var si = {
|
|
1713
|
+
ArrowLeft: "prev",
|
|
1714
|
+
ArrowUp: "prev",
|
|
1715
|
+
ArrowRight: "next",
|
|
1716
|
+
ArrowDown: "next",
|
|
1717
|
+
PageUp: "first",
|
|
1718
|
+
Home: "first",
|
|
1719
|
+
PageDown: "last",
|
|
1720
|
+
End: "last"
|
|
1721
|
+
};
|
|
1722
|
+
function ii(e, t) {
|
|
1723
|
+
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
1724
|
+
}
|
|
1725
|
+
function ai(e, t, n) {
|
|
1726
|
+
const o = ii(e.key, n);
|
|
1727
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
1728
|
+
return si[o];
|
|
1729
|
+
}
|
|
1730
|
+
function oo(e, t = !1) {
|
|
1731
|
+
const n = document.activeElement;
|
|
1732
|
+
for (const o of e)
|
|
1733
|
+
if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
1734
|
+
}
|
|
1735
|
+
function ci(e, t) {
|
|
1736
|
+
return e.map((n, o) => e[(t + o) % e.length]);
|
|
1737
|
+
}
|
|
1738
|
+
var li = eo, ui = no, Et = ["Enter", " "], di = ["ArrowDown", "PageUp", "Home"], ro = ["ArrowUp", "PageDown", "End"], fi = [...di, ...ro], pi = {
|
|
1739
|
+
ltr: [...Et, "ArrowRight"],
|
|
1740
|
+
rtl: [...Et, "ArrowLeft"]
|
|
1741
|
+
}, mi = {
|
|
1742
|
+
ltr: ["ArrowLeft"],
|
|
1743
|
+
rtl: ["ArrowRight"]
|
|
1744
|
+
}, ze = "Menu", [Ke, hi, gi] = kt(ze), [_e, so] = Oe(ze, [
|
|
1745
|
+
gi,
|
|
1746
|
+
Le,
|
|
1747
|
+
Qn
|
|
1748
|
+
]), Ye = Le(), io = Qn(), [ao, we] = _e(ze), [vi, Xe] = _e(ze), co = (e) => {
|
|
1749
|
+
const { __scopeMenu: t, open: n = !1, children: o, dir: r, onOpenChange: s, modal: i = !0 } = e, a = Ye(t), [u, d] = c.useState(null), f = c.useRef(!1), p = Ne(s), m = Lt(r);
|
|
1750
|
+
return c.useEffect(() => {
|
|
1751
|
+
const h = () => {
|
|
1752
|
+
f.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
|
|
1753
|
+
}, v = () => f.current = !1;
|
|
1754
|
+
return document.addEventListener("keydown", h, { capture: !0 }), () => {
|
|
1755
|
+
document.removeEventListener("keydown", h, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
|
|
1756
|
+
};
|
|
1757
|
+
}, []), /* @__PURE__ */ l.jsx(ut, { ...a, children: /* @__PURE__ */ l.jsx(
|
|
1758
|
+
ao,
|
|
1759
|
+
{
|
|
1760
|
+
scope: t,
|
|
1761
|
+
open: n,
|
|
1762
|
+
onOpenChange: p,
|
|
1763
|
+
content: u,
|
|
1764
|
+
onContentChange: d,
|
|
1765
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1766
|
+
vi,
|
|
1767
|
+
{
|
|
1768
|
+
scope: t,
|
|
1769
|
+
onClose: c.useCallback(() => p(!1), [p]),
|
|
1770
|
+
isUsingKeyboardRef: f,
|
|
1771
|
+
dir: m,
|
|
1772
|
+
modal: i,
|
|
1773
|
+
children: o
|
|
1774
|
+
}
|
|
1775
|
+
)
|
|
1776
|
+
}
|
|
1777
|
+
) });
|
|
1778
|
+
};
|
|
1779
|
+
co.displayName = ze;
|
|
1780
|
+
var xi = "MenuAnchor", nn = c.forwardRef(
|
|
1781
|
+
(e, t) => {
|
|
1782
|
+
const { __scopeMenu: n, ...o } = e, r = Ye(n);
|
|
1783
|
+
return /* @__PURE__ */ l.jsx(dt, { ...r, ...o, ref: t });
|
|
1784
|
+
}
|
|
1785
|
+
);
|
|
1786
|
+
nn.displayName = xi;
|
|
1787
|
+
var on = "MenuPortal", [wi, lo] = _e(on, {
|
|
1788
|
+
forceMount: void 0
|
|
1789
|
+
}), uo = (e) => {
|
|
1790
|
+
const { __scopeMenu: t, forceMount: n, children: o, container: r } = e, s = we(on, t);
|
|
1791
|
+
return /* @__PURE__ */ l.jsx(wi, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(De, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Ft, { asChild: !0, container: r, children: o }) }) });
|
|
1792
|
+
};
|
|
1793
|
+
uo.displayName = on;
|
|
1794
|
+
var ne = "MenuContent", [yi, rn] = _e(ne), fo = c.forwardRef(
|
|
1795
|
+
(e, t) => {
|
|
1796
|
+
const n = lo(ne, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, s = we(ne, e.__scopeMenu), i = Xe(ne, e.__scopeMenu);
|
|
1797
|
+
return /* @__PURE__ */ l.jsx(Ke.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(De, { present: o || s.open, children: /* @__PURE__ */ l.jsx(Ke.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(Ci, { ...r, ref: t }) : /* @__PURE__ */ l.jsx(Si, { ...r, ref: t }) }) }) });
|
|
1798
|
+
}
|
|
1799
|
+
), Ci = c.forwardRef(
|
|
1800
|
+
(e, t) => {
|
|
1801
|
+
const n = we(ne, e.__scopeMenu), o = c.useRef(null), r = U(t, o);
|
|
1802
|
+
return c.useEffect(() => {
|
|
1803
|
+
const s = o.current;
|
|
1804
|
+
if (s) return $t(s);
|
|
1805
|
+
}, []), /* @__PURE__ */ l.jsx(
|
|
1806
|
+
sn,
|
|
1807
|
+
{
|
|
1808
|
+
...e,
|
|
1809
|
+
ref: r,
|
|
1810
|
+
trapFocus: n.open,
|
|
1811
|
+
disableOutsidePointerEvents: n.open,
|
|
1812
|
+
disableOutsideScroll: !0,
|
|
1813
|
+
onFocusOutside: M(
|
|
1814
|
+
e.onFocusOutside,
|
|
1815
|
+
(s) => s.preventDefault(),
|
|
1816
|
+
{ checkForDefaultPrevented: !1 }
|
|
1817
|
+
),
|
|
1818
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
1819
|
+
}
|
|
1820
|
+
);
|
|
1821
|
+
}
|
|
1822
|
+
), Si = c.forwardRef((e, t) => {
|
|
1823
|
+
const n = we(ne, e.__scopeMenu);
|
|
1824
|
+
return /* @__PURE__ */ l.jsx(
|
|
1825
|
+
sn,
|
|
1826
|
+
{
|
|
1827
|
+
...e,
|
|
1828
|
+
ref: t,
|
|
1829
|
+
trapFocus: !1,
|
|
1830
|
+
disableOutsidePointerEvents: !1,
|
|
1831
|
+
disableOutsideScroll: !1,
|
|
1832
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1835
|
+
}), bi = Ht("MenuContent.ScrollLock"), sn = c.forwardRef(
|
|
1836
|
+
(e, t) => {
|
|
1837
|
+
const {
|
|
1838
|
+
__scopeMenu: n,
|
|
1839
|
+
loop: o = !1,
|
|
1840
|
+
trapFocus: r,
|
|
1841
|
+
onOpenAutoFocus: s,
|
|
1842
|
+
onCloseAutoFocus: i,
|
|
1843
|
+
disableOutsidePointerEvents: a,
|
|
1844
|
+
onEntryFocus: u,
|
|
1845
|
+
onEscapeKeyDown: d,
|
|
1846
|
+
onPointerDownOutside: f,
|
|
1847
|
+
onFocusOutside: p,
|
|
1848
|
+
onInteractOutside: m,
|
|
1849
|
+
onDismiss: h,
|
|
1850
|
+
disableOutsideScroll: v,
|
|
1851
|
+
...g
|
|
1852
|
+
} = e, x = we(ne, n), w = Xe(ne, n), y = Ye(n), C = io(n), R = hi(n), [P, O] = c.useState(null), E = c.useRef(null), A = U(t, E, x.onContentChange), F = c.useRef(0), N = c.useRef(""), k = c.useRef(0), L = c.useRef(null), D = c.useRef("right"), T = c.useRef(0), $ = v ? Vt : c.Fragment, I = v ? { as: bi, allowPinchZoom: !0 } : void 0, j = (S) => {
|
|
1853
|
+
const W = N.current + S, Y = R().filter((b) => !b.disabled), oe = document.activeElement, fe = Y.find((b) => b.ref.current === oe)?.textValue, ee = Y.map((b) => b.textValue), pe = ji(ee, W, fe), Z = Y.find((b) => b.textValue === pe)?.ref.current;
|
|
1854
|
+
(function b(V) {
|
|
1855
|
+
N.current = V, window.clearTimeout(F.current), V !== "" && (F.current = window.setTimeout(() => b(""), 1e3));
|
|
1856
|
+
})(W), Z && setTimeout(() => Z.focus());
|
|
1857
|
+
};
|
|
1858
|
+
c.useEffect(() => () => window.clearTimeout(F.current), []), Bt();
|
|
1859
|
+
const _ = c.useCallback((S) => D.current === L.current?.side && Li(S, L.current?.area), []);
|
|
1860
|
+
return /* @__PURE__ */ l.jsx(
|
|
1861
|
+
yi,
|
|
1862
|
+
{
|
|
1863
|
+
scope: n,
|
|
1864
|
+
searchRef: N,
|
|
1865
|
+
onItemEnter: c.useCallback(
|
|
1866
|
+
(S) => {
|
|
1867
|
+
_(S) && S.preventDefault();
|
|
1868
|
+
},
|
|
1869
|
+
[_]
|
|
1870
|
+
),
|
|
1871
|
+
onItemLeave: c.useCallback(
|
|
1872
|
+
(S) => {
|
|
1873
|
+
_(S) || (E.current?.focus(), O(null));
|
|
1874
|
+
},
|
|
1875
|
+
[_]
|
|
1876
|
+
),
|
|
1877
|
+
onTriggerLeave: c.useCallback(
|
|
1878
|
+
(S) => {
|
|
1879
|
+
_(S) && S.preventDefault();
|
|
1880
|
+
},
|
|
1881
|
+
[_]
|
|
1882
|
+
),
|
|
1883
|
+
pointerGraceTimerRef: k,
|
|
1884
|
+
onPointerGraceIntentChange: c.useCallback((S) => {
|
|
1885
|
+
L.current = S;
|
|
1886
|
+
}, []),
|
|
1887
|
+
children: /* @__PURE__ */ l.jsx($, { ...I, children: /* @__PURE__ */ l.jsx(
|
|
1888
|
+
Kt,
|
|
1889
|
+
{
|
|
1890
|
+
asChild: !0,
|
|
1891
|
+
trapped: r,
|
|
1892
|
+
onMountAutoFocus: M(s, (S) => {
|
|
1893
|
+
S.preventDefault(), E.current?.focus({ preventScroll: !0 });
|
|
1894
|
+
}),
|
|
1895
|
+
onUnmountAutoFocus: i,
|
|
1896
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1897
|
+
Wt,
|
|
1898
|
+
{
|
|
1899
|
+
asChild: !0,
|
|
1900
|
+
disableOutsidePointerEvents: a,
|
|
1901
|
+
onEscapeKeyDown: d,
|
|
1902
|
+
onPointerDownOutside: f,
|
|
1903
|
+
onFocusOutside: p,
|
|
1904
|
+
onInteractOutside: m,
|
|
1905
|
+
onDismiss: h,
|
|
1906
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1907
|
+
li,
|
|
1908
|
+
{
|
|
1909
|
+
asChild: !0,
|
|
1910
|
+
...C,
|
|
1911
|
+
dir: w.dir,
|
|
1912
|
+
orientation: "vertical",
|
|
1913
|
+
loop: o,
|
|
1914
|
+
currentTabStopId: P,
|
|
1915
|
+
onCurrentTabStopIdChange: O,
|
|
1916
|
+
onEntryFocus: M(u, (S) => {
|
|
1917
|
+
w.isUsingKeyboardRef.current || S.preventDefault();
|
|
1918
|
+
}),
|
|
1919
|
+
preventScrollOnEntryFocus: !0,
|
|
1920
|
+
children: /* @__PURE__ */ l.jsx(
|
|
1921
|
+
en,
|
|
1922
|
+
{
|
|
1923
|
+
role: "menu",
|
|
1924
|
+
"aria-orientation": "vertical",
|
|
1925
|
+
"data-state": Ao(x.open),
|
|
1926
|
+
"data-radix-menu-content": "",
|
|
1927
|
+
dir: w.dir,
|
|
1928
|
+
...y,
|
|
1929
|
+
...g,
|
|
1930
|
+
ref: A,
|
|
1931
|
+
style: { outline: "none", ...g.style },
|
|
1932
|
+
onKeyDown: M(g.onKeyDown, (S) => {
|
|
1933
|
+
const Y = S.target.closest("[data-radix-menu-content]") === S.currentTarget, oe = S.ctrlKey || S.altKey || S.metaKey, fe = S.key.length === 1;
|
|
1934
|
+
Y && (S.key === "Tab" && S.preventDefault(), !oe && fe && j(S.key));
|
|
1935
|
+
const ee = E.current;
|
|
1936
|
+
if (S.target !== ee || !fi.includes(S.key)) return;
|
|
1937
|
+
S.preventDefault();
|
|
1938
|
+
const Z = R().filter((b) => !b.disabled).map((b) => b.ref.current);
|
|
1939
|
+
ro.includes(S.key) && Z.reverse(), Ni(Z);
|
|
1940
|
+
}),
|
|
1941
|
+
onBlur: M(e.onBlur, (S) => {
|
|
1942
|
+
S.currentTarget.contains(S.target) || (window.clearTimeout(F.current), N.current = "");
|
|
1943
|
+
}),
|
|
1944
|
+
onPointerMove: M(
|
|
1945
|
+
e.onPointerMove,
|
|
1946
|
+
We((S) => {
|
|
1947
|
+
const W = S.target, Y = T.current !== S.clientX;
|
|
1948
|
+
if (S.currentTarget.contains(W) && Y) {
|
|
1949
|
+
const oe = S.clientX > T.current ? "right" : "left";
|
|
1950
|
+
D.current = oe, T.current = S.clientX;
|
|
1951
|
+
}
|
|
1952
|
+
})
|
|
1953
|
+
)
|
|
1954
|
+
}
|
|
1955
|
+
)
|
|
1956
|
+
}
|
|
1957
|
+
)
|
|
1958
|
+
}
|
|
1959
|
+
)
|
|
1960
|
+
}
|
|
1961
|
+
) })
|
|
1962
|
+
}
|
|
1963
|
+
);
|
|
1964
|
+
}
|
|
1965
|
+
);
|
|
1966
|
+
fo.displayName = ne;
|
|
1967
|
+
var Ri = "MenuGroup", an = c.forwardRef(
|
|
1968
|
+
(e, t) => {
|
|
1969
|
+
const { __scopeMenu: n, ...o } = e;
|
|
1970
|
+
return /* @__PURE__ */ l.jsx(B.div, { role: "group", ...o, ref: t });
|
|
1971
|
+
}
|
|
1972
|
+
);
|
|
1973
|
+
an.displayName = Ri;
|
|
1974
|
+
var Pi = "MenuLabel", po = c.forwardRef(
|
|
1975
|
+
(e, t) => {
|
|
1976
|
+
const { __scopeMenu: n, ...o } = e;
|
|
1977
|
+
return /* @__PURE__ */ l.jsx(B.div, { ...o, ref: t });
|
|
1978
|
+
}
|
|
1979
|
+
);
|
|
1980
|
+
po.displayName = Pi;
|
|
1981
|
+
var ot = "MenuItem", Pn = "menu.itemSelect", ft = c.forwardRef(
|
|
1982
|
+
(e, t) => {
|
|
1983
|
+
const { disabled: n = !1, onSelect: o, ...r } = e, s = c.useRef(null), i = Xe(ot, e.__scopeMenu), a = rn(ot, e.__scopeMenu), u = U(t, s), d = c.useRef(!1), f = () => {
|
|
1984
|
+
const p = s.current;
|
|
1985
|
+
if (!n && p) {
|
|
1986
|
+
const m = new CustomEvent(Pn, { bubbles: !0, cancelable: !0 });
|
|
1987
|
+
p.addEventListener(Pn, (h) => o?.(h), { once: !0 }), Pr(p, m), m.defaultPrevented ? d.current = !1 : i.onClose();
|
|
1988
|
+
}
|
|
1989
|
+
};
|
|
1990
|
+
return /* @__PURE__ */ l.jsx(
|
|
1991
|
+
mo,
|
|
1992
|
+
{
|
|
1993
|
+
...r,
|
|
1994
|
+
ref: u,
|
|
1995
|
+
disabled: n,
|
|
1996
|
+
onClick: M(e.onClick, f),
|
|
1997
|
+
onPointerDown: (p) => {
|
|
1998
|
+
e.onPointerDown?.(p), d.current = !0;
|
|
1999
|
+
},
|
|
2000
|
+
onPointerUp: M(e.onPointerUp, (p) => {
|
|
2001
|
+
d.current || p.currentTarget?.click();
|
|
2002
|
+
}),
|
|
2003
|
+
onKeyDown: M(e.onKeyDown, (p) => {
|
|
2004
|
+
const m = a.searchRef.current !== "";
|
|
2005
|
+
n || m && p.key === " " || Et.includes(p.key) && (p.currentTarget.click(), p.preventDefault());
|
|
2006
|
+
})
|
|
2007
|
+
}
|
|
2008
|
+
);
|
|
2009
|
+
}
|
|
2010
|
+
);
|
|
2011
|
+
ft.displayName = ot;
|
|
2012
|
+
var mo = c.forwardRef(
|
|
2013
|
+
(e, t) => {
|
|
2014
|
+
const { __scopeMenu: n, disabled: o = !1, textValue: r, ...s } = e, i = rn(ot, n), a = io(n), u = c.useRef(null), d = U(t, u), [f, p] = c.useState(!1), [m, h] = c.useState("");
|
|
2015
|
+
return c.useEffect(() => {
|
|
2016
|
+
const v = u.current;
|
|
2017
|
+
v && h((v.textContent ?? "").trim());
|
|
2018
|
+
}, [s.children]), /* @__PURE__ */ l.jsx(
|
|
2019
|
+
Ke.ItemSlot,
|
|
2020
|
+
{
|
|
2021
|
+
scope: n,
|
|
2022
|
+
disabled: o,
|
|
2023
|
+
textValue: r ?? m,
|
|
2024
|
+
children: /* @__PURE__ */ l.jsx(ui, { asChild: !0, ...a, focusable: !o, children: /* @__PURE__ */ l.jsx(
|
|
2025
|
+
B.div,
|
|
2026
|
+
{
|
|
2027
|
+
role: "menuitem",
|
|
2028
|
+
"data-highlighted": f ? "" : void 0,
|
|
2029
|
+
"aria-disabled": o || void 0,
|
|
2030
|
+
"data-disabled": o ? "" : void 0,
|
|
2031
|
+
...s,
|
|
2032
|
+
ref: d,
|
|
2033
|
+
onPointerMove: M(
|
|
2034
|
+
e.onPointerMove,
|
|
2035
|
+
We((v) => {
|
|
2036
|
+
o ? i.onItemLeave(v) : (i.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
|
|
2037
|
+
})
|
|
2038
|
+
),
|
|
2039
|
+
onPointerLeave: M(
|
|
2040
|
+
e.onPointerLeave,
|
|
2041
|
+
We((v) => i.onItemLeave(v))
|
|
2042
|
+
),
|
|
2043
|
+
onFocus: M(e.onFocus, () => p(!0)),
|
|
2044
|
+
onBlur: M(e.onBlur, () => p(!1))
|
|
2045
|
+
}
|
|
2046
|
+
) })
|
|
2047
|
+
}
|
|
2048
|
+
);
|
|
2049
|
+
}
|
|
2050
|
+
), Mi = "MenuCheckboxItem", ho = c.forwardRef(
|
|
2051
|
+
(e, t) => {
|
|
2052
|
+
const { checked: n = !1, onCheckedChange: o, ...r } = e;
|
|
2053
|
+
return /* @__PURE__ */ l.jsx(yo, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ l.jsx(
|
|
2054
|
+
ft,
|
|
2055
|
+
{
|
|
2056
|
+
role: "menuitemcheckbox",
|
|
2057
|
+
"aria-checked": rt(n) ? "mixed" : n,
|
|
2058
|
+
...r,
|
|
2059
|
+
ref: t,
|
|
2060
|
+
"data-state": un(n),
|
|
2061
|
+
onSelect: M(
|
|
2062
|
+
r.onSelect,
|
|
2063
|
+
() => o?.(rt(n) ? !0 : !n),
|
|
2064
|
+
{ checkForDefaultPrevented: !1 }
|
|
2065
|
+
)
|
|
2066
|
+
}
|
|
2067
|
+
) });
|
|
2068
|
+
}
|
|
2069
|
+
);
|
|
2070
|
+
ho.displayName = Mi;
|
|
2071
|
+
var go = "MenuRadioGroup", [_i, Ei] = _e(
|
|
2072
|
+
go,
|
|
2073
|
+
{ value: void 0, onValueChange: () => {
|
|
2074
|
+
} }
|
|
2075
|
+
), vo = c.forwardRef(
|
|
2076
|
+
(e, t) => {
|
|
2077
|
+
const { value: n, onValueChange: o, ...r } = e, s = Ne(o);
|
|
2078
|
+
return /* @__PURE__ */ l.jsx(_i, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(an, { ...r, ref: t }) });
|
|
2079
|
+
}
|
|
2080
|
+
);
|
|
2081
|
+
vo.displayName = go;
|
|
2082
|
+
var xo = "MenuRadioItem", wo = c.forwardRef(
|
|
2083
|
+
(e, t) => {
|
|
2084
|
+
const { value: n, ...o } = e, r = Ei(xo, e.__scopeMenu), s = n === r.value;
|
|
2085
|
+
return /* @__PURE__ */ l.jsx(yo, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ l.jsx(
|
|
2086
|
+
ft,
|
|
2087
|
+
{
|
|
2088
|
+
role: "menuitemradio",
|
|
2089
|
+
"aria-checked": s,
|
|
2090
|
+
...o,
|
|
2091
|
+
ref: t,
|
|
2092
|
+
"data-state": un(s),
|
|
2093
|
+
onSelect: M(
|
|
2094
|
+
o.onSelect,
|
|
2095
|
+
() => r.onValueChange?.(n),
|
|
2096
|
+
{ checkForDefaultPrevented: !1 }
|
|
2097
|
+
)
|
|
2098
|
+
}
|
|
2099
|
+
) });
|
|
2100
|
+
}
|
|
2101
|
+
);
|
|
2102
|
+
wo.displayName = xo;
|
|
2103
|
+
var cn = "MenuItemIndicator", [yo, Ai] = _e(
|
|
2104
|
+
cn,
|
|
2105
|
+
{ checked: !1 }
|
|
2106
|
+
), Co = c.forwardRef(
|
|
2107
|
+
(e, t) => {
|
|
2108
|
+
const { __scopeMenu: n, forceMount: o, ...r } = e, s = Ai(cn, n);
|
|
2109
|
+
return /* @__PURE__ */ l.jsx(
|
|
2110
|
+
De,
|
|
2111
|
+
{
|
|
2112
|
+
present: o || rt(s.checked) || s.checked === !0,
|
|
2113
|
+
children: /* @__PURE__ */ l.jsx(
|
|
2114
|
+
B.span,
|
|
2115
|
+
{
|
|
2116
|
+
...r,
|
|
2117
|
+
ref: t,
|
|
2118
|
+
"data-state": un(s.checked)
|
|
2119
|
+
}
|
|
2120
|
+
)
|
|
2121
|
+
}
|
|
2122
|
+
);
|
|
2123
|
+
}
|
|
2124
|
+
);
|
|
2125
|
+
Co.displayName = cn;
|
|
2126
|
+
var Ii = "MenuSeparator", So = c.forwardRef(
|
|
2127
|
+
(e, t) => {
|
|
2128
|
+
const { __scopeMenu: n, ...o } = e;
|
|
2129
|
+
return /* @__PURE__ */ l.jsx(
|
|
2130
|
+
B.div,
|
|
2131
|
+
{
|
|
2132
|
+
role: "separator",
|
|
2133
|
+
"aria-orientation": "horizontal",
|
|
2134
|
+
...o,
|
|
2135
|
+
ref: t
|
|
2136
|
+
}
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
);
|
|
2140
|
+
So.displayName = Ii;
|
|
2141
|
+
var Ti = "MenuArrow", bo = c.forwardRef(
|
|
2142
|
+
(e, t) => {
|
|
2143
|
+
const { __scopeMenu: n, ...o } = e, r = Ye(n);
|
|
2144
|
+
return /* @__PURE__ */ l.jsx(tn, { ...r, ...o, ref: t });
|
|
2145
|
+
}
|
|
2146
|
+
);
|
|
2147
|
+
bo.displayName = Ti;
|
|
2148
|
+
var ln = "MenuSub", [Oi, Ro] = _e(ln), Po = (e) => {
|
|
2149
|
+
const { __scopeMenu: t, children: n, open: o = !1, onOpenChange: r } = e, s = we(ln, t), i = Ye(t), [a, u] = c.useState(null), [d, f] = c.useState(null), p = Ne(r);
|
|
2150
|
+
return c.useEffect(() => (s.open === !1 && p(!1), () => p(!1)), [s.open, p]), /* @__PURE__ */ l.jsx(ut, { ...i, children: /* @__PURE__ */ l.jsx(
|
|
2151
|
+
ao,
|
|
2152
|
+
{
|
|
2153
|
+
scope: t,
|
|
2154
|
+
open: o,
|
|
2155
|
+
onOpenChange: p,
|
|
2156
|
+
content: d,
|
|
2157
|
+
onContentChange: f,
|
|
2158
|
+
children: /* @__PURE__ */ l.jsx(
|
|
2159
|
+
Oi,
|
|
2160
|
+
{
|
|
2161
|
+
scope: t,
|
|
2162
|
+
contentId: me(),
|
|
2163
|
+
triggerId: me(),
|
|
2164
|
+
trigger: a,
|
|
2165
|
+
onTriggerChange: u,
|
|
2166
|
+
children: n
|
|
2167
|
+
}
|
|
2168
|
+
)
|
|
2169
|
+
}
|
|
2170
|
+
) });
|
|
2171
|
+
};
|
|
2172
|
+
Po.displayName = ln;
|
|
2173
|
+
var $e = "MenuSubTrigger", Mo = c.forwardRef(
|
|
2174
|
+
(e, t) => {
|
|
2175
|
+
const n = we($e, e.__scopeMenu), o = Xe($e, e.__scopeMenu), r = Ro($e, e.__scopeMenu), s = rn($e, e.__scopeMenu), i = c.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: u } = s, d = { __scopeMenu: e.__scopeMenu }, f = c.useCallback(() => {
|
|
2176
|
+
i.current && window.clearTimeout(i.current), i.current = null;
|
|
2177
|
+
}, []);
|
|
2178
|
+
return c.useEffect(() => f, [f]), c.useEffect(() => {
|
|
2179
|
+
const p = a.current;
|
|
2180
|
+
return () => {
|
|
2181
|
+
window.clearTimeout(p), u(null);
|
|
2182
|
+
};
|
|
2183
|
+
}, [a, u]), /* @__PURE__ */ l.jsx(nn, { asChild: !0, ...d, children: /* @__PURE__ */ l.jsx(
|
|
2184
|
+
mo,
|
|
2185
|
+
{
|
|
2186
|
+
id: r.triggerId,
|
|
2187
|
+
"aria-haspopup": "menu",
|
|
2188
|
+
"aria-expanded": n.open,
|
|
2189
|
+
"aria-controls": r.contentId,
|
|
2190
|
+
"data-state": Ao(n.open),
|
|
2191
|
+
...e,
|
|
2192
|
+
ref: Mn(t, r.onTriggerChange),
|
|
2193
|
+
onClick: (p) => {
|
|
2194
|
+
e.onClick?.(p), !(e.disabled || p.defaultPrevented) && (p.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
2195
|
+
},
|
|
2196
|
+
onPointerMove: M(
|
|
2197
|
+
e.onPointerMove,
|
|
2198
|
+
We((p) => {
|
|
2199
|
+
s.onItemEnter(p), !p.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
2200
|
+
n.onOpenChange(!0), f();
|
|
2201
|
+
}, 100));
|
|
2202
|
+
})
|
|
2203
|
+
),
|
|
2204
|
+
onPointerLeave: M(
|
|
2205
|
+
e.onPointerLeave,
|
|
2206
|
+
We((p) => {
|
|
2207
|
+
f();
|
|
2208
|
+
const m = n.content?.getBoundingClientRect();
|
|
2209
|
+
if (m) {
|
|
2210
|
+
const h = n.content?.dataset.side, v = h === "right", g = v ? -5 : 5, x = m[v ? "left" : "right"], w = m[v ? "right" : "left"];
|
|
2211
|
+
s.onPointerGraceIntentChange({
|
|
2212
|
+
area: [
|
|
2213
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
2214
|
+
// consistently within polygon bounds
|
|
2215
|
+
{ x: p.clientX + g, y: p.clientY },
|
|
2216
|
+
{ x, y: m.top },
|
|
2217
|
+
{ x: w, y: m.top },
|
|
2218
|
+
{ x: w, y: m.bottom },
|
|
2219
|
+
{ x, y: m.bottom }
|
|
2220
|
+
],
|
|
2221
|
+
side: h
|
|
2222
|
+
}), window.clearTimeout(a.current), a.current = window.setTimeout(
|
|
2223
|
+
() => s.onPointerGraceIntentChange(null),
|
|
2224
|
+
300
|
|
2225
|
+
);
|
|
2226
|
+
} else {
|
|
2227
|
+
if (s.onTriggerLeave(p), p.defaultPrevented) return;
|
|
2228
|
+
s.onPointerGraceIntentChange(null);
|
|
2229
|
+
}
|
|
2230
|
+
})
|
|
2231
|
+
),
|
|
2232
|
+
onKeyDown: M(e.onKeyDown, (p) => {
|
|
2233
|
+
const m = s.searchRef.current !== "";
|
|
2234
|
+
e.disabled || m && p.key === " " || pi[o.dir].includes(p.key) && (n.onOpenChange(!0), n.content?.focus(), p.preventDefault());
|
|
2235
|
+
})
|
|
2236
|
+
}
|
|
2237
|
+
) });
|
|
2238
|
+
}
|
|
2239
|
+
);
|
|
2240
|
+
Mo.displayName = $e;
|
|
2241
|
+
var _o = "MenuSubContent", Eo = c.forwardRef(
|
|
2242
|
+
(e, t) => {
|
|
2243
|
+
const n = lo(ne, e.__scopeMenu), { forceMount: o = n.forceMount, ...r } = e, s = we(ne, e.__scopeMenu), i = Xe(ne, e.__scopeMenu), a = Ro(_o, e.__scopeMenu), u = c.useRef(null), d = U(t, u);
|
|
2244
|
+
return /* @__PURE__ */ l.jsx(Ke.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(De, { present: o || s.open, children: /* @__PURE__ */ l.jsx(Ke.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
|
|
2245
|
+
sn,
|
|
2246
|
+
{
|
|
2247
|
+
id: a.contentId,
|
|
2248
|
+
"aria-labelledby": a.triggerId,
|
|
2249
|
+
...r,
|
|
2250
|
+
ref: d,
|
|
2251
|
+
align: "start",
|
|
2252
|
+
side: i.dir === "rtl" ? "left" : "right",
|
|
2253
|
+
disableOutsidePointerEvents: !1,
|
|
2254
|
+
disableOutsideScroll: !1,
|
|
2255
|
+
trapFocus: !1,
|
|
2256
|
+
onOpenAutoFocus: (f) => {
|
|
2257
|
+
i.isUsingKeyboardRef.current && u.current?.focus(), f.preventDefault();
|
|
2258
|
+
},
|
|
2259
|
+
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
2260
|
+
onFocusOutside: M(e.onFocusOutside, (f) => {
|
|
2261
|
+
f.target !== a.trigger && s.onOpenChange(!1);
|
|
2262
|
+
}),
|
|
2263
|
+
onEscapeKeyDown: M(e.onEscapeKeyDown, (f) => {
|
|
2264
|
+
i.onClose(), f.preventDefault();
|
|
2265
|
+
}),
|
|
2266
|
+
onKeyDown: M(e.onKeyDown, (f) => {
|
|
2267
|
+
const p = f.currentTarget.contains(f.target), m = mi[i.dir].includes(f.key);
|
|
2268
|
+
p && m && (s.onOpenChange(!1), a.trigger?.focus(), f.preventDefault());
|
|
2269
|
+
})
|
|
2270
|
+
}
|
|
2271
|
+
) }) }) });
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2274
|
+
Eo.displayName = _o;
|
|
2275
|
+
function Ao(e) {
|
|
2276
|
+
return e ? "open" : "closed";
|
|
2277
|
+
}
|
|
2278
|
+
function rt(e) {
|
|
2279
|
+
return e === "indeterminate";
|
|
2280
|
+
}
|
|
2281
|
+
function un(e) {
|
|
2282
|
+
return rt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
2283
|
+
}
|
|
2284
|
+
function Ni(e) {
|
|
2285
|
+
const t = document.activeElement;
|
|
2286
|
+
for (const n of e)
|
|
2287
|
+
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
2288
|
+
}
|
|
2289
|
+
function Di(e, t) {
|
|
2290
|
+
return e.map((n, o) => e[(t + o) % e.length]);
|
|
2291
|
+
}
|
|
2292
|
+
function ji(e, t, n) {
|
|
2293
|
+
const r = t.length > 1 && Array.from(t).every((d) => d === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
2294
|
+
let i = Di(e, Math.max(s, 0));
|
|
2295
|
+
r.length === 1 && (i = i.filter((d) => d !== n));
|
|
2296
|
+
const u = i.find(
|
|
2297
|
+
(d) => d.toLowerCase().startsWith(r.toLowerCase())
|
|
2298
|
+
);
|
|
2299
|
+
return u !== n ? u : void 0;
|
|
2300
|
+
}
|
|
2301
|
+
function ki(e, t) {
|
|
2302
|
+
const { x: n, y: o } = e;
|
|
2303
|
+
let r = !1;
|
|
2304
|
+
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
2305
|
+
const a = t[s], u = t[i], d = a.x, f = a.y, p = u.x, m = u.y;
|
|
2306
|
+
f > o != m > o && n < (p - d) * (o - f) / (m - f) + d && (r = !r);
|
|
2307
|
+
}
|
|
2308
|
+
return r;
|
|
2309
|
+
}
|
|
2310
|
+
function Li(e, t) {
|
|
2311
|
+
if (!t) return !1;
|
|
2312
|
+
const n = { x: e.clientX, y: e.clientY };
|
|
2313
|
+
return ki(n, t);
|
|
2314
|
+
}
|
|
2315
|
+
function We(e) {
|
|
2316
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
2317
|
+
}
|
|
2318
|
+
var Fi = co, $i = nn, Bi = uo, Vi = fo, Hi = an, Ki = po, Wi = ft, Gi = ho, Ui = vo, zi = wo, Yi = Co, Xi = So, qi = bo, Zi = Po, Ji = Mo, Qi = Eo, pt = "DropdownMenu", [ea] = Oe(
|
|
2319
|
+
pt,
|
|
2320
|
+
[so]
|
|
2321
|
+
), z = so(), [ta, Io] = ea(pt), To = (e) => {
|
|
2322
|
+
const {
|
|
2323
|
+
__scopeDropdownMenu: t,
|
|
2324
|
+
children: n,
|
|
2325
|
+
dir: o,
|
|
2326
|
+
open: r,
|
|
2327
|
+
defaultOpen: s,
|
|
2328
|
+
onOpenChange: i,
|
|
2329
|
+
modal: a = !0
|
|
2330
|
+
} = e, u = z(t), d = c.useRef(null), [f, p] = Ae({
|
|
2331
|
+
prop: r,
|
|
2332
|
+
defaultProp: s ?? !1,
|
|
2333
|
+
onChange: i,
|
|
2334
|
+
caller: pt
|
|
2335
|
+
});
|
|
2336
|
+
return /* @__PURE__ */ l.jsx(
|
|
2337
|
+
ta,
|
|
2338
|
+
{
|
|
2339
|
+
scope: t,
|
|
2340
|
+
triggerId: me(),
|
|
2341
|
+
triggerRef: d,
|
|
2342
|
+
contentId: me(),
|
|
2343
|
+
open: f,
|
|
2344
|
+
onOpenChange: p,
|
|
2345
|
+
onOpenToggle: c.useCallback(() => p((m) => !m), [p]),
|
|
2346
|
+
modal: a,
|
|
2347
|
+
children: /* @__PURE__ */ l.jsx(Fi, { ...u, open: f, onOpenChange: p, dir: o, modal: a, children: n })
|
|
2348
|
+
}
|
|
2349
|
+
);
|
|
2350
|
+
};
|
|
2351
|
+
To.displayName = pt;
|
|
2352
|
+
var Oo = "DropdownMenuTrigger", No = c.forwardRef(
|
|
2353
|
+
(e, t) => {
|
|
2354
|
+
const { __scopeDropdownMenu: n, disabled: o = !1, ...r } = e, s = Io(Oo, n), i = z(n);
|
|
2355
|
+
return /* @__PURE__ */ l.jsx($i, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
|
|
2356
|
+
B.button,
|
|
2357
|
+
{
|
|
2358
|
+
type: "button",
|
|
2359
|
+
id: s.triggerId,
|
|
2360
|
+
"aria-haspopup": "menu",
|
|
2361
|
+
"aria-expanded": s.open,
|
|
2362
|
+
"aria-controls": s.open ? s.contentId : void 0,
|
|
2363
|
+
"data-state": s.open ? "open" : "closed",
|
|
2364
|
+
"data-disabled": o ? "" : void 0,
|
|
2365
|
+
disabled: o,
|
|
2366
|
+
...r,
|
|
2367
|
+
ref: Mn(t, s.triggerRef),
|
|
2368
|
+
onPointerDown: M(e.onPointerDown, (a) => {
|
|
2369
|
+
!o && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
2370
|
+
}),
|
|
2371
|
+
onKeyDown: M(e.onKeyDown, (a) => {
|
|
2372
|
+
o || (["Enter", " "].includes(a.key) && s.onOpenToggle(), a.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(a.key) && a.preventDefault());
|
|
2373
|
+
})
|
|
2374
|
+
}
|
|
2375
|
+
) });
|
|
2376
|
+
}
|
|
2377
|
+
);
|
|
2378
|
+
No.displayName = Oo;
|
|
2379
|
+
var na = "DropdownMenuPortal", Do = (e) => {
|
|
2380
|
+
const { __scopeDropdownMenu: t, ...n } = e, o = z(t);
|
|
2381
|
+
return /* @__PURE__ */ l.jsx(Bi, { ...o, ...n });
|
|
2382
|
+
};
|
|
2383
|
+
Do.displayName = na;
|
|
2384
|
+
var jo = "DropdownMenuContent", ko = c.forwardRef(
|
|
2385
|
+
(e, t) => {
|
|
2386
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = Io(jo, n), s = z(n), i = c.useRef(!1);
|
|
2387
|
+
return /* @__PURE__ */ l.jsx(
|
|
2388
|
+
Vi,
|
|
2389
|
+
{
|
|
2390
|
+
id: r.contentId,
|
|
2391
|
+
"aria-labelledby": r.triggerId,
|
|
2392
|
+
...s,
|
|
2393
|
+
...o,
|
|
2394
|
+
ref: t,
|
|
2395
|
+
onCloseAutoFocus: M(e.onCloseAutoFocus, (a) => {
|
|
2396
|
+
i.current || r.triggerRef.current?.focus(), i.current = !1, a.preventDefault();
|
|
2397
|
+
}),
|
|
2398
|
+
onInteractOutside: M(e.onInteractOutside, (a) => {
|
|
2399
|
+
const u = a.detail.originalEvent, d = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || d;
|
|
2400
|
+
(!r.modal || f) && (i.current = !0);
|
|
2401
|
+
}),
|
|
2402
|
+
style: {
|
|
2403
|
+
...e.style,
|
|
2404
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2405
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
2406
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
2407
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2408
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
);
|
|
2412
|
+
}
|
|
2413
|
+
);
|
|
2414
|
+
ko.displayName = jo;
|
|
2415
|
+
var oa = "DropdownMenuGroup", ra = c.forwardRef(
|
|
2416
|
+
(e, t) => {
|
|
2417
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2418
|
+
return /* @__PURE__ */ l.jsx(Hi, { ...r, ...o, ref: t });
|
|
2419
|
+
}
|
|
2420
|
+
);
|
|
2421
|
+
ra.displayName = oa;
|
|
2422
|
+
var sa = "DropdownMenuLabel", Lo = c.forwardRef(
|
|
2423
|
+
(e, t) => {
|
|
2424
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2425
|
+
return /* @__PURE__ */ l.jsx(Ki, { ...r, ...o, ref: t });
|
|
2426
|
+
}
|
|
2427
|
+
);
|
|
2428
|
+
Lo.displayName = sa;
|
|
2429
|
+
var ia = "DropdownMenuItem", Fo = c.forwardRef(
|
|
2430
|
+
(e, t) => {
|
|
2431
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2432
|
+
return /* @__PURE__ */ l.jsx(Wi, { ...r, ...o, ref: t });
|
|
2433
|
+
}
|
|
2434
|
+
);
|
|
2435
|
+
Fo.displayName = ia;
|
|
2436
|
+
var aa = "DropdownMenuCheckboxItem", ca = c.forwardRef((e, t) => {
|
|
2437
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2438
|
+
return /* @__PURE__ */ l.jsx(Gi, { ...r, ...o, ref: t });
|
|
2439
|
+
});
|
|
2440
|
+
ca.displayName = aa;
|
|
2441
|
+
var la = "DropdownMenuRadioGroup", ua = c.forwardRef((e, t) => {
|
|
2442
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2443
|
+
return /* @__PURE__ */ l.jsx(Ui, { ...r, ...o, ref: t });
|
|
2444
|
+
});
|
|
2445
|
+
ua.displayName = la;
|
|
2446
|
+
var da = "DropdownMenuRadioItem", fa = c.forwardRef((e, t) => {
|
|
2447
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2448
|
+
return /* @__PURE__ */ l.jsx(zi, { ...r, ...o, ref: t });
|
|
2449
|
+
});
|
|
2450
|
+
fa.displayName = da;
|
|
2451
|
+
var pa = "DropdownMenuItemIndicator", ma = c.forwardRef((e, t) => {
|
|
2452
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2453
|
+
return /* @__PURE__ */ l.jsx(Yi, { ...r, ...o, ref: t });
|
|
2454
|
+
});
|
|
2455
|
+
ma.displayName = pa;
|
|
2456
|
+
var ha = "DropdownMenuSeparator", $o = c.forwardRef((e, t) => {
|
|
2457
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2458
|
+
return /* @__PURE__ */ l.jsx(Xi, { ...r, ...o, ref: t });
|
|
2459
|
+
});
|
|
2460
|
+
$o.displayName = ha;
|
|
2461
|
+
var ga = "DropdownMenuArrow", va = c.forwardRef(
|
|
2462
|
+
(e, t) => {
|
|
2463
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2464
|
+
return /* @__PURE__ */ l.jsx(qi, { ...r, ...o, ref: t });
|
|
2465
|
+
}
|
|
2466
|
+
);
|
|
2467
|
+
va.displayName = ga;
|
|
2468
|
+
var xa = (e) => {
|
|
2469
|
+
const { __scopeDropdownMenu: t, children: n, open: o, onOpenChange: r, defaultOpen: s } = e, i = z(t), [a, u] = Ae({
|
|
2470
|
+
prop: o,
|
|
2471
|
+
defaultProp: s ?? !1,
|
|
2472
|
+
onChange: r,
|
|
2473
|
+
caller: "DropdownMenuSub"
|
|
2474
|
+
});
|
|
2475
|
+
return /* @__PURE__ */ l.jsx(Zi, { ...i, open: a, onOpenChange: u, children: n });
|
|
2476
|
+
}, wa = "DropdownMenuSubTrigger", Bo = c.forwardRef((e, t) => {
|
|
2477
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2478
|
+
return /* @__PURE__ */ l.jsx(Ji, { ...r, ...o, ref: t });
|
|
2479
|
+
});
|
|
2480
|
+
Bo.displayName = wa;
|
|
2481
|
+
var ya = "DropdownMenuSubContent", Vo = c.forwardRef((e, t) => {
|
|
2482
|
+
const { __scopeDropdownMenu: n, ...o } = e, r = z(n);
|
|
2483
|
+
return /* @__PURE__ */ l.jsx(
|
|
2484
|
+
Qi,
|
|
2485
|
+
{
|
|
2486
|
+
...r,
|
|
2487
|
+
...o,
|
|
2488
|
+
ref: t,
|
|
2489
|
+
style: {
|
|
2490
|
+
...e.style,
|
|
2491
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2492
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
2493
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
2494
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2495
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
);
|
|
2499
|
+
});
|
|
2500
|
+
Vo.displayName = ya;
|
|
2501
|
+
var Ca = To, Sa = No, ba = Do, Ra = ko, Pa = Lo, Ma = Fo, _a = $o, Ea = xa, Aa = Bo, Ia = Vo, mt = "Popover", [Ho] = Oe(mt, [
|
|
2502
|
+
Le
|
|
2503
|
+
]), qe = Le(), [Ta, ye] = Ho(mt), Ko = (e) => {
|
|
2504
|
+
const {
|
|
2505
|
+
__scopePopover: t,
|
|
2506
|
+
children: n,
|
|
2507
|
+
open: o,
|
|
2508
|
+
defaultOpen: r,
|
|
2509
|
+
onOpenChange: s,
|
|
2510
|
+
modal: i = !1
|
|
2511
|
+
} = e, a = qe(t), u = c.useRef(null), [d, f] = c.useState(!1), [p, m] = Ae({
|
|
2512
|
+
prop: o,
|
|
2513
|
+
defaultProp: r ?? !1,
|
|
2514
|
+
onChange: s,
|
|
2515
|
+
caller: mt
|
|
2516
|
+
});
|
|
2517
|
+
return /* @__PURE__ */ l.jsx(ut, { ...a, children: /* @__PURE__ */ l.jsx(
|
|
2518
|
+
Ta,
|
|
2519
|
+
{
|
|
2520
|
+
scope: t,
|
|
2521
|
+
contentId: me(),
|
|
2522
|
+
triggerRef: u,
|
|
2523
|
+
open: p,
|
|
2524
|
+
onOpenChange: m,
|
|
2525
|
+
onOpenToggle: c.useCallback(() => m((h) => !h), [m]),
|
|
2526
|
+
hasCustomAnchor: d,
|
|
2527
|
+
onCustomAnchorAdd: c.useCallback(() => f(!0), []),
|
|
2528
|
+
onCustomAnchorRemove: c.useCallback(() => f(!1), []),
|
|
2529
|
+
modal: i,
|
|
2530
|
+
children: n
|
|
2531
|
+
}
|
|
2532
|
+
) });
|
|
2533
|
+
};
|
|
2534
|
+
Ko.displayName = mt;
|
|
2535
|
+
var Wo = "PopoverAnchor", Oa = c.forwardRef(
|
|
2536
|
+
(e, t) => {
|
|
2537
|
+
const { __scopePopover: n, ...o } = e, r = ye(Wo, n), s = qe(n), { onCustomAnchorAdd: i, onCustomAnchorRemove: a } = r;
|
|
2538
|
+
return c.useEffect(() => (i(), () => a()), [i, a]), /* @__PURE__ */ l.jsx(dt, { ...s, ...o, ref: t });
|
|
2539
|
+
}
|
|
2540
|
+
);
|
|
2541
|
+
Oa.displayName = Wo;
|
|
2542
|
+
var Go = "PopoverTrigger", Uo = c.forwardRef(
|
|
2543
|
+
(e, t) => {
|
|
2544
|
+
const { __scopePopover: n, ...o } = e, r = ye(Go, n), s = qe(n), i = U(t, r.triggerRef), a = /* @__PURE__ */ l.jsx(
|
|
2545
|
+
B.button,
|
|
2546
|
+
{
|
|
2547
|
+
type: "button",
|
|
2548
|
+
"aria-haspopup": "dialog",
|
|
2549
|
+
"aria-expanded": r.open,
|
|
2550
|
+
"aria-controls": r.contentId,
|
|
2551
|
+
"data-state": Zo(r.open),
|
|
2552
|
+
...o,
|
|
2553
|
+
ref: i,
|
|
2554
|
+
onClick: M(e.onClick, r.onOpenToggle)
|
|
2555
|
+
}
|
|
2556
|
+
);
|
|
2557
|
+
return r.hasCustomAnchor ? a : /* @__PURE__ */ l.jsx(dt, { asChild: !0, ...s, children: a });
|
|
2558
|
+
}
|
|
2559
|
+
);
|
|
2560
|
+
Uo.displayName = Go;
|
|
2561
|
+
var dn = "PopoverPortal", [Na, Da] = Ho(dn, {
|
|
2562
|
+
forceMount: void 0
|
|
2563
|
+
}), zo = (e) => {
|
|
2564
|
+
const { __scopePopover: t, forceMount: n, children: o, container: r } = e, s = ye(dn, t);
|
|
2565
|
+
return /* @__PURE__ */ l.jsx(Na, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(De, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Ft, { asChild: !0, container: r, children: o }) }) });
|
|
2566
|
+
};
|
|
2567
|
+
zo.displayName = dn;
|
|
2568
|
+
var Te = "PopoverContent", Yo = c.forwardRef(
|
|
2569
|
+
(e, t) => {
|
|
2570
|
+
const n = Da(Te, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, s = ye(Te, e.__scopePopover);
|
|
2571
|
+
return /* @__PURE__ */ l.jsx(De, { present: o || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(ka, { ...r, ref: t }) : /* @__PURE__ */ l.jsx(La, { ...r, ref: t }) });
|
|
2572
|
+
}
|
|
2573
|
+
);
|
|
2574
|
+
Yo.displayName = Te;
|
|
2575
|
+
var ja = Ht("PopoverContent.RemoveScroll"), ka = c.forwardRef(
|
|
2576
|
+
(e, t) => {
|
|
2577
|
+
const n = ye(Te, e.__scopePopover), o = c.useRef(null), r = U(t, o), s = c.useRef(!1);
|
|
2578
|
+
return c.useEffect(() => {
|
|
2579
|
+
const i = o.current;
|
|
2580
|
+
if (i) return $t(i);
|
|
2581
|
+
}, []), /* @__PURE__ */ l.jsx(Vt, { as: ja, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
|
|
2582
|
+
Xo,
|
|
2583
|
+
{
|
|
2584
|
+
...e,
|
|
2585
|
+
ref: r,
|
|
2586
|
+
trapFocus: n.open,
|
|
2587
|
+
disableOutsidePointerEvents: !0,
|
|
2588
|
+
onCloseAutoFocus: M(e.onCloseAutoFocus, (i) => {
|
|
2589
|
+
i.preventDefault(), s.current || n.triggerRef.current?.focus();
|
|
2590
|
+
}),
|
|
2591
|
+
onPointerDownOutside: M(
|
|
2592
|
+
e.onPointerDownOutside,
|
|
2593
|
+
(i) => {
|
|
2594
|
+
const a = i.detail.originalEvent, u = a.button === 0 && a.ctrlKey === !0, d = a.button === 2 || u;
|
|
2595
|
+
s.current = d;
|
|
2596
|
+
},
|
|
2597
|
+
{ checkForDefaultPrevented: !1 }
|
|
2598
|
+
),
|
|
2599
|
+
onFocusOutside: M(
|
|
2600
|
+
e.onFocusOutside,
|
|
2601
|
+
(i) => i.preventDefault(),
|
|
2602
|
+
{ checkForDefaultPrevented: !1 }
|
|
2603
|
+
)
|
|
2604
|
+
}
|
|
2605
|
+
) });
|
|
2606
|
+
}
|
|
2607
|
+
), La = c.forwardRef(
|
|
2608
|
+
(e, t) => {
|
|
2609
|
+
const n = ye(Te, e.__scopePopover), o = c.useRef(!1), r = c.useRef(!1);
|
|
2610
|
+
return /* @__PURE__ */ l.jsx(
|
|
2611
|
+
Xo,
|
|
2612
|
+
{
|
|
2613
|
+
...e,
|
|
2614
|
+
ref: t,
|
|
2615
|
+
trapFocus: !1,
|
|
2616
|
+
disableOutsidePointerEvents: !1,
|
|
2617
|
+
onCloseAutoFocus: (s) => {
|
|
2618
|
+
e.onCloseAutoFocus?.(s), s.defaultPrevented || (o.current || n.triggerRef.current?.focus(), s.preventDefault()), o.current = !1, r.current = !1;
|
|
2619
|
+
},
|
|
2620
|
+
onInteractOutside: (s) => {
|
|
2621
|
+
e.onInteractOutside?.(s), s.defaultPrevented || (o.current = !0, s.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2622
|
+
const i = s.target;
|
|
2623
|
+
n.triggerRef.current?.contains(i) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && r.current && s.preventDefault();
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
);
|
|
2627
|
+
}
|
|
2628
|
+
), Xo = c.forwardRef(
|
|
2629
|
+
(e, t) => {
|
|
2630
|
+
const {
|
|
2631
|
+
__scopePopover: n,
|
|
2632
|
+
trapFocus: o,
|
|
2633
|
+
onOpenAutoFocus: r,
|
|
2634
|
+
onCloseAutoFocus: s,
|
|
2635
|
+
disableOutsidePointerEvents: i,
|
|
2636
|
+
onEscapeKeyDown: a,
|
|
2637
|
+
onPointerDownOutside: u,
|
|
2638
|
+
onFocusOutside: d,
|
|
2639
|
+
onInteractOutside: f,
|
|
2640
|
+
...p
|
|
2641
|
+
} = e, m = ye(Te, n), h = qe(n);
|
|
2642
|
+
return Bt(), /* @__PURE__ */ l.jsx(
|
|
2643
|
+
Kt,
|
|
2644
|
+
{
|
|
2645
|
+
asChild: !0,
|
|
2646
|
+
loop: !0,
|
|
2647
|
+
trapped: o,
|
|
2648
|
+
onMountAutoFocus: r,
|
|
2649
|
+
onUnmountAutoFocus: s,
|
|
2650
|
+
children: /* @__PURE__ */ l.jsx(
|
|
2651
|
+
Wt,
|
|
2652
|
+
{
|
|
2653
|
+
asChild: !0,
|
|
2654
|
+
disableOutsidePointerEvents: i,
|
|
2655
|
+
onInteractOutside: f,
|
|
2656
|
+
onEscapeKeyDown: a,
|
|
2657
|
+
onPointerDownOutside: u,
|
|
2658
|
+
onFocusOutside: d,
|
|
2659
|
+
onDismiss: () => m.onOpenChange(!1),
|
|
2660
|
+
children: /* @__PURE__ */ l.jsx(
|
|
2661
|
+
en,
|
|
2662
|
+
{
|
|
2663
|
+
"data-state": Zo(m.open),
|
|
2664
|
+
role: "dialog",
|
|
2665
|
+
id: m.contentId,
|
|
2666
|
+
...h,
|
|
2667
|
+
...p,
|
|
2668
|
+
ref: t,
|
|
2669
|
+
style: {
|
|
2670
|
+
...p.style,
|
|
2671
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
2672
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
2673
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
2674
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
2675
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
)
|
|
2679
|
+
}
|
|
2680
|
+
)
|
|
2681
|
+
}
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2684
|
+
), qo = "PopoverClose", Fa = c.forwardRef(
|
|
2685
|
+
(e, t) => {
|
|
2686
|
+
const { __scopePopover: n, ...o } = e, r = ye(qo, n);
|
|
2687
|
+
return /* @__PURE__ */ l.jsx(
|
|
2688
|
+
B.button,
|
|
2689
|
+
{
|
|
2690
|
+
type: "button",
|
|
2691
|
+
...o,
|
|
2692
|
+
ref: t,
|
|
2693
|
+
onClick: M(e.onClick, () => r.onOpenChange(!1))
|
|
2694
|
+
}
|
|
2695
|
+
);
|
|
2696
|
+
}
|
|
2697
|
+
);
|
|
2698
|
+
Fa.displayName = qo;
|
|
2699
|
+
var $a = "PopoverArrow", Ba = c.forwardRef(
|
|
2700
|
+
(e, t) => {
|
|
2701
|
+
const { __scopePopover: n, ...o } = e, r = qe(n);
|
|
2702
|
+
return /* @__PURE__ */ l.jsx(tn, { ...r, ...o, ref: t });
|
|
2703
|
+
}
|
|
2704
|
+
);
|
|
2705
|
+
Ba.displayName = $a;
|
|
2706
|
+
function Zo(e) {
|
|
2707
|
+
return e ? "open" : "closed";
|
|
2708
|
+
}
|
|
2709
|
+
var Va = Ko, Ha = Uo, Ka = zo, Wa = Yo, Ga = [" ", "Enter", "ArrowUp", "ArrowDown"], Ua = [" ", "Enter"], Pe = "Select", [ht, gt, za] = kt(Pe), [Fe] = Oe(Pe, [
|
|
2710
|
+
za,
|
|
2711
|
+
Le
|
|
2712
|
+
]), vt = Le(), [Ya, Ce] = Fe(Pe), [Xa, qa] = Fe(Pe), Jo = (e) => {
|
|
2713
|
+
const {
|
|
2714
|
+
__scopeSelect: t,
|
|
2715
|
+
children: n,
|
|
2716
|
+
open: o,
|
|
2717
|
+
defaultOpen: r,
|
|
2718
|
+
onOpenChange: s,
|
|
2719
|
+
value: i,
|
|
2720
|
+
defaultValue: a,
|
|
2721
|
+
onValueChange: u,
|
|
2722
|
+
dir: d,
|
|
2723
|
+
name: f,
|
|
2724
|
+
autoComplete: p,
|
|
2725
|
+
disabled: m,
|
|
2726
|
+
required: h,
|
|
2727
|
+
form: v
|
|
2728
|
+
} = e, g = vt(t), [x, w] = c.useState(null), [y, C] = c.useState(null), [R, P] = c.useState(!1), O = Lt(d), [E, A] = Ae({
|
|
2729
|
+
prop: o,
|
|
2730
|
+
defaultProp: r ?? !1,
|
|
2731
|
+
onChange: s,
|
|
2732
|
+
caller: Pe
|
|
2733
|
+
}), [F, N] = Ae({
|
|
2734
|
+
prop: i,
|
|
2735
|
+
defaultProp: a,
|
|
2736
|
+
onChange: u,
|
|
2737
|
+
caller: Pe
|
|
2738
|
+
}), k = c.useRef(null), L = x ? v || !!x.closest("form") : !0, [D, T] = c.useState(/* @__PURE__ */ new Set()), $ = Array.from(D).map((I) => I.props.value).join(";");
|
|
2739
|
+
return /* @__PURE__ */ l.jsx(ut, { ...g, children: /* @__PURE__ */ l.jsxs(
|
|
2740
|
+
Ya,
|
|
2741
|
+
{
|
|
2742
|
+
required: h,
|
|
2743
|
+
scope: t,
|
|
2744
|
+
trigger: x,
|
|
2745
|
+
onTriggerChange: w,
|
|
2746
|
+
valueNode: y,
|
|
2747
|
+
onValueNodeChange: C,
|
|
2748
|
+
valueNodeHasChildren: R,
|
|
2749
|
+
onValueNodeHasChildrenChange: P,
|
|
2750
|
+
contentId: me(),
|
|
2751
|
+
value: F,
|
|
2752
|
+
onValueChange: N,
|
|
2753
|
+
open: E,
|
|
2754
|
+
onOpenChange: A,
|
|
2755
|
+
dir: O,
|
|
2756
|
+
triggerPointerDownPosRef: k,
|
|
2757
|
+
disabled: m,
|
|
2758
|
+
children: [
|
|
2759
|
+
/* @__PURE__ */ l.jsx(ht.Provider, { scope: t, children: /* @__PURE__ */ l.jsx(
|
|
2760
|
+
Xa,
|
|
2761
|
+
{
|
|
2762
|
+
scope: e.__scopeSelect,
|
|
2763
|
+
onNativeOptionAdd: c.useCallback((I) => {
|
|
2764
|
+
T((j) => new Set(j).add(I));
|
|
2765
|
+
}, []),
|
|
2766
|
+
onNativeOptionRemove: c.useCallback((I) => {
|
|
2767
|
+
T((j) => {
|
|
2768
|
+
const _ = new Set(j);
|
|
2769
|
+
return _.delete(I), _;
|
|
2770
|
+
});
|
|
2771
|
+
}, []),
|
|
2772
|
+
children: n
|
|
2773
|
+
}
|
|
2774
|
+
) }),
|
|
2775
|
+
L ? /* @__PURE__ */ l.jsxs(
|
|
2776
|
+
yr,
|
|
2777
|
+
{
|
|
2778
|
+
"aria-hidden": !0,
|
|
2779
|
+
required: h,
|
|
2780
|
+
tabIndex: -1,
|
|
2781
|
+
name: f,
|
|
2782
|
+
autoComplete: p,
|
|
2783
|
+
value: F,
|
|
2784
|
+
onChange: (I) => N(I.target.value),
|
|
2785
|
+
disabled: m,
|
|
2786
|
+
form: v,
|
|
2787
|
+
children: [
|
|
2788
|
+
F === void 0 ? /* @__PURE__ */ l.jsx("option", { value: "" }) : null,
|
|
2789
|
+
Array.from(D)
|
|
2790
|
+
]
|
|
2791
|
+
},
|
|
2792
|
+
$
|
|
2793
|
+
) : null
|
|
2794
|
+
]
|
|
2795
|
+
}
|
|
2796
|
+
) });
|
|
2797
|
+
};
|
|
2798
|
+
Jo.displayName = Pe;
|
|
2799
|
+
var Qo = "SelectTrigger", er = c.forwardRef(
|
|
2800
|
+
(e, t) => {
|
|
2801
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = vt(n), i = Ce(Qo, n), a = i.disabled || o, u = U(t, i.onTriggerChange), d = gt(n), f = c.useRef("touch"), [p, m, h] = Sr((g) => {
|
|
2802
|
+
const x = d().filter((C) => !C.disabled), w = x.find((C) => C.value === i.value), y = br(x, g, w);
|
|
2803
|
+
y !== void 0 && i.onValueChange(y.value);
|
|
2804
|
+
}), v = (g) => {
|
|
2805
|
+
a || (i.onOpenChange(!0), h()), g && (i.triggerPointerDownPosRef.current = {
|
|
2806
|
+
x: Math.round(g.pageX),
|
|
2807
|
+
y: Math.round(g.pageY)
|
|
2808
|
+
});
|
|
2809
|
+
};
|
|
2810
|
+
return /* @__PURE__ */ l.jsx(dt, { asChild: !0, ...s, children: /* @__PURE__ */ l.jsx(
|
|
2811
|
+
B.button,
|
|
2812
|
+
{
|
|
2813
|
+
type: "button",
|
|
2814
|
+
role: "combobox",
|
|
2815
|
+
"aria-controls": i.contentId,
|
|
2816
|
+
"aria-expanded": i.open,
|
|
2817
|
+
"aria-required": i.required,
|
|
2818
|
+
"aria-autocomplete": "none",
|
|
2819
|
+
dir: i.dir,
|
|
2820
|
+
"data-state": i.open ? "open" : "closed",
|
|
2821
|
+
disabled: a,
|
|
2822
|
+
"data-disabled": a ? "" : void 0,
|
|
2823
|
+
"data-placeholder": Cr(i.value) ? "" : void 0,
|
|
2824
|
+
...r,
|
|
2825
|
+
ref: u,
|
|
2826
|
+
onClick: M(r.onClick, (g) => {
|
|
2827
|
+
g.currentTarget.focus(), f.current !== "mouse" && v(g);
|
|
2828
|
+
}),
|
|
2829
|
+
onPointerDown: M(r.onPointerDown, (g) => {
|
|
2830
|
+
f.current = g.pointerType;
|
|
2831
|
+
const x = g.target;
|
|
2832
|
+
x.hasPointerCapture(g.pointerId) && x.releasePointerCapture(g.pointerId), g.button === 0 && g.ctrlKey === !1 && g.pointerType === "mouse" && (v(g), g.preventDefault());
|
|
2833
|
+
}),
|
|
2834
|
+
onKeyDown: M(r.onKeyDown, (g) => {
|
|
2835
|
+
const x = p.current !== "";
|
|
2836
|
+
!(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(x && g.key === " ") && Ga.includes(g.key) && (v(), g.preventDefault());
|
|
2837
|
+
})
|
|
2838
|
+
}
|
|
2839
|
+
) });
|
|
2840
|
+
}
|
|
2841
|
+
);
|
|
2842
|
+
er.displayName = Qo;
|
|
2843
|
+
var tr = "SelectValue", nr = c.forwardRef(
|
|
2844
|
+
(e, t) => {
|
|
2845
|
+
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: i = "", ...a } = e, u = Ce(tr, n), { onValueNodeHasChildrenChange: d } = u, f = s !== void 0, p = U(t, u.onValueNodeChange);
|
|
2846
|
+
return le(() => {
|
|
2847
|
+
d(f);
|
|
2848
|
+
}, [d, f]), /* @__PURE__ */ l.jsx(
|
|
2849
|
+
B.span,
|
|
2850
|
+
{
|
|
2851
|
+
...a,
|
|
2852
|
+
ref: p,
|
|
2853
|
+
style: { pointerEvents: "none" },
|
|
2854
|
+
children: Cr(u.value) ? /* @__PURE__ */ l.jsx(l.Fragment, { children: i }) : s
|
|
2855
|
+
}
|
|
2856
|
+
);
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
2859
|
+
nr.displayName = tr;
|
|
2860
|
+
var Za = "SelectIcon", or = c.forwardRef(
|
|
2861
|
+
(e, t) => {
|
|
2862
|
+
const { __scopeSelect: n, children: o, ...r } = e;
|
|
2863
|
+
return /* @__PURE__ */ l.jsx(B.span, { "aria-hidden": !0, ...r, ref: t, children: o || "▼" });
|
|
2864
|
+
}
|
|
2865
|
+
);
|
|
2866
|
+
or.displayName = Za;
|
|
2867
|
+
var Ja = "SelectPortal", rr = (e) => /* @__PURE__ */ l.jsx(Ft, { asChild: !0, ...e });
|
|
2868
|
+
rr.displayName = Ja;
|
|
2869
|
+
var Me = "SelectContent", sr = c.forwardRef(
|
|
2870
|
+
(e, t) => {
|
|
2871
|
+
const n = Ce(Me, e.__scopeSelect), [o, r] = c.useState();
|
|
2872
|
+
if (le(() => {
|
|
2873
|
+
r(new DocumentFragment());
|
|
2874
|
+
}, []), !n.open) {
|
|
2875
|
+
const s = o;
|
|
2876
|
+
return s ? jt.createPortal(
|
|
2877
|
+
/* @__PURE__ */ l.jsx(ir, { scope: e.__scopeSelect, children: /* @__PURE__ */ l.jsx(ht.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ l.jsx("div", { children: e.children }) }) }),
|
|
2878
|
+
s
|
|
2879
|
+
) : null;
|
|
2880
|
+
}
|
|
2881
|
+
return /* @__PURE__ */ l.jsx(ar, { ...e, ref: t });
|
|
2882
|
+
}
|
|
2883
|
+
);
|
|
2884
|
+
sr.displayName = Me;
|
|
2885
|
+
var re = 10, [ir, Se] = Fe(Me), Qa = "SelectContentImpl", ec = Ht("SelectContent.RemoveScroll"), ar = c.forwardRef(
|
|
2886
|
+
(e, t) => {
|
|
2887
|
+
const {
|
|
2888
|
+
__scopeSelect: n,
|
|
2889
|
+
position: o = "item-aligned",
|
|
2890
|
+
onCloseAutoFocus: r,
|
|
2891
|
+
onEscapeKeyDown: s,
|
|
2892
|
+
onPointerDownOutside: i,
|
|
2893
|
+
//
|
|
2894
|
+
// PopperContent props
|
|
2895
|
+
side: a,
|
|
2896
|
+
sideOffset: u,
|
|
2897
|
+
align: d,
|
|
2898
|
+
alignOffset: f,
|
|
2899
|
+
arrowPadding: p,
|
|
2900
|
+
collisionBoundary: m,
|
|
2901
|
+
collisionPadding: h,
|
|
2902
|
+
sticky: v,
|
|
2903
|
+
hideWhenDetached: g,
|
|
2904
|
+
avoidCollisions: x,
|
|
2905
|
+
//
|
|
2906
|
+
...w
|
|
2907
|
+
} = e, y = Ce(Me, n), [C, R] = c.useState(null), [P, O] = c.useState(null), E = U(t, (b) => R(b)), [A, F] = c.useState(null), [N, k] = c.useState(
|
|
2908
|
+
null
|
|
2909
|
+
), L = gt(n), [D, T] = c.useState(!1), $ = c.useRef(!1);
|
|
2910
|
+
c.useEffect(() => {
|
|
2911
|
+
if (C) return $t(C);
|
|
2912
|
+
}, [C]), Bt();
|
|
2913
|
+
const I = c.useCallback(
|
|
2914
|
+
(b) => {
|
|
2915
|
+
const [V, ...X] = L().map((G) => G.ref.current), [H] = X.slice(-1), K = document.activeElement;
|
|
2916
|
+
for (const G of b)
|
|
2917
|
+
if (G === K || (G?.scrollIntoView({ block: "nearest" }), G === V && P && (P.scrollTop = 0), G === H && P && (P.scrollTop = P.scrollHeight), G?.focus(), document.activeElement !== K)) return;
|
|
2918
|
+
},
|
|
2919
|
+
[L, P]
|
|
2920
|
+
), j = c.useCallback(
|
|
2921
|
+
() => I([A, C]),
|
|
2922
|
+
[I, A, C]
|
|
2923
|
+
);
|
|
2924
|
+
c.useEffect(() => {
|
|
2925
|
+
D && j();
|
|
2926
|
+
}, [D, j]);
|
|
2927
|
+
const { onOpenChange: _, triggerPointerDownPosRef: S } = y;
|
|
2928
|
+
c.useEffect(() => {
|
|
2929
|
+
if (C) {
|
|
2930
|
+
let b = { x: 0, y: 0 };
|
|
2931
|
+
const V = (H) => {
|
|
2932
|
+
b = {
|
|
2933
|
+
x: Math.abs(Math.round(H.pageX) - (S.current?.x ?? 0)),
|
|
2934
|
+
y: Math.abs(Math.round(H.pageY) - (S.current?.y ?? 0))
|
|
2935
|
+
};
|
|
2936
|
+
}, X = (H) => {
|
|
2937
|
+
b.x <= 10 && b.y <= 10 ? H.preventDefault() : C.contains(H.target) || _(!1), document.removeEventListener("pointermove", V), S.current = null;
|
|
2938
|
+
};
|
|
2939
|
+
return S.current !== null && (document.addEventListener("pointermove", V), document.addEventListener("pointerup", X, { capture: !0, once: !0 })), () => {
|
|
2940
|
+
document.removeEventListener("pointermove", V), document.removeEventListener("pointerup", X, { capture: !0 });
|
|
2941
|
+
};
|
|
2942
|
+
}
|
|
2943
|
+
}, [C, _, S]), c.useEffect(() => {
|
|
2944
|
+
const b = () => _(!1);
|
|
2945
|
+
return window.addEventListener("blur", b), window.addEventListener("resize", b), () => {
|
|
2946
|
+
window.removeEventListener("blur", b), window.removeEventListener("resize", b);
|
|
2947
|
+
};
|
|
2948
|
+
}, [_]);
|
|
2949
|
+
const [W, Y] = Sr((b) => {
|
|
2950
|
+
const V = L().filter((K) => !K.disabled), X = V.find((K) => K.ref.current === document.activeElement), H = br(V, b, X);
|
|
2951
|
+
H && setTimeout(() => H.ref.current.focus());
|
|
2952
|
+
}), oe = c.useCallback(
|
|
2953
|
+
(b, V, X) => {
|
|
2954
|
+
const H = !$.current && !X;
|
|
2955
|
+
(y.value !== void 0 && y.value === V || H) && (F(b), H && ($.current = !0));
|
|
2956
|
+
},
|
|
2957
|
+
[y.value]
|
|
2958
|
+
), fe = c.useCallback(() => C?.focus(), [C]), ee = c.useCallback(
|
|
2959
|
+
(b, V, X) => {
|
|
2960
|
+
const H = !$.current && !X;
|
|
2961
|
+
(y.value !== void 0 && y.value === V || H) && k(b);
|
|
2962
|
+
},
|
|
2963
|
+
[y.value]
|
|
2964
|
+
), pe = o === "popper" ? At : cr, Z = pe === At ? {
|
|
2965
|
+
side: a,
|
|
2966
|
+
sideOffset: u,
|
|
2967
|
+
align: d,
|
|
2968
|
+
alignOffset: f,
|
|
2969
|
+
arrowPadding: p,
|
|
2970
|
+
collisionBoundary: m,
|
|
2971
|
+
collisionPadding: h,
|
|
2972
|
+
sticky: v,
|
|
2973
|
+
hideWhenDetached: g,
|
|
2974
|
+
avoidCollisions: x
|
|
2975
|
+
} : {};
|
|
2976
|
+
return /* @__PURE__ */ l.jsx(
|
|
2977
|
+
ir,
|
|
2978
|
+
{
|
|
2979
|
+
scope: n,
|
|
2980
|
+
content: C,
|
|
2981
|
+
viewport: P,
|
|
2982
|
+
onViewportChange: O,
|
|
2983
|
+
itemRefCallback: oe,
|
|
2984
|
+
selectedItem: A,
|
|
2985
|
+
onItemLeave: fe,
|
|
2986
|
+
itemTextRefCallback: ee,
|
|
2987
|
+
focusSelectedItem: j,
|
|
2988
|
+
selectedItemText: N,
|
|
2989
|
+
position: o,
|
|
2990
|
+
isPositioned: D,
|
|
2991
|
+
searchRef: W,
|
|
2992
|
+
children: /* @__PURE__ */ l.jsx(Vt, { as: ec, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
|
|
2993
|
+
Kt,
|
|
2994
|
+
{
|
|
2995
|
+
asChild: !0,
|
|
2996
|
+
trapped: y.open,
|
|
2997
|
+
onMountAutoFocus: (b) => {
|
|
2998
|
+
b.preventDefault();
|
|
2999
|
+
},
|
|
3000
|
+
onUnmountAutoFocus: M(r, (b) => {
|
|
3001
|
+
y.trigger?.focus({ preventScroll: !0 }), b.preventDefault();
|
|
3002
|
+
}),
|
|
3003
|
+
children: /* @__PURE__ */ l.jsx(
|
|
3004
|
+
Wt,
|
|
3005
|
+
{
|
|
3006
|
+
asChild: !0,
|
|
3007
|
+
disableOutsidePointerEvents: !0,
|
|
3008
|
+
onEscapeKeyDown: s,
|
|
3009
|
+
onPointerDownOutside: i,
|
|
3010
|
+
onFocusOutside: (b) => b.preventDefault(),
|
|
3011
|
+
onDismiss: () => y.onOpenChange(!1),
|
|
3012
|
+
children: /* @__PURE__ */ l.jsx(
|
|
3013
|
+
pe,
|
|
3014
|
+
{
|
|
3015
|
+
role: "listbox",
|
|
3016
|
+
id: y.contentId,
|
|
3017
|
+
"data-state": y.open ? "open" : "closed",
|
|
3018
|
+
dir: y.dir,
|
|
3019
|
+
onContextMenu: (b) => b.preventDefault(),
|
|
3020
|
+
...w,
|
|
3021
|
+
...Z,
|
|
3022
|
+
onPlaced: () => T(!0),
|
|
3023
|
+
ref: E,
|
|
3024
|
+
style: {
|
|
3025
|
+
// flex layout so we can place the scroll buttons properly
|
|
3026
|
+
display: "flex",
|
|
3027
|
+
flexDirection: "column",
|
|
3028
|
+
// reset the outline by default as the content MAY get focused
|
|
3029
|
+
outline: "none",
|
|
3030
|
+
...w.style
|
|
3031
|
+
},
|
|
3032
|
+
onKeyDown: M(w.onKeyDown, (b) => {
|
|
3033
|
+
const V = b.ctrlKey || b.altKey || b.metaKey;
|
|
3034
|
+
if (b.key === "Tab" && b.preventDefault(), !V && b.key.length === 1 && Y(b.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(b.key)) {
|
|
3035
|
+
let H = L().filter((K) => !K.disabled).map((K) => K.ref.current);
|
|
3036
|
+
if (["ArrowUp", "End"].includes(b.key) && (H = H.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(b.key)) {
|
|
3037
|
+
const K = b.target, G = H.indexOf(K);
|
|
3038
|
+
H = H.slice(G + 1);
|
|
3039
|
+
}
|
|
3040
|
+
setTimeout(() => I(H)), b.preventDefault();
|
|
3041
|
+
}
|
|
3042
|
+
})
|
|
3043
|
+
}
|
|
3044
|
+
)
|
|
3045
|
+
}
|
|
3046
|
+
)
|
|
3047
|
+
}
|
|
3048
|
+
) })
|
|
3049
|
+
}
|
|
3050
|
+
);
|
|
3051
|
+
}
|
|
3052
|
+
);
|
|
3053
|
+
ar.displayName = Qa;
|
|
3054
|
+
var tc = "SelectItemAlignedPosition", cr = c.forwardRef((e, t) => {
|
|
3055
|
+
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = Ce(Me, n), i = Se(Me, n), [a, u] = c.useState(null), [d, f] = c.useState(null), p = U(t, (E) => f(E)), m = gt(n), h = c.useRef(!1), v = c.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: w, focusSelectedItem: y } = i, C = c.useCallback(() => {
|
|
3056
|
+
if (s.trigger && s.valueNode && a && d && g && x && w) {
|
|
3057
|
+
const E = s.trigger.getBoundingClientRect(), A = d.getBoundingClientRect(), F = s.valueNode.getBoundingClientRect(), N = w.getBoundingClientRect();
|
|
3058
|
+
if (s.dir !== "rtl") {
|
|
3059
|
+
const K = N.left - A.left, G = F.left - K, te = E.left - G, be = E.width + te, xt = Math.max(be, A.width), wt = window.innerWidth - re, yt = pn(G, [
|
|
3060
|
+
re,
|
|
3061
|
+
// Prevents the content from going off the starting edge of the
|
|
3062
|
+
// viewport. It may still go off the ending edge, but this can be
|
|
3063
|
+
// controlled by the user since they may want to manage overflow in a
|
|
3064
|
+
// specific way.
|
|
3065
|
+
// https://github.com/radix-ui/primitives/issues/2049
|
|
3066
|
+
Math.max(re, wt - xt)
|
|
3067
|
+
]);
|
|
3068
|
+
a.style.minWidth = be + "px", a.style.left = yt + "px";
|
|
3069
|
+
} else {
|
|
3070
|
+
const K = A.right - N.right, G = window.innerWidth - F.right - K, te = window.innerWidth - E.right - G, be = E.width + te, xt = Math.max(be, A.width), wt = window.innerWidth - re, yt = pn(G, [
|
|
3071
|
+
re,
|
|
3072
|
+
Math.max(re, wt - xt)
|
|
3073
|
+
]);
|
|
3074
|
+
a.style.minWidth = be + "px", a.style.right = yt + "px";
|
|
3075
|
+
}
|
|
3076
|
+
const k = m(), L = window.innerHeight - re * 2, D = g.scrollHeight, T = window.getComputedStyle(d), $ = parseInt(T.borderTopWidth, 10), I = parseInt(T.paddingTop, 10), j = parseInt(T.borderBottomWidth, 10), _ = parseInt(T.paddingBottom, 10), S = $ + I + D + _ + j, W = Math.min(x.offsetHeight * 5, S), Y = window.getComputedStyle(g), oe = parseInt(Y.paddingTop, 10), fe = parseInt(Y.paddingBottom, 10), ee = E.top + E.height / 2 - re, pe = L - ee, Z = x.offsetHeight / 2, b = x.offsetTop + Z, V = $ + I + b, X = S - V;
|
|
3077
|
+
if (V <= ee) {
|
|
3078
|
+
const K = k.length > 0 && x === k[k.length - 1].ref.current;
|
|
3079
|
+
a.style.bottom = "0px";
|
|
3080
|
+
const G = d.clientHeight - g.offsetTop - g.offsetHeight, te = Math.max(
|
|
3081
|
+
pe,
|
|
3082
|
+
Z + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
3083
|
+
(K ? fe : 0) + G + j
|
|
3084
|
+
), be = V + te;
|
|
3085
|
+
a.style.height = be + "px";
|
|
3086
|
+
} else {
|
|
3087
|
+
const K = k.length > 0 && x === k[0].ref.current;
|
|
3088
|
+
a.style.top = "0px";
|
|
3089
|
+
const te = Math.max(
|
|
3090
|
+
ee,
|
|
3091
|
+
$ + g.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
3092
|
+
(K ? oe : 0) + Z
|
|
3093
|
+
) + X;
|
|
3094
|
+
a.style.height = te + "px", g.scrollTop = V - ee + g.offsetTop;
|
|
3095
|
+
}
|
|
3096
|
+
a.style.margin = `${re}px 0`, a.style.minHeight = W + "px", a.style.maxHeight = L + "px", o?.(), requestAnimationFrame(() => h.current = !0);
|
|
3097
|
+
}
|
|
3098
|
+
}, [
|
|
3099
|
+
m,
|
|
3100
|
+
s.trigger,
|
|
3101
|
+
s.valueNode,
|
|
3102
|
+
a,
|
|
3103
|
+
d,
|
|
3104
|
+
g,
|
|
3105
|
+
x,
|
|
3106
|
+
w,
|
|
3107
|
+
s.dir,
|
|
3108
|
+
o
|
|
3109
|
+
]);
|
|
3110
|
+
le(() => C(), [C]);
|
|
3111
|
+
const [R, P] = c.useState();
|
|
3112
|
+
le(() => {
|
|
3113
|
+
d && P(window.getComputedStyle(d).zIndex);
|
|
3114
|
+
}, [d]);
|
|
3115
|
+
const O = c.useCallback(
|
|
3116
|
+
(E) => {
|
|
3117
|
+
E && v.current === !0 && (C(), y?.(), v.current = !1);
|
|
3118
|
+
},
|
|
3119
|
+
[C, y]
|
|
3120
|
+
);
|
|
3121
|
+
return /* @__PURE__ */ l.jsx(
|
|
3122
|
+
oc,
|
|
3123
|
+
{
|
|
3124
|
+
scope: n,
|
|
3125
|
+
contentWrapper: a,
|
|
3126
|
+
shouldExpandOnScrollRef: h,
|
|
3127
|
+
onScrollButtonChange: O,
|
|
3128
|
+
children: /* @__PURE__ */ l.jsx(
|
|
3129
|
+
"div",
|
|
3130
|
+
{
|
|
3131
|
+
ref: u,
|
|
3132
|
+
style: {
|
|
3133
|
+
display: "flex",
|
|
3134
|
+
flexDirection: "column",
|
|
3135
|
+
position: "fixed",
|
|
3136
|
+
zIndex: R
|
|
3137
|
+
},
|
|
3138
|
+
children: /* @__PURE__ */ l.jsx(
|
|
3139
|
+
B.div,
|
|
3140
|
+
{
|
|
3141
|
+
...r,
|
|
3142
|
+
ref: p,
|
|
3143
|
+
style: {
|
|
3144
|
+
// When we get the height of the content, it includes borders. If we were to set
|
|
3145
|
+
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
3146
|
+
boxSizing: "border-box",
|
|
3147
|
+
// We need to ensure the content doesn't get taller than the wrapper
|
|
3148
|
+
maxHeight: "100%",
|
|
3149
|
+
...r.style
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
)
|
|
3153
|
+
}
|
|
3154
|
+
)
|
|
3155
|
+
}
|
|
3156
|
+
);
|
|
3157
|
+
});
|
|
3158
|
+
cr.displayName = tc;
|
|
3159
|
+
var nc = "SelectPopperPosition", At = c.forwardRef((e, t) => {
|
|
3160
|
+
const {
|
|
3161
|
+
__scopeSelect: n,
|
|
3162
|
+
align: o = "start",
|
|
3163
|
+
collisionPadding: r = re,
|
|
3164
|
+
...s
|
|
3165
|
+
} = e, i = vt(n);
|
|
3166
|
+
return /* @__PURE__ */ l.jsx(
|
|
3167
|
+
en,
|
|
3168
|
+
{
|
|
3169
|
+
...i,
|
|
3170
|
+
...s,
|
|
3171
|
+
ref: t,
|
|
3172
|
+
align: o,
|
|
3173
|
+
collisionPadding: r,
|
|
3174
|
+
style: {
|
|
3175
|
+
// Ensure border-box for floating-ui calculations
|
|
3176
|
+
boxSizing: "border-box",
|
|
3177
|
+
...s.style,
|
|
3178
|
+
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3179
|
+
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
3180
|
+
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
3181
|
+
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
3182
|
+
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
);
|
|
3186
|
+
});
|
|
3187
|
+
At.displayName = nc;
|
|
3188
|
+
var [oc, fn] = Fe(Me, {}), It = "SelectViewport", lr = c.forwardRef(
|
|
3189
|
+
(e, t) => {
|
|
3190
|
+
const { __scopeSelect: n, nonce: o, ...r } = e, s = Se(It, n), i = fn(It, n), a = U(t, s.onViewportChange), u = c.useRef(0);
|
|
3191
|
+
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
3192
|
+
/* @__PURE__ */ l.jsx(
|
|
3193
|
+
"style",
|
|
3194
|
+
{
|
|
3195
|
+
dangerouslySetInnerHTML: {
|
|
3196
|
+
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
3197
|
+
},
|
|
3198
|
+
nonce: o
|
|
3199
|
+
}
|
|
3200
|
+
),
|
|
3201
|
+
/* @__PURE__ */ l.jsx(ht.Slot, { scope: n, children: /* @__PURE__ */ l.jsx(
|
|
3202
|
+
B.div,
|
|
3203
|
+
{
|
|
3204
|
+
"data-radix-select-viewport": "",
|
|
3205
|
+
role: "presentation",
|
|
3206
|
+
...r,
|
|
3207
|
+
ref: a,
|
|
3208
|
+
style: {
|
|
3209
|
+
// we use position: 'relative' here on the `viewport` so that when we call
|
|
3210
|
+
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
3211
|
+
// (independent of the scrollUpButton).
|
|
3212
|
+
position: "relative",
|
|
3213
|
+
flex: 1,
|
|
3214
|
+
// Viewport should only be scrollable in the vertical direction.
|
|
3215
|
+
// This won't work in vertical writing modes, so we'll need to
|
|
3216
|
+
// revisit this if/when that is supported
|
|
3217
|
+
// https://developer.chrome.com/blog/vertical-form-controls
|
|
3218
|
+
overflow: "hidden auto",
|
|
3219
|
+
...r.style
|
|
3220
|
+
},
|
|
3221
|
+
onScroll: M(r.onScroll, (d) => {
|
|
3222
|
+
const f = d.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: m } = i;
|
|
3223
|
+
if (m?.current && p) {
|
|
3224
|
+
const h = Math.abs(u.current - f.scrollTop);
|
|
3225
|
+
if (h > 0) {
|
|
3226
|
+
const v = window.innerHeight - re * 2, g = parseFloat(p.style.minHeight), x = parseFloat(p.style.height), w = Math.max(g, x);
|
|
3227
|
+
if (w < v) {
|
|
3228
|
+
const y = w + h, C = Math.min(v, y), R = y - C;
|
|
3229
|
+
p.style.height = C + "px", p.style.bottom === "0px" && (f.scrollTop = R > 0 ? R : 0, p.style.justifyContent = "flex-end");
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3233
|
+
u.current = f.scrollTop;
|
|
3234
|
+
})
|
|
3235
|
+
}
|
|
3236
|
+
) })
|
|
3237
|
+
] });
|
|
3238
|
+
}
|
|
3239
|
+
);
|
|
3240
|
+
lr.displayName = It;
|
|
3241
|
+
var ur = "SelectGroup", [rc, sc] = Fe(ur), ic = c.forwardRef(
|
|
3242
|
+
(e, t) => {
|
|
3243
|
+
const { __scopeSelect: n, ...o } = e, r = me();
|
|
3244
|
+
return /* @__PURE__ */ l.jsx(rc, { scope: n, id: r, children: /* @__PURE__ */ l.jsx(B.div, { role: "group", "aria-labelledby": r, ...o, ref: t }) });
|
|
3245
|
+
}
|
|
3246
|
+
);
|
|
3247
|
+
ic.displayName = ur;
|
|
3248
|
+
var dr = "SelectLabel", ac = c.forwardRef(
|
|
3249
|
+
(e, t) => {
|
|
3250
|
+
const { __scopeSelect: n, ...o } = e, r = sc(dr, n);
|
|
3251
|
+
return /* @__PURE__ */ l.jsx(B.div, { id: r.id, ...o, ref: t });
|
|
3252
|
+
}
|
|
3253
|
+
);
|
|
3254
|
+
ac.displayName = dr;
|
|
3255
|
+
var st = "SelectItem", [cc, fr] = Fe(st), pr = c.forwardRef(
|
|
3256
|
+
(e, t) => {
|
|
3257
|
+
const {
|
|
3258
|
+
__scopeSelect: n,
|
|
3259
|
+
value: o,
|
|
3260
|
+
disabled: r = !1,
|
|
3261
|
+
textValue: s,
|
|
3262
|
+
...i
|
|
3263
|
+
} = e, a = Ce(st, n), u = Se(st, n), d = a.value === o, [f, p] = c.useState(s ?? ""), [m, h] = c.useState(!1), v = U(
|
|
3264
|
+
t,
|
|
3265
|
+
(y) => u.itemRefCallback?.(y, o, r)
|
|
3266
|
+
), g = me(), x = c.useRef("touch"), w = () => {
|
|
3267
|
+
r || (a.onValueChange(o), a.onOpenChange(!1));
|
|
3268
|
+
};
|
|
3269
|
+
if (o === "")
|
|
3270
|
+
throw new Error(
|
|
3271
|
+
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
3272
|
+
);
|
|
3273
|
+
return /* @__PURE__ */ l.jsx(
|
|
3274
|
+
cc,
|
|
3275
|
+
{
|
|
3276
|
+
scope: n,
|
|
3277
|
+
value: o,
|
|
3278
|
+
disabled: r,
|
|
3279
|
+
textId: g,
|
|
3280
|
+
isSelected: d,
|
|
3281
|
+
onItemTextChange: c.useCallback((y) => {
|
|
3282
|
+
p((C) => C || (y?.textContent ?? "").trim());
|
|
3283
|
+
}, []),
|
|
3284
|
+
children: /* @__PURE__ */ l.jsx(
|
|
3285
|
+
ht.ItemSlot,
|
|
3286
|
+
{
|
|
3287
|
+
scope: n,
|
|
3288
|
+
value: o,
|
|
3289
|
+
disabled: r,
|
|
3290
|
+
textValue: f,
|
|
3291
|
+
children: /* @__PURE__ */ l.jsx(
|
|
3292
|
+
B.div,
|
|
3293
|
+
{
|
|
3294
|
+
role: "option",
|
|
3295
|
+
"aria-labelledby": g,
|
|
3296
|
+
"data-highlighted": m ? "" : void 0,
|
|
3297
|
+
"aria-selected": d && m,
|
|
3298
|
+
"data-state": d ? "checked" : "unchecked",
|
|
3299
|
+
"aria-disabled": r || void 0,
|
|
3300
|
+
"data-disabled": r ? "" : void 0,
|
|
3301
|
+
tabIndex: r ? void 0 : -1,
|
|
3302
|
+
...i,
|
|
3303
|
+
ref: v,
|
|
3304
|
+
onFocus: M(i.onFocus, () => h(!0)),
|
|
3305
|
+
onBlur: M(i.onBlur, () => h(!1)),
|
|
3306
|
+
onClick: M(i.onClick, () => {
|
|
3307
|
+
x.current !== "mouse" && w();
|
|
3308
|
+
}),
|
|
3309
|
+
onPointerUp: M(i.onPointerUp, () => {
|
|
3310
|
+
x.current === "mouse" && w();
|
|
3311
|
+
}),
|
|
3312
|
+
onPointerDown: M(i.onPointerDown, (y) => {
|
|
3313
|
+
x.current = y.pointerType;
|
|
3314
|
+
}),
|
|
3315
|
+
onPointerMove: M(i.onPointerMove, (y) => {
|
|
3316
|
+
x.current = y.pointerType, r ? u.onItemLeave?.() : x.current === "mouse" && y.currentTarget.focus({ preventScroll: !0 });
|
|
3317
|
+
}),
|
|
3318
|
+
onPointerLeave: M(i.onPointerLeave, (y) => {
|
|
3319
|
+
y.currentTarget === document.activeElement && u.onItemLeave?.();
|
|
3320
|
+
}),
|
|
3321
|
+
onKeyDown: M(i.onKeyDown, (y) => {
|
|
3322
|
+
u.searchRef?.current !== "" && y.key === " " || (Ua.includes(y.key) && w(), y.key === " " && y.preventDefault());
|
|
3323
|
+
})
|
|
3324
|
+
}
|
|
3325
|
+
)
|
|
3326
|
+
}
|
|
3327
|
+
)
|
|
3328
|
+
}
|
|
3329
|
+
);
|
|
3330
|
+
}
|
|
3331
|
+
);
|
|
3332
|
+
pr.displayName = st;
|
|
3333
|
+
var Be = "SelectItemText", mr = c.forwardRef(
|
|
3334
|
+
(e, t) => {
|
|
3335
|
+
const { __scopeSelect: n, className: o, style: r, ...s } = e, i = Ce(Be, n), a = Se(Be, n), u = fr(Be, n), d = qa(Be, n), [f, p] = c.useState(null), m = U(
|
|
3336
|
+
t,
|
|
3337
|
+
(w) => p(w),
|
|
3338
|
+
u.onItemTextChange,
|
|
3339
|
+
(w) => a.itemTextRefCallback?.(w, u.value, u.disabled)
|
|
3340
|
+
), h = f?.textContent, v = c.useMemo(
|
|
3341
|
+
() => /* @__PURE__ */ l.jsx("option", { value: u.value, disabled: u.disabled, children: h }, u.value),
|
|
3342
|
+
[u.disabled, u.value, h]
|
|
3343
|
+
), { onNativeOptionAdd: g, onNativeOptionRemove: x } = d;
|
|
3344
|
+
return le(() => (g(v), () => x(v)), [g, x, v]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
3345
|
+
/* @__PURE__ */ l.jsx(B.span, { id: u.textId, ...s, ref: m }),
|
|
3346
|
+
u.isSelected && i.valueNode && !i.valueNodeHasChildren ? jt.createPortal(s.children, i.valueNode) : null
|
|
3347
|
+
] });
|
|
3348
|
+
}
|
|
3349
|
+
);
|
|
3350
|
+
mr.displayName = Be;
|
|
3351
|
+
var hr = "SelectItemIndicator", gr = c.forwardRef(
|
|
3352
|
+
(e, t) => {
|
|
3353
|
+
const { __scopeSelect: n, ...o } = e;
|
|
3354
|
+
return fr(hr, n).isSelected ? /* @__PURE__ */ l.jsx(B.span, { "aria-hidden": !0, ...o, ref: t }) : null;
|
|
3355
|
+
}
|
|
3356
|
+
);
|
|
3357
|
+
gr.displayName = hr;
|
|
3358
|
+
var Tt = "SelectScrollUpButton", vr = c.forwardRef((e, t) => {
|
|
3359
|
+
const n = Se(Tt, e.__scopeSelect), o = fn(Tt, e.__scopeSelect), [r, s] = c.useState(!1), i = U(t, o.onScrollButtonChange);
|
|
3360
|
+
return le(() => {
|
|
3361
|
+
if (n.viewport && n.isPositioned) {
|
|
3362
|
+
let a = function() {
|
|
3363
|
+
const d = u.scrollTop > 0;
|
|
3364
|
+
s(d);
|
|
3365
|
+
};
|
|
3366
|
+
const u = n.viewport;
|
|
3367
|
+
return a(), u.addEventListener("scroll", a), () => u.removeEventListener("scroll", a);
|
|
3368
|
+
}
|
|
3369
|
+
}, [n.viewport, n.isPositioned]), r ? /* @__PURE__ */ l.jsx(
|
|
3370
|
+
wr,
|
|
3371
|
+
{
|
|
3372
|
+
...e,
|
|
3373
|
+
ref: i,
|
|
3374
|
+
onAutoScroll: () => {
|
|
3375
|
+
const { viewport: a, selectedItem: u } = n;
|
|
3376
|
+
a && u && (a.scrollTop = a.scrollTop - u.offsetHeight);
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
) : null;
|
|
3380
|
+
});
|
|
3381
|
+
vr.displayName = Tt;
|
|
3382
|
+
var Ot = "SelectScrollDownButton", xr = c.forwardRef((e, t) => {
|
|
3383
|
+
const n = Se(Ot, e.__scopeSelect), o = fn(Ot, e.__scopeSelect), [r, s] = c.useState(!1), i = U(t, o.onScrollButtonChange);
|
|
3384
|
+
return le(() => {
|
|
3385
|
+
if (n.viewport && n.isPositioned) {
|
|
3386
|
+
let a = function() {
|
|
3387
|
+
const d = u.scrollHeight - u.clientHeight, f = Math.ceil(u.scrollTop) < d;
|
|
3388
|
+
s(f);
|
|
3389
|
+
};
|
|
3390
|
+
const u = n.viewport;
|
|
3391
|
+
return a(), u.addEventListener("scroll", a), () => u.removeEventListener("scroll", a);
|
|
3392
|
+
}
|
|
3393
|
+
}, [n.viewport, n.isPositioned]), r ? /* @__PURE__ */ l.jsx(
|
|
3394
|
+
wr,
|
|
3395
|
+
{
|
|
3396
|
+
...e,
|
|
3397
|
+
ref: i,
|
|
3398
|
+
onAutoScroll: () => {
|
|
3399
|
+
const { viewport: a, selectedItem: u } = n;
|
|
3400
|
+
a && u && (a.scrollTop = a.scrollTop + u.offsetHeight);
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
) : null;
|
|
3404
|
+
});
|
|
3405
|
+
xr.displayName = Ot;
|
|
3406
|
+
var wr = c.forwardRef((e, t) => {
|
|
3407
|
+
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, s = Se("SelectScrollButton", n), i = c.useRef(null), a = gt(n), u = c.useCallback(() => {
|
|
3408
|
+
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
3409
|
+
}, []);
|
|
3410
|
+
return c.useEffect(() => () => u(), [u]), le(() => {
|
|
3411
|
+
a().find((f) => f.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
3412
|
+
}, [a]), /* @__PURE__ */ l.jsx(
|
|
3413
|
+
B.div,
|
|
3414
|
+
{
|
|
3415
|
+
"aria-hidden": !0,
|
|
3416
|
+
...r,
|
|
3417
|
+
ref: t,
|
|
3418
|
+
style: { flexShrink: 0, ...r.style },
|
|
3419
|
+
onPointerDown: M(r.onPointerDown, () => {
|
|
3420
|
+
i.current === null && (i.current = window.setInterval(o, 50));
|
|
3421
|
+
}),
|
|
3422
|
+
onPointerMove: M(r.onPointerMove, () => {
|
|
3423
|
+
s.onItemLeave?.(), i.current === null && (i.current = window.setInterval(o, 50));
|
|
3424
|
+
}),
|
|
3425
|
+
onPointerLeave: M(r.onPointerLeave, () => {
|
|
3426
|
+
u();
|
|
3427
|
+
})
|
|
3428
|
+
}
|
|
3429
|
+
);
|
|
3430
|
+
}), lc = "SelectSeparator", uc = c.forwardRef(
|
|
3431
|
+
(e, t) => {
|
|
3432
|
+
const { __scopeSelect: n, ...o } = e;
|
|
3433
|
+
return /* @__PURE__ */ l.jsx(B.div, { "aria-hidden": !0, ...o, ref: t });
|
|
3434
|
+
}
|
|
3435
|
+
);
|
|
3436
|
+
uc.displayName = lc;
|
|
3437
|
+
var Nt = "SelectArrow", dc = c.forwardRef(
|
|
3438
|
+
(e, t) => {
|
|
3439
|
+
const { __scopeSelect: n, ...o } = e, r = vt(n), s = Ce(Nt, n), i = Se(Nt, n);
|
|
3440
|
+
return s.open && i.position === "popper" ? /* @__PURE__ */ l.jsx(tn, { ...r, ...o, ref: t }) : null;
|
|
3441
|
+
}
|
|
3442
|
+
);
|
|
3443
|
+
dc.displayName = Nt;
|
|
3444
|
+
var fc = "SelectBubbleInput", yr = c.forwardRef(
|
|
3445
|
+
({ __scopeSelect: e, value: t, ...n }, o) => {
|
|
3446
|
+
const r = c.useRef(null), s = U(o, r), i = Mr(t);
|
|
3447
|
+
return c.useEffect(() => {
|
|
3448
|
+
const a = r.current;
|
|
3449
|
+
if (!a) return;
|
|
3450
|
+
const u = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(
|
|
3451
|
+
u,
|
|
3452
|
+
"value"
|
|
3453
|
+
).set;
|
|
3454
|
+
if (i !== t && f) {
|
|
3455
|
+
const p = new Event("change", { bubbles: !0 });
|
|
3456
|
+
f.call(a, t), a.dispatchEvent(p);
|
|
3457
|
+
}
|
|
3458
|
+
}, [i, t]), /* @__PURE__ */ l.jsx(
|
|
3459
|
+
B.select,
|
|
3460
|
+
{
|
|
3461
|
+
...n,
|
|
3462
|
+
style: { ...An, ...n.style },
|
|
3463
|
+
ref: s,
|
|
3464
|
+
defaultValue: t
|
|
3465
|
+
}
|
|
3466
|
+
);
|
|
3467
|
+
}
|
|
3468
|
+
);
|
|
3469
|
+
yr.displayName = fc;
|
|
3470
|
+
function Cr(e) {
|
|
3471
|
+
return e === "" || e === void 0;
|
|
3472
|
+
}
|
|
3473
|
+
function Sr(e) {
|
|
3474
|
+
const t = Ne(e), n = c.useRef(""), o = c.useRef(0), r = c.useCallback(
|
|
3475
|
+
(i) => {
|
|
3476
|
+
const a = n.current + i;
|
|
3477
|
+
t(a), (function u(d) {
|
|
3478
|
+
n.current = d, window.clearTimeout(o.current), d !== "" && (o.current = window.setTimeout(() => u(""), 1e3));
|
|
3479
|
+
})(a);
|
|
3480
|
+
},
|
|
3481
|
+
[t]
|
|
3482
|
+
), s = c.useCallback(() => {
|
|
3483
|
+
n.current = "", window.clearTimeout(o.current);
|
|
3484
|
+
}, []);
|
|
3485
|
+
return c.useEffect(() => () => window.clearTimeout(o.current), []), [n, r, s];
|
|
3486
|
+
}
|
|
3487
|
+
function br(e, t, n) {
|
|
3488
|
+
const r = t.length > 1 && Array.from(t).every((d) => d === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
3489
|
+
let i = pc(e, Math.max(s, 0));
|
|
3490
|
+
r.length === 1 && (i = i.filter((d) => d !== n));
|
|
3491
|
+
const u = i.find(
|
|
3492
|
+
(d) => d.textValue.toLowerCase().startsWith(r.toLowerCase())
|
|
3493
|
+
);
|
|
3494
|
+
return u !== n ? u : void 0;
|
|
3495
|
+
}
|
|
3496
|
+
function pc(e, t) {
|
|
3497
|
+
return e.map((n, o) => e[(t + o) % e.length]);
|
|
3498
|
+
}
|
|
3499
|
+
var mc = Jo, hc = er, gc = nr, vc = or, xc = rr, wc = sr, yc = lr, Cc = pr, Sc = mr, bc = gr, Rc = vr, Pc = xr;
|
|
3500
|
+
function Oc({
|
|
3501
|
+
...e
|
|
3502
|
+
}) {
|
|
3503
|
+
return /* @__PURE__ */ l.jsx(Va, { "data-slot": "popover", ...e });
|
|
3504
|
+
}
|
|
3505
|
+
function Nc({
|
|
3506
|
+
...e
|
|
3507
|
+
}) {
|
|
3508
|
+
return /* @__PURE__ */ l.jsx(Ha, { "data-slot": "popover-trigger", ...e });
|
|
3509
|
+
}
|
|
3510
|
+
function Dc({
|
|
3511
|
+
className: e,
|
|
3512
|
+
align: t = "center",
|
|
3513
|
+
sideOffset: n = 4,
|
|
3514
|
+
...o
|
|
3515
|
+
}) {
|
|
3516
|
+
const r = Gt();
|
|
3517
|
+
return /* @__PURE__ */ l.jsx(Ka, { container: r, children: /* @__PURE__ */ l.jsx(
|
|
3518
|
+
Wa,
|
|
3519
|
+
{
|
|
3520
|
+
"data-slot": "popover-content",
|
|
3521
|
+
align: t,
|
|
3522
|
+
sideOffset: n,
|
|
3523
|
+
className: q(
|
|
3524
|
+
"cn-popover-content z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden",
|
|
3525
|
+
e
|
|
3526
|
+
),
|
|
3527
|
+
...o
|
|
3528
|
+
}
|
|
3529
|
+
) });
|
|
3530
|
+
}
|
|
3531
|
+
function jc({
|
|
3532
|
+
...e
|
|
3533
|
+
}) {
|
|
3534
|
+
return /* @__PURE__ */ l.jsx(Ca, { "data-slot": "dropdown-menu", ...e });
|
|
3535
|
+
}
|
|
3536
|
+
function kc({
|
|
3537
|
+
...e
|
|
3538
|
+
}) {
|
|
3539
|
+
return /* @__PURE__ */ l.jsx(
|
|
3540
|
+
Sa,
|
|
3541
|
+
{
|
|
3542
|
+
"data-slot": "dropdown-menu-trigger",
|
|
3543
|
+
...e
|
|
3544
|
+
}
|
|
3545
|
+
);
|
|
3546
|
+
}
|
|
3547
|
+
function Lc({
|
|
3548
|
+
className: e,
|
|
3549
|
+
sideOffset: t = 4,
|
|
3550
|
+
...n
|
|
3551
|
+
}) {
|
|
3552
|
+
const o = Gt();
|
|
3553
|
+
return /* @__PURE__ */ l.jsx(ba, { container: o, children: /* @__PURE__ */ l.jsx(
|
|
3554
|
+
Ra,
|
|
3555
|
+
{
|
|
3556
|
+
"data-slot": "dropdown-menu-content",
|
|
3557
|
+
sideOffset: t,
|
|
3558
|
+
className: q(
|
|
3559
|
+
"bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
3560
|
+
e
|
|
3561
|
+
),
|
|
3562
|
+
...n
|
|
3563
|
+
}
|
|
3564
|
+
) });
|
|
3565
|
+
}
|
|
3566
|
+
function Fc({
|
|
3567
|
+
className: e,
|
|
3568
|
+
inset: t,
|
|
3569
|
+
variant: n = "default",
|
|
3570
|
+
...o
|
|
3571
|
+
}) {
|
|
3572
|
+
return /* @__PURE__ */ l.jsx(
|
|
3573
|
+
Ma,
|
|
3574
|
+
{
|
|
3575
|
+
"data-slot": "dropdown-menu-item",
|
|
3576
|
+
"data-inset": t,
|
|
3577
|
+
"data-variant": n,
|
|
3578
|
+
className: q(
|
|
3579
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3580
|
+
e
|
|
3581
|
+
),
|
|
3582
|
+
...o
|
|
3583
|
+
}
|
|
3584
|
+
);
|
|
3585
|
+
}
|
|
3586
|
+
function $c({
|
|
3587
|
+
className: e,
|
|
3588
|
+
inset: t,
|
|
3589
|
+
...n
|
|
3590
|
+
}) {
|
|
3591
|
+
return /* @__PURE__ */ l.jsx(
|
|
3592
|
+
Pa,
|
|
3593
|
+
{
|
|
3594
|
+
"data-slot": "dropdown-menu-label",
|
|
3595
|
+
"data-inset": t,
|
|
3596
|
+
className: q(
|
|
3597
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
3598
|
+
e
|
|
3599
|
+
),
|
|
3600
|
+
...n
|
|
3601
|
+
}
|
|
3602
|
+
);
|
|
3603
|
+
}
|
|
3604
|
+
function Bc({
|
|
3605
|
+
className: e,
|
|
3606
|
+
...t
|
|
3607
|
+
}) {
|
|
3608
|
+
return /* @__PURE__ */ l.jsx(
|
|
3609
|
+
_a,
|
|
3610
|
+
{
|
|
3611
|
+
"data-slot": "dropdown-menu-separator",
|
|
3612
|
+
className: q("bg-border -mx-1 my-1 h-px", e),
|
|
3613
|
+
...t
|
|
3614
|
+
}
|
|
3615
|
+
);
|
|
3616
|
+
}
|
|
3617
|
+
function Vc({
|
|
3618
|
+
...e
|
|
3619
|
+
}) {
|
|
3620
|
+
return /* @__PURE__ */ l.jsx(Ea, { "data-slot": "dropdown-menu-sub", ...e });
|
|
3621
|
+
}
|
|
3622
|
+
function Hc({
|
|
3623
|
+
className: e,
|
|
3624
|
+
inset: t,
|
|
3625
|
+
children: n,
|
|
3626
|
+
...o
|
|
3627
|
+
}) {
|
|
3628
|
+
return /* @__PURE__ */ l.jsxs(
|
|
3629
|
+
Aa,
|
|
3630
|
+
{
|
|
3631
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
3632
|
+
"data-inset": t,
|
|
3633
|
+
className: q(
|
|
3634
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3635
|
+
e
|
|
3636
|
+
),
|
|
3637
|
+
...o,
|
|
3638
|
+
children: [
|
|
3639
|
+
n,
|
|
3640
|
+
/* @__PURE__ */ l.jsx(_r, { className: "ml-auto size-4" })
|
|
3641
|
+
]
|
|
3642
|
+
}
|
|
3643
|
+
);
|
|
3644
|
+
}
|
|
3645
|
+
function Kc({
|
|
3646
|
+
className: e,
|
|
3647
|
+
...t
|
|
3648
|
+
}) {
|
|
3649
|
+
return /* @__PURE__ */ l.jsx(
|
|
3650
|
+
Ia,
|
|
3651
|
+
{
|
|
3652
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
3653
|
+
className: q(
|
|
3654
|
+
"bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
3655
|
+
e
|
|
3656
|
+
),
|
|
3657
|
+
...t
|
|
3658
|
+
}
|
|
3659
|
+
);
|
|
3660
|
+
}
|
|
3661
|
+
function Wc({
|
|
3662
|
+
...e
|
|
3663
|
+
}) {
|
|
3664
|
+
return /* @__PURE__ */ l.jsx(mc, { "data-slot": "select", ...e });
|
|
3665
|
+
}
|
|
3666
|
+
function Gc({
|
|
3667
|
+
...e
|
|
3668
|
+
}) {
|
|
3669
|
+
return /* @__PURE__ */ l.jsx(gc, { "data-slot": "select-value", ...e });
|
|
3670
|
+
}
|
|
3671
|
+
function Uc({
|
|
3672
|
+
className: e,
|
|
3673
|
+
size: t = "default",
|
|
3674
|
+
children: n,
|
|
3675
|
+
...o
|
|
3676
|
+
}) {
|
|
3677
|
+
return /* @__PURE__ */ l.jsxs(
|
|
3678
|
+
hc,
|
|
3679
|
+
{
|
|
3680
|
+
"data-slot": "select-trigger",
|
|
3681
|
+
"data-size": t,
|
|
3682
|
+
className: q(
|
|
3683
|
+
"border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3684
|
+
e
|
|
3685
|
+
),
|
|
3686
|
+
...o,
|
|
3687
|
+
children: [
|
|
3688
|
+
n,
|
|
3689
|
+
/* @__PURE__ */ l.jsx(vc, { asChild: !0, children: /* @__PURE__ */ l.jsx(En, { className: "size-4 opacity-50" }) })
|
|
3690
|
+
]
|
|
3691
|
+
}
|
|
3692
|
+
);
|
|
3693
|
+
}
|
|
3694
|
+
function zc({
|
|
3695
|
+
className: e,
|
|
3696
|
+
children: t,
|
|
3697
|
+
position: n = "item-aligned",
|
|
3698
|
+
align: o = "center",
|
|
3699
|
+
...r
|
|
3700
|
+
}) {
|
|
3701
|
+
const s = Gt();
|
|
3702
|
+
return /* @__PURE__ */ l.jsx(xc, { container: s, children: /* @__PURE__ */ l.jsxs(
|
|
3703
|
+
wc,
|
|
3704
|
+
{
|
|
3705
|
+
"data-slot": "select-content",
|
|
3706
|
+
className: q(
|
|
3707
|
+
"bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
3708
|
+
n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
3709
|
+
e
|
|
3710
|
+
),
|
|
3711
|
+
position: n,
|
|
3712
|
+
align: o,
|
|
3713
|
+
...r,
|
|
3714
|
+
children: [
|
|
3715
|
+
/* @__PURE__ */ l.jsx(Mc, {}),
|
|
3716
|
+
/* @__PURE__ */ l.jsx(
|
|
3717
|
+
yc,
|
|
3718
|
+
{
|
|
3719
|
+
className: q(
|
|
3720
|
+
"p-1",
|
|
3721
|
+
n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
3722
|
+
),
|
|
3723
|
+
children: t
|
|
3724
|
+
}
|
|
3725
|
+
),
|
|
3726
|
+
/* @__PURE__ */ l.jsx(_c, {})
|
|
3727
|
+
]
|
|
3728
|
+
}
|
|
3729
|
+
) });
|
|
3730
|
+
}
|
|
3731
|
+
function Yc({
|
|
3732
|
+
className: e,
|
|
3733
|
+
children: t,
|
|
3734
|
+
...n
|
|
3735
|
+
}) {
|
|
3736
|
+
return /* @__PURE__ */ l.jsxs(
|
|
3737
|
+
Cc,
|
|
3738
|
+
{
|
|
3739
|
+
"data-slot": "select-item",
|
|
3740
|
+
className: q(
|
|
3741
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
3742
|
+
e
|
|
3743
|
+
),
|
|
3744
|
+
...n,
|
|
3745
|
+
children: [
|
|
3746
|
+
/* @__PURE__ */ l.jsx(
|
|
3747
|
+
"span",
|
|
3748
|
+
{
|
|
3749
|
+
"data-slot": "select-item-indicator",
|
|
3750
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
3751
|
+
children: /* @__PURE__ */ l.jsx(bc, { children: /* @__PURE__ */ l.jsx(_n, { className: "size-4" }) })
|
|
3752
|
+
}
|
|
3753
|
+
),
|
|
3754
|
+
/* @__PURE__ */ l.jsx(Sc, { children: t })
|
|
3755
|
+
]
|
|
3756
|
+
}
|
|
3757
|
+
);
|
|
3758
|
+
}
|
|
3759
|
+
function Mc({
|
|
3760
|
+
className: e,
|
|
3761
|
+
...t
|
|
3762
|
+
}) {
|
|
3763
|
+
return /* @__PURE__ */ l.jsx(
|
|
3764
|
+
Rc,
|
|
3765
|
+
{
|
|
3766
|
+
"data-slot": "select-scroll-up-button",
|
|
3767
|
+
className: q(
|
|
3768
|
+
"flex cursor-default items-center justify-center py-1",
|
|
3769
|
+
e
|
|
3770
|
+
),
|
|
3771
|
+
...t,
|
|
3772
|
+
children: /* @__PURE__ */ l.jsx(Or, { className: "size-4" })
|
|
3773
|
+
}
|
|
3774
|
+
);
|
|
3775
|
+
}
|
|
3776
|
+
function _c({
|
|
3777
|
+
className: e,
|
|
3778
|
+
...t
|
|
3779
|
+
}) {
|
|
3780
|
+
return /* @__PURE__ */ l.jsx(
|
|
3781
|
+
Pc,
|
|
3782
|
+
{
|
|
3783
|
+
"data-slot": "select-scroll-down-button",
|
|
3784
|
+
className: q(
|
|
3785
|
+
"flex cursor-default items-center justify-center py-1",
|
|
3786
|
+
e
|
|
3787
|
+
),
|
|
3788
|
+
...t,
|
|
3789
|
+
children: /* @__PURE__ */ l.jsx(En, { className: "size-4" })
|
|
3790
|
+
}
|
|
3791
|
+
);
|
|
3792
|
+
}
|
|
3793
|
+
function Xc({
|
|
3794
|
+
open: e,
|
|
3795
|
+
onOpenChange: t,
|
|
3796
|
+
title: n,
|
|
3797
|
+
actions: o
|
|
3798
|
+
}) {
|
|
3799
|
+
return /* @__PURE__ */ l.jsxs(Ar, { open: e, onOpenChange: t, title: n, children: [
|
|
3800
|
+
/* @__PURE__ */ l.jsx(
|
|
3801
|
+
"div",
|
|
3802
|
+
{
|
|
3803
|
+
"aria-hidden": "true",
|
|
3804
|
+
className: "border-border -mr-[max(0.5rem,env(safe-area-inset-right))] -ml-[max(0.5rem,env(safe-area-inset-left))] border-t"
|
|
3805
|
+
}
|
|
3806
|
+
),
|
|
3807
|
+
/* @__PURE__ */ l.jsx("div", { className: "divide-border/50 border-border/50 divide-y border-b", children: o.map((r) => /* @__PURE__ */ l.jsxs(
|
|
3808
|
+
Er,
|
|
3809
|
+
{
|
|
3810
|
+
type: "button",
|
|
3811
|
+
variant: "ghost",
|
|
3812
|
+
disabled: r.disabled,
|
|
3813
|
+
"aria-pressed": r.selected,
|
|
3814
|
+
className: q(
|
|
3815
|
+
"h-13 w-full justify-start rounded-none px-4 text-base font-medium",
|
|
3816
|
+
r.variant === "destructive" && "text-destructive hover:bg-destructive/10 hover:text-destructive focus-visible:ring-destructive/20"
|
|
3817
|
+
),
|
|
3818
|
+
onClick: () => {
|
|
3819
|
+
r.onSelect(), t(!1);
|
|
3820
|
+
},
|
|
3821
|
+
children: [
|
|
3822
|
+
/* @__PURE__ */ l.jsx("span", { className: "flex-1 text-left", children: r.label }),
|
|
3823
|
+
r.selected ? /* @__PURE__ */ l.jsx(
|
|
3824
|
+
_n,
|
|
3825
|
+
{
|
|
3826
|
+
"aria-hidden": "true",
|
|
3827
|
+
className: "text-muted-foreground size-4"
|
|
3828
|
+
}
|
|
3829
|
+
) : null
|
|
3830
|
+
]
|
|
3831
|
+
},
|
|
3832
|
+
r.id
|
|
3833
|
+
)) })
|
|
3834
|
+
] });
|
|
3835
|
+
}
|
|
3836
|
+
export {
|
|
3837
|
+
dt as A,
|
|
3838
|
+
Zi as B,
|
|
3839
|
+
En as C,
|
|
3840
|
+
jc as D,
|
|
3841
|
+
Ic as E,
|
|
3842
|
+
Ji as F,
|
|
3843
|
+
Qi as G,
|
|
3844
|
+
Wi as H,
|
|
3845
|
+
ui as I,
|
|
3846
|
+
Xi as J,
|
|
3847
|
+
Hi as K,
|
|
3848
|
+
Ki as L,
|
|
3849
|
+
Xc as M,
|
|
3850
|
+
Gi as N,
|
|
3851
|
+
Ui as O,
|
|
3852
|
+
Oc as P,
|
|
3853
|
+
zi as Q,
|
|
3854
|
+
li as R,
|
|
3855
|
+
Wc as S,
|
|
3856
|
+
Yi as T,
|
|
3857
|
+
qi as U,
|
|
3858
|
+
kc as a,
|
|
3859
|
+
Lc as b,
|
|
3860
|
+
Fc as c,
|
|
3861
|
+
Uc as d,
|
|
3862
|
+
Gc as e,
|
|
3863
|
+
zc as f,
|
|
3864
|
+
Yc as g,
|
|
3865
|
+
Vc as h,
|
|
3866
|
+
Hc as i,
|
|
3867
|
+
Kc as j,
|
|
3868
|
+
Nc as k,
|
|
3869
|
+
Dc as l,
|
|
3870
|
+
Bc as m,
|
|
3871
|
+
Qn as n,
|
|
3872
|
+
Or as o,
|
|
3873
|
+
$c as p,
|
|
3874
|
+
Le as q,
|
|
3875
|
+
ut as r,
|
|
3876
|
+
en as s,
|
|
3877
|
+
Tc as t,
|
|
3878
|
+
tn as u,
|
|
3879
|
+
so as v,
|
|
3880
|
+
Fi as w,
|
|
3881
|
+
$i as x,
|
|
3882
|
+
Bi as y,
|
|
3883
|
+
Vi as z
|
|
3884
|
+
};
|