@ceed/ads 0.1.49-4 → 0.1.49

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.
@@ -1,11 +1,8 @@
1
1
  import React from "react";
2
2
  import { SwitchProps } from "@mui/joy";
3
3
  import { MotionProps } from "framer-motion";
4
- type CustomSwitchProps = SwitchProps & {
5
- name?: string;
6
- };
7
4
  declare const Switch: {
8
- (props: CustomSwitchProps & MotionProps): React.JSX.Element;
5
+ (props: SwitchProps & MotionProps): React.JSX.Element;
9
6
  displayName: string;
10
7
  };
11
8
  export { Switch };
@@ -1,5 +1,5 @@
1
1
  import React, { ComponentProps } from "react";
2
- import { CssBaseline, extendTheme } from "@mui/joy";
2
+ import { CssBaseline } from "@mui/joy";
3
3
  import { StyleOverrides, Theme } from "@mui/joy";
4
4
  import { CalendarOwnerState, CalendarProps, CalendarSlot } from "../Calendar/types";
5
5
  import { CurrencyInput } from "../CurrencyInput";
@@ -40,11 +40,9 @@ declare module "@mui/joy/styles" {
40
40
  };
41
41
  }
42
42
  }
43
- declare const defaultTheme: Partial<Theme>;
44
- export { CssBaseline, defaultTheme as theme, extendTheme };
43
+ export { CssBaseline };
45
44
  declare function ThemeProvider(props: {
46
45
  children?: React.ReactNode;
47
- theme?: Theme;
48
46
  }): React.JSX.Element;
49
47
  declare namespace ThemeProvider {
50
48
  var displayName: string;
@@ -43,6 +43,6 @@ export { Switch } from "./Switch";
43
43
  export { Table, TableHead, TableBody } from "./Table";
44
44
  export { Tabs, Tab, TabList, TabPanel } from "./Tabs";
45
45
  export { Textarea } from "./Textarea";
46
- export { ThemeProvider, CssBaseline, extendTheme, theme } from "./ThemeProvider";
46
+ export { ThemeProvider, CssBaseline } from "./ThemeProvider";
47
47
  export { Tooltip } from "./Tooltip";
48
48
  export { Typography } from "./Typography";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { useTheme, useColorScheme, useThemeProps, ButtonGroup, alertClasses, 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, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, breadcrumbsClasses, cardClasses, cardActionsClasses, cardContentClasses, cardCoverClasses, cardOverflowClasses, chipClasses, CircularProgress, circularProgressClasses, Drawer, 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 { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CssBaseline, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, extendTheme, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, PercentageInput, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Step, StepIndicator, Stepper, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
1
+ export { useTheme, useColorScheme, useThemeProps, alertClasses, 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, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, breadcrumbsClasses, cardClasses, cardActionsClasses, cardContentClasses, cardCoverClasses, cardOverflowClasses, chipClasses, CircularProgress, circularProgressClasses, Drawer, 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 { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CssBaseline, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, PercentageInput, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Step, StepIndicator, Stepper, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{useTheme as Ey,useColorScheme as Ly,useThemeProps as Oy,ButtonGroup as Hy,alertClasses as zy,boxClasses as Vy,buttonClasses as Ry,checkboxClasses as Yy,dividerClasses as $y,iconButtonClasses as Jy,inputClasses as Uy,menuClasses as _y,menuButtonClasses as Gy,menuItemClasses as Wy,optionClasses as qy,radioClasses as Ky,radioGroupClasses as jy,selectClasses as Zy,switchClasses as Xy,tableClasses as Qy,textareaClasses as eb,typographyClasses as ob,formControlClasses as tb,formLabelClasses as rb,formHelperTextClasses as nb,gridClasses as ab,stackClasses as ib,sheetClasses as lb,modalClasses as sb,modalCloseClasses as pb,modalDialogClasses as db,modalOverflowClasses as mb,dialogTitleClasses as cb,dialogContentClasses as ub,dialogActionsClasses as gb,tooltipClasses as fb,tabsClasses as hb,tabListClasses as Cb,tabPanelClasses as yb,accordionClasses as bb,accordionDetailsClasses as xb,accordionGroupClasses as vb,accordionSummaryClasses as Db,AutocompleteListbox as Mb,AutocompleteOption as Pb,autocompleteClasses as Tb,autocompleteListboxClasses as kb,autocompleteOptionClasses as wb,Avatar as Ib,avatarClasses as Sb,AvatarGroup as Ab,avatarGroupClasses as Nb,AspectRatio as Fb,aspectRatioClasses as Bb,Badge as Eb,badgeClasses as Lb,breadcrumbsClasses as Ob,cardClasses as Hb,cardActionsClasses as zb,cardContentClasses as Vb,cardCoverClasses as Rb,cardOverflowClasses as Yb,chipClasses as $b,CircularProgress as Jb,circularProgressClasses as Ub,Drawer as _b,drawerClasses as Gb,LinearProgress as Wb,linearProgressClasses as qb,List as Kb,listClasses as jb,ListDivider as Zb,listDividerClasses as Xb,ListItem as Qb,listItemClasses as ex,ListItemButton as ox,listItemButtonClasses as tx,ListItemContent as rx,listItemContentClasses as nx,ListItemDecorator as ax,listItemDecoratorClasses as ix,ListSubheader as lx,listSubheaderClasses as sx,Link as px,linkClasses as dx,Slider as mx,sliderClasses as cx,stepClasses as ux,StepButton as gx,stepButtonClasses as fx,stepperClasses as hx,Skeleton as Cx,skeletonClasses as yx}from"@mui/joy";import ke from"react";import{AccordionGroup as jr,Accordion as Zr,AccordionSummary as Xr,AccordionDetails as Qr}from"@mui/joy";import{motion as mo}from"framer-motion";var en=mo(Xr),co=en;co.displayName="AccordionSummary";var on=mo(Qr),uo=on;uo.displayName="AccordionDetails";var tn=mo(Zr);function go(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ke.createElement(tn,{variant:r,color:i,...a},ke.createElement(co,{variant:r,color:i},o),ke.createElement(uo,{variant:r,color:i},t))}go.displayName="Accordion";var rn=mo(jr);function Go(e){let{variant:o,color:t,items:n,...i}=e;return ke.createElement(rn,{variant:o,color:t,...i},n.map((a,r)=>ke.createElement(go,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}Go.displayName="Accordions";import fo from"react";import{Alert as cn,styled as un}from"@mui/joy";import{motion as gn}from"framer-motion";import nn from"react";import{Typography as an}from"@mui/joy";import{motion as ln}from"framer-motion";var sn=ln(an),ee=e=>nn.createElement(sn,{...e});ee.displayName="Typography";var G=ee;import{Stack as pn}from"@mui/joy";import{motion as dn}from"framer-motion";var mn=dn(pn),we=mn;we.displayName="Stack";var L=we;var fn=un(gn(cn))({alignItems:"flex-start",fontWeight:"unset"});function Wo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return fo.createElement(fn,{...a,color:i,endDecorator:n,invertedColors:r},fo.createElement(L,null,o&&fo.createElement(G,{level:"title-sm",color:i},o),fo.createElement(G,{level:"body-sm",color:i},t)))}Wo.displayName="Alert";import O,{useCallback as qo,useEffect as Hn,useMemo as Be,useRef as zn}from"react";import{Autocomplete as Vn,AutocompleteOption as Rn,ListSubheader as Yn,AutocompleteListbox as $n,ListItemDecorator as _t,CircularProgress as Jn,styled as Gt}from"@mui/joy";import Un from"@mui/icons-material/Close";import{useVirtualizer as _n}from"@tanstack/react-virtual";import{Popper as Gn}from"@mui/base";import{FormControl as hn,styled as Cn}from"@mui/joy";import{motion as yn}from"framer-motion";var bn=Cn(yn(hn))({width:"100%"}),Ie=bn;Ie.displayName="FormControl";var se=Ie;import{FormLabel as xn}from"@mui/joy";import{motion as vn}from"framer-motion";var Dn=vn(xn),Se=Dn;Se.displayName="FormLabel";var pe=Se;import{FormHelperText as Mn}from"@mui/joy";import{motion as Pn}from"framer-motion";var Tn=Pn(Mn),Ae=Tn;Ae.displayName="FormHelperText";var de=Ae;import{Chip as kn}from"@mui/joy";import{motion as wn}from"framer-motion";var In=wn(kn),Ne=In;Ne.displayName="Chip";var Ut=Ne;import Sn from"react";import{IconButton as An}from"@mui/joy";import{motion as Nn}from"framer-motion";var Fn=Nn(An),Fe=e=>Sn.createElement(Fn,{...e});Fe.displayName="IconButton";var Y=Fe;import{useState as Bn,useCallback as En,useEffect as Ln,useRef as On}from"react";function U(e,o,t,n){let{current:i}=On(e!==void 0),[a,r]=Bn(e??o);Ln(()=>{i&&r(e??o)},[e,o,i]);let d=En(l=>{let s=typeof l=="function"?l(a):l;(n?.disableStrict||!i)&&r(s),t?.(s)},[i,t,a,n]);return[a,d]}var Wn=Gt(Gn,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),qn=O.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:d="md"},...l}=e,s=zn(null),p=a[0].every(x=>x.hasOwnProperty("group")),c=r?[a[1]]:a[0].length===0?[a[2]]:p?a[0].flatMap(x=>[O.createElement(Yn,{key:x.key,component:"li"},x.group),...x.children]):a[0],y=_n({count:c.length,estimateSize:()=>36,getScrollElement:()=>s.current,measureElement:x=>x.clientHeight,overscan:5}),h=y.getVirtualItems();return Hn(()=>{n&&y.measure()},[n,y]),O.createElement(Wn,{ref:o,anchorEl:t,open:n,modifiers:i},O.createElement($n,{...l},O.createElement("div",{ref:s,style:{overflow:"auto"}},O.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},h.map(({index:x,size:m,start:f,key:D})=>O.cloneElement(c[x],{key:D,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${d})`,height:`${m}px`,transform:`translateY(${f}px)`,overflow:"visible"},children:O.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},c[x].props.children)}))))))}),ho={sm:"20px",md:"24px",lg:"28px"},Kn=Gt(Y,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:ho[o],height:ho[o],minWidth:ho[o],minHeight:ho[o],borderRadius:"50%"}));function Ee(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,onChange:l,onChangeComplete:s,sx:p,className:c,...y}=e,[h,x]=U(e.value,e.defaultValue||"",qo(C=>l?.({target:{value:C,name:e.name}}),[l,e.name])),m=Be(()=>e.options.map(C=>typeof C!="object"?{value:C,label:C}:C),[e.options]),f=Be(()=>{let C=new Map;return m.forEach(P=>{C.set(P.value,P)}),C},[m]),D=Be(()=>e.loading?{value:"",label:"",startDecorator:O.createElement(Jn,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(h)?h.map(C=>f.get(C||"")).filter(Boolean):f.get(h),[h,f,e.loading]),g=qo(C=>O.isValidElement(C)&&!e.loading?O.cloneElement(C,{size:a}):C,[a,e.loading]),v=Be(()=>g(D?.startDecorator||e.startDecorator),[D,g,e.startDecorator]),k=Be(()=>g(D?.endDecorator||e.endDecorator),[D,g,e.endDecorator]),u=qo((C,P)=>{let M=P,T=Array.isArray(M)?M.map(V=>V.value):M?.value;x(T),(Array.isArray(M)&&M.map(V=>f.get(V.value))||f.get(M?.value))&&s?.({...C,target:{...C.target,value:T}})},[s,x,f]),w=O.createElement(Vn,{...y,required:d,onChange:u,color:t?"danger":i,value:D||null,options:m,size:a,disabled:r,startDecorator:v,endDecorator:k,getOptionLabel:C=>`${C.label??""}`,renderTags:(C,P)=>C.map((M,T)=>{let{onClick:V,...A}=P({index:T});return g(O.createElement(Ut,{color:"primary",...A},O.createElement(L,{direction:"row",alignItems:"center",gap:2,py:.5},M.value,g(O.createElement(Kn,{color:"primary",variant:"soft",onClick:V},O.createElement(Un,null))))))}),slots:{listbox:qn},renderOption:(C,P)=>O.createElement(Rn,{...C},P.startDecorator&&O.createElement(_t,{sx:M=>({marginInlineEnd:`var(--Input-gap, ${M.spacing(1)})`})},g(P.startDecorator)),g(P.label),P.endDecorator&&O.createElement(_t,{sx:M=>({marginInlineStart:`var(--Input-gap, ${M.spacing(1)})`})},g(P.endDecorator))),renderGroup:C=>C});return O.createElement(se,{required:d,color:i,size:a,error:t,disabled:r,sx:p,className:c},o&&O.createElement(pe,null,o),w,n&&O.createElement(de,null,n))}Ee.displayName="Autocomplete";var Wt=Ee;import{Box as jn}from"@mui/joy";import{motion as Zn}from"framer-motion";var Xn=Zn(jn),Le=Xn;Le.displayName="Box";var Co=Le;import oe from"react";import{Breadcrumbs as jt,Link as sa}from"@mui/joy";import Ko from"react";import{Menu as Qn,MenuButton as ea,MenuItem as oa}from"@mui/joy";import{motion as jo}from"framer-motion";var ta=jo(Qn),Oe=e=>Ko.createElement(ta,{...e});Oe.displayName="Menu";var ra=jo(ea),He=e=>Ko.createElement(ra,{...e});He.displayName="MenuButton";var na=jo(oa),ze=e=>Ko.createElement(na,{...e});ze.displayName="MenuItem";var qt=Oe;import{Dropdown as aa}from"@mui/joy";import{motion as ia}from"framer-motion";var la=ia(aa),Ve=la;Ve.displayName="Dropdown";var Kt=Ve;function Zo(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:sa},slotProps:{link:d,...l}={link:{color:"neutral"}},collapsed:s=!0,...p}=e,c=f=>f.type==="link"&&a?oe.createElement(a,{to:f.linkHref,href:f.linkHref,...d},f.label):oe.createElement(G,null,f.label);if(!s)return oe.createElement(jt,{size:t,slots:r,slotProps:l,...p},o.map(f=>oe.createElement(c,{...f})));let y=Math.max(1,i),h=o.slice(0,n).map(f=>oe.createElement(c,{...f})),x=(n+y>o.length?o.slice(n):o.slice(-y)).map(f=>oe.createElement(c,{...f})),m=o.slice(n,-y).map(f=>oe.createElement(ze,null,oe.createElement(c,{...f})));return oe.createElement(jt,{size:t,slots:r,slotProps:l,...p},h,m.length&&oe.createElement(Kt,null,oe.createElement(He,{size:t,variant:"plain"},"..."),oe.createElement(qt,{size:t},m)),x)}Zo.displayName="Breadcrumbs";import pa,{forwardRef as da}from"react";import{Button as ma}from"@mui/joy";import{motion as ca}from"framer-motion";var ua=ca(ma),Re=da((e,o)=>pa.createElement(ua,{ref:o,...e}));Re.displayName="Button";var H=Re;import I,{Fragment as Pe,forwardRef as ya,useMemo as nr}from"react";import{styled as ne}from"@mui/joy";import ba from"@mui/icons-material/ChevronLeft";import xa from"@mui/icons-material/ChevronRight";import{AnimatePresence as ar,motion as va}from"framer-motion";var Zt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let d=1;d<=a;d++){let l=[];for(let s=1;s<=7;s++)d===i&&s<t.getDay()+1||r>n.getDate()?l.push(void 0):(l.push(r),r++);o.push(l)}return o},Xt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Xo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Qt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),er=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},or=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()},Qo=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},ce=(e,o,t)=>{let n=new Date(t);n.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return n>=i&&n<=a},yo=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as ga,useMemo as fa,useState as bo}from"react";import{useThemeProps as ha}from"@mui/joy";var Ca=(e,o)=>o.includes(e)?e:o[0],tr=e=>{let[o,t]=bo(()=>Ca(e.view||"day",e.views||["day","month"])),[n,i]=bo(e.defaultValue),[a,r]=bo(()=>{let m=new Date;return m.setDate(1),m.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||m}),[[d,l],s]=bo([0,0]),p=e.view??o,c=m=>{s([d+m,m])},y=ga(m=>{r(m),p==="month"?a.getFullYear()!==m.getFullYear()&&c(m>a?1:-1):c(m>a?1:-1),e.onMonthChange?.(m)},[e.onMonthChange,a,p]),h=ha({props:{locale:"default",views:["day","month"],view:p,value:e.value??n,...e,onChange:e.value?e.onChange:m=>{i(m),e.onChange?.(m)},onMonthChange:y,onViewChange:()=>{let m=p==="month"?"day":"month";!(!e.views||e.views.includes(m))||e.view===m||(e.onViewChange?e.onViewChange(m):t(m))}},name:"Calendar"}),x=fa(()=>({...h,viewMonth:a,direction:l}),[h,a,l]);return[h,x]};import{useCallback as Me,useState as rr}from"react";var xo=e=>{let[o,t]=rr(null),[n,i]=rr(null);return{calendarTitle:e.view==="month"?Xt(e.viewMonth,e.locale||"default"):Xo(e.viewMonth,e.locale||"default"),onPrev:Me(()=>{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:Me(()=>{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:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":d?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(s=>s==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=!!e.value&&(Qo(r,e.value[0])||e.value[1]&&Qo(r,e.value[1])),l=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r)),s=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:or(r),isSelected:d,onClick:s,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let p=new Date;return p.setHours(0,0,0,0),p})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":d?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let d=!e.views?.find(y=>y==="day"),l=d&&e.rangeSelection,s=!!e.value&&(yo(r,e.value[0])||e.value[1]&&yo(r,e.value[1])),p=l&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(e.value[0],e.value[1],r)),c=()=>{l?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):d?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:s,onMouseEnter:l&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!yo(r,new Date),onClick:c,tabIndex:-1,"aria-label":Xo(r,e.locale||"default"),"aria-selected":s?"true":void 0,"aria-current":p?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Da=ne("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Ma=ne("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),ir=ne("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"})),lr=ne(va.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),Pa=ne("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Ta=ne("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),ka=ne(H,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),wa=ne("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}}})),Ia=ne("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}}})),Sa=ne(H,{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}]),Aa=ne(H,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!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}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),sr={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})},vo=1e4,pr=(e,o)=>Math.abs(e)*o,Na=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=xo(o),i=nr(()=>Zt(o.viewMonth),[o.viewMonth]),a=nr(()=>er(o.locale||"default"),[o.locale]);return I.createElement(ir,{calendarType:"datePicker"},I.createElement(ar,{initial:!1,custom:o.direction},I.createElement(lr,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:sr,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:(r,{offset:d,velocity:l})=>{let s=pr(d.x,l.x);if(s<-vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},I.createElement(Pa,null,I.createElement("tr",null,a.map((r,d)=>I.createElement(Pe,{key:`${o.viewMonth}_${r}_${d}`},I.createElement("th",null,I.createElement(G,{level:"body-xs",textAlign:"center"},r)),d<6&&I.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),I.createElement(Ta,null,i.map((r,d)=>I.createElement(Pe,{key:`${o.viewMonth}_${d}`},I.createElement("tr",null,r.map((l,s)=>l?I.createElement(Pe,{key:s},I.createElement(wa,{...n(l)},I.createElement(Aa,{size:"sm",variant:"plain",color:"neutral",...t(l)},l)),s<6&&I.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):I.createElement(Pe,{key:s},I.createElement("td",null),s<6&&I.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&I.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},I.createElement("td",{colSpan:13,style:{height:4}}))))))))},Fa=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=xo(o),i=Array.from({length:12},(r,d)=>d).reduce((r,d)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(d),r),[[]]),a=!o.views?.find(r=>r==="day");return I.createElement(ir,{calendarType:a?"monthPicker":"datePicker"},I.createElement(ar,{initial:!1,custom:o.direction},I.createElement(lr,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:sr,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:(r,{offset:d,velocity:l})=>{let s=pr(d.x,l.x);if(s<-vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},I.createElement("tbody",null,i.map((r,d)=>I.createElement(Pe,{key:d},I.createElement("tr",null,r.map((l,s)=>I.createElement(Pe,{key:l},I.createElement(Ia,{...n(l)},I.createElement(Sa,{size:"sm",variant:"plain",color:"neutral",...t(l)},Qt(l,o.locale))),s<3&&I.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&I.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},I.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ye=ya((e,o)=>{let[t,n]=tr(e),{value:i,defaultValue:a,onChange:r,locale:d,onViewChange:l,onMonthChange:s,view:p,views:c,rangeSelection:y,minDate:h,maxDate:x,disableFuture:m,disablePast:f,...D}=t,{calendarTitle:g,onPrev:v,onNext:k}=xo(n);return I.createElement(Da,{ref:o,...D},I.createElement(Ma,null,I.createElement(Y,{size:"sm",onClick:v,"aria-label":`Previous ${p==="day"?"Month":"Year"}`},I.createElement(ba,null)),I.createElement(ka,{ownerState:n,variant:"plain",color:"neutral",onClick:l,"aria-label":"Switch Calendar View"},g),I.createElement(Y,{size:"sm",onClick:k,"aria-label":`Next ${p==="day"?"Month":"Year"}`},I.createElement(xa,null))),p==="day"&&I.createElement(Na,{ownerState:n}),p==="month"&&I.createElement(Fa,{ownerState:n}))});Ye.displayName="Calendar";var fe=Ye;import{Card as Ba,CardContent as Ea,CardCover as La,CardActions as Oa,CardOverflow as Ha}from"@mui/joy";import{motion as $e}from"framer-motion";var za=$e(Ba),Je=za;Je.displayName="Card";var Va=$e(Ea),et=Va;et.displayName="CardContent";var Ra=$e(La),ot=Ra;ot.displayName="CardCover";var Ya=$e(Oa),tt=Ya;tt.displayName="CardActions";var $a=$e(Ha),rt=$a;rt.displayName="CardOverflow";import Ja from"react";import{Checkbox as Ua}from"@mui/joy";import{motion as _a}from"framer-motion";var Ga=_a(Ua),Ue=e=>Ja.createElement(Ga,{...e});Ue.displayName="Checkbox";var _e=Ue;import{styled as Wa}from"@mui/joy";import qa,{forwardRef as Ka}from"react";var ja=Wa("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),nt=Ka(function(o,t){return qa.createElement(ja,{ref:t,...o})});nt.displayName="Container";import Do,{useCallback as mr,useMemo as cr,useState as ni}from"react";import{IntlMessageFormat as ai}from"intl-messageformat";import{NumericFormat as ii}from"react-number-format";import he,{useCallback as Za}from"react";import{Input as Xa}from"@mui/joy";import{motion as Qa}from"framer-motion";import ei from"@mui/icons-material/Close";var oi=Qa(Xa),Ge=he.forwardRef((e,o)=>{let{label:t,helperText:n,error:i,style:a,size:r,color:d,disabled:l,required:s,onChange:p,name:c,sx:y,className:h,enableClearable:x,...m}=e,[f,D]=U(e.value,e.defaultValue,Za(u=>{p?.({target:{value:u?.toString()||"",name:c||""}})},[p,c])),g=u=>{D(u.target.value)},v=()=>{D(e.defaultValue||"")},k=he.createElement(oi,{value:f,name:c,onChange:g,required:s,color:i?"danger":d,disabled:l,slotProps:{input:{ref:o,...m.slotProps?.input},...m.slotProps},...m,endDecorator:x?he.createElement(L,{gap:1,direction:"row"},m.endDecorator,f&&he.createElement(Y,{onMouseDown:u=>u.preventDefault(),onClick:v,"aria-label":"Clear"},he.createElement(ei,null))):m.endDecorator});return he.createElement(se,{required:s,color:d,size:r,error:i,disabled:l,sx:y,className:h},t&&he.createElement(pe,null,t),k,n&&he.createElement(de,null,n))});Ge.displayName="Input";var W=Ge;import{styled as li,useThemeProps as si}from"@mui/joy";import ti from"intl-messageformat";var ri={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},dr=(e="USD")=>{let[o,t,n,...i]=new ti(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=ri[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!n,decimalScale:a}};var pi=Do.forwardRef(function(o,t){let{onChange:n,...i}=o;return Do.createElement(ii,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),di=li(W,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),Mo=Do.forwardRef(function(o,t){let n=si({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:r,label:d,error:l,helperText:s,required:p,disabled:c,useMinorUnit:y,sx:h,className:x,...m}=n,{symbol:f,thousandSeparator:D,decimalSeparator:g,placeholder:v,fixedDecimalScale:k,decimalScale:u}=dr(i),[w,C]=U(n.value,n.defaultValue,mr(R=>r?.({target:{name:a,value:R}}),[r,a])),P=cr(()=>w&&y?w/Math.pow(10,u):w,[w,y,u]),M=cr(()=>n.max&&y?n.max/Math.pow(10,u):n.max,[n.max,y,u]),[T,V]=ni(!!M&&!!P&&P>M),A=mr(R=>{if(R.target.value===""){C(void 0);return}let B=Number(y?R.target.value?.replace(g,""):R.target.value);M&&Number(R.target.value)>M?V(!0):V(!1),C(B)},[g,M,y,C]);return Do.createElement(di,{...m,ref:t,value:P,placeholder:v,onChange:A,error:l||T,disabled:c,required:p,color:l||T?"danger":n.color,label:d,helperText:T?new ai(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:M}):s,slotProps:{input:{component:pi,decimalSeparator:g,thousandSeparator:D,prefix:f,fixedDecimalScale:k,decimalScale:u,"aria-label":m["aria-label"]}},sx:{...h},className:x})});var ur=Mo;import b,{useCallback as ue,useEffect as Io,useMemo as _,useRef as dt,useState as br,useId as Ki}from"react";import{useVirtualizer as ji}from"@tanstack/react-virtual";import{styled as So,LinearProgress as Zi,Link as Xi}from"@mui/joy";import Qi from"@mui/icons-material/ChevronLeft";import el from"@mui/icons-material/ChevronRight";import ol from"@mui/icons-material/ArrowUpwardRounded";import{Sheet as mi}from"@mui/joy";import{motion as ci}from"framer-motion";var ui=ci(mi),We=ui;We.displayName="Sheet";var te=We;import ae from"react";import{Table as gi}from"@mui/joy";var qe=e=>{let{children:o,...t}=e;return ae.createElement(gi,{...t},o)};qe.displayName="Table";function at(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=_e}={},slotProps:{checkbox:a={}}={}}=e;return ae.createElement("thead",null,ae.createElement("tr",null,t&&ae.createElement("th",{style:{width:"40px",textAlign:"center"}},ae.createElement(i,{onChange:n,...a})),o.map(r=>ae.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}at.displayName="TableHead";function it(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=_e}={},slotProps:{checkbox:d={}}={}}=e;return ae.createElement("tbody",null,o.map((l,s)=>ae.createElement("tr",{key:s},i&&ae.createElement("td",{style:{textAlign:"center"}},ae.createElement(r,{onChange:p=>a?.(p,s),...d})),t.map(p=>ae.createElement("td",{key:p,style:{textAlign:n?.[p]?.numeric?"right":"left"}},l[p])))))}it.displayName="TableBody";import q,{forwardRef as xi,useCallback as lt,useEffect as vi,useImperativeHandle as Di,useRef as Mi,useState as Pi}from"react";import{IMaskInput as Ti,IMask as st}from"react-imask";import ki from"@mui/icons-material/CalendarToday";import{styled as pt,useThemeProps as wi}from"@mui/joy";import{FocusTrap as Ii,ClickAwayListener as Si,Popper as Ai}from"@mui/base";import{DialogActions as fi,styled as hi}from"@mui/joy";import{motion as Ci}from"framer-motion";var yi=Ci(fi),bi=hi(yi)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Ke=bi;Ke.displayName="DialogActions";var me=Ke;var Ni=pt(Ai,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Fi=pt(te,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Bi=pt("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),gr=(e,o)=>{let t=`${e.getDate()}`,n=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(n)<10&&(n="0"+n),o.replace(/YYYY/g,i.toString()).replace(/MM/g,n).replace(/DD/g,t)};function Ei(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/);if(t.length!==n.length)throw new Error("Invalid date string or format");let i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Li=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Oi=q.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return q.createElement(Ti,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Li(i),blocks:{D:{mask:st.MaskedRange,from:1,to:31,maxLength:2},M:{mask:st.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:st.MaskedRange,from:1900,to:9999,maxLength:4}},format:r=>gr(r,i),parse:r=>Ei(r,i),autofix:"pad",overwrite:!0})}),Po=xi((e,o)=>{let t=wi({props:e,name:"DatePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM/DD",size:f,...D}=t,g=Mi(null),[v,k]=U(t.value,t.defaultValue||"",lt(T=>n?.({target:{name:t.name,value:T}}),[t.name,n]),{disableStrict:!0}),[u,w]=Pi(null),C=!!u;vi(()=>{u||g.current?.blur()},[u,g]),Di(o,()=>g.current,[g]);let P=lt(T=>{k(T.target.value)},[k]),M=lt(T=>{w(u?null:T.currentTarget),setTimeout(()=>{g.current?.focus()},0)},[u,w,g]);return q.createElement(Bi,null,q.createElement(Ii,{open:!0},q.createElement(q.Fragment,null,q.createElement(W,{...D,color:r?"danger":D.color,ref:g,size:f,value:v,onChange:P,placeholder:m,disabled:i,required:y,error:r,slotProps:{input:{component:Oi,ref:g,format:m}},className:x,sx:h,endDecorator:q.createElement(Y,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C},q.createElement(ki,null)),label:a,helperText:d}),C&&q.createElement(Si,{onClickAway:()=>w(null)},q.createElement(Ni,{id:"date-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},q.createElement(Fi,{tabIndex:-1,role:"presentation"},q.createElement(fe,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([T])=>{P({target:{name:t.name,value:gr(T,m)}}),w(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),q.createElement(me,{sx:{p:1}},q.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{P({target:{name:t.name,value:""}}),w(null)}},"Clear"))))))))});var fr=Po;import To from"react";import{Textarea as Hi}from"@mui/joy";import{motion as zi}from"framer-motion";var Vi=zi(Hi),je=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,minRows:l=2,maxRows:s=4,sx:p,className:c,...y}=e,h=To.createElement(Vi,{required:d,disabled:r,color:t?"danger":i,size:a,minRows:l,maxRows:s,...y});return To.createElement(se,{required:d,disabled:r,color:i,size:a,error:t,sx:p,className:c},o&&To.createElement(pe,null,o),h,n&&To.createElement(de,null,n))};je.displayName="Textarea";var hr=je;import Ze,{useMemo as Ri}from"react";import{Select as Yi,Option as $i}from"@mui/joy";import{motion as Ji}from"framer-motion";var Ui=Ji($i),ko=Ui;ko.displayName="Option";function Xe(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:d,onChange:l,sx:s,className:p,...c}=e,y=Ri(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),x=Ze.createElement(Yi,{...c,required:d,disabled:r,size:i,color:n?"danger":a,onChange:(m,f)=>{let D=m||{target:{}},g={...D,target:{name:D.target?.name||e.name,value:f||void 0}};l?.(g)}},y.map(m=>Ze.createElement(ko,{key:m.value,value:m.value},m.label)));return Ze.createElement(se,{required:d,disabled:r,size:i,color:a,error:n,sx:s,className:p},o&&Ze.createElement(pe,null,o),x,t&&Ze.createElement(de,null,t))}Xe.displayName="Select";var Cr=Xe;import _i from"react";import{Tooltip as Gi}from"@mui/joy";import{motion as Wi}from"framer-motion";var qi=Wi(Gi),Qe=e=>_i.createElement(qi,{...e});Qe.displayName="Tooltip";var yr=Qe;import{motion as xr}from"framer-motion";function vr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var tl=So("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"}}),wo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function rl(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.max(a,Math.ceil(n/t)),d=[o-2,o-1].filter(c=>c>1),l=[o+1,o+2].filter(c=>c<=r-1),s=r>1&&o<r-3,p=r>1&&o>4;return b.createElement(L,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},b.createElement(L,{direction:"row",spacing:.5,alignItems:"center"},b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},b.createElement(Qi,null)),o!==a&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),p&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),d.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),b.createElement(H,{variant:"soft",size:"sm"},o),l.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),s&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},b.createElement(el,null))))}var nl=e=>b.createElement(Co,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),al=So("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"100%"}}),il=So("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))"}})),ll=So("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),sl=xr(ol),pl=e=>{let{width:o,maxWidth:t,minWidth:n,stickyHeader:i,resizable:a,field:r,tableId:d,headerName:l,required:s,editMode:p,sort:c,onSortChange:y,sortable:h=!0,sortOrder:x}=e,m=dt(null),f=_(()=>`${d}_header_${l??r}`.trim(),[d,l,r]),D=a??!0?nl(m):null,g={width:o,minWidth:n??"50px",maxWidth:t,position:i?void 0:"relative",cursor:h?"pointer":"default",userSelect:"none"},v=vr(e),k=x[0],u=h&&b.createElement(sl,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":f,"aria-description":(c??k)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:c?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(c??k)==="desc"?180:0,opacity:c?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return b.createElement(xr.th,{id:f,"aria-label":l??r,"aria-sort":c?{asc:"ascending",desc:"descending"}[c]:"none",ref:m,key:r,style:g,onClick:w=>h&&y?.({field:r,currentSort:c,multiple:w.shiftKey}),whileHover:"hover",initial:"initial"},b.createElement(L,{gap:1,direction:"row",justifyContent:v},v==="end"&&u,b.createElement("div",null,l??r,p&&s&&b.createElement(ll,null,"*")),v==="start"&&u),D)},dl=e=>{let{tableId:o,field:t,type:n,renderCell:i,renderEditCell:a,isCellEditable:r,noWrap:d,row:l,rowId:s}=e,[p,c]=br(l[t]),y=dt(null),h=_(()=>({row:l,value:p,id:s}),[l,s,p]),x=_(()=>!!(e.editMode&&(typeof r=="function"?r(h):r??!0)),[e.editMode,r,h]),m=_(()=>({...typeof e.componentProps=="function"?e.componentProps(h):e.componentProps||{},size:"sm"}),[e,h]),f=_(()=>({...m,onChange:u=>{m.onChange?.(u),c(u.target.value),n==="select"&&e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:u.target.value},value:u.target.value})},onFocus:u=>{m.onFocus?.(u),e.onCellEditStart?.({...h,originalRow:l,row:{...h.row,value:p},value:p})},onBlur:u=>{m.onBlur?.(u),n&&["number","text","longText","currency","date"].includes(n)&&e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:p},value:p})},...n==="autocomplete"&&{onChangeComplete:u=>{m.onChangeComplete?.(u),c(u.target.value),e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:u.target.value},value:u.target.value})}}}),[h,l,t,p,m,n,e]),D=_(()=>a?a(h):{date:b.createElement(fr,{value:p,...f}),currency:b.createElement(ur,{value:p,...f}),number:b.createElement(W,{value:p,type:"number",...f}),text:b.createElement(W,{value:p,type:"text",...f}),longText:b.createElement(hr,{value:p,...f}),autocomplete:b.createElement(Wt,{value:p,options:f.options||[p],...f}),select:b.createElement(Cr,{value:p,options:f.options||[p],...f})}[n||"text"],[p,f,n]),g=_(()=>{if(i)return i(h);let u=p;return{link:b.createElement(e.component||Xi,{children:u,...m})}[n||"text"]||u},[p,i,h,n,m,e]),v=_(()=>x&&D?D:g,[x,D,g]),k=_(()=>d&&e.type==="longText",[d,e.type]);return Io(()=>{c(l[t])},[l,t]),b.createElement("td",{ref:y,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:vr({type:n}),verticalAlign:x?"top":"middle"}},k?b.createElement(yr,{title:p,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},b.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},v)):v)},ml=e=>{let{tableId:o,columns:t,rowId:n,editMode:i,noWrap:a,row:r}=e;return b.createElement(b.Fragment,null,t.map((d,l)=>b.createElement(dl,{...d,tableId:o,key:`${n}_${d.field.toString()}_${l}`,row:r,rowId:n,editMode:i,noWrap:a})))};function cl({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,sortModel:d,sortOrder:l=["asc","desc",null],selectionModel:s=[],onSortModelChange:p,onSelectionModelChange:c,editMode:y,getId:h,isTotalSelected:x}){let[m,f]=U(d,[],ue(F=>p?.(F),[p])),D=_(()=>o.reduce((F,S)=>({...F,[S.field]:S}),{}),[o]),g=ue((F,S)=>{for(let N of m){let{field:$,sort:ie}=N,X=F[$],re=S[$],ye=D[$],Q=0;if(ye.sortComparator?Q=ye.sortComparator({rowA:F,rowB:S}):typeof X=="string"&&typeof re=="string"?Q=X.localeCompare(re):typeof X=="number"&&typeof re=="number"?Q=X-re:X instanceof Date&&re instanceof Date&&(Q=X.getTime()-re.getTime()),Q!==0)return ie==="asc"?Q:-Q}return 0},[m,D]),v=_(()=>m.length?[...e].sort(g):e,[e,m,g]),k=_(()=>Array.from(new Set(l)),[l]),[u,w]=br(a?.page||1),C=a?.pageSize||20,P=ue((F,S)=>h?.(F)??F.id??`${(S||0)+(u-1)*C}`,[h,u,C]),M=_(()=>new Set(s),[s]),T=_(()=>!n||i==="server"?v:v.slice((u-1)*C,(u-1)*C+C),[v,u,C,i,n]),V=_(()=>T.length>0&&T.every((F,S)=>M.has(P(F,S))),[T,M,P]),A=t||v.length,R=_(()=>x??(A>0&&s.length===A),[x,s,A]),B=_(()=>(o||Object.keys(v[0]||{}).map(S=>({field:S}))).map(S=>({...S,isCellEditable:y&&(typeof S.isCellEditable=="function"?S.isCellEditable:S.isCellEditable??!0),sort:m.find(N=>N.field===S.field)?.sort,sortOrder:D[S.field]?.sortOrder||k})),[v,o,y,m,D,k]),E=ue(F=>{w(F),r?.({page:F,pageSize:C})},[r,C]),J=ue(F=>{let{field:S,currentSort:N,multiple:$}=F,X=D[S].sortOrder||k;if(N!==void 0){let ye=(X.indexOf(N)+1)%X.length,Q=X[ye];if(!Q){let ve=$?m.filter(Jo=>Jo.field!==S):[];f(ve);return}let so=$?m.map(ve=>ve.field===S?{field:S,sort:Q}:ve):[{field:S,sort:Q}];f(so)}else{let re=$?[...m,{field:S,sort:X[0]}]:[{field:S,sort:X[0]}];f(re)}},[k,D,m,f]);return Io(()=>{a||E(1)},[A,E,a]),Io(()=>{let F=Math.max(1,Math.ceil(A/C));u>F&&E(F)},[u,A,C,E]),Io(()=>{c?.([])},[u]),{rowCount:A,page:u,pageSize:C,onPaginationModelChange:E,getId:P,HeadCell:pl,BodyRow:ml,dataInPage:T,handleSortChange:J,isAllSelected:V,isTotalSelected:R,isSelectedRow:ue(F=>M.has(F),[M]),onAllCheckboxChange:ue(()=>{c?.(V?[]:T.map(P))},[V,T,c,P]),onCheckboxChange:ue((F,S)=>{if(M.has(S)){let N=s.filter($=>$!==S);c?.(N)}else{let N=[...s,S];c?.(N)}},[s,c,M]),columns:B,onTotalSelect:ue(()=>{c?.(R?[]:v.map(P),!R)},[R,v,c,P])}}function mt(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:i,onSelectionModelChange:a,disableSelectionOnClick:r,onRowClick:d,rowCount:l,columns:s,onPaginationModelChange:p,pagination:c,paginationMode:y,paginationModel:h,sortModel:x,sortOrder:m,onSortModelChange:f,loading:D,slots:{checkbox:g=_e,toolbar:v,footer:k,loadingOverlay:u=()=>b.createElement(Zi,{value:8,variant:"plain"})}={},slotProps:{checkbox:w={},toolbar:C,background:P={}}={},stripe:M,...T}=e,V=Ki(),A=dt(null),{columns:R,isAllSelected:B,isSelectedRow:E,onAllCheckboxChange:J,onCheckboxChange:F,getId:S,rowCount:N,page:$,pageSize:ie,onPaginationModelChange:X,handleSortChange:re,dataInPage:ye,isTotalSelected:Q,onTotalSelect:so,HeadCell:ve,BodyRow:Jo}=cl(e),Jt=ji({count:ye.length,getScrollElement:()=>A.current,estimateSize:()=>32,measureElement:le=>le.clientHeight,overscan:20}),Gr=_(()=>({page:$,pageSize:ie}),[$,ie]),Wr=Jt.getTotalSize(),qr=Jt.getVirtualItems();return b.createElement(Co,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!t||!!v)&&b.createElement(L,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&b.createElement(L,{direction:"row",spacing:1},!B&&b.createElement(G,{level:"body-xs"},wo(i?.length||0)," items selected"),B&&!Q&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(G,{level:"body-xs"},"All ",wo(i?.length||0)," items on this page are selected."),b.createElement(H,{size:"sm",variant:"plain",onClick:so},"Select all ",wo(N??o.length)," items")),Q&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(G,{level:"body-xs"},"All ",wo(N??o.length)," items are selected."),b.createElement(H,{size:"sm",variant:"plain",color:"danger",onClick:so},"Cancel"))),v&&b.createElement(v,{...C||{}})),b.createElement(te,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:A,...P},b.createElement(qe,{...T},b.createElement("thead",null,b.createElement("tr",null,t&&b.createElement("th",{style:{width:"40px",textAlign:"center"}},b.createElement(g,{onChange:J,checked:B,indeterminate:(i||[]).length>0&&!B,...w})),R.map((le,Uo)=>b.createElement(ve,{tableId:V,key:`${le.field.toString()}_${Uo}`,stickyHeader:e.stickyHeader,editMode:!!le.isCellEditable,onSortChange:re,...le})))),b.createElement(al,{style:{height:`${Wr}px`}},!!D&&b.createElement(tl,null,b.createElement("td",null,b.createElement(Co,{sx:{position:"absolute",top:0,left:0,right:0}},b.createElement(u,null)))),qr.map((le,Uo)=>{let po=le.index,_o=ye[po],be=S(_o,po),Kr=M&&(M==="even"&&(po+1)%2===0||M==="odd"&&(po+1)%2===1);return b.createElement(il,{key:be,role:t&&!r?"checkbox":void 0,tabIndex:t&&!r?-1:void 0,onClick:De=>{d?.({row:_o,rowId:be},De),t&&!r&&F(De,be)},"aria-checked":t&&!r?E(be):void 0,striped:Kr,style:{height:`${le.size}px`,transform:`translateY(${le.start-Uo*le.size}px)`}},t&&b.createElement("th",{scope:"row",style:{textAlign:"center"}},b.createElement(g,{onClick:De=>De.stopPropagation(),onChange:De=>F(De,be),checked:E(be),...w})),b.createElement(Jo,{tableId:V,columns:R,row:_o,rowId:be,editMode:n,noWrap:e.noWrap}))})),k&&b.createElement(k,null))),c&&b.createElement(rl,{paginationModel:Gr,rowCount:N,onPageChange:X}))}mt.displayName="DataTable";import K,{forwardRef as ul,useCallback as Ao,useEffect as gl,useImperativeHandle as fl,useMemo as hl,useRef as Cl,useState as yl}from"react";import{IMaskInput as bl,IMask as ct}from"react-imask";import xl from"@mui/icons-material/CalendarToday";import{styled as ut,useThemeProps as vl}from"@mui/joy";import{FocusTrap as Dl,ClickAwayListener as Ml,Popper as Pl}from"@mui/base";var Tl=ut(Pl,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),kl=ut(te,{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})),wl=ut("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Mr=([e,o],t)=>{let n=i=>{let a=`${i.getDate()}`,r=`${i.getMonth()+1}`,d=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(r)<10&&(r="0"+r),t.replace(/YYYY/g,d.toString()).replace(/MM/g,r).replace(/DD/g,a)};return[n(e),o?n(o):""].join(" - ")};function Dr(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/),i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Pr=(e,o)=>{let t=e.split(" - ")[0]||"",n=e.split(" - ")[1]||"";return[Dr(t,o),Dr(n,o)]},Il=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Sl=K.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return K.createElement(bl,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Il(i),blocks:{D:{mask:ct.MaskedRange,from:1,to:31,maxLength:2},M:{mask:ct.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:ct.MaskedRange,from:1900,to:9999}},format:r=>Mr(r,i),parse:r=>Pr(r,i),autofix:"pad",overwrite:!0})}),gt=ul((e,o)=>{let t=vl({props:e,name:"DateRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM/DD",size:f,...D}=t,g=Cl(null),[v,k]=U(t.value,t.defaultValue||"",Ao(A=>n?.({target:{name:t.name,value:A}}),[t.name,n]),{disableStrict:!0}),[u,w]=yl(null),C=!!u,P=hl(()=>v?Pr(v,m):void 0,[v,m]);gl(()=>{u||g.current?.blur()},[u,g]),fl(o,()=>g.current,[g]);let M=Ao(A=>{k(A.target.value)},[k]),T=Ao(A=>{w(u?null:A.currentTarget),g.current?.focus()},[u,w,g]),V=Ao(([A,R])=>{!A||!R||(k(Mr([A,R],m)),w(null))},[k,w,m]);return K.createElement(wl,null,K.createElement(Dl,{open:!0},K.createElement(K.Fragment,null,K.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:f,value:v,onChange:M,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:Sl,ref:g,format:m}},error:r,className:x,sx:h,endDecorator:K.createElement(Y,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C},K.createElement(xl,null)),label:a,helperText:d}),C&&K.createElement(Ml,{onClickAway:()=>w(null)},K.createElement(Tl,{id:"date-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:A=>A.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},K.createElement(kl,{tabIndex:-1,role:"presentation"},K.createElement(fe,{rangeSelection:!0,defaultValue:P,onChange:V,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),K.createElement(me,{sx:{p:1}},K.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{k(""),w(null)}},"Clear"))))))))});gt.displayName="DateRangePicker";import{DialogContent as Al,styled as Nl}from"@mui/joy";import{motion as Fl}from"framer-motion";var Bl=Fl(Al),El=Nl(Bl)(({theme:e})=>({padding:e.spacing(0,6,5)})),eo=El;eo.displayName="DialogContent";var No=eo;import{DialogTitle as Ll,styled as Ol}from"@mui/joy";import{motion as Hl}from"framer-motion";var zl=Hl(Ll),Vl=Ol(zl)(({theme:e})=>({padding:e.spacing(4,6)})),oo=Vl;oo.displayName="DialogTitle";var Fo=oo;import ro from"react";import Bo from"react";import{Modal as Rl,ModalDialog as Yl,ModalClose as $l,ModalOverflow as Jl,styled as Tr}from"@mui/joy";import{motion as ft}from"framer-motion";var Ul=ft(Rl),ht=Ul;ht.displayName="Modal";var kr=Tr(Yl)({padding:0}),to=kr;to.displayName="ModalDialog";var _l=Tr(ft($l))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Eo=_l;Eo.displayName="ModalClose";var Gl=ft(Jl),Ct=Gl;Ct.displayName="ModalOverflow";function yt(e){let{title:o,children:t,...n}=e;return Bo.createElement(kr,{...n},Bo.createElement(Eo,null),Bo.createElement(Fo,null,o),Bo.createElement(No,null,t))}yt.displayName="ModalFrame";import{styled as Wl}from"@mui/joy";var ql=Wl(to,{name:"Dialog",slot:"Root"})({padding:0}),bt=ro.forwardRef((e,o)=>{let{title:t,children:n,actions:i,fullscreen:a,...r}=e;return ro.createElement(ql,{layout:a?"fullscreen":"center",ref:o,...r},ro.createElement(Fo,null,t),ro.createElement(No,null,n),ro.createElement(me,null,i))});bt.displayName="DialogFrame";import Kl from"react";import{Divider as jl}from"@mui/joy";import{motion as Zl}from"framer-motion";var Xl=Zl(jl),no=e=>Kl.createElement(Xl,{...e});no.displayName="Divider";import Ql from"react";import{Drawer as es}from"@mui/joy";import{motion as os}from"framer-motion";var ts=os(es),xt=e=>{let{children:o,...t}=e;return Ql.createElement(ts,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};xt.displayName="InsetDrawer";import z,{useCallback as Lo,useEffect as wr,useMemo as vt,useRef as Ir,useState as Oo}from"react";import{styled as Ce}from"@mui/joy";import rs from"@mui/icons-material/CloudUploadRounded";import ns from"@mui/icons-material/UploadFileRounded";import as from"@mui/icons-material/ClearRounded";import{combine as is}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as ls,monitorForExternal as ss}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Sr,getFiles as ps}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Ar}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ds}from"@mui/joy";var ms=Ce(ds)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),cs=Ce(L,{name:"Uploader",slot:"PreviewRoot"})({}),us=Ce(Je,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),gs=Ce(ns,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),fs=Ce(as,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),hs=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Dt=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=hs[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},Cs=e=>{let{files:o,uploaded:t,onDelete:n}=e;return z.createElement(cs,{gap:1},[...t,...o].map(i=>z.createElement(us,{key:i.name,size:"sm",color:"neutral"},z.createElement(L,{direction:"row",alignItems:"center",gap:2},z.createElement(gs,null),z.createElement(L,{flex:"1"},z.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&z.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Dt(i.size))),z.createElement(Y,{onClick:()=>n?.(i)},z.createElement(fs,null))))))},ys=Ce(L,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),bs=Ce(te,{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}`})),xs=Ce(rs,{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"})),Nr=z.memo(e=>{let{accept:o,minCount:t,maxCount:n,name:i,size:a,maxFileSize:r,maxFileTotalSize:d,onChange:l,label:s,disabled:p,onDelete:c}=e,y=Ir(null),h=Ir(null),[x,m]=Oo(),[f,D]=Oo([]),[g,v]=Oo(e.uploaded||[]),[k,u]=Oo("idle"),w=vt(()=>{let B=o.split(",").map(N=>N.trim()),[E,J]=[B.filter(N=>["image/*","video/*","audio/*"].includes(N)).map(N=>{let[$]=N.split("/");return $.toLowerCase()}),B.filter(N=>!["image/*","video/*","audio/*"].includes(N)).map(N=>{let[$,ie]=N.split("/");return ie?ie.toUpperCase():$.toUpperCase().replace(".","")})],F=[];E.length>0&&F.push(`Any ${E.join(", ")} files`),J.length>0&&F.push(J.join(", "));let S=[F.join(", "),`Maximum ${Dt(d)}`];return n&&S.push(`Up to ${n} ${n===1?"file":"files"}`),S.join(", ")},[o,d,n]),C=vt(()=>!!x||e.error,[e.error,x]),P=vt(()=>!n||n&&[...g,...f].length!==n,[f,n,g]),M=Lo(B=>{try{let E=o.split(",").map(N=>N.trim().replace(".","").replace("*",".*"))||[],J=new RegExp(`\\b(${E.join("|")})\\b`);if(B.forEach(N=>{let[$,ie]=N.name.split(".");if(!J.test(N.type)&&!J.test(ie))throw new Error("Please upload acceptable file type.")}),r&&B.forEach(N=>{if(N.size>r)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Dt(r)} or less.`)}),[...f,...B].reduce((N,$)=>N+$.size,0)>d)throw new Error("Total File size exceeded the maximum limit.");let S=[...f,...B];if(n&&[...g,...S].length>n)throw new Error("Exceeded the maximum number of files.");l?.({target:{name:i,value:S}}),D(S),m(void 0)}catch(E){m(E.message)}},[f,g,n,o,r,d,i,l]);wr(()=>{let B=y.current;if(!(!B||p))return is(ls({element:B,canDrop:Sr,onDragEnter:()=>u("over"),onDragLeave:()=>u("potential"),onDrop:async({source:E})=>{let J=await ps({source:E});M(J)}}),ss({canMonitor:Sr,onDragStart:()=>{u("potential"),Ar.start()},onDrop:()=>{u("idle"),Ar.stop()}}))}),wr(()=>{h.current&&t&&(f.length<t?h.current.setCustomValidity(`At least ${t} files are required.`):h.current.setCustomValidity(""))},[h,f,t]);let T=Lo(B=>{let E=Array.from(B.target.files||[]);M(E)},[M]),V=Lo(B=>{B instanceof File?D(E=>(l?.({target:{name:i,value:E.filter(J=>J!==B)}}),E.filter(J=>J!==B))):(v(E=>E.filter(J=>J.id!==B.id)),c?.(B)),m(void 0)},[i,l,c]),A=Lo(()=>{h.current?.click()},[]);return z.createElement(ys,null,P&&z.createElement(se,{size:a,error:!!(C||x),disabled:p,required:!!t},s&&z.createElement(pe,null,s),z.createElement(bs,{state:k,error:!!(C||x),ref:y,onClick:A},z.createElement(L,{alignItems:"center",gap:1},z.createElement(xs,{state:k,error:!!(C||x)})),z.createElement(ms,{disabled:p,required:!!t,onInvalid:B=>{t&&f.length<t&&m(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:o,type:"file",ref:h,role:"button",onChange:T}}})),z.createElement(de,null,z.createElement(L,null,x&&z.createElement("div",null,x),z.createElement("div",null,w)))),[...g,...f].length>0&&z.createElement(Cs,{files:f,uploaded:g,onDelete:V}))});import{Grid as vs}from"@mui/joy";import{motion as Ds}from"framer-motion";var Ms=Ds(vs),Mt=Ms;Mt.displayName="Grid";import ge from"react";import Ts from"react-markdown";import{Link as ks}from"@mui/joy";import{visit as Ps}from"unist-util-visit";function Fr(e){let{accentColor:o}=e;return t=>{Ps(t,"text",(n,i,a)=>{let r=n.value,d=/\|\|.*?\|\|/g,l,s=0,p=[];for(;(l=d.exec(r))!==null;){l.index>s&&p.push({type:"text",value:r.slice(s,l.index)});let c=l[0].split("||")[1];p.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:c}]}),s=l.index+l[0].length}s<r.length&&p.push({type:"text",value:r.slice(s)}),p.length&&a.children.splice(i,1,...p)})}}var Pt=e=>{let{color:o,textColor:t,defaultLevel:n="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:r,content:d,...l}=e;return ge.createElement(ee,{component:"div",color:o,textColor:t,level:n,...l},ge.createElement(Ts,{...r,children:d,rehypePlugins:[[Fr,{accentColor:i}]],components:{h1:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:p})=>ge.createElement(ee,{color:o,textColor:t,level:n,...p?.properties},s),a:({children:s,href:p})=>ge.createElement(ks,{href:p,target:a},s),hr:()=>ge.createElement(no,null),...r?.components}}))};Pt.displayName="Markdown";import j,{forwardRef as ws,useCallback as Tt,useEffect as Is,useImperativeHandle as Ss,useRef as As,useState as Ns}from"react";import{IMaskInput as Fs,IMask as Br}from"react-imask";import Bs from"@mui/icons-material/CalendarToday";import{styled as kt,useThemeProps as Es}from"@mui/joy";import{FocusTrap as Ls,ClickAwayListener as Os,Popper as Hs}from"@mui/base";var zs=kt(Hs,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Vs=kt(te,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Rs=kt("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Er=(e,o)=>{let t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,n.toString()).replace(/MM/g,t)},Ys=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function $s(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Js=j.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return j.createElement(Fs,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Ys(i),blocks:{M:{mask:Br.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Br.MaskedRange,from:1900,to:9999}},format:r=>Er(r,i),parse:$s,autofix:"pad",overwrite:!0})}),Lr=ws((e,o)=>{let t=Es({props:e,name:"MonthPicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM",size:f,...D}=t,g=As(null),[v,k]=U(t.value,t.defaultValue||"",Tt(T=>n?.({target:{name:t.name,value:T}}),[t.name,n]),{disableStrict:!0}),[u,w]=Ns(null),C=!!u;Is(()=>{u||g.current?.blur()},[u,g]),Ss(o,()=>g.current,[g]);let P=Tt(T=>{k(T.target.value)},[k]),M=Tt(T=>{w(u?null:T.currentTarget),g.current?.focus()},[u,w,g]);return j.createElement(Rs,null,j.createElement(Ls,{open:!0},j.createElement(j.Fragment,null,j.createElement(W,{...D,color:r?"danger":D.color,ref:g,size:f,value:v,onChange:P,placeholder:m,disabled:i,required:y,slotProps:{input:{component:Js,ref:g,format:m}},error:r,className:x,sx:{...h,fontFamily:"monospace"},endDecorator:j.createElement(Y,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":C},j.createElement(Bs,null)),label:a,helperText:d}),C&&j.createElement(Os,{onClickAway:()=>w(null)},j.createElement(zs,{id:"month-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},j.createElement(Vs,{tabIndex:-1,role:"presentation"},j.createElement(fe,{view:"month",views:["month"],value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([T])=>{P({target:{name:t.name,value:Er(T,m)}}),w(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),j.createElement(me,{sx:{p:1}},j.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{P({target:{name:t.name,value:""}}),w(null)}},"Clear"))))))))});import Z,{forwardRef as Us,useCallback as Ho,useEffect as _s,useImperativeHandle as Gs,useMemo as Ws,useRef as qs,useState as Ks}from"react";import{IMaskInput as js,IMask as Or}from"react-imask";import Zs from"@mui/icons-material/CalendarToday";import{styled as wt,useThemeProps as Xs}from"@mui/joy";import{FocusTrap as Qs,ClickAwayListener as ep,Popper as op}from"@mui/base";var tp=wt(op,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),rp=wt(te,{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})),np=wt("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),zr=([e,o],t)=>{let n=i=>{let a=`${i.getMonth()+1}`,r=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,r.toString()).replace(/MM/g,a)};return[n(e),o?n(o):""].join(" - ")};function Hr(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Vr=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[Hr(o),Hr(t)]},ap=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),ip=Z.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return Z.createElement(js,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:ap(i),blocks:{m:{mask:Or.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Or.MaskedRange,from:1900,to:9999}},format:r=>zr(r,i),parse:Vr,autofix:"pad",overwrite:!0})}),It=Us((e,o)=>{let t=Xs({props:e,name:"MonthRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM",size:f,...D}=t,g=qs(null),[v,k]=U(t.value,t.defaultValue||"",Ho(A=>n?.({target:{name:t.name,value:A}}),[t.name,n]),{disableStrict:!0}),[u,w]=Ks(null),C=!!u,P=Ws(()=>v?Vr(v):void 0,[v]);_s(()=>{u||g.current?.blur()},[u,g]),Gs(o,()=>g.current,[g]);let M=Ho(A=>{k(A.target.value)},[k]),T=Ho(A=>{w(u?null:A.currentTarget),g.current?.focus()},[u,w,g]),V=Ho(([A,R])=>{!A||!R||(k(zr([A,R],m)),w(null))},[k,w,m]);return Z.createElement(np,null,Z.createElement(Qs,{open:!0},Z.createElement(Z.Fragment,null,Z.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:f,value:v,onChange:M,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:ip,ref:g,format:m}},error:r,className:x,sx:{...h,fontFamily:"monospace"},endDecorator:Z.createElement(Y,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C},Z.createElement(Zs,null)),label:a,helperText:d}),C&&Z.createElement(ep,{onClickAway:()=>w(null)},Z.createElement(tp,{id:"month-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:A=>A.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},Z.createElement(rp,{tabIndex:-1,role:"presentation"},Z.createElement(fe,{view:"month",views:["month"],rangeSelection:!0,defaultValue:P,onChange:V,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),Z.createElement(me,{sx:{p:1}},Z.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{k(""),w(null)}},"Clear"))))))))});It.displayName="MonthRangePicker";import zo,{useCallback as Rr,useMemo as lp,useState as sp}from"react";import{NumericFormat as pp}from"react-number-format";import{styled as dp,useThemeProps as mp}from"@mui/joy";var cp=(e,o)=>{let[t,n=""]=`${e}`.split(".");return+`${t}${n.padEnd(o,"0")}`},up=zo.forwardRef(function(o,t){let{onChange:n,min:i,max:a,...r}=o;return zo.createElement(pp,{...r,onValueChange:({value:d})=>{n?.({target:{name:o.name,value:d}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),gp=dp(W,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),St=zo.forwardRef(function(o,t){let n=mp({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:r,error:d,helperText:l,required:s,disabled:p,useMinorUnit:c,maxDecimalScale:y=0,min:h,max:x,sx:m,className:f,...D}=n,[g,v]=U(n.value,n.defaultValue,Rr(P=>a?.({target:{name:i,value:P}}),[a,i])),[k,u]=sp(x&&g&&g>x||h&&g&&g<h),w=lp(()=>g&&c?g/Math.pow(10,y):g,[g,c,y]),C=Rr(P=>{if(P.target.value===""){v(void 0);return}let M=Number(P.target.value);h&&M<h||x&&M>x?u(!0):u(!1);let T=c?cp(M,y):M;v(T)},[v,c,y,h,x]);return zo.createElement(gp,{...D,ref:t,value:w,onChange:C,error:k||d,disabled:p,required:s,color:k||d?"danger":n.color,label:r,helperText:l,slotProps:{input:{component:up,"aria-label":D["aria-label"],decimalScale:y}},sx:{...m},className:f})});St.displayName="PercentageInput";import{Radio as fp,RadioGroup as hp}from"@mui/joy";import{motion as Yr}from"framer-motion";var Cp=Yr(fp),ao=Cp;ao.displayName="Radio";var yp=Yr(hp),io=yp;io.displayName="RadioGroup";import $r from"react";function At(e){let{items:o,...t}=e;return $r.createElement(io,{...t},o.map(n=>$r.createElement(ao,{key:`${n.value}`,value:n.value,label:n.label})))}At.displayName="RadioList";import xe from"react";import{Stepper as bp,Step as xp,StepIndicator as vp,stepClasses as Nt,stepIndicatorClasses as lo,styled as Ft}from"@mui/joy";import Dp from"@mui/icons-material/Check";import{motion as Mp}from"framer-motion";var Vo=Ft(xp)({});Vo.displayName="Step";var Ro=Ft(vp)({});Ro.displayName="StepIndicator";var Pp=Ft(bp)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${lo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),Tp=Mp(Pp);function Bt(e){let{steps:o,activeColor:t="primary.500",inactiveColor:n="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:r}=e;return xe.createElement(Tp,{sx:d=>({"--StepIndicator-size":"24px","--Step-gap":d.spacing(2),[`& .${lo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Nt.completed}`]:{"&::after":{bgcolor:i},[`& .${lo.root}`]:{bgcolor:t}},[`& .${Nt.active}`]:{"&::after":{bgcolor:a},[`& .${lo.root}`]:{bgcolor:t}},[`& .${Nt.disabled}`]:{"&::after":{bgcolor:a},[`& .${lo.root}`]:{bgcolor:n}}})},o.map((d,l)=>{let s=r===l+1,p=r>l+1,c=r<l+1,y=d.label||d.extraContent;return xe.createElement(Vo,{indicator:xe.createElement(Ro,{variant:"solid",color:"primary"},p?xe.createElement(Dp,null):d.indicatorContent),active:s,completed:p,disabled:c},y&&xe.createElement(L,null,d.label&&xe.createElement(G,{level:"title-sm"},d.label),d.extraContent&&xe.createElement(G,{level:"body-xs"},d.extraContent)))}))}Bt.displayName="Stepper";import Jr from"react";import{Switch as kp,styled as wp,switchClasses as Ip}from"@mui/joy";import{motion as Ur}from"framer-motion";var Sp=Ur(kp),Ap=wp(Ur.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)",[`&.${Ip.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Np=e=>Jr.createElement(Ap,{...e,layout:!0,transition:Fp}),Fp={type:"spring",stiffness:700,damping:30},Et=e=>{let{name:o,...t}=e;return Jr.createElement(Sp,{...t,slots:{thumb:Np,...t.slots},slotProps:{...t.slotProps,input:{...t.slotProps?.input,name:o}}})};Et.displayName="Switch";import{Tabs as Bp,Tab as Ep,TabList as Lp,TabPanel as Op,styled as Hp,tabClasses as zp}from"@mui/joy";import{motion as Yo}from"framer-motion";var Vp=Yo(Bp),Lt=Vp;Lt.displayName="Tabs";var Rp=Hp(Yo(Ep))(({theme:e})=>({[`&:not(.${zp.selected})`]:{color:e.palette.neutral[700]}})),Ot=Rp;Ot.displayName="Tab";var Yp=Yo(Lp),Ht=Yp;Ht.displayName="TabList";var $p=Yo(Op),zt=$p;zt.displayName="TabPanel";import $o from"react";import{CssBaseline as Vt,CssVarsProvider as Jp,checkboxClasses as Up,extendTheme as Rt,inputClasses as Te}from"@mui/joy";var _r={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"}}},Yt=Rt({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},colorSchemes:{light:_r,dark:_r},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr: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)"},[`& .${Up.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function $t(e){let o=e.theme||Yt;return $o.createElement($o.Fragment,null,$o.createElement(Jp,{theme:o},$o.createElement(Vt,null),e.children))}$t.displayName="ThemeProvider";export{go as Accordion,uo as AccordionDetails,co as AccordionSummary,Go as Accordions,Wo as Alert,Fb as AspectRatio,Ee as Autocomplete,Mb as AutocompleteListbox,Pb as AutocompleteOption,Ib as Avatar,Ab as AvatarGroup,Eb as Badge,Le as Box,Zo as Breadcrumbs,Re as Button,Hy as ButtonGroup,Ye as Calendar,Je as Card,tt as CardActions,et as CardContent,ot as CardCover,rt as CardOverflow,Ue as Checkbox,Ne as Chip,Jb as CircularProgress,nt as Container,Vt as CssBaseline,Mo as CurrencyInput,mt as DataTable,Po as DatePicker,gt as DateRangePicker,Ke as DialogActions,eo as DialogContent,bt as DialogFrame,oo as DialogTitle,no as Divider,_b as Drawer,Ve as Dropdown,Ie as FormControl,Ae as FormHelperText,Se as FormLabel,Mt as Grid,Fe as IconButton,Ge as Input,xt as InsetDrawer,Wb as LinearProgress,px as Link,Kb as List,Zb as ListDivider,Qb as ListItem,ox as ListItemButton,rx as ListItemContent,ax as ListItemDecorator,lx as ListSubheader,Pt as Markdown,Oe as Menu,He as MenuButton,ze as MenuItem,ht as Modal,Eo as ModalClose,to as ModalDialog,yt as ModalFrame,Ct as ModalOverflow,Lr as MonthPicker,It as MonthRangePicker,ko as Option,St as PercentageInput,ao as Radio,io as RadioGroup,At as RadioList,Xe as Select,We as Sheet,Cx as Skeleton,mx as Slider,we as Stack,Vo as Step,gx as StepButton,Ro as StepIndicator,Bt as Stepper,Et as Switch,Ot as Tab,Ht as TabList,zt as TabPanel,qe as Table,it as TableBody,at as TableHead,Lt as Tabs,je as Textarea,$t as ThemeProvider,Qe as Tooltip,ee as Typography,Nr as Uploader,bb as accordionClasses,xb as accordionDetailsClasses,Db as accordionSummaryClasses,vb as accordionsClasses,zy as alertClasses,Bb as aspectRatioClasses,Tb as autocompleteClasses,kb as autocompleteListboxClasses,wb as autocompleteOptionClasses,Sb as avatarClasses,Nb as avatarGroupClasses,Lb as badgeClasses,Vy as boxClasses,Ob as breadcrumbsClasses,Ry as buttonClasses,zb as cardActionsClasses,Hb as cardClasses,Vb as cardContentClasses,Rb as cardCoverClasses,Yb as cardOverflowClasses,Yy as checkboxClasses,$b as chipClasses,Ub as circularProgressClasses,gb as dialogActionsClasses,ub as dialogContentClasses,cb as dialogTitleClasses,$y as dividerClasses,Gb as drawerClasses,Rt as extendTheme,tb as formControlClasses,nb as formHelperTextClasses,rb as formLabelClasses,ab as gridClasses,Jy as iconButtonClasses,Uy as inputClasses,qb as linearProgressClasses,dx as linkClasses,jb as listClasses,Xb as listDividerClasses,tx as listItemButtonClasses,ex as listItemClasses,nx as listItemContentClasses,ix as listItemDecoratorClasses,sx as listSubheaderClasses,Gy as menuButtonClasses,_y as menuClasses,Wy as menuItemClasses,sb as modalClasses,pb as modalCloseClasses,db as modalDialogClasses,mb as modalOverflowClasses,qy as optionClasses,Ky as radioClasses,jy as radioGroupClasses,Zy as selectClasses,lb as sheetClasses,yx as skeletonClasses,cx as sliderClasses,ib as stackClasses,fx as stepButtonClasses,ux as stepClasses,hx as stepperClasses,Xy as switchClasses,Cb as tabListClasses,yb as tabPanelClasses,Qy as tableClasses,hb as tabsClasses,eb as textareaClasses,Yt as theme,fb as tooltipClasses,ob as typographyClasses,Ly as useColorScheme,Ey as useTheme,Oy as useThemeProps};
1
+ import{useTheme as Ey,useColorScheme as Ly,useThemeProps as Oy,alertClasses as Hy,boxClasses as zy,buttonClasses as Vy,checkboxClasses as Ry,dividerClasses as Yy,iconButtonClasses as $y,inputClasses as Jy,menuClasses as Uy,menuButtonClasses as _y,menuItemClasses as Gy,optionClasses as Wy,radioClasses as qy,radioGroupClasses as Ky,selectClasses as jy,switchClasses as Zy,tableClasses as Xy,textareaClasses as Qy,typographyClasses as eb,formControlClasses as ob,formLabelClasses as tb,formHelperTextClasses as rb,gridClasses as nb,stackClasses as ab,sheetClasses as ib,modalClasses as lb,modalCloseClasses as sb,modalDialogClasses as pb,modalOverflowClasses as db,dialogTitleClasses as mb,dialogContentClasses as cb,dialogActionsClasses as ub,tooltipClasses as gb,tabsClasses as fb,tabListClasses as hb,tabPanelClasses as Cb,accordionClasses as yb,accordionDetailsClasses as bb,accordionGroupClasses as xb,accordionSummaryClasses as vb,AutocompleteListbox as Db,AutocompleteOption as Mb,autocompleteClasses as Pb,autocompleteListboxClasses as kb,autocompleteOptionClasses as Tb,Avatar as wb,avatarClasses as Ib,AvatarGroup as Sb,avatarGroupClasses as Ab,AspectRatio as Nb,aspectRatioClasses as Fb,Badge as Bb,badgeClasses as Eb,breadcrumbsClasses as Lb,cardClasses as Ob,cardActionsClasses as Hb,cardContentClasses as zb,cardCoverClasses as Vb,cardOverflowClasses as Rb,chipClasses as Yb,CircularProgress as $b,circularProgressClasses as Jb,Drawer as Ub,drawerClasses as _b,LinearProgress as Gb,linearProgressClasses as Wb,List as qb,listClasses as Kb,ListDivider as jb,listDividerClasses as Zb,ListItem as Xb,listItemClasses as Qb,ListItemButton as ex,listItemButtonClasses as ox,ListItemContent as tx,listItemContentClasses as rx,ListItemDecorator as nx,listItemDecoratorClasses as ax,ListSubheader as ix,listSubheaderClasses as lx,Link as sx,linkClasses as px,Slider as dx,sliderClasses as mx,stepClasses as cx,StepButton as ux,stepButtonClasses as gx,stepperClasses as fx,Skeleton as hx,skeletonClasses as Cx}from"@mui/joy";import Te from"react";import{AccordionGroup as qr,Accordion as Kr,AccordionSummary as jr,AccordionDetails as Zr}from"@mui/joy";import{motion as mo}from"framer-motion";var Xr=mo(jr),co=Xr;co.displayName="AccordionSummary";var Qr=mo(Zr),uo=Qr;uo.displayName="AccordionDetails";var en=mo(Kr);function go(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return Te.createElement(en,{variant:r,color:i,...a},Te.createElement(co,{variant:r,color:i},o),Te.createElement(uo,{variant:r,color:i},t))}go.displayName="Accordion";var on=mo(qr);function Go(e){let{variant:o,color:t,items:n,...i}=e;return Te.createElement(on,{variant:o,color:t,...i},n.map((a,r)=>Te.createElement(go,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}Go.displayName="Accordions";import fo from"react";import{Alert as dn,styled as mn}from"@mui/joy";import{motion as cn}from"framer-motion";import tn from"react";import{Typography as rn}from"@mui/joy";import{motion as nn}from"framer-motion";var an=nn(rn),ee=e=>tn.createElement(an,{...e});ee.displayName="Typography";var G=ee;import{Stack as ln}from"@mui/joy";import{motion as sn}from"framer-motion";var pn=sn(ln),we=pn;we.displayName="Stack";var L=we;var un=mn(cn(dn))({alignItems:"flex-start",fontWeight:"unset"});function Wo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return fo.createElement(un,{...a,color:i,endDecorator:n,invertedColors:r},fo.createElement(L,null,o&&fo.createElement(G,{level:"title-sm",color:i},o),fo.createElement(G,{level:"body-sm",color:i},t)))}Wo.displayName="Alert";import O,{useCallback as qo,useEffect as Ln,useMemo as Be,useRef as On}from"react";import{Autocomplete as Hn,AutocompleteOption as zn,ListSubheader as Vn,AutocompleteListbox as Rn,ListItemDecorator as Jt,CircularProgress as Yn,styled as Ut}from"@mui/joy";import $n from"@mui/icons-material/Close";import{useVirtualizer as Jn}from"@tanstack/react-virtual";import{Popper as Un}from"@mui/base";import{FormControl as gn,styled as fn}from"@mui/joy";import{motion as hn}from"framer-motion";var Cn=fn(hn(gn))({width:"100%"}),Ie=Cn;Ie.displayName="FormControl";var se=Ie;import{FormLabel as yn}from"@mui/joy";import{motion as bn}from"framer-motion";var xn=bn(yn),Se=xn;Se.displayName="FormLabel";var pe=Se;import{FormHelperText as vn}from"@mui/joy";import{motion as Dn}from"framer-motion";var Mn=Dn(vn),Ae=Mn;Ae.displayName="FormHelperText";var de=Ae;import{Chip as Pn}from"@mui/joy";import{motion as kn}from"framer-motion";var Tn=kn(Pn),Ne=Tn;Ne.displayName="Chip";var $t=Ne;import wn from"react";import{IconButton as In}from"@mui/joy";import{motion as Sn}from"framer-motion";var An=Sn(In),Fe=e=>wn.createElement(An,{...e});Fe.displayName="IconButton";var Y=Fe;import{useState as Nn,useCallback as Fn,useEffect as Bn,useRef as En}from"react";function U(e,o,t,n){let{current:i}=En(e!==void 0),[a,r]=Nn(e??o);Bn(()=>{i&&r(e??o)},[e,o,i]);let d=Fn(l=>{let s=typeof l=="function"?l(a):l;(n?.disableStrict||!i)&&r(s),t?.(s)},[i,t,a,n]);return[a,d]}var _n=Ut(Un,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Gn=O.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:d="md"},...l}=e,s=On(null),p=a[0].every(x=>x.hasOwnProperty("group")),c=r?[a[1]]:a[0].length===0?[a[2]]:p?a[0].flatMap(x=>[O.createElement(Vn,{key:x.key,component:"li"},x.group),...x.children]):a[0],y=Jn({count:c.length,estimateSize:()=>36,getScrollElement:()=>s.current,measureElement:x=>x.clientHeight,overscan:5}),h=y.getVirtualItems();return Ln(()=>{n&&y.measure()},[n,y]),O.createElement(_n,{ref:o,anchorEl:t,open:n,modifiers:i},O.createElement(Rn,{...l},O.createElement("div",{ref:s,style:{overflow:"auto"}},O.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},h.map(({index:x,size:m,start:f,key:D})=>O.cloneElement(c[x],{key:D,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${d})`,height:`${m}px`,transform:`translateY(${f}px)`,overflow:"visible"},children:O.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},c[x].props.children)}))))))}),ho={sm:"20px",md:"24px",lg:"28px"},Wn=Ut(Y,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:ho[o],height:ho[o],minWidth:ho[o],minHeight:ho[o],borderRadius:"50%"}));function Ee(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,onChange:l,onChangeComplete:s,sx:p,className:c,...y}=e,[h,x]=U(e.value,e.defaultValue||"",qo(C=>l?.({target:{value:C,name:e.name}}),[l,e.name])),m=Be(()=>e.options.map(C=>typeof C!="object"?{value:C,label:C}:C),[e.options]),f=Be(()=>{let C=new Map;return m.forEach(P=>{C.set(P.value,P)}),C},[m]),D=Be(()=>e.loading?{value:"",label:"",startDecorator:O.createElement(Yn,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(h)?h.map(C=>f.get(C||"")):f.get(h),[h,f,e.loading]),g=qo(C=>O.isValidElement(C)&&!e.loading?O.cloneElement(C,{size:a}):C,[a,e.loading]),v=Be(()=>g(D?.startDecorator||e.startDecorator),[D,g,e.startDecorator]),T=Be(()=>g(D?.endDecorator||e.endDecorator),[D,g,e.endDecorator]),u=qo((C,P)=>{let M=P,k=Array.isArray(M)?M.map(V=>V.value):M?.value;x(k),(Array.isArray(M)&&M.map(V=>f.get(V.value))||f.get(M?.value))&&s?.({...C,target:{...C.target,value:k}})},[s,x,f]),w=O.createElement(Hn,{...y,required:d,onChange:u,color:t?"danger":i,value:D||null,options:m,size:a,disabled:r,startDecorator:v,endDecorator:T,getOptionLabel:C=>`${C.label??""}`,renderTags:(C,P)=>C.map((M,k)=>{let{onClick:V,...A}=P({index:k});return g(O.createElement($t,{color:"primary",...A},O.createElement(L,{direction:"row",alignItems:"center",gap:2,py:.5},M.value,g(O.createElement(Wn,{color:"primary",variant:"soft",onClick:V},O.createElement($n,null))))))}),slots:{listbox:Gn},renderOption:(C,P)=>O.createElement(zn,{...C},P.startDecorator&&O.createElement(Jt,{sx:M=>({marginInlineEnd:`var(--Input-gap, ${M.spacing(1)})`})},g(P.startDecorator)),g(P.label),P.endDecorator&&O.createElement(Jt,{sx:M=>({marginInlineStart:`var(--Input-gap, ${M.spacing(1)})`})},g(P.endDecorator))),renderGroup:C=>C});return O.createElement(se,{required:d,color:i,size:a,error:t,disabled:r,sx:p,className:c},o&&O.createElement(pe,null,o),w,n&&O.createElement(de,null,n))}Ee.displayName="Autocomplete";var _t=Ee;import{Box as qn}from"@mui/joy";import{motion as Kn}from"framer-motion";var jn=Kn(qn),Le=jn;Le.displayName="Box";var Co=Le;import oe from"react";import{Breadcrumbs as qt,Link as ia}from"@mui/joy";import Ko from"react";import{Menu as Zn,MenuButton as Xn,MenuItem as Qn}from"@mui/joy";import{motion as jo}from"framer-motion";var ea=jo(Zn),Oe=e=>Ko.createElement(ea,{...e});Oe.displayName="Menu";var oa=jo(Xn),He=e=>Ko.createElement(oa,{...e});He.displayName="MenuButton";var ta=jo(Qn),ze=e=>Ko.createElement(ta,{...e});ze.displayName="MenuItem";var Gt=Oe;import{Dropdown as ra}from"@mui/joy";import{motion as na}from"framer-motion";var aa=na(ra),Ve=aa;Ve.displayName="Dropdown";var Wt=Ve;function Zo(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:ia},slotProps:{link:d,...l}={link:{color:"neutral"}},collapsed:s=!0,...p}=e,c=f=>f.type==="link"&&a?oe.createElement(a,{to:f.linkHref,href:f.linkHref,...d},f.label):oe.createElement(G,null,f.label);if(!s)return oe.createElement(qt,{size:t,slots:r,slotProps:l,...p},o.map(f=>oe.createElement(c,{...f})));let y=Math.max(1,i),h=o.slice(0,n).map(f=>oe.createElement(c,{...f})),x=(n+y>o.length?o.slice(n):o.slice(-y)).map(f=>oe.createElement(c,{...f})),m=o.slice(n,-y).map(f=>oe.createElement(ze,null,oe.createElement(c,{...f})));return oe.createElement(qt,{size:t,slots:r,slotProps:l,...p},h,m.length&&oe.createElement(Wt,null,oe.createElement(He,{size:t,variant:"plain"},"..."),oe.createElement(Gt,{size:t},m)),x)}Zo.displayName="Breadcrumbs";import la,{forwardRef as sa}from"react";import{Button as pa}from"@mui/joy";import{motion as da}from"framer-motion";var ma=da(pa),Re=sa((e,o)=>la.createElement(ma,{ref:o,...e}));Re.displayName="Button";var H=Re;import I,{Fragment as Pe,forwardRef as ha,useMemo as tr}from"react";import{styled as ne}from"@mui/joy";import Ca from"@mui/icons-material/ChevronLeft";import ya from"@mui/icons-material/ChevronRight";import{AnimatePresence as rr,motion as ba}from"framer-motion";var Kt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let d=1;d<=a;d++){let l=[];for(let s=1;s<=7;s++)d===i&&s<t.getDay()+1||r>n.getDate()?l.push(void 0):(l.push(r),r++);o.push(l)}return o},jt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Xo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Zt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Xt=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},Qt=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()},Qo=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},ce=(e,o,t)=>{let n=new Date(t);n.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return n>=i&&n<=a},yo=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as ca,useMemo as ua,useState as bo}from"react";import{useThemeProps as ga}from"@mui/joy";var fa=(e,o)=>o.includes(e)?e:o[0],er=e=>{let[o,t]=bo(()=>fa(e.view||"day",e.views||["day","month"])),[n,i]=bo(e.defaultValue),[a,r]=bo(()=>{let m=new Date;return m.setDate(1),m.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||m}),[[d,l],s]=bo([0,0]),p=e.view??o,c=m=>{s([d+m,m])},y=ca(m=>{r(m),p==="month"?a.getFullYear()!==m.getFullYear()&&c(m>a?1:-1):c(m>a?1:-1),e.onMonthChange?.(m)},[e.onMonthChange,a,p]),h=ga({props:{locale:"default",views:["day","month"],view:p,value:e.value??n,...e,onChange:e.value?e.onChange:m=>{i(m),e.onChange?.(m)},onMonthChange:y,onViewChange:()=>{let m=p==="month"?"day":"month";!(!e.views||e.views.includes(m))||e.view===m||(e.onViewChange?e.onViewChange(m):t(m))}},name:"Calendar"}),x=ua(()=>({...h,viewMonth:a,direction:l}),[h,a,l]);return[h,x]};import{useCallback as Me,useState as or}from"react";var xo=e=>{let[o,t]=or(null),[n,i]=or(null);return{calendarTitle:e.view==="month"?jt(e.viewMonth,e.locale||"default"):Xo(e.viewMonth,e.locale||"default"),onPrev:Me(()=>{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:Me(()=>{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:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":d?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(s=>s==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=!!e.value&&(Qo(r,e.value[0])||e.value[1]&&Qo(r,e.value[1])),l=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r)),s=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:Qt(r),isSelected:d,onClick:s,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let p=new Date;return p.setHours(0,0,0,0),p})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":d?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let d=!e.views?.find(y=>y==="day"),l=d&&e.rangeSelection,s=!!e.value&&(yo(r,e.value[0])||e.value[1]&&yo(r,e.value[1])),p=l&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(e.value[0],e.value[1],r)),c=()=>{l?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):d?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:s,onMouseEnter:l&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!yo(r,new Date),onClick:c,tabIndex:-1,"aria-label":Xo(r,e.locale||"default"),"aria-selected":s?"true":void 0,"aria-current":p?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var xa=ne("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),va=ne("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),nr=ne("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"})),ar=ne(ba.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),Da=ne("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Ma=ne("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Pa=ne(H,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),ka=ne("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}}})),Ta=ne("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}}})),wa=ne(H,{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}]),Ia=ne(H,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!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}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),ir={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})},vo=1e4,lr=(e,o)=>Math.abs(e)*o,Sa=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=xo(o),i=tr(()=>Kt(o.viewMonth),[o.viewMonth]),a=tr(()=>Xt(o.locale||"default"),[o.locale]);return I.createElement(nr,{calendarType:"datePicker"},I.createElement(rr,{initial:!1,custom:o.direction},I.createElement(ar,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:ir,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:(r,{offset:d,velocity:l})=>{let s=lr(d.x,l.x);if(s<-vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},I.createElement(Da,null,I.createElement("tr",null,a.map((r,d)=>I.createElement(Pe,{key:`${o.viewMonth}_${r}_${d}`},I.createElement("th",null,I.createElement(G,{level:"body-xs",textAlign:"center"},r)),d<6&&I.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),I.createElement(Ma,null,i.map((r,d)=>I.createElement(Pe,{key:`${o.viewMonth}_${d}`},I.createElement("tr",null,r.map((l,s)=>l?I.createElement(Pe,{key:s},I.createElement(ka,{...n(l)},I.createElement(Ia,{size:"sm",variant:"plain",color:"neutral",...t(l)},l)),s<6&&I.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):I.createElement(Pe,{key:s},I.createElement("td",null),s<6&&I.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&I.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},I.createElement("td",{colSpan:13,style:{height:4}}))))))))},Aa=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=xo(o),i=Array.from({length:12},(r,d)=>d).reduce((r,d)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(d),r),[[]]),a=!o.views?.find(r=>r==="day");return I.createElement(nr,{calendarType:a?"monthPicker":"datePicker"},I.createElement(rr,{initial:!1,custom:o.direction},I.createElement(ar,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:ir,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:(r,{offset:d,velocity:l})=>{let s=lr(d.x,l.x);if(s<-vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},I.createElement("tbody",null,i.map((r,d)=>I.createElement(Pe,{key:d},I.createElement("tr",null,r.map((l,s)=>I.createElement(Pe,{key:l},I.createElement(Ta,{...n(l)},I.createElement(wa,{size:"sm",variant:"plain",color:"neutral",...t(l)},Zt(l,o.locale))),s<3&&I.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&I.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},I.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ye=ha((e,o)=>{let[t,n]=er(e),{value:i,defaultValue:a,onChange:r,locale:d,onViewChange:l,onMonthChange:s,view:p,views:c,rangeSelection:y,minDate:h,maxDate:x,disableFuture:m,disablePast:f,...D}=t,{calendarTitle:g,onPrev:v,onNext:T}=xo(n);return I.createElement(xa,{ref:o,...D},I.createElement(va,null,I.createElement(Y,{size:"sm",onClick:v,"aria-label":`Previous ${p==="day"?"Month":"Year"}`},I.createElement(Ca,null)),I.createElement(Pa,{ownerState:n,variant:"plain",color:"neutral",onClick:l,"aria-label":"Switch Calendar View"},g),I.createElement(Y,{size:"sm",onClick:T,"aria-label":`Next ${p==="day"?"Month":"Year"}`},I.createElement(ya,null))),p==="day"&&I.createElement(Sa,{ownerState:n}),p==="month"&&I.createElement(Aa,{ownerState:n}))});Ye.displayName="Calendar";var fe=Ye;import{Card as Na,CardContent as Fa,CardCover as Ba,CardActions as Ea,CardOverflow as La}from"@mui/joy";import{motion as $e}from"framer-motion";var Oa=$e(Na),Je=Oa;Je.displayName="Card";var Ha=$e(Fa),et=Ha;et.displayName="CardContent";var za=$e(Ba),ot=za;ot.displayName="CardCover";var Va=$e(Ea),tt=Va;tt.displayName="CardActions";var Ra=$e(La),rt=Ra;rt.displayName="CardOverflow";import Ya from"react";import{Checkbox as $a}from"@mui/joy";import{motion as Ja}from"framer-motion";var Ua=Ja($a),Ue=e=>Ya.createElement(Ua,{...e});Ue.displayName="Checkbox";var _e=Ue;import{styled as _a}from"@mui/joy";import Ga,{forwardRef as Wa}from"react";var qa=_a("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),nt=Wa(function(o,t){return Ga.createElement(qa,{ref:t,...o})});nt.displayName="Container";import Do,{useCallback as pr,useMemo as dr,useState as ti}from"react";import{IntlMessageFormat as ri}from"intl-messageformat";import{NumericFormat as ni}from"react-number-format";import he,{useCallback as Ka}from"react";import{Input as ja}from"@mui/joy";import{motion as Za}from"framer-motion";import Xa from"@mui/icons-material/Close";var Qa=Za(ja),Ge=he.forwardRef((e,o)=>{let{label:t,helperText:n,error:i,style:a,size:r,color:d,disabled:l,required:s,onChange:p,name:c,sx:y,className:h,enableClearable:x,...m}=e,[f,D]=U(e.value,e.defaultValue,Ka(u=>{p?.({target:{value:u?.toString()||"",name:c||""}})},[p,c])),g=u=>{D(u.target.value)},v=()=>{D(e.defaultValue||"")},T=he.createElement(Qa,{value:f,name:c,onChange:g,required:s,color:i?"danger":d,disabled:l,slotProps:{input:{ref:o,...m.slotProps?.input},...m.slotProps},...m,endDecorator:x?he.createElement(L,{gap:1,direction:"row"},m.endDecorator,f&&he.createElement(Y,{onMouseDown:u=>u.preventDefault(),onClick:v,"aria-label":"Clear"},he.createElement(Xa,null))):m.endDecorator});return he.createElement(se,{required:s,color:d,size:r,error:i,disabled:l,sx:y,className:h},t&&he.createElement(pe,null,t),T,n&&he.createElement(de,null,n))});Ge.displayName="Input";var W=Ge;import{styled as ai,useThemeProps as ii}from"@mui/joy";import ei 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},sr=(e="USD")=>{let[o,t,n,...i]=new ei(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=oi[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!n,decimalScale:a}};var li=Do.forwardRef(function(o,t){let{onChange:n,...i}=o;return Do.createElement(ni,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),si=ai(W,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),Mo=Do.forwardRef(function(o,t){let n=ii({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:r,label:d,error:l,helperText:s,required:p,disabled:c,useMinorUnit:y,sx:h,className:x,...m}=n,{symbol:f,thousandSeparator:D,decimalSeparator:g,placeholder:v,fixedDecimalScale:T,decimalScale:u}=sr(i),[w,C]=U(n.value,n.defaultValue,pr(R=>r?.({target:{name:a,value:R}}),[r,a])),P=dr(()=>w&&y?w/Math.pow(10,u):w,[w,y,u]),M=dr(()=>n.max&&y?n.max/Math.pow(10,u):n.max,[n.max,y,u]),[k,V]=ti(!!M&&!!P&&P>M),A=pr(R=>{if(R.target.value===""){C(void 0);return}let B=Number(y?R.target.value?.replace(g,""):R.target.value);M&&Number(R.target.value)>M?V(!0):V(!1),C(B)},[g,M,y,C]);return Do.createElement(si,{...m,ref:t,value:P,placeholder:v,onChange:A,error:l||k,disabled:c,required:p,color:l||k?"danger":n.color,label:d,helperText:k?new ri(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:M}):s,slotProps:{input:{component:li,decimalSeparator:g,thousandSeparator:D,prefix:f,fixedDecimalScale:T,decimalScale:u,"aria-label":m["aria-label"]}},sx:{...h},className:x})});var mr=Mo;import b,{useCallback as ue,useEffect as Io,useMemo as _,useRef as dt,useState as Cr,useId as Wi}from"react";import{useVirtualizer as qi}from"@tanstack/react-virtual";import{styled as So,LinearProgress as Ki,Link as ji}from"@mui/joy";import Zi from"@mui/icons-material/ChevronLeft";import Xi from"@mui/icons-material/ChevronRight";import Qi from"@mui/icons-material/ArrowUpwardRounded";import{Sheet as pi}from"@mui/joy";import{motion as di}from"framer-motion";var mi=di(pi),We=mi;We.displayName="Sheet";var te=We;import ae from"react";import{Table as ci}from"@mui/joy";var qe=e=>{let{children:o,...t}=e;return ae.createElement(ci,{...t},o)};qe.displayName="Table";function at(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=_e}={},slotProps:{checkbox:a={}}={}}=e;return ae.createElement("thead",null,ae.createElement("tr",null,t&&ae.createElement("th",{style:{width:"40px",textAlign:"center"}},ae.createElement(i,{onChange:n,...a})),o.map(r=>ae.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}at.displayName="TableHead";function it(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=_e}={},slotProps:{checkbox:d={}}={}}=e;return ae.createElement("tbody",null,o.map((l,s)=>ae.createElement("tr",{key:s},i&&ae.createElement("td",{style:{textAlign:"center"}},ae.createElement(r,{onChange:p=>a?.(p,s),...d})),t.map(p=>ae.createElement("td",{key:p,style:{textAlign:n?.[p]?.numeric?"right":"left"}},l[p])))))}it.displayName="TableBody";import q,{forwardRef as yi,useCallback as lt,useEffect as bi,useImperativeHandle as xi,useRef as vi,useState as Di}from"react";import{IMaskInput as Mi,IMask as st}from"react-imask";import Pi from"@mui/icons-material/CalendarToday";import{styled as pt,useThemeProps as ki}from"@mui/joy";import{FocusTrap as Ti,ClickAwayListener as wi,Popper as Ii}from"@mui/base";import{DialogActions as ui,styled as gi}from"@mui/joy";import{motion as fi}from"framer-motion";var hi=fi(ui),Ci=gi(hi)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Ke=Ci;Ke.displayName="DialogActions";var me=Ke;var Si=pt(Ii,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ai=pt(te,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Ni=pt("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),cr=(e,o)=>{let t=`${e.getDate()}`,n=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(n)<10&&(n="0"+n),o.replace(/YYYY/g,i.toString()).replace(/MM/g,n).replace(/DD/g,t)};function Fi(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/);if(t.length!==n.length)throw new Error("Invalid date string or format");let i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Bi=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Ei=q.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return q.createElement(Mi,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Bi(i),blocks:{D:{mask:st.MaskedRange,from:1,to:31,maxLength:2},M:{mask:st.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:st.MaskedRange,from:1900,to:9999,maxLength:4}},format:r=>cr(r,i),parse:r=>Fi(r,i),autofix:"pad",overwrite:!0})}),Po=yi((e,o)=>{let t=ki({props:e,name:"DatePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM/DD",size:f,...D}=t,g=vi(null),[v,T]=U(t.value,t.defaultValue||"",lt(k=>n?.({target:{name:t.name,value:k}}),[t.name,n]),{disableStrict:!0}),[u,w]=Di(null),C=!!u;bi(()=>{u||g.current?.blur()},[u,g]),xi(o,()=>g.current,[g]);let P=lt(k=>{T(k.target.value)},[T]),M=lt(k=>{w(u?null:k.currentTarget),setTimeout(()=>{g.current?.focus()},0)},[u,w,g]);return q.createElement(Ni,null,q.createElement(Ti,{open:!0},q.createElement(q.Fragment,null,q.createElement(W,{...D,color:r?"danger":D.color,ref:g,size:f,value:v,onChange:P,placeholder:m,disabled:i,required:y,error:r,slotProps:{input:{component:Ei,ref:g,format:m}},className:x,sx:h,endDecorator:q.createElement(Y,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C},q.createElement(Pi,null)),label:a,helperText:d}),C&&q.createElement(wi,{onClickAway:()=>w(null)},q.createElement(Si,{id:"date-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:k=>k.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},q.createElement(Ai,{tabIndex:-1,role:"presentation"},q.createElement(fe,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([k])=>{P({target:{name:t.name,value:cr(k,m)}}),w(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),q.createElement(me,{sx:{p:1}},q.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{P({target:{name:t.name,value:""}}),w(null)}},"Clear"))))))))});var ur=Po;import ko from"react";import{Textarea as Li}from"@mui/joy";import{motion as Oi}from"framer-motion";var Hi=Oi(Li),je=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,minRows:l=2,maxRows:s=4,sx:p,className:c,...y}=e,h=ko.createElement(Hi,{required:d,disabled:r,color:t?"danger":i,size:a,minRows:l,maxRows:s,...y});return ko.createElement(se,{required:d,disabled:r,color:i,size:a,error:t,sx:p,className:c},o&&ko.createElement(pe,null,o),h,n&&ko.createElement(de,null,n))};je.displayName="Textarea";var gr=je;import Ze,{useMemo as zi}from"react";import{Select as Vi,Option as Ri}from"@mui/joy";import{motion as Yi}from"framer-motion";var $i=Yi(Ri),To=$i;To.displayName="Option";function Xe(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:d,onChange:l,sx:s,className:p,...c}=e,y=zi(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),x=Ze.createElement(Vi,{...c,required:d,disabled:r,size:i,color:n?"danger":a,onChange:(m,f)=>{let D=m||{target:{}},g={...D,target:{name:D.target?.name||e.name,value:f||void 0}};l?.(g)}},y.map(m=>Ze.createElement(To,{key:m.value,value:m.value},m.label)));return Ze.createElement(se,{required:d,disabled:r,size:i,color:a,error:n,sx:s,className:p},o&&Ze.createElement(pe,null,o),x,t&&Ze.createElement(de,null,t))}Xe.displayName="Select";var fr=Xe;import Ji from"react";import{Tooltip as Ui}from"@mui/joy";import{motion as _i}from"framer-motion";var Gi=_i(Ui),Qe=e=>Ji.createElement(Gi,{...e});Qe.displayName="Tooltip";var hr=Qe;import{motion as yr}from"framer-motion";function br(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var el=So("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"}}),wo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ol(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.max(a,Math.ceil(n/t)),d=[o-2,o-1].filter(c=>c>1),l=[o+1,o+2].filter(c=>c<=r-1),s=r>1&&o<r-3,p=r>1&&o>4;return b.createElement(L,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},b.createElement(L,{direction:"row",spacing:.5,alignItems:"center"},b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},b.createElement(Zi,null)),o!==a&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),p&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),d.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),b.createElement(H,{variant:"soft",size:"sm"},o),l.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),s&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},b.createElement(Xi,null))))}var tl=e=>b.createElement(Co,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),rl=So("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),nl=So("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))"}})),al=So("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),il=yr(Qi),ll=e=>{let{width:o,maxWidth:t,minWidth:n,stickyHeader:i,resizable:a,field:r,tableId:d,headerName:l,required:s,editMode:p,sort:c,onSortChange:y,sortable:h=!0,sortOrder:x}=e,m=dt(null),f=_(()=>`${d}_header_${l??r}`.trim(),[d,l,r]),D=a??!0?tl(m):null,g={width:o,minWidth:n??"50px",maxWidth:t,position:i?void 0:"relative",cursor:h?"pointer":"default",userSelect:"none"},v=br(e),T=x[0],u=h&&b.createElement(il,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":f,"aria-description":(c??T)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:c?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(c??T)==="desc"?180:0,opacity:c?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return b.createElement(yr.th,{id:f,"aria-label":l??r,"aria-sort":c?{asc:"ascending",desc:"descending"}[c]:"none",ref:m,key:r,style:g,onClick:w=>h&&y?.({field:r,currentSort:c,multiple:w.shiftKey}),whileHover:"hover",initial:"initial"},b.createElement(L,{gap:1,direction:"row",justifyContent:v},v==="end"&&u,b.createElement("div",null,l??r,p&&s&&b.createElement(al,null,"*")),v==="start"&&u),D)},sl=e=>{let{tableId:o,field:t,type:n,renderCell:i,renderEditCell:a,isCellEditable:r,noWrap:d,row:l,rowId:s}=e,[p,c]=Cr(l[t]),y=dt(null),h=_(()=>({row:l,value:p,id:s}),[l,s,p]),x=_(()=>!!(e.editMode&&(typeof r=="function"?r(h):r??!0)),[e.editMode,r,h]),m=_(()=>({...typeof e.componentProps=="function"?e.componentProps(h):e.componentProps||{},size:"sm"}),[e,h]),f=_(()=>({...m,onChange:u=>{m.onChange?.(u),c(u.target.value),n==="select"&&e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:u.target.value},value:u.target.value})},onFocus:u=>{m.onFocus?.(u),e.onCellEditStart?.({...h,originalRow:l,row:{...h.row,value:p},value:p})},onBlur:u=>{m.onBlur?.(u),n&&["number","text","longText","currency","date"].includes(n)&&e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:p},value:p})},...n==="autocomplete"&&{onChangeComplete:u=>{m.onChangeComplete?.(u),c(u.target.value),e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:u.target.value},value:u.target.value})}}}),[h,l,t,p,m,n,e]),D=_(()=>a?a(h):{date:b.createElement(ur,{value:p,...f}),currency:b.createElement(mr,{value:p,...f}),number:b.createElement(W,{value:p,type:"number",...f}),text:b.createElement(W,{value:p,type:"text",...f}),longText:b.createElement(gr,{value:p,...f}),autocomplete:b.createElement(_t,{value:p,options:f.options||[p],...f}),select:b.createElement(fr,{value:p,options:f.options||[p],...f})}[n||"text"],[p,f,n]),g=_(()=>{if(i)return i(h);let u=p;return{link:b.createElement(e.component||ji,{children:u,...m})}[n||"text"]||u},[p,i,h,n,m,e]),v=_(()=>x&&D?D:g,[x,D,g]),T=_(()=>d&&e.type==="longText",[d,e.type]);return Io(()=>{c(l[t])},[l,t]),b.createElement("td",{ref:y,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:br({type:n}),verticalAlign:x?"top":"middle"}},T?b.createElement(hr,{title:p,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},b.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},v)):v)},pl=e=>{let{tableId:o,columns:t,rowId:n,editMode:i,noWrap:a,row:r}=e;return b.createElement(b.Fragment,null,t.map((d,l)=>b.createElement(sl,{...d,tableId:o,key:`${n}_${d.field.toString()}_${l}`,row:r,rowId:n,editMode:i,noWrap:a})))};function dl({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,sortModel:d,sortOrder:l=["asc","desc",null],selectionModel:s=[],onSortModelChange:p,onSelectionModelChange:c,editMode:y,getId:h,isTotalSelected:x}){let[m,f]=U(d,[],ue(F=>p?.(F),[p])),D=_(()=>o.reduce((F,S)=>({...F,[S.field]:S}),{}),[o]),g=ue((F,S)=>{for(let N of m){let{field:$,sort:ie}=N,X=F[$],re=S[$],ye=D[$],Q=0;if(ye.sortComparator?Q=ye.sortComparator({rowA:F,rowB:S}):typeof X=="string"&&typeof re=="string"?Q=X.localeCompare(re):typeof X=="number"&&typeof re=="number"?Q=X-re:X instanceof Date&&re instanceof Date&&(Q=X.getTime()-re.getTime()),Q!==0)return ie==="asc"?Q:-Q}return 0},[m,D]),v=_(()=>m.length?[...e].sort(g):e,[e,m,g]),T=_(()=>Array.from(new Set(l)),[l]),[u,w]=Cr(a?.page||1),C=a?.pageSize||20,P=ue((F,S)=>h?.(F)??F.id??`${(S||0)+(u-1)*C}`,[h,u,C]),M=_(()=>new Set(s),[s]),k=_(()=>!n||i==="server"?v:v.slice((u-1)*C,(u-1)*C+C),[v,u,C,i,n]),V=_(()=>k.length>0&&k.every((F,S)=>M.has(P(F,S))),[k,M,P]),A=t||v.length,R=_(()=>x??(A>0&&s.length===A),[x,s,A]),B=_(()=>(o||Object.keys(v[0]||{}).map(S=>({field:S}))).map(S=>({...S,isCellEditable:y&&(typeof S.isCellEditable=="function"?S.isCellEditable:S.isCellEditable??!0),sort:m.find(N=>N.field===S.field)?.sort,sortOrder:D[S.field]?.sortOrder||T})),[v,o,y,m,D,T]),E=ue(F=>{w(F),r?.({page:F,pageSize:C})},[r,C]),J=ue(F=>{let{field:S,currentSort:N,multiple:$}=F,X=D[S].sortOrder||T;if(N!==void 0){let ye=(X.indexOf(N)+1)%X.length,Q=X[ye];if(!Q){let ve=$?m.filter(Jo=>Jo.field!==S):[];f(ve);return}let so=$?m.map(ve=>ve.field===S?{field:S,sort:Q}:ve):[{field:S,sort:Q}];f(so)}else{let re=$?[...m,{field:S,sort:X[0]}]:[{field:S,sort:X[0]}];f(re)}},[T,D,m,f]);return Io(()=>{a||E(1)},[A,E,a]),Io(()=>{let F=Math.max(1,Math.ceil(A/C));u>F&&E(F)},[u,A,C,E]),Io(()=>{c?.([])},[u]),{rowCount:A,page:u,pageSize:C,onPaginationModelChange:E,getId:P,HeadCell:ll,BodyRow:pl,dataInPage:k,handleSortChange:J,isAllSelected:V,isTotalSelected:R,isSelectedRow:ue(F=>M.has(F),[M]),onAllCheckboxChange:ue(()=>{c?.(V?[]:k.map(P))},[V,k,c,P]),onCheckboxChange:ue((F,S)=>{if(M.has(S)){let N=s.filter($=>$!==S);c?.(N)}else{let N=[...s,S];c?.(N)}},[s,c,M]),columns:B,onTotalSelect:ue(()=>{c?.(R?[]:v.map(P),!R)},[R,v,c,P])}}function mt(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:i,onSelectionModelChange:a,disableSelectionOnClick:r,onRowClick:d,rowCount:l,columns:s,onPaginationModelChange:p,pagination:c,paginationMode:y,paginationModel:h,sortModel:x,sortOrder:m,onSortModelChange:f,loading:D,slots:{checkbox:g=_e,toolbar:v,footer:T,loadingOverlay:u=()=>b.createElement(Ki,{value:8,variant:"plain"})}={},slotProps:{checkbox:w={},toolbar:C,background:P={}}={},stripe:M,...k}=e,V=Wi(),A=dt(null),{columns:R,isAllSelected:B,isSelectedRow:E,onAllCheckboxChange:J,onCheckboxChange:F,getId:S,rowCount:N,page:$,pageSize:ie,onPaginationModelChange:X,handleSortChange:re,dataInPage:ye,isTotalSelected:Q,onTotalSelect:so,HeadCell:ve,BodyRow:Jo}=dl(e),Yt=qi({count:ye.length,getScrollElement:()=>A.current,estimateSize:()=>32,measureElement:le=>le.clientHeight,overscan:20}),Ur=_(()=>({page:$,pageSize:ie}),[$,ie]),_r=Yt.getTotalSize(),Gr=Yt.getVirtualItems();return b.createElement(Co,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!t||!!v)&&b.createElement(L,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&b.createElement(L,{direction:"row",spacing:1},!B&&b.createElement(G,{level:"body-xs"},wo(i?.length||0)," items selected"),B&&!Q&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(G,{level:"body-xs"},"All ",wo(i?.length||0)," items on this page are selected."),b.createElement(H,{size:"sm",variant:"plain",onClick:so},"Select all ",wo(N??o.length)," items")),Q&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(G,{level:"body-xs"},"All ",wo(N??o.length)," items are selected."),b.createElement(H,{size:"sm",variant:"plain",color:"danger",onClick:so},"Cancel"))),v&&b.createElement(v,{...C||{}})),b.createElement(te,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:A,...P},b.createElement(qe,{...k},b.createElement("thead",null,b.createElement("tr",null,t&&b.createElement("th",{style:{width:"40px",textAlign:"center"}},b.createElement(g,{onChange:J,checked:B,indeterminate:(i||[]).length>0&&!B,...w})),R.map((le,Uo)=>b.createElement(ve,{tableId:V,key:`${le.field.toString()}_${Uo}`,stickyHeader:e.stickyHeader,editMode:!!le.isCellEditable,onSortChange:re,...le})))),b.createElement(rl,{style:{height:`${_r}px`}},!!D&&b.createElement(el,null,b.createElement("td",null,b.createElement(Co,{sx:{position:"absolute",top:0,left:0,right:0}},b.createElement(u,null)))),Gr.map((le,Uo)=>{let po=le.index,_o=ye[po],be=S(_o,po),Wr=M&&(M==="even"&&(po+1)%2===0||M==="odd"&&(po+1)%2===1);return b.createElement(nl,{key:be,role:t&&!r?"checkbox":void 0,tabIndex:t&&!r?-1:void 0,onClick:De=>{d?.({row:_o,rowId:be},De),t&&!r&&F(De,be)},"aria-checked":t&&!r?E(be):void 0,striped:Wr,style:{height:`${le.size}px`,transform:`translateY(${le.start-Uo*le.size}px)`}},t&&b.createElement("th",{scope:"row",style:{textAlign:"center"}},b.createElement(g,{onClick:De=>De.stopPropagation(),onChange:De=>F(De,be),checked:E(be),...w})),b.createElement(Jo,{tableId:V,columns:R,row:_o,rowId:be,editMode:n,noWrap:e.noWrap}))})),T&&b.createElement(T,null))),c&&b.createElement(ol,{paginationModel:Ur,rowCount:N,onPageChange:X}))}mt.displayName="DataTable";import K,{forwardRef as ml,useCallback as Ao,useEffect as cl,useImperativeHandle as ul,useMemo as gl,useRef as fl,useState as hl}from"react";import{IMaskInput as Cl,IMask as ct}from"react-imask";import yl from"@mui/icons-material/CalendarToday";import{styled as ut,useThemeProps as bl}from"@mui/joy";import{FocusTrap as xl,ClickAwayListener as vl,Popper as Dl}from"@mui/base";var Ml=ut(Dl,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Pl=ut(te,{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})),kl=ut("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),vr=([e,o],t)=>{let n=i=>{let a=`${i.getDate()}`,r=`${i.getMonth()+1}`,d=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(r)<10&&(r="0"+r),t.replace(/YYYY/g,d.toString()).replace(/MM/g,r).replace(/DD/g,a)};return[n(e),o?n(o):""].join(" - ")};function xr(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/),i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Dr=(e,o)=>{let t=e.split(" - ")[0]||"",n=e.split(" - ")[1]||"";return[xr(t,o),xr(n,o)]},Tl=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),wl=K.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return K.createElement(Cl,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Tl(i),blocks:{D:{mask:ct.MaskedRange,from:1,to:31,maxLength:2},M:{mask:ct.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:ct.MaskedRange,from:1900,to:9999}},format:r=>vr(r,i),parse:r=>Dr(r,i),autofix:"pad",overwrite:!0})}),gt=ml((e,o)=>{let t=bl({props:e,name:"DateRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM/DD",size:f,...D}=t,g=fl(null),[v,T]=U(t.value,t.defaultValue||"",Ao(A=>n?.({target:{name:t.name,value:A}}),[t.name,n]),{disableStrict:!0}),[u,w]=hl(null),C=!!u,P=gl(()=>v?Dr(v,m):void 0,[v,m]);cl(()=>{u||g.current?.blur()},[u,g]),ul(o,()=>g.current,[g]);let M=Ao(A=>{T(A.target.value)},[T]),k=Ao(A=>{w(u?null:A.currentTarget),g.current?.focus()},[u,w,g]),V=Ao(([A,R])=>{!A||!R||(T(vr([A,R],m)),w(null))},[T,w,m]);return K.createElement(kl,null,K.createElement(xl,{open:!0},K.createElement(K.Fragment,null,K.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:f,value:v,onChange:M,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:wl,ref:g,format:m}},error:r,className:x,sx:h,endDecorator:K.createElement(Y,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C},K.createElement(yl,null)),label:a,helperText:d}),C&&K.createElement(vl,{onClickAway:()=>w(null)},K.createElement(Ml,{id:"date-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:A=>A.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},K.createElement(Pl,{tabIndex:-1,role:"presentation"},K.createElement(fe,{rangeSelection:!0,defaultValue:P,onChange:V,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),K.createElement(me,{sx:{p:1}},K.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{T(""),w(null)}},"Clear"))))))))});gt.displayName="DateRangePicker";import{DialogContent as Il,styled as Sl}from"@mui/joy";import{motion as Al}from"framer-motion";var Nl=Al(Il),Fl=Sl(Nl)(({theme:e})=>({padding:e.spacing(0,6,5)})),eo=Fl;eo.displayName="DialogContent";var No=eo;import{DialogTitle as Bl,styled as El}from"@mui/joy";import{motion as Ll}from"framer-motion";var Ol=Ll(Bl),Hl=El(Ol)(({theme:e})=>({padding:e.spacing(4,6)})),oo=Hl;oo.displayName="DialogTitle";var Fo=oo;import ro from"react";import Bo from"react";import{Modal as zl,ModalDialog as Vl,ModalClose as Rl,ModalOverflow as Yl,styled as Mr}from"@mui/joy";import{motion as ft}from"framer-motion";var $l=ft(zl),ht=$l;ht.displayName="Modal";var Pr=Mr(Vl)({padding:0}),to=Pr;to.displayName="ModalDialog";var Jl=Mr(ft(Rl))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Eo=Jl;Eo.displayName="ModalClose";var Ul=ft(Yl),Ct=Ul;Ct.displayName="ModalOverflow";function yt(e){let{title:o,children:t,...n}=e;return Bo.createElement(Pr,{...n},Bo.createElement(Eo,null),Bo.createElement(Fo,null,o),Bo.createElement(No,null,t))}yt.displayName="ModalFrame";import{styled as _l}from"@mui/joy";var Gl=_l(to,{name:"Dialog",slot:"Root"})({padding:0}),bt=ro.forwardRef((e,o)=>{let{title:t,children:n,actions:i,fullscreen:a,...r}=e;return ro.createElement(Gl,{layout:a?"fullscreen":"center",ref:o,...r},ro.createElement(Fo,null,t),ro.createElement(No,null,n),ro.createElement(me,null,i))});bt.displayName="DialogFrame";import Wl from"react";import{Divider as ql}from"@mui/joy";import{motion as Kl}from"framer-motion";var jl=Kl(ql),no=e=>Wl.createElement(jl,{...e});no.displayName="Divider";import Zl from"react";import{Drawer as Xl}from"@mui/joy";import{motion as Ql}from"framer-motion";var es=Ql(Xl),xt=e=>{let{children:o,...t}=e;return Zl.createElement(es,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};xt.displayName="InsetDrawer";import z,{useCallback as Lo,useEffect as kr,useMemo as vt,useRef as Tr,useState as Oo}from"react";import{styled as Ce}from"@mui/joy";import os from"@mui/icons-material/CloudUploadRounded";import ts from"@mui/icons-material/UploadFileRounded";import rs from"@mui/icons-material/ClearRounded";import{combine as ns}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as as,monitorForExternal as is}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as wr,getFiles as ls}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Ir}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ss}from"@mui/joy";var ps=Ce(ss)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),ds=Ce(L,{name:"Uploader",slot:"PreviewRoot"})({}),ms=Ce(Je,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),cs=Ce(ts,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),us=Ce(rs,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),gs=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Dt=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=gs[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},fs=e=>{let{files:o,uploaded:t,onDelete:n}=e;return z.createElement(ds,{gap:1},[...t,...o].map(i=>z.createElement(ms,{key:i.name,size:"sm",color:"neutral"},z.createElement(L,{direction:"row",alignItems:"center",gap:2},z.createElement(cs,null),z.createElement(L,{flex:"1"},z.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&z.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Dt(i.size))),z.createElement(Y,{onClick:()=>n?.(i)},z.createElement(us,null))))))},hs=Ce(L,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),Cs=Ce(te,{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}`})),ys=Ce(os,{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"})),Sr=z.memo(e=>{let{accept:o,minCount:t,maxCount:n,name:i,size:a,maxFileSize:r,maxFileTotalSize:d,onChange:l,label:s,disabled:p,onDelete:c}=e,y=Tr(null),h=Tr(null),[x,m]=Oo(),[f,D]=Oo([]),[g,v]=Oo(e.uploaded||[]),[T,u]=Oo("idle"),w=vt(()=>{let B=o.split(",").map(N=>N.trim()),[E,J]=[B.filter(N=>["image/*","video/*","audio/*"].includes(N)).map(N=>{let[$]=N.split("/");return $.toLowerCase()}),B.filter(N=>!["image/*","video/*","audio/*"].includes(N)).map(N=>{let[$,ie]=N.split("/");return ie?ie.toUpperCase():$.toUpperCase().replace(".","")})],F=[];E.length>0&&F.push(`Any ${E.join(", ")} files`),J.length>0&&F.push(J.join(", "));let S=[F.join(", "),`Maximum ${Dt(d)}`];return n&&S.push(`Up to ${n} ${n===1?"file":"files"}`),S.join(", ")},[o,d,n]),C=vt(()=>!!x||e.error,[e.error,x]),P=vt(()=>!n||n&&[...g,...f].length!==n,[f,n,g]),M=Lo(B=>{try{let E=o.split(",").map(N=>N.trim().replace(".","").replace("*",".*"))||[],J=new RegExp(`\\b(${E.join("|")})\\b`);if(B.forEach(N=>{let[$,ie]=N.name.split(".");if(!J.test(N.type)&&!J.test(ie))throw new Error("Please upload acceptable file type.")}),r&&B.forEach(N=>{if(N.size>r)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Dt(r)} or less.`)}),[...f,...B].reduce((N,$)=>N+$.size,0)>d)throw new Error("Total File size exceeded the maximum limit.");let S=[...f,...B];if(n&&[...g,...S].length>n)throw new Error("Exceeded the maximum number of files.");l?.({target:{name:i,value:S}}),D(S),m(void 0)}catch(E){m(E.message)}},[f,g,n,o,r,d,i,l]);kr(()=>{let B=y.current;if(!(!B||p))return ns(as({element:B,canDrop:wr,onDragEnter:()=>u("over"),onDragLeave:()=>u("potential"),onDrop:async({source:E})=>{let J=await ls({source:E});M(J)}}),is({canMonitor:wr,onDragStart:()=>{u("potential"),Ir.start()},onDrop:()=>{u("idle"),Ir.stop()}}))}),kr(()=>{h.current&&t&&(f.length<t?h.current.setCustomValidity(`At least ${t} files are required.`):h.current.setCustomValidity(""))},[h,f,t]);let k=Lo(B=>{let E=Array.from(B.target.files||[]);M(E)},[M]),V=Lo(B=>{B instanceof File?D(E=>(l?.({target:{name:i,value:E.filter(J=>J!==B)}}),E.filter(J=>J!==B))):(v(E=>E.filter(J=>J.id!==B.id)),c?.(B)),m(void 0)},[i,l,c]),A=Lo(()=>{h.current?.click()},[]);return z.createElement(hs,null,P&&z.createElement(se,{size:a,error:!!(C||x),disabled:p,required:!!t},s&&z.createElement(pe,null,s),z.createElement(Cs,{state:T,error:!!(C||x),ref:y,onClick:A},z.createElement(L,{alignItems:"center",gap:1},z.createElement(ys,{state:T,error:!!(C||x)})),z.createElement(ps,{disabled:p,required:!!t,onInvalid:B=>{t&&f.length<t&&m(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:o,type:"file",ref:h,role:"button",onChange:k}}})),z.createElement(de,null,z.createElement(L,null,x&&z.createElement("div",null,x),z.createElement("div",null,w)))),[...g,...f].length>0&&z.createElement(fs,{files:f,uploaded:g,onDelete:V}))});import{Grid as bs}from"@mui/joy";import{motion as xs}from"framer-motion";var vs=xs(bs),Mt=vs;Mt.displayName="Grid";import ge from"react";import Ms from"react-markdown";import{Link as Ps}from"@mui/joy";import{visit as Ds}from"unist-util-visit";function Ar(e){let{accentColor:o}=e;return t=>{Ds(t,"text",(n,i,a)=>{let r=n.value,d=/\|\|.*?\|\|/g,l,s=0,p=[];for(;(l=d.exec(r))!==null;){l.index>s&&p.push({type:"text",value:r.slice(s,l.index)});let c=l[0].split("||")[1];p.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:c}]}),s=l.index+l[0].length}s<r.length&&p.push({type:"text",value:r.slice(s)}),p.length&&a.children.splice(i,1,...p)})}}var Pt=e=>{let{color:o,textColor:t,defaultLevel:n="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:r,content:d,...l}=e;return ge.createElement(ee,{component:"div",color:o,textColor:t,level:n,...l},ge.createElement(Ms,{...r,children:d,rehypePlugins:[[Ar,{accentColor:i}]],components:{h1:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>ge.createElement(ee,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:p})=>ge.createElement(ee,{color:o,textColor:t,level:n,...p?.properties},s),a:({children:s,href:p})=>ge.createElement(Ps,{href:p,target:a},s),hr:()=>ge.createElement(no,null),...r?.components}}))};Pt.displayName="Markdown";import j,{forwardRef as ks,useCallback as kt,useEffect as Ts,useImperativeHandle as ws,useRef as Is,useState as Ss}from"react";import{IMaskInput as As,IMask as Nr}from"react-imask";import Ns from"@mui/icons-material/CalendarToday";import{styled as Tt,useThemeProps as Fs}from"@mui/joy";import{FocusTrap as Bs,ClickAwayListener as Es,Popper as Ls}from"@mui/base";var Os=Tt(Ls,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Hs=Tt(te,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),zs=Tt("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Fr=(e,o)=>{let t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,n.toString()).replace(/MM/g,t)},Vs=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function Rs(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Ys=j.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return j.createElement(As,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Vs(i),blocks:{M:{mask:Nr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Nr.MaskedRange,from:1900,to:9999}},format:r=>Fr(r,i),parse:Rs,autofix:"pad",overwrite:!0})}),Br=ks((e,o)=>{let t=Fs({props:e,name:"MonthPicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM",size:f,...D}=t,g=Is(null),[v,T]=U(t.value,t.defaultValue||"",kt(k=>n?.({target:{name:t.name,value:k}}),[t.name,n]),{disableStrict:!0}),[u,w]=Ss(null),C=!!u;Ts(()=>{u||g.current?.blur()},[u,g]),ws(o,()=>g.current,[g]);let P=kt(k=>{T(k.target.value)},[T]),M=kt(k=>{w(u?null:k.currentTarget),g.current?.focus()},[u,w,g]);return j.createElement(zs,null,j.createElement(Bs,{open:!0},j.createElement(j.Fragment,null,j.createElement(W,{...D,color:r?"danger":D.color,ref:g,size:f,value:v,onChange:P,placeholder:m,disabled:i,required:y,slotProps:{input:{component:Ys,ref:g,format:m}},error:r,className:x,sx:{...h,fontFamily:"monospace"},endDecorator:j.createElement(Y,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":C},j.createElement(Ns,null)),label:a,helperText:d}),C&&j.createElement(Es,{onClickAway:()=>w(null)},j.createElement(Os,{id:"month-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:k=>k.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},j.createElement(Hs,{tabIndex:-1,role:"presentation"},j.createElement(fe,{view:"month",views:["month"],value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([k])=>{P({target:{name:t.name,value:Fr(k,m)}}),w(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),j.createElement(me,{sx:{p:1}},j.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{P({target:{name:t.name,value:""}}),w(null)}},"Clear"))))))))});import Z,{forwardRef as $s,useCallback as Ho,useEffect as Js,useImperativeHandle as Us,useMemo as _s,useRef as Gs,useState as Ws}from"react";import{IMaskInput as qs,IMask as Er}from"react-imask";import Ks from"@mui/icons-material/CalendarToday";import{styled as wt,useThemeProps as js}from"@mui/joy";import{FocusTrap as Zs,ClickAwayListener as Xs,Popper as Qs}from"@mui/base";var ep=wt(Qs,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),op=wt(te,{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})),tp=wt("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Or=([e,o],t)=>{let n=i=>{let a=`${i.getMonth()+1}`,r=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,r.toString()).replace(/MM/g,a)};return[n(e),o?n(o):""].join(" - ")};function Lr(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Hr=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[Lr(o),Lr(t)]},rp=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),np=Z.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return Z.createElement(qs,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:rp(i),blocks:{m:{mask:Er.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Er.MaskedRange,from:1900,to:9999}},format:r=>Or(r,i),parse:Hr,autofix:"pad",overwrite:!0})}),It=$s((e,o)=>{let t=js({props:e,name:"MonthRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM",size:f,...D}=t,g=Gs(null),[v,T]=U(t.value,t.defaultValue||"",Ho(A=>n?.({target:{name:t.name,value:A}}),[t.name,n]),{disableStrict:!0}),[u,w]=Ws(null),C=!!u,P=_s(()=>v?Hr(v):void 0,[v]);Js(()=>{u||g.current?.blur()},[u,g]),Us(o,()=>g.current,[g]);let M=Ho(A=>{T(A.target.value)},[T]),k=Ho(A=>{w(u?null:A.currentTarget),g.current?.focus()},[u,w,g]),V=Ho(([A,R])=>{!A||!R||(T(Or([A,R],m)),w(null))},[T,w,m]);return Z.createElement(tp,null,Z.createElement(Zs,{open:!0},Z.createElement(Z.Fragment,null,Z.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:f,value:v,onChange:M,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:np,ref:g,format:m}},error:r,className:x,sx:{...h,fontFamily:"monospace"},endDecorator:Z.createElement(Y,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C},Z.createElement(Ks,null)),label:a,helperText:d}),C&&Z.createElement(Xs,{onClickAway:()=>w(null)},Z.createElement(ep,{id:"month-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:A=>A.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},Z.createElement(op,{tabIndex:-1,role:"presentation"},Z.createElement(fe,{view:"month",views:["month"],rangeSelection:!0,defaultValue:P,onChange:V,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),Z.createElement(me,{sx:{p:1}},Z.createElement(H,{size:f,variant:"plain",color:"neutral",onClick:()=>{T(""),w(null)}},"Clear"))))))))});It.displayName="MonthRangePicker";import zo,{useCallback as zr,useMemo as ap,useState as ip}from"react";import{NumericFormat as lp}from"react-number-format";import{styled as sp,useThemeProps as pp}from"@mui/joy";var dp=(e,o)=>{let[t,n=""]=`${e}`.split(".");return+`${t}${n.padEnd(o,"0")}`},mp=zo.forwardRef(function(o,t){let{onChange:n,min:i,max:a,...r}=o;return zo.createElement(lp,{...r,onValueChange:({value:d})=>{n?.({target:{name:o.name,value:d}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),cp=sp(W,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),St=zo.forwardRef(function(o,t){let n=pp({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:r,error:d,helperText:l,required:s,disabled:p,useMinorUnit:c,maxDecimalScale:y=0,min:h,max:x,sx:m,className:f,...D}=n,[g,v]=U(n.value,n.defaultValue,zr(P=>a?.({target:{name:i,value:P}}),[a,i])),[T,u]=ip(x&&g&&g>x||h&&g&&g<h),w=ap(()=>g&&c?g/Math.pow(10,y):g,[g,c,y]),C=zr(P=>{if(P.target.value===""){v(void 0);return}let M=Number(P.target.value);h&&M<h||x&&M>x?u(!0):u(!1);let k=c?dp(M,y):M;v(k)},[v,c,y,h,x]);return zo.createElement(cp,{...D,ref:t,value:w,onChange:C,error:T||d,disabled:p,required:s,color:T||d?"danger":n.color,label:r,helperText:l,slotProps:{input:{component:mp,"aria-label":D["aria-label"],decimalScale:y}},sx:{...m},className:f})});St.displayName="PercentageInput";import{Radio as up,RadioGroup as gp}from"@mui/joy";import{motion as Vr}from"framer-motion";var fp=Vr(up),ao=fp;ao.displayName="Radio";var hp=Vr(gp),io=hp;io.displayName="RadioGroup";import Rr from"react";function At(e){let{items:o,...t}=e;return Rr.createElement(io,{...t},o.map(n=>Rr.createElement(ao,{key:`${n.value}`,value:n.value,label:n.label})))}At.displayName="RadioList";import xe from"react";import{Stepper as Cp,Step as yp,StepIndicator as bp,stepClasses as Nt,stepIndicatorClasses as lo,styled as Ft}from"@mui/joy";import xp from"@mui/icons-material/Check";import{motion as vp}from"framer-motion";var Vo=Ft(yp)({});Vo.displayName="Step";var Ro=Ft(bp)({});Ro.displayName="StepIndicator";var Dp=Ft(Cp)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${lo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),Mp=vp(Dp);function Bt(e){let{steps:o,activeColor:t="primary.500",inactiveColor:n="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:r}=e;return xe.createElement(Mp,{sx:d=>({"--StepIndicator-size":"24px","--Step-gap":d.spacing(2),[`& .${lo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Nt.completed}`]:{"&::after":{bgcolor:i},[`& .${lo.root}`]:{bgcolor:t}},[`& .${Nt.active}`]:{"&::after":{bgcolor:a},[`& .${lo.root}`]:{bgcolor:t}},[`& .${Nt.disabled}`]:{"&::after":{bgcolor:a},[`& .${lo.root}`]:{bgcolor:n}}})},o.map((d,l)=>{let s=r===l+1,p=r>l+1,c=r<l+1,y=d.label||d.extraContent;return xe.createElement(Vo,{indicator:xe.createElement(Ro,{variant:"solid",color:"primary"},p?xe.createElement(xp,null):d.indicatorContent),active:s,completed:p,disabled:c},y&&xe.createElement(L,null,d.label&&xe.createElement(G,{level:"title-sm"},d.label),d.extraContent&&xe.createElement(G,{level:"body-xs"},d.extraContent)))}))}Bt.displayName="Stepper";import Yr from"react";import{Switch as Pp,styled as kp,switchClasses as Tp}from"@mui/joy";import{motion as $r}from"framer-motion";var wp=$r(Pp),Ip=kp($r.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)",[`&.${Tp.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Sp=e=>Yr.createElement(Ip,{...e,layout:!0,transition:Ap}),Ap={type:"spring",stiffness:700,damping:30},Et=e=>Yr.createElement(wp,{...e,slots:{thumb:Sp,...e.slots}});Et.displayName="Switch";import{Tabs as Np,Tab as Fp,TabList as Bp,TabPanel as Ep,styled as Lp,tabClasses as Op}from"@mui/joy";import{motion as Yo}from"framer-motion";var Hp=Yo(Np),Lt=Hp;Lt.displayName="Tabs";var zp=Lp(Yo(Fp))(({theme:e})=>({[`&:not(.${Op.selected})`]:{color:e.palette.neutral[700]}})),Ot=zp;Ot.displayName="Tab";var Vp=Yo(Bp),Ht=Vp;Ht.displayName="TabList";var Rp=Yo(Ep),zt=Rp;zt.displayName="TabPanel";import $o from"react";import{CssBaseline as Vt,CssVarsProvider as Yp,checkboxClasses as $p,extendTheme as Jp,inputClasses as ke}from"@mui/joy";var Jr={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"}}},Up=Jp({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},colorSchemes:{light:Jr,dark:Jr},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ke.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ke.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ke.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ke.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ke.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ke.root}`]:{"font-family":"monospace"}}}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr: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)"},[`& .${$p.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function Rt(e){return $o.createElement($o.Fragment,null,$o.createElement(Yp,{theme:Up},$o.createElement(Vt,null),e.children))}Rt.displayName="ThemeProvider";export{go as Accordion,uo as AccordionDetails,co as AccordionSummary,Go as Accordions,Wo as Alert,Nb as AspectRatio,Ee as Autocomplete,Db as AutocompleteListbox,Mb as AutocompleteOption,wb as Avatar,Sb as AvatarGroup,Bb as Badge,Le as Box,Zo as Breadcrumbs,Re as Button,Ye as Calendar,Je as Card,tt as CardActions,et as CardContent,ot as CardCover,rt as CardOverflow,Ue as Checkbox,Ne as Chip,$b as CircularProgress,nt as Container,Vt as CssBaseline,Mo as CurrencyInput,mt as DataTable,Po as DatePicker,gt as DateRangePicker,Ke as DialogActions,eo as DialogContent,bt as DialogFrame,oo as DialogTitle,no as Divider,Ub as Drawer,Ve as Dropdown,Ie as FormControl,Ae as FormHelperText,Se as FormLabel,Mt as Grid,Fe as IconButton,Ge as Input,xt as InsetDrawer,Gb as LinearProgress,sx as Link,qb as List,jb as ListDivider,Xb as ListItem,ex as ListItemButton,tx as ListItemContent,nx as ListItemDecorator,ix as ListSubheader,Pt as Markdown,Oe as Menu,He as MenuButton,ze as MenuItem,ht as Modal,Eo as ModalClose,to as ModalDialog,yt as ModalFrame,Ct as ModalOverflow,Br as MonthPicker,It as MonthRangePicker,To as Option,St as PercentageInput,ao as Radio,io as RadioGroup,At as RadioList,Xe as Select,We as Sheet,hx as Skeleton,dx as Slider,we as Stack,Vo as Step,ux as StepButton,Ro as StepIndicator,Bt as Stepper,Et as Switch,Ot as Tab,Ht as TabList,zt as TabPanel,qe as Table,it as TableBody,at as TableHead,Lt as Tabs,je as Textarea,Rt as ThemeProvider,Qe as Tooltip,ee as Typography,Sr as Uploader,yb as accordionClasses,bb as accordionDetailsClasses,vb as accordionSummaryClasses,xb as accordionsClasses,Hy as alertClasses,Fb as aspectRatioClasses,Pb as autocompleteClasses,kb as autocompleteListboxClasses,Tb as autocompleteOptionClasses,Ib as avatarClasses,Ab as avatarGroupClasses,Eb as badgeClasses,zy as boxClasses,Lb as breadcrumbsClasses,Vy as buttonClasses,Hb as cardActionsClasses,Ob as cardClasses,zb as cardContentClasses,Vb as cardCoverClasses,Rb as cardOverflowClasses,Ry as checkboxClasses,Yb as chipClasses,Jb as circularProgressClasses,ub as dialogActionsClasses,cb as dialogContentClasses,mb as dialogTitleClasses,Yy as dividerClasses,_b as drawerClasses,ob as formControlClasses,rb as formHelperTextClasses,tb as formLabelClasses,nb as gridClasses,$y as iconButtonClasses,Jy as inputClasses,Wb as linearProgressClasses,px as linkClasses,Kb as listClasses,Zb as listDividerClasses,ox as listItemButtonClasses,Qb as listItemClasses,rx as listItemContentClasses,ax as listItemDecoratorClasses,lx as listSubheaderClasses,_y as menuButtonClasses,Uy as menuClasses,Gy as menuItemClasses,lb as modalClasses,sb as modalCloseClasses,pb as modalDialogClasses,db as modalOverflowClasses,Wy as optionClasses,qy as radioClasses,Ky as radioGroupClasses,jy as selectClasses,ib as sheetClasses,Cx as skeletonClasses,mx as sliderClasses,ab as stackClasses,gx as stepButtonClasses,cx as stepClasses,fx as stepperClasses,Zy as switchClasses,hb as tabListClasses,Cb as tabPanelClasses,Xy as tableClasses,fb as tabsClasses,Qy as textareaClasses,gb as tooltipClasses,eb as typographyClasses,Ly as useColorScheme,Ey as useTheme,Oy as useThemeProps};