@strapi/ui-primitives 2.0.2 → 2.1.1
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/index.js +64 -1
- package/dist/index.mjs +2191 -1102
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,124 +1,125 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsx as b, jsxs as it, Fragment as at } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import Ue, { useDebugValue as ho, createElement as Gn, useRef as Yn, useContext as qn } from "react";
|
|
4
|
+
import { useComposedRefs as z } from "@radix-ui/react-compose-refs";
|
|
5
|
+
import { createContextScope as Oo, createContext as Mo } from "@radix-ui/react-context";
|
|
6
|
+
import { Slot as Ct } from "@radix-ui/react-slot";
|
|
7
|
+
import { composeEventHandlers as M } from "@radix-ui/primitive";
|
|
8
|
+
import { DismissableLayer as Do } from "@radix-ui/react-dismissable-layer";
|
|
9
|
+
import { useFocusGuards as Fo } from "@radix-ui/react-focus-guards";
|
|
10
|
+
import { FocusScope as Lo } from "@radix-ui/react-focus-scope";
|
|
11
|
+
import { useId as Ee } from "@radix-ui/react-id";
|
|
12
|
+
import * as Pe from "@radix-ui/react-popper";
|
|
13
|
+
import { createPopperScope as $o } from "@radix-ui/react-popper";
|
|
14
|
+
import { Portal as Bo } from "@radix-ui/react-portal";
|
|
15
|
+
import { Primitive as F } from "@radix-ui/react-primitive";
|
|
16
|
+
import { useControllableState as Re } from "@radix-ui/react-use-controllable-state";
|
|
17
|
+
import { useLayoutEffect as te } from "@radix-ui/react-use-layout-effect";
|
|
18
|
+
import { hideOthers as zo } from "aria-hidden";
|
|
19
|
+
import * as ct from "react-dom";
|
|
20
|
+
import { RemoveScroll as jo } from "react-remove-scroll";
|
|
21
|
+
import { useVirtualizer as Xn } from "@tanstack/react-virtual";
|
|
22
|
+
import { clamp as mo } from "@radix-ui/number";
|
|
23
|
+
import { createCollection as Zn } from "@radix-ui/react-collection";
|
|
24
|
+
import { useDirection as Jn } from "@radix-ui/react-direction";
|
|
25
|
+
import { usePrevious as Qn } from "@radix-ui/react-use-previous";
|
|
26
|
+
import { VisuallyHidden as er } from "@radix-ui/react-visually-hidden";
|
|
27
|
+
function tr(e) {
|
|
28
|
+
const o = `${e}CollectionProvider`, [t, n] = Oo(o), [r, s] = t(o, {
|
|
28
29
|
collectionRef: { current: null },
|
|
29
30
|
itemMap: /* @__PURE__ */ new Map(),
|
|
30
31
|
listeners: /* @__PURE__ */ new Set()
|
|
31
|
-
}),
|
|
32
|
-
const { scope: f, children:
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
}), i = (u) => {
|
|
33
|
+
const { scope: f, children: m } = u, S = l.useRef(null), v = l.useRef(/* @__PURE__ */ new Map()).current, p = l.useRef(/* @__PURE__ */ new Set()).current;
|
|
34
|
+
return /* @__PURE__ */ b(r, { scope: f, itemMap: v, collectionRef: S, listeners: p, children: m });
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const { scope:
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
i.displayName = o;
|
|
37
|
+
const a = `${e}CollectionSlot`, c = l.forwardRef((u, f) => {
|
|
38
|
+
const { scope: m, children: S } = u, v = s(a, m), p = z(f, v.collectionRef);
|
|
39
|
+
return /* @__PURE__ */ b(Ct, { ref: p, children: S });
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
const { scope:
|
|
43
|
-
return
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
const
|
|
47
|
-
|
|
41
|
+
c.displayName = a;
|
|
42
|
+
const d = `${e}CollectionItemSlot`, y = "data-radix-collection-item", g = l.forwardRef((u, f) => {
|
|
43
|
+
const { scope: m, children: S, ...v } = u, p = l.useRef(null), w = z(f, p), C = s(d, m);
|
|
44
|
+
return l.useEffect(() => {
|
|
45
|
+
const E = Array.from(C.itemMap.values());
|
|
46
|
+
return C.itemMap.set(p, { ref: p, ...v }), C.listeners.forEach((T) => T(Array.from(C.itemMap.values()), E)), () => {
|
|
47
|
+
const T = Array.from(C.itemMap.values());
|
|
48
|
+
C.itemMap.delete(p), C.listeners.forEach((x) => x(Array.from(C.itemMap.values()), T));
|
|
48
49
|
};
|
|
49
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ b(Ct, { [y]: "", ref: w, children: S });
|
|
50
51
|
});
|
|
51
|
-
|
|
52
|
-
function
|
|
53
|
-
const f =
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
56
|
-
const p = Array.from(
|
|
52
|
+
g.displayName = d;
|
|
53
|
+
function h(u) {
|
|
54
|
+
const f = s(`${e}CollectionConsumer`, u), m = l.useCallback(() => {
|
|
55
|
+
const v = f.collectionRef.current;
|
|
56
|
+
if (!v) return [];
|
|
57
|
+
const p = Array.from(v.querySelectorAll(`[${y}]`));
|
|
57
58
|
return Array.from(f.itemMap.values()).sort(
|
|
58
|
-
(
|
|
59
|
+
(E, T) => p.indexOf(E.ref.current) - p.indexOf(T.ref.current)
|
|
59
60
|
);
|
|
60
|
-
}, [f.collectionRef, f.itemMap]),
|
|
61
|
-
(
|
|
61
|
+
}, [f.collectionRef, f.itemMap]), S = l.useCallback(
|
|
62
|
+
(v) => (f.listeners.add(v), () => f.listeners.delete(v)),
|
|
62
63
|
[f.listeners]
|
|
63
64
|
);
|
|
64
|
-
return { getItems:
|
|
65
|
+
return { getItems: m, subscribe: S };
|
|
65
66
|
}
|
|
66
67
|
return [
|
|
67
|
-
{ Provider:
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
{ Provider: i, Slot: c, ItemSlot: g },
|
|
69
|
+
h,
|
|
70
|
+
n
|
|
70
71
|
];
|
|
71
72
|
}
|
|
72
|
-
const
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
return
|
|
77
|
-
const
|
|
78
|
-
return
|
|
73
|
+
const vt = /* @__PURE__ */ new Map();
|
|
74
|
+
function or(e, o) {
|
|
75
|
+
const t = e + (o ? Object.entries(o).sort((r, s) => r[0] < s[0] ? -1 : 1).join() : "");
|
|
76
|
+
if (vt.has(t))
|
|
77
|
+
return vt.get(t);
|
|
78
|
+
const n = new Intl.Collator(e, o);
|
|
79
|
+
return vt.set(t, n), n;
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
-
const
|
|
81
|
+
function Lt(e, o) {
|
|
82
|
+
const t = or(e, {
|
|
82
83
|
usage: "search",
|
|
83
|
-
...
|
|
84
|
+
...o
|
|
84
85
|
});
|
|
85
86
|
return {
|
|
86
|
-
startsWith(
|
|
87
|
-
return
|
|
87
|
+
startsWith(n, r) {
|
|
88
|
+
return r.length === 0 ? !0 : (n = n.normalize("NFC"), r = r.normalize("NFC"), t.compare(n.slice(0, r.length), r) === 0);
|
|
88
89
|
},
|
|
89
|
-
endsWith(
|
|
90
|
-
return
|
|
90
|
+
endsWith(n, r) {
|
|
91
|
+
return r.length === 0 ? !0 : (n = n.normalize("NFC"), r = r.normalize("NFC"), t.compare(n.slice(-r.length), r) === 0);
|
|
91
92
|
},
|
|
92
|
-
contains(
|
|
93
|
-
if (
|
|
93
|
+
contains(n, r) {
|
|
94
|
+
if (r.length === 0)
|
|
94
95
|
return !0;
|
|
95
|
-
|
|
96
|
-
let
|
|
97
|
-
const
|
|
98
|
-
for (;
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
96
|
+
n = n.normalize("NFC"), r = r.normalize("NFC");
|
|
97
|
+
let s = 0;
|
|
98
|
+
const i = r.length;
|
|
99
|
+
for (; s + i <= n.length; s++) {
|
|
100
|
+
const a = n.slice(s, s + i);
|
|
101
|
+
if (t.compare(r, a) === 0)
|
|
101
102
|
return !0;
|
|
102
103
|
}
|
|
103
104
|
return !1;
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
return
|
|
110
|
-
|
|
111
|
-
}),
|
|
112
|
-
},
|
|
113
|
-
({ children:
|
|
114
|
-
const
|
|
115
|
-
count:
|
|
116
|
-
getScrollElement: () =>
|
|
117
|
-
estimateSize: () =>
|
|
118
|
-
overscan:
|
|
119
|
-
}),
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
108
|
+
const nr = (e) => {
|
|
109
|
+
const o = l.useRef();
|
|
110
|
+
return l.useEffect(() => {
|
|
111
|
+
o.current = e;
|
|
112
|
+
}), o.current;
|
|
113
|
+
}, Ho = l.forwardRef(
|
|
114
|
+
({ children: e, estimatedItemSize: o = 40, overscan: t = 5, getItemCount: n, onViewportChange: r, ...s }, i) => {
|
|
115
|
+
const a = l.useRef(null), c = z(i, a, r), d = l.useMemo(() => l.Children.toArray(e), [e]), y = Xn({
|
|
116
|
+
count: n(),
|
|
117
|
+
getScrollElement: () => a.current,
|
|
118
|
+
estimateSize: () => o,
|
|
119
|
+
overscan: t
|
|
120
|
+
}), g = y.getVirtualItems();
|
|
121
|
+
return /* @__PURE__ */ it(at, { children: [
|
|
122
|
+
/* @__PURE__ */ b(
|
|
122
123
|
"style",
|
|
123
124
|
{
|
|
124
125
|
dangerouslySetInnerHTML: {
|
|
@@ -126,44 +127,44 @@ const eo = (o) => {
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
130
|
+
/* @__PURE__ */ b(
|
|
131
|
+
F.div,
|
|
131
132
|
{
|
|
132
133
|
"data-radix-combobox-viewport": "",
|
|
133
134
|
role: "presentation",
|
|
134
|
-
...
|
|
135
|
-
ref:
|
|
135
|
+
...s,
|
|
136
|
+
ref: c,
|
|
136
137
|
style: {
|
|
137
138
|
position: "relative",
|
|
138
139
|
flex: 1,
|
|
139
140
|
overflow: "auto",
|
|
140
|
-
...
|
|
141
|
+
...s.style
|
|
141
142
|
},
|
|
142
|
-
children: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ b(
|
|
143
144
|
"div",
|
|
144
145
|
{
|
|
145
146
|
style: {
|
|
146
|
-
height: `${
|
|
147
|
+
height: `${y.getTotalSize()}px`,
|
|
147
148
|
width: "100%",
|
|
148
149
|
position: "relative"
|
|
149
150
|
},
|
|
150
|
-
children:
|
|
151
|
-
const u =
|
|
152
|
-
return /* @__PURE__ */
|
|
151
|
+
children: g.map((h) => {
|
|
152
|
+
const u = d[h.index];
|
|
153
|
+
return /* @__PURE__ */ b(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
|
-
"data-index":
|
|
156
|
-
ref:
|
|
156
|
+
"data-index": h.index,
|
|
157
|
+
ref: y.measureElement,
|
|
157
158
|
style: {
|
|
158
159
|
position: "absolute",
|
|
159
160
|
top: 0,
|
|
160
161
|
left: 0,
|
|
161
162
|
width: "100%",
|
|
162
|
-
transform: `translateY(${
|
|
163
|
+
transform: `translateY(${h.start}px)`
|
|
163
164
|
},
|
|
164
165
|
children: u
|
|
165
166
|
},
|
|
166
|
-
|
|
167
|
+
h.key
|
|
167
168
|
);
|
|
168
169
|
})
|
|
169
170
|
}
|
|
@@ -173,352 +174,352 @@ const eo = (o) => {
|
|
|
173
174
|
] });
|
|
174
175
|
}
|
|
175
176
|
);
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
type:
|
|
177
|
+
Ho.displayName = "VirtualizedViewport";
|
|
178
|
+
const rr = [" ", "Enter", "ArrowUp", "ArrowDown"], sr = ["Enter"], ir = (e) => !!(e.length === 1 && e.match(/\S| /)), Uo = "Combobox", [Ce, We] = tr(Uo), [ar, pe] = Mo(Uo), cr = ({ children: e }) => /* @__PURE__ */ b(Pe.Root, { children: /* @__PURE__ */ b(Ce.Provider, { scope: void 0, children: e }) }), lr = (e) => typeof e == "string" ? e === "none" ? {
|
|
179
|
+
type: e,
|
|
179
180
|
filter: void 0
|
|
180
181
|
} : {
|
|
181
|
-
type:
|
|
182
|
+
type: e,
|
|
182
183
|
filter: "startsWith"
|
|
183
|
-
} :
|
|
184
|
+
} : e, ur = (e) => {
|
|
184
185
|
const {
|
|
185
|
-
allowCustomValue:
|
|
186
|
-
autocomplete:
|
|
187
|
-
children:
|
|
188
|
-
open:
|
|
189
|
-
defaultOpen:
|
|
190
|
-
onOpenChange:
|
|
191
|
-
value:
|
|
192
|
-
defaultValue:
|
|
193
|
-
onValueChange:
|
|
194
|
-
disabled:
|
|
195
|
-
required:
|
|
196
|
-
locale:
|
|
186
|
+
allowCustomValue: o = !1,
|
|
187
|
+
autocomplete: t = "none",
|
|
188
|
+
children: n,
|
|
189
|
+
open: r,
|
|
190
|
+
defaultOpen: s,
|
|
191
|
+
onOpenChange: i,
|
|
192
|
+
value: a,
|
|
193
|
+
defaultValue: c,
|
|
194
|
+
onValueChange: d,
|
|
195
|
+
disabled: y,
|
|
196
|
+
required: g = !1,
|
|
197
|
+
locale: h = "en-EN",
|
|
197
198
|
onTextValueChange: u,
|
|
198
199
|
textValue: f,
|
|
199
|
-
defaultTextValue:
|
|
200
|
-
filterValue:
|
|
201
|
-
defaultFilterValue:
|
|
200
|
+
defaultTextValue: m,
|
|
201
|
+
filterValue: S,
|
|
202
|
+
defaultFilterValue: v,
|
|
202
203
|
onFilterValueChange: p,
|
|
203
|
-
isPrintableCharacter:
|
|
204
|
-
visible:
|
|
205
|
-
virtualized:
|
|
206
|
-
estimatedItemSize:
|
|
207
|
-
overscan:
|
|
208
|
-
} =
|
|
209
|
-
prop:
|
|
210
|
-
defaultProp:
|
|
211
|
-
onChange:
|
|
212
|
-
}), [
|
|
213
|
-
prop:
|
|
214
|
-
defaultProp:
|
|
215
|
-
onChange:
|
|
216
|
-
}), [
|
|
204
|
+
isPrintableCharacter: w = ir,
|
|
205
|
+
visible: C = !1,
|
|
206
|
+
virtualized: E = "auto",
|
|
207
|
+
estimatedItemSize: T = 40,
|
|
208
|
+
overscan: x = 5
|
|
209
|
+
} = e, [D, W] = l.useState(null), [G, oe] = l.useState(null), [L, Y] = l.useState(null), [K, Z] = l.useState(null), [le = !1, ne] = Re({
|
|
210
|
+
prop: r,
|
|
211
|
+
defaultProp: s,
|
|
212
|
+
onChange: i
|
|
213
|
+
}), [J, $] = Re({
|
|
214
|
+
prop: a,
|
|
215
|
+
defaultProp: c,
|
|
216
|
+
onChange: d
|
|
217
|
+
}), [re, q] = Re({
|
|
217
218
|
prop: f,
|
|
218
|
-
defaultProp:
|
|
219
|
+
defaultProp: o && !m ? a : m,
|
|
219
220
|
onChange: u
|
|
220
|
-
}), [
|
|
221
|
-
prop:
|
|
222
|
-
defaultProp:
|
|
221
|
+
}), [j, fe] = Re({
|
|
222
|
+
prop: S,
|
|
223
|
+
defaultProp: v,
|
|
223
224
|
onChange: p
|
|
224
|
-
}),
|
|
225
|
-
(
|
|
226
|
-
var
|
|
227
|
-
const
|
|
228
|
-
for (const
|
|
229
|
-
if (
|
|
230
|
-
if (
|
|
231
|
-
const
|
|
232
|
-
|
|
225
|
+
}), se = Ee(), ae = l.useCallback(
|
|
226
|
+
(I, N) => {
|
|
227
|
+
var ue;
|
|
228
|
+
const k = N.map((U) => U.ref.current), [_, ...R] = k, [A] = R.slice(-1), ee = K ?? ((ue = N.find((U) => U.value === J)) == null ? void 0 : ue.ref.current);
|
|
229
|
+
for (const U of I) {
|
|
230
|
+
if (U === ee) return;
|
|
231
|
+
if (U == null || U.scrollIntoView({ block: "nearest" }), U === _ && G && (G.scrollTop = 0), U === A && G && (G.scrollTop = G.scrollHeight), Z(U), t === "both") {
|
|
232
|
+
const Ae = N.find((Be) => Be.ref.current === U);
|
|
233
|
+
Ae && q(Ae.textValue);
|
|
233
234
|
}
|
|
234
|
-
if (
|
|
235
|
+
if (U !== ee) return;
|
|
235
236
|
}
|
|
236
237
|
},
|
|
237
|
-
[
|
|
238
|
-
),
|
|
239
|
-
return
|
|
240
|
-
|
|
241
|
-
}, [
|
|
242
|
-
if (
|
|
243
|
-
}, [
|
|
244
|
-
|
|
238
|
+
[t, q, G, K, J]
|
|
239
|
+
), Q = lr(t);
|
|
240
|
+
return l.useEffect(() => {
|
|
241
|
+
t !== "both" && Z(null);
|
|
242
|
+
}, [re, t]), l.useEffect(() => {
|
|
243
|
+
if (L && D) return zo([L, D]);
|
|
244
|
+
}, [L, D]), /* @__PURE__ */ b(cr, { children: /* @__PURE__ */ b(
|
|
245
|
+
ar,
|
|
245
246
|
{
|
|
246
|
-
allowCustomValue:
|
|
247
|
-
autocomplete:
|
|
248
|
-
required:
|
|
249
|
-
trigger:
|
|
250
|
-
onTriggerChange:
|
|
251
|
-
contentId:
|
|
252
|
-
value:
|
|
253
|
-
onValueChange:
|
|
254
|
-
open:
|
|
255
|
-
onOpenChange:
|
|
256
|
-
disabled:
|
|
257
|
-
locale:
|
|
247
|
+
allowCustomValue: o,
|
|
248
|
+
autocomplete: Q,
|
|
249
|
+
required: g,
|
|
250
|
+
trigger: D,
|
|
251
|
+
onTriggerChange: W,
|
|
252
|
+
contentId: se,
|
|
253
|
+
value: J,
|
|
254
|
+
onValueChange: $,
|
|
255
|
+
open: le,
|
|
256
|
+
onOpenChange: ne,
|
|
257
|
+
disabled: y,
|
|
258
|
+
locale: h,
|
|
258
259
|
focusFirst: ae,
|
|
259
|
-
textValue:
|
|
260
|
-
onTextValueChange:
|
|
261
|
-
onViewportChange:
|
|
262
|
-
onContentChange:
|
|
263
|
-
visuallyFocussedItem:
|
|
264
|
-
filterValue:
|
|
265
|
-
onFilterValueChange:
|
|
266
|
-
onVisuallyFocussedItemChange:
|
|
267
|
-
isPrintableCharacter:
|
|
268
|
-
visible:
|
|
269
|
-
virtualized:
|
|
270
|
-
estimatedItemSize:
|
|
271
|
-
overscan:
|
|
272
|
-
children:
|
|
260
|
+
textValue: re,
|
|
261
|
+
onTextValueChange: q,
|
|
262
|
+
onViewportChange: oe,
|
|
263
|
+
onContentChange: Y,
|
|
264
|
+
visuallyFocussedItem: K,
|
|
265
|
+
filterValue: j,
|
|
266
|
+
onFilterValueChange: fe,
|
|
267
|
+
onVisuallyFocussedItemChange: Z,
|
|
268
|
+
isPrintableCharacter: w,
|
|
269
|
+
visible: C,
|
|
270
|
+
virtualized: E,
|
|
271
|
+
estimatedItemSize: T,
|
|
272
|
+
overscan: x,
|
|
273
|
+
children: n
|
|
273
274
|
}
|
|
274
275
|
) });
|
|
275
|
-
},
|
|
276
|
-
const { ...
|
|
277
|
-
|
|
276
|
+
}, Wo = "ComboboxTrigger", Ko = l.forwardRef((e, o) => {
|
|
277
|
+
const { ...t } = e, n = pe(Wo), r = () => {
|
|
278
|
+
n.disabled || n.onOpenChange(!0);
|
|
278
279
|
};
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
|
|
280
|
+
return /* @__PURE__ */ b(Pe.Anchor, { asChild: !0, children: /* @__PURE__ */ b(
|
|
281
|
+
Lo,
|
|
281
282
|
{
|
|
282
283
|
asChild: !0,
|
|
283
|
-
trapped:
|
|
284
|
-
onMountAutoFocus: (
|
|
285
|
-
|
|
284
|
+
trapped: n.open,
|
|
285
|
+
onMountAutoFocus: (s) => {
|
|
286
|
+
s.preventDefault();
|
|
286
287
|
},
|
|
287
|
-
onUnmountAutoFocus: (
|
|
288
|
-
var
|
|
289
|
-
(
|
|
288
|
+
onUnmountAutoFocus: (s) => {
|
|
289
|
+
var i, a;
|
|
290
|
+
(i = n.trigger) == null || i.focus({ preventScroll: !0 }), (a = document.getSelection()) == null || a.empty(), s.preventDefault();
|
|
290
291
|
},
|
|
291
|
-
children: /* @__PURE__ */
|
|
292
|
+
children: /* @__PURE__ */ b(
|
|
292
293
|
"div",
|
|
293
294
|
{
|
|
294
|
-
ref:
|
|
295
|
-
"data-disabled":
|
|
296
|
-
...
|
|
297
|
-
onClick:
|
|
298
|
-
var
|
|
299
|
-
if (
|
|
300
|
-
|
|
295
|
+
ref: o,
|
|
296
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
297
|
+
...t,
|
|
298
|
+
onClick: M(t.onClick, (s) => {
|
|
299
|
+
var i;
|
|
300
|
+
if (n.disabled) {
|
|
301
|
+
s.preventDefault();
|
|
301
302
|
return;
|
|
302
303
|
}
|
|
303
|
-
(
|
|
304
|
+
(i = n.trigger) == null || i.focus();
|
|
304
305
|
}),
|
|
305
|
-
onPointerDown:
|
|
306
|
-
var
|
|
307
|
-
if (
|
|
308
|
-
|
|
306
|
+
onPointerDown: M(t.onPointerDown, (s) => {
|
|
307
|
+
var c;
|
|
308
|
+
if (n.disabled) {
|
|
309
|
+
s.preventDefault();
|
|
309
310
|
return;
|
|
310
311
|
}
|
|
311
|
-
const
|
|
312
|
-
|
|
312
|
+
const i = s.target;
|
|
313
|
+
i.hasPointerCapture(s.pointerId) && i.releasePointerCapture(s.pointerId), (i.closest("button") ?? i.closest("div")) === s.currentTarget && s.button === 0 && s.ctrlKey === !1 && (r(), (c = n.trigger) == null || c.focus());
|
|
313
314
|
})
|
|
314
315
|
}
|
|
315
316
|
)
|
|
316
317
|
}
|
|
317
318
|
) });
|
|
318
319
|
});
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
var
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
return
|
|
326
|
-
const
|
|
320
|
+
Ko.displayName = Wo;
|
|
321
|
+
const Go = "ComboboxInput", Yo = l.forwardRef((e, o) => {
|
|
322
|
+
var y;
|
|
323
|
+
const t = pe(Go), n = l.useRef(null), { getItems: r } = We(void 0), { startsWith: s } = Lt(t.locale, { sensitivity: "base" }), i = t.disabled, a = z(n, o, t.onTriggerChange), c = () => {
|
|
324
|
+
i || t.onOpenChange(!0);
|
|
325
|
+
}, d = nr(t.filterValue);
|
|
326
|
+
return te(() => {
|
|
327
|
+
const g = setTimeout(() => {
|
|
327
328
|
var f;
|
|
328
|
-
if (
|
|
329
|
+
if (t.textValue === "" || t.textValue === void 0 || t.filterValue === "" || t.filterValue === void 0)
|
|
329
330
|
return;
|
|
330
|
-
const
|
|
331
|
-
(
|
|
332
|
-
), u =
|
|
333
|
-
|
|
331
|
+
const h = r().find(
|
|
332
|
+
(m) => m.type === "option" && s(m.textValue, t.textValue)
|
|
333
|
+
), u = Tr(d ?? "", t.filterValue);
|
|
334
|
+
h && !t.visuallyFocussedItem && u === t.filterValue.length && ((f = n.current) == null || f.setSelectionRange(t.filterValue.length, t.textValue.length));
|
|
334
335
|
});
|
|
335
|
-
return () => clearTimeout(
|
|
336
|
-
}, [
|
|
336
|
+
return () => clearTimeout(g);
|
|
337
|
+
}, [t.textValue, t.filterValue, s, t.visuallyFocussedItem, r, d]), /* @__PURE__ */ b(
|
|
337
338
|
"input",
|
|
338
339
|
{
|
|
339
340
|
type: "text",
|
|
340
341
|
role: "combobox",
|
|
341
|
-
"aria-controls":
|
|
342
|
-
"aria-expanded":
|
|
343
|
-
"aria-required":
|
|
344
|
-
"aria-autocomplete":
|
|
345
|
-
"data-state":
|
|
346
|
-
"aria-disabled":
|
|
347
|
-
"aria-activedescendant": (
|
|
348
|
-
disabled:
|
|
349
|
-
"data-disabled":
|
|
350
|
-
"data-placeholder":
|
|
351
|
-
value:
|
|
352
|
-
...
|
|
353
|
-
ref:
|
|
354
|
-
onKeyDown:
|
|
355
|
-
var
|
|
356
|
-
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
let
|
|
360
|
-
if (["ArrowUp", "End"].includes(
|
|
361
|
-
const
|
|
362
|
-
if (
|
|
363
|
-
let p =
|
|
364
|
-
p ===
|
|
342
|
+
"aria-controls": t.contentId,
|
|
343
|
+
"aria-expanded": t.open,
|
|
344
|
+
"aria-required": t.required,
|
|
345
|
+
"aria-autocomplete": t.autocomplete.type,
|
|
346
|
+
"data-state": t.open ? "open" : "closed",
|
|
347
|
+
"aria-disabled": i,
|
|
348
|
+
"aria-activedescendant": (y = t.visuallyFocussedItem) == null ? void 0 : y.id,
|
|
349
|
+
disabled: i,
|
|
350
|
+
"data-disabled": i ? "" : void 0,
|
|
351
|
+
"data-placeholder": t.textValue === void 0 ? "" : void 0,
|
|
352
|
+
value: t.textValue ?? "",
|
|
353
|
+
...e,
|
|
354
|
+
ref: a,
|
|
355
|
+
onKeyDown: M(e.onKeyDown, (g) => {
|
|
356
|
+
var h, u;
|
|
357
|
+
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(g.key))
|
|
358
|
+
t.open || c(), setTimeout(() => {
|
|
359
|
+
var S;
|
|
360
|
+
let m = r().filter((v) => !v.disabled && v.isVisible).map((v) => v.ref.current);
|
|
361
|
+
if (["ArrowUp", "End"].includes(g.key) && (m = m.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(g.key)) {
|
|
362
|
+
const v = t.visuallyFocussedItem ?? ((S = r().find((p) => p.value === t.value)) == null ? void 0 : S.ref.current);
|
|
363
|
+
if (v) {
|
|
364
|
+
let p = m.indexOf(v);
|
|
365
|
+
p === m.length - 1 && (p = -1), m = m.slice(p + 1);
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
|
-
if (["ArrowDown"].includes(
|
|
368
|
-
const [
|
|
369
|
-
|
|
368
|
+
if (["ArrowDown"].includes(g.key) && t.autocomplete.type === "both" && m.length > 1) {
|
|
369
|
+
const [v, ...p] = m, w = r().find((C) => C.ref.current === v).textValue;
|
|
370
|
+
t.textValue === w && (m = p);
|
|
370
371
|
}
|
|
371
|
-
|
|
372
|
-
}),
|
|
373
|
-
else if (["Tab"].includes(
|
|
374
|
-
|
|
375
|
-
else if (["Escape"].includes(
|
|
376
|
-
|
|
377
|
-
else if (
|
|
378
|
-
if (
|
|
379
|
-
const f =
|
|
380
|
-
f && (
|
|
372
|
+
t.focusFirst(m, r());
|
|
373
|
+
}), g.preventDefault();
|
|
374
|
+
else if (["Tab"].includes(g.key) && t.open)
|
|
375
|
+
g.preventDefault();
|
|
376
|
+
else if (["Escape"].includes(g.key))
|
|
377
|
+
t.open ? t.onOpenChange(!1) : (t.onValueChange(void 0), t.onTextValueChange("")), g.preventDefault();
|
|
378
|
+
else if (sr.includes(g.key)) {
|
|
379
|
+
if (t.visuallyFocussedItem) {
|
|
380
|
+
const f = r().find((m) => m.ref.current === t.visuallyFocussedItem);
|
|
381
|
+
f && (t.onValueChange(f.value), t.onTextValueChange(f.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(f.textValue), (h = f.ref.current) == null || h.click());
|
|
381
382
|
} else {
|
|
382
|
-
const f =
|
|
383
|
-
(
|
|
383
|
+
const f = r().find(
|
|
384
|
+
(m) => m.type === "option" && !m.disabled && m.textValue === t.textValue
|
|
384
385
|
);
|
|
385
|
-
f && (
|
|
386
|
+
f && (t.onValueChange(f.value), t.onTextValueChange(f.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(f.textValue), (u = f.ref.current) == null || u.click());
|
|
386
387
|
}
|
|
387
|
-
|
|
388
|
+
t.onOpenChange(!1), g.preventDefault();
|
|
388
389
|
} else
|
|
389
|
-
|
|
390
|
+
t.onVisuallyFocussedItemChange(null);
|
|
390
391
|
}),
|
|
391
|
-
onChange:
|
|
392
|
-
|
|
392
|
+
onChange: M(e.onChange, (g) => {
|
|
393
|
+
t.onTextValueChange(g.currentTarget.value), t.autocomplete.type === "both" && t.onFilterValueChange(g.currentTarget.value);
|
|
393
394
|
}),
|
|
394
|
-
onKeyUp:
|
|
395
|
-
var
|
|
396
|
-
if (!
|
|
397
|
-
if (
|
|
398
|
-
const u =
|
|
399
|
-
f &&
|
|
395
|
+
onKeyUp: M(e.onKeyUp, (g) => {
|
|
396
|
+
var h;
|
|
397
|
+
if (!t.open && (t.isPrintableCharacter(g.key) || ["Backspace"].includes(g.key)) && c(), setTimeout(() => {
|
|
398
|
+
if (t.autocomplete.type === "both" && t.isPrintableCharacter(g.key) && t.filterValue !== void 0) {
|
|
399
|
+
const u = t.filterValue, f = r().find((m) => s(m.textValue, u));
|
|
400
|
+
f && t.onTextValueChange(f.textValue);
|
|
400
401
|
}
|
|
401
|
-
}),
|
|
402
|
-
const u =
|
|
403
|
-
f && (
|
|
402
|
+
}), t.autocomplete.type === "none" && t.isPrintableCharacter(g.key)) {
|
|
403
|
+
const u = t.textValue ?? "", f = r().find((m) => s(m.textValue, u));
|
|
404
|
+
f && (t.onVisuallyFocussedItemChange(f.ref.current), (h = f.ref.current) == null || h.scrollIntoView());
|
|
404
405
|
}
|
|
405
406
|
}),
|
|
406
|
-
onBlur:
|
|
407
|
-
if (
|
|
407
|
+
onBlur: M(e.onBlur, () => {
|
|
408
|
+
if (t.open)
|
|
408
409
|
return;
|
|
409
|
-
|
|
410
|
-
const [
|
|
411
|
-
(u) => u.textValue ===
|
|
410
|
+
t.onVisuallyFocussedItemChange(null);
|
|
411
|
+
const [g] = r().filter(
|
|
412
|
+
(u) => u.textValue === t.textValue && u.type === "option"
|
|
412
413
|
);
|
|
413
|
-
if (
|
|
414
|
-
|
|
414
|
+
if (g) {
|
|
415
|
+
t.onValueChange(g.value), t.autocomplete.type === "both" && t.onFilterValueChange(g.textValue);
|
|
415
416
|
return;
|
|
416
417
|
}
|
|
417
|
-
if (
|
|
418
|
-
|
|
418
|
+
if (t.allowCustomValue) {
|
|
419
|
+
t.onValueChange(t.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(t.textValue);
|
|
419
420
|
return;
|
|
420
421
|
}
|
|
421
|
-
const [
|
|
422
|
-
|
|
422
|
+
const [h] = r().filter((u) => u.value === t.value && u.type === "option");
|
|
423
|
+
h && t.textValue !== "" ? (t.onTextValueChange(h.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(h.textValue)) : (t.onValueChange(void 0), t.onTextValueChange(""));
|
|
423
424
|
})
|
|
424
425
|
}
|
|
425
426
|
);
|
|
426
427
|
});
|
|
427
|
-
|
|
428
|
-
const
|
|
429
|
-
const { children:
|
|
430
|
-
var
|
|
431
|
-
|
|
428
|
+
Yo.displayName = "ComboboxTextInput";
|
|
429
|
+
const qo = l.forwardRef((e, o) => {
|
|
430
|
+
const { children: t, ...n } = e, r = pe(Go), s = r.disabled, i = () => {
|
|
431
|
+
var a;
|
|
432
|
+
s || (r.onOpenChange(!0), (a = r.trigger) == null || a.focus());
|
|
432
433
|
};
|
|
433
|
-
return /* @__PURE__ */
|
|
434
|
-
|
|
434
|
+
return /* @__PURE__ */ b(
|
|
435
|
+
F.button,
|
|
435
436
|
{
|
|
436
437
|
"aria-hidden": !0,
|
|
437
438
|
type: "button",
|
|
438
|
-
"aria-disabled":
|
|
439
|
-
"aria-controls":
|
|
440
|
-
"aria-expanded":
|
|
441
|
-
disabled:
|
|
442
|
-
"data-disabled":
|
|
443
|
-
...
|
|
439
|
+
"aria-disabled": s,
|
|
440
|
+
"aria-controls": r.contentId,
|
|
441
|
+
"aria-expanded": r.open,
|
|
442
|
+
disabled: s,
|
|
443
|
+
"data-disabled": s ? "" : void 0,
|
|
444
|
+
...n,
|
|
444
445
|
tabIndex: -1,
|
|
445
|
-
ref:
|
|
446
|
-
onClick:
|
|
447
|
-
var
|
|
448
|
-
(
|
|
446
|
+
ref: o,
|
|
447
|
+
onClick: M(n.onClick, () => {
|
|
448
|
+
var a;
|
|
449
|
+
(a = r.trigger) == null || a.focus();
|
|
449
450
|
}),
|
|
450
|
-
onPointerDown:
|
|
451
|
-
|
|
451
|
+
onPointerDown: M(n.onPointerDown, (a) => {
|
|
452
|
+
a.button === 0 && a.ctrlKey === !1 && (i(), a.preventDefault());
|
|
452
453
|
}),
|
|
453
|
-
onKeyDown:
|
|
454
|
-
|
|
454
|
+
onKeyDown: M(n.onKeyDown, (a) => {
|
|
455
|
+
rr.includes(a.key) && (i(), a.preventDefault());
|
|
455
456
|
}),
|
|
456
|
-
children:
|
|
457
|
+
children: t || "▼"
|
|
457
458
|
}
|
|
458
459
|
);
|
|
459
460
|
});
|
|
460
|
-
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
const
|
|
464
|
-
const
|
|
465
|
-
if (
|
|
466
|
-
|
|
467
|
-
}, []),
|
|
468
|
-
|
|
469
|
-
var
|
|
470
|
-
const
|
|
471
|
-
(
|
|
461
|
+
qo.displayName = "ComboboxIcon";
|
|
462
|
+
const dr = "ComboboxPortal", Xo = (e) => /* @__PURE__ */ b(Bo, { asChild: !0, ...e });
|
|
463
|
+
Xo.displayName = dr;
|
|
464
|
+
const $t = "ComboboxContent", Zo = l.forwardRef((e, o) => {
|
|
465
|
+
const t = pe($t), { getItems: n } = We(void 0), [r, s] = l.useState();
|
|
466
|
+
if (te(() => {
|
|
467
|
+
s(new DocumentFragment());
|
|
468
|
+
}, []), te(() => {
|
|
469
|
+
t.open && t.autocomplete.type === "none" && setTimeout(() => {
|
|
470
|
+
var a;
|
|
471
|
+
const i = n().find((c) => c.value === t.value);
|
|
472
|
+
(a = i == null ? void 0 : i.ref.current) == null || a.scrollIntoView({ block: "nearest" });
|
|
472
473
|
});
|
|
473
|
-
}, [
|
|
474
|
-
const
|
|
475
|
-
return
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
|
|
474
|
+
}, [n, t.autocomplete, t.value, t.open]), !t.open) {
|
|
475
|
+
const i = r;
|
|
476
|
+
return i ? ct.createPortal(
|
|
477
|
+
/* @__PURE__ */ b(Ce.Slot, { scope: void 0, children: /* @__PURE__ */ b("div", { children: e.children }) }),
|
|
478
|
+
i
|
|
478
479
|
) : null;
|
|
479
480
|
}
|
|
480
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ b(Jo, { ...e, ref: o });
|
|
481
482
|
});
|
|
482
|
-
|
|
483
|
-
const
|
|
484
|
-
(
|
|
485
|
-
const { onEscapeKeyDown:
|
|
486
|
-
return
|
|
487
|
-
const
|
|
488
|
-
|
|
483
|
+
Zo.displayName = $t;
|
|
484
|
+
const pr = 10, Jo = l.forwardRef(
|
|
485
|
+
(e, o) => {
|
|
486
|
+
const { onEscapeKeyDown: t, onPointerDownOutside: n, ...r } = e, s = pe($t), i = z(o, (c) => s.onContentChange(c)), { onOpenChange: a } = s;
|
|
487
|
+
return Fo(), l.useEffect(() => {
|
|
488
|
+
const c = () => {
|
|
489
|
+
a(!1);
|
|
489
490
|
};
|
|
490
|
-
return window.addEventListener("blur",
|
|
491
|
-
window.removeEventListener("blur",
|
|
491
|
+
return window.addEventListener("blur", c), window.addEventListener("resize", c), () => {
|
|
492
|
+
window.removeEventListener("blur", c), window.removeEventListener("resize", c);
|
|
492
493
|
};
|
|
493
|
-
}, [
|
|
494
|
-
|
|
494
|
+
}, [a]), /* @__PURE__ */ b(jo, { allowPinchZoom: !0, children: /* @__PURE__ */ b(
|
|
495
|
+
Do,
|
|
495
496
|
{
|
|
496
497
|
asChild: !0,
|
|
497
|
-
onEscapeKeyDown:
|
|
498
|
-
onPointerDownOutside:
|
|
499
|
-
onFocusOutside: (
|
|
500
|
-
|
|
498
|
+
onEscapeKeyDown: t,
|
|
499
|
+
onPointerDownOutside: n,
|
|
500
|
+
onFocusOutside: (c) => {
|
|
501
|
+
c.preventDefault();
|
|
501
502
|
},
|
|
502
503
|
onDismiss: () => {
|
|
503
|
-
var
|
|
504
|
-
|
|
504
|
+
var c;
|
|
505
|
+
s.onOpenChange(!1), (c = s.trigger) == null || c.focus({ preventScroll: !0 });
|
|
505
506
|
},
|
|
506
|
-
children: /* @__PURE__ */
|
|
507
|
-
|
|
507
|
+
children: /* @__PURE__ */ b(
|
|
508
|
+
Qo,
|
|
508
509
|
{
|
|
509
510
|
role: "listbox",
|
|
510
|
-
id:
|
|
511
|
-
"data-state":
|
|
512
|
-
onContextMenu: (
|
|
513
|
-
...
|
|
514
|
-
ref:
|
|
511
|
+
id: s.contentId,
|
|
512
|
+
"data-state": s.open ? "open" : "closed",
|
|
513
|
+
onContextMenu: (c) => c.preventDefault(),
|
|
514
|
+
...r,
|
|
515
|
+
ref: i,
|
|
515
516
|
style: {
|
|
516
517
|
// flex layout so we can place the scroll buttons properly
|
|
517
518
|
display: "flex",
|
|
518
519
|
flexDirection: "column",
|
|
519
520
|
// reset the outline by default as the content MAY get focused
|
|
520
521
|
outline: "none",
|
|
521
|
-
...
|
|
522
|
+
...r.style
|
|
522
523
|
}
|
|
523
524
|
}
|
|
524
525
|
)
|
|
@@ -526,21 +527,21 @@ const ao = 10, It = s.forwardRef(
|
|
|
526
527
|
) });
|
|
527
528
|
}
|
|
528
529
|
);
|
|
529
|
-
|
|
530
|
-
const
|
|
531
|
-
(
|
|
532
|
-
const { align:
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
|
|
530
|
+
Jo.displayName = "ComboboxContentImpl";
|
|
531
|
+
const Qo = l.forwardRef(
|
|
532
|
+
(e, o) => {
|
|
533
|
+
const { align: t = "start", collisionPadding: n = pr, ...r } = e;
|
|
534
|
+
return /* @__PURE__ */ b(
|
|
535
|
+
Pe.Content,
|
|
535
536
|
{
|
|
536
|
-
...
|
|
537
|
-
ref:
|
|
538
|
-
align:
|
|
539
|
-
collisionPadding:
|
|
537
|
+
...r,
|
|
538
|
+
ref: o,
|
|
539
|
+
align: t,
|
|
540
|
+
collisionPadding: n,
|
|
540
541
|
style: {
|
|
541
542
|
// Ensure border-box for floating-ui calculations
|
|
542
543
|
boxSizing: "border-box",
|
|
543
|
-
...
|
|
544
|
+
...r.style,
|
|
544
545
|
"--radix-combobox-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
545
546
|
"--radix-combobox-content-available-width": "var(--radix-popper-available-width)",
|
|
546
547
|
"--radix-combobox-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -551,21 +552,21 @@ const Tt = s.forwardRef(
|
|
|
551
552
|
);
|
|
552
553
|
}
|
|
553
554
|
);
|
|
554
|
-
|
|
555
|
-
const
|
|
556
|
-
const
|
|
557
|
-
return
|
|
558
|
-
|
|
555
|
+
Qo.displayName = "ComboboxPopperPosition";
|
|
556
|
+
const en = "ComboboxViewport", tn = l.forwardRef((e, o) => {
|
|
557
|
+
const t = pe(en), n = z(o, t.onViewportChange), s = l.useMemo(() => l.Children.toArray(e.children), [e.children]).length;
|
|
558
|
+
return t.virtualized === !0 || t.virtualized === "auto" && s > 100 ? /* @__PURE__ */ b(Ce.Slot, { scope: void 0, children: /* @__PURE__ */ b(
|
|
559
|
+
Ho,
|
|
559
560
|
{
|
|
560
|
-
...
|
|
561
|
-
ref:
|
|
562
|
-
getItemCount: () =>
|
|
563
|
-
estimatedItemSize:
|
|
564
|
-
overscan:
|
|
565
|
-
onViewportChange:
|
|
561
|
+
...e,
|
|
562
|
+
ref: n,
|
|
563
|
+
getItemCount: () => s,
|
|
564
|
+
estimatedItemSize: t.estimatedItemSize,
|
|
565
|
+
overscan: t.overscan,
|
|
566
|
+
onViewportChange: t.onViewportChange
|
|
566
567
|
}
|
|
567
|
-
) }) : /* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
568
|
+
) }) : /* @__PURE__ */ it(at, { children: [
|
|
569
|
+
/* @__PURE__ */ b(
|
|
569
570
|
"style",
|
|
570
571
|
{
|
|
571
572
|
dangerouslySetInnerHTML: {
|
|
@@ -573,13 +574,13 @@ const Vt = "ComboboxViewport", Pt = s.forwardRef((o, i) => {
|
|
|
573
574
|
}
|
|
574
575
|
}
|
|
575
576
|
),
|
|
576
|
-
/* @__PURE__ */
|
|
577
|
-
|
|
577
|
+
/* @__PURE__ */ b(Ce.Slot, { scope: void 0, children: /* @__PURE__ */ b(
|
|
578
|
+
F.div,
|
|
578
579
|
{
|
|
579
580
|
"data-radix-combobox-viewport": "",
|
|
580
581
|
role: "presentation",
|
|
581
|
-
...
|
|
582
|
-
ref:
|
|
582
|
+
...e,
|
|
583
|
+
ref: n,
|
|
583
584
|
style: {
|
|
584
585
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
585
586
|
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
@@ -587,513 +588,1595 @@ const Vt = "ComboboxViewport", Pt = s.forwardRef((o, i) => {
|
|
|
587
588
|
position: "relative",
|
|
588
589
|
flex: 1,
|
|
589
590
|
overflow: "auto",
|
|
590
|
-
...
|
|
591
|
+
...e.style
|
|
591
592
|
}
|
|
592
593
|
}
|
|
593
594
|
) })
|
|
594
595
|
] });
|
|
595
596
|
});
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
const { value:
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
tn.displayName = en;
|
|
598
|
+
const lt = "ComboboxItem", [go, Bt] = Mo(lt), zt = l.forwardRef((e, o) => {
|
|
599
|
+
const { value: t, disabled: n = !1, textValue: r, ...s } = e, [i, a] = l.useState();
|
|
600
|
+
te(() => {
|
|
601
|
+
a(new DocumentFragment());
|
|
601
602
|
}, []);
|
|
602
|
-
const { onTextValueChange:
|
|
603
|
-
u((
|
|
603
|
+
const { onTextValueChange: c, textValue: d, ...y } = pe(lt), g = Ee(), [h, u] = l.useState(r ?? ""), f = y.value === t, { startsWith: m, contains: S } = Lt(y.locale, { sensitivity: "base" }), v = l.useCallback((p) => {
|
|
604
|
+
u((w) => w || ((p == null ? void 0 : p.textContent) ?? "").trim());
|
|
604
605
|
}, []);
|
|
605
|
-
return
|
|
606
|
-
f &&
|
|
607
|
-
}, [
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
|
|
606
|
+
return l.useEffect(() => {
|
|
607
|
+
f && d === void 0 && h !== "" && c(h);
|
|
608
|
+
}, [h, f, d, c]), y.autocomplete.type === "both" && h && y.filterValue && !m(h, y.filterValue) || y.autocomplete.type === "list" && y.autocomplete.filter === "startsWith" && h && d && !m(h, d) || y.autocomplete.type === "list" && y.autocomplete.filter === "contains" && h && d && !S(h, d) ? i ? ct.createPortal(
|
|
609
|
+
/* @__PURE__ */ b(
|
|
610
|
+
go,
|
|
610
611
|
{
|
|
611
|
-
textId:
|
|
612
|
-
onTextValueChange:
|
|
612
|
+
textId: g,
|
|
613
|
+
onTextValueChange: v,
|
|
613
614
|
isSelected: f,
|
|
614
|
-
textValue:
|
|
615
|
-
children: /* @__PURE__ */
|
|
616
|
-
|
|
615
|
+
textValue: h,
|
|
616
|
+
children: /* @__PURE__ */ b(
|
|
617
|
+
Ce.ItemSlot,
|
|
617
618
|
{
|
|
618
619
|
scope: void 0,
|
|
619
|
-
value:
|
|
620
|
-
textValue:
|
|
621
|
-
disabled:
|
|
620
|
+
value: t,
|
|
621
|
+
textValue: h,
|
|
622
|
+
disabled: n,
|
|
622
623
|
type: "option",
|
|
623
624
|
isVisible: !1,
|
|
624
|
-
children: /* @__PURE__ */
|
|
625
|
+
children: /* @__PURE__ */ b(It, { ref: o, value: t, disabled: n, ...s })
|
|
625
626
|
}
|
|
626
627
|
)
|
|
627
628
|
}
|
|
628
629
|
),
|
|
629
|
-
|
|
630
|
-
) : null : /* @__PURE__ */
|
|
631
|
-
|
|
630
|
+
i
|
|
631
|
+
) : null : /* @__PURE__ */ b(
|
|
632
|
+
go,
|
|
632
633
|
{
|
|
633
|
-
textId:
|
|
634
|
-
onTextValueChange:
|
|
634
|
+
textId: g,
|
|
635
|
+
onTextValueChange: v,
|
|
635
636
|
isSelected: f,
|
|
636
|
-
textValue:
|
|
637
|
-
children: /* @__PURE__ */
|
|
638
|
-
|
|
637
|
+
textValue: h,
|
|
638
|
+
children: /* @__PURE__ */ b(
|
|
639
|
+
Ce.ItemSlot,
|
|
639
640
|
{
|
|
640
641
|
scope: void 0,
|
|
641
|
-
value:
|
|
642
|
-
textValue:
|
|
643
|
-
disabled:
|
|
642
|
+
value: t,
|
|
643
|
+
textValue: h,
|
|
644
|
+
disabled: n,
|
|
644
645
|
type: "option",
|
|
645
646
|
isVisible: !0,
|
|
646
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ b(It, { ref: o, value: t, disabled: n, ...s })
|
|
647
648
|
}
|
|
648
649
|
)
|
|
649
650
|
}
|
|
650
651
|
);
|
|
651
652
|
});
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
const { value:
|
|
655
|
-
var
|
|
656
|
-
|
|
657
|
-
},
|
|
658
|
-
var
|
|
659
|
-
return
|
|
660
|
-
}, [
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
|
|
653
|
+
zt.displayName = lt;
|
|
654
|
+
const on = "ComboboxItemImpl", It = l.forwardRef((e, o) => {
|
|
655
|
+
const { value: t, disabled: n = !1, ...r } = e, s = l.useRef(null), i = z(o, s), { getItems: a } = We(void 0), { onTextValueChange: c, visuallyFocussedItem: d, ...y } = pe(lt), { isSelected: g, textValue: h, textId: u } = Bt(on), f = () => {
|
|
656
|
+
var v;
|
|
657
|
+
n || (y.onValueChange(t), c(h), y.onOpenChange(!1), y.autocomplete.type === "both" && y.onFilterValueChange(h), (v = y.trigger) == null || v.focus({ preventScroll: !0 }));
|
|
658
|
+
}, m = l.useMemo(() => {
|
|
659
|
+
var v;
|
|
660
|
+
return d === ((v = a().find((p) => p.ref.current === s.current)) == null ? void 0 : v.ref.current);
|
|
661
|
+
}, [a, d]), S = Ee();
|
|
662
|
+
return /* @__PURE__ */ b(
|
|
663
|
+
F.div,
|
|
663
664
|
{
|
|
664
665
|
role: "option",
|
|
665
666
|
"aria-labelledby": u,
|
|
666
|
-
"data-highlighted":
|
|
667
|
-
"aria-selected":
|
|
668
|
-
"data-state":
|
|
669
|
-
"aria-disabled":
|
|
670
|
-
"data-disabled":
|
|
671
|
-
tabIndex:
|
|
672
|
-
...
|
|
673
|
-
id:
|
|
674
|
-
ref:
|
|
675
|
-
onPointerUp:
|
|
667
|
+
"data-highlighted": m ? "" : void 0,
|
|
668
|
+
"aria-selected": g && m,
|
|
669
|
+
"data-state": g ? "checked" : "unchecked",
|
|
670
|
+
"aria-disabled": n || void 0,
|
|
671
|
+
"data-disabled": n ? "" : void 0,
|
|
672
|
+
tabIndex: n ? void 0 : -1,
|
|
673
|
+
...r,
|
|
674
|
+
id: S,
|
|
675
|
+
ref: i,
|
|
676
|
+
onPointerUp: M(r.onPointerUp, f)
|
|
676
677
|
}
|
|
677
678
|
);
|
|
678
679
|
});
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
const { className:
|
|
682
|
-
return /* @__PURE__ */
|
|
680
|
+
It.displayName = on;
|
|
681
|
+
const nn = "ComboboxItemText", rn = l.forwardRef((e, o) => {
|
|
682
|
+
const { className: t, style: n, ...r } = e, s = Bt(nn), i = z(o, s.onTextValueChange);
|
|
683
|
+
return /* @__PURE__ */ b(F.span, { id: s.textId, ...r, ref: i });
|
|
683
684
|
});
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
const { isSelected:
|
|
687
|
-
return
|
|
685
|
+
rn.displayName = nn;
|
|
686
|
+
const sn = "ComboboxItemIndicator", an = l.forwardRef((e, o) => {
|
|
687
|
+
const { isSelected: t } = Bt(sn);
|
|
688
|
+
return t ? /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...e, ref: o }) : null;
|
|
688
689
|
});
|
|
689
|
-
|
|
690
|
-
const
|
|
690
|
+
an.displayName = sn;
|
|
691
|
+
const jt = "ComboboxNoValueFound", cn = l.forwardRef((e, o) => {
|
|
691
692
|
const {
|
|
692
|
-
textValue:
|
|
693
|
-
filterValue:
|
|
694
|
-
visible:
|
|
695
|
-
locale:
|
|
696
|
-
autocomplete:
|
|
697
|
-
} =
|
|
698
|
-
return
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
const f = u.filter((
|
|
702
|
-
|
|
693
|
+
textValue: t = "",
|
|
694
|
+
filterValue: n = "",
|
|
695
|
+
visible: r = !1,
|
|
696
|
+
locale: s,
|
|
697
|
+
autocomplete: i
|
|
698
|
+
} = pe(jt), [a, c] = l.useState([]), { subscribe: d } = We(void 0), { startsWith: y, contains: g } = Lt(s, { sensitivity: "base" });
|
|
699
|
+
return l.useEffect(() => {
|
|
700
|
+
const h = d((u) => {
|
|
701
|
+
if (r) {
|
|
702
|
+
const f = u.filter((m) => m.type !== "create");
|
|
703
|
+
c(f);
|
|
703
704
|
} else
|
|
704
|
-
|
|
705
|
+
c(u);
|
|
705
706
|
});
|
|
706
707
|
return () => {
|
|
707
|
-
|
|
708
|
+
h();
|
|
708
709
|
};
|
|
709
|
-
}, [
|
|
710
|
+
}, [r, d]), i.type === "none" && a.length > 0 || i.type === "list" && i.filter === "startsWith" && a.some((h) => y(h.textValue, t)) || i.type === "both" && a.some((h) => y(h.textValue, n)) || i.type === "list" && i.filter === "contains" && a.some((h) => g(h.textValue, t)) ? null : /* @__PURE__ */ b(F.div, { ...e, ref: o });
|
|
710
711
|
});
|
|
711
|
-
|
|
712
|
-
const
|
|
713
|
-
const { disabled:
|
|
714
|
-
var
|
|
715
|
-
return
|
|
716
|
-
}, [
|
|
717
|
-
var
|
|
718
|
-
!
|
|
712
|
+
cn.displayName = jt;
|
|
713
|
+
const ln = l.forwardRef((e, o) => {
|
|
714
|
+
const { disabled: t = !1, ...n } = e, r = pe(jt), { textValue: s, visuallyFocussedItem: i } = r, { getItems: a, subscribe: c } = We(void 0), d = l.useRef(null), [y, g] = l.useState(!1), h = z(o, d), u = l.useMemo(() => {
|
|
715
|
+
var S;
|
|
716
|
+
return i === ((S = a().find((v) => v.ref.current === d.current)) == null ? void 0 : S.ref.current);
|
|
717
|
+
}, [a, i]), f = Ee(), m = () => {
|
|
718
|
+
var S;
|
|
719
|
+
!t && s && (r.onValueChange(s), r.onTextValueChange(s), r.onOpenChange(!1), r.autocomplete.type === "both" && r.onFilterValueChange(s), (S = r.trigger) == null || S.focus({ preventScroll: !0 }));
|
|
719
720
|
};
|
|
720
|
-
return
|
|
721
|
-
const
|
|
722
|
-
|
|
721
|
+
return te(() => {
|
|
722
|
+
const S = c((v) => {
|
|
723
|
+
g(!v.some((p) => p.textValue === s && p.type !== "create"));
|
|
723
724
|
});
|
|
724
|
-
return
|
|
725
|
-
|
|
725
|
+
return a().length === 0 && g(!0), () => {
|
|
726
|
+
S();
|
|
726
727
|
};
|
|
727
|
-
}, [
|
|
728
|
-
|
|
728
|
+
}, [s, c, a]), (!s || !y) && !r.visible ? null : /* @__PURE__ */ b(
|
|
729
|
+
Ce.ItemSlot,
|
|
729
730
|
{
|
|
730
731
|
scope: void 0,
|
|
731
|
-
value:
|
|
732
|
-
textValue:
|
|
733
|
-
disabled:
|
|
732
|
+
value: s ?? "",
|
|
733
|
+
textValue: s ?? "",
|
|
734
|
+
disabled: t,
|
|
734
735
|
isVisible: !0,
|
|
735
736
|
type: "create",
|
|
736
|
-
children: /* @__PURE__ */
|
|
737
|
-
|
|
737
|
+
children: /* @__PURE__ */ b(
|
|
738
|
+
F.div,
|
|
738
739
|
{
|
|
739
740
|
role: "option",
|
|
740
|
-
tabIndex:
|
|
741
|
-
"aria-disabled":
|
|
742
|
-
"data-disabled":
|
|
741
|
+
tabIndex: t ? void 0 : -1,
|
|
742
|
+
"aria-disabled": t || void 0,
|
|
743
|
+
"data-disabled": t ? "" : void 0,
|
|
743
744
|
"data-highlighted": u ? "" : void 0,
|
|
744
|
-
...
|
|
745
|
+
...n,
|
|
745
746
|
id: f,
|
|
746
|
-
ref:
|
|
747
|
-
onPointerUp:
|
|
747
|
+
ref: h,
|
|
748
|
+
onPointerUp: M(n.onPointerUp, m)
|
|
748
749
|
}
|
|
749
750
|
)
|
|
750
751
|
}
|
|
751
752
|
);
|
|
752
753
|
});
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
function
|
|
756
|
-
const
|
|
757
|
-
for (let
|
|
758
|
-
if (
|
|
759
|
-
return
|
|
760
|
-
return
|
|
754
|
+
ln.displayName = "ComboboxCreateItem";
|
|
755
|
+
const fr = ur, hr = Ko, mr = Yo, gr = qo, yr = Xo, vr = Zo, br = tn, wr = zt, Sr = rn, xr = an, Cr = cn, Ir = ln;
|
|
756
|
+
function Tr(e, o) {
|
|
757
|
+
const t = Math.min(e.length, o.length);
|
|
758
|
+
for (let n = 0; n < t; n++)
|
|
759
|
+
if (e[n] !== o[n])
|
|
760
|
+
return n;
|
|
761
|
+
return t;
|
|
761
762
|
}
|
|
762
|
-
const
|
|
763
|
+
const Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
763
764
|
__proto__: null,
|
|
764
|
-
ComboboxItem:
|
|
765
|
-
Content:
|
|
766
|
-
CreateItem:
|
|
767
|
-
Icon:
|
|
768
|
-
Item:
|
|
769
|
-
ItemIndicator:
|
|
770
|
-
ItemText:
|
|
771
|
-
NoValueFound:
|
|
772
|
-
Portal:
|
|
773
|
-
Root:
|
|
774
|
-
TextInput:
|
|
775
|
-
Trigger:
|
|
776
|
-
Viewport:
|
|
765
|
+
ComboboxItem: zt,
|
|
766
|
+
Content: vr,
|
|
767
|
+
CreateItem: Ir,
|
|
768
|
+
Icon: gr,
|
|
769
|
+
Item: wr,
|
|
770
|
+
ItemIndicator: xr,
|
|
771
|
+
ItemText: Sr,
|
|
772
|
+
NoValueFound: Cr,
|
|
773
|
+
Portal: yr,
|
|
774
|
+
Root: fr,
|
|
775
|
+
TextInput: mr,
|
|
776
|
+
Trigger: hr,
|
|
777
|
+
Viewport: br
|
|
777
778
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
778
|
-
function
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
return
|
|
779
|
+
var X = function() {
|
|
780
|
+
return X = Object.assign || function(o) {
|
|
781
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) {
|
|
782
|
+
t = arguments[n];
|
|
783
|
+
for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (o[s] = t[s]);
|
|
784
|
+
}
|
|
785
|
+
return o;
|
|
786
|
+
}, X.apply(this, arguments);
|
|
787
|
+
};
|
|
788
|
+
function Ve(e, o, t) {
|
|
789
|
+
if (t || arguments.length === 2) for (var n = 0, r = o.length, s; n < r; n++)
|
|
790
|
+
(s || !(n in o)) && (s || (s = Array.prototype.slice.call(o, 0, n)), s[n] = o[n]);
|
|
791
|
+
return e.concat(s || Array.prototype.slice.call(o));
|
|
792
|
+
}
|
|
793
|
+
function Er(e) {
|
|
794
|
+
var o = /* @__PURE__ */ Object.create(null);
|
|
795
|
+
return function(t) {
|
|
796
|
+
return o[t] === void 0 && (o[t] = e(t)), o[t];
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
var Pr = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Ar = /* @__PURE__ */ Er(
|
|
800
|
+
function(e) {
|
|
801
|
+
return Pr.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
802
|
+
}
|
|
803
|
+
/* Z+1 */
|
|
804
|
+
), O = "-ms-", He = "-moz-", V = "-webkit-", un = "comm", ut = "rule", Ht = "decl", Nr = "@import", dn = "@keyframes", Rr = "@layer", pn = Math.abs, Ut = String.fromCharCode, Tt = Object.assign;
|
|
805
|
+
function Vr(e, o) {
|
|
806
|
+
return H(e, 0) ^ 45 ? (((o << 2 ^ H(e, 0)) << 2 ^ H(e, 1)) << 2 ^ H(e, 2)) << 2 ^ H(e, 3) : 0;
|
|
807
|
+
}
|
|
808
|
+
function fn(e) {
|
|
809
|
+
return e.trim();
|
|
810
|
+
}
|
|
811
|
+
function he(e, o) {
|
|
812
|
+
return (e = o.exec(e)) ? e[0] : e;
|
|
813
|
+
}
|
|
814
|
+
function P(e, o, t) {
|
|
815
|
+
return e.replace(o, t);
|
|
816
|
+
}
|
|
817
|
+
function Je(e, o, t) {
|
|
818
|
+
return e.indexOf(o, t);
|
|
819
|
+
}
|
|
820
|
+
function H(e, o) {
|
|
821
|
+
return e.charCodeAt(o) | 0;
|
|
822
|
+
}
|
|
823
|
+
function _e(e, o, t) {
|
|
824
|
+
return e.slice(o, t);
|
|
825
|
+
}
|
|
826
|
+
function de(e) {
|
|
827
|
+
return e.length;
|
|
828
|
+
}
|
|
829
|
+
function hn(e) {
|
|
830
|
+
return e.length;
|
|
831
|
+
}
|
|
832
|
+
function ze(e, o) {
|
|
833
|
+
return o.push(e), e;
|
|
834
|
+
}
|
|
835
|
+
function _r(e, o) {
|
|
836
|
+
return e.map(o).join("");
|
|
837
|
+
}
|
|
838
|
+
function yo(e, o) {
|
|
839
|
+
return e.filter(function(t) {
|
|
840
|
+
return !he(t, o);
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
var dt = 1, ke = 1, mn = 0, ie = 0, B = 0, Fe = "";
|
|
844
|
+
function pt(e, o, t, n, r, s, i, a) {
|
|
845
|
+
return { value: e, root: o, parent: t, type: n, props: r, children: s, line: dt, column: ke, length: i, return: "", siblings: a };
|
|
846
|
+
}
|
|
847
|
+
function ye(e, o) {
|
|
848
|
+
return Tt(pt("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, o);
|
|
849
|
+
}
|
|
850
|
+
function Ne(e) {
|
|
851
|
+
for (; e.root; )
|
|
852
|
+
e = ye(e.root, { children: [e] });
|
|
853
|
+
ze(e, e.siblings);
|
|
854
|
+
}
|
|
855
|
+
function kr() {
|
|
856
|
+
return B;
|
|
857
|
+
}
|
|
858
|
+
function Or() {
|
|
859
|
+
return B = ie > 0 ? H(Fe, --ie) : 0, ke--, B === 10 && (ke = 1, dt--), B;
|
|
860
|
+
}
|
|
861
|
+
function ce() {
|
|
862
|
+
return B = ie < mn ? H(Fe, ie++) : 0, ke++, B === 10 && (ke = 1, dt++), B;
|
|
863
|
+
}
|
|
864
|
+
function Se() {
|
|
865
|
+
return H(Fe, ie);
|
|
866
|
+
}
|
|
867
|
+
function Qe() {
|
|
868
|
+
return ie;
|
|
869
|
+
}
|
|
870
|
+
function ft(e, o) {
|
|
871
|
+
return _e(Fe, e, o);
|
|
872
|
+
}
|
|
873
|
+
function Et(e) {
|
|
874
|
+
switch (e) {
|
|
875
|
+
case 0:
|
|
876
|
+
case 9:
|
|
877
|
+
case 10:
|
|
878
|
+
case 13:
|
|
879
|
+
case 32:
|
|
880
|
+
return 5;
|
|
881
|
+
case 33:
|
|
882
|
+
case 43:
|
|
883
|
+
case 44:
|
|
884
|
+
case 47:
|
|
885
|
+
case 62:
|
|
886
|
+
case 64:
|
|
887
|
+
case 126:
|
|
888
|
+
case 59:
|
|
889
|
+
case 123:
|
|
890
|
+
case 125:
|
|
891
|
+
return 4;
|
|
892
|
+
case 58:
|
|
893
|
+
return 3;
|
|
894
|
+
case 34:
|
|
895
|
+
case 39:
|
|
896
|
+
case 40:
|
|
897
|
+
case 91:
|
|
898
|
+
return 2;
|
|
899
|
+
case 41:
|
|
900
|
+
case 93:
|
|
901
|
+
return 1;
|
|
902
|
+
}
|
|
903
|
+
return 0;
|
|
904
|
+
}
|
|
905
|
+
function Mr(e) {
|
|
906
|
+
return dt = ke = 1, mn = de(Fe = e), ie = 0, [];
|
|
907
|
+
}
|
|
908
|
+
function Dr(e) {
|
|
909
|
+
return Fe = "", e;
|
|
910
|
+
}
|
|
911
|
+
function bt(e) {
|
|
912
|
+
return fn(ft(ie - 1, Pt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
913
|
+
}
|
|
914
|
+
function Fr(e) {
|
|
915
|
+
for (; (B = Se()) && B < 33; )
|
|
916
|
+
ce();
|
|
917
|
+
return Et(e) > 2 || Et(B) > 3 ? "" : " ";
|
|
918
|
+
}
|
|
919
|
+
function Lr(e, o) {
|
|
920
|
+
for (; --o && ce() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
|
|
921
|
+
;
|
|
922
|
+
return ft(e, Qe() + (o < 6 && Se() == 32 && ce() == 32));
|
|
923
|
+
}
|
|
924
|
+
function Pt(e) {
|
|
925
|
+
for (; ce(); )
|
|
926
|
+
switch (B) {
|
|
927
|
+
case e:
|
|
928
|
+
return ie;
|
|
929
|
+
case 34:
|
|
930
|
+
case 39:
|
|
931
|
+
e !== 34 && e !== 39 && Pt(B);
|
|
932
|
+
break;
|
|
933
|
+
case 40:
|
|
934
|
+
e === 41 && Pt(e);
|
|
935
|
+
break;
|
|
936
|
+
case 92:
|
|
937
|
+
ce();
|
|
938
|
+
break;
|
|
939
|
+
}
|
|
940
|
+
return ie;
|
|
941
|
+
}
|
|
942
|
+
function $r(e, o) {
|
|
943
|
+
for (; ce() && e + B !== 57; )
|
|
944
|
+
if (e + B === 84 && Se() === 47)
|
|
945
|
+
break;
|
|
946
|
+
return "/*" + ft(o, ie - 1) + "*" + Ut(e === 47 ? e : ce());
|
|
947
|
+
}
|
|
948
|
+
function Br(e) {
|
|
949
|
+
for (; !Et(Se()); )
|
|
950
|
+
ce();
|
|
951
|
+
return ft(e, ie);
|
|
952
|
+
}
|
|
953
|
+
function zr(e) {
|
|
954
|
+
return Dr(et("", null, null, null, [""], e = Mr(e), 0, [0], e));
|
|
955
|
+
}
|
|
956
|
+
function et(e, o, t, n, r, s, i, a, c) {
|
|
957
|
+
for (var d = 0, y = 0, g = i, h = 0, u = 0, f = 0, m = 1, S = 1, v = 1, p = 0, w = "", C = r, E = s, T = n, x = w; S; )
|
|
958
|
+
switch (f = p, p = ce()) {
|
|
959
|
+
case 40:
|
|
960
|
+
if (f != 108 && H(x, g - 1) == 58) {
|
|
961
|
+
Je(x += P(bt(p), "&", "&\f"), "&\f", pn(d ? a[d - 1] : 0)) != -1 && (v = -1);
|
|
962
|
+
break;
|
|
963
|
+
}
|
|
964
|
+
case 34:
|
|
965
|
+
case 39:
|
|
966
|
+
case 91:
|
|
967
|
+
x += bt(p);
|
|
968
|
+
break;
|
|
969
|
+
case 9:
|
|
970
|
+
case 10:
|
|
971
|
+
case 13:
|
|
972
|
+
case 32:
|
|
973
|
+
x += Fr(f);
|
|
974
|
+
break;
|
|
975
|
+
case 92:
|
|
976
|
+
x += Lr(Qe() - 1, 7);
|
|
977
|
+
continue;
|
|
978
|
+
case 47:
|
|
979
|
+
switch (Se()) {
|
|
980
|
+
case 42:
|
|
981
|
+
case 47:
|
|
982
|
+
ze(jr($r(ce(), Qe()), o, t, c), c);
|
|
983
|
+
break;
|
|
984
|
+
default:
|
|
985
|
+
x += "/";
|
|
986
|
+
}
|
|
987
|
+
break;
|
|
988
|
+
case 123 * m:
|
|
989
|
+
a[d++] = de(x) * v;
|
|
990
|
+
case 125 * m:
|
|
991
|
+
case 59:
|
|
992
|
+
case 0:
|
|
993
|
+
switch (p) {
|
|
994
|
+
case 0:
|
|
995
|
+
case 125:
|
|
996
|
+
S = 0;
|
|
997
|
+
case 59 + y:
|
|
998
|
+
v == -1 && (x = P(x, /\f/g, "")), u > 0 && de(x) - g && ze(u > 32 ? bo(x + ";", n, t, g - 1, c) : bo(P(x, " ", "") + ";", n, t, g - 2, c), c);
|
|
999
|
+
break;
|
|
1000
|
+
case 59:
|
|
1001
|
+
x += ";";
|
|
1002
|
+
default:
|
|
1003
|
+
if (ze(T = vo(x, o, t, d, y, r, a, w, C = [], E = [], g, s), s), p === 123)
|
|
1004
|
+
if (y === 0)
|
|
1005
|
+
et(x, o, T, T, C, s, g, a, E);
|
|
1006
|
+
else
|
|
1007
|
+
switch (h === 99 && H(x, 3) === 110 ? 100 : h) {
|
|
1008
|
+
case 100:
|
|
1009
|
+
case 108:
|
|
1010
|
+
case 109:
|
|
1011
|
+
case 115:
|
|
1012
|
+
et(e, T, T, n && ze(vo(e, T, T, 0, 0, r, a, w, r, C = [], g, E), E), r, E, g, a, n ? C : E);
|
|
1013
|
+
break;
|
|
1014
|
+
default:
|
|
1015
|
+
et(x, T, T, T, [""], E, 0, a, E);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
d = y = u = 0, m = v = 1, w = x = "", g = i;
|
|
1019
|
+
break;
|
|
1020
|
+
case 58:
|
|
1021
|
+
g = 1 + de(x), u = f;
|
|
1022
|
+
default:
|
|
1023
|
+
if (m < 1) {
|
|
1024
|
+
if (p == 123)
|
|
1025
|
+
--m;
|
|
1026
|
+
else if (p == 125 && m++ == 0 && Or() == 125)
|
|
1027
|
+
continue;
|
|
1028
|
+
}
|
|
1029
|
+
switch (x += Ut(p), p * m) {
|
|
1030
|
+
case 38:
|
|
1031
|
+
v = y > 0 ? 1 : (x += "\f", -1);
|
|
1032
|
+
break;
|
|
1033
|
+
case 44:
|
|
1034
|
+
a[d++] = (de(x) - 1) * v, v = 1;
|
|
1035
|
+
break;
|
|
1036
|
+
case 64:
|
|
1037
|
+
Se() === 45 && (x += bt(ce())), h = Se(), y = g = de(w = x += Br(Qe())), p++;
|
|
1038
|
+
break;
|
|
1039
|
+
case 45:
|
|
1040
|
+
f === 45 && de(x) == 2 && (m = 0);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
return s;
|
|
1044
|
+
}
|
|
1045
|
+
function vo(e, o, t, n, r, s, i, a, c, d, y, g) {
|
|
1046
|
+
for (var h = r - 1, u = r === 0 ? s : [""], f = hn(u), m = 0, S = 0, v = 0; m < n; ++m)
|
|
1047
|
+
for (var p = 0, w = _e(e, h + 1, h = pn(S = i[m])), C = e; p < f; ++p)
|
|
1048
|
+
(C = fn(S > 0 ? u[p] + " " + w : P(w, /&\f/g, u[p]))) && (c[v++] = C);
|
|
1049
|
+
return pt(e, o, t, r === 0 ? ut : a, c, d, y, g);
|
|
1050
|
+
}
|
|
1051
|
+
function jr(e, o, t, n) {
|
|
1052
|
+
return pt(e, o, t, un, Ut(kr()), _e(e, 2, -2), 0, n);
|
|
1053
|
+
}
|
|
1054
|
+
function bo(e, o, t, n, r) {
|
|
1055
|
+
return pt(e, o, t, Ht, _e(e, 0, n), _e(e, n + 1, -1), n, r);
|
|
1056
|
+
}
|
|
1057
|
+
function gn(e, o, t) {
|
|
1058
|
+
switch (Vr(e, o)) {
|
|
1059
|
+
case 5103:
|
|
1060
|
+
return V + "print-" + e + e;
|
|
1061
|
+
case 5737:
|
|
1062
|
+
case 4201:
|
|
1063
|
+
case 3177:
|
|
1064
|
+
case 3433:
|
|
1065
|
+
case 1641:
|
|
1066
|
+
case 4457:
|
|
1067
|
+
case 2921:
|
|
1068
|
+
case 5572:
|
|
1069
|
+
case 6356:
|
|
1070
|
+
case 5844:
|
|
1071
|
+
case 3191:
|
|
1072
|
+
case 6645:
|
|
1073
|
+
case 3005:
|
|
1074
|
+
case 6391:
|
|
1075
|
+
case 5879:
|
|
1076
|
+
case 5623:
|
|
1077
|
+
case 6135:
|
|
1078
|
+
case 4599:
|
|
1079
|
+
case 4855:
|
|
1080
|
+
case 4215:
|
|
1081
|
+
case 6389:
|
|
1082
|
+
case 5109:
|
|
1083
|
+
case 5365:
|
|
1084
|
+
case 5621:
|
|
1085
|
+
case 3829:
|
|
1086
|
+
return V + e + e;
|
|
1087
|
+
case 4789:
|
|
1088
|
+
return He + e + e;
|
|
1089
|
+
case 5349:
|
|
1090
|
+
case 4246:
|
|
1091
|
+
case 4810:
|
|
1092
|
+
case 6968:
|
|
1093
|
+
case 2756:
|
|
1094
|
+
return V + e + He + e + O + e + e;
|
|
1095
|
+
case 5936:
|
|
1096
|
+
switch (H(e, o + 11)) {
|
|
1097
|
+
case 114:
|
|
1098
|
+
return V + e + O + P(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
1099
|
+
case 108:
|
|
1100
|
+
return V + e + O + P(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
1101
|
+
case 45:
|
|
1102
|
+
return V + e + O + P(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
1103
|
+
}
|
|
1104
|
+
case 6828:
|
|
1105
|
+
case 4268:
|
|
1106
|
+
case 2903:
|
|
1107
|
+
return V + e + O + e + e;
|
|
1108
|
+
case 6165:
|
|
1109
|
+
return V + e + O + "flex-" + e + e;
|
|
1110
|
+
case 5187:
|
|
1111
|
+
return V + e + P(e, /(\w+).+(:[^]+)/, V + "box-$1$2" + O + "flex-$1$2") + e;
|
|
1112
|
+
case 5443:
|
|
1113
|
+
return V + e + O + "flex-item-" + P(e, /flex-|-self/g, "") + (he(e, /flex-|baseline/) ? "" : O + "grid-row-" + P(e, /flex-|-self/g, "")) + e;
|
|
1114
|
+
case 4675:
|
|
1115
|
+
return V + e + O + "flex-line-pack" + P(e, /align-content|flex-|-self/g, "") + e;
|
|
1116
|
+
case 5548:
|
|
1117
|
+
return V + e + O + P(e, "shrink", "negative") + e;
|
|
1118
|
+
case 5292:
|
|
1119
|
+
return V + e + O + P(e, "basis", "preferred-size") + e;
|
|
1120
|
+
case 6060:
|
|
1121
|
+
return V + "box-" + P(e, "-grow", "") + V + e + O + P(e, "grow", "positive") + e;
|
|
1122
|
+
case 4554:
|
|
1123
|
+
return V + P(e, /([^-])(transform)/g, "$1" + V + "$2") + e;
|
|
1124
|
+
case 6187:
|
|
1125
|
+
return P(P(P(e, /(zoom-|grab)/, V + "$1"), /(image-set)/, V + "$1"), e, "") + e;
|
|
1126
|
+
case 5495:
|
|
1127
|
+
case 3959:
|
|
1128
|
+
return P(e, /(image-set\([^]*)/, V + "$1$`$1");
|
|
1129
|
+
case 4968:
|
|
1130
|
+
return P(P(e, /(.+:)(flex-)?(.*)/, V + "box-pack:$3" + O + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + V + e + e;
|
|
1131
|
+
case 4200:
|
|
1132
|
+
if (!he(e, /flex-|baseline/)) return O + "grid-column-align" + _e(e, o) + e;
|
|
1133
|
+
break;
|
|
1134
|
+
case 2592:
|
|
1135
|
+
case 3360:
|
|
1136
|
+
return O + P(e, "template-", "") + e;
|
|
1137
|
+
case 4384:
|
|
1138
|
+
case 3616:
|
|
1139
|
+
return t && t.some(function(n, r) {
|
|
1140
|
+
return o = r, he(n.props, /grid-\w+-end/);
|
|
1141
|
+
}) ? ~Je(e + (t = t[o].value), "span", 0) ? e : O + P(e, "-start", "") + e + O + "grid-row-span:" + (~Je(t, "span", 0) ? he(t, /\d+/) : +he(t, /\d+/) - +he(e, /\d+/)) + ";" : O + P(e, "-start", "") + e;
|
|
1142
|
+
case 4896:
|
|
1143
|
+
case 4128:
|
|
1144
|
+
return t && t.some(function(n) {
|
|
1145
|
+
return he(n.props, /grid-\w+-start/);
|
|
1146
|
+
}) ? e : O + P(P(e, "-end", "-span"), "span ", "") + e;
|
|
1147
|
+
case 4095:
|
|
1148
|
+
case 3583:
|
|
1149
|
+
case 4068:
|
|
1150
|
+
case 2532:
|
|
1151
|
+
return P(e, /(.+)-inline(.+)/, V + "$1$2") + e;
|
|
1152
|
+
case 8116:
|
|
1153
|
+
case 7059:
|
|
1154
|
+
case 5753:
|
|
1155
|
+
case 5535:
|
|
1156
|
+
case 5445:
|
|
1157
|
+
case 5701:
|
|
1158
|
+
case 4933:
|
|
1159
|
+
case 4677:
|
|
1160
|
+
case 5533:
|
|
1161
|
+
case 5789:
|
|
1162
|
+
case 5021:
|
|
1163
|
+
case 4765:
|
|
1164
|
+
if (de(e) - 1 - o > 6)
|
|
1165
|
+
switch (H(e, o + 1)) {
|
|
1166
|
+
case 109:
|
|
1167
|
+
if (H(e, o + 4) !== 45)
|
|
1168
|
+
break;
|
|
1169
|
+
case 102:
|
|
1170
|
+
return P(e, /(.+:)(.+)-([^]+)/, "$1" + V + "$2-$3$1" + He + (H(e, o + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
1171
|
+
case 115:
|
|
1172
|
+
return ~Je(e, "stretch", 0) ? gn(P(e, "stretch", "fill-available"), o, t) + e : e;
|
|
1173
|
+
}
|
|
1174
|
+
break;
|
|
1175
|
+
case 5152:
|
|
1176
|
+
case 5920:
|
|
1177
|
+
return P(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, r, s, i, a, c, d) {
|
|
1178
|
+
return O + r + ":" + s + d + (i ? O + r + "-span:" + (a ? c : +c - +s) + d : "") + e;
|
|
1179
|
+
});
|
|
1180
|
+
case 4949:
|
|
1181
|
+
if (H(e, o + 6) === 121)
|
|
1182
|
+
return P(e, ":", ":" + V) + e;
|
|
1183
|
+
break;
|
|
1184
|
+
case 6444:
|
|
1185
|
+
switch (H(e, H(e, 14) === 45 ? 18 : 11)) {
|
|
1186
|
+
case 120:
|
|
1187
|
+
return P(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + V + (H(e, 14) === 45 ? "inline-" : "") + "box$3$1" + V + "$2$3$1" + O + "$2box$3") + e;
|
|
1188
|
+
case 100:
|
|
1189
|
+
return P(e, ":", ":" + O) + e;
|
|
1190
|
+
}
|
|
1191
|
+
break;
|
|
1192
|
+
case 5719:
|
|
1193
|
+
case 2647:
|
|
1194
|
+
case 2135:
|
|
1195
|
+
case 3927:
|
|
1196
|
+
case 2391:
|
|
1197
|
+
return P(e, "scroll-", "scroll-snap-") + e;
|
|
1198
|
+
}
|
|
1199
|
+
return e;
|
|
1200
|
+
}
|
|
1201
|
+
function nt(e, o) {
|
|
1202
|
+
for (var t = "", n = 0; n < e.length; n++)
|
|
1203
|
+
t += o(e[n], n, e, o) || "";
|
|
1204
|
+
return t;
|
|
1205
|
+
}
|
|
1206
|
+
function Hr(e, o, t, n) {
|
|
1207
|
+
switch (e.type) {
|
|
1208
|
+
case Rr:
|
|
1209
|
+
if (e.children.length) break;
|
|
1210
|
+
case Nr:
|
|
1211
|
+
case Ht:
|
|
1212
|
+
return e.return = e.return || e.value;
|
|
1213
|
+
case un:
|
|
1214
|
+
return "";
|
|
1215
|
+
case dn:
|
|
1216
|
+
return e.return = e.value + "{" + nt(e.children, n) + "}";
|
|
1217
|
+
case ut:
|
|
1218
|
+
if (!de(e.value = e.props.join(","))) return "";
|
|
1219
|
+
}
|
|
1220
|
+
return de(t = nt(e.children, n)) ? e.return = e.value + "{" + t + "}" : "";
|
|
1221
|
+
}
|
|
1222
|
+
function Ur(e) {
|
|
1223
|
+
var o = hn(e);
|
|
1224
|
+
return function(t, n, r, s) {
|
|
1225
|
+
for (var i = "", a = 0; a < o; a++)
|
|
1226
|
+
i += e[a](t, n, r, s) || "";
|
|
1227
|
+
return i;
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
function Wr(e) {
|
|
1231
|
+
return function(o) {
|
|
1232
|
+
o.root || (o = o.return) && e(o);
|
|
1233
|
+
};
|
|
1234
|
+
}
|
|
1235
|
+
function Kr(e, o, t, n) {
|
|
1236
|
+
if (e.length > -1 && !e.return)
|
|
1237
|
+
switch (e.type) {
|
|
1238
|
+
case Ht:
|
|
1239
|
+
e.return = gn(e.value, e.length, t);
|
|
1240
|
+
return;
|
|
1241
|
+
case dn:
|
|
1242
|
+
return nt([ye(e, { value: P(e.value, "@", "@" + V) })], n);
|
|
1243
|
+
case ut:
|
|
1244
|
+
if (e.length)
|
|
1245
|
+
return _r(t = e.props, function(r) {
|
|
1246
|
+
switch (he(r, n = /(::plac\w+|:read-\w+)/)) {
|
|
1247
|
+
case ":read-only":
|
|
1248
|
+
case ":read-write":
|
|
1249
|
+
Ne(ye(e, { props: [P(r, /:(read-\w+)/, ":" + He + "$1")] })), Ne(ye(e, { props: [r] })), Tt(e, { props: yo(t, n) });
|
|
1250
|
+
break;
|
|
1251
|
+
case "::placeholder":
|
|
1252
|
+
Ne(ye(e, { props: [P(r, /:(plac\w+)/, ":" + V + "input-$1")] })), Ne(ye(e, { props: [P(r, /:(plac\w+)/, ":" + He + "$1")] })), Ne(ye(e, { props: [P(r, /:(plac\w+)/, O + "input-$1")] })), Ne(ye(e, { props: [r] })), Tt(e, { props: yo(t, n) });
|
|
1253
|
+
break;
|
|
1254
|
+
}
|
|
1255
|
+
return "";
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
var Gr = {
|
|
1260
|
+
animationIterationCount: 1,
|
|
1261
|
+
aspectRatio: 1,
|
|
1262
|
+
borderImageOutset: 1,
|
|
1263
|
+
borderImageSlice: 1,
|
|
1264
|
+
borderImageWidth: 1,
|
|
1265
|
+
boxFlex: 1,
|
|
1266
|
+
boxFlexGroup: 1,
|
|
1267
|
+
boxOrdinalGroup: 1,
|
|
1268
|
+
columnCount: 1,
|
|
1269
|
+
columns: 1,
|
|
1270
|
+
flex: 1,
|
|
1271
|
+
flexGrow: 1,
|
|
1272
|
+
flexPositive: 1,
|
|
1273
|
+
flexShrink: 1,
|
|
1274
|
+
flexNegative: 1,
|
|
1275
|
+
flexOrder: 1,
|
|
1276
|
+
gridRow: 1,
|
|
1277
|
+
gridRowEnd: 1,
|
|
1278
|
+
gridRowSpan: 1,
|
|
1279
|
+
gridRowStart: 1,
|
|
1280
|
+
gridColumn: 1,
|
|
1281
|
+
gridColumnEnd: 1,
|
|
1282
|
+
gridColumnSpan: 1,
|
|
1283
|
+
gridColumnStart: 1,
|
|
1284
|
+
msGridRow: 1,
|
|
1285
|
+
msGridRowSpan: 1,
|
|
1286
|
+
msGridColumn: 1,
|
|
1287
|
+
msGridColumnSpan: 1,
|
|
1288
|
+
fontWeight: 1,
|
|
1289
|
+
lineHeight: 1,
|
|
1290
|
+
opacity: 1,
|
|
1291
|
+
order: 1,
|
|
1292
|
+
orphans: 1,
|
|
1293
|
+
tabSize: 1,
|
|
1294
|
+
widows: 1,
|
|
1295
|
+
zIndex: 1,
|
|
1296
|
+
zoom: 1,
|
|
1297
|
+
WebkitLineClamp: 1,
|
|
1298
|
+
// SVG-related properties
|
|
1299
|
+
fillOpacity: 1,
|
|
1300
|
+
floodOpacity: 1,
|
|
1301
|
+
stopOpacity: 1,
|
|
1302
|
+
strokeDasharray: 1,
|
|
1303
|
+
strokeDashoffset: 1,
|
|
1304
|
+
strokeMiterlimit: 1,
|
|
1305
|
+
strokeOpacity: 1,
|
|
1306
|
+
strokeWidth: 1
|
|
1307
|
+
}, Ie = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", yn = "active", vn = "data-styled-version", ht = "6.1.11", Wt = `/*!sc*/
|
|
1308
|
+
`, Kt = typeof window < "u" && "HTMLElement" in window, Yr = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), wo = /invalid hook call/i, Ye = /* @__PURE__ */ new Set(), qr = function(e, o) {
|
|
1309
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1310
|
+
var t = o ? ' with the id of "'.concat(o, '"') : "", n = "The component ".concat(e).concat(t, ` has been created dynamically.
|
|
1311
|
+
`) + `You may see this warning because you've called styled inside another component.
|
|
1312
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`, r = console.error;
|
|
1313
|
+
try {
|
|
1314
|
+
var s = !0;
|
|
1315
|
+
console.error = function(i) {
|
|
1316
|
+
for (var a = [], c = 1; c < arguments.length; c++) a[c - 1] = arguments[c];
|
|
1317
|
+
wo.test(i) ? (s = !1, Ye.delete(n)) : r.apply(void 0, Ve([i], a, !1));
|
|
1318
|
+
}, Yn(), s && !Ye.has(n) && (console.warn(n), Ye.add(n));
|
|
1319
|
+
} catch (i) {
|
|
1320
|
+
wo.test(i.message) && Ye.delete(n);
|
|
1321
|
+
} finally {
|
|
1322
|
+
console.error = r;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
}, mt = Object.freeze([]), Oe = Object.freeze({});
|
|
1326
|
+
function Xr(e, o, t) {
|
|
1327
|
+
return t === void 0 && (t = Oe), e.theme !== t.theme && e.theme || o || t.theme;
|
|
1328
|
+
}
|
|
1329
|
+
var At = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Zr = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Jr = /(^-|-$)/g;
|
|
1330
|
+
function So(e) {
|
|
1331
|
+
return e.replace(Zr, "-").replace(Jr, "");
|
|
1332
|
+
}
|
|
1333
|
+
var Qr = /(a)(d)/gi, qe = 52, xo = function(e) {
|
|
1334
|
+
return String.fromCharCode(e + (e > 25 ? 39 : 97));
|
|
1335
|
+
};
|
|
1336
|
+
function Nt(e) {
|
|
1337
|
+
var o, t = "";
|
|
1338
|
+
for (o = Math.abs(e); o > qe; o = o / qe | 0) t = xo(o % qe) + t;
|
|
1339
|
+
return (xo(o % qe) + t).replace(Qr, "$1-$2");
|
|
1340
|
+
}
|
|
1341
|
+
var wt, bn = 5381, be = function(e, o) {
|
|
1342
|
+
for (var t = o.length; t; ) e = 33 * e ^ o.charCodeAt(--t);
|
|
1343
|
+
return e;
|
|
1344
|
+
}, wn = function(e) {
|
|
1345
|
+
return be(bn, e);
|
|
1346
|
+
};
|
|
1347
|
+
function es(e) {
|
|
1348
|
+
return Nt(wn(e) >>> 0);
|
|
1349
|
+
}
|
|
1350
|
+
function Sn(e) {
|
|
1351
|
+
return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
|
|
1352
|
+
}
|
|
1353
|
+
function St(e) {
|
|
1354
|
+
return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
|
|
1355
|
+
}
|
|
1356
|
+
var xn = typeof Symbol == "function" && Symbol.for, Cn = xn ? Symbol.for("react.memo") : 60115, ts = xn ? Symbol.for("react.forward_ref") : 60112, os = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, ns = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, In = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, rs = ((wt = {})[ts] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, wt[Cn] = In, wt);
|
|
1357
|
+
function Co(e) {
|
|
1358
|
+
return ("type" in (o = e) && o.type.$$typeof) === Cn ? In : "$$typeof" in e ? rs[e.$$typeof] : os;
|
|
1359
|
+
var o;
|
|
1360
|
+
}
|
|
1361
|
+
var ss = Object.defineProperty, is = Object.getOwnPropertyNames, Io = Object.getOwnPropertySymbols, as = Object.getOwnPropertyDescriptor, cs = Object.getPrototypeOf, To = Object.prototype;
|
|
1362
|
+
function Tn(e, o, t) {
|
|
1363
|
+
if (typeof o != "string") {
|
|
1364
|
+
if (To) {
|
|
1365
|
+
var n = cs(o);
|
|
1366
|
+
n && n !== To && Tn(e, n, t);
|
|
1367
|
+
}
|
|
1368
|
+
var r = is(o);
|
|
1369
|
+
Io && (r = r.concat(Io(o)));
|
|
1370
|
+
for (var s = Co(e), i = Co(o), a = 0; a < r.length; ++a) {
|
|
1371
|
+
var c = r[a];
|
|
1372
|
+
if (!(c in ns || t && t[c] || i && c in i || s && c in s)) {
|
|
1373
|
+
var d = as(o, c);
|
|
1374
|
+
try {
|
|
1375
|
+
ss(e, c, d);
|
|
1376
|
+
} catch {
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
return e;
|
|
1382
|
+
}
|
|
1383
|
+
function Me(e) {
|
|
1384
|
+
return typeof e == "function";
|
|
1385
|
+
}
|
|
1386
|
+
function Gt(e) {
|
|
1387
|
+
return typeof e == "object" && "styledComponentId" in e;
|
|
1388
|
+
}
|
|
1389
|
+
function we(e, o) {
|
|
1390
|
+
return e && o ? "".concat(e, " ").concat(o) : e || o || "";
|
|
1391
|
+
}
|
|
1392
|
+
function Eo(e, o) {
|
|
1393
|
+
if (e.length === 0) return "";
|
|
1394
|
+
for (var t = e[0], n = 1; n < e.length; n++) t += e[n];
|
|
1395
|
+
return t;
|
|
1396
|
+
}
|
|
1397
|
+
function De(e) {
|
|
1398
|
+
return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
|
|
1399
|
+
}
|
|
1400
|
+
function Rt(e, o, t) {
|
|
1401
|
+
if (t === void 0 && (t = !1), !t && !De(e) && !Array.isArray(e)) return o;
|
|
1402
|
+
if (Array.isArray(o)) for (var n = 0; n < o.length; n++) e[n] = Rt(e[n], o[n]);
|
|
1403
|
+
else if (De(o)) for (var n in o) e[n] = Rt(e[n], o[n]);
|
|
1404
|
+
return e;
|
|
1405
|
+
}
|
|
1406
|
+
function Yt(e, o) {
|
|
1407
|
+
Object.defineProperty(e, "toString", { value: o });
|
|
1408
|
+
}
|
|
1409
|
+
var ls = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
|
|
1410
|
+
|
|
1411
|
+
`, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
1412
|
+
|
|
1413
|
+
- Are you trying to reuse it across renders?
|
|
1414
|
+
- Are you accidentally calling collectStyles twice?
|
|
1415
|
+
|
|
1416
|
+
`, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
1417
|
+
|
|
1418
|
+
`, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
1419
|
+
|
|
1420
|
+
- Does this error occur on the client and is your target falsy?
|
|
1421
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
1422
|
+
|
|
1423
|
+
`, 5: `The clone method cannot be used on the client!
|
|
1424
|
+
|
|
1425
|
+
- Are you running in a client-like environment on the server?
|
|
1426
|
+
- Are you trying to run SSR on the client?
|
|
1427
|
+
|
|
1428
|
+
`, 6: `Trying to insert a new style tag, but the given Node is unmounted!
|
|
1429
|
+
|
|
1430
|
+
- Are you using a custom target that isn't mounted?
|
|
1431
|
+
- Does your document not have a valid head element?
|
|
1432
|
+
- Have you accidentally removed a style tag manually?
|
|
1433
|
+
|
|
1434
|
+
`, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
|
|
1435
|
+
|
|
1436
|
+
`, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
1437
|
+
|
|
1438
|
+
`, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
1439
|
+
|
|
1440
|
+
`, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
1441
|
+
|
|
1442
|
+
`, 14: `ThemeProvider: "theme" prop is required.
|
|
1443
|
+
|
|
1444
|
+
`, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
|
|
1445
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
1446
|
+
as for instance in your render method then you may be running into this limitation.
|
|
1447
|
+
|
|
1448
|
+
`, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
|
|
1449
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
1450
|
+
`, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
|
|
1451
|
+
function us() {
|
|
1452
|
+
for (var e = [], o = 0; o < arguments.length; o++) e[o] = arguments[o];
|
|
1453
|
+
for (var t = e[0], n = [], r = 1, s = e.length; r < s; r += 1) n.push(e[r]);
|
|
1454
|
+
return n.forEach(function(i) {
|
|
1455
|
+
t = t.replace(/%[a-z]/, i);
|
|
1456
|
+
}), t;
|
|
1457
|
+
}
|
|
1458
|
+
function Le(e) {
|
|
1459
|
+
for (var o = [], t = 1; t < arguments.length; t++) o[t - 1] = arguments[t];
|
|
1460
|
+
return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(o.length > 0 ? " Args: ".concat(o.join(", ")) : "")) : new Error(us.apply(void 0, Ve([ls[e]], o, !1)).trim());
|
|
1461
|
+
}
|
|
1462
|
+
var ds = function() {
|
|
1463
|
+
function e(o) {
|
|
1464
|
+
this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = o;
|
|
1465
|
+
}
|
|
1466
|
+
return e.prototype.indexOfGroup = function(o) {
|
|
1467
|
+
for (var t = 0, n = 0; n < o; n++) t += this.groupSizes[n];
|
|
1468
|
+
return t;
|
|
1469
|
+
}, e.prototype.insertRules = function(o, t) {
|
|
1470
|
+
if (o >= this.groupSizes.length) {
|
|
1471
|
+
for (var n = this.groupSizes, r = n.length, s = r; o >= s; ) if ((s <<= 1) < 0) throw Le(16, "".concat(o));
|
|
1472
|
+
this.groupSizes = new Uint32Array(s), this.groupSizes.set(n), this.length = s;
|
|
1473
|
+
for (var i = r; i < s; i++) this.groupSizes[i] = 0;
|
|
1474
|
+
}
|
|
1475
|
+
for (var a = this.indexOfGroup(o + 1), c = (i = 0, t.length); i < c; i++) this.tag.insertRule(a, t[i]) && (this.groupSizes[o]++, a++);
|
|
1476
|
+
}, e.prototype.clearGroup = function(o) {
|
|
1477
|
+
if (o < this.length) {
|
|
1478
|
+
var t = this.groupSizes[o], n = this.indexOfGroup(o), r = n + t;
|
|
1479
|
+
this.groupSizes[o] = 0;
|
|
1480
|
+
for (var s = n; s < r; s++) this.tag.deleteRule(n);
|
|
1481
|
+
}
|
|
1482
|
+
}, e.prototype.getGroup = function(o) {
|
|
1483
|
+
var t = "";
|
|
1484
|
+
if (o >= this.length || this.groupSizes[o] === 0) return t;
|
|
1485
|
+
for (var n = this.groupSizes[o], r = this.indexOfGroup(o), s = r + n, i = r; i < s; i++) t += "".concat(this.tag.getRule(i)).concat(Wt);
|
|
1486
|
+
return t;
|
|
1487
|
+
}, e;
|
|
1488
|
+
}(), ps = 1 << 30, tt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map(), ot = 1, Xe = function(e) {
|
|
1489
|
+
if (tt.has(e)) return tt.get(e);
|
|
1490
|
+
for (; rt.has(ot); ) ot++;
|
|
1491
|
+
var o = ot++;
|
|
1492
|
+
if (process.env.NODE_ENV !== "production" && ((0 | o) < 0 || o > ps)) throw Le(16, "".concat(o));
|
|
1493
|
+
return tt.set(e, o), rt.set(o, e), o;
|
|
1494
|
+
}, fs = function(e, o) {
|
|
1495
|
+
ot = o + 1, tt.set(e, o), rt.set(o, e);
|
|
1496
|
+
}, hs = "style[".concat(Ie, "][").concat(vn, '="').concat(ht, '"]'), ms = new RegExp("^".concat(Ie, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), gs = function(e, o, t) {
|
|
1497
|
+
for (var n, r = t.split(","), s = 0, i = r.length; s < i; s++) (n = r[s]) && e.registerName(o, n);
|
|
1498
|
+
}, ys = function(e, o) {
|
|
1499
|
+
for (var t, n = ((t = o.textContent) !== null && t !== void 0 ? t : "").split(Wt), r = [], s = 0, i = n.length; s < i; s++) {
|
|
1500
|
+
var a = n[s].trim();
|
|
1501
|
+
if (a) {
|
|
1502
|
+
var c = a.match(ms);
|
|
1503
|
+
if (c) {
|
|
1504
|
+
var d = 0 | parseInt(c[1], 10), y = c[2];
|
|
1505
|
+
d !== 0 && (fs(y, d), gs(e, y, c[3]), e.getTag().insertRules(d, r)), r.length = 0;
|
|
1506
|
+
} else r.push(a);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
};
|
|
1510
|
+
function vs() {
|
|
1511
|
+
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
|
|
1512
|
+
}
|
|
1513
|
+
var En = function(e) {
|
|
1514
|
+
var o = document.head, t = e || o, n = document.createElement("style"), r = function(a) {
|
|
1515
|
+
var c = Array.from(a.querySelectorAll("style[".concat(Ie, "]")));
|
|
1516
|
+
return c[c.length - 1];
|
|
1517
|
+
}(t), s = r !== void 0 ? r.nextSibling : null;
|
|
1518
|
+
n.setAttribute(Ie, yn), n.setAttribute(vn, ht);
|
|
1519
|
+
var i = vs();
|
|
1520
|
+
return i && n.setAttribute("nonce", i), t.insertBefore(n, s), n;
|
|
1521
|
+
}, bs = function() {
|
|
1522
|
+
function e(o) {
|
|
1523
|
+
this.element = En(o), this.element.appendChild(document.createTextNode("")), this.sheet = function(t) {
|
|
1524
|
+
if (t.sheet) return t.sheet;
|
|
1525
|
+
for (var n = document.styleSheets, r = 0, s = n.length; r < s; r++) {
|
|
1526
|
+
var i = n[r];
|
|
1527
|
+
if (i.ownerNode === t) return i;
|
|
1528
|
+
}
|
|
1529
|
+
throw Le(17);
|
|
1530
|
+
}(this.element), this.length = 0;
|
|
1531
|
+
}
|
|
1532
|
+
return e.prototype.insertRule = function(o, t) {
|
|
1533
|
+
try {
|
|
1534
|
+
return this.sheet.insertRule(t, o), this.length++, !0;
|
|
1535
|
+
} catch {
|
|
1536
|
+
return !1;
|
|
1537
|
+
}
|
|
1538
|
+
}, e.prototype.deleteRule = function(o) {
|
|
1539
|
+
this.sheet.deleteRule(o), this.length--;
|
|
1540
|
+
}, e.prototype.getRule = function(o) {
|
|
1541
|
+
var t = this.sheet.cssRules[o];
|
|
1542
|
+
return t && t.cssText ? t.cssText : "";
|
|
1543
|
+
}, e;
|
|
1544
|
+
}(), ws = function() {
|
|
1545
|
+
function e(o) {
|
|
1546
|
+
this.element = En(o), this.nodes = this.element.childNodes, this.length = 0;
|
|
1547
|
+
}
|
|
1548
|
+
return e.prototype.insertRule = function(o, t) {
|
|
1549
|
+
if (o <= this.length && o >= 0) {
|
|
1550
|
+
var n = document.createTextNode(t);
|
|
1551
|
+
return this.element.insertBefore(n, this.nodes[o] || null), this.length++, !0;
|
|
1552
|
+
}
|
|
1553
|
+
return !1;
|
|
1554
|
+
}, e.prototype.deleteRule = function(o) {
|
|
1555
|
+
this.element.removeChild(this.nodes[o]), this.length--;
|
|
1556
|
+
}, e.prototype.getRule = function(o) {
|
|
1557
|
+
return o < this.length ? this.nodes[o].textContent : "";
|
|
1558
|
+
}, e;
|
|
1559
|
+
}(), Ss = function() {
|
|
1560
|
+
function e(o) {
|
|
1561
|
+
this.rules = [], this.length = 0;
|
|
1562
|
+
}
|
|
1563
|
+
return e.prototype.insertRule = function(o, t) {
|
|
1564
|
+
return o <= this.length && (this.rules.splice(o, 0, t), this.length++, !0);
|
|
1565
|
+
}, e.prototype.deleteRule = function(o) {
|
|
1566
|
+
this.rules.splice(o, 1), this.length--;
|
|
1567
|
+
}, e.prototype.getRule = function(o) {
|
|
1568
|
+
return o < this.length ? this.rules[o] : "";
|
|
1569
|
+
}, e;
|
|
1570
|
+
}(), Po = Kt, xs = { isServer: !Kt, useCSSOMInjection: !Yr }, Pn = function() {
|
|
1571
|
+
function e(o, t, n) {
|
|
1572
|
+
o === void 0 && (o = Oe), t === void 0 && (t = {});
|
|
1573
|
+
var r = this;
|
|
1574
|
+
this.options = X(X({}, xs), o), this.gs = t, this.names = new Map(n), this.server = !!o.isServer, !this.server && Kt && Po && (Po = !1, function(s) {
|
|
1575
|
+
for (var i = document.querySelectorAll(hs), a = 0, c = i.length; a < c; a++) {
|
|
1576
|
+
var d = i[a];
|
|
1577
|
+
d && d.getAttribute(Ie) !== yn && (ys(s, d), d.parentNode && d.parentNode.removeChild(d));
|
|
1578
|
+
}
|
|
1579
|
+
}(this)), Yt(this, function() {
|
|
1580
|
+
return function(s) {
|
|
1581
|
+
for (var i = s.getTag(), a = i.length, c = "", d = function(g) {
|
|
1582
|
+
var h = function(v) {
|
|
1583
|
+
return rt.get(v);
|
|
1584
|
+
}(g);
|
|
1585
|
+
if (h === void 0) return "continue";
|
|
1586
|
+
var u = s.names.get(h), f = i.getGroup(g);
|
|
1587
|
+
if (u === void 0 || f.length === 0) return "continue";
|
|
1588
|
+
var m = "".concat(Ie, ".g").concat(g, '[id="').concat(h, '"]'), S = "";
|
|
1589
|
+
u !== void 0 && u.forEach(function(v) {
|
|
1590
|
+
v.length > 0 && (S += "".concat(v, ","));
|
|
1591
|
+
}), c += "".concat(f).concat(m, '{content:"').concat(S, '"}').concat(Wt);
|
|
1592
|
+
}, y = 0; y < a; y++) d(y);
|
|
1593
|
+
return c;
|
|
1594
|
+
}(r);
|
|
1595
|
+
});
|
|
1596
|
+
}
|
|
1597
|
+
return e.registerId = function(o) {
|
|
1598
|
+
return Xe(o);
|
|
1599
|
+
}, e.prototype.reconstructWithOptions = function(o, t) {
|
|
1600
|
+
return t === void 0 && (t = !0), new e(X(X({}, this.options), o), this.gs, t && this.names || void 0);
|
|
1601
|
+
}, e.prototype.allocateGSInstance = function(o) {
|
|
1602
|
+
return this.gs[o] = (this.gs[o] || 0) + 1;
|
|
1603
|
+
}, e.prototype.getTag = function() {
|
|
1604
|
+
return this.tag || (this.tag = (o = function(t) {
|
|
1605
|
+
var n = t.useCSSOMInjection, r = t.target;
|
|
1606
|
+
return t.isServer ? new Ss(r) : n ? new bs(r) : new ws(r);
|
|
1607
|
+
}(this.options), new ds(o)));
|
|
1608
|
+
var o;
|
|
1609
|
+
}, e.prototype.hasNameForId = function(o, t) {
|
|
1610
|
+
return this.names.has(o) && this.names.get(o).has(t);
|
|
1611
|
+
}, e.prototype.registerName = function(o, t) {
|
|
1612
|
+
if (Xe(o), this.names.has(o)) this.names.get(o).add(t);
|
|
1613
|
+
else {
|
|
1614
|
+
var n = /* @__PURE__ */ new Set();
|
|
1615
|
+
n.add(t), this.names.set(o, n);
|
|
1616
|
+
}
|
|
1617
|
+
}, e.prototype.insertRules = function(o, t, n) {
|
|
1618
|
+
this.registerName(o, t), this.getTag().insertRules(Xe(o), n);
|
|
1619
|
+
}, e.prototype.clearNames = function(o) {
|
|
1620
|
+
this.names.has(o) && this.names.get(o).clear();
|
|
1621
|
+
}, e.prototype.clearRules = function(o) {
|
|
1622
|
+
this.getTag().clearGroup(Xe(o)), this.clearNames(o);
|
|
1623
|
+
}, e.prototype.clearTag = function() {
|
|
1624
|
+
this.tag = void 0;
|
|
1625
|
+
}, e;
|
|
1626
|
+
}(), Cs = /&/g, Is = /^\s*\/\/.*$/gm;
|
|
1627
|
+
function An(e, o) {
|
|
1628
|
+
return e.map(function(t) {
|
|
1629
|
+
return t.type === "rule" && (t.value = "".concat(o, " ").concat(t.value), t.value = t.value.replaceAll(",", ",".concat(o, " ")), t.props = t.props.map(function(n) {
|
|
1630
|
+
return "".concat(o, " ").concat(n);
|
|
1631
|
+
})), Array.isArray(t.children) && t.type !== "@keyframes" && (t.children = An(t.children, o)), t;
|
|
1632
|
+
});
|
|
1633
|
+
}
|
|
1634
|
+
function Ts(e) {
|
|
1635
|
+
var o, t, n, r = Oe, s = r.options, i = s === void 0 ? Oe : s, a = r.plugins, c = a === void 0 ? mt : a, d = function(h, u, f) {
|
|
1636
|
+
return f.startsWith(t) && f.endsWith(t) && f.replaceAll(t, "").length > 0 ? ".".concat(o) : h;
|
|
1637
|
+
}, y = c.slice();
|
|
1638
|
+
y.push(function(h) {
|
|
1639
|
+
h.type === ut && h.value.includes("&") && (h.props[0] = h.props[0].replace(Cs, t).replace(n, d));
|
|
1640
|
+
}), i.prefix && y.push(Kr), y.push(Hr);
|
|
1641
|
+
var g = function(h, u, f, m) {
|
|
1642
|
+
u === void 0 && (u = ""), f === void 0 && (f = ""), m === void 0 && (m = "&"), o = m, t = u, n = new RegExp("\\".concat(t, "\\b"), "g");
|
|
1643
|
+
var S = h.replace(Is, ""), v = zr(f || u ? "".concat(f, " ").concat(u, " { ").concat(S, " }") : S);
|
|
1644
|
+
i.namespace && (v = An(v, i.namespace));
|
|
1645
|
+
var p = [];
|
|
1646
|
+
return nt(v, Ur(y.concat(Wr(function(w) {
|
|
1647
|
+
return p.push(w);
|
|
1648
|
+
})))), p;
|
|
1649
|
+
};
|
|
1650
|
+
return g.hash = c.length ? c.reduce(function(h, u) {
|
|
1651
|
+
return u.name || Le(15), be(h, u.name);
|
|
1652
|
+
}, bn).toString() : "", g;
|
|
1653
|
+
}
|
|
1654
|
+
var Es = new Pn(), Vt = Ts(), Nn = Ue.createContext({ shouldForwardProp: void 0, styleSheet: Es, stylis: Vt });
|
|
1655
|
+
Nn.Consumer;
|
|
1656
|
+
Ue.createContext(void 0);
|
|
1657
|
+
function Ao() {
|
|
1658
|
+
return qn(Nn);
|
|
1659
|
+
}
|
|
1660
|
+
var No = function() {
|
|
1661
|
+
function e(o, t) {
|
|
1662
|
+
var n = this;
|
|
1663
|
+
this.inject = function(r, s) {
|
|
1664
|
+
s === void 0 && (s = Vt);
|
|
1665
|
+
var i = n.name + s.hash;
|
|
1666
|
+
r.hasNameForId(n.id, i) || r.insertRules(n.id, i, s(n.rules, i, "@keyframes"));
|
|
1667
|
+
}, this.name = o, this.id = "sc-keyframes-".concat(o), this.rules = t, Yt(this, function() {
|
|
1668
|
+
throw Le(12, String(n.name));
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
return e.prototype.getName = function(o) {
|
|
1672
|
+
return o === void 0 && (o = Vt), this.name + o.hash;
|
|
1673
|
+
}, e;
|
|
1674
|
+
}(), Ps = function(e) {
|
|
1675
|
+
return e >= "A" && e <= "Z";
|
|
1676
|
+
};
|
|
1677
|
+
function Ro(e) {
|
|
1678
|
+
for (var o = "", t = 0; t < e.length; t++) {
|
|
1679
|
+
var n = e[t];
|
|
1680
|
+
if (t === 1 && n === "-" && e[0] === "-") return e;
|
|
1681
|
+
Ps(n) ? o += "-" + n.toLowerCase() : o += n;
|
|
1682
|
+
}
|
|
1683
|
+
return o.startsWith("ms-") ? "-" + o : o;
|
|
1684
|
+
}
|
|
1685
|
+
var Rn = function(e) {
|
|
1686
|
+
return e == null || e === !1 || e === "";
|
|
1687
|
+
}, Vn = function(e) {
|
|
1688
|
+
var o, t, n = [];
|
|
1689
|
+
for (var r in e) {
|
|
1690
|
+
var s = e[r];
|
|
1691
|
+
e.hasOwnProperty(r) && !Rn(s) && (Array.isArray(s) && s.isCss || Me(s) ? n.push("".concat(Ro(r), ":"), s, ";") : De(s) ? n.push.apply(n, Ve(Ve(["".concat(r, " {")], Vn(s), !1), ["}"], !1)) : n.push("".concat(Ro(r), ": ").concat((o = r, (t = s) == null || typeof t == "boolean" || t === "" ? "" : typeof t != "number" || t === 0 || o in Gr || o.startsWith("--") ? String(t).trim() : "".concat(t, "px")), ";")));
|
|
1692
|
+
}
|
|
1693
|
+
return n;
|
|
1694
|
+
};
|
|
1695
|
+
function xe(e, o, t, n) {
|
|
1696
|
+
if (Rn(e)) return [];
|
|
1697
|
+
if (Gt(e)) return [".".concat(e.styledComponentId)];
|
|
1698
|
+
if (Me(e)) {
|
|
1699
|
+
if (!Me(s = e) || s.prototype && s.prototype.isReactComponent || !o) return [e];
|
|
1700
|
+
var r = e(o);
|
|
1701
|
+
return process.env.NODE_ENV === "production" || typeof r != "object" || Array.isArray(r) || r instanceof No || De(r) || r === null || console.error("".concat(Sn(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), xe(r, o, t, n);
|
|
1702
|
+
}
|
|
1703
|
+
var s;
|
|
1704
|
+
return e instanceof No ? t ? (e.inject(t, n), [e.getName(n)]) : [e] : De(e) ? Vn(e) : Array.isArray(e) ? Array.prototype.concat.apply(mt, e.map(function(i) {
|
|
1705
|
+
return xe(i, o, t, n);
|
|
1706
|
+
})) : [e.toString()];
|
|
1707
|
+
}
|
|
1708
|
+
function As(e) {
|
|
1709
|
+
for (var o = 0; o < e.length; o += 1) {
|
|
1710
|
+
var t = e[o];
|
|
1711
|
+
if (Me(t) && !Gt(t)) return !1;
|
|
1712
|
+
}
|
|
1713
|
+
return !0;
|
|
1714
|
+
}
|
|
1715
|
+
var Ns = wn(ht), Rs = function() {
|
|
1716
|
+
function e(o, t, n) {
|
|
1717
|
+
this.rules = o, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && As(o), this.componentId = t, this.baseHash = be(Ns, t), this.baseStyle = n, Pn.registerId(t);
|
|
1718
|
+
}
|
|
1719
|
+
return e.prototype.generateAndInjectStyles = function(o, t, n) {
|
|
1720
|
+
var r = this.baseStyle ? this.baseStyle.generateAndInjectStyles(o, t, n) : "";
|
|
1721
|
+
if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) r = we(r, this.staticRulesId);
|
|
1722
|
+
else {
|
|
1723
|
+
var s = Eo(xe(this.rules, o, t, n)), i = Nt(be(this.baseHash, s) >>> 0);
|
|
1724
|
+
if (!t.hasNameForId(this.componentId, i)) {
|
|
1725
|
+
var a = n(s, ".".concat(i), void 0, this.componentId);
|
|
1726
|
+
t.insertRules(this.componentId, i, a);
|
|
1727
|
+
}
|
|
1728
|
+
r = we(r, i), this.staticRulesId = i;
|
|
1729
|
+
}
|
|
1730
|
+
else {
|
|
1731
|
+
for (var c = be(this.baseHash, n.hash), d = "", y = 0; y < this.rules.length; y++) {
|
|
1732
|
+
var g = this.rules[y];
|
|
1733
|
+
if (typeof g == "string") d += g, process.env.NODE_ENV !== "production" && (c = be(c, g));
|
|
1734
|
+
else if (g) {
|
|
1735
|
+
var h = Eo(xe(g, o, t, n));
|
|
1736
|
+
c = be(c, h + y), d += h;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
if (d) {
|
|
1740
|
+
var u = Nt(c >>> 0);
|
|
1741
|
+
t.hasNameForId(this.componentId, u) || t.insertRules(this.componentId, u, n(d, ".".concat(u), void 0, this.componentId)), r = we(r, u);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
return r;
|
|
1745
|
+
}, e;
|
|
1746
|
+
}(), _n = Ue.createContext(void 0);
|
|
1747
|
+
_n.Consumer;
|
|
1748
|
+
var xt = {}, Vo = /* @__PURE__ */ new Set();
|
|
1749
|
+
function Vs(e, o, t) {
|
|
1750
|
+
var n = Gt(e), r = e, s = !St(e), i = o.attrs, a = i === void 0 ? mt : i, c = o.componentId, d = c === void 0 ? function(C, E) {
|
|
1751
|
+
var T = typeof C != "string" ? "sc" : So(C);
|
|
1752
|
+
xt[T] = (xt[T] || 0) + 1;
|
|
1753
|
+
var x = "".concat(T, "-").concat(es(ht + T + xt[T]));
|
|
1754
|
+
return E ? "".concat(E, "-").concat(x) : x;
|
|
1755
|
+
}(o.displayName, o.parentComponentId) : c, y = o.displayName, g = y === void 0 ? function(C) {
|
|
1756
|
+
return St(C) ? "styled.".concat(C) : "Styled(".concat(Sn(C), ")");
|
|
1757
|
+
}(e) : y, h = o.displayName && o.componentId ? "".concat(So(o.displayName), "-").concat(o.componentId) : o.componentId || d, u = n && r.attrs ? r.attrs.concat(a).filter(Boolean) : a, f = o.shouldForwardProp;
|
|
1758
|
+
if (n && r.shouldForwardProp) {
|
|
1759
|
+
var m = r.shouldForwardProp;
|
|
1760
|
+
if (o.shouldForwardProp) {
|
|
1761
|
+
var S = o.shouldForwardProp;
|
|
1762
|
+
f = function(C, E) {
|
|
1763
|
+
return m(C, E) && S(C, E);
|
|
1764
|
+
};
|
|
1765
|
+
} else f = m;
|
|
1766
|
+
}
|
|
1767
|
+
var v = new Rs(t, h, n ? r.componentStyle : void 0);
|
|
1768
|
+
function p(C, E) {
|
|
1769
|
+
return function(T, x, D) {
|
|
1770
|
+
var W = T.attrs, G = T.componentStyle, oe = T.defaultProps, L = T.foldedComponentIds, Y = T.styledComponentId, K = T.target, Z = Ue.useContext(_n), le = Ao(), ne = T.shouldForwardProp || le.shouldForwardProp;
|
|
1771
|
+
process.env.NODE_ENV !== "production" && ho(Y);
|
|
1772
|
+
var J = Xr(x, Z, oe) || Oe, $ = function(ae, Q, I) {
|
|
1773
|
+
for (var N, k = X(X({}, Q), { className: void 0, theme: I }), _ = 0; _ < ae.length; _ += 1) {
|
|
1774
|
+
var R = Me(N = ae[_]) ? N(k) : N;
|
|
1775
|
+
for (var A in R) k[A] = A === "className" ? we(k[A], R[A]) : A === "style" ? X(X({}, k[A]), R[A]) : R[A];
|
|
1776
|
+
}
|
|
1777
|
+
return Q.className && (k.className = we(k.className, Q.className)), k;
|
|
1778
|
+
}(W, x, J), re = $.as || K, q = {};
|
|
1779
|
+
for (var j in $) $[j] === void 0 || j[0] === "$" || j === "as" || j === "theme" && $.theme === J || (j === "forwardedAs" ? q.as = $.forwardedAs : ne && !ne(j, re) || (q[j] = $[j], ne || process.env.NODE_ENV !== "development" || Ar(j) || Vo.has(j) || !At.has(re) || (Vo.add(j), console.warn('styled-components: it looks like an unknown prop "'.concat(j, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
1780
|
+
var fe = function(ae, Q) {
|
|
1781
|
+
var I = Ao(), N = ae.generateAndInjectStyles(Q, I.styleSheet, I.stylis);
|
|
1782
|
+
return process.env.NODE_ENV !== "production" && ho(N), N;
|
|
1783
|
+
}(G, $);
|
|
1784
|
+
process.env.NODE_ENV !== "production" && T.warnTooManyClasses && T.warnTooManyClasses(fe);
|
|
1785
|
+
var se = we(L, Y);
|
|
1786
|
+
return fe && (se += " " + fe), $.className && (se += " " + $.className), q[St(re) && !At.has(re) ? "class" : "className"] = se, q.ref = D, Gn(re, q);
|
|
1787
|
+
}(w, C, E);
|
|
1788
|
+
}
|
|
1789
|
+
p.displayName = g;
|
|
1790
|
+
var w = Ue.forwardRef(p);
|
|
1791
|
+
return w.attrs = u, w.componentStyle = v, w.displayName = g, w.shouldForwardProp = f, w.foldedComponentIds = n ? we(r.foldedComponentIds, r.styledComponentId) : "", w.styledComponentId = h, w.target = n ? r.target : e, Object.defineProperty(w, "defaultProps", { get: function() {
|
|
1792
|
+
return this._foldedDefaultProps;
|
|
1793
|
+
}, set: function(C) {
|
|
1794
|
+
this._foldedDefaultProps = n ? function(E) {
|
|
1795
|
+
for (var T = [], x = 1; x < arguments.length; x++) T[x - 1] = arguments[x];
|
|
1796
|
+
for (var D = 0, W = T; D < W.length; D++) Rt(E, W[D], !0);
|
|
1797
|
+
return E;
|
|
1798
|
+
}({}, r.defaultProps, C) : C;
|
|
1799
|
+
} }), process.env.NODE_ENV !== "production" && (qr(g, h), w.warnTooManyClasses = /* @__PURE__ */ function(C, E) {
|
|
1800
|
+
var T = {}, x = !1;
|
|
1801
|
+
return function(D) {
|
|
1802
|
+
if (!x && (T[D] = !0, Object.keys(T).length >= 200)) {
|
|
1803
|
+
var W = E ? ' with the id of "'.concat(E, '"') : "";
|
|
1804
|
+
console.warn("Over ".concat(200, " classes were generated for component ").concat(C).concat(W, `.
|
|
1805
|
+
`) + `Consider using the attrs method, together with a style object for frequently changed styles.
|
|
1806
|
+
Example:
|
|
1807
|
+
const Component = styled.div.attrs(props => ({
|
|
1808
|
+
style: {
|
|
1809
|
+
background: props.background,
|
|
1810
|
+
},
|
|
1811
|
+
}))\`width: 100%;\`
|
|
1812
|
+
|
|
1813
|
+
<Component />`), x = !0, T = {};
|
|
1814
|
+
}
|
|
1815
|
+
};
|
|
1816
|
+
}(g, h)), Yt(w, function() {
|
|
1817
|
+
return ".".concat(w.styledComponentId);
|
|
1818
|
+
}), s && Tn(w, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w;
|
|
1819
|
+
}
|
|
1820
|
+
function _o(e, o) {
|
|
1821
|
+
for (var t = [e[0]], n = 0, r = o.length; n < r; n += 1) t.push(o[n], e[n + 1]);
|
|
1822
|
+
return t;
|
|
1823
|
+
}
|
|
1824
|
+
var ko = function(e) {
|
|
1825
|
+
return Object.assign(e, { isCss: !0 });
|
|
1826
|
+
};
|
|
1827
|
+
function _s(e) {
|
|
1828
|
+
for (var o = [], t = 1; t < arguments.length; t++) o[t - 1] = arguments[t];
|
|
1829
|
+
if (Me(e) || De(e)) return ko(xe(_o(mt, Ve([e], o, !0))));
|
|
1830
|
+
var n = e;
|
|
1831
|
+
return o.length === 0 && n.length === 1 && typeof n[0] == "string" ? xe(n) : ko(xe(_o(n, o)));
|
|
1832
|
+
}
|
|
1833
|
+
function _t(e, o, t) {
|
|
1834
|
+
if (t === void 0 && (t = Oe), !o) throw Le(1, o);
|
|
1835
|
+
var n = function(r) {
|
|
1836
|
+
for (var s = [], i = 1; i < arguments.length; i++) s[i - 1] = arguments[i];
|
|
1837
|
+
return e(o, t, _s.apply(void 0, Ve([r], s, !1)));
|
|
1838
|
+
};
|
|
1839
|
+
return n.attrs = function(r) {
|
|
1840
|
+
return _t(e, o, X(X({}, t), { attrs: Array.prototype.concat(t.attrs, r).filter(Boolean) }));
|
|
1841
|
+
}, n.withConfig = function(r) {
|
|
1842
|
+
return _t(e, o, X(X({}, t), r));
|
|
1843
|
+
}, n;
|
|
1844
|
+
}
|
|
1845
|
+
var kn = function(e) {
|
|
1846
|
+
return _t(Vs, e);
|
|
1847
|
+
}, On = kn;
|
|
1848
|
+
At.forEach(function(e) {
|
|
1849
|
+
On[e] = kn(e);
|
|
1850
|
+
});
|
|
1851
|
+
process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
1852
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
1853
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);
|
|
1854
|
+
var Ze = "__sc-".concat(Ie, "__");
|
|
1855
|
+
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[Ze] || (window[Ze] = 0), window[Ze] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1856
|
+
|
|
1857
|
+
See https://s-c.sh/2BAXzed for more info.`), window[Ze] += 1);
|
|
1858
|
+
function ks(e) {
|
|
1859
|
+
const o = l.useRef(e);
|
|
1860
|
+
return l.useEffect(() => {
|
|
1861
|
+
o.current = e;
|
|
1862
|
+
}), l.useMemo(() => (...t) => {
|
|
1863
|
+
var n;
|
|
1864
|
+
return (n = o.current) == null ? void 0 : n.call(o, ...t);
|
|
785
1865
|
}, []);
|
|
786
1866
|
}
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
]),
|
|
1867
|
+
const Os = [" ", "Enter", "ArrowUp", "ArrowDown"], Ms = [" ", "Enter"], Ke = "Select", [gt, Ge, Ds] = Zn(Ke), [$e, Fs] = Oo(Ke, [
|
|
1868
|
+
Ds,
|
|
1869
|
+
$o
|
|
1870
|
+
]), yt = $o(), [Ls, ge] = $e(Ke), [$s, Bs] = $e(Ke), qt = (e) => {
|
|
791
1871
|
const {
|
|
792
|
-
__scopeSelect:
|
|
793
|
-
children:
|
|
794
|
-
open:
|
|
795
|
-
defaultOpen:
|
|
796
|
-
onOpenChange:
|
|
797
|
-
value:
|
|
798
|
-
defaultValue:
|
|
799
|
-
onValueChange:
|
|
800
|
-
dir:
|
|
1872
|
+
__scopeSelect: o,
|
|
1873
|
+
children: t,
|
|
1874
|
+
open: n,
|
|
1875
|
+
defaultOpen: r,
|
|
1876
|
+
onOpenChange: s,
|
|
1877
|
+
value: i,
|
|
1878
|
+
defaultValue: a,
|
|
1879
|
+
onValueChange: c,
|
|
1880
|
+
dir: d,
|
|
801
1881
|
// name,
|
|
802
1882
|
// autoComplete,
|
|
803
|
-
disabled:
|
|
804
|
-
required:
|
|
805
|
-
multi:
|
|
806
|
-
} =
|
|
807
|
-
prop:
|
|
808
|
-
defaultProp:
|
|
809
|
-
onChange:
|
|
810
|
-
}), [
|
|
811
|
-
prop:
|
|
812
|
-
defaultProp:
|
|
813
|
-
onChange(
|
|
814
|
-
|
|
1883
|
+
disabled: y,
|
|
1884
|
+
required: g,
|
|
1885
|
+
multi: h = !1
|
|
1886
|
+
} = e, u = yt(o), [f, m] = l.useState(null), [S, v] = l.useState(null), [p, w] = l.useState(!1), C = Jn(d), [E = !1, T] = Re({
|
|
1887
|
+
prop: n,
|
|
1888
|
+
defaultProp: r,
|
|
1889
|
+
onChange: s
|
|
1890
|
+
}), [x, D] = Re({
|
|
1891
|
+
prop: i,
|
|
1892
|
+
defaultProp: a,
|
|
1893
|
+
onChange(L) {
|
|
1894
|
+
c && (Array.isArray(L), c(L));
|
|
815
1895
|
}
|
|
816
|
-
}),
|
|
817
|
-
return /* @__PURE__ */
|
|
818
|
-
|
|
1896
|
+
}), W = l.useRef(null), [G, oe] = l.useState(/* @__PURE__ */ new Set());
|
|
1897
|
+
return /* @__PURE__ */ b(Pe.Root, { ...u, children: /* @__PURE__ */ b(
|
|
1898
|
+
Ls,
|
|
819
1899
|
{
|
|
820
|
-
required:
|
|
821
|
-
scope:
|
|
1900
|
+
required: g,
|
|
1901
|
+
scope: o,
|
|
822
1902
|
trigger: f,
|
|
823
|
-
onTriggerChange:
|
|
824
|
-
valueNode:
|
|
825
|
-
onValueNodeChange:
|
|
1903
|
+
onTriggerChange: m,
|
|
1904
|
+
valueNode: S,
|
|
1905
|
+
onValueNodeChange: v,
|
|
826
1906
|
valueNodeHasChildren: p,
|
|
827
|
-
onValueNodeHasChildrenChange:
|
|
828
|
-
contentId:
|
|
829
|
-
value:
|
|
830
|
-
onValueChange:
|
|
831
|
-
open:
|
|
832
|
-
onOpenChange:
|
|
833
|
-
dir:
|
|
834
|
-
triggerPointerDownPosRef:
|
|
835
|
-
disabled:
|
|
836
|
-
multi:
|
|
837
|
-
children: /* @__PURE__ */
|
|
838
|
-
|
|
1907
|
+
onValueNodeHasChildrenChange: w,
|
|
1908
|
+
contentId: Ee(),
|
|
1909
|
+
value: x,
|
|
1910
|
+
onValueChange: D,
|
|
1911
|
+
open: E,
|
|
1912
|
+
onOpenChange: T,
|
|
1913
|
+
dir: C,
|
|
1914
|
+
triggerPointerDownPosRef: W,
|
|
1915
|
+
disabled: y,
|
|
1916
|
+
multi: h,
|
|
1917
|
+
children: /* @__PURE__ */ b(gt.Provider, { scope: o, children: /* @__PURE__ */ b(
|
|
1918
|
+
$s,
|
|
839
1919
|
{
|
|
840
|
-
scope:
|
|
841
|
-
onNativeOptionAdd:
|
|
842
|
-
|
|
1920
|
+
scope: e.__scopeSelect,
|
|
1921
|
+
onNativeOptionAdd: l.useCallback((L) => {
|
|
1922
|
+
oe((Y) => new Set(Y).add(L));
|
|
843
1923
|
}, []),
|
|
844
|
-
onNativeOptionRemove:
|
|
845
|
-
|
|
846
|
-
const
|
|
847
|
-
return
|
|
1924
|
+
onNativeOptionRemove: l.useCallback((L) => {
|
|
1925
|
+
oe((Y) => {
|
|
1926
|
+
const K = new Set(Y);
|
|
1927
|
+
return K.delete(L), K;
|
|
848
1928
|
});
|
|
849
1929
|
}, []),
|
|
850
|
-
children:
|
|
1930
|
+
children: t
|
|
851
1931
|
}
|
|
852
1932
|
) })
|
|
853
1933
|
}
|
|
854
1934
|
) });
|
|
855
1935
|
};
|
|
856
|
-
|
|
857
|
-
const
|
|
858
|
-
(
|
|
859
|
-
const { __scopeSelect:
|
|
860
|
-
const f =
|
|
861
|
-
if (
|
|
862
|
-
const
|
|
863
|
-
|
|
1936
|
+
qt.displayName = Ke;
|
|
1937
|
+
const Mn = "SelectTrigger", Xt = l.forwardRef(
|
|
1938
|
+
(e, o) => {
|
|
1939
|
+
const { __scopeSelect: t, ...n } = e, r = yt(t), s = ge(Mn, t), i = s.disabled, a = z(o, s.onTriggerChange), c = Ge(t), [d, y, g] = Un((u) => {
|
|
1940
|
+
const f = c().filter((v) => !v.disabled), m = f.find((v) => v.value === s.value), S = Wn(f, u, m);
|
|
1941
|
+
if (S !== void 0 && !Array.isArray(S.value)) {
|
|
1942
|
+
const v = s.multi ? [S.value] : S.value;
|
|
1943
|
+
s.onValueChange(v);
|
|
864
1944
|
}
|
|
865
|
-
}),
|
|
866
|
-
|
|
1945
|
+
}), h = () => {
|
|
1946
|
+
i || (s.onOpenChange(!0), g());
|
|
867
1947
|
};
|
|
868
|
-
return /* @__PURE__ */
|
|
869
|
-
|
|
1948
|
+
return /* @__PURE__ */ b(Pe.Anchor, { asChild: !0, ...r, children: /* @__PURE__ */ b(
|
|
1949
|
+
F.div,
|
|
870
1950
|
{
|
|
871
1951
|
role: "combobox",
|
|
872
|
-
"aria-controls":
|
|
873
|
-
"aria-expanded":
|
|
874
|
-
"aria-required":
|
|
1952
|
+
"aria-controls": s.contentId,
|
|
1953
|
+
"aria-expanded": s.open,
|
|
1954
|
+
"aria-required": s.required,
|
|
875
1955
|
"aria-autocomplete": "none",
|
|
876
|
-
dir:
|
|
877
|
-
"data-state":
|
|
878
|
-
"data-disabled":
|
|
879
|
-
"data-placeholder":
|
|
880
|
-
tabIndex:
|
|
881
|
-
...
|
|
882
|
-
ref:
|
|
883
|
-
onClick:
|
|
1956
|
+
dir: s.dir,
|
|
1957
|
+
"data-state": s.open ? "open" : "closed",
|
|
1958
|
+
"data-disabled": i ? "" : void 0,
|
|
1959
|
+
"data-placeholder": s.value === void 0 ? "" : void 0,
|
|
1960
|
+
tabIndex: i ? void 0 : 0,
|
|
1961
|
+
...n,
|
|
1962
|
+
ref: a,
|
|
1963
|
+
onClick: M(n.onClick, (u) => {
|
|
884
1964
|
u.currentTarget.focus();
|
|
885
1965
|
}),
|
|
886
|
-
onPointerDown:
|
|
1966
|
+
onPointerDown: M(n.onPointerDown, (u) => {
|
|
887
1967
|
const f = u.target;
|
|
888
|
-
f.hasPointerCapture(u.pointerId) && f.releasePointerCapture(u.pointerId), (f.closest("button") ?? f.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (
|
|
1968
|
+
f.hasPointerCapture(u.pointerId) && f.releasePointerCapture(u.pointerId), (f.closest("button") ?? f.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (h(), s.triggerPointerDownPosRef.current = {
|
|
889
1969
|
x: Math.round(u.pageX),
|
|
890
1970
|
y: Math.round(u.pageY)
|
|
891
1971
|
}, u.preventDefault());
|
|
892
1972
|
}),
|
|
893
|
-
onKeyDown:
|
|
894
|
-
const f =
|
|
895
|
-
(
|
|
1973
|
+
onKeyDown: M(n.onKeyDown, (u) => {
|
|
1974
|
+
const f = d.current !== "", m = u.ctrlKey || u.altKey || u.metaKey, S = u.target;
|
|
1975
|
+
(S.closest("button") ?? S.closest("div")) === u.currentTarget && (!m && u.key.length === 1 && y(u.key), !(f && u.key === " ") && Os.includes(u.key) && (h(), u.preventDefault()));
|
|
896
1976
|
})
|
|
897
1977
|
}
|
|
898
1978
|
) });
|
|
899
1979
|
}
|
|
900
1980
|
);
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
(
|
|
904
|
-
const { __scopeSelect:
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
}, [
|
|
908
|
-
if (Array.isArray(
|
|
909
|
-
const f =
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1981
|
+
Xt.displayName = Mn;
|
|
1982
|
+
const Dn = "SelectValue", Zt = l.forwardRef(
|
|
1983
|
+
(e, o) => {
|
|
1984
|
+
const { __scopeSelect: t, children: n, placeholder: r, ...s } = e, i = ge(Dn, t), { onValueNodeHasChildrenChange: a } = i, c = n !== void 0, d = z(o, i.onValueNodeChange), [y, g] = l.useState([]), h = Ge(t);
|
|
1985
|
+
te(() => {
|
|
1986
|
+
a(c);
|
|
1987
|
+
}, [a, c]), l.useLayoutEffect(() => {
|
|
1988
|
+
if (Array.isArray(i.value)) {
|
|
1989
|
+
const f = new Set(y.map((v) => v.value)), m = new Set(i.value);
|
|
1990
|
+
if (!(f.size === m.size && Array.from(m).every((v) => f.has(v)))) {
|
|
1991
|
+
const v = setTimeout(() => {
|
|
1992
|
+
const p = h().filter(
|
|
1993
|
+
(w) => {
|
|
1994
|
+
var C;
|
|
1995
|
+
return Array.isArray(w.value) ? !1 : (C = i.value) == null ? void 0 : C.includes(w.value);
|
|
1996
|
+
}
|
|
1997
|
+
);
|
|
1998
|
+
g(p);
|
|
1999
|
+
});
|
|
2000
|
+
return () => {
|
|
2001
|
+
clearTimeout(v);
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
921
2004
|
}
|
|
922
|
-
}, [
|
|
2005
|
+
}, [i.value, h, y]);
|
|
923
2006
|
let u;
|
|
924
|
-
if ((
|
|
925
|
-
u = /* @__PURE__ */
|
|
926
|
-
else if (typeof
|
|
927
|
-
if (Array.isArray(
|
|
928
|
-
const f =
|
|
929
|
-
const
|
|
930
|
-
return
|
|
2007
|
+
if ((i.value === void 0 || i.value.length === 0) && r !== void 0)
|
|
2008
|
+
u = /* @__PURE__ */ b("span", { children: r });
|
|
2009
|
+
else if (typeof n == "function")
|
|
2010
|
+
if (Array.isArray(i.value)) {
|
|
2011
|
+
const f = i.value.map((m) => {
|
|
2012
|
+
const S = y.find((v) => v.value === m);
|
|
2013
|
+
return S ? n({ value: m, textValue: S == null ? void 0 : S.textValue }) : null;
|
|
931
2014
|
});
|
|
932
|
-
u = f.every((
|
|
2015
|
+
u = f.every((m) => m === null) ? r : f;
|
|
933
2016
|
} else
|
|
934
|
-
u =
|
|
2017
|
+
u = n(i.value);
|
|
935
2018
|
else
|
|
936
|
-
u =
|
|
937
|
-
return /* @__PURE__ */
|
|
2019
|
+
u = n;
|
|
2020
|
+
return /* @__PURE__ */ b(F.span, { ...s, ref: d, children: u || null });
|
|
938
2021
|
}
|
|
939
2022
|
);
|
|
940
|
-
|
|
941
|
-
const
|
|
942
|
-
(
|
|
943
|
-
const { __scopeSelect:
|
|
944
|
-
return /* @__PURE__ */
|
|
2023
|
+
Zt.displayName = Dn;
|
|
2024
|
+
const zs = "SelectIcon", Jt = l.forwardRef(
|
|
2025
|
+
(e, o) => {
|
|
2026
|
+
const { __scopeSelect: t, children: n, ...r } = e;
|
|
2027
|
+
return /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...r, ref: o, children: n || "▼" });
|
|
945
2028
|
}
|
|
946
2029
|
);
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
(
|
|
952
|
-
const
|
|
953
|
-
if (
|
|
954
|
-
|
|
955
|
-
}, []), !
|
|
956
|
-
const
|
|
957
|
-
return
|
|
958
|
-
/* @__PURE__ */
|
|
959
|
-
|
|
2030
|
+
Jt.displayName = zs;
|
|
2031
|
+
const js = "SelectPortal", Qt = (e) => /* @__PURE__ */ b(Bo, { asChild: !0, ...e });
|
|
2032
|
+
Qt.displayName = js;
|
|
2033
|
+
const Te = "SelectContent", eo = l.forwardRef(
|
|
2034
|
+
(e, o) => {
|
|
2035
|
+
const t = ge(Te, e.__scopeSelect), [n, r] = l.useState();
|
|
2036
|
+
if (te(() => {
|
|
2037
|
+
r(new DocumentFragment());
|
|
2038
|
+
}, []), !t.open) {
|
|
2039
|
+
const s = n;
|
|
2040
|
+
return s ? ct.createPortal(
|
|
2041
|
+
/* @__PURE__ */ b(Fn, { scope: e.__scopeSelect, children: /* @__PURE__ */ b(gt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ b("div", { children: e.children }) }) }),
|
|
2042
|
+
s
|
|
960
2043
|
) : null;
|
|
961
2044
|
}
|
|
962
|
-
return /* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ b(Ln, { ...e, ref: o });
|
|
963
2046
|
}
|
|
964
2047
|
);
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
(
|
|
2048
|
+
eo.displayName = Te;
|
|
2049
|
+
const me = 10, [Fn, ve] = $e(Te), Hs = "SelectContentImpl", Ln = l.forwardRef(
|
|
2050
|
+
(e, o) => {
|
|
968
2051
|
const {
|
|
969
|
-
__scopeSelect:
|
|
970
|
-
position:
|
|
971
|
-
onCloseAutoFocus:
|
|
972
|
-
onEscapeKeyDown:
|
|
973
|
-
onPointerDownOutside:
|
|
2052
|
+
__scopeSelect: t,
|
|
2053
|
+
position: n = "item-aligned",
|
|
2054
|
+
onCloseAutoFocus: r,
|
|
2055
|
+
onEscapeKeyDown: s,
|
|
2056
|
+
onPointerDownOutside: i,
|
|
974
2057
|
//
|
|
975
2058
|
// PopperContent props
|
|
976
|
-
side:
|
|
977
|
-
sideOffset:
|
|
978
|
-
align:
|
|
979
|
-
alignOffset:
|
|
980
|
-
arrowPadding:
|
|
981
|
-
collisionBoundary:
|
|
2059
|
+
side: a,
|
|
2060
|
+
sideOffset: c,
|
|
2061
|
+
align: d,
|
|
2062
|
+
alignOffset: y,
|
|
2063
|
+
arrowPadding: g,
|
|
2064
|
+
collisionBoundary: h,
|
|
982
2065
|
collisionPadding: u,
|
|
983
2066
|
sticky: f,
|
|
984
|
-
hideWhenDetached:
|
|
985
|
-
avoidCollisions:
|
|
2067
|
+
hideWhenDetached: m,
|
|
2068
|
+
avoidCollisions: S,
|
|
986
2069
|
//
|
|
987
|
-
...
|
|
988
|
-
} =
|
|
989
|
-
|
|
990
|
-
if (
|
|
991
|
-
}, [
|
|
992
|
-
const
|
|
993
|
-
(
|
|
994
|
-
const [
|
|
995
|
-
for (const
|
|
996
|
-
if (
|
|
2070
|
+
...v
|
|
2071
|
+
} = e, p = ge(Te, t), [w, C] = l.useState(null), [E, T] = l.useState(null), x = z(o, (I) => C(I)), [D, W] = l.useState(null), [G, oe] = l.useState(null), L = Ge(t), [Y, K] = l.useState(!1), Z = l.useRef(!1);
|
|
2072
|
+
l.useEffect(() => {
|
|
2073
|
+
if (w) return zo(w);
|
|
2074
|
+
}, [w]), Fo();
|
|
2075
|
+
const le = l.useCallback(
|
|
2076
|
+
(I) => {
|
|
2077
|
+
const [N, ...k] = L().map((A) => A.ref.current), [_] = k.slice(-1), R = document.activeElement;
|
|
2078
|
+
for (const A of I)
|
|
2079
|
+
if (A === R || (A == null || A.scrollIntoView({ block: "nearest" }), A === N && E && (E.scrollTop = 0), A === _ && E && (E.scrollTop = E.scrollHeight), A == null || A.focus(), document.activeElement !== R)) return;
|
|
997
2080
|
},
|
|
998
|
-
[
|
|
999
|
-
),
|
|
1000
|
-
() =>
|
|
1001
|
-
[
|
|
2081
|
+
[L, E]
|
|
2082
|
+
), ne = l.useCallback(
|
|
2083
|
+
() => le([D, w]),
|
|
2084
|
+
[le, D, w]
|
|
1002
2085
|
);
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
}, [
|
|
1006
|
-
const { onOpenChange:
|
|
1007
|
-
|
|
1008
|
-
if (
|
|
1009
|
-
let
|
|
1010
|
-
const
|
|
1011
|
-
var
|
|
1012
|
-
|
|
1013
|
-
x: Math.abs(Math.round(
|
|
1014
|
-
y: Math.abs(Math.round(
|
|
2086
|
+
l.useEffect(() => {
|
|
2087
|
+
Y && ne();
|
|
2088
|
+
}, [Y, ne]);
|
|
2089
|
+
const { onOpenChange: J, triggerPointerDownPosRef: $ } = p;
|
|
2090
|
+
l.useEffect(() => {
|
|
2091
|
+
if (w) {
|
|
2092
|
+
let I = { x: 0, y: 0 };
|
|
2093
|
+
const N = (_) => {
|
|
2094
|
+
var R, A;
|
|
2095
|
+
I = {
|
|
2096
|
+
x: Math.abs(Math.round(_.pageX) - (((R = $.current) == null ? void 0 : R.x) ?? 0)),
|
|
2097
|
+
y: Math.abs(Math.round(_.pageY) - (((A = $.current) == null ? void 0 : A.y) ?? 0))
|
|
1015
2098
|
};
|
|
1016
|
-
},
|
|
1017
|
-
|
|
2099
|
+
}, k = (_) => {
|
|
2100
|
+
I.x <= 10 && I.y <= 10 ? _.preventDefault() : w.contains(_.target) || J(!1), document.removeEventListener("pointermove", N), $.current = null;
|
|
1018
2101
|
};
|
|
1019
|
-
return
|
|
1020
|
-
document.removeEventListener("pointermove",
|
|
2102
|
+
return $.current !== null && (document.addEventListener("pointermove", N), document.addEventListener("pointerup", k, { capture: !0, once: !0 })), () => {
|
|
2103
|
+
document.removeEventListener("pointermove", N), document.removeEventListener("pointerup", k, { capture: !0 });
|
|
1021
2104
|
};
|
|
1022
2105
|
}
|
|
1023
|
-
}, [
|
|
1024
|
-
const
|
|
1025
|
-
return window.addEventListener("blur",
|
|
1026
|
-
window.removeEventListener("blur",
|
|
2106
|
+
}, [w, J, $]), l.useEffect(() => {
|
|
2107
|
+
const I = () => J(!1);
|
|
2108
|
+
return window.addEventListener("blur", I), window.addEventListener("resize", I), () => {
|
|
2109
|
+
window.removeEventListener("blur", I), window.removeEventListener("resize", I);
|
|
1027
2110
|
};
|
|
1028
|
-
}, [
|
|
1029
|
-
const [
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
}),
|
|
1033
|
-
(
|
|
1034
|
-
const
|
|
1035
|
-
(p.value !== void 0 && p.value ===
|
|
2111
|
+
}, [J]);
|
|
2112
|
+
const [re, q] = Un((I) => {
|
|
2113
|
+
const N = L().filter((R) => !R.disabled), k = N.find((R) => R.ref.current === document.activeElement), _ = Wn(N, I, k);
|
|
2114
|
+
_ && setTimeout(() => _.ref.current.focus());
|
|
2115
|
+
}), j = l.useCallback(
|
|
2116
|
+
(I, N, k) => {
|
|
2117
|
+
const _ = !Z.current && !k;
|
|
2118
|
+
(p.value !== void 0 && p.value === N || _) && (W(I), _ && (Z.current = !0));
|
|
1036
2119
|
},
|
|
1037
2120
|
[p.value]
|
|
1038
|
-
),
|
|
1039
|
-
(
|
|
1040
|
-
const
|
|
1041
|
-
(p.value !== void 0 && (Array.isArray(
|
|
1042
|
-
var
|
|
1043
|
-
return (
|
|
1044
|
-
}) : p.value ===
|
|
2121
|
+
), fe = l.useCallback(() => w == null ? void 0 : w.focus(), [w]), se = l.useCallback(
|
|
2122
|
+
(I, N, k) => {
|
|
2123
|
+
const _ = !Z.current && !k;
|
|
2124
|
+
(p.value !== void 0 && (Array.isArray(N) ? N.every((A) => {
|
|
2125
|
+
var ee;
|
|
2126
|
+
return (ee = p.value) == null ? void 0 : ee.includes(A);
|
|
2127
|
+
}) : p.value === N) || _) && oe(I);
|
|
1045
2128
|
},
|
|
1046
2129
|
[p.value]
|
|
1047
|
-
), ae =
|
|
1048
|
-
side:
|
|
1049
|
-
sideOffset:
|
|
1050
|
-
align:
|
|
1051
|
-
alignOffset:
|
|
1052
|
-
arrowPadding:
|
|
1053
|
-
collisionBoundary:
|
|
2130
|
+
), ae = n === "popper" ? kt : $n, Q = ae === kt ? {
|
|
2131
|
+
side: a,
|
|
2132
|
+
sideOffset: c,
|
|
2133
|
+
align: d,
|
|
2134
|
+
alignOffset: y,
|
|
2135
|
+
arrowPadding: g,
|
|
2136
|
+
collisionBoundary: h,
|
|
1054
2137
|
collisionPadding: u,
|
|
1055
2138
|
sticky: f,
|
|
1056
|
-
hideWhenDetached:
|
|
1057
|
-
avoidCollisions:
|
|
2139
|
+
hideWhenDetached: m,
|
|
2140
|
+
avoidCollisions: S
|
|
1058
2141
|
} : {};
|
|
1059
|
-
return /* @__PURE__ */
|
|
1060
|
-
|
|
2142
|
+
return /* @__PURE__ */ b(
|
|
2143
|
+
Fn,
|
|
1061
2144
|
{
|
|
1062
|
-
scope:
|
|
1063
|
-
content:
|
|
1064
|
-
viewport:
|
|
1065
|
-
onViewportChange:
|
|
1066
|
-
itemRefCallback:
|
|
1067
|
-
selectedItem:
|
|
1068
|
-
onItemLeave:
|
|
1069
|
-
itemTextRefCallback:
|
|
1070
|
-
focusSelectedItem:
|
|
1071
|
-
selectedItemText:
|
|
1072
|
-
position:
|
|
1073
|
-
isPositioned:
|
|
1074
|
-
searchRef:
|
|
1075
|
-
children: /* @__PURE__ */
|
|
1076
|
-
|
|
2145
|
+
scope: t,
|
|
2146
|
+
content: w,
|
|
2147
|
+
viewport: E,
|
|
2148
|
+
onViewportChange: T,
|
|
2149
|
+
itemRefCallback: j,
|
|
2150
|
+
selectedItem: D,
|
|
2151
|
+
onItemLeave: fe,
|
|
2152
|
+
itemTextRefCallback: se,
|
|
2153
|
+
focusSelectedItem: ne,
|
|
2154
|
+
selectedItemText: G,
|
|
2155
|
+
position: n,
|
|
2156
|
+
isPositioned: Y,
|
|
2157
|
+
searchRef: re,
|
|
2158
|
+
children: /* @__PURE__ */ b(jo, { as: Ct, allowPinchZoom: !0, children: /* @__PURE__ */ b(
|
|
2159
|
+
Lo,
|
|
1077
2160
|
{
|
|
1078
2161
|
asChild: !0,
|
|
1079
2162
|
trapped: p.open,
|
|
1080
|
-
onMountAutoFocus: (
|
|
1081
|
-
|
|
2163
|
+
onMountAutoFocus: (I) => {
|
|
2164
|
+
I.preventDefault();
|
|
1082
2165
|
},
|
|
1083
|
-
onUnmountAutoFocus:
|
|
1084
|
-
var
|
|
1085
|
-
(
|
|
2166
|
+
onUnmountAutoFocus: M(r, (I) => {
|
|
2167
|
+
var N, k;
|
|
2168
|
+
(N = p.trigger) == null || N.focus({ preventScroll: !0 }), (k = document.getSelection()) == null || k.empty(), I.preventDefault();
|
|
1086
2169
|
}),
|
|
1087
|
-
children: /* @__PURE__ */
|
|
1088
|
-
|
|
2170
|
+
children: /* @__PURE__ */ b(
|
|
2171
|
+
Do,
|
|
1089
2172
|
{
|
|
1090
2173
|
asChild: !0,
|
|
1091
2174
|
disableOutsidePointerEvents: !0,
|
|
1092
|
-
onEscapeKeyDown:
|
|
1093
|
-
onPointerDownOutside:
|
|
1094
|
-
onFocusOutside: (
|
|
2175
|
+
onEscapeKeyDown: s,
|
|
2176
|
+
onPointerDownOutside: i,
|
|
2177
|
+
onFocusOutside: (I) => I.preventDefault(),
|
|
1095
2178
|
onDismiss: () => p.onOpenChange(!1),
|
|
1096
|
-
children: /* @__PURE__ */
|
|
2179
|
+
children: /* @__PURE__ */ b(
|
|
1097
2180
|
ae,
|
|
1098
2181
|
{
|
|
1099
2182
|
role: "listbox",
|
|
@@ -1101,28 +2184,28 @@ const q = 10, [Ft, oe] = pe(le), Oo = "SelectContentImpl", Lt = s.forwardRef(
|
|
|
1101
2184
|
"data-state": p.open ? "open" : "closed",
|
|
1102
2185
|
"aria-multiselectable": p.multi ? "true" : void 0,
|
|
1103
2186
|
dir: p.dir,
|
|
1104
|
-
onContextMenu: (
|
|
1105
|
-
...
|
|
1106
|
-
...
|
|
1107
|
-
onPlaced: () =>
|
|
1108
|
-
ref:
|
|
2187
|
+
onContextMenu: (I) => I.preventDefault(),
|
|
2188
|
+
...v,
|
|
2189
|
+
...Q,
|
|
2190
|
+
onPlaced: () => K(!0),
|
|
2191
|
+
ref: x,
|
|
1109
2192
|
style: {
|
|
1110
2193
|
// flex layout so we can place the scroll buttons properly
|
|
1111
2194
|
display: "flex",
|
|
1112
2195
|
flexDirection: "column",
|
|
1113
2196
|
// reset the outline by default as the content MAY get focused
|
|
1114
2197
|
outline: "none",
|
|
1115
|
-
...
|
|
2198
|
+
...v.style
|
|
1116
2199
|
},
|
|
1117
|
-
onKeyDown:
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
let
|
|
1121
|
-
if (["ArrowUp", "End"].includes(
|
|
1122
|
-
const
|
|
1123
|
-
|
|
2200
|
+
onKeyDown: M(v.onKeyDown, (I) => {
|
|
2201
|
+
const N = I.ctrlKey || I.altKey || I.metaKey;
|
|
2202
|
+
if (I.key === "Tab" && I.preventDefault(), !N && I.key.length === 1 && q(I.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(I.key)) {
|
|
2203
|
+
let _ = L().filter((R) => !R.disabled).map((R) => R.ref.current);
|
|
2204
|
+
if (["ArrowUp", "End"].includes(I.key) && (_ = _.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(I.key)) {
|
|
2205
|
+
const R = I.target, A = _.indexOf(R);
|
|
2206
|
+
_ = _.slice(A + 1);
|
|
1124
2207
|
}
|
|
1125
|
-
setTimeout(() =>
|
|
2208
|
+
setTimeout(() => le(_)), I.preventDefault();
|
|
1126
2209
|
}
|
|
1127
2210
|
})
|
|
1128
2211
|
}
|
|
@@ -1135,93 +2218,93 @@ const q = 10, [Ft, oe] = pe(le), Oo = "SelectContentImpl", Lt = s.forwardRef(
|
|
|
1135
2218
|
);
|
|
1136
2219
|
}
|
|
1137
2220
|
);
|
|
1138
|
-
|
|
1139
|
-
const
|
|
1140
|
-
(
|
|
1141
|
-
const { __scopeSelect:
|
|
1142
|
-
if (
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1145
|
-
const
|
|
1146
|
-
|
|
2221
|
+
Ln.displayName = Hs;
|
|
2222
|
+
const Us = "SelectItemAlignedPosition", $n = l.forwardRef(
|
|
2223
|
+
(e, o) => {
|
|
2224
|
+
const { __scopeSelect: t, onPlaced: n, ...r } = e, s = ge(Te, t), i = ve(Te, t), [a, c] = l.useState(null), [d, y] = l.useState(null), g = z(o, (x) => y(x)), h = Ge(t), u = l.useRef(!1), f = l.useRef(!0), { viewport: m, selectedItem: S, selectedItemText: v, focusSelectedItem: p } = i, w = l.useCallback(() => {
|
|
2225
|
+
if (s.trigger && s.valueNode && a && d && m && S && v) {
|
|
2226
|
+
const x = s.trigger.getBoundingClientRect(), D = d.getBoundingClientRect(), W = s.valueNode.getBoundingClientRect(), G = v.getBoundingClientRect();
|
|
2227
|
+
if (s.dir !== "rtl") {
|
|
2228
|
+
const R = G.left - D.left, A = W.left - R, ee = x.left - A, ue = x.width + ee, U = Math.max(ue, D.width), Ae = window.innerWidth - me, Be = mo(A, [me, Ae - U]);
|
|
2229
|
+
a.style.minWidth = `${ue}px`, a.style.left = `${Be}px`;
|
|
1147
2230
|
} else {
|
|
1148
|
-
const
|
|
1149
|
-
|
|
2231
|
+
const R = D.right - G.right, A = window.innerWidth - W.right - R, ee = window.innerWidth - x.right - A, ue = x.width + ee, U = Math.max(ue, D.width), Ae = window.innerWidth - me, Be = mo(A, [me, Ae - U]);
|
|
2232
|
+
a.style.minWidth = `${ue}px`, a.style.right = `${Be}px`;
|
|
1150
2233
|
}
|
|
1151
|
-
const
|
|
1152
|
-
if (
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
const
|
|
2234
|
+
const oe = h(), L = window.innerHeight - me * 2, Y = m.scrollHeight, K = window.getComputedStyle(d), Z = parseInt(K.borderTopWidth, 10), le = parseInt(K.paddingTop, 10), ne = parseInt(K.borderBottomWidth, 10), J = parseInt(K.paddingBottom, 10), $ = Z + le + Y + J + ne, re = Math.min(S.offsetHeight * 5, $), q = window.getComputedStyle(m), j = parseInt(q.paddingTop, 10), fe = parseInt(q.paddingBottom, 10), se = x.top + x.height / 2 - me, ae = L - se, Q = S.offsetHeight / 2, I = S.offsetTop + Q, N = Z + le + I, k = $ - N;
|
|
2235
|
+
if (N <= se) {
|
|
2236
|
+
const R = S === oe[oe.length - 1].ref.current;
|
|
2237
|
+
a.style.bottom = "0px";
|
|
2238
|
+
const A = d.clientHeight - m.offsetTop - m.offsetHeight, ee = Math.max(
|
|
1156
2239
|
ae,
|
|
1157
|
-
|
|
1158
|
-
(
|
|
1159
|
-
),
|
|
1160
|
-
|
|
2240
|
+
Q + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
2241
|
+
(R ? fe : 0) + A + ne
|
|
2242
|
+
), ue = N + ee;
|
|
2243
|
+
a.style.height = `${ue}px`;
|
|
1161
2244
|
} else {
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
(
|
|
1168
|
-
) +
|
|
1169
|
-
|
|
2245
|
+
const R = S === oe[0].ref.current;
|
|
2246
|
+
a.style.top = "0px";
|
|
2247
|
+
const ee = Math.max(
|
|
2248
|
+
se,
|
|
2249
|
+
Z + m.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
2250
|
+
(R ? j : 0) + Q
|
|
2251
|
+
) + k;
|
|
2252
|
+
a.style.height = `${ee}px`, m.scrollTop = N - se + m.offsetTop;
|
|
1170
2253
|
}
|
|
1171
|
-
|
|
2254
|
+
a.style.margin = `${me}px 0`, a.style.minHeight = `${re}px`, a.style.maxHeight = `${L}px`, n == null || n(), requestAnimationFrame(() => u.current = !0);
|
|
1172
2255
|
}
|
|
1173
2256
|
}, [
|
|
1174
|
-
g,
|
|
1175
|
-
r.trigger,
|
|
1176
|
-
r.valueNode,
|
|
1177
|
-
l,
|
|
1178
|
-
m,
|
|
1179
2257
|
h,
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
2258
|
+
s.trigger,
|
|
2259
|
+
s.valueNode,
|
|
2260
|
+
a,
|
|
2261
|
+
d,
|
|
2262
|
+
m,
|
|
2263
|
+
S,
|
|
2264
|
+
v,
|
|
2265
|
+
s.dir,
|
|
2266
|
+
n
|
|
1184
2267
|
]);
|
|
1185
|
-
|
|
1186
|
-
const [
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}, [
|
|
1190
|
-
const
|
|
1191
|
-
(
|
|
1192
|
-
|
|
2268
|
+
te(() => w(), [w]);
|
|
2269
|
+
const [C, E] = l.useState();
|
|
2270
|
+
te(() => {
|
|
2271
|
+
d && E(window.getComputedStyle(d).zIndex);
|
|
2272
|
+
}, [d]);
|
|
2273
|
+
const T = l.useCallback(
|
|
2274
|
+
(x) => {
|
|
2275
|
+
x && f.current === !0 && (w(), p == null || p(), f.current = !1);
|
|
1193
2276
|
},
|
|
1194
|
-
[
|
|
2277
|
+
[w, p]
|
|
1195
2278
|
);
|
|
1196
|
-
return /* @__PURE__ */
|
|
1197
|
-
|
|
2279
|
+
return /* @__PURE__ */ b(
|
|
2280
|
+
Ks,
|
|
1198
2281
|
{
|
|
1199
|
-
scope:
|
|
1200
|
-
contentWrapper:
|
|
2282
|
+
scope: t,
|
|
2283
|
+
contentWrapper: a,
|
|
1201
2284
|
shouldExpandOnScrollRef: u,
|
|
1202
|
-
onScrollButtonChange:
|
|
1203
|
-
children: /* @__PURE__ */
|
|
2285
|
+
onScrollButtonChange: T,
|
|
2286
|
+
children: /* @__PURE__ */ b(
|
|
1204
2287
|
"div",
|
|
1205
2288
|
{
|
|
1206
|
-
ref:
|
|
2289
|
+
ref: c,
|
|
1207
2290
|
style: {
|
|
1208
2291
|
display: "flex",
|
|
1209
2292
|
flexDirection: "column",
|
|
1210
2293
|
position: "fixed",
|
|
1211
|
-
zIndex:
|
|
2294
|
+
zIndex: C
|
|
1212
2295
|
},
|
|
1213
|
-
children: /* @__PURE__ */
|
|
1214
|
-
|
|
2296
|
+
children: /* @__PURE__ */ b(
|
|
2297
|
+
F.div,
|
|
1215
2298
|
{
|
|
1216
|
-
...
|
|
1217
|
-
ref:
|
|
2299
|
+
...r,
|
|
2300
|
+
ref: g,
|
|
1218
2301
|
style: {
|
|
1219
2302
|
// When we get the height of the content, it includes borders. If we were to set
|
|
1220
2303
|
// the height without having `boxSizing: 'border-box'` it would be too big.
|
|
1221
2304
|
boxSizing: "border-box",
|
|
1222
2305
|
// We need to ensure the content doesn't get taller than the wrapper
|
|
1223
2306
|
maxHeight: "100%",
|
|
1224
|
-
...
|
|
2307
|
+
...r.style
|
|
1225
2308
|
}
|
|
1226
2309
|
}
|
|
1227
2310
|
)
|
|
@@ -1231,22 +2314,22 @@ const Do = "SelectItemAlignedPosition", Bt = s.forwardRef(
|
|
|
1231
2314
|
);
|
|
1232
2315
|
}
|
|
1233
2316
|
);
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1236
|
-
(
|
|
1237
|
-
const { __scopeSelect:
|
|
1238
|
-
return /* @__PURE__ */
|
|
1239
|
-
|
|
2317
|
+
$n.displayName = Us;
|
|
2318
|
+
const Ws = "SelectPopperPosition", kt = l.forwardRef(
|
|
2319
|
+
(e, o) => {
|
|
2320
|
+
const { __scopeSelect: t, align: n = "start", collisionPadding: r = me, ...s } = e, i = yt(t);
|
|
2321
|
+
return /* @__PURE__ */ b(
|
|
2322
|
+
Pe.Content,
|
|
1240
2323
|
{
|
|
1241
|
-
...
|
|
1242
|
-
...
|
|
1243
|
-
ref:
|
|
1244
|
-
align:
|
|
1245
|
-
collisionPadding:
|
|
2324
|
+
...i,
|
|
2325
|
+
...s,
|
|
2326
|
+
ref: o,
|
|
2327
|
+
align: n,
|
|
2328
|
+
collisionPadding: r,
|
|
1246
2329
|
style: {
|
|
1247
2330
|
// Ensure border-box for floating-ui calculations
|
|
1248
2331
|
boxSizing: "border-box",
|
|
1249
|
-
...
|
|
2332
|
+
...s.style,
|
|
1250
2333
|
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1251
2334
|
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
1252
2335
|
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -1257,15 +2340,15 @@ const ko = "SelectPopperPosition", Re = s.forwardRef(
|
|
|
1257
2340
|
);
|
|
1258
2341
|
}
|
|
1259
2342
|
);
|
|
1260
|
-
|
|
1261
|
-
const [
|
|
1262
|
-
|
|
2343
|
+
kt.displayName = Ws;
|
|
2344
|
+
const [Ks, to] = $e(
|
|
2345
|
+
Te,
|
|
1263
2346
|
{}
|
|
1264
|
-
),
|
|
1265
|
-
(
|
|
1266
|
-
const { __scopeSelect:
|
|
1267
|
-
return /* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
2347
|
+
), Ot = "SelectViewport", oo = l.forwardRef(
|
|
2348
|
+
(e, o) => {
|
|
2349
|
+
const { __scopeSelect: t, ...n } = e, r = ve(Ot, t), s = to(Ot, t), i = z(o, r.onViewportChange), a = l.useRef(0);
|
|
2350
|
+
return /* @__PURE__ */ it(at, { children: [
|
|
2351
|
+
/* @__PURE__ */ b(
|
|
1269
2352
|
"style",
|
|
1270
2353
|
{
|
|
1271
2354
|
dangerouslySetInnerHTML: {
|
|
@@ -1273,13 +2356,13 @@ const [Fo, Ge] = pe(
|
|
|
1273
2356
|
}
|
|
1274
2357
|
}
|
|
1275
2358
|
),
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
|
|
2359
|
+
/* @__PURE__ */ b(gt.Slot, { scope: t, children: /* @__PURE__ */ b(
|
|
2360
|
+
F.div,
|
|
1278
2361
|
{
|
|
1279
2362
|
"data-radix-select-viewport": "",
|
|
1280
2363
|
role: "presentation",
|
|
1281
|
-
...
|
|
1282
|
-
ref:
|
|
2364
|
+
...n,
|
|
2365
|
+
ref: i,
|
|
1283
2366
|
style: {
|
|
1284
2367
|
// we use position: 'relative' here on the `viewport` so that when we call
|
|
1285
2368
|
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
|
@@ -1287,104 +2370,104 @@ const [Fo, Ge] = pe(
|
|
|
1287
2370
|
position: "relative",
|
|
1288
2371
|
flex: 1,
|
|
1289
2372
|
overflow: "auto",
|
|
1290
|
-
...
|
|
2373
|
+
...n.style
|
|
1291
2374
|
},
|
|
1292
|
-
onScroll:
|
|
1293
|
-
const
|
|
1294
|
-
if (
|
|
1295
|
-
const
|
|
1296
|
-
if (
|
|
1297
|
-
const u = window.innerHeight -
|
|
1298
|
-
if (
|
|
1299
|
-
const
|
|
1300
|
-
|
|
2375
|
+
onScroll: M(n.onScroll, (c) => {
|
|
2376
|
+
const d = c.currentTarget, { contentWrapper: y, shouldExpandOnScrollRef: g } = s;
|
|
2377
|
+
if (g != null && g.current && y) {
|
|
2378
|
+
const h = Math.abs(a.current - d.scrollTop);
|
|
2379
|
+
if (h > 0) {
|
|
2380
|
+
const u = window.innerHeight - me * 2, f = parseFloat(y.style.minHeight), m = parseFloat(y.style.height), S = Math.max(f, m);
|
|
2381
|
+
if (S < u) {
|
|
2382
|
+
const v = S + h, p = Math.min(u, v), w = v - p;
|
|
2383
|
+
y.style.height = `${p}px`, y.style.bottom === "0px" && (d.scrollTop = w > 0 ? w : 0, y.style.justifyContent = "flex-end");
|
|
1301
2384
|
}
|
|
1302
2385
|
}
|
|
1303
2386
|
}
|
|
1304
|
-
|
|
2387
|
+
a.current = d.scrollTop;
|
|
1305
2388
|
})
|
|
1306
2389
|
}
|
|
1307
2390
|
) })
|
|
1308
2391
|
] });
|
|
1309
2392
|
}
|
|
1310
2393
|
);
|
|
1311
|
-
|
|
1312
|
-
const
|
|
1313
|
-
(
|
|
1314
|
-
const { __scopeSelect:
|
|
1315
|
-
return /* @__PURE__ */
|
|
2394
|
+
oo.displayName = Ot;
|
|
2395
|
+
const Bn = "SelectGroup", [Gs, Ys] = $e(Bn), no = l.forwardRef(
|
|
2396
|
+
(e, o) => {
|
|
2397
|
+
const { __scopeSelect: t, ...n } = e, r = Ee();
|
|
2398
|
+
return /* @__PURE__ */ b(Gs, { scope: t, id: r, children: /* @__PURE__ */ b(F.div, { role: "group", "aria-labelledby": r, ...n, ref: o }) });
|
|
1316
2399
|
}
|
|
1317
2400
|
);
|
|
1318
|
-
|
|
1319
|
-
const
|
|
1320
|
-
(
|
|
1321
|
-
const { __scopeSelect:
|
|
1322
|
-
return /* @__PURE__ */
|
|
2401
|
+
no.displayName = Bn;
|
|
2402
|
+
const zn = "SelectLabel", ro = l.forwardRef(
|
|
2403
|
+
(e, o) => {
|
|
2404
|
+
const { __scopeSelect: t, ...n } = e, r = Ys(zn, t);
|
|
2405
|
+
return /* @__PURE__ */ b(F.div, { id: r.id, ...n, ref: o });
|
|
1323
2406
|
}
|
|
1324
2407
|
);
|
|
1325
|
-
|
|
1326
|
-
const
|
|
1327
|
-
(
|
|
1328
|
-
const { __scopeSelect:
|
|
1329
|
-
var
|
|
1330
|
-
return (
|
|
1331
|
-
}),
|
|
1332
|
-
var
|
|
1333
|
-
return (
|
|
1334
|
-
}), [
|
|
1335
|
-
|
|
2408
|
+
ro.displayName = zn;
|
|
2409
|
+
const st = "SelectItem", [qs, jn] = $e(st), so = l.forwardRef(
|
|
2410
|
+
(e, o) => {
|
|
2411
|
+
const { __scopeSelect: t, value: n, disabled: r = !1, textValue: s, ...i } = e, a = ge(st, t), c = ve(st, t), d = typeof n == "string" ? Array.isArray(a.value) ? a.value.includes(n) : a.value === n : n.every((p) => {
|
|
2412
|
+
var w;
|
|
2413
|
+
return (w = a.value) == null ? void 0 : w.includes(p);
|
|
2414
|
+
}), y = Array.isArray(a.value) && Array.isArray(n) && n.some((p) => {
|
|
2415
|
+
var w;
|
|
2416
|
+
return (w = a.value) == null ? void 0 : w.includes(p);
|
|
2417
|
+
}), [g, h] = l.useState(s ?? ""), [u, f] = l.useState(!1), m = z(
|
|
2418
|
+
o,
|
|
1336
2419
|
(p) => {
|
|
1337
|
-
var
|
|
1338
|
-
return (
|
|
2420
|
+
var w;
|
|
2421
|
+
return (w = c.itemRefCallback) == null ? void 0 : w.call(c, p, n, r);
|
|
1339
2422
|
}
|
|
1340
|
-
),
|
|
1341
|
-
if (!
|
|
1342
|
-
let p =
|
|
1343
|
-
|
|
2423
|
+
), S = Ee(), v = () => {
|
|
2424
|
+
if (!r) {
|
|
2425
|
+
let p = a.multi && typeof n == "string" ? [n] : n;
|
|
2426
|
+
y && !d ? a.onValueChange(p) : Array.isArray(a.value) && (p = Kn(n, a.value)), a.onValueChange(p), a.multi || a.onOpenChange(!1);
|
|
1344
2427
|
}
|
|
1345
2428
|
};
|
|
1346
|
-
if (!
|
|
2429
|
+
if (!a.multi && Array.isArray(n))
|
|
1347
2430
|
throw new Error("You can only pass an array of values in multi selects");
|
|
1348
|
-
return /* @__PURE__ */
|
|
1349
|
-
|
|
2431
|
+
return /* @__PURE__ */ b(
|
|
2432
|
+
qs,
|
|
1350
2433
|
{
|
|
1351
|
-
scope:
|
|
1352
|
-
value:
|
|
1353
|
-
disabled:
|
|
1354
|
-
textId:
|
|
1355
|
-
isSelected:
|
|
1356
|
-
isIntermediate:
|
|
1357
|
-
onItemTextChange:
|
|
1358
|
-
|
|
2434
|
+
scope: t,
|
|
2435
|
+
value: n,
|
|
2436
|
+
disabled: r,
|
|
2437
|
+
textId: S,
|
|
2438
|
+
isSelected: d,
|
|
2439
|
+
isIntermediate: y,
|
|
2440
|
+
onItemTextChange: l.useCallback((p) => {
|
|
2441
|
+
h((w) => w || ((p == null ? void 0 : p.textContent) ?? "").trim());
|
|
1359
2442
|
}, []),
|
|
1360
|
-
children: /* @__PURE__ */
|
|
1361
|
-
|
|
2443
|
+
children: /* @__PURE__ */ b(gt.ItemSlot, { scope: t, value: n, disabled: r, textValue: g, children: /* @__PURE__ */ b(
|
|
2444
|
+
F.div,
|
|
1362
2445
|
{
|
|
1363
2446
|
role: "option",
|
|
1364
|
-
"aria-labelledby":
|
|
2447
|
+
"aria-labelledby": S,
|
|
1365
2448
|
"data-highlighted": u ? "" : void 0,
|
|
1366
|
-
"aria-selected":
|
|
1367
|
-
"aria-checked":
|
|
1368
|
-
"data-state":
|
|
1369
|
-
"aria-disabled":
|
|
1370
|
-
"data-disabled":
|
|
1371
|
-
tabIndex:
|
|
1372
|
-
...
|
|
1373
|
-
ref:
|
|
1374
|
-
onFocus:
|
|
1375
|
-
onBlur:
|
|
1376
|
-
onPointerUp:
|
|
1377
|
-
onPointerMove:
|
|
1378
|
-
var
|
|
1379
|
-
|
|
2449
|
+
"aria-selected": a.multi ? void 0 : d && u,
|
|
2450
|
+
"aria-checked": a.multi ? d : void 0,
|
|
2451
|
+
"data-state": d ? "checked" : "unchecked",
|
|
2452
|
+
"aria-disabled": r || void 0,
|
|
2453
|
+
"data-disabled": r ? "" : void 0,
|
|
2454
|
+
tabIndex: r ? void 0 : -1,
|
|
2455
|
+
...i,
|
|
2456
|
+
ref: m,
|
|
2457
|
+
onFocus: M(i.onFocus, () => f(!0)),
|
|
2458
|
+
onBlur: M(i.onBlur, () => f(!1)),
|
|
2459
|
+
onPointerUp: M(i.onPointerUp, v),
|
|
2460
|
+
onPointerMove: M(i.onPointerMove, (p) => {
|
|
2461
|
+
var w;
|
|
2462
|
+
r ? (w = c.onItemLeave) == null || w.call(c) : p.currentTarget.focus({ preventScroll: !0 });
|
|
1380
2463
|
}),
|
|
1381
|
-
onPointerLeave:
|
|
1382
|
-
var
|
|
1383
|
-
p.currentTarget === document.activeElement && ((
|
|
2464
|
+
onPointerLeave: M(i.onPointerLeave, (p) => {
|
|
2465
|
+
var w;
|
|
2466
|
+
p.currentTarget === document.activeElement && ((w = c.onItemLeave) == null || w.call(c));
|
|
1384
2467
|
}),
|
|
1385
|
-
onKeyDown:
|
|
1386
|
-
var
|
|
1387
|
-
((
|
|
2468
|
+
onKeyDown: M(i.onKeyDown, (p) => {
|
|
2469
|
+
var C;
|
|
2470
|
+
((C = c.searchRef) == null ? void 0 : C.current) !== "" && p.key === " " || (Ms.includes(p.key) && v(), p.key === " " && p.preventDefault());
|
|
1388
2471
|
})
|
|
1389
2472
|
}
|
|
1390
2473
|
) })
|
|
@@ -1392,239 +2475,245 @@ const be = "SelectItem", [$o, Ht] = pe(be), Xe = s.forwardRef(
|
|
|
1392
2475
|
);
|
|
1393
2476
|
}
|
|
1394
2477
|
);
|
|
1395
|
-
|
|
1396
|
-
const
|
|
1397
|
-
(
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
2478
|
+
so.displayName = st;
|
|
2479
|
+
const je = "SelectItemText", Xs = On(F.span)`
|
|
2480
|
+
&:not(:last-child) {
|
|
2481
|
+
&::after {
|
|
2482
|
+
content: ', ';
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
`, io = l.forwardRef(
|
|
2486
|
+
(e, o) => {
|
|
2487
|
+
const { __scopeSelect: t, className: n, style: r, ...s } = e, i = ge(je, t), a = ve(je, t), c = jn(je, t), d = Bs(je, t), [y, g] = l.useState(null), h = z(
|
|
2488
|
+
o,
|
|
2489
|
+
(v) => g(v),
|
|
2490
|
+
c.onItemTextChange,
|
|
2491
|
+
(v) => {
|
|
1403
2492
|
var p;
|
|
1404
|
-
return (p =
|
|
2493
|
+
return (p = a.itemTextRefCallback) == null ? void 0 : p.call(a, v, c.value, c.disabled);
|
|
1405
2494
|
}
|
|
1406
|
-
), u =
|
|
1407
|
-
() => /* @__PURE__ */
|
|
2495
|
+
), u = y == null ? void 0 : y.textContent, f = l.useMemo(
|
|
2496
|
+
() => /* @__PURE__ */ b(
|
|
1408
2497
|
"option",
|
|
1409
2498
|
{
|
|
1410
|
-
value:
|
|
1411
|
-
disabled:
|
|
2499
|
+
value: c.value,
|
|
2500
|
+
disabled: c.disabled,
|
|
1412
2501
|
children: u
|
|
1413
2502
|
},
|
|
1414
|
-
Array.isArray(
|
|
2503
|
+
Array.isArray(c.value) ? c.value.join(";") : c.value
|
|
1415
2504
|
),
|
|
1416
|
-
[
|
|
1417
|
-
), { onNativeOptionAdd:
|
|
1418
|
-
return
|
|
1419
|
-
/* @__PURE__ */
|
|
1420
|
-
|
|
2505
|
+
[c.disabled, c.value, u]
|
|
2506
|
+
), { onNativeOptionAdd: m, onNativeOptionRemove: S } = d;
|
|
2507
|
+
return te(() => (m(f), () => S(f)), [m, S, f]), /* @__PURE__ */ it(at, { children: [
|
|
2508
|
+
/* @__PURE__ */ b(F.span, { id: c.textId, ...s, ref: h }),
|
|
2509
|
+
c.isSelected && i.valueNode && !i.valueNodeHasChildren ? ct.createPortal(/* @__PURE__ */ b(Xs, { children: s.children }), i.valueNode) : null
|
|
1421
2510
|
] });
|
|
1422
2511
|
}
|
|
1423
2512
|
);
|
|
1424
|
-
|
|
1425
|
-
const
|
|
1426
|
-
(
|
|
1427
|
-
const { __scopeSelect:
|
|
1428
|
-
return typeof
|
|
1429
|
-
isSelected:
|
|
1430
|
-
isIntermediate:
|
|
1431
|
-
}) }) :
|
|
2513
|
+
io.displayName = je;
|
|
2514
|
+
const Hn = "SelectItemIndicator", ao = l.forwardRef(
|
|
2515
|
+
(e, o) => {
|
|
2516
|
+
const { __scopeSelect: t, children: n, ...r } = e, s = jn(Hn, t);
|
|
2517
|
+
return typeof n == "function" ? /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...r, ref: o, children: n({
|
|
2518
|
+
isSelected: s.isSelected,
|
|
2519
|
+
isIntermediate: s.isIntermediate
|
|
2520
|
+
}) }) : s.isSelected ? /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...r, ref: o, children: n }) : null;
|
|
1432
2521
|
}
|
|
1433
2522
|
);
|
|
1434
|
-
|
|
1435
|
-
const
|
|
1436
|
-
(
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1439
|
-
if (
|
|
1440
|
-
const
|
|
1441
|
-
const
|
|
1442
|
-
|
|
2523
|
+
ao.displayName = Hn;
|
|
2524
|
+
const Mt = "SelectScrollUpButton", co = l.forwardRef(
|
|
2525
|
+
(e, o) => {
|
|
2526
|
+
const t = ve(Mt, e.__scopeSelect), n = to(Mt, e.__scopeSelect), [r, s] = l.useState(!1), i = z(o, n.onScrollButtonChange);
|
|
2527
|
+
return te(() => {
|
|
2528
|
+
if (t.viewport && t.isPositioned) {
|
|
2529
|
+
const a = t.viewport, c = () => {
|
|
2530
|
+
const d = a.scrollTop > 0;
|
|
2531
|
+
s(d);
|
|
1443
2532
|
};
|
|
1444
|
-
return
|
|
2533
|
+
return c(), a.addEventListener("scroll", c), () => a.removeEventListener("scroll", c);
|
|
1445
2534
|
}
|
|
1446
|
-
}, [
|
|
1447
|
-
|
|
2535
|
+
}, [t.viewport, t.isPositioned]), r ? /* @__PURE__ */ b(
|
|
2536
|
+
uo,
|
|
1448
2537
|
{
|
|
1449
|
-
...
|
|
1450
|
-
ref:
|
|
2538
|
+
...e,
|
|
2539
|
+
ref: i,
|
|
1451
2540
|
onAutoScroll: () => {
|
|
1452
|
-
const { viewport:
|
|
1453
|
-
|
|
2541
|
+
const { viewport: a, selectedItem: c } = t;
|
|
2542
|
+
a && c && (a.scrollTop -= c.offsetHeight);
|
|
1454
2543
|
}
|
|
1455
2544
|
}
|
|
1456
2545
|
) : null;
|
|
1457
2546
|
}
|
|
1458
2547
|
);
|
|
1459
|
-
|
|
1460
|
-
const
|
|
1461
|
-
(
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1464
|
-
if (
|
|
1465
|
-
const
|
|
1466
|
-
const
|
|
1467
|
-
|
|
2548
|
+
co.displayName = Mt;
|
|
2549
|
+
const Dt = "SelectScrollDownButton", lo = l.forwardRef(
|
|
2550
|
+
(e, o) => {
|
|
2551
|
+
const t = ve(Dt, e.__scopeSelect), n = to(Dt, e.__scopeSelect), [r, s] = l.useState(!1), i = z(o, n.onScrollButtonChange);
|
|
2552
|
+
return te(() => {
|
|
2553
|
+
if (t.viewport && t.isPositioned) {
|
|
2554
|
+
const a = t.viewport, c = () => {
|
|
2555
|
+
const d = a.scrollHeight - a.clientHeight, y = Math.ceil(a.scrollTop) < d;
|
|
2556
|
+
s(y);
|
|
1468
2557
|
};
|
|
1469
|
-
return
|
|
2558
|
+
return c(), a.addEventListener("scroll", c), () => a.removeEventListener("scroll", c);
|
|
1470
2559
|
}
|
|
1471
|
-
}, [
|
|
1472
|
-
|
|
2560
|
+
}, [t.viewport, t.isPositioned]), r ? /* @__PURE__ */ b(
|
|
2561
|
+
uo,
|
|
1473
2562
|
{
|
|
1474
|
-
...
|
|
1475
|
-
ref:
|
|
2563
|
+
...e,
|
|
2564
|
+
ref: i,
|
|
1476
2565
|
onAutoScroll: () => {
|
|
1477
|
-
const { viewport:
|
|
1478
|
-
|
|
2566
|
+
const { viewport: a, selectedItem: c } = t;
|
|
2567
|
+
a && c && (a.scrollTop += c.offsetHeight);
|
|
1479
2568
|
}
|
|
1480
2569
|
}
|
|
1481
2570
|
) : null;
|
|
1482
2571
|
}
|
|
1483
2572
|
);
|
|
1484
|
-
|
|
1485
|
-
const
|
|
1486
|
-
(
|
|
1487
|
-
const { __scopeSelect:
|
|
1488
|
-
|
|
2573
|
+
lo.displayName = Dt;
|
|
2574
|
+
const uo = l.forwardRef(
|
|
2575
|
+
(e, o) => {
|
|
2576
|
+
const { __scopeSelect: t, onAutoScroll: n, ...r } = e, s = ve("SelectScrollButton", t), i = l.useRef(null), a = Ge(t), c = l.useCallback(() => {
|
|
2577
|
+
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
1489
2578
|
}, []);
|
|
1490
|
-
return
|
|
1491
|
-
var
|
|
1492
|
-
const
|
|
1493
|
-
(
|
|
1494
|
-
}, [
|
|
1495
|
-
|
|
2579
|
+
return l.useEffect(() => () => c(), [c]), te(() => {
|
|
2580
|
+
var y;
|
|
2581
|
+
const d = a().find((g) => g.ref.current === document.activeElement);
|
|
2582
|
+
(y = d == null ? void 0 : d.ref.current) == null || y.scrollIntoView({ block: "nearest" });
|
|
2583
|
+
}, [a]), /* @__PURE__ */ b(
|
|
2584
|
+
F.div,
|
|
1496
2585
|
{
|
|
1497
2586
|
"aria-hidden": !0,
|
|
1498
|
-
...
|
|
1499
|
-
ref:
|
|
1500
|
-
style: { flexShrink: 0, ...
|
|
1501
|
-
onPointerMove:
|
|
1502
|
-
var
|
|
1503
|
-
(
|
|
2587
|
+
...r,
|
|
2588
|
+
ref: o,
|
|
2589
|
+
style: { flexShrink: 0, ...r.style },
|
|
2590
|
+
onPointerMove: M(r.onPointerMove, () => {
|
|
2591
|
+
var d;
|
|
2592
|
+
(d = s.onItemLeave) == null || d.call(s), i.current === null && (i.current = window.setInterval(n, 50));
|
|
1504
2593
|
}),
|
|
1505
|
-
onPointerLeave:
|
|
1506
|
-
|
|
2594
|
+
onPointerLeave: M(r.onPointerLeave, () => {
|
|
2595
|
+
c();
|
|
1507
2596
|
})
|
|
1508
2597
|
}
|
|
1509
2598
|
);
|
|
1510
2599
|
}
|
|
1511
2600
|
);
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1514
|
-
(
|
|
1515
|
-
const { __scopeSelect:
|
|
1516
|
-
return /* @__PURE__ */
|
|
2601
|
+
uo.displayName = "SelectScrollButtonImpl";
|
|
2602
|
+
const Zs = "SelectSeparator", po = l.forwardRef(
|
|
2603
|
+
(e, o) => {
|
|
2604
|
+
const { __scopeSelect: t, ...n } = e;
|
|
2605
|
+
return /* @__PURE__ */ b(F.div, { "aria-hidden": !0, ...n, ref: o });
|
|
1517
2606
|
}
|
|
1518
2607
|
);
|
|
1519
|
-
|
|
1520
|
-
const
|
|
1521
|
-
(
|
|
1522
|
-
const { __scopeSelect:
|
|
1523
|
-
return
|
|
2608
|
+
po.displayName = Zs;
|
|
2609
|
+
const Ft = "SelectArrow", fo = l.forwardRef(
|
|
2610
|
+
(e, o) => {
|
|
2611
|
+
const { __scopeSelect: t, ...n } = e, r = yt(t), s = ge(Ft, t), i = ve(Ft, t);
|
|
2612
|
+
return s.open && i.position === "popper" ? /* @__PURE__ */ b(Pe.Arrow, { ...r, ...n, ref: o }) : null;
|
|
1524
2613
|
}
|
|
1525
2614
|
);
|
|
1526
|
-
|
|
1527
|
-
const
|
|
1528
|
-
(
|
|
1529
|
-
const { value:
|
|
1530
|
-
|
|
1531
|
-
const
|
|
1532
|
-
if (
|
|
2615
|
+
fo.displayName = Ft;
|
|
2616
|
+
const Js = "BubbleSelect", Qs = l.forwardRef(
|
|
2617
|
+
(e, o) => {
|
|
2618
|
+
const { value: t, ...n } = e, r = l.useRef(null), s = z(o, r), i = Qn(t), a = ge(Js, void 0);
|
|
2619
|
+
l.useEffect(() => {
|
|
2620
|
+
const d = r.current, y = window.HTMLSelectElement.prototype, h = Object.getOwnPropertyDescriptor(y, "value").set;
|
|
2621
|
+
if (i !== t && h) {
|
|
1533
2622
|
const u = new Event("change", { bubbles: !0 });
|
|
1534
|
-
|
|
2623
|
+
h.call(d, t), d.dispatchEvent(u);
|
|
1535
2624
|
}
|
|
1536
|
-
}, [
|
|
1537
|
-
let
|
|
1538
|
-
return
|
|
2625
|
+
}, [i, t]);
|
|
2626
|
+
let c = t;
|
|
2627
|
+
return a.multi && !Array.isArray(t) && (c = []), /* @__PURE__ */ b(er, { asChild: !0, children: /* @__PURE__ */ b(
|
|
1539
2628
|
"select",
|
|
1540
2629
|
{
|
|
1541
|
-
...
|
|
1542
|
-
multiple:
|
|
1543
|
-
ref:
|
|
1544
|
-
defaultValue:
|
|
2630
|
+
...n,
|
|
2631
|
+
multiple: a.multi ? !0 : void 0,
|
|
2632
|
+
ref: s,
|
|
2633
|
+
defaultValue: c
|
|
1545
2634
|
}
|
|
1546
2635
|
) });
|
|
1547
2636
|
}
|
|
1548
2637
|
);
|
|
1549
|
-
|
|
1550
|
-
function
|
|
1551
|
-
const
|
|
1552
|
-
(
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
}(
|
|
2638
|
+
Qs.displayName = "BubbleSelect";
|
|
2639
|
+
function Un(e) {
|
|
2640
|
+
const o = ks(e), t = l.useRef(""), n = l.useRef(0), r = l.useCallback(
|
|
2641
|
+
(i) => {
|
|
2642
|
+
const a = t.current + i;
|
|
2643
|
+
o(a), function c(d) {
|
|
2644
|
+
t.current = d, window.clearTimeout(n.current), d !== "" && (n.current = window.setTimeout(() => c(""), 1e3));
|
|
2645
|
+
}(a);
|
|
1557
2646
|
},
|
|
1558
|
-
[
|
|
1559
|
-
),
|
|
1560
|
-
|
|
2647
|
+
[o]
|
|
2648
|
+
), s = l.useCallback(() => {
|
|
2649
|
+
t.current = "", window.clearTimeout(n.current);
|
|
1561
2650
|
}, []);
|
|
1562
|
-
return
|
|
1563
|
-
}
|
|
1564
|
-
function
|
|
1565
|
-
const
|
|
1566
|
-
let
|
|
1567
|
-
|
|
1568
|
-
const
|
|
1569
|
-
return
|
|
1570
|
-
}
|
|
1571
|
-
function
|
|
1572
|
-
return
|
|
1573
|
-
}
|
|
1574
|
-
const
|
|
1575
|
-
if (Array.isArray(
|
|
1576
|
-
return
|
|
1577
|
-
const
|
|
1578
|
-
return
|
|
1579
|
-
},
|
|
2651
|
+
return l.useEffect(() => () => window.clearTimeout(n.current), []), [t, r, s];
|
|
2652
|
+
}
|
|
2653
|
+
function Wn(e, o, t) {
|
|
2654
|
+
const r = o.length > 1 && Array.from(o).every((d) => d === o[0]) ? o[0] : o, s = t ? e.indexOf(t) : -1;
|
|
2655
|
+
let i = ei(e, Math.max(s, 0));
|
|
2656
|
+
r.length === 1 && (i = i.filter((d) => d !== t));
|
|
2657
|
+
const c = i.find((d) => d.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
2658
|
+
return c !== t ? c : void 0;
|
|
2659
|
+
}
|
|
2660
|
+
function ei(e, o) {
|
|
2661
|
+
return e.map((t, n) => e[(o + n) % e.length]);
|
|
2662
|
+
}
|
|
2663
|
+
const Kn = (e, o = []) => {
|
|
2664
|
+
if (Array.isArray(e))
|
|
2665
|
+
return e.reduce((n, r) => Kn(r, n), o);
|
|
2666
|
+
const t = o.indexOf(e);
|
|
2667
|
+
return t === -1 ? [...o, e] : [...o.slice(0, t), ...o.slice(t + 1)];
|
|
2668
|
+
}, ti = qt, oi = Xt, ni = Zt, ri = Jt, si = Qt, ii = eo, ai = oo, ci = no, li = ro, ui = so, di = io, pi = ao, fi = co, hi = lo, mi = po, gi = fo, zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1580
2669
|
__proto__: null,
|
|
1581
|
-
Arrow:
|
|
1582
|
-
Content:
|
|
1583
|
-
Group:
|
|
1584
|
-
Icon:
|
|
1585
|
-
Item:
|
|
1586
|
-
ItemIndicator:
|
|
1587
|
-
ItemText:
|
|
1588
|
-
Label:
|
|
1589
|
-
Portal:
|
|
1590
|
-
Root:
|
|
1591
|
-
ScrollDownButton:
|
|
1592
|
-
ScrollUpButton:
|
|
1593
|
-
Select:
|
|
1594
|
-
SelectArrow:
|
|
1595
|
-
SelectContent:
|
|
1596
|
-
SelectGroup:
|
|
1597
|
-
SelectIcon:
|
|
1598
|
-
SelectItem:
|
|
1599
|
-
SelectItemIndicator:
|
|
1600
|
-
SelectItemText:
|
|
1601
|
-
SelectLabel:
|
|
1602
|
-
SelectPortal:
|
|
1603
|
-
SelectScrollDownButton:
|
|
1604
|
-
SelectScrollUpButton:
|
|
1605
|
-
SelectSeparator:
|
|
1606
|
-
SelectTrigger:
|
|
1607
|
-
SelectValue:
|
|
1608
|
-
SelectViewport:
|
|
1609
|
-
Separator:
|
|
1610
|
-
Trigger:
|
|
1611
|
-
Value:
|
|
1612
|
-
Viewport:
|
|
1613
|
-
createSelectScope:
|
|
2670
|
+
Arrow: gi,
|
|
2671
|
+
Content: ii,
|
|
2672
|
+
Group: ci,
|
|
2673
|
+
Icon: ri,
|
|
2674
|
+
Item: ui,
|
|
2675
|
+
ItemIndicator: pi,
|
|
2676
|
+
ItemText: di,
|
|
2677
|
+
Label: li,
|
|
2678
|
+
Portal: si,
|
|
2679
|
+
Root: ti,
|
|
2680
|
+
ScrollDownButton: hi,
|
|
2681
|
+
ScrollUpButton: fi,
|
|
2682
|
+
Select: qt,
|
|
2683
|
+
SelectArrow: fo,
|
|
2684
|
+
SelectContent: eo,
|
|
2685
|
+
SelectGroup: no,
|
|
2686
|
+
SelectIcon: Jt,
|
|
2687
|
+
SelectItem: so,
|
|
2688
|
+
SelectItemIndicator: ao,
|
|
2689
|
+
SelectItemText: io,
|
|
2690
|
+
SelectLabel: ro,
|
|
2691
|
+
SelectPortal: Qt,
|
|
2692
|
+
SelectScrollDownButton: lo,
|
|
2693
|
+
SelectScrollUpButton: co,
|
|
2694
|
+
SelectSeparator: po,
|
|
2695
|
+
SelectTrigger: Xt,
|
|
2696
|
+
SelectValue: Zt,
|
|
2697
|
+
SelectViewport: oo,
|
|
2698
|
+
Separator: mi,
|
|
2699
|
+
Trigger: oi,
|
|
2700
|
+
Value: ni,
|
|
2701
|
+
Viewport: ai,
|
|
2702
|
+
createSelectScope: Fs
|
|
1614
2703
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1615
|
-
function
|
|
1616
|
-
return function(
|
|
1617
|
-
if (
|
|
1618
|
-
return
|
|
2704
|
+
function ji(e, o, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
2705
|
+
return function(r) {
|
|
2706
|
+
if (e == null || e(r), t === !1 || !r.defaultPrevented)
|
|
2707
|
+
return o == null ? void 0 : o(r);
|
|
1619
2708
|
};
|
|
1620
2709
|
}
|
|
1621
2710
|
export {
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
2711
|
+
Bi as Combobox,
|
|
2712
|
+
zi as Select,
|
|
2713
|
+
ji as composeEventHandlers,
|
|
2714
|
+
tr as createCollection,
|
|
2715
|
+
ks as useCallbackRef,
|
|
2716
|
+
or as useCollator,
|
|
2717
|
+
Lt as useFilter,
|
|
2718
|
+
nr as usePrev
|
|
1630
2719
|
};
|