@lzzjokerzzl/react-ui-components 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -11,7 +11,7 @@
11
11
  text-small text-gray-500
12
12
  top-1/2 -translate-y-1/2 origin-left
13
13
  ${Se||Z?["text-tiny scale-85 -translate-y-[1.875rem] px-1","text-gray-600"].join(" "):""}
14
- `.replace(/\s+/g," ").trim(),htmlFor:E,"data-testid":E?`${E}-label`:void 0,style:{zIndex:10},children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):f.jsxs("label",{id:Q,className:rd,htmlFor:E,"data-testid":E?`${E}-label`:void 0,children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):null,fd=f.jsx("input",{...K,ref:W||Le,id:E,type:Zr,value:Se,placeholder:h==="inside"?Z||Se?t:"":t,disabled:v,readOnly:C,required:y,minLength:w,maxLength:x,pattern:b,className:ad,onChange:_e,onFocus:Lt,onBlur:Zc,onKeyDown:T,onKeyUp:N,"aria-label":F,"aria-labelledby":e?Q:$,"aria-describedby":[de,ge,O].filter(Boolean).join(" ")||void 0,"aria-invalid":Ae,"data-testid":E?`${E}-input`:void 0,"data-has-start-content":!!s,"data-has-end-content":!!(a||j||Oe)});return f.jsxs("div",{ref:z,className:ed,"data-testid":E,"data-invalid":Ae,"data-required":y,"data-readonly":C,"data-disabled":v,"data-focus":Z,"data-focus-within":Z,"data-focus-visible":Z,"data-filled":Ze,"data-has-label":!!e,"data-has-helper":!!(r||Ae),children:[f.jsxs("div",{className:td,children:[h==="outside-left"&&Jr(),f.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[h==="outside"&&Jr(),f.jsxs("div",{className:nd,children:[h==="inside"&&Jr(),f.jsxs("div",{className:sd,children:[s&&Z&&f.jsx("div",{className:ea,"data-testid":E?`${E}-start-content`:void 0,children:s}),fd,a&&f.jsx("div",{className:ea,"data-testid":E?`${E}-end-content`:void 0,children:a}),ud(),dd()]})]})]})]}),(r||Ae)&&f.jsxs("div",{className:od,children:[r&&f.jsx("div",{id:de,className:id,"data-testid":E?`${E}-description`:void 0,children:r}),Ae&&f.jsx("div",{id:ge,className:ld,"data-testid":E?`${E}-error-message`:void 0,children:cd()})]})]})});wc.displayName="Input";const rr=H({slots:{wrapper:["fixed","inset-0","z-50","flex","items-center","justify-center","p-4","sm:p-0","overflow-hidden"],base:["relative","flex","flex-col","w-full","box-border","outline-none","mx-1","my-1","sm:mx-6","sm:my-16","bg-white","dark:bg-gray-800","text-gray-900","dark:text-gray-100","shadow-large","rounded-large","max-h-[calc(100vh_-_2rem)]","sm:max-h-[calc(100vh_-_8rem)]","data-[open=true]:animate-in","data-[open=false]:animate-out","data-[open=false]:fade-out-0","data-[open=true]:fade-in-0","data-[open=false]:zoom-out-95","data-[open=true]:zoom-in-95","data-[open=false]:slide-out-to-left-1/2","data-[open=false]:slide-out-to-top-[48%]","data-[open=true]:slide-in-from-left-1/2","data-[open=true]:slide-in-from-top-[48%]","data-[open=false]:duration-200","data-[open=true]:duration-200"],backdrop:["fixed","inset-0","z-50","bg-black/50","dark:bg-black/70","data-[enter]:animate-in","data-[exit]:animate-out","data-[enter]:fade-in-0","data-[exit]:fade-out-0","data-[enter]:duration-200","data-[exit]:duration-150"],header:["flex","py-4","px-6","relative","flex-col","gap-1","text-large","font-semibold","border-b","border-gray-200","dark:border-gray-700"],body:["relative","flex-1","px-6","py-2","flex","flex-col","gap-3","min-h-0"],footer:["flex","flex-row","gap-2","px-6","py-4","justify-end","border-t","border-gray-200","dark:border-gray-700"],closeButton:["absolute","appearance-none","outline-none","select-none","top-1","right-1","rtl:right-auto","rtl:left-1","p-2","text-gray-500","dark:text-gray-400","rounded-full","hover:bg-gray-100","dark:hover:bg-gray-700","active:bg-gray-200","dark:active:bg-gray-600","tap-highlight-transparent","transition-opacity","data-[pressed=true]:scale-95","transition-transform","z-10"]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"max-w-full max-h-full my-0 mx-0 sm:my-0 sm:mx-0 rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"bg-transparent"},opaque:{backdrop:"bg-black/50 dark:bg-black/70"},blur:{backdrop:"bg-black/30 dark:bg-black/50 backdrop-blur-sm backdrop-saturate-150"}},scrollBehavior:{normal:{base:"overflow-hidden",body:"overflow-y-auto max-h-[60vh]"},inside:{base:"max-h-[calc(100vh_-_8rem)] overflow-hidden flex flex-col",body:"overflow-y-auto flex-1 min-h-0"},outside:{wrapper:"items-start sm:items-center overflow-y-auto py-8",base:"my-0 max-h-fit overflow-visible",body:"overflow-visible"}},placement:{auto:{wrapper:"items-end sm:items-center",base:"sm:my-16 my-2"},top:{wrapper:"items-start",base:"mt-2 mb-auto"},"top-center":{wrapper:"items-start sm:items-center",base:"mt-2 sm:mt-16 mb-auto"},center:{wrapper:"items-center",base:"my-auto"},bottom:{wrapper:"items-end",base:"mb-2 mt-auto"},"bottom-center":{wrapper:"items-end sm:items-center",base:"mb-2 sm:mb-16 mt-auto"}},disableAnimation:{true:{base:["data-[open=true]:animate-none","data-[open=false]:animate-none"],backdrop:["data-[enter]:animate-none","data-[exit]:animate-none"]}},isDraggable:{true:{header:"cursor-move select-none active:cursor-grabbing",base:"cursor-default"}}},defaultVariants:{size:"md",radius:"lg",shadow:"lg",backdrop:"opaque",scrollBehavior:"normal",placement:"auto",disableAnimation:!1,isDraggable:!1}}),Cc=p.createContext(null),Us=()=>{const e=p.useContext(Cc);if(!e)throw new Error("Modal components must be used within a Modal");return e},Db=()=>f.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"1em",children:f.jsx("path",{d:"m18 6-12 12M6 6l12 12"})}),Bb=e=>{p.useEffect(()=>{if(!e)return;const t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},Lb=(e,t)=>{const r=p.useRef(null);p.useEffect(()=>{e?(r.current=document.activeElement,setTimeout(()=>{if(t.current){const n=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n.length>0?n[0].focus():t.current.focus()}},100)):r.current&&r.current.focus()},[e,t])},Ob=(e,t,r)=>{const[n,s]=p.useState(!1),a=p.useRef(null);return p.useEffect(()=>{r||s(!1)},[r]),{dragProps:e?{drag:!0,dragMomentum:!1,dragElastic:.1,dragConstraints:t?!1:a,onDragStart:()=>s(!0),onDragEnd:()=>s(!1),whileDrag:{scale:1.02,transition:{duration:.1}}}:{},isDragging:n,constraintsRef:a}},kc=p.forwardRef(({children:e,size:t="md",radius:r="lg",shadow:n="lg",backdrop:s="opaque",scrollBehavior:a="normal",placement:o="auto",isOpen:i,defaultOpen:l=!1,isDismissable:c=!0,isKeyboardDismissDisabled:d=!1,shouldBlockScroll:u=!0,hideCloseButton:h=!1,closeButton:m,motionProps:g,portalContainer:w=document.body,disableAnimation:x=!1,isDraggable:b=!1,allowOverflow:y=!1,classNames:v,className:C,onOpenChange:S,onClose:j,...A},k)=>{const[V,M]=p.useState(l),D=p.useRef(null),z=i!==void 0?i:V,L=W=>{i===void 0&&M(W),S?.(W),W||j?.()},I=()=>{L(!1)};p.useEffect(()=>{if(!z||d)return;const W=J=>{J.key==="Escape"&&I()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[z,d]);const R=W=>{c&&W.target===W.currentTarget&&I()};Bb(z&&u),Lb(z,D);const{dragProps:B,isDragging:P,constraintsRef:T}=Ob(b,y,z),{wrapper:N,base:E,backdrop:F}=rr({size:t,radius:r,shadow:n,backdrop:s,scrollBehavior:a,placement:o,disableAnimation:x,isDraggable:b}),$={isOpen:z,size:t,radius:r,shadow:n,backdrop:s,scrollBehavior:a,placement:o,isDismissable:c,isKeyboardDismissDisabled:d,shouldBlockScroll:u,hideCloseButton:h,disableAnimation:x,isDraggable:b,allowOverflow:y,classNames:v,onClose:I,onOpenChange:L},O={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{duration:x?0:.3,ease:"easeOut"}},K=f.jsx(We,{children:z&&f.jsx(Cc.Provider,{value:$,children:f.jsx(_.div,{ref:T,className:F({className:v?.backdrop}),onClick:R,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:x?0:.2,ease:"easeOut"},children:f.jsx("div",{className:N({className:v?.wrapper}),onClick:W=>W.stopPropagation(),children:f.jsxs(_.div,{ref:k||D,className:E({className:v?.base||C}),"data-open":z,"data-dismissable":c,role:"dialog","aria-modal":"true",tabIndex:-1,...g||O,...B,style:{cursor:P?"grabbing":b?"grab":"default"},...A,children:[!h&&f.jsx("button",{type:"button",className:rr().closeButton({className:v?.closeButton}),onClick:I,"aria-label":"Close modal",children:m||f.jsx(Db,{})}),e]})})})})});return Jn.createPortal(K,w)});kc.displayName="Modal";const zb=p.forwardRef(({children:e,className:t,...r},n)=>f.jsx("div",{ref:n,className:t,...r,children:e}));zb.displayName="ModalContent";const $b=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s,isDraggable:a}=Us(),{header:o}=rr();return f.jsx("div",{ref:n,className:o({className:s?.header||t}),"data-framer-drag-handle":a?"":void 0,style:{cursor:a?"move":"default"},...r,children:e})});$b.displayName="ModalHeader";const Fb=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s}=Us(),{body:a}=rr();return f.jsx("div",{ref:n,className:a({className:s?.body||t}),...r,children:e})});Fb.displayName="ModalBody";const Wb=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s}=Us(),{footer:a}=rr();return f.jsx("div",{ref:n,className:a({className:s?.footer||t}),...r,children:e})});Wb.displayName="ModalFooter";function _b(e={}){const{isOpen:t,defaultOpen:r=!1,onOpenChange:n,onClose:s}=e,[a,o]=p.useState(r),i=t!==void 0?t:a,l=p.useCallback(u=>{t===void 0&&o(u),n?.(u),u||s?.()},[t,n,s]),c=p.useCallback(()=>{l(!0)},[l]),d=p.useCallback(()=>{l(!1)},[l]);return{isOpen:i,onOpen:c,onClose:d,onOpenChange:l}}const st=H({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-between","transition-background","duration-300","ease-in-out","data-[menu-open=true]:bg-content1/60","data-[hidden=true]:transform","data-[hidden=true]:-translate-y-full","data-[hidden=true]:transition-transform"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-16"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-medium","data-[active=true]:text-primary"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent","data-[pressed=true]:bg-default-100","data-[hover=true]:bg-default-100","data-[open=true]:bg-default-100"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity",'before:content-[""]',"before:block","before:h-px","before:w-4","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0",'after:content-[""]',"after:block","after:h-px","after:w-4","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","group-data-[open=true]:after:-translate-y-px","group-data-[open=true]:after:-rotate-45"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-header","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto","bg-content1/60","backdrop-blur-xl","backdrop-saturate-150"],menuItem:["text-large","color-foreground","data-[active=true]:font-semibold","data-[active=true]:text-primary"]},variants:{position:{static:{base:"relative"},sticky:{base:"sticky top-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},isBordered:{true:{base:"border-b border-divider"}},isBlurred:{true:{base:["backdrop-blur-lg","data-[menu-open=false]:bg-background/70","backdrop-saturate-150"]},false:{base:"bg-background",menu:"bg-background"}},disableAnimation:{true:{menu:"!transition-none"}}},defaultVariants:{position:"sticky",maxWidth:"lg",isBordered:!1,isBlurred:!0,disableAnimation:!1}}),Sc=p.createContext(null),Dt=()=>{const e=p.useContext(Sc);if(!e)throw new Error("Navbar components must be used within a Navbar");return e},Gb=({isOpen:e})=>{const{toggleIcon:t}=st({disableAnimation:!1});return f.jsx("span",{className:t(),"data-open":e,children:f.jsx("span",{className:"sr-only",children:"Toggle menu"})})},jc=p.forwardRef(({children:e,height:t="4rem",position:r="sticky",maxWidth:n="lg",parentRef:s,isBordered:a=!1,isBlurred:o=!0,isMenuOpen:i,isMenuDefaultOpen:l=!1,shouldHideOnScroll:c=!1,disableScrollHandler:d=!1,disableAnimation:u=!1,classNames:h,className:m,onMenuOpenChange:g,onScrollPositionChange:w,...x},b)=>{const[y,v]=p.useState(l),[C,S]=p.useState(!1),[j,A]=p.useState(0),k=p.useRef(null),V=i??y,M=I=>{i===void 0&&v(I),g?.(I)};p.useEffect(()=>{if(!c||d)return;const I=()=>{const B=window.scrollY,P=B>j?"down":"up";P==="down"&&B>100?S(!0):P==="up"&&S(!1),A(B),w?.(B)},R=s?.current||window;return R.addEventListener("scroll",I,{passive:!0}),()=>{R.removeEventListener("scroll",I)}},[c,d,j,s,w]);const{base:D,wrapper:z}=st({position:r,maxWidth:n,isBordered:a,isBlurred:o,disableAnimation:u}),L={isMenuOpen:V,position:r,maxWidth:n,height:t,isBordered:a,isBlurred:o,shouldHideOnScroll:c,disableAnimation:u,classNames:h,onMenuOpenChange:M,onScrollPositionChange:w};return f.jsx(Sc.Provider,{value:L,children:f.jsx(_.nav,{ref:b||k,className:D({className:h?.base||m}),style:{height:t},"data-menu-open":V,"data-hidden":C,initial:c?{y:0}:!1,animate:c?{y:C?-100:0}:!1,transition:{duration:.3,ease:"easeInOut"},...x,children:f.jsx("header",{className:z({className:h?.wrapper}),children:e})})})});jc.displayName="Navbar";const Ub=p.forwardRef(({children:e,className:t,...r},n)=>{const{brand:s}=st(),a=Dt();return f.jsx("div",{ref:n,className:s({className:a?.classNames?.brand||t}),...r,children:e})});Ub.displayName="NavbarBrand";const Kb=p.forwardRef(({children:e,justify:t="start",className:r,...n},s)=>{const{content:a}=st(),{classNames:o}=Dt();return f.jsx("ul",{ref:s,className:a({className:o?.content||r}),"data-justify":t,...n,children:e})});Kb.displayName="NavbarContent";const Hb=p.forwardRef(({children:e,isActive:t=!1,className:r,...n},s)=>{const{item:a}=st(),{classNames:o}=Dt();return f.jsx("li",{ref:s,className:a({className:o?.item||r}),"data-active":t,...n,children:e})});Hb.displayName="NavbarItem";const Xb=p.forwardRef(({icon:e,isSelected:t,defaultSelected:r=!1,srOnlyText:n="open/close navigation menu",className:s,onChange:a,...o},i)=>{const{toggle:l}=st(),{isMenuOpen:c,onMenuOpenChange:d,classNames:u}=Dt(),h=()=>{const m=!c;d(m),a?.(m)};return f.jsx("button",{ref:i,type:"button",className:l({className:u?.toggle||s}),"data-open":c,"data-pressed":!1,"aria-label":n,onClick:h,...o,children:typeof e=="function"?e(c):e||f.jsx(Gb,{isOpen:c})})});Xb.displayName="NavbarMenuToggle";const Yb=p.forwardRef(({children:e,portalContainer:t,className:r,...n},s)=>{const{menu:a}=st(),{isMenuOpen:o,disableAnimation:i,classNames:l}=Dt(),c={closed:{opacity:0,y:-20},open:{opacity:1,y:0}},d={duration:i?0:.3,ease:"easeOut"};return f.jsx(We,{children:o&&f.jsx(_.div,{ref:s,className:a({className:l?.menu||r}),variants:c,initial:"closed",animate:"open",exit:"closed",transition:d,...n,children:f.jsx("ul",{className:"flex flex-col gap-2 py-4",children:e})})})});Yb.displayName="NavbarMenu";const qb=p.forwardRef(({children:e,isActive:t=!1,className:r,...n},s)=>{const{menuItem:a}=st(),{classNames:o}=Dt();return f.jsx("li",{ref:s,className:a({className:o?.menuItem||r}),"data-active":t,...n,children:e})});qb.displayName="NavbarMenuItem";const Zb=H({slots:{base:["flex","flex-col","gap-2","w-full"],track:["relative","bg-gray-200","overflow-hidden"],indicator:["h-full","transition-all","duration-500","ease-out","origin-left"],labelWrapper:["flex","justify-between","items-center"],label:["text-sm","font-medium","text-gray-700"],value:["text-sm","font-medium","text-gray-500"]},variants:{color:{default:{indicator:"bg-gray-400"},primary:{indicator:"bg-blue-600"},secondary:{indicator:"bg-gray-600"},success:{indicator:"bg-green-600"},warning:{indicator:"bg-yellow-500"},danger:{indicator:"bg-red-600"}},size:{sm:{track:"h-1",label:"text-xs",value:"text-xs"},md:{track:"h-2",label:"text-sm",value:"text-sm"},lg:{track:"h-3",label:"text-base",value:"text-base"}},radius:{none:{track:"rounded-none"},sm:{track:"rounded-sm"},md:{track:"rounded-md"},lg:{track:"rounded-lg"},full:{track:"rounded-full"}},isStriped:{true:{indicator:["bg-gradient-to-r","from-transparent","to-transparent","bg-[length:1rem_1rem]","bg-repeat-x","animate-pulse"]}},isIndeterminate:{true:{indicator:["animate-pulse"]}},isDisabled:{true:{base:"opacity-60 cursor-not-allowed",track:"bg-gray-100",indicator:"bg-gray-300",label:"text-gray-400",value:"text-gray-400"}}},compoundVariants:[{isStriped:!0,color:"primary",class:{indicator:["bg-gradient-to-r","from-blue-600","via-blue-500","to-blue-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"success",class:{indicator:["bg-gradient-to-r","from-green-600","via-green-500","to-green-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"warning",class:{indicator:["bg-gradient-to-r","from-yellow-500","via-yellow-400","to-yellow-500","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"danger",class:{indicator:["bg-gradient-to-r","from-red-600","via-red-500","to-red-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isIndeterminate:!0,class:{indicator:["w-1/3","animate-[progress-indeterminate_2s_ease-in-out_infinite]"]}}],defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1}}),Tc=(e=0,t=0,r=100)=>(Math.max(t,Math.min(r,e))-t)/(r-t)*100,Jb=(e=0,t=100,r=0)=>{const n=Tc(e,r,t);return`${Math.round(n)}%`},Ac=p.forwardRef(({value:e=0,maxValue:t=100,minValue:r=0,color:n="primary",size:s="md",radius:a="full",showValueLabel:o=!1,label:i,isStriped:l=!1,isIndeterminate:c=!1,isDisabled:d=!1,className:u,classNames:h,...m},g)=>{const w=Tc(e,r,t),x=Jb(e,t,r),b=Zb({color:n,size:s,radius:a,isStriped:l,isIndeterminate:c,isDisabled:d});return f.jsxs("div",{ref:g,className:q(b.base(),h?.base,u),role:"progressbar","aria-valuemin":r,"aria-valuemax":t,"aria-valuenow":c?void 0:e,"aria-valuetext":c?"Cargando...":x,...m,children:[(i||o)&&f.jsxs("div",{className:q(b.labelWrapper(),h?.label),children:[i&&f.jsx("span",{className:q(b.label(),h?.label),children:i}),o&&!c&&f.jsx("span",{className:q(b.value(),h?.value),children:x})]}),f.jsx("div",{className:q(b.track(),h?.track),children:f.jsx(_.div,{className:q(b.indicator(),h?.indicator),initial:{scaleX:0,originX:0},animate:{scaleX:c?1:w/100,x:c?["-100%","300%"]:0},transition:c?{duration:2,repeat:1/0,ease:"easeInOut"}:{duration:.5,ease:"easeOut"},style:c?{width:"33%",transformOrigin:"left center"}:{transformOrigin:"left center"}})})]})});Ac.displayName="Progress";const Qb={slow:2,normal:1,fast:.6};H({base:["inline-block","animate-spin","transition-all","duration-200","ease-in-out"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-400"},visible:{true:"opacity-100 scale-100",false:"opacity-0 scale-95 pointer-events-none"}},defaultVariants:{size:"md",color:"primary",visible:!0}});const ey=H({base:["flex","items-center","justify-center","transition-all","duration-200","ease-in-out"],variants:{overlay:{true:["fixed","inset-0","z-50","bg-white/80","backdrop-blur-sm"],false:""},position:{center:"flex-col",top:"flex-col",bottom:"flex-col",left:"flex-row",right:"flex-row-reverse"},fullScreen:{true:"w-screen h-screen",false:"w-full h-full"}},defaultVariants:{overlay:!1,position:"center",fullScreen:!1}}),ty=H({base:["text-sm","font-medium","transition-opacity","duration-200"],variants:{position:{center:"mt-2 text-center",top:"mb-2 text-center",bottom:"mt-2 text-center",left:"ml-2",right:"mr-2"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-500"}},defaultVariants:{position:"center",color:"neutral"}});H({base:["relative","inline-block"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"}},defaultVariants:{size:"md"}});const ry=H({base:["rounded-full","transition-all"],variants:{size:{xs:"w-2 h-2",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6",xl:"w-8 h-8"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),ny=H({base:["flex","items-center","justify-center"],variants:{size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{size:"md"}}),sy=H({base:["rounded-full"],variants:{size:{xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),ay=H({base:["flex","items-end","justify-center"],variants:{size:{xs:"gap-0.5 h-3",sm:"gap-0.5 h-4",md:"gap-1 h-6",lg:"gap-1 h-8",xl:"gap-1.5 h-12"}},defaultVariants:{size:"md"}}),oy=H({base:["rounded-full"],variants:{size:{xs:"w-0.5",sm:"w-0.5",md:"w-1",lg:"w-1",xl:"w-1.5"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}});H({base:["grid","gap-1"],variants:{size:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16",xl:"w-24 h-24"},gridSize:{"2x2":"grid-cols-2 grid-rows-2","3x3":"grid-cols-3 grid-rows-3","4x4":"grid-cols-4 grid-rows-4"}},defaultVariants:{size:"md",gridSize:"3x3"}});H({base:["rounded-sm"],variants:{color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{color:"primary"}});const iy=H({base:["relative","rounded-full","border-solid","border-transparent"],variants:{size:{xs:"w-3 h-3 border-[1px]",sm:"w-4 h-4 border-[1px]",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-2",xl:"w-12 h-12 border-[3px]"},color:{primary:"border-t-blue-600 border-r-blue-600/30",secondary:"border-t-gray-600 border-r-gray-600/30",success:"border-t-green-600 border-r-green-600/30",warning:"border-t-yellow-600 border-r-yellow-600/30",error:"border-t-red-600 border-r-red-600/30",neutral:"border-t-gray-400 border-r-gray-400/30"}},defaultVariants:{size:"md",color:"primary"}});H({base:["flex","items-center","justify-center"],variants:{direction:{horizontal:"flex-row",vertical:"flex-col",circular:"relative"},size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{direction:"horizontal",size:"md"}});H({base:["flex","items-end","justify-center"],variants:{orientation:{vertical:"flex-row items-end",horizontal:"flex-col items-center"},size:{xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"}},defaultVariants:{orientation:"vertical",size:"md"}});const ly=e=>Qb[e],wr={rotate:{animate:{rotate:360}},pulse:{animate:{scale:[1,1.2,1],opacity:[.7,1,.7]}},bounce:{animate:{y:[0,-10,0]}},wave:{animate:{scaleY:[.4,1,.4]}}},Mc=({type:e="rotating",size:t="md",color:r="primary",speed:n="normal",visible:s=!0,label:a,overlay:o=!1,overlayOpacity:i=.8,overlayColor:l="bg-white",animationConfig:c,className:d,"aria-label":u="Loading","data-testid":h="spinner",style:m,...g})=>{const w=ly(n),x=()=>f.jsx(_.div,{className:iy({size:t,color:r}),animate:wr.rotate.animate,transition:{duration:w,repeat:1/0,...c}}),b=()=>f.jsx(_.div,{className:ry({size:t,color:r}),animate:wr.pulse.animate,transition:{duration:w,repeat:1/0,...c}}),y=()=>f.jsx("div",{className:ny({size:t}),children:[0,1,2].map(k=>f.jsx(_.div,{className:sy({size:t,color:r}),animate:wr.bounce.animate,transition:{duration:w,repeat:1/0,delay:k*.1,...c}},k))}),v=()=>f.jsx("div",{className:ay({size:t}),children:[0,1,2,3,4].map(k=>f.jsx(_.div,{className:oy({size:t,color:r}),animate:wr.wave.animate,transition:{duration:w,repeat:1/0,delay:k*.1,...c}},k))}),C=()=>{switch(e){case"rotating":case"ring":return f.jsx(x,{});case"pulse":return f.jsx(b,{});case"bounce":case"dots":return f.jsx(y,{});case"wave":case"bars":return f.jsx(v,{});default:return f.jsx(x,{})}},S=ey({overlay:o,position:"center",fullScreen:o}),j=d?`${S} ${d}`:S,A={...m,...o&&i!==void 0&&{backgroundColor:`rgba(255, 255, 255, ${i})`}};return s?f.jsxs(_.div,{className:j,style:A,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"status","aria-live":"polite","data-testid":h,...g,children:[C(),a&&f.jsx(_.div,{className:ty({position:"center",color:r==="neutral"?"neutral":r}),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.2},children:a})]}):null};Mc.displayName="Spinner";const cr={sm:{wrapper:"w-10 h-6",thumb:"w-5 h-5",label:"text-sm",startContent:"text-xs",endContent:"text-xs",thumbIcon:"w-3 h-3"},md:{wrapper:"w-12 h-7",thumb:"w-6 h-6",label:"text-base",startContent:"text-sm",endContent:"text-sm",thumbIcon:"w-4 h-4"},lg:{wrapper:"w-14 h-8",thumb:"w-7 h-7",label:"text-lg",startContent:"text-base",endContent:"text-base",thumbIcon:"w-5 h-5"}},cy=(e="primary",t=!1,r=!1)=>r?t?"bg-gray-300 border-gray-300":"bg-gray-200 border-gray-200":t?{default:"bg-gray-600 border-gray-600 hover:bg-gray-700",primary:"bg-blue-600 border-blue-600 hover:bg-blue-700",secondary:"bg-purple-600 border-purple-600 hover:bg-purple-700",success:"bg-green-600 border-green-600 hover:bg-green-700",warning:"bg-amber-500 border-amber-500 hover:bg-amber-600",danger:"bg-red-600 border-red-600 hover:bg-red-700"}[e]:"bg-gray-200 border-gray-200 hover:bg-gray-300",dy=(e=!1)=>`inline-flex items-center gap-2 cursor-pointer select-none ${e?"cursor-not-allowed opacity-60":""}`.trim(),uy=(e="md",t="primary",r=!1,n=!1,s=!1)=>{const a=cr[e].wrapper,o=cy(t,r,n);return`relative inline-flex shrink-0 border-2 rounded-full cursor-pointer ${a} ${o} ${s?"":"transition-colors duration-200 ease-in-out"} focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-500`.trim()},fy=(e="md",t=!1)=>`font-medium ${cr[e].label} ${t?"text-gray-400":"text-gray-900"}`.trim(),_o=(e="md",t=!1)=>`flex items-center justify-center ${cr[e].startContent} ${t?"text-gray-400":"text-gray-600"}`.trim(),py=(e="md")=>`flex items-center justify-center text-gray-400 ${cr[e].thumbIcon}`.trim(),hy=()=>"sr-only",my=({children:e,value:t,name:r,size:n="md",color:s="primary",thumbIcon:a,startContent:o,endContent:i,isSelected:l,defaultSelected:c=!1,isReadOnly:d=!1,isDisabled:u=!1,disableAnimation:h=!1,className:m="",classNames:g,onChange:w,onValueChange:x,"data-testid":b})=>{const[y,v]=p.useState(c),C=p.useRef(null),S=l!==void 0,j=S?l:y,A=F=>{if(u||d)return;const $=F.target.checked;S||v($),w?.(F),x?.($)},k=()=>{u||d||C.current?.click()},M=[dy(u),g?.base,m].filter(Boolean).join(" "),z=[uy(n,s,j,u,h),g?.wrapper].filter(Boolean).join(" "),I=[fy(n,u),g?.label].filter(Boolean).join(" "),B=[_o(n,u),g?.startContent].filter(Boolean).join(" "),T=[_o(n,u),g?.endContent].filter(Boolean).join(" "),E=[hy(),g?.hiddenInput].filter(Boolean).join(" ");return f.jsxs("label",{className:M,"data-testid":b,children:[o&&f.jsx(_.div,{className:B,"data-testid":`${b}-start-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:h?0:.2},children:o}),f.jsxs(gy,{className:z,"data-testid":`${b}-wrapper`,children:[f.jsx("input",{ref:C,type:"checkbox",value:t,name:r,checked:j,onChange:A,disabled:u,readOnly:d,"aria-checked":j,className:E,"data-testid":`${b}-input`,onClick:k}),f.jsx(by,{isSelected:j,size:n,thumbIcon:a,disableAnimation:h,className:g?.thumb,"data-testid":`${b}-thumb`,onClick:k})]}),i&&f.jsx(_.div,{className:T,"data-testid":`${b}-end-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:h?0:.2},children:i}),e&&f.jsx("span",{className:I,"data-testid":`${b}-label`,children:e})]})},gy=({children:e,className:t="",onClick:r,"data-testid":n})=>f.jsx(_.div,{className:t,onClick:r,"data-testid":n,whileHover:{scale:1.02},whileTap:{scale:.98},transition:{duration:.1},children:e}),by=({isSelected:e=!1,size:t="md",thumbIcon:r,disableAnimation:n=!1,className:s="","data-testid":a})=>{const o=cr[t],i=py(t),c=(()=>{const h={sm:40,md:48,lg:56},m={sm:20,md:24,lg:28};return h[t]-m[t]-7})(),u=[`absolute top-0.2 left-0.5 inline-block rounded-full bg-white shadow-lg transform ring-0 flex items-center justify-center ${o.thumb}`,s].filter(Boolean).join(" ");return f.jsx(_.span,{className:u,"data-testid":a,animate:{x:e?c:0},transition:{type:"spring",stiffness:500,damping:30,duration:n?0:void 0},whileHover:{scale:1.1},whileTap:{scale:.95},style:{cursor:"pointer"},children:f.jsx(We,{mode:"wait",children:r&&f.jsx(_.div,{initial:{opacity:0,rotate:-180,scale:.5},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:180,scale:.5},transition:{duration:n?0:.3},children:f.jsx(r,{isSelected:e,className:i})},e?"selected":"unselected")})})},yy=(e,t)=>{if(e==="custom"&&t){const n=t.border??"",s=t.gradient??t.background??"";return[n,s].filter(Boolean).join(" ")}const r={default:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",primary:"border-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950",secondary:"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800",success:"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950",warning:"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950",danger:"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950",custom:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900"};return r[e]||r.default},xy=e=>{const t={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"};return t[e]||t.md},vy=e=>{const t={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"};return t[e]||t.sm},wy=(e,t,r,n,s,a)=>{if(s)return"";const o="flex flex-col relative overflow-hidden",i=yy(e,t),l=xy(r),c=vy(n);return[o,i,l,c,a?"w-full":""].filter(Boolean).join(" ")},Cy=(e,t)=>["min-w-full table-auto",e?"table-compact":"",t?"table-striped":""].filter(Boolean).join(" "),ky=(e,t,r,n,s,a)=>{const o=a?.border?`border-b ${a.border} transition-colors`:"border-b border-gray-200 dark:border-gray-700 transition-colors";let i="";e&&(i=a?.selected?a.selected:"bg-blue-50 dark:bg-blue-900/20");const l=!t&&!e?a?.hover||"hover:bg-gray-50 dark:hover:bg-gray-800/50":"";return[o,i,l,t?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" ")},Vc=p.createContext(null),Sy=()=>{const e=p.useContext(Vc);if(!e)throw new Error("Table components must be used within a Table component");return e},jy=({children:e,className:t="",color:r="default",customColor:n,layout:s="auto",radius:a="md",shadow:o="sm",maxTableHeight:i,rowHeight:l,isVirtualized:c=!1,hideHeader:d=!1,isStriped:u=!1,isCompact:h=!1,isHeaderSticky:m=!1,fullWidth:g=!0,removeWrapper:w=!1,topContent:x,bottomContent:b,topContentPlacement:y="outside",bottomContentPlacement:v="outside",showSelectionCheckboxes:C=!1,sortDescriptor:S,selectedKeys:j=new Set,defaultSelectedKeys:A=new Set,disabledKeys:k=new Set,disallowEmptySelection:V=!1,selectionMode:M="none",selectionBehavior:D="toggle",disabledBehavior:z="selection",allowDuplicateSelectionEvents:L=!1,disableAnimation:I=!1,isKeyboardNavigationDisabled:R=!1,loading:B=!1,emptyContent:P,centerHeaderText:T=!1,centerCellText:N=!1,onRowAction:E,onCellAction:F,onSelectionChange:$,onSortChange:O,columns:K,items:W,"data-testid":J,...Y})=>{const Z=p.useMemo(()=>({color:r,customColor:n,selectionMode:M,selectionBehavior:D,selectedKeys:j,disabledKeys:k,sortDescriptor:S,isStriped:u,isCompact:h,disableAnimation:I,showSelectionCheckboxes:C,onRowAction:E,onCellAction:F,onSelectionChange:$,onSortChange:O,centerHeaderText:T,centerCellText:N,columns:K,items:W}),[r,n,M,D,j,k,S,u,h,I,C,E,F,$,O,T,N,K,W]),ne=p.useMemo(()=>wy(r,n,a,o,w,g),[r,n,a,o,w,g]),ae=p.useMemo(()=>Cy(h,u),[h,u]),Te=y==="outside"&&x,he=y==="inside"&&x,at=v==="outside"&&b,Le=v==="inside"&&b,se={...i&&{maxHeight:i,overflowY:"auto"},...c&&l&&{height:i||400}};return f.jsx(Vc.Provider,{value:Z,children:f.jsxs("div",{className:"table-wrapper","data-testid":J,children:[Te&&f.jsx("div",{className:"table-top-content mb-4",children:x}),f.jsxs("div",{className:`${ne} ${t}`.trim(),...Y,children:[he&&f.jsx("div",{className:"table-top-content-inside p-4 border-b border-gray-200 dark:border-gray-700",children:x}),f.jsx("div",{className:"table-container overflow-auto",style:se,children:B?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsxs("div",{className:"flex items-center space-x-3",children:[f.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-gray-600 dark:border-gray-300"}),f.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Loading..."})]})}):W&&W.length===0?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("div",{className:"text-center",children:P||f.jsxs("div",{className:"text-gray-500 dark:text-gray-400",children:[f.jsx("div",{className:"text-4xl mb-2",children:"📄"}),f.jsx("div",{className:"text-lg font-medium mb-1",children:"No data available"}),f.jsx("div",{className:"text-sm",children:"There are no items to display"})]})})}):f.jsx("table",{className:`${ae} ${s==="fixed"?"table-fixed":""}`,role:"table","aria-label":"Data table",children:e})}),Le&&f.jsx("div",{className:"table-bottom-content-inside p-4 border-t border-gray-200 dark:border-gray-700",children:b})]}),at&&f.jsx("div",{className:"table-bottom-content mt-4",children:b})]})})},Ty=({children:e,className:t="",textValue:r,item:n,"data-testid":s,...a})=>{const{isStriped:o,selectedKeys:i,disabledKeys:l,onRowAction:c,customColor:d}=Sy(),u=n?.key||n?.id||r,h=u?i==="all"||i.has(u):!1,m=u?l.has(u):!1,g=ky(h,m,o,!1,!0,d),w=()=>{!m&&u&&c&&c(u)};return f.jsx("tr",{className:`${g} ${t}`.trim(),onClick:w,role:"row","aria-selected":h,"aria-disabled":m,"data-testid":s,...a,children:e})},Ay={sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-5 text-lg"},My={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Vy=(e,t)=>{const r={solid:{success:"bg-green-500 text-white border-green-500 dark:bg-green-600 dark:border-green-600",error:"bg-red-500 text-white border-red-500 dark:bg-red-600 dark:border-red-600",warning:"bg-yellow-500 text-white border-yellow-500 dark:bg-yellow-600 dark:border-yellow-600",info:"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600",default:"bg-gray-500 text-white border-gray-500 dark:bg-gray-600 dark:border-gray-600"},bordered:{success:"bg-transparent text-green-600 border-green-500 border-2 dark:bg-gray-800 dark:text-green-400 dark:border-green-500",error:"bg-transparent text-red-600 border-red-500 border-2 dark:bg-gray-800 dark:text-red-400 dark:border-red-500",warning:"bg-transparent text-yellow-600 border-yellow-500 border-2 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-500",info:"bg-transparent text-blue-600 border-blue-500 border-2 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-500",default:"bg-transparent text-gray-600 border-gray-500 border-2 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-500"},flat:{success:"bg-green-100 text-green-800 border-green-100 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800",error:"bg-red-100 text-red-800 border-red-100 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800",warning:"bg-yellow-100 text-yellow-800 border-yellow-100 dark:bg-yellow-900/30 dark:text-yellow-300 dark:border-yellow-800",info:"bg-blue-100 text-blue-800 border-blue-100 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-800",default:"bg-gray-100 text-gray-800 border-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700"},faded:{success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/20 dark:text-green-300 dark:border-green-700",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-900/20 dark:text-red-300 dark:border-red-700",warning:"bg-yellow-50 text-yellow-700 border-yellow-200 dark:bg-yellow-900/20 dark:text-yellow-300 dark:border-yellow-700",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/20 dark:text-blue-300 dark:border-blue-700",default:"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600"},shadow:{success:"bg-white text-green-600 border-green-200 shadow-lg shadow-green-500/25 dark:bg-gray-800 dark:text-green-400 dark:border-green-700 dark:shadow-green-500/10",error:"bg-white text-red-600 border-red-200 shadow-lg shadow-red-500/25 dark:bg-gray-800 dark:text-red-400 dark:border-red-700 dark:shadow-red-500/10",warning:"bg-white text-yellow-600 border-yellow-200 shadow-lg shadow-yellow-500/25 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-700 dark:shadow-yellow-500/10",info:"bg-white text-blue-600 border-blue-200 shadow-lg shadow-blue-500/25 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-700 dark:shadow-blue-500/10",default:"bg-white text-gray-600 border-gray-200 shadow-lg shadow-gray-500/25 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:shadow-gray-900/25"}};return r[t][e]||r.solid.default},Py=e=>{const t={top:"top-4 left-1/2 transform -translate-x-1/2","top-left":"top-4 left-4","top-right":"top-4 right-4",bottom:"bottom-4 left-1/2 transform -translate-x-1/2","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return t[e]||t["top-right"]},Ey=e=>{const t={top:{enter:"animate-[toast-slide-in-top_0.3s_ease-out]",exit:"animate-[toast-slide-out-top_0.2s_ease-in]"},"top-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"top-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"},bottom:{enter:"animate-[toast-slide-in-bottom_0.3s_ease-out]",exit:"animate-[toast-slide-out-bottom_0.2s_ease-in]"},"bottom-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"bottom-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"}};return t[e]||t["top-right"]},Iy=e=>{const t={success:"text-green-500 dark:text-green-400",error:"text-red-500 dark:text-red-400",warning:"text-yellow-500 dark:text-yellow-400",info:"text-blue-500 dark:text-blue-400",default:"text-gray-500 dark:text-gray-400"};return t[e]||t.default},Ny=e=>{const t={success:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg>',error:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path></svg>',warning:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg>',info:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>',default:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>'};return t[e]||t.default},Ry=()=>`toast-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,Dy=({type:e,customIcon:t})=>{if(t)return f.jsx("div",{className:"flex-shrink-0",children:t});const r=Iy(e),n=Ny(e);return f.jsx("div",{className:`flex-shrink-0 ${r}`,dangerouslySetInnerHTML:{__html:n}})},Pc=({id:e,type:t="default",title:r,description:n,closable:s=!0,action:a,icon:o,size:i="md",variant:l="solid",radius:c="md",position:d="top-right",className:u="",onRemove:h,onClose:m,"data-testid":g})=>{const[w,x]=p.useState(!1),b="flex items-start gap-3 border w-full max-w-sm pointer-events-auto",y=Ay[i],v=My[c],C=Vy(t,l),S=Ey(d),j=[b,y,v,C,w?S.exit:S.enter,u].filter(Boolean).join(" "),A=()=>{m&&m(e),x(!0),setTimeout(()=>{h(e)},200)};return p.useEffect(()=>()=>{},[]),f.jsxs("div",{className:j,"data-testid":g,children:[o!==!1&&f.jsx(Dy,{type:t,customIcon:o}),f.jsxs("div",{className:"flex-1 min-w-0",children:[r&&f.jsx("div",{className:"font-semibold text-sm mb-1 break-words",children:r}),n&&f.jsx("div",{className:"text-sm opacity-90 break-words",children:n}),a&&f.jsx("div",{className:"mt-2",children:a})]}),s&&f.jsx("button",{onClick:A,className:"flex-shrink-0 p-1 rounded-sm opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-current focus:ring-offset-1 dark:focus:ring-offset-gray-800","aria-label":"Close notification",type:"button",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ec=p.createContext(void 0);function By(e,t){switch(t.type){case"ADD_TOAST":return[...e,t.payload];case"REMOVE_TOAST":return e.filter(r=>r.id!==t.payload);case"REMOVE_ALL_TOASTS":return[];case"UPDATE_TOAST":return e.map(r=>r.id===t.payload.id?{...r,...t.payload.updates}:r);default:return e}}const Ly=({children:e,position:t="top-right",maxToasts:r=5,defaultDuration:n=5e3})=>{const[s,a]=p.useReducer(By,[]),o=p.useCallback(u=>{const h=Ry(),m={type:"default",duration:n,closable:!0,position:t,size:"md",variant:"solid",radius:"md",...u,id:h};return a({type:"ADD_TOAST",payload:m}),m.duration&&m.duration>0&&setTimeout(()=>{a({type:"REMOVE_TOAST",payload:h})},m.duration),h},[n,t]),i=p.useCallback(u=>{a({type:"REMOVE_TOAST",payload:u})},[]),l=p.useCallback(()=>{a({type:"REMOVE_ALL_TOASTS"})},[]),c=p.useCallback((u,h)=>{a({type:"UPDATE_TOAST",payload:{id:u,updates:h}})},[]);p.useEffect(()=>{s.length>r&&s.slice(0,s.length-r).forEach(h=>{a({type:"REMOVE_TOAST",payload:h.id})})},[s,r]);const d={toasts:s,addToast:o,removeToast:i,removeAllToasts:l,updateToast:c};return f.jsx(Ec.Provider,{value:d,children:e})},Ic=()=>{const e=p.useContext(Ec);if(e===void 0)throw new Error("useToastContext must be used within a ToastProvider");return e},Oy=({position:e="top-right",className:t="",maxToasts:r=5,"data-testid":n})=>{const{toasts:s,removeToast:a}=Ic(),o=s.filter(u=>(u.position||e)===e).slice(-r);if(o.length===0)return null;const c=["fixed z-50 flex flex-col gap-2 pointer-events-none",Py(e),t].filter(Boolean).join(" "),d=f.jsx("div",{className:c,"data-testid":n,children:o.map(u=>f.jsx(Pc,{...u,onRemove:a,"data-testid":`toast-${u.id}`},u.id))});return Jn.createPortal(d,document.body)},zy=()=>{const{addToast:e,removeToast:t,removeAllToasts:r,updateToast:n}=Ic(),s=p.useCallback((h,m={})=>e({type:"default",description:h,...m}),[e]),a=p.useCallback((h,m={})=>e({type:"success",description:h,...m}),[e]),o=p.useCallback((h,m={})=>e({type:"error",description:h,duration:m.duration??0,...m}),[e]),i=p.useCallback((h,m={})=>e({type:"warning",description:h,...m}),[e]),l=p.useCallback((h,m={})=>e({type:"info",description:h,...m}),[e]),c=p.useCallback(h=>{t(h)},[t]),d=p.useCallback(()=>{r()},[r]),u=p.useCallback((h,m)=>{n(h,m)},[n]);return{toast:s,success:a,error:o,warning:i,info:l,dismiss:c,dismissAll:d,update:u}},$y=50,Fy={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeOut"}},scale:{initial:{opacity:0,scale:.85,transformOrigin:"center"},animate:{opacity:1,scale:1,transformOrigin:"center"},exit:{opacity:0,scale:.85,transformOrigin:"center"},transition:{type:"spring",stiffness:400,damping:25,duration:.15}},shift:{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:500,damping:30}},bounce:{initial:{opacity:0,scale:.3,y:-20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{type:"spring",stiffness:400,damping:12,bounce:.6}},rotate:{initial:{opacity:0,scale:.8,rotate:-10},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.8,rotate:10},transition:{type:"spring",stiffness:300,damping:20}},slide:{initial:{opacity:0,x:-20,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:20,scale:.95},transition:{type:"spring",stiffness:400,damping:25}},zoom:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.3},transition:{type:"spring",stiffness:600,damping:20}},flip:{initial:{opacity:0,rotateX:-90,scale:.9},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.9},transition:{type:"spring",stiffness:300,damping:25}},elastic:{initial:{opacity:0,scale:.6,y:-30},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-15},transition:{type:"spring",stiffness:200,damping:8,bounce:.8}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},Wy=H({base:["relative","px-2","py-1","rounded-md","text-sm","font-medium","shadow-lg","border","pointer-events-auto","max-w-xs","break-words","z-50"],variants:{size:{xs:"px-1.5 py-0.5 text-xs max-w-36",sm:"px-2 py-1 text-sm max-w-48",md:"px-3 py-1.5 text-sm max-w-xs",lg:"px-4 py-2 text-base max-w-sm"},variant:{dark:["bg-gray-900","text-white","border-gray-700","shadow-lg"],light:["bg-white","text-gray-900","border-gray-200","shadow-lg"],primary:["bg-blue-600","text-white","border-blue-500","shadow-lg"],success:["bg-green-600","text-white","border-green-500","shadow-lg"],warning:["bg-yellow-500","text-yellow-900","border-yellow-400","shadow-lg"],error:["bg-red-600","text-white","border-red-500","shadow-lg"]}},defaultVariants:{size:"md",variant:"dark"}}),_y=H({base:["absolute","border-solid","border-transparent"],variants:{placement:{top:"bottom-full left-1/2 -translate-x-1/2 border-b-6","top-start":"bottom-full left-2 border-b-6","top-end":"bottom-full right-2 border-b-6",bottom:"top-full left-1/2 -translate-x-1/2 border-t-6","bottom-start":"top-full left-2 border-t-6","bottom-end":"top-full right-2 border-t-6",left:"right-full top-1/2 -translate-y-1/2 border-r-6","left-start":"right-full top-2 border-r-6","left-end":"right-full bottom-2 border-r-6",right:"left-full top-1/2 -translate-y-1/2 border-l-6","right-start":"left-full top-2 border-l-6","right-end":"left-full bottom-2 border-l-6"},variant:{dark:"",light:"",primary:"",success:"",warning:"",error:""},size:{xs:"border-[4px]",sm:"border-[5px]",md:"border-[6px]",lg:"border-[7px]"}},compoundVariants:[{placement:["top","top-start","top-end"],variant:"dark",className:"border-b-gray-900"},{placement:["top","top-start","top-end"],variant:"light",className:"border-b-white"},{placement:["top","top-start","top-end"],variant:"primary",className:"border-b-blue-600"},{placement:["top","top-start","top-end"],variant:"success",className:"border-b-green-600"},{placement:["top","top-start","top-end"],variant:"warning",className:"border-b-yellow-500"},{placement:["top","top-start","top-end"],variant:"error",className:"border-b-red-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"dark",className:"border-t-gray-900"},{placement:["bottom","bottom-start","bottom-end"],variant:"light",className:"border-t-white"},{placement:["bottom","bottom-start","bottom-end"],variant:"primary",className:"border-t-blue-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"success",className:"border-t-green-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"warning",className:"border-t-yellow-500"},{placement:["bottom","bottom-start","bottom-end"],variant:"error",className:"border-t-red-600"},{placement:["left","left-start","left-end"],variant:"dark",className:"border-r-gray-900"},{placement:["left","left-start","left-end"],variant:"light",className:"border-r-white"},{placement:["left","left-start","left-end"],variant:"primary",className:"border-r-blue-600"},{placement:["left","left-start","left-end"],variant:"success",className:"border-r-green-600"},{placement:["left","left-start","left-end"],variant:"warning",className:"border-r-yellow-500"},{placement:["left","left-start","left-end"],variant:"error",className:"border-r-red-600"},{placement:["right","right-start","right-end"],variant:"dark",className:"border-l-gray-900"},{placement:["right","right-start","right-end"],variant:"light",className:"border-l-white"},{placement:["right","right-start","right-end"],variant:"primary",className:"border-l-blue-600"},{placement:["right","right-start","right-end"],variant:"success",className:"border-l-green-600"},{placement:["right","right-start","right-end"],variant:"warning",className:"border-l-yellow-500"},{placement:["right","right-start","right-end"],variant:"error",className:"border-l-red-600"}],defaultVariants:{placement:"top",variant:"dark",size:"md"}}),Gy=H({base:["fixed","pointer-events-none","z-50"],variants:{visible:{true:"pointer-events-auto",false:"pointer-events-none"}},defaultVariants:{visible:!1}}),Go=H({base:["inline-block","cursor-help"],variants:{active:{true:"relative",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""}},defaultVariants:{active:!1,disabled:!1}}),Uy=(e,t,r)=>{let n={...Fy[e]};if((e==="shift"||e==="slide"||e==="bounce")&&t){const s=Hy(t),a=Xy[e];a&&a[s]&&(n={...a[s]})}return n},Ky=e=>Uo[e]||Uo.fade,Hy=e=>e.startsWith("top")?"top":e.startsWith("bottom")?"bottom":e.startsWith("left")?"left":e.startsWith("right")?"right":"top",Xy={shift:{top:{initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-start":{initial:{opacity:0,y:8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-end":{initial:{opacity:0,y:8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},bottom:{initial:{opacity:0,y:-8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-start":{initial:{opacity:0,y:-8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-end":{initial:{opacity:0,y:-8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},left:{initial:{opacity:0,x:8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-start":{initial:{opacity:0,x:8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-end":{initial:{opacity:0,x:8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},right:{initial:{opacity:0,x:-8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-start":{initial:{opacity:0,x:-8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-end":{initial:{opacity:0,x:-8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}}},slide:{top:{initial:{opacity:0,y:20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:20,x:10},transition:{type:"spring",stiffness:300,damping:20}},bottom:{initial:{opacity:0,y:-20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:-20,x:10},transition:{type:"spring",stiffness:300,damping:20}},left:{initial:{opacity:0,x:20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:20,y:10},transition:{type:"spring",stiffness:300,damping:20}},right:{initial:{opacity:0,x:-20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:-20,y:10},transition:{type:"spring",stiffness:300,damping:20}}},bounce:{top:{initial:{opacity:0,y:30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},bottom:{initial:{opacity:0,y:-30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},left:{initial:{opacity:0,x:30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},right:{initial:{opacity:0,x:-30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}}}},Uo={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,delay:.05}},scale:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:600,damping:25,delay:.05}},shift:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:"spring",stiffness:500,damping:30,delay:.05}},bounce:{initial:{opacity:0,scale:.3},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{type:"spring",stiffness:400,damping:15,bounce:.5,delay:.1}},rotate:{initial:{opacity:0,scale:.5,rotate:-45},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.5,rotate:45},transition:{type:"spring",stiffness:300,damping:20,delay:.05}},slide:{initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:400,damping:25,delay:.05}},zoom:{initial:{opacity:0,scale:.2},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.2},transition:{type:"spring",stiffness:700,damping:20,delay:.05}},flip:{initial:{opacity:0,rotateX:-90,scale:.8},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.8},transition:{type:"spring",stiffness:300,damping:25,delay:.05}},elastic:{initial:{opacity:0,scale:.4},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:200,damping:8,bounce:.8,delay:.1}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},Yy={enter:.15},Nc=700,Rc=300,Dc=!1,Bc=p.createContext({delayDuration:Nc,skipDelayDuration:Rc,disableHoverableContent:Dc,isPointerInTransit:!1,setIsPointerInTransit:()=>{}}),qy=()=>p.useContext(Bc),Zy=({children:e,delayDuration:t=Nc,skipDelayDuration:r=Rc,disableHoverableContent:n=Dc})=>{const[s,a]=p.useState(!1),o={delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,isPointerInTransit:s,setIsPointerInTransit:a};return f.jsx(Bc.Provider,{value:o,children:e})},Ko=(e,t,r,n={mainAxis:8,crossAxis:0})=>{const s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o={width:window.innerWidth,height:window.innerHeight};let i=0,l=0;switch(r.split("-")[0]){case"top":i=s.left+s.width/2-a.width/2,l=s.top-a.height-n.mainAxis;break;case"bottom":i=s.left+s.width/2-a.width/2,l=s.bottom+n.mainAxis;break;case"left":i=s.left-a.width-n.mainAxis,l=s.top+s.height/2-a.height/2;break;case"right":i=s.right+n.mainAxis,l=s.top+s.height/2-a.height/2;break}r.includes("-start")?r.startsWith("top")||r.startsWith("bottom")?i=s.left+n.crossAxis:l=s.top+n.crossAxis:r.includes("-end")&&(r.startsWith("top")||r.startsWith("bottom")?i=s.right-a.width-n.crossAxis:l=s.bottom-a.height-n.crossAxis);let c=r;return i<8?i=8:i+a.width>o.width-8&&(i=o.width-a.width-8),l<8?r.startsWith("top")&&s.bottom+a.height+n.mainAxis<o.height?(c=r.replace("top","bottom"),l=s.bottom+n.mainAxis):l=8:l+a.height>o.height-8&&(r.startsWith("bottom")&&s.top-a.height-n.mainAxis>0?(c=r.replace("bottom","top"),l=s.top-a.height-n.mainAxis):l=o.height-a.height-8),{x:i,y:l,placement:c}},Jy=e=>{const{placement:t="top",trigger:r="hover",disabled:n=!1,open:s,defaultOpen:a=!1,onOpenChange:o,delay:i,offset:l={mainAxis:8,crossAxis:0}}=e,c=qy(),d={show:i?.show??(r==="hover"?c?.delayDuration??700:0),hide:i?.hide??(r==="hover"?150:0)},u={mainAxis:l?.mainAxis??8,crossAxis:l?.crossAxis??0},[h,m]=p.useState(a),[g,w]=p.useState(null),[x,b]=p.useState(null),[y,v]=p.useState({x:0,y:0,placement:t}),C=p.useRef(void 0),S=p.useRef(void 0),j=p.useId(),A=s!==void 0,k=A?s:h;p.useEffect(()=>{if(g&&x&&k){const L=Ko(g,x,t,u);v(L)}},[g,x,k,t,u]),p.useEffect(()=>{if(!k||!g||!x)return;const L=()=>{const I=Ko(g,x,t,u);v(I)};return window.addEventListener("resize",L),window.addEventListener("scroll",L,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}},[k,g,x,t,l]);const V=p.useCallback(()=>{if(n)return;S.current&&(window.clearTimeout(S.current),S.current=void 0);const L=d.show;L>0?C.current=window.setTimeout(()=>{A?o?.(!0):m(!0)},L):A?o?.(!0):m(!0)},[n,d.show,A,o]),M=p.useCallback(()=>{C.current&&(window.clearTimeout(C.current),C.current=void 0);const L=d.hide;L>0?S.current=window.setTimeout(()=>{A?o?.(!1):m(!1)},L):A?o?.(!1):m(!1)},[d.hide,A,o]),D=p.useCallback(()=>{k?M():V()},[k,V,M]);p.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current),S.current&&window.clearTimeout(S.current)},[]);const z=p.useCallback(()=>{const L={"aria-describedby":k?j:void 0};if(n)return L;switch(r){case"hover":return{...L,onMouseEnter:V,onMouseLeave:M};case"click":return{...L,onClick:D};case"focus":return{...L,onFocus:V,onBlur:M};case"manual":return L;default:return L}},[n,r,j,k,V,M,D]);return{isOpen:k,referenceElement:g,setReferenceElement:w,tooltipElement:x,setTooltipElement:b,position:y,id:j,getTriggerProps:z,openTooltip:V,closeTooltip:M,toggleTooltip:D}},Qy=({variant:e="dark",size:t="md",placement:r,animation:n="fade",className:s})=>{const a=Ky(n);return f.jsx(_.div,{className:_y({placement:r,variant:e,size:t,className:s}),initial:a.initial,animate:a.animate,exit:a.exit,transition:a.transition})},ex=({content:e,variant:t="dark",size:r="md",animation:n="fade",arrow:s={enabled:!0},className:a,style:o,id:i,isOpen:l,position:c,onRef:d})=>{const u=()=>Uy(n,c.placement);return f.jsx(We,{children:l&&f.jsxs(_.div,{ref:d,id:i,role:"tooltip",className:Wy({size:r,variant:t,className:a}),style:{position:"fixed",left:c.x,top:c.y,...o},initial:u().initial,animate:u().animate,exit:u().exit,transition:{duration:Yy.enter,ease:"easeOut"},children:[e,s?.enabled&&f.jsx(Qy,{variant:t,size:r,placement:c.placement,animation:n})]})})},tx=e=>{const{children:t,content:r,disabled:n=!1,portal:s=!0,portalContainer:a,asChild:o=!1,className:i,style:l,variant:c="dark",size:d="md",animation:u="fade",arrow:h={enabled:!0},zIndex:m=$y,"aria-label":g}=e,{isOpen:w,setReferenceElement:x,setTooltipElement:b,position:y,id:v,getTriggerProps:C}=Jy(e),S=()=>{const A=C();if(o&&p.isValidElement(t)){const k=t.props,V={...k,...A,ref:M=>{x(M),typeof k.ref=="function"?k.ref(M):k.ref?.current!==void 0&&(k.ref.current=M)},className:Go({active:w,disabled:n,className:k.className})};return p.createElement(t.type,V)}return f.jsx("span",{ref:x,className:Go({active:w,disabled:n,className:i}),style:l,"aria-label":g,...A,children:t})},j=()=>{const A=f.jsx("div",{className:Gy({visible:w}),style:{zIndex:m},children:f.jsx(ex,{content:r,variant:c,size:d,animation:u,arrow:h,id:v,isOpen:w,position:y,onRef:b})});if(s){const k=a||document.body;return Jn.createPortal(A,k)}return A};return f.jsxs(f.Fragment,{children:[S(),j()]})},rx=(e=!1)=>{const t=["flex items-center gap-3","max-w-fit"];return e&&t.push("cursor-pointer","rounded-lg","px-2 py-1","transition-all duration-200 ease-in-out","hover:bg-gray-100 dark:hover:bg-gray-800","focus:outline-none","focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","data-[focus-visible]:ring-2 data-[focus-visible]:ring-blue-500"),t.join(" ")},nx=()=>["flex flex-col","justify-center","min-w-0"].join(" "),sx=()=>["text-sm font-medium","text-gray-900 dark:text-white","truncate"].join(" "),ax=()=>["text-xs","text-gray-500 dark:text-gray-400","truncate"].join(" "),ox=(e="md")=>({sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"})[e],ix=(e="default")=>({default:"bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-200",primary:"bg-blue-500 text-white",secondary:"bg-purple-500 text-white",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-white",danger:"bg-red-500 text-white"})[e],lx=(e="md",t="default",r=!1,n=!1)=>{const s=["inline-flex items-center justify-center","overflow-hidden","select-none","flex-shrink-0",ox(e),ix(t)];return r?s.push("rounded-md"):s.push("rounded-full"),n&&s.push("opacity-50 cursor-not-allowed"),s.join(" ")},cx=e=>e.split(" ").map(t=>t.charAt(0)).join("").toUpperCase().slice(0,2),dx=()=>["w-full h-full","object-cover","rounded-inherit"].join(" "),Lc=p.forwardRef(({src:e,alt:t,name:r="",size:n="md",className:s="",isSquared:a=!1,color:o="default",isDisabled:i=!1,fallback:l,...c},d)=>{const[u,h]=p.useState(!1),g=[lx(n,o,a,i),s].filter(Boolean).join(" "),w=()=>{h(!0)},x=()=>l||(e&&!u?f.jsx("img",{src:e,alt:t||r,className:dx(),onError:w}):r?f.jsx("span",{children:cx(r)}):f.jsx("svg",{className:"w-full h-full p-1",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}));return f.jsx("div",{ref:d,className:g,...c,children:x()})});Lc.displayName="Avatar";const Oc=p.forwardRef(({name:e,description:t,isFocusable:r=!1,avatarProps:n={},className:s="",classNames:a,onClick:o,"data-testid":i,...l},c)=>{const u=[rx(r),a?.base,s].filter(Boolean).join(" "),m=[nx(),a?.wrapper].filter(Boolean).join(" "),w=[sx(),a?.name].filter(Boolean).join(" "),b=[ax(),a?.description].filter(Boolean).join(" "),y=()=>{r&&o&&o()},v=C=>{r&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),o?.())};return f.jsxs("div",{ref:c,className:u,onClick:y,onKeyDown:v,tabIndex:r?0:void 0,role:r?"button":void 0,"data-testid":i,...l,children:[f.jsx(Lc,{...n,name:n.name||e,"data-testid":i?`${i}-avatar`:void 0}),(e||t)&&f.jsxs("div",{className:m,children:[e&&f.jsx("span",{className:w,"data-testid":i?`${i}-name`:void 0,children:e}),t&&f.jsx("span",{className:b,"data-testid":i?`${i}-description`:void 0,children:t})]})]})});Oc.displayName="User";const zc=p.createContext(void 0),Ks=()=>{const e=p.useContext(zc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider");return e},ux=({children:e})=>{const[t,r]=p.useState(!1),[n,s]=p.useState(!1);p.useEffect(()=>{const c=()=>{s(window.innerWidth<768)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),p.useEffect(()=>{!n&&t&&r(!1)},[n,t]);const a=p.useCallback(()=>{r(c=>!c)},[]),o=p.useCallback(()=>{r(!0)},[]),i=p.useCallback(()=>{r(!1)},[]);p.useEffect(()=>{const c=d=>{d.key==="Escape"&&t&&i()};return t&&(document.addEventListener("keydown",c),n&&(document.body.style.overflow="hidden")),()=>{document.removeEventListener("keydown",c),document.body.style.overflow="unset"}},[t,n,i]);const l={isOpen:t,isMobile:n,toggle:a,open:o,close:i};return f.jsx(zc.Provider,{value:l,children:e})},fx=({children:e,className:t="",width:r=280,position:n="left",variant:s="temporary",backdrop:a=!0,closeOnBackdropClick:o=!0,closeOnEscape:i=!0})=>{const{isOpen:l,isMobile:c,close:d}=Ks();p.useEffect(()=>{if(!i||!l)return;const b=y=>{y.key==="Escape"&&d()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[i,l,d]);const u=()=>{o&&d()},h={open:{x:0,transition:{type:"spring",stiffness:300,damping:30}},closed:{x:n==="left"?-r:r,transition:{type:"spring",stiffness:300,damping:30}}},m={open:{opacity:1,transition:{duration:.2}},closed:{opacity:0,transition:{duration:.2}}},g=()=>s==="permanent"||s==="persistent"&&!c?!0:l,w=()=>a&&l&&(c||s==="temporary"),x=["fixed top-0 z-40 h-full","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700","shadow-lg dark:shadow-2xl",n==="left"?"left-0 border-r":"right-0 border-l",s==="permanent"&&"lg:relative lg:translate-x-0",s==="persistent"&&!c&&"md:relative md:translate-x-0",t].filter(Boolean).join(" ");return f.jsxs(f.Fragment,{children:[f.jsx(We,{children:w()&&f.jsx(_.div,{initial:"closed",animate:"open",exit:"closed",variants:m,className:"fixed inset-0 z-30 bg-black/50 backdrop-blur-sm",onClick:u,role:"button",tabIndex:-1,"aria-label":"Close sidebar"})}),f.jsx(We,{mode:"wait",children:g()&&f.jsx(_.aside,{initial:"closed",animate:"open",exit:"closed",variants:h,className:x,style:{width:typeof r=="number"?`${r}px`:r},role:"complementary","aria-label":"Sidebar navigation",children:f.jsx("div",{className:"flex flex-col h-full",children:e})})})]})},px=({children:e,className:t="",showCloseButton:r=!1,onClose:n})=>{const s=["flex items-center justify-between","px-4 py-3","border-b border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsxs("div",{className:s,children:[f.jsx("div",{className:"flex-1",children:e}),r&&f.jsx("button",{onClick:n,className:"ml-2 p-1 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors","aria-label":"Close sidebar",children:f.jsx("svg",{className:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},hx=({children:e,className:t=""})=>{const r=["flex-1 overflow-y-auto","px-4 py-2","scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},mx=({children:e,className:t=""})=>{const r=["flex items-center","px-4 py-3","border-t border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},gx=({children:e,icon:t,isActive:r=!1,href:n,to:s,onClick:a,className:o="",disabled:i=!1})=>{const l=s||n,c=["flex items-center gap-3","px-3 py-2 mx-2 my-1","rounded-lg","text-sm font-medium","transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1","dark:focus:ring-offset-gray-800"],d=i?["text-gray-400 dark:text-gray-600","cursor-not-allowed"]:r?["bg-blue-100 dark:bg-blue-900/30","text-blue-900 dark:text-blue-100","border-l-4 border-blue-500","pl-2 ml-2"]:["text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white"],u=[...c,...d,o].filter(Boolean).join(" "),h=f.jsxs(f.Fragment,{children:[t&&f.jsx("span",{className:`flex-shrink-0 ${i?"opacity-50":""}`,children:t}),f.jsx("span",{className:"flex-1 truncate",children:e})]}),m={className:u,onClick:i?void 0:a,"aria-disabled":i,role:l?"link":"button"};if(l&&!i){if(s)return f.jsx(Yr,{to:s,className:u,onClick:a,children:h});if(n)return f.jsx("a",{href:n,...m,children:h})}return f.jsx("button",{type:"button",...m,disabled:i,children:h})},bx=({children:e,className:t="","aria-label":r="Toggle sidebar"})=>{const{isOpen:n,toggle:s}=Ks(),a=["inline-flex items-center justify-center","w-10 h-10","rounded-md","text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors duration-200",t].filter(Boolean).join(" ");return f.jsx("button",{onClick:s,className:a,"aria-label":r,"aria-expanded":n,children:e||f.jsx(_.div,{animate:{rotate:n?180:0},transition:{duration:.2},children:f.jsx(yx,{})})})},yx=()=>f.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),xx=p.createContext(null),$c=()=>{const e=p.useContext(xx);if(!e)throw new Error("useLibraryRouter must be used within a LibraryRouterProvider");return e},vx=({routes:e,className:t="",renderItem:r})=>{const{currentPath:n}=$c(),s=(a,o)=>f.jsxs(Yr,{to:a.path,className:`flex items-center gap-3 px-3 py-2 mx-2 my-1 rounded-lg text-sm font-medium transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 dark:focus:ring-offset-gray-800 ${o?"bg-blue-100 dark:bg-blue-900/30 text-blue-900 dark:text-blue-100 border-l-4 border-blue-500 pl-2 ml-2":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white"}`,children:[a.icon&&f.jsx("span",{className:"flex-shrink-0",children:a.icon}),f.jsx("span",{className:"flex-1 truncate",children:a.label})]},a.path);return f.jsx("nav",{className:t,children:e.map(a=>f.jsxs("div",{className:"pb-2",children:[f.jsx("h3",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:a.label}),f.jsx("div",{className:"space-y-1",children:a.routes.map(o=>{const i=o.exact?n===o.path:n.startsWith(o.path);return r?r(o,i):s(o,i)})})]},a.label))})},wx=()=>{const{navigate:e,goBack:t,goForward:r,currentPath:n,routes:s}=$c(),a=p.useCallback((c,d)=>{d?window.history.replaceState(null,"",c):e(c)},[e]),o=p.useCallback((c,d=!1)=>d?n===c:n.startsWith(c),[n]),i=p.useCallback(()=>s.find(c=>c.exact?n===c.path:n.startsWith(c.path)),[s,n]),l=p.useCallback(c=>s.find(d=>d.path===c),[s]);return{navigateTo:a,goBack:t,goForward:r,isActive:o,currentPath:n,getCurrentRoute:i,getRouteByPath:l,routes:s}},Cx=(e,t)=>e.toLowerCase().includes(t.toLowerCase());function kx(e){return e?Array.from(e):[]}function yn(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}function bt(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Fc(e){const{items:t,defaultItems:r,inputValue:n,defaultInputValue:s="",selectedKey:a,defaultSelectedKey:o,menuTrigger:i="input",allowsCustomValue:l=!1,allowsEmptyCollection:c=!0,shouldCloseOnBlur:d=!0,defaultFilter:u=Cx,filterOptions:h,isDisabled:m=!1,isReadOnly:g=!1,autoFocus:w=!1,onInputChange:x,onSelectionChange:b,onOpenChange:y,onFocus:v,onBlur:C,onFocusChange:S,onKeyDown:j,onKeyUp:A,onClose:k,onClear:V,...M}=e,D=p.useRef(null),z=p.useRef(null),[L,I]=p.useState(s),[R,B]=p.useState(o||null),[P,T]=p.useState(!1),[N]=p.useState(!1),[E,F]=p.useState(null),$=n??L,O=a??R,K=p.useMemo(()=>kx(t??r),[t,r]),W=p.useMemo(()=>!$.trim()&&i!=="focus"?c?K:[]:$.trim()?K.filter(Q=>{const de=yn(Q);return u(de,$)}):K,[K,$,u,c,i]),J=p.useCallback(Q=>{if(n===void 0&&I(Q),x?.(Q),i==="input"&&Q.trim()&&!P&&(T(!0),y?.(!0,"input")),O!==null&&!l){const de=K.find((ge,_e)=>bt(ge,_e)===O);de&&yn(de)!==Q&&(a===void 0&&B(null),b?.(null))}},[n,x,i,P,y,O,l,K,a,b]),Y=p.useCallback(Q=>{a===void 0&&B(Q),b?.(Q);const de=K.find((ge,_e)=>bt(ge,_e)===Q);if(de){const ge=yn(de);J(ge)}T(!1),y?.(!1),k?.()},[a,b,K,J,y,k]),Z=p.useCallback((Q,de)=>{T(Q),y?.(Q,de),Q||(F(null),k?.())},[y,k]),ne=p.useCallback(Q=>{if(j?.(Q),!(m||g))switch(Q.key){case"ArrowDown":if(Q.preventDefault(),!P)T(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Lt)=>bt(_e,Lt)===E):-1,ge=de<W.length-1?de+1:0;W[ge]&&F(bt(W[ge],ge))}break;case"ArrowUp":if(Q.preventDefault(),!P)T(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Lt)=>bt(_e,Lt)===E):W.length,ge=de>0?de-1:W.length-1;W[ge]&&F(bt(W[ge],ge))}break;case"Enter":Q.preventDefault(),P&&E!==null&&Y(E);break;case"Escape":Q.preventDefault(),P&&(T(!1),y?.(!1),k?.());break;case"Tab":P&&(T(!1),y?.(!1),k?.());break}},[j,m,g,P,y,E,W,Y,k]),ae=p.useCallback(Q=>{v?.(Q),S?.(!0),i==="focus"&&!P&&(T(!0),y?.(!0,"focus"))},[v,S,i,P,y]),Te=p.useCallback(Q=>{C?.(Q),S?.(!1),d&&P&&setTimeout(()=>{T(!1),y?.(!1),k?.()},150)},[C,S,d,P,y,k]),he=p.useCallback(()=>{J(""),a===void 0&&B(null),b?.(null),V?.(),D.current&&D.current.focus()},[J,a,b,V]),at=p.useCallback(Q=>{Y(Q)},[Y]),Le=p.useCallback(()=>{P||Z(!0,"manual")},[P,Z]),se=p.useCallback(()=>{P&&Z(!1)},[P,Z]);p.useEffect(()=>{w&&D.current&&D.current.focus()},[w]),p.useEffect(()=>{const Q=de=>{P&&z.current&&!z.current.contains(de.target)&&(T(!1),y?.(!1),k?.())};if(P)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[P,y,k]);const{size:Se,...ye}=M,Ze=p.useMemo(()=>({...ye,ref:D,value:$,onChange:Q=>J(Q.target.value),onFocus:ae,onBlur:Te,onKeyDown:ne,onKeyUp:A,disabled:m,readOnly:g,"aria-expanded":P,"aria-haspopup":"listbox","aria-autocomplete":"list",role:"combobox"}),[ye,$,J,ae,Te,ne,A,m,g,P]),Oe=p.useMemo(()=>({role:"listbox","aria-label":"Suggestions"}),[]),Zr=p.useMemo(()=>({isOpen:P,onOpenChange:Z}),[P,Z]),ur=p.useMemo(()=>({type:"button",onClick:he,"aria-label":"Clear",tabIndex:-1}),[he]),Ae=p.useMemo(()=>({type:"button",onClick:()=>{P?se():Le()},"aria-label":P?"Close menu":"Open menu","aria-expanded":P,tabIndex:-1}),[P,se,Le]);return{inputValue:$,selectedKey:O,isOpen:P,isLoading:N,filteredItems:W,focusedKey:E,inputProps:Ze,listboxProps:Oe,popoverProps:Zr,clearButtonProps:ur,selectorButtonProps:Ae,containerRef:z,clearValue:he,selectItem:at,close:se,open:Le,setInputValue:J,setSelectedKey:Q=>{Q===null?(a===void 0&&B(null),b?.(null)):Y(Q)},setIsOpen:Z}}const Sx=H({base:["group relative w-full","inline-flex flex-col","text-foreground-500"],variants:{variant:{flat:"",bordered:"",faded:"",underlined:""},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"",md:"",lg:""},labelPlacement:{inside:"",outside:"flex-col","outside-left":"flex-row items-center"},fullWidth:{true:"w-full",false:"w-auto"},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},disableAnimation:{true:"",false:"transition-colors duration-200 ease-in-out"}},defaultVariants:{variant:"flat",color:"default",size:"md",labelPlacement:"inside",fullWidth:!0,isDisabled:!1,disableAnimation:!1}}),jx=H({base:["relative flex w-full","min-h-unit-10 items-center gap-2","px-3 py-2","transition-colors duration-200","group-data-[focus=true]:outline-2","group-data-[focus=true]:outline-focus","group-data-[focus=true]:outline-offset-2"],variants:{variant:{flat:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"],bordered:["border-2 border-default-200","data-[hover=true]:border-default-300","group-data-[focus=true]:border-default-foreground","bg-transparent"],faded:["bg-default-100 border-2 border-transparent","data-[hover=true]:border-default-200","group-data-[focus=true]:border-default-300","group-data-[focus=true]:bg-default-50"],underlined:["rounded-none border-b-2 border-default-300","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground","bg-transparent px-1 pb-0","after:content-[''] after:w-0 after:origin-center","after:absolute after:left-1/2 after:-translate-x-1/2","after:bottom-0 after:h-[2px]","after:transition-[width] after:duration-300","group-data-[focus=true]:after:w-full"]},color:{default:"",primary:{flat:"group-data-[focus=true]:bg-primary-50",bordered:"group-data-[focus=true]:border-primary",faded:"group-data-[focus=true]:border-primary group-data-[focus=true]:bg-primary-50",underlined:["group-data-[focus=true]:border-primary","after:bg-primary"]},secondary:{flat:"group-data-[focus=true]:bg-secondary-50",bordered:"group-data-[focus=true]:border-secondary",faded:"group-data-[focus=true]:border-secondary group-data-[focus=true]:bg-secondary-50",underlined:["group-data-[focus=true]:border-secondary","after:bg-secondary"]},success:{flat:"group-data-[focus=true]:bg-success-50",bordered:"group-data-[focus=true]:border-success",faded:"group-data-[focus=true]:border-success group-data-[focus=true]:bg-success-50",underlined:["group-data-[focus=true]:border-success","after:bg-success"]},warning:{flat:"group-data-[focus=true]:bg-warning-50",bordered:"group-data-[focus=true]:border-warning",faded:"group-data-[focus=true]:border-warning group-data-[focus=true]:bg-warning-50",underlined:["group-data-[focus=true]:border-warning","after:bg-warning"]},danger:{flat:"group-data-[focus=true]:bg-danger-50",bordered:"group-data-[focus=true]:border-danger",faded:"group-data-[focus=true]:border-danger group-data-[focus=true]:bg-danger-50",underlined:["group-data-[focus=true]:border-danger","after:bg-danger"]}},size:{sm:"min-h-unit-8 px-2 py-1",md:"min-h-unit-10 px-3 py-2",lg:"min-h-unit-12 px-4 py-3"},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},labelPlacement:{inside:"",outside:"","outside-left":""},isInvalid:{true:{flat:"bg-danger-50 text-danger",bordered:"border-danger data-[hover=true]:border-danger",faded:"border-danger bg-danger-50",underlined:"border-danger after:bg-danger"},false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{variant:"underlined",size:"sm",class:"px-1 pb-0"},{variant:"underlined",size:"md",class:"px-1 pb-0"},{variant:"underlined",size:"lg",class:"px-1 pb-0"}],defaultVariants:{variant:"flat",color:"default",size:"md",radius:"md",labelPlacement:"inside",isInvalid:!1,isDisabled:!1}});H({base:["w-full font-normal bg-transparent outline-none","placeholder:text-foreground-500","text-small text-foreground"],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},isDisabled:{true:"pointer-events-none",false:""}},defaultVariants:{size:"md",isDisabled:!1}});H({base:["block text-foreground-600","cursor-pointer","transition-colors duration-200","will-change-auto","origin-top-left"],variants:{size:{sm:"text-small",md:"text-small",lg:"text-medium"},labelPlacement:{inside:["absolute left-3 rtl:left-auto rtl:right-3","pointer-events-none z-10","transition-[transform,color,left,opacity] duration-200 ease-out","group-data-[filled=true]:scale-85","group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]","group-data-[filled=true]:pointer-events-auto"],outside:["relative text-foreground pb-1.5","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"],"outside-left":["relative text-foreground pr-2 rtl:pr-0 rtl:pl-2","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"]},color:{default:"",primary:"group-data-[focus=true]:text-primary",secondary:"group-data-[focus=true]:text-secondary",success:"group-data-[focus=true]:text-success",warning:"group-data-[focus=true]:text-warning",danger:"group-data-[focus=true]:text-danger"},isRequired:{true:"after:content-['*'] after:text-danger after:ml-0.5",false:""},isInvalid:{true:"!text-danger",false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{labelPlacement:"inside",size:"sm",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]","left-2 rtl:left-auto rtl:right-2"]},{labelPlacement:"inside",size:"lg",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]","left-4 rtl:left-auto rtl:right-4"]}],defaultVariants:{size:"md",labelPlacement:"inside",color:"default",isRequired:!1,isInvalid:!1,isDisabled:!1}});H({base:"text-small text-foreground-400 px-1",variants:{color:{default:"text-foreground-400",primary:"text-primary-600",secondary:"text-secondary-600",success:"text-success-600",warning:"text-warning-600",danger:"text-danger-500"},isInvalid:{true:"text-danger-500",false:""}},defaultVariants:{color:"default",isInvalid:!1}});const Tx=H({base:["w-full p-1 min-w-[200px]","bg-content1 border border-divider","rounded-medium shadow-large"],variants:{disableAnimation:{true:"",false:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200"}},defaultVariants:{disableAnimation:!1}});H({base:"max-h-64 overflow-auto",variants:{maxHeight:{sm:"max-h-32",md:"max-h-64",lg:"max-h-96",none:"max-h-none"}},defaultVariants:{maxHeight:"md"}});H({base:"flex items-center gap-1.5"});H({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-colors","opacity-0 data-[visible=true]:opacity-100","transition-opacity duration-150"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"}},defaultVariants:{size:"md"}});H({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-all duration-150","data-[open=true]:rotate-180"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"},disableRotation:{true:"data-[open=true]:rotate-0",false:""}},defaultVariants:{size:"md",disableRotation:!1}});H({base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],variants:{color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},variant:{solid:"",bordered:"border-2 border-transparent bg-transparent",light:"bg-transparent",flat:"",faded:"border-2 border-transparent",shadow:""},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},isSelected:{true:"",false:""},showDivider:{true:"mb-1.5 border-b border-divider pb-1.5",false:""}},compoundVariants:[{color:"default",variant:"solid",class:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]},{color:"default",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]},{color:"primary",variant:"solid",class:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]},{color:"primary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]},{color:"secondary",variant:"solid",class:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]},{color:"secondary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]},{color:"success",variant:"solid",class:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]},{color:"success",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]},{color:"warning",variant:"solid",class:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]},{color:"warning",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]},{color:"danger",variant:"solid",class:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]},{color:"danger",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}],defaultVariants:{color:"default",variant:"flat",isDisabled:!1,isSelected:!1,showDivider:!1}});const Ax=H({slots:{base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],wrapper:["w-full flex items-center gap-2"],title:["flex-1 text-small font-normal truncate","text-foreground group-data-[selected=true]:text-inherit"],description:["w-full text-tiny text-foreground-400 truncate","group-data-[selected=true]:text-inherit group-data-[selected=true]:opacity-70"],startContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"],endContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"]},variants:{color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},variant:{solid:{},bordered:{base:"border-2 border-transparent bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-2 border-transparent"},shadow:{}},size:{sm:{base:"px-1 py-1 text-tiny gap-1",title:"text-tiny",description:"text-tiny"},md:{base:"px-2 py-1.5 text-small gap-2",title:"text-small",description:"text-tiny"},lg:{base:"px-3 py-2 text-medium gap-3",title:"text-medium",description:"text-small"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"},false:{}},isSelected:{true:{},false:{}},isFocused:{true:{base:"data-[focus-visible=true]:outline-2 data-[focus-visible=true]:outline-offset-2 data-[focus-visible=true]:outline-focus"},false:{}},showDivider:{true:{base:"mb-1.5 border-b border-divider pb-1.5"},false:{}}},compoundVariants:[{color:"default",variant:"solid",class:{base:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]}},{color:"default",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]}},{color:"primary",variant:"solid",class:{base:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]}},{color:"primary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]}},{color:"secondary",variant:"solid",class:{base:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]}},{color:"secondary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]}},{color:"success",variant:"solid",class:{base:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]}},{color:"success",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]}},{color:"warning",variant:"solid",class:{base:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]}},{color:"warning",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]}},{color:"danger",variant:"solid",class:{base:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]}},{color:"danger",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}}],defaultVariants:{color:"default",variant:"flat",size:"md",isDisabled:!1,isSelected:!1,isFocused:!1,showDivider:!1}});H({base:"relative mb-2",variants:{showDivider:{true:"pb-1 mb-2 border-b border-divider",false:""}},defaultVariants:{showDivider:!1}});const Mx=H({slots:{base:["relative mb-2"],heading:["text-small font-medium text-default-500","px-2 py-1 select-none"],group:["w-full"],divider:["w-full h-px bg-divider my-2"]},variants:{showDivider:{true:{base:"pb-1 mb-2"},false:{}}},defaultVariants:{showDivider:!1}});H({base:["text-small font-medium text-default-500","px-2 py-1"]});H({base:"space-y-0.5"});const Br=p.forwardRef(({children:e,className:t,classNames:r,textValue:n,startContent:s,endContent:a,description:o,isSelected:i=!1,isFocused:l=!1,isDisabled:c=!1,showDivider:d=!1,variant:u="flat",color:h="default",size:m="md",itemKey:g,onSelectionChange:w,onPress:x,onPressStart:b,onPressEnd:y,onClick:v,onMouseDown:C,onKeyDown:S,...j},A)=>{const[k,V]=p.useState(!1),M=p.useCallback(()=>{c||(x?.(),g!==void 0&&w&&w(g))},[c,x,g,w]),D=p.useCallback(N=>{c||(N.preventDefault(),N.stopPropagation(),v?.(N),M())},[c,v,M]),z=p.useCallback(N=>{c||(N.preventDefault(),C?.(N),b?.())},[c,C,b]),L=p.useCallback(()=>{c||y?.()},[c,y]),I=p.useCallback(N=>{c||(S?.(N),(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),M()))},[c,S,M]),R=p.useMemo(()=>Ax({variant:u,color:h,size:m,isSelected:i,isFocused:l,isDisabled:c,showDivider:d}),[u,h,m,i,l,c,d]),B=o!=null&&o!=="",P=s!=null,T=a!=null;return f.jsx("li",{ref:A,className:q(R.base(),r?.base,t),role:"option","aria-selected":i,"aria-disabled":c,tabIndex:l?0:-1,"data-key":g,"data-selected":i,"data-focused":l,"data-disabled":c,"data-hover":k,onClick:D,onMouseDown:z,onMouseUp:L,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onKeyDown:I,...j,children:f.jsxs("div",{className:q(R.wrapper(),r?.wrapper),children:[P&&f.jsx("div",{className:q(R.startContent(),r?.startContent),children:s}),f.jsxs("div",{className:"flex-1 flex flex-col justify-center min-w-0",children:[f.jsx("div",{className:q(R.title(),r?.title),children:e||n}),B&&f.jsx("div",{className:q(R.description(),r?.description),children:o})]}),T&&f.jsx("div",{className:q(R.endContent(),r?.endContent),children:a})]})})});Br.displayName="AutocompleteItem";const Vx=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),Px=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})});function Ex(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Ix(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}const Wc=p.forwardRef(({label:e,placeholder:t="Search...",description:r,errorMessage:n,startContent:s,endContent:a,variant:o="flat",color:i="default",size:l="md",labelPlacement:c="inside",isDisabled:d=!1,isReadOnly:u=!1,isRequired:h=!1,isInvalid:m=!1,isClearable:g=!0,fullWidth:w=!0,disableAnimation:x=!1,disableSelectorIconRotation:b=!1,selectorIcon:y,clearIcon:v,className:C,classNames:S,popoverProps:j,listboxProps:A,inputProps:k,selectorButtonProps:V,clearButtonProps:M,children:D,...z},L)=>{const[I,R]=p.useState(!1),{inputValue:B,selectedKey:P,isOpen:T,filteredItems:N,focusedKey:E,inputProps:F,listboxProps:$,clearButtonProps:O,selectorButtonProps:K,containerRef:W,selectItem:J}=Fc(z),Y=p.useMemo(()=>Sx({variant:o,color:i,size:l,labelPlacement:c,isDisabled:d,fullWidth:w}),[o,i,l,c,d,w]),Z=p.useMemo(()=>jx({variant:o,color:i,size:l,isDisabled:d,isInvalid:m}),[o,i,l,d,m]),ne=p.useMemo(()=>Tx({disableAnimation:x}),[x]),ae=p.useCallback(se=>{J(se)},[J]),Te=p.useCallback(()=>D||N.map((se,Se)=>{const ye=Ex(se,Se),Ze=Ix(se);if(typeof se=="object"&&se!==null){const Oe=se;return f.jsx(Br,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,startContent:Oe.startContent,endContent:Oe.endContent,description:Oe.description,onSelectionChange:ae,children:Oe.label||Ze},ye)}return f.jsx(Br,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,onSelectionChange:ae,children:Ze},ye)}),[D,N,P,E,o,i,l,ae]),he=p.useMemo(()=>f.jsx(Vx,{className:q("w-4 h-4 text-default-400 transition-transform",!b&&T&&"rotate-180")}),[b,T]),at=p.useMemo(()=>f.jsx(Px,{className:"w-4 h-4 text-default-400"}),[]),Le=g&&B&&!d&&!u;return f.jsxs("div",{ref:se=>{typeof L=="function"?L(se):L&&(L.current=se),W&&(W.current=se)},className:q("relative",Y,S?.base,C),children:[e&&c==="outside"&&f.jsxs("label",{className:"text-small font-medium text-foreground pb-1 block",children:[e,h&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:q(Z,S?.inputWrapper),style:{zIndex:1},children:[s&&f.jsx("div",{className:"flex items-center",children:s}),f.jsx("input",{...F,...k,className:q("w-full bg-transparent outline-none placeholder:text-foreground-500",F.className,k?.className),placeholder:T||I||B?t:"",disabled:d,readOnly:u,required:h,onFocus:se=>{R(!0),F.onFocus?.(se)},onBlur:se=>{R(!1),F.onBlur?.(se)}}),e&&c==="inside"&&f.jsxs("label",{className:q("absolute left-3 transition-all duration-200 pointer-events-none z-10","text-small text-foreground-500","top-1/2 -translate-y-1/2 origin-left",(B||T||I)&&["text-tiny scale-85 -translate-y-[1.875rem] px-1 bg-content1","text-foreground-600"]),style:{zIndex:10},children:[e,h&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[a,Le&&f.jsx("button",{...O,...M,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",O.className,M?.className),children:v||at}),f.jsx("button",{...K,...V,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",K.className,V?.className),disabled:d,children:y||he})]})]}),r&&f.jsx("div",{className:"text-tiny text-foreground-400 mt-1",children:r}),m&&n&&f.jsx("div",{className:"text-tiny text-danger mt-1",children:typeof n=="function"?n({isInvalid:!0,validationErrors:[],validationDetails:{}}):n}),f.jsx(We,{children:T&&f.jsx(_.div,{initial:x?void 0:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:x?void 0:{opacity:0,y:-8},transition:{duration:x?0:.15,ease:"easeOut"},className:q("absolute top-full left-0 right-0 mt-1 z-[9999]",ne,S?.popoverContent,j?.className),style:{zIndex:9999},children:f.jsx("div",{className:q("max-h-64 overflow-y-auto overflow-x-hidden bg-content1 rounded-medium",S?.listboxWrapper),children:f.jsxs("ul",{...$,...A,className:q("w-full p-1 bg-content1 rounded-medium",$.className,A?.className),children:[Te(),N.length===0&&!D&&f.jsx("li",{className:"px-2 py-4 text-small text-foreground-400 text-center",children:A?.emptyContent||"No results found"})]})})})})]})});Wc.displayName="Autocomplete";const _c=p.forwardRef(({title:e,children:t,className:r,classNames:n,showDivider:s=!1,...a},o)=>{const i=p.useMemo(()=>Mx({showDivider:s}),[s]),l=e!=null&&e!=="";return f.jsxs("div",{ref:o,className:q(i.base(),n?.base,r),role:"group",...a,children:[l&&f.jsx("div",{className:q(i.heading(),n?.heading),role:"presentation",children:e}),f.jsx("div",{className:q(i.group(),n?.group),role:"group",children:t}),s&&f.jsx("div",{className:q(i.divider(),n?.divider),role:"separator"})]})});_c.displayName="AutocompleteSection";const Nx=(e,t,r=1,n=!0)=>{const s=[],a=(l,c,d=!1,u=!1)=>({type:l,value:c,isActive:d,isDisabled:u,key:`${l}-${c}`});s.push(a("page",1,e===1));const o=Math.max(2,e-r),i=Math.min(t-1,e+r);n&&o>2&&s.push(a("dots","...",!1,!0));for(let l=o;l<=i;l++)l!==1&&l!==t&&s.push(a("page",l,e===l));return n&&i<t-1&&s.push(a("dots","...",!1,!0)),t>1&&s.push(a("page",t,e===t)),s};function Gc(e){const{total:t,page:r,defaultPage:n=1,initialPage:s,siblings:a=1,showDots:o=!0,loop:i=!1,onChange:l}=e,c=r!==void 0,d=s??n,[u,h]=p.useState(d),g=Math.max(1,Math.min(t,c?r:u)),w=p.useMemo(()=>t<=0?[]:Nx(g,t,a,o),[g,t,a,o]),x=p.useCallback(A=>{const k=Math.max(1,Math.min(t,A));k!==g&&(c||h(k),l?.(k))},[c,g,t,l]),b=p.useCallback(()=>{g<t?x(g+1):i&&x(1)},[g,t,i,x]),y=p.useCallback(()=>{g>1?x(g-1):i&&x(t)},[g,t,i,x]),v=p.useCallback(()=>{x(1)},[x]),C=p.useCallback(()=>{x(t)},[x,t]);return{activePage:g,range:w,setPage:x,next:b,previous:y,first:v,last:C,isFirst:g===1,isLast:g===t,totalPages:t}}const Rx={xs:"min-w-6 h-6 text-xs px-1",sm:"min-w-8 h-8 text-sm px-2",md:"min-w-10 h-10 text-base px-3",lg:"min-w-12 h-12 text-lg px-4",xl:"min-w-14 h-14 text-xl px-5"},Ho={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},Dx={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Uc=(e,t,r=!1,n=!1)=>{const s={default:{flat:{base:"bg-default-100 text-default-600 hover:bg-default-200",active:"bg-default-300 text-default-800 font-medium",disabled:"bg-default-50 text-default-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-default-200 text-default-600 hover:border-default-300 hover:bg-default-50",active:"bg-default-100 border-default-400 text-default-800 font-medium",disabled:"bg-transparent border-default-100 text-default-300 cursor-not-allowed"},light:{base:"bg-transparent text-default-600 hover:bg-default-100",active:"bg-default-200 text-default-800 font-medium",disabled:"bg-transparent text-default-300 cursor-not-allowed"},faded:{base:"bg-default-100/50 text-default-600 hover:bg-default-200/70",active:"bg-default-300/80 text-default-800 font-medium",disabled:"bg-default-50/30 text-default-300 cursor-not-allowed"}},primary:{flat:{base:"bg-primary-100 text-primary-600 hover:bg-primary-200",active:"bg-primary-500 text-white font-medium",disabled:"bg-primary-50 text-primary-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-primary-200 text-primary-600 hover:border-primary-300 hover:bg-primary-50",active:"bg-primary-500 border-primary-500 text-white font-medium",disabled:"bg-transparent border-primary-100 text-primary-300 cursor-not-allowed"},light:{base:"bg-transparent text-primary-600 hover:bg-primary-100",active:"bg-primary-200 text-primary-800 font-medium",disabled:"bg-transparent text-primary-300 cursor-not-allowed"},faded:{base:"bg-primary-100/50 text-primary-600 hover:bg-primary-200/70",active:"bg-primary-500/90 text-white font-medium",disabled:"bg-primary-50/30 text-primary-300 cursor-not-allowed"}},secondary:{flat:{base:"bg-purple-100 text-purple-600 hover:bg-purple-200",active:"bg-purple-500 text-white font-medium",disabled:"bg-purple-50 text-purple-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-purple-200 text-purple-600 hover:border-purple-300 hover:bg-purple-50",active:"bg-purple-500 border-purple-500 text-white font-medium",disabled:"bg-transparent border-purple-100 text-purple-300 cursor-not-allowed"},light:{base:"bg-transparent text-purple-600 hover:bg-purple-100",active:"bg-purple-200 text-purple-800 font-medium",disabled:"bg-transparent text-purple-300 cursor-not-allowed"},faded:{base:"bg-purple-100/50 text-purple-600 hover:bg-purple-200/70",active:"bg-purple-500/90 text-white font-medium",disabled:"bg-purple-50/30 text-purple-300 cursor-not-allowed"}},success:{flat:{base:"bg-green-100 text-green-600 hover:bg-green-200",active:"bg-green-500 text-white font-medium",disabled:"bg-green-50 text-green-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-green-200 text-green-600 hover:border-green-300 hover:bg-green-50",active:"bg-green-500 border-green-500 text-white font-medium",disabled:"bg-transparent border-green-100 text-green-300 cursor-not-allowed"},light:{base:"bg-transparent text-green-600 hover:bg-green-100",active:"bg-green-200 text-green-800 font-medium",disabled:"bg-transparent text-green-300 cursor-not-allowed"},faded:{base:"bg-green-100/50 text-green-600 hover:bg-green-200/70",active:"bg-green-500/90 text-white font-medium",disabled:"bg-green-50/30 text-green-300 cursor-not-allowed"}},warning:{flat:{base:"bg-yellow-100 text-yellow-700 hover:bg-yellow-200",active:"bg-yellow-500 text-white font-medium",disabled:"bg-yellow-50 text-yellow-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-yellow-200 text-yellow-700 hover:border-yellow-300 hover:bg-yellow-50",active:"bg-yellow-500 border-yellow-500 text-white font-medium",disabled:"bg-transparent border-yellow-100 text-yellow-300 cursor-not-allowed"},light:{base:"bg-transparent text-yellow-700 hover:bg-yellow-100",active:"bg-yellow-200 text-yellow-800 font-medium",disabled:"bg-transparent text-yellow-400 cursor-not-allowed"},faded:{base:"bg-yellow-100/50 text-yellow-700 hover:bg-yellow-200/70",active:"bg-yellow-500/90 text-white font-medium",disabled:"bg-yellow-50/30 text-yellow-300 cursor-not-allowed"}},danger:{flat:{base:"bg-red-100 text-red-600 hover:bg-red-200",active:"bg-red-500 text-white font-medium",disabled:"bg-red-50 text-red-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-red-200 text-red-600 hover:border-red-300 hover:bg-red-50",active:"bg-red-500 border-red-500 text-white font-medium",disabled:"bg-transparent border-red-100 text-red-300 cursor-not-allowed"},light:{base:"bg-transparent text-red-600 hover:bg-red-100",active:"bg-red-200 text-red-800 font-medium",disabled:"bg-transparent text-red-300 cursor-not-allowed"},faded:{base:"bg-red-100/50 text-red-600 hover:bg-red-200/70",active:"bg-red-500/90 text-white font-medium",disabled:"bg-red-50/30 text-red-300 cursor-not-allowed"}}};return n?s[e][t].disabled:r?s[e][t].active:s[e][t].base},Bx=(e,t,r=!1)=>{const n=Uc(e,t,!1,r);return r?n:`${n} transition-all duration-200 ease-in-out hover:scale-105 active:scale-95`},Lx=e=>`${{xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-14 h-14 text-xl"}[e]} flex items-center justify-center text-default-400 cursor-default select-none`,Kc=(e=!1,t=!1)=>e||t?"transition-colors duration-200 ease-in-out":"transition-all duration-200 ease-in-out transform hover:scale-105 active:scale-95",Hc=(e,t)=>{const r=Rx[e],n=Dx[t];return`${r} ${n} flex items-center justify-center font-medium select-none outline-none focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2`},Ox=(e,t=!1,r=!1)=>`flex items-center justify-center ${r?Ho.xs:Ho[e]} ${t?"shadow-sm":""}`.trim(),je={size:"md",color:"primary",variant:"flat",radius:"md",siblings:1,showControls:!0,showFirstLast:!1,showPages:!0,showDots:!0,loop:!1,compact:!1,showShadow:!1,disableAnimation:!1},Hs=p.forwardRef(({value:e,type:t="page",isActive:r=!1,isDisabled:n=!1,onClick:s,children:a,className:o="",size:i,color:l,variant:c,radius:d,"aria-label":u,"data-testid":h},m)=>{const g=qr(),w=i??g.size,x=l??g.color,b=c??g.variant,y=d??g.radius,v=g.isDisabled,C=g.disableAnimation,S=v||n,j=Hc(w,y),A=Uc(x,b,r,S),k=Kc(C,S),V=()=>{S||t==="dots"||s?.(e)},M=t==="page"?r?`Current page, page ${e}`:`Go to page ${e}`:u,D=`${j} ${A} ${k} ${o}`.trim();return f.jsx("button",{ref:m,type:"button",disabled:S,onClick:V,className:D,"aria-label":M,"aria-current":r?"page":void 0,"data-testid":h,children:a??e})});Hs.displayName="PaginationItem";const dr=p.forwardRef(({direction:e,isDisabled:t=!1,onClick:r,children:n,className:s="",size:a,color:o,variant:i,radius:l,"aria-label":c,"data-testid":d},u)=>{const h=qr(),m=a??h.size,g=o??h.color,w=i??h.variant,x=l??h.radius,b=h.isDisabled,y=h.disableAnimation,v=b||t,C=Hc(m,x),S=Bx(g,w,v),j=Kc(y,v),A=()=>{v||r?.()},k=e==="prev"?"Go to previous page":"Go to next page",V=`${C} ${S} ${j} ${s}`.trim();return f.jsx("button",{ref:u,type:"button",disabled:v,onClick:A,className:V,"aria-label":c??k,"data-testid":d,children:n})});dr.displayName="BasePaginationCursor";const Xs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"prev","aria-label":"Go to previous page",...e}));Xs.displayName="PaginationPrevious";const Ys=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"next","aria-label":"Go to next page",...e}));Ys.displayName="PaginationNext";const qs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"prev","aria-label":"Go to first page",...e}));qs.displayName="PaginationFirst";const Zs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"next","aria-label":"Go to last page",...e}));Zs.displayName="PaginationLast";const Js=p.forwardRef(({className:e="",size:t,children:r,"data-testid":n},s)=>{const a=qr(),o=t??a.size,l=`${Lx(o)} ${e}`.trim();return f.jsx("span",{ref:s,className:l,"aria-hidden":"true",role:"presentation","data-testid":n,children:r??"…"})});Js.displayName="PaginationEllipsis";const Cr={prev:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"15,18 9,12 15,6"})}),next:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"9,18 15,12 9,6"})}),first:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"11,17 6,12 11,7"}),f.jsx("polyline",{points:"18,17 13,12 18,7"})]}),last:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"13,17 18,12 13,7"}),f.jsx("polyline",{points:"6,17 11,12 6,7"})]})},Xc=p.createContext(null),qr=()=>{const e=p.useContext(Xc);if(!e)throw new Error("usePaginationContext must be used within a Pagination component");return e},Yc=({total:e,page:t,defaultPage:r=1,initialPage:n,onChange:s,onPageChange:a,size:o=je.size,color:i=je.color,variant:l=je.variant,radius:c=je.radius,isDisabled:d=!1,disableAnimation:u=je.disableAnimation,controls:h={},display:m={},className:g="",style:w,"aria-label":x="Pagination Navigation","data-testid":b})=>{const y={showControls:je.showControls,showFirstLast:je.showFirstLast,placement:"both",labels:{prev:f.jsx(Cr.prev,{}),next:f.jsx(Cr.next,{}),first:f.jsx(Cr.first,{}),last:f.jsx(Cr.last,{})},...h},v={showPages:je.showPages,siblings:je.siblings,showDots:je.showDots,loop:je.loop,compact:je.compact,showShadow:je.showShadow,...m},C=Gc({total:e,page:t,defaultPage:r,initialPage:n,siblings:v.siblings,showDots:v.showDots,loop:v.loop,onChange:M=>{s?.(M),a?.(M)}}),S={activePage:C.activePage,totalPages:C.totalPages,setPage:C.setPage,size:o,color:i,variant:l,radius:c,isDisabled:d,disableAnimation:u,controls:y,display:v},j=Ox(o,v.showShadow,v.compact),A=M=>!y.showFirstLast||y.placement!=="both"&&y.placement!==M?null:M==="start"?f.jsx(qs,{isDisabled:d||C.isFirst,onClick:C.first,children:y.labels.first}):f.jsx(Zs,{isDisabled:d||C.isLast,onClick:C.last,children:y.labels.last}),k=M=>!y.showControls||y.placement!=="both"&&y.placement!==M?null:M==="start"?f.jsx(Xs,{isDisabled:d||C.isFirst,onClick:C.previous,children:y.labels.prev}):f.jsx(Ys,{isDisabled:d||C.isLast,onClick:C.next,children:y.labels.next}),V=()=>v.showPages?C.range.map(M=>M.type==="dots"?f.jsx(Js,{},M.key):f.jsx(Hs,{type:"page",value:M.value,isActive:M.isActive,isDisabled:d||M.isDisabled,onClick:()=>!d&&!M.isDisabled&&C.setPage(M.value),children:M.value},M.key)):null;return f.jsx(Xc.Provider,{value:S,children:f.jsxs("nav",{role:"navigation","aria-label":x,className:`${j} ${g}`.trim(),style:w,"data-testid":b,children:[A("start"),k("start"),V(),k("end"),A("end")]})})};Yc.displayName="Pagination";const Xt=e=>({linear:"linear",easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],backIn:[.6,-.05,.01,.99],backOut:[.12,0,.39,0],backInOut:[.37,0,.63,1],bounceIn:[.6,-.28,.735,.045],bounceOut:[.175,.885,.32,1.275],bounceInOut:[.68,-.55,.265,1.55]})[e],zx=(e,t,r=.05,n=.6)=>{const s=e.split(" "),a=[],o=[],i=e.split(`
14
+ `.replace(/\s+/g," ").trim(),htmlFor:E,"data-testid":E?`${E}-label`:void 0,style:{zIndex:10},children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):f.jsxs("label",{id:Q,className:rd,htmlFor:E,"data-testid":E?`${E}-label`:void 0,children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):null,fd=f.jsx("input",{...K,ref:W||Le,id:E,type:Zr,value:Se,placeholder:h==="inside"?Z||Se?t:"":t,disabled:v,readOnly:C,required:y,minLength:w,maxLength:x,pattern:b,className:ad,onChange:_e,onFocus:Lt,onBlur:Zc,onKeyDown:T,onKeyUp:N,"aria-label":F,"aria-labelledby":e?Q:$,"aria-describedby":[de,ge,O].filter(Boolean).join(" ")||void 0,"aria-invalid":Ae,"data-testid":E?`${E}-input`:void 0,"data-has-start-content":!!s,"data-has-end-content":!!(a||j||Oe)});return f.jsxs("div",{ref:z,className:ed,"data-testid":E,"data-invalid":Ae,"data-required":y,"data-readonly":C,"data-disabled":v,"data-focus":Z,"data-focus-within":Z,"data-focus-visible":Z,"data-filled":Ze,"data-has-label":!!e,"data-has-helper":!!(r||Ae),children:[f.jsxs("div",{className:td,children:[h==="outside-left"&&Jr(),f.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[h==="outside"&&Jr(),f.jsxs("div",{className:nd,children:[h==="inside"&&Jr(),f.jsxs("div",{className:sd,children:[s&&Z&&f.jsx("div",{className:ea,"data-testid":E?`${E}-start-content`:void 0,children:s}),fd,a&&f.jsx("div",{className:ea,"data-testid":E?`${E}-end-content`:void 0,children:a}),ud(),dd()]})]})]})]}),(r||Ae)&&f.jsxs("div",{className:od,children:[r&&f.jsx("div",{id:de,className:id,"data-testid":E?`${E}-description`:void 0,children:r}),Ae&&f.jsx("div",{id:ge,className:ld,"data-testid":E?`${E}-error-message`:void 0,children:cd()})]})]})});wc.displayName="Input";const rr=H({slots:{wrapper:["fixed","inset-0","z-50","flex","items-center","justify-center","p-4","sm:p-0","overflow-hidden"],base:["relative","flex","flex-col","w-full","box-border","outline-none","mx-1","my-1","sm:mx-6","sm:my-16","bg-white","dark:bg-gray-800","text-gray-900","dark:text-gray-100","shadow-large","rounded-large","max-h-[calc(100vh_-_2rem)]","sm:max-h-[calc(100vh_-_8rem)]","data-[open=true]:animate-in","data-[open=false]:animate-out","data-[open=false]:fade-out-0","data-[open=true]:fade-in-0","data-[open=false]:zoom-out-95","data-[open=true]:zoom-in-95","data-[open=false]:slide-out-to-left-1/2","data-[open=false]:slide-out-to-top-[48%]","data-[open=true]:slide-in-from-left-1/2","data-[open=true]:slide-in-from-top-[48%]","data-[open=false]:duration-200","data-[open=true]:duration-200"],backdrop:["fixed","inset-0","z-50","bg-black/50","dark:bg-black/70","data-[enter]:animate-in","data-[exit]:animate-out","data-[enter]:fade-in-0","data-[exit]:fade-out-0","data-[enter]:duration-200","data-[exit]:duration-150"],header:["flex","py-4","px-6","relative","flex-col","gap-1","text-large","font-semibold","border-b","border-gray-200","dark:border-gray-700"],body:["relative","flex-1","px-6","py-2","flex","flex-col","gap-3","min-h-0"],footer:["flex","flex-row","gap-2","px-6","py-4","justify-end","border-t","border-gray-200","dark:border-gray-700"],closeButton:["absolute","appearance-none","outline-none","select-none","top-1","right-1","rtl:right-auto","rtl:left-1","p-2","text-gray-500","dark:text-gray-400","rounded-full","hover:bg-gray-100","dark:hover:bg-gray-700","active:bg-gray-200","dark:active:bg-gray-600","tap-highlight-transparent","transition-opacity","data-[pressed=true]:scale-95","transition-transform","z-10"]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"max-w-full max-h-full my-0 mx-0 sm:my-0 sm:mx-0 rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"bg-transparent"},opaque:{backdrop:"bg-black/50 dark:bg-black/70"},blur:{backdrop:"bg-black/30 dark:bg-black/50 backdrop-blur-sm backdrop-saturate-150"}},scrollBehavior:{normal:{base:"overflow-hidden",body:"overflow-y-auto max-h-[60vh]"},inside:{base:"max-h-[calc(100vh_-_8rem)] overflow-hidden flex flex-col",body:"overflow-y-auto flex-1 min-h-0"},outside:{wrapper:"items-start sm:items-center overflow-y-auto py-8",base:"my-0 max-h-fit overflow-visible",body:"overflow-visible"}},placement:{auto:{wrapper:"items-end sm:items-center",base:"sm:my-16 my-2"},top:{wrapper:"items-start",base:"mt-2 mb-auto"},"top-center":{wrapper:"items-start sm:items-center",base:"mt-2 sm:mt-16 mb-auto"},center:{wrapper:"items-center",base:"my-auto"},bottom:{wrapper:"items-end",base:"mb-2 mt-auto"},"bottom-center":{wrapper:"items-end sm:items-center",base:"mb-2 sm:mb-16 mt-auto"}},disableAnimation:{true:{base:["data-[open=true]:animate-none","data-[open=false]:animate-none"],backdrop:["data-[enter]:animate-none","data-[exit]:animate-none"]}},isDraggable:{true:{header:"cursor-move select-none active:cursor-grabbing",base:"cursor-default"}}},defaultVariants:{size:"md",radius:"lg",shadow:"lg",backdrop:"opaque",scrollBehavior:"normal",placement:"auto",disableAnimation:!1,isDraggable:!1}}),Cc=p.createContext(null),Us=()=>{const e=p.useContext(Cc);if(!e)throw new Error("Modal components must be used within a Modal");return e},Db=()=>f.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"1em",children:f.jsx("path",{d:"m18 6-12 12M6 6l12 12"})}),Bb=e=>{p.useEffect(()=>{if(!e)return;const t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},Lb=(e,t)=>{const r=p.useRef(null);p.useEffect(()=>{e?(r.current=document.activeElement,setTimeout(()=>{if(t.current){const n=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n.length>0?n[0].focus():t.current.focus()}},100)):r.current&&r.current.focus()},[e,t])},Ob=(e,t,r)=>{const[n,s]=p.useState(!1),a=p.useRef(null);return p.useEffect(()=>{r||s(!1)},[r]),{dragProps:e?{drag:!0,dragMomentum:!1,dragElastic:.1,dragConstraints:t?!1:a,onDragStart:()=>s(!0),onDragEnd:()=>s(!1),whileDrag:{scale:1.02,transition:{duration:.1}}}:{},isDragging:n,constraintsRef:a}},kc=p.forwardRef(({children:e,size:t="md",radius:r="lg",shadow:n="lg",backdrop:s="opaque",scrollBehavior:a="normal",placement:o="auto",isOpen:i,defaultOpen:l=!1,isDismissable:c=!0,isKeyboardDismissDisabled:d=!1,shouldBlockScroll:u=!0,hideCloseButton:h=!1,closeButton:m,motionProps:g,portalContainer:w=document.body,disableAnimation:x=!1,isDraggable:b=!1,allowOverflow:y=!1,classNames:v,className:C,onOpenChange:S,onClose:j,...A},k)=>{const[V,M]=p.useState(l),D=p.useRef(null),z=i!==void 0?i:V,L=W=>{i===void 0&&M(W),S?.(W),W||j?.()},I=()=>{L(!1)};p.useEffect(()=>{if(!z||d)return;const W=J=>{J.key==="Escape"&&I()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[z,d]);const R=W=>{c&&W.target===W.currentTarget&&I()};Bb(z&&u),Lb(z,D);const{dragProps:B,isDragging:P,constraintsRef:T}=Ob(b,y,z),{wrapper:N,base:E,backdrop:F}=rr({size:t,radius:r,shadow:n,backdrop:s,scrollBehavior:a,placement:o,disableAnimation:x,isDraggable:b}),$={isOpen:z,size:t,radius:r,shadow:n,backdrop:s,scrollBehavior:a,placement:o,isDismissable:c,isKeyboardDismissDisabled:d,shouldBlockScroll:u,hideCloseButton:h,disableAnimation:x,isDraggable:b,allowOverflow:y,classNames:v,onClose:I,onOpenChange:L},O={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{duration:x?0:.3,ease:"easeOut"}},K=f.jsx(We,{children:z&&f.jsx(Cc.Provider,{value:$,children:f.jsx(_.div,{ref:T,className:F({className:v?.backdrop}),onClick:R,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:x?0:.2,ease:"easeOut"},children:f.jsx("div",{className:N({className:v?.wrapper}),onClick:W=>W.stopPropagation(),children:f.jsxs(_.div,{ref:k||D,className:E({className:v?.base||C}),"data-open":z,"data-dismissable":c,role:"dialog","aria-modal":"true",tabIndex:-1,...g||O,...B,style:{cursor:P?"grabbing":b?"grab":"default"},...A,children:[!h&&f.jsx("button",{type:"button",className:rr().closeButton({className:v?.closeButton}),onClick:I,"aria-label":"Close modal",children:m||f.jsx(Db,{})}),e]})})})})});return Jn.createPortal(K,w)});kc.displayName="Modal";const zb=p.forwardRef(({children:e,className:t,...r},n)=>f.jsx("div",{ref:n,className:t,...r,children:e}));zb.displayName="ModalContent";const $b=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s,isDraggable:a}=Us(),{header:o}=rr();return f.jsx("div",{ref:n,className:o({className:s?.header||t}),"data-framer-drag-handle":a?"":void 0,style:{cursor:a?"move":"default"},...r,children:e})});$b.displayName="ModalHeader";const Fb=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s}=Us(),{body:a}=rr();return f.jsx("div",{ref:n,className:a({className:s?.body||t}),...r,children:e})});Fb.displayName="ModalBody";const Wb=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s}=Us(),{footer:a}=rr();return f.jsx("div",{ref:n,className:a({className:s?.footer||t}),...r,children:e})});Wb.displayName="ModalFooter";function _b(e={}){const{isOpen:t,defaultOpen:r=!1,onOpenChange:n,onClose:s}=e,[a,o]=p.useState(r),i=t!==void 0?t:a,l=p.useCallback(u=>{t===void 0&&o(u),n?.(u),u||s?.()},[t,n,s]),c=p.useCallback(()=>{l(!0)},[l]),d=p.useCallback(()=>{l(!1)},[l]);return{isOpen:i,onOpen:c,onClose:d,onOpenChange:l}}const st=H({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-between","transition-background","duration-300","ease-in-out","data-[menu-open=true]:bg-content1/60","data-[hidden=true]:transform","data-[hidden=true]:-translate-y-full","data-[hidden=true]:transition-transform"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-16"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-medium","data-[active=true]:text-primary"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent","data-[pressed=true]:bg-default-100","data-[hover=true]:bg-default-100","data-[open=true]:bg-default-100"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity",'before:content-[""]',"before:block","before:h-px","before:w-4","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0",'after:content-[""]',"after:block","after:h-px","after:w-4","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","group-data-[open=true]:after:-translate-y-px","group-data-[open=true]:after:-rotate-45"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-header","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto","bg-content1/60","backdrop-blur-xl","backdrop-saturate-150"],menuItem:["text-large","color-foreground","data-[active=true]:font-semibold","data-[active=true]:text-primary"]},variants:{position:{static:{base:"relative"},sticky:{base:"sticky top-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},isBordered:{true:{base:"border-b border-divider"}},isBlurred:{true:{base:["backdrop-blur-lg","data-[menu-open=false]:bg-background/70","backdrop-saturate-150"]},false:{base:"bg-background",menu:"bg-background"}},disableAnimation:{true:{menu:"!transition-none"}}},defaultVariants:{position:"sticky",maxWidth:"lg",isBordered:!1,isBlurred:!0,disableAnimation:!1}}),Sc=p.createContext(null),Dt=()=>{const e=p.useContext(Sc);if(!e)throw new Error("Navbar components must be used within a Navbar");return e},Gb=({isOpen:e})=>{const{toggleIcon:t}=st({disableAnimation:!1});return f.jsx("span",{className:t(),"data-open":e,children:f.jsx("span",{className:"sr-only",children:"Toggle menu"})})},jc=p.forwardRef(({children:e,height:t="4rem",position:r="sticky",maxWidth:n="lg",parentRef:s,isBordered:a=!1,isBlurred:o=!0,isMenuOpen:i,isMenuDefaultOpen:l=!1,shouldHideOnScroll:c=!1,disableScrollHandler:d=!1,disableAnimation:u=!1,classNames:h,className:m,onMenuOpenChange:g,onScrollPositionChange:w,...x},b)=>{const[y,v]=p.useState(l),[C,S]=p.useState(!1),[j,A]=p.useState(0),k=p.useRef(null),V=i??y,M=I=>{i===void 0&&v(I),g?.(I)};p.useEffect(()=>{if(!c||d)return;const I=()=>{const B=window.scrollY,P=B>j?"down":"up";P==="down"&&B>100?S(!0):P==="up"&&S(!1),A(B),w?.(B)},R=s?.current||window;return R.addEventListener("scroll",I,{passive:!0}),()=>{R.removeEventListener("scroll",I)}},[c,d,j,s,w]);const{base:D,wrapper:z}=st({position:r,maxWidth:n,isBordered:a,isBlurred:o,disableAnimation:u}),L={isMenuOpen:V,position:r,maxWidth:n,height:t,isBordered:a,isBlurred:o,shouldHideOnScroll:c,disableAnimation:u,classNames:h,onMenuOpenChange:M,onScrollPositionChange:w};return f.jsx(Sc.Provider,{value:L,children:f.jsx(_.nav,{ref:b||k,className:D({className:h?.base||m}),style:{height:t},"data-menu-open":V,"data-hidden":C,initial:c?{y:0}:!1,animate:c?{y:C?-100:0}:!1,transition:{duration:.3,ease:"easeInOut"},...x,children:f.jsx("header",{className:z({className:h?.wrapper}),children:e})})})});jc.displayName="Navbar";const Ub=p.forwardRef(({children:e,className:t,...r},n)=>{const{brand:s}=st(),a=Dt();return f.jsx("div",{ref:n,className:s({className:a?.classNames?.brand||t}),...r,children:e})});Ub.displayName="NavbarBrand";const Kb=p.forwardRef(({children:e,justify:t="start",className:r,...n},s)=>{const{content:a}=st(),{classNames:o}=Dt();return f.jsx("ul",{ref:s,className:a({className:o?.content||r}),"data-justify":t,...n,children:e})});Kb.displayName="NavbarContent";const Hb=p.forwardRef(({children:e,isActive:t=!1,className:r,...n},s)=>{const{item:a}=st(),{classNames:o}=Dt();return f.jsx("li",{ref:s,className:a({className:o?.item||r}),"data-active":t,...n,children:e})});Hb.displayName="NavbarItem";const Xb=p.forwardRef(({icon:e,isSelected:t,defaultSelected:r=!1,srOnlyText:n="open/close navigation menu",className:s,onChange:a,...o},i)=>{const{toggle:l}=st(),{isMenuOpen:c,onMenuOpenChange:d,classNames:u}=Dt(),h=()=>{const m=!c;d(m),a?.(m)};return f.jsx("button",{ref:i,type:"button",className:l({className:u?.toggle||s}),"data-open":c,"data-pressed":!1,"aria-label":n,onClick:h,...o,children:typeof e=="function"?e(c):e||f.jsx(Gb,{isOpen:c})})});Xb.displayName="NavbarMenuToggle";const Yb=p.forwardRef(({children:e,portalContainer:t,className:r,...n},s)=>{const{menu:a}=st(),{isMenuOpen:o,disableAnimation:i,classNames:l}=Dt(),c={closed:{opacity:0,y:-20},open:{opacity:1,y:0}},d={duration:i?0:.3,ease:"easeOut"};return f.jsx(We,{children:o&&f.jsx(_.div,{ref:s,className:a({className:l?.menu||r}),variants:c,initial:"closed",animate:"open",exit:"closed",transition:d,...n,children:f.jsx("ul",{className:"flex flex-col gap-2 py-4",children:e})})})});Yb.displayName="NavbarMenu";const qb=p.forwardRef(({children:e,isActive:t=!1,className:r,...n},s)=>{const{menuItem:a}=st(),{classNames:o}=Dt();return f.jsx("li",{ref:s,className:a({className:o?.menuItem||r}),"data-active":t,...n,children:e})});qb.displayName="NavbarMenuItem";const Zb=H({slots:{base:["flex","flex-col","gap-2","w-full"],track:["relative","bg-gray-200","overflow-hidden"],indicator:["h-full","transition-all","duration-500","ease-out","origin-left"],labelWrapper:["flex","justify-between","items-center"],label:["text-sm","font-medium","text-gray-700"],value:["text-sm","font-medium","text-gray-500"]},variants:{color:{default:{indicator:"bg-gray-400"},primary:{indicator:"bg-blue-600"},secondary:{indicator:"bg-gray-600"},success:{indicator:"bg-green-600"},warning:{indicator:"bg-yellow-500"},danger:{indicator:"bg-red-600"}},size:{sm:{track:"h-1",label:"text-xs",value:"text-xs"},md:{track:"h-2",label:"text-sm",value:"text-sm"},lg:{track:"h-3",label:"text-base",value:"text-base"}},radius:{none:{track:"rounded-none"},sm:{track:"rounded-sm"},md:{track:"rounded-md"},lg:{track:"rounded-lg"},full:{track:"rounded-full"}},isStriped:{true:{indicator:["bg-gradient-to-r","from-transparent","to-transparent","bg-[length:1rem_1rem]","bg-repeat-x","animate-pulse"]}},isIndeterminate:{true:{indicator:["animate-pulse"]}},isDisabled:{true:{base:"opacity-60 cursor-not-allowed",track:"bg-gray-100",indicator:"bg-gray-300",label:"text-gray-400",value:"text-gray-400"}}},compoundVariants:[{isStriped:!0,color:"primary",class:{indicator:["bg-gradient-to-r","from-blue-600","via-blue-500","to-blue-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"success",class:{indicator:["bg-gradient-to-r","from-green-600","via-green-500","to-green-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"warning",class:{indicator:["bg-gradient-to-r","from-yellow-500","via-yellow-400","to-yellow-500","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"danger",class:{indicator:["bg-gradient-to-r","from-red-600","via-red-500","to-red-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isIndeterminate:!0,class:{indicator:["w-1/3","animate-[progress-indeterminate_2s_ease-in-out_infinite]"]}}],defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1}}),Tc=(e=0,t=0,r=100)=>(Math.max(t,Math.min(r,e))-t)/(r-t)*100,Jb=(e=0,t=100,r=0)=>{const n=Tc(e,r,t);return`${Math.round(n)}%`},Ac=p.forwardRef(({value:e=0,maxValue:t=100,minValue:r=0,color:n="primary",size:s="md",radius:a="full",showValueLabel:o=!1,label:i,isStriped:l=!1,isIndeterminate:c=!1,isDisabled:d=!1,className:u,classNames:h,...m},g)=>{const w=Tc(e,r,t),x=Jb(e,t,r),b=Zb({color:n,size:s,radius:a,isStriped:l,isIndeterminate:c,isDisabled:d});return f.jsxs("div",{ref:g,className:q(b.base(),h?.base,u),role:"progressbar","aria-valuemin":r,"aria-valuemax":t,"aria-valuenow":c?void 0:e,"aria-valuetext":c?"Cargando...":x,...m,children:[(i||o)&&f.jsxs("div",{className:q(b.labelWrapper(),h?.label),children:[i&&f.jsx("span",{className:q(b.label(),h?.label),children:i}),o&&!c&&f.jsx("span",{className:q(b.value(),h?.value),children:x})]}),f.jsx("div",{className:q(b.track(),h?.track),children:f.jsx(_.div,{className:q(b.indicator(),h?.indicator),initial:{scaleX:0,originX:0},animate:{scaleX:c?1:w/100,x:c?["-100%","300%"]:0},transition:c?{duration:2,repeat:1/0,ease:"easeInOut"}:{duration:.5,ease:"easeOut"},style:c?{width:"33%",transformOrigin:"left center"}:{transformOrigin:"left center"}})})]})});Ac.displayName="Progress";const Qb={slow:2,normal:1,fast:.6};H({base:["inline-block","animate-spin","transition-all","duration-200","ease-in-out"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-400"},visible:{true:"opacity-100 scale-100",false:"opacity-0 scale-95 pointer-events-none"}},defaultVariants:{size:"md",color:"primary",visible:!0}});const ey=H({base:["flex","items-center","justify-center","transition-all","duration-200","ease-in-out"],variants:{overlay:{true:["fixed","inset-0","z-50","bg-white/80","backdrop-blur-sm"],false:""},position:{center:"flex-col",top:"flex-col",bottom:"flex-col",left:"flex-row",right:"flex-row-reverse"},fullScreen:{true:"w-screen h-screen",false:"w-full h-full"}},defaultVariants:{overlay:!1,position:"center",fullScreen:!1}}),ty=H({base:["text-sm","font-medium","transition-opacity","duration-200"],variants:{position:{center:"mt-2 text-center",top:"mb-2 text-center",bottom:"mt-2 text-center",left:"ml-2",right:"mr-2"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-500"}},defaultVariants:{position:"center",color:"neutral"}});H({base:["relative","inline-block"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"}},defaultVariants:{size:"md"}});const ry=H({base:["rounded-full","transition-all"],variants:{size:{xs:"w-2 h-2",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6",xl:"w-8 h-8"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),ny=H({base:["flex","items-center","justify-center"],variants:{size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{size:"md"}}),sy=H({base:["rounded-full"],variants:{size:{xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),ay=H({base:["flex","items-end","justify-center"],variants:{size:{xs:"gap-0.5 h-3",sm:"gap-0.5 h-4",md:"gap-1 h-6",lg:"gap-1 h-8",xl:"gap-1.5 h-12"}},defaultVariants:{size:"md"}}),oy=H({base:["rounded-full"],variants:{size:{xs:"w-0.5",sm:"w-0.5",md:"w-1",lg:"w-1",xl:"w-1.5"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}});H({base:["grid","gap-1"],variants:{size:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16",xl:"w-24 h-24"},gridSize:{"2x2":"grid-cols-2 grid-rows-2","3x3":"grid-cols-3 grid-rows-3","4x4":"grid-cols-4 grid-rows-4"}},defaultVariants:{size:"md",gridSize:"3x3"}});H({base:["rounded-sm"],variants:{color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{color:"primary"}});const iy=H({base:["relative","rounded-full","border-solid","border-transparent"],variants:{size:{xs:"w-3 h-3 border-[1px]",sm:"w-4 h-4 border-[1px]",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-2",xl:"w-12 h-12 border-[3px]"},color:{primary:"border-t-blue-600 border-r-blue-600/30",secondary:"border-t-gray-600 border-r-gray-600/30",success:"border-t-green-600 border-r-green-600/30",warning:"border-t-yellow-600 border-r-yellow-600/30",error:"border-t-red-600 border-r-red-600/30",neutral:"border-t-gray-400 border-r-gray-400/30"}},defaultVariants:{size:"md",color:"primary"}});H({base:["flex","items-center","justify-center"],variants:{direction:{horizontal:"flex-row",vertical:"flex-col",circular:"relative"},size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{direction:"horizontal",size:"md"}});H({base:["flex","items-end","justify-center"],variants:{orientation:{vertical:"flex-row items-end",horizontal:"flex-col items-center"},size:{xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"}},defaultVariants:{orientation:"vertical",size:"md"}});const ly=e=>Qb[e],wr={rotate:{animate:{rotate:360}},pulse:{animate:{scale:[1,1.2,1],opacity:[.7,1,.7]}},bounce:{animate:{y:[0,-10,0]}},wave:{animate:{scaleY:[.4,1,.4]}}},Mc=({type:e="rotating",size:t="md",color:r="primary",speed:n="normal",visible:s=!0,label:a,overlay:o=!1,overlayOpacity:i=.8,overlayColor:l="bg-white",animationConfig:c,className:d,"aria-label":u="Loading","data-testid":h="spinner",style:m,...g})=>{const w=ly(n),x=()=>f.jsx(_.div,{className:iy({size:t,color:r}),animate:wr.rotate.animate,transition:{duration:w,repeat:1/0,...c}}),b=()=>f.jsx(_.div,{className:ry({size:t,color:r}),animate:wr.pulse.animate,transition:{duration:w,repeat:1/0,...c}}),y=()=>f.jsx("div",{className:ny({size:t}),children:[0,1,2].map(k=>f.jsx(_.div,{className:sy({size:t,color:r}),animate:wr.bounce.animate,transition:{duration:w,repeat:1/0,delay:k*.1,...c}},k))}),v=()=>f.jsx("div",{className:ay({size:t}),children:[0,1,2,3,4].map(k=>f.jsx(_.div,{className:oy({size:t,color:r}),animate:wr.wave.animate,transition:{duration:w,repeat:1/0,delay:k*.1,...c}},k))}),C=()=>{switch(e){case"rotating":case"ring":return f.jsx(x,{});case"pulse":return f.jsx(b,{});case"bounce":case"dots":return f.jsx(y,{});case"wave":case"bars":return f.jsx(v,{});default:return f.jsx(x,{})}},S=ey({overlay:o,position:"center",fullScreen:o}),j=d?`${S} ${d}`:S,A={...m,...o&&i!==void 0&&{backgroundColor:`rgba(255, 255, 255, ${i})`}};return s?f.jsxs(_.div,{className:j,style:A,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"status","aria-live":"polite","data-testid":h,...g,children:[C(),a&&f.jsx(_.div,{className:ty({position:"center",color:r==="neutral"?"neutral":r}),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.2},children:a})]}):null};Mc.displayName="Spinner";const cr={sm:{wrapper:"w-10 h-6",thumb:"w-5 h-5",label:"text-sm",startContent:"text-xs",endContent:"text-xs",thumbIcon:"w-3 h-3"},md:{wrapper:"w-12 h-7",thumb:"w-6 h-6",label:"text-base",startContent:"text-sm",endContent:"text-sm",thumbIcon:"w-4 h-4"},lg:{wrapper:"w-14 h-8",thumb:"w-7 h-7",label:"text-lg",startContent:"text-base",endContent:"text-base",thumbIcon:"w-5 h-5"}},cy=(e="primary",t=!1,r=!1)=>r?t?"bg-gray-300 border-gray-300":"bg-gray-200 border-gray-200":t?{default:"bg-gray-600 border-gray-600 hover:bg-gray-700",primary:"bg-blue-600 border-blue-600 hover:bg-blue-700",secondary:"bg-purple-600 border-purple-600 hover:bg-purple-700",success:"bg-green-600 border-green-600 hover:bg-green-700",warning:"bg-amber-500 border-amber-500 hover:bg-amber-600",danger:"bg-red-600 border-red-600 hover:bg-red-700"}[e]:"bg-gray-200 border-gray-200 hover:bg-gray-300",dy=(e=!1)=>`inline-flex items-center gap-2 cursor-pointer select-none ${e?"cursor-not-allowed opacity-60":""}`.trim(),uy=(e="md",t="primary",r=!1,n=!1,s=!1)=>{const a=cr[e].wrapper,o=cy(t,r,n);return`relative inline-flex shrink-0 border-2 rounded-full cursor-pointer ${a} ${o} ${s?"":"transition-colors duration-200 ease-in-out"} focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-500`.trim()},fy=(e="md",t=!1)=>`font-medium ${cr[e].label} ${t?"text-gray-400":"text-gray-900"}`.trim(),_o=(e="md",t=!1)=>`flex items-center justify-center ${cr[e].startContent} ${t?"text-gray-400":"text-gray-600"}`.trim(),py=(e="md")=>`flex items-center justify-center text-gray-400 ${cr[e].thumbIcon}`.trim(),hy=()=>"sr-only",my=({children:e,value:t,name:r,size:n="md",color:s="primary",thumbIcon:a,startContent:o,endContent:i,isSelected:l,defaultSelected:c=!1,isReadOnly:d=!1,isDisabled:u=!1,disableAnimation:h=!1,className:m="",classNames:g,onChange:w,onValueChange:x,"data-testid":b})=>{const[y,v]=p.useState(c),C=p.useRef(null),S=l!==void 0,j=S?l:y,A=F=>{if(u||d)return;const $=F.target.checked;S||v($),w?.(F),x?.($)},k=()=>{u||d||C.current?.click()},M=[dy(u),g?.base,m].filter(Boolean).join(" "),z=[uy(n,s,j,u,h),g?.wrapper].filter(Boolean).join(" "),I=[fy(n,u),g?.label].filter(Boolean).join(" "),B=[_o(n,u),g?.startContent].filter(Boolean).join(" "),T=[_o(n,u),g?.endContent].filter(Boolean).join(" "),E=[hy(),g?.hiddenInput].filter(Boolean).join(" ");return f.jsxs("label",{className:M,"data-testid":b,children:[o&&f.jsx(_.div,{className:B,"data-testid":`${b}-start-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:h?0:.2},children:o}),f.jsxs(gy,{className:z,"data-testid":`${b}-wrapper`,children:[f.jsx("input",{ref:C,type:"checkbox",value:t,name:r,checked:j,onChange:A,disabled:u,readOnly:d,"aria-checked":j,className:E,"data-testid":`${b}-input`,onClick:k}),f.jsx(by,{isSelected:j,size:n,thumbIcon:a,disableAnimation:h,className:g?.thumb,"data-testid":`${b}-thumb`,onClick:k})]}),i&&f.jsx(_.div,{className:T,"data-testid":`${b}-end-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:h?0:.2},children:i}),e&&f.jsx("span",{className:I,"data-testid":`${b}-label`,children:e})]})},gy=({children:e,className:t="",onClick:r,"data-testid":n})=>f.jsx(_.div,{className:t,onClick:r,"data-testid":n,whileHover:{scale:1.02},whileTap:{scale:.98},transition:{duration:.1},children:e}),by=({isSelected:e=!1,size:t="md",thumbIcon:r,disableAnimation:n=!1,className:s="","data-testid":a})=>{const o=cr[t],i=py(t),c=(()=>{const h={sm:40,md:48,lg:56},m={sm:20,md:24,lg:28};return h[t]-m[t]-7})(),u=[`absolute top-0.2 left-0.5 inline-block rounded-full bg-white shadow-lg transform ring-0 flex items-center justify-center ${o.thumb}`,s].filter(Boolean).join(" ");return f.jsx(_.span,{className:u,"data-testid":a,animate:{x:e?c:0},transition:{type:"spring",stiffness:500,damping:30,duration:n?0:void 0},whileHover:{scale:1.1},whileTap:{scale:.95},style:{cursor:"pointer"},children:f.jsx(We,{mode:"wait",children:r&&f.jsx(_.div,{initial:{opacity:0,rotate:-180,scale:.5},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:180,scale:.5},transition:{duration:n?0:.3},children:f.jsx(r,{isSelected:e,className:i})},e?"selected":"unselected")})})},yy=(e,t)=>{if(e==="custom"&&t){const n=t.border??"",s=t.gradient??t.background??"";return[n,s].filter(Boolean).join(" ")}const r={default:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",primary:"border-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950",secondary:"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800",success:"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950",warning:"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950",danger:"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950",custom:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900"};return r[e]||r.default},xy=e=>{const t={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"};return t[e]||t.md},vy=e=>{const t={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"};return t[e]||t.sm},wy=(e,t,r,n,s,a)=>{if(s)return"";const o="flex flex-col relative overflow-hidden",i=yy(e,t),l=xy(r),c=vy(n);return[o,i,l,c,a?"w-full":""].filter(Boolean).join(" ")},Cy=(e,t)=>["min-w-full table-auto",e?"table-compact":"",t?"table-striped":""].filter(Boolean).join(" "),ky=(e,t,r,n,s,a)=>{const o=a?.border?`border-b ${a.border} transition-colors`:"border-b border-gray-200 dark:border-gray-700 transition-colors";let i="";e&&(i=a?.selected?a.selected:"bg-blue-50 dark:bg-blue-900/20");const l=!t&&!e?a?.hover||"hover:bg-gray-50 dark:hover:bg-gray-800/50":"";return[o,i,l,t?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" ")},Vc=p.createContext(null),Sy=()=>{const e=p.useContext(Vc);if(!e)throw new Error("Table components must be used within a Table component");return e},jy=({children:e,className:t="",color:r="default",customColor:n,layout:s="auto",radius:a="md",shadow:o="sm",maxTableHeight:i,rowHeight:l,isVirtualized:c=!1,hideHeader:d=!1,isStriped:u=!1,isCompact:h=!1,isHeaderSticky:m=!1,fullWidth:g=!0,removeWrapper:w=!1,topContent:x,bottomContent:b,topContentPlacement:y="outside",bottomContentPlacement:v="outside",showSelectionCheckboxes:C=!1,sortDescriptor:S,selectedKeys:j=new Set,defaultSelectedKeys:A=new Set,disabledKeys:k=new Set,disallowEmptySelection:V=!1,selectionMode:M="none",selectionBehavior:D="toggle",disabledBehavior:z="selection",allowDuplicateSelectionEvents:L=!1,disableAnimation:I=!1,isKeyboardNavigationDisabled:R=!1,loading:B=!1,emptyContent:P,centerHeaderText:T=!1,centerCellText:N=!1,onRowAction:E,onCellAction:F,onSelectionChange:$,onSortChange:O,columns:K,items:W,"data-testid":J,...Y})=>{const Z=p.useMemo(()=>({color:r,customColor:n,selectionMode:M,selectionBehavior:D,selectedKeys:j,disabledKeys:k,sortDescriptor:S,isStriped:u,isCompact:h,disableAnimation:I,showSelectionCheckboxes:C,onRowAction:E,onCellAction:F,onSelectionChange:$,onSortChange:O,centerHeaderText:T,centerCellText:N,columns:K,items:W}),[r,n,M,D,j,k,S,u,h,I,C,E,F,$,O,T,N,K,W]),ne=p.useMemo(()=>wy(r,n,a,o,w,g),[r,n,a,o,w,g]),ae=p.useMemo(()=>Cy(h,u),[h,u]),Te=y==="outside"&&x,he=y==="inside"&&x,at=v==="outside"&&b,Le=v==="inside"&&b,se={...i&&{maxHeight:i,overflowY:"auto"},...c&&l&&{height:i||400}};return f.jsx(Vc.Provider,{value:Z,children:f.jsxs("div",{className:"table-wrapper","data-testid":J,children:[Te&&f.jsx("div",{className:"table-top-content mb-4",children:x}),f.jsxs("div",{className:`${ne} ${t}`.trim(),...Y,children:[he&&f.jsx("div",{className:"table-top-content-inside p-4 border-b border-gray-200 dark:border-gray-700",children:x}),f.jsx("div",{className:"table-container overflow-auto",style:se,children:B?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsxs("div",{className:"flex items-center space-x-3",children:[f.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-gray-600 dark:border-gray-300"}),f.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Loading..."})]})}):W&&W.length===0?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("div",{className:"text-center",children:P||f.jsxs("div",{className:"text-gray-500 dark:text-gray-400",children:[f.jsx("div",{className:"text-4xl mb-2",children:"📄"}),f.jsx("div",{className:"text-lg font-medium mb-1",children:"No data available"}),f.jsx("div",{className:"text-sm",children:"There are no items to display"})]})})}):f.jsx("table",{className:`${ae} ${s==="fixed"?"table-fixed":""}`,role:"table","aria-label":"Data table",children:e})}),Le&&f.jsx("div",{className:"table-bottom-content-inside p-4 border-t border-gray-200 dark:border-gray-700",children:b})]}),at&&f.jsx("div",{className:"table-bottom-content mt-4",children:b})]})})},Ty=({children:e,className:t="",textValue:r,item:n,"data-testid":s,...a})=>{const{isStriped:o,selectedKeys:i,disabledKeys:l,onRowAction:c,customColor:d}=Sy(),u=n?.key||n?.id||r,h=u?i==="all"||i.has(u):!1,m=u?l.has(u):!1,g=ky(h,m,o,!1,!0,d),w=()=>{!m&&u&&c&&c(u)};return f.jsx("tr",{className:`${g} ${t}`.trim(),onClick:w,role:"row","aria-selected":h,"aria-disabled":m,"data-testid":s,...a,children:e})},Ay={sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-5 text-lg"},My={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Vy=(e,t)=>{const r={solid:{success:"bg-green-500 text-white border-green-500 dark:bg-green-600 dark:border-green-600",error:"bg-red-500 text-white border-red-500 dark:bg-red-600 dark:border-red-600",warning:"bg-yellow-500 text-white border-yellow-500 dark:bg-yellow-600 dark:border-yellow-600",info:"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600",default:"bg-gray-500 text-white border-gray-500 dark:bg-gray-600 dark:border-gray-600"},bordered:{success:"bg-transparent text-green-600 border-green-500 border-2 dark:bg-gray-800 dark:text-green-400 dark:border-green-500",error:"bg-transparent text-red-600 border-red-500 border-2 dark:bg-gray-800 dark:text-red-400 dark:border-red-500",warning:"bg-transparent text-yellow-600 border-yellow-500 border-2 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-500",info:"bg-transparent text-blue-600 border-blue-500 border-2 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-500",default:"bg-transparent text-gray-600 border-gray-500 border-2 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-500"},flat:{success:"bg-green-100 text-green-800 border-green-100 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800",error:"bg-red-100 text-red-800 border-red-100 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800",warning:"bg-yellow-100 text-yellow-800 border-yellow-100 dark:bg-yellow-900/30 dark:text-yellow-300 dark:border-yellow-800",info:"bg-blue-100 text-blue-800 border-blue-100 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-800",default:"bg-gray-100 text-gray-800 border-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700"},faded:{success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/20 dark:text-green-300 dark:border-green-700",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-900/20 dark:text-red-300 dark:border-red-700",warning:"bg-yellow-50 text-yellow-700 border-yellow-200 dark:bg-yellow-900/20 dark:text-yellow-300 dark:border-yellow-700",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/20 dark:text-blue-300 dark:border-blue-700",default:"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600"},shadow:{success:"bg-white text-green-600 border-green-200 shadow-lg shadow-green-500/25 dark:bg-gray-800 dark:text-green-400 dark:border-green-700 dark:shadow-green-500/10",error:"bg-white text-red-600 border-red-200 shadow-lg shadow-red-500/25 dark:bg-gray-800 dark:text-red-400 dark:border-red-700 dark:shadow-red-500/10",warning:"bg-white text-yellow-600 border-yellow-200 shadow-lg shadow-yellow-500/25 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-700 dark:shadow-yellow-500/10",info:"bg-white text-blue-600 border-blue-200 shadow-lg shadow-blue-500/25 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-700 dark:shadow-blue-500/10",default:"bg-white text-gray-600 border-gray-200 shadow-lg shadow-gray-500/25 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:shadow-gray-900/25"}};return r[t][e]||r.solid.default},Py=e=>{const t={top:"top-4 left-1/2 transform -translate-x-1/2","top-left":"top-4 left-4","top-right":"top-4 right-4",bottom:"bottom-4 left-1/2 transform -translate-x-1/2","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return t[e]||t["top-right"]},Ey=e=>{const t={top:{enter:"animate-[toast-slide-in-top_0.3s_ease-out]",exit:"animate-[toast-slide-out-top_0.2s_ease-in]"},"top-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"top-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"},bottom:{enter:"animate-[toast-slide-in-bottom_0.3s_ease-out]",exit:"animate-[toast-slide-out-bottom_0.2s_ease-in]"},"bottom-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"bottom-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"}};return t[e]||t["top-right"]},Iy=e=>{const t={success:"text-green-500 dark:text-green-400",error:"text-red-500 dark:text-red-400",warning:"text-yellow-500 dark:text-yellow-400",info:"text-blue-500 dark:text-blue-400",default:"text-gray-500 dark:text-gray-400"};return t[e]||t.default},Ny=e=>{const t={success:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg>',error:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path></svg>',warning:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg>',info:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>',default:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>'};return t[e]||t.default},Ry=()=>`toast-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,Dy=({type:e,customIcon:t})=>{if(t)return f.jsx("div",{className:"flex-shrink-0",children:t});const r=Iy(e),n=Ny(e);return f.jsx("div",{className:`flex-shrink-0 ${r}`,dangerouslySetInnerHTML:{__html:n}})},Pc=({id:e,type:t="default",title:r,description:n,closable:s=!0,action:a,icon:o,size:i="md",variant:l="solid",radius:c="md",position:d="top-right",className:u="",onRemove:h,onClose:m,"data-testid":g})=>{const[w,x]=p.useState(!1),b="flex items-start gap-3 border w-full max-w-sm pointer-events-auto",y=Ay[i],v=My[c],C=Vy(t,l),S=Ey(d),j=[b,y,v,C,w?S.exit:S.enter,u].filter(Boolean).join(" "),A=()=>{m&&m(e),x(!0),setTimeout(()=>{h(e)},200)};return p.useEffect(()=>()=>{},[]),f.jsxs("div",{className:j,"data-testid":g,children:[o!==!1&&f.jsx(Dy,{type:t,customIcon:o}),f.jsxs("div",{className:"flex-1 min-w-0",children:[r&&f.jsx("div",{className:"font-semibold text-sm mb-1 break-words",children:r}),n&&f.jsx("div",{className:"text-sm opacity-90 break-words",children:n}),a&&f.jsx("div",{className:"mt-2",children:a})]}),s&&f.jsx("button",{onClick:A,className:"flex-shrink-0 p-1 rounded-sm opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-current focus:ring-offset-1 dark:focus:ring-offset-gray-800","aria-label":"Close notification",type:"button",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ec=p.createContext(void 0);function By(e,t){switch(t.type){case"ADD_TOAST":return[...e,t.payload];case"REMOVE_TOAST":return e.filter(r=>r.id!==t.payload);case"REMOVE_ALL_TOASTS":return[];case"UPDATE_TOAST":return e.map(r=>r.id===t.payload.id?{...r,...t.payload.updates}:r);default:return e}}const Ly=({children:e,position:t="top-right",maxToasts:r=5,defaultDuration:n=5e3})=>{const[s,a]=p.useReducer(By,[]),o=p.useCallback(u=>{const h=Ry(),m={type:"default",duration:n,closable:!0,position:t,size:"md",variant:"solid",radius:"md",...u,id:h};return a({type:"ADD_TOAST",payload:m}),m.duration&&m.duration>0&&setTimeout(()=>{a({type:"REMOVE_TOAST",payload:h})},m.duration),h},[n,t]),i=p.useCallback(u=>{a({type:"REMOVE_TOAST",payload:u})},[]),l=p.useCallback(()=>{a({type:"REMOVE_ALL_TOASTS"})},[]),c=p.useCallback((u,h)=>{a({type:"UPDATE_TOAST",payload:{id:u,updates:h}})},[]);p.useEffect(()=>{s.length>r&&s.slice(0,s.length-r).forEach(h=>{a({type:"REMOVE_TOAST",payload:h.id})})},[s,r]);const d={toasts:s,addToast:o,removeToast:i,removeAllToasts:l,updateToast:c};return f.jsx(Ec.Provider,{value:d,children:e})},Ic=()=>{const e=p.useContext(Ec);if(e===void 0)throw new Error("useToastContext must be used within a ToastProvider");return e},Oy=({position:e="top-right",className:t="",maxToasts:r=5,"data-testid":n})=>{const{toasts:s,removeToast:a}=Ic(),o=s.filter(u=>(u.position||e)===e).slice(-r);if(o.length===0)return null;const c=["fixed z-50 flex flex-col gap-2 pointer-events-none",Py(e),t].filter(Boolean).join(" "),d=f.jsx("div",{className:c,"data-testid":n,children:o.map(u=>f.jsx(Pc,{...u,onRemove:a,"data-testid":`toast-${u.id}`},u.id))});return Jn.createPortal(d,document.body)},zy=()=>{const{addToast:e,removeToast:t,removeAllToasts:r,updateToast:n}=Ic(),s=p.useCallback((h,m={})=>e({type:"default",description:h,...m}),[e]),a=p.useCallback((h,m={})=>e({type:"success",description:h,...m}),[e]),o=p.useCallback((h,m={})=>e({type:"error",description:h,duration:m.duration??0,...m}),[e]),i=p.useCallback((h,m={})=>e({type:"warning",description:h,...m}),[e]),l=p.useCallback((h,m={})=>e({type:"info",description:h,...m}),[e]),c=p.useCallback(h=>{t(h)},[t]),d=p.useCallback(()=>{r()},[r]),u=p.useCallback((h,m)=>{n(h,m)},[n]);return{toast:s,success:a,error:o,warning:i,info:l,dismiss:c,dismissAll:d,update:u}},$y=50,Fy={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeOut"}},scale:{initial:{opacity:0,scale:.85,transformOrigin:"center"},animate:{opacity:1,scale:1,transformOrigin:"center"},exit:{opacity:0,scale:.85,transformOrigin:"center"},transition:{type:"spring",stiffness:400,damping:25,duration:.15}},shift:{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:500,damping:30}},bounce:{initial:{opacity:0,scale:.3,y:-20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{type:"spring",stiffness:400,damping:12,bounce:.6}},rotate:{initial:{opacity:0,scale:.8,rotate:-10},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.8,rotate:10},transition:{type:"spring",stiffness:300,damping:20}},slide:{initial:{opacity:0,x:-20,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:20,scale:.95},transition:{type:"spring",stiffness:400,damping:25}},zoom:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.3},transition:{type:"spring",stiffness:600,damping:20}},flip:{initial:{opacity:0,rotateX:-90,scale:.9},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.9},transition:{type:"spring",stiffness:300,damping:25}},elastic:{initial:{opacity:0,scale:.6,y:-30},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-15},transition:{type:"spring",stiffness:200,damping:8,bounce:.8}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},Wy=H({base:["relative","px-2","py-1","rounded-md","text-sm","font-medium","shadow-lg","border","pointer-events-auto","max-w-xs","break-words","z-50"],variants:{size:{xs:"px-1.5 py-0.5 text-xs max-w-36",sm:"px-2 py-1 text-sm max-w-48",md:"px-3 py-1.5 text-sm max-w-xs",lg:"px-4 py-2 text-base max-w-sm"},variant:{dark:["bg-gray-900","text-white","border-gray-700","shadow-lg"],light:["bg-white","text-gray-900","border-gray-200","shadow-lg"],primary:["bg-blue-600","text-white","border-blue-500","shadow-lg"],success:["bg-green-600","text-white","border-green-500","shadow-lg"],warning:["bg-yellow-500","text-yellow-900","border-yellow-400","shadow-lg"],error:["bg-red-600","text-white","border-red-500","shadow-lg"]}},defaultVariants:{size:"md",variant:"dark"}}),_y=H({base:["absolute","border-solid","border-transparent"],variants:{placement:{top:"bottom-full left-1/2 -translate-x-1/2 border-b-6","top-start":"bottom-full left-2 border-b-6","top-end":"bottom-full right-2 border-b-6",bottom:"top-full left-1/2 -translate-x-1/2 border-t-6","bottom-start":"top-full left-2 border-t-6","bottom-end":"top-full right-2 border-t-6",left:"right-full top-1/2 -translate-y-1/2 border-r-6","left-start":"right-full top-2 border-r-6","left-end":"right-full bottom-2 border-r-6",right:"left-full top-1/2 -translate-y-1/2 border-l-6","right-start":"left-full top-2 border-l-6","right-end":"left-full bottom-2 border-l-6"},variant:{dark:"",light:"",primary:"",success:"",warning:"",error:""},size:{xs:"border-[4px]",sm:"border-[5px]",md:"border-[6px]",lg:"border-[7px]"}},compoundVariants:[{placement:["top","top-start","top-end"],variant:"dark",className:"border-b-gray-900"},{placement:["top","top-start","top-end"],variant:"light",className:"border-b-white"},{placement:["top","top-start","top-end"],variant:"primary",className:"border-b-blue-600"},{placement:["top","top-start","top-end"],variant:"success",className:"border-b-green-600"},{placement:["top","top-start","top-end"],variant:"warning",className:"border-b-yellow-500"},{placement:["top","top-start","top-end"],variant:"error",className:"border-b-red-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"dark",className:"border-t-gray-900"},{placement:["bottom","bottom-start","bottom-end"],variant:"light",className:"border-t-white"},{placement:["bottom","bottom-start","bottom-end"],variant:"primary",className:"border-t-blue-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"success",className:"border-t-green-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"warning",className:"border-t-yellow-500"},{placement:["bottom","bottom-start","bottom-end"],variant:"error",className:"border-t-red-600"},{placement:["left","left-start","left-end"],variant:"dark",className:"border-r-gray-900"},{placement:["left","left-start","left-end"],variant:"light",className:"border-r-white"},{placement:["left","left-start","left-end"],variant:"primary",className:"border-r-blue-600"},{placement:["left","left-start","left-end"],variant:"success",className:"border-r-green-600"},{placement:["left","left-start","left-end"],variant:"warning",className:"border-r-yellow-500"},{placement:["left","left-start","left-end"],variant:"error",className:"border-r-red-600"},{placement:["right","right-start","right-end"],variant:"dark",className:"border-l-gray-900"},{placement:["right","right-start","right-end"],variant:"light",className:"border-l-white"},{placement:["right","right-start","right-end"],variant:"primary",className:"border-l-blue-600"},{placement:["right","right-start","right-end"],variant:"success",className:"border-l-green-600"},{placement:["right","right-start","right-end"],variant:"warning",className:"border-l-yellow-500"},{placement:["right","right-start","right-end"],variant:"error",className:"border-l-red-600"}],defaultVariants:{placement:"top",variant:"dark",size:"md"}}),Gy=H({base:["fixed","pointer-events-none","z-50"],variants:{visible:{true:"pointer-events-auto",false:"pointer-events-none"}},defaultVariants:{visible:!1}}),Go=H({base:["inline-block","cursor-help"],variants:{active:{true:"relative",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""}},defaultVariants:{active:!1,disabled:!1}}),Uy=(e,t,r)=>{let n={...Fy[e]};if((e==="shift"||e==="slide"||e==="bounce")&&t){const s=Hy(t),a=Xy[e];a&&a[s]&&(n={...a[s]})}return n},Ky=e=>Uo[e]||Uo.fade,Hy=e=>e.startsWith("top")?"top":e.startsWith("bottom")?"bottom":e.startsWith("left")?"left":e.startsWith("right")?"right":"top",Xy={shift:{top:{initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-start":{initial:{opacity:0,y:8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-end":{initial:{opacity:0,y:8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},bottom:{initial:{opacity:0,y:-8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-start":{initial:{opacity:0,y:-8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-end":{initial:{opacity:0,y:-8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},left:{initial:{opacity:0,x:8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-start":{initial:{opacity:0,x:8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-end":{initial:{opacity:0,x:8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},right:{initial:{opacity:0,x:-8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-start":{initial:{opacity:0,x:-8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-end":{initial:{opacity:0,x:-8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}}},slide:{top:{initial:{opacity:0,y:20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:20,x:10},transition:{type:"spring",stiffness:300,damping:20}},bottom:{initial:{opacity:0,y:-20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:-20,x:10},transition:{type:"spring",stiffness:300,damping:20}},left:{initial:{opacity:0,x:20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:20,y:10},transition:{type:"spring",stiffness:300,damping:20}},right:{initial:{opacity:0,x:-20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:-20,y:10},transition:{type:"spring",stiffness:300,damping:20}}},bounce:{top:{initial:{opacity:0,y:30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},bottom:{initial:{opacity:0,y:-30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},left:{initial:{opacity:0,x:30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},right:{initial:{opacity:0,x:-30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}}}},Uo={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,delay:.05}},scale:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:600,damping:25,delay:.05}},shift:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:"spring",stiffness:500,damping:30,delay:.05}},bounce:{initial:{opacity:0,scale:.3},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{type:"spring",stiffness:400,damping:15,bounce:.5,delay:.1}},rotate:{initial:{opacity:0,scale:.5,rotate:-45},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.5,rotate:45},transition:{type:"spring",stiffness:300,damping:20,delay:.05}},slide:{initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:400,damping:25,delay:.05}},zoom:{initial:{opacity:0,scale:.2},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.2},transition:{type:"spring",stiffness:700,damping:20,delay:.05}},flip:{initial:{opacity:0,rotateX:-90,scale:.8},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.8},transition:{type:"spring",stiffness:300,damping:25,delay:.05}},elastic:{initial:{opacity:0,scale:.4},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:200,damping:8,bounce:.8,delay:.1}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},Yy={enter:.15},Nc=700,Rc=300,Dc=!1,Bc=p.createContext({delayDuration:Nc,skipDelayDuration:Rc,disableHoverableContent:Dc,isPointerInTransit:!1,setIsPointerInTransit:()=>{}}),qy=()=>p.useContext(Bc),Zy=({children:e,delayDuration:t=Nc,skipDelayDuration:r=Rc,disableHoverableContent:n=Dc})=>{const[s,a]=p.useState(!1),o={delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,isPointerInTransit:s,setIsPointerInTransit:a};return f.jsx(Bc.Provider,{value:o,children:e})},Ko=(e,t,r,n={mainAxis:8,crossAxis:0})=>{const s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o={width:window.innerWidth,height:window.innerHeight};let i=0,l=0;switch(r.split("-")[0]){case"top":i=s.left+s.width/2-a.width/2,l=s.top-a.height-n.mainAxis;break;case"bottom":i=s.left+s.width/2-a.width/2,l=s.bottom+n.mainAxis;break;case"left":i=s.left-a.width-n.mainAxis,l=s.top+s.height/2-a.height/2;break;case"right":i=s.right+n.mainAxis,l=s.top+s.height/2-a.height/2;break}r.includes("-start")?r.startsWith("top")||r.startsWith("bottom")?i=s.left+n.crossAxis:l=s.top+n.crossAxis:r.includes("-end")&&(r.startsWith("top")||r.startsWith("bottom")?i=s.right-a.width-n.crossAxis:l=s.bottom-a.height-n.crossAxis);let c=r;return i<8?i=8:i+a.width>o.width-8&&(i=o.width-a.width-8),l<8?r.startsWith("top")&&s.bottom+a.height+n.mainAxis<o.height?(c=r.replace("top","bottom"),l=s.bottom+n.mainAxis):l=8:l+a.height>o.height-8&&(r.startsWith("bottom")&&s.top-a.height-n.mainAxis>0?(c=r.replace("bottom","top"),l=s.top-a.height-n.mainAxis):l=o.height-a.height-8),{x:i,y:l,placement:c}},Jy=e=>{const{placement:t="top",trigger:r="hover",disabled:n=!1,open:s,defaultOpen:a=!1,onOpenChange:o,delay:i,offset:l={mainAxis:8,crossAxis:0}}=e,c=qy(),d={show:i?.show??(r==="hover"?c?.delayDuration??700:0),hide:i?.hide??(r==="hover"?150:0)},u={mainAxis:l?.mainAxis??8,crossAxis:l?.crossAxis??0},[h,m]=p.useState(a),[g,w]=p.useState(null),[x,b]=p.useState(null),[y,v]=p.useState({x:0,y:0,placement:t}),C=p.useRef(void 0),S=p.useRef(void 0),j=p.useId(),A=s!==void 0,k=A?s:h;p.useEffect(()=>{if(g&&x&&k){const L=Ko(g,x,t,u);v(L)}},[g,x,k,t,u]),p.useEffect(()=>{if(!k||!g||!x)return;const L=()=>{const I=Ko(g,x,t,u);v(I)};return window.addEventListener("resize",L),window.addEventListener("scroll",L,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}},[k,g,x,t,l]);const V=p.useCallback(()=>{if(n)return;S.current&&(window.clearTimeout(S.current),S.current=void 0);const L=d.show;L>0?C.current=window.setTimeout(()=>{A?o?.(!0):m(!0)},L):A?o?.(!0):m(!0)},[n,d.show,A,o]),M=p.useCallback(()=>{C.current&&(window.clearTimeout(C.current),C.current=void 0);const L=d.hide;L>0?S.current=window.setTimeout(()=>{A?o?.(!1):m(!1)},L):A?o?.(!1):m(!1)},[d.hide,A,o]),D=p.useCallback(()=>{k?M():V()},[k,V,M]);p.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current),S.current&&window.clearTimeout(S.current)},[]);const z=p.useCallback(()=>{const L={"aria-describedby":k?j:void 0};if(n)return L;switch(r){case"hover":return{...L,onMouseEnter:V,onMouseLeave:M};case"click":return{...L,onClick:D};case"focus":return{...L,onFocus:V,onBlur:M};case"manual":return L;default:return L}},[n,r,j,k,V,M,D]);return{isOpen:k,referenceElement:g,setReferenceElement:w,tooltipElement:x,setTooltipElement:b,position:y,id:j,getTriggerProps:z,openTooltip:V,closeTooltip:M,toggleTooltip:D}},Qy=({variant:e="dark",size:t="md",placement:r,animation:n="fade",className:s})=>{const a=Ky(n);return f.jsx(_.div,{className:_y({placement:r,variant:e,size:t,className:s}),initial:a.initial,animate:a.animate,exit:a.exit,transition:a.transition})},ex=({content:e,variant:t="dark",size:r="md",animation:n="fade",arrow:s={enabled:!0},className:a,style:o,id:i,isOpen:l,position:c,onRef:d})=>{const u=()=>Uy(n,c.placement);return f.jsx(We,{children:l&&f.jsxs(_.div,{ref:d,id:i,role:"tooltip",className:Wy({size:r,variant:t,className:a}),style:{position:"fixed",left:c.x,top:c.y,...o},initial:u().initial,animate:u().animate,exit:u().exit,transition:{duration:Yy.enter,ease:"easeOut"},children:[e,s?.enabled&&f.jsx(Qy,{variant:t,size:r,placement:c.placement,animation:n})]})})},tx=e=>{const{children:t,content:r,disabled:n=!1,portal:s=!0,portalContainer:a,asChild:o=!1,className:i,style:l,variant:c="dark",size:d="md",animation:u="fade",arrow:h={enabled:!0},zIndex:m=$y,"aria-label":g}=e,{isOpen:w,setReferenceElement:x,setTooltipElement:b,position:y,id:v,getTriggerProps:C}=Jy(e),S=()=>{const A=C();if(o&&p.isValidElement(t)){const k=t.props,V={...k,...A,ref:M=>{x(M),typeof k.ref=="function"?k.ref(M):k.ref?.current!==void 0&&(k.ref.current=M)},className:Go({active:w,disabled:n,className:k.className})};return p.createElement(t.type,V)}return f.jsx("span",{ref:x,className:Go({active:w,disabled:n,className:i}),style:l,"aria-label":g,...A,children:t})},j=()=>{const A=f.jsx("div",{className:Gy({visible:w}),style:{zIndex:m},children:f.jsx(ex,{content:r,variant:c,size:d,animation:u,arrow:h,id:v,isOpen:w,position:y,onRef:b})});if(s){const k=a||document.body;return Jn.createPortal(A,k)}return A};return f.jsxs(f.Fragment,{children:[S(),j()]})},rx=(e=!1)=>{const t=["flex items-center gap-3","max-w-fit"];return e&&t.push("cursor-pointer","rounded-lg","px-2 py-1","transition-all duration-200 ease-in-out","hover:bg-gray-100 dark:hover:bg-gray-800","focus:outline-none","focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","data-[focus-visible]:ring-2 data-[focus-visible]:ring-blue-500"),t.join(" ")},nx=()=>["flex flex-col","justify-center","min-w-0"].join(" "),sx=()=>["text-sm font-medium","text-gray-900 dark:text-white","truncate"].join(" "),ax=()=>["text-xs","text-gray-500 dark:text-gray-400","truncate"].join(" "),ox=(e="md")=>({sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"})[e],ix=(e="default")=>({default:"bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-200",primary:"bg-blue-500 text-white",secondary:"bg-purple-500 text-white",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-white",danger:"bg-red-500 text-white"})[e],lx=(e="md",t="default",r=!1,n=!1)=>{const s=["inline-flex items-center justify-center","overflow-hidden","select-none","flex-shrink-0",ox(e),ix(t)];return r?s.push("rounded-md"):s.push("rounded-full"),n&&s.push("opacity-50 cursor-not-allowed"),s.join(" ")},cx=e=>e.split(" ").map(t=>t.charAt(0)).join("").toUpperCase().slice(0,2),dx=()=>["w-full h-full","object-cover","rounded-inherit"].join(" "),Lc=p.forwardRef(({src:e,alt:t,name:r="",size:n="md",className:s="",isSquared:a=!1,color:o="default",isDisabled:i=!1,fallback:l,...c},d)=>{const[u,h]=p.useState(!1),g=[lx(n,o,a,i),s].filter(Boolean).join(" "),w=()=>{h(!0)},x=()=>l||(e&&!u?f.jsx("img",{src:e,alt:t||r,className:dx(),onError:w}):r?f.jsx("span",{children:cx(r)}):f.jsx("svg",{className:"w-full h-full p-1",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}));return f.jsx("div",{ref:d,className:g,...c,children:x()})});Lc.displayName="Avatar";const Oc=p.forwardRef(({name:e,description:t,isFocusable:r=!1,avatarProps:n={},className:s="",classNames:a,onClick:o,"data-testid":i,...l},c)=>{const u=[rx(r),a?.base,s].filter(Boolean).join(" "),m=[nx(),a?.wrapper].filter(Boolean).join(" "),w=[sx(),a?.name].filter(Boolean).join(" "),b=[ax(),a?.description].filter(Boolean).join(" "),y=()=>{r&&o&&o()},v=C=>{r&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),o?.())};return f.jsxs("div",{ref:c,className:u,onClick:y,onKeyDown:v,tabIndex:r?0:void 0,role:r?"button":void 0,"data-testid":i,...l,children:[f.jsx(Lc,{...n,name:n.name||e,"data-testid":i?`${i}-avatar`:void 0}),(e||t)&&f.jsxs("div",{className:m,children:[e&&f.jsx("span",{className:w,"data-testid":i?`${i}-name`:void 0,children:e}),t&&f.jsx("span",{className:b,"data-testid":i?`${i}-description`:void 0,children:t})]})]})});Oc.displayName="User";const zc=p.createContext(void 0),Ks=()=>{const e=p.useContext(zc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider");return e},ux=({children:e})=>{const[t,r]=p.useState(!1),[n,s]=p.useState(!1);p.useEffect(()=>{const c=()=>{s(window.innerWidth<768)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=p.useCallback(()=>{r(c=>!c)},[]),o=p.useCallback(()=>{r(!0)},[]),i=p.useCallback(()=>{r(!1)},[]);p.useEffect(()=>(t&&n?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t,n]);const l={isOpen:t,isMobile:n,toggle:a,open:o,close:i};return f.jsx(zc.Provider,{value:l,children:e})},fx=({children:e,className:t="",width:r=280,position:n="left",variant:s="temporary",backdrop:a=!0,closeOnBackdropClick:o=!0,closeOnEscape:i=!0})=>{const{isOpen:l,isMobile:c,close:d}=Ks();p.useEffect(()=>{if(!i||!l)return;const b=y=>{y.key==="Escape"&&d()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[i,l,d]);const u=()=>{o&&d()},h={open:{x:0,transition:{type:"spring",stiffness:300,damping:30}},closed:{x:n==="left"?-r:r,transition:{type:"spring",stiffness:300,damping:30}}},m={open:{opacity:1,transition:{duration:.2}},closed:{opacity:0,transition:{duration:.2}}},g=()=>s==="permanent"||s==="persistent"&&!c?!0:l,w=()=>a&&l&&(c||s==="temporary"),x=["fixed top-0 z-40 h-full","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700","shadow-lg dark:shadow-2xl",n==="left"?"left-0 border-r":"right-0 border-l",s==="permanent"&&"lg:relative lg:translate-x-0",s==="persistent"&&!c&&"md:relative md:translate-x-0",t].filter(Boolean).join(" ");return f.jsxs(f.Fragment,{children:[f.jsx(We,{children:w()&&f.jsx(_.div,{initial:"closed",animate:"open",exit:"closed",variants:m,className:"fixed inset-0 z-30 bg-black/50 backdrop-blur-sm",onClick:u,role:"button",tabIndex:-1,"aria-label":"Close sidebar"})}),f.jsx(We,{mode:"wait",children:g()&&f.jsx(_.aside,{initial:"closed",animate:"open",exit:"closed",variants:h,className:x,style:{width:typeof r=="number"?`${r}px`:r},role:"complementary","aria-label":"Sidebar navigation",children:f.jsx("div",{className:"flex flex-col h-full",children:e})})})]})},px=({children:e,className:t="",showCloseButton:r=!1,onClose:n})=>{const s=["flex items-center justify-between","px-4 py-3","border-b border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsxs("div",{className:s,children:[f.jsx("div",{className:"flex-1",children:e}),r&&f.jsx("button",{onClick:n,className:"ml-2 p-1 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors","aria-label":"Close sidebar",children:f.jsx("svg",{className:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},hx=({children:e,className:t=""})=>{const r=["flex-1 overflow-y-auto","px-4 py-2","scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},mx=({children:e,className:t=""})=>{const r=["flex items-center","px-4 py-3","border-t border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},gx=({children:e,icon:t,isActive:r=!1,href:n,to:s,onClick:a,className:o="",disabled:i=!1})=>{const l=s||n,c=["flex items-center gap-3","px-3 py-2 mx-2 my-1","rounded-lg","text-sm font-medium","transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1","dark:focus:ring-offset-gray-800"],d=i?["text-gray-400 dark:text-gray-600","cursor-not-allowed"]:r?["bg-blue-100 dark:bg-blue-900/30","text-blue-900 dark:text-blue-100","border-l-4 border-blue-500","pl-2 ml-2"]:["text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white"],u=[...c,...d,o].filter(Boolean).join(" "),h=f.jsxs(f.Fragment,{children:[t&&f.jsx("span",{className:`flex-shrink-0 ${i?"opacity-50":""}`,children:t}),f.jsx("span",{className:"flex-1 truncate",children:e})]}),m={className:u,onClick:i?void 0:a,"aria-disabled":i,role:l?"link":"button"};if(l&&!i){if(s)return f.jsx(Yr,{to:s,className:u,onClick:a,children:h});if(n)return f.jsx("a",{href:n,...m,children:h})}return f.jsx("button",{type:"button",...m,disabled:i,children:h})},bx=({children:e,className:t="","aria-label":r="Toggle sidebar"})=>{const{isOpen:n,toggle:s}=Ks(),a=["inline-flex items-center justify-center","w-10 h-10","rounded-md","text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors duration-200",t].filter(Boolean).join(" ");return f.jsx("button",{onClick:s,className:a,"aria-label":r,"aria-expanded":n,children:e||f.jsx(_.div,{animate:{rotate:n?180:0},transition:{duration:.2},children:f.jsx(yx,{})})})},yx=()=>f.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),xx=p.createContext(null),$c=()=>{const e=p.useContext(xx);if(!e)throw new Error("useLibraryRouter must be used within a LibraryRouterProvider");return e},vx=({routes:e,className:t="",renderItem:r})=>{const{currentPath:n}=$c(),s=(a,o)=>f.jsxs(Yr,{to:a.path,className:`flex items-center gap-3 px-3 py-2 mx-2 my-1 rounded-lg text-sm font-medium transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 dark:focus:ring-offset-gray-800 ${o?"bg-blue-100 dark:bg-blue-900/30 text-blue-900 dark:text-blue-100 border-l-4 border-blue-500 pl-2 ml-2":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white"}`,children:[a.icon&&f.jsx("span",{className:"flex-shrink-0",children:a.icon}),f.jsx("span",{className:"flex-1 truncate",children:a.label})]},a.path);return f.jsx("nav",{className:t,children:e.map(a=>f.jsxs("div",{className:"pb-2",children:[f.jsx("h3",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:a.label}),f.jsx("div",{className:"space-y-1",children:a.routes.map(o=>{const i=o.exact?n===o.path:n.startsWith(o.path);return r?r(o,i):s(o,i)})})]},a.label))})},wx=()=>{const{navigate:e,goBack:t,goForward:r,currentPath:n,routes:s}=$c(),a=p.useCallback((c,d)=>{d?window.history.replaceState(null,"",c):e(c)},[e]),o=p.useCallback((c,d=!1)=>d?n===c:n.startsWith(c),[n]),i=p.useCallback(()=>s.find(c=>c.exact?n===c.path:n.startsWith(c.path)),[s,n]),l=p.useCallback(c=>s.find(d=>d.path===c),[s]);return{navigateTo:a,goBack:t,goForward:r,isActive:o,currentPath:n,getCurrentRoute:i,getRouteByPath:l,routes:s}},Cx=(e,t)=>e.toLowerCase().includes(t.toLowerCase());function kx(e){return e?Array.from(e):[]}function yn(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}function bt(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Fc(e){const{items:t,defaultItems:r,inputValue:n,defaultInputValue:s="",selectedKey:a,defaultSelectedKey:o,menuTrigger:i="input",allowsCustomValue:l=!1,allowsEmptyCollection:c=!0,shouldCloseOnBlur:d=!0,defaultFilter:u=Cx,filterOptions:h,isDisabled:m=!1,isReadOnly:g=!1,autoFocus:w=!1,onInputChange:x,onSelectionChange:b,onOpenChange:y,onFocus:v,onBlur:C,onFocusChange:S,onKeyDown:j,onKeyUp:A,onClose:k,onClear:V,...M}=e,D=p.useRef(null),z=p.useRef(null),[L,I]=p.useState(s),[R,B]=p.useState(o||null),[P,T]=p.useState(!1),[N]=p.useState(!1),[E,F]=p.useState(null),$=n??L,O=a??R,K=p.useMemo(()=>kx(t??r),[t,r]),W=p.useMemo(()=>!$.trim()&&i!=="focus"?c?K:[]:$.trim()?K.filter(Q=>{const de=yn(Q);return u(de,$)}):K,[K,$,u,c,i]),J=p.useCallback(Q=>{if(n===void 0&&I(Q),x?.(Q),i==="input"&&Q.trim()&&!P&&(T(!0),y?.(!0,"input")),O!==null&&!l){const de=K.find((ge,_e)=>bt(ge,_e)===O);de&&yn(de)!==Q&&(a===void 0&&B(null),b?.(null))}},[n,x,i,P,y,O,l,K,a,b]),Y=p.useCallback(Q=>{a===void 0&&B(Q),b?.(Q);const de=K.find((ge,_e)=>bt(ge,_e)===Q);if(de){const ge=yn(de);J(ge)}T(!1),y?.(!1),k?.()},[a,b,K,J,y,k]),Z=p.useCallback((Q,de)=>{T(Q),y?.(Q,de),Q||(F(null),k?.())},[y,k]),ne=p.useCallback(Q=>{if(j?.(Q),!(m||g))switch(Q.key){case"ArrowDown":if(Q.preventDefault(),!P)T(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Lt)=>bt(_e,Lt)===E):-1,ge=de<W.length-1?de+1:0;W[ge]&&F(bt(W[ge],ge))}break;case"ArrowUp":if(Q.preventDefault(),!P)T(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Lt)=>bt(_e,Lt)===E):W.length,ge=de>0?de-1:W.length-1;W[ge]&&F(bt(W[ge],ge))}break;case"Enter":Q.preventDefault(),P&&E!==null&&Y(E);break;case"Escape":Q.preventDefault(),P&&(T(!1),y?.(!1),k?.());break;case"Tab":P&&(T(!1),y?.(!1),k?.());break}},[j,m,g,P,y,E,W,Y,k]),ae=p.useCallback(Q=>{v?.(Q),S?.(!0),i==="focus"&&!P&&(T(!0),y?.(!0,"focus"))},[v,S,i,P,y]),Te=p.useCallback(Q=>{C?.(Q),S?.(!1),d&&P&&setTimeout(()=>{T(!1),y?.(!1),k?.()},150)},[C,S,d,P,y,k]),he=p.useCallback(()=>{J(""),a===void 0&&B(null),b?.(null),V?.(),D.current&&D.current.focus()},[J,a,b,V]),at=p.useCallback(Q=>{Y(Q)},[Y]),Le=p.useCallback(()=>{P||Z(!0,"manual")},[P,Z]),se=p.useCallback(()=>{P&&Z(!1)},[P,Z]);p.useEffect(()=>{w&&D.current&&D.current.focus()},[w]),p.useEffect(()=>{const Q=de=>{P&&z.current&&!z.current.contains(de.target)&&(T(!1),y?.(!1),k?.())};if(P)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[P,y,k]);const{size:Se,...ye}=M,Ze=p.useMemo(()=>({...ye,ref:D,value:$,onChange:Q=>J(Q.target.value),onFocus:ae,onBlur:Te,onKeyDown:ne,onKeyUp:A,disabled:m,readOnly:g,"aria-expanded":P,"aria-haspopup":"listbox","aria-autocomplete":"list",role:"combobox"}),[ye,$,J,ae,Te,ne,A,m,g,P]),Oe=p.useMemo(()=>({role:"listbox","aria-label":"Suggestions"}),[]),Zr=p.useMemo(()=>({isOpen:P,onOpenChange:Z}),[P,Z]),ur=p.useMemo(()=>({type:"button",onClick:he,"aria-label":"Clear",tabIndex:-1}),[he]),Ae=p.useMemo(()=>({type:"button",onClick:()=>{P?se():Le()},"aria-label":P?"Close menu":"Open menu","aria-expanded":P,tabIndex:-1}),[P,se,Le]);return{inputValue:$,selectedKey:O,isOpen:P,isLoading:N,filteredItems:W,focusedKey:E,inputProps:Ze,listboxProps:Oe,popoverProps:Zr,clearButtonProps:ur,selectorButtonProps:Ae,containerRef:z,clearValue:he,selectItem:at,close:se,open:Le,setInputValue:J,setSelectedKey:Q=>{Q===null?(a===void 0&&B(null),b?.(null)):Y(Q)},setIsOpen:Z}}const Sx=H({base:["group relative w-full","inline-flex flex-col","text-foreground-500"],variants:{variant:{flat:"",bordered:"",faded:"",underlined:""},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"",md:"",lg:""},labelPlacement:{inside:"",outside:"flex-col","outside-left":"flex-row items-center"},fullWidth:{true:"w-full",false:"w-auto"},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},disableAnimation:{true:"",false:"transition-colors duration-200 ease-in-out"}},defaultVariants:{variant:"flat",color:"default",size:"md",labelPlacement:"inside",fullWidth:!0,isDisabled:!1,disableAnimation:!1}}),jx=H({base:["relative flex w-full","min-h-unit-10 items-center gap-2","px-3 py-2","transition-colors duration-200","group-data-[focus=true]:outline-2","group-data-[focus=true]:outline-focus","group-data-[focus=true]:outline-offset-2"],variants:{variant:{flat:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"],bordered:["border-2 border-default-200","data-[hover=true]:border-default-300","group-data-[focus=true]:border-default-foreground","bg-transparent"],faded:["bg-default-100 border-2 border-transparent","data-[hover=true]:border-default-200","group-data-[focus=true]:border-default-300","group-data-[focus=true]:bg-default-50"],underlined:["rounded-none border-b-2 border-default-300","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground","bg-transparent px-1 pb-0","after:content-[''] after:w-0 after:origin-center","after:absolute after:left-1/2 after:-translate-x-1/2","after:bottom-0 after:h-[2px]","after:transition-[width] after:duration-300","group-data-[focus=true]:after:w-full"]},color:{default:"",primary:{flat:"group-data-[focus=true]:bg-primary-50",bordered:"group-data-[focus=true]:border-primary",faded:"group-data-[focus=true]:border-primary group-data-[focus=true]:bg-primary-50",underlined:["group-data-[focus=true]:border-primary","after:bg-primary"]},secondary:{flat:"group-data-[focus=true]:bg-secondary-50",bordered:"group-data-[focus=true]:border-secondary",faded:"group-data-[focus=true]:border-secondary group-data-[focus=true]:bg-secondary-50",underlined:["group-data-[focus=true]:border-secondary","after:bg-secondary"]},success:{flat:"group-data-[focus=true]:bg-success-50",bordered:"group-data-[focus=true]:border-success",faded:"group-data-[focus=true]:border-success group-data-[focus=true]:bg-success-50",underlined:["group-data-[focus=true]:border-success","after:bg-success"]},warning:{flat:"group-data-[focus=true]:bg-warning-50",bordered:"group-data-[focus=true]:border-warning",faded:"group-data-[focus=true]:border-warning group-data-[focus=true]:bg-warning-50",underlined:["group-data-[focus=true]:border-warning","after:bg-warning"]},danger:{flat:"group-data-[focus=true]:bg-danger-50",bordered:"group-data-[focus=true]:border-danger",faded:"group-data-[focus=true]:border-danger group-data-[focus=true]:bg-danger-50",underlined:["group-data-[focus=true]:border-danger","after:bg-danger"]}},size:{sm:"min-h-unit-8 px-2 py-1",md:"min-h-unit-10 px-3 py-2",lg:"min-h-unit-12 px-4 py-3"},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},labelPlacement:{inside:"",outside:"","outside-left":""},isInvalid:{true:{flat:"bg-danger-50 text-danger",bordered:"border-danger data-[hover=true]:border-danger",faded:"border-danger bg-danger-50",underlined:"border-danger after:bg-danger"},false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{variant:"underlined",size:"sm",class:"px-1 pb-0"},{variant:"underlined",size:"md",class:"px-1 pb-0"},{variant:"underlined",size:"lg",class:"px-1 pb-0"}],defaultVariants:{variant:"flat",color:"default",size:"md",radius:"md",labelPlacement:"inside",isInvalid:!1,isDisabled:!1}});H({base:["w-full font-normal bg-transparent outline-none","placeholder:text-foreground-500","text-small text-foreground"],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},isDisabled:{true:"pointer-events-none",false:""}},defaultVariants:{size:"md",isDisabled:!1}});H({base:["block text-foreground-600","cursor-pointer","transition-colors duration-200","will-change-auto","origin-top-left"],variants:{size:{sm:"text-small",md:"text-small",lg:"text-medium"},labelPlacement:{inside:["absolute left-3 rtl:left-auto rtl:right-3","pointer-events-none z-10","transition-[transform,color,left,opacity] duration-200 ease-out","group-data-[filled=true]:scale-85","group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]","group-data-[filled=true]:pointer-events-auto"],outside:["relative text-foreground pb-1.5","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"],"outside-left":["relative text-foreground pr-2 rtl:pr-0 rtl:pl-2","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"]},color:{default:"",primary:"group-data-[focus=true]:text-primary",secondary:"group-data-[focus=true]:text-secondary",success:"group-data-[focus=true]:text-success",warning:"group-data-[focus=true]:text-warning",danger:"group-data-[focus=true]:text-danger"},isRequired:{true:"after:content-['*'] after:text-danger after:ml-0.5",false:""},isInvalid:{true:"!text-danger",false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{labelPlacement:"inside",size:"sm",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]","left-2 rtl:left-auto rtl:right-2"]},{labelPlacement:"inside",size:"lg",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]","left-4 rtl:left-auto rtl:right-4"]}],defaultVariants:{size:"md",labelPlacement:"inside",color:"default",isRequired:!1,isInvalid:!1,isDisabled:!1}});H({base:"text-small text-foreground-400 px-1",variants:{color:{default:"text-foreground-400",primary:"text-primary-600",secondary:"text-secondary-600",success:"text-success-600",warning:"text-warning-600",danger:"text-danger-500"},isInvalid:{true:"text-danger-500",false:""}},defaultVariants:{color:"default",isInvalid:!1}});const Tx=H({base:["w-full p-1 min-w-[200px]","bg-content1 border border-divider","rounded-medium shadow-large"],variants:{disableAnimation:{true:"",false:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200"}},defaultVariants:{disableAnimation:!1}});H({base:"max-h-64 overflow-auto",variants:{maxHeight:{sm:"max-h-32",md:"max-h-64",lg:"max-h-96",none:"max-h-none"}},defaultVariants:{maxHeight:"md"}});H({base:"flex items-center gap-1.5"});H({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-colors","opacity-0 data-[visible=true]:opacity-100","transition-opacity duration-150"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"}},defaultVariants:{size:"md"}});H({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-all duration-150","data-[open=true]:rotate-180"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"},disableRotation:{true:"data-[open=true]:rotate-0",false:""}},defaultVariants:{size:"md",disableRotation:!1}});H({base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],variants:{color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},variant:{solid:"",bordered:"border-2 border-transparent bg-transparent",light:"bg-transparent",flat:"",faded:"border-2 border-transparent",shadow:""},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},isSelected:{true:"",false:""},showDivider:{true:"mb-1.5 border-b border-divider pb-1.5",false:""}},compoundVariants:[{color:"default",variant:"solid",class:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]},{color:"default",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]},{color:"primary",variant:"solid",class:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]},{color:"primary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]},{color:"secondary",variant:"solid",class:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]},{color:"secondary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]},{color:"success",variant:"solid",class:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]},{color:"success",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]},{color:"warning",variant:"solid",class:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]},{color:"warning",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]},{color:"danger",variant:"solid",class:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]},{color:"danger",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}],defaultVariants:{color:"default",variant:"flat",isDisabled:!1,isSelected:!1,showDivider:!1}});const Ax=H({slots:{base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],wrapper:["w-full flex items-center gap-2"],title:["flex-1 text-small font-normal truncate","text-foreground group-data-[selected=true]:text-inherit"],description:["w-full text-tiny text-foreground-400 truncate","group-data-[selected=true]:text-inherit group-data-[selected=true]:opacity-70"],startContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"],endContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"]},variants:{color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},variant:{solid:{},bordered:{base:"border-2 border-transparent bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-2 border-transparent"},shadow:{}},size:{sm:{base:"px-1 py-1 text-tiny gap-1",title:"text-tiny",description:"text-tiny"},md:{base:"px-2 py-1.5 text-small gap-2",title:"text-small",description:"text-tiny"},lg:{base:"px-3 py-2 text-medium gap-3",title:"text-medium",description:"text-small"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"},false:{}},isSelected:{true:{},false:{}},isFocused:{true:{base:"data-[focus-visible=true]:outline-2 data-[focus-visible=true]:outline-offset-2 data-[focus-visible=true]:outline-focus"},false:{}},showDivider:{true:{base:"mb-1.5 border-b border-divider pb-1.5"},false:{}}},compoundVariants:[{color:"default",variant:"solid",class:{base:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]}},{color:"default",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]}},{color:"primary",variant:"solid",class:{base:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]}},{color:"primary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]}},{color:"secondary",variant:"solid",class:{base:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]}},{color:"secondary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]}},{color:"success",variant:"solid",class:{base:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]}},{color:"success",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]}},{color:"warning",variant:"solid",class:{base:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]}},{color:"warning",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]}},{color:"danger",variant:"solid",class:{base:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]}},{color:"danger",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}}],defaultVariants:{color:"default",variant:"flat",size:"md",isDisabled:!1,isSelected:!1,isFocused:!1,showDivider:!1}});H({base:"relative mb-2",variants:{showDivider:{true:"pb-1 mb-2 border-b border-divider",false:""}},defaultVariants:{showDivider:!1}});const Mx=H({slots:{base:["relative mb-2"],heading:["text-small font-medium text-default-500","px-2 py-1 select-none"],group:["w-full"],divider:["w-full h-px bg-divider my-2"]},variants:{showDivider:{true:{base:"pb-1 mb-2"},false:{}}},defaultVariants:{showDivider:!1}});H({base:["text-small font-medium text-default-500","px-2 py-1"]});H({base:"space-y-0.5"});const Br=p.forwardRef(({children:e,className:t,classNames:r,textValue:n,startContent:s,endContent:a,description:o,isSelected:i=!1,isFocused:l=!1,isDisabled:c=!1,showDivider:d=!1,variant:u="flat",color:h="default",size:m="md",itemKey:g,onSelectionChange:w,onPress:x,onPressStart:b,onPressEnd:y,onClick:v,onMouseDown:C,onKeyDown:S,...j},A)=>{const[k,V]=p.useState(!1),M=p.useCallback(()=>{c||(x?.(),g!==void 0&&w&&w(g))},[c,x,g,w]),D=p.useCallback(N=>{c||(N.preventDefault(),N.stopPropagation(),v?.(N),M())},[c,v,M]),z=p.useCallback(N=>{c||(N.preventDefault(),C?.(N),b?.())},[c,C,b]),L=p.useCallback(()=>{c||y?.()},[c,y]),I=p.useCallback(N=>{c||(S?.(N),(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),M()))},[c,S,M]),R=p.useMemo(()=>Ax({variant:u,color:h,size:m,isSelected:i,isFocused:l,isDisabled:c,showDivider:d}),[u,h,m,i,l,c,d]),B=o!=null&&o!=="",P=s!=null,T=a!=null;return f.jsx("li",{ref:A,className:q(R.base(),r?.base,t),role:"option","aria-selected":i,"aria-disabled":c,tabIndex:l?0:-1,"data-key":g,"data-selected":i,"data-focused":l,"data-disabled":c,"data-hover":k,onClick:D,onMouseDown:z,onMouseUp:L,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onKeyDown:I,...j,children:f.jsxs("div",{className:q(R.wrapper(),r?.wrapper),children:[P&&f.jsx("div",{className:q(R.startContent(),r?.startContent),children:s}),f.jsxs("div",{className:"flex-1 flex flex-col justify-center min-w-0",children:[f.jsx("div",{className:q(R.title(),r?.title),children:e||n}),B&&f.jsx("div",{className:q(R.description(),r?.description),children:o})]}),T&&f.jsx("div",{className:q(R.endContent(),r?.endContent),children:a})]})})});Br.displayName="AutocompleteItem";const Vx=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),Px=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})});function Ex(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Ix(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}const Wc=p.forwardRef(({label:e,placeholder:t="Search...",description:r,errorMessage:n,startContent:s,endContent:a,variant:o="flat",color:i="default",size:l="md",labelPlacement:c="inside",isDisabled:d=!1,isReadOnly:u=!1,isRequired:h=!1,isInvalid:m=!1,isClearable:g=!0,fullWidth:w=!0,disableAnimation:x=!1,disableSelectorIconRotation:b=!1,selectorIcon:y,clearIcon:v,className:C,classNames:S,popoverProps:j,listboxProps:A,inputProps:k,selectorButtonProps:V,clearButtonProps:M,children:D,...z},L)=>{const[I,R]=p.useState(!1),{inputValue:B,selectedKey:P,isOpen:T,filteredItems:N,focusedKey:E,inputProps:F,listboxProps:$,clearButtonProps:O,selectorButtonProps:K,containerRef:W,selectItem:J}=Fc(z),Y=p.useMemo(()=>Sx({variant:o,color:i,size:l,labelPlacement:c,isDisabled:d,fullWidth:w}),[o,i,l,c,d,w]),Z=p.useMemo(()=>jx({variant:o,color:i,size:l,isDisabled:d,isInvalid:m}),[o,i,l,d,m]),ne=p.useMemo(()=>Tx({disableAnimation:x}),[x]),ae=p.useCallback(se=>{J(se)},[J]),Te=p.useCallback(()=>D||N.map((se,Se)=>{const ye=Ex(se,Se),Ze=Ix(se);if(typeof se=="object"&&se!==null){const Oe=se;return f.jsx(Br,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,startContent:Oe.startContent,endContent:Oe.endContent,description:Oe.description,onSelectionChange:ae,children:Oe.label||Ze},ye)}return f.jsx(Br,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,onSelectionChange:ae,children:Ze},ye)}),[D,N,P,E,o,i,l,ae]),he=p.useMemo(()=>f.jsx(Vx,{className:q("w-4 h-4 text-default-400 transition-transform",!b&&T&&"rotate-180")}),[b,T]),at=p.useMemo(()=>f.jsx(Px,{className:"w-4 h-4 text-default-400"}),[]),Le=g&&B&&!d&&!u;return f.jsxs("div",{ref:se=>{typeof L=="function"?L(se):L&&(L.current=se),W&&(W.current=se)},className:q("relative",Y,S?.base,C),children:[e&&c==="outside"&&f.jsxs("label",{className:"text-small font-medium text-foreground pb-1 block",children:[e,h&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:q(Z,S?.inputWrapper),style:{zIndex:1},children:[s&&f.jsx("div",{className:"flex items-center",children:s}),f.jsx("input",{...F,...k,className:q("w-full bg-transparent outline-none placeholder:text-foreground-500",F.className,k?.className),placeholder:T||I||B?t:"",disabled:d,readOnly:u,required:h,onFocus:se=>{R(!0),F.onFocus?.(se)},onBlur:se=>{R(!1),F.onBlur?.(se)}}),e&&c==="inside"&&f.jsxs("label",{className:q("absolute left-3 transition-all duration-200 pointer-events-none z-10","text-small text-foreground-500","top-1/2 -translate-y-1/2 origin-left",(B||T||I)&&["text-tiny scale-85 -translate-y-[1.875rem] px-1 bg-content1","text-foreground-600"]),style:{zIndex:10},children:[e,h&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[a,Le&&f.jsx("button",{...O,...M,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",O.className,M?.className),children:v||at}),f.jsx("button",{...K,...V,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",K.className,V?.className),disabled:d,children:y||he})]})]}),r&&f.jsx("div",{className:"text-tiny text-foreground-400 mt-1",children:r}),m&&n&&f.jsx("div",{className:"text-tiny text-danger mt-1",children:typeof n=="function"?n({isInvalid:!0,validationErrors:[],validationDetails:{}}):n}),f.jsx(We,{children:T&&f.jsx(_.div,{initial:x?void 0:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:x?void 0:{opacity:0,y:-8},transition:{duration:x?0:.15,ease:"easeOut"},className:q("absolute top-full left-0 right-0 mt-1 z-[9999]",ne,S?.popoverContent,j?.className),style:{zIndex:9999},children:f.jsx("div",{className:q("max-h-64 overflow-y-auto overflow-x-hidden bg-content1 rounded-medium",S?.listboxWrapper),children:f.jsxs("ul",{...$,...A,className:q("w-full p-1 bg-content1 rounded-medium",$.className,A?.className),children:[Te(),N.length===0&&!D&&f.jsx("li",{className:"px-2 py-4 text-small text-foreground-400 text-center",children:A?.emptyContent||"No results found"})]})})})})]})});Wc.displayName="Autocomplete";const _c=p.forwardRef(({title:e,children:t,className:r,classNames:n,showDivider:s=!1,...a},o)=>{const i=p.useMemo(()=>Mx({showDivider:s}),[s]),l=e!=null&&e!=="";return f.jsxs("div",{ref:o,className:q(i.base(),n?.base,r),role:"group",...a,children:[l&&f.jsx("div",{className:q(i.heading(),n?.heading),role:"presentation",children:e}),f.jsx("div",{className:q(i.group(),n?.group),role:"group",children:t}),s&&f.jsx("div",{className:q(i.divider(),n?.divider),role:"separator"})]})});_c.displayName="AutocompleteSection";const Nx=(e,t,r=1,n=!0)=>{const s=[],a=(l,c,d=!1,u=!1)=>({type:l,value:c,isActive:d,isDisabled:u,key:`${l}-${c}`});s.push(a("page",1,e===1));const o=Math.max(2,e-r),i=Math.min(t-1,e+r);n&&o>2&&s.push(a("dots","...",!1,!0));for(let l=o;l<=i;l++)l!==1&&l!==t&&s.push(a("page",l,e===l));return n&&i<t-1&&s.push(a("dots","...",!1,!0)),t>1&&s.push(a("page",t,e===t)),s};function Gc(e){const{total:t,page:r,defaultPage:n=1,initialPage:s,siblings:a=1,showDots:o=!0,loop:i=!1,onChange:l}=e,c=r!==void 0,d=s??n,[u,h]=p.useState(d),g=Math.max(1,Math.min(t,c?r:u)),w=p.useMemo(()=>t<=0?[]:Nx(g,t,a,o),[g,t,a,o]),x=p.useCallback(A=>{const k=Math.max(1,Math.min(t,A));k!==g&&(c||h(k),l?.(k))},[c,g,t,l]),b=p.useCallback(()=>{g<t?x(g+1):i&&x(1)},[g,t,i,x]),y=p.useCallback(()=>{g>1?x(g-1):i&&x(t)},[g,t,i,x]),v=p.useCallback(()=>{x(1)},[x]),C=p.useCallback(()=>{x(t)},[x,t]);return{activePage:g,range:w,setPage:x,next:b,previous:y,first:v,last:C,isFirst:g===1,isLast:g===t,totalPages:t}}const Rx={xs:"min-w-6 h-6 text-xs px-1",sm:"min-w-8 h-8 text-sm px-2",md:"min-w-10 h-10 text-base px-3",lg:"min-w-12 h-12 text-lg px-4",xl:"min-w-14 h-14 text-xl px-5"},Ho={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},Dx={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Uc=(e,t,r=!1,n=!1)=>{const s={default:{flat:{base:"bg-default-100 text-default-600 hover:bg-default-200",active:"bg-default-300 text-default-800 font-medium",disabled:"bg-default-50 text-default-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-default-200 text-default-600 hover:border-default-300 hover:bg-default-50",active:"bg-default-100 border-default-400 text-default-800 font-medium",disabled:"bg-transparent border-default-100 text-default-300 cursor-not-allowed"},light:{base:"bg-transparent text-default-600 hover:bg-default-100",active:"bg-default-200 text-default-800 font-medium",disabled:"bg-transparent text-default-300 cursor-not-allowed"},faded:{base:"bg-default-100/50 text-default-600 hover:bg-default-200/70",active:"bg-default-300/80 text-default-800 font-medium",disabled:"bg-default-50/30 text-default-300 cursor-not-allowed"}},primary:{flat:{base:"bg-primary-100 text-primary-600 hover:bg-primary-200",active:"bg-primary-500 text-white font-medium",disabled:"bg-primary-50 text-primary-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-primary-200 text-primary-600 hover:border-primary-300 hover:bg-primary-50",active:"bg-primary-500 border-primary-500 text-white font-medium",disabled:"bg-transparent border-primary-100 text-primary-300 cursor-not-allowed"},light:{base:"bg-transparent text-primary-600 hover:bg-primary-100",active:"bg-primary-200 text-primary-800 font-medium",disabled:"bg-transparent text-primary-300 cursor-not-allowed"},faded:{base:"bg-primary-100/50 text-primary-600 hover:bg-primary-200/70",active:"bg-primary-500/90 text-white font-medium",disabled:"bg-primary-50/30 text-primary-300 cursor-not-allowed"}},secondary:{flat:{base:"bg-purple-100 text-purple-600 hover:bg-purple-200",active:"bg-purple-500 text-white font-medium",disabled:"bg-purple-50 text-purple-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-purple-200 text-purple-600 hover:border-purple-300 hover:bg-purple-50",active:"bg-purple-500 border-purple-500 text-white font-medium",disabled:"bg-transparent border-purple-100 text-purple-300 cursor-not-allowed"},light:{base:"bg-transparent text-purple-600 hover:bg-purple-100",active:"bg-purple-200 text-purple-800 font-medium",disabled:"bg-transparent text-purple-300 cursor-not-allowed"},faded:{base:"bg-purple-100/50 text-purple-600 hover:bg-purple-200/70",active:"bg-purple-500/90 text-white font-medium",disabled:"bg-purple-50/30 text-purple-300 cursor-not-allowed"}},success:{flat:{base:"bg-green-100 text-green-600 hover:bg-green-200",active:"bg-green-500 text-white font-medium",disabled:"bg-green-50 text-green-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-green-200 text-green-600 hover:border-green-300 hover:bg-green-50",active:"bg-green-500 border-green-500 text-white font-medium",disabled:"bg-transparent border-green-100 text-green-300 cursor-not-allowed"},light:{base:"bg-transparent text-green-600 hover:bg-green-100",active:"bg-green-200 text-green-800 font-medium",disabled:"bg-transparent text-green-300 cursor-not-allowed"},faded:{base:"bg-green-100/50 text-green-600 hover:bg-green-200/70",active:"bg-green-500/90 text-white font-medium",disabled:"bg-green-50/30 text-green-300 cursor-not-allowed"}},warning:{flat:{base:"bg-yellow-100 text-yellow-700 hover:bg-yellow-200",active:"bg-yellow-500 text-white font-medium",disabled:"bg-yellow-50 text-yellow-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-yellow-200 text-yellow-700 hover:border-yellow-300 hover:bg-yellow-50",active:"bg-yellow-500 border-yellow-500 text-white font-medium",disabled:"bg-transparent border-yellow-100 text-yellow-300 cursor-not-allowed"},light:{base:"bg-transparent text-yellow-700 hover:bg-yellow-100",active:"bg-yellow-200 text-yellow-800 font-medium",disabled:"bg-transparent text-yellow-400 cursor-not-allowed"},faded:{base:"bg-yellow-100/50 text-yellow-700 hover:bg-yellow-200/70",active:"bg-yellow-500/90 text-white font-medium",disabled:"bg-yellow-50/30 text-yellow-300 cursor-not-allowed"}},danger:{flat:{base:"bg-red-100 text-red-600 hover:bg-red-200",active:"bg-red-500 text-white font-medium",disabled:"bg-red-50 text-red-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-red-200 text-red-600 hover:border-red-300 hover:bg-red-50",active:"bg-red-500 border-red-500 text-white font-medium",disabled:"bg-transparent border-red-100 text-red-300 cursor-not-allowed"},light:{base:"bg-transparent text-red-600 hover:bg-red-100",active:"bg-red-200 text-red-800 font-medium",disabled:"bg-transparent text-red-300 cursor-not-allowed"},faded:{base:"bg-red-100/50 text-red-600 hover:bg-red-200/70",active:"bg-red-500/90 text-white font-medium",disabled:"bg-red-50/30 text-red-300 cursor-not-allowed"}}};return n?s[e][t].disabled:r?s[e][t].active:s[e][t].base},Bx=(e,t,r=!1)=>{const n=Uc(e,t,!1,r);return r?n:`${n} transition-all duration-200 ease-in-out hover:scale-105 active:scale-95`},Lx=e=>`${{xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-14 h-14 text-xl"}[e]} flex items-center justify-center text-default-400 cursor-default select-none`,Kc=(e=!1,t=!1)=>e||t?"transition-colors duration-200 ease-in-out":"transition-all duration-200 ease-in-out transform hover:scale-105 active:scale-95",Hc=(e,t)=>{const r=Rx[e],n=Dx[t];return`${r} ${n} flex items-center justify-center font-medium select-none outline-none focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2`},Ox=(e,t=!1,r=!1)=>`flex items-center justify-center ${r?Ho.xs:Ho[e]} ${t?"shadow-sm":""}`.trim(),je={size:"md",color:"primary",variant:"flat",radius:"md",siblings:1,showControls:!0,showFirstLast:!1,showPages:!0,showDots:!0,loop:!1,compact:!1,showShadow:!1,disableAnimation:!1},Hs=p.forwardRef(({value:e,type:t="page",isActive:r=!1,isDisabled:n=!1,onClick:s,children:a,className:o="",size:i,color:l,variant:c,radius:d,"aria-label":u,"data-testid":h},m)=>{const g=qr(),w=i??g.size,x=l??g.color,b=c??g.variant,y=d??g.radius,v=g.isDisabled,C=g.disableAnimation,S=v||n,j=Hc(w,y),A=Uc(x,b,r,S),k=Kc(C,S),V=()=>{S||t==="dots"||s?.(e)},M=t==="page"?r?`Current page, page ${e}`:`Go to page ${e}`:u,D=`${j} ${A} ${k} ${o}`.trim();return f.jsx("button",{ref:m,type:"button",disabled:S,onClick:V,className:D,"aria-label":M,"aria-current":r?"page":void 0,"data-testid":h,children:a??e})});Hs.displayName="PaginationItem";const dr=p.forwardRef(({direction:e,isDisabled:t=!1,onClick:r,children:n,className:s="",size:a,color:o,variant:i,radius:l,"aria-label":c,"data-testid":d},u)=>{const h=qr(),m=a??h.size,g=o??h.color,w=i??h.variant,x=l??h.radius,b=h.isDisabled,y=h.disableAnimation,v=b||t,C=Hc(m,x),S=Bx(g,w,v),j=Kc(y,v),A=()=>{v||r?.()},k=e==="prev"?"Go to previous page":"Go to next page",V=`${C} ${S} ${j} ${s}`.trim();return f.jsx("button",{ref:u,type:"button",disabled:v,onClick:A,className:V,"aria-label":c??k,"data-testid":d,children:n})});dr.displayName="BasePaginationCursor";const Xs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"prev","aria-label":"Go to previous page",...e}));Xs.displayName="PaginationPrevious";const Ys=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"next","aria-label":"Go to next page",...e}));Ys.displayName="PaginationNext";const qs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"prev","aria-label":"Go to first page",...e}));qs.displayName="PaginationFirst";const Zs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"next","aria-label":"Go to last page",...e}));Zs.displayName="PaginationLast";const Js=p.forwardRef(({className:e="",size:t,children:r,"data-testid":n},s)=>{const a=qr(),o=t??a.size,l=`${Lx(o)} ${e}`.trim();return f.jsx("span",{ref:s,className:l,"aria-hidden":"true",role:"presentation","data-testid":n,children:r??"…"})});Js.displayName="PaginationEllipsis";const Cr={prev:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"15,18 9,12 15,6"})}),next:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"9,18 15,12 9,6"})}),first:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"11,17 6,12 11,7"}),f.jsx("polyline",{points:"18,17 13,12 18,7"})]}),last:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"13,17 18,12 13,7"}),f.jsx("polyline",{points:"6,17 11,12 6,7"})]})},Xc=p.createContext(null),qr=()=>{const e=p.useContext(Xc);if(!e)throw new Error("usePaginationContext must be used within a Pagination component");return e},Yc=({total:e,page:t,defaultPage:r=1,initialPage:n,onChange:s,onPageChange:a,size:o=je.size,color:i=je.color,variant:l=je.variant,radius:c=je.radius,isDisabled:d=!1,disableAnimation:u=je.disableAnimation,controls:h={},display:m={},className:g="",style:w,"aria-label":x="Pagination Navigation","data-testid":b})=>{const y={showControls:je.showControls,showFirstLast:je.showFirstLast,placement:"both",labels:{prev:f.jsx(Cr.prev,{}),next:f.jsx(Cr.next,{}),first:f.jsx(Cr.first,{}),last:f.jsx(Cr.last,{})},...h},v={showPages:je.showPages,siblings:je.siblings,showDots:je.showDots,loop:je.loop,compact:je.compact,showShadow:je.showShadow,...m},C=Gc({total:e,page:t,defaultPage:r,initialPage:n,siblings:v.siblings,showDots:v.showDots,loop:v.loop,onChange:M=>{s?.(M),a?.(M)}}),S={activePage:C.activePage,totalPages:C.totalPages,setPage:C.setPage,size:o,color:i,variant:l,radius:c,isDisabled:d,disableAnimation:u,controls:y,display:v},j=Ox(o,v.showShadow,v.compact),A=M=>!y.showFirstLast||y.placement!=="both"&&y.placement!==M?null:M==="start"?f.jsx(qs,{isDisabled:d||C.isFirst,onClick:C.first,children:y.labels.first}):f.jsx(Zs,{isDisabled:d||C.isLast,onClick:C.last,children:y.labels.last}),k=M=>!y.showControls||y.placement!=="both"&&y.placement!==M?null:M==="start"?f.jsx(Xs,{isDisabled:d||C.isFirst,onClick:C.previous,children:y.labels.prev}):f.jsx(Ys,{isDisabled:d||C.isLast,onClick:C.next,children:y.labels.next}),V=()=>v.showPages?C.range.map(M=>M.type==="dots"?f.jsx(Js,{},M.key):f.jsx(Hs,{type:"page",value:M.value,isActive:M.isActive,isDisabled:d||M.isDisabled,onClick:()=>!d&&!M.isDisabled&&C.setPage(M.value),children:M.value},M.key)):null;return f.jsx(Xc.Provider,{value:S,children:f.jsxs("nav",{role:"navigation","aria-label":x,className:`${j} ${g}`.trim(),style:w,"data-testid":b,children:[A("start"),k("start"),V(),k("end"),A("end")]})})};Yc.displayName="Pagination";const Xt=e=>({linear:"linear",easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],backIn:[.6,-.05,.01,.99],backOut:[.12,0,.39,0],backInOut:[.37,0,.63,1],bounceIn:[.6,-.28,.735,.045],bounceOut:[.175,.885,.32,1.275],bounceInOut:[.68,-.55,.265,1.55]})[e],zx=(e,t,r=.05,n=.6)=>{const s=e.split(" "),a=[],o=[],i=e.split(`
15
15
  `);let l=0;return s.forEach((c,d)=>{const u=[];if(c.split("").forEach(m=>{const g=t==="letter"?l*r:t==="word"?d*r:0,w={char:m,index:l,delay:g,duration:n,variants:Xo("up")};u.push(w),a.push(w),l++}),d<s.length-1){const m={char:" ",index:l,delay:t==="letter"?l*r:d*r,duration:n,variants:Xo("up")};u.push(m),a.push(m),l++}const h=t==="word"?d*r:0;o.push({word:c,index:d,delay:h,duration:n,characters:u})}),{words:o,characters:a,lines:i}},Xo=e=>{const t={hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1}};switch(e){case"up":return{hidden:{...t.hidden,y:20},visible:{...t.visible,y:0}};case"down":return{hidden:{...t.hidden,y:-20},visible:{...t.visible,y:0}};case"left":return{hidden:{...t.hidden,x:20},visible:{...t.visible,x:0}};case"right":return{hidden:{...t.hidden,x:-20},visible:{...t.visible,x:0}};case"center":default:return t}},Yo=(e,t,r=0,n="es-ES",s="EUR")=>{const a={minimumFractionDigits:r,maximumFractionDigits:r};switch(t){case"currency":a.style="currency",a.currency=s;break;case"percentage":a.style="percent";break;case"number":default:a.style="decimal";break}return new Intl.NumberFormat(n,a).format(e)},$x=(e=10)=>{const a="!@#$%^&*()_+-=[]{}|;:,.<>?~`"+"0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"+"█▓▒░▄▀▐▌";return Array.from({length:e},()=>a[Math.floor(Math.random()*a.length)]).join("")},Fx=e=>{const t={low:{scale:.02,duration:.1},medium:{scale:.05,duration:.15},high:{scale:.1,duration:.2},extreme:{scale:.2,duration:.3}},{scale:r,duration:n}=t[e];return{hidden:{opacity:1,x:0,y:0,scaleX:1,scaleY:1},visible:{opacity:[1,.8,1],x:[0,-r*20,r*20,0],y:[0,r*10,-r*10,0],scaleX:[1,1+r,1-r,1],scaleY:[1,1-r,1+r,1],transition:{duration:n,repeat:1/0,repeatType:"mirror",ease:"linear"}}}},qc=(e,t)=>{const r=e.join(", ");switch(t){case"horizontal":return`linear-gradient(90deg, ${r})`;case"vertical":return`linear-gradient(180deg, ${r})`;case"diagonal":return`linear-gradient(45deg, ${r})`;case"radial":return`radial-gradient(circle, ${r})`;default:return`linear-gradient(90deg, ${r})`}},Wx=(e,t)=>{const r=Math.max(e.length,t.length),n=[],s=10;for(let a=0;a<=s;a++){const o=a/s;let i="";for(let l=0;l<r;l++){const c=e[l]||" ",d=t[l]||" ";Math.random()<o?i+=d:i+=c}n.push(i)}return n},Bt=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,_x=(e,t=2,r="horizontal")=>({"--text-gradient":qc(e,r),"--animation-duration":`${t}s`,"--background-size":r==="horizontal"?"200% 100%":"100% 200%"}),Gx=({text:e,texts:t,className:r="",trigger:n="inView",speed:s=2,cursor:a="line",cursorColor:o="currentColor",showCursor:i=!0,deleteAfter:l=!1,deleteSpeed:c=3,pauseBeforeDelete:d=1,loop:u=!1,repeat:h=!1,delay:m=0,disabled:g=!1,isActive:w=!1,onComplete:x,onStart:b,"data-testid":y})=>{const[v,C]=p.useState(""),[S,j]=p.useState(0),[A,k]=p.useState(!1),[V,M]=p.useState(!1),[D,z]=p.useState(!0),[L,I]=p.useState(!1),R=p.useRef(null),B=p.useRef(null),P=p.useRef(null),T=Bt(),E=(t||[e])[S]||e,F=!g&&!T&&(n==="immediate"||n==="inView"&&L||n==="manual"&&w);p.useEffect(()=>{if(!(n!=="inView"||!R.current))return P.current=new IntersectionObserver(([W])=>{W.isIntersecting?(I(!0),!h&&P.current&&P.current.disconnect()):h&&I(!1)},{threshold:.1}),P.current.observe(R.current),()=>{P.current&&P.current.disconnect()}},[n,h]),p.useEffect(()=>()=>{B.current&&clearTimeout(B.current)},[]),p.useEffect(()=>{if(!F){(g||T)&&C(E);return}const W=()=>{b&&b(),k(!0),z(!1),B.current=setTimeout(()=>{J()},m*1e3)},J=()=>{let Z=0;const ne=E,ae=setInterval(()=>{Z<=ne.length?(C(ne.slice(0,Z)),Z++):(clearInterval(ae),k(!1),z(!0),x&&x(),(l||t&&t.length>1)&&(B.current=setTimeout(()=>{(l||t&&t.length>1&&(u||S<t.length-1))&&Y()},d*1e3)))},1e3/s);return()=>clearInterval(ae)},Y=()=>{M(!0),z(!1);const Z=setInterval(()=>{C(ne=>ne.length>0?ne.slice(0,-1):(clearInterval(Z),M(!1),z(!0),t&&t.length>1&&(u?j(ae=>(ae+1)%t.length):S<t.length-1&&j(ae=>ae+1),B.current=setTimeout(()=>{J()},300)),""))},1e3/c);return()=>clearInterval(Z)};W()},[F,E,S,s,c,m,l,u,t,b,x,d]),p.useEffect(()=>{n==="manual"&&!w&&(C(""),j(0),k(!1),M(!1))},[n,w]);const $=()=>{const W={color:o,animation:D?"blink 1s infinite":"none"};switch(a){case"block":return{...W,backgroundColor:o,color:"transparent",marginLeft:"2px",width:"0.6em",display:"inline-block"};case"underscore":return{...W,borderBottom:`2px solid ${o}`,marginLeft:"1px",paddingBottom:"2px"};case"line":default:return{...W,borderLeft:`2px solid ${o}`,marginLeft:"2px",paddingLeft:"1px"}}},O=()=>{n==="hover"&&!A&&!V&&(C(""),j(0))},K=()=>{n==="focus"&&!A&&!V&&(C(""),j(0))};return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:`
16
16
  @keyframes blink {
17
17
  0%, 50% { opacity: 1; }