UNPKG

lightswind

Version:

A professionally designed component library & templates market that brings together functionality, accessibility, and beautiful aesthetics for modern applications.

7 lines 140 kB
import*as X from"react";import{ChevronDown as Br}from"lucide-react";import{clsx as kr}from"clsx";import{twMerge as Ir}from"tailwind-merge";function a(...t){return Ir(kr(t))}function Cl(t,e="USD",n){return new Intl.NumberFormat("en-US",{style:"currency",currency:e,...n}).format(t)}function Ml(t="id"){return`${t}-${Math.random().toString(36).substring(2,9)}`}function El(t,e){return t.length<=e?t:t.substring(0,e)+"..."}function Ll(t,e){return new Intl.DateTimeFormat("en-US",{day:"numeric",month:"short",year:"numeric",...e}).format(t)}function Nl(t,e){let n=null;return function(...r){let o=()=>{n=null,t(...r)};n!==null&&clearTimeout(n),n=setTimeout(o,e)}}function Pl(t,e){let n=!1;return function(...r){n||(t(...r),n=!0,setTimeout(()=>{n=!1},e))}}import{jsx as Ve,jsxs as Vr}from"react/jsx-runtime";var _t=X.createContext(void 0),Ft=X.createContext(void 0),Or=X.forwardRef(({className:t,type:e="multiple",value:n,defaultValue:r=[],onValueChange:o,children:i,...s},l)=>{let[u,c]=X.useState(Array.isArray(n)?n:n?[n]:Array.isArray(r)?r:r?[r]:[]);X.useEffect(()=>{n!==void 0&&c(Array.isArray(n)?n:n?[n]:[])},[n]);let d=X.useCallback(m=>{n===void 0&&c(m),o?.(m)},[o,n]);return Ve(_t.Provider,{value:{value:u,onValueChange:d},children:Ve("div",{ref:l,className:a(t),...s,children:i})})});Or.displayName="Accordion";var _r=X.forwardRef(({className:t,value:e,disabled:n=!1,children:r,...o},i)=>Ve(Ft.Provider,{value:{value:e},children:Ve("div",{ref:i,className:a("border-b",t),"data-state":n?"disabled":void 0,"data-value":e,...o,children:r})}));_r.displayName="AccordionItem";var Fr=X.forwardRef(({className:t,children:e,...n},r)=>{let o=X.useContext(_t);if(!o)throw new Error("AccordionTrigger must be used within an Accordion");let i=X.useContext(Ft);if(!i)throw new Error("AccordionTrigger must be used within an AccordionItem");let{value:s,onValueChange:l}=o,{value:u}=i,c=s.includes(u),d=()=>{let m=c?s.filter(p=>p!==u):[...s,u];l(m)};return Vr("button",{ref:r,type:"button",className:a("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),onClick:d,"data-state":c?"open":"closed",...n,children:[e,Ve(Br,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})});Fr.displayName="AccordionTrigger";var zr=X.forwardRef(({className:t,children:e,...n},r)=>{let o=X.useContext(_t);if(!o)throw new Error("AccordionContent must be used within an Accordion");let i=X.useContext(Ft);if(!i)throw new Error("AccordionContent must be used within an AccordionItem");let{value:s}=o,{value:l}=i,u=s.includes(l);return Ve("div",{ref:r,className:a("overflow-hidden text-sm transition-all",u?"animate-accordion-down":"animate-accordion-up h-0",t),"data-state":u?"open":"closed",...n,children:Ve("div",{className:a("pb-4 pt-0"),children:e})})});zr.displayName="AccordionContent";import*as Rt from"react";import{AlertCircle as Gr,CheckCircle as Ur,Info as bn,X as $r,AlertTriangle as Xr}from"lucide-react";import{jsx as ye,jsxs as Kr}from"react/jsx-runtime";var vn={variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-green-500/50 text-green-700 dark:text-green-500 [&>svg]:text-green-500",warning:"border-yellow-500/50 text-yellow-700 dark:text-yellow-500 [&>svg]:text-yellow-500",info:"border-blue-500/50 text-blue-700 dark:text-blue-500 [&>svg]:text-blue-500"},size:{default:"p-4",sm:"p-3 text-sm",lg:"p-6 text-base"}},Yr=Rt.forwardRef(({className:t,variant:e="default",size:n="default",dismissible:r=!1,onDismiss:o,withIcon:i=!1,icon:s,children:l,...u},c)=>{let d={default:ye(bn,{className:"h-4 w-4"}),destructive:ye(Gr,{className:"h-4 w-4"}),success:ye(Ur,{className:"h-4 w-4"}),warning:ye(Xr,{className:"h-4 w-4"}),info:ye(bn,{className:"h-4 w-4"})},m=()=>{o&&o()};return Kr("div",{ref:c,role:"alert",className:a("relative w-full rounded-lg border",i&&"[&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",i&&"[&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px]",vn.variant[e],vn.size[n],t),...u,children:[i&&(s||d[e]),l,r&&ye("button",{className:"absolute top-4 right-4 rounded-full p-1 text-foreground/70 opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onClick:m,"aria-label":"Dismiss alert",children:ye($r,{className:"h-4 w-4"})})]})});Yr.displayName="Alert";var Wr=Rt.forwardRef(({className:t,size:e="default",...n},r)=>ye("h5",{ref:r,className:a("mb-1 font-medium leading-none tracking-tight",{sm:"text-sm",default:"text-base",lg:"text-lg"}[e],t),...n}));Wr.displayName="AlertTitle";var jr=Rt.forwardRef(({className:t,intensity:e="default",...n},r)=>ye("div",{ref:r,className:a("text-sm [&_p]:leading-relaxed",e==="muted"?"text-muted-foreground":"",t),...n}));jr.displayName="AlertDescription";import*as I from"react";import*as De from"react";import{jsx as zt}from"react/jsx-runtime";var hn={variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",github:"bg-white text-black hover:bg-gray-100 border border-gray-200 flex items-center gap-2 font-medium"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}};function re(t={}){let{variant:e="default",size:n="default",className:r}=t;return a("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",hn.variant[e],hn.size[n],r)}var Tt=De.forwardRef(({className:t,variant:e="default",size:n="default",asChild:r=!1,...o},i)=>r?zt(De.Fragment,{children:De.Children.map(o.children,s=>De.isValidElement(s)?zt("span",{className:re({variant:e,size:n,className:t}),children:s}):s)}):zt("button",{className:re({variant:e,size:n,className:t}),ref:i,...o}));Tt.displayName="Button";import{Fragment as Rn,jsx as se,jsxs as ao}from"react/jsx-runtime";var je=I.createContext(void 0),$l=({children:t,defaultOpen:e=!1,open:n,onOpenChange:r})=>{let[o,i]=I.useState(e),s=n!==void 0,l=s?n:o,u=I.useCallback(c=>{if(s||i(c),r){let d=typeof c=="function"?c(l):c;r(d)}},[s,r,l]);return se(je.Provider,{value:{open:l,setOpen:u},children:t})},qr=I.forwardRef(({children:t,asChild:e=!1,...n},r)=>{let o=I.useContext(je);if(!o)throw new Error("AlertDialogTrigger must be used within an AlertDialog");let{setOpen:i}=o,s=c=>{i(!0),n.onClick&&n.onClick(c)},{onClick:l,...u}=n;return e?se(Rn,{children:I.Children.map(t,c=>I.isValidElement(c)?I.cloneElement(c,{...c.props,ref:r,onClick:s}):c)}):se("button",{ref:r,type:"button",onClick:s,...u,children:t})});qr.displayName="AlertDialogTrigger";var Jr=({children:t})=>se(Rn,{children:t}),xn=I.forwardRef(({className:t,...e},n)=>{let r=I.useContext(je);if(!r)throw new Error("AlertDialogOverlay must be used within an AlertDialog");let{open:o}=r;return o?se("div",{ref:n,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}):null});xn.displayName="AlertDialogOverlay";var Zr=I.forwardRef(({className:t,children:e,...n},r)=>{let o=I.useContext(je);if(!o)throw new Error("AlertDialogContent must be used within an AlertDialog");let{open:i}=o;return i?ao(Jr,{children:[se(xn,{}),se("div",{ref:r,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...n,children:e})]}):null});Zr.displayName="AlertDialogContent";var Qr=({className:t,...e})=>se("div",{className:a("flex flex-col space-y-2 text-center sm:text-left",t),...e});Qr.displayName="AlertDialogHeader";var eo=({className:t,...e})=>se("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});eo.displayName="AlertDialogFooter";var to=I.forwardRef(({className:t,...e},n)=>se("h2",{ref:n,className:a("text-lg font-semibold",t),...e}));to.displayName="AlertDialogTitle";var no=I.forwardRef(({className:t,...e},n)=>se("p",{ref:n,className:a("text-sm text-muted-foreground",t),...e}));no.displayName="AlertDialogDescription";var ro=I.forwardRef(({className:t,...e},n)=>{let r=I.useContext(je);if(!r)throw new Error("AlertDialogAction must be used within an AlertDialog");let{setOpen:o}=r,i=u=>{o(!1),e.onClick&&e.onClick(u)},{onClick:s,...l}=e;return se("button",{ref:n,className:a(re(),t),onClick:i,...l})});ro.displayName="AlertDialogAction";var oo=I.forwardRef(({className:t,...e},n)=>{let r=I.useContext(je);if(!r)throw new Error("AlertDialogCancel must be used within an AlertDialog");let{setOpen:o}=r,i=u=>{o(!1),e.onClick&&e.onClick(u)},{onClick:s,...l}=e;return se("button",{ref:n,className:a(re({variant:"outline"}),"mt-2 sm:mt-0",t),onClick:i,...l})});oo.displayName="AlertDialogCancel";import Tn from"react";import{motion as yn}from"framer-motion";import{jsx as wn,jsxs as io}from"react/jsx-runtime";var ql=({className:t,style:e,blurAmount:n="4vw",firstBlobColors:r=["hotpink","red","orange","yellow","hotpink"],secondBlobColors:o=["cyan","blue","green","purple","cyan"],blobPath:i="polygon(50.9% 37.2%, 43.5% 34.7%, 33.6% 26.1%, 39.2% 10.8%, 26.2% 0.0%, 4.8% 6.4%, 0.0% 30.4%, 20.7% 37.2%, 33.4% 26.3%, 43.2% 34.9%, 45.0% 35.6%, 43.6% 46.4%, 37.8% 59.5%, 21.8% 63.2%, 11.7% 76.1%, 22.9% 91.3%, 47.4% 91.3%, 54.0% 79.0%, 38.0% 59.6%, 43.9% 46.4%, 45.2% 35.5%, 50.9% 37.6%, 56.1% 36.8%, 59.8% 47.6%, 70.3% 61.9%, 87.7% 56.0%, 96.4% 37.4%, 88.6% 15.1%, 63.7% 16.7%, 55.2% 33.6%, 55.9% 36.6%, 50.9% 37.2%)",firstBlobSpeed:s=8e3,secondBlobSpeed:l=6e3,firstBlobOpacity:u=.66,secondBlobOpacity:c=.5,firstBlobRotation:d=0,secondBlobRotation:m=180,isAnimating:p=!0,interactive:g=!1,zIndex:f=-1,blobCount:b=2,children:h,interactiveIntensity:v=5})=>{let x=M=>`linear-gradient(${M.join(", ")})`,T=v*10,[y,C]=Tn.useState({x:0,y:0});return Tn.useEffect(()=>{if(!g)return;let M=w=>{let{clientX:R,clientY:E}=w,{innerWidth:L,innerHeight:J}=window,He=R/L*2-1,O=E/J*2-1;C({x:He,y:O})};return window.addEventListener("mousemove",M),()=>{window.removeEventListener("mousemove",M)}},[g]),io("div",{className:a("absolute inset-0 grid overflow-hidden",t),style:{filter:`blur(${n})`,zIndex:f,...e},children:[wn(yn.div,{className:"shape absolute inset-0 mx-auto",style:{clipPath:i,background:x(r),opacity:u,transform:`rotate(${d}deg)`},animate:p?{rotate:360+d}:{rotate:d},transition:{duration:s/1e3,ease:"linear",repeat:1/0},...g&&{animate:{x:y.x*T,y:y.y*T,rotate:p?360+d:d},transition:{x:{duration:.3,ease:"easeOut"},y:{duration:.3,ease:"easeOut"},rotate:{duration:s/1e3,ease:"linear",repeat:1/0}}}}),b===2&&wn(yn.div,{className:"shape absolute inset-0 mx-auto",style:{clipPath:i,background:x(o),opacity:c,transform:`rotate(${m}deg)`},animate:p?{rotate:360+m}:{rotate:m},transition:{duration:l/1e3,ease:"linear",repeat:1/0},...g&&{animate:{x:-y.x*T*.7,y:-y.y*T*.7,rotate:p?360+m:m},transition:{x:{duration:.3,ease:"easeOut"},y:{duration:.3,ease:"easeOut"},rotate:{duration:l/1e3,ease:"linear",repeat:1/0}}}}),h]})};import*as Mn from"react";import{jsx as Cn}from"react/jsx-runtime";var so=Mn.forwardRef(({className:t,ratio:e,preset:n,rounded:r=!1,bordered:o=!1,objectFit:i,style:s,...l},u)=>{let d=e||(n?{square:1,video:1.7777777777777777,portrait:.75,widescreen:1.7777777777777777,ultrawide:2.3333333333333335,golden:1.618}[n]:1);return Cn("div",{ref:u,style:{position:"relative",width:"100%",paddingBottom:`${1/d*100}%`,...s},className:a("overflow-hidden",r&&"rounded-md",o&&"border border-border",t),...l,children:l.children&&Cn("div",{className:a("absolute inset-0 h-full w-full",i&&`[&>img]:object-${i} [&>video]:object-${i}`),children:l.children})})});so.displayName="AspectRatio";import{jsx as Ke,jsxs as En}from"react/jsx-runtime";function rc({text:t,className:e,textClassName:n,fontSize:r="clamp(3rem, 8vw, 7rem)",colors:o={first:"bg-cyan-400",second:"bg-yellow-400",third:"bg-green-400",fourth:"bg-purple-500"},blurAmount:i="blur-lg",animationSpeed:s={border:6,first:5,second:5,third:3,fourth:13}}){return Ke("div",{className:a("bg-black flex items-center justify-center overflow-hidden text-white font-sans",e),children:Ke("div",{className:"text-center",children:En("h1",{className:a("font-extrabold tracking-tight relative overflow-hidden",n),style:{fontSize:r},children:[t,En("div",{className:"absolute inset-0 z-10 mix-blend-darken pointer-events-none",children:[Ke("div",{className:a("absolute w-[60vw] h-[60vw] rounded-[37%_29%_27%_27%/28%_25%_41%_37%] filter mix-blend-overlay",o.first||"bg-cyan-400",i),style:{animationName:"aurora-border, aurora-1",animationDuration:`${s.border}s, ${s.first}s`,animationTimingFunction:"ease-in-out, ease-in-out",animationIterationCount:"infinite, infinite",animationDirection:"normal, alternate"}}),Ke("div",{className:a("absolute w-[60vw] h-[60vw] rounded-[37%_29%_27%_27%/28%_25%_41%_37%] filter mix-blend-overlay",o.second,i),style:{animationName:"aurora-border, aurora-2",animationDuration:`${s.border}s, ${s.second}s`,animationTimingFunction:"ease-in-out, ease-in-out",animationIterationCount:"infinite, infinite",animationDirection:"normal, alternate"}}),Ke("div",{className:a("absolute w-[60vw] h-[60vw] rounded-[37%_29%_27%_27%/28%_25%_41%_37%] filter mix-blend-overlay",o.third,i),style:{animationName:"aurora-border, aurora-3",animationDuration:`${s.border}s, ${s.third}s`,animationTimingFunction:"ease-in-out, ease-in-out",animationIterationCount:"infinite, infinite",animationDirection:"normal, alternate"}}),Ke("div",{className:a("absolute w-[60vw] h-[60vw] rounded-[37%_29%_27%_27%/28%_25%_41%_37%] filter mix-blend-overlay",o.fourth,i),style:{animationName:"aurora-border, aurora-4",animationDuration:`${s.border}s, ${s.fourth}s`,animationTimingFunction:"ease-in-out, ease-in-out",animationIterationCount:"infinite, infinite",animationDirection:"normal, alternate"}})]})]})})})}import*as Ge from"react";import{jsx as Vt}from"react/jsx-runtime";var lo=`https://robohash.org/${Math.random().toString(36).substring(7)}.png`,co=Ge.forwardRef(({className:t,src:e,alt:n,fallback:r,status:o,...i},s)=>Vt("div",{ref:s,className:a("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full","transition-all duration-300 ease-in-out hover:scale-105",t),...i}));co.displayName="Avatar";var uo=Ge.forwardRef(({className:t,src:e,alt:n,onError:r,onLoad:o,...i},s)=>{let[l,u]=Ge.useState(!1),[c,d]=Ge.useState(!1),m=e&&!c?e:lo,p=f=>{console.log("AvatarImage error occurred, using fallback"),d(!0),r&&r(f)},g=f=>{u(!0),o&&o(f)};return Vt("img",{ref:s,src:m,alt:n||"Avatar",className:a("aspect-square h-full w-full object-cover","transition-opacity duration-300 ease-in-out",l?"opacity-100":"opacity-0",t),onError:p,onLoad:g,...i})});uo.displayName="AvatarImage";var mo=Ge.forwardRef(({className:t,...e},n)=>Vt("div",{ref:n,className:a("flex h-full w-full items-center justify-center rounded-full bg-muted","animate-in fade-in-0 zoom-in-0 duration-300",t),...e}));mo.displayName="AvatarFallback";import{cva as fo}from"class-variance-authority";import{jsx as go,jsxs as bo}from"react/jsx-runtime";var po=fo("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground",success:"border-transparent bg-green-500 text-white",warning:"border-transparent bg-amber-500 text-white",info:"border-transparent bg-blue-500 text-white"},size:{default:"px-2.5 py-0.5 text-xs",sm:"px-2 py-0.5 text-xs",lg:"px-3 py-1 text-sm"},shape:{default:"rounded-full",square:"rounded-sm",rounded:"rounded-md"}},defaultVariants:{variant:"default",size:"default",shape:"default"}});function dc({className:t,variant:e,size:n,shape:r,withDot:o,dotColor:i="currentColor",interactive:s,highlighted:l,...u}){return bo("div",{className:a(po({variant:e,size:n,shape:r}),s&&"cursor-pointer hover:opacity-80",l&&"ring-2 ring-offset-2 ring-ring",t),...u,children:[o&&go("span",{className:"mr-1 h-1.5 w-1.5 rounded-full inline-block",style:{backgroundColor:i}}),u.children]})}import{motion as vo}from"framer-motion";import{jsx as Ln}from"react/jsx-runtime";var bc=({className:t,size:e=50,delay:n=0,duration:r=6,colorFrom:o="#7400ff",colorTo:i="#9b41ff",transition:s,style:l,reverse:u=!1,initialOffset:c=0,borderThickness:d=1,opacity:m=1,glowIntensity:p=0,beamBorderRadius:g,pauseOnHover:f=!1,speedMultiplier:b=1})=>{let h=b?r/b:r,v=p>0?`0 0 ${p*5}px ${p*2}px var(--color-from)`:void 0;return Ln("div",{className:a("pointer-events-none absolute inset-0 rounded-[inherit]","border border-transparent","[mask-clip:padding-box,border-box]","[mask-composite:intersect]","[mask-image:linear-gradient(transparent,transparent),linear-gradient(#000,#000)]"),style:{borderWidth:`${d}px`},children:Ln(vo.div,{className:a("absolute aspect-square","bg-gradient-to-l from-[var(--color-from)] via-[var(--color-to)] to-transparent",f&&"group-hover:animation-play-state-paused",t),style:{width:e,offsetPath:`rect(0 auto auto 0 round ${g??e}px)`,"--color-from":o,"--color-to":i,opacity:m,boxShadow:v,borderRadius:g?`${g}px`:void 0,...l},initial:{offsetDistance:`${c}%`},animate:{offsetDistance:u?[`${100-c}%`,`${-c}%`]:[`${c}%`,`${100+c}%`]},transition:{repeat:1/0,ease:"linear",duration:h,delay:-n,...s}})})};import*as qe from"react";import{ChevronRight as ho,MoreHorizontal as xo}from"lucide-react";import{jsx as we,jsxs as Lo}from"react/jsx-runtime";var Ro=qe.forwardRef(({...t},e)=>we("nav",{ref:e,"aria-label":"breadcrumb",...t}));Ro.displayName="Breadcrumb";var To=qe.forwardRef(({className:t,...e},n)=>we("ol",{ref:n,className:a("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));To.displayName="BreadcrumbList";var yo=qe.forwardRef(({className:t,...e},n)=>we("li",{ref:n,className:a("inline-flex items-center gap-1.5",t),...e}));yo.displayName="BreadcrumbItem";var wo=qe.forwardRef(({asChild:t,className:e,...n},r)=>t?n.children:we("a",{ref:r,className:a("transition-colors hover:text-foreground",e),...n}));wo.displayName="BreadcrumbLink";var Co=qe.forwardRef(({className:t,...e},n)=>we("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:a("font-normal text-foreground",t),...e}));Co.displayName="BreadcrumbPage";var Mo=({children:t,className:e,...n})=>we("li",{role:"presentation","aria-hidden":"true",className:a("[&>svg]:size-3.5",e),...n,children:t??we(ho,{})});Mo.displayName="BreadcrumbSeparator";var Eo=({className:t,...e})=>Lo("span",{role:"presentation","aria-hidden":"true",className:a("flex h-9 w-9 items-center justify-center",t),...e,children:[we(xo,{className:"h-4 w-4"}),we("span",{className:"sr-only",children:"More"})]});Eo.displayName="BreadcrumbEllipsis";import*as Je from"react";import{ChevronLeft as Pn,ChevronRight as Ut,ChevronsLeft as Po,ChevronsRight as So}from"lucide-react";import{DayPicker as Ho}from"react-day-picker";import{addYears as Do,subYears as Ao}from"date-fns";import*as Y from"react";import{Fragment as Nn,jsx as ct,jsxs as No}from"react/jsx-runtime";var Gt=Y.createContext(void 0),yt=({children:t,defaultOpen:e=!1,open:n,onOpenChange:r})=>{let[o,i]=Y.useState(e),s=n!==void 0,l=s?n:o,u=Y.useCallback(c=>{if(s||i(c),r){let d=typeof c=="function"?c(l):c;r(d)}},[s,r,l]);return Y.useEffect(()=>{if(!l)return;let c=d=>{let m=document.querySelectorAll("[data-popover-content]"),p=!1;m.forEach(g=>{g.contains(d.target)&&(p=!0)}),p||u(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[l,u]),ct(Gt.Provider,{value:{open:l,setOpen:u},children:t})},wt=({onClick:t,asChild:e,children:n})=>{let r=Y.useContext(Gt);if(!r)throw new Error("PopoverTrigger must be used within a Popover");let{open:o,setOpen:i}=r,s=l=>{i(!o),t?.(l)};return e?ct(Nn,{children:Y.Children.map(n,l=>{if(Y.isValidElement(l)){let u={...l.props,onClick:c=>{s(c),l.props.onClick&&l.props.onClick(c)}};return Y.cloneElement(l,u)}return l})}):ct("button",{type:"button",onClick:s,"aria-expanded":o,children:n})},ut=Y.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},o)=>{let i=Y.useContext(Gt);if(!i)throw new Error("PopoverContent must be used within a Popover");let{open:s}=i;return s?No(Nn,{children:[ct("div",{className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-sm transition-opacity",style:{opacity:s?1:0}}),ct("div",{ref:o,"data-popover-content":!0,className:a("fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-auto max-w-[90vw] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...r})]}):null});ut.displayName="PopoverContent";import{jsx as A,jsxs as Ae}from"react/jsx-runtime";function ko({className:t,classNames:e,showOutsideDays:n=!0,shadow:r=!1,quickNav:o=!1,yearSelector:i=!1,animateMonths:s=!0,transitionDuration:l=300,...u}){let[c,d]=Je.useState(u.defaultMonth?.getFullYear()||u.month?.getFullYear()||new Date().getFullYear()),[m,p]=Je.useState(!1),[g,f]=Je.useState(!1),b=Je.useMemo(()=>{let R=new Date().getFullYear();return Array.from({length:21},(E,L)=>R-10+L)},[]),h=["January","February","March","April","May","June","July","August","September","October","November","December"],v=u.month||u.defaultMonth||new Date,x=v.getMonth(),T=v.getFullYear(),y=R=>{let E=parseInt(R,10);d(E);let L=new Date(v);L.setFullYear(E),u.onMonthChange&&u.onMonthChange(L),p(!1)},C=R=>{let E=parseInt(R,10),L=new Date(v);L.setMonth(E),u.onMonthChange&&u.onMonthChange(L),f(!1)},M=R=>{let E=typeof R.value=="number"?R.value:0;return Ae(yt,{open:g,onOpenChange:f,children:[A(wt,{asChild:!0,children:Ae("button",{className:"flex items-center gap-1 px-2 py-1 text-sm font-medium rounded-md hover:bg-accent","aria-label":"Select month",children:[A("span",{className:"font-medium",children:h[E]}),A(Ut,{className:"h-4 w-4 ml-1 opacity-50"})]})}),A(ut,{className:"w-[200px] p-0",align:"center",children:A("div",{className:"grid grid-cols-2 gap-1 p-2",children:h.map((L,J)=>A("button",{onClick:()=>{let He={target:{value:J},currentTarget:{value:J},preventDefault:()=>{},stopPropagation:()=>{}};R.onChange&&R.onChange(He),f(!1)},className:a("text-sm px-3 py-1.5 rounded-md text-left",E===J?"bg-primary text-primary-foreground":"hover:bg-accent"),children:L},L))})})]})},w=()=>Ae("div",{className:"flex justify-center items-center mb-2 mt-1 relative",children:[Ae("div",{className:"absolute left-0 flex justify-start space-x-1",children:[A("button",{onClick:()=>{let R=Ao(v,1);u.onMonthChange&&u.onMonthChange(R)},className:a(re({variant:"ghost",size:"icon"}),"h-7 w-7"),"aria-label":"Previous year",children:A(Po,{className:"h-4 w-4"})}),A("button",{onClick:()=>{let R=new Date(v);R.setMonth(v.getMonth()-1),u.onMonthChange&&u.onMonthChange(R)},className:a(re({variant:"ghost",size:"icon"}),"h-7 w-7"),"aria-label":"Previous month",children:A(Pn,{className:"h-4 w-4"})})]}),Ae("div",{className:"flex items-center gap-1 cursor-pointer",children:[Ae(yt,{open:g,onOpenChange:f,children:[A(wt,{asChild:!0,children:A("button",{className:"text-sm font-medium hover:bg-accent px-2 py-1 rounded-md transition-colors",children:h[x]})}),A(ut,{className:"w-[220px] p-0",align:"center",children:A("div",{className:"grid grid-cols-3 gap-1 p-2",children:h.map((R,E)=>A("button",{onClick:()=>{let L=new Date(v);L.setMonth(E),u.onMonthChange&&u.onMonthChange(L),f(!1)},className:a("text-sm px-3 py-1.5 rounded-md text-center",x===E?"bg-primary text-primary-foreground":"hover:bg-accent"),children:R},R))})})]}),Ae(yt,{open:m,onOpenChange:p,children:[A(wt,{asChild:!0,children:A("button",{className:"text-sm font-medium hover:bg-accent px-2 py-1 rounded-md transition-colors",children:T})}),A(ut,{className:"w-[220px] p-0",align:"center",children:A("div",{className:"grid grid-cols-3 gap-1 p-2 max-h-[220px] overflow-y-auto",children:b.map(R=>A("button",{onClick:()=>y(R.toString()),className:a("text-sm px-3 py-1.5 rounded-md text-center",T===R?"bg-primary text-primary-foreground":"hover:bg-accent"),children:R},R))})})]})]}),Ae("div",{className:"absolute right-0 flex justify-end space-x-1",children:[A("button",{onClick:()=>{let R=new Date(v);R.setMonth(v.getMonth()+1),u.onMonthChange&&u.onMonthChange(R)},className:a(re({variant:"ghost",size:"icon"}),"h-7 w-7"),"aria-label":"Next month",children:A(Ut,{className:"h-4 w-4"})}),A("button",{onClick:()=>{let R=Do(v,1);u.onMonthChange&&u.onMonthChange(R)},className:a(re({variant:"ghost",size:"icon"}),"h-7 w-7"),"aria-label":"Next year",children:A(So,{className:"h-4 w-4"})})]})]});return A(Ho,{showOutsideDays:n,className:a("p-3",s&&"rdp-transitions",r&&"shadow-lg rounded-lg border",t),classNames:{months:a("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",s&&"transition-all duration-300 ease-in-out"),month:"space-y-4",caption:"flex justify-center pt-1 relative items-center gap-1",caption_label:i?"text-sm font-medium hidden":"text-sm font-medium",caption_dropdowns:"flex justify-center gap-1 grow dropdowns",nav:"space-x-1 flex items-center",nav_button:a(re({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 transition-opacity"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:a("h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",s&&"transition-all duration-200 ease-in-out"),day:a(re({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100 transition-all duration-200 ease-in-out"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground transition-all duration-200 ease-in-out",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:({...R})=>A(Pn,{className:"h-4 w-4",...R}),IconRight:({...R})=>A(Ut,{className:"h-4 w-4",...R}),Dropdown:o?M:void 0,Caption:i?w:void 0},...u,style:s?{"--rdp-transitions-duration":`${l}ms`}:void 0})}ko.displayName="Calendar";import*as Ue from"react";import{jsx as Ze}from"react/jsx-runtime";var Io=Ue.forwardRef(({className:t,hoverable:e=!1,bordered:n=!1,compact:r=!1,...o},i)=>Ze("div",{ref:i,className:a("rounded-lg bg-card text-card-foreground shadow-sm",n?"border":"border border-transparent",e?"transition-shadow duration-200 hover:shadow-md":"",r?"p-3":"p-0",t),...o}));Io.displayName="Card";var Bo=Ue.forwardRef(({className:t,spacing:e="default",...n},r)=>Ze("div",{ref:r,className:a({compact:"flex flex-col space-y-1 p-4",default:"flex flex-col space-y-1.5 p-6",relaxed:"flex flex-col space-y-2 p-8"}[e],t),...n}));Bo.displayName="CardHeader";var Oo=Ue.forwardRef(({className:t,as:e="h3",size:n="default",...r},o)=>Ze(e,{ref:o,className:a("font-semibold leading-none tracking-tight",{sm:"text-lg",default:"text-2xl",lg:"text-3xl"}[n],t),...r}));Oo.displayName="CardTitle";var _o=Ue.forwardRef(({className:t,size:e="default",...n},r)=>Ze("p",{ref:r,className:a("text-muted-foreground",{xs:"text-xs",sm:"text-sm",default:"text-sm"}[e],t),...n}));_o.displayName="CardDescription";var Fo=Ue.forwardRef(({className:t,removeTopPadding:e=!0,padding:n="default",...r},o)=>Ze("div",{ref:o,className:a({none:"p-0",sm:"px-4 py-3",default:"p-6",lg:"p-8"}[n],e&&n!=="none"?"pt-0":"",t),...r}));Fo.displayName="CardContent";var zo=Ue.forwardRef(({className:t,align:e="center",direction:n="row",...r},o)=>{let i={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around"},s={row:"flex-row",column:"flex-col"};return Ze("div",{ref:o,className:a("flex items-center p-6 pt-0",i[e],s[n],t),...r})});zo.displayName="CardFooter";import*as G from"react";import Vo from"embla-carousel-react";import{ArrowLeft as Go,ArrowRight as Uo}from"lucide-react";import{jsx as Ce,jsxs as Hn}from"react/jsx-runtime";var Sn=G.createContext(null);function Ct(){let t=G.useContext(Sn);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}var $o=G.forwardRef(({orientation:t="horizontal",opts:e,setApi:n,plugins:r,className:o,children:i,...s},l)=>{let[u,c]=Vo({...e,axis:t==="horizontal"?"x":"y"},r),[d,m]=G.useState(!1),[p,g]=G.useState(!1),f=G.useCallback(x=>{x&&(m(x.canScrollPrev()),g(x.canScrollNext()))},[]),b=G.useCallback(()=>{c?.scrollPrev()},[c]),h=G.useCallback(()=>{c?.scrollNext()},[c]),v=G.useCallback(x=>{x.key==="ArrowLeft"?(x.preventDefault(),b()):x.key==="ArrowRight"&&(x.preventDefault(),h())},[b,h]);return G.useEffect(()=>{!c||!n||n(c)},[c,n]),G.useEffect(()=>{if(c)return f(c),c.on("reInit",f),c.on("select",f),()=>{c?.off("select",f)}},[c,f]),Ce(Sn.Provider,{value:{carouselRef:u,api:c,opts:e,orientation:t||(e?.axis==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:h,canScrollPrev:d,canScrollNext:p},children:Ce("div",{ref:l,onKeyDownCapture:v,className:a("relative",o),role:"region","aria-roledescription":"carousel",...s,children:i})})});$o.displayName="Carousel";var Xo=G.forwardRef(({className:t,...e},n)=>{let{carouselRef:r,orientation:o}=Ct();return Ce("div",{ref:r,className:"overflow-hidden",children:Ce("div",{ref:n,className:a("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...e})})});Xo.displayName="CarouselContent";var Yo=G.forwardRef(({className:t,...e},n)=>{let{orientation:r}=Ct();return Ce("div",{ref:n,role:"group","aria-roledescription":"slide",className:a("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",t),...e})});Yo.displayName="CarouselItem";var Wo=G.forwardRef(({className:t,variant:e="outline",size:n="icon",...r},o)=>{let{orientation:i,scrollPrev:s,canScrollPrev:l}=Ct();return Hn(Tt,{ref:o,variant:e,size:n,className:a("absolute h-8 w-8 rounded-full",i==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!l,onClick:s,...r,children:[Ce(Go,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});Wo.displayName="CarouselPrevious";var jo=G.forwardRef(({className:t,variant:e="outline",size:n="icon",...r},o)=>{let{orientation:i,scrollNext:s,canScrollNext:l}=Ct();return Hn(Tt,{ref:o,variant:e,size:n,className:a("absolute h-8 w-8 rounded-full",i==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!l,onClick:s,...r,children:[Ce(Uo,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});jo.displayName="CarouselNext";import*as $e from"react";import{Check as Ko}from"lucide-react";import{jsx as Mt,jsxs as Jo}from"react/jsx-runtime";var qo=$e.forwardRef(({className:t,checked:e,onCheckedChange:n,...r},o)=>{let[i,s]=$e.useState(e||!1),[l,u]=$e.useState(!1);return $e.useEffect(()=>{if(e!==void 0){s(e),u(!0);let d=setTimeout(()=>{u(!1)},300);return()=>clearTimeout(d)}},[e]),Jo("div",{className:"relative",children:[Mt("input",{type:"checkbox",className:"absolute h-4 w-4 opacity-0",ref:o,checked:i,onChange:d=>{let m=d.target.checked;s(m),u(!0),setTimeout(()=>{u(!1)},300),n?.(m),r.onChange?.(d)},...r}),Mt("div",{className:a("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","transition-all duration-300 ease-in-out",l&&"scale-110",i?"bg-primary":"bg-transparent hover:bg-primary/10",t),children:i&&Mt("div",{className:a("flex items-center justify-center text-current","animate-in fade-in-0 zoom-in-0 duration-300"),children:Mt(Ko,{className:"h-4 w-4 text-white dark:text-black"})})})]})});qo.displayName="Checkbox";import*as fe from"react";import*as et from"recharts";import{Fragment as ra,jsx as ne,jsxs as Qe}from"react/jsx-runtime";var Zo={light:"",dark:".dark"},Dn=fe.createContext(null);function An(){let t=fe.useContext(Dn);if(!t)throw new Error("useChart must be used within a <ChartContainer />");return t}var Qo=fe.forwardRef(({id:t,className:e,children:n,config:r,...o},i)=>{let s=fe.useId(),l=`chart-${t||s.replace(/:/g,"")}`;return ne(Dn.Provider,{value:{config:r},children:Qe("div",{"data-chart":l,ref:i,className:a("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",e),...o,children:[ne(ea,{id:l,config:r}),ne(et.ResponsiveContainer,{children:n})]})})});Qo.displayName="Chart";var ea=({id:t,config:e})=>{let n=Object.entries(e).filter(([r,o])=>o.theme||o.color);return n.length?ne("style",{dangerouslySetInnerHTML:{__html:Object.entries(Zo).map(([r,o])=>` ${o} [data-chart=${t}] { ${n.map(([i,s])=>{let l=s.theme?.[r]||s.color;return l?` --color-${i}: ${l};`:null}).join(` `)} } `).join(` `)}}):null},Kc=et.Tooltip,ta=fe.forwardRef(({active:t,payload:e,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:s,labelFormatter:l,labelClassName:u,formatter:c,color:d,nameKey:m,labelKey:p},g)=>{let{config:f}=An(),b=fe.useMemo(()=>{if(o||!e?.length)return null;let[v]=e,x=`${p||v.dataKey||v.name||"value"}`,T=$t(f,v,x),y=!p&&typeof s=="string"?f[s]?.label||s:T?.label;return l?ne("div",{className:a("font-medium",u),children:l(y,e)}):y?ne("div",{className:a("font-medium",u),children:y}):null},[s,l,e,o,u,f,p]);if(!t||!e?.length)return null;let h=e.length===1&&r!=="dot";return Qe("div",{ref:g,className:a("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[h?null:b,ne("div",{className:"grid gap-1.5",children:e.map((v,x)=>{let T=`${m||v.name||v.dataKey||"value"}`,y=$t(f,v,T),C=d||v.payload.fill||v.color;return ne("div",{className:a("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:c&&v?.value!==void 0&&v.name?c(v.value,v.name,v,x,v.payload):Qe(ra,{children:[y?.icon?ne(y.icon,{}):!i&&ne("div",{className:a("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":h&&r==="dashed"}),style:{"--color-bg":C,"--color-border":C}}),Qe("div",{className:a("flex flex-1 justify-between leading-none",h?"items-end":"items-center"),children:[Qe("div",{className:"grid gap-1.5",children:[h?b:null,ne("span",{className:"text-muted-foreground",children:y?.label||v.name})]}),v.value&&ne("span",{className:"font-mono font-medium tabular-nums text-foreground",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})});ta.displayName="ChartTooltip";var qc=et.Legend,na=fe.forwardRef(({className:t,hideIcon:e=!1,payload:n,verticalAlign:r="bottom",nameKey:o},i)=>{let{config:s}=An();return n?.length?ne("div",{ref:i,className:a("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",t),children:n.map(l=>{let u=`${o||l.dataKey||"value"}`,c=$t(s,l,u);return Qe("div",{className:a("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[c?.icon&&!e?ne(c.icon,{}):ne("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:l.color}}),c?.label]},l.value)})}):null});na.displayName="ChartLegend";function $t(t,e,n){if(typeof e!="object"||e===null)return;let r="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0,o=n;return n in e&&typeof e[n]=="string"?o=e[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in t?t[o]:t[n]}import*as W from"react";import{Fragment as sa,jsx as dt}from"react/jsx-runtime";var Xt=W.createContext(void 0),oa=W.forwardRef(({children:t,open:e,defaultOpen:n=!1,disabled:r=!1,onOpenChange:o,className:i,...s},l)=>{let[u,c]=W.useState(n),d=e!==void 0,m=d?e:u,p=W.useCallback(g=>{r||(d||c(g),o?.(g))},[r,d,o]);return dt(Xt.Provider,{value:{open:m,onOpenChange:p,disabled:r},children:dt("div",{ref:l,className:a("",i),"data-state":m?"open":"closed","data-disabled":r?"":void 0,...s,children:t})})});oa.displayName="Collapsible";var aa=W.forwardRef(({className:t,children:e,asChild:n=!1,...r},o)=>{let i=W.useContext(Xt);if(!i)throw new Error("CollapsibleTrigger must be used within a Collapsible");let{open:s,onOpenChange:l,disabled:u}=i,c=()=>{l(!s)};return n?dt(sa,{children:W.Children.map(e,d=>W.isValidElement(d)?W.cloneElement(d,{...d.props,ref:o,onClick:m=>{c(),d.props.onClick&&d.props.onClick(m)},disabled:u||d.props.disabled,"data-state":s?"open":"closed","data-disabled":u?"":void 0,"aria-expanded":s}):d)}):dt("button",{ref:o,type:"button",disabled:u,"data-state":s?"open":"closed","data-disabled":u?"":void 0,"aria-expanded":s,className:a("",t),onClick:c,...r,children:e})});aa.displayName="CollapsibleTrigger";var ia=W.forwardRef(({className:t,children:e,forceMount:n,...r},o)=>{let i=W.useContext(Xt);if(!i)throw new Error("CollapsibleContent must be used within a Collapsible");let{open:s}=i;return!n&&!s?null:dt("div",{ref:o,"data-state":s?"open":"closed",className:a("overflow-hidden",s?"animate-accordion-down":"animate-accordion-up",t),...r,children:e})});ia.displayName="CollapsibleContent";import*as z from"react";import*as F from"react";import{X as la}from"lucide-react";import{jsx as Re,jsxs as kn}from"react/jsx-runtime";var Yt=F.createContext(void 0),In=({children:t,defaultOpen:e=!1,open:n,onOpenChange:r})=>{let[o,i]=F.useState(e),s=n!==void 0,l=s?n:o,u=F.useCallback(c=>{if(s||i(c),r){let d=typeof c=="function"?c(l):c;r(d)}},[s,r,l]);return Re(Yt.Provider,{value:{open:l,setOpen:u},children:t})},ca=F.forwardRef(({children:t,asChild:e=!1,...n},r)=>{let o=F.useContext(Yt);if(!o)throw new Error("DialogTrigger must be used within a Dialog");let{setOpen:i}=o,s=c=>{c.preventDefault(),i(!0),n.onClick&&n.onClick(c)},{onClick:l,...u}=n;return e?Re("div",{ref:r,onClick:s,...u,children:F.Children.map(t,c=>F.isValidElement(c)?F.cloneElement(c,{...c.props}):c)}):Re("div",{ref:r,onClick:s,...u,children:t})});ca.displayName="DialogTrigger";var Wt=F.forwardRef(({className:t,children:e,...n},r)=>{let o=F.useContext(Yt);if(!o)throw new Error("DialogContent must be used within a Dialog");let{open:i,setOpen:s}=o;return i?Re("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:kn("div",{ref:r,className:a("relative w-full max-w-lg rounded-lg border bg-background p-6 shadow-lg animate-in fade-in-0 zoom-in-95",t),...n,children:[e,kn("button",{onClick:()=>s(!1),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[Re(la,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Close"})]})]})}):null});Wt.displayName="DialogContent";var ua=F.forwardRef(({className:t,...e},n)=>Re("div",{ref:n,className:a("flex flex-col space-y-1.5 text-center sm:text-left",t),...e}));ua.displayName="DialogHeader";var da=F.forwardRef(({className:t,...e},n)=>Re("h2",{ref:n,className:a("text-lg font-semibold leading-none tracking-tight",t),...e}));da.displayName="DialogTitle";var ma=F.forwardRef(({className:t,...e},n)=>Re("p",{ref:n,className:a("text-sm text-muted-foreground",t),...e}));ma.displayName="DialogDescription";var fa=F.forwardRef(({className:t,...e},n)=>Re("div",{ref:n,className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e}));fa.displayName="DialogFooter";import{Search as pa,Loader2 as Bn}from"lucide-react";import{Fragment as ya,jsx as Q,jsxs as Et}from"react/jsx-runtime";var On=z.createContext(void 0);function jt(){let t=z.useContext(On);if(!t)throw new Error("useCommand must be used within a Command component");return t}var _n=z.forwardRef(({className:t,isLoading:e,emptyMessage:n="No results found.",...r},o)=>{let[i,s]=z.useState(""),[l,u]=z.useState(!1),c=e!==void 0?e:l,d=z.useCallback(m=>i?m.filter(p=>typeof p.label=="string"?p.label.toLowerCase().includes(i.toLowerCase()):p.value.toLowerCase().includes(i.toLowerCase())):m,[i]);return Q(On.Provider,{value:{value:i,onValueChange:s,filter:d,isLoading:c,setIsLoading:u,emptyMessage:n},children:Q("div",{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...r,"cmdk-root":""})})});_n.displayName="Command";var du=({children:t,open:e,onOpenChange:n,className:r})=>{let o=i=>{i.stopPropagation()};return z.useEffect(()=>{if(!e)return;let i=s=>{s.key==="Escape"&&(s.preventDefault(),n&&n(!1))};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[e,n]),z.useEffect(()=>(e?document.body.classList.add("command-dialog-open"):document.body.classList.remove("command-dialog-open"),()=>{document.body.classList.remove("command-dialog-open")}),[e]),Et(ya,{children:[e&&Q("div",{className:"fixed inset-0 z-40 bg-black/40 backdrop-blur-sm","aria-hidden":"true"}),Q(In,{open:e,onOpenChange:n,children:Q(Wt,{className:a("fixed overflow-hidden p-0 shadow-xl border-muted/50 bg-background/90 backdrop-blur-lg max-w-3xl z-50","top-[10vh] max-h-[80vh]",r),onClick:o,children:Q(_n,{className:"[&_[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:t})})})]})},ga=z.forwardRef(({className:t,onValueChange:e,isLoading:n,...r},o)=>{let{value:i,onValueChange:s,isLoading:l}=jt(),u=n!==void 0?n:l,c=z.useCallback(m=>{m.preventDefault();let p=m.target.value;e?e(p):s(p)},[e,s]),d=m=>{m.key==="Enter"&&m.preventDefault()};return Et("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[u?Q(Bn,{className:"mr-2 h-4 w-4 animate-spin opacity-70"}):Q(pa,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),Q("input",{ref:o,value:r.value!==void 0?r.value:i,onChange:c,onKeyDown:d,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),placeholder:r.placeholder||"Type to search...","cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-autocomplete":"list",...r})]})});ga.displayName="CommandInput";var ba=z.forwardRef(({className:t,isLoading:e,...n},r)=>{let{isLoading:o}=jt(),i=e!==void 0?e:o;return Et("div",{ref:r,className:a("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...n,children:[i&&n.children&&Q("div",{className:"flex items-center justify-center py-6",children:Q(Bn,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),!i&&n.children]})});ba.displayName="CommandList";var va=z.forwardRef((t,e)=>{let{emptyMessage:n}=jt();return Q("div",{ref:e,className:"py-6 text-center text-sm text-muted-foreground",...t,children:t.children||n||"No results found."})});va.displayName="CommandEmpty";var ha=z.forwardRef(({className:t,heading:e,...n},r)=>Et("div",{ref:r,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...n,children:[e&&Q("div",{"cmdk-group-heading":"",children:e}),n.children]}));ha.displayName="CommandGroup";var xa=z.forwardRef(({className:t,...e},n)=>Q("div",{ref:n,className:a("-mx-1 h-px bg-border",t),...e}));xa.displayName="CommandSeparator";var Ra=z.forwardRef(({className:t,disabled:e,onSelect:n,value:r,...o},i)=>{let[s,l]=z.useState(!1);return Q("div",{ref:i,className:a("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",s&&"bg-accent text-accent-foreground",t),"data-disabled":e?"true":void 0,"data-selected":s?"true":void 0,"data-value":r,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onClick:()=>{!e&&n&&n()},...o})});Ra.displayName="CommandItem";var Ta=({className:t,...e})=>Q("span",{className:a("ml-auto text-xs tracking-widest text-muted-foreground",t),...e});Ta.displayName="CommandShortcut";import wa,{useEffect as Fn,useState as Ca,useRef as Ma}from"react";import{Loader2 as Ea}from"lucide-react";import{cva as La}from"class-variance-authority";import{jsx as Kt,jsxs as Sa}from"react/jsx-runtime";var Na=La("inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-gradient-to-r from-blue-500 to-purple-600 text-white hover:from-blue-600 hover:to-purple-700"},size:{default:"h-10 px-4 py-2 rounded-md",sm:"h-8 px-3 py-1 rounded-md text-sm",lg:"h-12 px-6 py-3 rounded-md text-lg",xl:"h-14 px-8 py-4 rounded-md text-xl",icon:"h-10 w-10 rounded-full",pill:"h-10 px-6 py-2 rounded-full"},animation:{none:"",pulse:"animate-pulse",bounce:"hover:animate-bounce",scale:"active:scale-95",shake:"hover:animate-[wiggle_0.3s_ease-in-out]",glow:"hover:shadow-[0_0_15px_rgba(255,255,255,0.5)]",expand:"active:scale-110 transition-transform"}},defaultVariants:{variant:"default",size:"default",animation:"scale"}}),Pa=wa.forwardRef(({className:t,variant:e,size:n,animation:r,asChild:o=!1,children:i,icon:s,iconPosition:l="left",loading:u=!1,confettiOptions:c={particleCount:100,spread:70},autoConfetti:d=!1,triggerOnHover:m=!1,...p},g)=>{let[f,b]=Ca(!1),h=Ma(null);Fn(()=>{if(window.confetti)b(!0);else{let x=document.createElement("script");return x.src="https://cdn.jsdelivr.net/npm/canvas-confetti..1.4.0/dist/confetti.browser.min.js",x.async=!0,x.onload=()=>{b(!0)},document.body.appendChild(x),()=>{document.body.removeChild(x)}}},[]),Fn(()=>{if(f&&d&&window.confetti&&h.current){let x=h.current.getBoundingClientRect(),T=(x.left+x.width/2)/window.innerWidth,y=(x.top+x.height/2)/window.innerHeight;window.confetti({...c,origin:{x:T,y}})}},[f,d,c]);let v=x=>{if(window.confetti&&h.current){let T=h.current.getBoundingClientRect(),y=(T.left+T.width/2)/window.innerWidth,C=(T.top+T.height/2)/window.innerHeight;window.confetti({...c,origin:{x:y,y:C}})}};return Sa("button",{ref:x=>{typeof g=="function"?g(x):g&&(g.current=x),h.current=x},className:a(Na({variant:e,size:n,animation:r}),t),onClick:x=>{v(x),p.onClick?.(x)},onMouseEnter:m?x=>v(x):void 0,disabled:u||p.disabled,...p,children:[u?Kt(Ea,{className:"h-4 w-4 mr-2 animate-spin"}):s&&l==="left"?Kt("span",{className:"mr-1",children:s}):null,i,s&&l==="right"&&!u?Kt("span",{className:"ml-1",children:s}):null]})});Pa.displayName="ConfettiButton";import*as U from"react";import{Check as Ha,ChevronRight as Da,Circle as Aa}from"lucide-react";import{Fragment as Gn,jsx as j,jsxs as qt}from"react/jsx-runtime";var zn=U.createContext(void 0);function Vn(){let t=U.useContext(zn);if(!t)throw new Error("useContextMenu must be used within a ContextMenu");return t}var wu=({children:t})=>{let[e,n]=U.useState(!1),[r,o]=U.useState({x:0,y:0}),[i,s]=U.useState({}),[l,u]=U.useState(null);return j(zn.Provider,{value:{open:e,setOpen:n,position:r,setPosition:o,subMenuOpen:i,setSubMenuOpen:s,activeIte