UNPKG

@easykit/design

Version:

Easy kit design components

947 lines 449 kB
import { c as T, a as bt, b as xr, B as Hd, g as ki, r as Vd } from "./utils.js"; import { d as HA, i as VA, m as GA, t as WA } from "./utils.js"; import * as b from "react"; import K, { useState as Oe, useCallback as Xr, useEffect as Qe, forwardRef as dt, createElement as Gd, useMemo as Je, Children as wn, cloneElement as lr, useImperativeHandle as Wd, createContext as qd, useContext as Mt, useId as Yd, useRef as we, version as Xd, isValidElement as Jd, useLayoutEffect as Qd } from "react"; import { jsx as p, jsxs as G, Fragment as It } from "react/jsx-runtime"; import eo, { flushSync as Oi } from "react-dom"; import * as Yn from "@radix-ui/react-scroll-area"; import * as Jr from "@radix-ui/react-tabs"; import * as Ze from "@radix-ui/react-dropdown-menu"; import { CheckIcon as Mo, CircleIcon as Kl, ChevronRightIcon as Zd, ChevronLeft as ef, ChevronRight as Fl, XIcon as Io, SearchIcon as tf, GripVerticalIcon as nf, ChevronDownIcon as Lo, MinusIcon as rf, ChevronUpIcon as af, Calendar as jl } from "lucide-react"; import * as of from "@radix-ui/react-separator"; import { Slot as cr } from "@radix-ui/react-slot"; import { clsx as sf } from "clsx"; import * as Mr from "@radix-ui/react-popover"; import { DayPicker as lf } from "react-day-picker"; import * as Ai from "@radix-ui/react-progress"; import * as He from "@radix-ui/react-dialog"; import * as Ir from "@radix-ui/react-hover-card"; import * as to from "@radix-ui/react-radio-group"; import * as Ut from "@radix-ui/react-navigation-menu"; import { IconSpin as cf, IconEmpty as uf } from "@arco-iconbox/react-atom-ui"; import { FormProvider as df, Controller as Ul, useFormContext as ff, useFormState as pf, appendErrors as vf, useForm as Bl } from "react-hook-form"; import * as mf from "@radix-ui/react-label"; import { validateFieldsNatively as hf, toNestErrors as gf } from "@hookform/resolvers"; import { CheckIcon as zo, Cross2Icon as Nn, InfoCircledIcon as yf, ExclamationTriangleIcon as bf, DotsHorizontalIcon as xf, LayoutIcon as wf, MinusIcon as Sf, CaretSortIcon as Hl, PlusCircledIcon as Ef, DoubleArrowLeftIcon as Nf, ChevronLeftIcon as Cf, ChevronRightIcon as Vl, DoubleArrowRightIcon as _f, FileIcon as Tf, CrossCircledIcon as Rf, CheckCircledIcon as Pf, TriangleDownIcon as $f, TriangleRightIcon as kf, ChevronDownIcon as Of } from "@radix-ui/react-icons"; import * as Ko from "@radix-ui/react-avatar"; import { useReactTable as Af, getCoreRowModel as Df, getSortedRowModel as Mf, flexRender as Di } from "@tanstack/react-table"; import If from "./locales/zh-cn.js"; import * as yt from "@radix-ui/react-select"; import * as Mi from "@radix-ui/react-checkbox"; import * as Ii from "@radix-ui/react-switch"; import * as Cn from "@radix-ui/react-alert-dialog"; import * as xn from "@radix-ui/react-tooltip"; import { format as $r, addDays as Lf } from "date-fns"; import { useDropzone as zf } from "react-dropzone"; import "tailwind-merge"; const Gl = (e) => { const [t, n] = Oe({ width: 0, height: 0 }), r = Xr(() => { var a, o; n({ width: ((a = e.current) == null ? void 0 : a.offsetWidth) || 0, height: ((o = e.current) == null ? void 0 : o.offsetHeight) || 0 }); }, [e]); return Qe(() => { const a = new ResizeObserver(r); return e.current && a.observe(e.current), () => { a.disconnect(); }; }, [e, r]), t; }, wO = (e, t) => { Qe(() => { const n = (r) => { if (!t) return; t.filter((o) => !o.current.contains(r.target)).length === t.length && e(); }; return document.addEventListener("mousedown", n), () => { document.removeEventListener("mousedown", n); }; }, [t, e]); }; var Kf = (e, t, n, r, a, o, i, s) => { let u = document.documentElement, l = ["light", "dark"]; function d(m) { (Array.isArray(e) ? e : [e]).forEach((h) => { let g = h === "class", f = g && o ? a.map((y) => o[y] || y) : a; g ? (u.classList.remove(...f), u.classList.add(m)) : u.setAttribute(h, m); }), c(m); } function c(m) { s && l.includes(m) && (u.style.colorScheme = m); } function v() { return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } if (r) d(r); else try { let m = localStorage.getItem(t) || n, h = i && m === "system" ? v() : m; d(h); } catch { } }, Ff = b.createContext(void 0), jf = { setTheme: (e) => { }, themes: [] }, Uf = () => { var e; return (e = b.useContext(Ff)) != null ? e : jf; }; b.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: a, defaultTheme: o, value: i, themes: s, nonce: u, scriptProps: l }) => { let d = JSON.stringify([n, t, o, e, s, i, r, a]).slice(1, -1); return b.createElement("script", { ...l, suppressHydrationWarning: !0, nonce: typeof window > "u" ? u : "", dangerouslySetInnerHTML: { __html: `(${Kf.toString()})(${d})` } }); }); function Bf(e) { if (typeof document > "u") return; let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style"); n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e)); } const Hf = (e) => { switch (e) { case "success": return Wf; case "info": return Yf; case "warning": return qf; case "error": return Xf; default: return null; } }, Vf = Array(12).fill(0), Gf = ({ visible: e, className: t }) => /* @__PURE__ */ K.createElement("div", { className: [ "sonner-loading-wrapper", t ].filter(Boolean).join(" "), "data-visible": e }, /* @__PURE__ */ K.createElement("div", { className: "sonner-spinner" }, Vf.map((n, r) => /* @__PURE__ */ K.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), Wf = /* @__PURE__ */ K.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, /* @__PURE__ */ K.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), qf = /* @__PURE__ */ K.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, /* @__PURE__ */ K.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), Yf = /* @__PURE__ */ K.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, /* @__PURE__ */ K.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), Xf = /* @__PURE__ */ K.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, /* @__PURE__ */ K.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), Jf = /* @__PURE__ */ K.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ K.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ K.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), Qf = () => { const [e, t] = K.useState(document.hidden); return K.useEffect(() => { const n = () => { t(document.hidden); }; return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n); }, []), e; }; let no = 1; class Zf { constructor() { this.subscribe = (t) => (this.subscribers.push(t), () => { const n = this.subscribers.indexOf(t); this.subscribers.splice(n, 1); }), this.publish = (t) => { this.subscribers.forEach((n) => n(t)); }, this.addToast = (t) => { this.publish(t), this.toasts = [ ...this.toasts, t ]; }, this.create = (t) => { var n; const { message: r, ...a } = t, o = typeof (t == null ? void 0 : t.id) == "number" || ((n = t.id) == null ? void 0 : n.length) > 0 ? t.id : no++, i = this.toasts.find((u) => u.id === o), s = t.dismissible === void 0 ? !0 : t.dismissible; return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), i ? this.toasts = this.toasts.map((u) => u.id === o ? (this.publish({ ...u, ...t, id: o, title: r }), { ...u, ...t, id: o, dismissible: s, title: r }) : u) : this.addToast({ title: r, ...a, dismissible: s, id: o }), o; }, this.dismiss = (t) => (t ? (this.dismissedToasts.add(t), requestAnimationFrame(() => this.subscribers.forEach((n) => n({ id: t, dismiss: !0 })))) : this.toasts.forEach((n) => { this.subscribers.forEach((r) => r({ id: n.id, dismiss: !0 })); }), t), this.message = (t, n) => this.create({ ...n, message: t }), this.error = (t, n) => this.create({ ...n, message: t, type: "error" }), this.success = (t, n) => this.create({ ...n, type: "success", message: t }), this.info = (t, n) => this.create({ ...n, type: "info", message: t }), this.warning = (t, n) => this.create({ ...n, type: "warning", message: t }), this.loading = (t, n) => this.create({ ...n, type: "loading", message: t }), this.promise = (t, n) => { if (!n) return; let r; n.loading !== void 0 && (r = this.create({ ...n, promise: t, type: "loading", message: n.loading, description: typeof n.description != "function" ? n.description : void 0 })); const a = Promise.resolve(t instanceof Function ? t() : t); let o = r !== void 0, i; const s = a.then(async (l) => { if (i = [ "resolve", l ], K.isValidElement(l)) o = !1, this.create({ id: r, type: "default", message: l }); else if (tp(l) && !l.ok) { o = !1; const c = typeof n.error == "function" ? await n.error(`HTTP error! status: ${l.status}`) : n.error, v = typeof n.description == "function" ? await n.description(`HTTP error! status: ${l.status}`) : n.description, h = typeof c == "object" && !K.isValidElement(c) ? c : { message: c }; this.create({ id: r, type: "error", description: v, ...h }); } else if (l instanceof Error) { o = !1; const c = typeof n.error == "function" ? await n.error(l) : n.error, v = typeof n.description == "function" ? await n.description(l) : n.description, h = typeof c == "object" && !K.isValidElement(c) ? c : { message: c }; this.create({ id: r, type: "error", description: v, ...h }); } else if (n.success !== void 0) { o = !1; const c = typeof n.success == "function" ? await n.success(l) : n.success, v = typeof n.description == "function" ? await n.description(l) : n.description, h = typeof c == "object" && !K.isValidElement(c) ? c : { message: c }; this.create({ id: r, type: "success", description: v, ...h }); } }).catch(async (l) => { if (i = [ "reject", l ], n.error !== void 0) { o = !1; const d = typeof n.error == "function" ? await n.error(l) : n.error, c = typeof n.description == "function" ? await n.description(l) : n.description, m = typeof d == "object" && !K.isValidElement(d) ? d : { message: d }; this.create({ id: r, type: "error", description: c, ...m }); } }).finally(() => { o && (this.dismiss(r), r = void 0), n.finally == null || n.finally.call(n); }), u = () => new Promise((l, d) => s.then(() => i[0] === "reject" ? d(i[1]) : l(i[1])).catch(d)); return typeof r != "string" && typeof r != "number" ? { unwrap: u } : Object.assign(r, { unwrap: u }); }, this.custom = (t, n) => { const r = (n == null ? void 0 : n.id) || no++; return this.create({ jsx: t(r), id: r, ...n }), r; }, this.getActiveToasts = () => this.toasts.filter((t) => !this.dismissedToasts.has(t.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(); } } const at = new Zf(), ep = (e, t) => { const n = (t == null ? void 0 : t.id) || no++; return at.addToast({ title: e, ...t, id: n }), n; }, tp = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", np = ep, rp = () => at.toasts, ap = () => at.getActiveToasts(), wr = Object.assign(np, { success: at.success, info: at.info, warning: at.warning, error: at.error, custom: at.custom, message: at.message, promise: at.promise, dismiss: at.dismiss, loading: at.loading }, { getHistory: rp, getToasts: ap }); Bf("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}"); function Sr(e) { return e.label !== void 0; } const op = 3, ip = "24px", sp = "16px", Li = 4e3, lp = 356, cp = 14, up = 45, dp = 200; function _t(...e) { return e.filter(Boolean).join(" "); } function fp(e) { const [t, n] = e.split("-"), r = []; return t && r.push(t), n && r.push(n), r; } const pp = (e) => { var t, n, r, a, o, i, s, u, l; const { invert: d, toast: c, unstyled: v, interacting: m, setHeights: h, visibleToasts: g, heights: f, index: y, toasts: w, expanded: E, removeToast: R, defaultRichColors: N, closeButton: C, style: k, cancelButtonStyle: S, actionButtonStyle: F, className: W = "", descriptionClassName: H = "", duration: U, position: L, gap: j, expandByDefault: z, classNames: M, icons: Z, closeButtonAriaLabel: J = "Close toast" } = e, [ee, q] = K.useState(null), [D, x] = K.useState(null), [_, O] = K.useState(!1), [P, I] = K.useState(!1), [V, Y] = K.useState(!1), [ae, ue] = K.useState(!1), [re, te] = K.useState(!1), [Ce, A] = K.useState(0), [X, de] = K.useState(0), ge = K.useRef(c.duration || U || Li), xe = K.useRef(null), le = K.useRef(null), fe = y === 0, ie = y + 1 <= g, se = c.type, Se = c.dismissible !== !1, Pe = c.className || "", Ie = c.descriptionClassName || "", _e = K.useMemo(() => f.findIndex((me) => me.toastId === c.id) || 0, [ f, c.id ]), De = K.useMemo(() => { var me; return (me = c.closeButton) != null ? me : C; }, [ c.closeButton, C ]), Ge = K.useMemo(() => c.duration || U || Li, [ c.duration, U ]), Ue = K.useRef(0), ve = K.useRef(0), Q = K.useRef(0), Le = K.useRef(null), [Me, ht] = L.split("-"), wt = K.useMemo(() => f.reduce((me, ze, We) => We >= _e ? me : me + ze.height, 0), [ f, _e ]), In = Qf(), gr = c.invert || d, Ln = se === "loading"; ve.current = K.useMemo(() => _e * j + wt, [ _e, wt ]), K.useEffect(() => { ge.current = Ge; }, [ Ge ]), K.useEffect(() => { O(!0); }, []), K.useEffect(() => { const me = le.current; if (me) { const ze = me.getBoundingClientRect().height; return de(ze), h((We) => [ { toastId: c.id, height: ze, position: c.position }, ...We ]), () => h((We) => We.filter((tt) => tt.toastId !== c.id)); } }, [ h, c.id ]), K.useLayoutEffect(() => { if (!_) return; const me = le.current, ze = me.style.height; me.style.height = "auto"; const We = me.getBoundingClientRect().height; me.style.height = ze, de(We), h((tt) => tt.find((Ke) => Ke.toastId === c.id) ? tt.map((Ke) => Ke.toastId === c.id ? { ...Ke, height: We } : Ke) : [ { toastId: c.id, height: We, position: c.position }, ...tt ]); }, [ _, c.title, c.description, h, c.id ]); const Ct = K.useCallback(() => { I(!0), A(ve.current), h((me) => me.filter((ze) => ze.toastId !== c.id)), setTimeout(() => { R(c); }, dp); }, [ c, R, h, ve ]); K.useEffect(() => { if (c.promise && se === "loading" || c.duration === 1 / 0 || c.type === "loading") return; let me; return E || m || In ? (() => { if (Q.current < Ue.current) { const tt = (/* @__PURE__ */ new Date()).getTime() - Ue.current; ge.current = ge.current - tt; } Q.current = (/* @__PURE__ */ new Date()).getTime(); })() : (() => { ge.current !== 1 / 0 && (Ue.current = (/* @__PURE__ */ new Date()).getTime(), me = setTimeout(() => { c.onAutoClose == null || c.onAutoClose.call(c, c), Ct(); }, ge.current)); })(), () => clearTimeout(me); }, [ E, m, c, se, In, Ct ]), K.useEffect(() => { c.delete && Ct(); }, [ Ct, c.delete ]); function zn() { var me; if (Z != null && Z.loading) { var ze; return /* @__PURE__ */ K.createElement("div", { className: _t(M == null ? void 0 : M.loader, c == null || (ze = c.classNames) == null ? void 0 : ze.loader, "sonner-loader"), "data-visible": se === "loading" }, Z.loading); } return /* @__PURE__ */ K.createElement(Gf, { className: _t(M == null ? void 0 : M.loader, c == null || (me = c.classNames) == null ? void 0 : me.loader), visible: se === "loading" }); } const Kn = c.icon || (Z == null ? void 0 : Z[se]) || Hf(se); var yr, Vt; return /* @__PURE__ */ K.createElement("li", { tabIndex: 0, ref: le, className: _t(W, Pe, M == null ? void 0 : M.toast, c == null || (t = c.classNames) == null ? void 0 : t.toast, M == null ? void 0 : M.default, M == null ? void 0 : M[se], c == null || (n = c.classNames) == null ? void 0 : n[se]), "data-sonner-toast": "", "data-rich-colors": (yr = c.richColors) != null ? yr : N, "data-styled": !(c.jsx || c.unstyled || v), "data-mounted": _, "data-promise": !!c.promise, "data-swiped": re, "data-removed": P, "data-visible": ie, "data-y-position": Me, "data-x-position": ht, "data-index": y, "data-front": fe, "data-swiping": V, "data-dismissible": Se, "data-type": se, "data-invert": gr, "data-swipe-out": ae, "data-swipe-direction": D, "data-expanded": !!(E || z && _), style: { "--index": y, "--toasts-before": y, "--z-index": w.length - y, "--offset": `${P ? Ce : ve.current}px`, "--initial-height": z ? "auto" : `${X}px`, ...k, ...c.style }, onDragEnd: () => { Y(!1), q(null), Le.current = null; }, onPointerDown: (me) => { Ln || !Se || (xe.current = /* @__PURE__ */ new Date(), A(ve.current), me.target.setPointerCapture(me.pointerId), me.target.tagName !== "BUTTON" && (Y(!0), Le.current = { x: me.clientX, y: me.clientY })); }, onPointerUp: () => { var me, ze, We; if (ae || !Se) return; Le.current = null; const tt = Number(((me = le.current) == null ? void 0 : me.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), zt = Number(((ze = le.current) == null ? void 0 : ze.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Ke = (/* @__PURE__ */ new Date()).getTime() - ((We = xe.current) == null ? void 0 : We.getTime()), Ye = ee === "x" ? tt : zt, Gt = Math.abs(Ye) / Ke; if (Math.abs(Ye) >= up || Gt > 0.11) { A(ve.current), c.onDismiss == null || c.onDismiss.call(c, c), x(ee === "x" ? tt > 0 ? "right" : "left" : zt > 0 ? "down" : "up"), Ct(), ue(!0); return; } else { var ft, nt; (ft = le.current) == null || ft.style.setProperty("--swipe-amount-x", "0px"), (nt = le.current) == null || nt.style.setProperty("--swipe-amount-y", "0px"); } te(!1), Y(!1), q(null); }, onPointerMove: (me) => { var ze, We, tt; if (!Le.current || !Se || ((ze = window.getSelection()) == null ? void 0 : ze.toString().length) > 0) return; const Ke = me.clientY - Le.current.y, Ye = me.clientX - Le.current.x; var Gt; const ft = (Gt = e.swipeDirections) != null ? Gt : fp(L); !ee && (Math.abs(Ye) > 1 || Math.abs(Ke) > 1) && q(Math.abs(Ye) > Math.abs(Ke) ? "x" : "y"); let nt = { x: 0, y: 0 }; const br = ($t) => 1 / (1.5 + Math.abs($t) / 20); if (ee === "y") { if (ft.includes("top") || ft.includes("bottom")) if (ft.includes("top") && Ke < 0 || ft.includes("bottom") && Ke > 0) nt.y = Ke; else { const $t = Ke * br(Ke); nt.y = Math.abs($t) < Math.abs(Ke) ? $t : Ke; } } else if (ee === "x" && (ft.includes("left") || ft.includes("right"))) if (ft.includes("left") && Ye < 0 || ft.includes("right") && Ye > 0) nt.x = Ye; else { const $t = Ye * br(Ye); nt.x = Math.abs($t) < Math.abs(Ye) ? $t : Ye; } (Math.abs(nt.x) > 0 || Math.abs(nt.y) > 0) && te(!0), (We = le.current) == null || We.style.setProperty("--swipe-amount-x", `${nt.x}px`), (tt = le.current) == null || tt.style.setProperty("--swipe-amount-y", `${nt.y}px`); } }, De && !c.jsx && se !== "loading" ? /* @__PURE__ */ K.createElement("button", { "aria-label": J, "data-disabled": Ln, "data-close-button": !0, onClick: Ln || !Se ? () => { } : () => { Ct(), c.onDismiss == null || c.onDismiss.call(c, c); }, className: _t(M == null ? void 0 : M.closeButton, c == null || (r = c.classNames) == null ? void 0 : r.closeButton) }, (Vt = Z == null ? void 0 : Z.close) != null ? Vt : Jf) : null, (se || c.icon || c.promise) && c.icon !== null && ((Z == null ? void 0 : Z[se]) !== null || c.icon) ? /* @__PURE__ */ K.createElement("div", { "data-icon": "", className: _t(M == null ? void 0 : M.icon, c == null || (a = c.classNames) == null ? void 0 : a.icon) }, c.promise || c.type === "loading" && !c.icon ? c.icon || zn() : null, c.type !== "loading" ? Kn : null) : null, /* @__PURE__ */ K.createElement("div", { "data-content": "", className: _t(M == null ? void 0 : M.content, c == null || (o = c.classNames) == null ? void 0 : o.content) }, /* @__PURE__ */ K.createElement("div", { "data-title": "", className: _t(M == null ? void 0 : M.title, c == null || (i = c.classNames) == null ? void 0 : i.title) }, c.jsx ? c.jsx : typeof c.title == "function" ? c.title() : c.title), c.description ? /* @__PURE__ */ K.createElement("div", { "data-description": "", className: _t(H, Ie, M == null ? void 0 : M.description, c == null || (s = c.classNames) == null ? void 0 : s.description) }, typeof c.description == "function" ? c.description() : c.description) : null), /* @__PURE__ */ K.isValidElement(c.cancel) ? c.cancel : c.cancel && Sr(c.cancel) ? /* @__PURE__ */ K.createElement("button", { "data-button": !0, "data-cancel": !0, style: c.cancelButtonStyle || S, onClick: (me) => { Sr(c.cancel) && Se && (c.cancel.onClick == null || c.cancel.onClick.call(c.cancel, me), Ct()); }, className: _t(M == null ? void 0 : M.cancelButton, c == null || (u = c.classNames) == null ? void 0 : u.cancelButton) }, c.cancel.label) : null, /* @__PURE__ */ K.isValidElement(c.action) ? c.action : c.action && Sr(c.action) ? /* @__PURE__ */ K.createElement("button", { "data-button": !0, "data-action": !0, style: c.actionButtonStyle || F, onClick: (me) => { Sr(c.action) && (c.action.onClick == null || c.action.onClick.call(c.action, me), !me.defaultPrevented && Ct()); }, className: _t(M == null ? void 0 : M.actionButton, c == null || (l = c.classNames) == null ? void 0 : l.actionButton) }, c.action.label) : null); }; function zi() { if (typeof window > "u" || typeof document > "u") return "ltr"; const e = document.documentElement.getAttribute("dir"); return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e; } function vp(e, t) { const n = {}; return [ e, t ].forEach((r, a) => { const o = a === 1, i = o ? "--mobile-offset" : "--offset", s = o ? sp : ip; function u(l) { [ "top", "right", "bottom", "left" ].forEach((d) => { n[`${i}-${d}`] = typeof l == "number" ? `${l}px` : l; }); } typeof r == "number" || typeof r == "string" ? u(r) : typeof r == "object" ? [ "top", "right", "bottom", "left" ].forEach((l) => { r[l] === void 0 ? n[`${i}-${l}`] = s : n[`${i}-${l}`] = typeof r[l] == "number" ? `${r[l]}px` : r[l]; }) : u(s); }), n; } const mp = /* @__PURE__ */ K.forwardRef(function(t, n) { const { invert: r, position: a = "bottom-right", hotkey: o = [ "altKey", "KeyT" ], expand: i, closeButton: s, className: u, offset: l, mobileOffset: d, theme: c = "light", richColors: v, duration: m, style: h, visibleToasts: g = op, toastOptions: f, dir: y = zi(), gap: w = cp, icons: E, containerAriaLabel: R = "Notifications" } = t, [N, C] = K.useState([]), k = K.useMemo(() => Array.from(new Set([ a ].concat(N.filter((D) => D.position).map((D) => D.position)))), [ N, a ]), [S, F] = K.useState([]), [W, H] = K.useState(!1), [U, L] = K.useState(!1), [j, z] = K.useState(c !== "system" ? c : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), M = K.useRef(null), Z = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), J = K.useRef(null), ee = K.useRef(!1), q = K.useCallback((D) => { C((x) => { var _; return (_ = x.find((O) => O.id === D.id)) != null && _.delete || at.dismiss(D.id), x.filter(({ id: O }) => O !== D.id); }); }, []); return K.useEffect(() => at.subscribe((D) => { if (D.dismiss) { requestAnimationFrame(() => { C((x) => x.map((_) => _.id === D.id ? { ..._, delete: !0 } : _)); }); return; } setTimeout(() => { eo.flushSync(() => { C((x) => { const _ = x.findIndex((O) => O.id === D.id); return _ !== -1 ? [ ...x.slice(0, _), { ...x[_], ...D }, ...x.slice(_ + 1) ] : [ D, ...x ]; }); }); }); }), [ N ]), K.useEffect(() => { if (c !== "system") { z(c); return; } if (c === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? z("dark") : z("light")), typeof window > "u") return; const D = window.matchMedia("(prefers-color-scheme: dark)"); try { D.addEventListener("change", ({ matches: x }) => { z(x ? "dark" : "light"); }); } catch { D.addListener(({ matches: _ }) => { try { z(_ ? "dark" : "light"); } catch (O) { console.error(O); } }); } }, [ c ]), K.useEffect(() => { N.length <= 1 && H(!1); }, [ N ]), K.useEffect(() => { const D = (x) => { var _; if (o.every((I) => x[I] || x.code === I)) { var P; H(!0), (P = M.current) == null || P.focus(); } x.code === "Escape" && (document.activeElement === M.current || (_ = M.current) != null && _.contains(document.activeElement)) && H(!1); }; return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D); }, [ o ]), K.useEffect(() => { if (M.current) return () => { J.current && (J.current.focus({ preventScroll: !0 }), J.current = null, ee.current = !1); }; }, [ M.current ]), // Remove item from normal navigation flow, only available via hotkey /* @__PURE__ */ K.createElement("section", { ref: n, "aria-label": `${R} ${Z}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, k.map((D, x) => { var _; const [O, P] = D.split("-"); return N.length ? /* @__PURE__ */ K.createElement("ol", { key: D, dir: y === "auto" ? zi() : y, tabIndex: -1, ref: M, className: u, "data-sonner-toaster": !0, "data-sonner-theme": j, "data-y-position": O, "data-lifted": W && N.length > 1 && !i, "data-x-position": P, style: { "--front-toast-height": `${((_ = S[0]) == null ? void 0 : _.height) || 0}px`, "--width": `${lp}px`, "--gap": `${w}px`, ...h, ...vp(l, d) }, onBlur: (I) => { ee.current && !I.currentTarget.contains(I.relatedTarget) && (ee.current = !1, J.current && (J.current.focus({ preventScroll: !0 }), J.current = null)); }, onFocus: (I) => { I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || ee.current || (ee.current = !0, J.current = I.relatedTarget); }, onMouseEnter: () => H(!0), onMouseMove: () => H(!0), onMouseLeave: () => { U || H(!1); }, onDragEnd: () => H(!1), onPointerDown: (I) => { I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || L(!0); }, onPointerUp: () => L(!1) }, N.filter((I) => !I.position && x === 0 || I.position === D).map((I, V) => { var Y, ae; return /* @__PURE__ */ K.createElement(pp, { key: I.id, icons: E, index: V, toast: I, defaultRichColors: v, duration: (Y = f == null ? void 0 : f.duration) != null ? Y : m, className: f == null ? void 0 : f.className, descriptionClassName: f == null ? void 0 : f.descriptionClassName, invert: r, visibleToasts: g, closeButton: (ae = f == null ? void 0 : f.closeButton) != null ? ae : s, interacting: U, position: D, style: f == null ? void 0 : f.style, unstyled: f == null ? void 0 : f.unstyled, classNames: f == null ? void 0 : f.classNames, cancelButtonStyle: f == null ? void 0 : f.cancelButtonStyle, actionButtonStyle: f == null ? void 0 : f.actionButtonStyle, closeButtonAriaLabel: f == null ? void 0 : f.closeButtonAriaLabel, removeToast: q, toasts: N.filter((ue) => ue.position == I.position), heights: S.filter((ue) => ue.position == I.position), setHeights: F, expandByDefault: i, gap: w, expanded: W, swipeDirections: t.swipeDirections }); })) : null; })); }), hp = ({ ...e }) => { const { theme: t = "system" } = Uf(); return /* @__PURE__ */ p( mp, { theme: t, className: "toaster group", style: { "--normal-bg": "var(--popover)", "--normal-text": "var(--popover-foreground)", "--normal-border": "var(--border)" }, ...e } ); }; function gp({ className: e, type: t, ...n }) { return /* @__PURE__ */ p( "input", { type: t, "data-slot": "input", className: T( "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", e ), ...n } ); } function yp({ className: e, children: t, ...n }) { return /* @__PURE__ */ G( Yn.Root, { "data-slot": "scroll-area", className: T("relative", e), ...n, children: [ /* @__PURE__ */ p( Yn.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: t } ), /* @__PURE__ */ p(bp, {}), /* @__PURE__ */ p(Yn.Corner, {}) ] } ); } function bp({ className: e, orientation: t = "vertical", ...n }) { return /* @__PURE__ */ p( Yn.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: t, className: T( "flex touch-none p-px transition-colors select-none", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e ), ...n, children: /* @__PURE__ */ p( Yn.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" } ) } ); } function SO({ className: e, ...t }) { return /* @__PURE__ */ p( Jr.Root, { "data-slot": "tabs", className: T("flex flex-col gap-2", e), ...t } ); } function EO({ className: e, ...t }) { return /* @__PURE__ */ p( Jr.List, { "data-slot": "tabs-list", className: T( "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", e ), ...t } ); } function NO({ className: e, ...t }) { return /* @__PURE__ */ p( Jr.Trigger, { "data-slot": "tabs-trigger", className: T( "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-