@aivex/ui 1.2.0-dev.2 → 1.2.0-dev.4

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