import { t as e } from "./dist-CTlQcJNK.js";
import * as t from "react";
import { jsx as n } from "react/jsx-runtime";
import * as r from "react-dom";
typeof window < "u" && window.document && window.document.createElement;
function i(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
	return function(r) {
		if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
	};
}
//#endregion
//#region node_modules/@radix-ui/react-context/dist/index.mjs
function a(e, r) {
	let i = t.createContext(r), a = (e) => {
		let { children: r, ...a } = e, o = t.useMemo(() => a, Object.values(a));
		return /* @__PURE__ */ n(i.Provider, {
			value: o,
			children: r
		});
	};
	a.displayName = e + "Provider";
	function o(n) {
		let a = t.useContext(i);
		if (a) return a;
		if (r !== void 0) return r;
		throw Error(`\`${n}\` must be used within \`${e}\``);
	}
	return [a, o];
}
function o(e, r = []) {
	let i = [];
	function a(r, a) {
		let o = t.createContext(a), s = i.length;
		i = [...i, a];
		let c = (r) => {
			let { scope: i, children: a, ...c } = r, l = i?.[e]?.[s] || o, u = t.useMemo(() => c, Object.values(c));
			return /* @__PURE__ */ n(l.Provider, {
				value: u,
				children: a
			});
		};
		c.displayName = r + "Provider";
		function l(n, i) {
			let c = i?.[e]?.[s] || o, l = t.useContext(c);
			if (l) return l;
			if (a !== void 0) return a;
			throw Error(`\`${n}\` must be used within \`${r}\``);
		}
		return [c, l];
	}
	let o = () => {
		let n = i.map((e) => t.createContext(e));
		return function(r) {
			let i = r?.[e] || n;
			return t.useMemo(() => ({ [`__scope${e}`]: {
				...r,
				[e]: i
			} }), [r, i]);
		};
	};
	return o.scopeName = e, [a, s(o, ...r)];
}
function s(...e) {
	let n = e[0];
	if (e.length === 1) return n;
	let r = () => {
		let r = e.map((e) => ({
			useScope: e(),
			scopeName: e.scopeName
		}));
		return function(e) {
			let i = r.reduce((t, { useScope: n, scopeName: r }) => {
				let i = n(e)[`__scope${r}`];
				return {
					...t,
					...i
				};
			}, {});
			return t.useMemo(() => ({ [`__scope${n.scopeName}`]: i }), [i]);
		};
	};
	return r.scopeName = n.scopeName, r;
}
//#endregion
//#region node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
var c = globalThis?.document ? t.useLayoutEffect : () => {};
//#endregion
//#region node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
/* @__NO_SIDE_EFFECTS__ */
function l(e) {
	let r = /* @__PURE__ */ u(e), i = t.forwardRef((e, i) => {
		let { children: a, ...o } = e, s = t.Children.toArray(a), c = s.find(f);
		if (c) {
			let e = c.props.children, a = s.map((n) => n === c ? t.Children.count(e) > 1 ? t.Children.only(null) : t.isValidElement(e) ? e.props.children : null : n);
			return /* @__PURE__ */ n(r, {
				...o,
				ref: i,
				children: t.isValidElement(e) ? t.cloneElement(e, void 0, a) : null
			});
		}
		return /* @__PURE__ */ n(r, {
			...o,
			ref: i,
			children: a
		});
	});
	return i.displayName = `${e}.Slot`, i;
}
/* @__NO_SIDE_EFFECTS__ */
function u(n) {
	let r = t.forwardRef((n, r) => {
		let { children: i, ...a } = n;
		if (t.isValidElement(i)) {
			let n = m(i), o = p(a, i.props);
			return i.type !== t.Fragment && (o.ref = r ? e(r, n) : n), t.cloneElement(i, o);
		}
		return t.Children.count(i) > 1 ? t.Children.only(null) : null;
	});
	return r.displayName = `${n}.SlotClone`, r;
}
var d = Symbol("radix.slottable");
function f(e) {
	return t.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
}
function p(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 m(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/@radix-ui/react-primitive/dist/index.mjs
var h = [
	"a",
	"button",
	"div",
	"form",
	"h2",
	"h3",
	"img",
	"input",
	"label",
	"li",
	"nav",
	"ol",
	"p",
	"select",
	"span",
	"svg",
	"ul"
].reduce((e, r) => {
	let i = /* @__PURE__ */ l(`Primitive.${r}`), a = t.forwardRef((e, t) => {
		let { asChild: a, ...o } = e, s = a ? i : r;
		return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, {
			...o,
			ref: t
		});
	});
	return a.displayName = `Primitive.${r}`, {
		...e,
		[r]: a
	};
}, {});
function g(e, t) {
	e && r.flushSync(() => e.dispatchEvent(t));
}
//#endregion
export { o as a, a as i, g as n, i as o, c as r, h as t };

//# sourceMappingURL=dist-koa_pEtu.js.map