"use client";
import { cn as e } from "./lib/utils.js";
import { Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a } from "./components/ui/atoms/dialog.js";
import * as o from "react";
import { useState as s } from "react";
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
import * as d from "react-dom";
import f from "react-dom";
import { SearchIcon as p } from "lucide-react";
//#region ../../node_modules/.bun/cmdk@1.1.1+3aa2d9461d13ff5d/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
var m = 1, h = .9, g = .8, _ = .17, v = .1, y = .999, b = .9999, x = .99, S = /[\\\/_+.#"@\[\(\{&]/, C = /[\\\/_+.#"@\[\(\{&]/g, w = /[\s-]/, T = /[\s-]/g;
function E(e, t, n, r, i, a, o) {
	if (a === t.length) return i === e.length ? m : x;
	var s = `${i},${a}`;
	if (o[s] !== void 0) return o[s];
	for (var c = r.charAt(a), l = n.indexOf(c, i), u = 0, d, f, p, D; l >= 0;) d = E(e, t, n, r, l + 1, a + 1, o), d > u && (l === i ? d *= m : S.test(e.charAt(l - 1)) ? (d *= g, p = e.slice(i, l - 1).match(C), p && i > 0 && (d *= y ** +p.length)) : w.test(e.charAt(l - 1)) ? (d *= h, D = e.slice(i, l - 1).match(T), D && i > 0 && (d *= y ** +D.length)) : (d *= _, i > 0 && (d *= y ** +(l - i))), e.charAt(l) !== t.charAt(a) && (d *= b)), (d < v && n.charAt(l - 1) === r.charAt(a + 1) || r.charAt(a + 1) === r.charAt(a) && n.charAt(l - 1) !== r.charAt(a)) && (f = E(e, t, n, r, l + 1, a + 2, o), f * v > d && (d = f * v)), d > u && (u = d), l = n.indexOf(c, l + 1);
	return o[s] = u, u;
}
function D(e) {
	return e.toLowerCase().replace(T, " ");
}
function ee(e, t, n) {
	return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, E(e, t, D(e), D(t), 0, 0, {});
}
typeof window < "u" && window.document && window.document.createElement;
function O(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
	return function(r) {
		if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
	};
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-compose-refs@1.1.2+3e0a205009656bd0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
function te(e, t) {
	if (typeof e == "function") return e(t);
	e != null && (e.current = t);
}
function k(...e) {
	return (t) => {
		let n = !1, r = e.map((e) => {
			let r = te(e, t);
			return !n && typeof r == "function" && (n = !0), r;
		});
		if (n) return () => {
			for (let t = 0; t < r.length; t++) {
				let n = r[t];
				typeof n == "function" ? n() : te(e[t], null);
			}
		};
	};
}
function A(...e) {
	return o.useCallback(k(...e), e);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-context@1.1.2+3e0a205009656bd0/node_modules/@radix-ui/react-context/dist/index.mjs
function ne(e, t) {
	let n = o.createContext(t), r = (e) => {
		let { children: t, ...r } = e, i = o.useMemo(() => r, Object.values(r));
		return /* @__PURE__ */ l(n.Provider, {
			value: i,
			children: t
		});
	};
	r.displayName = e + "Provider";
	function i(r) {
		let i = o.useContext(n);
		if (i) return i;
		if (t !== void 0) return t;
		throw Error(`\`${r}\` must be used within \`${e}\``);
	}
	return [r, i];
}
function re(e, t = []) {
	let n = [];
	function r(t, r) {
		let i = o.createContext(r), a = n.length;
		n = [...n, r];
		let s = (t) => {
			let { scope: n, children: r, ...s } = t, c = n?.[e]?.[a] || i, u = o.useMemo(() => s, Object.values(s));
			return /* @__PURE__ */ l(c.Provider, {
				value: u,
				children: r
			});
		};
		s.displayName = t + "Provider";
		function c(n, s) {
			let c = s?.[e]?.[a] || i, l = o.useContext(c);
			if (l) return l;
			if (r !== void 0) return r;
			throw Error(`\`${n}\` must be used within \`${t}\``);
		}
		return [s, c];
	}
	let i = () => {
		let t = n.map((e) => o.createContext(e));
		return function(n) {
			let r = n?.[e] || t;
			return o.useMemo(() => ({ [`__scope${e}`]: {
				...n,
				[e]: r
			} }), [n, r]);
		};
	};
	return i.scopeName = e, [r, ie(i, ...t)];
}
function ie(...e) {
	let t = e[0];
	if (e.length === 1) return t;
	let n = () => {
		let n = e.map((e) => ({
			useScope: e(),
			scopeName: e.scopeName
		}));
		return function(e) {
			let r = n.reduce((t, { useScope: n, scopeName: r }) => {
				let i = n(e)[`__scope${r}`];
				return {
					...t,
					...i
				};
			}, {});
			return o.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
		};
	};
	return n.scopeName = t.scopeName, n;
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-use-layout-effect@1.1.1+3e0a205009656bd0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var j = globalThis?.document ? o.useLayoutEffect : () => {}, ae = o.useId || (() => void 0), oe = 0;
function M(e) {
	let [t, n] = o.useState(ae());
	return j(() => {
		e || n((e) => e ?? String(oe++));
	}, [e]), e || (t ? `radix-${t}` : "");
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-use-controllable-state@1.2.2+3e0a205009656bd0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
var se = o.useInsertionEffect || j;
function ce({ prop: e, defaultProp: t, onChange: n = () => {}, caller: r }) {
	let [i, a, s] = le({
		defaultProp: t,
		onChange: n
	}), c = e !== void 0, l = c ? e : i;
	{
		let t = o.useRef(e !== void 0);
		o.useEffect(() => {
			let e = t.current;
			e !== c && console.warn(`${r} is changing from ${e ? "controlled" : "uncontrolled"} to ${c ? "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 = c;
		}, [c, r]);
	}
	return [l, o.useCallback((t) => {
		if (c) {
			let n = ue(t) ? t(e) : t;
			n !== e && s.current?.(n);
		} else a(t);
	}, [
		c,
		e,
		a,
		s
	])];
}
function le({ defaultProp: e, onChange: t }) {
	let [n, r] = o.useState(e), i = o.useRef(n), a = o.useRef(t);
	return se(() => {
		a.current = t;
	}, [t]), o.useEffect(() => {
		i.current !== n && (a.current?.(n), i.current = n);
	}, [n, i]), [
		n,
		r,
		a
	];
}
function ue(e) {
	return typeof e == "function";
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-slot@1.2.3+3e0a205009656bd0/node_modules/@radix-ui/react-slot/dist/index.mjs
// @__NO_SIDE_EFFECTS__
function de(e) {
	let t = /* @__PURE__ */ fe(e), n = o.forwardRef((e, n) => {
		let { children: r, ...i } = e, a = o.Children.toArray(r), s = a.find(me);
		if (s) {
			let e = s.props.children, r = a.map((t) => t === s ? o.Children.count(e) > 1 ? o.Children.only(null) : o.isValidElement(e) ? e.props.children : null : t);
			return /* @__PURE__ */ l(t, {
				...i,
				ref: n,
				children: o.isValidElement(e) ? o.cloneElement(e, void 0, r) : null
			});
		}
		return /* @__PURE__ */ l(t, {
			...i,
			ref: n,
			children: r
		});
	});
	return n.displayName = `${e}.Slot`, n;
}
// @__NO_SIDE_EFFECTS__
function fe(e) {
	let t = o.forwardRef((e, t) => {
		let { children: n, ...r } = e;
		if (o.isValidElement(n)) {
			let e = ge(n), i = he(r, n.props);
			return n.type !== o.Fragment && (i.ref = t ? k(t, e) : e), o.cloneElement(n, i);
		}
		return o.Children.count(n) > 1 ? o.Children.only(null) : null;
	});
	return t.displayName = `${e}.SlotClone`, t;
}
var pe = Symbol("radix.slottable");
function me(e) {
	return o.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === pe;
}
function he(e, t) {
	let n = { ...t };
	for (let r in t) {
		let i = e[r], a = t[r];
		/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
			let t = a(...e);
			return i(...e), t;
		} : i && (n[r] = i) : r === "style" ? n[r] = {
			...i,
			...a
		} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
	}
	return {
		...e,
		...n
	};
}
function ge(e) {
	let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
	return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-primitive@2.1.3+3aa2d9461d13ff5d/node_modules/@radix-ui/react-primitive/dist/index.mjs
var N = [
	"a",
	"button",
	"div",
	"form",
	"h2",
	"h3",
	"img",
	"input",
	"label",
	"li",
	"nav",
	"ol",
	"p",
	"select",
	"span",
	"svg",
	"ul"
].reduce((e, t) => {
	let n = /* @__PURE__ */ de(`Primitive.${t}`), r = o.forwardRef((e, r) => {
		let { asChild: i, ...a } = e, o = i ? n : t;
		return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(o, {
			...a,
			ref: r
		});
	});
	return r.displayName = `Primitive.${t}`, {
		...e,
		[t]: r
	};
}, {});
function _e(e, t) {
	e && d.flushSync(() => e.dispatchEvent(t));
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-use-callback-ref@1.1.1+3e0a205009656bd0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
function P(e) {
	let t = o.useRef(e);
	return o.useEffect(() => {
		t.current = e;
	}), o.useMemo(() => (...e) => t.current?.(...e), []);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-use-escape-keydown@1.1.1+3e0a205009656bd0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
function ve(e, t = globalThis?.document) {
	let n = P(e);
	o.useEffect(() => {
		let e = (e) => {
			e.key === "Escape" && n(e);
		};
		return t.addEventListener("keydown", e, { capture: !0 }), () => t.removeEventListener("keydown", e, { capture: !0 });
	}, [n, t]);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-dismissable-layer@1.1.11+3aa2d9461d13ff5d/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
var ye = "DismissableLayer", be = "dismissableLayer.update", xe = "dismissableLayer.pointerDownOutside", Se = "dismissableLayer.focusOutside", Ce, we = o.createContext({
	layers: /* @__PURE__ */ new Set(),
	layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
	branches: /* @__PURE__ */ new Set()
}), Te = o.forwardRef((e, t) => {
	let { disableOutsidePointerEvents: n = !1, onEscapeKeyDown: r, onPointerDownOutside: i, onFocusOutside: a, onInteractOutside: s, onDismiss: c, ...u } = e, d = o.useContext(we), [f, p] = o.useState(null), m = f?.ownerDocument ?? globalThis?.document, [, h] = o.useState({}), g = A(t, (e) => p(e)), _ = Array.from(d.layers), [v] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = _.indexOf(v), b = f ? _.indexOf(f) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, S = b >= y, C = Oe((e) => {
		let t = e.target, n = [...d.branches].some((e) => e.contains(t));
		!S || n || (i?.(e), s?.(e), e.defaultPrevented || c?.());
	}, m), w = ke((e) => {
		let t = e.target;
		[...d.branches].some((e) => e.contains(t)) || (a?.(e), s?.(e), e.defaultPrevented || c?.());
	}, m);
	return ve((e) => {
		b === d.layers.size - 1 && (r?.(e), !e.defaultPrevented && c && (e.preventDefault(), c()));
	}, m), o.useEffect(() => {
		if (f) return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Ce = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), Ae(), () => {
			n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = Ce);
		};
	}, [
		f,
		m,
		n,
		d
	]), o.useEffect(() => () => {
		f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f), Ae());
	}, [f, d]), o.useEffect(() => {
		let e = () => h({});
		return document.addEventListener(be, e), () => document.removeEventListener(be, e);
	}, []), /* @__PURE__ */ l(N.div, {
		...u,
		ref: g,
		style: {
			pointerEvents: x ? S ? "auto" : "none" : void 0,
			...e.style
		},
		onFocusCapture: O(e.onFocusCapture, w.onFocusCapture),
		onBlurCapture: O(e.onBlurCapture, w.onBlurCapture),
		onPointerDownCapture: O(e.onPointerDownCapture, C.onPointerDownCapture)
	});
});
Te.displayName = ye;
var Ee = "DismissableLayerBranch", De = o.forwardRef((e, t) => {
	let n = o.useContext(we), r = o.useRef(null), i = A(t, r);
	return o.useEffect(() => {
		let e = r.current;
		if (e) return n.branches.add(e), () => {
			n.branches.delete(e);
		};
	}, [n.branches]), /* @__PURE__ */ l(N.div, {
		...e,
		ref: i
	});
});
De.displayName = Ee;
function Oe(e, t = globalThis?.document) {
	let n = P(e), r = o.useRef(!1), i = o.useRef(() => {});
	return o.useEffect(() => {
		let e = (e) => {
			if (e.target && !r.current) {
				let r = function() {
					je(xe, n, a, { discrete: !0 });
				}, a = { originalEvent: e };
				e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = r, t.addEventListener("click", i.current, { once: !0 })) : r();
			} else t.removeEventListener("click", i.current);
			r.current = !1;
		}, a = window.setTimeout(() => {
			t.addEventListener("pointerdown", e);
		}, 0);
		return () => {
			window.clearTimeout(a), t.removeEventListener("pointerdown", e), t.removeEventListener("click", i.current);
		};
	}, [t, n]), { onPointerDownCapture: () => r.current = !0 };
}
function ke(e, t = globalThis?.document) {
	let n = P(e), r = o.useRef(!1);
	return o.useEffect(() => {
		let e = (e) => {
			e.target && !r.current && je(Se, n, { originalEvent: e }, { discrete: !1 });
		};
		return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
	}, [t, n]), {
		onFocusCapture: () => r.current = !0,
		onBlurCapture: () => r.current = !1
	};
}
function Ae() {
	let e = new CustomEvent(be);
	document.dispatchEvent(e);
}
function je(e, t, n, { discrete: r }) {
	let i = n.originalEvent.target, a = new CustomEvent(e, {
		bubbles: !1,
		cancelable: !0,
		detail: n
	});
	t && i.addEventListener(e, t, { once: !0 }), r ? _e(i, a) : i.dispatchEvent(a);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-focus-scope@1.1.7+3aa2d9461d13ff5d/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
var Me = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", Pe = {
	bubbles: !1,
	cancelable: !0
}, Fe = "FocusScope", Ie = o.forwardRef((e, t) => {
	let { loop: n = !1, trapped: r = !1, onMountAutoFocus: i, onUnmountAutoFocus: a, ...s } = e, [c, u] = o.useState(null), d = P(i), f = P(a), p = o.useRef(null), m = A(t, (e) => u(e)), h = o.useRef({
		paused: !1,
		pause() {
			this.paused = !0;
		},
		resume() {
			this.paused = !1;
		}
	}).current;
	o.useEffect(() => {
		if (r) {
			let e = function(e) {
				if (h.paused || !c) return;
				let t = e.target;
				c.contains(t) ? p.current = t : F(p.current, { select: !0 });
			}, t = function(e) {
				if (h.paused || !c) return;
				let t = e.relatedTarget;
				t !== null && (c.contains(t) || F(p.current, { select: !0 }));
			}, n = function(e) {
				if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && F(c);
			};
			document.addEventListener("focusin", e), document.addEventListener("focusout", t);
			let r = new MutationObserver(n);
			return c && r.observe(c, {
				childList: !0,
				subtree: !0
			}), () => {
				document.removeEventListener("focusin", e), document.removeEventListener("focusout", t), r.disconnect();
			};
		}
	}, [
		r,
		c,
		h.paused
	]), o.useEffect(() => {
		if (c) {
			Ue.add(h);
			let e = document.activeElement;
			if (!c.contains(e)) {
				let t = new CustomEvent(Me, Pe);
				c.addEventListener(Me, d), c.dispatchEvent(t), t.defaultPrevented || (Le(Ke(ze(c)), { select: !0 }), document.activeElement === e && F(c));
			}
			return () => {
				c.removeEventListener(Me, d), setTimeout(() => {
					let t = new CustomEvent(Ne, Pe);
					c.addEventListener(Ne, f), c.dispatchEvent(t), t.defaultPrevented || F(e ?? document.body, { select: !0 }), c.removeEventListener(Ne, f), Ue.remove(h);
				}, 0);
			};
		}
	}, [
		c,
		d,
		f,
		h
	]);
	let g = o.useCallback((e) => {
		if (!n && !r || h.paused) return;
		let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, i = document.activeElement;
		if (t && i) {
			let t = e.currentTarget, [r, a] = Re(t);
			r && a ? !e.shiftKey && i === a ? (e.preventDefault(), n && F(r, { select: !0 })) : e.shiftKey && i === r && (e.preventDefault(), n && F(a, { select: !0 })) : i === t && e.preventDefault();
		}
	}, [
		n,
		r,
		h.paused
	]);
	return /* @__PURE__ */ l(N.div, {
		tabIndex: -1,
		...s,
		ref: m,
		onKeyDown: g
	});
});
Ie.displayName = Fe;
function Le(e, { select: t = !1 } = {}) {
	let n = document.activeElement;
	for (let r of e) if (F(r, { select: t }), document.activeElement !== n) return;
}
function Re(e) {
	let t = ze(e);
	return [Be(t, e), Be(t.reverse(), e)];
}
function ze(e) {
	let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
		let t = e.tagName === "INPUT" && e.type === "hidden";
		return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
	} });
	for (; n.nextNode();) t.push(n.currentNode);
	return t;
}
function Be(e, t) {
	for (let n of e) if (!Ve(n, { upTo: t })) return n;
}
function Ve(e, { upTo: t }) {
	if (getComputedStyle(e).visibility === "hidden") return !0;
	for (; e;) {
		if (t !== void 0 && e === t) return !1;
		if (getComputedStyle(e).display === "none") return !0;
		e = e.parentElement;
	}
	return !1;
}
function He(e) {
	return e instanceof HTMLInputElement && "select" in e;
}
function F(e, { select: t = !1 } = {}) {
	if (e && e.focus) {
		let n = document.activeElement;
		e.focus({ preventScroll: !0 }), e !== n && He(e) && t && e.select();
	}
}
var Ue = We();
function We() {
	let e = [];
	return {
		add(t) {
			let n = e[0];
			t !== n && n?.pause(), e = Ge(e, t), e.unshift(t);
		},
		remove(t) {
			e = Ge(e, t), e[0]?.resume();
		}
	};
}
function Ge(e, t) {
	let n = [...e], r = n.indexOf(t);
	return r !== -1 && n.splice(r, 1), n;
}
function Ke(e) {
	return e.filter((e) => e.tagName !== "A");
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-portal@1.1.9+3aa2d9461d13ff5d/node_modules/@radix-ui/react-portal/dist/index.mjs
var qe = "Portal", Je = o.forwardRef((e, t) => {
	let { container: n, ...r } = e, [i, a] = o.useState(!1);
	j(() => a(!0), []);
	let s = n || i && globalThis?.document?.body;
	return s ? f.createPortal(/* @__PURE__ */ l(N.div, {
		...r,
		ref: t
	}), s) : null;
});
Je.displayName = qe;
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-presence@1.1.5+3aa2d9461d13ff5d/node_modules/@radix-ui/react-presence/dist/index.mjs
function Ye(e, t) {
	return o.useReducer((e, n) => t[e][n] ?? e, e);
}
var I = (e) => {
	let { present: t, children: n } = e, r = Xe(t), i = typeof n == "function" ? n({ present: r.isPresent }) : o.Children.only(n), a = A(r.ref, Qe(i));
	return typeof n == "function" || r.isPresent ? o.cloneElement(i, { ref: a }) : null;
};
I.displayName = "Presence";
function Xe(e) {
	let [t, n] = o.useState(), r = o.useRef(null), i = o.useRef(e), a = o.useRef("none"), [s, c] = Ye(e ? "mounted" : "unmounted", {
		mounted: {
			UNMOUNT: "unmounted",
			ANIMATION_OUT: "unmountSuspended"
		},
		unmountSuspended: {
			MOUNT: "mounted",
			ANIMATION_END: "unmounted"
		},
		unmounted: { MOUNT: "mounted" }
	});
	return o.useEffect(() => {
		let e = Ze(r.current);
		a.current = s === "mounted" ? e : "none";
	}, [s]), j(() => {
		let t = r.current, n = i.current;
		if (n !== e) {
			let r = a.current, o = Ze(t);
			e ? c("MOUNT") : o === "none" || t?.display === "none" ? c("UNMOUNT") : c(n && r !== o ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
		}
	}, [e, c]), j(() => {
		if (t) {
			let e, n = t.ownerDocument.defaultView ?? window, o = (a) => {
				let o = Ze(r.current).includes(CSS.escape(a.animationName));
				if (a.target === t && o && (c("ANIMATION_END"), !i.current)) {
					let r = t.style.animationFillMode;
					t.style.animationFillMode = "forwards", e = n.setTimeout(() => {
						t.style.animationFillMode === "forwards" && (t.style.animationFillMode = r);
					});
				}
			}, s = (e) => {
				e.target === t && (a.current = Ze(r.current));
			};
			return t.addEventListener("animationstart", s), t.addEventListener("animationcancel", o), t.addEventListener("animationend", o), () => {
				n.clearTimeout(e), t.removeEventListener("animationstart", s), t.removeEventListener("animationcancel", o), t.removeEventListener("animationend", o);
			};
		} else c("ANIMATION_END");
	}, [t, c]), {
		isPresent: ["mounted", "unmountSuspended"].includes(s),
		ref: o.useCallback((e) => {
			r.current = e ? getComputedStyle(e) : null, n(e);
		}, [])
	};
}
function Ze(e) {
	return e?.animationName || "none";
}
function Qe(e) {
	let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
	return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-focus-guards@1.1.3+3e0a205009656bd0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
var $e = 0;
function et() {
	o.useEffect(() => {
		let e = document.querySelectorAll("[data-radix-focus-guard]");
		return document.body.insertAdjacentElement("afterbegin", e[0] ?? tt()), document.body.insertAdjacentElement("beforeend", e[1] ?? tt()), $e++, () => {
			$e === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((e) => e.remove()), $e--;
		};
	}, []);
}
function tt() {
	let e = document.createElement("span");
	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;
}
//#endregion
//#region ../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
var L = function() {
	return L = Object.assign || function(e) {
		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]);
		return e;
	}, L.apply(this, arguments);
};
function nt(e, t) {
	var n = {};
	for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
	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]]);
	return n;
}
function rt(e, t, n) {
	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]);
	return e.concat(a || Array.prototype.slice.call(t));
}
//#endregion
//#region ../../node_modules/.bun/react-remove-scroll-bar@2.3.8+3e0a205009656bd0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
var it = "right-scroll-bar-position", at = "width-before-scroll-bar", ot = "with-scroll-bars-hidden", st = "--removed-body-scroll-bar-size";
//#endregion
//#region ../../node_modules/.bun/use-callback-ref@1.3.3+3e0a205009656bd0/node_modules/use-callback-ref/dist/es2015/assignRef.js
function ct(e, t) {
	return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
//#endregion
//#region ../../node_modules/.bun/use-callback-ref@1.3.3+3e0a205009656bd0/node_modules/use-callback-ref/dist/es2015/useRef.js
function lt(e, t) {
	var n = s(function() {
		return {
			value: e,
			callback: t,
			facade: {
				get current() {
					return n.value;
				},
				set current(e) {
					var t = n.value;
					t !== e && (n.value = e, n.callback(e, t));
				}
			}
		};
	})[0];
	return n.callback = t, n.facade;
}
//#endregion
//#region ../../node_modules/.bun/use-callback-ref@1.3.3+3e0a205009656bd0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
var ut = typeof window < "u" ? o.useLayoutEffect : o.useEffect, dt = /* @__PURE__ */ new WeakMap();
function ft(e, t) {
	var n = lt(t || null, function(t) {
		return e.forEach(function(e) {
			return ct(e, t);
		});
	});
	return ut(function() {
		var t = dt.get(n);
		if (t) {
			var r = new Set(t), i = new Set(e), a = n.current;
			r.forEach(function(e) {
				i.has(e) || ct(e, null);
			}), i.forEach(function(e) {
				r.has(e) || ct(e, a);
			});
		}
		dt.set(n, e);
	}, [e]), n;
}
//#endregion
//#region ../../node_modules/.bun/use-sidecar@1.1.3+3e0a205009656bd0/node_modules/use-sidecar/dist/es2015/medium.js
function pt(e) {
	return e;
}
function mt(e, t) {
	t === void 0 && (t = pt);
	var n = [], r = !1;
	return {
		read: function() {
			if (r) throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
			return n.length ? n[n.length - 1] : e;
		},
		useMedium: function(e) {
			var i = t(e, r);
			return n.push(i), function() {
				n = n.filter(function(e) {
					return e !== i;
				});
			};
		},
		assignSyncMedium: function(e) {
			for (r = !0; n.length;) {
				var t = n;
				n = [], t.forEach(e);
			}
			n = {
				push: function(t) {
					return e(t);
				},
				filter: function() {
					return n;
				}
			};
		},
		assignMedium: function(e) {
			r = !0;
			var t = [];
			if (n.length) {
				var i = n;
				n = [], i.forEach(e), t = n;
			}
			var a = function() {
				var n = t;
				t = [], n.forEach(e);
			}, o = function() {
				return Promise.resolve().then(a);
			};
			o(), n = {
				push: function(e) {
					t.push(e), o();
				},
				filter: function(e) {
					return t = t.filter(e), n;
				}
			};
		}
	};
}
function ht(e) {
	e === void 0 && (e = {});
	var t = mt(null);
	return t.options = L({
		async: !0,
		ssr: !1
	}, e), t;
}
//#endregion
//#region ../../node_modules/.bun/use-sidecar@1.1.3+3e0a205009656bd0/node_modules/use-sidecar/dist/es2015/exports.js
var gt = function(e) {
	var t = e.sideCar, n = nt(e, ["sideCar"]);
	if (!t) throw Error("Sidecar: please provide `sideCar` property to import the right car");
	var r = t.read();
	if (!r) throw Error("Sidecar medium not found");
	return o.createElement(r, L({}, n));
};
gt.isSideCarExport = !0;
function _t(e, t) {
	return e.useMedium(t), gt;
}
//#endregion
//#region ../../node_modules/.bun/react-remove-scroll@2.7.2+3e0a205009656bd0/node_modules/react-remove-scroll/dist/es2015/medium.js
var vt = ht(), yt = function() {}, R = o.forwardRef(function(e, t) {
	var n = o.useRef(null), r = o.useState({
		onScrollCapture: yt,
		onWheelCapture: yt,
		onTouchMoveCapture: yt
	}), i = r[0], a = r[1], s = e.forwardProps, c = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, p = e.sideCar, m = e.noRelative, h = e.noIsolation, g = e.inert, _ = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, b = e.gapMode, x = nt(e, [
		"forwardProps",
		"children",
		"className",
		"removeScrollBar",
		"enabled",
		"shards",
		"sideCar",
		"noRelative",
		"noIsolation",
		"inert",
		"allowPinchZoom",
		"as",
		"gapMode"
	]), S = p, C = ft([n, t]), w = L(L({}, x), i);
	return o.createElement(o.Fragment, null, d && o.createElement(S, {
		sideCar: vt,
		removeScrollBar: u,
		shards: f,
		noRelative: m,
		noIsolation: h,
		inert: g,
		setCallbacks: a,
		allowPinchZoom: !!_,
		lockRef: n,
		gapMode: b
	}), s ? o.cloneElement(o.Children.only(c), L(L({}, w), { ref: C })) : o.createElement(y, L({}, w, {
		className: l,
		ref: C
	}), c));
});
R.defaultProps = {
	enabled: !0,
	removeScrollBar: !0,
	inert: !1
}, R.classNames = {
	fullWidth: at,
	zeroRight: it
};
//#endregion
//#region ../../node_modules/.bun/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
var bt, xt = function() {
	if (bt) return bt;
	if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
};
//#endregion
//#region ../../node_modules/.bun/react-style-singleton@2.2.3+3e0a205009656bd0/node_modules/react-style-singleton/dist/es2015/singleton.js
function St() {
	if (!document) return null;
	var e = document.createElement("style");
	e.type = "text/css";
	var t = xt();
	return t && e.setAttribute("nonce", t), e;
}
function Ct(e, t) {
	e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function wt(e) {
	(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
}
var Tt = function() {
	var e = 0, t = null;
	return {
		add: function(n) {
			e == 0 && (t = St()) && (Ct(t, n), wt(t)), e++;
		},
		remove: function() {
			e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
		}
	};
}, Et = function() {
	var e = Tt();
	return function(t, n) {
		o.useEffect(function() {
			return e.add(t), function() {
				e.remove();
			};
		}, [t && n]);
	};
}, Dt = function() {
	var e = Et();
	return function(t) {
		var n = t.styles, r = t.dynamic;
		return e(n, r), null;
	};
}, Ot = {
	left: 0,
	top: 0,
	right: 0,
	gap: 0
}, kt = function(e) {
	return parseInt(e || "", 10) || 0;
}, At = function(e) {
	var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], i = t[e === "padding" ? "paddingRight" : "marginRight"];
	return [
		kt(n),
		kt(r),
		kt(i)
	];
}, jt = function(e) {
	if (e === void 0 && (e = "margin"), typeof window > "u") return Ot;
	var t = At(e), n = document.documentElement.clientWidth, r = window.innerWidth;
	return {
		left: t[0],
		top: t[1],
		right: t[2],
		gap: Math.max(0, r - n + t[2] - t[0])
	};
}, Mt = Dt(), z = "data-scroll-locked", Nt = function(e, t, n, r) {
	var i = e.left, a = e.top, o = e.right, s = e.gap;
	return n === void 0 && (n = "margin"), `
  .${ot} {
   overflow: hidden ${r};
   padding-right: ${s}px ${r};
  }
  body[${z}] {
    overflow: hidden ${r};
    overscroll-behavior: contain;
    ${[
		t && `position: relative ${r};`,
		n === "margin" && `
    padding-left: ${i}px;
    padding-top: ${a}px;
    padding-right: ${o}px;
    margin-left:0;
    margin-top:0;
    margin-right: ${s}px ${r};
    `,
		n === "padding" && `padding-right: ${s}px ${r};`
	].filter(Boolean).join("")}
  }
  
  .${it} {
    right: ${s}px ${r};
  }
  
  .${at} {
    margin-right: ${s}px ${r};
  }
  
  .${it} .${it} {
    right: 0 ${r};
  }
  
  .${at} .${at} {
    margin-right: 0 ${r};
  }
  
  body[${z}] {
    ${st}: ${s}px;
  }
`;
}, Pt = function() {
	var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
	return isFinite(e) ? e : 0;
}, Ft = function() {
	o.useEffect(function() {
		return document.body.setAttribute(z, (Pt() + 1).toString()), function() {
			var e = Pt() - 1;
			e <= 0 ? document.body.removeAttribute(z) : document.body.setAttribute(z, e.toString());
		};
	}, []);
}, It = function(e) {
	var t = e.noRelative, n = e.noImportant, r = e.gapMode, i = r === void 0 ? "margin" : r;
	Ft();
	var a = o.useMemo(function() {
		return jt(i);
	}, [i]);
	return o.createElement(Mt, { styles: Nt(a, !t, i, n ? "" : "!important") });
}, Lt = !1;
if (typeof window < "u") try {
	var B = Object.defineProperty({}, "passive", { get: function() {
		return Lt = !0, !0;
	} });
	window.addEventListener("test", B, B), window.removeEventListener("test", B, B);
} catch {
	Lt = !1;
}
var V = Lt ? { passive: !1 } : !1, Rt = function(e) {
	return e.tagName === "TEXTAREA";
}, zt = function(e, t) {
	if (!(e instanceof Element)) return !1;
	var n = window.getComputedStyle(e);
	return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !Rt(e) && n[t] === "visible");
}, Bt = function(e) {
	return zt(e, "overflowY");
}, Vt = function(e) {
	return zt(e, "overflowX");
}, Ht = function(e, t) {
	var n = t.ownerDocument, r = t;
	do {
		if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host), Gt(e, r)) {
			var i = Kt(e, r);
			if (i[1] > i[2]) return !0;
		}
		r = r.parentNode;
	} while (r && r !== n.body);
	return !1;
}, Ut = function(e) {
	return [
		e.scrollTop,
		e.scrollHeight,
		e.clientHeight
	];
}, Wt = function(e) {
	return [
		e.scrollLeft,
		e.scrollWidth,
		e.clientWidth
	];
}, Gt = function(e, t) {
	return e === "v" ? Bt(t) : Vt(t);
}, Kt = function(e, t) {
	return e === "v" ? Ut(t) : Wt(t);
}, qt = function(e, t) {
	return e === "h" && t === "rtl" ? -1 : 1;
}, Jt = function(e, t, n, r, i) {
	var a = qt(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
	do {
		if (!s) break;
		var p = Kt(e, s), m = p[0], h = p[1] - p[2] - a * m;
		(m || h) && Gt(e, s) && (d += h, f += m);
		var g = s.parentNode;
		s = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
	} while (!c && s !== document.body || c && (t.contains(s) || t === s));
	return (u && (i && Math.abs(d) < 1 || !i && o > d) || !u && (i && Math.abs(f) < 1 || !i && -o > f)) && (l = !0), l;
}, Yt = function(e) {
	return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, Xt = function(e) {
	return [e.deltaX, e.deltaY];
}, Zt = function(e) {
	return e && "current" in e ? e.current : e;
}, Qt = function(e, t) {
	return e[0] === t[0] && e[1] === t[1];
}, $t = function(e) {
	return `
  .block-interactivity-${e} {pointer-events: none;}
  .allow-interactivity-${e} {pointer-events: all;}
`;
}, en = 0, H = [];
function tn(e) {
	var t = o.useRef([]), n = o.useRef([0, 0]), r = o.useRef(), i = o.useState(en++)[0], a = o.useState(Dt)[0], s = o.useRef(e);
	o.useEffect(function() {
		s.current = e;
	}, [e]), o.useEffect(function() {
		if (e.inert) {
			document.body.classList.add(`block-interactivity-${i}`);
			var t = rt([e.lockRef.current], (e.shards || []).map(Zt), !0).filter(Boolean);
			return t.forEach(function(e) {
				return e.classList.add(`allow-interactivity-${i}`);
			}), function() {
				document.body.classList.remove(`block-interactivity-${i}`), t.forEach(function(e) {
					return e.classList.remove(`allow-interactivity-${i}`);
				});
			};
		}
	}, [
		e.inert,
		e.lockRef.current,
		e.shards
	]);
	var c = o.useCallback(function(e, t) {
		if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey) return !s.current.allowPinchZoom;
		var i = Yt(e), a = n.current, o = "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(o) > Math.abs(c) ? "h" : "v";
		if ("touches" in e && d === "h" && u.type === "range") return !1;
		var f = window.getSelection(), p = f && f.anchorNode;
		if (p && (p === u || p.contains(u))) return !1;
		var m = Ht(d, u);
		if (!m) return !0;
		if (m ? l = d : (l = d === "v" ? "h" : "v", m = Ht(d, u)), !m) return !1;
		if (!r.current && "changedTouches" in e && (o || c) && (r.current = l), !l) return !0;
		var h = r.current || l;
		return Jt(h, t, e, h === "h" ? o : c, !0);
	}, []), l = o.useCallback(function(e) {
		var n = e;
		if (!(!H.length || H[H.length - 1] !== a)) {
			var r = "deltaY" in n ? Xt(n) : Yt(n), i = t.current.filter(function(e) {
				return e.name === n.type && (e.target === n.target || n.target === e.shadowParent) && Qt(e.delta, r);
			})[0];
			if (i && i.should) {
				n.cancelable && n.preventDefault();
				return;
			}
			if (!i) {
				var o = (s.current.shards || []).map(Zt).filter(Boolean).filter(function(e) {
					return e.contains(n.target);
				});
				(o.length > 0 ? c(n, o[0]) : !s.current.noIsolation) && n.cancelable && n.preventDefault();
			}
		}
	}, []), u = o.useCallback(function(e, n, r, i) {
		var a = {
			name: e,
			delta: n,
			target: r,
			should: i,
			shadowParent: nn(r)
		};
		t.current.push(a), setTimeout(function() {
			t.current = t.current.filter(function(e) {
				return e !== a;
			});
		}, 1);
	}, []), d = o.useCallback(function(e) {
		n.current = Yt(e), r.current = void 0;
	}, []), f = o.useCallback(function(t) {
		u(t.type, Xt(t), t.target, c(t, e.lockRef.current));
	}, []), p = o.useCallback(function(t) {
		u(t.type, Yt(t), t.target, c(t, e.lockRef.current));
	}, []);
	o.useEffect(function() {
		return H.push(a), e.setCallbacks({
			onScrollCapture: f,
			onWheelCapture: f,
			onTouchMoveCapture: p
		}), document.addEventListener("wheel", l, V), document.addEventListener("touchmove", l, V), document.addEventListener("touchstart", d, V), function() {
			H = H.filter(function(e) {
				return e !== a;
			}), document.removeEventListener("wheel", l, V), document.removeEventListener("touchmove", l, V), document.removeEventListener("touchstart", d, V);
		};
	}, []);
	var m = e.removeScrollBar, h = e.inert;
	return o.createElement(o.Fragment, null, h ? o.createElement(a, { styles: $t(i) }) : null, m ? o.createElement(It, {
		noRelative: e.noRelative,
		gapMode: e.gapMode
	}) : null);
}
function nn(e) {
	for (var t = null; e !== null;) e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
	return t;
}
//#endregion
//#region ../../node_modules/.bun/react-remove-scroll@2.7.2+3e0a205009656bd0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
var rn = _t(vt, tn), an = o.forwardRef(function(e, t) {
	return o.createElement(R, L({}, e, {
		ref: t,
		sideCar: rn
	}));
});
an.classNames = R.classNames;
//#endregion
//#region ../../node_modules/.bun/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
var on = function(e) {
	return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
}, U = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), cn = {}, ln = 0, un = function(e) {
	return e && (e.host || un(e.parentNode));
}, dn = function(e, t) {
	return t.map(function(t) {
		if (e.contains(t)) return t;
		var n = un(t);
		return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
	}).filter(function(e) {
		return !!e;
	});
}, fn = function(e, t, n, r) {
	var i = dn(t, Array.isArray(e) ? e : [e]);
	cn[n] || (cn[n] = /* @__PURE__ */ new WeakMap());
	var a = cn[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
		!e || s.has(e) || (s.add(e), l(e.parentNode));
	};
	i.forEach(l);
	var u = function(e) {
		!e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
			if (s.has(e)) u(e);
			else try {
				var t = e.getAttribute(r), i = t !== null && t !== "false", c = (U.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
				U.set(e, c), a.set(e, l), o.push(e), c === 1 && i && sn.set(e, !0), l === 1 && e.setAttribute(n, "true"), i || e.setAttribute(r, "true");
			} catch (t) {
				console.error("aria-hidden: cannot operate on ", e, t);
			}
		});
	};
	return u(t), s.clear(), ln++, function() {
		o.forEach(function(e) {
			var t = U.get(e) - 1, i = a.get(e) - 1;
			U.set(e, t), a.set(e, i), t || (sn.has(e) || e.removeAttribute(r), sn.delete(e)), i || e.removeAttribute(n);
		}), ln--, ln || (U = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), sn = /* @__PURE__ */ new WeakMap(), cn = {});
	};
}, pn = function(e, t, n) {
	n === void 0 && (n = "data-aria-hidden");
	var r = Array.from(Array.isArray(e) ? e : [e]), i = t || on(e);
	return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), fn(r, i, n, "aria-hidden")) : function() {
		return null;
	};
}, mn = "Dialog", [hn, gn] = re(mn), [_n, W] = hn(mn), vn = (e) => {
	let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: s = !0 } = e, c = o.useRef(null), u = o.useRef(null), [d, f] = ce({
		prop: r,
		defaultProp: i ?? !1,
		onChange: a,
		caller: mn
	});
	return /* @__PURE__ */ l(_n, {
		scope: t,
		triggerRef: c,
		contentRef: u,
		contentId: M(),
		titleId: M(),
		descriptionId: M(),
		open: d,
		onOpenChange: f,
		onOpenToggle: o.useCallback(() => f((e) => !e), [f]),
		modal: s,
		children: n
	});
};
vn.displayName = mn;
var yn = "DialogTrigger", bn = o.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = W(yn, n), a = A(t, i.triggerRef);
	return /* @__PURE__ */ l(N.button, {
		type: "button",
		"aria-haspopup": "dialog",
		"aria-expanded": i.open,
		"aria-controls": i.contentId,
		"data-state": zn(i.open),
		...r,
		ref: a,
		onClick: O(e.onClick, i.onOpenToggle)
	});
});
bn.displayName = yn;
var xn = "DialogPortal", [Sn, Cn] = hn(xn, { forceMount: void 0 }), wn = (e) => {
	let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = W(xn, t);
	return /* @__PURE__ */ l(Sn, {
		scope: t,
		forceMount: n,
		children: o.Children.map(r, (e) => /* @__PURE__ */ l(I, {
			present: n || a.open,
			children: /* @__PURE__ */ l(Je, {
				asChild: !0,
				container: i,
				children: e
			})
		}))
	});
};
wn.displayName = xn;
var Tn = "DialogOverlay", En = o.forwardRef((e, t) => {
	let n = Cn(Tn, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = W(Tn, e.__scopeDialog);
	return a.modal ? /* @__PURE__ */ l(I, {
		present: r || a.open,
		children: /* @__PURE__ */ l(On, {
			...i,
			ref: t
		})
	}) : null;
});
En.displayName = Tn;
var Dn = /* @__PURE__ */ de("DialogOverlay.RemoveScroll"), On = o.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = W(Tn, n);
	return /* @__PURE__ */ l(an, {
		as: Dn,
		allowPinchZoom: !0,
		shards: [i.contentRef],
		children: /* @__PURE__ */ l(N.div, {
			"data-state": zn(i.open),
			...r,
			ref: t,
			style: {
				pointerEvents: "auto",
				...r.style
			}
		})
	});
}), G = "DialogContent", kn = o.forwardRef((e, t) => {
	let n = Cn(G, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = W(G, e.__scopeDialog);
	return /* @__PURE__ */ l(I, {
		present: r || a.open,
		children: a.modal ? /* @__PURE__ */ l(An, {
			...i,
			ref: t
		}) : /* @__PURE__ */ l(jn, {
			...i,
			ref: t
		})
	});
});
kn.displayName = G;
var An = o.forwardRef((e, t) => {
	let n = W(G, e.__scopeDialog), r = o.useRef(null), i = A(t, n.contentRef, r);
	return o.useEffect(() => {
		let e = r.current;
		if (e) return pn(e);
	}, []), /* @__PURE__ */ l(Mn, {
		...e,
		ref: i,
		trapFocus: n.open,
		disableOutsidePointerEvents: !0,
		onCloseAutoFocus: O(e.onCloseAutoFocus, (e) => {
			e.preventDefault(), n.triggerRef.current?.focus();
		}),
		onPointerDownOutside: O(e.onPointerDownOutside, (e) => {
			let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
			(t.button === 2 || n) && e.preventDefault();
		}),
		onFocusOutside: O(e.onFocusOutside, (e) => e.preventDefault())
	});
}), jn = o.forwardRef((e, t) => {
	let n = W(G, e.__scopeDialog), r = o.useRef(!1), i = o.useRef(!1);
	return /* @__PURE__ */ l(Mn, {
		...e,
		ref: t,
		trapFocus: !1,
		disableOutsidePointerEvents: !1,
		onCloseAutoFocus: (t) => {
			e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
		},
		onInteractOutside: (t) => {
			e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
			let a = t.target;
			n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
		}
	});
}), Mn = o.forwardRef((e, t) => {
	let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...s } = e, d = W(G, n), f = o.useRef(null), p = A(t, f);
	return et(), /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Ie, {
		asChild: !0,
		loop: !0,
		trapped: r,
		onMountAutoFocus: i,
		onUnmountAutoFocus: a,
		children: /* @__PURE__ */ l(Te, {
			role: "dialog",
			id: d.contentId,
			"aria-describedby": d.descriptionId,
			"aria-labelledby": d.titleId,
			"data-state": zn(d.open),
			...s,
			ref: p,
			onDismiss: () => d.onOpenChange(!1)
		})
	}), /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(Un, { titleId: d.titleId }), /* @__PURE__ */ l(Gn, {
		contentRef: f,
		descriptionId: d.descriptionId
	})] })] });
}), Nn = "DialogTitle", Pn = o.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = W(Nn, n);
	return /* @__PURE__ */ l(N.h2, {
		id: i.titleId,
		...r,
		ref: t
	});
});
Pn.displayName = Nn;
var Fn = "DialogDescription", In = o.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = W(Fn, n);
	return /* @__PURE__ */ l(N.p, {
		id: i.descriptionId,
		...r,
		ref: t
	});
});
In.displayName = Fn;
var Ln = "DialogClose", Rn = o.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = W(Ln, n);
	return /* @__PURE__ */ l(N.button, {
		type: "button",
		...r,
		ref: t,
		onClick: O(e.onClick, () => i.onOpenChange(!1))
	});
});
Rn.displayName = Ln;
function zn(e) {
	return e ? "open" : "closed";
}
var Bn = "DialogTitleWarning", [Vn, Hn] = ne(Bn, {
	contentName: G,
	titleName: Nn,
	docsSlug: "dialog"
}), Un = ({ titleId: e }) => {
	let t = Hn(Bn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
	return o.useEffect(() => {
		e && (document.getElementById(e) || console.error(n));
	}, [n, e]), null;
}, Wn = "DialogDescriptionWarning", Gn = ({ contentRef: e, descriptionId: t }) => {
	let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(Wn).contentName}}.`;
	return o.useEffect(() => {
		let r = e.current?.getAttribute("aria-describedby");
		t && r && (document.getElementById(t) || console.warn(n));
	}, [
		n,
		e,
		t
	]), null;
}, Kn = vn, qn = wn, Jn = En, Yn = kn, Xn = Symbol.for("react.lazy"), Zn = o.use;
function Qn(e) {
	return typeof e == "object" && !!e && "then" in e;
}
function $n(e) {
	return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === Xn && "_payload" in e && Qn(e._payload);
}
// @__NO_SIDE_EFFECTS__
function er(e) {
	let t = /* @__PURE__ */ tr(e), n = o.forwardRef((e, n) => {
		let { children: r, ...i } = e;
		$n(r) && typeof Zn == "function" && (r = Zn(r._payload));
		let a = o.Children.toArray(r), s = a.find(rr);
		if (s) {
			let e = s.props.children, r = a.map((t) => t === s ? o.Children.count(e) > 1 ? o.Children.only(null) : o.isValidElement(e) ? e.props.children : null : t);
			return /* @__PURE__ */ l(t, {
				...i,
				ref: n,
				children: o.isValidElement(e) ? o.cloneElement(e, void 0, r) : null
			});
		}
		return /* @__PURE__ */ l(t, {
			...i,
			ref: n,
			children: r
		});
	});
	return n.displayName = `${e}.Slot`, n;
}
// @__NO_SIDE_EFFECTS__
function tr(e) {
	let t = o.forwardRef((e, t) => {
		let { children: n, ...r } = e;
		if ($n(n) && typeof Zn == "function" && (n = Zn(n._payload)), o.isValidElement(n)) {
			let e = ar(n), i = ir(r, n.props);
			return n.type !== o.Fragment && (i.ref = t ? k(t, e) : e), o.cloneElement(n, i);
		}
		return o.Children.count(n) > 1 ? o.Children.only(null) : null;
	});
	return t.displayName = `${e}.SlotClone`, t;
}
var nr = Symbol("radix.slottable");
function rr(e) {
	return o.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === nr;
}
function ir(e, t) {
	let n = { ...t };
	for (let r in t) {
		let i = e[r], a = t[r];
		/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
			let t = a(...e);
			return i(...e), t;
		} : i && (n[r] = i) : r === "style" ? n[r] = {
			...i,
			...a
		} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
	}
	return {
		...e,
		...n
	};
}
function ar(e) {
	let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
	return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
//#endregion
//#region ../../node_modules/.bun/@radix-ui+react-primitive@2.1.4+3aa2d9461d13ff5d/node_modules/@radix-ui/react-primitive/dist/index.mjs
var K = [
	"a",
	"button",
	"div",
	"form",
	"h2",
	"h3",
	"img",
	"input",
	"label",
	"li",
	"nav",
	"ol",
	"p",
	"select",
	"span",
	"svg",
	"ul"
].reduce((e, t) => {
	let n = /* @__PURE__ */ er(`Primitive.${t}`), r = o.forwardRef((e, r) => {
		let { asChild: i, ...a } = e, o = i ? n : t;
		return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(o, {
			...a,
			ref: r
		});
	});
	return r.displayName = `Primitive.${t}`, {
		...e,
		[t]: r
	};
}, {}), q = "[cmdk-group=\"\"]", or = "[cmdk-group-items=\"\"]", sr = "[cmdk-group-heading=\"\"]", cr = "[cmdk-item=\"\"]", lr = `${cr}:not([aria-disabled="true"])`, ur = "cmdk-item-select", J = "data-value", dr = (e, t, n) => ee(e, t, n), fr = o.createContext(void 0), Y = () => o.useContext(fr), pr = o.createContext(void 0), mr = () => o.useContext(pr), hr = o.createContext(void 0), gr = o.forwardRef((e, t) => {
	let n = Q(() => ({
		search: "",
		value: e.value ?? e.defaultValue ?? "",
		selectedItemId: void 0,
		filtered: {
			count: 0,
			items: /* @__PURE__ */ new Map(),
			groups: /* @__PURE__ */ new Set()
		}
	})), r = Q(() => /* @__PURE__ */ new Set()), i = Q(() => /* @__PURE__ */ new Map()), a = Q(() => /* @__PURE__ */ new Map()), s = Q(() => /* @__PURE__ */ new Set()), c = Dr(e), { label: l, children: u, value: d, onValueChange: f, filter: p, shouldFilter: m, loop: h, disablePointerSelection: g = !1, vimBindings: _ = !0, ...v } = e, y = M(), b = M(), x = M(), S = o.useRef(null), C = kr();
	Z(() => {
		if (d !== void 0) {
			let e = d.trim();
			n.current.value = e, w.emit();
		}
	}, [d]), Z(() => {
		C(6, te);
	}, []);
	let w = o.useMemo(() => ({
		subscribe: (e) => (s.current.add(e), () => s.current.delete(e)),
		snapshot: () => n.current,
		setState: (e, t, r) => {
			var i, a, o;
			if (!Object.is(n.current[e], t)) {
				if (n.current[e] = t, e === "search") O(), D(), C(1, ee);
				else if (e === "value") {
					if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
						let e = document.getElementById(x);
						e ? e.focus() : (i = document.getElementById(y)) == null || i.focus();
					}
					if (C(7, () => {
						n.current.selectedItemId = k()?.id, w.emit();
					}), r || C(5, te), c.current?.value !== void 0) {
						let e = t ?? "";
						(o = (a = c.current).onValueChange) == null || o.call(a, e);
						return;
					}
				}
				w.emit();
			}
		},
		emit: () => {
			s.current.forEach((e) => e());
		}
	}), []), T = o.useMemo(() => ({
		value: (e, t, r) => {
			t !== a.current.get(e)?.value && (a.current.set(e, {
				value: t,
				keywords: r
			}), n.current.filtered.items.set(e, E(t, r)), C(2, () => {
				D(), w.emit();
			}));
		},
		item: (e, t) => (r.current.add(e), t && (i.current.has(t) ? i.current.get(t).add(e) : i.current.set(t, new Set([e]))), C(3, () => {
			O(), D(), n.current.value || ee(), w.emit();
		}), () => {
			a.current.delete(e), r.current.delete(e), n.current.filtered.items.delete(e);
			let t = k();
			C(4, () => {
				O(), t?.getAttribute("id") === e && ee(), w.emit();
			});
		}),
		group: (e) => (i.current.has(e) || i.current.set(e, /* @__PURE__ */ new Set()), () => {
			a.current.delete(e), i.current.delete(e);
		}),
		filter: () => c.current.shouldFilter,
		label: l || e["aria-label"],
		getDisablePointerSelection: () => c.current.disablePointerSelection,
		listId: y,
		inputId: x,
		labelId: b,
		listInnerRef: S
	}), []);
	function E(e, t) {
		let r = c.current?.filter ?? dr;
		return e ? r(e, n.current.search, t) : 0;
	}
	function D() {
		if (!n.current.search || c.current.shouldFilter === !1) return;
		let e = n.current.filtered.items, t = [];
		n.current.filtered.groups.forEach((n) => {
			let r = i.current.get(n), a = 0;
			r.forEach((t) => {
				let n = e.get(t);
				a = Math.max(n, a);
			}), t.push([n, a]);
		});
		let r = S.current;
		A().sort((t, n) => {
			let r = t.getAttribute("id"), i = n.getAttribute("id");
			return (e.get(i) ?? 0) - (e.get(r) ?? 0);
		}).forEach((e) => {
			let t = e.closest(or);
			t ? t.appendChild(e.parentElement === t ? e : e.closest(`${or} > *`)) : r.appendChild(e.parentElement === r ? e : e.closest(`${or} > *`));
		}), t.sort((e, t) => t[1] - e[1]).forEach((e) => {
			let t = S.current?.querySelector(`${q}[${J}="${encodeURIComponent(e[0])}"]`);
			t?.parentElement.appendChild(t);
		});
	}
	function ee() {
		let e = A().find((e) => e.getAttribute("aria-disabled") !== "true")?.getAttribute(J);
		w.setState("value", e || void 0);
	}
	function O() {
		if (!n.current.search || c.current.shouldFilter === !1) {
			n.current.filtered.count = r.current.size;
			return;
		}
		n.current.filtered.groups = /* @__PURE__ */ new Set();
		let e = 0;
		for (let t of r.current) {
			let r = E(a.current.get(t)?.value ?? "", a.current.get(t)?.keywords ?? []);
			n.current.filtered.items.set(t, r), r > 0 && e++;
		}
		for (let [e, t] of i.current) for (let r of t) if (n.current.filtered.items.get(r) > 0) {
			n.current.filtered.groups.add(e);
			break;
		}
		n.current.filtered.count = e;
	}
	function te() {
		var e;
		let t = k();
		t && (t.parentElement?.firstChild === t && ((e = t.closest(q)?.querySelector(sr)) == null || e.scrollIntoView({ block: "nearest" })), t.scrollIntoView({ block: "nearest" }));
	}
	function k() {
		return S.current?.querySelector(`${cr}[aria-selected="true"]`);
	}
	function A() {
		return Array.from(S.current?.querySelectorAll(lr) || []);
	}
	function ne(e) {
		let t = A()[e];
		t && w.setState("value", t.getAttribute(J));
	}
	function re(e) {
		var t;
		let n = k(), r = A(), i = r.findIndex((e) => e === n), a = r[i + e];
		(t = c.current) != null && t.loop && (a = i + e < 0 ? r[r.length - 1] : i + e === r.length ? r[0] : r[i + e]), a && w.setState("value", a.getAttribute(J));
	}
	function ie(e) {
		let t = k()?.closest(q), n;
		for (; t && !n;) t = e > 0 ? Tr(t, q) : Er(t, q), n = t?.querySelector(lr);
		n ? w.setState("value", n.getAttribute(J)) : re(e);
	}
	let j = () => ne(A().length - 1), ae = (e) => {
		e.preventDefault(), e.metaKey ? j() : e.altKey ? ie(1) : re(1);
	}, oe = (e) => {
		e.preventDefault(), e.metaKey ? ne(0) : e.altKey ? ie(-1) : re(-1);
	};
	return o.createElement(K.div, {
		ref: t,
		tabIndex: -1,
		...v,
		"cmdk-root": "",
		onKeyDown: (e) => {
			var t;
			(t = v.onKeyDown) == null || t.call(v, e);
			let n = e.nativeEvent.isComposing || e.keyCode === 229;
			if (!(e.defaultPrevented || n)) switch (e.key) {
				case "n":
				case "j":
					_ && e.ctrlKey && ae(e);
					break;
				case "ArrowDown":
					ae(e);
					break;
				case "p":
				case "k":
					_ && e.ctrlKey && oe(e);
					break;
				case "ArrowUp":
					oe(e);
					break;
				case "Home":
					e.preventDefault(), ne(0);
					break;
				case "End":
					e.preventDefault(), j();
					break;
				case "Enter": {
					e.preventDefault();
					let t = k();
					if (t) {
						let e = new Event(ur);
						t.dispatchEvent(e);
					}
				}
			}
		}
	}, o.createElement("label", {
		"cmdk-label": "",
		htmlFor: T.inputId,
		id: T.labelId,
		style: Mr
	}, l), jr(e, (e) => o.createElement(pr.Provider, { value: w }, o.createElement(fr.Provider, { value: T }, e))));
}), _r = o.forwardRef((e, t) => {
	let n = M(), r = o.useRef(null), i = o.useContext(hr), a = Y(), s = Dr(e), c = s.current?.forceMount ?? i?.forceMount;
	Z(() => {
		if (!c) return a.item(n, i?.id);
	}, [c]);
	let l = Or(n, r, [
		e.value,
		e.children,
		r
	], e.keywords), u = mr(), d = $((e) => e.value && e.value === l.current), f = $((e) => c || a.filter() === !1 ? !0 : e.search ? e.filtered.items.get(n) > 0 : !0);
	o.useEffect(() => {
		let t = r.current;
		if (!(!t || e.disabled)) return t.addEventListener(ur, p), () => t.removeEventListener(ur, p);
	}, [
		f,
		e.onSelect,
		e.disabled
	]);
	function p() {
		var e, t;
		m(), (t = (e = s.current).onSelect) == null || t.call(e, l.current);
	}
	function m() {
		u.setState("value", l.current, !0);
	}
	if (!f) return null;
	let { disabled: h, value: g, onSelect: _, forceMount: v, keywords: y, ...b } = e;
	return o.createElement(K.div, {
		ref: k(r, t),
		...b,
		id: n,
		"cmdk-item": "",
		role: "option",
		"aria-disabled": !!h,
		"aria-selected": !!d,
		"data-disabled": !!h,
		"data-selected": !!d,
		onPointerMove: h || a.getDisablePointerSelection() ? void 0 : m,
		onClick: h ? void 0 : p
	}, e.children);
}), vr = o.forwardRef((e, t) => {
	let { heading: n, children: r, forceMount: i, ...a } = e, s = M(), c = o.useRef(null), l = o.useRef(null), u = M(), d = Y(), f = $((e) => i || d.filter() === !1 ? !0 : e.search ? e.filtered.groups.has(s) : !0);
	Z(() => d.group(s), []), Or(s, c, [
		e.value,
		e.heading,
		l
	]);
	let p = o.useMemo(() => ({
		id: s,
		forceMount: i
	}), [i]);
	return o.createElement(K.div, {
		ref: k(c, t),
		...a,
		"cmdk-group": "",
		role: "presentation",
		hidden: f ? void 0 : !0
	}, n && o.createElement("div", {
		ref: l,
		"cmdk-group-heading": "",
		"aria-hidden": !0,
		id: u
	}, n), jr(e, (e) => o.createElement("div", {
		"cmdk-group-items": "",
		role: "group",
		"aria-labelledby": n ? u : void 0
	}, o.createElement(hr.Provider, { value: p }, e))));
}), yr = o.forwardRef((e, t) => {
	let { alwaysRender: n, ...r } = e, i = o.useRef(null), a = $((e) => !e.search);
	return !n && !a ? null : o.createElement(K.div, {
		ref: k(i, t),
		...r,
		"cmdk-separator": "",
		role: "separator"
	});
}), br = o.forwardRef((e, t) => {
	let { onValueChange: n, ...r } = e, i = e.value != null, a = mr(), s = $((e) => e.search), c = $((e) => e.selectedItemId), l = Y();
	return o.useEffect(() => {
		e.value != null && a.setState("search", e.value);
	}, [e.value]), o.createElement(K.input, {
		ref: t,
		...r,
		"cmdk-input": "",
		autoComplete: "off",
		autoCorrect: "off",
		spellCheck: !1,
		"aria-autocomplete": "list",
		role: "combobox",
		"aria-expanded": !0,
		"aria-controls": l.listId,
		"aria-labelledby": l.labelId,
		"aria-activedescendant": c,
		id: l.inputId,
		type: "text",
		value: i ? e.value : s,
		onChange: (e) => {
			i || a.setState("search", e.target.value), n?.(e.target.value);
		}
	});
}), xr = o.forwardRef((e, t) => {
	let { children: n, label: r = "Suggestions", ...i } = e, a = o.useRef(null), s = o.useRef(null), c = $((e) => e.selectedItemId), l = Y();
	return o.useEffect(() => {
		if (s.current && a.current) {
			let e = s.current, t = a.current, n, r = new ResizeObserver(() => {
				n = requestAnimationFrame(() => {
					let n = e.offsetHeight;
					t.style.setProperty("--cmdk-list-height", n.toFixed(1) + "px");
				});
			});
			return r.observe(e), () => {
				cancelAnimationFrame(n), r.unobserve(e);
			};
		}
	}, []), o.createElement(K.div, {
		ref: k(a, t),
		...i,
		"cmdk-list": "",
		role: "listbox",
		tabIndex: -1,
		"aria-activedescendant": c,
		"aria-label": r,
		id: l.listId
	}, jr(e, (e) => o.createElement("div", {
		ref: k(s, l.listInnerRef),
		"cmdk-list-sizer": ""
	}, e)));
}), Sr = o.forwardRef((e, t) => {
	let { open: n, onOpenChange: r, overlayClassName: i, contentClassName: a, container: s, ...c } = e;
	return o.createElement(Kn, {
		open: n,
		onOpenChange: r
	}, o.createElement(qn, { container: s }, o.createElement(Jn, {
		"cmdk-overlay": "",
		className: i
	}), o.createElement(Yn, {
		"aria-label": e.label,
		"cmdk-dialog": "",
		className: a
	}, o.createElement(gr, {
		ref: t,
		...c
	}))));
}), Cr = o.forwardRef((e, t) => $((e) => e.filtered.count === 0) ? o.createElement(K.div, {
	ref: t,
	...e,
	"cmdk-empty": "",
	role: "presentation"
}) : null), wr = o.forwardRef((e, t) => {
	let { progress: n, children: r, label: i = "Loading...", ...a } = e;
	return o.createElement(K.div, {
		ref: t,
		...a,
		"cmdk-loading": "",
		role: "progressbar",
		"aria-valuenow": n,
		"aria-valuemin": 0,
		"aria-valuemax": 100,
		"aria-label": i
	}, jr(e, (e) => o.createElement("div", { "aria-hidden": !0 }, e)));
}), X = Object.assign(gr, {
	List: xr,
	Item: _r,
	Input: br,
	Group: vr,
	Separator: yr,
	Dialog: Sr,
	Empty: Cr,
	Loading: wr
});
function Tr(e, t) {
	let n = e.nextElementSibling;
	for (; n;) {
		if (n.matches(t)) return n;
		n = n.nextElementSibling;
	}
}
function Er(e, t) {
	let n = e.previousElementSibling;
	for (; n;) {
		if (n.matches(t)) return n;
		n = n.previousElementSibling;
	}
}
function Dr(e) {
	let t = o.useRef(e);
	return Z(() => {
		t.current = e;
	}), t;
}
var Z = typeof window > "u" ? o.useEffect : o.useLayoutEffect;
function Q(e) {
	let t = o.useRef();
	return t.current === void 0 && (t.current = e()), t;
}
function $(e) {
	let t = mr(), n = () => e(t.snapshot());
	return o.useSyncExternalStore(t.subscribe, n, n);
}
function Or(e, t, n, r = []) {
	let i = o.useRef(), a = Y();
	return Z(() => {
		var o;
		let s = (() => {
			for (let e of n) {
				if (typeof e == "string") return e.trim();
				if (typeof e == "object" && "current" in e) return e.current ? e.current.textContent?.trim() : i.current;
			}
		})(), c = r.map((e) => e.trim());
		a.value(e, s, c), (o = t.current) == null || o.setAttribute(J, s), i.current = s;
	}), i;
}
var kr = () => {
	let [e, t] = o.useState(), n = Q(() => /* @__PURE__ */ new Map());
	return Z(() => {
		n.current.forEach((e) => e()), n.current = /* @__PURE__ */ new Map();
	}, [e]), (e, r) => {
		n.current.set(e, r), t({});
	};
};
function Ar(e) {
	let t = e.type;
	return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
}
function jr({ asChild: e, children: t }, n) {
	return e && o.isValidElement(t) ? o.cloneElement(Ar(t), { ref: t.ref }, n(t.props.children)) : n(t);
}
var Mr = {
	position: "absolute",
	width: "1px",
	height: "1px",
	padding: "0",
	margin: "-1px",
	overflow: "hidden",
	clip: "rect(0, 0, 0, 0)",
	whiteSpace: "nowrap",
	borderWidth: "0"
};
//#endregion
//#region lib/components/ui/atoms/command.tsx
function Nr({ className: t, ...n }) {
	return /* @__PURE__ */ l(X, {
		className: e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", t),
		"data-slot": "command",
		...n
	});
}
function Pr({ title: o = "Command Palette", description: s = "Search for a command to run...", children: c, className: d, showCloseButton: f = !0, ...p }) {
	return /* @__PURE__ */ u(t, {
		...p,
		children: [/* @__PURE__ */ u(i, {
			className: "sr-only",
			children: [/* @__PURE__ */ l(a, { children: o }), /* @__PURE__ */ l(r, { children: s })]
		}), /* @__PURE__ */ l(n, {
			className: e("overflow-hidden p-0", d),
			showCloseButton: f,
			children: /* @__PURE__ */ l(Nr, {
				className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
				children: c
			})
		})]
	});
}
function Fr({ className: t, ...n }) {
	return /* @__PURE__ */ u("div", {
		className: "flex h-9 items-center gap-2 border-b px-3",
		"data-slot": "command-input-wrapper",
		children: [/* @__PURE__ */ l(p, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ l(X.Input, {
			className: e("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", t),
			"data-slot": "command-input",
			...n
		})]
	});
}
function Ir({ className: t, ...n }) {
	return /* @__PURE__ */ l(X.List, {
		className: e("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", t),
		"data-slot": "command-list",
		...n
	});
}
function Lr({ className: t, ...n }) {
	return /* @__PURE__ */ l(X.Empty, {
		className: e("py-6 text-center text-sm", t),
		"data-slot": "command-empty",
		...n
	});
}
function Rr({ className: t, ...n }) {
	return /* @__PURE__ */ l(X.Group, {
		className: e("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs", t),
		"data-slot": "command-group",
		...n
	});
}
function zr({ className: t, ...n }) {
	return /* @__PURE__ */ l(X.Separator, {
		className: e("-mx-1 h-px bg-border", t),
		"data-slot": "command-separator",
		...n
	});
}
function Br({ className: t, ...n }) {
	return /* @__PURE__ */ l(X.Item, {
		className: e("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", t),
		"data-slot": "command-item",
		...n
	});
}
function Vr({ className: t, ...n }) {
	return /* @__PURE__ */ l("span", {
		className: e("ml-auto text-muted-foreground text-xs tracking-widest", t),
		"data-slot": "command-shortcut",
		...n
	});
}
//#endregion
export { Fr as a, zr as c, Rr as i, Vr as l, Pr as n, Br as o, Lr as r, Ir as s, Nr as t };
