@strapi/ui-primitives 1.7.4 → 1.7.6

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 CHANGED
@@ -1,39 +1,39 @@
1
1
  import { jsx as d, jsxs as Ne, Fragment as Ae } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
- import { composeEventHandlers as E } from "@radix-ui/primitive";
3
+ import { composeEventHandlers as T } from "@radix-ui/primitive";
4
4
  import { useComposedRefs as _ } from "@radix-ui/react-compose-refs";
5
5
  import { createContextScope as Qe, createContext as et } from "@radix-ui/react-context";
6
6
  import { DismissableLayer as tt } from "@radix-ui/react-dismissable-layer";
7
+ import { useFocusGuards as ot } from "@radix-ui/react-focus-guards";
8
+ import { FocusScope as nt } from "@radix-ui/react-focus-scope";
7
9
  import { useId as oe } from "@radix-ui/react-id";
8
10
  import * as re from "@radix-ui/react-popper";
9
- import { createPopperScope as ot } from "@radix-ui/react-popper";
10
- import { Portal as nt } from "@radix-ui/react-portal";
11
+ import { createPopperScope as rt } from "@radix-ui/react-popper";
12
+ import { Portal as lt } from "@radix-ui/react-portal";
11
13
  import { Primitive as N } from "@radix-ui/react-primitive";
12
14
  import { useControllableState as ie } from "@radix-ui/react-use-controllable-state";
13
15
  import { useLayoutEffect as B } from "@radix-ui/react-use-layout-effect";
14
- import { hideOthers as rt } from "aria-hidden";
16
+ import { hideOthers as st } from "aria-hidden";
15
17
  import * as _e from "react-dom";
16
- import { RemoveScroll as lt } from "react-remove-scroll";
18
+ import { RemoveScroll as ct } from "react-remove-scroll";
17
19
  import { Slot as Ie } from "@radix-ui/react-slot";
18
20
  import { clamp as Ze } from "@radix-ui/number";
19
- import { createCollection as Pt } from "@radix-ui/react-collection";
20
- import { useDirection as Vt } from "@radix-ui/react-direction";
21
- import { useFocusGuards as Rt } from "@radix-ui/react-focus-guards";
22
- import { FocusScope as Nt } from "@radix-ui/react-focus-scope";
21
+ import { createCollection as Rt } from "@radix-ui/react-collection";
22
+ import { useDirection as Nt } from "@radix-ui/react-direction";
23
23
  import { useCallbackRef as At } from "@radix-ui/react-use-callback-ref";
24
24
  import { useCallbackRef as Rn } from "@radix-ui/react-use-callback-ref";
25
25
  import { usePrevious as _t } from "@radix-ui/react-use-previous";
26
26
  import { VisuallyHidden as Mt } from "@radix-ui/react-visually-hidden";
27
27
  let ye = /* @__PURE__ */ new Map();
28
- function Ot(n, s) {
29
- let e = n + (s ? Object.entries(s).sort((o, r) => o[0] < r[0] ? -1 : 1).join() : "");
28
+ function Ot(r, s) {
29
+ let e = r + (s ? Object.entries(s).sort((o, n) => o[0] < n[0] ? -1 : 1).join() : "");
30
30
  if (ye.has(e))
31
31
  return ye.get(e);
32
- let t = new Intl.Collator(n, s);
32
+ let t = new Intl.Collator(r, s);
33
33
  return ye.set(e, t), t;
34
34
  }
35
- function Me(n, s) {
36
- let e = Ot(n, {
35
+ function Me(r, s) {
36
+ let e = Ot(r, {
37
37
  usage: "search",
38
38
  ...s
39
39
  });
@@ -48,9 +48,9 @@ function Me(n, s) {
48
48
  if (o.length === 0)
49
49
  return !0;
50
50
  t = t.normalize("NFC"), o = o.normalize("NFC");
51
- let r = 0, i = o.length;
52
- for (; r + i <= t.length; r++) {
53
- let c = t.slice(r, r + i);
51
+ let n = 0, i = o.length;
52
+ for (; n + i <= t.length; n++) {
53
+ let c = t.slice(n, n + i);
54
54
  if (e.compare(o, c) === 0)
55
55
  return !0;
56
56
  }
@@ -58,102 +58,102 @@ function Me(n, s) {
58
58
  }
59
59
  };
60
60
  }
61
- const Dt = (n) => {
61
+ const Dt = (r) => {
62
62
  const s = l.useRef();
63
63
  return l.useEffect(() => {
64
- s.current = n;
64
+ s.current = r;
65
65
  }), s.current;
66
66
  };
67
- function kt(n) {
68
- const s = `${n}CollectionProvider`, [e, t] = Qe(s), [o, r] = e(s, {
67
+ function kt(r) {
68
+ const s = `${r}CollectionProvider`, [e, t] = Qe(s), [o, n] = e(s, {
69
69
  collectionRef: { current: null },
70
70
  itemMap: /* @__PURE__ */ new Map(),
71
71
  listeners: /* @__PURE__ */ new Set()
72
72
  }), i = (u) => {
73
- const { scope: p, children: g } = u, C = l.useRef(null), v = l.useRef(/* @__PURE__ */ new Map()).current, x = l.useRef(/* @__PURE__ */ new Set()).current;
74
- return /* @__PURE__ */ d(o, { scope: p, itemMap: v, collectionRef: C, listeners: x, children: g });
73
+ const { scope: m, children: S } = u, C = l.useRef(null), x = l.useRef(/* @__PURE__ */ new Map()).current, h = l.useRef(/* @__PURE__ */ new Set()).current;
74
+ return /* @__PURE__ */ d(o, { scope: m, itemMap: x, collectionRef: C, listeners: h, children: S });
75
75
  };
76
76
  i.displayName = s;
77
- const c = `${n}CollectionSlot`, a = l.forwardRef((u, p) => {
78
- const { scope: g, children: C } = u, v = r(c, g), x = _(p, v.collectionRef);
79
- return /* @__PURE__ */ d(Ie, { ref: x, children: C });
77
+ const c = `${r}CollectionSlot`, a = l.forwardRef((u, m) => {
78
+ const { scope: S, children: C } = u, x = n(c, S), h = _(m, x.collectionRef);
79
+ return /* @__PURE__ */ d(Ie, { ref: h, children: C });
80
80
  });
81
81
  a.displayName = c;
82
- const m = `${n}CollectionItemSlot`, f = "data-radix-collection-item", S = l.forwardRef((u, p) => {
83
- const { scope: g, children: C, ...v } = u, x = l.useRef(null), w = _(p, x), A = r(m, g);
82
+ const g = `${r}CollectionItemSlot`, p = "data-radix-collection-item", v = l.forwardRef((u, m) => {
83
+ const { scope: S, children: C, ...x } = u, h = l.useRef(null), w = _(m, h), A = n(g, S);
84
84
  return l.useEffect(() => {
85
- const T = Array.from(A.itemMap.values());
86
- return A.itemMap.set(x, { ref: x, ...v }), A.listeners.forEach((M) => M(Array.from(A.itemMap.values()), T)), () => {
85
+ const V = Array.from(A.itemMap.values());
86
+ return A.itemMap.set(h, { ref: h, ...x }), A.listeners.forEach((M) => M(Array.from(A.itemMap.values()), V)), () => {
87
87
  const M = Array.from(A.itemMap.values());
88
- A.itemMap.delete(x), A.listeners.forEach((P) => P(Array.from(A.itemMap.values()), M));
88
+ A.itemMap.delete(h), A.listeners.forEach((P) => P(Array.from(A.itemMap.values()), M));
89
89
  };
90
- }), /* @__PURE__ */ d(Ie, { [f]: "", ref: w, children: C });
90
+ }), /* @__PURE__ */ d(Ie, { [p]: "", ref: w, children: C });
91
91
  });
92
- S.displayName = m;
93
- function h(u) {
94
- const p = r(`${n}CollectionConsumer`, u), g = l.useCallback(() => {
95
- const v = p.collectionRef.current;
96
- if (!v)
92
+ v.displayName = g;
93
+ function f(u) {
94
+ const m = n(`${r}CollectionConsumer`, u), S = l.useCallback(() => {
95
+ const x = m.collectionRef.current;
96
+ if (!x)
97
97
  return [];
98
- const x = Array.from(v.querySelectorAll(`[${f}]`));
99
- return Array.from(p.itemMap.values()).sort(
100
- (T, M) => x.indexOf(T.ref.current) - x.indexOf(M.ref.current)
98
+ const h = Array.from(x.querySelectorAll(`[${p}]`));
99
+ return Array.from(m.itemMap.values()).sort(
100
+ (V, M) => h.indexOf(V.ref.current) - h.indexOf(M.ref.current)
101
101
  );
102
- }, [p.collectionRef, p.itemMap]), C = l.useCallback(
103
- (v) => (p.listeners.add(v), () => p.listeners.delete(v)),
104
- [p.listeners]
102
+ }, [m.collectionRef, m.itemMap]), C = l.useCallback(
103
+ (x) => (m.listeners.add(x), () => m.listeners.delete(x)),
104
+ [m.listeners]
105
105
  );
106
- return { getItems: g, subscribe: C };
106
+ return { getItems: S, subscribe: C };
107
107
  }
108
108
  return [
109
- { Provider: i, Slot: a, ItemSlot: S },
110
- h,
109
+ { Provider: i, Slot: a, ItemSlot: v },
110
+ f,
111
111
  t
112
112
  ];
113
113
  }
114
- const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !!(n.length === 1 && n.match(/\S| /)), st = "Combobox", [pe, me] = kt(st), [Bt, j] = et(st), Ht = ({ children: n }) => /* @__PURE__ */ d(re.Root, { children: /* @__PURE__ */ d(pe.Provider, { scope: void 0, children: n }) }), $t = (n) => {
114
+ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (r) => !!(r.length === 1 && r.match(/\S| /)), it = "Combobox", [fe, Ce] = kt(it), [Bt, j] = et(it), Ht = ({ children: r }) => /* @__PURE__ */ d(re.Root, { children: /* @__PURE__ */ d(fe.Provider, { scope: void 0, children: r }) }), $t = (r) => {
115
115
  const {
116
116
  allowCustomValue: s = !1,
117
117
  autocomplete: e = "none",
118
118
  children: t,
119
119
  open: o,
120
- defaultOpen: r,
120
+ defaultOpen: n,
121
121
  onOpenChange: i,
122
122
  value: c,
123
123
  defaultValue: a,
124
- onValueChange: m,
125
- disabled: f,
126
- required: S = !1,
127
- locale: h = "en-EN",
124
+ onValueChange: g,
125
+ disabled: p,
126
+ required: v = !1,
127
+ locale: f = "en-EN",
128
128
  onTextValueChange: u,
129
- textValue: p,
130
- defaultTextValue: g,
129
+ textValue: m,
130
+ defaultTextValue: S,
131
131
  filterValue: C,
132
- defaultFilterValue: v,
133
- onFilterValueChange: x
134
- } = n, [w, A] = l.useState(null), [T, M] = l.useState(null), [P, k] = l.useState(null), [H, z] = l.useState(null), [$ = !1, O] = ie({
132
+ defaultFilterValue: x,
133
+ onFilterValueChange: h
134
+ } = r, [w, A] = l.useState(null), [V, M] = l.useState(null), [P, k] = l.useState(null), [H, z] = l.useState(null), [$ = !1, O] = ie({
135
135
  prop: o,
136
- defaultProp: r,
136
+ defaultProp: n,
137
137
  onChange: i
138
138
  }), [F, L] = ie({
139
139
  prop: c,
140
140
  defaultProp: a,
141
- onChange: m
141
+ onChange: g
142
142
  }), [U, K] = ie({
143
- prop: p,
144
- defaultProp: g,
143
+ prop: m,
144
+ defaultProp: S,
145
145
  onChange: u
146
146
  }), [q, X] = ie({
147
147
  prop: C,
148
- defaultProp: v,
149
- onChange: x
148
+ defaultProp: x,
149
+ onChange: h
150
150
  }), W = oe(), ue = l.useCallback(
151
151
  (le, se) => {
152
152
  const de = se.map((y) => y.ref.current), [Z, ...ce] = de, [Q] = ce.slice(-1), b = H;
153
153
  for (const y of le) {
154
154
  if (y === b)
155
155
  return;
156
- if (y?.scrollIntoView({ block: "nearest" }), y === Z && T && (T.scrollTop = 0), y === Q && T && (T.scrollTop = T.scrollHeight), z(y), e === "both") {
156
+ if (y?.scrollIntoView({ block: "nearest" }), y === Z && V && (V.scrollTop = 0), y === Q && V && (V.scrollTop = V.scrollHeight), z(y), e === "both") {
157
157
  const D = se.find((I) => I.ref.current === y);
158
158
  D && K(D.textValue);
159
159
  }
@@ -161,19 +161,19 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
161
161
  return;
162
162
  }
163
163
  },
164
- [e, K, T, H]
164
+ [e, K, V, H]
165
165
  );
166
166
  return l.useEffect(() => {
167
167
  e !== "both" && z(null);
168
168
  }, [U, e]), l.useEffect(() => {
169
169
  if (P && w)
170
- return rt([P, w]);
170
+ return st([P, w]);
171
171
  }, [P, w]), /* @__PURE__ */ d(Ht, { children: /* @__PURE__ */ d(
172
172
  Bt,
173
173
  {
174
174
  allowCustomValue: s,
175
175
  autocomplete: e,
176
- required: S,
176
+ required: v,
177
177
  trigger: w,
178
178
  onTriggerChange: A,
179
179
  contentId: W,
@@ -181,8 +181,8 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
181
181
  onValueChange: L,
182
182
  open: $,
183
183
  onOpenChange: O,
184
- disabled: f,
185
- locale: h,
184
+ disabled: p,
185
+ locale: f,
186
186
  focusFirst: ue,
187
187
  textValue: U,
188
188
  onTextValueChange: K,
@@ -195,24 +195,53 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
195
195
  children: t
196
196
  }
197
197
  ) });
198
- }, Ut = "ComboboxTrigger", Kt = l.forwardRef((n, s) => {
199
- const { ...e } = n, t = j(Ut);
200
- return /* @__PURE__ */ d(re.Anchor, { asChild: !0, children: /* @__PURE__ */ d("div", { ref: s, "data-disabled": t.disabled ? "" : void 0, ...e }) });
201
- }), ct = "ComboboxInput", Wt = l.forwardRef((n, s) => {
202
- const e = j(ct), t = l.useRef(null), { getItems: o } = me(void 0), { startsWith: r } = Me(e.locale, { sensitivity: "base" }), i = e.disabled, c = _(t, s, e.onTriggerChange), a = () => {
198
+ }, Ut = "ComboboxTrigger", Kt = l.forwardRef((r, s) => {
199
+ const { ...e } = r, t = j(Ut), o = () => {
200
+ t.disabled || t.onOpenChange(!0);
201
+ };
202
+ return /* @__PURE__ */ d(re.Anchor, { asChild: !0, children: /* @__PURE__ */ d(
203
+ nt,
204
+ {
205
+ asChild: !0,
206
+ trapped: t.open,
207
+ onMountAutoFocus: (n) => {
208
+ n.preventDefault();
209
+ },
210
+ onUnmountAutoFocus: (n) => {
211
+ t.trigger?.focus({ preventScroll: !0 }), document.getSelection()?.empty(), n.preventDefault();
212
+ },
213
+ children: /* @__PURE__ */ d(
214
+ "div",
215
+ {
216
+ ref: s,
217
+ "data-disabled": t.disabled ? "" : void 0,
218
+ ...e,
219
+ onClick: T(e.onClick, () => {
220
+ t.trigger?.focus();
221
+ }),
222
+ onPointerDown: T(e.onPointerDown, (n) => {
223
+ const i = n.target;
224
+ i.hasPointerCapture(n.pointerId) && i.releasePointerCapture(n.pointerId), (i.closest("button") ?? i.closest("div")) === n.currentTarget && n.button === 0 && n.ctrlKey === !1 && (o(), t.trigger?.focus());
225
+ })
226
+ }
227
+ )
228
+ }
229
+ ) });
230
+ }), at = "ComboboxInput", Wt = l.forwardRef((r, s) => {
231
+ const e = j(at), t = l.useRef(null), { getItems: o } = Ce(void 0), { startsWith: n } = Me(e.locale, { sensitivity: "base" }), i = e.disabled, c = _(t, s, e.onTriggerChange), a = () => {
203
232
  i || e.onOpenChange(!0);
204
- }, m = Dt(e.filterValue);
233
+ }, g = Dt(e.filterValue);
205
234
  return B(() => {
206
- const f = setTimeout(() => {
235
+ const p = setTimeout(() => {
207
236
  if (e.textValue === "" || e.textValue === void 0 || e.filterValue === "" || e.filterValue === void 0)
208
237
  return;
209
- const S = o().find(
210
- (u) => u.type === "option" && r(u.textValue, e.textValue)
211
- ), h = vo(m ?? "", e.filterValue);
212
- S && !e.visuallyFocussedItem && h === e.filterValue.length && t.current.setSelectionRange(e.filterValue.length, e.textValue.length);
238
+ const v = o().find(
239
+ (u) => u.type === "option" && n(u.textValue, e.textValue)
240
+ ), f = vo(g ?? "", e.filterValue);
241
+ v && !e.visuallyFocussedItem && f === e.filterValue.length && t.current?.setSelectionRange(e.filterValue.length, e.textValue.length);
213
242
  });
214
- return () => clearTimeout(f);
215
- }, [e.textValue, e.filterValue, r, e.visuallyFocussedItem, o, m]), /* @__PURE__ */ d(
243
+ return () => clearTimeout(p);
244
+ }, [e.textValue, e.filterValue, n, e.visuallyFocussedItem, o, g]), /* @__PURE__ */ d(
216
245
  "input",
217
246
  {
218
247
  type: "text",
@@ -228,137 +257,138 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
228
257
  "data-disabled": i ? "" : void 0,
229
258
  "data-placeholder": e.textValue === void 0 ? "" : void 0,
230
259
  value: e.textValue ?? "",
231
- ...n,
260
+ ...r,
232
261
  ref: c,
233
- onClick: E(n.onClick, (f) => {
234
- f.currentTarget.focus();
235
- }),
236
- onPointerDown: E(n.onPointerDown, (f) => {
237
- f.button === 0 && f.ctrlKey === !1 && (a(), f.currentTarget.focus());
238
- }),
239
- onKeyDown: E(n.onKeyDown, (f) => {
240
- if (["ArrowUp", "ArrowDown", "Home", "End"].includes(f.key))
262
+ onKeyDown: T(r.onKeyDown, (p) => {
263
+ if (["ArrowUp", "ArrowDown", "Home", "End"].includes(p.key))
241
264
  setTimeout(() => {
242
- let h = o().filter((u) => !u.disabled).map((u) => u.ref.current);
243
- if (["ArrowUp", "End"].includes(f.key) && (h = h.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(f.key)) {
244
- const u = e.visuallyFocussedItem ?? f.target;
245
- let p = h.indexOf(u);
246
- p === h.length - 1 && (p = -1), h = h.slice(p + 1);
265
+ let f = o().filter((u) => !u.disabled).map((u) => u.ref.current);
266
+ if (["ArrowUp", "End"].includes(p.key) && (f = f.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(p.key)) {
267
+ const u = e.visuallyFocussedItem ?? p.target;
268
+ let m = f.indexOf(u);
269
+ m === f.length - 1 && (m = -1), f = f.slice(m + 1);
247
270
  }
248
- if (["ArrowDown"].includes(f.key) && e.autocomplete === "both" && h.length > 1) {
249
- const [u, ...p] = h, g = o().find((C) => C.ref.current === u).textValue;
250
- e.textValue === g && (h = p);
271
+ if (["ArrowDown"].includes(p.key) && e.autocomplete === "both" && f.length > 1) {
272
+ const [u, ...m] = f, S = o().find((C) => C.ref.current === u).textValue;
273
+ e.textValue === S && (f = m);
251
274
  }
252
- e.focusFirst(h, o());
253
- }), f.preventDefault();
254
- else if (["Escape"].includes(f.key))
255
- e.open ? e.onOpenChange(!1) : (e.onValueChange(void 0), e.onTextValueChange("")), f.preventDefault();
256
- else if (Lt.includes(f.key)) {
275
+ e.focusFirst(f, o());
276
+ }), p.preventDefault();
277
+ else if (["Tab"].includes(p.key) && e.open)
278
+ p.preventDefault();
279
+ else if (["Escape"].includes(p.key))
280
+ e.open ? e.onOpenChange(!1) : (e.onValueChange(void 0), e.onTextValueChange("")), p.preventDefault();
281
+ else if (Lt.includes(p.key)) {
257
282
  if (e.visuallyFocussedItem) {
258
- const S = o().find((h) => h.ref.current === e.visuallyFocussedItem);
259
- S && (e.onValueChange(S.value), e.onTextValueChange(S.textValue), e.autocomplete === "both" && e.onFilterValueChange(S.textValue), S.ref.current?.click());
283
+ const v = o().find((f) => f.ref.current === e.visuallyFocussedItem);
284
+ v && (e.onValueChange(v.value), e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue), v.ref.current?.click());
260
285
  } else {
261
- const S = o().find(
262
- (h) => h.type === "option" && !h.disabled && h.textValue === e.textValue
286
+ const v = o().find(
287
+ (f) => f.type === "option" && !f.disabled && f.textValue === e.textValue
263
288
  );
264
- S && (e.onValueChange(S.value), e.onTextValueChange(S.textValue), e.autocomplete === "both" && e.onFilterValueChange(S.textValue), S.ref.current?.click());
289
+ v && (e.onValueChange(v.value), e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue), v.ref.current?.click());
265
290
  }
266
- e.onOpenChange(!1), f.preventDefault();
291
+ e.onOpenChange(!1), p.preventDefault();
267
292
  } else
268
293
  e.onVisuallyFocussedItemChange(null);
269
294
  }),
270
- onChange: E(n.onChange, (f) => {
271
- e.onTextValueChange(f.currentTarget.value), e.autocomplete === "both" && e.onFilterValueChange(f.currentTarget.value);
295
+ onChange: T(r.onChange, (p) => {
296
+ e.onTextValueChange(p.currentTarget.value), e.autocomplete === "both" && e.onFilterValueChange(p.currentTarget.value);
272
297
  }),
273
- onKeyUp: E(n.onKeyUp, (f) => {
274
- !e.open && (Je(f.key) || ["ArrowUp", "ArrowDown", "Home", "End", "Backspace"].includes(f.key)) && a(), setTimeout(() => {
275
- if (e.autocomplete === "both" && Je(f.key) && e.filterValue !== void 0) {
276
- const S = e.filterValue, h = o().find((u) => r(u.textValue, S));
277
- h && e.onTextValueChange(h.textValue);
298
+ onKeyUp: T(r.onKeyUp, (p) => {
299
+ !e.open && (Je(p.key) || ["ArrowUp", "ArrowDown", "Home", "End", "Backspace"].includes(p.key)) && a(), setTimeout(() => {
300
+ if (e.autocomplete === "both" && Je(p.key) && e.filterValue !== void 0) {
301
+ const v = e.filterValue, f = o().find((u) => n(u.textValue, v));
302
+ f && e.onTextValueChange(f.textValue);
278
303
  }
279
304
  });
305
+ }),
306
+ onBlur: T(r.onBlur, () => {
307
+ e.onVisuallyFocussedItemChange(null);
308
+ const [p] = o().filter(
309
+ (f) => f.textValue === e.textValue && f.type === "option"
310
+ );
311
+ if (e.allowCustomValue) {
312
+ p && (e.onValueChange(p.value), e.autocomplete === "both" && e.onFilterValueChange(p.textValue));
313
+ return;
314
+ }
315
+ const [v] = o().filter((f) => f.value === e.value && f.type === "option");
316
+ p ? e.onValueChange(p.value) : v && e.textValue !== "" ? (e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue)) : (e.onValueChange(void 0), e.onTextValueChange(""));
280
317
  })
281
318
  }
282
319
  );
283
- }), zt = l.forwardRef((n, s) => {
284
- const { children: e, ...t } = n, o = j(ct), r = o.disabled, i = () => {
285
- r || (o.onOpenChange(!0), o.trigger?.focus());
320
+ }), zt = l.forwardRef((r, s) => {
321
+ const { children: e, ...t } = r, o = j(at), n = o.disabled, i = () => {
322
+ n || (o.onOpenChange(!0), o.trigger?.focus());
286
323
  };
287
324
  return /* @__PURE__ */ d(
288
325
  N.button,
289
326
  {
290
327
  "aria-hidden": !0,
291
328
  type: "button",
292
- "aria-disabled": r,
329
+ "aria-disabled": n,
293
330
  "aria-controls": o.contentId,
294
331
  "aria-expanded": o.open,
295
- disabled: r,
296
- "data-disabled": r ? "" : void 0,
332
+ disabled: n,
333
+ "data-disabled": n ? "" : void 0,
297
334
  ...t,
298
335
  tabIndex: -1,
299
336
  ref: s,
300
- onClick: E(t.onClick, () => {
337
+ onClick: T(t.onClick, () => {
301
338
  o.trigger?.focus();
302
339
  }),
303
- onPointerDown: E(t.onPointerDown, (c) => {
340
+ onPointerDown: T(t.onPointerDown, (c) => {
304
341
  c.button === 0 && c.ctrlKey === !1 && (i(), c.preventDefault());
305
342
  }),
306
- onKeyDown: E(t.onKeyDown, (c) => {
343
+ onKeyDown: T(t.onKeyDown, (c) => {
307
344
  Ft.includes(c.key) && (i(), c.preventDefault());
308
345
  }),
309
346
  children: e || "▼"
310
347
  }
311
348
  );
312
- }), Gt = "ComboboxPortal", it = (n) => /* @__PURE__ */ d(nt, { asChild: !0, ...n });
313
- it.displayName = Gt;
314
- const at = "ComboboxContent", jt = l.forwardRef((n, s) => {
315
- const e = j(at), [t, o] = l.useState();
349
+ }), Gt = "ComboboxPortal", ut = (r) => /* @__PURE__ */ d(lt, { asChild: !0, ...r });
350
+ ut.displayName = Gt;
351
+ const dt = "ComboboxContent", jt = l.forwardRef((r, s) => {
352
+ const e = j(dt), [t, o] = l.useState();
316
353
  if (B(() => {
317
354
  o(new DocumentFragment());
318
355
  }, []), !e.open) {
319
- const r = t;
320
- return r ? _e.createPortal(
321
- /* @__PURE__ */ d(pe.Slot, { scope: void 0, children: /* @__PURE__ */ d("div", { children: n.children }) }),
322
- r
356
+ const n = t;
357
+ return n ? _e.createPortal(
358
+ /* @__PURE__ */ d(fe.Slot, { scope: void 0, children: /* @__PURE__ */ d("div", { children: r.children }) }),
359
+ n
323
360
  ) : null;
324
361
  }
325
- return /* @__PURE__ */ d(qt, { ...n, ref: s });
362
+ return /* @__PURE__ */ d(qt, { ...r, ref: s });
326
363
  }), Yt = 10, qt = l.forwardRef(
327
- (n, s) => {
328
- const { onEscapeKeyDown: e, onPointerDownOutside: t, ...o } = n, r = j(at), i = _(s, (g) => r.onContentChange(g)), { onOpenChange: c, onValueChange: a, onFilterValueChange: m, onTextValueChange: f, textValue: S, value: h } = r, { getItems: u } = me(void 0), p = l.useCallback(() => {
329
- r.onVisuallyFocussedItemChange(null);
330
- const [g] = u().filter((v) => v.textValue === S && v.type === "option");
331
- if (r.allowCustomValue) {
332
- g && (a(g.value), r.autocomplete === "both" && m(g.textValue));
333
- return;
334
- }
335
- const [C] = u().filter((v) => v.value === h && v.type === "option");
336
- g ? a(g.value) : C && S !== "" ? (f(C.textValue), r.autocomplete === "both" && m(C.textValue)) : (a(void 0), f(""));
337
- }, [r, u, m, f, a, S, h]);
338
- return l.useEffect(() => {
339
- const g = () => {
340
- p(), c(!1);
364
+ (r, s) => {
365
+ const { onEscapeKeyDown: e, onPointerDownOutside: t, ...o } = r, n = j(dt), i = _(s, (a) => n.onContentChange(a)), { onOpenChange: c } = n;
366
+ return ot(), l.useEffect(() => {
367
+ const a = () => {
368
+ c(!1);
341
369
  };
342
- return window.addEventListener("blur", g), window.addEventListener("resize", g), () => {
343
- window.removeEventListener("blur", g), window.removeEventListener("resize", g);
370
+ return window.addEventListener("blur", a), window.addEventListener("resize", a), () => {
371
+ window.removeEventListener("blur", a), window.removeEventListener("resize", a);
344
372
  };
345
- }, [p, c]), /* @__PURE__ */ d(lt, { allowPinchZoom: !0, children: /* @__PURE__ */ d(
373
+ }, [c]), /* @__PURE__ */ d(ct, { allowPinchZoom: !0, children: /* @__PURE__ */ d(
346
374
  tt,
347
375
  {
348
376
  asChild: !0,
349
377
  onEscapeKeyDown: e,
350
378
  onPointerDownOutside: t,
351
- onFocusOutside: (g) => g.preventDefault(),
379
+ onFocusOutside: (a) => {
380
+ a.preventDefault();
381
+ },
352
382
  onDismiss: () => {
353
- r.onOpenChange(!1), r.trigger?.focus({ preventScroll: !0 }), p();
383
+ n.onOpenChange(!1), n.trigger?.focus({ preventScroll: !0 });
354
384
  },
355
385
  children: /* @__PURE__ */ d(
356
386
  Xt,
357
387
  {
358
388
  role: "listbox",
359
- id: r.contentId,
360
- "data-state": r.open ? "open" : "closed",
361
- onContextMenu: (g) => g.preventDefault(),
389
+ id: n.contentId,
390
+ "data-state": n.open ? "open" : "closed",
391
+ onContextMenu: (a) => a.preventDefault(),
362
392
  ...o,
363
393
  ref: i,
364
394
  style: {
@@ -375,8 +405,8 @@ const at = "ComboboxContent", jt = l.forwardRef((n, s) => {
375
405
  ) });
376
406
  }
377
407
  ), Xt = l.forwardRef(
378
- (n, s) => {
379
- const { align: e = "start", collisionPadding: t = Yt, ...o } = n;
408
+ (r, s) => {
409
+ const { align: e = "start", collisionPadding: t = Yt, ...o } = r;
380
410
  return /* @__PURE__ */ d(
381
411
  re.Content,
382
412
  {
@@ -397,7 +427,7 @@ const at = "ComboboxContent", jt = l.forwardRef((n, s) => {
397
427
  }
398
428
  );
399
429
  }
400
- ), Zt = "ComboboxViewport", Jt = l.forwardRef((n, s) => {
430
+ ), Zt = "ComboboxViewport", Jt = l.forwardRef((r, s) => {
401
431
  const e = j(Zt), t = _(s, e.onViewportChange);
402
432
  return /* @__PURE__ */ Ne(Ae, { children: [
403
433
  /* @__PURE__ */ d(
@@ -408,12 +438,12 @@ const at = "ComboboxContent", jt = l.forwardRef((n, s) => {
408
438
  }
409
439
  }
410
440
  ),
411
- /* @__PURE__ */ d(pe.Slot, { scope: void 0, children: /* @__PURE__ */ d(
441
+ /* @__PURE__ */ d(fe.Slot, { scope: void 0, children: /* @__PURE__ */ d(
412
442
  N.div,
413
443
  {
414
444
  "data-radix-combobox-viewport": "",
415
445
  role: "presentation",
416
- ...n,
446
+ ...r,
417
447
  ref: t,
418
448
  style: {
419
449
  // we use position: 'relative' here on the `viewport` so that when we call
@@ -422,76 +452,76 @@ const at = "ComboboxContent", jt = l.forwardRef((n, s) => {
422
452
  position: "relative",
423
453
  flex: 1,
424
454
  overflow: "auto",
425
- ...n.style
455
+ ...r.style
426
456
  }
427
457
  }
428
458
  ) })
429
459
  ] });
430
- }), ut = "ComboboxItem", [Qt, dt] = et(ut), ft = l.forwardRef((n, s) => {
431
- const { value: e, disabled: t = !1, textValue: o, ...r } = n, i = l.useRef(null), c = _(s, i), { getItems: a } = me(void 0), {
432
- onTextValueChange: m,
433
- textValue: f,
434
- visuallyFocussedItem: S,
435
- ...h
436
- } = j(ut), u = oe(), [p, g] = l.useState(o ?? ""), C = l.useMemo(() => S === a().find((M) => M.ref.current === i.current)?.ref.current, [a, S]), v = h.value === e, x = () => {
437
- t || (h.onValueChange(e), m(p), h.onOpenChange(!1), h.autocomplete === "both" && h.onFilterValueChange(p), h.trigger?.focus({ preventScroll: !0 }));
438
- }, { startsWith: w } = Me(h.locale, { sensitivity: "base" }), A = l.useCallback((M) => {
439
- g((P) => P || (M?.textContent ?? "").trim());
460
+ }), pt = "ComboboxItem", [Qt, ft] = et(pt), mt = l.forwardRef((r, s) => {
461
+ const { value: e, disabled: t = !1, textValue: o, ...n } = r, i = l.useRef(null), c = _(s, i), { getItems: a } = Ce(void 0), {
462
+ onTextValueChange: g,
463
+ textValue: p,
464
+ visuallyFocussedItem: v,
465
+ ...f
466
+ } = j(pt), u = oe(), [m, S] = l.useState(o ?? ""), C = l.useMemo(() => v === a().find((M) => M.ref.current === i.current)?.ref.current, [a, v]), x = f.value === e, h = () => {
467
+ t || (f.onValueChange(e), g(m), f.onOpenChange(!1), f.autocomplete === "both" && f.onFilterValueChange(m), f.trigger?.focus({ preventScroll: !0 }));
468
+ }, { startsWith: w } = Me(f.locale, { sensitivity: "base" }), A = l.useCallback((M) => {
469
+ S((P) => P || (M?.textContent ?? "").trim());
440
470
  }, []);
441
471
  l.useEffect(() => {
442
- v && f === void 0 && p !== "" && m(p);
443
- }, [p, v, f, m]);
444
- const T = oe();
445
- return h.autocomplete === "list" && p && f && !w(p, f) || h.autocomplete === "both" && p && h.filterValue && !w(p, h.filterValue) ? null : /* @__PURE__ */ d(Qt, { textId: u, onTextValueChange: A, isSelected: v, children: /* @__PURE__ */ d(pe.ItemSlot, { scope: void 0, value: e, textValue: p, disabled: t, type: "option", children: /* @__PURE__ */ d(
472
+ x && p === void 0 && m !== "" && g(m);
473
+ }, [m, x, p, g]);
474
+ const V = oe();
475
+ return f.autocomplete === "list" && m && p && !w(m, p) || f.autocomplete === "both" && m && f.filterValue && !w(m, f.filterValue) ? null : /* @__PURE__ */ d(Qt, { textId: u, onTextValueChange: A, isSelected: x, children: /* @__PURE__ */ d(fe.ItemSlot, { scope: void 0, value: e, textValue: m, disabled: t, type: "option", children: /* @__PURE__ */ d(
446
476
  N.div,
447
477
  {
448
478
  role: "option",
449
479
  "aria-labelledby": u,
450
480
  "data-highlighted": C ? "" : void 0,
451
- "aria-selected": v && C,
452
- "data-state": v ? "checked" : "unchecked",
481
+ "aria-selected": x && C,
482
+ "data-state": x ? "checked" : "unchecked",
453
483
  "aria-disabled": t || void 0,
454
484
  "data-disabled": t ? "" : void 0,
455
485
  tabIndex: t ? void 0 : -1,
456
- ...r,
457
- id: T,
486
+ ...n,
487
+ id: V,
458
488
  ref: c,
459
- onPointerUp: E(r.onPointerUp, x)
489
+ onPointerUp: T(n.onPointerUp, h)
460
490
  }
461
491
  ) }) });
462
- }), eo = "ComboboxItemText", to = l.forwardRef((n, s) => {
463
- const { className: e, style: t, ...o } = n, r = dt(eo), i = _(s, r.onTextValueChange);
464
- return /* @__PURE__ */ d(N.span, { id: r.textId, ...o, ref: i });
465
- }), oo = "ComboboxItemIndicator", no = l.forwardRef((n, s) => {
466
- const { isSelected: e } = dt(oo);
467
- return e ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...n, ref: s }) : null;
468
- }), pt = "ComboboxNoValueFound", ro = l.forwardRef((n, s) => {
469
- const { textValue: e = "", locale: t } = j(pt), [o, r] = l.useState([]), { subscribe: i } = me(void 0), { startsWith: c } = Me(t, { sensitivity: "base" });
492
+ }), eo = "ComboboxItemText", to = l.forwardRef((r, s) => {
493
+ const { className: e, style: t, ...o } = r, n = ft(eo), i = _(s, n.onTextValueChange);
494
+ return /* @__PURE__ */ d(N.span, { id: n.textId, ...o, ref: i });
495
+ }), oo = "ComboboxItemIndicator", no = l.forwardRef((r, s) => {
496
+ const { isSelected: e } = ft(oo);
497
+ return e ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...r, ref: s }) : null;
498
+ }), ht = "ComboboxNoValueFound", ro = l.forwardRef((r, s) => {
499
+ const { textValue: e = "", locale: t } = j(ht), [o, n] = l.useState([]), { subscribe: i } = Ce(void 0), { startsWith: c } = Me(t, { sensitivity: "base" });
470
500
  return l.useEffect(() => {
471
- const a = i((m) => {
472
- r(m);
501
+ const a = i((g) => {
502
+ n(g);
473
503
  });
474
504
  return () => {
475
505
  a();
476
506
  };
477
- }, [i]), o.some((a) => c(a.textValue, e)) ? null : /* @__PURE__ */ d(N.div, { ...n, ref: s });
478
- }), lo = l.forwardRef((n, s) => {
479
- const { disabled: e = !1, ...t } = n, o = j(pt), { textValue: r, visuallyFocussedItem: i } = o, { getItems: c, subscribe: a } = me(void 0), m = l.useRef(null), [f, S] = l.useState(!1), h = _(s, m), u = l.useMemo(() => i === c().find((C) => C.ref.current === m.current)?.ref.current, [c, i]), p = oe(), g = () => {
480
- !e && r && (o.onValueChange(r), o.onTextValueChange(r), o.onOpenChange(!1), o.autocomplete === "both" && o.onFilterValueChange(r), o.trigger?.focus({ preventScroll: !0 }));
507
+ }, [i]), o.some((a) => c(a.textValue, e)) ? null : /* @__PURE__ */ d(N.div, { ...r, ref: s });
508
+ }), lo = l.forwardRef((r, s) => {
509
+ const { disabled: e = !1, ...t } = r, o = j(ht), { textValue: n, visuallyFocussedItem: i } = o, { getItems: c, subscribe: a } = Ce(void 0), g = l.useRef(null), [p, v] = l.useState(!1), f = _(s, g), u = l.useMemo(() => i === c().find((C) => C.ref.current === g.current)?.ref.current, [c, i]), m = oe(), S = () => {
510
+ !e && n && (o.onValueChange(n), o.onTextValueChange(n), o.onOpenChange(!1), o.autocomplete === "both" && o.onFilterValueChange(n), o.trigger?.focus({ preventScroll: !0 }));
481
511
  };
482
512
  return B(() => {
483
- const C = a((v) => {
484
- S(!v.some((x) => x.textValue === r && x.type !== "create"));
513
+ const C = a((x) => {
514
+ v(!x.some((h) => h.textValue === n && h.type !== "create"));
485
515
  });
486
- return () => {
516
+ return c().length === 0 && v(!0), () => {
487
517
  C();
488
518
  };
489
- }, [r, a]), !r || !f ? null : /* @__PURE__ */ d(
490
- pe.ItemSlot,
519
+ }, [n, a, c]), !n || !p ? null : /* @__PURE__ */ d(
520
+ fe.ItemSlot,
491
521
  {
492
522
  scope: void 0,
493
- value: r ?? "",
494
- textValue: r ?? "",
523
+ value: n ?? "",
524
+ textValue: n ?? "",
495
525
  disabled: e,
496
526
  type: "create",
497
527
  children: /* @__PURE__ */ d(
@@ -503,59 +533,59 @@ const at = "ComboboxContent", jt = l.forwardRef((n, s) => {
503
533
  "data-disabled": e ? "" : void 0,
504
534
  "data-highlighted": u ? "" : void 0,
505
535
  ...t,
506
- id: p,
507
- ref: h,
508
- onPointerUp: E(t.onPointerUp, g)
536
+ id: m,
537
+ ref: f,
538
+ onPointerUp: T(t.onPointerUp, S)
509
539
  }
510
540
  )
511
541
  }
512
542
  );
513
- }), so = $t, co = Kt, io = Wt, ao = zt, uo = it, fo = jt, po = Jt, mo = ft, ho = to, go = no, xo = ro, Co = lo;
514
- function vo(n, s) {
515
- const e = Math.min(n.length, s.length);
543
+ }), so = $t, co = Kt, io = Wt, ao = zt, uo = ut, po = jt, fo = Jt, mo = mt, ho = to, go = no, Co = ro, xo = lo;
544
+ function vo(r, s) {
545
+ const e = Math.min(r.length, s.length);
516
546
  for (let t = 0; t < e; t++)
517
- if (n[t] !== s[t])
547
+ if (r[t] !== s[t])
518
548
  return t;
519
549
  return e;
520
550
  }
521
551
  const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
522
552
  __proto__: null,
523
- ComboboxItem: ft,
524
- Content: fo,
525
- CreateItem: Co,
553
+ ComboboxItem: mt,
554
+ Content: po,
555
+ CreateItem: xo,
526
556
  Icon: ao,
527
557
  Item: mo,
528
558
  ItemIndicator: go,
529
559
  ItemText: ho,
530
- NoValueFound: xo,
560
+ NoValueFound: Co,
531
561
  Portal: uo,
532
562
  Root: so,
533
563
  TextInput: io,
534
564
  Trigger: co,
535
- Viewport: po
536
- }, Symbol.toStringTag, { value: "Module" })), So = [" ", "Enter", "ArrowUp", "ArrowDown"], bo = [" ", "Enter"], he = "Select", [Ce, ge, wo] = Pt(he), [ae, yo] = Qe(he, [
565
+ Viewport: fo
566
+ }, Symbol.toStringTag, { value: "Module" })), So = [" ", "Enter", "ArrowUp", "ArrowDown"], bo = [" ", "Enter"], me = "Select", [xe, he, wo] = Rt(me), [ae, yo] = Qe(me, [
537
567
  wo,
538
- ot
539
- ]), ve = ot(), [Io, Y] = ae(he), [To, Eo] = ae(he), Oe = (n) => {
568
+ rt
569
+ ]), ve = rt(), [Io, Y] = ae(me), [To, Vo] = ae(me), Oe = (r) => {
540
570
  const {
541
571
  __scopeSelect: s,
542
572
  children: e,
543
573
  open: t,
544
574
  defaultOpen: o,
545
- onOpenChange: r,
575
+ onOpenChange: n,
546
576
  value: i,
547
577
  defaultValue: c,
548
578
  onValueChange: a,
549
- dir: m,
579
+ dir: g,
550
580
  // name,
551
581
  // autoComplete,
552
- disabled: f,
553
- required: S,
554
- multi: h = !1
555
- } = n, u = ve(s), [p, g] = l.useState(null), [C, v] = l.useState(null), [x, w] = l.useState(!1), A = Vt(m), [T = !1, M] = ie({
582
+ disabled: p,
583
+ required: v,
584
+ multi: f = !1
585
+ } = r, u = ve(s), [m, S] = l.useState(null), [C, x] = l.useState(null), [h, w] = l.useState(!1), A = Nt(g), [V = !1, M] = ie({
556
586
  prop: t,
557
587
  defaultProp: o,
558
- onChange: r
588
+ onChange: n
559
589
  }), [P, k] = ie({
560
590
  prop: i,
561
591
  defaultProp: c,
@@ -566,27 +596,27 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
566
596
  return /* @__PURE__ */ d(re.Root, { ...u, children: /* @__PURE__ */ d(
567
597
  Io,
568
598
  {
569
- required: S,
599
+ required: v,
570
600
  scope: s,
571
- trigger: p,
572
- onTriggerChange: g,
601
+ trigger: m,
602
+ onTriggerChange: S,
573
603
  valueNode: C,
574
- onValueNodeChange: v,
575
- valueNodeHasChildren: x,
604
+ onValueNodeChange: x,
605
+ valueNodeHasChildren: h,
576
606
  onValueNodeHasChildrenChange: w,
577
607
  contentId: oe(),
578
608
  value: P,
579
609
  onValueChange: k,
580
- open: T,
610
+ open: V,
581
611
  onOpenChange: M,
582
612
  dir: A,
583
613
  triggerPointerDownPosRef: H,
584
- disabled: f,
585
- multi: h,
586
- children: /* @__PURE__ */ d(Ce.Provider, { scope: s, children: /* @__PURE__ */ d(
614
+ disabled: p,
615
+ multi: f,
616
+ children: /* @__PURE__ */ d(xe.Provider, { scope: s, children: /* @__PURE__ */ d(
587
617
  To,
588
618
  {
589
- scope: n.__scopeSelect,
619
+ scope: r.__scopeSelect,
590
620
  onNativeOptionAdd: l.useCallback((O) => {
591
621
  $((F) => new Set(F).add(O));
592
622
  }, []),
@@ -602,148 +632,148 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
602
632
  }
603
633
  ) });
604
634
  };
605
- Oe.displayName = he;
606
- const mt = "SelectTrigger", De = l.forwardRef(
607
- (n, s) => {
608
- const { __scopeSelect: e, ...t } = n, o = ve(e), r = Y(mt, e), i = r.disabled, c = _(s, r.onTriggerChange), a = ge(e), [m, f, S] = It((u) => {
609
- const p = a().filter((v) => !v.disabled), g = p.find((v) => v.value === r.value), C = Tt(p, u, g);
635
+ Oe.displayName = me;
636
+ const gt = "SelectTrigger", De = l.forwardRef(
637
+ (r, s) => {
638
+ const { __scopeSelect: e, ...t } = r, o = ve(e), n = Y(gt, e), i = n.disabled, c = _(s, n.onTriggerChange), a = he(e), [g, p, v] = Vt((u) => {
639
+ const m = a().filter((x) => !x.disabled), S = m.find((x) => x.value === n.value), C = Pt(m, u, S);
610
640
  if (C !== void 0 && !Array.isArray(C.value)) {
611
- const v = r.multi ? [C.value] : C.value;
612
- r.onValueChange(v);
641
+ const x = n.multi ? [C.value] : C.value;
642
+ n.onValueChange(x);
613
643
  }
614
- }), h = () => {
615
- i || (r.onOpenChange(!0), S());
644
+ }), f = () => {
645
+ i || (n.onOpenChange(!0), v());
616
646
  };
617
647
  return /* @__PURE__ */ d(re.Anchor, { asChild: !0, ...o, children: /* @__PURE__ */ d(
618
648
  N.div,
619
649
  {
620
650
  role: "combobox",
621
- "aria-controls": r.contentId,
622
- "aria-expanded": r.open,
623
- "aria-required": r.required,
651
+ "aria-controls": n.contentId,
652
+ "aria-expanded": n.open,
653
+ "aria-required": n.required,
624
654
  "aria-autocomplete": "none",
625
- dir: r.dir,
626
- "data-state": r.open ? "open" : "closed",
655
+ dir: n.dir,
656
+ "data-state": n.open ? "open" : "closed",
627
657
  "data-disabled": i ? "" : void 0,
628
- "data-placeholder": r.value === void 0 ? "" : void 0,
658
+ "data-placeholder": n.value === void 0 ? "" : void 0,
629
659
  tabIndex: i ? void 0 : 0,
630
660
  ...t,
631
661
  ref: c,
632
- onClick: E(t.onClick, (u) => {
662
+ onClick: T(t.onClick, (u) => {
633
663
  u.currentTarget.focus();
634
664
  }),
635
- onPointerDown: E(t.onPointerDown, (u) => {
636
- const p = u.target;
637
- p.hasPointerCapture(u.pointerId) && p.releasePointerCapture(u.pointerId), (p.closest("button") ?? p.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (h(), r.triggerPointerDownPosRef.current = {
665
+ onPointerDown: T(t.onPointerDown, (u) => {
666
+ const m = u.target;
667
+ m.hasPointerCapture(u.pointerId) && m.releasePointerCapture(u.pointerId), (m.closest("button") ?? m.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (f(), n.triggerPointerDownPosRef.current = {
638
668
  x: Math.round(u.pageX),
639
669
  y: Math.round(u.pageY)
640
670
  }, u.preventDefault());
641
671
  }),
642
- onKeyDown: E(t.onKeyDown, (u) => {
643
- const p = m.current !== "", g = u.ctrlKey || u.altKey || u.metaKey, C = u.target;
644
- (C.closest("button") ?? C.closest("div")) === u.currentTarget && (!g && u.key.length === 1 && f(u.key), !(p && u.key === " ") && So.includes(u.key) && (h(), u.preventDefault()));
672
+ onKeyDown: T(t.onKeyDown, (u) => {
673
+ const m = g.current !== "", S = u.ctrlKey || u.altKey || u.metaKey, C = u.target;
674
+ (C.closest("button") ?? C.closest("div")) === u.currentTarget && (!S && u.key.length === 1 && p(u.key), !(m && u.key === " ") && So.includes(u.key) && (f(), u.preventDefault()));
645
675
  })
646
676
  }
647
677
  ) });
648
678
  }
649
679
  );
650
- De.displayName = mt;
651
- const ht = "SelectValue", ke = l.forwardRef(
652
- (n, s) => {
653
- const { __scopeSelect: e, children: t, placeholder: o, ...r } = n, i = Y(ht, e), { onValueNodeHasChildrenChange: c } = i, a = t !== void 0, m = _(s, i.onValueNodeChange), [f, S] = l.useState([]), h = ge(e);
680
+ De.displayName = gt;
681
+ const Ct = "SelectValue", ke = l.forwardRef(
682
+ (r, s) => {
683
+ const { __scopeSelect: e, children: t, placeholder: o, ...n } = r, i = Y(Ct, e), { onValueNodeHasChildrenChange: c } = i, a = t !== void 0, g = _(s, i.onValueNodeChange), [p, v] = l.useState([]), f = he(e);
654
684
  B(() => {
655
685
  c(a);
656
686
  }, [c, a]), l.useLayoutEffect(() => {
657
- if (Array.isArray(i.value) && f.length !== i.value.length) {
658
- const p = setTimeout(() => {
659
- const g = h().filter(
687
+ if (Array.isArray(i.value) && p.length !== i.value.length) {
688
+ const m = setTimeout(() => {
689
+ const S = f().filter(
660
690
  (C) => Array.isArray(C.value) ? !1 : i.value?.includes(C.value)
661
691
  );
662
- S(g);
692
+ v(S);
663
693
  });
664
694
  return () => {
665
- clearTimeout(p);
695
+ clearTimeout(m);
666
696
  };
667
697
  }
668
- }, [i.value, h, f]);
698
+ }, [i.value, f, p]);
669
699
  let u;
670
700
  if ((i.value === void 0 || i.value.length === 0) && o !== void 0)
671
701
  u = /* @__PURE__ */ d("span", { children: o });
672
702
  else if (typeof t == "function")
673
703
  if (Array.isArray(i.value)) {
674
- const p = i.value.map((g) => {
675
- const C = f.find((v) => v.value === g);
676
- return C ? t({ value: g, textValue: C?.textValue }) : null;
704
+ const m = i.value.map((S) => {
705
+ const C = p.find((x) => x.value === S);
706
+ return C ? t({ value: S, textValue: C?.textValue }) : null;
677
707
  });
678
- u = p.every((g) => g === null) ? o : p;
708
+ u = m.every((S) => S === null) ? o : m;
679
709
  } else
680
710
  u = t(i.value);
681
711
  else
682
712
  u = t;
683
- return /* @__PURE__ */ d(N.span, { ...r, ref: m, children: u || null });
713
+ return /* @__PURE__ */ d(N.span, { ...n, ref: g, children: u || null });
684
714
  }
685
715
  );
686
- ke.displayName = ht;
716
+ ke.displayName = Ct;
687
717
  const Po = "SelectIcon", Fe = l.forwardRef(
688
- (n, s) => {
689
- const { __scopeSelect: e, children: t, ...o } = n;
718
+ (r, s) => {
719
+ const { __scopeSelect: e, children: t, ...o } = r;
690
720
  return /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t || "▼" });
691
721
  }
692
722
  );
693
723
  Fe.displayName = Po;
694
- const Vo = "SelectPortal", Le = (n) => /* @__PURE__ */ d(nt, { asChild: !0, ...n });
695
- Le.displayName = Vo;
724
+ const Eo = "SelectPortal", Le = (r) => /* @__PURE__ */ d(lt, { asChild: !0, ...r });
725
+ Le.displayName = Eo;
696
726
  const ne = "SelectContent", Be = l.forwardRef(
697
- (n, s) => {
698
- const e = Y(ne, n.__scopeSelect), [t, o] = l.useState();
727
+ (r, s) => {
728
+ const e = Y(ne, r.__scopeSelect), [t, o] = l.useState();
699
729
  if (B(() => {
700
730
  o(new DocumentFragment());
701
731
  }, []), !e.open) {
702
- const r = t;
703
- return r ? _e.createPortal(
704
- /* @__PURE__ */ d(gt, { scope: n.__scopeSelect, children: /* @__PURE__ */ d(Ce.Slot, { scope: n.__scopeSelect, children: /* @__PURE__ */ d("div", { children: n.children }) }) }),
705
- r
732
+ const n = t;
733
+ return n ? _e.createPortal(
734
+ /* @__PURE__ */ d(xt, { scope: r.__scopeSelect, children: /* @__PURE__ */ d(xe.Slot, { scope: r.__scopeSelect, children: /* @__PURE__ */ d("div", { children: r.children }) }) }),
735
+ n
706
736
  ) : null;
707
737
  }
708
- return /* @__PURE__ */ d(xt, { ...n, ref: s });
738
+ return /* @__PURE__ */ d(vt, { ...r, ref: s });
709
739
  }
710
740
  );
711
741
  Be.displayName = ne;
712
- const G = 10, [gt, J] = ae(ne), Ro = "SelectContentImpl", xt = l.forwardRef(
713
- (n, s) => {
742
+ const G = 10, [xt, J] = ae(ne), Ro = "SelectContentImpl", vt = l.forwardRef(
743
+ (r, s) => {
714
744
  const {
715
745
  __scopeSelect: e,
716
746
  position: t = "item-aligned",
717
747
  onCloseAutoFocus: o,
718
- onEscapeKeyDown: r,
748
+ onEscapeKeyDown: n,
719
749
  onPointerDownOutside: i,
720
750
  //
721
751
  // PopperContent props
722
752
  side: c,
723
753
  sideOffset: a,
724
- align: m,
725
- alignOffset: f,
726
- arrowPadding: S,
727
- collisionBoundary: h,
754
+ align: g,
755
+ alignOffset: p,
756
+ arrowPadding: v,
757
+ collisionBoundary: f,
728
758
  collisionPadding: u,
729
- sticky: p,
730
- hideWhenDetached: g,
759
+ sticky: m,
760
+ hideWhenDetached: S,
731
761
  avoidCollisions: C,
732
762
  //
733
- ...v
734
- } = n, x = Y(ne, e), [w, A] = l.useState(null), [T, M] = l.useState(null), P = _(s, (b) => A(b)), [k, H] = l.useState(null), [z, $] = l.useState(null), O = ge(e), [F, L] = l.useState(!1), U = l.useRef(!1);
763
+ ...x
764
+ } = r, h = Y(ne, e), [w, A] = l.useState(null), [V, M] = l.useState(null), P = _(s, (b) => A(b)), [k, H] = l.useState(null), [z, $] = l.useState(null), O = he(e), [F, L] = l.useState(!1), U = l.useRef(!1);
735
765
  l.useEffect(() => {
736
766
  if (w)
737
- return rt(w);
738
- }, [w]), Rt();
767
+ return st(w);
768
+ }, [w]), ot();
739
769
  const K = l.useCallback(
740
770
  (b) => {
741
- const [y, ...D] = O().map((R) => R.ref.current), [I] = D.slice(-1), V = document.activeElement;
771
+ const [y, ...D] = O().map((R) => R.ref.current), [I] = D.slice(-1), E = document.activeElement;
742
772
  for (const R of b)
743
- if (R === V || (R?.scrollIntoView({ block: "nearest" }), R === y && T && (T.scrollTop = 0), R === I && T && (T.scrollTop = T.scrollHeight), R?.focus(), document.activeElement !== V))
773
+ if (R === E || (R?.scrollIntoView({ block: "nearest" }), R === y && V && (V.scrollTop = 0), R === I && V && (V.scrollTop = V.scrollHeight), R?.focus(), document.activeElement !== E))
744
774
  return;
745
775
  },
746
- [O, T]
776
+ [O, V]
747
777
  ), q = l.useCallback(
748
778
  () => K([k, w]),
749
779
  [K, k, w]
@@ -751,7 +781,7 @@ const G = 10, [gt, J] = ae(ne), Ro = "SelectContentImpl", xt = l.forwardRef(
751
781
  l.useEffect(() => {
752
782
  F && q();
753
783
  }, [F, q]);
754
- const { onOpenChange: X, triggerPointerDownPosRef: W } = x;
784
+ const { onOpenChange: X, triggerPointerDownPosRef: W } = h;
755
785
  l.useEffect(() => {
756
786
  if (w) {
757
787
  let b = { x: 0, y: 0 };
@@ -773,39 +803,39 @@ const G = 10, [gt, J] = ae(ne), Ro = "SelectContentImpl", xt = l.forwardRef(
773
803
  window.removeEventListener("blur", b), window.removeEventListener("resize", b);
774
804
  };
775
805
  }, [X]);
776
- const [ue, le] = It((b) => {
777
- const y = O().filter((V) => !V.disabled), D = y.find((V) => V.ref.current === document.activeElement), I = Tt(y, b, D);
806
+ const [ue, le] = Vt((b) => {
807
+ const y = O().filter((E) => !E.disabled), D = y.find((E) => E.ref.current === document.activeElement), I = Pt(y, b, D);
778
808
  I && setTimeout(() => I.ref.current.focus());
779
809
  }), se = l.useCallback(
780
810
  (b, y, D) => {
781
811
  const I = !U.current && !D;
782
- (x.value !== void 0 && x.value === y || I) && (H(b), I && (U.current = !0));
812
+ (h.value !== void 0 && h.value === y || I) && (H(b), I && (U.current = !0));
783
813
  },
784
- [x.value]
814
+ [h.value]
785
815
  ), de = l.useCallback(() => w?.focus(), [w]), Z = l.useCallback(
786
816
  (b, y, D) => {
787
817
  const I = !U.current && !D;
788
- (x.value !== void 0 && (Array.isArray(y) ? y.every((R) => x.value?.includes(R)) : x.value === y) || I) && $(b);
818
+ (h.value !== void 0 && (Array.isArray(y) ? y.every((R) => h.value?.includes(R)) : h.value === y) || I) && $(b);
789
819
  },
790
- [x.value]
791
- ), ce = t === "popper" ? Te : Ct, Q = ce === Te ? {
820
+ [h.value]
821
+ ), ce = t === "popper" ? Te : St, Q = ce === Te ? {
792
822
  side: c,
793
823
  sideOffset: a,
794
- align: m,
795
- alignOffset: f,
796
- arrowPadding: S,
797
- collisionBoundary: h,
824
+ align: g,
825
+ alignOffset: p,
826
+ arrowPadding: v,
827
+ collisionBoundary: f,
798
828
  collisionPadding: u,
799
- sticky: p,
800
- hideWhenDetached: g,
829
+ sticky: m,
830
+ hideWhenDetached: S,
801
831
  avoidCollisions: C
802
832
  } : {};
803
833
  return /* @__PURE__ */ d(
804
- gt,
834
+ xt,
805
835
  {
806
836
  scope: e,
807
837
  content: w,
808
- viewport: T,
838
+ viewport: V,
809
839
  onViewportChange: M,
810
840
  itemRefCallback: se,
811
841
  selectedItem: k,
@@ -816,36 +846,36 @@ const G = 10, [gt, J] = ae(ne), Ro = "SelectContentImpl", xt = l.forwardRef(
816
846
  position: t,
817
847
  isPositioned: F,
818
848
  searchRef: ue,
819
- children: /* @__PURE__ */ d(lt, { as: Ie, allowPinchZoom: !0, children: /* @__PURE__ */ d(
820
- Nt,
849
+ children: /* @__PURE__ */ d(ct, { as: Ie, allowPinchZoom: !0, children: /* @__PURE__ */ d(
850
+ nt,
821
851
  {
822
852
  asChild: !0,
823
- trapped: x.open,
853
+ trapped: h.open,
824
854
  onMountAutoFocus: (b) => {
825
855
  b.preventDefault();
826
856
  },
827
- onUnmountAutoFocus: E(o, (b) => {
828
- x.trigger?.focus({ preventScroll: !0 }), document.getSelection()?.empty(), b.preventDefault();
857
+ onUnmountAutoFocus: T(o, (b) => {
858
+ h.trigger?.focus({ preventScroll: !0 }), document.getSelection()?.empty(), b.preventDefault();
829
859
  }),
830
860
  children: /* @__PURE__ */ d(
831
861
  tt,
832
862
  {
833
863
  asChild: !0,
834
864
  disableOutsidePointerEvents: !0,
835
- onEscapeKeyDown: r,
865
+ onEscapeKeyDown: n,
836
866
  onPointerDownOutside: i,
837
867
  onFocusOutside: (b) => b.preventDefault(),
838
- onDismiss: () => x.onOpenChange(!1),
868
+ onDismiss: () => h.onOpenChange(!1),
839
869
  children: /* @__PURE__ */ d(
840
870
  ce,
841
871
  {
842
872
  role: "listbox",
843
- id: x.contentId,
844
- "data-state": x.open ? "open" : "closed",
845
- "aria-multiselectable": x.multi ? "true" : void 0,
846
- dir: x.dir,
873
+ id: h.contentId,
874
+ "data-state": h.open ? "open" : "closed",
875
+ "aria-multiselectable": h.multi ? "true" : void 0,
876
+ dir: h.dir,
847
877
  onContextMenu: (b) => b.preventDefault(),
848
- ...v,
878
+ ...x,
849
879
  ...Q,
850
880
  onPlaced: () => L(!0),
851
881
  ref: P,
@@ -855,14 +885,14 @@ const G = 10, [gt, J] = ae(ne), Ro = "SelectContentImpl", xt = l.forwardRef(
855
885
  flexDirection: "column",
856
886
  // reset the outline by default as the content MAY get focused
857
887
  outline: "none",
858
- ...v.style
888
+ ...x.style
859
889
  },
860
- onKeyDown: E(v.onKeyDown, (b) => {
890
+ onKeyDown: T(x.onKeyDown, (b) => {
861
891
  const y = b.ctrlKey || b.altKey || b.metaKey;
862
892
  if (b.key === "Tab" && b.preventDefault(), !y && b.key.length === 1 && le(b.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(b.key)) {
863
- let I = O().filter((V) => !V.disabled).map((V) => V.ref.current);
893
+ let I = O().filter((E) => !E.disabled).map((E) => E.ref.current);
864
894
  if (["ArrowUp", "End"].includes(b.key) && (I = I.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(b.key)) {
865
- const V = b.target, R = I.indexOf(V);
895
+ const E = b.target, R = I.indexOf(E);
866
896
  I = I.slice(R + 1);
867
897
  }
868
898
  setTimeout(() => K(I)), b.preventDefault();
@@ -878,63 +908,63 @@ const G = 10, [gt, J] = ae(ne), Ro = "SelectContentImpl", xt = l.forwardRef(
878
908
  );
879
909
  }
880
910
  );
881
- xt.displayName = Ro;
882
- const No = "SelectItemAlignedPosition", Ct = l.forwardRef(
883
- (n, s) => {
884
- const { __scopeSelect: e, onPlaced: t, ...o } = n, r = Y(ne, e), i = J(ne, e), [c, a] = l.useState(null), [m, f] = l.useState(null), S = _(s, (P) => f(P)), h = ge(e), u = l.useRef(!1), p = l.useRef(!0), { viewport: g, selectedItem: C, selectedItemText: v, focusSelectedItem: x } = i, w = l.useCallback(() => {
885
- if (r.trigger && r.valueNode && c && m && g && C && v) {
886
- const P = r.trigger.getBoundingClientRect(), k = m.getBoundingClientRect(), H = r.valueNode.getBoundingClientRect(), z = v.getBoundingClientRect();
887
- if (r.dir !== "rtl") {
888
- const V = z.left - k.left, R = H.left - V, ee = P.left - R, te = P.width + ee, Se = Math.max(te, k.width), be = window.innerWidth - G, we = Ze(R, [G, be - Se]);
911
+ vt.displayName = Ro;
912
+ const No = "SelectItemAlignedPosition", St = l.forwardRef(
913
+ (r, s) => {
914
+ const { __scopeSelect: e, onPlaced: t, ...o } = r, n = Y(ne, e), i = J(ne, e), [c, a] = l.useState(null), [g, p] = l.useState(null), v = _(s, (P) => p(P)), f = he(e), u = l.useRef(!1), m = l.useRef(!0), { viewport: S, selectedItem: C, selectedItemText: x, focusSelectedItem: h } = i, w = l.useCallback(() => {
915
+ if (n.trigger && n.valueNode && c && g && S && C && x) {
916
+ const P = n.trigger.getBoundingClientRect(), k = g.getBoundingClientRect(), H = n.valueNode.getBoundingClientRect(), z = x.getBoundingClientRect();
917
+ if (n.dir !== "rtl") {
918
+ const E = z.left - k.left, R = H.left - E, ee = P.left - R, te = P.width + ee, Se = Math.max(te, k.width), be = window.innerWidth - G, we = Ze(R, [G, be - Se]);
889
919
  c.style.minWidth = `${te}px`, c.style.left = `${we}px`;
890
920
  } else {
891
- const V = k.right - z.right, R = window.innerWidth - H.right - V, ee = window.innerWidth - P.right - R, te = P.width + ee, Se = Math.max(te, k.width), be = window.innerWidth - G, we = Ze(R, [G, be - Se]);
921
+ const E = k.right - z.right, R = window.innerWidth - H.right - E, ee = window.innerWidth - P.right - R, te = P.width + ee, Se = Math.max(te, k.width), be = window.innerWidth - G, we = Ze(R, [G, be - Se]);
892
922
  c.style.minWidth = `${te}px`, c.style.right = `${we}px`;
893
923
  }
894
- const $ = h(), O = window.innerHeight - G * 2, F = g.scrollHeight, L = window.getComputedStyle(m), U = parseInt(L.borderTopWidth, 10), K = parseInt(L.paddingTop, 10), q = parseInt(L.borderBottomWidth, 10), X = parseInt(L.paddingBottom, 10), W = U + K + F + X + q, ue = Math.min(C.offsetHeight * 5, W), le = window.getComputedStyle(g), se = parseInt(le.paddingTop, 10), de = parseInt(le.paddingBottom, 10), Z = P.top + P.height / 2 - G, ce = O - Z, Q = C.offsetHeight / 2, b = C.offsetTop + Q, y = U + K + b, D = W - y;
924
+ const $ = f(), O = window.innerHeight - G * 2, F = S.scrollHeight, L = window.getComputedStyle(g), U = parseInt(L.borderTopWidth, 10), K = parseInt(L.paddingTop, 10), q = parseInt(L.borderBottomWidth, 10), X = parseInt(L.paddingBottom, 10), W = U + K + F + X + q, ue = Math.min(C.offsetHeight * 5, W), le = window.getComputedStyle(S), se = parseInt(le.paddingTop, 10), de = parseInt(le.paddingBottom, 10), Z = P.top + P.height / 2 - G, ce = O - Z, Q = C.offsetHeight / 2, b = C.offsetTop + Q, y = U + K + b, D = W - y;
895
925
  if (y <= Z) {
896
- const V = C === $[$.length - 1].ref.current;
926
+ const E = C === $[$.length - 1].ref.current;
897
927
  c.style.bottom = "0px";
898
- const R = m.clientHeight - g.offsetTop - g.offsetHeight, ee = Math.max(
928
+ const R = g.clientHeight - S.offsetTop - S.offsetHeight, ee = Math.max(
899
929
  ce,
900
930
  Q + // viewport might have padding bottom, include it to avoid a scrollable viewport
901
- (V ? de : 0) + R + q
931
+ (E ? de : 0) + R + q
902
932
  ), te = y + ee;
903
933
  c.style.height = `${te}px`;
904
934
  } else {
905
- const V = C === $[0].ref.current;
935
+ const E = C === $[0].ref.current;
906
936
  c.style.top = "0px";
907
937
  const ee = Math.max(
908
938
  Z,
909
- U + g.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
910
- (V ? se : 0) + Q
939
+ U + S.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
940
+ (E ? se : 0) + Q
911
941
  ) + D;
912
- c.style.height = `${ee}px`, g.scrollTop = y - Z + g.offsetTop;
942
+ c.style.height = `${ee}px`, S.scrollTop = y - Z + S.offsetTop;
913
943
  }
914
944
  c.style.margin = `${G}px 0`, c.style.minHeight = `${ue}px`, c.style.maxHeight = `${O}px`, t?.(), requestAnimationFrame(() => u.current = !0);
915
945
  }
916
946
  }, [
917
- h,
918
- r.trigger,
919
- r.valueNode,
947
+ f,
948
+ n.trigger,
949
+ n.valueNode,
920
950
  c,
921
- m,
922
951
  g,
952
+ S,
923
953
  C,
924
- v,
925
- r.dir,
954
+ x,
955
+ n.dir,
926
956
  t
927
957
  ]);
928
958
  B(() => w(), [w]);
929
- const [A, T] = l.useState();
959
+ const [A, V] = l.useState();
930
960
  B(() => {
931
- m && T(window.getComputedStyle(m).zIndex);
932
- }, [m]);
961
+ g && V(window.getComputedStyle(g).zIndex);
962
+ }, [g]);
933
963
  const M = l.useCallback(
934
964
  (P) => {
935
- P && p.current === !0 && (w(), x?.(), p.current = !1);
965
+ P && m.current === !0 && (w(), h?.(), m.current = !1);
936
966
  },
937
- [w, x]
967
+ [w, h]
938
968
  );
939
969
  return /* @__PURE__ */ d(
940
970
  _o,
@@ -957,7 +987,7 @@ const No = "SelectItemAlignedPosition", Ct = l.forwardRef(
957
987
  N.div,
958
988
  {
959
989
  ...o,
960
- ref: S,
990
+ ref: v,
961
991
  style: {
962
992
  // When we get the height of the content, it includes borders. If we were to set
963
993
  // the height without having `boxSizing: 'border-box'` it would be too big.
@@ -974,22 +1004,22 @@ const No = "SelectItemAlignedPosition", Ct = l.forwardRef(
974
1004
  );
975
1005
  }
976
1006
  );
977
- Ct.displayName = No;
1007
+ St.displayName = No;
978
1008
  const Ao = "SelectPopperPosition", Te = l.forwardRef(
979
- (n, s) => {
980
- const { __scopeSelect: e, align: t = "start", collisionPadding: o = G, ...r } = n, i = ve(e);
1009
+ (r, s) => {
1010
+ const { __scopeSelect: e, align: t = "start", collisionPadding: o = G, ...n } = r, i = ve(e);
981
1011
  return /* @__PURE__ */ d(
982
1012
  re.Content,
983
1013
  {
984
1014
  ...i,
985
- ...r,
1015
+ ...n,
986
1016
  ref: s,
987
1017
  align: t,
988
1018
  collisionPadding: o,
989
1019
  style: {
990
1020
  // Ensure border-box for floating-ui calculations
991
1021
  boxSizing: "border-box",
992
- ...r.style,
1022
+ ...n.style,
993
1023
  "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
994
1024
  "--radix-select-content-available-width": "var(--radix-popper-available-width)",
995
1025
  "--radix-select-content-available-height": "var(--radix-popper-available-height)",
@@ -1004,9 +1034,9 @@ Te.displayName = Ao;
1004
1034
  const [_o, He] = ae(
1005
1035
  ne,
1006
1036
  {}
1007
- ), Ee = "SelectViewport", $e = l.forwardRef(
1008
- (n, s) => {
1009
- const { __scopeSelect: e, ...t } = n, o = J(Ee, e), r = He(Ee, e), i = _(s, o.onViewportChange), c = l.useRef(0);
1037
+ ), Ve = "SelectViewport", $e = l.forwardRef(
1038
+ (r, s) => {
1039
+ const { __scopeSelect: e, ...t } = r, o = J(Ve, e), n = He(Ve, e), i = _(s, o.onViewportChange), c = l.useRef(0);
1010
1040
  return /* @__PURE__ */ Ne(Ae, { children: [
1011
1041
  /* @__PURE__ */ d(
1012
1042
  "style",
@@ -1016,7 +1046,7 @@ const [_o, He] = ae(
1016
1046
  }
1017
1047
  }
1018
1048
  ),
1019
- /* @__PURE__ */ d(Ce.Slot, { scope: e, children: /* @__PURE__ */ d(
1049
+ /* @__PURE__ */ d(xe.Slot, { scope: e, children: /* @__PURE__ */ d(
1020
1050
  N.div,
1021
1051
  {
1022
1052
  "data-radix-select-viewport": "",
@@ -1032,49 +1062,49 @@ const [_o, He] = ae(
1032
1062
  overflow: "auto",
1033
1063
  ...t.style
1034
1064
  },
1035
- onScroll: E(t.onScroll, (a) => {
1036
- const m = a.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: S } = r;
1037
- if (S?.current && f) {
1038
- const h = Math.abs(c.current - m.scrollTop);
1039
- if (h > 0) {
1040
- const u = window.innerHeight - G * 2, p = parseFloat(f.style.minHeight), g = parseFloat(f.style.height), C = Math.max(p, g);
1065
+ onScroll: T(t.onScroll, (a) => {
1066
+ const g = a.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = n;
1067
+ if (v?.current && p) {
1068
+ const f = Math.abs(c.current - g.scrollTop);
1069
+ if (f > 0) {
1070
+ const u = window.innerHeight - G * 2, m = parseFloat(p.style.minHeight), S = parseFloat(p.style.height), C = Math.max(m, S);
1041
1071
  if (C < u) {
1042
- const v = C + h, x = Math.min(u, v), w = v - x;
1043
- f.style.height = `${x}px`, f.style.bottom === "0px" && (m.scrollTop = w > 0 ? w : 0, f.style.justifyContent = "flex-end");
1072
+ const x = C + f, h = Math.min(u, x), w = x - h;
1073
+ p.style.height = `${h}px`, p.style.bottom === "0px" && (g.scrollTop = w > 0 ? w : 0, p.style.justifyContent = "flex-end");
1044
1074
  }
1045
1075
  }
1046
1076
  }
1047
- c.current = m.scrollTop;
1077
+ c.current = g.scrollTop;
1048
1078
  })
1049
1079
  }
1050
1080
  ) })
1051
1081
  ] });
1052
1082
  }
1053
1083
  );
1054
- $e.displayName = Ee;
1055
- const vt = "SelectGroup", [Mo, Oo] = ae(vt), Ue = l.forwardRef(
1056
- (n, s) => {
1057
- const { __scopeSelect: e, ...t } = n, o = oe();
1084
+ $e.displayName = Ve;
1085
+ const bt = "SelectGroup", [Mo, Oo] = ae(bt), Ue = l.forwardRef(
1086
+ (r, s) => {
1087
+ const { __scopeSelect: e, ...t } = r, o = oe();
1058
1088
  return /* @__PURE__ */ d(Mo, { scope: e, id: o, children: /* @__PURE__ */ d(N.div, { role: "group", "aria-labelledby": o, ...t, ref: s }) });
1059
1089
  }
1060
1090
  );
1061
- Ue.displayName = vt;
1062
- const St = "SelectLabel", Ke = l.forwardRef(
1063
- (n, s) => {
1064
- const { __scopeSelect: e, ...t } = n, o = Oo(St, e);
1091
+ Ue.displayName = bt;
1092
+ const wt = "SelectLabel", Ke = l.forwardRef(
1093
+ (r, s) => {
1094
+ const { __scopeSelect: e, ...t } = r, o = Oo(wt, e);
1065
1095
  return /* @__PURE__ */ d(N.div, { id: o.id, ...t, ref: s });
1066
1096
  }
1067
1097
  );
1068
- Ke.displayName = St;
1069
- const xe = "SelectItem", [Do, bt] = ae(xe), We = l.forwardRef(
1070
- (n, s) => {
1071
- const { __scopeSelect: e, value: t, disabled: o = !1, textValue: r, ...i } = n, c = Y(xe, e), a = J(xe, e), m = typeof t == "string" ? Array.isArray(c.value) ? c.value.includes(t) : c.value === t : t.every((x) => c.value?.includes(x)), f = Array.isArray(c.value) && Array.isArray(t) && t.some((x) => c.value?.includes(x)), [S, h] = l.useState(r ?? ""), [u, p] = l.useState(!1), g = _(
1098
+ Ke.displayName = wt;
1099
+ const ge = "SelectItem", [Do, yt] = ae(ge), We = l.forwardRef(
1100
+ (r, s) => {
1101
+ const { __scopeSelect: e, value: t, disabled: o = !1, textValue: n, ...i } = r, c = Y(ge, e), a = J(ge, e), g = typeof t == "string" ? Array.isArray(c.value) ? c.value.includes(t) : c.value === t : t.every((h) => c.value?.includes(h)), p = Array.isArray(c.value) && Array.isArray(t) && t.some((h) => c.value?.includes(h)), [v, f] = l.useState(n ?? ""), [u, m] = l.useState(!1), S = _(
1072
1102
  s,
1073
- (x) => a.itemRefCallback?.(x, t, o)
1074
- ), C = oe(), v = () => {
1103
+ (h) => a.itemRefCallback?.(h, t, o)
1104
+ ), C = oe(), x = () => {
1075
1105
  if (!o) {
1076
- let x = c.multi && typeof t == "string" ? [t] : t;
1077
- f && !m ? c.onValueChange(x) : Array.isArray(c.value) && (x = Et(t, c.value)), c.onValueChange(x), c.multi || c.onOpenChange(!1);
1106
+ let h = c.multi && typeof t == "string" ? [t] : t;
1107
+ p && !g ? c.onValueChange(h) : Array.isArray(c.value) && (h = Et(t, c.value)), c.onValueChange(h), c.multi || c.onOpenChange(!1);
1078
1108
  }
1079
1109
  };
1080
1110
  if (!c.multi && Array.isArray(t))
@@ -1086,36 +1116,36 @@ const xe = "SelectItem", [Do, bt] = ae(xe), We = l.forwardRef(
1086
1116
  value: t,
1087
1117
  disabled: o,
1088
1118
  textId: C,
1089
- isSelected: m,
1090
- isIntermediate: f,
1091
- onItemTextChange: l.useCallback((x) => {
1092
- h((w) => w || (x?.textContent ?? "").trim());
1119
+ isSelected: g,
1120
+ isIntermediate: p,
1121
+ onItemTextChange: l.useCallback((h) => {
1122
+ f((w) => w || (h?.textContent ?? "").trim());
1093
1123
  }, []),
1094
- children: /* @__PURE__ */ d(Ce.ItemSlot, { scope: e, value: t, disabled: o, textValue: S, children: /* @__PURE__ */ d(
1124
+ children: /* @__PURE__ */ d(xe.ItemSlot, { scope: e, value: t, disabled: o, textValue: v, children: /* @__PURE__ */ d(
1095
1125
  N.div,
1096
1126
  {
1097
1127
  role: "option",
1098
1128
  "aria-labelledby": C,
1099
1129
  "data-highlighted": u ? "" : void 0,
1100
- "aria-selected": c.multi ? void 0 : m && u,
1101
- "aria-checked": c.multi ? m : void 0,
1102
- "data-state": m ? "checked" : "unchecked",
1130
+ "aria-selected": c.multi ? void 0 : g && u,
1131
+ "aria-checked": c.multi ? g : void 0,
1132
+ "data-state": g ? "checked" : "unchecked",
1103
1133
  "aria-disabled": o || void 0,
1104
1134
  "data-disabled": o ? "" : void 0,
1105
1135
  tabIndex: o ? void 0 : -1,
1106
1136
  ...i,
1107
- ref: g,
1108
- onFocus: E(i.onFocus, () => p(!0)),
1109
- onBlur: E(i.onBlur, () => p(!1)),
1110
- onPointerUp: E(i.onPointerUp, v),
1111
- onPointerMove: E(i.onPointerMove, (x) => {
1112
- o ? a.onItemLeave?.() : x.currentTarget.focus({ preventScroll: !0 });
1137
+ ref: S,
1138
+ onFocus: T(i.onFocus, () => m(!0)),
1139
+ onBlur: T(i.onBlur, () => m(!1)),
1140
+ onPointerUp: T(i.onPointerUp, x),
1141
+ onPointerMove: T(i.onPointerMove, (h) => {
1142
+ o ? a.onItemLeave?.() : h.currentTarget.focus({ preventScroll: !0 });
1113
1143
  }),
1114
- onPointerLeave: E(i.onPointerLeave, (x) => {
1115
- x.currentTarget === document.activeElement && a.onItemLeave?.();
1144
+ onPointerLeave: T(i.onPointerLeave, (h) => {
1145
+ h.currentTarget === document.activeElement && a.onItemLeave?.();
1116
1146
  }),
1117
- onKeyDown: E(i.onKeyDown, (x) => {
1118
- a.searchRef?.current !== "" && x.key === " " || (bo.includes(x.key) && v(), x.key === " " && x.preventDefault());
1147
+ onKeyDown: T(i.onKeyDown, (h) => {
1148
+ a.searchRef?.current !== "" && h.key === " " || (bo.includes(h.key) && x(), h.key === " " && h.preventDefault());
1119
1149
  })
1120
1150
  }
1121
1151
  ) })
@@ -1123,15 +1153,15 @@ const xe = "SelectItem", [Do, bt] = ae(xe), We = l.forwardRef(
1123
1153
  );
1124
1154
  }
1125
1155
  );
1126
- We.displayName = xe;
1127
- const fe = "SelectItemText", ze = l.forwardRef(
1128
- (n, s) => {
1129
- const { __scopeSelect: e, className: t, style: o, ...r } = n, i = Y(fe, e), c = J(fe, e), a = bt(fe, e), m = Eo(fe, e), [f, S] = l.useState(null), h = _(
1156
+ We.displayName = ge;
1157
+ const pe = "SelectItemText", ze = l.forwardRef(
1158
+ (r, s) => {
1159
+ const { __scopeSelect: e, className: t, style: o, ...n } = r, i = Y(pe, e), c = J(pe, e), a = yt(pe, e), g = Vo(pe, e), [p, v] = l.useState(null), f = _(
1130
1160
  s,
1131
- (v) => S(v),
1161
+ (x) => v(x),
1132
1162
  a.onItemTextChange,
1133
- (v) => c.itemTextRefCallback?.(v, a.value, a.disabled)
1134
- ), u = f?.textContent, p = l.useMemo(
1163
+ (x) => c.itemTextRefCallback?.(x, a.value, a.disabled)
1164
+ ), u = p?.textContent, m = l.useMemo(
1135
1165
  () => /* @__PURE__ */ d(
1136
1166
  "option",
1137
1167
  {
@@ -1142,39 +1172,39 @@ const fe = "SelectItemText", ze = l.forwardRef(
1142
1172
  Array.isArray(a.value) ? a.value.join(";") : a.value
1143
1173
  ),
1144
1174
  [a.disabled, a.value, u]
1145
- ), { onNativeOptionAdd: g, onNativeOptionRemove: C } = m;
1146
- return B(() => (g(p), () => C(p)), [g, C, p]), /* @__PURE__ */ Ne(Ae, { children: [
1147
- /* @__PURE__ */ d(N.span, { id: a.textId, ...r, ref: h }),
1148
- a.isSelected && i.valueNode && !i.valueNodeHasChildren ? _e.createPortal(r.children, i.valueNode) : null
1175
+ ), { onNativeOptionAdd: S, onNativeOptionRemove: C } = g;
1176
+ return B(() => (S(m), () => C(m)), [S, C, m]), /* @__PURE__ */ Ne(Ae, { children: [
1177
+ /* @__PURE__ */ d(N.span, { id: a.textId, ...n, ref: f }),
1178
+ a.isSelected && i.valueNode && !i.valueNodeHasChildren ? _e.createPortal(n.children, i.valueNode) : null
1149
1179
  ] });
1150
1180
  }
1151
1181
  );
1152
- ze.displayName = fe;
1153
- const wt = "SelectItemIndicator", Ge = l.forwardRef(
1154
- (n, s) => {
1155
- const { __scopeSelect: e, children: t, ...o } = n, r = bt(wt, e);
1182
+ ze.displayName = pe;
1183
+ const It = "SelectItemIndicator", Ge = l.forwardRef(
1184
+ (r, s) => {
1185
+ const { __scopeSelect: e, children: t, ...o } = r, n = yt(It, e);
1156
1186
  return typeof t == "function" ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t({
1157
- isSelected: r.isSelected,
1158
- isIntermediate: r.isIntermediate
1159
- }) }) : r.isSelected ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t }) : null;
1187
+ isSelected: n.isSelected,
1188
+ isIntermediate: n.isIntermediate
1189
+ }) }) : n.isSelected ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t }) : null;
1160
1190
  }
1161
1191
  );
1162
- Ge.displayName = wt;
1192
+ Ge.displayName = It;
1163
1193
  const Pe = "SelectScrollUpButton", je = l.forwardRef(
1164
- (n, s) => {
1165
- const e = J(Pe, n.__scopeSelect), t = He(Pe, n.__scopeSelect), [o, r] = l.useState(!1), i = _(s, t.onScrollButtonChange);
1194
+ (r, s) => {
1195
+ const e = J(Pe, r.__scopeSelect), t = He(Pe, r.__scopeSelect), [o, n] = l.useState(!1), i = _(s, t.onScrollButtonChange);
1166
1196
  return B(() => {
1167
1197
  if (e.viewport && e.isPositioned) {
1168
1198
  const c = e.viewport, a = () => {
1169
- const m = c.scrollTop > 0;
1170
- r(m);
1199
+ const g = c.scrollTop > 0;
1200
+ n(g);
1171
1201
  };
1172
1202
  return a(), c.addEventListener("scroll", a), () => c.removeEventListener("scroll", a);
1173
1203
  }
1174
1204
  }, [e.viewport, e.isPositioned]), o ? /* @__PURE__ */ d(
1175
- yt,
1205
+ Tt,
1176
1206
  {
1177
- ...n,
1207
+ ...r,
1178
1208
  ref: i,
1179
1209
  onAutoScroll: () => {
1180
1210
  const { viewport: c, selectedItem: a } = e;
@@ -1185,21 +1215,21 @@ const Pe = "SelectScrollUpButton", je = l.forwardRef(
1185
1215
  }
1186
1216
  );
1187
1217
  je.displayName = Pe;
1188
- const Ve = "SelectScrollDownButton", Ye = l.forwardRef(
1189
- (n, s) => {
1190
- const e = J(Ve, n.__scopeSelect), t = He(Ve, n.__scopeSelect), [o, r] = l.useState(!1), i = _(s, t.onScrollButtonChange);
1218
+ const Ee = "SelectScrollDownButton", Ye = l.forwardRef(
1219
+ (r, s) => {
1220
+ const e = J(Ee, r.__scopeSelect), t = He(Ee, r.__scopeSelect), [o, n] = l.useState(!1), i = _(s, t.onScrollButtonChange);
1191
1221
  return B(() => {
1192
1222
  if (e.viewport && e.isPositioned) {
1193
1223
  const c = e.viewport, a = () => {
1194
- const m = c.scrollHeight - c.clientHeight, f = Math.ceil(c.scrollTop) < m;
1195
- r(f);
1224
+ const g = c.scrollHeight - c.clientHeight, p = Math.ceil(c.scrollTop) < g;
1225
+ n(p);
1196
1226
  };
1197
1227
  return a(), c.addEventListener("scroll", a), () => c.removeEventListener("scroll", a);
1198
1228
  }
1199
1229
  }, [e.viewport, e.isPositioned]), o ? /* @__PURE__ */ d(
1200
- yt,
1230
+ Tt,
1201
1231
  {
1202
- ...n,
1232
+ ...r,
1203
1233
  ref: i,
1204
1234
  onAutoScroll: () => {
1205
1235
  const { viewport: c, selectedItem: a } = e;
@@ -1209,14 +1239,14 @@ const Ve = "SelectScrollDownButton", Ye = l.forwardRef(
1209
1239
  ) : null;
1210
1240
  }
1211
1241
  );
1212
- Ye.displayName = Ve;
1213
- const yt = l.forwardRef(
1214
- (n, s) => {
1215
- const { __scopeSelect: e, onAutoScroll: t, ...o } = n, r = J("SelectScrollButton", e), i = l.useRef(null), c = ge(e), a = l.useCallback(() => {
1242
+ Ye.displayName = Ee;
1243
+ const Tt = l.forwardRef(
1244
+ (r, s) => {
1245
+ const { __scopeSelect: e, onAutoScroll: t, ...o } = r, n = J("SelectScrollButton", e), i = l.useRef(null), c = he(e), a = l.useCallback(() => {
1216
1246
  i.current !== null && (window.clearInterval(i.current), i.current = null);
1217
1247
  }, []);
1218
1248
  return l.useEffect(() => () => a(), [a]), B(() => {
1219
- c().find((f) => f.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
1249
+ c().find((p) => p.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
1220
1250
  }, [c]), /* @__PURE__ */ d(
1221
1251
  N.div,
1222
1252
  {
@@ -1224,37 +1254,37 @@ const yt = l.forwardRef(
1224
1254
  ...o,
1225
1255
  ref: s,
1226
1256
  style: { flexShrink: 0, ...o.style },
1227
- onPointerMove: E(o.onPointerMove, () => {
1228
- r.onItemLeave?.(), i.current === null && (i.current = window.setInterval(t, 50));
1257
+ onPointerMove: T(o.onPointerMove, () => {
1258
+ n.onItemLeave?.(), i.current === null && (i.current = window.setInterval(t, 50));
1229
1259
  }),
1230
- onPointerLeave: E(o.onPointerLeave, () => {
1260
+ onPointerLeave: T(o.onPointerLeave, () => {
1231
1261
  a();
1232
1262
  })
1233
1263
  }
1234
1264
  );
1235
1265
  }
1236
1266
  ), ko = "SelectSeparator", qe = l.forwardRef(
1237
- (n, s) => {
1238
- const { __scopeSelect: e, ...t } = n;
1267
+ (r, s) => {
1268
+ const { __scopeSelect: e, ...t } = r;
1239
1269
  return /* @__PURE__ */ d(N.div, { "aria-hidden": !0, ...t, ref: s });
1240
1270
  }
1241
1271
  );
1242
1272
  qe.displayName = ko;
1243
1273
  const Re = "SelectArrow", Xe = l.forwardRef(
1244
- (n, s) => {
1245
- const { __scopeSelect: e, ...t } = n, o = ve(e), r = Y(Re, e), i = J(Re, e);
1246
- return r.open && i.position === "popper" ? /* @__PURE__ */ d(re.Arrow, { ...o, ...t, ref: s }) : null;
1274
+ (r, s) => {
1275
+ const { __scopeSelect: e, ...t } = r, o = ve(e), n = Y(Re, e), i = J(Re, e);
1276
+ return n.open && i.position === "popper" ? /* @__PURE__ */ d(re.Arrow, { ...o, ...t, ref: s }) : null;
1247
1277
  }
1248
1278
  );
1249
1279
  Xe.displayName = Re;
1250
1280
  const Fo = "BubbleSelect", Lo = l.forwardRef(
1251
- (n, s) => {
1252
- const { value: e, ...t } = n, o = l.useRef(null), r = _(s, o), i = _t(e), c = Y(Fo, void 0);
1281
+ (r, s) => {
1282
+ const { value: e, ...t } = r, o = l.useRef(null), n = _(s, o), i = _t(e), c = Y(Fo, void 0);
1253
1283
  l.useEffect(() => {
1254
- const m = o.current, f = window.HTMLSelectElement.prototype, h = Object.getOwnPropertyDescriptor(f, "value").set;
1255
- if (i !== e && h) {
1284
+ const g = o.current, p = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(p, "value").set;
1285
+ if (i !== e && f) {
1256
1286
  const u = new Event("change", { bubbles: !0 });
1257
- h.call(m, e), m.dispatchEvent(u);
1287
+ f.call(g, e), g.dispatchEvent(u);
1258
1288
  }
1259
1289
  }, [i, e]);
1260
1290
  let a = e;
@@ -1263,43 +1293,43 @@ const Fo = "BubbleSelect", Lo = l.forwardRef(
1263
1293
  {
1264
1294
  ...t,
1265
1295
  multiple: c.multi ? !0 : void 0,
1266
- ref: r,
1296
+ ref: n,
1267
1297
  defaultValue: a
1268
1298
  }
1269
1299
  ) });
1270
1300
  }
1271
1301
  );
1272
1302
  Lo.displayName = "BubbleSelect";
1273
- function It(n) {
1274
- const s = At(n), e = l.useRef(""), t = l.useRef(0), o = l.useCallback(
1303
+ function Vt(r) {
1304
+ const s = At(r), e = l.useRef(""), t = l.useRef(0), o = l.useCallback(
1275
1305
  (i) => {
1276
1306
  const c = e.current + i;
1277
- s(c), function a(m) {
1278
- e.current = m, window.clearTimeout(t.current), m !== "" && (t.current = window.setTimeout(() => a(""), 1e3));
1307
+ s(c), function a(g) {
1308
+ e.current = g, window.clearTimeout(t.current), g !== "" && (t.current = window.setTimeout(() => a(""), 1e3));
1279
1309
  }(c);
1280
1310
  },
1281
1311
  [s]
1282
- ), r = l.useCallback(() => {
1312
+ ), n = l.useCallback(() => {
1283
1313
  e.current = "", window.clearTimeout(t.current);
1284
1314
  }, []);
1285
- return l.useEffect(() => () => window.clearTimeout(t.current), []), [e, o, r];
1315
+ return l.useEffect(() => () => window.clearTimeout(t.current), []), [e, o, n];
1286
1316
  }
1287
- function Tt(n, s, e) {
1288
- const o = s.length > 1 && Array.from(s).every((m) => m === s[0]) ? s[0] : s, r = e ? n.indexOf(e) : -1;
1289
- let i = Bo(n, Math.max(r, 0));
1290
- o.length === 1 && (i = i.filter((m) => m !== e));
1291
- const a = i.find((m) => m.textValue.toLowerCase().startsWith(o.toLowerCase()));
1317
+ function Pt(r, s, e) {
1318
+ const o = s.length > 1 && Array.from(s).every((g) => g === s[0]) ? s[0] : s, n = e ? r.indexOf(e) : -1;
1319
+ let i = Bo(r, Math.max(n, 0));
1320
+ o.length === 1 && (i = i.filter((g) => g !== e));
1321
+ const a = i.find((g) => g.textValue.toLowerCase().startsWith(o.toLowerCase()));
1292
1322
  return a !== e ? a : void 0;
1293
1323
  }
1294
- function Bo(n, s) {
1295
- return n.map((e, t) => n[(s + t) % n.length]);
1324
+ function Bo(r, s) {
1325
+ return r.map((e, t) => r[(s + t) % r.length]);
1296
1326
  }
1297
- const Et = (n, s = []) => {
1298
- if (Array.isArray(n))
1299
- return n.reduce((t, o) => Et(o, t), s);
1300
- const e = s.indexOf(n);
1301
- return e === -1 ? [...s, n] : [...s.slice(0, e), ...s.slice(e + 1)];
1302
- }, Ho = Oe, $o = De, Uo = ke, Ko = Fe, Wo = Le, zo = Be, Go = $e, jo = Ue, Yo = Ke, qo = We, Xo = ze, Zo = Ge, Jo = je, Qo = Ye, en = qe, tn = Xe, En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1327
+ const Et = (r, s = []) => {
1328
+ if (Array.isArray(r))
1329
+ return r.reduce((t, o) => Et(o, t), s);
1330
+ const e = s.indexOf(r);
1331
+ return e === -1 ? [...s, r] : [...s.slice(0, e), ...s.slice(e + 1)];
1332
+ }, Ho = Oe, $o = De, Uo = ke, Ko = Fe, Wo = Le, zo = Be, Go = $e, jo = Ue, Yo = Ke, qo = We, Xo = ze, Zo = Ge, Jo = je, Qo = Ye, en = qe, tn = Xe, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1303
1333
  __proto__: null,
1304
1334
  Arrow: tn,
1305
1335
  Content: zo,
@@ -1337,6 +1367,6 @@ const Et = (n, s = []) => {
1337
1367
  }, Symbol.toStringTag, { value: "Module" }));
1338
1368
  export {
1339
1369
  Tn as Combobox,
1340
- En as Select,
1370
+ Vn as Select,
1341
1371
  Rn as useCallbackRef
1342
1372
  };