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