"use client";
import { t as e } from "./useIsoLayoutEffect-CKOv1bV_.js";
import { t, u as n } from "./useRenderElement-CmuWsiNa.js";
import { t as r } from "./useStableCallback-CqEVb76s.js";
import { t as i } from "./DirectionContext-B4CbbM--.js";
import { t as a } from "./useBaseUiId-DOm5ACje.js";
import { o } from "./detectBrowser-FBYSu3xM.js";
import { n as s, r as c } from "./shadowDom-C-4Ejp9R.js";
import { t as l } from "./addEventListener-B4Gs94GY.js";
import { cn as u } from "./lib/utils.js";
import { n as d } from "./useTimeout-B1x6NSZb.js";
import { n as f, r as p } from "./scrollEdges-VoRBF4DB.js";
import { n as ee, t as m } from "./clamp-DQAQAGkj.js";
import * as h from "react";
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRootContext.js
var v = /*#__PURE__*/ h.createContext(void 0);
process.env.NODE_ENV !== "production" && (v.displayName = "ScrollAreaRootContext");
function y() {
	let e = h.useContext(v);
	if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? n(53) : "Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRootCssVars.js
var te = /*#__PURE__*/ function(e) {
	return e.scrollAreaCornerHeight = "--scroll-area-corner-height", e.scrollAreaCornerWidth = "--scroll-area-corner-width", e;
}({});
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/utils/getOffset.js
function b(e, t, n) {
	if (!e) return 0;
	let r = getComputedStyle(e), i = n === "x" ? "Inline" : "Block";
	return n === "x" && t === "margin" ? parseFloat(r[`${t}InlineStart`]) * 2 : parseFloat(r[`${t}${i}Start`]) + parseFloat(r[`${t}${i}End`]);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbarDataAttributes.js
var x = /*#__PURE__*/ function(e) {
	return e.orientation = "data-orientation", e.hovering = "data-hovering", e.scrolling = "data-scrolling", e.hasOverflowX = "data-has-overflow-x", e.hasOverflowY = "data-has-overflow-y", e.overflowXStart = "data-overflow-x-start", e.overflowXEnd = "data-overflow-x-end", e.overflowYStart = "data-overflow-y-start", e.overflowYEnd = "data-overflow-y-end", e;
}({}), S = /*#__PURE__*/ function(e) {
	return e.scrolling = "data-scrolling", e.hasOverflowX = "data-has-overflow-x", e.hasOverflowY = "data-has-overflow-y", e.overflowXStart = "data-overflow-x-start", e.overflowXEnd = "data-overflow-x-end", e.overflowYStart = "data-overflow-y-start", e.overflowYEnd = "data-overflow-y-end", e;
}({}), C = {
	hasOverflowX: (e) => e ? { [S.hasOverflowX]: "" } : null,
	hasOverflowY: (e) => e ? { [S.hasOverflowY]: "" } : null,
	overflowXStart: (e) => e ? { [S.overflowXStart]: "" } : null,
	overflowXEnd: (e) => e ? { [S.overflowXEnd]: "" } : null,
	overflowYStart: (e) => e ? { [S.overflowYStart]: "" } : null,
	overflowYEnd: (e) => e ? { [S.overflowYEnd]: "" } : null,
	cornerHidden: () => null
}, w = {
	x: 0,
	y: 0
}, T = {
	width: 0,
	height: 0
}, E = {
	xStart: !1,
	xEnd: !1,
	yStart: !1,
	yEnd: !1
}, ne = {
	x: !0,
	y: !0,
	corner: !0
}, D = /*#__PURE__*/ h.forwardRef(function(e, n) {
	let { render: i, className: o, overflowEdgeThreshold: c, style: l, ...u } = e, f = re(c), m = a(), g = d(), y = d(), { nonce: S, disableStyleElements: D } = ee(), [O, k] = h.useState(!1), [A, j] = h.useState(!1), [M, N] = h.useState(!1), [P, F] = h.useState(!1), [I, L] = h.useState(!1), [R, z] = h.useState(T), [B, V] = h.useState(T), [H, ie] = h.useState(E), [U, W] = h.useState(ne), G = h.useRef(null), K = h.useRef(null), q = h.useRef(null), J = h.useRef(null), Y = h.useRef(null), X = h.useRef(null), ae = h.useRef(null), oe = h.useRef(!1), se = h.useRef(0), ce = h.useRef(0), le = h.useRef(0), ue = h.useRef(0), Z = h.useRef("vertical"), Q = h.useRef(w), de = r((e) => {
		let t = e.x - Q.current.x, n = e.y - Q.current.y;
		Q.current = e, n !== 0 && (N(!0), g.start(500, () => {
			N(!1);
		})), t !== 0 && (j(!0), y.start(500, () => {
			j(!1);
		}));
	}), $ = r((e) => {
		e.button === 0 && (oe.current = !0, se.current = e.clientY, ce.current = e.clientX, Z.current = e.currentTarget.getAttribute(x.orientation), K.current && (le.current = K.current.scrollTop, ue.current = K.current.scrollLeft), Y.current && Z.current === "vertical" && Y.current.setPointerCapture(e.pointerId), X.current && Z.current === "horizontal" && X.current.setPointerCapture(e.pointerId));
	}), fe = r((e) => {
		if (!oe.current) return;
		let t = e.clientY - se.current, n = e.clientX - ce.current;
		if (K.current) {
			let r = K.current.scrollHeight, i = K.current.clientHeight, a = K.current.scrollWidth, o = K.current.clientWidth;
			if (Y.current && q.current && Z.current === "vertical") {
				let n = b(q.current, "padding", "y"), a = b(Y.current, "margin", "y"), o = Y.current.offsetHeight, s = t / (q.current.offsetHeight - o - n - a);
				K.current.scrollTop = le.current + s * (r - i), e.preventDefault(), N(!0), g.start(500, () => {
					N(!1);
				});
			}
			if (X.current && J.current && Z.current === "horizontal") {
				let t = b(J.current, "padding", "x"), r = b(X.current, "margin", "x"), i = X.current.offsetWidth, s = n / (J.current.offsetWidth - i - t - r);
				K.current.scrollLeft = ue.current + s * (a - o), e.preventDefault(), j(!0), y.start(500, () => {
					j(!1);
				});
			}
		}
	}), pe = r((e) => {
		oe.current = !1, Y.current && Z.current === "vertical" && Y.current.releasePointerCapture(e.pointerId), X.current && Z.current === "horizontal" && X.current.releasePointerCapture(e.pointerId);
	});
	function me(e) {
		F(e.pointerType === "touch");
	}
	function he(e) {
		me(e), e.pointerType !== "touch" && k(s(G.current, e.target));
	}
	let ge = h.useMemo(() => ({
		scrolling: A || M,
		hasOverflowX: !U.x,
		hasOverflowY: !U.y,
		overflowXStart: H.xStart,
		overflowXEnd: H.xEnd,
		overflowYStart: H.yStart,
		overflowYEnd: H.yEnd,
		cornerHidden: U.corner
	}), [
		A,
		M,
		U.x,
		U.y,
		U.corner,
		H
	]), _e = {
		role: "presentation",
		onPointerEnter: he,
		onPointerMove: he,
		onPointerDown: me,
		onPointerLeave() {
			k(!1);
		},
		style: {
			position: "relative",
			[te.scrollAreaCornerHeight]: `${R.height}px`,
			[te.scrollAreaCornerWidth]: `${R.width}px`
		}
	}, ve = t("div", e, {
		state: ge,
		ref: [n, G],
		props: [_e, u],
		stateAttributesMapping: C
	}), ye = h.useMemo(() => ({
		handlePointerDown: $,
		handlePointerMove: fe,
		handlePointerUp: pe,
		handleScroll: de,
		cornerSize: R,
		setCornerSize: z,
		thumbSize: B,
		setThumbSize: V,
		hasMeasuredScrollbar: I,
		setHasMeasuredScrollbar: L,
		touchModality: P,
		cornerRef: ae,
		scrollingX: A,
		setScrollingX: j,
		scrollingY: M,
		setScrollingY: N,
		hovering: O,
		setHovering: k,
		viewportRef: K,
		rootRef: G,
		scrollbarYRef: q,
		scrollbarXRef: J,
		thumbYRef: Y,
		thumbXRef: X,
		rootId: m,
		hiddenState: U,
		setHiddenState: W,
		overflowEdges: H,
		setOverflowEdges: ie,
		viewportState: ge,
		overflowEdgeThreshold: f
	}), [
		$,
		fe,
		pe,
		de,
		R,
		B,
		I,
		P,
		A,
		j,
		M,
		N,
		O,
		k,
		m,
		U,
		H,
		ge,
		f
	]);
	return /*#__PURE__*/ _(v.Provider, {
		value: ye,
		children: [!D && p.getElement(S), ve]
	});
});
process.env.NODE_ENV !== "production" && (D.displayName = "ScrollAreaRoot");
function re(e) {
	if (typeof e == "number") {
		let t = Math.max(0, e);
		return {
			xStart: t,
			xEnd: t,
			yStart: t,
			yEnd: t
		};
	}
	return {
		xStart: Math.max(0, e?.xStart || 0),
		xEnd: Math.max(0, e?.xEnd || 0),
		yStart: Math.max(0, e?.yStart || 0),
		yEnd: Math.max(0, e?.yEnd || 0)
	};
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewportContext.js
var O = /*#__PURE__*/ h.createContext(void 0);
process.env.NODE_ENV !== "production" && (O.displayName = "ScrollAreaViewportContext");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewportCssVars.js
var k = /*#__PURE__*/ function(e) {
	return e.scrollAreaOverflowXStart = "--scroll-area-overflow-x-start", e.scrollAreaOverflowXEnd = "--scroll-area-overflow-x-end", e.scrollAreaOverflowYStart = "--scroll-area-overflow-y-start", e.scrollAreaOverflowYEnd = "--scroll-area-overflow-y-end", e;
}({}), A = !1;
function j() {
	A || o || (typeof CSS < "u" && "registerProperty" in CSS && [
		k.scrollAreaOverflowXStart,
		k.scrollAreaOverflowXEnd,
		k.scrollAreaOverflowYStart,
		k.scrollAreaOverflowYEnd
	].forEach((e) => {
		try {
			CSS.registerProperty({
				name: e,
				syntax: "<length>",
				inherits: !1,
				initialValue: "0px"
			});
		} catch {}
	}), A = !0);
}
var M = /*#__PURE__*/ h.forwardRef(function(n, a) {
	let { render: o, className: s, style: c, ...l } = n, { viewportRef: u, scrollbarYRef: ee, scrollbarXRef: _, thumbYRef: v, thumbXRef: te, cornerRef: x, cornerSize: S, setCornerSize: w, setThumbSize: T, rootId: E, setHiddenState: ne, hiddenState: D, setHasMeasuredScrollbar: re, handleScroll: A, setHovering: M, setOverflowEdges: F, overflowEdges: I, overflowEdgeThreshold: L, scrollingX: R, scrollingY: z } = y(), B = i(), V = h.useRef(!0), H = h.useRef([
		NaN,
		NaN,
		NaN,
		NaN
	]), ie = d(), U = d(), W = r(() => {
		let e = u.current, t = ee.current, n = _.current, r = v.current, i = te.current, a = x.current;
		if (!e) return;
		let o = e.scrollHeight, s = e.scrollWidth, c = e.clientHeight, l = e.clientWidth, d = e.scrollTop, p = e.scrollLeft, h = H.current, g = Number.isNaN(h[0]);
		if (h[0] = c, h[1] = o, h[2] = l, h[3] = s, g && re(!0), o === 0 || s === 0) return;
		let y = N(e), C = y.y, E = y.x, D = l / s, O = c / o, A = Math.max(0, s - l), j = Math.max(0, o - c), M = 0, I = 0;
		if (!E) {
			let e = 0;
			e = m(B === "rtl" ? -p : p, 0, A), M = f(e, A), I = A - M;
		}
		let R = C ? 0 : m(d, 0, j), z = C ? 0 : f(R, j), V = C ? 0 : j - z, ie = E ? 0 : l, U = C ? 0 : c, W = 0, G = 0;
		!E && !C && (W = t?.offsetWidth || 0, G = n?.offsetHeight || 0);
		let K = S.width === 0 && S.height === 0, q = K ? W : 0, J = K ? G : 0, Y = b(n, "padding", "x"), X = b(t, "padding", "y"), ae = b(i, "margin", "x"), oe = b(r, "margin", "y"), se = ie - Y - ae, ce = U - X - oe, le = n ? Math.min(n.offsetWidth - q, se) : se, ue = t ? Math.min(t.offsetHeight - J, ce) : ce, Z = Math.max(16, le * D), Q = Math.max(16, ue * O);
		if (T((e) => e.height === Q && e.width === Z ? e : {
			width: Z,
			height: Q
		}), t && r) {
			let e = t.offsetHeight - Q - X - oe, n = o - c, i = n === 0 ? 0 : d / n, a = Math.min(e, Math.max(0, i * e));
			r.style.transform = `translate3d(0,${a}px,0)`;
		}
		if (n && i) {
			let e = n.offsetWidth - Z - Y - ae, t = s - l, r = t === 0 ? 0 : p / t, a = B === "rtl" ? m(r * e, -e, 0) : m(r * e, 0, e);
			i.style.transform = `translate3d(${a}px,0,0)`;
		}
		let de = [
			[k.scrollAreaOverflowXStart, M],
			[k.scrollAreaOverflowXEnd, I],
			[k.scrollAreaOverflowYStart, z],
			[k.scrollAreaOverflowYEnd, V]
		];
		for (let [t, n] of de) e.style.setProperty(t, `${n}px`);
		a && (E || C ? w({
			width: 0,
			height: 0
		}) : !E && !C && w({
			width: W,
			height: G
		})), ne((e) => P(e, y));
		let $ = {
			xStart: !E && M > L.xStart,
			xEnd: !E && I > L.xEnd,
			yStart: !C && z > L.yStart,
			yEnd: !C && V > L.yEnd
		};
		F((e) => e.xStart === $.xStart && e.xEnd === $.xEnd && e.yStart === $.yStart && e.yEnd === $.yEnd ? e : $);
	});
	e(() => {
		u.current && j();
	}, [u]), e(() => {
		queueMicrotask(W);
	}, [
		W,
		D,
		B
	]), e(() => {
		u.current?.matches(":hover") && M(!0);
	}, [u, M]), h.useEffect(() => {
		let e = u.current;
		if (typeof ResizeObserver > "u" || !e) return;
		let t = !1, n = new ResizeObserver(() => {
			if (!t) {
				t = !0;
				let n = H.current;
				if (n[0] === e.clientHeight && n[1] === e.scrollHeight && n[2] === e.clientWidth && n[3] === e.scrollWidth) return;
			}
			W();
		});
		return n.observe(e), U.start(0, () => {
			let t = e.getAnimations({ subtree: !0 });
			t.length !== 0 && Promise.allSettled(t.map((e) => e.finished)).then(W).catch(() => {});
		}), () => {
			n.disconnect(), U.clear();
		};
	}, [
		W,
		u,
		U
	]);
	function G() {
		V.current = !1;
	}
	let K = {
		role: "presentation",
		...E && { "data-id": `${E}-viewport` },
		tabIndex: D.x && D.y ? -1 : 0,
		className: p.className,
		style: { overflow: "scroll" },
		onScroll() {
			u.current && (W(), V.current || A({
				x: u.current.scrollLeft,
				y: u.current.scrollTop
			}), ie.start(100, () => {
				V.current = !0;
			}));
		},
		onWheel: G,
		onTouchMove: G,
		onPointerMove: G,
		onPointerEnter: G,
		onKeyDown: G
	}, q = h.useMemo(() => ({
		scrolling: R || z,
		hasOverflowX: !D.x,
		hasOverflowY: !D.y,
		overflowXStart: I.xStart,
		overflowXEnd: I.xEnd,
		overflowYStart: I.yStart,
		overflowYEnd: I.yEnd,
		cornerHidden: D.corner
	}), [
		R,
		z,
		D.x,
		D.y,
		D.corner,
		I
	]), J = t("div", n, {
		ref: [a, u],
		state: q,
		props: [K, l],
		stateAttributesMapping: C
	}), Y = h.useMemo(() => ({ computeThumbPosition: W }), [W]);
	return /*#__PURE__*/ g(O.Provider, {
		value: Y,
		children: J
	});
});
process.env.NODE_ENV !== "production" && (M.displayName = "ScrollAreaViewport");
function N(e) {
	let t = e.clientHeight >= e.scrollHeight, n = e.clientWidth >= e.scrollWidth;
	return {
		y: t,
		x: n,
		corner: t || n
	};
}
function P(e, t) {
	return e.y === t.y && e.x === t.x && e.corner === t.corner ? e : t;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbarContext.js
var F = /*#__PURE__*/ h.createContext(void 0);
process.env.NODE_ENV !== "production" && (F.displayName = "ScrollAreaScrollbarContext");
function I() {
	let e = h.useContext(F);
	if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? n(54) : "Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbarCssVars.js
var L = /*#__PURE__*/ function(e) {
	return e.scrollAreaThumbHeight = "--scroll-area-thumb-height", e.scrollAreaThumbWidth = "--scroll-area-thumb-width", e;
}({}), R = /*#__PURE__*/ h.forwardRef(function(e, n) {
	let { render: r, className: a, orientation: o = "vertical", keepMounted: u = !1, style: d, ...f } = e, { hovering: p, scrollingX: ee, scrollingY: m, hiddenState: _, overflowEdges: v, scrollbarYRef: x, scrollbarXRef: S, viewportRef: w, thumbYRef: T, thumbXRef: E, handlePointerDown: ne, handlePointerUp: D, rootId: re, thumbSize: O, hasMeasuredScrollbar: k } = y(), A = {
		hovering: p,
		scrolling: {
			horizontal: ee,
			vertical: m
		}[o],
		orientation: o,
		hasOverflowX: !_.x,
		hasOverflowY: !_.y,
		overflowXStart: v.xStart,
		overflowXEnd: v.xEnd,
		overflowYStart: v.yStart,
		overflowYEnd: v.yEnd,
		cornerHidden: _.corner
	}, j = i(), M = !k && !u, N = o === "vertical" ? _.y : _.x, P = u || !N;
	h.useEffect(() => {
		if (!P) return;
		let e = w.current, t = o === "vertical" ? x.current : S.current;
		if (!t) return;
		function n(n) {
			if (!e || !t || n.ctrlKey) return;
			n.preventDefault();
			let r = o === "horizontal", i = r ? "scrollLeft" : "scrollTop", a = r ? n.deltaX : n.deltaY, s = r ? e.scrollWidth - e.clientWidth : e.scrollHeight - e.clientHeight, c = r && j === "rtl" ? -s : 0, l = r && j === "rtl" ? 0 : s, u = e[i];
			u <= c && a < 0 || u >= l && a > 0 || (e[i] = Math.min(l, Math.max(c, u + a)));
		}
		return l(t, "wheel", n, { passive: !1 });
	}, [
		j,
		o,
		S,
		x,
		P,
		w
	]);
	let I = {
		...re && { "data-id": `${re}-scrollbar` },
		onPointerDown(e) {
			if (e.button !== 0) return;
			let t = c(e.nativeEvent), n = o === "vertical" ? T.current : E.current;
			if (!(n && s(n, t)) && w.current) {
				if (T.current && x.current && o === "vertical") {
					let t = b(T.current, "margin", "y"), n = b(x.current, "padding", "y"), r = T.current.offsetHeight, i = x.current.getBoundingClientRect(), a = e.clientY - i.top - r / 2 - n + t / 2, o = w.current.scrollHeight, s = w.current.clientHeight, c = a / (x.current.offsetHeight - r - n - t) * (o - s);
					w.current.scrollTop = c;
				}
				if (E.current && S.current && o === "horizontal") {
					let t = b(E.current, "margin", "x"), n = b(S.current, "padding", "x"), r = E.current.offsetWidth, i = S.current.getBoundingClientRect(), a = e.clientX - i.left - r / 2 - n + t / 2, o = w.current.scrollWidth, s = w.current.clientWidth, c = a / (S.current.offsetWidth - r - n - t), l;
					j === "rtl" ? (l = (1 - c) * (o - s), w.current.scrollLeft <= 0 && (l = -l)) : l = c * (o - s), w.current.scrollLeft = l;
				}
				ne(e);
			}
		},
		onPointerUp: D,
		style: {
			position: "absolute",
			touchAction: "none",
			WebkitUserSelect: "none",
			userSelect: "none",
			visibility: M ? "hidden" : void 0,
			...o === "vertical" && {
				top: 0,
				bottom: `var(${te.scrollAreaCornerHeight})`,
				insetInlineEnd: 0,
				[L.scrollAreaThumbHeight]: `${O.height}px`
			},
			...o === "horizontal" && {
				insetInlineStart: 0,
				insetInlineEnd: `var(${te.scrollAreaCornerWidth})`,
				bottom: 0,
				[L.scrollAreaThumbWidth]: `${O.width}px`
			}
		}
	}, R = t("div", e, {
		ref: [n, o === "vertical" ? x : S],
		state: A,
		props: [I, f],
		stateAttributesMapping: C
	}), z = h.useMemo(() => ({ orientation: o }), [o]);
	return P ? /*#__PURE__*/ g(F.Provider, {
		value: z,
		children: R
	}) : null;
});
process.env.NODE_ENV !== "production" && (R.displayName = "ScrollAreaScrollbar");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/thumb/ScrollAreaThumb.js
var z = /*#__PURE__*/ h.forwardRef(function(e, n) {
	let { render: r, className: i, style: a, ...o } = e, { thumbYRef: s, thumbXRef: c, handlePointerDown: l, handlePointerMove: u, handlePointerUp: d, setScrollingX: f, setScrollingY: p, hasMeasuredScrollbar: ee } = y(), { orientation: m } = I();
	return t("div", e, {
		ref: [n, m === "vertical" ? s : c],
		state: { orientation: m },
		props: [{
			onPointerDown: l,
			onPointerMove: u,
			onPointerUp(e) {
				m === "vertical" && p(!1), m === "horizontal" && f(!1), d(e);
			},
			style: {
				visibility: ee ? void 0 : "hidden",
				...m === "vertical" && { height: `var(${L.scrollAreaThumbHeight})` },
				...m === "horizontal" && { width: `var(${L.scrollAreaThumbWidth})` }
			}
		}, o]
	});
});
process.env.NODE_ENV !== "production" && (z.displayName = "ScrollAreaThumb");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/scroll-area/corner/ScrollAreaCorner.js
var B = /*#__PURE__*/ h.forwardRef(function(e, n) {
	let { render: r, className: i, style: a, ...o } = e, { cornerRef: s, cornerSize: c, hiddenState: l } = y(), u = t("div", e, {
		ref: [n, s],
		props: [{ style: {
			position: "absolute",
			bottom: 0,
			insetInlineEnd: 0,
			width: c.width,
			height: c.height
		} }, o]
	});
	return l.corner ? null : u;
});
process.env.NODE_ENV !== "production" && (B.displayName = "ScrollAreaCorner");
//#endregion
//#region lib/components/ui/atoms/scroll-area.tsx
var V = {
	always: "",
	auto: "",
	hover: "opacity-0 data-hovering:opacity-100 data-scrolling:opacity-100 transition-opacity duration-150",
	scroll: "opacity-0 data-scrolling:opacity-100 transition-opacity duration-150"
};
function H({ className: e, children: t, type: n = "auto", ...r }) {
	return /* @__PURE__ */ _(D, {
		className: u("relative", e),
		"data-slot": "scroll-area",
		...r,
		children: [
			/* @__PURE__ */ g(M, {
				className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",
				"data-slot": "scroll-area-viewport",
				children: t
			}),
			/* @__PURE__ */ g(ie, { className: V[n] }),
			/* @__PURE__ */ g(B, {})
		]
	});
}
function ie({ className: e, orientation: t = "vertical", ...n }) {
	return /* @__PURE__ */ g(R, {
		className: u("flex touch-none select-none p-px transition-colors data-[orientation=horizontal]:h-2.5 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent", e),
		"data-orientation": t,
		"data-slot": "scroll-area-scrollbar",
		orientation: t,
		...n,
		children: /* @__PURE__ */ g(z, {
			className: "relative flex-1 rounded-full bg-border",
			"data-slot": "scroll-area-thumb"
		})
	});
}
//#endregion
export { ie as n, H as t };
