@aivex/ui 1.2.0-dev.11 → 1.2.0-dev.13

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