@ceed/ads 0.0.132 → 0.0.133
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/components/Modal/Modal.d.ts +1 -1
- package/dist/index.js +1 -1
- package/framer/index.js +24 -24
- package/package.json +4 -2
|
@@ -5,7 +5,7 @@ declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mu
|
|
|
5
5
|
sx?: import("@mui/joy/styles/types").SxProps | undefined;
|
|
6
6
|
} & import("@mui/joy").ModalSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
7
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
}, "children" | "container" | "sx" | "
|
|
8
|
+
}, "children" | "container" | "sx" | "open" | "onClose" | "disablePortal" | "keepMounted" | "disableAutoFocus" | "disableEnforceFocus" | "disableRestoreFocus" | "disableEscapeKeyDown" | "disableScrollLock" | "hideBackdrop" | keyof import("@mui/joy").ModalSlotsAndSlotProps>>;
|
|
9
9
|
export { Modal };
|
|
10
10
|
declare const ModalDialog: import("@emotion/styled").StyledComponent<Omit<{
|
|
11
11
|
children?: React.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme as Pg,useColorScheme as wg,useThemeProps as Fg,alertClasses as Ag,boxClasses as Ig,buttonClasses as Bg,checkboxClasses as Ng,dividerClasses as Lg,iconButtonClasses as Sg,inputClasses as Hg,menuClasses as zg,menuButtonClasses as Og,menuItemClasses as Eg,optionClasses as Vg,radioClasses as Jg,radioGroupClasses as Yg,selectClasses as $g,switchClasses as Wg,tableClasses as qg,textareaClasses as Ug,typographyClasses as Gg,formControlClasses as jg,formLabelClasses as _g,formHelperTextClasses as Zg,gridClasses as Xg,stackClasses as Qg,sheetClasses as Kg,modalClasses as Rg,modalCloseClasses as ef,modalDialogClasses as of,modalOverflowClasses as tf,dialogTitleClasses as rf,dialogContentClasses as nf,dialogActionsClasses as af,tooltipClasses as lf,tabsClasses as sf,tabListClasses as mf,tabPanelClasses as df,accordionClasses as pf,accordionDetailsClasses as cf,accordionGroupClasses as uf,accordionSummaryClasses as gf,AutocompleteListbox as ff,AutocompleteOption as hf,autocompleteClasses as Cf,autocompleteListboxClasses as bf,autocompleteOptionClasses as yf,Avatar as xf,avatarClasses as vf,AvatarGroup as Df,avatarGroupClasses as Mf,AspectRatio as kf,aspectRatioClasses as Tf,Badge as Pf,badgeClasses as wf,breadcrumbsClasses as Ff,cardClasses as Af,cardActionsClasses as If,cardContentClasses as Bf,cardCoverClasses as Nf,cardOverflowClasses as Lf,Chip as Sf,chipClasses as Hf,CircularProgress as zf,circularProgressClasses as Of,Drawer as Ef,drawerClasses as Vf,LinearProgress as Jf,linearProgressClasses as Yf,List as $f,listClasses as Wf,ListDivider as qf,listDividerClasses as Uf,ListItem as Gf,listItemClasses as jf,ListItemButton as _f,listItemButtonClasses as Zf,ListItemContent as Xf,listItemContentClasses as Qf,ListItemDecorator as Kf,listItemDecoratorClasses as Rf,ListSubheader as eh,listSubheaderClasses as oh,Link as th,linkClasses as rh,Slider as nh,sliderClasses as ah,Step as ih,stepClasses as lh,StepButton as sh,stepButtonClasses as mh,StepIndicator as dh,Stepper as ph,stepperClasses as ch,Skeleton as uh,skeletonClasses as gh}from"@mui/joy";import ne from"react";import{AccordionGroup as Gt,Accordion as jt,AccordionSummary as _t,AccordionDetails as Zt}from"@mui/joy";import{motion as Se}from"framer-motion";var Xt=Se(_t),He=Xt;He.displayName="AccordionSummary";var Qt=Se(Zt),ze=Qt;ze.displayName="AccordionDetails";var Kt=Se(jt);function Oe(e){let{summary:o,details:r,variant:n,color:i,...a}=e,t=n==="solid"?"solid":void 0;return ne.createElement(Kt,{variant:t,color:i,...a},ne.createElement(He,{variant:t,color:i},o),ne.createElement(ze,{variant:t,color:i},r))}Oe.displayName="Accordion";var Rt=Se(Gt);function to(e){let{variant:o,color:r,items:n,...i}=e;return ne.createElement(Rt,{variant:o,color:r,...i},n.map((a,t)=>ne.createElement(Oe,{key:t,summary:a.summary,details:a.details,index:t,variant:o,color:r})))}to.displayName="Accordions";import Ee from"react";import{Alert as lr,styled as sr}from"@mui/joy";import{motion as mr}from"framer-motion";import er from"react";import{Typography as or}from"@mui/joy";import{motion as tr}from"framer-motion";var rr=tr(or),E=e=>er.createElement(rr,{...e});E.displayName="Typography";var N=E;import{Stack as nr}from"@mui/joy";import{motion as ar}from"framer-motion";var ir=ar(nr),ae=ir;ae.displayName="Stack";var H=ae;var dr=sr(mr(lr))({alignItems:"flex-start",fontWeight:"unset"});function ro(e){let{title:o,content:r,actions:n,color:i="primary",...a}=e,t=e.invertedColors||e.variant==="solid";return Ee.createElement(dr,{...a,color:i,endDecorator:n,invertedColors:t},Ee.createElement(H,null,o&&Ee.createElement(N,{level:"title-sm",color:i},o),Ee.createElement(N,{level:"body-sm",color:i},r)))}ro.displayName="Alert";import U,{useMemo as Ve,useState as vr}from"react";import{Autocomplete as Dr,AutocompleteOption as Mr,ListItemDecorator as et,CircularProgress as kr}from"@mui/joy";import{FormControl as pr,styled as cr}from"@mui/joy";import{motion as ur}from"framer-motion";var gr=cr(ur(pr))({width:"100%"}),ie=gr;ie.displayName="FormControl";var F=ie;import{FormLabel as fr}from"@mui/joy";import{motion as hr}from"framer-motion";var Cr=hr(fr),le=Cr;le.displayName="FormLabel";var L=le;import{FormHelperText as br}from"@mui/joy";import{motion as yr}from"framer-motion";var xr=yr(br),se=xr;se.displayName="FormHelperText";var w=se;function no(e){let{label:o,error:r,helperText:n,color:i,size:a,disabled:t,required:l,onChange:m,...p}=e,[s,c]=vr(e.value||e.defaultValue),b=Ve(()=>e.options.map(D=>typeof D!="object"?{value:D,label:D}:D),[e.options]),f=Ve(()=>e.loading?{value:"",label:"",startDecorator:U.createElement(kr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof s=="string"&&b.find(D=>D.value===s)||s,[s,e.options,e.loading]),y=Ve(()=>f?.startDecorator||e.startDecorator,[f]),d=Ve(()=>f?.endDecorator||e.endDecorator,[f]),k=U.createElement(Dr,{...p,required:l,onChange:(D,v)=>{c(v);let h=v;m?.({...D,target:{...D.target,value:h?.value}})},color:i,value:f,options:b,size:a,disabled:t,startDecorator:y,endDecorator:d,getOptionLabel:D=>`${D.value||""}`,renderOption:(D,v)=>U.createElement(Mr,{...D},v.startDecorator&&U.createElement(et,{sx:{marginInlineEnd:"var(--Input-gap)"}},v.startDecorator),v.label,v.endDecorator&&U.createElement(et,{sx:{marginInlineStart:"var(--Input-gap)"}},v.endDecorator))});return o?U.createElement(F,{required:l,color:i,size:a,error:r,disabled:t},U.createElement(L,null,o),k,n&&U.createElement(w,null,n)):k}no.displayName="Autocomplete";import{Box as Tr}from"@mui/joy";import{motion as Pr}from"framer-motion";var wr=Pr(Tr),me=wr;me.displayName="Box";var Je=me;import O from"react";import{Breadcrumbs as rt,Link as Or}from"@mui/joy";import ao from"react";import{Menu as Fr,MenuButton as Ar,MenuItem as Ir}from"@mui/joy";import{motion as io}from"framer-motion";var Br=io(Fr),de=e=>ao.createElement(Br,{...e});de.displayName="Menu";var Nr=io(Ar),pe=e=>ao.createElement(Nr,{...e});pe.displayName="MenuButton";var Lr=io(Ir),ce=e=>ao.createElement(Lr,{...e});ce.displayName="MenuItem";var ot=de;import{Dropdown as Sr}from"@mui/joy";import{motion as Hr}from"framer-motion";var zr=Hr(Sr),ue=zr;ue.displayName="Dropdown";var tt=ue;function lo(e){let{crumbs:o,size:r,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...t}={link:Or},slotProps:{link:l,...m}={link:{color:"neutral"}},collapsed:p=!0,...s}=e,c=u=>u.type==="link"&&a?O.createElement(a,{to:u.linkHref,href:u.linkHref,...l},u.label):O.createElement(N,null,u.label);if(!p)return O.createElement(rt,{size:r,slots:t,slotProps:m,...s},o.map(u=>O.createElement(c,{...u})));let b=Math.max(1,i),f=o.slice(0,n).map(u=>O.createElement(c,{...u})),y=(n+b>o.length?o.slice(n):o.slice(-b)).map(u=>O.createElement(c,{...u})),d=o.slice(n,-b).map(u=>O.createElement(ce,null,O.createElement(c,{...u})));return O.createElement(rt,{size:r,slots:t,slotProps:m,...s},f,d.length&&O.createElement(tt,null,O.createElement(pe,{size:r,variant:"plain"},"..."),O.createElement(ot,{size:r},d)),y)}lo.displayName="Breadcrumbs";import Er,{forwardRef as Vr}from"react";import{Button as Jr}from"@mui/joy";import{motion as Yr}from"framer-motion";var $r=Yr(Jr),ge=Vr((e,o)=>Er.createElement($r,{ref:o,...e}));ge.displayName="Button";var T=ge;import C,{Fragment as he,forwardRef as Qr,useMemo as pt}from"react";import{styled as V}from"@mui/joy";import Kr from"@mui/icons-material/esm/ChevronLeft.js";import Rr from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as ct,motion as en}from"framer-motion";var nt=e=>{let o=[],r=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((r.getDay()+1)/7),a=Math.ceil((n.getDate()+r.getDay())/7),t=1;for(let l=1;l<=a;l++){let m=[];for(let p=1;p<=7;p++)l===i&&p<r.getDay()+1||t>n.getDate()?m.push(void 0):(m.push(t),t++);o.push(m)}return o},at=(e,o)=>e.toLocaleString(o,{year:"numeric"}),so=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),it=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),lt=e=>{let o=new Date().getDay(),r=new Date;return r.setDate(r.getDate()-o),Array.from({length:7}).map(()=>{let n=r.toLocaleString(e,{weekday:"short"});return r.setDate(r.getDate()+1),n})},st=e=>{let o=new Date,r=new Date(e);return r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()},mo=(e,o)=>{let r=new Date(e),n=new Date(o);return r.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()===n.getTime()},W=(e,o,r)=>{let n=new Date(r);n.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 n>=i&&n<=a},Ye=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import Wr from"react";import{IconButton as qr}from"@mui/joy";import{motion as Ur}from"framer-motion";var Gr=Ur(qr),fe=e=>Wr.createElement(Gr,{...e});fe.displayName="IconButton";var z=fe;import{useCallback as jr,useMemo as _r,useState as $e}from"react";import{useThemeProps as Zr}from"@mui/joy";var Xr=(e,o)=>o.includes(e)?e:o[0],mt=e=>{let[o,r]=$e(()=>Xr(e.view||"day",e.views||["day","month"])),[n,i]=$e(e.defaultValue),[a,t]=$e(()=>{let d=new Date;return d.setDate(1),d.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||d}),[[l,m],p]=$e([0,0]),s=e.view??o,c=d=>{p([l+d,d])},b=jr(d=>{t(d),s==="month"?a.getFullYear()!==d.getFullYear()&&c(d>a?1:-1):c(d>a?1:-1),e.onMonthChange?.(d)},[e.onMonthChange,a,s]),f=Zr({props:{locale:"default",views:["day","month"],view:s,value:e.value??n,...e,onChange:e.value?e.onChange:d=>{i(d),e.onChange?.(d)},onMonthChange:b,onViewChange:()=>{let d=s==="month"?"day":"month";!(!e.views||e.views.includes(d))||e.view===d||(e.onViewChange?e.onViewChange(d):r(d))}},name:"Calendar"}),y=_r(()=>({...f,viewMonth:a,direction:m}),[f,a,m]);return[f,y]};import{useCallback as R,useState as dt}from"react";var We=e=>{let[o,r]=dt(null),[n,i]=dt(null);return{calendarTitle:e.view==="month"?at(e.viewMonth,e.locale||"default"):so(e.viewMonth,e.locale||"default"),onPrev:R(()=>{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:R(()=>{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:R(a=>{let t=new Date(e.viewMonth||new Date);t.setHours(0,0,0,0),t.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&W(e.value[0],o,t)||e.value[1]&&W(e.value[0],e.value[1],t));return{"aria-label":t.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:R(a=>{let t=new Date(e.viewMonth||new Date);t.setDate(1),t.setHours(0,0,0,0),t.setMonth(a);let m=!e.views?.find(p=>p==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&W(e.value[0],n,t)||e.value[1]&&W(e.value[0],e.value[1],t));return{"aria-label":t.toLocaleDateString(),"aria-current":m?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:R(a=>{let t=new Date(e.viewMonth||new Date);t.setHours(0,0,0,0),t.setDate(a);let l=!!e.value&&(mo(t,e.value[0])||e.value[1]&&mo(t,e.value[1])),m=e.rangeSelection&&e.value&&e.value[0]&&(o&&W(e.value[0],o,t)||e.value[1]&&W(e.value[0],e.value[1],t)),p=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),t.getTime())),new Date(Math.max(e.value[0].getTime(),t.getTime()))]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]),r(null)};return{isToday:st(t),isSelected:l,onClick:p,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>r(t):void 0,disabled:e.minDate&&t<e.minDate||e.maxDate&&t>e.maxDate||e.disableFuture&&t>new Date||e.disablePast&&t<(()=>{let s=new Date;return s.setHours(0,0,0,0),s})(),tabIndex:-1,"aria-label":t.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":m?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:R(a=>{let t=new Date(e.viewMonth||new Date);t.setDate(1),t.setHours(0,0,0,0),t.setMonth(a);let l=!e.views?.find(c=>c==="day")&&e.rangeSelection,m=!!e.value&&(Ye(t,e.value[0])||e.value[1]&&Ye(t,e.value[1])),p=l&&e.value&&e.value[0]&&(n&&W(e.value[0],n,t)||e.value[1]&&W(e.value[0],e.value[1],t)),s=()=>{l?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),t.getTime())),new Date(Math.max(e.value[0].getTime(),t.getTime()))]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(t)),i(null)};return{isSelected:m,onMouseEnter:l&&e.value?.[0]&&!e.value?.[1]?()=>i(t):void 0,disabled:e.minDate&&(()=>{let c=new Date(t);return c.setMonth(c.getMonth()+1),c.setDate(0),c<e.minDate})()||e.maxDate&&(()=>{let c=new Date(t);return c.setDate(0),c>e.maxDate})()||e.disableFuture&&t>new Date||e.disablePast&&t<new Date&&!Ye(t,new Date),onClick:s,tabIndex:-1,"aria-label":so(t,e.locale||"default"),"aria-selected":m?"true":void 0,"aria-current":p?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var on=V("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),tn=V("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),ut=V("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),gt=V(en.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),rn=V("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),nn=V("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),an=V(T,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),ln=V("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}}})),sn=V("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}}})),mn=V(T,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:r})=>[{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}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),dn=V(T,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:r,disabled:n})=>[{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&&!r&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},r&&{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}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),ft={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})},qe=1e4,ht=(e,o)=>Math.abs(e)*o,pn=e=>{let{ownerState:o}=e,{getPickerDayProps:r,getDayCellProps:n}=We(o),i=pt(()=>nt(o.viewMonth),[o.viewMonth]),a=pt(()=>lt(o.locale||"default"),[o.locale]);return C.createElement(ut,{calendarType:"datePicker"},C.createElement(ct,{initial:!1,custom:o.direction},C.createElement(gt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:ft,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:(t,{offset:l,velocity:m})=>{let p=ht(l.x,m.x);if(p<-qe){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(p>qe){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},C.createElement(rn,null,C.createElement("tr",null,a.map((t,l)=>C.createElement(C.Fragment,null,C.createElement("th",null,C.createElement(N,{level:"body-xs",textAlign:"center"},t)),l<6&&C.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),C.createElement(nn,null,i.map((t,l)=>C.createElement(he,{key:`${o.viewMonth}_${l}`},C.createElement("tr",null,t.map((m,p)=>m?C.createElement(he,{key:p},C.createElement(ln,{...n(m)},C.createElement(dn,{size:"sm",variant:"plain",color:"neutral",...r(m)},m)),p<6&&C.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):C.createElement(he,{key:p},C.createElement("td",null),p<6&&C.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&C.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},C.createElement("td",{colSpan:13,style:{height:4}}))))))))},cn=e=>{let{ownerState:o}=e,{getPickerMonthProps:r,getMonthCellProps:n}=We(o),i=Array.from({length:12},(t,l)=>l).reduce((t,l)=>(t[t.length-1].length===4&&t.push([]),t[t.length-1].push(l),t),[[]]),a=!o.views?.find(t=>t==="day")&&o.rangeSelection;return C.createElement(ut,{calendarType:a?"monthPicker":"datePicker"},C.createElement(ct,{initial:!1,custom:o.direction},C.createElement(gt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:ft,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:(t,{offset:l,velocity:m})=>{let p=ht(l.x,m.x);if(p<-qe){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(p>qe){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},C.createElement("tbody",null,i.map((t,l)=>C.createElement(he,{key:l},C.createElement("tr",null,t.map((m,p)=>C.createElement(he,{key:m},C.createElement(sn,{...n(m)},C.createElement(mn,{size:"sm",variant:"plain",color:"neutral",...r(m)},it(m,o.locale))),p<3&&C.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&C.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},C.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ce=Qr((e,o)=>{let[r,n]=mt(e),{value:i,defaultValue:a,onChange:t,locale:l,onViewChange:m,onMonthChange:p,view:s,views:c,rangeSelection:b,...f}=r,{calendarTitle:y,onPrev:d,onNext:u}=We(n);return C.createElement(on,{ref:o,...f},C.createElement(tn,null,C.createElement(z,{size:"sm",onClick:d},C.createElement(Kr,null)),C.createElement(an,{ownerState:n,variant:"plain",color:"neutral",onClick:m},y),C.createElement(z,{size:"sm",onClick:u},C.createElement(Rr,null))),s==="day"&&C.createElement(pn,{ownerState:n}),s==="month"&&C.createElement(cn,{ownerState:n}))});Ce.displayName="Calendar";var ee=Ce;import{Card as un,CardContent as gn,CardCover as fn,CardActions as hn,CardOverflow as Cn}from"@mui/joy";import{motion as be}from"framer-motion";var bn=be(un),ye=bn;ye.displayName="Card";var yn=be(gn),po=yn;po.displayName="CardContent";var xn=be(fn),co=xn;co.displayName="CardCover";var vn=be(hn),uo=vn;uo.displayName="CardActions";var Dn=be(Cn),go=Dn;go.displayName="CardOverflow";import Mn from"react";import{Checkbox as kn}from"@mui/joy";import{motion as Tn}from"framer-motion";var Pn=Tn(kn),xe=e=>Mn.createElement(Pn,{...e});xe.displayName="Checkbox";var ve=xe;import{styled as wn}from"@mui/joy";import Fn,{forwardRef as An}from"react";var In=wn("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),fo=An(function(o,r){return Fn.createElement(In,{ref:r,...o})});fo.displayName="Container";import q,{useCallback as Sn,useState as yt}from"react";import{IntlMessageFormat as Hn}from"intl-messageformat";import{NumericFormat as zn}from"react-number-format";import On from"@mui/icons-material/esm/InfoOutlined.js";import De from"react";import{Input as Bn}from"@mui/joy";import{motion as Nn}from"framer-motion";var Ct=Nn(Bn),Me=e=>{let{label:o,helperText:r,error:n,style:i,size:a,color:t,disabled:l,required:m,...p}=e;return o?De.createElement(F,{required:m,color:t,size:a,error:n,disabled:l},De.createElement(L,null,o),De.createElement(Ct,{...p}),r&&De.createElement(w,null,r)):De.createElement(Ct,{required:m,color:t,size:a,disabled:l,...p})};Me.displayName="Input";var G=Me;import Ln from"intl-messageformat";var bt=(e="usd")=>{let[o,r,n]=new Ln(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:r,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var En=q.forwardRef(function(o,r){let{onChange:n,...i}=o;return q.createElement(zn,{...i,onValueChange:({floatValue:a})=>{n?.({target:{name:o.name,value:a?.toString()}})},valueIsNumericString:!0,getInputRef:r,decimalScale:2})}),xt=q.forwardRef(function(o,r){let{currency:n="usd",max:i=1e5,name:a,onChange:t,label:l,error:m,helperText:p,required:s,disabled:c,...b}=o,{symbol:f,thousandSeparator:y,decimalSeparator:d,placeholder:u,fixedDecimalScale:k}=bt(n),[D,v]=yt(o.value),[h,x]=yt(!!i&&!!o.value&&o.value>i),S=Sn(Y=>{let X=Number(Y.target.value);v(X),t?.({...Y,target:{name:a,value:X}}),i&&X>i?x(!0):x(!1)},[]),M=q.createElement(G,{...b,size:"sm",ref:r,value:D,placeholder:u,onChange:S,disabled:c,required:s,slotProps:{input:{component:En,decimalSeparator:d,thousandSeparator:y,prefix:f,fixedDecimalScale:k}},sx:{fontFamily:"monospace"}});return l?q.createElement(F,{size:"sm",disabled:c,required:s,error:m||h},q.createElement(L,null,l),M,h?q.createElement(w,null,q.createElement(On,null),new Hn(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):p&&q.createElement(w,null,p)):M});import g,{useCallback as oe,useEffect as bo,useMemo as te,useRef as Wn,useState as qn}from"react";import{styled as Un,LinearProgress as Gn}from"@mui/joy";import jn from"@mui/icons-material/esm/ChevronLeft.js";import _n from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as Vn}from"@mui/joy";import{motion as Jn}from"framer-motion";var Yn=Jn(Vn),ke=Yn;ke.displayName="Sheet";var j=ke;import J from"react";import{Table as $n}from"@mui/joy";var Te=e=>{let{children:o,...r}=e;return J.createElement($n,{...r},o)};Te.displayName="Table";function ho(e){let{headCells:o,showCheckbox:r,onCheckboxChange:n,slots:{checkbox:i=ve}={},slotProps:{checkbox:a={}}={}}=e;return J.createElement("thead",null,J.createElement("tr",null,r&&J.createElement("th",{style:{width:"40px",textAlign:"center"}},J.createElement(i,{onChange:n,...a})),o.map(t=>J.createElement("th",{key:t.label,style:{width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,textAlign:t.numeric?"right":"left"}},t.label))))}ho.displayName="TableHead";function Co(e){let{rows:o,cellOrder:r,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:t=ve}={},slotProps:{checkbox:l={}}={}}=e;return J.createElement("tbody",null,o.map((m,p)=>J.createElement("tr",{key:p},i&&J.createElement("td",{style:{textAlign:"center"}},J.createElement(t,{onChange:s=>a?.(s,p),...l})),r.map(s=>J.createElement("td",{key:s,style:{textAlign:n?.[s]?.numeric?"right":"left"}},m[s])))))}Co.displayName="TableBody";var vt=Un("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"}}),Ue=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function Zn(e){let{paginationModel:{page:o,pageSize:r},rowCount:n,onPageChange:i}=e,a=1,t=Math.ceil(n/r),l=[o-2,o-1].filter(c=>c>1),m=[o+1,o+2].filter(c=>c<=t-1),p=t>1&&o<t-3,s=t>1&&o>4;return g.createElement(H,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},g.createElement(H,{direction:"row",spacing:.5,alignItems:"center"},g.createElement(z,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},g.createElement(jn,null)),o!==a&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),s&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(c=>g.createElement(T,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),g.createElement(T,{variant:"soft",size:"sm"},o),m.map(c=>g.createElement(T,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),p&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==t&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(t)},t),g.createElement(z,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===t,"aria-label":"Next page"},g.createElement(_n,null))))}var Xn=e=>g.createElement(Je,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let r=o.clientX,n=e.current?.getBoundingClientRect().width,i=t=>{n&&r&&(e.current.style.width=`${n+(t.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),Qn=e=>{let o=Wn(null),r={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?Xn(o):null;return g.createElement("th",{ref:o,key:e.field,style:r},e.headerName??e.field,n)};function Kn({rows:e,columns:o,rowCount:r,paginationMode:n,paginationModel:i,onPaginationModelChange:a,selectionModel:t=[],onSelectionModelChange:l,getId:m,isTotalSelected:p}){let[s,c]=qn(i?.page||1),b=i?.pageSize||20,f=oe((h,x)=>m?.(h)??h?.id??`${(x||0)+(s-1)*b}`,[m??s,b]),y=te(()=>new Set(t),[t]),d=te(()=>n==="server"?e:e.slice((s-1)*b,(s-1)*b+b),[e,s,b,n]),u=te(()=>d.length>0&&d.every((h,x)=>y.has(f(h,x))),[d,y,s,b,f]),k=r||e.length,D=te(()=>p??(k>0&&t.length===k),[p,t,k]),v=oe(h=>{c(h),a?.({page:h,pageSize:b})},[a]);return bo(()=>{v(1)},[k]),bo(()=>{s>Math.ceil(k/b)&&v(Math.ceil(k/b))},[k,b]),bo(()=>{l?.([])},[s]),{rowCount:k,page:s,pageSize:b,onPaginationModelChange:v,getId:f,HeadCell:Qn,dataInPage:d,isAllSelected:u,isTotalSelected:D,isSelectedRow:oe(h=>y.has(h),[y]),onAllCheckboxChange:oe(()=>{l?.(u?[]:d.map(f))},[u,d,l]),onCheckboxChange:oe((h,x)=>{if(y.has(x)){let S=t.filter(M=>M!==x);l?.(S)}else{let S=[...t,x];l?.(S)}},[t,l]),columns:te(()=>o||Object.keys(e[0]||{}).map(h=>({field:h})),[e,o]),onTotalSelect:oe(()=>{l?.(D?[]:e.map(f),!D)},[D,e,l])}}function yo(e){let{rows:o,checkboxSelection:r,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:t,onPaginationModelChange:l,paginationMode:m,paginationModel:p,loading:s,slots:{checkbox:c=ve,toolbar:b,footer:f,loadingOverlay:y=()=>g.createElement(Gn,{value:8,variant:"plain"})}={},slotProps:{checkbox:d={},toolbar:u,background:k={}}={},...D}=e,{columns:v,isAllSelected:h,isSelectedRow:x,onAllCheckboxChange:S,onCheckboxChange:M,getId:Y,rowCount:X,page:Xo,pageSize:Qo,onPaginationModelChange:$t,dataInPage:Wt,isTotalSelected:Ko,onTotalSelect:Ro,HeadCell:qt}=Kn(e);return g.createElement(Je,null,g.createElement(H,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&g.createElement(H,{direction:"row",spacing:1},!h&&g.createElement(N,{level:"body-xs"},Ue(n?.length||0)," items selected"),h&&!Ko&&g.createElement(H,{direction:"row",spacing:1,alignItems:"center"},g.createElement(N,{level:"body-xs"},"All ",Ue(n?.length||0)," items on this page are selected."),g.createElement(T,{size:"sm",variant:"plain",onClick:Ro},"Select all ",Ue(X??o.length)," items")),Ko&&g.createElement(H,{direction:"row",spacing:1,alignItems:"center"},g.createElement(N,{level:"body-xs"},"All ",Ue(X??o.length)," items are selected."),g.createElement(T,{size:"sm",variant:"plain",color:"danger",onClick:Ro},"Cancel"))),b&&g.createElement(b,{...u||{}})),g.createElement(j,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...k},g.createElement(Te,{...D},g.createElement("thead",null,g.createElement("tr",null,r&&g.createElement("th",{style:{width:"40px",textAlign:"center"}},g.createElement(c,{onChange:S,checked:h,indeterminate:(n||[]).length>0&&!h,...d})),v.map(Q=>g.createElement(qt,{key:Q.field,stickyHeader:e.stickyHeader,...Q})))),g.createElement("tbody",null,g.createElement(vt,null,!!s&&g.createElement("td",null,g.createElement(Je,{sx:{position:"absolute",top:0,left:0,right:0}},g.createElement(y,null)))),g.createElement(vt,null),Wt.map((Q,Ut)=>{let K=Y(Q,Ut);return g.createElement("tr",{key:K,role:r?"checkbox":void 0,tabIndex:r?-1:void 0,onClick:r?$=>M($,K):void 0,"aria-checked":r?x(K):void 0},r&&g.createElement("th",{scope:"row",style:{textAlign:"center"}},g.createElement(c,{onChange:$=>M($,K),checked:x(K),...d})),v.map($=>g.createElement("td",{key:$.field,style:{textAlign:$.type==="number"?"end":"start"}},$.renderCell?.({row:Q,value:Q[$.field],id:K})??Q[$.field])))})),f&&g.createElement(f,null))),g.createElement(Zn,{paginationModel:te(()=>({page:Xo,pageSize:Qo}),[Xo,Qo]),rowCount:X,onPageChange:$t}))}yo.displayName="DataTable";import A,{forwardRef as na,useCallback as Dt,useEffect as aa,useState as Mt}from"react";import{IMaskInput as ia,IMask as xo}from"react-imask";import la from"@mui/icons-material/esm/CalendarToday.js";import{styled as kt}from"@mui/joy";import{FocusTrap as sa,ClickAwayListener as ma,Popper as da}from"@mui/base";import{DialogActions as Rn,styled as ea}from"@mui/joy";import{motion as oa}from"framer-motion";var ta=oa(Rn),ra=ea(ta)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Pe=ra;Pe.displayName="DialogActions";var _=Pe;var pa=kt(da,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ca=kt(j,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Tt=e=>{let o=`${e.getDate()}`,r=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(r)<10&&(r="0"+r),[n,r,o].join("/")},ua=A.forwardRef(function(o,r){let{onChange:n,...i}=o;return A.createElement(ia,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:xo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:xo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:xo.MaskedRange,from:1900,to:9999}},format:Tt,parse:a=>{let t=a.split("/");return new Date(Number(t[0]),Number(t[1])-1,Number(t[2]))},autofix:"pad",overwrite:!0})}),vo=na((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:m,disableFuture:p,disablePast:s,required:c,...b}=e,[f,y]=Mt(e.value||""),[d,u]=Mt(null),k=!!d;aa(()=>{y(e.value||"")},[e.value]);let D=Dt(x=>{y(x.target.value),r?.(x)},[]),v=Dt(x=>{u(d?null:x.currentTarget)},[d,u]),h=A.createElement(A.Fragment,null,A.createElement(G,{...b,ref:o,size:"sm",value:f,onChange:D,placeholder:"YYYY/MM/DD",disabled:n,required:c,slotProps:{input:{component:ua}},sx:{fontFamily:"monospace"},endDecorator:A.createElement(z,{variant:"plain",onClick:v},A.createElement(la,null))}),k&&A.createElement(ma,{onClickAway:()=>u(null)},A.createElement(pa,{id:"date-picker-popper",open:!0,anchorEl:d,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},A.createElement(sa,{open:!0},A.createElement(ca,{tabIndex:-1,role:"presentation"},A.createElement(ee,{value:Number.isNaN(new Date(f).getTime())?void 0:[new Date(f),void 0],onChange:([x])=>{y(Tt(x)),u(null)},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:p,disablePast:s}),A.createElement(_,{sx:{p:1}},A.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?A.createElement(F,{required:c,disabled:n,error:a,size:"sm"},A.createElement(L,null,i),h,t&&A.createElement(w,null,t)):h});vo.displayName="DatePicker";import I,{forwardRef as ga,useCallback as Do,useEffect as fa,useMemo as ha,useState as Pt}from"react";import{IMaskInput as Ca,IMask as Mo}from"react-imask";import ba from"@mui/icons-material/esm/CalendarToday.js";import{styled as wt}from"@mui/joy";import{FocusTrap as ya,ClickAwayListener as xa,Popper as va}from"@mui/base";var Da=wt(va,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ma=wt(j,{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})),Ft=([e,o])=>{let r=n=>{let i=`${n.getDate()}`,a=`${n.getMonth()+1}`,t=n.getFullYear();return Number(i)<10&&(i="0"+i),Number(a)<10&&(a="0"+a),[t,a,i].join("/")};return[r(e),o?r(o):""].join(" - ")},At=e=>{let o=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",n=o.split("/"),i=r.split("/");return[new Date(Number(n[0]),Number(n[1])-1,Number(n[2])),new Date(Number(i[0]),Number(i[1])-1,Number(i[2]))]},ka=I.forwardRef(function(o,r){let{onChange:n,...i}=o;return I.createElement(Ca,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Mo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Mo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Mo.MaskedRange,from:1900,to:9999}},format:Ft,parse:At,autofix:"pad",overwrite:!0})}),ko=ga((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:m,disableFuture:p,disablePast:s,required:c,...b}=e,[f,y]=Pt(e.value||""),[d,u]=Pt(null),k=!!d,D=ha(()=>f?At(f):void 0,[f]);fa(()=>{y(e.value||"")},[e.value]);let v=Do(M=>{y(M.target.value),r?.(M)},[r]),h=Do(M=>{u(d?null:M.currentTarget)},[d,u]),x=Do(([M,Y])=>{!M||!Y||(y(Ft([M,Y])),u(null))},[y,u]),S=I.createElement(I.Fragment,null,I.createElement(G,{...b,ref:o,size:"sm",value:f,onChange:v,disabled:n,required:c,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ka}},sx:{fontFamily:"monospace"},endDecorator:I.createElement(z,{variant:"plain",onClick:h},I.createElement(ba,null))}),k&&I.createElement(xa,{onClickAway:()=>u(null)},I.createElement(Da,{id:"date-range-picker-popper",open:!0,anchorEl:d,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},I.createElement(ya,{open:!0},I.createElement(Ma,{tabIndex:-1,role:"presentation"},I.createElement(ee,{rangeSelection:!0,defaultValue:D,onChange:x,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:p,disablePast:s}),I.createElement(_,{sx:{p:1}},I.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?I.createElement(F,{required:c,disabled:n,error:a,size:"sm"},I.createElement(L,null,i),S,t&&I.createElement(w,null,t)):S});ko.displayName="DateRangePicker";import{DialogContent as Ta,styled as Pa}from"@mui/joy";import{motion as wa}from"framer-motion";var Fa=wa(Ta),Aa=Pa(Fa)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),we=Aa;we.displayName="DialogContent";var Ge=we;import{DialogTitle as Ia,styled as Ba}from"@mui/joy";import{motion as Na}from"framer-motion";var La=Na(Ia),Sa=Ba(La)(({theme:e})=>({padding:e.spacing(2,3)})),Fe=Sa;Fe.displayName="DialogTitle";var je=Fe;import Ie from"react";import _e from"react";import{Modal as Ha,ModalDialog as za,ModalClose as Oa,ModalOverflow as Ea,styled as It}from"@mui/joy";import{motion as Ze}from"framer-motion";var Va=Ze(Ha),To=Va;To.displayName="Modal";var Ja=Ze(za),Bt=It(Ja)({padding:0}),Ae=Bt;Ae.displayName="ModalDialog";var Ya=It(Ze(Oa))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),Xe=Ya;Xe.displayName="ModalClose";var $a=Ze(Ea),Po=$a;Po.displayName="ModalOverflow";function wo(e){let{title:o,children:r,...n}=e;return _e.createElement(Bt,{...n},_e.createElement(Xe,null),_e.createElement(je,null,o),_e.createElement(Ge,null,r))}wo.displayName="ModalFrame";import{styled as Wa}from"@mui/joy";var qa=Wa(Ae)(({theme:e})=>({padding:0})),Fo=Ie.forwardRef((e,o)=>{let{title:r,children:n,actions:i,...a}=e;return Ie.createElement(qa,{ref:o,...a},Ie.createElement(je,null,r),Ie.createElement(Ge,null,n),Ie.createElement(_,null,i))});Fo.displayName="DialogFrame";import Ua from"react";import{Divider as Ga}from"@mui/joy";import{motion as ja}from"framer-motion";var _a=ja(Ga),Be=e=>Ua.createElement(_a,{...e});Be.displayName="Divider";import Za from"react";import{Drawer as Xa}from"@mui/joy";import{motion as Qa}from"framer-motion";var Ka=Qa(Xa),Ao=e=>{let{children:o,...r}=e;return Za.createElement(Ka,{...r,slotProps:{...r.slotProps,content:{...r.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Ao.displayName="InsetDrawer";import P,{useCallback as Qe,useEffect as Ra,useRef as Nt,useState as Io}from"react";import{styled as re}from"@mui/joy";import ei from"@mui/icons-material/esm/Delete.js";import{combine as oi}from"@atlaskit/pragmatic-drag-and-drop/combine";import{dropTargetForExternal as ti,monitorForExternal as ri}from"@atlaskit/pragmatic-drag-and-drop/external/adapter";import{containsFiles as Lt,getFiles as ni}from"@atlaskit/pragmatic-drag-and-drop/external/file";import{preventUnhandled as St}from"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled";var ai=re("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),ii=re("div",{name:"FileUpload",slot:"PreviewRoot"})(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, auto))",gap:"8px"})),li=e=>{let{files:o,onDelete:r}=e;return P.createElement(ii,null,o.map(n=>P.createElement(ye,{key:n.name},P.createElement(H,{style:{aspectRatio:"4/3",height:"200px"},alignItems:"center",justifyContent:"center"},n.type.startsWith("image/")?P.createElement("img",{style:{width:"100%",height:"100%",objectFit:"cover"},src:URL.createObjectURL(n),alt:n.name}):P.createElement(N,{level:"title-md",textColor:"neutral.400"},n.type)),P.createElement(H,{direction:"row",justifyContent:"space-between",gap:"8px"},P.createElement(H,null,P.createElement(N,{level:"title-sm",textColor:"common.black"},n.name),P.createElement(N,{level:"body-sm",textColor:"neutral.600"},(n.size/1e3).toFixed(2),"KB")),P.createElement(z,{onClick:()=>r?.(n)},P.createElement(ei,null))))))},si=re(H,{name:"FileUpload",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),mi=re("label",{name:"FileUpload",slot:"label"})({}),di=re("div",{name:"FileUpload",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",backgroundColor:o==="over"?e.palette.background.level2:e.palette.background.backdrop,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(3),gap:e.spacing(2),border:o==="idle"?"2px solid rgba(0,0,0,0)":`2px dashed ${e.palette.primary[400]}`})),pi=re(T,{name:"FileUpload",slot:"button"})({}),Bo=P.memo(e=>{let{accept:o,maxCount:r,name:n,maxTotalSize:i,maxSizePerFile:a,onChange:t}=e,l=Nt(null),m=Nt(null),[p,s]=Io([]),[c,b]=Io("idle"),[f,y]=Io(),d=Qe(v=>{try{a&&v.forEach(x=>{if(x.size>a)throw new Error(`File size exceeds the limit: ${a}`)});let h=[...p,...v];if(r&&h.length>r)throw new Error(`File count exceeds the limit: ${r}`);if(i&&h.reduce((x,S)=>x+S.size,0)>i)throw new Error(`Total file size exceeds the limit: ${i}`);t?.({target:{name:n,value:h}}),y(void 0),s(h)}catch(h){y(h.message)}},[p]);Ra(()=>{let v=l.current;if(!v)throw new Error("Drop zone ref is not set");return oi(ti({element:v,canDrop:Lt,onDragEnter:()=>b("over"),onDragLeave:()=>b("potential"),onDrop:async({source:h})=>{let x=await ni({source:h});d(x)}}),ri({canMonitor:Lt,onDragStart:()=>{b("potential"),St.start()},onDrop:()=>{b("idle"),St.stop()}}))});let u=Qe(v=>{let h=Array.from(v.target.files||[]);d(h)},[d]),k=Qe(v=>{s(h=>(t?.({target:{name:n,value:h.filter(x=>x!==v)}}),h.filter(x=>x!==v)))},[]),D=Qe(()=>{m.current?.click()},[]);return P.createElement(si,null,P.createElement(F,{error:!!f},P.createElement(di,{state:c,ref:l},P.createElement(mi,null,P.createElement(N,{level:"h3",textColor:"background.tooltip"},"Drop files"),P.createElement(ai,{type:"file",onChange:u,multiple:!0,accept:o,ref:m})),P.createElement(pi,{variant:"soft",color:"neutral",onClick:D},"Select Files"),f&&P.createElement(w,null,f))),P.createElement(li,{files:p,onDelete:k}))});Bo.displayName="FileUpload";import{Grid as ci}from"@mui/joy";import{motion as ui}from"framer-motion";var gi=ui(ci),No=gi;No.displayName="Grid";import Z from"react";import fi from"react-markdown";import{Link as hi}from"@mui/joy";var Lo=e=>{let{...o}=e;return Z.createElement(fi,{...o,components:{h1:({children:r})=>Z.createElement(E,{level:"h1"},r),h2:({children:r})=>Z.createElement(E,{level:"h2"},r),h3:({children:r})=>Z.createElement(E,{level:"h3"},r),h4:({children:r})=>Z.createElement(E,{level:"h4"},r),p:({children:r})=>Z.createElement(E,null,r),a:({children:r,href:n})=>Z.createElement(hi,{href:n},r),hr:()=>Z.createElement(Be,null),...o?.components}})};Lo.displayName="Markdown";import B,{forwardRef as Ci,useCallback as So,useEffect as bi,useMemo as yi,useState as Ht}from"react";import{IMaskInput as xi,IMask as zt}from"react-imask";import vi from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ot}from"@mui/joy";import{FocusTrap as Di,ClickAwayListener as Mi,Popper as ki}from"@mui/base";var Ti=Ot(ki,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Pi=Ot(j,{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})),Ho=e=>{let o=`${e.getMonth()+1}`,r=e.getFullYear();return Number(o)<10&&(o="0"+o),[r,o].join("/")},zo=([e,o])=>{let r=n=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(n))return n;let i=n.split("/"),a=new Date(Number(i[0]),Number(i[1])-1);return Ho(a)};return[r(e),r(o)].join(" - ")},Oo=e=>{let o=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[o,r]},wi=B.forwardRef(function(o,r){let{onChange:n,...i}=o;return B.createElement(xi,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:zt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:zt.MaskedRange,from:1900,to:9999}},format:zo,parse:Oo})}),Eo=Ci((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:m,disableFuture:p,disablePast:s,required:c,...b}=e,[f,y]=Ht(""),[d,u]=Ht(null),k=!!d,D=yi(()=>f?Oo(f).map(M=>new Date(M)):void 0,[f]);bi(()=>{y(e.value?zo(Oo(e.value)):"")},[e.value]);let v=So(M=>{y(M.target.value),r?.(M)},[r]),h=So(M=>{u(d?null:M.currentTarget)},[d,u]),x=So(([M,Y])=>{!M||!Y||(y(zo([Ho(M),Ho(Y)])),u(null))},[y,u]),S=B.createElement(B.Fragment,null,B.createElement(G,{...b,ref:o,size:"sm",value:f,onChange:v,disabled:n,required:c,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:wi}},sx:{fontFamily:"monospace"},endDecorator:B.createElement(z,{variant:"plain",onClick:h},B.createElement(vi,null))}),k&&B.createElement(Mi,{onClickAway:()=>u(null)},B.createElement(Ti,{id:"date-range-picker-popper",open:!0,anchorEl:d,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},B.createElement(Di,{open:!0},B.createElement(Pi,{tabIndex:-1,role:"presentation"},B.createElement(ee,{view:"month",views:["month"],rangeSelection:!0,defaultValue:D,onChange:x,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:p,disablePast:s}),B.createElement(_,{sx:{p:1}},B.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?B.createElement(F,{required:c,disabled:n,error:a,size:"sm"},B.createElement(L,null,i),S,t&&B.createElement(w,null,t)):S});Eo.displayName="MonthRangePicker";import{Radio as Fi,RadioGroup as Ai}from"@mui/joy";import{motion as Et}from"framer-motion";var Ii=Et(Fi),Ne=Ii;Ne.displayName="Radio";var Bi=Et(Ai),Le=Bi;Le.displayName="RadioGroup";import Vt from"react";function Vo(e){let{items:o,...r}=e;return Vt.createElement(Le,{...r},o.map(n=>Vt.createElement(Ne,{key:`${n.value}`,value:n.value,label:n.label})))}Vo.displayName="RadioList";import Ke from"react";import{Select as Ni,Option as Li}from"@mui/joy";import{motion as Si}from"framer-motion";var Hi=Si(Li),Jo=Hi;Jo.displayName="Option";function Yo(e){let{label:o,helperText:r,error:n,size:i,color:a,disabled:t,required:l,onChange:m,...p}=e,c=Ke.createElement(Ni,{...p,required:l,disabled:t,size:i,color:a,onChange:(b,f)=>{let y=b||{target:{}},d={...y,target:{name:y.target?.name||e.name,value:f||void 0}};m?.(d)}});return o?Ke.createElement(F,{required:l,disabled:t,size:i,color:a,error:n},Ke.createElement(L,null,o),c,r&&Ke.createElement(w,null,r)):c}Yo.displayName="Select";import Jt from"react";import{Switch as zi,styled as Oi,switchClasses as Ei}from"@mui/joy";import{motion as Yt}from"framer-motion";var Vi=Yt(zi),Ji=Oi(Yt.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)",[`&.${Ei.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Yi=e=>Jt.createElement(Ji,{...e,layout:!0,transition:$i}),$i={type:"spring",stiffness:700,damping:30},$o=e=>Jt.createElement(Vi,{...e,slots:{thumb:Yi,...e.slots}});$o.displayName="Switch";import{Tabs as Wi,Tab as qi,TabList as Ui,TabPanel as Gi,styled as ji,tabClasses as _i}from"@mui/joy";import{motion as Re}from"framer-motion";var Zi=Re(Wi),Wo=Zi;Wo.displayName="Tabs";var Xi=ji(Re(qi))(({theme:e})=>({[`&:not(.${_i.selected})`]:{color:e.palette.neutral[700]}})),qo=Xi;qo.displayName="Tab";var Qi=Re(Ui),Uo=Qi;Uo.displayName="TabList";var Ki=Re(Gi),Go=Ki;Go.displayName="TabPanel";import eo from"react";import{Textarea as Ri}from"@mui/joy";import{motion as el}from"framer-motion";var ol=el(Ri),jo=e=>{let{label:o,error:r,helperText:n,color:i,size:a,disabled:t,required:l,...m}=e,p=eo.createElement(ol,{required:l,disabled:t,color:i,size:a,...m});return o?eo.createElement(F,{required:l,disabled:t,color:i,size:a,error:r},eo.createElement(L,null,o),p,n&&eo.createElement(w,null,n)):p};jo.displayName="Textarea";import oo from"react";import{CssBaseline as tl,CssVarsProvider as rl,checkboxClasses as nl,extendTheme as al}from"@mui/joy";var il=al({cssVarPrefix:"ceed",components:{JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr[aria-checked=false] th":{"--TableCell-headBackground":"transparent"},"& tbody tr[aria-checked=true]:hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr[aria-checked=true]:not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr[aria-checked=true]:not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${nl.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function _o(e){return oo.createElement(oo.Fragment,null,oo.createElement(rl,{theme:il},oo.createElement(tl,null),e.children))}_o.displayName="ThemeProvider";import ll from"react";import{Tooltip as sl}from"@mui/joy";import{motion as ml}from"framer-motion";var dl=ml(sl),Zo=e=>ll.createElement(dl,{...e});Zo.displayName="Tooltip";export{Oe as Accordion,ze as AccordionDetails,He as AccordionSummary,to as Accordions,ro as Alert,kf as AspectRatio,no as Autocomplete,ff as AutocompleteListbox,hf as AutocompleteOption,xf as Avatar,Df as AvatarGroup,Pf as Badge,me as Box,lo as Breadcrumbs,ge as Button,Ce as Calendar,ye as Card,uo as CardActions,po as CardContent,co as CardCover,go as CardOverflow,xe as Checkbox,Sf as Chip,zf as CircularProgress,fo as Container,xt as CurrencyInput,yo as DataTable,vo as DatePicker,ko as DateRangePicker,Pe as DialogActions,we as DialogContent,Fo as DialogFrame,Fe as DialogTitle,Be as Divider,Ef as Drawer,ue as Dropdown,Bo as FileUpload,ie as FormControl,se as FormHelperText,le as FormLabel,No as Grid,fe as IconButton,Me as Input,Ao as InsetDrawer,Jf as LinearProgress,th as Link,$f as List,qf as ListDivider,Gf as ListItem,_f as ListItemButton,Xf as ListItemContent,Kf as ListItemDecorator,eh as ListSubheader,Lo as Markdown,de as Menu,pe as MenuButton,ce as MenuItem,To as Modal,Xe as ModalClose,Ae as ModalDialog,wo as ModalFrame,Po as ModalOverflow,Eo as MonthRangePicker,Jo as Option,Ne as Radio,Le as RadioGroup,Vo as RadioList,Yo as Select,ke as Sheet,uh as Skeleton,nh as Slider,ae as Stack,ih as Step,sh as StepButton,dh as StepIndicator,ph as Stepper,$o as Switch,qo as Tab,Uo as TabList,Go as TabPanel,Te as Table,Co as TableBody,ho as TableHead,Wo as Tabs,jo as Textarea,_o as ThemeProvider,Zo as Tooltip,E as Typography,pf as accordionClasses,cf as accordionDetailsClasses,gf as accordionSummaryClasses,uf as accordionsClasses,Ag as alertClasses,Tf as aspectRatioClasses,Cf as autocompleteClasses,bf as autocompleteListboxClasses,yf as autocompleteOptionClasses,vf as avatarClasses,Mf as avatarGroupClasses,wf as badgeClasses,Ig as boxClasses,Ff as breadcrumbsClasses,Bg as buttonClasses,If as cardActionsClasses,Af as cardClasses,Bf as cardContentClasses,Nf as cardCoverClasses,Lf as cardOverflowClasses,Ng as checkboxClasses,Hf as chipClasses,Of as circularProgressClasses,af as dialogActionsClasses,nf as dialogContentClasses,rf as dialogTitleClasses,Lg as dividerClasses,Vf as drawerClasses,jg as formControlClasses,Zg as formHelperTextClasses,_g as formLabelClasses,Xg as gridClasses,Sg as iconButtonClasses,Hg as inputClasses,Yf as linearProgressClasses,rh as linkClasses,Wf as listClasses,Uf as listDividerClasses,Zf as listItemButtonClasses,jf as listItemClasses,Qf as listItemContentClasses,Rf as listItemDecoratorClasses,oh as listSubheaderClasses,Og as menuButtonClasses,zg as menuClasses,Eg as menuItemClasses,Rg as modalClasses,ef as modalCloseClasses,of as modalDialogClasses,tf as modalOverflowClasses,Vg as optionClasses,Jg as radioClasses,Yg as radioGroupClasses,$g as selectClasses,Kg as sheetClasses,gh as skeletonClasses,ah as sliderClasses,Qg as stackClasses,mh as stepButtonClasses,lh as stepClasses,ch as stepperClasses,Wg as switchClasses,mf as tabListClasses,df as tabPanelClasses,qg as tableClasses,sf as tabsClasses,Ug as textareaClasses,lf as tooltipClasses,Gg as typographyClasses,wg as useColorScheme,Pg as useTheme,Fg as useThemeProps};
|
|
1
|
+
import{useTheme as Eg,useColorScheme as Og,useThemeProps as Vg,alertClasses as Jg,boxClasses as Yg,buttonClasses as $g,checkboxClasses as Wg,dividerClasses as qg,iconButtonClasses as Gg,inputClasses as Ug,menuClasses as jg,menuButtonClasses as _g,menuItemClasses as Zg,optionClasses as Xg,radioClasses as Qg,radioGroupClasses as Rg,selectClasses as Kg,switchClasses as ef,tableClasses as of,textareaClasses as tf,typographyClasses as rf,formControlClasses as nf,formLabelClasses as af,formHelperTextClasses as lf,gridClasses as sf,stackClasses as mf,sheetClasses as df,modalClasses as pf,modalCloseClasses as cf,modalDialogClasses as uf,modalOverflowClasses as gf,dialogTitleClasses as ff,dialogContentClasses as hf,dialogActionsClasses as Cf,tooltipClasses as bf,tabsClasses as yf,tabListClasses as xf,tabPanelClasses as vf,accordionClasses as Df,accordionDetailsClasses as Mf,accordionGroupClasses as kf,accordionSummaryClasses as Tf,AutocompleteListbox as Pf,AutocompleteOption as wf,autocompleteClasses as Ff,autocompleteListboxClasses as Af,autocompleteOptionClasses as If,Avatar as Bf,avatarClasses as Nf,AvatarGroup as Lf,avatarGroupClasses as Sf,AspectRatio as Hf,aspectRatioClasses as zf,Badge as Ef,badgeClasses as Of,breadcrumbsClasses as Vf,cardClasses as Jf,cardActionsClasses as Yf,cardContentClasses as $f,cardCoverClasses as Wf,cardOverflowClasses as qf,Chip as Gf,chipClasses as Uf,CircularProgress as jf,circularProgressClasses as _f,Drawer as Zf,drawerClasses as Xf,LinearProgress as Qf,linearProgressClasses as Rf,List as Kf,listClasses as eh,ListDivider as oh,listDividerClasses as th,ListItem as rh,listItemClasses as nh,ListItemButton as ah,listItemButtonClasses as ih,ListItemContent as lh,listItemContentClasses as sh,ListItemDecorator as mh,listItemDecoratorClasses as dh,ListSubheader as ph,listSubheaderClasses as ch,Link as uh,linkClasses as gh,Slider as fh,sliderClasses as hh,Step as Ch,stepClasses as bh,StepButton as yh,stepButtonClasses as xh,StepIndicator as vh,Stepper as Dh,stepperClasses as Mh,Skeleton as kh,skeletonClasses as Th}from"@mui/joy";import ne from"react";import{AccordionGroup as jt,Accordion as _t,AccordionSummary as Zt,AccordionDetails as Xt}from"@mui/joy";import{motion as Se}from"framer-motion";var Qt=Se(Zt),He=Qt;He.displayName="AccordionSummary";var Rt=Se(Xt),ze=Rt;ze.displayName="AccordionDetails";var Kt=Se(_t);function Ee(e){let{summary:o,details:r,variant:n,color:i,...a}=e,t=n==="solid"?"solid":void 0;return ne.createElement(Kt,{variant:t,color:i,...a},ne.createElement(He,{variant:t,color:i},o),ne.createElement(ze,{variant:t,color:i},r))}Ee.displayName="Accordion";var er=Se(jt);function to(e){let{variant:o,color:r,items:n,...i}=e;return ne.createElement(er,{variant:o,color:r,...i},n.map((a,t)=>ne.createElement(Ee,{key:t,summary:a.summary,details:a.details,index:t,variant:o,color:r})))}to.displayName="Accordions";import Oe from"react";import{Alert as sr,styled as mr}from"@mui/joy";import{motion as dr}from"framer-motion";import or from"react";import{Typography as tr}from"@mui/joy";import{motion as rr}from"framer-motion";var nr=rr(tr),V=e=>or.createElement(nr,{...e});V.displayName="Typography";var L=V;import{Stack as ar}from"@mui/joy";import{motion as ir}from"framer-motion";var lr=ir(ar),ae=lr;ae.displayName="Stack";var z=ae;var pr=mr(dr(sr))({alignItems:"flex-start",fontWeight:"unset"});function ro(e){let{title:o,content:r,actions:n,color:i="primary",...a}=e,t=e.invertedColors||e.variant==="solid";return Oe.createElement(pr,{...a,color:i,endDecorator:n,invertedColors:t},Oe.createElement(z,null,o&&Oe.createElement(L,{level:"title-sm",color:i},o),Oe.createElement(L,{level:"body-sm",color:i},r)))}ro.displayName="Alert";import A,{useMemo as Ve,useState as Dr}from"react";import{Autocomplete as Mr,AutocompleteOption as kr,ListSubheader as Tr,AutocompleteListbox as Pr,ListItemDecorator as et,CircularProgress as wr}from"@mui/joy";import{Popper as Fr}from"@mui/base";import{FixedSizeList as Ar}from"react-window";import{FormControl as cr,styled as ur}from"@mui/joy";import{motion as gr}from"framer-motion";var fr=ur(gr(cr))({width:"100%"}),ie=fr;ie.displayName="FormControl";var F=ie;import{FormLabel as hr}from"@mui/joy";import{motion as Cr}from"framer-motion";var br=Cr(hr),le=br;le.displayName="FormLabel";var S=le;import{FormHelperText as yr}from"@mui/joy";import{motion as xr}from"framer-motion";var vr=xr(yr),se=vr;se.displayName="FormHelperText";var w=se;function Ir(e){let{data:o,index:r,style:n}=e,i=o[r],a={...n},t=i.props;if(i.hasOwnProperty("group"))return A.createElement(Tr,{key:i.key,component:"li"},i.group);let l=t["data-option-index"],s=t.ownerState.options[l];return A.createElement(kr,{...t},s.startDecorator&&A.createElement(et,{sx:{marginInlineEnd:"var(--Input-gap)"}},s.startDecorator),s.label,s.endDecorator&&A.createElement(et,{sx:{marginInlineStart:"var(--Input-gap)"}},s.endDecorator))}var ot=A.createContext({}),Br=A.forwardRef((e,o)=>{let r=A.useContext(ot);return A.createElement(Pr,{...e,...r,component:"div",ref:o,sx:{"& ul":{padding:0,margin:0,flexShrink:0}}})}),Nr=A.forwardRef(function(o,r){let{children:n,anchorEl:i,open:a,modifiers:t,...l}=o,s=[];n[0].forEach(c=>{c&&(s.push(c),s.push(...c.children||[]))});let d=s.length,m=36;return A.createElement(Fr,{ref:r,anchorEl:i,open:a,modifiers:t},A.createElement(ot.Provider,{value:l},A.createElement(Ar,{itemData:s,height:m*8,width:"100%",outerElementType:Br,innerElementType:"ul",itemSize:m,overscanCount:5,itemCount:d},Ir)))});function no(e){let{label:o,error:r,helperText:n,color:i,size:a,disabled:t,required:l,onChange:s,...d}=e,[m,c]=Dr(e.value||e.defaultValue),b=Ve(()=>e.options.map(v=>typeof v!="object"?{value:v,label:v}:v),[e.options]),f=Ve(()=>e.loading?{value:"",label:"",startDecorator:A.createElement(wr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof m=="string"&&b.find(v=>v.value===m)||m,[m,e.options,e.loading]),y=Ve(()=>f?.startDecorator||e.startDecorator,[f]),p=Ve(()=>f?.endDecorator||e.endDecorator,[f]),k=A.createElement(Mr,{...d,required:l,onChange:(v,D)=>{c(D);let h=D;s?.({...v,target:{...v.target,value:h?.value}})},color:i,value:f,options:b,size:a,disabled:t,startDecorator:y,endDecorator:p,slots:{listbox:Nr},getOptionLabel:v=>`${v.value||""}`,renderGroup:v=>v});return o?A.createElement(F,{required:l,color:i,size:a,error:r,disabled:t},A.createElement(S,null,o),k,n&&A.createElement(w,null,n)):k}no.displayName="Autocomplete";import{Box as Lr}from"@mui/joy";import{motion as Sr}from"framer-motion";var Hr=Sr(Lr),me=Hr;me.displayName="Box";var Je=me;import O from"react";import{Breadcrumbs as nt,Link as Gr}from"@mui/joy";import ao from"react";import{Menu as zr,MenuButton as Er,MenuItem as Or}from"@mui/joy";import{motion as io}from"framer-motion";var Vr=io(zr),de=e=>ao.createElement(Vr,{...e});de.displayName="Menu";var Jr=io(Er),pe=e=>ao.createElement(Jr,{...e});pe.displayName="MenuButton";var Yr=io(Or),ce=e=>ao.createElement(Yr,{...e});ce.displayName="MenuItem";var tt=de;import{Dropdown as $r}from"@mui/joy";import{motion as Wr}from"framer-motion";var qr=Wr($r),ue=qr;ue.displayName="Dropdown";var rt=ue;function lo(e){let{crumbs:o,size:r,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...t}={link:Gr},slotProps:{link:l,...s}={link:{color:"neutral"}},collapsed:d=!0,...m}=e,c=u=>u.type==="link"&&a?O.createElement(a,{to:u.linkHref,href:u.linkHref,...l},u.label):O.createElement(L,null,u.label);if(!d)return O.createElement(nt,{size:r,slots:t,slotProps:s,...m},o.map(u=>O.createElement(c,{...u})));let b=Math.max(1,i),f=o.slice(0,n).map(u=>O.createElement(c,{...u})),y=(n+b>o.length?o.slice(n):o.slice(-b)).map(u=>O.createElement(c,{...u})),p=o.slice(n,-b).map(u=>O.createElement(ce,null,O.createElement(c,{...u})));return O.createElement(nt,{size:r,slots:t,slotProps:s,...m},f,p.length&&O.createElement(rt,null,O.createElement(pe,{size:r,variant:"plain"},"..."),O.createElement(tt,{size:r},p)),y)}lo.displayName="Breadcrumbs";import Ur,{forwardRef as jr}from"react";import{Button as _r}from"@mui/joy";import{motion as Zr}from"framer-motion";var Xr=Zr(_r),ge=jr((e,o)=>Ur.createElement(Xr,{ref:o,...e}));ge.displayName="Button";var T=ge;import C,{Fragment as he,forwardRef as an,useMemo as ct}from"react";import{styled as J}from"@mui/joy";import ln from"@mui/icons-material/esm/ChevronLeft.js";import sn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as ut,motion as mn}from"framer-motion";var at=e=>{let o=[],r=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((r.getDay()+1)/7),a=Math.ceil((n.getDate()+r.getDay())/7),t=1;for(let l=1;l<=a;l++){let s=[];for(let d=1;d<=7;d++)l===i&&d<r.getDay()+1||t>n.getDate()?s.push(void 0):(s.push(t),t++);o.push(s)}return o},it=(e,o)=>e.toLocaleString(o,{year:"numeric"}),so=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),lt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),st=e=>{let o=new Date().getDay(),r=new Date;return r.setDate(r.getDate()-o),Array.from({length:7}).map(()=>{let n=r.toLocaleString(e,{weekday:"short"});return r.setDate(r.getDate()+1),n})},mt=e=>{let o=new Date,r=new Date(e);return r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()},mo=(e,o)=>{let r=new Date(e),n=new Date(o);return r.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()===n.getTime()},q=(e,o,r)=>{let n=new Date(r);n.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 n>=i&&n<=a},Ye=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import Qr from"react";import{IconButton as Rr}from"@mui/joy";import{motion as Kr}from"framer-motion";var en=Kr(Rr),fe=e=>Qr.createElement(en,{...e});fe.displayName="IconButton";var E=fe;import{useCallback as on,useMemo as tn,useState as $e}from"react";import{useThemeProps as rn}from"@mui/joy";var nn=(e,o)=>o.includes(e)?e:o[0],dt=e=>{let[o,r]=$e(()=>nn(e.view||"day",e.views||["day","month"])),[n,i]=$e(e.defaultValue),[a,t]=$e(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,s],d]=$e([0,0]),m=e.view??o,c=p=>{d([l+p,p])},b=on(p=>{t(p),m==="month"?a.getFullYear()!==p.getFullYear()&&c(p>a?1:-1):c(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,m]),f=rn({props:{locale:"default",views:["day","month"],view:m,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:b,onViewChange:()=>{let p=m==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):r(p))}},name:"Calendar"}),y=tn(()=>({...f,viewMonth:a,direction:s}),[f,a,s]);return[f,y]};import{useCallback as K,useState as pt}from"react";var We=e=>{let[o,r]=pt(null),[n,i]=pt(null);return{calendarTitle:e.view==="month"?it(e.viewMonth,e.locale||"default"):so(e.viewMonth,e.locale||"default"),onPrev:K(()=>{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:K(()=>{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:K(a=>{let t=new Date(e.viewMonth||new Date);t.setHours(0,0,0,0),t.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&q(e.value[0],o,t)||e.value[1]&&q(e.value[0],e.value[1],t));return{"aria-label":t.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:K(a=>{let t=new Date(e.viewMonth||new Date);t.setDate(1),t.setHours(0,0,0,0),t.setMonth(a);let s=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&q(e.value[0],n,t)||e.value[1]&&q(e.value[0],e.value[1],t));return{"aria-label":t.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:K(a=>{let t=new Date(e.viewMonth||new Date);t.setHours(0,0,0,0),t.setDate(a);let l=!!e.value&&(mo(t,e.value[0])||e.value[1]&&mo(t,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&q(e.value[0],o,t)||e.value[1]&&q(e.value[0],e.value[1],t)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),t.getTime())),new Date(Math.max(e.value[0].getTime(),t.getTime()))]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]),r(null)};return{isToday:mt(t),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>r(t):void 0,disabled:e.minDate&&t<e.minDate||e.maxDate&&t>e.maxDate||e.disableFuture&&t>new Date||e.disablePast&&t<(()=>{let m=new Date;return m.setHours(0,0,0,0),m})(),tabIndex:-1,"aria-label":t.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":s?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:K(a=>{let t=new Date(e.viewMonth||new Date);t.setDate(1),t.setHours(0,0,0,0),t.setMonth(a);let l=!e.views?.find(c=>c==="day")&&e.rangeSelection,s=!!e.value&&(Ye(t,e.value[0])||e.value[1]&&Ye(t,e.value[1])),d=l&&e.value&&e.value[0]&&(n&&q(e.value[0],n,t)||e.value[1]&&q(e.value[0],e.value[1],t)),m=()=>{l?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),t.getTime())),new Date(Math.max(e.value[0].getTime(),t.getTime()))]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(t)),i(null)};return{isSelected:s,onMouseEnter:l&&e.value?.[0]&&!e.value?.[1]?()=>i(t):void 0,disabled:e.minDate&&(()=>{let c=new Date(t);return c.setMonth(c.getMonth()+1),c.setDate(0),c<e.minDate})()||e.maxDate&&(()=>{let c=new Date(t);return c.setDate(0),c>e.maxDate})()||e.disableFuture&&t>new Date||e.disablePast&&t<new Date&&!Ye(t,new Date),onClick:m,tabIndex:-1,"aria-label":so(t,e.locale||"default"),"aria-selected":s?"true":void 0,"aria-current":d?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var dn=J("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),pn=J("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),gt=J("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),ft=J(mn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),cn=J("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),un=J("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),gn=J(T,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),fn=J("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}}})),hn=J("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}}})),Cn=J(T,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:r})=>[{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}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),bn=J(T,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:r,disabled:n})=>[{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&&!r&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},r&&{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}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),ht={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})},qe=1e4,Ct=(e,o)=>Math.abs(e)*o,yn=e=>{let{ownerState:o}=e,{getPickerDayProps:r,getDayCellProps:n}=We(o),i=ct(()=>at(o.viewMonth),[o.viewMonth]),a=ct(()=>st(o.locale||"default"),[o.locale]);return C.createElement(gt,{calendarType:"datePicker"},C.createElement(ut,{initial:!1,custom:o.direction},C.createElement(ft,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:ht,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:(t,{offset:l,velocity:s})=>{let d=Ct(l.x,s.x);if(d<-qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()+1),o.onMonthChange?.(m)}else if(d>qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()-1),o.onMonthChange?.(m)}}},C.createElement(cn,null,C.createElement("tr",null,a.map((t,l)=>C.createElement(C.Fragment,null,C.createElement("th",null,C.createElement(L,{level:"body-xs",textAlign:"center"},t)),l<6&&C.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),C.createElement(un,null,i.map((t,l)=>C.createElement(he,{key:`${o.viewMonth}_${l}`},C.createElement("tr",null,t.map((s,d)=>s?C.createElement(he,{key:d},C.createElement(fn,{...n(s)},C.createElement(bn,{size:"sm",variant:"plain",color:"neutral",...r(s)},s)),d<6&&C.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):C.createElement(he,{key:d},C.createElement("td",null),d<6&&C.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&C.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},C.createElement("td",{colSpan:13,style:{height:4}}))))))))},xn=e=>{let{ownerState:o}=e,{getPickerMonthProps:r,getMonthCellProps:n}=We(o),i=Array.from({length:12},(t,l)=>l).reduce((t,l)=>(t[t.length-1].length===4&&t.push([]),t[t.length-1].push(l),t),[[]]),a=!o.views?.find(t=>t==="day")&&o.rangeSelection;return C.createElement(gt,{calendarType:a?"monthPicker":"datePicker"},C.createElement(ut,{initial:!1,custom:o.direction},C.createElement(ft,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:ht,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:(t,{offset:l,velocity:s})=>{let d=Ct(l.x,s.x);if(d<-qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()+1),o.onMonthChange?.(m)}else if(d>qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()-1),o.onMonthChange?.(m)}}},C.createElement("tbody",null,i.map((t,l)=>C.createElement(he,{key:l},C.createElement("tr",null,t.map((s,d)=>C.createElement(he,{key:s},C.createElement(hn,{...n(s)},C.createElement(Cn,{size:"sm",variant:"plain",color:"neutral",...r(s)},lt(s,o.locale))),d<3&&C.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&C.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},C.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ce=an((e,o)=>{let[r,n]=dt(e),{value:i,defaultValue:a,onChange:t,locale:l,onViewChange:s,onMonthChange:d,view:m,views:c,rangeSelection:b,...f}=r,{calendarTitle:y,onPrev:p,onNext:u}=We(n);return C.createElement(dn,{ref:o,...f},C.createElement(pn,null,C.createElement(E,{size:"sm",onClick:p},C.createElement(ln,null)),C.createElement(gn,{ownerState:n,variant:"plain",color:"neutral",onClick:s},y),C.createElement(E,{size:"sm",onClick:u},C.createElement(sn,null))),m==="day"&&C.createElement(yn,{ownerState:n}),m==="month"&&C.createElement(xn,{ownerState:n}))});Ce.displayName="Calendar";var ee=Ce;import{Card as vn,CardContent as Dn,CardCover as Mn,CardActions as kn,CardOverflow as Tn}from"@mui/joy";import{motion as be}from"framer-motion";var Pn=be(vn),ye=Pn;ye.displayName="Card";var wn=be(Dn),po=wn;po.displayName="CardContent";var Fn=be(Mn),co=Fn;co.displayName="CardCover";var An=be(kn),uo=An;uo.displayName="CardActions";var In=be(Tn),go=In;go.displayName="CardOverflow";import Bn from"react";import{Checkbox as Nn}from"@mui/joy";import{motion as Ln}from"framer-motion";var Sn=Ln(Nn),xe=e=>Bn.createElement(Sn,{...e});xe.displayName="Checkbox";var ve=xe;import{styled as Hn}from"@mui/joy";import zn,{forwardRef as En}from"react";var On=Hn("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),fo=En(function(o,r){return zn.createElement(On,{ref:r,...o})});fo.displayName="Container";import G,{useCallback as $n,useState as xt}from"react";import{IntlMessageFormat as Wn}from"intl-messageformat";import{NumericFormat as qn}from"react-number-format";import Gn from"@mui/icons-material/esm/InfoOutlined.js";import De from"react";import{Input as Vn}from"@mui/joy";import{motion as Jn}from"framer-motion";var bt=Jn(Vn),Me=e=>{let{label:o,helperText:r,error:n,style:i,size:a,color:t,disabled:l,required:s,...d}=e;return o?De.createElement(F,{required:s,color:t,size:a,error:n,disabled:l},De.createElement(S,null,o),De.createElement(bt,{...d}),r&&De.createElement(w,null,r)):De.createElement(bt,{required:s,color:t,size:a,disabled:l,...d})};Me.displayName="Input";var U=Me;import Yn from"intl-messageformat";var yt=(e="usd")=>{let[o,r,n]=new Yn(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:r,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var Un=G.forwardRef(function(o,r){let{onChange:n,...i}=o;return G.createElement(qn,{...i,onValueChange:({floatValue:a})=>{n?.({target:{name:o.name,value:a?.toString()}})},valueIsNumericString:!0,getInputRef:r,decimalScale:2})}),vt=G.forwardRef(function(o,r){let{currency:n="usd",max:i=1e5,name:a,onChange:t,label:l,error:s,helperText:d,required:m,disabled:c,...b}=o,{symbol:f,thousandSeparator:y,decimalSeparator:p,placeholder:u,fixedDecimalScale:k}=yt(n),[v,D]=xt(o.value),[h,x]=xt(!!i&&!!o.value&&o.value>i),H=$n($=>{let X=Number($.target.value);D(X),t?.({...$,target:{name:a,value:X}}),i&&X>i?x(!0):x(!1)},[]),M=G.createElement(U,{...b,size:"sm",ref:r,value:v,placeholder:u,onChange:H,disabled:c,required:m,slotProps:{input:{component:Un,decimalSeparator:p,thousandSeparator:y,prefix:f,fixedDecimalScale:k}},sx:{fontFamily:"monospace"}});return l?G.createElement(F,{size:"sm",disabled:c,required:m,error:s||h},G.createElement(S,null,l),M,h?G.createElement(w,null,G.createElement(Gn,null),new Wn(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):d&&G.createElement(w,null,d)):M});import g,{useCallback as oe,useEffect as bo,useMemo as te,useRef as Qn,useState as Rn}from"react";import{styled as Kn,LinearProgress as ea}from"@mui/joy";import oa from"@mui/icons-material/esm/ChevronLeft.js";import ta from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as jn}from"@mui/joy";import{motion as _n}from"framer-motion";var Zn=_n(jn),ke=Zn;ke.displayName="Sheet";var j=ke;import Y from"react";import{Table as Xn}from"@mui/joy";var Te=e=>{let{children:o,...r}=e;return Y.createElement(Xn,{...r},o)};Te.displayName="Table";function ho(e){let{headCells:o,showCheckbox:r,onCheckboxChange:n,slots:{checkbox:i=ve}={},slotProps:{checkbox:a={}}={}}=e;return Y.createElement("thead",null,Y.createElement("tr",null,r&&Y.createElement("th",{style:{width:"40px",textAlign:"center"}},Y.createElement(i,{onChange:n,...a})),o.map(t=>Y.createElement("th",{key:t.label,style:{width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,textAlign:t.numeric?"right":"left"}},t.label))))}ho.displayName="TableHead";function Co(e){let{rows:o,cellOrder:r,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:t=ve}={},slotProps:{checkbox:l={}}={}}=e;return Y.createElement("tbody",null,o.map((s,d)=>Y.createElement("tr",{key:d},i&&Y.createElement("td",{style:{textAlign:"center"}},Y.createElement(t,{onChange:m=>a?.(m,d),...l})),r.map(m=>Y.createElement("td",{key:m,style:{textAlign:n?.[m]?.numeric?"right":"left"}},s[m])))))}Co.displayName="TableBody";var Dt=Kn("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"}}),Ge=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ra(e){let{paginationModel:{page:o,pageSize:r},rowCount:n,onPageChange:i}=e,a=1,t=Math.ceil(n/r),l=[o-2,o-1].filter(c=>c>1),s=[o+1,o+2].filter(c=>c<=t-1),d=t>1&&o<t-3,m=t>1&&o>4;return g.createElement(z,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},g.createElement(z,{direction:"row",spacing:.5,alignItems:"center"},g.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},g.createElement(oa,null)),o!==a&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),m&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(c=>g.createElement(T,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),g.createElement(T,{variant:"soft",size:"sm"},o),s.map(c=>g.createElement(T,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),d&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==t&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(t)},t),g.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===t,"aria-label":"Next page"},g.createElement(ta,null))))}var na=e=>g.createElement(Je,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let r=o.clientX,n=e.current?.getBoundingClientRect().width,i=t=>{n&&r&&(e.current.style.width=`${n+(t.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),aa=e=>{let o=Qn(null),r={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?na(o):null;return g.createElement("th",{ref:o,key:e.field,style:r},e.headerName??e.field,n)};function ia({rows:e,columns:o,rowCount:r,paginationMode:n,paginationModel:i,onPaginationModelChange:a,selectionModel:t=[],onSelectionModelChange:l,getId:s,isTotalSelected:d}){let[m,c]=Rn(i?.page||1),b=i?.pageSize||20,f=oe((h,x)=>s?.(h)??h?.id??`${(x||0)+(m-1)*b}`,[s??m,b]),y=te(()=>new Set(t),[t]),p=te(()=>n==="server"?e:e.slice((m-1)*b,(m-1)*b+b),[e,m,b,n]),u=te(()=>p.length>0&&p.every((h,x)=>y.has(f(h,x))),[p,y,m,b,f]),k=r||e.length,v=te(()=>d??(k>0&&t.length===k),[d,t,k]),D=oe(h=>{c(h),a?.({page:h,pageSize:b})},[a]);return bo(()=>{D(1)},[k]),bo(()=>{m>Math.ceil(k/b)&&D(Math.ceil(k/b))},[k,b]),bo(()=>{l?.([])},[m]),{rowCount:k,page:m,pageSize:b,onPaginationModelChange:D,getId:f,HeadCell:aa,dataInPage:p,isAllSelected:u,isTotalSelected:v,isSelectedRow:oe(h=>y.has(h),[y]),onAllCheckboxChange:oe(()=>{l?.(u?[]:p.map(f))},[u,p,l]),onCheckboxChange:oe((h,x)=>{if(y.has(x)){let H=t.filter(M=>M!==x);l?.(H)}else{let H=[...t,x];l?.(H)}},[t,l]),columns:te(()=>o||Object.keys(e[0]||{}).map(h=>({field:h})),[e,o]),onTotalSelect:oe(()=>{l?.(v?[]:e.map(f),!v)},[v,e,l])}}function yo(e){let{rows:o,checkboxSelection:r,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:t,onPaginationModelChange:l,paginationMode:s,paginationModel:d,loading:m,slots:{checkbox:c=ve,toolbar:b,footer:f,loadingOverlay:y=()=>g.createElement(ea,{value:8,variant:"plain"})}={},slotProps:{checkbox:p={},toolbar:u,background:k={}}={},...v}=e,{columns:D,isAllSelected:h,isSelectedRow:x,onAllCheckboxChange:H,onCheckboxChange:M,getId:$,rowCount:X,page:Xo,pageSize:Qo,onPaginationModelChange:Wt,dataInPage:qt,isTotalSelected:Ro,onTotalSelect:Ko,HeadCell:Gt}=ia(e);return g.createElement(Je,null,g.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&g.createElement(z,{direction:"row",spacing:1},!h&&g.createElement(L,{level:"body-xs"},Ge(n?.length||0)," items selected"),h&&!Ro&&g.createElement(z,{direction:"row",spacing:1,alignItems:"center"},g.createElement(L,{level:"body-xs"},"All ",Ge(n?.length||0)," items on this page are selected."),g.createElement(T,{size:"sm",variant:"plain",onClick:Ko},"Select all ",Ge(X??o.length)," items")),Ro&&g.createElement(z,{direction:"row",spacing:1,alignItems:"center"},g.createElement(L,{level:"body-xs"},"All ",Ge(X??o.length)," items are selected."),g.createElement(T,{size:"sm",variant:"plain",color:"danger",onClick:Ko},"Cancel"))),b&&g.createElement(b,{...u||{}})),g.createElement(j,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...k},g.createElement(Te,{...v},g.createElement("thead",null,g.createElement("tr",null,r&&g.createElement("th",{style:{width:"40px",textAlign:"center"}},g.createElement(c,{onChange:H,checked:h,indeterminate:(n||[]).length>0&&!h,...p})),D.map(Q=>g.createElement(Gt,{key:Q.field,stickyHeader:e.stickyHeader,...Q})))),g.createElement("tbody",null,g.createElement(Dt,null,!!m&&g.createElement("td",null,g.createElement(Je,{sx:{position:"absolute",top:0,left:0,right:0}},g.createElement(y,null)))),g.createElement(Dt,null),qt.map((Q,Ut)=>{let R=$(Q,Ut);return g.createElement("tr",{key:R,role:r?"checkbox":void 0,tabIndex:r?-1:void 0,onClick:r?W=>M(W,R):void 0,"aria-checked":r?x(R):void 0},r&&g.createElement("th",{scope:"row",style:{textAlign:"center"}},g.createElement(c,{onChange:W=>M(W,R),checked:x(R),...p})),D.map(W=>g.createElement("td",{key:W.field,style:{textAlign:W.type==="number"?"end":"start"}},W.renderCell?.({row:Q,value:Q[W.field],id:R})??Q[W.field])))})),f&&g.createElement(f,null))),g.createElement(ra,{paginationModel:te(()=>({page:Xo,pageSize:Qo}),[Xo,Qo]),rowCount:X,onPageChange:Wt}))}yo.displayName="DataTable";import I,{forwardRef as ca,useCallback as Mt,useEffect as ua,useState as kt}from"react";import{IMaskInput as ga,IMask as xo}from"react-imask";import fa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Tt}from"@mui/joy";import{FocusTrap as ha,ClickAwayListener as Ca,Popper as ba}from"@mui/base";import{DialogActions as la,styled as sa}from"@mui/joy";import{motion as ma}from"framer-motion";var da=ma(la),pa=sa(da)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Pe=pa;Pe.displayName="DialogActions";var _=Pe;var ya=Tt(ba,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),xa=Tt(j,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Pt=e=>{let o=`${e.getDate()}`,r=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(r)<10&&(r="0"+r),[n,r,o].join("/")},va=I.forwardRef(function(o,r){let{onChange:n,...i}=o;return I.createElement(ga,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:xo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:xo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:xo.MaskedRange,from:1900,to:9999}},format:Pt,parse:a=>{let t=a.split("/");return new Date(Number(t[0]),Number(t[1])-1,Number(t[2]))},autofix:"pad",overwrite:!0})}),vo=ca((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:s,disableFuture:d,disablePast:m,required:c,...b}=e,[f,y]=kt(e.value||""),[p,u]=kt(null),k=!!p;ua(()=>{y(e.value||"")},[e.value]);let v=Mt(x=>{y(x.target.value),r?.(x)},[]),D=Mt(x=>{u(p?null:x.currentTarget)},[p,u]),h=I.createElement(I.Fragment,null,I.createElement(U,{...b,ref:o,size:"sm",value:f,onChange:v,placeholder:"YYYY/MM/DD",disabled:n,required:c,slotProps:{input:{component:va}},sx:{fontFamily:"monospace"},endDecorator:I.createElement(E,{variant:"plain",onClick:D},I.createElement(fa,null))}),k&&I.createElement(Ca,{onClickAway:()=>u(null)},I.createElement(ya,{id:"date-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},I.createElement(ha,{open:!0},I.createElement(xa,{tabIndex:-1,role:"presentation"},I.createElement(ee,{value:Number.isNaN(new Date(f).getTime())?void 0:[new Date(f),void 0],onChange:([x])=>{y(Pt(x)),u(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:m}),I.createElement(_,{sx:{p:1}},I.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?I.createElement(F,{required:c,disabled:n,error:a,size:"sm"},I.createElement(S,null,i),h,t&&I.createElement(w,null,t)):h});vo.displayName="DatePicker";import B,{forwardRef as Da,useCallback as Do,useEffect as Ma,useMemo as ka,useState as wt}from"react";import{IMaskInput as Ta,IMask as Mo}from"react-imask";import Pa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ft}from"@mui/joy";import{FocusTrap as wa,ClickAwayListener as Fa,Popper as Aa}from"@mui/base";var Ia=Ft(Aa,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ba=Ft(j,{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})),At=([e,o])=>{let r=n=>{let i=`${n.getDate()}`,a=`${n.getMonth()+1}`,t=n.getFullYear();return Number(i)<10&&(i="0"+i),Number(a)<10&&(a="0"+a),[t,a,i].join("/")};return[r(e),o?r(o):""].join(" - ")},It=e=>{let o=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",n=o.split("/"),i=r.split("/");return[new Date(Number(n[0]),Number(n[1])-1,Number(n[2])),new Date(Number(i[0]),Number(i[1])-1,Number(i[2]))]},Na=B.forwardRef(function(o,r){let{onChange:n,...i}=o;return B.createElement(Ta,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Mo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Mo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Mo.MaskedRange,from:1900,to:9999}},format:At,parse:It,autofix:"pad",overwrite:!0})}),ko=Da((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:s,disableFuture:d,disablePast:m,required:c,...b}=e,[f,y]=wt(e.value||""),[p,u]=wt(null),k=!!p,v=ka(()=>f?It(f):void 0,[f]);Ma(()=>{y(e.value||"")},[e.value]);let D=Do(M=>{y(M.target.value),r?.(M)},[r]),h=Do(M=>{u(p?null:M.currentTarget)},[p,u]),x=Do(([M,$])=>{!M||!$||(y(At([M,$])),u(null))},[y,u]),H=B.createElement(B.Fragment,null,B.createElement(U,{...b,ref:o,size:"sm",value:f,onChange:D,disabled:n,required:c,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:Na}},sx:{fontFamily:"monospace"},endDecorator:B.createElement(E,{variant:"plain",onClick:h},B.createElement(Pa,null))}),k&&B.createElement(Fa,{onClickAway:()=>u(null)},B.createElement(Ia,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},B.createElement(wa,{open:!0},B.createElement(Ba,{tabIndex:-1,role:"presentation"},B.createElement(ee,{rangeSelection:!0,defaultValue:v,onChange:x,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:m}),B.createElement(_,{sx:{p:1}},B.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?B.createElement(F,{required:c,disabled:n,error:a,size:"sm"},B.createElement(S,null,i),H,t&&B.createElement(w,null,t)):H});ko.displayName="DateRangePicker";import{DialogContent as La,styled as Sa}from"@mui/joy";import{motion as Ha}from"framer-motion";var za=Ha(La),Ea=Sa(za)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),we=Ea;we.displayName="DialogContent";var Ue=we;import{DialogTitle as Oa,styled as Va}from"@mui/joy";import{motion as Ja}from"framer-motion";var Ya=Ja(Oa),$a=Va(Ya)(({theme:e})=>({padding:e.spacing(2,3)})),Fe=$a;Fe.displayName="DialogTitle";var je=Fe;import Ie from"react";import _e from"react";import{Modal as Wa,ModalDialog as qa,ModalClose as Ga,ModalOverflow as Ua,styled as Bt}from"@mui/joy";import{motion as Ze}from"framer-motion";var ja=Ze(Wa),To=ja;To.displayName="Modal";var _a=Ze(qa),Nt=Bt(_a)({padding:0}),Ae=Nt;Ae.displayName="ModalDialog";var Za=Bt(Ze(Ga))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),Xe=Za;Xe.displayName="ModalClose";var Xa=Ze(Ua),Po=Xa;Po.displayName="ModalOverflow";function wo(e){let{title:o,children:r,...n}=e;return _e.createElement(Nt,{...n},_e.createElement(Xe,null),_e.createElement(je,null,o),_e.createElement(Ue,null,r))}wo.displayName="ModalFrame";import{styled as Qa}from"@mui/joy";var Ra=Qa(Ae)(({theme:e})=>({padding:0})),Fo=Ie.forwardRef((e,o)=>{let{title:r,children:n,actions:i,...a}=e;return Ie.createElement(Ra,{ref:o,...a},Ie.createElement(je,null,r),Ie.createElement(Ue,null,n),Ie.createElement(_,null,i))});Fo.displayName="DialogFrame";import Ka from"react";import{Divider as ei}from"@mui/joy";import{motion as oi}from"framer-motion";var ti=oi(ei),Be=e=>Ka.createElement(ti,{...e});Be.displayName="Divider";import ri from"react";import{Drawer as ni}from"@mui/joy";import{motion as ai}from"framer-motion";var ii=ai(ni),Ao=e=>{let{children:o,...r}=e;return ri.createElement(ii,{...r,slotProps:{...r.slotProps,content:{...r.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Ao.displayName="InsetDrawer";import P,{useCallback as Qe,useEffect as li,useRef as Lt,useState as Io}from"react";import{styled as re}from"@mui/joy";import si from"@mui/icons-material/esm/Delete.js";import{combine as mi}from"@atlaskit/pragmatic-drag-and-drop/combine";import{dropTargetForExternal as di,monitorForExternal as pi}from"@atlaskit/pragmatic-drag-and-drop/external/adapter";import{containsFiles as St,getFiles as ci}from"@atlaskit/pragmatic-drag-and-drop/external/file";import{preventUnhandled as Ht}from"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled";var ui=re("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),gi=re("div",{name:"FileUpload",slot:"PreviewRoot"})(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, auto))",gap:"8px"})),fi=e=>{let{files:o,onDelete:r}=e;return P.createElement(gi,null,o.map(n=>P.createElement(ye,{key:n.name},P.createElement(z,{style:{aspectRatio:"4/3",height:"200px"},alignItems:"center",justifyContent:"center"},n.type.startsWith("image/")?P.createElement("img",{style:{width:"100%",height:"100%",objectFit:"cover"},src:URL.createObjectURL(n),alt:n.name}):P.createElement(L,{level:"title-md",textColor:"neutral.400"},n.type)),P.createElement(z,{direction:"row",justifyContent:"space-between",gap:"8px"},P.createElement(z,null,P.createElement(L,{level:"title-sm",textColor:"common.black"},n.name),P.createElement(L,{level:"body-sm",textColor:"neutral.600"},(n.size/1e3).toFixed(2),"KB")),P.createElement(E,{onClick:()=>r?.(n)},P.createElement(si,null))))))},hi=re(z,{name:"FileUpload",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),Ci=re("label",{name:"FileUpload",slot:"label"})({}),bi=re("div",{name:"FileUpload",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",backgroundColor:o==="over"?e.palette.background.level2:e.palette.background.backdrop,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(3),gap:e.spacing(2),border:o==="idle"?"2px solid rgba(0,0,0,0)":`2px dashed ${e.palette.primary[400]}`})),yi=re(T,{name:"FileUpload",slot:"button"})({}),Bo=P.memo(e=>{let{accept:o,maxCount:r,name:n,maxTotalSize:i,maxSizePerFile:a,onChange:t}=e,l=Lt(null),s=Lt(null),[d,m]=Io([]),[c,b]=Io("idle"),[f,y]=Io(),p=Qe(D=>{try{a&&D.forEach(x=>{if(x.size>a)throw new Error(`File size exceeds the limit: ${a}`)});let h=[...d,...D];if(r&&h.length>r)throw new Error(`File count exceeds the limit: ${r}`);if(i&&h.reduce((x,H)=>x+H.size,0)>i)throw new Error(`Total file size exceeds the limit: ${i}`);t?.({target:{name:n,value:h}}),y(void 0),m(h)}catch(h){y(h.message)}},[d]);li(()=>{let D=l.current;if(!D)throw new Error("Drop zone ref is not set");return mi(di({element:D,canDrop:St,onDragEnter:()=>b("over"),onDragLeave:()=>b("potential"),onDrop:async({source:h})=>{let x=await ci({source:h});p(x)}}),pi({canMonitor:St,onDragStart:()=>{b("potential"),Ht.start()},onDrop:()=>{b("idle"),Ht.stop()}}))});let u=Qe(D=>{let h=Array.from(D.target.files||[]);p(h)},[p]),k=Qe(D=>{m(h=>(t?.({target:{name:n,value:h.filter(x=>x!==D)}}),h.filter(x=>x!==D)))},[]),v=Qe(()=>{s.current?.click()},[]);return P.createElement(hi,null,P.createElement(F,{error:!!f},P.createElement(bi,{state:c,ref:l},P.createElement(Ci,null,P.createElement(L,{level:"h3",textColor:"background.tooltip"},"Drop files"),P.createElement(ui,{type:"file",onChange:u,multiple:!0,accept:o,ref:s})),P.createElement(yi,{variant:"soft",color:"neutral",onClick:v},"Select Files"),f&&P.createElement(w,null,f))),P.createElement(fi,{files:d,onDelete:k}))});Bo.displayName="FileUpload";import{Grid as xi}from"@mui/joy";import{motion as vi}from"framer-motion";var Di=vi(xi),No=Di;No.displayName="Grid";import Z from"react";import Mi from"react-markdown";import{Link as ki}from"@mui/joy";var Lo=e=>{let{...o}=e;return Z.createElement(Mi,{...o,components:{h1:({children:r})=>Z.createElement(V,{level:"h1"},r),h2:({children:r})=>Z.createElement(V,{level:"h2"},r),h3:({children:r})=>Z.createElement(V,{level:"h3"},r),h4:({children:r})=>Z.createElement(V,{level:"h4"},r),p:({children:r})=>Z.createElement(V,null,r),a:({children:r,href:n})=>Z.createElement(ki,{href:n},r),hr:()=>Z.createElement(Be,null),...o?.components}})};Lo.displayName="Markdown";import N,{forwardRef as Ti,useCallback as So,useEffect as Pi,useMemo as wi,useState as zt}from"react";import{IMaskInput as Fi,IMask as Et}from"react-imask";import Ai from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ot}from"@mui/joy";import{FocusTrap as Ii,ClickAwayListener as Bi,Popper as Ni}from"@mui/base";var Li=Ot(Ni,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Si=Ot(j,{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})),Ho=e=>{let o=`${e.getMonth()+1}`,r=e.getFullYear();return Number(o)<10&&(o="0"+o),[r,o].join("/")},zo=([e,o])=>{let r=n=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(n))return n;let i=n.split("/"),a=new Date(Number(i[0]),Number(i[1])-1);return Ho(a)};return[r(e),r(o)].join(" - ")},Eo=e=>{let o=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[o,r]},Hi=N.forwardRef(function(o,r){let{onChange:n,...i}=o;return N.createElement(Fi,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Et.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Et.MaskedRange,from:1900,to:9999}},format:zo,parse:Eo})}),Oo=Ti((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:s,disableFuture:d,disablePast:m,required:c,...b}=e,[f,y]=zt(""),[p,u]=zt(null),k=!!p,v=wi(()=>f?Eo(f).map(M=>new Date(M)):void 0,[f]);Pi(()=>{y(e.value?zo(Eo(e.value)):"")},[e.value]);let D=So(M=>{y(M.target.value),r?.(M)},[r]),h=So(M=>{u(p?null:M.currentTarget)},[p,u]),x=So(([M,$])=>{!M||!$||(y(zo([Ho(M),Ho($)])),u(null))},[y,u]),H=N.createElement(N.Fragment,null,N.createElement(U,{...b,ref:o,size:"sm",value:f,onChange:D,disabled:n,required:c,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Hi}},sx:{fontFamily:"monospace"},endDecorator:N.createElement(E,{variant:"plain",onClick:h},N.createElement(Ai,null))}),k&&N.createElement(Bi,{onClickAway:()=>u(null)},N.createElement(Li,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},N.createElement(Ii,{open:!0},N.createElement(Si,{tabIndex:-1,role:"presentation"},N.createElement(ee,{view:"month",views:["month"],rangeSelection:!0,defaultValue:v,onChange:x,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:m}),N.createElement(_,{sx:{p:1}},N.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?N.createElement(F,{required:c,disabled:n,error:a,size:"sm"},N.createElement(S,null,i),H,t&&N.createElement(w,null,t)):H});Oo.displayName="MonthRangePicker";import{Radio as zi,RadioGroup as Ei}from"@mui/joy";import{motion as Vt}from"framer-motion";var Oi=Vt(zi),Ne=Oi;Ne.displayName="Radio";var Vi=Vt(Ei),Le=Vi;Le.displayName="RadioGroup";import Jt from"react";function Vo(e){let{items:o,...r}=e;return Jt.createElement(Le,{...r},o.map(n=>Jt.createElement(Ne,{key:`${n.value}`,value:n.value,label:n.label})))}Vo.displayName="RadioList";import Re from"react";import{Select as Ji,Option as Yi}from"@mui/joy";import{motion as $i}from"framer-motion";var Wi=$i(Yi),Jo=Wi;Jo.displayName="Option";function Yo(e){let{label:o,helperText:r,error:n,size:i,color:a,disabled:t,required:l,onChange:s,...d}=e,c=Re.createElement(Ji,{...d,required:l,disabled:t,size:i,color:a,onChange:(b,f)=>{let y=b||{target:{}},p={...y,target:{name:y.target?.name||e.name,value:f||void 0}};s?.(p)}});return o?Re.createElement(F,{required:l,disabled:t,size:i,color:a,error:n},Re.createElement(S,null,o),c,r&&Re.createElement(w,null,r)):c}Yo.displayName="Select";import Yt from"react";import{Switch as qi,styled as Gi,switchClasses as Ui}from"@mui/joy";import{motion as $t}from"framer-motion";var ji=$t(qi),_i=Gi($t.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)",[`&.${Ui.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Zi=e=>Yt.createElement(_i,{...e,layout:!0,transition:Xi}),Xi={type:"spring",stiffness:700,damping:30},$o=e=>Yt.createElement(ji,{...e,slots:{thumb:Zi,...e.slots}});$o.displayName="Switch";import{Tabs as Qi,Tab as Ri,TabList as Ki,TabPanel as el,styled as ol,tabClasses as tl}from"@mui/joy";import{motion as Ke}from"framer-motion";var rl=Ke(Qi),Wo=rl;Wo.displayName="Tabs";var nl=ol(Ke(Ri))(({theme:e})=>({[`&:not(.${tl.selected})`]:{color:e.palette.neutral[700]}})),qo=nl;qo.displayName="Tab";var al=Ke(Ki),Go=al;Go.displayName="TabList";var il=Ke(el),Uo=il;Uo.displayName="TabPanel";import eo from"react";import{Textarea as ll}from"@mui/joy";import{motion as sl}from"framer-motion";var ml=sl(ll),jo=e=>{let{label:o,error:r,helperText:n,color:i,size:a,disabled:t,required:l,...s}=e,d=eo.createElement(ml,{required:l,disabled:t,color:i,size:a,...s});return o?eo.createElement(F,{required:l,disabled:t,color:i,size:a,error:r},eo.createElement(S,null,o),d,n&&eo.createElement(w,null,n)):d};jo.displayName="Textarea";import oo from"react";import{CssBaseline as dl,CssVarsProvider as pl,checkboxClasses as cl,extendTheme as ul}from"@mui/joy";var gl=ul({cssVarPrefix:"ceed",components:{JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr[aria-checked=false] th":{"--TableCell-headBackground":"transparent"},"& tbody tr[aria-checked=true]:hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr[aria-checked=true]:not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr[aria-checked=true]:not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${cl.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function _o(e){return oo.createElement(oo.Fragment,null,oo.createElement(pl,{theme:gl},oo.createElement(dl,null),e.children))}_o.displayName="ThemeProvider";import fl from"react";import{Tooltip as hl}from"@mui/joy";import{motion as Cl}from"framer-motion";var bl=Cl(hl),Zo=e=>fl.createElement(bl,{...e});Zo.displayName="Tooltip";export{Ee as Accordion,ze as AccordionDetails,He as AccordionSummary,to as Accordions,ro as Alert,Hf as AspectRatio,no as Autocomplete,Pf as AutocompleteListbox,wf as AutocompleteOption,Bf as Avatar,Lf as AvatarGroup,Ef as Badge,me as Box,lo as Breadcrumbs,ge as Button,Ce as Calendar,ye as Card,uo as CardActions,po as CardContent,co as CardCover,go as CardOverflow,xe as Checkbox,Gf as Chip,jf as CircularProgress,fo as Container,vt as CurrencyInput,yo as DataTable,vo as DatePicker,ko as DateRangePicker,Pe as DialogActions,we as DialogContent,Fo as DialogFrame,Fe as DialogTitle,Be as Divider,Zf as Drawer,ue as Dropdown,Bo as FileUpload,ie as FormControl,se as FormHelperText,le as FormLabel,No as Grid,fe as IconButton,Me as Input,Ao as InsetDrawer,Qf as LinearProgress,uh as Link,Kf as List,oh as ListDivider,rh as ListItem,ah as ListItemButton,lh as ListItemContent,mh as ListItemDecorator,ph as ListSubheader,Lo as Markdown,de as Menu,pe as MenuButton,ce as MenuItem,To as Modal,Xe as ModalClose,Ae as ModalDialog,wo as ModalFrame,Po as ModalOverflow,Oo as MonthRangePicker,Jo as Option,Ne as Radio,Le as RadioGroup,Vo as RadioList,Yo as Select,ke as Sheet,kh as Skeleton,fh as Slider,ae as Stack,Ch as Step,yh as StepButton,vh as StepIndicator,Dh as Stepper,$o as Switch,qo as Tab,Go as TabList,Uo as TabPanel,Te as Table,Co as TableBody,ho as TableHead,Wo as Tabs,jo as Textarea,_o as ThemeProvider,Zo as Tooltip,V as Typography,Df as accordionClasses,Mf as accordionDetailsClasses,Tf as accordionSummaryClasses,kf as accordionsClasses,Jg as alertClasses,zf as aspectRatioClasses,Ff as autocompleteClasses,Af as autocompleteListboxClasses,If as autocompleteOptionClasses,Nf as avatarClasses,Sf as avatarGroupClasses,Of as badgeClasses,Yg as boxClasses,Vf as breadcrumbsClasses,$g as buttonClasses,Yf as cardActionsClasses,Jf as cardClasses,$f as cardContentClasses,Wf as cardCoverClasses,qf as cardOverflowClasses,Wg as checkboxClasses,Uf as chipClasses,_f as circularProgressClasses,Cf as dialogActionsClasses,hf as dialogContentClasses,ff as dialogTitleClasses,qg as dividerClasses,Xf as drawerClasses,nf as formControlClasses,lf as formHelperTextClasses,af as formLabelClasses,sf as gridClasses,Gg as iconButtonClasses,Ug as inputClasses,Rf as linearProgressClasses,gh as linkClasses,eh as listClasses,th as listDividerClasses,ih as listItemButtonClasses,nh as listItemClasses,sh as listItemContentClasses,dh as listItemDecoratorClasses,ch as listSubheaderClasses,_g as menuButtonClasses,jg as menuClasses,Zg as menuItemClasses,pf as modalClasses,cf as modalCloseClasses,uf as modalDialogClasses,gf as modalOverflowClasses,Xg as optionClasses,Qg as radioClasses,Rg as radioGroupClasses,Kg as selectClasses,df as sheetClasses,Th as skeletonClasses,hh as sliderClasses,mf as stackClasses,xh as stepButtonClasses,bh as stepClasses,Mh as stepperClasses,ef as switchClasses,xf as tabListClasses,vf as tabPanelClasses,of as tableClasses,yf as tabsClasses,tf as textareaClasses,bf as tooltipClasses,rf as typographyClasses,Og as useColorScheme,Eg as useTheme,Vg as useThemeProps};
|