@ceed/ads 0.1.82 → 1.0.0-next.1

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.js CHANGED
@@ -1,2 +1,2 @@
1
- import{useTheme as ex,useColorScheme as ox,useThemeProps as tx,ButtonGroup as rx,alertClasses as nx,boxClasses as ax,buttonClasses as ix,checkboxClasses as lx,dividerClasses as sx,iconButtonClasses as px,inputClasses as dx,menuClasses as mx,menuButtonClasses as cx,menuItemClasses as ux,optionClasses as gx,radioClasses as fx,radioGroupClasses as hx,selectClasses as yx,switchClasses as Cx,tableClasses as bx,textareaClasses as vx,typographyClasses as xx,formControlClasses as Dx,formLabelClasses as Px,formHelperTextClasses as Mx,gridClasses as Tx,stackClasses as kx,sheetClasses as wx,modalClasses as Ix,modalCloseClasses as Ax,modalDialogClasses as Sx,modalOverflowClasses as Bx,dialogTitleClasses as Nx,dialogContentClasses as Ex,dialogActionsClasses as Fx,tooltipClasses as Ox,tabsClasses as Lx,tabListClasses as zx,tabPanelClasses as Rx,accordionClasses as Vx,accordionDetailsClasses as Hx,accordionGroupClasses as $x,accordionSummaryClasses as Yx,AutocompleteListbox as Jx,AutocompleteOption as _x,autocompleteClasses as Ux,autocompleteListboxClasses as Gx,autocompleteOptionClasses as Wx,avatarClasses as qx,avatarGroupClasses as Kx,AspectRatio as jx,aspectRatioClasses as Zx,Badge as Xx,badgeClasses as Qx,breadcrumbsClasses as eD,cardClasses as oD,cardActionsClasses as tD,cardContentClasses as rD,cardCoverClasses as nD,cardOverflowClasses as aD,chipClasses as iD,CircularProgress as lD,circularProgressClasses as sD,Drawer as pD,drawerClasses as dD,LinearProgress as mD,linearProgressClasses as cD,List as uD,listClasses as gD,ListDivider as fD,listDividerClasses as hD,ListItem as yD,listItemClasses as CD,ListItemButton as bD,listItemButtonClasses as vD,ListItemContent as xD,listItemContentClasses as DD,ListItemDecorator as PD,listItemDecoratorClasses as MD,ListSubheader as TD,listSubheaderClasses as kD,Link as wD,linkClasses as ID,Slider as AD,sliderClasses as SD,stepClasses as BD,StepButton as ND,stepButtonClasses as ED,stepperClasses as FD,Skeleton as OD,skeletonClasses as LD}from"@mui/joy";import Ve from"react";import{AccordionGroup as Fn,Accordion as On,AccordionSummary as Ln,AccordionDetails as zn}from"@mui/joy";import{motion as Po}from"framer-motion";var Rn=Po(Ln),Mo=Rn;Mo.displayName="AccordionSummary";var Vn=Po(zn),To=Vn;To.displayName="AccordionDetails";var Hn=Po(On);function ko(e){let{summary:o,details:t,variant:r,color:i,...a}=e,n=r==="solid"?"solid":void 0;return Ve.createElement(Hn,{variant:n,color:i,...a},Ve.createElement(Mo,{variant:n,color:i},o),Ve.createElement(To,{variant:n,color:i},t))}ko.displayName="Accordion";var $n=Po(Fn);function gt(e){let{variant:o,color:t,items:r,...i}=e;return Ve.createElement($n,{variant:o,color:t,...i},r.map((a,n)=>Ve.createElement(ko,{key:n,summary:a.summary,details:a.details,index:n,variant:o,color:t})))}gt.displayName="Accordions";import wo from"react";import{Alert as Gn,styled as Wn}from"@mui/joy";import{motion as qn}from"framer-motion";import Yn from"react";import{Typography as Jn}from"@mui/joy";import{motion as _n}from"framer-motion";var Un=_n(Jn),U=e=>Yn.createElement(Un,{...e});U.displayName="Typography";var G=U;import{Stack as Ie}from"@mui/joy";var z=Ie;var Kn=Wn(qn(Gn))({alignItems:"flex-start",fontWeight:"unset"});function ft(e){let{title:o,content:t,actions:r,color:i="primary",...a}=e,n=e.invertedColors||e.variant==="solid";return wo.createElement(Kn,{...a,color:i,endDecorator:r,invertedColors:n},wo.createElement(z,null,o&&wo.createElement(G,{level:"title-sm",color:i},o),wo.createElement(G,{level:"body-sm",color:i},t)))}ft.displayName="Alert";import V,{useCallback as ht,useEffect as Ca,useMemo as _e,useRef as ba}from"react";import{Autocomplete as va,AutocompleteOption as xa,ListSubheader as Da,AutocompleteListbox as Pa,ListItemDecorator as cr,CircularProgress as Ma,styled as ur}from"@mui/joy";import Ta from"@mui/icons-material/Close";import{useVirtualizer as ka}from"@tanstack/react-virtual";import{Popper as wa}from"@mui/base";import{FormControl as jn,styled as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Zn(Xn(jn))({width:"100%"}),He=Qn;He.displayName="FormControl";var ue=He;import{FormLabel as ea}from"@mui/joy";import{motion as oa}from"framer-motion";var ta=oa(ea),$e=ta;$e.displayName="FormLabel";var ge=$e;import{FormHelperText as ra}from"@mui/joy";import{motion as na}from"framer-motion";var aa=na(ra),Ye=aa;Ye.displayName="FormHelperText";var fe=Ye;import{Chip as ia}from"@mui/joy";import{motion as la}from"framer-motion";var sa=la(ia),Ae=sa;Ae.displayName="Chip";var mr=Ae;import pa,{forwardRef as da}from"react";import{IconButton as ma}from"@mui/joy";import{motion as ca}from"framer-motion";var ua=ca(ma),Je=da(({...e},o)=>pa.createElement(ua,{ref:o,...e}));Je.displayName="IconButton";var $=Je;import{useState as ga,useCallback as fa,useEffect as ha,useRef as ya}from"react";function R(e,o,t,r){let{current:i}=ya(e!==void 0),[a,n]=ga(e??o);ha(()=>{i&&n(e??o)},[e,o,i]);let l=fa(p=>{let d=typeof p=="function"?p(a):p;(r?.disableStrict||!i)&&n(d),t?.(d)},[i,t,a,r]);return[a,l]}var Ia=ur(wa,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Aa=V.forwardRef((e,o)=>{let{anchorEl:t,open:r,modifiers:i,children:a,ownerState:{loading:n,size:l="md"},...p}=e,d=ba(null),s=a[0].every(x=>x.hasOwnProperty("group")),u=n?[a[1]]:a[0].length===0?[a[2]]:s?a[0].flatMap(x=>[V.createElement(Da,{key:x.key,component:"li"},x.group),...x.children]):a[0],f=ka({count:u.length,estimateSize:()=>36,getScrollElement:()=>d.current,measureElement:x=>x.clientHeight,overscan:5}),C=f.getVirtualItems();return Ca(()=>{r&&f.measure()},[r,f]),V.createElement(Ia,{ref:o,anchorEl:t,open:r,modifiers:i},V.createElement(Pa,{...p},V.createElement("div",{ref:d,style:{overflow:"auto"}},V.createElement("div",{style:{height:`${f.getTotalSize()}px`,position:"relative"}},C.map(({index:x,size:c,start:m,key:h})=>V.cloneElement(u[x],{key:h,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${c}px`,transform:`translateY(${m}px)`,overflow:"visible"},children:V.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},u[x].props.children)}))))))}),Io={sm:"20px",md:"24px",lg:"28px"},Sa=ur($,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:Io[o],height:Io[o],minWidth:Io[o],minHeight:Io[o],borderRadius:"50%"}));function Ue(e){let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,onChange:p,onChangeComplete:d,sx:s,className:u,...f}=e,[C,x]=R(e.value,e.defaultValue||"",ht(b=>p?.({target:{value:b,name:e.name}}),[p,e.name])),c=_e(()=>e.options.map(b=>typeof b!="object"?{value:b,label:b}:b),[e.options]),m=_e(()=>{let b=new Map;return c.forEach(v=>{b.set(v.value,v)}),b},[c]),h=_e(()=>e.loading?{value:"",label:"",startDecorator:V.createElement(Ma,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(C)?C.filter(b=>m.has(b)).map(b=>m.get(b||"")):m.get(C),[C,m,e.loading]),g=ht(b=>V.isValidElement(b)&&!e.loading?V.cloneElement(b,{size:a}):b,[a,e.loading]),S=_e(()=>g(h?.startDecorator||e.startDecorator),[h,g,e.startDecorator]),k=_e(()=>g(h?.endDecorator||e.endDecorator),[h,g,e.endDecorator]),y=ht((b,v)=>{let M=v,T=Array.isArray(M)?M.map(F=>F.value):M?.value;x(T),(Array.isArray(M)&&M.map(F=>m.get(F.value))||m.get(M?.value))&&d?.({...b,target:{...b.target,value:T}})},[d,x,m]),D=V.createElement(va,{...f,required:l,onChange:y,color:t?"danger":i,value:h||null,options:c,size:a,disabled:n,startDecorator:S,endDecorator:k,getOptionLabel:b=>`${b.label??""}`,renderTags:(b,v)=>b.map((M,T)=>{let{onClick:F,...O}=v({index:T});return g(V.createElement(mr,{color:"primary",...O},V.createElement(z,{direction:"row",alignItems:"center",gap:2,py:.5},M.value,g(V.createElement(Sa,{color:"primary",variant:"soft",onClick:F},V.createElement(Ta,null))))))}),slots:{listbox:Aa},renderOption:(b,v)=>V.createElement(xa,{...b},v.startDecorator&&V.createElement(cr,{sx:M=>({marginInlineEnd:`var(--Input-gap, ${M.spacing(1)})`})},g(v.startDecorator)),g(v.label),v.endDecorator&&V.createElement(cr,{sx:M=>({marginInlineStart:`var(--Input-gap, ${M.spacing(1)})`})},g(v.endDecorator))),renderGroup:b=>b});return V.createElement(ue,{required:l,color:i,size:a,error:t,disabled:n,sx:s,className:u},o&&V.createElement(ge,null,o),D,r&&V.createElement(fe,null,r))}Ue.displayName="Autocomplete";var gr=Ue;import Ba,{forwardRef as Na,useMemo as Ea}from"react";import{Avatar as Fa,AvatarGroup as fr,styled as Oa,useThemeProps as La}from"@mui/joy";var za=Oa(Fa,{name:"Avatar",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Ra=e=>{if(/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e))return e[0];{let t=e.trim().split(/\s+/);if(t.length===0)return;if(t.length===1)return t[0].charAt(0).toUpperCase();let r=t[0],i=t[t.length-1];return(r.charAt(0)+i.charAt(0)).toUpperCase()}},Ao=Na(function(o,t){let r=La({props:o,name:"Avatar"}),{children:i,getInitial:a=Ra,...n}=r,l=Ea(()=>typeof i=="string"?a?.(i)??"":i,[i,a]);return Ba.createElement(za,{...n,children:l,ref:t})});import{Box as Va}from"@mui/joy";import{motion as Ha}from"framer-motion";var $a=Ha(Va),Ge=$a;Ge.displayName="Box";var So=Ge;import le from"react";import{Breadcrumbs as br,Link as Ka,MenuButton as ja}from"@mui/joy";import hr from"react";import{Menu as Ya,MenuItem as Ja}from"@mui/joy";import{motion as yr}from"framer-motion";var _a=yr(Ya),be=e=>hr.createElement(_a,{...e});be.displayName="Menu";var Ua=yr(Ja),ve=e=>hr.createElement(Ua,{...e});ve.displayName="MenuItem";var Cr=be;import{Dropdown as Ga}from"@mui/joy";import{motion as Wa}from"framer-motion";var qa=Wa(Ga),We=qa;We.displayName="Dropdown";var Bo=We;function yt(e){let{crumbs:o,size:t,startCrumbCount:r=1,endCrumbCount:i=3,slots:{link:a,...n}={link:Ka},slotProps:{link:l,...p}={link:{color:"neutral"}},collapsed:d=!0,...s}=e,u=m=>m.type==="link"&&a?le.createElement(a,{to:m.linkHref,href:m.linkHref,...l},m.label):le.createElement(G,null,m.label);if(!d)return le.createElement(br,{size:t,slots:n,slotProps:p,...s},o.map(m=>le.createElement(u,{...m})));let f=Math.max(1,i),C=o.slice(0,r).map(m=>le.createElement(u,{...m})),x=(r+f>o.length?o.slice(r):o.slice(-f)).map(m=>le.createElement(u,{...m})),c=o.slice(r,-f).map(m=>le.createElement(ve,null,le.createElement(u,{...m})));return le.createElement(br,{size:t,slots:n,slotProps:p,...s},C,c.length&&le.createElement(Bo,null,le.createElement(ja,{size:t,variant:"plain"},"..."),le.createElement(Cr,{size:t},c)),x)}yt.displayName="Breadcrumbs";import Za,{forwardRef as Xa}from"react";import{Button as Qa}from"@mui/joy";import{motion as ei}from"framer-motion";var oi=ei(Qa),qe=Xa(({...e},o)=>Za.createElement(oi,{ref:o,...e}));qe.displayName="Button";var W=qe;import A,{Fragment as Le,forwardRef as ni,useMemo as Ir}from"react";import{styled as de}from"@mui/joy";import ai from"@mui/icons-material/ChevronLeft";import ii from"@mui/icons-material/ChevronRight";import{AnimatePresence as Ar,motion as li}from"framer-motion";var vr=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),r=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((r.getDate()+t.getDay())/7),n=1;for(let l=1;l<=a;l++){let p=[];for(let d=1;d<=7;d++)l===i&&d<t.getDay()+1||n>r.getDate()?p.push(void 0):(p.push(n),n++);o.push(p)}return o},xr=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Ct=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Dr=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Pr=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let r=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),r})},Mr=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},bt=(e,o)=>{let t=new Date(e),r=new Date(o);return t.setHours(0,0,0,0),r.setHours(0,0,0,0),t.getTime()===r.getTime()},xe=(e,o,t)=>{let r=new Date(t);r.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return r>=i&&r<=a},No=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Tr,useMemo as vt,useState as Eo}from"react";import{useThemeProps as ti}from"@mui/joy";var ri=(e,o)=>o.includes(e)?e:o[0],kr=e=>{let[o,t]=Eo(()=>ri(e.view||"day",e.views||["day","month"])),[r,i]=Eo(e.defaultValue),[a,n]=Eo(()=>{let h=new Date;return h.setDate(1),h.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||h}),[[l,p],d]=Eo([0,0]),s=e.view??o,u=vt(()=>{let h=e.minDate||new Date(0);return h.setHours(0,0,0,0),h},[e.minDate]),f=vt(()=>{let h=e.maxDate||new Date(864e13);return h.setHours(0,0,0,0),h},[e.maxDate]),C=Tr(h=>{d([l+h,h])},[l]),x=Tr(h=>{n(h),s==="month"?a.getFullYear()!==h.getFullYear()&&C(h>a?1:-1):C(h>a?1:-1),e.onMonthChange?.(h)},[s,e,a,C]),c=ti({props:{locale:"default",views:["day","month"],view:s,value:e.value??r,...e,minDate:u,maxDate:f,onChange:e.value?e.onChange:h=>{i(h),e.onChange?.(h)},onMonthChange:x,onViewChange:()=>{let h=s==="month"?"day":"month";!(!e.views||e.views.includes(h))||e.view===h||(e.onViewChange?e.onViewChange(h):t(h))}},name:"Calendar"}),m=vt(()=>({...c,viewMonth:a,direction:p}),[c,a,p]);return[c,m]};import{useCallback as Oe,useState as wr}from"react";var Fo=e=>{let[o,t]=wr(null),[r,i]=wr(null);return{calendarTitle:e.view==="month"?xr(e.viewMonth,e.locale||"default"):Ct(e.viewMonth,e.locale||"default"),onPrev:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let p=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":p?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,r]),getPickerDayProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=!!e.value&&(bt(n,e.value[0])||e.value[1]&&bt(n,e.value[1])),p=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]),t(null)};return{isToday:Mr(n),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(n):void 0,disabled:e.minDate&&n<e.minDate||e.maxDate&&n>e.maxDate||e.disableFuture&&n>new Date||e.disablePast&&n<(()=>{let s=new Date;return s.setHours(0,0,0,0),s})(),tabIndex:-1,"aria-label":n.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":p?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let l=!e.views?.find(f=>f==="day"),p=l&&e.rangeSelection,d=!!e.value&&(No(n,e.value[0])||e.value[1]&&No(n,e.value[1])),s=p&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),u=()=>{p?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):l?e.onChange?.([n,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(n)),i(null)};return{isSelected:d,onMouseEnter:p&&e.value?.[0]&&!e.value?.[1]?()=>i(n):void 0,disabled:e.minDate&&(()=>{let f=new Date(n);return f.setMonth(f.getMonth()+1),f.setDate(0),f<e.minDate})()||e.maxDate&&(()=>{let f=new Date(n);return f.setDate(0),f>e.maxDate})()||e.disableFuture&&n>new Date||e.disablePast&&n<new Date&&!No(n,new Date),onClick:u,tabIndex:-1,"aria-label":Ct(n,e.locale||"default"),"aria-selected":d?"true":void 0,"aria-current":s?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,r])}};var si=de("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),pi=de("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),Sr=de("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Br=de(li.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),di=de("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),mi=de("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),ci=de(W,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),ui=de("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),gi=de("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),fi=de(W,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),hi=de(W,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:r})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Nr={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},Oo=1e4,Er=(e,o)=>Math.abs(e)*o,yi=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:r}=Fo(o),i=Ir(()=>vr(o.viewMonth),[o.viewMonth]),a=Ir(()=>Pr(o.locale||"default"),[o.locale]);return A.createElement(Sr,{calendarType:"datePicker"},A.createElement(Ar,{initial:!1,custom:o.direction},A.createElement(Br,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Nr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Er(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement(di,null,A.createElement("tr",null,a.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${n}_${l}`},A.createElement("th",null,A.createElement(G,{level:"body-xs",textAlign:"center"},n)),l<6&&A.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),A.createElement(mi,null,i.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${l}`},A.createElement("tr",null,n.map((p,d)=>p?A.createElement(Le,{key:d},A.createElement(ui,{...r(p)},A.createElement(hi,{size:"sm",variant:"plain",color:"neutral",...t(p)},p)),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):A.createElement(Le,{key:d},A.createElement("td",null),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:13,style:{height:4}}))))))))},Ci=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:r}=Fo(o),i=Array.from({length:12},(n,l)=>l).reduce((n,l)=>(n[n.length-1].length===4&&n.push([]),n[n.length-1].push(l),n),[[]]),a=!o.views?.find(n=>n==="day");return A.createElement(Sr,{calendarType:a?"monthPicker":"datePicker"},A.createElement(Ar,{initial:!1,custom:o.direction},A.createElement(Br,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Nr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Er(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement("tbody",null,i.map((n,l)=>A.createElement(Le,{key:l},A.createElement("tr",null,n.map((p,d)=>A.createElement(Le,{key:p},A.createElement(gi,{...r(p)},A.createElement(fi,{size:"sm",variant:"plain",color:"neutral",...t(p)},Dr(p,o.locale))),d<3&&A.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ke=ni((e,o)=>{let[t,r]=kr(e),{value:i,defaultValue:a,onChange:n,locale:l,onViewChange:p,onMonthChange:d,view:s,views:u,rangeSelection:f,minDate:C,maxDate:x,disableFuture:c,disablePast:m,...h}=t,{calendarTitle:g,onPrev:S,onNext:k}=Fo(r);return A.createElement(si,{ref:o,...h},A.createElement(pi,null,A.createElement($,{size:"sm",onClick:S,"aria-label":`Previous ${s==="day"?"Month":"Year"}`},A.createElement(ai,null)),A.createElement(ci,{ownerState:r,variant:"plain",color:"neutral",onClick:p,"aria-label":"Switch Calendar View"},g),A.createElement($,{size:"sm",onClick:k,"aria-label":`Next ${s==="day"?"Month":"Year"}`},A.createElement(ii,null))),s==="day"&&A.createElement(yi,{ownerState:r}),s==="month"&&A.createElement(Ci,{ownerState:r}))});Ke.displayName="Calendar";var Me=Ke;import{Card as bi,CardContent as vi,CardCover as xi,CardActions as Di,CardOverflow as Pi}from"@mui/joy";import{motion as je}from"framer-motion";var Mi=je(bi),Ze=Mi;Ze.displayName="Card";var Ti=je(vi),xt=Ti;xt.displayName="CardContent";var ki=je(xi),Dt=ki;Dt.displayName="CardCover";var wi=je(Di),Pt=wi;Pt.displayName="CardActions";var Ii=je(Pi),Mt=Ii;Mt.displayName="CardOverflow";import Ai from"react";import{Checkbox as Si}from"@mui/joy";import{motion as Bi}from"framer-motion";var Ni=Bi(Si),Xe=e=>Ai.createElement(Ni,{...e});Xe.displayName="Checkbox";var Qe=Xe;import{styled as Ei}from"@mui/joy";import Fi,{forwardRef as Oi}from"react";var Li=Ei("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"&&e!=="overrideBreakpoint"})(({theme:e,maxWidth:o="lg",overrideBreakpoint:t})=>[{width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),[e.breakpoints.up("lg")]:{paddingLeft:e.spacing(8),paddingRight:e.spacing(8)},maxWidth:e.breakpoints.values[o]},t?{paddingLeft:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4),paddingRight:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4)}:null]),Tt=Oi(function(o,t){return Fi.createElement(Li,{ref:t,...o})});Tt.displayName="Container";import Lo,{useCallback as Or,useMemo as Lr,useState as _i}from"react";import{IntlMessageFormat as Ui}from"intl-messageformat";import{NumericFormat as Gi}from"react-number-format";import Te,{useCallback as zi}from"react";import{Input as Ri}from"@mui/joy";import{motion as Vi}from"framer-motion";import Hi from"@mui/icons-material/Close";var $i=Vi(Ri),eo=Te.forwardRef((e,o)=>{let{label:t,helperText:r,error:i,style:a,size:n,color:l,disabled:p,required:d,onChange:s,name:u,sx:f,className:C,enableClearable:x,...c}=e,[m,h]=R(e.value,e.defaultValue,zi(y=>{s?.({target:{value:y?.toString()||"",name:u||""}})},[s,u])),g=y=>{h(y.target.value)},S=()=>{h(e.defaultValue||"")},k=Te.createElement($i,{value:m,name:u,onChange:g,required:d,color:i?"danger":l,disabled:p,slotProps:{input:{ref:o,...c.slotProps?.input},...c.slotProps},...c,endDecorator:x?Te.createElement(z,{gap:1,direction:"row"},c.endDecorator,m&&Te.createElement($,{onMouseDown:y=>y.preventDefault(),onClick:S,"aria-label":"Clear"},Te.createElement(Hi,null))):c.endDecorator});return Te.createElement(ue,{required:d,color:l,size:n,error:i,disabled:p,sx:f,className:C},t&&Te.createElement(ge,null,t),k,r&&Te.createElement(fe,null,r))});eo.displayName="Input";var X=eo;import{styled as Wi,useThemeProps as qi}from"@mui/joy";import Yi from"intl-messageformat";var Ji={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},Fr=(e="USD")=>{let[o,t,r,...i]=new Yi(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=Ji[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:r,placeholder:r?`${o} 0${r}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!r,decimalScale:a}};var Ki=Lo.forwardRef(function(o,t){let{onChange:r,...i}=o;return Lo.createElement(Gi,{...i,onValueChange:({value:a})=>{r?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),ji=Wi(X,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),zo=Lo.forwardRef(function(o,t){let r=qi({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:n,label:l,error:p,helperText:d,required:s,disabled:u,useMinorUnit:f,sx:C,className:x,...c}=r,{symbol:m,thousandSeparator:h,decimalSeparator:g,placeholder:S,fixedDecimalScale:k,decimalScale:y}=Fr(i),[D,b]=R(r.value,r.defaultValue,Or(L=>n?.({target:{name:a,value:L}}),[n,a])),v=Lr(()=>D&&f?D/Math.pow(10,y):D,[D,f,y]),M=Lr(()=>r.max&&f?r.max/Math.pow(10,y):r.max,[r.max,f,y]),[T,F]=_i(!!M&&!!v&&v>M),O=Or(L=>{if(L.target.value===""){b(void 0);return}let q=Number(f?L.target.value?.replace(g,""):L.target.value);M&&Number(L.target.value)>M?F(!0):F(!1),b(q)},[g,M,f,b]);return Lo.createElement(ji,{...c,ref:t,value:v,placeholder:S,onChange:O,error:p||T,disabled:u,required:s,color:p||T?"danger":r.color,label:l,helperText:T?new Ui(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:M}):d,slotProps:{input:{component:Ki,decimalSeparator:g,thousandSeparator:h,prefix:m,fixedDecimalScale:k,decimalScale:y,"aria-label":c["aria-label"]}},sx:{...C},className:x})});var zr=zo;import P,{useCallback as ye,useEffect as Go,useMemo as _,useRef as Wo,useState as St,useId as Rl,forwardRef as Vl,useImperativeHandle as Hl}from"react";import{useVirtualizer as $l}from"@tanstack/react-virtual";import{styled as qo,LinearProgress as Yl,Link as Jl}from"@mui/joy";import _l from"@mui/icons-material/ArrowUpwardRounded";import Ul from"@mui/icons-material/Info";import{Sheet as Zi}from"@mui/joy";import{motion as Xi}from"framer-motion";var Qi=Xi(Zi),oo=Qi;oo.displayName="Sheet";var se=oo;import me from"react";import{Table as el}from"@mui/joy";var to=e=>{let{children:o,...t}=e;return me.createElement(el,{...t},o)};to.displayName="Table";function kt(e){let{headCells:o,showCheckbox:t,onCheckboxChange:r,slots:{checkbox:i=Qe}={},slotProps:{checkbox:a={}}={}}=e;return me.createElement("thead",null,me.createElement("tr",null,t&&me.createElement("th",{style:{width:"40px",textAlign:"center"}},me.createElement(i,{onChange:r,...a})),o.map(n=>me.createElement("th",{key:n.label,style:{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,textAlign:n.numeric?"right":"left"}},n.label))))}kt.displayName="TableHead";function wt(e){let{rows:o,cellOrder:t,rowOptions:r,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:n=Qe}={},slotProps:{checkbox:l={}}={}}=e;return me.createElement("tbody",null,o.map((p,d)=>me.createElement("tr",{key:d},i&&me.createElement("td",{style:{textAlign:"center"}},me.createElement(n,{onChange:s=>a?.(s,d),...l})),t.map(s=>me.createElement("td",{key:s,style:{textAlign:r?.[s]?.numeric?"right":"left"}},p[s])))))}wt.displayName="TableBody";import Q,{forwardRef as il,useCallback as Ro,useEffect as Rr,useImperativeHandle as ll,useRef as Vr,useState as Hr}from"react";import{IMaskInput as sl,IMask as It}from"react-imask";import pl from"@mui/icons-material/CalendarToday";import{styled as Ho,useThemeProps as dl}from"@mui/joy";import{FocusTrap as ml,ClickAwayListener as cl,Popper as ul}from"@mui/base";import{DialogActions as ol,styled as tl}from"@mui/joy";import{motion as rl}from"framer-motion";var nl=rl(ol),al=tl(nl)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),ro=al;ro.displayName="DialogActions";var he=ro;var gl=Ho($,{name:"DatePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),fl=Ho(ul,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),hl=Ho(se,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),yl=Ho("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),$r=(e,o)=>{try{let t=Vo(e,o);return t.toString()==="Invalid Date"||e!==no(t,o)?!1:new RegExp(`^${o.replace(/Y/g,"\\d").replace(/M/g,"\\d").replace(/D/g,"\\d")}$`).test(e)}catch{return!1}},no=(e,o)=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),o.replace(/YYYY/g,i.toString()).replace(/MM/g,r).replace(/DD/g,t)};function Vo(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/);if(t.length!==r.length)throw new Error("Invalid date string or format");let i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var Cl=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),bl=Q.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return Q.createElement(sl,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Cl(i),blocks:{D:{mask:It.MaskedRange,from:1,to:31,maxLength:2},M:{mask:It.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:It.MaskedRange,from:1900,to:9999,maxLength:4}},format:n=>no(n,i),parse:n=>Vo(n,i),autofix:"pad",overwrite:!0})}),$o=il((e,o)=>{let t=dl({props:e,name:"DatePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM/DD",displayFormat:m="YYYY/MM/DD",size:h,inputReadOnly:g,hideClearButton:S,readOnly:k,...y}=t,D=Vr(null),b=Vr(null),[v,M]=R(t.value,t.defaultValue||"",Ro(I=>r?.({target:{name:t.name,value:I}}),[t.name,r]),{disableStrict:!0}),[T,F]=Hr(v),[O,L]=Hr(null),q=!!O;Rr(()=>{O||D.current?.blur()},[O,D]),Rr(()=>{if(!$r(T,m))return;if(v===""){F("");return}let Z=no(Vo(v,c),m);F(Z)},[m,T,c,v]),ll(o,()=>D.current,[D]);let Y=Ro(I=>{if(F(I.target.value),I.target.value===""){M("");return}if($r(I.target.value,m)){let B=Vo(I.target.value,m),w=no(B,c);M(w)}},[m,c,M]),N=Ro(I=>{L(O?null:I.currentTarget),setTimeout(()=>{D.current?.focus()},0)},[O,L,D]),E=Ro(I=>{g&&(I.preventDefault(),b.current?.focus())},[g,b]);return Q.createElement(yl,null,Q.createElement(ml,{open:!0},Q.createElement(Q.Fragment,null,Q.createElement(X,{...y,color:n?"danger":y.color,ref:D,size:h,value:T,onChange:Y,placeholder:m,disabled:i,required:f,error:n,slotProps:{input:{component:bl,ref:D,format:m,sx:{"&:hover":{cursor:g||k?"default":"text"}},onMouseDown:E}},className:x,sx:C,endDecorator:Q.createElement(gl,{ref:b,variant:"plain",onClick:k?void 0:N,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":q,disabled:i},Q.createElement(pl,null)),label:a,helperText:l,readOnly:k||g}),q&&Q.createElement(cl,{onClickAway:()=>L(null)},Q.createElement(fl,{id:"date-picker-popper",open:!0,anchorEl:O,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":q},Q.createElement(hl,{tabIndex:-1,role:"presentation"},Q.createElement(Me,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([I])=>{Y({target:{name:t.name,value:no(I,c)}}),L(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!S&&Q.createElement(he,{sx:{p:1}},Q.createElement(W,{size:h,variant:"plain",color:"neutral",onClick:()=>{Y({target:{name:t.name,value:""}}),L(null)}},"Clear"))))))))});var Yr=$o;import Yo from"react";import{Textarea as vl}from"@mui/joy";import{motion as xl}from"framer-motion";var Dl=xl(vl),ao=e=>{let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,minRows:p=2,maxRows:d=4,sx:s,className:u,...f}=e,C=Yo.createElement(Dl,{required:l,disabled:n,color:t?"danger":i,size:a,minRows:p,maxRows:d,...f});return Yo.createElement(ue,{required:l,disabled:n,color:i,size:a,error:t,sx:s,className:u},o&&Yo.createElement(ge,null,o),C,r&&Yo.createElement(fe,null,r))};ao.displayName="Textarea";var Jr=ao;import io,{useMemo as Pl}from"react";import{Select as Ml,Option as Tl}from"@mui/joy";import{motion as kl}from"framer-motion";var wl=kl(Tl),Jo=wl;Jo.displayName="Option";function lo(e){let{label:o,helperText:t,error:r,size:i,color:a,disabled:n,required:l,onChange:p,sx:d,className:s,...u}=e,f=Pl(()=>e.options.map(c=>"value"in c?c:{value:c,label:c}),[e.options]),x=io.createElement(Ml,{...u,required:l,disabled:n,size:i,color:r?"danger":a,onChange:(c,m)=>{let h=c||{target:{}},g={...h,target:{name:h.target?.name||e.name,value:m||void 0}};p?.(g)}},f.map(c=>io.createElement(Jo,{key:c.value,value:c.value},c.label)));return io.createElement(ue,{required:l,disabled:n,size:i,color:a,error:r,sx:d,className:s},o&&io.createElement(ge,null,o),x,t&&io.createElement(fe,null,t))}lo.displayName="Select";var _r=lo;import Il from"react";import{Tooltip as Al}from"@mui/joy";import{motion as Sl}from"framer-motion";var Bl=Sl(Al),so=e=>Il.createElement(Bl,{...e});so.displayName="Tooltip";var At=so;import{motion as Wr}from"framer-motion";import ae,{useCallback as Nl,useEffect as El}from"react";import Fl from"@mui/icons-material/ChevronLeft";import Ol from"@mui/icons-material/ChevronRight";import{styled as _o}from"@mui/joy";var Se=_o(W,{name:"Pagination",slot:"button"})(({theme:e,active:o,size:t})=>({"--Button-size":{sm:"32px",md:"40px",lg:"48px"}[t],width:"var(--Button-size)",height:"var(--Button-size)",backgroundColor:o?e.vars.palette.primary.softHoverBg:"transparent",color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.plainColor,"&:hover":{color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.softColor,backgroundColor:o?e.vars.palette.primary.softActiveBg:e.vars.palette.neutral.softHoverBg}})),Ur=_o($,{name:"Pagination",slot:"button"})(({theme:e,size:o})=>({"--IconButton-size":{sm:"32px",md:"40px",lg:"48px"}[o],"--Icon-fontSize":"20px",width:"var(--IconButton-size)",height:"var(--IconButton-size)",color:e.vars.palette.neutral.plainColor,"&:hover":{color:e.vars.palette.neutral.softColor,backgroundColor:e.vars.palette.neutral.softHoverBg}})),Ll=_o(z,{name:"Pagination",slot:"root"})({}),zl=_o(z,{name:"Pagination",slot:"container"})(({theme:e,size:o})=>({gap:{sm:e.spacing(1),md:e.spacing(1.5),lg:e.spacing(2)}[o]}));function po(e){let{paginationModel:o,defaultPaginationModel:t={page:1,pageSize:25},onPageChange:r,rowCount:i,size:a="md",...n}=e,[l,p]=R(o,t,Nl(m=>{r(m.page)},[r])),d=m=>{p({...l,page:m})},s=1,u=Math.max(s,Math.ceil(i/l.pageSize)),f=[l.page-2,l.page-1].filter(m=>m>1),C=[l.page+1,l.page+2].filter(m=>m<=u-1),x=u>1&&l.page<u-3,c=u>1&&l.page>4;return El(()=>{l.page>u&&p({...l,page:u})},[i,l,u,p]),ae.createElement(Ll,{...n},ae.createElement(zl,{direction:"row",size:a,alignItems:"center"},ae.createElement(Ur,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-1),disabled:l.page===s,"aria-label":"Previous page"},ae.createElement(Fl,null)),l.page!==s&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(s)},s),c&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-3),"aria-label":"More previous pages"},"..."),f.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),ae.createElement(Se,{active:!0,size:a,"aria-current":"page"},l.page),C.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),x&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral","aria-label":"More next pages",onClick:()=>d(l.page+3)},"..."),l.page!==u&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(u)},u),ae.createElement(Ur,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page+1),disabled:l.page===u,"aria-label":"Next page"},ae.createElement(Ol,null))))}po.displayName="Pagination";var Gr=po;function qr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var Gl=qo("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Uo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e,Wl=e=>P.createElement(So,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),onMouseDown:o=>{let t=o.clientX,r=e.current?.getBoundingClientRect().width,i=n=>{r&&t&&(e.current.style.width=`${r+(n.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),ql=qo("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),Kl=qo("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>({...e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"},"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),jl=qo("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),Zl=Wr(_l),Xl=e=>{let{width:o,maxWidth:t,minWidth:r,stickyHeader:i,resizable:a,field:n,tableId:l,headerName:p,required:d,editMode:s,sort:u,onSortChange:f,sortable:C=!0,sortOrder:x,description:c}=e,m=Wo(null),h=_(()=>`${l}_header_${p??n}`.trim(),[l,p,n]),g=a??!0?Wl(m):null,S={width:o,minWidth:r??"50px",maxWidth:t,position:i?void 0:"relative",cursor:C?"pointer":"default",userSelect:"none"},k=qr(e),y=x[0],D=C&&P.createElement(Zl,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":h,"aria-description":(u??y)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u??y)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}}),b=c?P.createElement(At,{onClick:v=>v.stopPropagation(),title:P.createElement(P.Fragment,null,c?.split(`
2
- `).map((v,M)=>P.createElement("div",{key:M},v))),placement:"top"},P.createElement(Ul,{fontSize:"small"})):null;return P.createElement(Wr.th,{id:h,"aria-label":p??n,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:m,key:n,style:S,onClick:v=>C&&f?.({field:n,currentSort:u,multiple:v.shiftKey}),whileHover:"hover",initial:"initial"},P.createElement(z,{gap:1,direction:"row",justifyContent:k,alignItems:"center"},k==="end"&&D,k==="end"&&b,P.createElement("div",null,p??n,s&&d&&P.createElement(jl,null,"*")),k==="start"&&b,k==="start"&&D),g)},Ql=e=>{let{tableId:o,field:t,type:r,renderCell:i,renderEditCell:a,isCellEditable:n,noWrap:l,row:p,rowId:d}=e,[s,u]=St(p[t]),f=Wo(null),C=_(()=>({row:p,value:s,id:d}),[p,d,s]),x=_(()=>!!(e.editMode&&(typeof n=="function"?n(C):n??!0)),[e.editMode,n,C]),c=_(()=>({...typeof e.componentProps=="function"?e.componentProps(C):e.componentProps||{},size:"sm"}),[e,C]),m=_(()=>({...c,onChange:y=>{c.onChange?.(y),u(y.target.value),r==="select"&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})},onFocus:y=>{c.onFocus?.(y),e.onCellEditStart?.({...C,originalRow:p,row:{...C.row,value:s},value:s})},onBlur:y=>{c.onBlur?.(y),r&&["number","text","longText","currency","date"].includes(r)&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:s},value:s})},...r==="autocomplete"&&{onChangeComplete:y=>{c.onChangeComplete?.(y),u(y.target.value),e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})}}}),[C,p,t,s,c,r,e]),h=_(()=>a?a(C):{date:P.createElement(Yr,{value:s,...m}),currency:P.createElement(zr,{value:s,...m}),number:P.createElement(X,{value:s,type:"number",...m}),text:P.createElement(X,{value:s,type:"text",...m}),longText:P.createElement(Jr,{value:s,...m}),autocomplete:P.createElement(gr,{value:s,options:m.options||[s],...m}),select:P.createElement(_r,{value:s,options:m.options||[s],...m})}[r||"text"],[s,m,r]),g=_(()=>{if(i)return i(C);let y=s;return{link:P.createElement(e.component||Jl,{children:y,...c})}[r||"text"]||y},[s,i,C,r,c,e]),S=_(()=>x&&h?h:g,[x,h,g]),k=_(()=>l&&e.type==="longText",[l,e.type]);return Go(()=>{u(p[t])},[p,t]),P.createElement("td",{ref:f,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:qr({type:r}),verticalAlign:x?"top":"middle"}},k?P.createElement(At,{title:s,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},P.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},S)):S)},es=e=>{let{tableId:o,columns:t,rowId:r,editMode:i,noWrap:a,row:n}=e;return P.createElement(P.Fragment,null,t.map((l,p)=>P.createElement(Ql,{...l,tableId:o,key:`${r}_${l.field.toString()}_${p}`,row:n,rowId:r,editMode:i,noWrap:a})))};function os({rows:e,columns:o,rowCount:t,initialState:r,pagination:i,paginationMode:a,paginationModel:n,onPaginationModelChange:l,sortModel:p,sortOrder:d=["asc","desc",null],selectionModel:s=[],onSortModelChange:u,onSelectionModelChange:f,editMode:C,getId:x,isTotalSelected:c}){let[m,h]=St(null),[g,S]=R(p,r?.sorting?.sortModel??[],ye(B=>u?.(B),[u])),k=_(()=>o.reduce((B,w)=>({...B,[w.field]:w}),{}),[o]),y=ye((B,w)=>{for(let J of g){let{field:ie,sort:Re}=J,re=B[ie],pe=w[ie],De=k[ie],ne=0;if(De.sortComparator?ne=De.sortComparator({rowA:B,rowB:w}):typeof re=="string"&&typeof pe=="string"?ne=re.localeCompare(pe):typeof re=="number"&&typeof pe=="number"?ne=re-pe:re instanceof Date&&pe instanceof Date&&(ne=re.getTime()-pe.getTime()),ne!==0)return Re==="asc"?ne:-ne}return 0},[g,k]),D=_(()=>g.length?[...e].sort(y):e,[e,g,y]),b=_(()=>Array.from(new Set(d)),[d]),[v,M]=St(n?.page||1),T=n?.pageSize||20,F=ye((B,w)=>x?.(B)??B.id??`${(w||0)+(v-1)*T}`,[x,v,T]),O=_(()=>new Set(s),[s]),L=_(()=>!i||a==="server"?D:D.slice((v-1)*T,(v-1)*T+T),[D,v,T,a,i]),q=_(()=>L.length>0&&L.every((B,w)=>O.has(F(B,w))),[L,O,F]),Y=t||D.length,N=_(()=>c??(Y>0&&s.length===Y),[c,s,Y]),E=_(()=>(o||Object.keys(D[0]||{}).map(w=>({field:w}))).map(w=>({...w,isCellEditable:C&&(typeof w.isCellEditable=="function"?w.isCellEditable:w.isCellEditable??!0),sort:g.find(J=>J.field===w.field)?.sort,sortOrder:k[w.field]?.sortOrder||b})),[D,o,C,g,k,b]),I=ye(B=>{M(B),l?.({page:B,pageSize:T})},[l,T]),Z=ye(B=>{let{field:w,currentSort:J,multiple:ie}=B,re=k[w].sortOrder||b;if(J!==void 0){let De=(re.indexOf(J)+1)%re.length,ne=re[De];if(!ne){let Ee=ie?g.filter(xo=>xo.field!==w):[];S(Ee);return}let ct=ie?g.map(Ee=>Ee.field===w?{field:w,sort:ne}:Ee):[{field:w,sort:ne}];S(ct)}else{let pe=ie?[...g,{field:w,sort:re[0]}]:[{field:w,sort:re[0]}];S(pe)}},[b,k,g,S]);return Go(()=>{n||I(1)},[Y,I,n]),Go(()=>{let B=Math.max(1,Math.ceil(Y/T));v>B&&I(B)},[v,Y,T,I]),Go(()=>{f?.([])},[v]),{rowCount:Y,page:v,pageSize:T,onPaginationModelChange:I,getId:F,HeadCell:Xl,BodyRow:es,dataInPage:L,handleSortChange:Z,isAllSelected:q,isTotalSelected:N,isSelectedRow:ye(B=>O.has(B),[O]),focusedRowId:m,onRowFocus:ye(B=>{h(B)},[]),onAllCheckboxChange:ye(()=>{f?.(q?[]:L.map(F))},[q,L,f,F]),onCheckboxChange:ye((B,w)=>{if(O.has(w)){let J=s.filter(ie=>ie!==w);f?.(J)}else{let J=[...s,w];f?.(J)}},[s,f,O]),columns:E,onTotalSelect:ye(()=>{f?.(N?[]:D.map(F),!N)},[N,D,f,F])}}function ts(e,o){let{rows:t,checkboxSelection:r,editMode:i,selectionModel:a,onSelectionModelChange:n,disableSelectionOnClick:l,onRowClick:p,rowCount:d,columns:s,onPaginationModelChange:u,pagination:f,paginationMode:C,paginationModel:x,sortModel:c,sortOrder:m,onSortModelChange:h,initialState:g,loading:S,slots:{checkbox:k=Qe,toolbar:y,footer:D,loadingOverlay:b=()=>P.createElement(Yl,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:M,background:T={}}={},stripe:F,...O}=e,L=Rl(),q=Wo(null),Y=Wo(null),{columns:N,isAllSelected:E,isSelectedRow:I,onAllCheckboxChange:Z,onCheckboxChange:B,getId:w,rowCount:J,page:ie,pageSize:Re,onPaginationModelChange:re,handleSortChange:pe,dataInPage:De,isTotalSelected:ne,focusedRowId:ct,onRowFocus:Ee,onTotalSelect:xo,HeadCell:In,BodyRow:An}=os(e),Do=$l({count:De.length,getScrollElement:()=>q.current,estimateSize:()=>32,measureElement:K=>K.clientHeight,overscan:20}),Sn=_(()=>({page:ie,pageSize:Re}),[ie,Re]),Bn=Do.getTotalSize(),Nn=Do.getVirtualItems();return Hl(o,()=>({getRowIndexRelativeToVisibleRows(K){return De.findIndex(Pe=>String(w(Pe))===K)},setCellFocus(K){let Pe=this.getRowIndexRelativeToVisibleRows(K),we=e.stickyHeader&&Do.getOffsetForIndex(Pe)?.[1]==="start"?0:1;Do.scrollToIndex(Pe+we),requestAnimationFrame(()=>{Y.current?.querySelector(`[data-row-id='${K}']`)?.focus()})}})),P.createElement(So,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!r||!!y)&&P.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&P.createElement(z,{direction:"row",spacing:1},!E&&P.createElement(G,{level:"body-xs"},Uo(a?.length||0)," items selected"),E&&!ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Uo(a?.length||0)," items on this page are selected."),P.createElement(W,{size:"sm",variant:"plain",onClick:xo},"Select all ",Uo(J??t.length)," items")),ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Uo(J??t.length)," items are selected."),P.createElement(W,{size:"sm",variant:"plain",color:"danger",onClick:xo},"Cancel"))),y&&P.createElement(y,{...M||{}})),P.createElement(se,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:q,...T},P.createElement(to,{...O},P.createElement("thead",null,P.createElement("tr",null,r&&P.createElement("th",{style:{width:"40px",textAlign:"center"}},P.createElement(k,{onChange:Z,checked:E,indeterminate:(a||[]).length>0&&!E,...v})),N.map((K,Pe)=>P.createElement(In,{tableId:L,key:`${K.field.toString()}_${Pe}`,stickyHeader:e.stickyHeader,editMode:!!K.isCellEditable,onSortChange:pe,...K})))),P.createElement(ql,{ref:Y,style:{height:`${Bn}px`}},!!S&&P.createElement(Gl,null,P.createElement("td",null,P.createElement(So,{sx:{position:"absolute",top:0,left:0,right:0}},P.createElement(b,null)))),Nn.map((K,Pe)=>{let we=K.index,ut=De[we],Ce=w(ut,we),En=F&&(F==="even"&&(we+1)%2===0||F==="odd"&&(we+1)%2===1);return P.createElement(Kl,{key:K.key,"data-row-id":Ce,"data-index":we,role:r&&!l?"checkbox":void 0,tabIndex:ct===Ce?0:-1,onClick:Fe=>{p?.({row:ut,rowId:Ce},Fe),r&&!l&&B(Fe,Ce)},onFocus:()=>Ee(Ce),"aria-checked":r&&!l?I(Ce):void 0,striped:En,style:{height:`${K.size}px`,transform:`translateY(${K.start-Pe*K.size}px)`}},r&&P.createElement("th",{scope:"row",style:{textAlign:"center"}},P.createElement(k,{onClick:Fe=>Fe.stopPropagation(),onChange:Fe=>B(Fe,Ce),checked:I(Ce),...v})),P.createElement(An,{tableId:L,columns:N,row:ut,rowId:Ce,editMode:i,noWrap:e.noWrap}))})),D&&P.createElement(D,null))),f&&P.createElement(Gr,{py:2,size:"sm",alignItems:"flex-end",paginationModel:Sn,rowCount:J,onPageChange:re}))}var Bt=Vl(ts);Bt.displayName="DataTable";import ee,{forwardRef as rs,useCallback as mo,useEffect as ns,useImperativeHandle as as,useMemo as is,useRef as Kr,useState as ls}from"react";import{IMaskInput as ss,IMask as Nt}from"react-imask";import ps from"@mui/icons-material/CalendarToday";import{styled as Ko,useThemeProps as ds}from"@mui/joy";import{FocusTrap as ms,ClickAwayListener as cs,Popper as us}from"@mui/base";var gs=Ko($,{name:"DateRangePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),fs=Ko(us,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),hs=Ko(se,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),ys=Ko("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Zr=([e,o],t)=>{let r=i=>{let a=`${i.getDate()}`,n=`${i.getMonth()+1}`,l=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(n)<10&&(n="0"+n),t.replace(/YYYY/g,l.toString()).replace(/MM/g,n).replace(/DD/g,a)};return[r(e),o?r(o):""].join(" - ")};function jr(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/),i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var Xr=(e,o)=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[jr(t,o),jr(r,o)]},Cs=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),bs=ee.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return ee.createElement(ss,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Cs(i),blocks:{D:{mask:Nt.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Nt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Nt.MaskedRange,from:1900,to:9999}},format:n=>Zr(n,i),parse:n=>Xr(n,i),autofix:"pad",overwrite:!0})}),Et=rs((e,o)=>{let t=ds({props:e,name:"DateRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM/DD",size:m,inputReadOnly:h,hideClearButton:g,readOnly:S,...k}=t,y=Kr(null),D=Kr(null),[b,v]=R(t.value,t.defaultValue||"",mo(E=>r?.({target:{name:t.name,value:E}}),[t.name,r]),{disableStrict:!0}),[M,T]=ls(null),F=!!M,O=is(()=>b?Xr(b,c):void 0,[b,c]);ns(()=>{M||y.current?.blur()},[M,y]),as(o,()=>y.current,[y]);let L=mo(E=>{v(E.target.value)},[v]),q=mo(E=>{T(M?null:E.currentTarget),y.current?.focus()},[M,T,y]),Y=mo(([E,I])=>{!E||!I||(v(Zr([E,I],c)),T(null))},[v,T,c]),N=mo(E=>{h&&(E.preventDefault(),D.current?.focus())},[h,D]);return ee.createElement(ys,null,ee.createElement(ms,{open:!0},ee.createElement(ee.Fragment,null,ee.createElement(X,{...k,color:n?"danger":k.color,ref:o,size:m,value:b,onChange:L,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:bs,ref:y,format:c,sx:{"&:hover":{cursor:h||S?"default":"text"}},onMouseDown:N}},error:n,className:x,sx:C,endDecorator:ee.createElement(gs,{ref:D,variant:"plain",onClick:S?void 0:q,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":F,disabled:i},ee.createElement(ps,null)),label:a,helperText:l,readOnly:S||h}),F&&ee.createElement(cs,{onClickAway:()=>T(null)},ee.createElement(fs,{id:"date-range-picker-popper",open:!0,anchorEl:M,placement:"bottom-end",onMouseDown:E=>E.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":F},ee.createElement(hs,{tabIndex:-1,role:"presentation"},ee.createElement(Me,{rangeSelection:!0,defaultValue:O,onChange:Y,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!g&&ee.createElement(he,{sx:{p:1}},ee.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{v(""),T(null)}},"Clear"))))))))});Et.displayName="DateRangePicker";import{DialogContent as vs,styled as xs}from"@mui/joy";import{motion as Ds}from"framer-motion";var Ps=Ds(vs),Ms=xs(Ps)(({theme:e})=>({padding:e.spacing(0,6,5)})),co=Ms;co.displayName="DialogContent";var jo=co;import{DialogTitle as Ts,styled as ks}from"@mui/joy";import{motion as ws}from"framer-motion";var Is=ws(Ts),As=ks(Is)(({theme:e})=>({padding:e.spacing(4,6)})),uo=As;uo.displayName="DialogTitle";var Zo=uo;import fo from"react";import Xo from"react";import{Modal as Ss,ModalDialog as Bs,ModalClose as Ns,ModalOverflow as Es,styled as Qr}from"@mui/joy";import{motion as Ft}from"framer-motion";var Fs=Ft(Ss),Ot=Fs;Ot.displayName="Modal";var en=Qr(Bs)({padding:0}),go=en;go.displayName="ModalDialog";var Os=Qr(Ft(Ns))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Qo=Os;Qo.displayName="ModalClose";var Ls=Ft(Es),Lt=Ls;Lt.displayName="ModalOverflow";function zt(e){let{title:o,children:t,titleStartDecorator:r,...i}=e;return Xo.createElement(en,{...i},Xo.createElement(Qo,null),Xo.createElement(Zo,null,r,o),Xo.createElement(jo,null,t))}zt.displayName="ModalFrame";import{styled as zs}from"@mui/joy";var Rs=zs(go,{name:"Dialog",slot:"Root"})({padding:0}),Rt=fo.forwardRef((e,o)=>{let{title:t,children:r,actions:i,fullscreen:a,...n}=e;return fo.createElement(Rs,{layout:a?"fullscreen":"center",ref:o,...n},fo.createElement(Zo,null,t),fo.createElement(jo,null,r),fo.createElement(he,null,i))});Rt.displayName="DialogFrame";import Vs from"react";import{Divider as Hs}from"@mui/joy";import{motion as $s}from"framer-motion";var Ys=$s(Hs),ho=e=>Vs.createElement(Ys,{...e});ho.displayName="Divider";import Js from"react";import{Drawer as _s}from"@mui/joy";import{motion as Us}from"framer-motion";var Gs=Us(_s),Vt=e=>{let{children:o,...t}=e;return Js.createElement(Gs,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Vt.displayName="InsetDrawer";import H,{useCallback as et,useEffect as on,useMemo as yo,useRef as tn,useState as ot}from"react";import{styled as ke}from"@mui/joy";import Ws from"@mui/icons-material/CloudUploadRounded";import qs from"@mui/icons-material/UploadFileRounded";import Ks from"@mui/icons-material/ClearRounded";import{combine as js}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Zs,monitorForExternal as Xs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as rn,getFiles as Qs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as nn}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ep}from"@mui/joy";var op=ke(ep)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),tp=ke(z,{name:"Uploader",slot:"PreviewRoot"})({}),rp=ke(Ze,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),np=ke(qs,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),ap=ke(Ks,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),ip=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],lp={"image/*":[".jpeg",".jpg",".png",".gif",".bmp",".tiff",".svg",".webp",".heic",".ico"],"audio/*":[".mp3",".wav",".flac",".aac",".ogg",".m4a",".wma",".aiff",".alac",".midi",".mp4"],"video/*":[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpeg",".3gp",".m4v"]},Ht=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),r=ip[o];return Intl.NumberFormat("en-us",{style:"unit",unit:r,unitDisplay:"narrow"}).format(t)},sp=e=>{let{files:o,uploaded:t,onDelete:r}=e;return H.createElement(tp,{gap:1},[...t,...o].map(i=>H.createElement(rp,{key:i.name,size:"sm",color:"neutral"},H.createElement(z,{direction:"row",alignItems:"center",gap:2},H.createElement(np,null),H.createElement(z,{flex:"1"},H.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&H.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Ht(i.size))),H.createElement($,{onClick:()=>r?.(i)},H.createElement(ap,null))))))},pp=ke(z,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),dp=ke(se,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),mp=ke(Ws,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),an=H.memo(e=>{let{accept:o,minCount:t,maxCount:r,name:i,size:a,maxFileSize:n,maxFileTotalSize:l,onChange:p,label:d,disabled:s,onDelete:u}=e,f=tn(null),C=tn(null),[x,c]=ot(),[m,h]=ot([]),[g,S]=ot(e.uploaded||[]),[k,y]=ot("idle"),D=yo(()=>o.split(",").map(N=>N.trim()),[o]),b=yo(()=>D.flatMap(N=>["image/*","video/*","audio/*"].includes(N)?lp[N]:N),[D]),v=yo(()=>{let[N,E]=[D.filter(Z=>["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B]=Z.split("/");return B.toLowerCase()}),D.filter(Z=>!["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B,w]=Z.split("/");return w?w.toUpperCase():B.toUpperCase().replace(".","")})],I=[];return N.length>0&&I.push(`Any ${N.join(", ")} file`),E.length>0&&I.push(E.join(", ")),I.push(`Maximum ${Ht(l)}`),r&&I.push(`Up to ${r} ${r===1?"file":"files"}`),I.join(", ")},[D,l,r]),M=yo(()=>!!x||e.error,[e.error,x]),T=yo(()=>!r||r&&[...g,...m].length!==r,[m,r,g]),F=et(N=>{try{let E=b.map(w=>w.replace(".",""))||[],I=new RegExp(`${E.join("|")}`);if(N.forEach(w=>{let J=w.name.split(".").pop()||"";if(!I.test(J))throw new Error("Please upload acceptable file type.")}),n&&N.forEach(w=>{if(w.size>n)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Ht(n)} or less.`)}),[...m,...N].reduce((w,J)=>w+J.size,0)>l)throw new Error("Total File size exceeded the maximum limit.");let B=[...m,...N];if(r&&[...g,...B].length>r)throw new Error("Exceeded the maximum number of files.");p?.({target:{name:i,value:B}}),h(B),c(void 0)}catch(E){c(E.message)}},[m,g,r,b,n,l,i,p]);on(()=>{let N=f.current;if(!(!N||s))return js(Zs({element:N,canDrop:rn,onDragEnter:()=>y("over"),onDragLeave:()=>y("potential"),onDrop:async({source:E})=>{let I=await Qs({source:E});F(I)}}),Xs({canMonitor:rn,onDragStart:()=>{y("potential"),nn.start()},onDrop:()=>{y("idle"),nn.stop()}}))}),on(()=>{C.current&&t&&(m.length<t?C.current.setCustomValidity(`At least ${t} files are required.`):C.current.setCustomValidity(""))},[C,m,t]);let O=et(N=>{let E=Array.from(N.target.files||[]);F(E)},[F]),L=et(N=>{N instanceof File?h(E=>(p?.({target:{name:i,value:E.filter(I=>I!==N)}}),E.filter(I=>I!==N))):(S(E=>E.filter(I=>I.id!==N.id)),u?.(N)),c(void 0)},[i,p,u]),q=et(()=>{C.current?.click()},[]),Y=H.createElement(dp,{state:k,error:!!(M||x),ref:f,onClick:q},H.createElement(z,{alignItems:"center",gap:1},H.createElement(mp,{state:k,error:!!(M||x)})),H.createElement(op,{disabled:s,required:!!t,onInvalid:N=>{t&&m.length<t&&c(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:b.join(","),type:"file",ref:C,role:"button",onChange:O}}}));return H.createElement(pp,null,T&&H.createElement(ue,{size:a,error:!!(M||x),disabled:s,required:!!t},d&&H.createElement(ge,null,d),Y,H.createElement(fe,null,H.createElement(z,null,x&&H.createElement("div",null,x),H.createElement("div",null,v)))),[...g,...m].length>0&&H.createElement(sp,{files:m,uploaded:g,onDelete:L}))});import{Grid as ln}from"@mui/joy";import ce from"react";import up from"react-markdown";import{Link as gp}from"@mui/joy";import{visit as cp}from"unist-util-visit";function sn(e){let{accentColor:o}=e;return t=>{cp(t,"text",(r,i,a)=>{let n=r.value,l=/\|\|.*?\|\|/g,p,d=0,s=[];for(;(p=l.exec(n))!==null;){p.index>d&&s.push({type:"text",value:n.slice(d,p.index)});let u=p[0].split("||")[1];s.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:u}]}),d=p.index+p[0].length}d<n.length&&s.push({type:"text",value:n.slice(d)}),s.length&&a.children.splice(i,1,...s)})}}var $t=e=>{let{color:o,textColor:t,defaultLevel:r="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:n,boldFontWeight:l,content:p,...d}=e;return ce.createElement(U,{component:"div",color:o,textColor:t,level:r,...d},ce.createElement(up,{...n,children:p,rehypePlugins:[[sn,{accentColor:i}]],components:{h1:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:u})=>ce.createElement(U,{color:o,textColor:t,level:r,...u?.properties},s),a:({children:s,href:u})=>ce.createElement(gp,{href:u,target:a},s),hr:()=>ce.createElement(ho,null),b:({children:s})=>ce.createElement(U,{fontWeight:l},s),strong:({children:s})=>ce.createElement(U,{fontWeight:l},s),...n?.components}}))};$t.displayName="Markdown";import Be from"react";import{MenuButton as fp,Button as hp}from"@mui/joy";import pn from"@mui/icons-material/ExpandMore";function Yt(e){let{size:o,buttonText:t,items:r=[],showIcon:i}=e;return r.length?Be.createElement(Bo,null,Be.createElement(fp,{component:e.buttonComponent??"button",size:o,variant:"plain",endDecorator:i?Be.createElement(pn,null):void 0,...e.buttonComponentProps??{}},t),Be.createElement(be,{size:o},r.map(a=>Be.createElement(ve,{key:a.text,component:a.component,...a.componentProps??{}},a.text)))):Be.createElement(hp,{component:e.buttonComponent??"button",size:o,variant:"plain",color:"neutral",endDecorator:i?Be.createElement(pn,null):void 0,...e.buttonComponentProps??{}},t)}Yt.displayName="MenuButton";import oe,{forwardRef as yp,useCallback as Jt,useEffect as Cp,useImperativeHandle as bp,useRef as vp,useState as xp}from"react";import{IMaskInput as Dp,IMask as dn}from"react-imask";import Pp from"@mui/icons-material/CalendarToday";import{styled as _t,useThemeProps as Mp}from"@mui/joy";import{FocusTrap as Tp,ClickAwayListener as kp,Popper as wp}from"@mui/base";var Ip=_t(wp,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ap=_t(se,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Sp=_t("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),mn=(e,o)=>{let t=`${e.getMonth()+1}`,r=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,r.toString()).replace(/MM/g,t)},Bp=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function Np(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var Ep=oe.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return oe.createElement(Dp,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Bp(i),blocks:{M:{mask:dn.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:dn.MaskedRange,from:1900,to:9999}},format:n=>mn(n,i),parse:Np,autofix:"pad",overwrite:!0})}),cn=yp((e,o)=>{let t=Mp({props:e,name:"MonthPicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM",size:m,...h}=t,g=vp(null),[S,k]=R(t.value,t.defaultValue||"",Jt(T=>r?.({target:{name:t.name,value:T}}),[t.name,r]),{disableStrict:!0}),[y,D]=xp(null),b=!!y;Cp(()=>{y||g.current?.blur()},[y,g]),bp(o,()=>g.current,[g]);let v=Jt(T=>{k(T.target.value)},[k]),M=Jt(T=>{D(y?null:T.currentTarget),g.current?.focus()},[y,D,g]);return oe.createElement(Sp,null,oe.createElement(Tp,{open:!0},oe.createElement(oe.Fragment,null,oe.createElement(X,{...h,color:n?"danger":h.color,ref:g,size:m,value:S,onChange:v,placeholder:c,disabled:i,required:f,slotProps:{input:{component:Ep,ref:g,format:c}},error:n,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:oe.createElement($,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":b},oe.createElement(Pp,null)),label:a,helperText:l}),b&&oe.createElement(kp,{onClickAway:()=>D(null)},oe.createElement(Ip,{id:"month-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},oe.createElement(Ap,{tabIndex:-1,role:"presentation"},oe.createElement(Me,{view:"month",views:["month"],value:Number.isNaN(new Date(S).getTime())?void 0:[new Date(S),void 0],onChange:([T])=>{v({target:{name:t.name,value:mn(T,c)}}),D(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),oe.createElement(he,{sx:{p:1}},oe.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{v({target:{name:t.name,value:""}}),D(null)}},"Clear"))))))))});import te,{forwardRef as Fp,useCallback as tt,useEffect as Op,useImperativeHandle as Lp,useMemo as zp,useRef as Rp,useState as Vp}from"react";import{IMaskInput as Hp,IMask as un}from"react-imask";import $p from"@mui/icons-material/CalendarToday";import{styled as Ut,useThemeProps as Yp}from"@mui/joy";import{FocusTrap as Jp,ClickAwayListener as _p,Popper as Up}from"@mui/base";var Gp=Ut(Up,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Wp=Ut(se,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qp=Ut("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),fn=([e,o],t)=>{let r=i=>{let a=`${i.getMonth()+1}`,n=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,n.toString()).replace(/MM/g,a)};return[r(e),o?r(o):""].join(" - ")};function gn(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var hn=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[gn(o),gn(t)]},Kp=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),jp=te.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return te.createElement(Hp,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Kp(i),blocks:{m:{mask:un.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:un.MaskedRange,from:1900,to:9999}},format:n=>fn(n,i),parse:hn,autofix:"pad",overwrite:!0})}),Gt=Fp((e,o)=>{let t=Yp({props:e,name:"MonthRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM",size:m,...h}=t,g=Rp(null),[S,k]=R(t.value,t.defaultValue||"",tt(O=>r?.({target:{name:t.name,value:O}}),[t.name,r]),{disableStrict:!0}),[y,D]=Vp(null),b=!!y,v=zp(()=>S?hn(S):void 0,[S]);Op(()=>{y||g.current?.blur()},[y,g]),Lp(o,()=>g.current,[g]);let M=tt(O=>{k(O.target.value)},[k]),T=tt(O=>{D(y?null:O.currentTarget),g.current?.focus()},[y,D,g]),F=tt(([O,L])=>{!O||!L||(k(fn([O,L],c)),D(null))},[k,D,c]);return te.createElement(qp,null,te.createElement(Jp,{open:!0},te.createElement(te.Fragment,null,te.createElement(X,{...h,color:n?"danger":h.color,ref:o,size:m,value:S,onChange:M,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:jp,ref:g,format:c}},error:n,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:te.createElement($,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":b},te.createElement($p,null)),label:a,helperText:l}),b&&te.createElement(_p,{onClickAway:()=>D(null)},te.createElement(Gp,{id:"month-range-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:O=>O.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},te.createElement(Wp,{tabIndex:-1,role:"presentation"},te.createElement(Me,{view:"month",views:["month"],rangeSelection:!0,defaultValue:v,onChange:F,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),te.createElement(he,{sx:{p:1}},te.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{k(""),D(null)}},"Clear"))))))))});Gt.displayName="MonthRangePicker";import rt from"react";import{Accordion as Zp,AccordionSummary as Xp,AccordionDetails as Qp,styled as Cn,accordionSummaryClasses as yn,Stack as ed}from"@mui/joy";var od=Cn(Xp,{name:"NavigationGroup",slot:"Summary",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({[`& .${yn.button}`]:{padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),[`&.${yn.expanded}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor}}})),td=Cn(Qp,{name:"NavigationGroup",slot:"Details"})(({theme:e})=>({"--AccordionDetails-transition":"grid-template-rows 0.2s ease, padding-block 0.2s ease",backgroundColor:e.palette.background.level1}));function nt(e){let{title:o,children:t,startDecorator:r,level:i,...a}=e;return rt.createElement(Zp,{...a},rt.createElement(od,{useIcon:!!r,level:i},rt.createElement(ed,{direction:"row",gap:4},r,o)),rt.createElement(td,null,t))}import Wt from"react";import{ListItem as rd,ListItemButton as nd,ListItemDecorator as ad,styled as id,listItemButtonClasses as ld}from"@mui/joy";var sd=id(nd,{name:"NavigationItem",slot:"Button",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),gap:e.spacing(4),fontWeight:500,"&:hover":{backgroundColor:e.palette.neutral.plainHoverBg},"&:active":{backgroundColor:e.palette.neutral.plainActiveBg},[`&.${ld.selected}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor,"&:not(:hover):not(:active)":{backgroundColor:e.palette.background.surface}}}));function at(e){let{children:o,startDecorator:t,level:r,selected:i,id:a,onClick:n,...l}=e,p=()=>{n?.(a)};return Wt.createElement(rd,{...l},Wt.createElement(sd,{level:r,useIcon:!!t,selected:i,"aria-current":i,onClick:p},t&&Wt.createElement(ad,null,t),o))}import qt from"react";function Kt(e){let{items:o,level:t=0,onSelect:r}=e,i=a=>{r?.(a)};return qt.createElement("div",null,o.map((a,n)=>a.type==="item"?qt.createElement(at,{key:a.id,id:a.id,startDecorator:a.startDecorator,selected:a.selected,level:t,onClick:i},a.title):a.type==="group"?qt.createElement(nt,{key:n,title:a.title,startDecorator:a.startDecorator,level:t,defaultExpanded:a.expanded},a.content):null))}Kt.displayName="Navigator";import it,{useCallback as bn,useMemo as pd,useState as dd}from"react";import{NumericFormat as md}from"react-number-format";import{styled as cd,useThemeProps as ud}from"@mui/joy";var gd=(e,o)=>{let[t,r=""]=`${e}`.split(".");return+`${t}${r.padEnd(o,"0")}`},fd=it.forwardRef(function(o,t){let{onChange:r,min:i,max:a,...n}=o;return it.createElement(md,{...n,onValueChange:({value:l})=>{r?.({target:{name:o.name,value:l}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),hd=cd(X,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),jt=it.forwardRef(function(o,t){let r=ud({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:n,error:l,helperText:p,required:d,disabled:s,useMinorUnit:u,maxDecimalScale:f=0,min:C,max:x,sx:c,className:m,...h}=r,[g,S]=R(r.value,r.defaultValue,bn(v=>a?.({target:{name:i,value:v}}),[a,i])),[k,y]=dd(x&&g&&g>x||C&&g&&g<C),D=pd(()=>g&&u?g/Math.pow(10,f):g,[g,u,f]),b=bn(v=>{if(v.target.value===""){S(void 0);return}let M=Number(v.target.value);C&&M<C||x&&M>x?y(!0):y(!1);let T=u?gd(M,f):M;S(T)},[S,u,f,C,x]);return it.createElement(hd,{...h,ref:t,value:D,onChange:b,error:k||l,disabled:s,required:d,color:k||l?"danger":r.color,label:n,helperText:p,slotProps:{input:{component:fd,"aria-label":h["aria-label"],decimalScale:f}},sx:{...c},className:m})});jt.displayName="PercentageInput";import j,{useCallback as yd,useMemo as vn}from"react";import{Dropdown as Cd,ListDivider as bd,menuItemClasses as vd,styled as Zt,MenuButton as xd}from"@mui/joy";import{ClickAwayListener as Dd}from"@mui/base";import Pd from"@mui/icons-material/ArrowDropDown";var Md=Zt(Ie,{name:"ProfileMenu",slot:"item"})({});function xn(e){let{children:o,chip:t,caption:r,size:i}=e,a=vn(()=>i==="sm"?"body-xs":"body-sm",[i]),n=vn(()=>i==="sm"?"body-sm":"body-md",[i]);return j.createElement(Md,{px:4,py:2},j.createElement(Ie,{direction:"row",gap:2},j.createElement(U,{level:n,fontWeight:"bold",textColor:"text.primary"},o),t&&j.createElement(Ae,{size:i,color:"neutral",variant:"outlined"},t)),r&&j.createElement(U,{level:a,textColor:"text.tertiary"},r))}xn.displayName="ProfileCard";var Td=Zt(xd,{name:"ProfileMenu",slot:"button"})(({theme:e})=>({padding:e.spacing(1),"--Button-gap":e.spacing(1)}));function Dn(e){let{size:o="md",src:t,alt:r,children:i,getInitial:a,...n}=e;return j.createElement(Td,{variant:"plain",color:"neutral",size:o,endDecorator:j.createElement(Pd,null),...n},j.createElement(Ao,{variant:"soft",color:"primary",size:o,src:t,alt:r,getInitial:a},i))}Dn.displayName="ProfileMenuButton";var kd=Zt(be,{name:"ProfileMenu",slot:"root"})(({theme:e})=>({border:"none","--ListItem-paddingX":e.spacing(4),[`.${vd.root}`]:{border:"none"}}));function lt(e){let{open:o,defaultOpen:t,onOpenChange:r,profile:i,getInitial:a,menuItems:n,size:l,...p}=e,[d,s]=R(o,t??!1,yd(u=>r?.(u),[r]));return j.createElement(Dd,{onClickAway:()=>s(!1)},j.createElement("div",null,j.createElement(Cd,{open:d},j.createElement(Dn,{size:l,src:i.image?.src,alt:i.image?.alt,onClick:()=>s(!d),getInitial:a},i.name),j.createElement(kd,{size:l,placement:"bottom-end",...p,onClose:()=>s(!1)},j.createElement(xn,{size:l,caption:i.caption,chip:i.chip},i.name),!!n.length&&j.createElement(bd,null),n.map(({label:u,...f})=>j.createElement(ve,{...f,onClick:C=>{f.onClick?.(C),s(!1)}},u))))))}lt.displayName="ProfileMenu";import{Radio as wd,RadioGroup as Id}from"@mui/joy";import{motion as Pn}from"framer-motion";var Ad=Pn(wd),Co=Ad;Co.displayName="Radio";var Sd=Pn(Id),bo=Sd;bo.displayName="RadioGroup";import Mn from"react";function Xt(e){let{items:o,...t}=e;return Mn.createElement(bo,{...t},o.map(r=>Mn.createElement(Co,{key:`${r.value}`,value:r.value,label:r.label})))}Xt.displayName="RadioList";import Ne from"react";import{Stepper as Bd,Step as Nd,StepIndicator as Ed,stepClasses as Qt,stepIndicatorClasses as vo,styled as er}from"@mui/joy";import Fd from"@mui/icons-material/Check";import{motion as Od}from"framer-motion";var st=er(Nd)({});st.displayName="Step";var pt=er(Ed)({});pt.displayName="StepIndicator";var Ld=er(Bd)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),zd=Od(Ld);function or(e){let{steps:o,activeColor:t="primary.500",inactiveColor:r="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:n}=e;return Ne.createElement(zd,{sx:l=>({"--StepIndicator-size":"24px","--Step-gap":l.spacing(2),[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Qt.completed}`]:{"&::after":{bgcolor:i},[`& .${vo.root}`]:{bgcolor:t}},[`& .${Qt.active}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:t}},[`& .${Qt.disabled}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:r}}})},o.map((l,p)=>{let d=n===p+1,s=n>p+1,u=n<p+1,f=l.label||l.extraContent;return Ne.createElement(st,{indicator:Ne.createElement(pt,{variant:"solid",color:"primary"},s?Ne.createElement(Fd,null):l.indicatorContent),active:d,completed:s,disabled:u},f&&Ne.createElement(z,null,l.label&&Ne.createElement(G,{level:"title-sm"},l.label),l.extraContent&&Ne.createElement(G,{level:"body-xs"},l.extraContent)))}))}or.displayName="Stepper";import Tn from"react";import{Switch as Rd,styled as Vd,switchClasses as Hd}from"@mui/joy";import{motion as kn}from"framer-motion";var $d=kn(Rd),Yd=Vd(kn.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Hd.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Jd=e=>Tn.createElement(Yd,{...e,layout:!0,transition:_d}),_d={type:"spring",stiffness:700,damping:30},tr=e=>Tn.createElement($d,{...e,slots:{thumb:Jd,...e.slots}});tr.displayName="Switch";import{Tabs as Ud,Tab as Gd,TabList as Wd,TabPanel as qd,styled as Kd,tabClasses as jd}from"@mui/joy";import{motion as dt}from"framer-motion";var Zd=dt(Ud),rr=Zd;rr.displayName="Tabs";var Xd=Kd(dt(Gd))(({theme:e})=>({[`&:not(.${jd.selected})`]:{color:e.palette.neutral[700]}})),nr=Xd;nr.displayName="Tab";var Qd=dt(Wd),ar=Qd;ar.displayName="TabList";var em=dt(qd),ir=em;ir.displayName="TabPanel";import mt from"react";import{CssBaseline as lr,CssVarsProvider as om,checkboxClasses as tm,extendTheme as sr,inputClasses as ze}from"@mui/joy";var wn={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},pr=sr({cssVarPrefix:"ceed",spacing:4,breakpoints:{values:{xs:0,sm:600,md:900,lg:1280,xl:1920}},zIndex:{popup:1500},colorSchemes:{light:wn,dark:wn},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},JoySelect:{defaultProps:{size:"sm"}},JoyInput:{defaultProps:{size:"sm"}},JoyCheckbox:{defaultProps:{size:"sm"}},JoyRadio:{defaultProps:{size:"sm"}},JoySwitch:{defaultProps:{size:"sm"}},JoyAutocomplete:{defaultProps:{size:"sm"}},JoyTextarea:{defaultProps:{size:"sm"}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.primary.plainActiveBg,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:focus":{outline:`${e.palette.primary[500]} solid 2px`,outlineOffset:"-2px"},[`& .${tm.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}},JoyAvatar:{styleOverrides:{root:({ownerState:e})=>({...e.size==="xs"&&{width:"24px",height:"24px",fontSize:"12px"}})}},JoyDialogTitle:{styleOverrides:{root:{fontWeight:"var(--ceed-fontWeight-xl, 700)"}}}}});function dr(e){let o=e.theme||pr;return mt.createElement(mt.Fragment,null,mt.createElement(om,{theme:o},mt.createElement(lr,null),e.children))}dr.displayName="ThemeProvider";export{ko as Accordion,To as AccordionDetails,Mo as AccordionSummary,gt as Accordions,ft as Alert,jx as AspectRatio,Ue as Autocomplete,Jx as AutocompleteListbox,_x as AutocompleteOption,Ao as Avatar,fr as AvatarGroup,Xx as Badge,Ge as Box,yt as Breadcrumbs,qe as Button,rx as ButtonGroup,Ke as Calendar,Ze as Card,Pt as CardActions,xt as CardContent,Dt as CardCover,Mt as CardOverflow,Xe as Checkbox,Ae as Chip,lD as CircularProgress,Tt as Container,lr as CssBaseline,zo as CurrencyInput,Bt as DataTable,$o as DatePicker,Et as DateRangePicker,ro as DialogActions,co as DialogContent,Rt as DialogFrame,uo as DialogTitle,ho as Divider,pD as Drawer,We as Dropdown,He as FormControl,Ye as FormHelperText,$e as FormLabel,ln as Grid,Je as IconButton,eo as Input,Vt as InsetDrawer,mD as LinearProgress,wD as Link,uD as List,fD as ListDivider,yD as ListItem,bD as ListItemButton,xD as ListItemContent,PD as ListItemDecorator,TD as ListSubheader,$t as Markdown,be as Menu,Yt as MenuButton,ve as MenuItem,Ot as Modal,Qo as ModalClose,go as ModalDialog,zt as ModalFrame,Lt as ModalOverflow,cn as MonthPicker,Gt as MonthRangePicker,nt as NavigationGroup,at as NavigationItem,Kt as Navigator,Jo as Option,po as Pagination,jt as PercentageInput,lt as ProfileMenu,Co as Radio,bo as RadioGroup,Xt as RadioList,lo as Select,oo as Sheet,OD as Skeleton,AD as Slider,Ie as Stack,st as Step,ND as StepButton,pt as StepIndicator,or as Stepper,tr as Switch,nr as Tab,ar as TabList,ir as TabPanel,to as Table,wt as TableBody,kt as TableHead,rr as Tabs,ao as Textarea,dr as ThemeProvider,so as Tooltip,U as Typography,an as Uploader,Vx as accordionClasses,Hx as accordionDetailsClasses,Yx as accordionSummaryClasses,$x as accordionsClasses,nx as alertClasses,Zx as aspectRatioClasses,Ux as autocompleteClasses,Gx as autocompleteListboxClasses,Wx as autocompleteOptionClasses,qx as avatarClasses,Kx as avatarGroupClasses,Qx as badgeClasses,ax as boxClasses,eD as breadcrumbsClasses,ix as buttonClasses,tD as cardActionsClasses,oD as cardClasses,rD as cardContentClasses,nD as cardCoverClasses,aD as cardOverflowClasses,lx as checkboxClasses,iD as chipClasses,sD as circularProgressClasses,Fx as dialogActionsClasses,Ex as dialogContentClasses,Nx as dialogTitleClasses,sx as dividerClasses,dD as drawerClasses,sr as extendTheme,Dx as formControlClasses,Mx as formHelperTextClasses,Px as formLabelClasses,Tx as gridClasses,px as iconButtonClasses,dx as inputClasses,cD as linearProgressClasses,ID as linkClasses,gD as listClasses,hD as listDividerClasses,vD as listItemButtonClasses,CD as listItemClasses,DD as listItemContentClasses,MD as listItemDecoratorClasses,kD as listSubheaderClasses,cx as menuButtonClasses,mx as menuClasses,ux as menuItemClasses,Ix as modalClasses,Ax as modalCloseClasses,Sx as modalDialogClasses,Bx as modalOverflowClasses,gx as optionClasses,fx as radioClasses,hx as radioGroupClasses,yx as selectClasses,wx as sheetClasses,LD as skeletonClasses,SD as sliderClasses,kx as stackClasses,ED as stepButtonClasses,BD as stepClasses,FD as stepperClasses,Cx as switchClasses,zx as tabListClasses,Rx as tabPanelClasses,bx as tableClasses,Lx as tabsClasses,vx as textareaClasses,pr as theme,Ox as tooltipClasses,xx as typographyClasses,ox as useColorScheme,ex as useTheme,tx as useThemeProps};
1
+ import{useTheme as ex,useColorScheme as ox,useThemeProps as tx,ButtonGroup as rx,alertClasses as nx,boxClasses as ax,buttonClasses as ix,checkboxClasses as lx,dividerClasses as sx,iconButtonClasses as px,inputClasses as dx,menuClasses as mx,menuButtonClasses as cx,menuItemClasses as ux,optionClasses as gx,radioClasses as fx,radioGroupClasses as hx,selectClasses as yx,switchClasses as Cx,tableClasses as bx,textareaClasses as vx,typographyClasses as xx,formControlClasses as Dx,formLabelClasses as Px,formHelperTextClasses as Mx,gridClasses as Tx,stackClasses as kx,sheetClasses as wx,modalClasses as Ix,modalCloseClasses as Ax,modalDialogClasses as Sx,modalOverflowClasses as Bx,dialogTitleClasses as Nx,dialogContentClasses as Ex,dialogActionsClasses as Fx,tooltipClasses as Ox,tabsClasses as Lx,tabListClasses as zx,tabPanelClasses as Rx,accordionClasses as Vx,accordionDetailsClasses as Hx,accordionGroupClasses as $x,accordionSummaryClasses as Yx,AutocompleteListbox as Jx,AutocompleteOption as _x,autocompleteClasses as Ux,autocompleteListboxClasses as Gx,autocompleteOptionClasses as Wx,avatarClasses as qx,avatarGroupClasses as jx,AspectRatio as Kx,aspectRatioClasses as Zx,Badge as Xx,badgeClasses as Qx,breadcrumbsClasses as eD,cardClasses as oD,cardActionsClasses as tD,cardContentClasses as rD,cardCoverClasses as nD,cardOverflowClasses as aD,chipClasses as iD,CircularProgress as lD,circularProgressClasses as sD,Drawer as pD,drawerClasses as dD,LinearProgress as mD,linearProgressClasses as cD,List as uD,listClasses as gD,ListDivider as fD,listDividerClasses as hD,ListItem as yD,listItemClasses as CD,ListItemButton as bD,listItemButtonClasses as vD,ListItemContent as xD,listItemContentClasses as DD,ListItemDecorator as PD,listItemDecoratorClasses as MD,ListSubheader as TD,listSubheaderClasses as kD,Link as wD,linkClasses as ID,Slider as AD,sliderClasses as SD,stepClasses as BD,StepButton as ND,stepButtonClasses as ED,stepperClasses as FD,Skeleton as OD,skeletonClasses as LD}from"@mui/joy";import Ve from"react";import{AccordionGroup as Fn,Accordion as On,AccordionSummary as Ln,AccordionDetails as zn}from"@mui/joy";import{motion as Po}from"framer-motion";var Rn=Po(Ln),Mo=Rn;Mo.displayName="AccordionSummary";var Vn=Po(zn),To=Vn;To.displayName="AccordionDetails";var Hn=Po(On);function ko(e){let{summary:o,details:t,variant:r,color:i,...a}=e,n=r==="solid"?"solid":void 0;return Ve.createElement(Hn,{variant:n,color:i,...a},Ve.createElement(Mo,{variant:n,color:i},o),Ve.createElement(To,{variant:n,color:i},t))}ko.displayName="Accordion";var $n=Po(Fn);function gt(e){let{variant:o,color:t,items:r,...i}=e;return Ve.createElement($n,{variant:o,color:t,...i},r.map((a,n)=>Ve.createElement(ko,{key:n,summary:a.summary,details:a.details,index:n,variant:o,color:t})))}gt.displayName="Accordions";import wo from"react";import{Alert as Gn,styled as Wn}from"@mui/joy";import{motion as qn}from"framer-motion";import Yn from"react";import{Typography as Jn}from"@mui/joy";import{motion as _n}from"framer-motion";var Un=_n(Jn),U=e=>Yn.createElement(Un,{...e});U.displayName="Typography";var G=U;import{Stack as Ie}from"@mui/joy";var z=Ie;var jn=Wn(qn(Gn))({alignItems:"flex-start",fontWeight:"unset"});function ft(e){let{title:o,content:t,actions:r,color:i="primary",...a}=e,n=e.invertedColors||e.variant==="solid";return wo.createElement(jn,{...a,color:i,endDecorator:r,invertedColors:n},wo.createElement(z,null,o&&wo.createElement(G,{level:"title-sm",color:i},o),wo.createElement(G,{level:"body-sm",color:i},t)))}ft.displayName="Alert";import V,{useCallback as ht,useEffect as Ca,useMemo as _e,useRef as ba}from"react";import{Autocomplete as va,AutocompleteOption as xa,ListSubheader as Da,AutocompleteListbox as Pa,ListItemDecorator as cr,CircularProgress as Ma,styled as ur}from"@mui/joy";import Ta from"@mui/icons-material/Close";import{useVirtualizer as ka}from"@tanstack/react-virtual";import{Popper as wa}from"@mui/base";import{FormControl as Kn,styled as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Zn(Xn(Kn))({width:"100%"}),He=Qn;He.displayName="FormControl";var ue=He;import{FormLabel as ea}from"@mui/joy";import{motion as oa}from"framer-motion";var ta=oa(ea),$e=ta;$e.displayName="FormLabel";var ge=$e;import{FormHelperText as ra}from"@mui/joy";import{motion as na}from"framer-motion";var aa=na(ra),Ye=aa;Ye.displayName="FormHelperText";var fe=Ye;import{Chip as ia}from"@mui/joy";import{motion as la}from"framer-motion";var sa=la(ia),Ae=sa;Ae.displayName="Chip";var mr=Ae;import pa,{forwardRef as da}from"react";import{IconButton as ma}from"@mui/joy";import{motion as ca}from"framer-motion";var ua=ca(ma),Je=da(({...e},o)=>pa.createElement(ua,{ref:o,...e}));Je.displayName="IconButton";var $=Je;import{useState as ga,useCallback as fa,useEffect as ha,useRef as ya}from"react";function R(e,o,t,r){let{current:i}=ya(e!==void 0),[a,n]=ga(e??o);ha(()=>{i&&n(e??o)},[e,o,i]);let l=fa(p=>{let d=typeof p=="function"?p(a):p;(r?.disableStrict||!i)&&n(d),t?.(d)},[i,t,a,r]);return[a,l]}var Ia=ur(wa,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Aa=V.forwardRef((e,o)=>{let{anchorEl:t,open:r,modifiers:i,children:a,ownerState:{loading:n,size:l="md"},...p}=e,d=ba(null),s=a[0].every(x=>x.hasOwnProperty("group")),u=n?[a[1]]:a[0].length===0?[a[2]]:s?a[0].flatMap(x=>[V.createElement(Da,{key:x.key,component:"li"},x.group),...x.children]):a[0],f=ka({count:u.length,estimateSize:()=>36,getScrollElement:()=>d.current,measureElement:x=>x.clientHeight,overscan:5}),C=f.getVirtualItems();return Ca(()=>{r&&f.measure()},[r,f]),V.createElement(Ia,{ref:o,anchorEl:t,open:r,modifiers:i},V.createElement(Pa,{...p},V.createElement("div",{ref:d,style:{overflow:"auto"}},V.createElement("div",{style:{height:`${f.getTotalSize()}px`,position:"relative"}},C.map(({index:x,size:c,start:m,key:h})=>V.cloneElement(u[x],{key:h,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${c}px`,transform:`translateY(${m}px)`,overflow:"visible"},children:V.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},u[x].props.children)}))))))}),Io={sm:"20px",md:"24px",lg:"28px"},Sa=ur($,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:Io[o],height:Io[o],minWidth:Io[o],minHeight:Io[o],borderRadius:"50%"}));function Ue(e){let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,onChange:p,onChangeComplete:d,sx:s,className:u,...f}=e,[C,x]=R(e.value,e.defaultValue||"",ht(b=>p?.({target:{value:b,name:e.name}}),[p,e.name])),c=_e(()=>e.options.map(b=>typeof b!="object"?{value:b,label:b}:b),[e.options]),m=_e(()=>{let b=new Map;return c.forEach(v=>{b.set(v.value,v)}),b},[c]),h=_e(()=>e.loading?{value:"",label:"",startDecorator:V.createElement(Ma,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(C)?C.filter(b=>m.has(b)).map(b=>m.get(b||"")):m.get(C),[C,m,e.loading]),g=ht(b=>V.isValidElement(b)&&!e.loading?V.cloneElement(b,{size:a}):b,[a,e.loading]),S=_e(()=>g(h?.startDecorator||e.startDecorator),[h,g,e.startDecorator]),k=_e(()=>g(h?.endDecorator||e.endDecorator),[h,g,e.endDecorator]),y=ht((b,v)=>{let M=v,T=Array.isArray(M)?M.map(F=>F.value):M?.value;x(T),(Array.isArray(M)&&M.map(F=>m.get(F.value))||m.get(M?.value))&&d?.({...b,target:{...b.target,value:T}})},[d,x,m]),D=V.createElement(va,{...f,required:l,onChange:y,color:t?"danger":i,value:h||null,options:c,size:a,disabled:n,startDecorator:S,endDecorator:k,getOptionLabel:b=>`${b.label??""}`,renderTags:(b,v)=>b.map((M,T)=>{let{onClick:F,...O}=v({index:T});return g(V.createElement(mr,{color:"primary",...O},V.createElement(z,{direction:"row",alignItems:"center",gap:2,py:.5},M.value,g(V.createElement(Sa,{color:"primary",variant:"soft",onClick:F},V.createElement(Ta,null))))))}),slots:{listbox:Aa},renderOption:(b,v)=>V.createElement(xa,{...b},v.startDecorator&&V.createElement(cr,{sx:M=>({marginInlineEnd:`var(--Input-gap, ${M.spacing(1)})`})},g(v.startDecorator)),g(v.label),v.endDecorator&&V.createElement(cr,{sx:M=>({marginInlineStart:`var(--Input-gap, ${M.spacing(1)})`})},g(v.endDecorator))),renderGroup:b=>b});return V.createElement(ue,{required:l,color:i,size:a,error:t,disabled:n,sx:s,className:u},o&&V.createElement(ge,null,o),D,r&&V.createElement(fe,null,r))}Ue.displayName="Autocomplete";var gr=Ue;import Ba,{forwardRef as Na,useMemo as Ea}from"react";import{Avatar as Fa,AvatarGroup as fr,styled as Oa,useThemeProps as La}from"@mui/joy";var za=Oa(Fa,{name:"Avatar",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Ra=e=>{if(/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e))return e[0];{let t=e.trim().split(/\s+/);if(t.length===0)return;if(t.length===1)return t[0].charAt(0).toUpperCase();let r=t[0],i=t[t.length-1];return(r.charAt(0)+i.charAt(0)).toUpperCase()}},Ao=Na(function(o,t){let r=La({props:o,name:"Avatar"}),{children:i,getInitial:a=Ra,...n}=r,l=Ea(()=>typeof i=="string"?a?.(i)??"":i,[i,a]);return Ba.createElement(za,{...n,children:l,ref:t})});import{Box as Va}from"@mui/joy";import{motion as Ha}from"framer-motion";var $a=Ha(Va),Ge=$a;Ge.displayName="Box";var So=Ge;import le from"react";import{Breadcrumbs as br,Link as ja,MenuButton as Ka}from"@mui/joy";import hr from"react";import{Menu as Ya,MenuItem as Ja}from"@mui/joy";import{motion as yr}from"framer-motion";var _a=yr(Ya),be=e=>hr.createElement(_a,{...e});be.displayName="Menu";var Ua=yr(Ja),ve=e=>hr.createElement(Ua,{...e});ve.displayName="MenuItem";var Cr=be;import{Dropdown as Ga}from"@mui/joy";import{motion as Wa}from"framer-motion";var qa=Wa(Ga),We=qa;We.displayName="Dropdown";var Bo=We;function yt(e){let{crumbs:o,size:t,startCrumbCount:r=1,endCrumbCount:i=3,slots:{link:a,...n}={link:ja},slotProps:{link:l,...p}={link:{color:"neutral"}},collapsed:d=!0,...s}=e,u=m=>m.type==="link"&&a?le.createElement(a,{to:m.linkHref,href:m.linkHref,...l},m.label):le.createElement(G,null,m.label);if(!d)return le.createElement(br,{size:t,slots:n,slotProps:p,...s},o.map(m=>le.createElement(u,{...m})));let f=Math.max(1,i),C=o.slice(0,r).map(m=>le.createElement(u,{...m})),x=(r+f>o.length?o.slice(r):o.slice(-f)).map(m=>le.createElement(u,{...m})),c=o.slice(r,-f).map(m=>le.createElement(ve,null,le.createElement(u,{...m})));return le.createElement(br,{size:t,slots:n,slotProps:p,...s},C,c.length&&le.createElement(Bo,null,le.createElement(Ka,{size:t,variant:"plain"},"..."),le.createElement(Cr,{size:t},c)),x)}yt.displayName="Breadcrumbs";import Za,{forwardRef as Xa}from"react";import{Button as Qa}from"@mui/joy";import{motion as ei}from"framer-motion";var oi=ei(Qa),qe=Xa(({...e},o)=>Za.createElement(oi,{ref:o,...e}));qe.displayName="Button";var W=qe;import A,{Fragment as Le,forwardRef as ni,useMemo as Ir}from"react";import{styled as de}from"@mui/joy";import ai from"@mui/icons-material/ChevronLeft";import ii from"@mui/icons-material/ChevronRight";import{AnimatePresence as Ar,motion as li}from"framer-motion";var vr=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),r=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((r.getDate()+t.getDay())/7),n=1;for(let l=1;l<=a;l++){let p=[];for(let d=1;d<=7;d++)l===i&&d<t.getDay()+1||n>r.getDate()?p.push(void 0):(p.push(n),n++);o.push(p)}return o},xr=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Ct=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Dr=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Pr=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let r=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),r})},Mr=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},bt=(e,o)=>{let t=new Date(e),r=new Date(o);return t.setHours(0,0,0,0),r.setHours(0,0,0,0),t.getTime()===r.getTime()},xe=(e,o,t)=>{let r=new Date(t);r.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return r>=i&&r<=a},No=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Tr,useMemo as vt,useState as Eo}from"react";import{useThemeProps as ti}from"@mui/joy";var ri=(e,o)=>o.includes(e)?e:o[0],kr=e=>{let[o,t]=Eo(()=>ri(e.view||"day",e.views||["day","month"])),[r,i]=Eo(e.defaultValue),[a,n]=Eo(()=>{let h=new Date;return h.setDate(1),h.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||h}),[[l,p],d]=Eo([0,0]),s=e.view??o,u=vt(()=>{let h=e.minDate||new Date(0);return h.setHours(0,0,0,0),h},[e.minDate]),f=vt(()=>{let h=e.maxDate||new Date(864e13);return h.setHours(0,0,0,0),h},[e.maxDate]),C=Tr(h=>{d([l+h,h])},[l]),x=Tr(h=>{n(h),s==="month"?a.getFullYear()!==h.getFullYear()&&C(h>a?1:-1):C(h>a?1:-1),e.onMonthChange?.(h)},[s,e,a,C]),c=ti({props:{locale:"default",views:["day","month"],view:s,value:e.value??r,...e,minDate:u,maxDate:f,onChange:e.value?e.onChange:h=>{i(h),e.onChange?.(h)},onMonthChange:x,onViewChange:()=>{let h=s==="month"?"day":"month";!(!e.views||e.views.includes(h))||e.view===h||(e.onViewChange?e.onViewChange(h):t(h))}},name:"Calendar"}),m=vt(()=>({...c,viewMonth:a,direction:p}),[c,a,p]);return[c,m]};import{useCallback as Oe,useState as wr}from"react";var Fo=e=>{let[o,t]=wr(null),[r,i]=wr(null);return{calendarTitle:e.view==="month"?xr(e.viewMonth,e.locale||"default"):Ct(e.viewMonth,e.locale||"default"),onPrev:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let p=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":p?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,r]),getPickerDayProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=!!e.value&&(bt(n,e.value[0])||e.value[1]&&bt(n,e.value[1])),p=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]),t(null)};return{isToday:Mr(n),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(n):void 0,disabled:e.minDate&&n<e.minDate||e.maxDate&&n>e.maxDate||e.disableFuture&&n>new Date||e.disablePast&&n<(()=>{let s=new Date;return s.setHours(0,0,0,0),s})(),tabIndex:-1,"aria-label":n.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":p?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let l=!e.views?.find(f=>f==="day"),p=l&&e.rangeSelection,d=!!e.value&&(No(n,e.value[0])||e.value[1]&&No(n,e.value[1])),s=p&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),u=()=>{p?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):l?e.onChange?.([n,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(n)),i(null)};return{isSelected:d,onMouseEnter:p&&e.value?.[0]&&!e.value?.[1]?()=>i(n):void 0,disabled:e.minDate&&(()=>{let f=new Date(n);return f.setMonth(f.getMonth()+1),f.setDate(0),f<e.minDate})()||e.maxDate&&(()=>{let f=new Date(n);return f.setDate(0),f>e.maxDate})()||e.disableFuture&&n>new Date||e.disablePast&&n<new Date&&!No(n,new Date),onClick:u,tabIndex:-1,"aria-label":Ct(n,e.locale||"default"),"aria-selected":d?"true":void 0,"aria-current":s?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,r])}};var si=de("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),pi=de("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),Sr=de("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Br=de(li.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),di=de("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),mi=de("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),ci=de(W,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),ui=de("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),gi=de("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),fi=de(W,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),hi=de(W,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:r})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Nr={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},Oo=1e4,Er=(e,o)=>Math.abs(e)*o,yi=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:r}=Fo(o),i=Ir(()=>vr(o.viewMonth),[o.viewMonth]),a=Ir(()=>Pr(o.locale||"default"),[o.locale]);return A.createElement(Sr,{calendarType:"datePicker"},A.createElement(Ar,{initial:!1,custom:o.direction},A.createElement(Br,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Nr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Er(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement(di,null,A.createElement("tr",null,a.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${n}_${l}`},A.createElement("th",null,A.createElement(G,{level:"body-xs",textAlign:"center"},n)),l<6&&A.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),A.createElement(mi,null,i.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${l}`},A.createElement("tr",null,n.map((p,d)=>p?A.createElement(Le,{key:d},A.createElement(ui,{...r(p)},A.createElement(hi,{size:"sm",variant:"plain",color:"neutral",...t(p)},p)),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):A.createElement(Le,{key:d},A.createElement("td",null),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:13,style:{height:4}}))))))))},Ci=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:r}=Fo(o),i=Array.from({length:12},(n,l)=>l).reduce((n,l)=>(n[n.length-1].length===4&&n.push([]),n[n.length-1].push(l),n),[[]]),a=!o.views?.find(n=>n==="day");return A.createElement(Sr,{calendarType:a?"monthPicker":"datePicker"},A.createElement(Ar,{initial:!1,custom:o.direction},A.createElement(Br,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Nr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Er(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement("tbody",null,i.map((n,l)=>A.createElement(Le,{key:l},A.createElement("tr",null,n.map((p,d)=>A.createElement(Le,{key:p},A.createElement(gi,{...r(p)},A.createElement(fi,{size:"sm",variant:"plain",color:"neutral",...t(p)},Dr(p,o.locale))),d<3&&A.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:7,style:{height:4}}))))))))},je=ni((e,o)=>{let[t,r]=kr(e),{value:i,defaultValue:a,onChange:n,locale:l,onViewChange:p,onMonthChange:d,view:s,views:u,rangeSelection:f,minDate:C,maxDate:x,disableFuture:c,disablePast:m,...h}=t,{calendarTitle:g,onPrev:S,onNext:k}=Fo(r);return A.createElement(si,{ref:o,...h},A.createElement(pi,null,A.createElement($,{size:"sm",onClick:S,"aria-label":`Previous ${s==="day"?"Month":"Year"}`},A.createElement(ai,null)),A.createElement(ci,{ownerState:r,variant:"plain",color:"neutral",onClick:p,"aria-label":"Switch Calendar View"},g),A.createElement($,{size:"sm",onClick:k,"aria-label":`Next ${s==="day"?"Month":"Year"}`},A.createElement(ii,null))),s==="day"&&A.createElement(yi,{ownerState:r}),s==="month"&&A.createElement(Ci,{ownerState:r}))});je.displayName="Calendar";var Me=je;import{Card as bi,CardContent as vi,CardCover as xi,CardActions as Di,CardOverflow as Pi}from"@mui/joy";import{motion as Ke}from"framer-motion";var Mi=Ke(bi),Ze=Mi;Ze.displayName="Card";var Ti=Ke(vi),xt=Ti;xt.displayName="CardContent";var ki=Ke(xi),Dt=ki;Dt.displayName="CardCover";var wi=Ke(Di),Pt=wi;Pt.displayName="CardActions";var Ii=Ke(Pi),Mt=Ii;Mt.displayName="CardOverflow";import Ai from"react";import{Checkbox as Si}from"@mui/joy";import{motion as Bi}from"framer-motion";var Ni=Bi(Si),Xe=e=>Ai.createElement(Ni,{...e});Xe.displayName="Checkbox";var Qe=Xe;import{styled as Ei}from"@mui/joy";import Fi,{forwardRef as Oi}from"react";var Li=Ei("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"&&e!=="overrideBreakpoint"})(({theme:e,maxWidth:o="lg",overrideBreakpoint:t})=>[{width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),[e.breakpoints.up("lg")]:{paddingLeft:e.spacing(8),paddingRight:e.spacing(8)},maxWidth:e.breakpoints.values[o]},t?{paddingLeft:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4),paddingRight:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4)}:null]),Tt=Oi(function(o,t){return Fi.createElement(Li,{ref:t,...o})});Tt.displayName="Container";import Lo,{useCallback as Or,useMemo as Lr,useState as _i}from"react";import{IntlMessageFormat as Ui}from"intl-messageformat";import{NumericFormat as Gi}from"react-number-format";import Te,{useCallback as zi}from"react";import{Input as Ri}from"@mui/joy";import{motion as Vi}from"framer-motion";import Hi from"@mui/icons-material/Close";var $i=Vi(Ri),eo=Te.forwardRef((e,o)=>{let{label:t,helperText:r,error:i,style:a,size:n,color:l,disabled:p,required:d,onChange:s,name:u,sx:f,className:C,enableClearable:x,...c}=e,[m,h]=R(e.value,e.defaultValue,zi(y=>{s?.({target:{value:y?.toString()||"",name:u||""}})},[s,u])),g=y=>{h(y.target.value)},S=()=>{h(e.defaultValue||"")},k=Te.createElement($i,{value:m,name:u,onChange:g,required:d,color:i?"danger":l,disabled:p,slotProps:{input:{ref:o,...c.slotProps?.input},...c.slotProps},...c,endDecorator:x?Te.createElement(z,{gap:1,direction:"row"},c.endDecorator,m&&Te.createElement($,{onMouseDown:y=>y.preventDefault(),onClick:S,"aria-label":"Clear"},Te.createElement(Hi,null))):c.endDecorator});return Te.createElement(ue,{required:d,color:l,size:n,error:i,disabled:p,sx:f,className:C},t&&Te.createElement(ge,null,t),k,r&&Te.createElement(fe,null,r))});eo.displayName="Input";var X=eo;import{styled as Wi,useThemeProps as qi}from"@mui/joy";import Yi from"intl-messageformat";var Ji={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},Fr=(e="USD")=>{let[o,t,r,...i]=new Yi(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=Ji[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:r,placeholder:r?`${o} 0${r}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!r,decimalScale:a}};var ji=Lo.forwardRef(function(o,t){let{onChange:r,...i}=o;return Lo.createElement(Gi,{...i,onValueChange:({value:a})=>{r?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),Ki=Wi(X,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),zo=Lo.forwardRef(function(o,t){let r=qi({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:n,label:l,error:p,helperText:d,required:s,disabled:u,useMinorUnit:f,sx:C,className:x,...c}=r,{symbol:m,thousandSeparator:h,decimalSeparator:g,placeholder:S,fixedDecimalScale:k,decimalScale:y}=Fr(i),[D,b]=R(r.value,r.defaultValue,Or(L=>n?.({target:{name:a,value:L}}),[n,a])),v=Lr(()=>D&&f?D/Math.pow(10,y):D,[D,f,y]),M=Lr(()=>r.max&&f?r.max/Math.pow(10,y):r.max,[r.max,f,y]),[T,F]=_i(!!M&&!!v&&v>M),O=Or(L=>{if(L.target.value===""){b(void 0);return}let q=Number(f?L.target.value?.replace(g,""):L.target.value);M&&Number(L.target.value)>M?F(!0):F(!1),b(q)},[g,M,f,b]);return Lo.createElement(Ki,{...c,ref:t,value:v,placeholder:S,onChange:O,error:p||T,disabled:u,required:s,color:p||T?"danger":r.color,label:l,helperText:T?new Ui(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:M}):d,slotProps:{input:{component:ji,decimalSeparator:g,thousandSeparator:h,prefix:m,fixedDecimalScale:k,decimalScale:y,"aria-label":c["aria-label"]}},sx:{...C},className:x})});var zr=zo;import P,{useCallback as ye,useEffect as Go,useMemo as _,useRef as Wo,useState as St,useId as Rl,forwardRef as Vl,useImperativeHandle as Hl}from"react";import{useVirtualizer as $l}from"@tanstack/react-virtual";import{styled as qo,LinearProgress as Yl,Link as Jl}from"@mui/joy";import _l from"@mui/icons-material/ArrowUpwardRounded";import Ul from"@mui/icons-material/Info";import{Sheet as Zi}from"@mui/joy";import{motion as Xi}from"framer-motion";var Qi=Xi(Zi),oo=Qi;oo.displayName="Sheet";var se=oo;import me from"react";import{Table as el}from"@mui/joy";var to=e=>{let{children:o,...t}=e;return me.createElement(el,{...t},o)};to.displayName="Table";function kt(e){let{headCells:o,showCheckbox:t,onCheckboxChange:r,slots:{checkbox:i=Qe}={},slotProps:{checkbox:a={}}={}}=e;return me.createElement("thead",null,me.createElement("tr",null,t&&me.createElement("th",{style:{width:"40px",textAlign:"center"}},me.createElement(i,{onChange:r,...a})),o.map(n=>me.createElement("th",{key:n.label,style:{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,textAlign:n.numeric?"right":"left"}},n.label))))}kt.displayName="TableHead";function wt(e){let{rows:o,cellOrder:t,rowOptions:r,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:n=Qe}={},slotProps:{checkbox:l={}}={}}=e;return me.createElement("tbody",null,o.map((p,d)=>me.createElement("tr",{key:d},i&&me.createElement("td",{style:{textAlign:"center"}},me.createElement(n,{onChange:s=>a?.(s,d),...l})),t.map(s=>me.createElement("td",{key:s,style:{textAlign:r?.[s]?.numeric?"right":"left"}},p[s])))))}wt.displayName="TableBody";import Q,{forwardRef as il,useCallback as Ro,useEffect as Rr,useImperativeHandle as ll,useRef as Vr,useState as Hr}from"react";import{IMaskInput as sl,IMask as It}from"react-imask";import pl from"@mui/icons-material/CalendarToday";import{styled as Ho,useThemeProps as dl}from"@mui/joy";import{FocusTrap as ml,ClickAwayListener as cl,Popper as ul}from"@mui/base";import{DialogActions as ol,styled as tl}from"@mui/joy";import{motion as rl}from"framer-motion";var nl=rl(ol),al=tl(nl)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),ro=al;ro.displayName="DialogActions";var he=ro;var gl=Ho($,{name:"DatePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),fl=Ho(ul,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),hl=Ho(se,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),yl=Ho("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),$r=(e,o)=>{try{let t=Vo(e,o);return t.toString()==="Invalid Date"||e!==no(t,o)?!1:new RegExp(`^${o.replace(/Y/g,"\\d").replace(/M/g,"\\d").replace(/D/g,"\\d")}$`).test(e)}catch{return!1}},no=(e,o)=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),o.replace(/YYYY/g,i.toString()).replace(/MM/g,r).replace(/DD/g,t)};function Vo(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/);if(t.length!==r.length)throw new Error("Invalid date string or format");let i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var Cl=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),bl=Q.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return Q.createElement(sl,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Cl(i),blocks:{D:{mask:It.MaskedRange,from:1,to:31,maxLength:2},M:{mask:It.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:It.MaskedRange,from:1900,to:9999,maxLength:4}},format:n=>no(n,i),parse:n=>Vo(n,i),autofix:"pad",overwrite:!0})}),$o=il((e,o)=>{let t=dl({props:e,name:"DatePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM/DD",displayFormat:m="YYYY/MM/DD",size:h,inputReadOnly:g,hideClearButton:S,readOnly:k,...y}=t,D=Vr(null),b=Vr(null),[v,M]=R(t.value,t.defaultValue||"",Ro(I=>r?.({target:{name:t.name,value:I}}),[t.name,r]),{disableStrict:!0}),[T,F]=Hr(v),[O,L]=Hr(null),q=!!O;Rr(()=>{O||D.current?.blur()},[O,D]),Rr(()=>{if(!$r(T,m))return;if(v===""){F("");return}let Z=no(Vo(v,c),m);F(Z)},[m,T,c,v]),ll(o,()=>D.current,[D]);let Y=Ro(I=>{if(F(I.target.value),I.target.value===""){M("");return}if($r(I.target.value,m)){let B=Vo(I.target.value,m),w=no(B,c);M(w)}},[m,c,M]),N=Ro(I=>{L(O?null:I.currentTarget),setTimeout(()=>{D.current?.focus()},0)},[O,L,D]),E=Ro(I=>{g&&(I.preventDefault(),b.current?.focus())},[g,b]);return Q.createElement(yl,null,Q.createElement(ml,{open:!0},Q.createElement(Q.Fragment,null,Q.createElement(X,{...y,color:n?"danger":y.color,ref:D,size:h,value:T,onChange:Y,placeholder:m,disabled:i,required:f,error:n,slotProps:{input:{component:bl,ref:D,format:m,sx:{"&:hover":{cursor:g||k?"default":"text"}},onMouseDown:E}},className:x,sx:C,endDecorator:Q.createElement(gl,{ref:b,variant:"plain",onClick:k?void 0:N,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":q,disabled:i},Q.createElement(pl,null)),label:a,helperText:l,readOnly:k||g}),q&&Q.createElement(cl,{onClickAway:()=>L(null)},Q.createElement(fl,{id:"date-picker-popper",open:!0,anchorEl:O,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":q},Q.createElement(hl,{tabIndex:-1,role:"presentation"},Q.createElement(Me,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([I])=>{Y({target:{name:t.name,value:no(I,c)}}),L(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!S&&Q.createElement(he,{sx:{p:1}},Q.createElement(W,{size:h,variant:"plain",color:"neutral",onClick:()=>{Y({target:{name:t.name,value:""}}),L(null)}},"Clear"))))))))});var Yr=$o;import Yo from"react";import{Textarea as vl}from"@mui/joy";import{motion as xl}from"framer-motion";var Dl=xl(vl),ao=e=>{let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,minRows:p=2,maxRows:d=4,sx:s,className:u,...f}=e,C=Yo.createElement(Dl,{required:l,disabled:n,color:t?"danger":i,size:a,minRows:p,maxRows:d,...f});return Yo.createElement(ue,{required:l,disabled:n,color:i,size:a,error:t,sx:s,className:u},o&&Yo.createElement(ge,null,o),C,r&&Yo.createElement(fe,null,r))};ao.displayName="Textarea";var Jr=ao;import io,{useMemo as Pl}from"react";import{Select as Ml,Option as Tl}from"@mui/joy";import{motion as kl}from"framer-motion";var wl=kl(Tl),Jo=wl;Jo.displayName="Option";function lo(e){let{label:o,helperText:t,error:r,size:i,color:a,disabled:n,required:l,onChange:p,sx:d,className:s,...u}=e,f=Pl(()=>e.options.map(c=>"value"in c?c:{value:c,label:c}),[e.options]),x=io.createElement(Ml,{...u,required:l,disabled:n,size:i,color:r?"danger":a,onChange:(c,m)=>{let h=c||{target:{}},g={...h,target:{name:h.target?.name||e.name,value:m||void 0}};p?.(g)}},f.map(c=>io.createElement(Jo,{key:c.value,value:c.value},c.label)));return io.createElement(ue,{required:l,disabled:n,size:i,color:a,error:r,sx:d,className:s},o&&io.createElement(ge,null,o),x,t&&io.createElement(fe,null,t))}lo.displayName="Select";var _r=lo;import Il from"react";import{Tooltip as Al}from"@mui/joy";import{motion as Sl}from"framer-motion";var Bl=Sl(Al),so=e=>Il.createElement(Bl,{...e});so.displayName="Tooltip";var At=so;import{motion as Wr}from"framer-motion";import ae,{useCallback as Nl,useEffect as El}from"react";import Fl from"@mui/icons-material/ChevronLeft";import Ol from"@mui/icons-material/ChevronRight";import{styled as _o}from"@mui/joy";var Se=_o(W,{name:"Pagination",slot:"button"})(({theme:e,active:o,size:t})=>({"--Button-size":{sm:"32px",md:"40px",lg:"48px"}[t],width:"var(--Button-size)",height:"var(--Button-size)",backgroundColor:o?e.vars.palette.primary.softHoverBg:"transparent",color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.plainColor,"&:hover":{color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.softColor,backgroundColor:o?e.vars.palette.primary.softActiveBg:e.vars.palette.neutral.softHoverBg}})),Ur=_o($,{name:"Pagination",slot:"button"})(({theme:e,size:o})=>({"--IconButton-size":{sm:"32px",md:"40px",lg:"48px"}[o],"--Icon-fontSize":"20px",width:"var(--IconButton-size)",height:"var(--IconButton-size)",color:e.vars.palette.neutral.plainColor,"&:hover":{color:e.vars.palette.neutral.softColor,backgroundColor:e.vars.palette.neutral.softHoverBg}})),Ll=_o(z,{name:"Pagination",slot:"root"})({}),zl=_o(z,{name:"Pagination",slot:"container"})(({theme:e,size:o})=>({gap:{sm:e.spacing(1),md:e.spacing(1.5),lg:e.spacing(2)}[o]}));function po(e){let{paginationModel:o,defaultPaginationModel:t={page:1,pageSize:25},onPageChange:r,rowCount:i,size:a="md",...n}=e,[l,p]=R(o,t,Nl(m=>{r(m.page)},[r])),d=m=>{p({...l,page:m})},s=1,u=Math.max(s,Math.ceil(i/l.pageSize)),f=[l.page-2,l.page-1].filter(m=>m>1),C=[l.page+1,l.page+2].filter(m=>m<=u-1),x=u>1&&l.page<u-3,c=u>1&&l.page>4;return El(()=>{l.page>u&&p({...l,page:u})},[i,l,u,p]),ae.createElement(Ll,{...n},ae.createElement(zl,{direction:"row",size:a,alignItems:"center"},ae.createElement(Ur,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-1),disabled:l.page===s,"aria-label":"Previous page"},ae.createElement(Fl,null)),l.page!==s&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(s)},s),c&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-3),"aria-label":"More previous pages"},"..."),f.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),ae.createElement(Se,{active:!0,size:a,"aria-current":"page"},l.page),C.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),x&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral","aria-label":"More next pages",onClick:()=>d(l.page+3)},"..."),l.page!==u&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(u)},u),ae.createElement(Ur,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page+1),disabled:l.page===u,"aria-label":"Next page"},ae.createElement(Ol,null))))}po.displayName="Pagination";var Gr=po;function qr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var Gl=qo("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Uo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e,Wl=e=>P.createElement(So,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),onMouseDown:o=>{let t=o.clientX,r=e.current?.getBoundingClientRect().width,i=n=>{r&&t&&(e.current.style.width=`${r+(n.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),ql=qo("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),jl=qo("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>({...e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"},"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),Kl=qo("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),Zl=Wr(_l),Xl=e=>{let{width:o,maxWidth:t,minWidth:r,stickyHeader:i,resizable:a,field:n,tableId:l,headerName:p,required:d,editMode:s,sort:u,onSortChange:f,sortable:C=!0,sortOrder:x,description:c}=e,m=Wo(null),h=_(()=>`${l}_header_${p??n}`.trim(),[l,p,n]),g=a??!0?Wl(m):null,S={width:o,minWidth:r??"50px",maxWidth:t,position:i?void 0:"relative",cursor:C?"pointer":"default",userSelect:"none"},k=qr(e),y=x[0],D=C&&P.createElement(Zl,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":h,"aria-description":(u??y)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u??y)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}}),b=c?P.createElement(At,{onClick:v=>v.stopPropagation(),title:P.createElement(P.Fragment,null,c?.split(`
2
+ `).map((v,M)=>P.createElement("div",{key:M},v))),placement:"top"},P.createElement(Ul,{fontSize:"small"})):null;return P.createElement(Wr.th,{id:h,"aria-label":p??n,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:m,key:n,style:S,onClick:v=>C&&f?.({field:n,currentSort:u,multiple:v.shiftKey}),whileHover:"hover",initial:"initial"},P.createElement(z,{gap:1,direction:"row",justifyContent:k,alignItems:"center"},k==="end"&&D,k==="end"&&b,P.createElement("div",null,p??n,s&&d&&P.createElement(Kl,null,"*")),k==="start"&&b,k==="start"&&D),g)},Ql=e=>{let{tableId:o,field:t,type:r,renderCell:i,renderEditCell:a,isCellEditable:n,noWrap:l,row:p,rowId:d}=e,[s,u]=St(p[t]),f=Wo(null),C=_(()=>({row:p,value:s,id:d}),[p,d,s]),x=_(()=>!!(e.editMode&&(typeof n=="function"?n(C):n??!0)),[e.editMode,n,C]),c=_(()=>({...typeof e.componentProps=="function"?e.componentProps(C):e.componentProps||{},size:"sm"}),[e,C]),m=_(()=>({...c,onChange:y=>{c.onChange?.(y),u(y.target.value),r==="select"&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})},onFocus:y=>{c.onFocus?.(y),e.onCellEditStart?.({...C,originalRow:p,row:{...C.row,value:s},value:s})},onBlur:y=>{c.onBlur?.(y),r&&["number","text","longText","currency","date"].includes(r)&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:s},value:s})},...r==="autocomplete"&&{onChangeComplete:y=>{c.onChangeComplete?.(y),u(y.target.value),e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})}}}),[C,p,t,s,c,r,e]),h=_(()=>a?a(C):{date:P.createElement(Yr,{value:s,...m}),currency:P.createElement(zr,{value:s,...m}),number:P.createElement(X,{value:s,type:"number",...m}),text:P.createElement(X,{value:s,type:"text",...m}),longText:P.createElement(Jr,{value:s,...m}),autocomplete:P.createElement(gr,{value:s,options:m.options||[s],...m}),select:P.createElement(_r,{value:s,options:m.options||[s],...m})}[r||"text"],[s,m,r]),g=_(()=>{if(i)return i(C);let y=s;return{link:P.createElement(e.component||Jl,{children:y,...c})}[r||"text"]||y},[s,i,C,r,c,e]),S=_(()=>x&&h?h:g,[x,h,g]),k=_(()=>l&&e.type==="longText",[l,e.type]);return Go(()=>{u(p[t])},[p,t]),P.createElement("td",{ref:f,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:qr({type:r}),verticalAlign:x?"top":"middle"}},k?P.createElement(At,{title:s,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},P.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},S)):S)},es=e=>{let{tableId:o,columns:t,rowId:r,editMode:i,noWrap:a,row:n}=e;return P.createElement(P.Fragment,null,t.map((l,p)=>P.createElement(Ql,{...l,tableId:o,key:`${r}_${l.field.toString()}_${p}`,row:n,rowId:r,editMode:i,noWrap:a})))};function os({rows:e,columns:o,rowCount:t,initialState:r,pagination:i,paginationMode:a,paginationModel:n,onPaginationModelChange:l,sortModel:p,sortOrder:d=["asc","desc",null],selectionModel:s=[],onSortModelChange:u,onSelectionModelChange:f,editMode:C,getId:x,isTotalSelected:c}){let[m,h]=St(null),[g,S]=R(p,r?.sorting?.sortModel??[],ye(B=>u?.(B),[u])),k=_(()=>o.reduce((B,w)=>({...B,[w.field]:w}),{}),[o]),y=ye((B,w)=>{for(let J of g){let{field:ie,sort:Re}=J,re=B[ie],pe=w[ie],De=k[ie],ne=0;if(De.sortComparator?ne=De.sortComparator({rowA:B,rowB:w}):typeof re=="string"&&typeof pe=="string"?ne=re.localeCompare(pe):typeof re=="number"&&typeof pe=="number"?ne=re-pe:re instanceof Date&&pe instanceof Date&&(ne=re.getTime()-pe.getTime()),ne!==0)return Re==="asc"?ne:-ne}return 0},[g,k]),D=_(()=>g.length?[...e].sort(y):e,[e,g,y]),b=_(()=>Array.from(new Set(d)),[d]),[v,M]=St(n?.page||1),T=n?.pageSize||20,F=ye((B,w)=>x?.(B)??B.id??`${(w||0)+(v-1)*T}`,[x,v,T]),O=_(()=>new Set(s),[s]),L=_(()=>!i||a==="server"?D:D.slice((v-1)*T,(v-1)*T+T),[D,v,T,a,i]),q=_(()=>L.length>0&&L.every((B,w)=>O.has(F(B,w))),[L,O,F]),Y=t||D.length,N=_(()=>c??(Y>0&&s.length===Y),[c,s,Y]),E=_(()=>(o||Object.keys(D[0]||{}).map(w=>({field:w}))).map(w=>({...w,isCellEditable:C&&(typeof w.isCellEditable=="function"?w.isCellEditable:w.isCellEditable??!0),sort:g.find(J=>J.field===w.field)?.sort,sortOrder:k[w.field]?.sortOrder||b})),[D,o,C,g,k,b]),I=ye(B=>{M(B),l?.({page:B,pageSize:T})},[l,T]),Z=ye(B=>{let{field:w,currentSort:J,multiple:ie}=B,re=k[w].sortOrder||b;if(J!==void 0){let De=(re.indexOf(J)+1)%re.length,ne=re[De];if(!ne){let Ee=ie?g.filter(xo=>xo.field!==w):[];S(Ee);return}let ct=ie?g.map(Ee=>Ee.field===w?{field:w,sort:ne}:Ee):[{field:w,sort:ne}];S(ct)}else{let pe=ie?[...g,{field:w,sort:re[0]}]:[{field:w,sort:re[0]}];S(pe)}},[b,k,g,S]);return Go(()=>{n||I(1)},[Y,I,n]),Go(()=>{let B=Math.max(1,Math.ceil(Y/T));v>B&&I(B)},[v,Y,T,I]),Go(()=>{f?.([])},[v]),{rowCount:Y,page:v,pageSize:T,onPaginationModelChange:I,getId:F,HeadCell:Xl,BodyRow:es,dataInPage:L,handleSortChange:Z,isAllSelected:q,isTotalSelected:N,isSelectedRow:ye(B=>O.has(B),[O]),focusedRowId:m,onRowFocus:ye(B=>{h(B)},[]),onAllCheckboxChange:ye(()=>{f?.(q?[]:L.map(F))},[q,L,f,F]),onCheckboxChange:ye((B,w)=>{if(O.has(w)){let J=s.filter(ie=>ie!==w);f?.(J)}else{let J=[...s,w];f?.(J)}},[s,f,O]),columns:E,onTotalSelect:ye(()=>{f?.(N?[]:D.map(F),!N)},[N,D,f,F])}}function ts(e,o){let{rows:t,checkboxSelection:r,editMode:i,selectionModel:a,onSelectionModelChange:n,disableSelectionOnClick:l,onRowClick:p,rowCount:d,columns:s,onPaginationModelChange:u,pagination:f,paginationMode:C,paginationModel:x,sortModel:c,sortOrder:m,onSortModelChange:h,initialState:g,loading:S,slots:{checkbox:k=Qe,toolbar:y,footer:D,loadingOverlay:b=()=>P.createElement(Yl,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:M,background:T={}}={},stripe:F,...O}=e,L=Rl(),q=Wo(null),Y=Wo(null),{columns:N,isAllSelected:E,isSelectedRow:I,onAllCheckboxChange:Z,onCheckboxChange:B,getId:w,rowCount:J,page:ie,pageSize:Re,onPaginationModelChange:re,handleSortChange:pe,dataInPage:De,isTotalSelected:ne,focusedRowId:ct,onRowFocus:Ee,onTotalSelect:xo,HeadCell:In,BodyRow:An}=os(e),Do=$l({count:De.length,getScrollElement:()=>q.current,estimateSize:()=>32,measureElement:j=>j.clientHeight,overscan:20}),Sn=_(()=>({page:ie,pageSize:Re}),[ie,Re]),Bn=Do.getTotalSize(),Nn=Do.getVirtualItems();return Hl(o,()=>({getRowIndexRelativeToVisibleRows(j){return De.findIndex(Pe=>String(w(Pe))===j)},setCellFocus(j){let Pe=this.getRowIndexRelativeToVisibleRows(j),we=e.stickyHeader&&Do.getOffsetForIndex(Pe)?.[1]==="start"?0:1;Do.scrollToIndex(Pe+we),requestAnimationFrame(()=>{Y.current?.querySelector(`[data-row-id='${j}']`)?.focus()})}})),P.createElement(So,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!r||!!y)&&P.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&P.createElement(z,{direction:"row",spacing:1},!E&&P.createElement(G,{level:"body-xs"},Uo(a?.length||0)," items selected"),E&&!ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Uo(a?.length||0)," items on this page are selected."),P.createElement(W,{size:"sm",variant:"plain",onClick:xo},"Select all ",Uo(J??t.length)," items")),ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Uo(J??t.length)," items are selected."),P.createElement(W,{size:"sm",variant:"plain",color:"danger",onClick:xo},"Cancel"))),y&&P.createElement(y,{...M||{}})),P.createElement(se,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:q,...T},P.createElement(to,{...O},P.createElement("thead",null,P.createElement("tr",null,r&&P.createElement("th",{style:{width:"40px",textAlign:"center"}},P.createElement(k,{onChange:Z,checked:E,indeterminate:(a||[]).length>0&&!E,...v})),N.map((j,Pe)=>P.createElement(In,{tableId:L,key:`${j.field.toString()}_${Pe}`,stickyHeader:e.stickyHeader,editMode:!!j.isCellEditable,onSortChange:pe,...j})))),P.createElement(ql,{ref:Y,style:{height:`${Bn}px`}},!!S&&P.createElement(Gl,null,P.createElement("td",null,P.createElement(So,{sx:{position:"absolute",top:0,left:0,right:0}},P.createElement(b,null)))),Nn.map((j,Pe)=>{let we=j.index,ut=De[we],Ce=w(ut,we),En=F&&(F==="even"&&(we+1)%2===0||F==="odd"&&(we+1)%2===1);return P.createElement(jl,{key:j.key,"data-row-id":Ce,"data-index":we,role:r&&!l?"checkbox":void 0,tabIndex:ct===Ce?0:-1,onClick:Fe=>{p?.({row:ut,rowId:Ce},Fe),r&&!l&&B(Fe,Ce)},onFocus:()=>Ee(Ce),"aria-checked":r&&!l?I(Ce):void 0,striped:En,style:{height:`${j.size}px`,transform:`translateY(${j.start-Pe*j.size}px)`}},r&&P.createElement("th",{scope:"row",style:{textAlign:"center"}},P.createElement(k,{onClick:Fe=>Fe.stopPropagation(),onChange:Fe=>B(Fe,Ce),checked:I(Ce),...v})),P.createElement(An,{tableId:L,columns:N,row:ut,rowId:Ce,editMode:i,noWrap:e.noWrap}))})),D&&P.createElement(D,null))),f&&P.createElement(Gr,{py:2,size:"sm",alignItems:"flex-end",paginationModel:Sn,rowCount:J,onPageChange:re}))}var Bt=Vl(ts);Bt.displayName="DataTable";import ee,{forwardRef as rs,useCallback as mo,useEffect as ns,useImperativeHandle as as,useMemo as is,useRef as jr,useState as ls}from"react";import{IMaskInput as ss,IMask as Nt}from"react-imask";import ps from"@mui/icons-material/CalendarToday";import{styled as jo,useThemeProps as ds}from"@mui/joy";import{FocusTrap as ms,ClickAwayListener as cs,Popper as us}from"@mui/base";var gs=jo($,{name:"DateRangePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),fs=jo(us,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),hs=jo(se,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),ys=jo("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Zr=([e,o],t)=>{let r=i=>{let a=`${i.getDate()}`,n=`${i.getMonth()+1}`,l=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(n)<10&&(n="0"+n),t.replace(/YYYY/g,l.toString()).replace(/MM/g,n).replace(/DD/g,a)};return[r(e),o?r(o):""].join(" - ")};function Kr(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/),i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var Xr=(e,o)=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[Kr(t,o),Kr(r,o)]},Cs=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),bs=ee.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return ee.createElement(ss,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Cs(i),blocks:{D:{mask:Nt.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Nt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Nt.MaskedRange,from:1900,to:9999}},format:n=>Zr(n,i),parse:n=>Xr(n,i),autofix:"pad",overwrite:!0})}),Et=rs((e,o)=>{let t=ds({props:e,name:"DateRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM/DD",size:m,inputReadOnly:h,hideClearButton:g,readOnly:S,...k}=t,y=jr(null),D=jr(null),[b,v]=R(t.value,t.defaultValue||"",mo(E=>r?.({target:{name:t.name,value:E}}),[t.name,r]),{disableStrict:!0}),[M,T]=ls(null),F=!!M,O=is(()=>b?Xr(b,c):void 0,[b,c]);ns(()=>{M||y.current?.blur()},[M,y]),as(o,()=>y.current,[y]);let L=mo(E=>{v(E.target.value)},[v]),q=mo(E=>{T(M?null:E.currentTarget),y.current?.focus()},[M,T,y]),Y=mo(([E,I])=>{!E||!I||(v(Zr([E,I],c)),T(null))},[v,T,c]),N=mo(E=>{h&&(E.preventDefault(),D.current?.focus())},[h,D]);return ee.createElement(ys,null,ee.createElement(ms,{open:!0},ee.createElement(ee.Fragment,null,ee.createElement(X,{...k,color:n?"danger":k.color,ref:o,size:m,value:b,onChange:L,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:bs,ref:y,format:c,sx:{"&:hover":{cursor:h||S?"default":"text"}},onMouseDown:N}},error:n,className:x,sx:C,endDecorator:ee.createElement(gs,{ref:D,variant:"plain",onClick:S?void 0:q,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":F,disabled:i},ee.createElement(ps,null)),label:a,helperText:l,readOnly:S||h}),F&&ee.createElement(cs,{onClickAway:()=>T(null)},ee.createElement(fs,{id:"date-range-picker-popper",open:!0,anchorEl:M,placement:"bottom-end",onMouseDown:E=>E.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":F},ee.createElement(hs,{tabIndex:-1,role:"presentation"},ee.createElement(Me,{rangeSelection:!0,defaultValue:O,onChange:Y,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!g&&ee.createElement(he,{sx:{p:1}},ee.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{v(""),T(null)}},"Clear"))))))))});Et.displayName="DateRangePicker";import{DialogContent as vs,styled as xs}from"@mui/joy";import{motion as Ds}from"framer-motion";var Ps=Ds(vs),Ms=xs(Ps)(({theme:e})=>({padding:e.spacing(0,6,5)})),co=Ms;co.displayName="DialogContent";var Ko=co;import{DialogTitle as Ts,styled as ks}from"@mui/joy";import{motion as ws}from"framer-motion";var Is=ws(Ts),As=ks(Is)(({theme:e})=>({padding:e.spacing(4,6)})),uo=As;uo.displayName="DialogTitle";var Zo=uo;import fo from"react";import Xo from"react";import{Modal as Ss,ModalDialog as Bs,ModalClose as Ns,ModalOverflow as Es,styled as Qr}from"@mui/joy";import{motion as Ft}from"framer-motion";var Fs=Ft(Ss),Ot=Fs;Ot.displayName="Modal";var en=Qr(Bs)({padding:0}),go=en;go.displayName="ModalDialog";var Os=Qr(Ft(Ns))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Qo=Os;Qo.displayName="ModalClose";var Ls=Ft(Es),Lt=Ls;Lt.displayName="ModalOverflow";function zt(e){let{title:o,children:t,titleStartDecorator:r,...i}=e;return Xo.createElement(en,{...i},Xo.createElement(Qo,null),Xo.createElement(Zo,null,r,o),Xo.createElement(Ko,null,t))}zt.displayName="ModalFrame";import{styled as zs}from"@mui/joy";var Rs=zs(go,{name:"Dialog",slot:"Root"})({padding:0}),Rt=fo.forwardRef((e,o)=>{let{title:t,children:r,actions:i,fullscreen:a,...n}=e;return fo.createElement(Rs,{layout:a?"fullscreen":"center",ref:o,...n},fo.createElement(Zo,null,t),fo.createElement(Ko,null,r),fo.createElement(he,null,i))});Rt.displayName="DialogFrame";import Vs from"react";import{Divider as Hs}from"@mui/joy";import{motion as $s}from"framer-motion";var Ys=$s(Hs),ho=e=>Vs.createElement(Ys,{...e});ho.displayName="Divider";import Js from"react";import{Drawer as _s}from"@mui/joy";import{motion as Us}from"framer-motion";var Gs=Us(_s),Vt=e=>{let{children:o,...t}=e;return Js.createElement(Gs,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Vt.displayName="InsetDrawer";import H,{useCallback as et,useEffect as on,useMemo as yo,useRef as tn,useState as ot}from"react";import{styled as ke}from"@mui/joy";import Ws from"@mui/icons-material/CloudUploadRounded";import qs from"@mui/icons-material/UploadFileRounded";import js from"@mui/icons-material/ClearRounded";import{combine as Ks}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Zs,monitorForExternal as Xs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as rn,getFiles as Qs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as nn}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ep}from"@mui/joy";var op=ke(ep)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),tp=ke(z,{name:"Uploader",slot:"PreviewRoot"})({}),rp=ke(Ze,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),np=ke(qs,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),ap=ke(js,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),ip=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],lp={"image/*":[".jpeg",".jpg",".png",".gif",".bmp",".tiff",".svg",".webp",".heic",".ico"],"audio/*":[".mp3",".wav",".flac",".aac",".ogg",".m4a",".wma",".aiff",".alac",".midi",".mp4"],"video/*":[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpeg",".3gp",".m4v"]},Ht=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),r=ip[o];return Intl.NumberFormat("en-us",{style:"unit",unit:r,unitDisplay:"narrow"}).format(t)},sp=e=>{let{files:o,uploaded:t,onDelete:r}=e;return H.createElement(tp,{gap:1},[...t,...o].map(i=>H.createElement(rp,{key:i.name,size:"sm",color:"neutral"},H.createElement(z,{direction:"row",alignItems:"center",gap:2},H.createElement(np,null),H.createElement(z,{flex:"1"},H.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&H.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Ht(i.size))),H.createElement($,{onClick:()=>r?.(i)},H.createElement(ap,null))))))},pp=ke(z,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),dp=ke(se,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),mp=ke(Ws,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),an=H.memo(e=>{let{accept:o,minCount:t,maxCount:r,name:i,size:a,maxFileSize:n,maxFileTotalSize:l,onChange:p,label:d,disabled:s,onDelete:u}=e,f=tn(null),C=tn(null),[x,c]=ot(),[m,h]=ot([]),[g,S]=ot(e.uploaded||[]),[k,y]=ot("idle"),D=yo(()=>o.split(",").map(N=>N.trim()),[o]),b=yo(()=>D.flatMap(N=>["image/*","video/*","audio/*"].includes(N)?lp[N]:N),[D]),v=yo(()=>{let[N,E]=[D.filter(Z=>["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B]=Z.split("/");return B.toLowerCase()}),D.filter(Z=>!["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B,w]=Z.split("/");return w?w.toUpperCase():B.toUpperCase().replace(".","")})],I=[];return N.length>0&&I.push(`Any ${N.join(", ")} file`),E.length>0&&I.push(E.join(", ")),I.push(`Maximum ${Ht(l)}`),r&&I.push(`Up to ${r} ${r===1?"file":"files"}`),I.join(", ")},[D,l,r]),M=yo(()=>!!x||e.error,[e.error,x]),T=yo(()=>!r||r&&[...g,...m].length!==r,[m,r,g]),F=et(N=>{try{let E=b.map(w=>w.replace(".",""))||[],I=new RegExp(`${E.join("|")}`);if(N.forEach(w=>{let J=w.name.split(".").pop()||"";if(!I.test(J))throw new Error("Please upload acceptable file type.")}),n&&N.forEach(w=>{if(w.size>n)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Ht(n)} or less.`)}),[...m,...N].reduce((w,J)=>w+J.size,0)>l)throw new Error("Total File size exceeded the maximum limit.");let B=[...m,...N];if(r&&[...g,...B].length>r)throw new Error("Exceeded the maximum number of files.");p?.({target:{name:i,value:B}}),h(B),c(void 0)}catch(E){c(E.message)}},[m,g,r,b,n,l,i,p]);on(()=>{let N=f.current;if(!(!N||s))return Ks(Zs({element:N,canDrop:rn,onDragEnter:()=>y("over"),onDragLeave:()=>y("potential"),onDrop:async({source:E})=>{let I=await Qs({source:E});F(I)}}),Xs({canMonitor:rn,onDragStart:()=>{y("potential"),nn.start()},onDrop:()=>{y("idle"),nn.stop()}}))}),on(()=>{C.current&&t&&(m.length<t?C.current.setCustomValidity(`At least ${t} files are required.`):C.current.setCustomValidity(""))},[C,m,t]);let O=et(N=>{let E=Array.from(N.target.files||[]);F(E)},[F]),L=et(N=>{N instanceof File?h(E=>(p?.({target:{name:i,value:E.filter(I=>I!==N)}}),E.filter(I=>I!==N))):(S(E=>E.filter(I=>I.id!==N.id)),u?.(N)),c(void 0)},[i,p,u]),q=et(()=>{C.current?.click()},[]),Y=H.createElement(dp,{state:k,error:!!(M||x),ref:f,onClick:q},H.createElement(z,{alignItems:"center",gap:1},H.createElement(mp,{state:k,error:!!(M||x)})),H.createElement(op,{disabled:s,required:!!t,onInvalid:N=>{t&&m.length<t&&c(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:b.join(","),type:"file",ref:C,role:"button",onChange:O}}}));return H.createElement(pp,null,T&&H.createElement(ue,{size:a,error:!!(M||x),disabled:s,required:!!t},d&&H.createElement(ge,null,d),Y,H.createElement(fe,null,H.createElement(z,null,x&&H.createElement("div",null,x),H.createElement("div",null,v)))),[...g,...m].length>0&&H.createElement(sp,{files:m,uploaded:g,onDelete:L}))});import{Grid as ln}from"@mui/joy";import ce from"react";import up from"react-markdown";import{Link as gp}from"@mui/joy";import{visit as cp}from"unist-util-visit";function sn(e){let{accentColor:o}=e;return t=>{cp(t,"text",(r,i,a)=>{let n=r.value,l=/\|\|.*?\|\|/g,p,d=0,s=[];for(;(p=l.exec(n))!==null;){p.index>d&&s.push({type:"text",value:n.slice(d,p.index)});let u=p[0].split("||")[1];s.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:u}]}),d=p.index+p[0].length}d<n.length&&s.push({type:"text",value:n.slice(d)}),s.length&&a.children.splice(i,1,...s)})}}var $t=e=>{let{color:o,textColor:t,defaultLevel:r="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:n,boldFontWeight:l,content:p,...d}=e;return ce.createElement(U,{component:"div",color:o,textColor:t,level:r,...d},ce.createElement(up,{...n,children:p,rehypePlugins:[[sn,{accentColor:i}]],components:{h1:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:u})=>ce.createElement(U,{color:o,textColor:t,level:r,...u?.properties},s),a:({children:s,href:u})=>ce.createElement(gp,{href:u,target:a},s),hr:()=>ce.createElement(ho,null),b:({children:s})=>ce.createElement(U,{fontWeight:l},s),strong:({children:s})=>ce.createElement(U,{fontWeight:l},s),...n?.components}}))};$t.displayName="Markdown";import Be from"react";import{MenuButton as fp,Button as hp}from"@mui/joy";import pn from"@mui/icons-material/ExpandMore";function Yt(e){let{size:o,buttonText:t,items:r=[],showIcon:i}=e;return r.length?Be.createElement(Bo,null,Be.createElement(fp,{component:e.buttonComponent??"button",size:o,variant:"plain",endDecorator:i?Be.createElement(pn,null):void 0,...e.buttonComponentProps??{}},t),Be.createElement(be,{size:o},r.map(a=>Be.createElement(ve,{key:a.text,component:a.component,...a.componentProps??{}},a.text)))):Be.createElement(hp,{component:e.buttonComponent??"button",size:o,variant:"plain",color:"neutral",endDecorator:i?Be.createElement(pn,null):void 0,...e.buttonComponentProps??{}},t)}Yt.displayName="MenuButton";import oe,{forwardRef as yp,useCallback as Jt,useEffect as Cp,useImperativeHandle as bp,useRef as vp,useState as xp}from"react";import{IMaskInput as Dp,IMask as dn}from"react-imask";import Pp from"@mui/icons-material/CalendarToday";import{styled as _t,useThemeProps as Mp}from"@mui/joy";import{FocusTrap as Tp,ClickAwayListener as kp,Popper as wp}from"@mui/base";var Ip=_t(wp,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ap=_t(se,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Sp=_t("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),mn=(e,o)=>{let t=`${e.getMonth()+1}`,r=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,r.toString()).replace(/MM/g,t)},Bp=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function Np(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var Ep=oe.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return oe.createElement(Dp,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Bp(i),blocks:{M:{mask:dn.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:dn.MaskedRange,from:1900,to:9999}},format:n=>mn(n,i),parse:Np,autofix:"pad",overwrite:!0})}),cn=yp((e,o)=>{let t=Mp({props:e,name:"MonthPicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM",size:m,...h}=t,g=vp(null),[S,k]=R(t.value,t.defaultValue||"",Jt(T=>r?.({target:{name:t.name,value:T}}),[t.name,r]),{disableStrict:!0}),[y,D]=xp(null),b=!!y;Cp(()=>{y||g.current?.blur()},[y,g]),bp(o,()=>g.current,[g]);let v=Jt(T=>{k(T.target.value)},[k]),M=Jt(T=>{D(y?null:T.currentTarget),g.current?.focus()},[y,D,g]);return oe.createElement(Sp,null,oe.createElement(Tp,{open:!0},oe.createElement(oe.Fragment,null,oe.createElement(X,{...h,color:n?"danger":h.color,ref:g,size:m,value:S,onChange:v,placeholder:c,disabled:i,required:f,slotProps:{input:{component:Ep,ref:g,format:c}},error:n,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:oe.createElement($,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":b},oe.createElement(Pp,null)),label:a,helperText:l}),b&&oe.createElement(kp,{onClickAway:()=>D(null)},oe.createElement(Ip,{id:"month-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},oe.createElement(Ap,{tabIndex:-1,role:"presentation"},oe.createElement(Me,{view:"month",views:["month"],value:Number.isNaN(new Date(S).getTime())?void 0:[new Date(S),void 0],onChange:([T])=>{v({target:{name:t.name,value:mn(T,c)}}),D(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),oe.createElement(he,{sx:{p:1}},oe.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{v({target:{name:t.name,value:""}}),D(null)}},"Clear"))))))))});import te,{forwardRef as Fp,useCallback as tt,useEffect as Op,useImperativeHandle as Lp,useMemo as zp,useRef as Rp,useState as Vp}from"react";import{IMaskInput as Hp,IMask as un}from"react-imask";import $p from"@mui/icons-material/CalendarToday";import{styled as Ut,useThemeProps as Yp}from"@mui/joy";import{FocusTrap as Jp,ClickAwayListener as _p,Popper as Up}from"@mui/base";var Gp=Ut(Up,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Wp=Ut(se,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qp=Ut("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),fn=([e,o],t)=>{let r=i=>{let a=`${i.getMonth()+1}`,n=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,n.toString()).replace(/MM/g,a)};return[r(e),o?r(o):""].join(" - ")};function gn(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var hn=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[gn(o),gn(t)]},jp=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),Kp=te.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return te.createElement(Hp,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:jp(i),blocks:{m:{mask:un.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:un.MaskedRange,from:1900,to:9999}},format:n=>fn(n,i),parse:hn,autofix:"pad",overwrite:!0})}),Gt=Fp((e,o)=>{let t=Yp({props:e,name:"MonthRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM",size:m,...h}=t,g=Rp(null),[S,k]=R(t.value,t.defaultValue||"",tt(O=>r?.({target:{name:t.name,value:O}}),[t.name,r]),{disableStrict:!0}),[y,D]=Vp(null),b=!!y,v=zp(()=>S?hn(S):void 0,[S]);Op(()=>{y||g.current?.blur()},[y,g]),Lp(o,()=>g.current,[g]);let M=tt(O=>{k(O.target.value)},[k]),T=tt(O=>{D(y?null:O.currentTarget),g.current?.focus()},[y,D,g]),F=tt(([O,L])=>{!O||!L||(k(fn([O,L],c)),D(null))},[k,D,c]);return te.createElement(qp,null,te.createElement(Jp,{open:!0},te.createElement(te.Fragment,null,te.createElement(X,{...h,color:n?"danger":h.color,ref:o,size:m,value:S,onChange:M,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:Kp,ref:g,format:c}},error:n,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:te.createElement($,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":b},te.createElement($p,null)),label:a,helperText:l}),b&&te.createElement(_p,{onClickAway:()=>D(null)},te.createElement(Gp,{id:"month-range-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:O=>O.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},te.createElement(Wp,{tabIndex:-1,role:"presentation"},te.createElement(Me,{view:"month",views:["month"],rangeSelection:!0,defaultValue:v,onChange:F,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),te.createElement(he,{sx:{p:1}},te.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{k(""),D(null)}},"Clear"))))))))});Gt.displayName="MonthRangePicker";import rt from"react";import{Accordion as Zp,AccordionSummary as Xp,AccordionDetails as Qp,styled as Cn,accordionSummaryClasses as yn,Stack as ed}from"@mui/joy";var od=Cn(Xp,{name:"NavigationGroup",slot:"Summary",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({[`& .${yn.button}`]:{padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),[`&.${yn.expanded}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor}}})),td=Cn(Qp,{name:"NavigationGroup",slot:"Details"})(({theme:e})=>({"--AccordionDetails-transition":"grid-template-rows 0.2s ease, padding-block 0.2s ease",backgroundColor:e.palette.background.level1}));function nt(e){let{title:o,children:t,startDecorator:r,level:i,...a}=e;return rt.createElement(Zp,{...a},rt.createElement(od,{useIcon:!!r,level:i},rt.createElement(ed,{direction:"row",gap:4},r,o)),rt.createElement(td,null,t))}import Wt from"react";import{ListItem as rd,ListItemButton as nd,ListItemDecorator as ad,styled as id,listItemButtonClasses as ld}from"@mui/joy";var sd=id(nd,{name:"NavigationItem",slot:"Button",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),gap:e.spacing(4),fontWeight:500,"&:hover":{backgroundColor:e.palette.neutral.plainHoverBg},"&:active":{backgroundColor:e.palette.neutral.plainActiveBg},[`&.${ld.selected}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor,"&:not(:hover):not(:active)":{backgroundColor:e.palette.background.surface}}}));function at(e){let{children:o,startDecorator:t,level:r,selected:i,id:a,onClick:n,...l}=e,p=()=>{n?.(a)};return Wt.createElement(rd,{...l},Wt.createElement(sd,{level:r,useIcon:!!t,selected:i,"aria-current":i,onClick:p},t&&Wt.createElement(ad,null,t),o))}import qt from"react";function jt(e){let{items:o,level:t=0,onSelect:r}=e,i=a=>{r?.(a)};return qt.createElement("div",null,o.map((a,n)=>a.type==="item"?qt.createElement(at,{key:a.id,id:a.id,startDecorator:a.startDecorator,selected:a.selected,level:t,onClick:i},a.title):a.type==="group"?qt.createElement(nt,{key:n,title:a.title,startDecorator:a.startDecorator,level:t,defaultExpanded:a.expanded},a.content):null))}jt.displayName="Navigator";import it,{useCallback as bn,useMemo as pd,useState as dd}from"react";import{NumericFormat as md}from"react-number-format";import{styled as cd,useThemeProps as ud}from"@mui/joy";var gd=(e,o)=>{let[t,r=""]=`${e}`.split(".");return+`${t}${r.padEnd(o,"0")}`},fd=it.forwardRef(function(o,t){let{onChange:r,min:i,max:a,...n}=o;return it.createElement(md,{...n,onValueChange:({value:l})=>{r?.({target:{name:o.name,value:l}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),hd=cd(X,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Kt=it.forwardRef(function(o,t){let r=ud({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:n,error:l,helperText:p,required:d,disabled:s,useMinorUnit:u,maxDecimalScale:f=0,min:C,max:x,sx:c,className:m,...h}=r,[g,S]=R(r.value,r.defaultValue,bn(v=>a?.({target:{name:i,value:v}}),[a,i])),[k,y]=dd(x&&g&&g>x||C&&g&&g<C),D=pd(()=>g&&u?g/Math.pow(10,f):g,[g,u,f]),b=bn(v=>{if(v.target.value===""){S(void 0);return}let M=Number(v.target.value);C&&M<C||x&&M>x?y(!0):y(!1);let T=u?gd(M,f):M;S(T)},[S,u,f,C,x]);return it.createElement(hd,{...h,ref:t,value:D,onChange:b,error:k||l,disabled:s,required:d,color:k||l?"danger":r.color,label:n,helperText:p,slotProps:{input:{component:fd,"aria-label":h["aria-label"],decimalScale:f}},sx:{...c},className:m})});Kt.displayName="PercentageInput";import K,{useCallback as yd,useMemo as vn}from"react";import{Dropdown as Cd,ListDivider as bd,menuItemClasses as vd,styled as Zt,MenuButton as xd}from"@mui/joy";import{ClickAwayListener as Dd}from"@mui/base";import Pd from"@mui/icons-material/ArrowDropDown";var Md=Zt(Ie,{name:"ProfileMenu",slot:"item"})({});function xn(e){let{children:o,chip:t,caption:r,size:i}=e,a=vn(()=>i==="sm"?"body-xs":"body-sm",[i]),n=vn(()=>i==="sm"?"body-sm":"body-md",[i]);return K.createElement(Md,{px:4,py:2},K.createElement(Ie,{direction:"row",gap:2},K.createElement(U,{level:n,fontWeight:"bold",textColor:"text.primary"},o),t&&K.createElement(Ae,{size:i,color:"neutral",variant:"outlined"},t)),r&&K.createElement(U,{level:a,textColor:"text.tertiary"},r))}xn.displayName="ProfileCard";var Td=Zt(xd,{name:"ProfileMenu",slot:"button"})(({theme:e})=>({padding:e.spacing(1),"--Button-gap":e.spacing(1)}));function Dn(e){let{size:o="md",src:t,alt:r,children:i,getInitial:a,...n}=e;return K.createElement(Td,{variant:"plain",color:"neutral",size:o,endDecorator:K.createElement(Pd,null),...n},K.createElement(Ao,{variant:"soft",color:"primary",size:o,src:t,alt:r,getInitial:a},i))}Dn.displayName="ProfileMenuButton";var kd=Zt(be,{name:"ProfileMenu",slot:"root"})(({theme:e})=>({border:"none","--ListItem-paddingX":e.spacing(4),[`.${vd.root}`]:{border:"none"}}));function lt(e){let{open:o,defaultOpen:t,onOpenChange:r,profile:i,getInitial:a,menuItems:n,size:l,...p}=e,[d,s]=R(o,t??!1,yd(u=>r?.(u),[r]));return K.createElement(Dd,{onClickAway:()=>s(!1)},K.createElement("div",null,K.createElement(Cd,{open:d},K.createElement(Dn,{size:l,src:i.image?.src,alt:i.image?.alt,onClick:()=>s(!d),getInitial:a},i.name),K.createElement(kd,{size:l,placement:"bottom-end",...p,onClose:()=>s(!1)},K.createElement(xn,{size:l,caption:i.caption,chip:i.chip},i.name),!!n.length&&K.createElement(bd,null),n.map(({label:u,...f})=>K.createElement(ve,{...f,onClick:C=>{f.onClick?.(C),s(!1)}},u))))))}lt.displayName="ProfileMenu";import{Radio as wd,RadioGroup as Id}from"@mui/joy";import{motion as Pn}from"framer-motion";var Ad=Pn(wd),Co=Ad;Co.displayName="Radio";var Sd=Pn(Id),bo=Sd;bo.displayName="RadioGroup";import Mn from"react";function Xt(e){let{items:o,...t}=e;return Mn.createElement(bo,{...t},o.map(r=>Mn.createElement(Co,{key:`${r.value}`,value:r.value,label:r.label})))}Xt.displayName="RadioList";import Ne from"react";import{Stepper as Bd,Step as Nd,StepIndicator as Ed,stepClasses as Qt,stepIndicatorClasses as vo,styled as er}from"@mui/joy";import Fd from"@mui/icons-material/Check";import{motion as Od}from"framer-motion";var st=er(Nd)({});st.displayName="Step";var pt=er(Ed)({});pt.displayName="StepIndicator";var Ld=er(Bd)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),zd=Od(Ld);function or(e){let{steps:o,activeColor:t="primary.500",inactiveColor:r="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:n}=e;return Ne.createElement(zd,{sx:l=>({"--StepIndicator-size":"24px","--Step-gap":l.spacing(2),[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Qt.completed}`]:{"&::after":{bgcolor:i},[`& .${vo.root}`]:{bgcolor:t}},[`& .${Qt.active}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:t}},[`& .${Qt.disabled}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:r}}})},o.map((l,p)=>{let d=n===p+1,s=n>p+1,u=n<p+1,f=l.label||l.extraContent;return Ne.createElement(st,{indicator:Ne.createElement(pt,{variant:"solid",color:"primary"},s?Ne.createElement(Fd,null):l.indicatorContent),active:d,completed:s,disabled:u},f&&Ne.createElement(z,null,l.label&&Ne.createElement(G,{level:"title-sm"},l.label),l.extraContent&&Ne.createElement(G,{level:"body-xs"},l.extraContent)))}))}or.displayName="Stepper";import Tn from"react";import{Switch as Rd,styled as Vd,switchClasses as Hd}from"@mui/joy";import{motion as kn}from"framer-motion";var $d=kn(Rd),Yd=Vd(kn.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Hd.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Jd=e=>Tn.createElement(Yd,{...e,layout:!0,transition:_d}),_d={type:"spring",stiffness:700,damping:30},tr=e=>Tn.createElement($d,{...e,slots:{thumb:Jd,...e.slots}});tr.displayName="Switch";import{Tabs as Ud,Tab as Gd,TabList as Wd,TabPanel as qd,styled as jd,tabClasses as Kd}from"@mui/joy";import{motion as dt}from"framer-motion";var Zd=dt(Ud),rr=Zd;rr.displayName="Tabs";var Xd=jd(dt(Gd))(({theme:e})=>({[`&:not(.${Kd.selected})`]:{color:e.palette.neutral[700]}})),nr=Xd;nr.displayName="Tab";var Qd=dt(Wd),ar=Qd;ar.displayName="TabList";var em=dt(qd),ir=em;ir.displayName="TabPanel";import mt from"react";import{CssBaseline as lr,CssVarsProvider as om,checkboxClasses as tm,extendTheme as sr,inputClasses as ze}from"@mui/joy";var wn={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},pr=sr({cssVarPrefix:"ceed",spacing:4,breakpoints:{values:{xs:0,sm:600,md:900,lg:1280,xl:1920}},zIndex:{popup:1500},colorSchemes:{light:wn,dark:wn},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},JoySelect:{defaultProps:{size:"sm"}},JoyInput:{defaultProps:{size:"sm"}},JoyCheckbox:{defaultProps:{size:"sm"}},JoyRadio:{defaultProps:{size:"sm"}},JoySwitch:{defaultProps:{size:"sm"}},JoyAutocomplete:{defaultProps:{size:"sm"}},JoyTextarea:{defaultProps:{size:"sm"}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.primary.plainActiveBg,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:focus":{outline:`${e.palette.primary[500]} solid 2px`,outlineOffset:"-2px"},[`& .${tm.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"},styleOverrides:{root:({ownerState:e,theme:o})=>({"--joy-spacing":o.spacing(1),...e.size==="sm"&&{padding:"calc(0.5 * var(--joy-spacing)) calc(1.25 * var(--joy-spacing))"},...e.size==="md"&&{padding:"calc(1 * var(--joy-spacing)) calc(1.5 * var(--joy-spacing))"},...e.size==="lg"&&{padding:"calc(1.5 * var(--joy-spacing)) calc(2 * var(--joy-spacing))"}})}},JoyAvatar:{styleOverrides:{root:({ownerState:e})=>({...e.size==="xs"&&{width:"24px",height:"24px",fontSize:"12px"}})}},JoyDialogTitle:{styleOverrides:{root:{fontWeight:"var(--ceed-fontWeight-xl, 700)"}}}}});function dr(e){let o=e.theme||pr;return mt.createElement(mt.Fragment,null,mt.createElement(om,{theme:o},mt.createElement(lr,null),e.children))}dr.displayName="ThemeProvider";export{ko as Accordion,To as AccordionDetails,Mo as AccordionSummary,gt as Accordions,ft as Alert,Kx as AspectRatio,Ue as Autocomplete,Jx as AutocompleteListbox,_x as AutocompleteOption,Ao as Avatar,fr as AvatarGroup,Xx as Badge,Ge as Box,yt as Breadcrumbs,qe as Button,rx as ButtonGroup,je as Calendar,Ze as Card,Pt as CardActions,xt as CardContent,Dt as CardCover,Mt as CardOverflow,Xe as Checkbox,Ae as Chip,lD as CircularProgress,Tt as Container,lr as CssBaseline,zo as CurrencyInput,Bt as DataTable,$o as DatePicker,Et as DateRangePicker,ro as DialogActions,co as DialogContent,Rt as DialogFrame,uo as DialogTitle,ho as Divider,pD as Drawer,We as Dropdown,He as FormControl,Ye as FormHelperText,$e as FormLabel,ln as Grid,Je as IconButton,eo as Input,Vt as InsetDrawer,mD as LinearProgress,wD as Link,uD as List,fD as ListDivider,yD as ListItem,bD as ListItemButton,xD as ListItemContent,PD as ListItemDecorator,TD as ListSubheader,$t as Markdown,be as Menu,Yt as MenuButton,ve as MenuItem,Ot as Modal,Qo as ModalClose,go as ModalDialog,zt as ModalFrame,Lt as ModalOverflow,cn as MonthPicker,Gt as MonthRangePicker,nt as NavigationGroup,at as NavigationItem,jt as Navigator,Jo as Option,po as Pagination,Kt as PercentageInput,lt as ProfileMenu,Co as Radio,bo as RadioGroup,Xt as RadioList,lo as Select,oo as Sheet,OD as Skeleton,AD as Slider,Ie as Stack,st as Step,ND as StepButton,pt as StepIndicator,or as Stepper,tr as Switch,nr as Tab,ar as TabList,ir as TabPanel,to as Table,wt as TableBody,kt as TableHead,rr as Tabs,ao as Textarea,dr as ThemeProvider,so as Tooltip,U as Typography,an as Uploader,Vx as accordionClasses,Hx as accordionDetailsClasses,Yx as accordionSummaryClasses,$x as accordionsClasses,nx as alertClasses,Zx as aspectRatioClasses,Ux as autocompleteClasses,Gx as autocompleteListboxClasses,Wx as autocompleteOptionClasses,qx as avatarClasses,jx as avatarGroupClasses,Qx as badgeClasses,ax as boxClasses,eD as breadcrumbsClasses,ix as buttonClasses,tD as cardActionsClasses,oD as cardClasses,rD as cardContentClasses,nD as cardCoverClasses,aD as cardOverflowClasses,lx as checkboxClasses,iD as chipClasses,sD as circularProgressClasses,Fx as dialogActionsClasses,Ex as dialogContentClasses,Nx as dialogTitleClasses,sx as dividerClasses,dD as drawerClasses,sr as extendTheme,Dx as formControlClasses,Mx as formHelperTextClasses,Px as formLabelClasses,Tx as gridClasses,px as iconButtonClasses,dx as inputClasses,cD as linearProgressClasses,ID as linkClasses,gD as listClasses,hD as listDividerClasses,vD as listItemButtonClasses,CD as listItemClasses,DD as listItemContentClasses,MD as listItemDecoratorClasses,kD as listSubheaderClasses,cx as menuButtonClasses,mx as menuClasses,ux as menuItemClasses,Ix as modalClasses,Ax as modalCloseClasses,Sx as modalDialogClasses,Bx as modalOverflowClasses,gx as optionClasses,fx as radioClasses,hx as radioGroupClasses,yx as selectClasses,wx as sheetClasses,LD as skeletonClasses,SD as sliderClasses,kx as stackClasses,ED as stepButtonClasses,BD as stepClasses,FD as stepperClasses,Cx as switchClasses,zx as tabListClasses,Rx as tabPanelClasses,bx as tableClasses,Lx as tabsClasses,vx as textareaClasses,pr as theme,Ox as tooltipClasses,xx as typographyClasses,ox as useColorScheme,ex as useTheme,tx as useThemeProps};