@ceed/ads 0.0.146 → 0.0.147

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