@applica-software-guru/react-admin 1.2.118 → 1.2.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/Provider.d.ts.map +1 -1
- package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +24 -24
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +52 -12
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-buttons/CreateInDialogButton.tsx +12 -1
- package/src/components/ra-buttons/EditInDialogButton.jsx +12 -1
- package/src/components/ra-forms/LongForm/Provider.tsx +11 -3
- package/src/components/ra-forms/SimpleForm.tsx +5 -2
package/dist/react-admin.umd.js
CHANGED
|
@@ -199,7 +199,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
199
199
|
animation: ${0} 1.4s linear infinite;
|
|
200
200
|
`),bO)),TO=ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),PO=ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Te(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>U({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Gt.css(fm||(fm=yl`
|
|
201
201
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
202
|
-
`),QO)),gm=V.forwardRef(function(t,n){const r=Kt({props:t,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=_e(r,yO),m=U({},r,{color:s,disableShrink:l,size:u,thickness:f,value:p,variant:C}),I=xO(m),B={},y={},O={};if(C==="determinate"){const j=2*Math.PI*((oo-f)/2);B.strokeDasharray=j.toFixed(3),O["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*j).toFixed(3)}px`,y.transform="rotate(-90deg)"}return g.jsx(wO,U({className:Ze(I.root,i),style:U({width:u,height:u},y,A),ownerState:m,ref:n,role:"progressbar"},O,h,{children:g.jsx(TO,{className:I.svg,ownerState:m,viewBox:`${oo/2} ${oo/2} ${oo} ${oo}`,children:g.jsx(PO,{className:I.circle,style:B,ownerState:m,cx:oo,cy:oo,r:(oo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(gm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:br(c.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const pm=gm;function SO(e){return Ht("MuiLoadingButton",e)}const Mr=Yt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),OO=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],MO=e=>{const{loading:t,loadingPosition:n,classes:r}=e,i={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Te(n)}`],endIcon:[t&&`endIconLoading${Te(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Te(n)}`]},s=Ar.unstable_composeClasses(i,SO,r);return U({},r,s)},DO=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",RO=ue(BO,{shouldForwardProp:e=>DO(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Mr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Mr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>U({[`& .${Mr.startIconLoadingStart}, & .${Mr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Mr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Mr.startIconLoadingStart}, & .${Mr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Mr.startIconLoadingStart}, & .${Mr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),jO=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Te(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>U({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),hm=V.forwardRef(function(t,n){const r=Kt({props:t,name:"MuiLoadingButton"}),{children:i,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=_e(r,OO),h=Iu(l),m=A??g.jsx(pm,{"aria-labelledby":h,color:"inherit",size:16}),I=U({},r,{disabled:s,loading:u,loadingIndicator:m,loadingPosition:f,variant:p}),B=MO(I),y=u?g.jsx(jO,{className:B.loadingIndicator,ownerState:I,children:m}):null;return g.jsxs(RO,U({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?i:y,I.loadingPosition==="end"?y:i]}))});process.env.NODE_ENV!=="production"&&(hm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:br(c.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const kO=hm;function _A({variant:e,theme:t,color:n,loadingPosition:r}){const i=en(t,n),{lighter:s,main:l,dark:u,contrastText:A}=i,f=`${n}Button`,p=yi(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},m={"&::after":{boxShadow:`0 0 6px 6px ${Ve(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ve(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...m};case"text":default:return{color:l,...C,...m}}}const FO=ue(kO,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:i,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{..._A({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!i&&{color:"#fff"},...t!=="text"&&{..._A({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{..._A({variant:t,theme:e,color:r,loadingPosition:s})}}})),JA=T.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...i},s)=>{const l=xt();return g.jsx(FO,{ref:s,variant:e,shape:t,theme:l,loadingPosition:i.loadingPosition,loading:i.loading,color:r,...i,children:n})});JA.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},JA.displayName="LoadingButton";function LO({color:e,theme:t,labelColor:n}){const r=en(t,e),{main:i,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:i,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:i}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const NO=ue(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&LO({color:t,theme:e,labelColor:n})}));function Cm({children:e,arrow:t,labelColor:n="",...r}){const i=xt();return g.jsx(b.Box,{display:"flex",children:g.jsx(NO,{arrow:t,...r,theme:i,labelColor:n,children:e})})}Cm.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const io=T.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...i},s)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return g.jsxs(b.Box,{ref:s,children:[n==="grow"&&g.jsx(b.Grow,{...i,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...i,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...i,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...i,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...i,children:g.jsx(b.Box,{sx:l,children:e})})]})});io.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])},T.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Em({value:e,...t}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Em.propTypes={value:c.number};function mm({value:e,size:t,variant:n,thickness:r,showLabel:i,pathColor:s,sx:l,...u}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...u,value:100}),i&&g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),g.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}mm.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Im({icon:e,value:t,...n}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),g.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Im.propTypes={icon:c.node,value:c.number};function Bm({value:e,...t}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),g.jsx(b.Box,{sx:{minWidth:35},children:g.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Bm.propTypes={value:c.number};const vm=T.createContext({});function VO(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=M.useResourceContext(),i=M.useDataProvider(),{search:s}=ya.useLocation(),l=`${r}/new`,u=T.useCallback(()=>{if(!t||!Pe.isFunction(i.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((m,I)=>{h[I]=m}),i.get(l,h).then(m=>m.data).then(m=>{const{responseCode:I,value:B}=m;return I==="ok"?B:Promise.reject(m)})},[r,t,s,i]),A=T.useMemo(()=>Pe.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:f,isLoading:p}=au.useQuery(A),C=Pe.omit(e,["useDefaults"]);return p?g.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:g.jsx(b.CircularProgress,{})}):g.jsx(vm.Provider,{value:f??{},children:g.jsx(M.Create,{...C})})}function HO(){return T.useContext(vm)}const zO=ue(VO,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),WO=fs(M.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),Dr=e=>g.jsx(WO,{...e});Dr.defaultProps={...M.Toolbar.defaultProps},Dr.propTypes={...M.Toolbar.propTypes};const XA=({children:e,content:t,title:n,subheader:r,secondary:i,toolbar:s,...l})=>{const u=M.useTranslate(),A=M.useResourceContext(),{cardTitle:f,cardSubheader:p}=T.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(or,{content:t,title:f,subheader:p,secondary:i,divider:!0,children:g.jsxs(T.Fragment,{children:[e,s===!0?g.jsx(Dr,{children:g.jsx(M.SaveButton,{})}):s]})})})};XA.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},XA.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const UO=ue(M.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),bl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:i}=Qn();return g.jsx(UO,{defaultValues:n,spacing:t||i,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||i,children:e})})};bl.propTypes={...b.Grid.propTypes,...M.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},bl.defaultProps={...b.Stack.defaultProps},bl.Section=XA;const GO=fs(M.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),Ql=({title:e,modal:t,content:n,subheader:r,secondary:i,sx:s,...l})=>{const u=fh(e),A=M.useRecordContext();return g.jsx(or,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?i:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:g.jsx(GO,{toolbar:g.jsx(Dr,{}),...l})})};Ql.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(Dr,{children:g.jsx(M.SaveButton,{type:"button"})}),secondary:g.jsx(di,{children:g.jsx(M.DeleteWithConfirmButton,{})})},Ql.propTypes={...M.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const xl=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:s,divider:l,...u})=>{const A=Gt.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{getFieldState:m,formState:I}=ba.useFormContext(),{error:B}=m(p,I),y=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:y||C,isRequired:h})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};xl.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},xl.defaultProps={display:"label",divider:!1};const YO=ue(M.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),KO=({label:e,addLabel:t,source:n,helperText:r,divider:i=!0,...s})=>g.jsx(xl,{label:e,addLabel:t,source:n,helperText:r,divider:i,children:g.jsx(YO,{source:n,label:!1,...s})}),ZA=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(di,{children:[e&&g.jsx(M.EditButton,{}),t&&g.jsx(M.DeleteWithConfirmButton,{}),n&&g.jsx(M.CloneButton,{})]});ZA.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},ZA.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const ym=ue("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),_O=ue("ul")({display:"inline-block"}),bm=e=>{var p;const{className:t,emptyText:n,source:r,title:i,...s}=e,l=be.useRecordContext(e),u=at.get(l,r),A=be.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):g.jsx(ym,{className:t,...s});if(Array.isArray(u))return g.jsx(_O,{className:t,...s,children:u.map((C,h)=>{var I;const m=i instanceof String?(I=at.get(C,i))==null?void 0:I.toString():i;return g.jsx("li",{children:m},h)})});const f=i instanceof String?(p=at.get(l,i))==null?void 0:p.toString():i;return g.jsx(ym,{className:t,...s,children:f})};bm.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var Qm={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",l="second",u="minute",A="hour",f="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var K=["th","st","nd","rd"],z=q%100;return"["+q+(K[(z-20)%10]||K[z]||K[0])+"]"}},x=function(q,K,z){var Z=String(q);return!Z||Z.length>=K?q:""+Array(K+1-Z.length).join(z)+q},S={s:x,z:function(q){var K=-q.utcOffset(),z=Math.abs(K),Z=Math.floor(z/60),F=z%60;return(K<=0?"+":"-")+x(Z,2,"0")+":"+x(F,2,"0")},m:function q(K,z){if(K.date()<z.date())return-q(z,K);var Z=12*(z.year()-K.year())+(z.month()-K.month()),F=K.clone().add(Z,C),te=z-F<0,W=K.clone().add(Z+(te?-1:1),C);return+(-(Z+(z-F)/(te?F-W:W-F))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:m,w:p,d:f,D:I,h:A,m:u,s:l,ms:s,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",N={};N[P]=j;var k="$isDayjsObject",_=function(q){return q instanceof le||!(!q||!q[k])},X=function q(K,z,Z){var F;if(!K)return P;if(typeof K=="string"){var te=K.toLowerCase();N[te]&&(F=te),z&&(N[te]=z,F=te);var W=K.split("-");if(!F&&W.length>1)return q(W[0])}else{var J=K.name;N[J]=K,F=J}return!Z&&F&&(P=F),F||!Z&&P},G=function(q,K){if(_(q))return q.clone();var z=typeof K=="object"?K:{};return z.date=q,z.args=arguments,new le(z)},$=S;$.l=X,$.i=_,$.w=function(q,K){return G(q,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function q(z){this.$L=X(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[k]=!0}var K=q.prototype;return K.parse=function(z){this.$d=function(Z){var F=Z.date,te=Z.utc;if(F===null)return new Date(NaN);if($.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(y);if(W){var J=W[2]-1||0,de=(W[7]||"0").substring(0,3);return te?new Date(Date.UTC(W[1],J,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)):new Date(W[1],J,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)}}return new Date(F)}(z),this.init()},K.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},K.$utils=function(){return $},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(z,Z){var F=G(z);return this.startOf(Z)<=F&&F<=this.endOf(Z)},K.isAfter=function(z,Z){return G(z)<this.startOf(Z)},K.isBefore=function(z,Z){return this.endOf(Z)<G(z)},K.$g=function(z,Z,F){return $.u(z)?this[Z]:this.set(F,z)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(z,Z){var F=this,te=!!$.u(Z)||Z,W=$.p(z),J=function(he,me){var xe=$.w(F.$u?Date.UTC(F.$y,me,he):new Date(F.$y,me,he),F);return te?xe:xe.endOf(f)},de=function(he,me){return $.w(F.toDate()[he].apply(F.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(me)),F)},ge=this.$W,ce=this.$M,Ae=this.$D,pe="set"+(this.$u?"UTC":"");switch(W){case m:return te?J(1,0):J(31,11);case C:return te?J(1,ce):J(0,ce+1);case p:var Ie=this.$locale().weekStart||0,Ee=(ge<Ie?ge+7:ge)-Ie;return J(te?Ae-Ee:Ae+(6-Ee),ce);case f:case I:return de(pe+"Hours",0);case A:return de(pe+"Minutes",1);case u:return de(pe+"Seconds",2);case l:return de(pe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(z){return this.startOf(z,!1)},K.$set=function(z,Z){var F,te=$.p(z),W="set"+(this.$u?"UTC":""),J=(F={},F[f]=W+"Date",F[I]=W+"Date",F[C]=W+"Month",F[m]=W+"FullYear",F[A]=W+"Hours",F[u]=W+"Minutes",F[l]=W+"Seconds",F[s]=W+"Milliseconds",F)[te],de=te===f?this.$D+(Z-this.$W):Z;if(te===C||te===m){var ge=this.clone().set(I,1);ge.$d[J](de),ge.init(),this.$d=ge.set(I,Math.min(this.$D,ge.daysInMonth())).$d}else J&&this.$d[J](de);return this.init(),this},K.set=function(z,Z){return this.clone().$set(z,Z)},K.get=function(z){return this[$.p(z)]()},K.add=function(z,Z){var F,te=this;z=Number(z);var W=$.p(Z),J=function(ce){var Ae=G(te);return $.w(Ae.date(Ae.date()+Math.round(ce*z)),te)};if(W===C)return this.set(C,this.$M+z);if(W===m)return this.set(m,this.$y+z);if(W===f)return J(1);if(W===p)return J(7);var de=(F={},F[u]=r,F[A]=i,F[l]=n,F)[W]||1,ge=this.$d.getTime()+z*de;return $.w(ge,this)},K.subtract=function(z,Z){return this.add(-1*z,Z)},K.format=function(z){var Z=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var te=z||"YYYY-MM-DDTHH:mm:ssZ",W=$.z(this),J=this.$H,de=this.$m,ge=this.$M,ce=F.weekdays,Ae=F.months,pe=F.meridiem,Ie=function(me,xe,ae,We){return me&&(me[xe]||me(Z,te))||ae[xe].slice(0,We)},Ee=function(me){return $.s(J%12||12,me,"0")},he=pe||function(me,xe,ae){var We=me<12?"AM":"PM";return ae?We.toLowerCase():We};return te.replace(O,function(me,xe){return xe||function(ae){switch(ae){case"YY":return String(Z.$y).slice(-2);case"YYYY":return $.s(Z.$y,4,"0");case"M":return ge+1;case"MM":return $.s(ge+1,2,"0");case"MMM":return Ie(F.monthsShort,ge,Ae,3);case"MMMM":return Ie(Ae,ge);case"D":return Z.$D;case"DD":return $.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Ie(F.weekdaysMin,Z.$W,ce,2);case"ddd":return Ie(F.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(J);case"HH":return $.s(J,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return he(J,de,!0);case"A":return he(J,de,!1);case"m":return String(de);case"mm":return $.s(de,2,"0");case"s":return String(Z.$s);case"ss":return $.s(Z.$s,2,"0");case"SSS":return $.s(Z.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(z,Z,F){var te,W=this,J=$.p(Z),de=G(z),ge=(de.utcOffset()-this.utcOffset())*r,ce=this-de,Ae=function(){return $.m(W,de)};switch(J){case m:te=Ae()/12;break;case C:te=Ae();break;case h:te=Ae()/3;break;case p:te=(ce-ge)/6048e5;break;case f:te=(ce-ge)/864e5;break;case A:te=ce/i;break;case u:te=ce/r;break;case l:te=ce/n;break;default:te=ce}return F?te:$.a(te)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return N[this.$L]},K.locale=function(z,Z){if(!z)return this.$L;var F=this.clone(),te=X(z,Z,!0);return te&&(F.$L=te),F},K.clone=function(){return $.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},q}(),se=le.prototype;return G.prototype=se,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",f],["$M",C],["$y",m],["$D",I]].forEach(function(q){se[q[1]]=function(K){return this.$g(K,q[0],q[1])}}),G.extend=function(q,K){return q.$i||(q(K,le,G),q.$i=!0),G},G.locale=X,G.isDayjs=_,G.unix=function(q){return G(1e3*q)},G.en=N[P],G.Ls=N,G.p={},G})})(Qm);var JO=Qm.exports;const Rr=ti(JO),qA=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...i})=>{const[s,l]=T.useState(null),u=M.useRecordContext(i),A=M.useDataProvider(),f=M.useResourceContext(),p=T.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=at.get(u,i==null?void 0:i.source),B=f.replace("entities/",""),y=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(i==null?void 0:i.source)}/${(I==null?void 0:I.id)||(u==null?void 0:u.id)}`),O=document.createElement("a");O.href=y,O.download=at.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source)),O.click()},[A,u,e,f,t,i==null?void 0:i.source,i==null?void 0:i.title]),C=T.useMemo(()=>({...u,[i==null?void 0:i.source]:(u==null?void 0:u.src)||at.get(u,i==null?void 0:i.source),[i==null?void 0:i.title]:(u==null?void 0:u.title)||at.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),[u,i==null?void 0:i.source,i==null?void 0:i.title]),h=M.useTranslate();return T.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:m})=>l(m)).catch(()=>l(null))},[u,A,r]),g.jsx(bm,{...i,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:at.get(C,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[at.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:Rr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};qA.propTypes={...M.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const XO=ue(M.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Rs=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(XO,{...e,source:t})};Rs.propTypes={...M.ImageField.propTypes,source:c.string};const wl=({width:e,height:t,circle:n,justify:r,record:i,...s})=>{const l=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),u=M.useRecordContext(),A=i||u;return g.jsx(Rs,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...s,record:A})};wl.defaultProps={...Rs.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},wl.propTypes={...Rs.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var xm={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){return function(n,r,i){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,p,C,h){return s.fromToBase(f,p,C,h)}i.en.relativeTime=l,s.fromToBase=function(f,p,C,h,m){for(var I,B,y,O=C.$locale().relativeTime||l,j=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=j.length,S=0;S<x;S+=1){var P=j[S];P.d&&(I=h?i(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var N=(n.rounding||Math.round)(Math.abs(I));if(y=I>0,N<=P.r||!P.r){N<=1&&S>0&&(P=j[S-1]);var k=O[P.l];m&&(N=m(""+N)),B=typeof k=="string"?k.replace("%d",N):k(N,p,P.l,y);break}}if(p)return B;var _=y?O.future:O.past;return typeof _=="function"?_(B):_.replace("%s",B)},s.to=function(f,p){return u(f,p,this,!0)},s.from=function(f,p){return u(f,p,this)};var A=function(f){return f.$u?i.utc():i()};s.toNow=function(f){return this.to(A(this),f)},s.fromNow=function(f){return this.from(A(this),f)}}})})(xm);var ZO=xm.exports;const qO=ti(ZO);Rr.extend(qO);const Tl=e=>{const t=M.useRecordContext(e),[n]=M.useLocaleState(),r=T.useMemo(()=>Rr(at.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(T.Fragment,{children:[g.jsx(M.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Tl.displayName="DateAgoField",Tl.propTypes={source:c.string.isRequired};const wm=ue(M.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));wm.propTypes={...M.DateField.propTypes};const $A=e=>g.jsx(wm,{...e});$A.defaultProps={...M.DateField.defaultProps,variant:"body1"},$A.propTypes={...M.DateField.propTypes};const Tm=ue(M.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Tm.propTypes={...M.EmailField.propTypes};const ed=e=>g.jsx(Tm,{...e});ed.defaultProps={...M.EmailField.defaultProps,variant:"body1"},ed.propTypes={...M.EmailField.propTypes};const $O=ue(M.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),td=({...e})=>{const t=M.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const i=at.get(t,`_${e==null?void 0:e.source}`,at.get(t,e==null?void 0:e.source)),s=at.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=i,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx($O,{...e,record:t,onClick:n})};td.propTypes={...M.FileField.propTypes,source:c.string,title:c.string};const Pm=e=>g.jsx(M.FunctionField,{...e});Pm.defaultProps={variant:"body1"};const e3=ue("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),nd=({source:e,defaultValue:t,...n})=>{const r=M.useRecordContext(n),i=at.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:i&&i!==null?i:t}})};nd.propTypes={defaultValue:c.any,source:c.string,record:c.object},nd.defaultProps={defaultValue:" "};const Sm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Sm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const rd=({label:e,source:t,defaultValue:n,children:r,tooltip:i,...s})=>{const{getCurrentDialog:l}=xo(),u=M.useRecordContext(s),A=M.useResourceContext(s),f=l(),p=T.useMemo(()=>!i||i===!1?!1:typeof i=="function"?i(u):typeof i=="string"?at.get(u,i,i):i,[u,i]);return g.jsx(Sm,{title:p,children:g.jsxs(T.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(M.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(e3,{...s,children:T.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};rd.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},rd.defaultProps={defaultValue:" ",children:g.jsx(nd,{})};const t3=fs("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),bi=e=>g.jsx(t3,{children:g.jsx(M.ReferenceManyField,{pagination:g.jsx(M.Pagination,{}),...e})});bi.defaultProps={...M.ReferenceManyField.defaultProps,margin:!1,border:!1},bi.propTypes={...M.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Om=({source:e,...t})=>{const n=M.useRecordContext(t),r=at.get(n,e,0),i=r/1024,s=i/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:i>1?`${i.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Om.propTypes={record:c.object,source:c.string};const Mm=ue(M.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));Mm.propTypes={...M.TextField.propTypes};const od=e=>g.jsx(Mm,{...e});od.defaultProps={...M.TextField.defaultProps,variant:"body1"},od.propTypes={...M.TextField.propTypes};const lt=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:s,divider:l,...u})=>{const A=Gt.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:m}}=M.useInput(u),I=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:I||C,isRequired:h})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};lt.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},lt.defaultProps={display:"label",divider:!1};const n3=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},r3=ue(M.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...n3(e)})),id=({children:e,disabled:t,type:n,...r})=>{const i=M.useRecordContext(r),s=r==null?void 0:r.source,l=i==null?void 0:i.id;return M.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(lt,{...r,children:g.jsx(r3,{disabled:t,children:T.cloneElement(e,{...e.props,entityId:l,property:s})})})};id.propTypes={...M.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},id.defaultProps={children:g.jsx(qA,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const o3=ue(M.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),sd=({...e})=>g.jsx(lt,{...e,children:g.jsx(o3,{})});sd.propTypes={...M.AutocompleteArrayInput.propTypes,...lt.propTypes},sd.defaultProps={...M.AutocompleteArrayInput.defaultProps,size:"small"};const i3=ue(M.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),ad=e=>{const{perPage:t,...n}=e;return g.jsx(lt,{...n,children:g.jsx(i3,{})})};ad.propTypes={...M.AutocompleteInput.propTypes,...lt.propTypes},ad.defaultProps={...M.AutocompleteInput.defaultProps,size:"small"};const s3=ue(M.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),ld=({horizontal:e,...t})=>{const n=xt();return g.jsx(lt,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(s3,{})})};ld.defaultProps={...M.BooleanInput.defaultProps,...lt.defaultProps},ld.propTypes={...M.BooleanInput.propTypes,...lt.propTypes,horizontal:c.bool};const a3=ue(M.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),cd=e=>g.jsx(lt,{...e,children:g.jsx(a3,{})});cd.propTypes={...M.DateInput.propTypes,...lt.propTypes},cd.defaultProps={...M.DateInput.defaultProps,...lt.defaultProps};const l3=ue(M.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ud=e=>g.jsx(lt,{...e,children:g.jsx(l3,{})});ud.propTypes={...M.DateTimeInput.propTypes,...lt.propTypes},ud.defaultProps={...lt.defaultProps};const c3=ue(M.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),Ad=({children:e,title:t,...n})=>{const r=ba.useWatch({name:n.source}),i=M.useRecordContext(n),{source:s}=n,l=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=at.get(i,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[i,s,r]);return g.jsx(lt,{...n,children:g.jsx(c3,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...i,[s]:(r==null?void 0:r.title)||at.get(i,s),[`_${s}`]:(r==null?void 0:r.src)||at.get(i,`_${s}`),[t||s]:l}})})})};Ad.propTypes={...M.FileInput.propTypes,source:c.string,title:c.string,children:c.node},Ad.defaultProps={children:g.jsx(td,{})};const dd=({children:e,title:t,...n})=>{const r=ba.useWatch({name:n.source}),i=M.useRecordContext(n),{source:s}=n;return M.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(lt,{...n,children:g.jsx(M.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:s,record:{...i,[s]:(r==null?void 0:r.title)||at.get(i,s),[`_${s}`]:(r==null?void 0:r.src)||at.get(i,`_${s}`)}})})})};dd.defaultProps={children:g.jsx(wl,{}),multiple:!1},dd.propTypes={...M.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const u3=ue(M.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),fd=e=>g.jsx(lt,{...e,children:g.jsx(u3,{})});fd.propTypes={...M.NumberInput.propTypes,...lt.propTypes},fd.defaultProps={...M.NumberInput.defaultProps,...lt.defaultProps};const Dm=({source:e,minWidth:t=300,children:n})=>{const r=M.useResourceContext(),i=M.useRecordContext(),[s,l]=T.useState(at.get(i,e,"")),[u,A]=T.useState(!1),f=T.useCallback(I=>l(I.target.value),[]),p=M.useDataProvider(),C=T.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,i,e]),h=T.useCallback(()=>{at.get(i,e)!==s&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,i]),m=T.useCallback(I=>{A(!0),p.update(r,{id:i.id,data:{...i,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,i]);return T.useEffect(()=>l(at.get(i,e)),[i,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:m}):g.jsx(b.TextField,{value:s,disabled:u,onChange:f,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Dm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const gd=({children:e,...t})=>g.jsx(M.ReferenceArrayInput,{...t,children:T.cloneElement(e,{...t,source:e.props.source||t.source})});gd.propTypes={...M.ReferenceArrayInput.propTypes,children:c.element},gd.defaultProps={...M.ReferenceArrayInput.defaultProps};const pd=({children:e,...t})=>g.jsx(M.ReferenceInput,{...t,children:T.cloneElement(e,{...t,source:e.props.source||t.source})});pd.propTypes={...M.ReferenceInput.propTypes,children:c.element},pd.defaultProps={...M.ReferenceInput.defaultProps};const hd=({reference:e,target:t,children:n,filters:r,actions:i,...s})=>g.jsx(M.ResourceContextProvider,{value:e,children:g.jsx(bi,{perPage:5,pagination:g.jsx(M.Pagination,{}),...s,reference:e,target:t,children:g.jsxs(T.Fragment,{children:[g.jsx(M.ListToolbar,{filters:r,actions:i}),n]})})});hd.propTypes={...bi.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},hd.defaultProps={...bi.defaultProps};const A3=ue(M.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),d3=e=>g.jsx(A3,{...e}),Rm=ue(M.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Rm.propTypes={...M.SelectArrayInput.propTypes};const Cd=e=>g.jsx(lt,{...e,children:g.jsx(Rm,{options:{autoWidth:!1}})});Cd.defaultProps={optionText:"name",optionValue:"id"},Cd.propTypes={...M.SelectArrayInput.propTypes,...lt.propTypes};const f3=ue(M.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),jm=e=>g.jsx(lt,{...e,children:g.jsx(f3,{})});jm.propTypes={...M.SelectInput.propTypes,...lt.propTypes};const Hn=e=>g.jsx(lt,{...e,children:g.jsx(M.TextInput,{})});Hn.propTypes={...M.TextInput.propTypes,...lt.propTypes};const Pl=({...e})=>{var u,A;const t=M.useTranslate(),n=M.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=ba.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let i=e.helperText,s=e.validate;s?Array.isArray(s)&&s.indexOf(n)===-1&&s.push(n):s=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(i=i&&i.length>0?`${l} - ${t(i)}`:l),g.jsx(Hn,{...e,validate:s,helperText:i,inputProps:{maxLength:e==null?void 0:e.maxLength}})};Pl.displayName="SmartTextInput",Pl.defaultProps={multiline:!1},Pl.propTypes={...Hn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const km=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Rr().hour(n).minute(r)};function g3(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const p3=e=>{if(!e)return"";const t=km(e);return t?t.format("HH:mm"):""},h3=e=>e,C3=ue(M.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Ed=e=>g.jsx(lt,{...e,children:g.jsx(C3,{})});Ed.defaultProps={...M.TimeInput.defaultProps,format:p3,parse:h3},Ed.propTypes={...M.TimeInput.propTypes,...lt.propTypes};const md=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Qn(),[r,i]=T.useState(!1),s=be.useAuthProvider(),l=be.useTranslate(),u=be.useNotify(),A=T.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;i(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>u(h,{type:"error"})).finally(()=>i(!1))},[s,e]);return g.jsx(be.ResourceContextProvider,{value:"user/change-password",children:g.jsx(be.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Ql,{onSubmit:A,toolbar:g.jsx(Dr,{children:g.jsx(M.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"oldPassword",type:"password",validate:be.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"newPassword",type:"password",validate:be.required()})})]})})})})},E3=ue(M.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),m3=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),I3=ue(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),Id=({title:e,divider:t,variant:n})=>{const r=M.useTranslate();return g.jsxs(T.Fragment,{children:[g.jsx(m3,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(I3,{})]})};Id.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},Id.defaultProps={divider:!0,variant:"h4"};const B3=ue(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important"}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function Fm(e){const{spacing:t}=Qn(),{spacing:n=t}=e,r=Pe.omit(e,["spacing"]);return g.jsx(M.Form,{...r,children:g.jsx(B3,{container:!0,spacing:n*2,children:e.children})})}function Bd(e){return e.id??e.label}function Lm(e,t){return t.match(new RegExp(`^${e}`))!==null}function v3(e){return Pe.map(e,"id")}function vd(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function y3(e,t){var s;const n=Pe.clone(e),{type:r,payload:i}=t;switch(r){case"setFormRootPath":return Pe.extend(n,{formRootPath:i});case"setSyncWithLocation":return Pe.extend(n,{syncWithLocation:i});case"setActiveItem":return Pe.includes(v3(e.items),i)?Pe.extend(n,{activeItem:i}):n;case"addItem":{const l=i.id,u=Pe.reject(n.items,A=>A.id===l);return u.push(i),Pe.extend(n,{items:u}),n.activeItem===void 0&&Pe.extend(n,{activeItem:i.id}),n}case"removeItem":{const l=Pe.isString(i)?i:i.id,u=Pe.reject(n.items,A=>A.id===l);return Pe.extend(n,{items:u}),n.activeItem===l&&Pe.extend(n,{activeItem:((s=Pe.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const b3={syncWithLocation:!0,items:[],activeItem:void 0},Nm=T.createContext(void 0);function Vm(e){const t=!!(e.syncWithLocation??!0),{rootMatchString:n}=e,{pathname:r}=ya.useLocation(),[i,s]=T.useReducer(y3,Pe.cloneDeep(b3)),{formRootPath:l,items:u}=i,A=T.useMemo(()=>({state:i,dispatch:s}),[i,s]);return T.useEffect(()=>{const f=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/*",":resource/:id/*"];n!==void 0&&f.push(n);const p=Pe.chain(f).map(h=>ya.matchPath(h,r)).reject(h=>h===null).first().value(),C=p==null?void 0:p.pathnameBase;C!==void 0&&C!==l&&s({type:"setFormRootPath",payload:C})},[r,l,n]),T.useEffect(()=>{s({type:"setSyncWithLocation",payload:!!t})},[t,s]),T.useEffect(()=>{if(t&&l!==void 0){const f=r.replace(`${l}/`,"");s({type:"setActiveItem",payload:f})}},[s,l,r,u]),g.jsx(Nm.Provider,{value:A,children:e.children})}function Hm(){const e=T.useContext(Nm);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Sl(){return Hm().state}function yd(){return Hm().dispatch}function zm(){return Sl().formRootPath}function Wm(){return Sl().activeItem}function Um(){return Sl().items}function Gm(){return Sl().syncWithLocation}function Ym(){const e=yd();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function Km(){const e=yd();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function _m(){const e=yd();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var Q3=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},Jm=e=>e.firstChild?e.firstChild.offsetParent===e:!0,x3=(e,t)=>{let n=e,r=0;Jm(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},w3=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},js=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?js="sticky":CSS.supports("position","-webkit-sticky")&&(js="-webkit-sticky"));var Ol=!1;try{const e=Object.defineProperty({},"passive",{get(){Ol={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var bd=e=>{const{el:t,onChange:n,unsubs:r,measure:i}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=i(s()),u=()=>{Object.assign(l,i(s())),n()};return window.addEventListener("resize",u,Ol),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=i(t.getBoundingClientRect()),l=()=>{Object.assign(s,i(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},T3=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},P3=(e,t,n)=>{const{bottom:r,offsetBottom:i,offsetTop:s}=n,l=Q3(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const k=C();k!==x&&S(k),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=k=>{const{offsetTop:_,height:X}=m,{naturalTop:G}=y,{height:$}=O;return k+_+X>=G+$+j+i},C=()=>{const{height:k}=m,{height:_}=O;return _+s+i<=k?3:p(f)?1:2},h=l!==window&&Jm(l),m=bd({el:l,onChange:A,unsubs:t,measure:({height:k,top:_})=>({height:k,offsetTop:h?_:0})}),I=w3(e),B=I===window?{top:0,bottom:0}:T3(I),y=bd({el:I,onChange:A,unsubs:t,measure:({height:k})=>({height:k-B.top-B.bottom,naturalTop:I===window?0:x3(I,l)+B.top+m.offsetTop})}),O=bd({el:e,onChange:A,unsubs:t,measure:({height:k})=>({height:k})});let j=0,x=C();const S=k=>{const _=x;if(x=k,_===2&&(j=-1),k===3){e.style.position=js,r?e.style.bottom=`${i}px`:e.style.top=`${s}px`;return}const{height:X,offsetTop:G}=m,{height:$,naturalTop:le}=y,{height:se}=O;if(k===2)if(e.style.position="relative",j=_===0?Math.max(0,G+f-le+s):Math.max(0,G+f+X-(le+se+i)),r){const q=Math.max(0,$-se-j);e.style.bottom=`${q}px`}else e.style.top=`${j}px`;else e.style.position=js,k===1?r?e.style.bottom=`${i}px`:e.style.top=`${X-se-i}px`:r?e.style.bottom=`${X-se-i}px`:e.style.top=`${s}px`};S(x);const P=k=>{if(k===f)return;const _=k-f;if(f=k,x===3)return;const{offsetTop:X,height:G}=m,{naturalTop:$,height:le}=y,{height:se}=O;if(_>0)if(x===0){if(k+X+s>$){const q=Math.max(0,X+f-$+s);k+X+G<=$+se+q+i?S(2):S(1)}}else x===2&&p(k)&&S(1);else if(x===1){if(X+k+G<$+le+i){const q=Math.max(0,X+f+G-($+se+i));X+k+s>=$+q?S(2):S(0)}}else x===2&&X+k+s<$+j&&S(0)},N=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",N,Ol),l.addEventListener("mousewheel",N,Ol),t.push(()=>l.removeEventListener("scroll",N),()=>l.removeEventListener("mousewheel",N))},S3=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,i]=T.useState(null);return T.useEffect(()=>{if(!r||!js)return;const s=[];return P3(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),i},O3=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:i,className:s,style:l}=e,u=S3({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:s,style:l,ref:u,children:i})},M3=O3,Xm=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(Xm||{});function Zm(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,i=Pe.omit(e,["sticky","disposition","spacing"]),s=t?M3:b.Box,l=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return g.jsx(b.Grid,{...i,item:!0,...n,children:g.jsx(s,{...l,children:g.jsx(b.Stack,{spacing:r,children:e.children})})})}function qm(e){return g.jsx(g.Fragment,{children:e.children})}function $m(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,i=>{if(T.isValidElement(i)&&(i==null?void 0:i.type)===qm){const{position:s}=i.props;switch(s){case"top":r.top.push(i);break;case"bottom":r.bottom.push(i);break}}}),r},[t])}function eI(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Pe.omit(e,["disposition"]);return g.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function tI(e){const t=Wm();return Lm(e,t??"")}function nI(e){const t=Um(),n=e!==void 0?vd(e):0;return T.useMemo(()=>Pe.chain(t).filter(i=>e!==void 0?Lm(e,i.id):!0).filter(i=>vd(i.id)===n+1).value(),[t,n,e])}function D3(){const e=zm(),t=ya.useNavigate();return T.useCallback(r=>{t(`${e}/${r}`)},[e,t])}function rI(){const e=nI();return g.jsx(b.Card,{variant:"outlined",children:g.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Pe.map(e,(t,n)=>g.jsx(Qd,{...t},n))})})}function Qd(e){const t=be.useTranslate()??Pe.identity,n=oI(e),{selected:r,label:i,icon:s,onClick:l,badge:u,items:A,isGroup:f,level:p}=n,{spacing:C}=Qn(),[h,m]=T.useState(r),I=T.useCallback(O=>{m(!h),l(O)},[l,h]),B=s!==void 0,y=Pe.omit(e,["label","icon","selected","badge"]);return g.jsxs(g.Fragment,{children:[g.jsx(b.ListItem,{...y,disablePadding:!0,children:g.jsxs(b.ListItemButton,{selected:r&&!f,onClick:I,sx:{pl:C*p},children:[B&&g.jsx(b.ListItemIcon,{children:s}),g.jsx(b.ListItemText,{inset:!B,primary:t(i)}),u&&g.jsx(b.ListItemAvatar,{children:g.jsx(Ms,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),f&&(h?g.jsx(An.ExpandLess,{}):g.jsx(An.ExpandMore,{}))]})}),f&&g.jsx(b.Collapse,{in:h,timeout:"auto",children:g.jsx(b.List,{children:Pe.map(A,(O,j)=>g.jsx(Qd,{...O},j))})})]})}function oI(e){const{id:t}=e,n=tI(t),r=vd(t),i=D3(),s=Gm(),l=Ym(),u=nI(t),A=!Pe.isEmpty(u),f=T.useCallback(C=>{A||(s?i(e.id):l(e.id)),Pe.isFunction(e.onClick)&&e.onClick(C)},[l,i,e,s,A]);return T.useMemo(()=>({...e,selected:n,onClick:f,items:u,isGroup:A,level:r}),[e,n,f,u,A])}function iI(e){const{label:t,icon:n,badge:r}=e,i=Bd(e),s=Km(),l=_m(),u=tI(i);return T.useEffect(()=>(s({id:i,label:t,icon:n,badge:r}),()=>{l(i)}),[s,l,t,n,i,r]),g.jsx(b.Box,{display:u?"unset":"none",children:e.children})}function sI(e){const t=xd(e),n=Bd(e);return g.jsx(iI,{...e,id:n,children:T.Children.map(t,r=>{const i=Bd(r.props);return T.cloneElement(r,{id:`${n}.${i}`})})})}function aI(e){return g.jsx(iI,{...e})}function xd(e){const{children:t}=e;return T.useMemo(()=>Pe.filter(T.Children.toArray(t),r=>T.isValidElement(r)&&((r==null?void 0:r.type)===aI||(r==null?void 0:r.type)===sI)),[t])}function R3(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,i=Pe.pick(e,["syncWithLocation"]),s=Pe.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=$m(e),A=xd(e);return g.jsx(Vm,{...i,children:g.jsxs(Fm,{...s,spacing:r,children:[g.jsxs(Zm,{disposition:t,spacing:r,children:[l,g.jsx(rI,{}),u]}),g.jsx(eI,{disposition:n,children:A})]})})}const Rt=R3;Rt.BaseForm=Fm,Rt.Content=eI,Rt.Provider=Vm,Rt.useItems=Um,Rt.useSyncWithLocation=Gm,Rt.useFormRootPath=zm,Rt.useActiveItem=Wm,Rt.useSetActiveItem=Ym,Rt.useAddItem=Km,Rt.useRemoveItem=_m,Rt.Sidebar=Zm,Rt.SidebarSection=qm,Rt.SidebarSectionPosition=Xm,Rt.useSidebarChildren=$m,Rt.NavMenu=rI,Rt.NavMenuItem=Qd,Rt.useNavMenuItem=oI,Rt.Tab=aI,Rt.Group=sI,Rt.useBaseItemChildren=xd;const j3=ue(M.Show,{name:"RaApplicaShow",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),k3=ue(M.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),Ml=fs(M.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));Ml.propTypes={...M.TabbedForm.propTypes},Ml.defaultProps={...M.TabbedForm.defaultProps},Ml.Tab=M.TabbedForm.Tab;const lI=T.createContext(void 0),F3=T.createContext(void 0),L3=()=>T.useContext(lI),N3=V.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:i=!1,index:s,member:l,resource:u}=e,A=M.useTranslate(),[f,p]=V.useState(!1),{total:C,remove:h}=L3(),m=V.useCallback(()=>{p(!1),h(s)},[s,h]),I=T.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return g.jsxs(F3.Provider,{value:I,children:[T.Children.map(n,(B,y)=>{if(!T.isValidElement(B))return null;const{source:O,...j}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:T.cloneElement(B,{source:O?`${l}.${O}`:l,index:O?void 0:y,resource:u,disabled:r,...j,label:!1})})}),!i&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2},children:g.jsx(di,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(M.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var V3=Array.isArray,wd=V3,H3=typeof Ln=="object"&&Ln&&Ln.Object===Object&&Ln,z3=H3,W3=z3,U3=typeof self=="object"&&self&&self.Object===Object&&self,G3=W3||U3||Function("return this")(),Td=G3,Y3=Td,K3=Y3.Symbol,Pd=K3,cI=Pd,uI=Object.prototype,_3=uI.hasOwnProperty,J3=uI.toString,ks=cI?cI.toStringTag:void 0;function X3(e){var t=_3.call(e,ks),n=e[ks];try{e[ks]=void 0;var r=!0}catch{}var i=J3.call(e);return r&&(t?e[ks]=n:delete e[ks]),i}var Z3=X3,q3=Object.prototype,$3=q3.toString;function eM(e){return $3.call(e)}var tM=eM,AI=Pd,nM=Z3,rM=tM,oM="[object Null]",iM="[object Undefined]",dI=AI?AI.toStringTag:void 0;function sM(e){return e==null?e===void 0?iM:oM:dI&&dI in Object(e)?nM(e):rM(e)}var fI=sM;function aM(e){return e!=null&&typeof e=="object"}var lM=aM,cM=fI,uM=lM,AM="[object Symbol]";function dM(e){return typeof e=="symbol"||uM(e)&&cM(e)==AM}var Sd=dM,fM=wd,gM=Sd,pM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hM=/^\w*$/;function CM(e,t){if(fM(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||gM(e)?!0:hM.test(e)||!pM.test(e)||t!=null&&e in Object(t)}var EM=CM;function mM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gI=mM,IM=fI,BM=gI,vM="[object AsyncFunction]",yM="[object Function]",bM="[object GeneratorFunction]",QM="[object Proxy]";function xM(e){if(!BM(e))return!1;var t=IM(e);return t==yM||t==bM||t==vM||t==QM}var wM=xM,TM=Td,PM=TM["__core-js_shared__"],SM=PM,Od=SM,pI=function(){var e=/[^.]+$/.exec(Od&&Od.keys&&Od.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function OM(e){return!!pI&&pI in e}var MM=OM,DM=Function.prototype,RM=DM.toString;function jM(e){if(e!=null){try{return RM.call(e)}catch{}try{return e+""}catch{}}return""}var kM=jM,FM=wM,LM=MM,NM=gI,VM=kM,HM=/[\\^$.*+?()[\]{}|]/g,zM=/^\[object .+?Constructor\]$/,WM=Function.prototype,UM=Object.prototype,GM=WM.toString,YM=UM.hasOwnProperty,KM=RegExp("^"+GM.call(YM).replace(HM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _M(e){if(!NM(e)||LM(e))return!1;var t=FM(e)?KM:zM;return t.test(VM(e))}var JM=_M;function XM(e,t){return e==null?void 0:e[t]}var ZM=XM,qM=JM,$M=ZM;function eD(e,t){var n=$M(e,t);return qM(n)?n:void 0}var hI=eD,tD=hI,nD=tD(Object,"create"),Dl=nD,CI=Dl;function rD(){this.__data__=CI?CI(null):{},this.size=0}var oD=rD;function iD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sD=iD,aD=Dl,lD="__lodash_hash_undefined__",cD=Object.prototype,uD=cD.hasOwnProperty;function AD(e){var t=this.__data__;if(aD){var n=t[e];return n===lD?void 0:n}return uD.call(t,e)?t[e]:void 0}var dD=AD,fD=Dl,gD=Object.prototype,pD=gD.hasOwnProperty;function hD(e){var t=this.__data__;return fD?t[e]!==void 0:pD.call(t,e)}var CD=hD,ED=Dl,mD="__lodash_hash_undefined__";function ID(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ED&&t===void 0?mD:t,this}var BD=ID,vD=oD,yD=sD,bD=dD,QD=CD,xD=BD;function Qi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qi.prototype.clear=vD,Qi.prototype.delete=yD,Qi.prototype.get=bD,Qi.prototype.has=QD,Qi.prototype.set=xD;var wD=Qi;function TD(){this.__data__=[],this.size=0}var PD=TD;function SD(e,t){return e===t||e!==e&&t!==t}var OD=SD,MD=OD;function DD(e,t){for(var n=e.length;n--;)if(MD(e[n][0],t))return n;return-1}var Rl=DD,RD=Rl,jD=Array.prototype,kD=jD.splice;function FD(e){var t=this.__data__,n=RD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():kD.call(t,n,1),--this.size,!0}var LD=FD,ND=Rl;function VD(e){var t=this.__data__,n=ND(t,e);return n<0?void 0:t[n][1]}var HD=VD,zD=Rl;function WD(e){return zD(this.__data__,e)>-1}var UD=WD,GD=Rl;function YD(e,t){var n=this.__data__,r=GD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var KD=YD,_D=PD,JD=LD,XD=HD,ZD=UD,qD=KD;function xi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xi.prototype.clear=_D,xi.prototype.delete=JD,xi.prototype.get=XD,xi.prototype.has=ZD,xi.prototype.set=qD;var $D=xi,eR=hI,tR=Td,nR=eR(tR,"Map"),rR=nR,EI=wD,oR=$D,iR=rR;function sR(){this.size=0,this.__data__={hash:new EI,map:new(iR||oR),string:new EI}}var aR=sR;function lR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var cR=lR,uR=cR;function AR(e,t){var n=e.__data__;return uR(t)?n[typeof t=="string"?"string":"hash"]:n.map}var jl=AR,dR=jl;function fR(e){var t=dR(this,e).delete(e);return this.size-=t?1:0,t}var gR=fR,pR=jl;function hR(e){return pR(this,e).get(e)}var CR=hR,ER=jl;function mR(e){return ER(this,e).has(e)}var IR=mR,BR=jl;function vR(e,t){var n=BR(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var yR=vR,bR=aR,QR=gR,xR=CR,wR=IR,TR=yR;function wi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wi.prototype.clear=bR,wi.prototype.delete=QR,wi.prototype.get=xR,wi.prototype.has=wR,wi.prototype.set=TR;var PR=wi,mI=PR,SR="Expected a function";function Md(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(SR);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var l=e.apply(this,r);return n.cache=s.set(i,l)||s,l};return n.cache=new(Md.Cache||mI),n}Md.Cache=mI;var OR=Md,MR=OR,DR=500;function RR(e){var t=MR(e,function(r){return n.size===DR&&n.clear(),r}),n=t.cache;return t}var jR=RR,kR=jR,FR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LR=/\\(\\)?/g,NR=kR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(FR,function(n,r,i,s){t.push(i?s.replace(LR,"$1"):r||n)}),t}),VR=NR;function HR(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var zR=HR,II=Pd,WR=zR,UR=wd,GR=Sd,YR=1/0,BI=II?II.prototype:void 0,vI=BI?BI.toString:void 0;function yI(e){if(typeof e=="string")return e;if(UR(e))return WR(e,yI)+"";if(GR(e))return vI?vI.call(e):"";var t=e+"";return t=="0"&&1/e==-YR?"-0":t}var KR=yI,_R=KR;function JR(e){return e==null?"":_R(e)}var XR=JR,ZR=wd,qR=EM,$R=VR,ej=XR;function tj(e,t){return ZR(e)?e:qR(e,t)?[e]:$R(ej(e))}var nj=tj,rj=Sd,oj=1/0;function ij(e){if(typeof e=="string"||rj(e))return e;var t=e+"";return t=="0"&&1/e==-oj?"-0":t}var sj=ij,aj=nj,lj=sj;function cj(e,t){t=aj(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[lj(t[n++])];return n&&n==r?e:void 0}var uj=cj,Aj=uj;function dj(e,t,n){var r=e==null?void 0:Aj(e,t);return r===void 0?n:r}var fj=dj;const gj=ti(fj),bI=e=>{const{children:t,resource:n,source:r,label:i,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f,template:p={}}=e,[C,h]=T.useState(!1),{fields:m,remove:I,replace:B}=M.useArrayInput(e),y=xt(),O=be.useTranslate(),j=be.useRecordContext(e),x=T.useRef({}),S=be.useTranslateLabel(),P=T.useCallback(G=>{I(G)},[I]);if(m.length>0){const{...G}=m[0];x.current=G;for(const $ in x.current)x.current[$]=null}const N=T.useCallback(()=>{B([]),h(!1)},[B]),k=gj(j,r),_=T.useMemo(()=>({total:m.length,remove:P,source:r}),[m.length,P,r]),X=y.palette.mode==="dark"?y.palette.grey.A400:y.palette.grey.A800;return m?g.jsx(lI.Provider,{value:_,children:g.jsxs("div",{className:A,children:[V.cloneElement(g.jsx(QI,{}),{label:i,source:r,disableAdd:l,template:p,addButton:e==null?void 0:e.addButton}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${X}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${X}`},children:g.jsxs(b.TableRow,{children:[T.Children.map(t,(G,$)=>V.isValidElement(G)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:S({...G.props,resource:n})})},$):null),!s&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[m.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),m.length>0&&m.map((G,$)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${X}}`},children:g.jsx(N3,{disableRemove:u,disableActions:s,index:$,member:`${r}.${$}`,onRemoveField:P,record:k&&k[$]||{},resource:n,source:r,children:t})},G.id))]})]})}),m.length>0&&g.jsx(M.Confirm,{isOpen:C,title:O("ra.action.clear_array_input"),content:O("ra.message.clear_array_input"),onConfirm:N,onClose:()=>h(!1)})]})}):null},QI=e=>{var f;const{label:t,disableAdd:n,template:r={}}=e,{append:i}=M.useArrayInput(e),s=xt(),l=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,u=s.palette.mode==="light"?"#000000":"#FFFFFF",A=T.useCallback(p=>C=>{i(r),p&&p(C)},[i,r]);return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[g.jsx(b.Typography,{children:t}),!n&&(V.isValidElement(e==null?void 0:e.addButton)?V.cloneElement(e==null?void 0:e.addButton,{onClick:A((f=e==null?void 0:e.addButton)==null?void 0:f.props.onClick)}):g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${l}`},onClick:()=>i(r),children:g.jsx(tt.PlusCircleOutlined,{style:{color:u}})}))]})},pj=ue(bI,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));QI.propTypes={label:c.string,source:c.string,defaultValue:c.any},bI.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.string,resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string]),template:c.object};function hj(e,t){const n=Pe.clone(e),{type:r,payload:i}=t;switch(r){case"updateMedia":{const s=Pe.chain(n.media).clone().extend(i).value();return Pe.extend(n,{media:s})}case"updateDrawer":{const s=Pe.chain(n.drawer).clone().extend(i).value();return Pe.extend(n,{drawer:s})}case"updateLogo":{const s=Pe.chain(n.logo).clone().extend(i).value();return Pe.extend(n,{logo:s})}case"updateNotifications":{const s=Pe.chain(n.notifications).clone().extend(i).value();return Pe.extend(n,{notifications:s})}case"updateTheme":{const s=Pe.chain(n.theme).clone().extend(i).value();return Pe.extend(n,{theme:s})}default:return n}}const Cj={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},xI=T.createContext(void 0);function wI(e){var _;const t=be.useGetIdentity(),n=b.useTheme(),r=b.useMediaQuery(n.breakpoints.down("md")),i=b.useMediaQuery(n.breakpoints.down("lg")),s=b.useMediaQuery(n.breakpoints.down("xl")),{miniDrawer:l,isHorizontalLayout:u,menuOrientation:A,drawerWidth:f}=Qn(),p=u(A)&&!i,{drawerOpen:C,openDrawer:h}=Jr(),m=T.useCallback(()=>{h(!C)},[C,h]),[I,B]=T.useState(!1),[y,O]=T.useReducer(hj,Pe.chain(Cj).clone().merge({drawer:{open:!l||C}}).value()),j=T.useCallback(()=>B(!1),[]),x=T.useMemo(()=>({state:y,dispatch:O}),[y,O]),{logoIcon:S,logoMain:P,enableNotification:N,notification:k}=e;return T.useEffect(()=>{O({type:"updateMedia",payload:{downMd:r,downLg:i,downXl:s,horizontal:p}})},[A,r,i,s]),T.useEffect(()=>{O({type:"updateDrawer",payload:{open:C,width:f,handleDrawerToggle:m}})},[C,f,m]),T.useEffect(()=>{l||h(!s)},[s,l]),T.useEffect(()=>{O({type:"updateLogo",payload:{main:P,icon:S}})},[S,P]),T.useEffect(()=>{O({type:"updateNotifications",payload:{enable:N,resource:k??"entities/notification"}})},[N,k]),T.useEffect(()=>{O({type:"updateTheme",payload:{iconColorOpen:n.palette.mode==="dark"?"grey.200":"grey.300",iconColor:n.palette.mode==="dark"?"background.default":"grey.100"}})},[n.palette.mode]),T.useEffect(()=>{var X;B(((X=t==null?void 0:t.data)==null?void 0:X.needToChangePassword)===!0)},[(_=t==null?void 0:t.data)==null?void 0:_.needToChangePassword]),g.jsxs(xI.Provider,{value:x,children:[g.jsx(b.Dialog,{open:I,maxWidth:"xs",fullWidth:!0,children:g.jsx(md,{onSuccess:j,firstAccess:!0})}),e.children]})}function TI(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:i,enableNotification:s}=t;return g.jsx(wI,{logoIcon:r,logoMain:i,enableNotification:s,children:g.jsx(e,{ref:n,...t})})})}function Dd(){const e=T.useContext(xI);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function Ej(){return Dd().dispatch}function Ti(){return Dd().state}function zn(){return Ti().media}function ko(){return Ti().drawer}function PI(){return Ti().logo}function kl(){return Ti().notifications}function Fl(){return Ti().theme}function SI(){const{iconColor:e,iconColorOpen:t}=Fl(),{open:n,handleDrawerToggle:r}=ko();return g.jsx(ro,{"aria-label":"open drawer",onClick:r,edge:"start",color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:n?t:e,ml:{xs:0,lg:-2}},children:n?g.jsx(tt.MenuFoldOutlined,{}):g.jsx(tt.MenuUnfoldOutlined,{})})}function OI(e){const t=T.useRef(),n=b.useTheme(),{downLg:r,horizontal:i}=zn(),{open:s,width:l}=ko(),u=r?b.AppBar:gh,A=gi(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:i?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||Pe.extend(f,{open:s}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!i&&g.jsx(SI,{}),e.children]})})}function mj(e){const t=b.useTheme(),{notification:n,onClick:r,selected:i,divider:s}=e,{resource:l}=kl(),u=be.useNotify(),A=be.useRedirect(),[f]=be.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Rr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):document.location.href=n==null?void 0:n.resource:r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=T.useCallback(()=>f(),[f]),[C]=be.useLocaleState(),h=T.useMemo(()=>Rr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:s,children:g.jsxs(b.ListItemButton,{selected:i,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(tt.MessageOutlined,{})})}),g.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),g.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),g.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const Ij={width:36,height:36,fontSize:"1rem"},Bj={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function MI(){const{enable:e}=kl();return e?g.jsx(vj,{}):null}function vj(){const e=b.useTheme(),t=T.useRef(),{resource:n}=kl(),{downMd:r}=zn(),{iconColor:i,iconColorOpen:s}=Fl(),[l,u]=T.useState(!1),[A,f]=T.useState([]),p=A.filter(B=>B.readed===null).length,C=T.useCallback(()=>u(!l),[l]),h=T.useCallback(()=>{t.current&&t.current.contains(event.target)||u(!1)},[t.current,u]),{data:m,isLoading:I}=be.useGetList(n,{pagination:{page:1,perPage:50},sort:{field:"created",order:"DESC"},filter:{readed:!1}});return T.useEffect(()=>{!I&&m&&f(m??[])},[m,I]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(ro,{color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:l?s:i},"aria-label":"open profile",ref:t,"aria-controls":l?"profile-grow":void 0,"aria-haspopup":"true",onClick:C,children:g.jsx(b.Badge,{badgeContent:p,color:"primary",children:g.jsx(tt.BellOutlined,{})})}),g.jsx(b.Popper,{placement:r?"bottom":"bottom-end",open:l,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[r?-5:0,9]}}]},children:({TransitionProps:B})=>g.jsx(io,{type:"grow",position:r?"top":"top-right",in:open,...B,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[e.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:h,children:g.jsx(or,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:p>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(ro,{color:"success",size:"small",children:g.jsx(tt.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:g.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":Ij,"& .MuiListItemSecondaryAction-root":{...Bj,position:"relative"}}},children:A.map((y,O)=>g.jsx(mj,{selected:p>0,notification:y,onClick:h,divider:O<A.length-1},y.id))})})})})})})]})}const yj=()=>{const[e,t]=T.useState(!1),n=T.useCallback(()=>t(!1),[t]),r=T.useCallback(()=>t(!0),[t]),i=be.useTranslate();return g.jsxs(T.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(An.Key,{})}),g.jsx(b.ListItemText,{primary:i("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(md,{onSuccess:n})})]})},bj=()=>{const e=be.useLogout(),t=be.useTranslate();return g.jsx(T.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(An.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},Qj=()=>{const e=be.useTranslate(),t=be.useAuthProvider(),n=T.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,i]=T.useState(!1);return T.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>i(s))},[t,i]),r?g.jsx(T.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(An.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};c.node,c.any.isRequired,c.any.isRequired;const DI=()=>{var B;const e=b.useTheme(),{identity:t}=M.useGetIdentity(),n=t!==void 0&&t.image&&t.image!==null&&t.image!=="",r=T.useRef(null),[i,s]=T.useState(!1),l=()=>{s(y=>!y)},u=y=>{r.current&&r.current.contains(y.target)||s(!1)},A=e.palette.mode==="dark"?"grey.200":"grey.300",f=M.useLogout(),p=M.useDataProvider(),C=M.useAuthProvider(),h=T.useCallback(()=>{f()},[C,f]),[m,I]=T.useState(null);return T.useEffect(()=>{if(!n)return;async function y(){var O=await p.getFile("/profile/me/image");I(O)}y()},[p,n]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(b.ButtonBase,{sx:{p:.25,bgcolor:i?A:"transparent",borderRadius:1,"&:hover":{bgcolor:e.palette.mode==="dark"?"secondary.light":"secondary.lighter"},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},"aria-label":"open profile",ref:r,"aria-controls":i?"profile-grow":void 0,"aria-haspopup":"true",onClick:l,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Ms,{alt:(B=t==null?void 0:t.name)==null?void 0:B.toUpperCase(),src:m,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:t==null?void 0:t.name})]})}),g.jsx(b.Popper,{placement:"bottom-end",open:i,anchorEl:r.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:y})=>{var O;return g.jsx(io,{type:"grow",position:"top-right",in:i,...y,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:g.jsx(b.ClickAwayListener,{onClickAway:u,children:g.jsxs(or,{elevation:0,border:!1,content:!1,children:[g.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:g.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[g.jsx(Ms,{alt:"profile user",src:m,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:t==null?void 0:t.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(O=t==null?void 0:t.roles)==null?void 0:O.map(j=>j.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(ro,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(tt.LogoutOutlined,{})})})})]})}),g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[g.jsx(yj,{}),g.jsx(bj,{}),g.jsx(Qj,{})]})})})]})})})})}})]})},RI=e=>{const t=xt(),{downMd:n}=zn(),{iconColor:r,iconColorOpen:i}=Fl(),[s,l]=T.useState(!1),u=T.useRef(null),A=T.useCallback(()=>{l(!s)},[s]),f=T.useCallback(p=>{u.current&&u.current.contains(p.target)||l(!1)},[]);return n?g.jsxs(g.Fragment,{children:[g.jsx(b.Box,{sx:{flexShrink:0},children:g.jsx(ro,{sx:{color:"text.primary",bgcolor:s?i:r},"aria-label":"open more menu",ref:u,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:A,color:"secondary",variant:"light",children:g.jsx(tt.MoreOutlined,{})})}),g.jsx(b.Popper,{placement:"bottom-end",open:s,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:p})=>g.jsx(io,{type:"fade",in:s,...p,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:f,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function jI(e){return g.jsx(b.Box,{...e,flex:1})}function Fs(e){const{name:t,version:n}=e;return g.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:g.jsxs(b.Typography,{variant:"caption",children:[g.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}Fs.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},Fs.defaultProps={copy:"© Applica Software Guru for"};function kI(e){const{width:t}=ko(),{horizontal:n}=zn(),{container:r}=Qn();return g.jsxs(b.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[g.jsx(b.Toolbar,{sx:{mt:n?8:"inherit"}})," ",g.jsx(b.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column"},children:e.children})]})}const FI=T.forwardRef((e,t)=>{const n=gi(e,{display:"flex",width:"100%"});return g.jsx(b.Box,{ref:t,...e,sx:n,children:e.children})});var LI={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(LI);var xj=LI.exports,Rd={};const wj=lQ(dO);var NI;function Tj(){return NI||(NI=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=wj}(Rd)),Rd}function VI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=VI(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Pj(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=VI(e))&&(r&&(r+=" "),r+=t);return r}var jd=globalThis&&globalThis.__assign||function(){return jd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jd.apply(this,arguments)},Sj=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},HI=function(e){var t=e.className,n=e.sx,r=Sj(e,["className","sx"]),i=be.useLoading(),s=xt();return V.createElement(Oj,{className:t,sx:n},i?V.createElement(pm,jd({className:Pj("app-loader",Ll.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):V.createElement(B0,{className:Ll.loadedIcon}))};HI.propTypes={classes:c.object,className:c.string,width:c.string};var kd="RaLoadingIndicator",Ll={loader:"".concat(kd,"-loader"),loadedIcon:"".concat(kd,"-loadedIcon")},Oj=ue("div",{name:kd,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(Ll.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(Ll.loadedIcon)]={},t});const Fd=e=>e.scrollTop;function Pi(e,t){var n,r;const{timeout:i,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const Mj=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Dj(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),s=oi(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const f=s.getComputedStyle(t);l=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const f=l.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),A=parseInt(f[5],10)}return e==="left"?i?`translateX(${i.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?i?`translateY(${i.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function zI(e){return typeof e=="function"?e():e}function Nl(e,t,n){const r=zI(n),i=Dj(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const WI=V.forwardRef(function(t,n){const r=xt(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:f,direction:p="down",easing:C=i,in:h,onEnter:m,onEntered:I,onEntering:B,onExit:y,onExited:O,onExiting:j,style:x,timeout:S=s,TransitionComponent:P=zA}=t,N=_e(t,Mj),k=V.useRef(null),_=yn(A.ref,k,n),X=F=>te=>{F&&(te===void 0?F(k.current):F(k.current,te))},G=X((F,te)=>{Nl(p,F,f),Fd(F),m&&m(F,te)}),$=X((F,te)=>{const W=Pi({timeout:S,style:x,easing:C},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",U({},W)),F.style.transition=r.transitions.create("transform",U({},W)),F.style.webkitTransform="none",F.style.transform="none",B&&B(F,te)}),le=X(I),se=X(j),q=X(F=>{const te=Pi({timeout:S,style:x,easing:C},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",te),F.style.transition=r.transitions.create("transform",te),Nl(p,F,f),y&&y(F)}),K=X(F=>{F.style.webkitTransition="",F.style.transition="",O&&O(F)}),z=F=>{l&&l(k.current,F)},Z=V.useCallback(()=>{k.current&&Nl(p,k.current,f)},[p,f]);return V.useEffect(()=>{if(h||p==="down"||p==="right")return;const F=Ip(()=>{k.current&&Nl(p,k.current,f)}),te=oi(k.current);return te.addEventListener("resize",F),()=>{F.clear(),te.removeEventListener("resize",F)}},[p,h,f]),V.useEffect(()=>{h||Z()},[h,Z]),g.jsx(P,U({nodeRef:k,onEnter:G,onEntered:le,onEntering:$,onExit:q,onExited:K,onExiting:se,addEndListener:z,appear:u,in:h,timeout:S},N,{children:(F,te)=>V.cloneElement(A,U({ref:_,style:U({visibility:F==="exited"&&!h?"hidden":void 0},x,A.props.style)},te))}))});process.env.NODE_ENV!=="production"&&(WI.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,container:br(c.oneOfType([bo,c.func]),e=>{if(e.open){const t=zI(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
202
|
+
`),QO)),gm=V.forwardRef(function(t,n){const r=Kt({props:t,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=_e(r,yO),m=U({},r,{color:s,disableShrink:l,size:u,thickness:f,value:p,variant:C}),I=xO(m),B={},y={},O={};if(C==="determinate"){const j=2*Math.PI*((oo-f)/2);B.strokeDasharray=j.toFixed(3),O["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*j).toFixed(3)}px`,y.transform="rotate(-90deg)"}return g.jsx(wO,U({className:Ze(I.root,i),style:U({width:u,height:u},y,A),ownerState:m,ref:n,role:"progressbar"},O,h,{children:g.jsx(TO,{className:I.svg,ownerState:m,viewBox:`${oo/2} ${oo/2} ${oo} ${oo}`,children:g.jsx(PO,{className:I.circle,style:B,ownerState:m,cx:oo,cy:oo,r:(oo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(gm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:br(c.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const pm=gm;function SO(e){return Ht("MuiLoadingButton",e)}const Mr=Yt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),OO=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],MO=e=>{const{loading:t,loadingPosition:n,classes:r}=e,i={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Te(n)}`],endIcon:[t&&`endIconLoading${Te(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Te(n)}`]},s=Ar.unstable_composeClasses(i,SO,r);return U({},r,s)},DO=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",RO=ue(BO,{shouldForwardProp:e=>DO(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Mr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Mr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>U({[`& .${Mr.startIconLoadingStart}, & .${Mr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${Mr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Mr.startIconLoadingStart}, & .${Mr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Mr.startIconLoadingStart}, & .${Mr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),jO=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Te(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>U({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),hm=V.forwardRef(function(t,n){const r=Kt({props:t,name:"MuiLoadingButton"}),{children:i,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=_e(r,OO),h=Iu(l),m=A??g.jsx(pm,{"aria-labelledby":h,color:"inherit",size:16}),I=U({},r,{disabled:s,loading:u,loadingIndicator:m,loadingPosition:f,variant:p}),B=MO(I),y=u?g.jsx(jO,{className:B.loadingIndicator,ownerState:I,children:m}):null;return g.jsxs(RO,U({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?i:y,I.loadingPosition==="end"?y:i]}))});process.env.NODE_ENV!=="production"&&(hm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:br(c.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const kO=hm;function _A({variant:e,theme:t,color:n,loadingPosition:r}){const i=en(t,n),{lighter:s,main:l,dark:u,contrastText:A}=i,f=`${n}Button`,p=yi(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},m={"&::after":{boxShadow:`0 0 6px 6px ${Ve(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ve(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...m};case"text":default:return{color:l,...C,...m}}}const FO=ue(kO,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:i,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{..._A({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!i&&{color:"#fff"},...t!=="text"&&{..._A({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{..._A({variant:t,theme:e,color:r,loadingPosition:s})}}})),JA=T.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...i},s)=>{const l=xt();return g.jsx(FO,{ref:s,variant:e,shape:t,theme:l,loadingPosition:i.loadingPosition,loading:i.loading,color:r,...i,children:n})});JA.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},JA.displayName="LoadingButton";function LO({color:e,theme:t,labelColor:n}){const r=en(t,e),{main:i,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:i,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:i}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const NO=ue(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&LO({color:t,theme:e,labelColor:n})}));function Cm({children:e,arrow:t,labelColor:n="",...r}){const i=xt();return g.jsx(b.Box,{display:"flex",children:g.jsx(NO,{arrow:t,...r,theme:i,labelColor:n,children:e})})}Cm.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const io=T.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...i},s)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return g.jsxs(b.Box,{ref:s,children:[n==="grow"&&g.jsx(b.Grow,{...i,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...i,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...i,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...i,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...i,children:g.jsx(b.Box,{sx:l,children:e})})]})});io.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])},T.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Em({value:e,...t}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Em.propTypes={value:c.number};function mm({value:e,size:t,variant:n,thickness:r,showLabel:i,pathColor:s,sx:l,...u}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...u,value:100}),i&&g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),g.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}mm.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Im({icon:e,value:t,...n}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),g.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Im.propTypes={icon:c.node,value:c.number};function Bm({value:e,...t}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),g.jsx(b.Box,{sx:{minWidth:35},children:g.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Bm.propTypes={value:c.number};const vm=T.createContext({});function VO(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=M.useResourceContext(),i=M.useDataProvider(),{search:s}=ya.useLocation(),l=`${r}/new`,u=T.useCallback(()=>{if(!t||!Pe.isFunction(i.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((m,I)=>{h[I]=m}),i.get(l,h).then(m=>m.data).then(m=>{const{responseCode:I,value:B}=m;return I==="ok"?B:Promise.reject(m)})},[r,t,s,i]),A=T.useMemo(()=>Pe.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:f,isLoading:p}=au.useQuery(A),C=Pe.omit(e,["useDefaults"]);return p?g.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:g.jsx(b.CircularProgress,{})}):g.jsx(vm.Provider,{value:f??{},children:g.jsx(M.Create,{...C})})}function HO(){return T.useContext(vm)}const zO=ue(VO,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),WO=fs(M.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),Dr=e=>g.jsx(WO,{...e});Dr.defaultProps={...M.Toolbar.defaultProps},Dr.propTypes={...M.Toolbar.propTypes};const XA=({children:e,content:t,title:n,subheader:r,secondary:i,toolbar:s,...l})=>{const u=M.useTranslate(),A=M.useResourceContext(),{cardTitle:f,cardSubheader:p}=T.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(or,{content:t,title:f,subheader:p,secondary:i,divider:!0,children:g.jsxs(T.Fragment,{children:[e,s===!0?g.jsx(Dr,{children:g.jsx(M.SaveButton,{})}):s]})})})};XA.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},XA.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const UO=ue(M.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),bl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:i}=Qn();return g.jsx(UO,{defaultValues:n,spacing:t||i,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||i,children:e})})};bl.propTypes={...b.Grid.propTypes,...M.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},bl.defaultProps={...b.Stack.defaultProps},bl.Section=XA;const GO=fs(M.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),Ql=({title:e,modal:t,content:n,subheader:r,secondary:i,sx:s,...l})=>{const u=fh(e),A=M.useRecordContext();return g.jsx(or,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?i:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:g.jsx(GO,{toolbar:g.jsx(Dr,{}),...l})})};Ql.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(Dr,{children:g.jsx(M.SaveButton,{type:"button"})}),secondary:g.jsx(di,{children:g.jsx(M.DeleteWithConfirmButton,{})})},Ql.propTypes={...M.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const xl=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:s,divider:l,...u})=>{const A=Gt.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{getFieldState:m,formState:I}=ba.useFormContext(),{error:B}=m(p,I),y=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:y||C,isRequired:h})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};xl.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},xl.defaultProps={display:"label",divider:!1};const YO=ue(M.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),KO=({label:e,addLabel:t,source:n,helperText:r,divider:i=!0,...s})=>g.jsx(xl,{label:e,addLabel:t,source:n,helperText:r,divider:i,children:g.jsx(YO,{source:n,label:!1,...s})}),ZA=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(di,{children:[e&&g.jsx(M.EditButton,{}),t&&g.jsx(M.DeleteWithConfirmButton,{}),n&&g.jsx(M.CloneButton,{})]});ZA.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},ZA.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const ym=ue("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),_O=ue("ul")({display:"inline-block"}),bm=e=>{var p;const{className:t,emptyText:n,source:r,title:i,...s}=e,l=be.useRecordContext(e),u=at.get(l,r),A=be.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):g.jsx(ym,{className:t,...s});if(Array.isArray(u))return g.jsx(_O,{className:t,...s,children:u.map((C,h)=>{var I;const m=i instanceof String?(I=at.get(C,i))==null?void 0:I.toString():i;return g.jsx("li",{children:m},h)})});const f=i instanceof String?(p=at.get(l,i))==null?void 0:p.toString():i;return g.jsx(ym,{className:t,...s,children:f})};bm.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var Qm={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",l="second",u="minute",A="hour",f="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var K=["th","st","nd","rd"],z=q%100;return"["+q+(K[(z-20)%10]||K[z]||K[0])+"]"}},x=function(q,K,z){var Z=String(q);return!Z||Z.length>=K?q:""+Array(K+1-Z.length).join(z)+q},S={s:x,z:function(q){var K=-q.utcOffset(),z=Math.abs(K),Z=Math.floor(z/60),F=z%60;return(K<=0?"+":"-")+x(Z,2,"0")+":"+x(F,2,"0")},m:function q(K,z){if(K.date()<z.date())return-q(z,K);var Z=12*(z.year()-K.year())+(z.month()-K.month()),F=K.clone().add(Z,C),te=z-F<0,W=K.clone().add(Z+(te?-1:1),C);return+(-(Z+(z-F)/(te?F-W:W-F))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:m,w:p,d:f,D:I,h:A,m:u,s:l,ms:s,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",N={};N[P]=j;var k="$isDayjsObject",_=function(q){return q instanceof le||!(!q||!q[k])},X=function q(K,z,Z){var F;if(!K)return P;if(typeof K=="string"){var te=K.toLowerCase();N[te]&&(F=te),z&&(N[te]=z,F=te);var W=K.split("-");if(!F&&W.length>1)return q(W[0])}else{var J=K.name;N[J]=K,F=J}return!Z&&F&&(P=F),F||!Z&&P},G=function(q,K){if(_(q))return q.clone();var z=typeof K=="object"?K:{};return z.date=q,z.args=arguments,new le(z)},$=S;$.l=X,$.i=_,$.w=function(q,K){return G(q,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function q(z){this.$L=X(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[k]=!0}var K=q.prototype;return K.parse=function(z){this.$d=function(Z){var F=Z.date,te=Z.utc;if(F===null)return new Date(NaN);if($.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(y);if(W){var J=W[2]-1||0,de=(W[7]||"0").substring(0,3);return te?new Date(Date.UTC(W[1],J,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)):new Date(W[1],J,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)}}return new Date(F)}(z),this.init()},K.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},K.$utils=function(){return $},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(z,Z){var F=G(z);return this.startOf(Z)<=F&&F<=this.endOf(Z)},K.isAfter=function(z,Z){return G(z)<this.startOf(Z)},K.isBefore=function(z,Z){return this.endOf(Z)<G(z)},K.$g=function(z,Z,F){return $.u(z)?this[Z]:this.set(F,z)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(z,Z){var F=this,te=!!$.u(Z)||Z,W=$.p(z),J=function(he,me){var xe=$.w(F.$u?Date.UTC(F.$y,me,he):new Date(F.$y,me,he),F);return te?xe:xe.endOf(f)},de=function(he,me){return $.w(F.toDate()[he].apply(F.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(me)),F)},ge=this.$W,ce=this.$M,Ae=this.$D,pe="set"+(this.$u?"UTC":"");switch(W){case m:return te?J(1,0):J(31,11);case C:return te?J(1,ce):J(0,ce+1);case p:var Ie=this.$locale().weekStart||0,Ee=(ge<Ie?ge+7:ge)-Ie;return J(te?Ae-Ee:Ae+(6-Ee),ce);case f:case I:return de(pe+"Hours",0);case A:return de(pe+"Minutes",1);case u:return de(pe+"Seconds",2);case l:return de(pe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(z){return this.startOf(z,!1)},K.$set=function(z,Z){var F,te=$.p(z),W="set"+(this.$u?"UTC":""),J=(F={},F[f]=W+"Date",F[I]=W+"Date",F[C]=W+"Month",F[m]=W+"FullYear",F[A]=W+"Hours",F[u]=W+"Minutes",F[l]=W+"Seconds",F[s]=W+"Milliseconds",F)[te],de=te===f?this.$D+(Z-this.$W):Z;if(te===C||te===m){var ge=this.clone().set(I,1);ge.$d[J](de),ge.init(),this.$d=ge.set(I,Math.min(this.$D,ge.daysInMonth())).$d}else J&&this.$d[J](de);return this.init(),this},K.set=function(z,Z){return this.clone().$set(z,Z)},K.get=function(z){return this[$.p(z)]()},K.add=function(z,Z){var F,te=this;z=Number(z);var W=$.p(Z),J=function(ce){var Ae=G(te);return $.w(Ae.date(Ae.date()+Math.round(ce*z)),te)};if(W===C)return this.set(C,this.$M+z);if(W===m)return this.set(m,this.$y+z);if(W===f)return J(1);if(W===p)return J(7);var de=(F={},F[u]=r,F[A]=i,F[l]=n,F)[W]||1,ge=this.$d.getTime()+z*de;return $.w(ge,this)},K.subtract=function(z,Z){return this.add(-1*z,Z)},K.format=function(z){var Z=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var te=z||"YYYY-MM-DDTHH:mm:ssZ",W=$.z(this),J=this.$H,de=this.$m,ge=this.$M,ce=F.weekdays,Ae=F.months,pe=F.meridiem,Ie=function(me,xe,ae,We){return me&&(me[xe]||me(Z,te))||ae[xe].slice(0,We)},Ee=function(me){return $.s(J%12||12,me,"0")},he=pe||function(me,xe,ae){var We=me<12?"AM":"PM";return ae?We.toLowerCase():We};return te.replace(O,function(me,xe){return xe||function(ae){switch(ae){case"YY":return String(Z.$y).slice(-2);case"YYYY":return $.s(Z.$y,4,"0");case"M":return ge+1;case"MM":return $.s(ge+1,2,"0");case"MMM":return Ie(F.monthsShort,ge,Ae,3);case"MMMM":return Ie(Ae,ge);case"D":return Z.$D;case"DD":return $.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Ie(F.weekdaysMin,Z.$W,ce,2);case"ddd":return Ie(F.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(J);case"HH":return $.s(J,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return he(J,de,!0);case"A":return he(J,de,!1);case"m":return String(de);case"mm":return $.s(de,2,"0");case"s":return String(Z.$s);case"ss":return $.s(Z.$s,2,"0");case"SSS":return $.s(Z.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(z,Z,F){var te,W=this,J=$.p(Z),de=G(z),ge=(de.utcOffset()-this.utcOffset())*r,ce=this-de,Ae=function(){return $.m(W,de)};switch(J){case m:te=Ae()/12;break;case C:te=Ae();break;case h:te=Ae()/3;break;case p:te=(ce-ge)/6048e5;break;case f:te=(ce-ge)/864e5;break;case A:te=ce/i;break;case u:te=ce/r;break;case l:te=ce/n;break;default:te=ce}return F?te:$.a(te)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return N[this.$L]},K.locale=function(z,Z){if(!z)return this.$L;var F=this.clone(),te=X(z,Z,!0);return te&&(F.$L=te),F},K.clone=function(){return $.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},q}(),se=le.prototype;return G.prototype=se,[["$ms",s],["$s",l],["$m",u],["$H",A],["$W",f],["$M",C],["$y",m],["$D",I]].forEach(function(q){se[q[1]]=function(K){return this.$g(K,q[0],q[1])}}),G.extend=function(q,K){return q.$i||(q(K,le,G),q.$i=!0),G},G.locale=X,G.isDayjs=_,G.unix=function(q){return G(1e3*q)},G.en=N[P],G.Ls=N,G.p={},G})})(Qm);var JO=Qm.exports;const Rr=ti(JO),qA=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...i})=>{const[s,l]=T.useState(null),u=M.useRecordContext(i),A=M.useDataProvider(),f=M.useResourceContext(),p=T.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=at.get(u,i==null?void 0:i.source),B=f.replace("entities/",""),y=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(i==null?void 0:i.source)}/${(I==null?void 0:I.id)||(u==null?void 0:u.id)}`),O=document.createElement("a");O.href=y,O.download=at.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source)),O.click()},[A,u,e,f,t,i==null?void 0:i.source,i==null?void 0:i.title]),C=T.useMemo(()=>({...u,[i==null?void 0:i.source]:(u==null?void 0:u.src)||at.get(u,i==null?void 0:i.source),[i==null?void 0:i.title]:(u==null?void 0:u.title)||at.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),[u,i==null?void 0:i.source,i==null?void 0:i.title]),h=M.useTranslate();return T.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:m})=>l(m)).catch(()=>l(null))},[u,A,r]),g.jsx(bm,{...i,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:at.get(C,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[at.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:Rr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};qA.propTypes={...M.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const XO=ue(M.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Rs=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(XO,{...e,source:t})};Rs.propTypes={...M.ImageField.propTypes,source:c.string};const wl=({width:e,height:t,circle:n,justify:r,record:i,...s})=>{const l=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),u=M.useRecordContext(),A=i||u;return g.jsx(Rs,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...s,record:A})};wl.defaultProps={...Rs.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},wl.propTypes={...Rs.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var xm={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){return function(n,r,i){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,p,C,h){return s.fromToBase(f,p,C,h)}i.en.relativeTime=l,s.fromToBase=function(f,p,C,h,m){for(var I,B,y,O=C.$locale().relativeTime||l,j=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=j.length,S=0;S<x;S+=1){var P=j[S];P.d&&(I=h?i(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var N=(n.rounding||Math.round)(Math.abs(I));if(y=I>0,N<=P.r||!P.r){N<=1&&S>0&&(P=j[S-1]);var k=O[P.l];m&&(N=m(""+N)),B=typeof k=="string"?k.replace("%d",N):k(N,p,P.l,y);break}}if(p)return B;var _=y?O.future:O.past;return typeof _=="function"?_(B):_.replace("%s",B)},s.to=function(f,p){return u(f,p,this,!0)},s.from=function(f,p){return u(f,p,this)};var A=function(f){return f.$u?i.utc():i()};s.toNow=function(f){return this.to(A(this),f)},s.fromNow=function(f){return this.from(A(this),f)}}})})(xm);var ZO=xm.exports;const qO=ti(ZO);Rr.extend(qO);const Tl=e=>{const t=M.useRecordContext(e),[n]=M.useLocaleState(),r=T.useMemo(()=>Rr(at.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(T.Fragment,{children:[g.jsx(M.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Tl.displayName="DateAgoField",Tl.propTypes={source:c.string.isRequired};const wm=ue(M.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));wm.propTypes={...M.DateField.propTypes};const $A=e=>g.jsx(wm,{...e});$A.defaultProps={...M.DateField.defaultProps,variant:"body1"},$A.propTypes={...M.DateField.propTypes};const Tm=ue(M.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Tm.propTypes={...M.EmailField.propTypes};const ed=e=>g.jsx(Tm,{...e});ed.defaultProps={...M.EmailField.defaultProps,variant:"body1"},ed.propTypes={...M.EmailField.propTypes};const $O=ue(M.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),td=({...e})=>{const t=M.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const i=at.get(t,`_${e==null?void 0:e.source}`,at.get(t,e==null?void 0:e.source)),s=at.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=i,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx($O,{...e,record:t,onClick:n})};td.propTypes={...M.FileField.propTypes,source:c.string,title:c.string};const Pm=e=>g.jsx(M.FunctionField,{...e});Pm.defaultProps={variant:"body1"};const e3=ue("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),nd=({source:e,defaultValue:t,...n})=>{const r=M.useRecordContext(n),i=at.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:i&&i!==null?i:t}})};nd.propTypes={defaultValue:c.any,source:c.string,record:c.object},nd.defaultProps={defaultValue:" "};const Sm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Sm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const rd=({label:e,source:t,defaultValue:n,children:r,tooltip:i,...s})=>{const{getCurrentDialog:l}=xo(),u=M.useRecordContext(s),A=M.useResourceContext(s),f=l(),p=T.useMemo(()=>!i||i===!1?!1:typeof i=="function"?i(u):typeof i=="string"?at.get(u,i,i):i,[u,i]);return g.jsx(Sm,{title:p,children:g.jsxs(T.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(M.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(e3,{...s,children:T.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};rd.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},rd.defaultProps={defaultValue:" ",children:g.jsx(nd,{})};const t3=fs("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),bi=e=>g.jsx(t3,{children:g.jsx(M.ReferenceManyField,{pagination:g.jsx(M.Pagination,{}),...e})});bi.defaultProps={...M.ReferenceManyField.defaultProps,margin:!1,border:!1},bi.propTypes={...M.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Om=({source:e,...t})=>{const n=M.useRecordContext(t),r=at.get(n,e,0),i=r/1024,s=i/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:i>1?`${i.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Om.propTypes={record:c.object,source:c.string};const Mm=ue(M.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));Mm.propTypes={...M.TextField.propTypes};const od=e=>g.jsx(Mm,{...e});od.defaultProps={...M.TextField.defaultProps,variant:"body1"},od.propTypes={...M.TextField.propTypes};const lt=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:s,divider:l,...u})=>{const A=Gt.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:m}}=M.useInput(u),I=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:I||C,isRequired:h})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};lt.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},lt.defaultProps={display:"label",divider:!1};const n3=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},r3=ue(M.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...n3(e)})),id=({children:e,disabled:t,type:n,...r})=>{const i=M.useRecordContext(r),s=r==null?void 0:r.source,l=i==null?void 0:i.id;return M.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(lt,{...r,children:g.jsx(r3,{disabled:t,children:T.cloneElement(e,{...e.props,entityId:l,property:s})})})};id.propTypes={...M.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},id.defaultProps={children:g.jsx(qA,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const o3=ue(M.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),sd=({...e})=>g.jsx(lt,{...e,children:g.jsx(o3,{})});sd.propTypes={...M.AutocompleteArrayInput.propTypes,...lt.propTypes},sd.defaultProps={...M.AutocompleteArrayInput.defaultProps,size:"small"};const i3=ue(M.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),ad=e=>{const{perPage:t,...n}=e;return g.jsx(lt,{...n,children:g.jsx(i3,{})})};ad.propTypes={...M.AutocompleteInput.propTypes,...lt.propTypes},ad.defaultProps={...M.AutocompleteInput.defaultProps,size:"small"};const s3=ue(M.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),ld=({horizontal:e,...t})=>{const n=xt();return g.jsx(lt,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(s3,{})})};ld.defaultProps={...M.BooleanInput.defaultProps,...lt.defaultProps},ld.propTypes={...M.BooleanInput.propTypes,...lt.propTypes,horizontal:c.bool};const a3=ue(M.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),cd=e=>g.jsx(lt,{...e,children:g.jsx(a3,{})});cd.propTypes={...M.DateInput.propTypes,...lt.propTypes},cd.defaultProps={...M.DateInput.defaultProps,...lt.defaultProps};const l3=ue(M.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ud=e=>g.jsx(lt,{...e,children:g.jsx(l3,{})});ud.propTypes={...M.DateTimeInput.propTypes,...lt.propTypes},ud.defaultProps={...lt.defaultProps};const c3=ue(M.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),Ad=({children:e,title:t,...n})=>{const r=ba.useWatch({name:n.source}),i=M.useRecordContext(n),{source:s}=n,l=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=at.get(i,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[i,s,r]);return g.jsx(lt,{...n,children:g.jsx(c3,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...i,[s]:(r==null?void 0:r.title)||at.get(i,s),[`_${s}`]:(r==null?void 0:r.src)||at.get(i,`_${s}`),[t||s]:l}})})})};Ad.propTypes={...M.FileInput.propTypes,source:c.string,title:c.string,children:c.node},Ad.defaultProps={children:g.jsx(td,{})};const dd=({children:e,title:t,...n})=>{const r=ba.useWatch({name:n.source}),i=M.useRecordContext(n),{source:s}=n;return M.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(lt,{...n,children:g.jsx(M.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:s,record:{...i,[s]:(r==null?void 0:r.title)||at.get(i,s),[`_${s}`]:(r==null?void 0:r.src)||at.get(i,`_${s}`)}})})})};dd.defaultProps={children:g.jsx(wl,{}),multiple:!1},dd.propTypes={...M.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const u3=ue(M.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),fd=e=>g.jsx(lt,{...e,children:g.jsx(u3,{})});fd.propTypes={...M.NumberInput.propTypes,...lt.propTypes},fd.defaultProps={...M.NumberInput.defaultProps,...lt.defaultProps};const Dm=({source:e,minWidth:t=300,children:n})=>{const r=M.useResourceContext(),i=M.useRecordContext(),[s,l]=T.useState(at.get(i,e,"")),[u,A]=T.useState(!1),f=T.useCallback(I=>l(I.target.value),[]),p=M.useDataProvider(),C=T.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,i,e]),h=T.useCallback(()=>{at.get(i,e)!==s&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,i]),m=T.useCallback(I=>{A(!0),p.update(r,{id:i.id,data:{...i,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,i]);return T.useEffect(()=>l(at.get(i,e)),[i,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:m}):g.jsx(b.TextField,{value:s,disabled:u,onChange:f,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Dm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const gd=({children:e,...t})=>g.jsx(M.ReferenceArrayInput,{...t,children:T.cloneElement(e,{...t,source:e.props.source||t.source})});gd.propTypes={...M.ReferenceArrayInput.propTypes,children:c.element},gd.defaultProps={...M.ReferenceArrayInput.defaultProps};const pd=({children:e,...t})=>g.jsx(M.ReferenceInput,{...t,children:T.cloneElement(e,{...t,source:e.props.source||t.source})});pd.propTypes={...M.ReferenceInput.propTypes,children:c.element},pd.defaultProps={...M.ReferenceInput.defaultProps};const hd=({reference:e,target:t,children:n,filters:r,actions:i,...s})=>g.jsx(M.ResourceContextProvider,{value:e,children:g.jsx(bi,{perPage:5,pagination:g.jsx(M.Pagination,{}),...s,reference:e,target:t,children:g.jsxs(T.Fragment,{children:[g.jsx(M.ListToolbar,{filters:r,actions:i}),n]})})});hd.propTypes={...bi.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},hd.defaultProps={...bi.defaultProps};const A3=ue(M.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),d3=e=>g.jsx(A3,{...e}),Rm=ue(M.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Rm.propTypes={...M.SelectArrayInput.propTypes};const Cd=e=>g.jsx(lt,{...e,children:g.jsx(Rm,{options:{autoWidth:!1}})});Cd.defaultProps={optionText:"name",optionValue:"id"},Cd.propTypes={...M.SelectArrayInput.propTypes,...lt.propTypes};const f3=ue(M.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),jm=e=>g.jsx(lt,{...e,children:g.jsx(f3,{})});jm.propTypes={...M.SelectInput.propTypes,...lt.propTypes};const Hn=e=>g.jsx(lt,{...e,children:g.jsx(M.TextInput,{})});Hn.propTypes={...M.TextInput.propTypes,...lt.propTypes};const Pl=({...e})=>{var u,A;const t=M.useTranslate(),n=M.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=ba.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let i=e.helperText,s=e.validate;s?Array.isArray(s)&&s.indexOf(n)===-1&&s.push(n):s=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(i=i&&i.length>0?`${l} - ${t(i)}`:l),g.jsx(Hn,{...e,validate:s,helperText:i,inputProps:{maxLength:e==null?void 0:e.maxLength}})};Pl.displayName="SmartTextInput",Pl.defaultProps={multiline:!1},Pl.propTypes={...Hn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const km=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Rr().hour(n).minute(r)};function g3(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const p3=e=>{if(!e)return"";const t=km(e);return t?t.format("HH:mm"):""},h3=e=>e,C3=ue(M.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Ed=e=>g.jsx(lt,{...e,children:g.jsx(C3,{})});Ed.defaultProps={...M.TimeInput.defaultProps,format:p3,parse:h3},Ed.propTypes={...M.TimeInput.propTypes,...lt.propTypes};const md=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Qn(),[r,i]=T.useState(!1),s=be.useAuthProvider(),l=be.useTranslate(),u=be.useNotify(),A=T.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;i(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>u(h,{type:"error"})).finally(()=>i(!1))},[s,e]);return g.jsx(be.ResourceContextProvider,{value:"user/change-password",children:g.jsx(be.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Ql,{onSubmit:A,toolbar:g.jsx(Dr,{children:g.jsx(M.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"oldPassword",type:"password",validate:be.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"newPassword",type:"password",validate:be.required()})})]})})})})},E3=ue(M.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),m3=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),I3=ue(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),Id=({title:e,divider:t,variant:n})=>{const r=M.useTranslate();return g.jsxs(T.Fragment,{children:[g.jsx(m3,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(I3,{})]})};Id.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},Id.defaultProps={divider:!0,variant:"h4"};const B3=ue(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important"}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function Fm(e){const{spacing:t}=Qn(),{spacing:n=t}=e,r=Pe.omit(e,["spacing"]);return g.jsx(M.Form,{...r,children:g.jsx(B3,{container:!0,spacing:n*2,children:e.children})})}function Bd(e){return e.id??e.label}function Lm(e,t){return t.match(new RegExp(`^${e}`))!==null}function v3(e){return Pe.map(e,"id")}function vd(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function y3(e,t){var s;const n=Pe.clone(e),{type:r,payload:i}=t;switch(r){case"setFormRootPath":return Pe.extend(n,{formRootPath:i});case"setSyncWithLocation":return Pe.extend(n,{syncWithLocation:i});case"setActiveItem":return Pe.includes(v3(e.items),i)?Pe.extend(n,{activeItem:i}):n;case"addItem":{const l=i.id,u=Pe.reject(n.items,A=>A.id===l);return u.push(i),Pe.extend(n,{items:u}),n.activeItem===void 0&&Pe.extend(n,{activeItem:i.id}),n}case"removeItem":{const l=Pe.isString(i)?i:i.id,u=Pe.reject(n.items,A=>A.id===l);return Pe.extend(n,{items:u}),n.activeItem===l&&Pe.extend(n,{activeItem:((s=Pe.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const b3={syncWithLocation:!0,items:[],activeItem:void 0},Nm=T.createContext(void 0);function Vm(e){const t=!!(e.syncWithLocation??!0),{rootMatchString:n}=e,{pathname:r}=ya.useLocation(),[i,s]=T.useReducer(y3,Pe.cloneDeep(b3)),{formRootPath:l,items:u}=i,A=T.useMemo(()=>({state:i,dispatch:s}),[i,s]);return T.useEffect(()=>{const f=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];n!==void 0&&f.push(n);const p=Pe.chain(f).map(h=>ya.matchPath(h,r)).reject(h=>h===null).first().value(),C=p==null?void 0:p.pathnameBase;C!==void 0&&C!==l&&s({type:"setFormRootPath",payload:C})},[r,l,n]),T.useEffect(()=>{s({type:"setSyncWithLocation",payload:!!t})},[t,s]),T.useEffect(()=>{if(t&&l!==void 0){const f=r.replace(`${l}/`,"");s({type:"setActiveItem",payload:f})}},[s,l,r,u]),g.jsx(Nm.Provider,{value:A,children:e.children})}function Hm(){const e=T.useContext(Nm);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Sl(){return Hm().state}function yd(){return Hm().dispatch}function zm(){return Sl().formRootPath}function Wm(){return Sl().activeItem}function Um(){return Sl().items}function Gm(){return Sl().syncWithLocation}function Ym(){const e=yd();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function Km(){const e=yd();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function _m(){const e=yd();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var Q3=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},Jm=e=>e.firstChild?e.firstChild.offsetParent===e:!0,x3=(e,t)=>{let n=e,r=0;Jm(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},w3=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},js=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?js="sticky":CSS.supports("position","-webkit-sticky")&&(js="-webkit-sticky"));var Ol=!1;try{const e=Object.defineProperty({},"passive",{get(){Ol={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var bd=e=>{const{el:t,onChange:n,unsubs:r,measure:i}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=i(s()),u=()=>{Object.assign(l,i(s())),n()};return window.addEventListener("resize",u,Ol),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=i(t.getBoundingClientRect()),l=()=>{Object.assign(s,i(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},T3=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},P3=(e,t,n)=>{const{bottom:r,offsetBottom:i,offsetTop:s}=n,l=Q3(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const k=C();k!==x&&S(k),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=k=>{const{offsetTop:_,height:X}=m,{naturalTop:G}=y,{height:$}=O;return k+_+X>=G+$+j+i},C=()=>{const{height:k}=m,{height:_}=O;return _+s+i<=k?3:p(f)?1:2},h=l!==window&&Jm(l),m=bd({el:l,onChange:A,unsubs:t,measure:({height:k,top:_})=>({height:k,offsetTop:h?_:0})}),I=w3(e),B=I===window?{top:0,bottom:0}:T3(I),y=bd({el:I,onChange:A,unsubs:t,measure:({height:k})=>({height:k-B.top-B.bottom,naturalTop:I===window?0:x3(I,l)+B.top+m.offsetTop})}),O=bd({el:e,onChange:A,unsubs:t,measure:({height:k})=>({height:k})});let j=0,x=C();const S=k=>{const _=x;if(x=k,_===2&&(j=-1),k===3){e.style.position=js,r?e.style.bottom=`${i}px`:e.style.top=`${s}px`;return}const{height:X,offsetTop:G}=m,{height:$,naturalTop:le}=y,{height:se}=O;if(k===2)if(e.style.position="relative",j=_===0?Math.max(0,G+f-le+s):Math.max(0,G+f+X-(le+se+i)),r){const q=Math.max(0,$-se-j);e.style.bottom=`${q}px`}else e.style.top=`${j}px`;else e.style.position=js,k===1?r?e.style.bottom=`${i}px`:e.style.top=`${X-se-i}px`:r?e.style.bottom=`${X-se-i}px`:e.style.top=`${s}px`};S(x);const P=k=>{if(k===f)return;const _=k-f;if(f=k,x===3)return;const{offsetTop:X,height:G}=m,{naturalTop:$,height:le}=y,{height:se}=O;if(_>0)if(x===0){if(k+X+s>$){const q=Math.max(0,X+f-$+s);k+X+G<=$+se+q+i?S(2):S(1)}}else x===2&&p(k)&&S(1);else if(x===1){if(X+k+G<$+le+i){const q=Math.max(0,X+f+G-($+se+i));X+k+s>=$+q?S(2):S(0)}}else x===2&&X+k+s<$+j&&S(0)},N=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",N,Ol),l.addEventListener("mousewheel",N,Ol),t.push(()=>l.removeEventListener("scroll",N),()=>l.removeEventListener("mousewheel",N))},S3=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,i]=T.useState(null);return T.useEffect(()=>{if(!r||!js)return;const s=[];return P3(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),i},O3=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:i,className:s,style:l}=e,u=S3({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:s,style:l,ref:u,children:i})},M3=O3,Xm=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(Xm||{});function Zm(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,i=Pe.omit(e,["sticky","disposition","spacing"]),s=t?M3:b.Box,l=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return g.jsx(b.Grid,{...i,item:!0,...n,children:g.jsx(s,{...l,children:g.jsx(b.Stack,{spacing:r,children:e.children})})})}function qm(e){return g.jsx(g.Fragment,{children:e.children})}function $m(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,i=>{if(T.isValidElement(i)&&(i==null?void 0:i.type)===qm){const{position:s}=i.props;switch(s){case"top":r.top.push(i);break;case"bottom":r.bottom.push(i);break}}}),r},[t])}function eI(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=Pe.omit(e,["disposition"]);return g.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function tI(e){const t=Wm();return Lm(e,t??"")}function nI(e){const t=Um(),n=e!==void 0?vd(e):0;return T.useMemo(()=>Pe.chain(t).filter(i=>e!==void 0?Lm(e,i.id):!0).filter(i=>vd(i.id)===n+1).value(),[t,n,e])}function D3(){const e=zm(),t=ya.useNavigate();return T.useCallback(r=>{t(`${e}/${r}`)},[e,t])}function rI(){const e=nI();return g.jsx(b.Card,{variant:"outlined",children:g.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:Pe.map(e,(t,n)=>g.jsx(Qd,{...t},n))})})}function Qd(e){const t=be.useTranslate()??Pe.identity,n=oI(e),{selected:r,label:i,icon:s,onClick:l,badge:u,items:A,isGroup:f,level:p}=n,{spacing:C}=Qn(),[h,m]=T.useState(r),I=T.useCallback(O=>{m(!h),l(O)},[l,h]),B=s!==void 0,y=Pe.omit(e,["label","icon","selected","badge"]);return g.jsxs(g.Fragment,{children:[g.jsx(b.ListItem,{...y,disablePadding:!0,children:g.jsxs(b.ListItemButton,{selected:r&&!f,onClick:I,sx:{pl:C*p},children:[B&&g.jsx(b.ListItemIcon,{children:s}),g.jsx(b.ListItemText,{inset:!B,primary:t(i)}),u&&g.jsx(b.ListItemAvatar,{children:g.jsx(Ms,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),f&&(h?g.jsx(An.ExpandLess,{}):g.jsx(An.ExpandMore,{}))]})}),f&&g.jsx(b.Collapse,{in:h,timeout:"auto",children:g.jsx(b.List,{children:Pe.map(A,(O,j)=>g.jsx(Qd,{...O},j))})})]})}function oI(e){const{id:t}=e,n=tI(t),r=vd(t),i=D3(),s=Gm(),l=Ym(),u=nI(t),A=!Pe.isEmpty(u),f=T.useCallback(C=>{A||(s?i(e.id):l(e.id)),Pe.isFunction(e.onClick)&&e.onClick(C)},[l,i,e,s,A]);return T.useMemo(()=>({...e,selected:n,onClick:f,items:u,isGroup:A,level:r}),[e,n,f,u,A])}function iI(e){const{label:t,icon:n,badge:r}=e,i=Bd(e),s=Km(),l=_m(),u=tI(i);return T.useEffect(()=>(s({id:i,label:t,icon:n,badge:r}),()=>{l(i)}),[s,l,t,n,i,r]),g.jsx(b.Box,{display:u?"unset":"none",children:e.children})}function sI(e){const t=xd(e),n=Bd(e);return g.jsx(iI,{...e,id:n,children:T.Children.map(t,r=>{const i=Bd(r.props);return T.cloneElement(r,{id:`${n}.${i}`})})})}function aI(e){return g.jsx(iI,{...e})}function xd(e){const{children:t}=e;return T.useMemo(()=>Pe.filter(T.Children.toArray(t),r=>T.isValidElement(r)&&((r==null?void 0:r.type)===aI||(r==null?void 0:r.type)===sI)),[t])}function R3(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,i=Pe.pick(e,["syncWithLocation"]),s=Pe.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=$m(e),A=xd(e);return g.jsx(Vm,{...i,children:g.jsxs(Fm,{...s,spacing:r,children:[g.jsxs(Zm,{disposition:t,spacing:r,children:[l,g.jsx(rI,{}),u]}),g.jsx(eI,{disposition:n,children:A})]})})}const Rt=R3;Rt.BaseForm=Fm,Rt.Content=eI,Rt.Provider=Vm,Rt.useItems=Um,Rt.useSyncWithLocation=Gm,Rt.useFormRootPath=zm,Rt.useActiveItem=Wm,Rt.useSetActiveItem=Ym,Rt.useAddItem=Km,Rt.useRemoveItem=_m,Rt.Sidebar=Zm,Rt.SidebarSection=qm,Rt.SidebarSectionPosition=Xm,Rt.useSidebarChildren=$m,Rt.NavMenu=rI,Rt.NavMenuItem=Qd,Rt.useNavMenuItem=oI,Rt.Tab=aI,Rt.Group=sI,Rt.useBaseItemChildren=xd;const j3=ue(M.Show,{name:"RaApplicaShow",slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),k3=ue(M.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),Ml=fs(M.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));Ml.propTypes={...M.TabbedForm.propTypes},Ml.defaultProps={...M.TabbedForm.defaultProps},Ml.Tab=M.TabbedForm.Tab;const lI=T.createContext(void 0),F3=T.createContext(void 0),L3=()=>T.useContext(lI),N3=V.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:i=!1,index:s,member:l,resource:u}=e,A=M.useTranslate(),[f,p]=V.useState(!1),{total:C,remove:h}=L3(),m=V.useCallback(()=>{p(!1),h(s)},[s,h]),I=T.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return g.jsxs(F3.Provider,{value:I,children:[T.Children.map(n,(B,y)=>{if(!T.isValidElement(B))return null;const{source:O,...j}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:T.cloneElement(B,{source:O?`${l}.${O}`:l,index:O?void 0:y,resource:u,disabled:r,...j,label:!1})})}),!i&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2},children:g.jsx(di,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(M.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var V3=Array.isArray,wd=V3,H3=typeof Ln=="object"&&Ln&&Ln.Object===Object&&Ln,z3=H3,W3=z3,U3=typeof self=="object"&&self&&self.Object===Object&&self,G3=W3||U3||Function("return this")(),Td=G3,Y3=Td,K3=Y3.Symbol,Pd=K3,cI=Pd,uI=Object.prototype,_3=uI.hasOwnProperty,J3=uI.toString,ks=cI?cI.toStringTag:void 0;function X3(e){var t=_3.call(e,ks),n=e[ks];try{e[ks]=void 0;var r=!0}catch{}var i=J3.call(e);return r&&(t?e[ks]=n:delete e[ks]),i}var Z3=X3,q3=Object.prototype,$3=q3.toString;function eM(e){return $3.call(e)}var tM=eM,AI=Pd,nM=Z3,rM=tM,oM="[object Null]",iM="[object Undefined]",dI=AI?AI.toStringTag:void 0;function sM(e){return e==null?e===void 0?iM:oM:dI&&dI in Object(e)?nM(e):rM(e)}var fI=sM;function aM(e){return e!=null&&typeof e=="object"}var lM=aM,cM=fI,uM=lM,AM="[object Symbol]";function dM(e){return typeof e=="symbol"||uM(e)&&cM(e)==AM}var Sd=dM,fM=wd,gM=Sd,pM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hM=/^\w*$/;function CM(e,t){if(fM(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||gM(e)?!0:hM.test(e)||!pM.test(e)||t!=null&&e in Object(t)}var EM=CM;function mM(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gI=mM,IM=fI,BM=gI,vM="[object AsyncFunction]",yM="[object Function]",bM="[object GeneratorFunction]",QM="[object Proxy]";function xM(e){if(!BM(e))return!1;var t=IM(e);return t==yM||t==bM||t==vM||t==QM}var wM=xM,TM=Td,PM=TM["__core-js_shared__"],SM=PM,Od=SM,pI=function(){var e=/[^.]+$/.exec(Od&&Od.keys&&Od.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function OM(e){return!!pI&&pI in e}var MM=OM,DM=Function.prototype,RM=DM.toString;function jM(e){if(e!=null){try{return RM.call(e)}catch{}try{return e+""}catch{}}return""}var kM=jM,FM=wM,LM=MM,NM=gI,VM=kM,HM=/[\\^$.*+?()[\]{}|]/g,zM=/^\[object .+?Constructor\]$/,WM=Function.prototype,UM=Object.prototype,GM=WM.toString,YM=UM.hasOwnProperty,KM=RegExp("^"+GM.call(YM).replace(HM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _M(e){if(!NM(e)||LM(e))return!1;var t=FM(e)?KM:zM;return t.test(VM(e))}var JM=_M;function XM(e,t){return e==null?void 0:e[t]}var ZM=XM,qM=JM,$M=ZM;function eD(e,t){var n=$M(e,t);return qM(n)?n:void 0}var hI=eD,tD=hI,nD=tD(Object,"create"),Dl=nD,CI=Dl;function rD(){this.__data__=CI?CI(null):{},this.size=0}var oD=rD;function iD(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sD=iD,aD=Dl,lD="__lodash_hash_undefined__",cD=Object.prototype,uD=cD.hasOwnProperty;function AD(e){var t=this.__data__;if(aD){var n=t[e];return n===lD?void 0:n}return uD.call(t,e)?t[e]:void 0}var dD=AD,fD=Dl,gD=Object.prototype,pD=gD.hasOwnProperty;function hD(e){var t=this.__data__;return fD?t[e]!==void 0:pD.call(t,e)}var CD=hD,ED=Dl,mD="__lodash_hash_undefined__";function ID(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ED&&t===void 0?mD:t,this}var BD=ID,vD=oD,yD=sD,bD=dD,QD=CD,xD=BD;function Qi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qi.prototype.clear=vD,Qi.prototype.delete=yD,Qi.prototype.get=bD,Qi.prototype.has=QD,Qi.prototype.set=xD;var wD=Qi;function TD(){this.__data__=[],this.size=0}var PD=TD;function SD(e,t){return e===t||e!==e&&t!==t}var OD=SD,MD=OD;function DD(e,t){for(var n=e.length;n--;)if(MD(e[n][0],t))return n;return-1}var Rl=DD,RD=Rl,jD=Array.prototype,kD=jD.splice;function FD(e){var t=this.__data__,n=RD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():kD.call(t,n,1),--this.size,!0}var LD=FD,ND=Rl;function VD(e){var t=this.__data__,n=ND(t,e);return n<0?void 0:t[n][1]}var HD=VD,zD=Rl;function WD(e){return zD(this.__data__,e)>-1}var UD=WD,GD=Rl;function YD(e,t){var n=this.__data__,r=GD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var KD=YD,_D=PD,JD=LD,XD=HD,ZD=UD,qD=KD;function xi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xi.prototype.clear=_D,xi.prototype.delete=JD,xi.prototype.get=XD,xi.prototype.has=ZD,xi.prototype.set=qD;var $D=xi,eR=hI,tR=Td,nR=eR(tR,"Map"),rR=nR,EI=wD,oR=$D,iR=rR;function sR(){this.size=0,this.__data__={hash:new EI,map:new(iR||oR),string:new EI}}var aR=sR;function lR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var cR=lR,uR=cR;function AR(e,t){var n=e.__data__;return uR(t)?n[typeof t=="string"?"string":"hash"]:n.map}var jl=AR,dR=jl;function fR(e){var t=dR(this,e).delete(e);return this.size-=t?1:0,t}var gR=fR,pR=jl;function hR(e){return pR(this,e).get(e)}var CR=hR,ER=jl;function mR(e){return ER(this,e).has(e)}var IR=mR,BR=jl;function vR(e,t){var n=BR(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var yR=vR,bR=aR,QR=gR,xR=CR,wR=IR,TR=yR;function wi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wi.prototype.clear=bR,wi.prototype.delete=QR,wi.prototype.get=xR,wi.prototype.has=wR,wi.prototype.set=TR;var PR=wi,mI=PR,SR="Expected a function";function Md(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(SR);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var l=e.apply(this,r);return n.cache=s.set(i,l)||s,l};return n.cache=new(Md.Cache||mI),n}Md.Cache=mI;var OR=Md,MR=OR,DR=500;function RR(e){var t=MR(e,function(r){return n.size===DR&&n.clear(),r}),n=t.cache;return t}var jR=RR,kR=jR,FR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LR=/\\(\\)?/g,NR=kR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(FR,function(n,r,i,s){t.push(i?s.replace(LR,"$1"):r||n)}),t}),VR=NR;function HR(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var zR=HR,II=Pd,WR=zR,UR=wd,GR=Sd,YR=1/0,BI=II?II.prototype:void 0,vI=BI?BI.toString:void 0;function yI(e){if(typeof e=="string")return e;if(UR(e))return WR(e,yI)+"";if(GR(e))return vI?vI.call(e):"";var t=e+"";return t=="0"&&1/e==-YR?"-0":t}var KR=yI,_R=KR;function JR(e){return e==null?"":_R(e)}var XR=JR,ZR=wd,qR=EM,$R=VR,ej=XR;function tj(e,t){return ZR(e)?e:qR(e,t)?[e]:$R(ej(e))}var nj=tj,rj=Sd,oj=1/0;function ij(e){if(typeof e=="string"||rj(e))return e;var t=e+"";return t=="0"&&1/e==-oj?"-0":t}var sj=ij,aj=nj,lj=sj;function cj(e,t){t=aj(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[lj(t[n++])];return n&&n==r?e:void 0}var uj=cj,Aj=uj;function dj(e,t,n){var r=e==null?void 0:Aj(e,t);return r===void 0?n:r}var fj=dj;const gj=ti(fj),bI=e=>{const{children:t,resource:n,source:r,label:i,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f,template:p={}}=e,[C,h]=T.useState(!1),{fields:m,remove:I,replace:B}=M.useArrayInput(e),y=xt(),O=be.useTranslate(),j=be.useRecordContext(e),x=T.useRef({}),S=be.useTranslateLabel(),P=T.useCallback(G=>{I(G)},[I]);if(m.length>0){const{...G}=m[0];x.current=G;for(const $ in x.current)x.current[$]=null}const N=T.useCallback(()=>{B([]),h(!1)},[B]),k=gj(j,r),_=T.useMemo(()=>({total:m.length,remove:P,source:r}),[m.length,P,r]),X=y.palette.mode==="dark"?y.palette.grey.A400:y.palette.grey.A800;return m?g.jsx(lI.Provider,{value:_,children:g.jsxs("div",{className:A,children:[V.cloneElement(g.jsx(QI,{}),{label:i,source:r,disableAdd:l,template:p,addButton:e==null?void 0:e.addButton}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${X}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${X}`},children:g.jsxs(b.TableRow,{children:[T.Children.map(t,(G,$)=>V.isValidElement(G)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:S({...G.props,resource:n})})},$):null),!s&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[m.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),m.length>0&&m.map((G,$)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${X}}`},children:g.jsx(N3,{disableRemove:u,disableActions:s,index:$,member:`${r}.${$}`,onRemoveField:P,record:k&&k[$]||{},resource:n,source:r,children:t})},G.id))]})]})}),m.length>0&&g.jsx(M.Confirm,{isOpen:C,title:O("ra.action.clear_array_input"),content:O("ra.message.clear_array_input"),onConfirm:N,onClose:()=>h(!1)})]})}):null},QI=e=>{var f;const{label:t,disableAdd:n,template:r={}}=e,{append:i}=M.useArrayInput(e),s=xt(),l=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,u=s.palette.mode==="light"?"#000000":"#FFFFFF",A=T.useCallback(p=>C=>{i(r),p&&p(C)},[i,r]);return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[g.jsx(b.Typography,{children:t}),!n&&(V.isValidElement(e==null?void 0:e.addButton)?V.cloneElement(e==null?void 0:e.addButton,{onClick:A((f=e==null?void 0:e.addButton)==null?void 0:f.props.onClick)}):g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${l}`},onClick:()=>i(r),children:g.jsx(tt.PlusCircleOutlined,{style:{color:u}})}))]})},pj=ue(bI,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));QI.propTypes={label:c.string,source:c.string,defaultValue:c.any},bI.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.string,resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string]),template:c.object};function hj(e,t){const n=Pe.clone(e),{type:r,payload:i}=t;switch(r){case"updateMedia":{const s=Pe.chain(n.media).clone().extend(i).value();return Pe.extend(n,{media:s})}case"updateDrawer":{const s=Pe.chain(n.drawer).clone().extend(i).value();return Pe.extend(n,{drawer:s})}case"updateLogo":{const s=Pe.chain(n.logo).clone().extend(i).value();return Pe.extend(n,{logo:s})}case"updateNotifications":{const s=Pe.chain(n.notifications).clone().extend(i).value();return Pe.extend(n,{notifications:s})}case"updateTheme":{const s=Pe.chain(n.theme).clone().extend(i).value();return Pe.extend(n,{theme:s})}default:return n}}const Cj={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},xI=T.createContext(void 0);function wI(e){var _;const t=be.useGetIdentity(),n=b.useTheme(),r=b.useMediaQuery(n.breakpoints.down("md")),i=b.useMediaQuery(n.breakpoints.down("lg")),s=b.useMediaQuery(n.breakpoints.down("xl")),{miniDrawer:l,isHorizontalLayout:u,menuOrientation:A,drawerWidth:f}=Qn(),p=u(A)&&!i,{drawerOpen:C,openDrawer:h}=Jr(),m=T.useCallback(()=>{h(!C)},[C,h]),[I,B]=T.useState(!1),[y,O]=T.useReducer(hj,Pe.chain(Cj).clone().merge({drawer:{open:!l||C}}).value()),j=T.useCallback(()=>B(!1),[]),x=T.useMemo(()=>({state:y,dispatch:O}),[y,O]),{logoIcon:S,logoMain:P,enableNotification:N,notification:k}=e;return T.useEffect(()=>{O({type:"updateMedia",payload:{downMd:r,downLg:i,downXl:s,horizontal:p}})},[A,r,i,s]),T.useEffect(()=>{O({type:"updateDrawer",payload:{open:C,width:f,handleDrawerToggle:m}})},[C,f,m]),T.useEffect(()=>{l||h(!s)},[s,l]),T.useEffect(()=>{O({type:"updateLogo",payload:{main:P,icon:S}})},[S,P]),T.useEffect(()=>{O({type:"updateNotifications",payload:{enable:N,resource:k??"entities/notification"}})},[N,k]),T.useEffect(()=>{O({type:"updateTheme",payload:{iconColorOpen:n.palette.mode==="dark"?"grey.200":"grey.300",iconColor:n.palette.mode==="dark"?"background.default":"grey.100"}})},[n.palette.mode]),T.useEffect(()=>{var X;B(((X=t==null?void 0:t.data)==null?void 0:X.needToChangePassword)===!0)},[(_=t==null?void 0:t.data)==null?void 0:_.needToChangePassword]),g.jsxs(xI.Provider,{value:x,children:[g.jsx(b.Dialog,{open:I,maxWidth:"xs",fullWidth:!0,children:g.jsx(md,{onSuccess:j,firstAccess:!0})}),e.children]})}function TI(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:i,enableNotification:s}=t;return g.jsx(wI,{logoIcon:r,logoMain:i,enableNotification:s,children:g.jsx(e,{ref:n,...t})})})}function Dd(){const e=T.useContext(xI);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function Ej(){return Dd().dispatch}function Ti(){return Dd().state}function zn(){return Ti().media}function ko(){return Ti().drawer}function PI(){return Ti().logo}function kl(){return Ti().notifications}function Fl(){return Ti().theme}function SI(){const{iconColor:e,iconColorOpen:t}=Fl(),{open:n,handleDrawerToggle:r}=ko();return g.jsx(ro,{"aria-label":"open drawer",onClick:r,edge:"start",color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:n?t:e,ml:{xs:0,lg:-2}},children:n?g.jsx(tt.MenuFoldOutlined,{}):g.jsx(tt.MenuUnfoldOutlined,{})})}function OI(e){const t=T.useRef(),n=b.useTheme(),{downLg:r,horizontal:i}=zn(),{open:s,width:l}=ko(),u=r?b.AppBar:gh,A=gi(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:i?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||Pe.extend(f,{open:s}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!i&&g.jsx(SI,{}),e.children]})})}function mj(e){const t=b.useTheme(),{notification:n,onClick:r,selected:i,divider:s}=e,{resource:l}=kl(),u=be.useNotify(),A=be.useRedirect(),[f]=be.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Rr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):document.location.href=n==null?void 0:n.resource:r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=T.useCallback(()=>f(),[f]),[C]=be.useLocaleState(),h=T.useMemo(()=>Rr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:s,children:g.jsxs(b.ListItemButton,{selected:i,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(tt.MessageOutlined,{})})}),g.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),g.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),g.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const Ij={width:36,height:36,fontSize:"1rem"},Bj={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function MI(){const{enable:e}=kl();return e?g.jsx(vj,{}):null}function vj(){const e=b.useTheme(),t=T.useRef(),{resource:n}=kl(),{downMd:r}=zn(),{iconColor:i,iconColorOpen:s}=Fl(),[l,u]=T.useState(!1),[A,f]=T.useState([]),p=A.filter(B=>B.readed===null).length,C=T.useCallback(()=>u(!l),[l]),h=T.useCallback(()=>{t.current&&t.current.contains(event.target)||u(!1)},[t.current,u]),{data:m,isLoading:I}=be.useGetList(n,{pagination:{page:1,perPage:50},sort:{field:"created",order:"DESC"},filter:{readed:!1}});return T.useEffect(()=>{!I&&m&&f(m??[])},[m,I]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(ro,{color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:l?s:i},"aria-label":"open profile",ref:t,"aria-controls":l?"profile-grow":void 0,"aria-haspopup":"true",onClick:C,children:g.jsx(b.Badge,{badgeContent:p,color:"primary",children:g.jsx(tt.BellOutlined,{})})}),g.jsx(b.Popper,{placement:r?"bottom":"bottom-end",open:l,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[r?-5:0,9]}}]},children:({TransitionProps:B})=>g.jsx(io,{type:"grow",position:r?"top":"top-right",in:open,...B,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[e.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:h,children:g.jsx(or,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:p>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(ro,{color:"success",size:"small",children:g.jsx(tt.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:g.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":Ij,"& .MuiListItemSecondaryAction-root":{...Bj,position:"relative"}}},children:A.map((y,O)=>g.jsx(mj,{selected:p>0,notification:y,onClick:h,divider:O<A.length-1},y.id))})})})})})})]})}const yj=()=>{const[e,t]=T.useState(!1),n=T.useCallback(()=>t(!1),[t]),r=T.useCallback(()=>t(!0),[t]),i=be.useTranslate();return g.jsxs(T.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(An.Key,{})}),g.jsx(b.ListItemText,{primary:i("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(md,{onSuccess:n})})]})},bj=()=>{const e=be.useLogout(),t=be.useTranslate();return g.jsx(T.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(An.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},Qj=()=>{const e=be.useTranslate(),t=be.useAuthProvider(),n=T.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,i]=T.useState(!1);return T.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>i(s))},[t,i]),r?g.jsx(T.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(An.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};c.node,c.any.isRequired,c.any.isRequired;const DI=()=>{var B;const e=b.useTheme(),{identity:t}=M.useGetIdentity(),n=t!==void 0&&t.image&&t.image!==null&&t.image!=="",r=T.useRef(null),[i,s]=T.useState(!1),l=()=>{s(y=>!y)},u=y=>{r.current&&r.current.contains(y.target)||s(!1)},A=e.palette.mode==="dark"?"grey.200":"grey.300",f=M.useLogout(),p=M.useDataProvider(),C=M.useAuthProvider(),h=T.useCallback(()=>{f()},[C,f]),[m,I]=T.useState(null);return T.useEffect(()=>{if(!n)return;async function y(){var O=await p.getFile("/profile/me/image");I(O)}y()},[p,n]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(b.ButtonBase,{sx:{p:.25,bgcolor:i?A:"transparent",borderRadius:1,"&:hover":{bgcolor:e.palette.mode==="dark"?"secondary.light":"secondary.lighter"},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},"aria-label":"open profile",ref:r,"aria-controls":i?"profile-grow":void 0,"aria-haspopup":"true",onClick:l,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Ms,{alt:(B=t==null?void 0:t.name)==null?void 0:B.toUpperCase(),src:m,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:t==null?void 0:t.name})]})}),g.jsx(b.Popper,{placement:"bottom-end",open:i,anchorEl:r.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:y})=>{var O;return g.jsx(io,{type:"grow",position:"top-right",in:i,...y,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:g.jsx(b.ClickAwayListener,{onClickAway:u,children:g.jsxs(or,{elevation:0,border:!1,content:!1,children:[g.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:g.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[g.jsx(Ms,{alt:"profile user",src:m,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:t==null?void 0:t.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(O=t==null?void 0:t.roles)==null?void 0:O.map(j=>j.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(ro,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(tt.LogoutOutlined,{})})})})]})}),g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[g.jsx(yj,{}),g.jsx(bj,{}),g.jsx(Qj,{})]})})})]})})})})}})]})},RI=e=>{const t=xt(),{downMd:n}=zn(),{iconColor:r,iconColorOpen:i}=Fl(),[s,l]=T.useState(!1),u=T.useRef(null),A=T.useCallback(()=>{l(!s)},[s]),f=T.useCallback(p=>{u.current&&u.current.contains(p.target)||l(!1)},[]);return n?g.jsxs(g.Fragment,{children:[g.jsx(b.Box,{sx:{flexShrink:0},children:g.jsx(ro,{sx:{color:"text.primary",bgcolor:s?i:r},"aria-label":"open more menu",ref:u,"aria-controls":s?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:A,color:"secondary",variant:"light",children:g.jsx(tt.MoreOutlined,{})})}),g.jsx(b.Popper,{placement:"bottom-end",open:s,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:p})=>g.jsx(io,{type:"fade",in:s,...p,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:f,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function jI(e){return g.jsx(b.Box,{...e,flex:1})}function Fs(e){const{name:t,version:n}=e;return g.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:g.jsxs(b.Typography,{variant:"caption",children:[g.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}Fs.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},Fs.defaultProps={copy:"© Applica Software Guru for"};function kI(e){const{width:t}=ko(),{horizontal:n}=zn(),{container:r}=Qn();return g.jsxs(b.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[g.jsx(b.Toolbar,{sx:{mt:n?8:"inherit"}})," ",g.jsx(b.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column"},children:e.children})]})}const FI=T.forwardRef((e,t)=>{const n=gi(e,{display:"flex",width:"100%"});return g.jsx(b.Box,{ref:t,...e,sx:n,children:e.children})});var LI={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(LI);var xj=LI.exports,Rd={};const wj=lQ(dO);var NI;function Tj(){return NI||(NI=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=wj}(Rd)),Rd}function VI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=VI(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Pj(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=VI(e))&&(r&&(r+=" "),r+=t);return r}var jd=globalThis&&globalThis.__assign||function(){return jd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jd.apply(this,arguments)},Sj=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},HI=function(e){var t=e.className,n=e.sx,r=Sj(e,["className","sx"]),i=be.useLoading(),s=xt();return V.createElement(Oj,{className:t,sx:n},i?V.createElement(pm,jd({className:Pj("app-loader",Ll.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):V.createElement(B0,{className:Ll.loadedIcon}))};HI.propTypes={classes:c.object,className:c.string,width:c.string};var kd="RaLoadingIndicator",Ll={loader:"".concat(kd,"-loader"),loadedIcon:"".concat(kd,"-loadedIcon")},Oj=ue("div",{name:kd,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(Ll.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(Ll.loadedIcon)]={},t});const Fd=e=>e.scrollTop;function Pi(e,t){var n,r;const{timeout:i,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const Mj=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Dj(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),s=oi(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const f=s.getComputedStyle(t);l=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const f=l.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),A=parseInt(f[5],10)}return e==="left"?i?`translateX(${i.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?i?`translateY(${i.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function zI(e){return typeof e=="function"?e():e}function Nl(e,t,n){const r=zI(n),i=Dj(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const WI=V.forwardRef(function(t,n){const r=xt(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:f,direction:p="down",easing:C=i,in:h,onEnter:m,onEntered:I,onEntering:B,onExit:y,onExited:O,onExiting:j,style:x,timeout:S=s,TransitionComponent:P=zA}=t,N=_e(t,Mj),k=V.useRef(null),_=yn(A.ref,k,n),X=F=>te=>{F&&(te===void 0?F(k.current):F(k.current,te))},G=X((F,te)=>{Nl(p,F,f),Fd(F),m&&m(F,te)}),$=X((F,te)=>{const W=Pi({timeout:S,style:x,easing:C},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",U({},W)),F.style.transition=r.transitions.create("transform",U({},W)),F.style.webkitTransform="none",F.style.transform="none",B&&B(F,te)}),le=X(I),se=X(j),q=X(F=>{const te=Pi({timeout:S,style:x,easing:C},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",te),F.style.transition=r.transitions.create("transform",te),Nl(p,F,f),y&&y(F)}),K=X(F=>{F.style.webkitTransition="",F.style.transition="",O&&O(F)}),z=F=>{l&&l(k.current,F)},Z=V.useCallback(()=>{k.current&&Nl(p,k.current,f)},[p,f]);return V.useEffect(()=>{if(h||p==="down"||p==="right")return;const F=Ip(()=>{k.current&&Nl(p,k.current,f)}),te=oi(k.current);return te.addEventListener("resize",F),()=>{F.clear(),te.removeEventListener("resize",F)}},[p,h,f]),V.useEffect(()=>{h||Z()},[h,Z]),g.jsx(P,U({nodeRef:k,onEnter:G,onEntered:le,onEntering:$,onExit:q,onExited:K,onExiting:se,addEndListener:z,appear:u,in:h,timeout:S},N,{children:(F,te)=>V.cloneElement(A,U({ref:_,style:U({visibility:F==="exited"&&!h?"hidden":void 0},x,A.props.style)},te))}))});process.env.NODE_ENV!=="production"&&(WI.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,container:br(c.oneOfType([bo,c.func]),e=>{if(e.open){const t=zI(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
203
203
|
`))}else if(!t||typeof t.getBoundingClientRect!="function"||t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join(`
|
|
204
204
|
`))}return null}),direction:c.oneOf(["down","left","right","up"]),easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const Rj=WI;function jj(e){return typeof e=="string"}function kj(e,t,n){return e===void 0||jj(e)?t:U({},t,{ownerState:U({},t.ownerState,n)})}const Fj={disableDefaultClasses:!1},Lj=V.createContext(Fj);function Nj(e){const{disableDefaultClasses:t}=V.useContext(Lj);return n=>t?"":e(n)}function UI(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Vj(e,t,n){return typeof e=="function"?e(t,n):e}function GI(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Hj(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const m=Ze(i==null?void 0:i.className,r==null?void 0:r.className,s,n==null?void 0:n.className),I=U({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),B=U({},n,i,r);return m.length>0&&(B.className=m),Object.keys(I).length>0&&(B.style=I),{props:B,internalRef:void 0}}const l=UI(U({},i,r)),u=GI(r),A=GI(i),f=t(l),p=Ze(f==null?void 0:f.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),C=U({},f==null?void 0:f.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=U({},f,n,A,u);return p.length>0&&(h.className=p),Object.keys(C).length>0&&(h.style=C),{props:h,internalRef:f.ref}}const zj=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Wj(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=e,l=_e(e,zj),u=s?{}:Vj(r,i),{props:A,internalRef:f}=Hj(U({},l,{externalSlotProps:u})),p=yn(f,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return kj(n,U({},A,{ref:p}),i)}function Uj(e){const t=rr(e);return t.body===e?oi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Ls(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function YI(e){return parseInt(oi(e).getComputedStyle(e).paddingRight,10)||0}function Gj(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function KI(e,t,n,r,i){const s=[t,n,...r];[].forEach.call(e.children,l=>{const u=s.indexOf(l)===-1,A=!Gj(l);u&&A&&Ls(l,i)})}function Ld(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function Yj(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Uj(r)){const l=NQ(rr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${YI(r)+l}px`;const u=rr(r).querySelectorAll(".mui-fixed");[].forEach.call(u,A=>{n.push({value:A.style.paddingRight,property:"padding-right",el:A}),A.style.paddingRight=`${YI(A)+l}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=rr(r).body;else{const l=r.parentElement,u=oi(r);s=(l==null?void 0:l.nodeName)==="HTML"&&u.getComputedStyle(l).overflowY==="scroll"?l:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:l,property:u})=>{s?l.style.setProperty(u,s):l.style.removeProperty(u)})}}function Kj(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class _j{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Ls(t.modalRef,!1);const i=Kj(n);KI(n,t.mount,t.modalRef,i,!0);const s=Ld(this.containers,l=>l.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Ld(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=Yj(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Ld(this.containers,l=>l.modals.indexOf(t)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&Ls(t.modalRef,n),KI(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const l=s.modals[s.modals.length-1];l.modalRef&&Ls(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Jj(e){return typeof e=="function"?e():e}function Xj(e){return e?e.props.hasOwnProperty("in"):!1}const Zj=new _j;function qj(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Zj,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:u,children:A,onClose:f,open:p,rootRef:C}=e,h=V.useRef({}),m=V.useRef(null),I=V.useRef(null),B=yn(I,C),[y,O]=V.useState(!p),j=Xj(A);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>rr(m.current),P=()=>(h.current.modalRef=I.current,h.current.mount=m.current,h.current),N=()=>{i.mount(P(),{disableScrollLock:r}),I.current&&(I.current.scrollTop=0)},k=Kr(()=>{const z=Jj(t)||S().body;i.add(P(),z),I.current&&N()}),_=V.useCallback(()=>i.isTopModal(P()),[i]),X=Kr(z=>{m.current=z,z&&(p&&_()?N():I.current&&Ls(I.current,x))}),G=V.useCallback(()=>{i.remove(P(),x)},[x,i]);V.useEffect(()=>()=>{G()},[G]),V.useEffect(()=>{p?k():(!j||!s)&&G()},[p,G,j,s,k]);const $=z=>Z=>{var F;(F=z.onKeyDown)==null||F.call(z,Z),!(Z.key!=="Escape"||!_())&&(n||(Z.stopPropagation(),f&&f(Z,"escapeKeyDown")))},le=z=>Z=>{var F;(F=z.onClick)==null||F.call(z,Z),Z.target===Z.currentTarget&&f&&f(Z,"backdropClick")};return{getRootProps:(z={})=>{const Z=UI(e);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=U({},Z,z);return U({role:"presentation"},F,{onKeyDown:$(F),ref:B})},getBackdropProps:(z={})=>{const Z=z;return U({"aria-hidden":!0},Z,{onClick:le(Z),open:p})},getTransitionProps:()=>{const z=()=>{O(!1),l&&l()},Z=()=>{O(!0),u&&u(),s&&G()};return{onEnter:mu(z,A==null?void 0:A.props.onEnter),onExited:mu(Z,A==null?void 0:A.props.onExited)}},rootRef:B,portalRef:X,isTopModal:_,exited:y,hasTransition:j}}const $j=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ek(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function tk(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function nk(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||tk(e))}function rk(e){const t=[],n=[];return Array.from(e.querySelectorAll($j)).forEach((r,i)=>{const s=ek(r);s===-1||!nk(r)||(s===0?t.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function ok(){return!0}function Vl(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=rk,isEnabled:l=ok,open:u}=e,A=V.useRef(!1),f=V.useRef(null),p=V.useRef(null),C=V.useRef(null),h=V.useRef(null),m=V.useRef(!1),I=V.useRef(null),B=yn(t.ref,I),y=V.useRef(null);V.useEffect(()=>{!u||!I.current||(m.current=!n)},[n,u]),V.useEffect(()=>{if(!u||!I.current)return;const x=rr(I.current);return I.current.contains(x.activeElement)||(I.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
205
205
|
`)),I.current.setAttribute("tabIndex","-1")),m.current&&I.current.focus()),()=>{i||(C.current&&C.current.focus&&(A.current=!0,C.current.focus()),C.current=null)}},[u]),V.useEffect(()=>{if(!u||!I.current)return;const x=rr(I.current),S=k=>{y.current=k,!(r||!l()||k.key!=="Tab")&&x.activeElement===I.current&&k.shiftKey&&(A.current=!0,p.current&&p.current.focus())},P=()=>{const k=I.current;if(k===null)return;if(!x.hasFocus()||!l()||A.current){A.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==f.current&&x.activeElement!==p.current)return;if(x.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let _=[];if((x.activeElement===f.current||x.activeElement===p.current)&&(_=s(I.current)),_.length>0){var X,G;const $=!!((X=y.current)!=null&&X.shiftKey&&((G=y.current)==null?void 0:G.key)==="Tab"),le=_[0],se=_[_.length-1];typeof le!="string"&&typeof se!="string"&&($?se.focus():le.focus())}else k.focus()};x.addEventListener("focusin",P),x.addEventListener("keydown",S,!0);const N=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(N),x.removeEventListener("focusin",P),x.removeEventListener("keydown",S,!0)}},[n,r,i,l,u,s]);const O=x=>{C.current===null&&(C.current=x.relatedTarget),m.current=!0,h.current=x.target;const S=t.props.onFocus;S&&S(x)},j=x=>{C.current===null&&(C.current=x.relatedTarget),m.current=!0};return g.jsxs(V.Fragment,{children:[g.jsx("div",{tabIndex:u?0:-1,onFocus:j,ref:f,"data-testid":"sentinelStart"}),V.cloneElement(t,{ref:B,onFocus:O}),g.jsx("div",{tabIndex:u?0:-1,onFocus:j,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Vl.propTypes={children:ni,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired}),process.env.NODE_ENV!=="production"&&(Vl["propTypes"]=xa(Vl.propTypes));function ik(e){return typeof e=="function"?e():e}const Ns=V.forwardRef(function(t,n){const{children:r,container:i,disablePortal:s=!1}=t,[l,u]=V.useState(null),A=yn(V.isValidElement(r)?r.ref:null,n);if(ii(()=>{s||u(ik(i)||document.body)},[i,s]),ii(()=>{if(l&&!s)return wa(n,l),()=>{wa(n,null)}},[n,l,s]),s){if(V.isValidElement(r)){const f={ref:A};return V.cloneElement(r,f)}return g.jsx(V.Fragment,{children:r})}return g.jsx(V.Fragment,{children:l&&aQ.createPortal(r,l)})});process.env.NODE_ENV!=="production"&&(Ns.propTypes={children:c.node,container:c.oneOfType([bo,c.func]),disablePortal:c.bool}),process.env.NODE_ENV!=="production"&&(Ns["propTypes"]=xa(Ns.propTypes));const sk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ak={entering:{opacity:1},entered:{opacity:1}},_I=V.forwardRef(function(t,n){const r=xt(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,easing:A,in:f,onEnter:p,onEntered:C,onEntering:h,onExit:m,onExited:I,onExiting:B,style:y,timeout:O=i,TransitionComponent:j=zA}=t,x=_e(t,sk),S=V.useRef(null),P=yn(S,u.ref,n),N=q=>K=>{if(q){const z=S.current;K===void 0?q(z):q(z,K)}},k=N(h),_=N((q,K)=>{Fd(q);const z=Pi({style:y,timeout:O,easing:A},{mode:"enter"});q.style.webkitTransition=r.transitions.create("opacity",z),q.style.transition=r.transitions.create("opacity",z),p&&p(q,K)}),X=N(C),G=N(B),$=N(q=>{const K=Pi({style:y,timeout:O,easing:A},{mode:"exit"});q.style.webkitTransition=r.transitions.create("opacity",K),q.style.transition=r.transitions.create("opacity",K),m&&m(q)}),le=N(I),se=q=>{s&&s(S.current,q)};return g.jsx(j,U({appear:l,in:f,nodeRef:S,onEnter:_,onEntered:X,onEntering:k,onExit:$,onExited:le,onExiting:G,addEndListener:se,timeout:O},x,{children:(q,K)=>V.cloneElement(u,U({style:U({opacity:0,visibility:q==="exited"&&!f?"hidden":void 0},ak[q],y,u.props.style),ref:P},K))}))});process.env.NODE_ENV!=="production"&&(_I.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const lk=_I;function ck(e){return Ht("MuiBackdrop",e)}Yt("MuiBackdrop",["root","invisible"]);const uk=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Ak=e=>{const{classes:t,invisible:n}=e;return dn({root:["root",n&&"invisible"]},ck,t)},dk=ue("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>U({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),JI=V.forwardRef(function(t,n){var r,i,s;const l=Kt({props:t,name:"MuiBackdrop"}),{children:u,className:A,component:f="div",components:p={},componentsProps:C={},invisible:h=!1,open:m,slotProps:I={},slots:B={},TransitionComponent:y=lk,transitionDuration:O}=l,j=_e(l,uk),x=U({},l,{component:f,invisible:h}),S=Ak(x),P=(r=I.root)!=null?r:C.root;return g.jsx(y,U({in:m,timeout:O},j,{children:g.jsx(dk,U({"aria-hidden":!0},P,{as:(i=(s=B.root)!=null?s:p.Root)!=null?i:f,className:Ze(S.root,A,P==null?void 0:P.className),ownerState:U({},x,P==null?void 0:P.ownerState),classes:S,ref:n,children:u}))}))});process.env.NODE_ENV!=="production"&&(JI.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const fk=JI;function gk(e){return Ht("MuiModal",e)}Yt("MuiModal",["root","hidden","backdrop"]);const pk=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],hk=e=>{const{open:t,exited:n,classes:r}=e;return dn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},gk,r)},Ck=ue("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>U({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Ek=ue(fk,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),XI=V.forwardRef(function(t,n){var r,i,s,l,u,A;const f=Kt({name:"MuiModal",props:t}),{BackdropComponent:p=Ek,BackdropProps:C,className:h,closeAfterTransition:m=!1,children:I,container:B,component:y,components:O={},componentsProps:j={},disableAutoFocus:x=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:P=!1,disablePortal:N=!1,disableRestoreFocus:k=!1,disableScrollLock:_=!1,hideBackdrop:X=!1,keepMounted:G=!1,onBackdropClick:$,open:le,slotProps:se,slots:q}=f,K=_e(f,pk),z=U({},f,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:S,disableEscapeKeyDown:P,disablePortal:N,disableRestoreFocus:k,disableScrollLock:_,hideBackdrop:X,keepMounted:G}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:te,portalRef:W,isTopModal:J,exited:de,hasTransition:ge}=qj(U({},z,{rootRef:n})),ce=U({},z,{exited:de}),Ae=hk(ce),pe={};if(I.props.tabIndex===void 0&&(pe.tabIndex="-1"),ge){const{onEnter:We,onExited:fe}=te();pe.onEnter=We,pe.onExited=fe}const Ie=(r=(i=q==null?void 0:q.root)!=null?i:O.Root)!=null?r:Ck,Ee=(s=(l=q==null?void 0:q.backdrop)!=null?l:O.Backdrop)!=null?s:p,he=(u=se==null?void 0:se.root)!=null?u:j.root,me=(A=se==null?void 0:se.backdrop)!=null?A:j.backdrop,xe=Ar.useSlotProps({elementType:Ie,externalSlotProps:he,externalForwardedProps:K,getSlotProps:Z,additionalProps:{ref:n,as:y},ownerState:ce,className:Ze(h,he==null?void 0:he.className,Ae==null?void 0:Ae.root,!ce.open&&ce.exited&&(Ae==null?void 0:Ae.hidden))}),ae=Ar.useSlotProps({elementType:Ee,externalSlotProps:me,additionalProps:C,getSlotProps:We=>F(U({},We,{onClick:fe=>{$&&$(fe),We!=null&&We.onClick&&We.onClick(fe)}})),className:Ze(me==null?void 0:me.className,C==null?void 0:C.className,Ae==null?void 0:Ae.backdrop),ownerState:ce});return!G&&!le&&(!ge||de)?null:g.jsx(Ns,{ref:W,container:B,disablePortal:N,children:g.jsxs(Ie,U({},xe,{children:[!X&&p?g.jsx(Ee,U({},ae)):null,g.jsx(Vl,{disableEnforceFocus:S,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:J,open:le,children:V.cloneElement(I,pe)})]}))})});process.env.NODE_ENV!=="production"&&(XI.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:ni.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([bo,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const mk=XI;var Nd={},Ik=xj;Object.defineProperty(Nd,"__esModule",{value:!0});var ZI=Nd.default=void 0,Bk=Ik(Tj()),vk=g,yk=(0,Bk.default)((0,vk.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),"Refresh");ZI=Nd.default=yk;const bk=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Vd(e){return`scale(${e}, ${e**2})`}const Qk={entering:{opacity:1,transform:Vd(1)},entered:{opacity:1,transform:"none"}},Hd=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),zd=V.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:s,easing:l,in:u,onEnter:A,onEntered:f,onEntering:p,onExit:C,onExited:h,onExiting:m,style:I,timeout:B="auto",TransitionComponent:y=zA}=t,O=_e(t,bk),j=V.useRef(),x=V.useRef(),S=xt(),P=V.useRef(null),N=yn(P,s.ref,n),k=K=>z=>{if(K){const Z=P.current;z===void 0?K(Z):K(Z,z)}},_=k(p),X=k((K,z)=>{Fd(K);const{duration:Z,delay:F,easing:te}=Pi({style:I,timeout:B,easing:l},{mode:"enter"});let W;B==="auto"?(W=S.transitions.getAutoHeightDuration(K.clientHeight),x.current=W):W=Z,K.style.transition=[S.transitions.create("opacity",{duration:W,delay:F}),S.transitions.create("transform",{duration:Hd?W:W*.666,delay:F,easing:te})].join(","),A&&A(K,z)}),G=k(f),$=k(m),le=k(K=>{const{duration:z,delay:Z,easing:F}=Pi({style:I,timeout:B,easing:l},{mode:"exit"});let te;B==="auto"?(te=S.transitions.getAutoHeightDuration(K.clientHeight),x.current=te):te=z,K.style.transition=[S.transitions.create("opacity",{duration:te,delay:Z}),S.transitions.create("transform",{duration:Hd?te:te*.666,delay:Hd?Z:Z||te*.333,easing:F})].join(","),K.style.opacity=0,K.style.transform=Vd(.75),C&&C(K)}),se=k(h),q=K=>{B==="auto"&&(j.current=setTimeout(K,x.current||0)),r&&r(P.current,K)};return V.useEffect(()=>()=>{clearTimeout(j.current)},[]),g.jsx(y,U({appear:i,in:u,nodeRef:P,onEnter:X,onEntered:G,onEntering:_,onExit:le,onExited:se,onExiting:$,addEndListener:q,timeout:B==="auto"?null:B},O,{children:(K,z)=>V.cloneElement(s,U({style:U({opacity:0,transform:Vd(.75),visibility:K==="exited"&&!u?"hidden":void 0},Qk[K],I,s.props.style),ref:N},z))}))});process.env.NODE_ENV!=="production"&&(zd.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])}),zd.muiSupportAuto=!0;const qI=zd;var gn="top",Wn="bottom",Un="right",pn="left",Wd="auto",Vs=[gn,Wn,Un,pn],Si="start",Hs="end",xk="clippingParents",$I="viewport",zs="popper",wk="reference",e0=Vs.reduce(function(e,t){return e.concat([t+"-"+Si,t+"-"+Hs])},[]),t0=[].concat(Vs,[Wd]).reduce(function(e,t){return e.concat([t,t+"-"+Si,t+"-"+Hs])},[]),Tk="beforeRead",Pk="read",Sk="afterRead",Ok="beforeMain",Mk="main",Dk="afterMain",Rk="beforeWrite",jk="write",kk="afterWrite",Fk=[Tk,Pk,Sk,Ok,Mk,Dk,Rk,jk,kk];function hr(e){return e?(e.nodeName||"").toLowerCase():null}function wn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Fo(e){var t=wn(e).Element;return e instanceof t||e instanceof Element}function Gn(e){var t=wn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ud(e){if(typeof ShadowRoot>"u")return!1;var t=wn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Lk(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},s=t.elements[n];!Gn(s)||!hr(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(l){var u=i[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function Nk(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],s=t.attributes[r]||{},l=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=l.reduce(function(A,f){return A[f]="",A},{});!Gn(i)||!hr(i)||(Object.assign(i.style,u),Object.keys(s).forEach(function(A){i.removeAttribute(A)}))})}}const Vk={name:"applyStyles",enabled:!0,phase:"write",fn:Lk,effect:Nk,requires:["computeStyles"]};function Cr(e){return e.split("-")[0]}var Lo=Math.max,Hl=Math.min,Oi=Math.round;function Gd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function n0(){return!/^((?!chrome|android).)*safari/i.test(Gd())}function Mi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,s=1;t&&Gn(e)&&(i=e.offsetWidth>0&&Oi(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Oi(r.height)/e.offsetHeight||1);var l=Fo(e)?wn(e):window,u=l.visualViewport,A=!n0()&&n,f=(r.left+(A&&u?u.offsetLeft:0))/i,p=(r.top+(A&&u?u.offsetTop:0))/s,C=r.width/i,h=r.height/s;return{width:C,height:h,top:p,right:f+C,bottom:p+h,left:f,x:f,y:p}}function Yd(e){var t=Mi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function r0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ud(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function jr(e){return wn(e).getComputedStyle(e)}function Hk(e){return["table","td","th"].indexOf(hr(e))>=0}function so(e){return((Fo(e)?e.ownerDocument:e.document)||window.document).documentElement}function zl(e){return hr(e)==="html"?e:e.assignedSlot||e.parentNode||(Ud(e)?e.host:null)||so(e)}function o0(e){return!Gn(e)||jr(e).position==="fixed"?null:e.offsetParent}function zk(e){var t=/firefox/i.test(Gd()),n=/Trident/i.test(Gd());if(n&&Gn(e)){var r=jr(e);if(r.position==="fixed")return null}var i=zl(e);for(Ud(i)&&(i=i.host);Gn(i)&&["html","body"].indexOf(hr(i))<0;){var s=jr(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function Ws(e){for(var t=wn(e),n=o0(e);n&&Hk(n)&&jr(n).position==="static";)n=o0(n);return n&&(hr(n)==="html"||hr(n)==="body"&&jr(n).position==="static")?t:n||zk(e)||t}function Kd(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Us(e,t,n){return Lo(e,Hl(t,n))}function Wk(e,t,n){var r=Us(e,t,n);return r>n?n:r}function i0(){return{top:0,right:0,bottom:0,left:0}}function s0(e){return Object.assign({},i0(),e)}function a0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Uk=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,s0(typeof t!="number"?t:a0(t,Vs))};function Gk(e){var t,n=e.state,r=e.name,i=e.options,s=n.elements.arrow,l=n.modifiersData.popperOffsets,u=Cr(n.placement),A=Kd(u),f=[pn,Un].indexOf(u)>=0,p=f?"height":"width";if(!(!s||!l)){var C=Uk(i.padding,n),h=Yd(s),m=A==="y"?gn:pn,I=A==="y"?Wn:Un,B=n.rects.reference[p]+n.rects.reference[A]-l[A]-n.rects.popper[p],y=l[A]-n.rects.reference[A],O=Ws(s),j=O?A==="y"?O.clientHeight||0:O.clientWidth||0:0,x=B/2-y/2,S=C[m],P=j-h[p]-C[I],N=j/2-h[p]/2+x,k=Us(S,N,P),_=A;n.modifiersData[r]=(t={},t[_]=k,t.centerOffset=k-N,t)}}function Yk(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||r0(t.elements.popper,i)&&(t.elements.arrow=i))}const Kk={name:"arrow",enabled:!0,phase:"main",fn:Gk,effect:Yk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Di(e){return e.split("-")[1]}var _k={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jk(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Oi(n*i)/i||0,y:Oi(r*i)/i||0}}function l0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,s=e.variation,l=e.offsets,u=e.position,A=e.gpuAcceleration,f=e.adaptive,p=e.roundOffsets,C=e.isFixed,h=l.x,m=h===void 0?0:h,I=l.y,B=I===void 0?0:I,y=typeof p=="function"?p({x:m,y:B}):{x:m,y:B};m=y.x,B=y.y;var O=l.hasOwnProperty("x"),j=l.hasOwnProperty("y"),x=pn,S=gn,P=window;if(f){var N=Ws(n),k="clientHeight",_="clientWidth";if(N===wn(n)&&(N=so(n),jr(N).position!=="static"&&u==="absolute"&&(k="scrollHeight",_="scrollWidth")),N=N,i===gn||(i===pn||i===Un)&&s===Hs){S=Wn;var X=C&&N===P&&P.visualViewport?P.visualViewport.height:N[k];B-=X-r.height,B*=A?1:-1}if(i===pn||(i===gn||i===Wn)&&s===Hs){x=Un;var G=C&&N===P&&P.visualViewport?P.visualViewport.width:N[_];m-=G-r.width,m*=A?1:-1}}var $=Object.assign({position:u},f&&_k),le=p===!0?Jk({x:m,y:B},wn(n)):{x:m,y:B};if(m=le.x,B=le.y,A){var se;return Object.assign({},$,(se={},se[S]=j?"0":"",se[x]=O?"0":"",se.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+B+"px)":"translate3d("+m+"px, "+B+"px, 0)",se))}return Object.assign({},$,(t={},t[S]=j?B+"px":"",t[x]=O?m+"px":"",t.transform="",t))}function Xk(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,l=s===void 0?!0:s,u=n.roundOffsets,A=u===void 0?!0:u,f={placement:Cr(t.placement),variation:Di(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,l0(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:A})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,l0(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Zk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Xk,data:{}};var Wl={passive:!0};function qk(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=i===void 0?!0:i,l=r.resize,u=l===void 0?!0:l,A=wn(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&f.forEach(function(p){p.addEventListener("scroll",n.update,Wl)}),u&&A.addEventListener("resize",n.update,Wl),function(){s&&f.forEach(function(p){p.removeEventListener("scroll",n.update,Wl)}),u&&A.removeEventListener("resize",n.update,Wl)}}const $k={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qk,data:{}};var e5={left:"right",right:"left",bottom:"top",top:"bottom"};function Ul(e){return e.replace(/left|right|bottom|top/g,function(t){return e5[t]})}var t5={start:"end",end:"start"};function c0(e){return e.replace(/start|end/g,function(t){return t5[t]})}function _d(e){var t=wn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Jd(e){return Mi(so(e)).left+_d(e).scrollLeft}function n5(e,t){var n=wn(e),r=so(e),i=n.visualViewport,s=r.clientWidth,l=r.clientHeight,u=0,A=0;if(i){s=i.width,l=i.height;var f=n0();(f||!f&&t==="fixed")&&(u=i.offsetLeft,A=i.offsetTop)}return{width:s,height:l,x:u+Jd(e),y:A}}function r5(e){var t,n=so(e),r=_d(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=Lo(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=Lo(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+Jd(e),A=-r.scrollTop;return jr(i||n).direction==="rtl"&&(u+=Lo(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:l,x:u,y:A}}function Xd(e){var t=jr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function u0(e){return["html","body","#document"].indexOf(hr(e))>=0?e.ownerDocument.body:Gn(e)&&Xd(e)?e:u0(zl(e))}function Gs(e,t){var n;t===void 0&&(t=[]);var r=u0(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=wn(r),l=i?[s].concat(s.visualViewport||[],Xd(r)?r:[]):r,u=t.concat(l);return i?u:u.concat(Gs(zl(l)))}function Zd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function o5(e,t){var n=Mi(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function A0(e,t,n){return t===$I?Zd(n5(e,n)):Fo(t)?o5(t,n):Zd(r5(so(e)))}function i5(e){var t=Gs(zl(e)),n=["absolute","fixed"].indexOf(jr(e).position)>=0,r=n&&Gn(e)?Ws(e):e;return Fo(r)?t.filter(function(i){return Fo(i)&&r0(i,r)&&hr(i)!=="body"}):[]}function s5(e,t,n,r){var i=t==="clippingParents"?i5(e):[].concat(t),s=[].concat(i,[n]),l=s[0],u=s.reduce(function(A,f){var p=A0(e,f,r);return A.top=Lo(p.top,A.top),A.right=Hl(p.right,A.right),A.bottom=Hl(p.bottom,A.bottom),A.left=Lo(p.left,A.left),A},A0(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function d0(e){var t=e.reference,n=e.element,r=e.placement,i=r?Cr(r):null,s=r?Di(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,A;switch(i){case gn:A={x:l,y:t.y-n.height};break;case Wn:A={x:l,y:t.y+t.height};break;case Un:A={x:t.x+t.width,y:u};break;case pn:A={x:t.x-n.width,y:u};break;default:A={x:t.x,y:t.y}}var f=i?Kd(i):null;if(f!=null){var p=f==="y"?"height":"width";switch(s){case Si:A[f]=A[f]-(t[p]/2-n[p]/2);break;case Hs:A[f]=A[f]+(t[p]/2-n[p]/2);break}}return A}function Ys(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,s=n.strategy,l=s===void 0?e.strategy:s,u=n.boundary,A=u===void 0?xk:u,f=n.rootBoundary,p=f===void 0?$I:f,C=n.elementContext,h=C===void 0?zs:C,m=n.altBoundary,I=m===void 0?!1:m,B=n.padding,y=B===void 0?0:B,O=s0(typeof y!="number"?y:a0(y,Vs)),j=h===zs?wk:zs,x=e.rects.popper,S=e.elements[I?j:h],P=s5(Fo(S)?S:S.contextElement||so(e.elements.popper),A,p,l),N=Mi(e.elements.reference),k=d0({reference:N,element:x,strategy:"absolute",placement:i}),_=Zd(Object.assign({},x,k)),X=h===zs?_:N,G={top:P.top-X.top+O.top,bottom:X.bottom-P.bottom+O.bottom,left:P.left-X.left+O.left,right:X.right-P.right+O.right},$=e.modifiersData.offset;if(h===zs&&$){var le=$[i];Object.keys(G).forEach(function(se){var q=[Un,Wn].indexOf(se)>=0?1:-1,K=[gn,Wn].indexOf(se)>=0?"y":"x";G[se]+=le[K]*q})}return G}function a5(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,s=n.rootBoundary,l=n.padding,u=n.flipVariations,A=n.allowedAutoPlacements,f=A===void 0?t0:A,p=Di(r),C=p?u?e0:e0.filter(function(I){return Di(I)===p}):Vs,h=C.filter(function(I){return f.indexOf(I)>=0});h.length===0&&(h=C);var m=h.reduce(function(I,B){return I[B]=Ys(e,{placement:B,boundary:i,rootBoundary:s,padding:l})[Cr(B)],I},{});return Object.keys(m).sort(function(I,B){return m[I]-m[B]})}function l5(e){if(Cr(e)===Wd)return[];var t=Ul(e);return[c0(e),t,c0(t)]}function c5(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!0:l,A=n.fallbackPlacements,f=n.padding,p=n.boundary,C=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,I=m===void 0?!0:m,B=n.allowedAutoPlacements,y=t.options.placement,O=Cr(y),j=O===y,x=A||(j||!I?[Ul(y)]:l5(y)),S=[y].concat(x).reduce(function(ce,Ae){return ce.concat(Cr(Ae)===Wd?a5(t,{placement:Ae,boundary:p,rootBoundary:C,padding:f,flipVariations:I,allowedAutoPlacements:B}):Ae)},[]),P=t.rects.reference,N=t.rects.popper,k=new Map,_=!0,X=S[0],G=0;G<S.length;G++){var $=S[G],le=Cr($),se=Di($)===Si,q=[gn,Wn].indexOf(le)>=0,K=q?"width":"height",z=Ys(t,{placement:$,boundary:p,rootBoundary:C,altBoundary:h,padding:f}),Z=q?se?Un:pn:se?Wn:gn;P[K]>N[K]&&(Z=Ul(Z));var F=Ul(Z),te=[];if(s&&te.push(z[le]<=0),u&&te.push(z[Z]<=0,z[F]<=0),te.every(function(ce){return ce})){X=$,_=!1;break}k.set($,te)}if(_)for(var W=I?3:1,J=function(Ae){var pe=S.find(function(Ie){var Ee=k.get(Ie);if(Ee)return Ee.slice(0,Ae).every(function(he){return he})});if(pe)return X=pe,"break"},de=W;de>0;de--){var ge=J(de);if(ge==="break")break}t.placement!==X&&(t.modifiersData[r]._skip=!0,t.placement=X,t.reset=!0)}}const u5={name:"flip",enabled:!0,phase:"main",fn:c5,requiresIfExists:["offset"],data:{_skip:!1}};function f0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function g0(e){return[gn,Un,Wn,pn].some(function(t){return e[t]>=0})}function A5(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,l=Ys(t,{elementContext:"reference"}),u=Ys(t,{altBoundary:!0}),A=f0(l,r),f=f0(u,i,s),p=g0(A),C=g0(f);t.modifiersData[n]={referenceClippingOffsets:A,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:C},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":C})}const d5={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:A5};function f5(e,t,n){var r=Cr(e),i=[pn,gn].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=s[0],u=s[1];return l=l||0,u=(u||0)*i,[pn,Un].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function g5(e){var t=e.state,n=e.options,r=e.name,i=n.offset,s=i===void 0?[0,0]:i,l=t0.reduce(function(p,C){return p[C]=f5(C,t.rects,s),p},{}),u=l[t.placement],A=u.x,f=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=A,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=l}const p5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:g5};function h5(e){var t=e.state,n=e.name;t.modifiersData[n]=d0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const C5={name:"popperOffsets",enabled:!0,phase:"read",fn:h5,data:{}};function E5(e){return e==="x"?"y":"x"}function m5(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,s=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!1:l,A=n.boundary,f=n.rootBoundary,p=n.altBoundary,C=n.padding,h=n.tether,m=h===void 0?!0:h,I=n.tetherOffset,B=I===void 0?0:I,y=Ys(t,{boundary:A,rootBoundary:f,padding:C,altBoundary:p}),O=Cr(t.placement),j=Di(t.placement),x=!j,S=Kd(O),P=E5(S),N=t.modifiersData.popperOffsets,k=t.rects.reference,_=t.rects.popper,X=typeof B=="function"?B(Object.assign({},t.rects,{placement:t.placement})):B,G=typeof X=="number"?{mainAxis:X,altAxis:X}:Object.assign({mainAxis:0,altAxis:0},X),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(N){if(s){var se,q=S==="y"?gn:pn,K=S==="y"?Wn:Un,z=S==="y"?"height":"width",Z=N[S],F=Z+y[q],te=Z-y[K],W=m?-_[z]/2:0,J=j===Si?k[z]:_[z],de=j===Si?-_[z]:-k[z],ge=t.elements.arrow,ce=m&&ge?Yd(ge):{width:0,height:0},Ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:i0(),pe=Ae[q],Ie=Ae[K],Ee=Us(0,k[z],ce[z]),he=x?k[z]/2-W-Ee-pe-G.mainAxis:J-Ee-pe-G.mainAxis,me=x?-k[z]/2+W+Ee+Ie+G.mainAxis:de+Ee+Ie+G.mainAxis,xe=t.elements.arrow&&Ws(t.elements.arrow),ae=xe?S==="y"?xe.clientTop||0:xe.clientLeft||0:0,We=(se=$==null?void 0:$[S])!=null?se:0,fe=Z+he-We-ae,ut=Z+me-We,zt=Us(m?Hl(F,fe):F,Z,m?Lo(te,ut):te);N[S]=zt,le[S]=zt-Z}if(u){var Et,Tt=S==="x"?gn:pn,mr=S==="x"?Wn:Un,yt=N[P],mt=P==="y"?"height":"width",dt=yt+y[Tt],Lt=yt-y[mr],Nt=[gn,pn].indexOf(O)!==-1,Oe=(Et=$==null?void 0:$[P])!=null?Et:0,Fe=Nt?dt:yt-k[mt]-_[mt]-Oe+G.altAxis,we=Nt?yt+k[mt]+_[mt]-Oe-G.altAxis:Lt,Ue=m&&Nt?Wk(Fe,yt,we):Us(m?Fe:dt,yt,m?we:Lt);N[P]=Ue,le[P]=Ue-yt}t.modifiersData[r]=le}}const I5={name:"preventOverflow",enabled:!0,phase:"main",fn:m5,requiresIfExists:["offset"]};function B5(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function v5(e){return e===wn(e)||!Gn(e)?_d(e):B5(e)}function y5(e){var t=e.getBoundingClientRect(),n=Oi(t.width)/e.offsetWidth||1,r=Oi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function b5(e,t,n){n===void 0&&(n=!1);var r=Gn(t),i=Gn(t)&&y5(t),s=so(t),l=Mi(e,i,n),u={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(r||!r&&!n)&&((hr(t)!=="body"||Xd(s))&&(u=v5(t)),Gn(t)?(A=Mi(t,!0),A.x+=t.clientLeft,A.y+=t.clientTop):s&&(A.x=Jd(s))),{x:l.left+u.scrollLeft-A.x,y:l.top+u.scrollTop-A.y,width:l.width,height:l.height}}function Q5(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function i(s){n.add(s.name);var l=[].concat(s.requires||[],s.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var A=t.get(u);A&&i(A)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||i(s)}),r}function x5(e){var t=Q5(e);return Fk.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function w5(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function T5(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var p0={placement:"bottom",modifiers:[],strategy:"absolute"};function h0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function P5(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,s=i===void 0?p0:i;return function(u,A,f){f===void 0&&(f=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},p0,s),modifiersData:{},elements:{reference:u,popper:A},attributes:{},styles:{}},C=[],h=!1,m={state:p,setOptions:function(O){var j=typeof O=="function"?O(p.options):O;B(),p.options=Object.assign({},s,p.options,j),p.scrollParents={reference:Fo(u)?Gs(u):u.contextElement?Gs(u.contextElement):[],popper:Gs(A)};var x=x5(T5([].concat(r,p.options.modifiers)));return p.orderedModifiers=x.filter(function(S){return S.enabled}),I(),m.update()},forceUpdate:function(){if(!h){var O=p.elements,j=O.reference,x=O.popper;if(h0(j,x)){p.rects={reference:b5(j,Ws(x),p.options.strategy==="fixed"),popper:Yd(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(G){return p.modifiersData[G.name]=Object.assign({},G.data)});for(var S=0;S<p.orderedModifiers.length;S++){if(p.reset===!0){p.reset=!1,S=-1;continue}var P=p.orderedModifiers[S],N=P.fn,k=P.options,_=k===void 0?{}:k,X=P.name;typeof N=="function"&&(p=N({state:p,options:_,name:X,instance:m})||p)}}}},update:w5(function(){return new Promise(function(y){m.forceUpdate(),y(p)})}),destroy:function(){B(),h=!0}};if(!h0(u,A))return m;m.setOptions(f).then(function(y){!h&&f.onFirstUpdate&&f.onFirstUpdate(y)});function I(){p.orderedModifiers.forEach(function(y){var O=y.name,j=y.options,x=j===void 0?{}:j,S=y.effect;if(typeof S=="function"){var P=S({state:p,name:O,instance:m,options:x}),N=function(){};C.push(P||N)}})}function B(){C.forEach(function(y){return y()}),C=[]}return m}}var S5=[$k,C5,Zk,Vk,p5,u5,I5,Kk,d5],O5=P5({defaultModifiers:S5});function M5(e){return Ht("MuiPopper",e)}Yt("MuiPopper",["root"]);const D5=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],R5=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function j5(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Gl(e){return typeof e=="function"?e():e}function Yl(e){return e.nodeType!==void 0}function k5(e){return!Yl(e)}const F5=()=>dn({root:["root"]},Nj(M5)),L5={},N5=V.forwardRef(function(t,n){var r;const{anchorEl:i,children:s,direction:l,disablePortal:u,modifiers:A,open:f,placement:p,popperOptions:C,popperRef:h,slotProps:m={},slots:I={},TransitionProps:B}=t,y=_e(t,D5),O=V.useRef(null),j=yn(O,n),x=V.useRef(null),S=yn(x,h),P=V.useRef(S);ii(()=>{P.current=S},[S]),V.useImperativeHandle(h,()=>x.current,[]);const N=j5(p,l),[k,_]=V.useState(N),[X,G]=V.useState(Gl(i));V.useEffect(()=>{x.current&&x.current.forceUpdate()}),V.useEffect(()=>{i&&G(Gl(i))},[i]),ii(()=>{if(!X||!f)return;const K=F=>{_(F.placement)};if(process.env.NODE_ENV!=="production"&&X&&Yl(X)&&X.nodeType===1){const F=X.getBoundingClientRect();process.env.NODE_ENV!=="test"&&F.top===0&&F.left===0&&F.right===0&&F.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
@@ -262,5 +262,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
262
262
|
`),m2)),x2=ue("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Te(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>U({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:gf(t,e.color),transition:`transform .${ff}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Gt.css(ov||(ov=Li`
|
|
263
263
|
width: auto;
|
|
264
264
|
animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
265
|
-
`),I2)),iv=V.forwardRef(function(t,n){const r=Kt({props:t,name:"MuiLinearProgress"}),{className:i,color:s="primary",value:l,valueBuffer:u,variant:A="indeterminate"}=r,f=_e(r,E2),p=U({},r,{color:s,variant:A}),C=v2(p),h=xt(),m={},I={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(l!==void 0){m["aria-valuenow"]=Math.round(l),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let B=l-100;h.direction==="rtl"&&(B=-B),I.bar1.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(A==="buffer")if(u!==void 0){let B=(u||0)-100;h.direction==="rtl"&&(B=-B),I.bar2.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return g.jsxs(y2,U({className:Ze(C.root,i),ownerState:p,role:"progressbar"},m,{ref:n},f,{children:[A==="buffer"?g.jsx(b2,{className:C.dashed,ownerState:p}):null,g.jsx(Q2,{className:C.bar1,ownerState:p,style:I.bar1}),A==="determinate"?null:g.jsx(x2,{className:C.bar2,ownerState:p,style:I.bar2})]}))});process.env.NODE_ENV!=="production"&&(iv.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.number,valueBuffer:c.number,variant:c.oneOf(["buffer","determinate","indeterminate","query"])});const w2=iv,T2=ue("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),sv=()=>g.jsx(T2,{children:g.jsx(w2,{color:"primary"})}),P2=e=>t=>g.jsx(T.Suspense,{fallback:g.jsx(sv,{}),children:g.jsx(e,{...t})}),rc=({title:e})=>g.jsxs(b.Stack,{direction:"row",children:[g.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",g.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]});rc.propTypes={title:c.string.isRequired};const av=ue(M.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),pf=({children:e})=>{const t=Qt.useLocation(),{pathname:n}=t;return T.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};pf.propTypes={children:c.node};const S2=ue("div")({width:"100%",overflowX:"auto",display:"block"}),hf=({title:e})=>g.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});hf.propTypes={title:c.string.isRequired};const Cf=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(i=>i.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},O2=(e,t)=>e&&e.data?{data:Cf(e.data,t),total:e.total+1}:e,M2=(e,t)=>e&&e.length>0?Cf(e,t):e,D2=(e,t)=>e&&e.data?{...e,data:Cf(e.data,t),total:e.total+1}:e,Ef=({onClose:e,record:t,children:n,redirect:r,onSubmit:i,onSuccess:s,onError:l})=>{const u=au.useQueryClient(),A=M.useResourceContext(),f=M.useRedirect(),p=M.useNotify(),C=T.useCallback(B=>{const O=Date.now();u.setQueryData([A,"getOne",{id:B.id}],B),u.setQueriesData([A,"getList"],j=>D2(j,B),{updatedAt:O}),u.setQueriesData([A,"getMany"],j=>M2(j,B),{updatedAt:O}),u.setQueriesData([A,"getManyReference"],j=>O2(j,B),{updatedAt:O}),e(),p("ra.notification.created"),r!==void 0&&f(r,A,B.id,B),s&&s(B)},[e,s,u,A,p,f,r]),{save:h,...m}=M.useCreateController({mutationOptions:{onSuccess:C,onError:l}}),I=T.useCallback(B=>{i?i(B,e):h&&h(B)},[i,h,e]);return g.jsx(M.CreateContextProvider,{value:{record:t,save:I,saving:m==null?void 0:m.saving,redirect:r},children:T.cloneElement(n,{...n.props,toolbar:g.jsxs(Dr,{children:[g.jsx(M.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:m==null?void 0:m.saving}),g.jsx(M.SaveButton,{disabled:m==null?void 0:m.saving})]})})})};Ef.propTypes={children:c.node,onClose:c.func,record:c.object,redirect:c.oneOf(["list","edit","show",!1])},Ef.defaultProps={redirect:!1};const R2={true:{_scrollToTop:!0},false:{}},j2=ue(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${M.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),mf=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:i,scrollToTop:s,className:l,sx:u,onSubmit:A,onSuccess:f,onError:p,...C})=>{const[h,m]=T.useState(!1),I=M.useTranslate(),B=M.useResourceContext(),{openDialog:y,closeDialog:O}=xo(),j=T.useCallback(()=>y(B,()=>m(!0)),[y,B]),x=T.useCallback(()=>O(B,()=>m(!1)),[O,B]),S=b.useMediaQuery(P=>P.breakpoints.down("md"));return g.jsxs(g.Fragment,{children:[S?g.jsx(j2,{...C,state:R2[String(s)],color:"primary",className:Ze(M.CreateButtonClasses.floating,l),"aria-label":n&&I(n),onClick:j,children:g.jsx(An.Add,{})}):g.jsx(M.Button,{...C,sx:u,label:n,onClick:j,children:g.jsx(An.Add,{})}),g.jsx(b.Dialog,{open:h,onClose:x,fullWidth:e,maxWidth:t,children:g.jsx(Ef,{...C,redirect:i,record:r,onClose:x,onSubmit:A,onSuccess:f,onError:p})})]})};mf.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},mf.propTypes={...M.Button.propTypes,redirect:c.oneOf(["list","edit","show",!1]),fullWidth:c.bool,maxWidth:c.oneOf(["xs","sm","md","lg","xl",!1]),label:c.string,record:c.object,scrollToTop:c.bool,className:c.string,sx:c.object,children:c.node,onSubmit:c.func,onSuccess:c.func,onError:c.func};const lv=({onClose:e,children:t})=>{const n=M.useNotify(),r=M.useRecordContext(),i=M.useResourceContext(),{id:s}=r,{isLoading:l,data:u}=M.useGetOne(i,{id:s}),A=T.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:f,saving:p}=M.useEditController({resource:i,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return g.jsx(M.EditContextProvider,{value:{record:u,isLoading:l,save:f,saving:p},children:T.cloneElement(t,{toolbar:g.jsxs(Dr,{children:[g.jsx(M.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),g.jsx(M.SaveButton,{})]})})})};lv.propTypes={children:c.node,onClose:c.func};const If=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[i,s]=T.useState(!1),{openDialog:l,closeDialog:u}=xo(),A=M.useResourceContext(),f=T.useCallback(()=>l(A,()=>s(!0)),[l,A]),p=T.useCallback(()=>u(A,()=>s(!1)),[u,A]);return g.jsxs(g.Fragment,{children:[g.jsx(M.Button,{label:n,onClick:f,children:g.jsx(An.Edit,{})}),g.jsx(b.Dialog,{open:i,onClose:p,fullWidth:e,maxWidth:t,children:g.jsx(lv,{...r,onClose:p})})]})};If.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},If.propTypes={fullWidth:c.bool,maxWidth:c.oneOf(["xs","sm","md","lg","xl",!1]),label:c.string};const cv=({label:e="ra.auth.sign_in",...t})=>{const n=M.useRecordContext(),[r,i]=T.useState(!1),s=M.useAuthProvider(),l=T.useCallback(u=>{u.stopPropagation(),u.preventDefault(),i(!0),s.impersonate(n==null?void 0:n.id).then(()=>{i(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return g.jsx(M.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:l,...t,children:g.jsx(An.VpnKey,{})})};cv.propTypes={label:c.string};const k2=ue(M.Datagrid,{name:"ApplicaDatagrid",slot:"root"})(()=>({"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Bf=e=>g.jsx(k2,{...e});Bf.propTypes={...M.Datagrid.propTypes},Bf.defaultProps={...M.Datagrid.defaultProps};const F2=ue("div")(({theme:e})=>({padding:e.spacing(2)})),uv=({actions:e,className:t,...n})=>{const{hasCreate:r}=be.useResourceDefinition(n),i=be.useResourceContext(n),s=be.useTranslate(),l=be.useGetResourceLabel(),u=s(`resources.${i}.forcedCaseName`,{smart_count:0,_:l(i,0)}),A=s("ra.page.empty",{name:u}),f=s("ra.page.invite");return g.jsxs(L2,{className:t,children:[g.jsxs("div",{className:Ni.message,children:[g.jsx(An.Inbox,{className:Ni.icon}),g.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${i}.empty`,{_:A})}),r&&g.jsx(b.Typography,{variant:"body1",children:s(`resources.${i}.invite`,{_:f})})]}),g.jsx(F2,{className:Ni.toolbar,children:e})]})},oc="ApplicaEmpty",Ni={message:`${oc}-message`,icon:`${oc}-icon`,toolbar:`${oc}-toolbar`},L2=ue("span",{name:oc,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Ni.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Ni.icon}`]:{width:"9em",height:"9em"},[`& .${Ni.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));uv.propTypes={actions:c.element,className:c.string};const N2=fs(M.List,{name:"RaApplicaList",slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"},"& .MuiButton-root":{margin:e.spacing(2)}},"& .RaList-actions":{padding:e.spacing(2),paddingTop:e.spacing(1),alignItems:"center","& form":{alignItems:"center"},"& .RaFilterForm-filterFormInput":{"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},marginTop:e.spacing(1.5)},"& .RaFilterFormInput-hideButton":{marginBottom:e.spacing(.5),marginRight:e.spacing(1)},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"flex-end",minHeight:"fit-content"}},"& .RaList-content":{"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}})),Av=e=>g.jsx(or,{content:!1,children:g.jsx(N2,{...e})});Av.propTypes={...M.List.propTypes};const V2=()=>{const e=M.useRefresh(),t=M.useNotify(),n=M.useUnselectAll(),r=M.useResourceContext(),{selectedIds:i,data:s}=M.useListContext(),l=M.useRecordContext(),u=i.map(C=>s.find(h=>h.id===C)),[A,{isLoading:f}]=M.useUpdateMany(r,{ids:i.length>0?i:[l==null?void 0:l.id],data:{readed:Rr().format("YYYY-MM-DD HH:mm:ss")},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),n(r)},onError:()=>t("ra.notification.readed_error","warning"),onFailure:()=>t("ra.notification.readed_error","warning")}),p=T.useCallback(()=>{A()},[A]);return g.jsx(M.Button,{label:"ra.notification.mark_as_readed",disabled:f||(l==null?void 0:l.readed)!==null,onClick:p,children:g.jsx(An.Email,{})})},H2=()=>{const e=M.useRefresh(),t=M.useNotify(),n=M.useUnselectAll(),{selectedIds:r,data:i}=M.useListContext(),s=M.useRecordContext(),l=M.useResourceContext(),u=r.map(C=>i.find(h=>h.id===C)).concat([s]),[A,{isLoading:f}]=M.useUpdateMany(l,{ids:r.length>0?r:[s==null?void 0:s.id],data:{readed:null},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),n("notifications")},onFailure:()=>t("resources.notifications.messages.unreaded.error","warning")}),p=T.useCallback(()=>{A()},[A]);return g.jsx(M.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:f||s&&!(s!=null&&s.readed),onClick:p,children:g.jsx(An.Drafts,{})})},z2=e=>{const t=M.useRecordContext(e),n=M.useResourceContext(e),r=M.useRedirect(),i=M.useNotify(),s=M.useTranslate(),[l]=M.useLocaleState(),u=T.useMemo(()=>t!=null&&t.readed?Rr(t==null?void 0:t.readed).locale(l).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,l]),[A]=M.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Rr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onFailure:()=>{i("ra.notification.readed_error","warning")}}),f=T.useCallback(()=>A(),[A]);return g.jsxs("div",{onClick:f,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[g.jsx(b.Typography,{variant:"subtitle1",children:g.jsxs(b.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),g.jsx(b.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),u&&g.jsx(b.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:u})})]})},W2=({...e})=>{const t=b.useTheme(),{mode:n,colorize:r,density:i}=T.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?b.darken:b.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]),s=T.useCallback(l=>({backgroundColor:l!=null&&l.readed?r(t.palette.primary[n],i):r(t.palette.secondary[n],i)}),[t,n,r,i]);return g.jsxs(M.Datagrid,{...e,rowStyle:s,children:[g.jsx(z2,{source:"notification",sortable:!1,label:"ra.notification"}),g.jsx(Tl,{source:"created",label:"ra.notification.created"}),g.jsxs(di,{children:[g.jsx(V2,{}),g.jsx(H2,{})]})]})},ic={width:"1.5rem",alignSelf:"center"},vf=({source:e,label:t,variant:n,record:r,spaceBottom:i,spaceTop:s,component:l,leftIcon:u,rightIcon:A,button:f,buttonProps:p,...C})=>{const{getCurrentDialog:h}=xo(),m=be.useResourceContext(C),I=h(),B=be.useRecordContext(),y=r||B,O=at.get(y,e||"");return g.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:j=>({pt:1,pb:1,borderBottom:`1px solid ${j.palette.divider}`,...i&&{mb:2},...s&&{mt:2}}),children:[g.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[u&&(T.isValidElement(u)?T.cloneElement(u,{style:ic}):T.createElement(u,{style:ic})),g.jsx(be.FieldTitle,{label:t,source:e,resource:I||m})]}),g.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[l?T.isValidElement(l)?T.cloneElement(l,{record:y,resource:m,value:O}):T.createElement(l,{source:e,record:y,resource:m,value:O}):g.jsx(b.Typography,{variant:n,children:O}),A&&(T.isValidElement(A)?T.cloneElement(A,{style:ic}):T.createElement(A,{style:ic})),f&&g.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:f})]})]})};vf.propTypes={source:c.string,label:c.string,record:c.object,variant:c.oneOf(["body1","body2","caption","button","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),spaceTop:c.bool,spaceBottom:c.bool,leftIcon:c.oneOfType([c.elementType,c.element,c.func]),rightIcon:c.oneOfType([c.elementType,c.element,c.func]),component:c.oneOfType([c.elementType,c.element,c.func]),buttonProps:c.object,button:c.string},vf.defaultProps={variant:"body1"};const dv=()=>{const e=Gt.useTheme(),n=e.palette.mode==="dark"?e.palette.primary.dark:e.palette.primary.light;return g.jsx(b.Box,{sx:{position:"absolute",filter:"blur(20px)",bottom:0,p:4,pb:8},children:g.jsxs("svg",{width:"100%",height:"calc(100vh - 175px)",viewBox:"0 0 117 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M15.7523 21.9601L14.0526 17.2379H4.6534L2.95369 21.9601H0L7.78722 0.903564H10.9187L18.706 21.9601H15.7523ZM5.60948 14.6207H13.0988L9.33912 4.24262L5.60948 14.6207Z",fill:n}),g.jsx("path",{d:"M33.592 8.8437C35.0538 10.3782 35.7997 12.2433 35.7997 14.4391C35.7997 16.6348 35.0538 18.5302 33.592 20.0647C32.1301 21.5992 30.3404 22.3513 28.2504 22.3513C25.7747 22.3513 23.8949 21.3593 22.6109 19.3731V27.9769H20.0151V6.91804H22.6109V9.505C23.8949 7.51879 25.7724 6.52686 28.2504 6.52686C30.3381 6.52686 32.1301 7.30923 33.592 8.8437ZM31.6821 18.2881C32.6959 17.2356 33.204 15.9712 33.204 14.4367C33.204 12.9023 32.6959 11.6402 31.6821 10.6157C30.6683 9.56321 29.4143 9.05094 27.9224 9.05094C26.4306 9.05094 25.1489 9.56321 24.1328 10.6157C23.1189 11.6379 22.6109 12.9023 22.6109 14.4367C22.6109 15.9712 23.1189 17.2333 24.1328 18.2881C25.1466 19.3103 26.4006 19.8225 27.9224 19.8225C29.4443 19.8225 30.6683 19.3103 31.6821 18.2881Z",fill:n}),g.jsx("path",{d:"M51.5798 8.8437C53.0416 10.3782 53.7875 12.2433 53.7875 14.4391C53.7875 16.6348 53.0416 18.5302 51.5798 20.0647C50.1179 21.5992 48.3282 22.3513 46.2382 22.3513C43.7625 22.3513 41.8827 21.3593 40.5987 19.3731V27.9769H38.0029V6.91804H40.5987V9.505C41.8827 7.51879 43.7602 6.52686 46.2382 6.52686C48.3258 6.52686 50.1179 7.30923 51.5798 8.8437ZM49.6699 18.2881C50.6837 17.2356 51.1918 15.9712 51.1918 14.4367C51.1918 12.9023 50.6837 11.6402 49.6699 10.6157C48.6561 9.56321 47.4021 9.05094 45.9102 9.05094C44.4184 9.05094 43.1367 9.56321 42.1206 10.6157C41.1067 11.6379 40.5987 12.9023 40.5987 14.4367C40.5987 15.9712 41.1067 17.2333 42.1206 18.2881C43.1344 19.3103 44.3884 19.8225 45.9102 19.8225C47.4321 19.8225 48.6561 19.3103 49.6699 18.2881Z",fill:n}),g.jsx("path",{d:"M55.5449 21.96V0H58.1407V21.96H55.5449Z",fill:n}),g.jsx("path",{d:"M60.3188 2.43569C60.3188 1.47402 61.0948 0.661377 62.0786 0.661377C63.0624 0.661377 63.8083 1.47402 63.8083 2.43569C63.8083 3.39736 63.0324 4.17973 62.0786 4.17973C61.1248 4.17973 60.3188 3.39736 60.3188 2.43569ZM60.7669 21.9578V6.91803H63.3626V21.9578H60.7669Z",fill:n}),g.jsx("path",{d:"M67.8354 20.095C66.3436 18.5605 65.5977 16.6954 65.5977 14.4391C65.5977 12.1828 66.3436 10.3176 67.8354 8.81343C69.3273 7.27896 71.2071 6.52686 73.4449 6.52686C76.3986 6.52686 78.8743 8.06133 80.0382 10.4667L77.8605 11.731C77.1145 10.136 75.4425 9.08354 73.4449 9.08354C71.9531 9.08354 70.6991 9.59581 69.6853 10.618C68.7015 11.6402 68.1934 12.9046 68.1934 14.4391C68.1934 15.9735 68.7015 17.2076 69.6853 18.2299C70.6991 19.2521 71.9531 19.7643 73.4449 19.7643C75.4448 19.7643 77.1145 18.7421 77.9505 17.1471L80.1583 18.4394C78.8766 20.8168 76.3386 22.349 73.4449 22.349C71.2071 22.349 69.3273 21.5969 67.8354 20.0927V20.095Z",fill:n}),g.jsx("path",{d:"M94.2686 6.91793H96.8643V21.9577H94.2686V19.3707C92.9869 21.3569 91.107 22.3488 88.6314 22.3488C86.5437 22.3488 84.7516 21.5967 83.2898 20.0623C81.828 18.5278 81.082 16.6324 81.082 14.4366C81.082 12.2409 81.828 10.3757 83.2898 8.84126C84.7516 7.30679 86.5414 6.52441 88.6314 6.52441C91.107 6.52441 92.9869 7.51635 94.2686 9.50256V6.9156V6.91793ZM92.7467 18.288C93.7605 17.2355 94.2686 15.9711 94.2686 14.4366C94.2686 12.9022 93.7605 11.6401 92.7467 10.6156C91.7329 9.5631 90.4789 9.05083 88.957 9.05083C87.4351 9.05083 86.2112 9.5631 85.1973 10.6156C84.1835 11.6378 83.6755 12.9022 83.6755 14.4366C83.6755 15.9711 84.1835 17.2331 85.1973 18.288C86.2112 19.3102 87.4652 19.8224 88.957 19.8224C90.4489 19.8224 91.7306 19.3102 92.7467 18.288Z",fill:n}),g.jsx("path",{d:"M0.836162 48.9264L3.22406 47.5432C4.03003 50.0999 5.90986 51.3643 8.80351 51.3643C11.6972 51.3643 13.219 50.072 13.219 48.116C13.219 47.1241 12.8311 46.372 12.0851 45.8597C11.3392 45.3475 10.0575 44.8375 8.29545 44.2647L6.29553 43.6034C5.84751 43.4218 5.25169 43.1517 4.56581 42.8211C3.87992 42.4601 3.37186 42.0992 3.04393 41.7383C2.35804 40.9862 1.72989 39.7521 1.72989 38.22C1.72989 36.3851 2.35573 34.9414 3.63975 33.889C4.92376 32.8062 6.47335 32.2637 8.29314 32.2637C11.6048 32.2637 14.1405 34.0985 15.3645 36.8648L13.0366 38.2176C12.1406 36.0521 10.561 34.9694 8.29314 34.9694C6.02533 34.9694 4.50345 36.1732 4.50345 38.0989C4.50345 39.0303 4.83139 39.7242 5.48725 40.2038C6.14311 40.6858 7.27702 41.1958 8.88896 41.708L10.1129 42.0992C10.3508 42.19 10.7088 42.3088 11.2168 42.5207C12.2607 42.9119 12.5008 43.0609 13.3045 43.5126C14.1405 43.9643 14.4084 44.295 14.9164 44.8957C15.6624 45.6478 15.9603 46.7306 15.9603 48.0532C15.9603 49.888 15.3044 51.362 13.9604 52.475C12.6186 53.5577 10.8866 54.1003 8.73885 54.1003C4.83139 54.1003 1.93773 52.1443 0.831543 48.9264H0.836162Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M25.089 54.1001C22.9112 54.1001 21.0314 53.348 19.5095 51.8135C17.9876 50.279 17.2417 48.4139 17.2417 46.1878C17.2417 43.9618 17.9876 42.0967 19.5095 40.5622C21.0314 39.0277 22.9112 38.2756 25.089 38.2756C27.2667 38.2756 29.1465 39.0277 30.6684 40.5622C32.1903 42.0967 32.9663 43.9618 32.9663 46.1878C32.9663 48.4139 32.1903 50.279 30.6684 51.8135C29.1465 53.348 27.2667 54.1001 25.089 54.1001ZM28.8486 50.0089C29.8624 48.9867 30.3705 47.7223 30.3705 46.1878C30.3705 44.6534 29.8624 43.3913 28.8486 42.3668C27.8348 41.3446 26.5808 40.8323 25.089 40.8323C23.5971 40.8323 22.3731 41.3446 21.3593 42.3668C20.3455 43.389 19.8374 44.6534 19.8374 46.1878C19.8374 47.7223 20.3455 48.9844 21.3593 50.0089C22.3731 51.0311 23.6271 51.5434 25.089 51.5434C26.5508 51.5434 27.8348 51.0311 28.8486 50.0089Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M42.5409 34.7877C39.9151 34.5782 38.6034 35.7215 38.6034 38.2176V38.6693H42.5409V41.1958H38.6034V53.7091H36.0077V41.1958H33.6221V38.6693H36.0077V38.2176C36.0077 34.1567 38.3355 31.9912 42.5409 32.2613V34.7877Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M52.7718 41.1958H48.8043V49.3478C48.8043 51.6647 50.116 51.4831 52.7718 51.3643V53.7114C48.2362 54.3122 46.2086 53.0804 46.2086 49.3502V41.1981H43.2549V38.6717H46.2086V35.2418L48.8043 34.4595V38.6717H52.7718V41.1981V41.1958Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M72.9095 38.6692H75.6254L71.002 53.7089H68.3462L64.8544 42.5787L61.3627 53.7089H58.7069L54.0835 38.6692H56.797L60.0786 50.0998L63.5981 38.6692H66.1038L69.6233 50.13L72.9049 38.6692H72.9095Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M88.5694 38.6692H91.1651V53.7089H88.5694V51.1219C87.2876 53.1081 85.4078 54.1001 82.9322 54.1001C80.8445 54.1001 79.0524 53.348 77.5906 51.8135C76.1287 50.279 75.3828 48.3836 75.3828 46.1878C75.3828 43.9921 76.1287 42.127 77.5906 40.5925C79.0524 39.058 80.8422 38.2756 82.9322 38.2756C85.4078 38.2756 87.2876 39.2676 88.5694 41.2538V38.6668V38.6692ZM87.0475 50.0392C88.0613 48.9867 88.5694 47.7223 88.5694 46.1878C88.5694 44.6534 88.0613 43.3913 87.0475 42.3668C86.0337 41.3143 84.7797 40.802 83.2578 40.802C81.7359 40.802 80.5119 41.3143 79.4981 42.3668C78.4843 43.389 77.9762 44.6534 77.9762 46.1878C77.9762 47.7223 78.4843 48.9844 79.4981 50.0392C80.5119 51.0614 81.7659 51.5737 83.2578 51.5737C84.7496 51.5737 86.0313 51.0614 87.0475 50.0392Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M96.8023 41.1957C97.6683 39.3306 99.2202 38.3992 101.456 38.3992V41.1375C100.172 41.0769 99.0978 41.4076 98.1741 42.1597C97.2503 42.9118 96.8023 44.0853 96.8023 45.7386V53.709H94.2065V38.6693H96.8023V41.1957Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M104.409 47.3918C104.917 50.0696 106.975 51.6343 109.809 51.6343C111.778 51.6343 113.21 50.9125 114.104 49.4385L116.312 50.7029C114.85 52.9592 112.672 54.1025 109.748 54.1025C107.391 54.1025 105.453 53.3504 103.961 51.8765C102.499 50.3723 101.753 48.4769 101.753 46.1903C101.753 43.9037 102.469 42.0386 103.931 40.5344C105.393 39.0302 107.273 38.2781 109.568 38.2781C111.746 38.2781 113.536 39.0604 114.91 40.6252C116.312 42.1597 116.998 44.0248 116.998 46.2206C116.998 46.6117 116.968 47.0029 116.908 47.3941H104.407L104.409 47.3918ZM104.409 45.1052H114.374C113.926 42.2482 111.956 40.7439 109.571 40.7439C106.797 40.7439 104.857 42.4577 104.409 45.1052Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M22.1377 69.1726V70.4369C22.1377 73.1752 21.2116 75.4595 19.3341 77.2943C17.4542 79.0989 14.9786 80.0024 11.9048 80.0024C8.83102 80.0024 6.08748 78.9499 3.99749 76.8449C1.93983 74.7097 0.895996 72.1228 0.895996 69.0841C0.895996 66.0454 1.93983 63.4584 3.99749 61.3535C6.08517 59.2182 8.71093 58.1658 11.8448 58.1658C13.7846 58.1658 15.5444 58.6478 17.1563 59.5792C18.7683 60.5106 20.02 61.7144 20.886 63.2489L18.4981 64.6623C17.3041 62.3757 14.7084 60.8715 11.8147 60.8715C9.42684 60.8715 7.45925 61.6539 5.93737 63.2489C4.41549 64.8136 3.63954 66.7695 3.63954 69.0841C3.63954 71.3986 4.41549 73.3545 5.93737 74.9193C7.48927 76.484 9.48688 77.2664 11.9348 77.2664C16.1102 77.2664 18.796 74.9798 19.3641 71.7013H11.697V69.1749H22.14L22.1377 69.1726Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M34.636 64.5691H37.2317V79.6088H34.636V77.4433C33.5921 79.1571 31.9802 80 29.8024 80C26.3107 80 24.0151 77.6226 24.0151 73.8039V64.5691H26.6109V73.6525C26.6109 76.0881 28.0127 77.5039 30.3105 77.5039C32.9062 77.5039 34.636 75.9089 34.636 72.5395V64.5691Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M42.4209 67.0956C43.287 65.2305 44.8389 64.2991 47.0743 64.2991V67.0374C45.7903 66.9768 44.7165 67.3075 43.7927 68.0596C42.869 68.8117 42.4209 69.9852 42.4209 71.6385V79.6089H39.8252V64.5692H42.4209V67.0956Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M59.3049 64.5691H61.9007V79.6088H59.3049V77.4433C58.2611 79.1571 56.6491 80 54.4714 80C50.9796 80 48.6841 77.6226 48.6841 73.8039V64.5691H51.2798V73.6525C51.2798 76.0881 52.6816 77.5039 54.9794 77.5039C57.5752 77.5039 59.3049 75.9089 59.3049 72.5395V64.5691Z",fill:n,opacity:"0.6"})]})})},fv=({children:e,...t})=>{const n=xt();return g.jsx(or,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,...t,border:!1,boxShadow:!0,shadow:n.customShadows.z1,children:g.jsx(b.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})};fv.propTypes={children:c.node};const ea=({version:e,name:t,copy:n,children:r,background:i=dv})=>g.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[T.isValidElement(i)?i:T.createElement(i),g.jsxs(b.Grid,{container:!0,direction:"column",justifyContent:"flex-end",sx:{minHeight:"100vh"},children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{ml:3,mt:3},children:g.jsx(rc,{title:t})}),g.jsxs(b.Grid,{item:!0,xs:12,children:[g.jsx(b.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:g.jsx(b.Grid,{item:!0,children:g.jsx(fv,{children:r})})}),g.jsx(b.Grid,{item:!0,sx:{pb:1},children:g.jsx(Fs,{name:t,copy:n,version:e})})]})]})]});ea.propTypes={children:c.node,version:c.string,name:c.string,copy:c.string,background:c.oneOfType([c.node,c.func,c.object])};const gv=({name:e,copy:t,version:n,background:r})=>{const i=be.useTranslate(),s=be.useAuthProvider(),l=be.useNotify(),u=Qt.useNavigate(),{token:A}=Qt.useParams();return T.useEffect(()=>{if(typeof s.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");s.activate(A).then(()=>{l("ra.auth.activate_success",{type:"info"}),Pe.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),Pe.delay(()=>u("/login"),1e3)})},[A]),g.jsx(ea,{name:e,copy:t,version:n,background:r,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:i("ra.auth.activate")}),g.jsx(b.Typography,{component:Qt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})};gv.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const sc=({version:e,name:t,copy:n,enablePasswordRecover:r,enableRegistration:i,redirectTo:s,background:l})=>{const[u,A]=be.useSafeSetState(!1),f=be.useLogin(),p=be.useTranslate(),C=be.useNotify(),h=be.useCheckAuth(),m=Qt.useNavigate();T.useEffect(()=>{h({},!1).then(()=>{m("/")}).catch(()=>{})},[h,m]);const I=B=>{A(!0),f(B,s).then(()=>{A(!1)}).catch(y=>{A(!1),C(typeof y=="string"?y:typeof y>"u"||!y.message?"ra.auth.sign_in_error":y.message,{type:"error",messageArgs:{_:typeof y=="string"?y:y&&y.message?y.message:void 0}})})};return g.jsx(ea,{name:t,version:e,copy:n,background:l,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:"Login"}),i&&g.jsx(b.Typography,{component:Qt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:p("ra.auth.register")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(be.Form,{onSubmit:I,children:[g.jsxs(b.Grid,{container:!0,children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Hn,{autoFocus:!0,source:"username",label:p("ra.auth.username"),autoComplete:"username",validate:be.required(),placeholder:"user@company.name",fullWidth:!0})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Hn,{source:"password",label:p("ra.auth.password"),type:"password",autoComplete:"current-password",validate:be.required(),placeholder:p("ra.auth.password_placeholder"),fullWidth:!0})})]}),r&&g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:g.jsx(b.Link,{variant:"h6",component:Qt.Link,to:"/recover",color:"text.primary",children:p("ra.auth.forgot_password")})})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?g.jsx(b.CircularProgress,{size:19,thickness:3}):p("ra.auth.sign_in")})})]})})]})})};sc.propTypes={version:c.string.isRequired,name:c.string.isRequired,enablePasswordRecover:c.bool,enableRegister:c.bool,background:c.element},sc.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:g.jsx(dv,{})};const pv=({name:e,copy:t,version:n,background:r})=>{const[i,s]=T.useState(!1),l=be.useTranslate(),u=be.useRedirect(),A=be.useNotify(),f=be.useAuthProvider(),p=({email:C})=>{s(!0),f.recover(C).then(h=>{const m=`ra.auth.recover_${h.responseCode}`,I=h.responseCode==="ok"?"info":"error";A(m,{type:I}),u("/login")}).catch(h=>{A(h,{type:"error"})}).finally(()=>s(!1))};return g.jsx(ea,{name:e,copy:t,version:n,background:r,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:l("ra.auth.recover.title")}),g.jsx(b.Typography,{component:Qt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.back_to_login")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(M.Form,{onSubmit:p,children:[g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"email",validate:[be.required(),be.email()]})})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:g.jsx(b.Typography,{variant:"caption",children:l("ra.auth.recover.inbox_help")})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?g.jsx(b.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})};pv.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const hv=({name:e,copy:t,version:n})=>{const[r,i]=T.useState(!1),s=be.useTranslate(),l=be.useRedirect(),u=be.useNotify(),A=be.useAuthProvider(),f=p=>{i(!0),A.register(p).then(C=>{const h=`ra.auth.register_${C.responseCode}`,m=C.responseCode==="ok"?"info":"error";u(h,{type:m}),l("/login")}).catch(C=>{u(C,{type:"error"})}).finally(()=>i(!1))};return g.jsx(ea,{name:e,copy:t,version:n,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:s("ra.auth.register.title")}),g.jsx(b.Typography,{component:Qt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.already_have_account")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(M.Form,{onSubmit:f,children:[g.jsxs(b.Grid,{container:!0,children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"name",label:s("ra.register.name"),validate:be.required()})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"email",type:"email",validate:[be.required(),be.email()]})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"password",type:"password",validate:be.required()})})]}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:r,fullWidth:!0,children:r?g.jsx(b.CircularProgress,{size:19,thickness:3}):s("ra.auth.create_account")})})]})})]})})};hv.propTypes={name:c.string.isRequired,version:c.string.isRequired};const U2=e=>({button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${Ve(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${Ve(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${Ve(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${Ve(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${Ve(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${Ve(e.palette.info.main,.2)}`,success:`0 0 0 2px ${Ve(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${Ve(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${Ve(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${Ve(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${Ve(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${Ve(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${Ve(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${Ve(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${Ve(e.palette.grey[500],.2)}`});function Kn(e,t){G2(e)&&(e="100%");var n=Y2(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function G2(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Y2(e){return typeof e=="string"&&e.indexOf("%")!==-1}function K2(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ac(e){return e<=1?"".concat(Number(e)*100,"%"):e}function yf(e){return e.length===1?"0"+e:String(e)}function _2(e,t,n){return{r:Kn(e,255)*255,g:Kn(t,255)*255,b:Kn(n,255)*255}}function bf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function J2(e,t,n){var r,i,s;if(e=Kn(e,360),t=Kn(t,100),n=Kn(n,100),t===0)i=n,s=n,r=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=bf(u,l,e+1/3),i=bf(u,l,e),s=bf(u,l,e-1/3)}return{r:r*255,g:i*255,b:s*255}}function X2(e,t,n){e=Kn(e,255),t=Kn(t,255),n=Kn(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),s=0,l=r,u=r-i,A=r===0?0:u/r;if(r===i)s=0;else{switch(r){case e:s=(t-n)/u+(t<n?6:0);break;case t:s=(n-e)/u+2;break;case n:s=(e-t)/u+4;break}s/=6}return{h:s,s:A,v:l}}function Z2(e,t,n){e=Kn(e,360)*6,t=Kn(t,100),n=Kn(n,100);var r=Math.floor(e),i=e-r,s=n*(1-t),l=n*(1-i*t),u=n*(1-(1-i)*t),A=r%6,f=[n,l,s,s,u,n][A],p=[u,n,n,l,s,s][A],C=[s,s,u,n,n,l][A];return{r:f*255,g:p*255,b:C*255}}function q2(e,t,n,r){var i=[yf(Math.round(e).toString(16)),yf(Math.round(t).toString(16)),yf(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Cv(e){return Sn(e)/255}function Sn(e){return parseInt(e,16)}var Ev={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ta(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,s=null,l=!1,u=!1;return typeof e=="string"&&(e=tF(e)),typeof e=="object"&&(kr(e.r)&&kr(e.g)&&kr(e.b)?(t=_2(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):kr(e.h)&&kr(e.s)&&kr(e.v)?(r=ac(e.s),i=ac(e.v),t=Z2(e.h,r,i),l=!0,u="hsv"):kr(e.h)&&kr(e.s)&&kr(e.l)&&(r=ac(e.s),s=ac(e.l),t=J2(e.h,r,s),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=K2(n),{ok:l,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var $2="[-\\+]?\\d+%?",eF="[-\\+]?\\d*\\.\\d+%?",go="(?:".concat(eF,")|(?:").concat($2,")"),Qf="[\\s|\\(]+(".concat(go,")[,|\\s]+(").concat(go,")[,|\\s]+(").concat(go,")\\s*\\)?"),xf="[\\s|\\(]+(".concat(go,")[,|\\s]+(").concat(go,")[,|\\s]+(").concat(go,")[,|\\s]+(").concat(go,")\\s*\\)?"),ir={CSS_UNIT:new RegExp(go),rgb:new RegExp("rgb"+Qf),rgba:new RegExp("rgba"+xf),hsl:new RegExp("hsl"+Qf),hsla:new RegExp("hsla"+xf),hsv:new RegExp("hsv"+Qf),hsva:new RegExp("hsva"+xf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function tF(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ev[e])e=Ev[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ir.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ir.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ir.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ir.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ir.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ir.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ir.hex8.exec(e),n?{r:Sn(n[1]),g:Sn(n[2]),b:Sn(n[3]),a:Cv(n[4]),format:t?"name":"hex8"}:(n=ir.hex6.exec(e),n?{r:Sn(n[1]),g:Sn(n[2]),b:Sn(n[3]),format:t?"name":"hex"}:(n=ir.hex4.exec(e),n?{r:Sn(n[1]+n[1]),g:Sn(n[2]+n[2]),b:Sn(n[3]+n[3]),a:Cv(n[4]+n[4]),format:t?"name":"hex8"}:(n=ir.hex3.exec(e),n?{r:Sn(n[1]+n[1]),g:Sn(n[2]+n[2]),b:Sn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function kr(e){return!!ir.CSS_UNIT.exec(String(e))}var lc=2,mv=.16,nF=.05,rF=.05,oF=.15,Iv=5,Bv=4,iF=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function vv(e){var t=e.r,n=e.g,r=e.b,i=X2(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function cc(e){var t=e.r,n=e.g,r=e.b;return"#".concat(q2(t,n,r,!1))}function sF(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function yv(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-lc*t:Math.round(e.h)+lc*t:r=n?Math.round(e.h)+lc*t:Math.round(e.h)-lc*t,r<0?r+=360:r>=360&&(r-=360),r}function bv(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-mv*t:t===Bv?r=e.s+mv:r=e.s+nF*t,r>1&&(r=1),n&&t===Iv&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Qv(e,t,n){var r;return n?r=e.v+rF*t:r=e.v-oF*t,r>1&&(r=1),Number(r.toFixed(2))}function xv(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ta(e),i=Iv;i>0;i-=1){var s=vv(r),l=cc(ta({h:yv(s,i,!0),s:bv(s,i,!0),v:Qv(s,i,!0)}));n.push(l)}n.push(cc(r));for(var u=1;u<=Bv;u+=1){var A=vv(r),f=cc(ta({h:yv(A,u),s:bv(A,u),v:Qv(A,u)}));n.push(f)}return t.theme==="dark"?iF.map(function(p){var C=p.index,h=p.opacity,m=cc(sF(ta(t.backgroundColor||"#141414"),ta(n[C]),h*100));return m}):n}var wf={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Jt={},uc={};Object.keys(wf).forEach(function(e){Jt[e]=xv(wf[e]),Jt[e].primary=Jt[e][5],uc[e]=xv(wf[e],{theme:"dark",backgroundColor:"#141414"}),uc[e].primary=uc[e][5]}),Jt.red,Jt.volcano,Jt.gold,Jt.orange,Jt.yellow,Jt.lime,Jt.green,Jt.cyan,Jt.blue,Jt.geekblue,Jt.purple,Jt.magenta,Jt.grey,Jt.grey;const wv=e=>{const{blue:t,red:n,gold:r,cyan:i,green:s,grey:l}=e,u={0:l[0],50:l[1],100:l[2],200:l[3],300:l[4],400:l[5],500:l[6],600:l[7],700:l[8],800:l[9],900:l[10],A50:l[15],A100:l[11],A200:l[12],A400:l[13],A700:l[14],A800:l[16]},A="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:A},secondary:{lighter:u[100],100:u[100],200:u[200],light:u[300],400:u[400],main:u[500],600:u[600],dark:u[700],800:u[800],darker:u[900],A100:u[0],A200:u.A400,A300:u.A700,contrastText:u[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:A},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:u[100]},info:{lighter:i[0],light:i[3],main:i[5],dark:i[7],darker:i[9],contrastText:A},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:A},grey:u}};wv.propTypes={colors:c.object};const aF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],l=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],u=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],A=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],f=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],l=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],u=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],A=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],f=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},lF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},cF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},uF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},AF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},dF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},fF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},gF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},Tv=(e,t,n)=>{switch(t){case"theme1":return aF(e,n);case"theme2":return lF(e,n);case"theme3":return cF(e,n);case"theme4":return uF(e,n);case"theme5":return AF(e,n);case"theme6":return dF(e,n);case"theme7":return fF(e,n);case"theme8":return gF(e,n);default:return wv(e)}};Tv.propTypes={colors:c.object,presetColor:c.any};const pF=(e,t)=>{const n=e==="dark"?uc:Jt;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],i=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],i=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...i,...s];const l=Tv(n,t,e);return ju({palette:{mode:e,common:{black:"#000",white:"#fff"},...l,text:{primary:e==="dark"?Ve(l.grey[900],.87):l.grey[700],secondary:e==="dark"?Ve(l.grey[900],.45):l.grey[500],disabled:e==="dark"?Ve(l.grey[900],.1):l.grey[400]},action:{disabled:l.grey[300]},divider:e==="dark"?Ve(l.grey[900],.05):l.grey[200],background:{paper:e==="dark"?l.grey[100]:l.grey[0],default:l.grey.A50}}})},hF=e=>({htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}});function CF(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function EF(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function mF(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:g.jsx(tt.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function No({color:e,theme:t}){const n=en(t,e),{lighter:r,light:i,main:s}=n;return{borderColor:Ve(i,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function IF(e){const t=No({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":No({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":No({color:"secondary",theme:e}),"&.MuiAlert-borderError":No({color:"error",theme:e}),"&.MuiAlert-borderSuccess":No({color:"success",theme:e}),"&.MuiAlert-borderInfo":No({color:"info",theme:e}),"&.MuiAlert-borderWarning":No({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function BF(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function vF(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Vo({color:e,theme:t}){const n=en(t,e),{lighter:r,main:i}=n;return{color:i,backgroundColor:r}}function yF(e){const t=Vo({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Vo({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Vo({color:"secondary",theme:e}),"&.MuiBadge-colorError":Vo({color:"error",theme:e}),"&.MuiBadge-colorInfo":Vo({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Vo({color:"success",theme:e}),"&.MuiBadge-colorWarning":Vo({color:"warning",theme:e})}}}}}function $e({variant:e,color:t,theme:n}){const r=en(n,t),{lighter:i,main:s,dark:l,contrastText:u}=r,A=`${t}Button`,f=yi(n,A),p={"&::after":{boxShadow:`0 0 5px 5px ${Ve(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ve(s,.9)}`},"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:l},...p};case"shadow":return{color:u,backgroundColor:s,boxShadow:f,"&:hover":{boxShadow:"none",backgroundColor:l},...p};case"outlined":return{borderColor:s,"&:hover":{color:l,backgroundColor:"transparent",borderColor:l},...p};case"dashed":return{color:s,borderColor:s,backgroundColor:i,"&:hover":{color:l,borderColor:l},...p};case"text":default:return{"&:hover":{color:l,backgroundColor:i},...p}}}function bF(e){const t=$e({variant:"dashed",color:"primary",theme:e}),n=$e({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},i={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...i},startIcon:{...i},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":$e({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":$e({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":$e({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":$e({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":$e({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":$e({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":$e({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":$e({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":$e({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":$e({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":$e({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":$e({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:$e({variant:"contained",color:"primary",theme:e}),containedSecondary:$e({variant:"contained",color:"secondary",theme:e}),containedError:$e({variant:"contained",color:"error",theme:e}),containedSuccess:$e({variant:"contained",color:"success",theme:e}),containedInfo:$e({variant:"contained",color:"info",theme:e}),containedWarning:$e({variant:"contained",color:"warning",theme:e}),outlinedPrimary:$e({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:$e({variant:"outlined",color:"secondary",theme:e}),outlinedError:$e({variant:"outlined",color:"error",theme:e}),outlinedSuccess:$e({variant:"outlined",color:"success",theme:e}),outlinedInfo:$e({variant:"outlined",color:"info",theme:e}),outlinedWarning:$e({variant:"outlined",color:"warning",theme:e}),textPrimary:$e({variant:"text",color:"primary",theme:e}),textSecondary:$e({variant:"text",color:"secondary",theme:e}),textError:$e({variant:"text",color:"error",theme:e}),textSuccess:$e({variant:"text",color:"success",theme:e}),textInfo:$e({variant:"text",color:"info",theme:e}),textWarning:$e({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function QF(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function xF(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function wF(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Vi({color:e,theme:t}){const n=en(t,e),{lighter:r,main:i,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:i}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function TF(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function Tf(e){const t=TF(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function PF(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:g.jsx(tt.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:g.jsx(tt.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Tf("small")},"&.size-medium":{...Tf("medium")},"&.size-large":{...Tf("large")}},colorPrimary:Vi({color:"primary",theme:e}),colorSecondary:Vi({color:"secondary",theme:e}),colorSuccess:Vi({color:"success",theme:e}),colorWarning:Vi({color:"warning",theme:e}),colorInfo:Vi({color:"info",theme:e}),colorError:Vi({color:"error",theme:e})}}}}function Hi({color:e,theme:t}){const n=en(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function On({color:e,theme:t}){const n=en(t,e),{light:r,lighter:i,main:s}=n;return{color:s,backgroundColor:i,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function SF(e){const t=On({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Hi({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Hi({color:"secondary",theme:e}),"&.MuiChip-colorError":Hi({color:"error",theme:e}),"&.MuiChip-colorInfo":Hi({color:"info",theme:e}),"&.MuiChip-colorSuccess":Hi({color:"success",theme:e}),"&.MuiChip-colorWarning":Hi({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":On({color:"primary",theme:e}),"&.MuiChip-lightSecondary":On({color:"secondary",theme:e}),"&.MuiChip-lightError":On({color:"error",theme:e}),"&.MuiChip-lightInfo":On({color:"info",theme:e}),"&.MuiChip-lightSuccess":On({color:"success",theme:e}),"&.MuiChip-lightWarning":On({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":On({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":On({color:"secondary",theme:e}),"&.MuiChip-combinedError":On({color:"error",theme:e}),"&.MuiChip-combinedInfo":On({color:"info",theme:e}),"&.MuiChip-combinedSuccess":On({color:"success",theme:e}),"&.MuiChip-combinedWarning":On({color:"warning",theme:e})}}}}}function OF(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:Ve("#000",.7)}}}}}}function MF(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function DF(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function zi({color:e,theme:t}){const n=en(t,e),{main:r,dark:i,contrastText:s}=n,l=`${e}Button`,u=yi(t,l);return{color:s,backgroundColor:r,boxShadow:u,"&:hover":{boxShadow:"none",backgroundColor:i},"&:focus-visible":{outline:`2px solid ${i}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${Ve(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${Ve(r,.9)}`}}}function RF(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":zi({color:"primary",theme:e}),"&.MuiFab-secondary":zi({color:"secondary",theme:e}),"&.Mui-error":zi({color:"error",theme:e}),"&.MuiFab-success":zi({color:"success",theme:e}),"&.MuiFab-info":zi({color:"info",theme:e}),"&.MuiFab-warning":zi({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function jF(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function kF(){return{MuiInputBase:{styleOverrides:{}}}}function FF(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function LF(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function NF(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function VF(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function HF(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function zF(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function WF(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Ho({variant:e,theme:t}){const n=en(t,e),{light:r}=n,i=yi(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:i,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function UF(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...Ho({variant:"primary",theme:e}),"&.Mui-error":{...Ho({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:Ho({variant:"secondary",theme:e}),colorError:Ho({variant:"error",theme:e}),colorWarning:Ho({variant:"warning",theme:e}),colorInfo:Ho({variant:"info",theme:e}),colorSuccess:Ho({variant:"success",theme:e})}}}}function GF(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function vt({variant:e,color:t,theme:n}){const r=en(n,t),{lighter:i,light:s,dark:l,main:u,contrastText:A}=r,f={"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:A,backgroundColor:u,"&:hover":{backgroundColor:s},...f};case"outlined":return{borderColor:u,"&:hover":{backgroundColor:i,borderColor:s},...f};case"text":default:return{color:u,"&:hover":{backgroundColor:u,color:i},...f}}}function YF(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":vt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":vt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":vt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":vt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":vt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":vt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":vt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":vt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":vt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":vt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":vt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":vt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":vt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":vt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":vt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":vt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":vt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":vt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":vt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":vt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":vt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":vt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":vt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":vt({variant:"outlined",color:"warning",theme:e})}}}}}}function KF(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Wi({color:e,theme:t}){const n=en(t,e),{lighter:r,main:i,dark:s}=n;return{"& .dot":{backgroundColor:i},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function _F(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function Pf(e){const t=_F(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function JF(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:g.jsx(b.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...Pf("small")},"&.size-medium":{...Pf("medium")},"&.size-large":{...Pf("large")}},colorPrimary:Wi({color:"primary",theme:e}),colorSecondary:Wi({color:"secondary",theme:e}),colorSuccess:Wi({color:"success",theme:e}),colorWarning:Wi({color:"warning",theme:e}),colorInfo:Wi({color:"info",theme:e}),colorError:Wi({color:"error",theme:e})}}}}function Ui({color:e,theme:t}){const n=en(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function XF(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":Ui({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Ui({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Ui({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Ui({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Ui({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Ui({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function ZF(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function Sf(e,t){const n=ZF(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function qF(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...Sf(e,"medium")},sizeLarge:{...Sf(e,"large")},sizeSmall:{...Sf(e,"small")}}}}}function $F(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function eL(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function tL(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function nL(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function rL(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function oL(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function iL(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function sL(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function aL(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function lL(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function cL(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function uL(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function AL(e){return at.merge(CF(e),EF(e),mF(e),IF(e),BF(),vF(e),yF(e),bF(e),QF(),xF(),wF(),PF(e),SF(e),OF(),MF(e),DF(),RF(e),jF(e),kF(),FF(e),LF(),NF(),VF(e),HF(e),zF(),WF(),UF(e),GF(),YF(e),KF(e),JF(e),XF(e),qF(e),$F(e),eL(e),tL(e),nL(e),rL(e),oL(),iL(),sL(),aL(e),lL(e),cL(),uL())}const Of=({themeOverrides:e,children:t})=>{const{themeDirection:n,mode:r,presetColor:i,fontFamily:s}=Qn(),l=T.useMemo(()=>pF(r,i),[r,i]),u=T.useMemo(()=>hF(s),[s]),A=T.useMemo(()=>U2(l),[l]),f=T.useMemo(()=>Pe.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:n,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:l.palette,customShadows:A,typography:u,shadows:l.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:l.spacing(2.6875),height:l.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(l):e),[n,l,u,A,e]),p=ju(f),C=Pe.cloneDeep(p.components??{});return p.components=Pe.merge(AL(p),C),g.jsx(b.StyledEngineProvider,{injectFirst:!0,children:g.jsxs($p,{theme:p,children:[g.jsx(b.CssBaseline,{}),t]})})};Of.propTypes={children:c.node,themeOverrides:c.oneOfType([c.object,c.func])};const Pv=({children:e,theme:t,...n})=>g.jsx(M.CoreAdminContext,{...n,children:g.jsx(Of,{themeOverrides:t,children:g.jsx(pf,{children:e})})});Pv.displayName="ApplicaAdminContext";const Gi=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:i,dataProvider:s,disableTelemetry:l,history:u,i18nProvider:A,layout:f,loading:p,loginPage:C,authCallbackPage:h,menu:m,notification:I,queryClient:B,requireAuth:y,store:O,ready:j,theme:x,title:S="React Admin"}=e;return g.jsx(Pv,{authProvider:t,dataProvider:s,i18nProvider:A,store:O,history:u,queryClient:B,theme:x,children:g.jsx(M.AdminUI,{layout:f,dashboard:i,disableTelemetry:l,menu:m,catchAll:n,title:S,loading:p,loginPage:C,authCallbackPage:h,notification:I,requireAuth:y,ready:j,children:r})})};Gi.defaultProps={store:M.localStorageStore(),title:"Applica Admin"},Gi.propTypes={...M.AdminUI.propTypes};class Sv{constructor({catch:t,display:n,log:r,error:i}){va(this,"catch");va(this,"display");va(this,"log");va(this,"error");this.catch=t,this.display=n,this.log=r,this.error=i}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const dL=({apiUrl:e,endpoint:t,message:n,bodyBuilder:r})=>fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(r(n))}),fL=({enabled:e=!0,apiUrl:t,endpoint:n="/ui-errors/put",loading:r,catcherFn:i=l=>new Sv({catch:l!=null,display:!1,log:!1}),bodyBuilder:s=l=>({message:l})})=>(V.useMemo(()=>{if(r||!e)return;const l=console.error;console.error=function(u,...A){if(!u||typeof u!="string"){l.apply(console,arguments);return}const f=u.replace(/%s/g,()=>A.shift()),p=i(f);if(!p.isCatched()){l.apply(console,arguments);return}p.logError()&&dL({apiUrl:t,endpoint:n,message:f,bodyBuilder:s}),p.displayError()?l.apply(console,arguments):console.debug.apply(console,arguments)}},[t,r,s,n,i,e]),!0),Mf=({languages:e,defaultLocale:t,allowMissing:n=!1})=>sQ(r=>at.get(e,r,{}),t,[{locale:t}],{allowMissing:n}),Ov=[],gL=({apiUrl:e,endpoint:t,locale:n,message:r,bodyBuilder:i})=>r!=null&&r!=="undefined"&&r.indexOf("[")===-1&&r.indexOf("]")===-1&&Ov.indexOf(`${n}-${r}`)===-1&&Ov.push(`${n}-${r}`)&&fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(i(n,r)||{})}),Mv=({apiUrl:e,enabled:t=!0,endpoint:n="/languages/put-message",loading:r,bodyBuilder:i=(s,l)=>({lang:s,code:l,text:l})})=>{const[s]=M.useLocaleState();return V.useMemo(()=>{if(r||!t)return;const l=console.error;console.error=function(u){if(!(typeof u=="string"&&u==="%c%s")){if(typeof u=="string"&&u.indexOf("Missing translation for key: ")>=0){if(u=u.replace("Warning: Missing translation for key: ",""),u=u.split('"').join("").trim(),u===null||u.indexOf(" ")!==-1||u.indexOf(".")===-1)return;const A=localStorage.getItem("locale")||s;gL({apiUrl:e,endpoint:n,locale:A,message:u,bodyBuilder:i});return}l.apply(console,arguments)}}},[e,s,r,i,n,t]),!0};window.React=T;const Dv=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,i]=T.useState({loading:!0,languages:null});return T.useEffect(()=>{let s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(l=>l.json()).then(l=>i({loading:!1,...n(l)}))},[e,t,n]),r},pL=({apiUrl:e,locale:t="en",languages:n={}})=>Mf({apiUrl:e,locale:t,languages:n}),hL=e=>e.reduce((t,n)=>({...t,[n.lang]:{...t[n.lang]||{},[n.code]:n.text}}),{}),CL=(e,t)=>({lang:e,code:t,text:t}),EL=new au.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Df=({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r,development:i,logoMain:s,logoIcon:l,loginPage:u,menu:A,name:f,copy:p,version:C,dataProvider:h,authProvider:m,notification:I,enableNotification:B,enableRegistration:y,enablePasswordRecover:O,...j})=>{const x=Dv({apiUrl:n,endpoint:"/i18n/messages",mapper:hL});Mv({bodyBuilder:CL,apiUrl:n,endpoint:"/i18n/message",loading:x==null?void 0:x.loading,enabled:i}),fL({apiUrl:n,endpoint:"/cli/error",catcherFn:k=>{const _=k==null?void 0:k.toString(),G=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>."].some(le=>_==null?void 0:_.includes(le));return new Sv({catch:G,display:!G,log:!G,error:k})}});const S=T.useMemo(()=>T.isValidElement(u)?T.cloneElement(u,{name:f,copy:p,version:C,enableRegistration:y,enablePasswordRecover:O}):u,[u,f,C,p,y,O]),P=T.useMemo(()=>k=>{const _=f?g.jsx(rc,{title:f}):s,X=f?g.jsx(hf,{title:f}):l;return g.jsx(qB,{...k,name:f,copy:p,version:C,logoMain:_,logoIcon:X,notification:I,enableNotification:B})},[s,l,f,C,I,B]);if(x!=null&&x.loading)return null;const N=Mf({languages:x,defaultLocale:r,allowMissing:i});return g.jsx(Nu,{children:g.jsx(Wu,{menu:A,children:g.jsx(Hu,{initialConfig:t,children:g.jsx(Gi,{theme:e,layout:P,notification:av,queryClient:EL,dataProvider:h,authProvider:m,i18nProvider:N,loginPage:S,...j})})})})};Df.defaultProps={...Gi.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:g.jsx(sc,{version:"0.0.0",name:"Applica",redirectTo:"/"})},Df.propTypes={...Gi.propTypes,theme:c.oneOfType([c.object,c.func]),apiUrl:c.string.isRequired,defaultLocale:c.string,development:c.bool,logoMain:c.node,logoIcon:c.node,menu:c.arrayOf(fi),name:c.string,version:c.string,authProvider:c.oneOfType([c.func,c.object]),dataProvider:c.oneOfType([c.func,c.object]),notification:c.string,enableNotification:c.bool,enableRegistration:c.bool,enableForgotPassword:c.bool},Object.defineProperty(R,"ArrayInputContext",{enumerable:!0,get:()=>M.ArrayInputContext}),Object.defineProperty(R,"BooleanField",{enumerable:!0,get:()=>M.BooleanField}),Object.defineProperty(R,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>M.BulkDeleteWithConfirmButton}),Object.defineProperty(R,"Button",{enumerable:!0,get:()=>M.Button}),Object.defineProperty(R,"ChipField",{enumerable:!0,get:()=>M.ChipField}),Object.defineProperty(R,"Confirm",{enumerable:!0,get:()=>M.Confirm}),Object.defineProperty(R,"CreateButton",{enumerable:!0,get:()=>M.CreateButton}),Object.defineProperty(R,"CreateContextProvider",{enumerable:!0,get:()=>M.CreateContextProvider}),Object.defineProperty(R,"CustomRoutes",{enumerable:!0,get:()=>M.CustomRoutes}),Object.defineProperty(R,"DeleteWithConfirmButton",{enumerable:!0,get:()=>M.DeleteWithConfirmButton}),Object.defineProperty(R,"DeleteWithUndoButton",{enumerable:!0,get:()=>M.DeleteWithUndoButton}),Object.defineProperty(R,"EditButton",{enumerable:!0,get:()=>M.EditButton}),Object.defineProperty(R,"EditContextProvider",{enumerable:!0,get:()=>M.EditContextProvider}),Object.defineProperty(R,"FieldTitle",{enumerable:!0,get:()=>M.FieldTitle}),Object.defineProperty(R,"Form",{enumerable:!0,get:()=>M.Form}),Object.defineProperty(R,"FormDataConsumer",{enumerable:!0,get:()=>M.FormDataConsumer}),Object.defineProperty(R,"HttpError",{enumerable:!0,get:()=>M.HttpError}),Object.defineProperty(R,"I18nContextProvider",{enumerable:!0,get:()=>M.I18nContextProvider}),Object.defineProperty(R,"ListToolbar",{enumerable:!0,get:()=>M.ListToolbar}),Object.defineProperty(R,"LoadingIndicator",{enumerable:!0,get:()=>M.LoadingIndicator}),Object.defineProperty(R,"Pagination",{enumerable:!0,get:()=>M.Pagination}),Object.defineProperty(R,"RaSimpleFormIterator",{enumerable:!0,get:()=>M.SimpleFormIterator}),Object.defineProperty(R,"RecordContextProvider",{enumerable:!0,get:()=>M.RecordContextProvider}),Object.defineProperty(R,"ReferenceArrayField",{enumerable:!0,get:()=>M.ReferenceArrayField}),Object.defineProperty(R,"ReferenceField",{enumerable:!0,get:()=>M.ReferenceField}),Object.defineProperty(R,"Resource",{enumerable:!0,get:()=>M.Resource}),Object.defineProperty(R,"ResourceContextProvider",{enumerable:!0,get:()=>M.ResourceContextProvider}),Object.defineProperty(R,"SaveButton",{enumerable:!0,get:()=>M.SaveButton}),Object.defineProperty(R,"SimpleFormIteratorContext",{enumerable:!0,get:()=>M.SimpleFormIteratorContext}),Object.defineProperty(R,"SimpleList",{enumerable:!0,get:()=>M.SimpleList}),Object.defineProperty(R,"SimpleShowLayout",{enumerable:!0,get:()=>M.SimpleShowLayout}),Object.defineProperty(R,"SingleFieldList",{enumerable:!0,get:()=>M.SingleFieldList}),Object.defineProperty(R,"TopToolbar",{enumerable:!0,get:()=>M.TopToolbar}),Object.defineProperty(R,"UrlField",{enumerable:!0,get:()=>M.UrlField}),Object.defineProperty(R,"choices",{enumerable:!0,get:()=>M.choices}),Object.defineProperty(R,"email",{enumerable:!0,get:()=>M.email}),Object.defineProperty(R,"maxLength",{enumerable:!0,get:()=>M.maxLength}),Object.defineProperty(R,"maxValue",{enumerable:!0,get:()=>M.maxValue}),Object.defineProperty(R,"minLength",{enumerable:!0,get:()=>M.minLength}),Object.defineProperty(R,"minValue",{enumerable:!0,get:()=>M.minValue}),Object.defineProperty(R,"number",{enumerable:!0,get:()=>M.number}),Object.defineProperty(R,"regex",{enumerable:!0,get:()=>M.regex}),Object.defineProperty(R,"required",{enumerable:!0,get:()=>M.required}),Object.defineProperty(R,"useArrayInput",{enumerable:!0,get:()=>M.useArrayInput}),Object.defineProperty(R,"useAuthProvider",{enumerable:!0,get:()=>M.useAuthProvider}),Object.defineProperty(R,"useChoices",{enumerable:!0,get:()=>M.useChoices}),Object.defineProperty(R,"useChoicesContext",{enumerable:!0,get:()=>M.useChoicesContext}),Object.defineProperty(R,"useCreateController",{enumerable:!0,get:()=>M.useCreateController}),Object.defineProperty(R,"useDataProvider",{enumerable:!0,get:()=>M.useDataProvider}),Object.defineProperty(R,"useEditContext",{enumerable:!0,get:()=>M.useEditContext}),Object.defineProperty(R,"useGetIdentity",{enumerable:!0,get:()=>M.useGetIdentity}),Object.defineProperty(R,"useGetList",{enumerable:!0,get:()=>M.useGetList}),Object.defineProperty(R,"useGetMany",{enumerable:!0,get:()=>M.useGetMany}),Object.defineProperty(R,"useGetManyReference",{enumerable:!0,get:()=>M.useGetManyReference}),Object.defineProperty(R,"useGetOne",{enumerable:!0,get:()=>M.useGetOne}),Object.defineProperty(R,"useInput",{enumerable:!0,get:()=>M.useInput}),Object.defineProperty(R,"useListContext",{enumerable:!0,get:()=>M.useListContext}),Object.defineProperty(R,"useLocaleState",{enumerable:!0,get:()=>M.useLocaleState}),Object.defineProperty(R,"useNotify",{enumerable:!0,get:()=>M.useNotify}),Object.defineProperty(R,"usePermissions",{enumerable:!0,get:()=>M.usePermissions}),Object.defineProperty(R,"useRecordContext",{enumerable:!0,get:()=>M.useRecordContext}),Object.defineProperty(R,"useRefresh",{enumerable:!0,get:()=>M.useRefresh}),Object.defineProperty(R,"useResourceContext",{enumerable:!0,get:()=>M.useResourceContext}),Object.defineProperty(R,"useResourceDefinition",{enumerable:!0,get:()=>M.useResourceDefinition}),Object.defineProperty(R,"useResourceDefinitions",{enumerable:!0,get:()=>M.useResourceDefinitions}),Object.defineProperty(R,"useShowContext",{enumerable:!0,get:()=>M.useShowContext}),Object.defineProperty(R,"useShowController",{enumerable:!0,get:()=>M.useShowController}),Object.defineProperty(R,"useSimpleFormIterator",{enumerable:!0,get:()=>M.useSimpleFormIterator}),Object.defineProperty(R,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>M.useSimpleFormIteratorItem}),Object.defineProperty(R,"useTranslate",{enumerable:!0,get:()=>M.useTranslate}),Object.defineProperty(R,"useTranslateLabel",{enumerable:!0,get:()=>M.useTranslateLabel}),Object.defineProperty(R,"useUnselect",{enumerable:!0,get:()=>M.useUnselect}),Object.defineProperty(R,"useUnselectAll",{enumerable:!0,get:()=>M.useUnselectAll}),Object.defineProperty(R,"useUpdateMany",{enumerable:!0,get:()=>M.useUpdateMany}),R.ActionsField=ZA,R.ActionsMenu=di,R.ActivatePage=gv,R.Admin=Gi,R.AnimateButton=HE,R.AppConfigContext=Lu,R.AppConfigProvider=Nu,R.ApplicaAdmin=Df,R.ArrayInput=KO,R.AttachmentField=qA,R.AttachmentInput=id,R.AutocompleteArrayInput=sd,R.AutocompleteInput=ad,R.Avatar=Ms,R.BooleanInput=ld,R.Breadcrumbs=Il,R.CardForm=bl,R.ChangePasswordForm=md,R.CircularWithLabel=Em,R.CircularWithPath=mm,R.CoverField=wl,R.Create=zO,R.CreateInDialogButton=mf,R.Datagrid=Bf,R.DateAgoField=Tl,R.DateField=$A,R.DateInput=cd,R.DateTimeInput=ud,R.Dot=Bl,R.Drawer=YB,R.DrawerHeader=T0,R.DrawerHeaderStyled=ef,R.DrawerToggle=SI,R.Edit=E3,R.EditInDialogButton=If,R.EmailField=ed,R.Empty=uv,R.FileField=td,R.FileInput=Ad,R.Footer=Fs,R.FormHeader=Id,R.FunctionField=Pm,R.Header=OI,R.HeaderNotification=MI,R.HeaderProfile=DI,R.HeaderSpacer=jI,R.HorizontalBar=KB,R.IconButton=ro,R.ImageField=Rs,R.ImageInput=dd,R.ImpersonateUserButton=cv,R.LabeledArrayInput=xl,R.LabeledInput=lt,R.Layout=qB,R.LayoutContent=kI,R.LayoutProvider=wI,R.LayoutWrapper=FI,R.LinearWithIcon=Im,R.LinearWithLabel=Bm,R.List=Av,R.ListItem=vf,R.Loadable=P2,R.Loader=sv,R.LoadingButton=JA,R.LoginPage=sc,R.Logo=tf,R.LongForm=Rt,R.MainCard=or,R.MainIcon=rc,R.MenuConfigContext=zu,R.MenuConfigProvider=Wu,R.MenuPopover=Ya,R.MenuPropTypes=fi,R.NavMenu=_B,R.Navigation=ZB,R.Notification=av,R.NotificationList=W2,R.NumberInput=fd,R.ReadonlyField=rd,R.RecordInput=Dm,R.RecoverPage=pv,R.ReferenceArrayInput=gd,R.ReferenceInput=pd,R.ReferenceManyField=bi,R.ReferenceManyInput=hd,R.RegisterPage=hv,R.ResponsiveSection=RI,R.ScrollTop=pf,R.ScrollX=S2,R.SearchInput=d3,R.SelectArrayInput=Cd,R.SelectInput=jm,R.Show=j3,R.SimpleBar=df,R.SimpleForm=Ql,R.SimpleFormIterator=k3,R.SizeField=Om,R.SmallIcon=hf,R.SmartTextInput=Pl,R.TabbedForm=Ml,R.TableFormIterator=pj,R.TextField=od,R.TextInput=Hn,R.ThemeConfigContext=Vu,R.ThemeConfigProvider=Hu,R.ThemeProvider=Of,R.TimeInput=Ed,R.Toolbar=Dr,R.Tooltip=Cm,R.Transitions=io,R.createI18nProvider=Mf,R.parseTime=km,R.useAppConfig=xo,R.useBreadcrumbs=dh,R.useI18nCatcher=Mv,R.useI18nLanguages=Dv,R.useI18nProvider=pL,R.useLayoutContext=Dd,R.useLayoutDispatch=Ej,R.useLayoutDrawerState=ko,R.useLayoutLogoState=PI,R.useLayoutMediaState=zn,R.useLayoutNotificationsState=kl,R.useLayoutState=Ti,R.useLayoutThemeState=Fl,R.useLocalStorage=Yu,R.useMenu=Gu,R.useMenuConfig=Jr,R.useRefDimensions=J1,R.useResourceDefaultValues=HO,R.useResourceTitle=fh,R.useSx=gi,R.useThemeConfig=Qn,R.uuid=g3,R.withLayoutProvider=TI,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
265
|
+
`),I2)),iv=V.forwardRef(function(t,n){const r=Kt({props:t,name:"MuiLinearProgress"}),{className:i,color:s="primary",value:l,valueBuffer:u,variant:A="indeterminate"}=r,f=_e(r,E2),p=U({},r,{color:s,variant:A}),C=v2(p),h=xt(),m={},I={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(l!==void 0){m["aria-valuenow"]=Math.round(l),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let B=l-100;h.direction==="rtl"&&(B=-B),I.bar1.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(A==="buffer")if(u!==void 0){let B=(u||0)-100;h.direction==="rtl"&&(B=-B),I.bar2.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return g.jsxs(y2,U({className:Ze(C.root,i),ownerState:p,role:"progressbar"},m,{ref:n},f,{children:[A==="buffer"?g.jsx(b2,{className:C.dashed,ownerState:p}):null,g.jsx(Q2,{className:C.bar1,ownerState:p,style:I.bar1}),A==="determinate"?null:g.jsx(x2,{className:C.bar2,ownerState:p,style:I.bar2})]}))});process.env.NODE_ENV!=="production"&&(iv.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.number,valueBuffer:c.number,variant:c.oneOf(["buffer","determinate","indeterminate","query"])});const w2=iv,T2=ue("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),sv=()=>g.jsx(T2,{children:g.jsx(w2,{color:"primary"})}),P2=e=>t=>g.jsx(T.Suspense,{fallback:g.jsx(sv,{}),children:g.jsx(e,{...t})}),rc=({title:e})=>g.jsxs(b.Stack,{direction:"row",children:[g.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",g.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]});rc.propTypes={title:c.string.isRequired};const av=ue(M.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),pf=({children:e})=>{const t=Qt.useLocation(),{pathname:n}=t;return T.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};pf.propTypes={children:c.node};const S2=ue("div")({width:"100%",overflowX:"auto",display:"block"}),hf=({title:e})=>g.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});hf.propTypes={title:c.string.isRequired};const Cf=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(i=>i.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},O2=(e,t)=>e&&e.data?{data:Cf(e.data,t),total:e.total+1}:e,M2=(e,t)=>e&&e.length>0?Cf(e,t):e,D2=(e,t)=>e&&e.data?{...e,data:Cf(e.data,t),total:e.total+1}:e,Ef=({onClose:e,record:t,children:n,redirect:r,onSubmit:i,onSuccess:s,onError:l})=>{const u=au.useQueryClient(),A=M.useResourceContext(),f=M.useRedirect(),p=M.useNotify(),C=T.useCallback(B=>{const O=Date.now();u.setQueryData([A,"getOne",{id:B.id}],B),u.setQueriesData([A,"getList"],j=>D2(j,B),{updatedAt:O}),u.setQueriesData([A,"getMany"],j=>M2(j,B),{updatedAt:O}),u.setQueriesData([A,"getManyReference"],j=>O2(j,B),{updatedAt:O}),e(),p("ra.notification.created"),r!==void 0&&f(r,A,B.id,B),s&&s(B)},[e,s,u,A,p,f,r]),{save:h,...m}=M.useCreateController({mutationOptions:{onSuccess:C,onError:l}}),I=T.useCallback(B=>{i?i(B,e):h&&h(B)},[i,h,e]);return g.jsx(M.CreateContextProvider,{value:{record:t,save:I,saving:m==null?void 0:m.saving,redirect:r},children:T.cloneElement(n,{...n.props,toolbar:g.jsxs(Dr,{children:[g.jsx(M.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:m==null?void 0:m.saving}),g.jsx(M.SaveButton,{disabled:m==null?void 0:m.saving})]})})})};Ef.propTypes={children:c.node,onClose:c.func,record:c.object,redirect:c.oneOf(["list","edit","show",!1])},Ef.defaultProps={redirect:!1};const R2={true:{_scrollToTop:!0},false:{}},j2=ue(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${M.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),mf=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:i,scrollToTop:s,className:l,sx:u,onSubmit:A,onSuccess:f,onError:p,...C})=>{const[h,m]=T.useState(!1),I=M.useTranslate(),B=M.useResourceContext(),{openDialog:y,closeDialog:O}=xo(),j=T.useCallback(()=>y(B,()=>m(!0)),[y,B]),x=T.useCallback(()=>O(B,()=>m(!1)),[O,B]),S=b.useMediaQuery(P=>P.breakpoints.down("md"));return g.jsxs(g.Fragment,{children:[S?g.jsx(j2,{...C,state:R2[String(s)],color:"primary",className:Ze(M.CreateButtonClasses.floating,l),"aria-label":n&&I(n),onClick:j,children:g.jsx(An.Add,{})}):g.jsx(M.Button,{...C,sx:u,label:n,onClick:j,children:g.jsx(An.Add,{})}),g.jsx(b.Dialog,{open:h,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:g.jsx(Ef,{...C,redirect:i,record:r,onClose:x,onSubmit:A,onSuccess:f,onError:p})})]})};mf.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},mf.propTypes={...M.Button.propTypes,redirect:c.oneOf(["list","edit","show",!1]),fullWidth:c.bool,maxWidth:c.oneOf(["xs","sm","md","lg","xl",!1]),label:c.string,record:c.object,scrollToTop:c.bool,className:c.string,sx:c.object,children:c.node,onSubmit:c.func,onSuccess:c.func,onError:c.func};const lv=({onClose:e,children:t})=>{const n=M.useNotify(),r=M.useRecordContext(),i=M.useResourceContext(),{id:s}=r,{isLoading:l,data:u}=M.useGetOne(i,{id:s}),A=T.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:f,saving:p}=M.useEditController({resource:i,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return g.jsx(M.EditContextProvider,{value:{record:u,isLoading:l,save:f,saving:p},children:T.cloneElement(t,{toolbar:g.jsxs(Dr,{children:[g.jsx(M.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),g.jsx(M.SaveButton,{})]})})})};lv.propTypes={children:c.node,onClose:c.func};const If=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[i,s]=T.useState(!1),{openDialog:l,closeDialog:u}=xo(),A=M.useResourceContext(),f=T.useCallback(()=>l(A,()=>s(!0)),[l,A]),p=T.useCallback(()=>u(A,()=>s(!1)),[u,A]);return g.jsxs(g.Fragment,{children:[g.jsx(M.Button,{label:n,onClick:f,children:g.jsx(An.Edit,{})}),g.jsx(b.Dialog,{open:i,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:g.jsx(lv,{...r,onClose:p})})]})};If.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},If.propTypes={fullWidth:c.bool,maxWidth:c.oneOf(["xs","sm","md","lg","xl",!1]),label:c.string};const cv=({label:e="ra.auth.sign_in",...t})=>{const n=M.useRecordContext(),[r,i]=T.useState(!1),s=M.useAuthProvider(),l=T.useCallback(u=>{u.stopPropagation(),u.preventDefault(),i(!0),s.impersonate(n==null?void 0:n.id).then(()=>{i(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return g.jsx(M.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:l,...t,children:g.jsx(An.VpnKey,{})})};cv.propTypes={label:c.string};const k2=ue(M.Datagrid,{name:"ApplicaDatagrid",slot:"root"})(()=>({"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}})),Bf=e=>g.jsx(k2,{...e});Bf.propTypes={...M.Datagrid.propTypes},Bf.defaultProps={...M.Datagrid.defaultProps};const F2=ue("div")(({theme:e})=>({padding:e.spacing(2)})),uv=({actions:e,className:t,...n})=>{const{hasCreate:r}=be.useResourceDefinition(n),i=be.useResourceContext(n),s=be.useTranslate(),l=be.useGetResourceLabel(),u=s(`resources.${i}.forcedCaseName`,{smart_count:0,_:l(i,0)}),A=s("ra.page.empty",{name:u}),f=s("ra.page.invite");return g.jsxs(L2,{className:t,children:[g.jsxs("div",{className:Ni.message,children:[g.jsx(An.Inbox,{className:Ni.icon}),g.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${i}.empty`,{_:A})}),r&&g.jsx(b.Typography,{variant:"body1",children:s(`resources.${i}.invite`,{_:f})})]}),g.jsx(F2,{className:Ni.toolbar,children:e})]})},oc="ApplicaEmpty",Ni={message:`${oc}-message`,icon:`${oc}-icon`,toolbar:`${oc}-toolbar`},L2=ue("span",{name:oc,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Ni.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Ni.icon}`]:{width:"9em",height:"9em"},[`& .${Ni.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));uv.propTypes={actions:c.element,className:c.string};const N2=fs(M.List,{name:"RaApplicaList",slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"},"& .MuiButton-root":{margin:e.spacing(2)}},"& .RaList-actions":{padding:e.spacing(2),paddingTop:e.spacing(1),alignItems:"center","& form":{alignItems:"center"},"& .RaFilterForm-filterFormInput":{"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},marginTop:e.spacing(1.5)},"& .RaFilterFormInput-hideButton":{marginBottom:e.spacing(.5),marginRight:e.spacing(1)},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"flex-end",minHeight:"fit-content"}},"& .RaList-content":{"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}})),Av=e=>g.jsx(or,{content:!1,children:g.jsx(N2,{...e})});Av.propTypes={...M.List.propTypes};const V2=()=>{const e=M.useRefresh(),t=M.useNotify(),n=M.useUnselectAll(),r=M.useResourceContext(),{selectedIds:i,data:s}=M.useListContext(),l=M.useRecordContext(),u=i.map(C=>s.find(h=>h.id===C)),[A,{isLoading:f}]=M.useUpdateMany(r,{ids:i.length>0?i:[l==null?void 0:l.id],data:{readed:Rr().format("YYYY-MM-DD HH:mm:ss")},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),n(r)},onError:()=>t("ra.notification.readed_error","warning"),onFailure:()=>t("ra.notification.readed_error","warning")}),p=T.useCallback(()=>{A()},[A]);return g.jsx(M.Button,{label:"ra.notification.mark_as_readed",disabled:f||(l==null?void 0:l.readed)!==null,onClick:p,children:g.jsx(An.Email,{})})},H2=()=>{const e=M.useRefresh(),t=M.useNotify(),n=M.useUnselectAll(),{selectedIds:r,data:i}=M.useListContext(),s=M.useRecordContext(),l=M.useResourceContext(),u=r.map(C=>i.find(h=>h.id===C)).concat([s]),[A,{isLoading:f}]=M.useUpdateMany(l,{ids:r.length>0?r:[s==null?void 0:s.id],data:{readed:null},rows:u},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),n("notifications")},onFailure:()=>t("resources.notifications.messages.unreaded.error","warning")}),p=T.useCallback(()=>{A()},[A]);return g.jsx(M.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:f||s&&!(s!=null&&s.readed),onClick:p,children:g.jsx(An.Drafts,{})})},z2=e=>{const t=M.useRecordContext(e),n=M.useResourceContext(e),r=M.useRedirect(),i=M.useNotify(),s=M.useTranslate(),[l]=M.useLocaleState(),u=T.useMemo(()=>t!=null&&t.readed?Rr(t==null?void 0:t.readed).locale(l).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,l]),[A]=M.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Rr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onFailure:()=>{i("ra.notification.readed_error","warning")}}),f=T.useCallback(()=>A(),[A]);return g.jsxs("div",{onClick:f,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[g.jsx(b.Typography,{variant:"subtitle1",children:g.jsxs(b.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),g.jsx(b.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),u&&g.jsx(b.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:u})})]})},W2=({...e})=>{const t=b.useTheme(),{mode:n,colorize:r,density:i}=T.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?b.darken:b.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]),s=T.useCallback(l=>({backgroundColor:l!=null&&l.readed?r(t.palette.primary[n],i):r(t.palette.secondary[n],i)}),[t,n,r,i]);return g.jsxs(M.Datagrid,{...e,rowStyle:s,children:[g.jsx(z2,{source:"notification",sortable:!1,label:"ra.notification"}),g.jsx(Tl,{source:"created",label:"ra.notification.created"}),g.jsxs(di,{children:[g.jsx(V2,{}),g.jsx(H2,{})]})]})},ic={width:"1.5rem",alignSelf:"center"},vf=({source:e,label:t,variant:n,record:r,spaceBottom:i,spaceTop:s,component:l,leftIcon:u,rightIcon:A,button:f,buttonProps:p,...C})=>{const{getCurrentDialog:h}=xo(),m=be.useResourceContext(C),I=h(),B=be.useRecordContext(),y=r||B,O=at.get(y,e||"");return g.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:j=>({pt:1,pb:1,borderBottom:`1px solid ${j.palette.divider}`,...i&&{mb:2},...s&&{mt:2}}),children:[g.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[u&&(T.isValidElement(u)?T.cloneElement(u,{style:ic}):T.createElement(u,{style:ic})),g.jsx(be.FieldTitle,{label:t,source:e,resource:I||m})]}),g.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[l?T.isValidElement(l)?T.cloneElement(l,{record:y,resource:m,value:O}):T.createElement(l,{source:e,record:y,resource:m,value:O}):g.jsx(b.Typography,{variant:n,children:O}),A&&(T.isValidElement(A)?T.cloneElement(A,{style:ic}):T.createElement(A,{style:ic})),f&&g.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:f})]})]})};vf.propTypes={source:c.string,label:c.string,record:c.object,variant:c.oneOf(["body1","body2","caption","button","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),spaceTop:c.bool,spaceBottom:c.bool,leftIcon:c.oneOfType([c.elementType,c.element,c.func]),rightIcon:c.oneOfType([c.elementType,c.element,c.func]),component:c.oneOfType([c.elementType,c.element,c.func]),buttonProps:c.object,button:c.string},vf.defaultProps={variant:"body1"};const dv=()=>{const e=Gt.useTheme(),n=e.palette.mode==="dark"?e.palette.primary.dark:e.palette.primary.light;return g.jsx(b.Box,{sx:{position:"absolute",filter:"blur(20px)",bottom:0,p:4,pb:8},children:g.jsxs("svg",{width:"100%",height:"calc(100vh - 175px)",viewBox:"0 0 117 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M15.7523 21.9601L14.0526 17.2379H4.6534L2.95369 21.9601H0L7.78722 0.903564H10.9187L18.706 21.9601H15.7523ZM5.60948 14.6207H13.0988L9.33912 4.24262L5.60948 14.6207Z",fill:n}),g.jsx("path",{d:"M33.592 8.8437C35.0538 10.3782 35.7997 12.2433 35.7997 14.4391C35.7997 16.6348 35.0538 18.5302 33.592 20.0647C32.1301 21.5992 30.3404 22.3513 28.2504 22.3513C25.7747 22.3513 23.8949 21.3593 22.6109 19.3731V27.9769H20.0151V6.91804H22.6109V9.505C23.8949 7.51879 25.7724 6.52686 28.2504 6.52686C30.3381 6.52686 32.1301 7.30923 33.592 8.8437ZM31.6821 18.2881C32.6959 17.2356 33.204 15.9712 33.204 14.4367C33.204 12.9023 32.6959 11.6402 31.6821 10.6157C30.6683 9.56321 29.4143 9.05094 27.9224 9.05094C26.4306 9.05094 25.1489 9.56321 24.1328 10.6157C23.1189 11.6379 22.6109 12.9023 22.6109 14.4367C22.6109 15.9712 23.1189 17.2333 24.1328 18.2881C25.1466 19.3103 26.4006 19.8225 27.9224 19.8225C29.4443 19.8225 30.6683 19.3103 31.6821 18.2881Z",fill:n}),g.jsx("path",{d:"M51.5798 8.8437C53.0416 10.3782 53.7875 12.2433 53.7875 14.4391C53.7875 16.6348 53.0416 18.5302 51.5798 20.0647C50.1179 21.5992 48.3282 22.3513 46.2382 22.3513C43.7625 22.3513 41.8827 21.3593 40.5987 19.3731V27.9769H38.0029V6.91804H40.5987V9.505C41.8827 7.51879 43.7602 6.52686 46.2382 6.52686C48.3258 6.52686 50.1179 7.30923 51.5798 8.8437ZM49.6699 18.2881C50.6837 17.2356 51.1918 15.9712 51.1918 14.4367C51.1918 12.9023 50.6837 11.6402 49.6699 10.6157C48.6561 9.56321 47.4021 9.05094 45.9102 9.05094C44.4184 9.05094 43.1367 9.56321 42.1206 10.6157C41.1067 11.6379 40.5987 12.9023 40.5987 14.4367C40.5987 15.9712 41.1067 17.2333 42.1206 18.2881C43.1344 19.3103 44.3884 19.8225 45.9102 19.8225C47.4321 19.8225 48.6561 19.3103 49.6699 18.2881Z",fill:n}),g.jsx("path",{d:"M55.5449 21.96V0H58.1407V21.96H55.5449Z",fill:n}),g.jsx("path",{d:"M60.3188 2.43569C60.3188 1.47402 61.0948 0.661377 62.0786 0.661377C63.0624 0.661377 63.8083 1.47402 63.8083 2.43569C63.8083 3.39736 63.0324 4.17973 62.0786 4.17973C61.1248 4.17973 60.3188 3.39736 60.3188 2.43569ZM60.7669 21.9578V6.91803H63.3626V21.9578H60.7669Z",fill:n}),g.jsx("path",{d:"M67.8354 20.095C66.3436 18.5605 65.5977 16.6954 65.5977 14.4391C65.5977 12.1828 66.3436 10.3176 67.8354 8.81343C69.3273 7.27896 71.2071 6.52686 73.4449 6.52686C76.3986 6.52686 78.8743 8.06133 80.0382 10.4667L77.8605 11.731C77.1145 10.136 75.4425 9.08354 73.4449 9.08354C71.9531 9.08354 70.6991 9.59581 69.6853 10.618C68.7015 11.6402 68.1934 12.9046 68.1934 14.4391C68.1934 15.9735 68.7015 17.2076 69.6853 18.2299C70.6991 19.2521 71.9531 19.7643 73.4449 19.7643C75.4448 19.7643 77.1145 18.7421 77.9505 17.1471L80.1583 18.4394C78.8766 20.8168 76.3386 22.349 73.4449 22.349C71.2071 22.349 69.3273 21.5969 67.8354 20.0927V20.095Z",fill:n}),g.jsx("path",{d:"M94.2686 6.91793H96.8643V21.9577H94.2686V19.3707C92.9869 21.3569 91.107 22.3488 88.6314 22.3488C86.5437 22.3488 84.7516 21.5967 83.2898 20.0623C81.828 18.5278 81.082 16.6324 81.082 14.4366C81.082 12.2409 81.828 10.3757 83.2898 8.84126C84.7516 7.30679 86.5414 6.52441 88.6314 6.52441C91.107 6.52441 92.9869 7.51635 94.2686 9.50256V6.9156V6.91793ZM92.7467 18.288C93.7605 17.2355 94.2686 15.9711 94.2686 14.4366C94.2686 12.9022 93.7605 11.6401 92.7467 10.6156C91.7329 9.5631 90.4789 9.05083 88.957 9.05083C87.4351 9.05083 86.2112 9.5631 85.1973 10.6156C84.1835 11.6378 83.6755 12.9022 83.6755 14.4366C83.6755 15.9711 84.1835 17.2331 85.1973 18.288C86.2112 19.3102 87.4652 19.8224 88.957 19.8224C90.4489 19.8224 91.7306 19.3102 92.7467 18.288Z",fill:n}),g.jsx("path",{d:"M0.836162 48.9264L3.22406 47.5432C4.03003 50.0999 5.90986 51.3643 8.80351 51.3643C11.6972 51.3643 13.219 50.072 13.219 48.116C13.219 47.1241 12.8311 46.372 12.0851 45.8597C11.3392 45.3475 10.0575 44.8375 8.29545 44.2647L6.29553 43.6034C5.84751 43.4218 5.25169 43.1517 4.56581 42.8211C3.87992 42.4601 3.37186 42.0992 3.04393 41.7383C2.35804 40.9862 1.72989 39.7521 1.72989 38.22C1.72989 36.3851 2.35573 34.9414 3.63975 33.889C4.92376 32.8062 6.47335 32.2637 8.29314 32.2637C11.6048 32.2637 14.1405 34.0985 15.3645 36.8648L13.0366 38.2176C12.1406 36.0521 10.561 34.9694 8.29314 34.9694C6.02533 34.9694 4.50345 36.1732 4.50345 38.0989C4.50345 39.0303 4.83139 39.7242 5.48725 40.2038C6.14311 40.6858 7.27702 41.1958 8.88896 41.708L10.1129 42.0992C10.3508 42.19 10.7088 42.3088 11.2168 42.5207C12.2607 42.9119 12.5008 43.0609 13.3045 43.5126C14.1405 43.9643 14.4084 44.295 14.9164 44.8957C15.6624 45.6478 15.9603 46.7306 15.9603 48.0532C15.9603 49.888 15.3044 51.362 13.9604 52.475C12.6186 53.5577 10.8866 54.1003 8.73885 54.1003C4.83139 54.1003 1.93773 52.1443 0.831543 48.9264H0.836162Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M25.089 54.1001C22.9112 54.1001 21.0314 53.348 19.5095 51.8135C17.9876 50.279 17.2417 48.4139 17.2417 46.1878C17.2417 43.9618 17.9876 42.0967 19.5095 40.5622C21.0314 39.0277 22.9112 38.2756 25.089 38.2756C27.2667 38.2756 29.1465 39.0277 30.6684 40.5622C32.1903 42.0967 32.9663 43.9618 32.9663 46.1878C32.9663 48.4139 32.1903 50.279 30.6684 51.8135C29.1465 53.348 27.2667 54.1001 25.089 54.1001ZM28.8486 50.0089C29.8624 48.9867 30.3705 47.7223 30.3705 46.1878C30.3705 44.6534 29.8624 43.3913 28.8486 42.3668C27.8348 41.3446 26.5808 40.8323 25.089 40.8323C23.5971 40.8323 22.3731 41.3446 21.3593 42.3668C20.3455 43.389 19.8374 44.6534 19.8374 46.1878C19.8374 47.7223 20.3455 48.9844 21.3593 50.0089C22.3731 51.0311 23.6271 51.5434 25.089 51.5434C26.5508 51.5434 27.8348 51.0311 28.8486 50.0089Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M42.5409 34.7877C39.9151 34.5782 38.6034 35.7215 38.6034 38.2176V38.6693H42.5409V41.1958H38.6034V53.7091H36.0077V41.1958H33.6221V38.6693H36.0077V38.2176C36.0077 34.1567 38.3355 31.9912 42.5409 32.2613V34.7877Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M52.7718 41.1958H48.8043V49.3478C48.8043 51.6647 50.116 51.4831 52.7718 51.3643V53.7114C48.2362 54.3122 46.2086 53.0804 46.2086 49.3502V41.1981H43.2549V38.6717H46.2086V35.2418L48.8043 34.4595V38.6717H52.7718V41.1981V41.1958Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M72.9095 38.6692H75.6254L71.002 53.7089H68.3462L64.8544 42.5787L61.3627 53.7089H58.7069L54.0835 38.6692H56.797L60.0786 50.0998L63.5981 38.6692H66.1038L69.6233 50.13L72.9049 38.6692H72.9095Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M88.5694 38.6692H91.1651V53.7089H88.5694V51.1219C87.2876 53.1081 85.4078 54.1001 82.9322 54.1001C80.8445 54.1001 79.0524 53.348 77.5906 51.8135C76.1287 50.279 75.3828 48.3836 75.3828 46.1878C75.3828 43.9921 76.1287 42.127 77.5906 40.5925C79.0524 39.058 80.8422 38.2756 82.9322 38.2756C85.4078 38.2756 87.2876 39.2676 88.5694 41.2538V38.6668V38.6692ZM87.0475 50.0392C88.0613 48.9867 88.5694 47.7223 88.5694 46.1878C88.5694 44.6534 88.0613 43.3913 87.0475 42.3668C86.0337 41.3143 84.7797 40.802 83.2578 40.802C81.7359 40.802 80.5119 41.3143 79.4981 42.3668C78.4843 43.389 77.9762 44.6534 77.9762 46.1878C77.9762 47.7223 78.4843 48.9844 79.4981 50.0392C80.5119 51.0614 81.7659 51.5737 83.2578 51.5737C84.7496 51.5737 86.0313 51.0614 87.0475 50.0392Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M96.8023 41.1957C97.6683 39.3306 99.2202 38.3992 101.456 38.3992V41.1375C100.172 41.0769 99.0978 41.4076 98.1741 42.1597C97.2503 42.9118 96.8023 44.0853 96.8023 45.7386V53.709H94.2065V38.6693H96.8023V41.1957Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M104.409 47.3918C104.917 50.0696 106.975 51.6343 109.809 51.6343C111.778 51.6343 113.21 50.9125 114.104 49.4385L116.312 50.7029C114.85 52.9592 112.672 54.1025 109.748 54.1025C107.391 54.1025 105.453 53.3504 103.961 51.8765C102.499 50.3723 101.753 48.4769 101.753 46.1903C101.753 43.9037 102.469 42.0386 103.931 40.5344C105.393 39.0302 107.273 38.2781 109.568 38.2781C111.746 38.2781 113.536 39.0604 114.91 40.6252C116.312 42.1597 116.998 44.0248 116.998 46.2206C116.998 46.6117 116.968 47.0029 116.908 47.3941H104.407L104.409 47.3918ZM104.409 45.1052H114.374C113.926 42.2482 111.956 40.7439 109.571 40.7439C106.797 40.7439 104.857 42.4577 104.409 45.1052Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M22.1377 69.1726V70.4369C22.1377 73.1752 21.2116 75.4595 19.3341 77.2943C17.4542 79.0989 14.9786 80.0024 11.9048 80.0024C8.83102 80.0024 6.08748 78.9499 3.99749 76.8449C1.93983 74.7097 0.895996 72.1228 0.895996 69.0841C0.895996 66.0454 1.93983 63.4584 3.99749 61.3535C6.08517 59.2182 8.71093 58.1658 11.8448 58.1658C13.7846 58.1658 15.5444 58.6478 17.1563 59.5792C18.7683 60.5106 20.02 61.7144 20.886 63.2489L18.4981 64.6623C17.3041 62.3757 14.7084 60.8715 11.8147 60.8715C9.42684 60.8715 7.45925 61.6539 5.93737 63.2489C4.41549 64.8136 3.63954 66.7695 3.63954 69.0841C3.63954 71.3986 4.41549 73.3545 5.93737 74.9193C7.48927 76.484 9.48688 77.2664 11.9348 77.2664C16.1102 77.2664 18.796 74.9798 19.3641 71.7013H11.697V69.1749H22.14L22.1377 69.1726Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M34.636 64.5691H37.2317V79.6088H34.636V77.4433C33.5921 79.1571 31.9802 80 29.8024 80C26.3107 80 24.0151 77.6226 24.0151 73.8039V64.5691H26.6109V73.6525C26.6109 76.0881 28.0127 77.5039 30.3105 77.5039C32.9062 77.5039 34.636 75.9089 34.636 72.5395V64.5691Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M42.4209 67.0956C43.287 65.2305 44.8389 64.2991 47.0743 64.2991V67.0374C45.7903 66.9768 44.7165 67.3075 43.7927 68.0596C42.869 68.8117 42.4209 69.9852 42.4209 71.6385V79.6089H39.8252V64.5692H42.4209V67.0956Z",fill:n,opacity:"0.6"}),g.jsx("path",{d:"M59.3049 64.5691H61.9007V79.6088H59.3049V77.4433C58.2611 79.1571 56.6491 80 54.4714 80C50.9796 80 48.6841 77.6226 48.6841 73.8039V64.5691H51.2798V73.6525C51.2798 76.0881 52.6816 77.5039 54.9794 77.5039C57.5752 77.5039 59.3049 75.9089 59.3049 72.5395V64.5691Z",fill:n,opacity:"0.6"})]})})},fv=({children:e,...t})=>{const n=xt();return g.jsx(or,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,...t,border:!1,boxShadow:!0,shadow:n.customShadows.z1,children:g.jsx(b.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})};fv.propTypes={children:c.node};const ea=({version:e,name:t,copy:n,children:r,background:i=dv})=>g.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[T.isValidElement(i)?i:T.createElement(i),g.jsxs(b.Grid,{container:!0,direction:"column",justifyContent:"flex-end",sx:{minHeight:"100vh"},children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{ml:3,mt:3},children:g.jsx(rc,{title:t})}),g.jsxs(b.Grid,{item:!0,xs:12,children:[g.jsx(b.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:g.jsx(b.Grid,{item:!0,children:g.jsx(fv,{children:r})})}),g.jsx(b.Grid,{item:!0,sx:{pb:1},children:g.jsx(Fs,{name:t,copy:n,version:e})})]})]})]});ea.propTypes={children:c.node,version:c.string,name:c.string,copy:c.string,background:c.oneOfType([c.node,c.func,c.object])};const gv=({name:e,copy:t,version:n,background:r})=>{const i=be.useTranslate(),s=be.useAuthProvider(),l=be.useNotify(),u=Qt.useNavigate(),{token:A}=Qt.useParams();return T.useEffect(()=>{if(typeof s.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");s.activate(A).then(()=>{l("ra.auth.activate_success",{type:"info"}),Pe.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),Pe.delay(()=>u("/login"),1e3)})},[A]),g.jsx(ea,{name:e,copy:t,version:n,background:r,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:i("ra.auth.activate")}),g.jsx(b.Typography,{component:Qt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})};gv.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const sc=({version:e,name:t,copy:n,enablePasswordRecover:r,enableRegistration:i,redirectTo:s,background:l})=>{const[u,A]=be.useSafeSetState(!1),f=be.useLogin(),p=be.useTranslate(),C=be.useNotify(),h=be.useCheckAuth(),m=Qt.useNavigate();T.useEffect(()=>{h({},!1).then(()=>{m("/")}).catch(()=>{})},[h,m]);const I=B=>{A(!0),f(B,s).then(()=>{A(!1)}).catch(y=>{A(!1),C(typeof y=="string"?y:typeof y>"u"||!y.message?"ra.auth.sign_in_error":y.message,{type:"error",messageArgs:{_:typeof y=="string"?y:y&&y.message?y.message:void 0}})})};return g.jsx(ea,{name:t,version:e,copy:n,background:l,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:"Login"}),i&&g.jsx(b.Typography,{component:Qt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:p("ra.auth.register")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(be.Form,{onSubmit:I,children:[g.jsxs(b.Grid,{container:!0,children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Hn,{autoFocus:!0,source:"username",label:p("ra.auth.username"),autoComplete:"username",validate:be.required(),placeholder:"user@company.name",fullWidth:!0})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Hn,{source:"password",label:p("ra.auth.password"),type:"password",autoComplete:"current-password",validate:be.required(),placeholder:p("ra.auth.password_placeholder"),fullWidth:!0})})]}),r&&g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:g.jsx(b.Link,{variant:"h6",component:Qt.Link,to:"/recover",color:"text.primary",children:p("ra.auth.forgot_password")})})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?g.jsx(b.CircularProgress,{size:19,thickness:3}):p("ra.auth.sign_in")})})]})})]})})};sc.propTypes={version:c.string.isRequired,name:c.string.isRequired,enablePasswordRecover:c.bool,enableRegister:c.bool,background:c.element},sc.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:g.jsx(dv,{})};const pv=({name:e,copy:t,version:n,background:r})=>{const[i,s]=T.useState(!1),l=be.useTranslate(),u=be.useRedirect(),A=be.useNotify(),f=be.useAuthProvider(),p=({email:C})=>{s(!0),f.recover(C).then(h=>{const m=`ra.auth.recover_${h.responseCode}`,I=h.responseCode==="ok"?"info":"error";A(m,{type:I}),u("/login")}).catch(h=>{A(h,{type:"error"})}).finally(()=>s(!1))};return g.jsx(ea,{name:e,copy:t,version:n,background:r,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:l("ra.auth.recover.title")}),g.jsx(b.Typography,{component:Qt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.back_to_login")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(M.Form,{onSubmit:p,children:[g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"email",validate:[be.required(),be.email()]})})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:g.jsx(b.Typography,{variant:"caption",children:l("ra.auth.recover.inbox_help")})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?g.jsx(b.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})};pv.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const hv=({name:e,copy:t,version:n})=>{const[r,i]=T.useState(!1),s=be.useTranslate(),l=be.useRedirect(),u=be.useNotify(),A=be.useAuthProvider(),f=p=>{i(!0),A.register(p).then(C=>{const h=`ra.auth.register_${C.responseCode}`,m=C.responseCode==="ok"?"info":"error";u(h,{type:m}),l("/login")}).catch(C=>{u(C,{type:"error"})}).finally(()=>i(!1))};return g.jsx(ea,{name:e,copy:t,version:n,children:g.jsxs(b.Grid,{container:!0,spacing:3,children:[g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[g.jsx(b.Typography,{variant:"h3",children:s("ra.auth.register.title")}),g.jsx(b.Typography,{component:Qt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.already_have_account")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(M.Form,{onSubmit:f,children:[g.jsxs(b.Grid,{container:!0,children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"name",label:s("ra.register.name"),validate:be.required()})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"email",type:"email",validate:[be.required(),be.email()]})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Hn,{source:"password",type:"password",validate:be.required()})})]}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:g.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:r,fullWidth:!0,children:r?g.jsx(b.CircularProgress,{size:19,thickness:3}):s("ra.auth.create_account")})})]})})]})})};hv.propTypes={name:c.string.isRequired,version:c.string.isRequired};const U2=e=>({button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${Ve(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${Ve(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${Ve(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${Ve(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${Ve(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${Ve(e.palette.info.main,.2)}`,success:`0 0 0 2px ${Ve(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${Ve(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${Ve(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${Ve(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${Ve(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${Ve(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${Ve(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${Ve(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${Ve(e.palette.grey[500],.2)}`});function Kn(e,t){G2(e)&&(e="100%");var n=Y2(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function G2(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Y2(e){return typeof e=="string"&&e.indexOf("%")!==-1}function K2(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ac(e){return e<=1?"".concat(Number(e)*100,"%"):e}function yf(e){return e.length===1?"0"+e:String(e)}function _2(e,t,n){return{r:Kn(e,255)*255,g:Kn(t,255)*255,b:Kn(n,255)*255}}function bf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function J2(e,t,n){var r,i,s;if(e=Kn(e,360),t=Kn(t,100),n=Kn(n,100),t===0)i=n,s=n,r=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=bf(u,l,e+1/3),i=bf(u,l,e),s=bf(u,l,e-1/3)}return{r:r*255,g:i*255,b:s*255}}function X2(e,t,n){e=Kn(e,255),t=Kn(t,255),n=Kn(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),s=0,l=r,u=r-i,A=r===0?0:u/r;if(r===i)s=0;else{switch(r){case e:s=(t-n)/u+(t<n?6:0);break;case t:s=(n-e)/u+2;break;case n:s=(e-t)/u+4;break}s/=6}return{h:s,s:A,v:l}}function Z2(e,t,n){e=Kn(e,360)*6,t=Kn(t,100),n=Kn(n,100);var r=Math.floor(e),i=e-r,s=n*(1-t),l=n*(1-i*t),u=n*(1-(1-i)*t),A=r%6,f=[n,l,s,s,u,n][A],p=[u,n,n,l,s,s][A],C=[s,s,u,n,n,l][A];return{r:f*255,g:p*255,b:C*255}}function q2(e,t,n,r){var i=[yf(Math.round(e).toString(16)),yf(Math.round(t).toString(16)),yf(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Cv(e){return Sn(e)/255}function Sn(e){return parseInt(e,16)}var Ev={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ta(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,s=null,l=!1,u=!1;return typeof e=="string"&&(e=tF(e)),typeof e=="object"&&(kr(e.r)&&kr(e.g)&&kr(e.b)?(t=_2(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):kr(e.h)&&kr(e.s)&&kr(e.v)?(r=ac(e.s),i=ac(e.v),t=Z2(e.h,r,i),l=!0,u="hsv"):kr(e.h)&&kr(e.s)&&kr(e.l)&&(r=ac(e.s),s=ac(e.l),t=J2(e.h,r,s),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=K2(n),{ok:l,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var $2="[-\\+]?\\d+%?",eF="[-\\+]?\\d*\\.\\d+%?",go="(?:".concat(eF,")|(?:").concat($2,")"),Qf="[\\s|\\(]+(".concat(go,")[,|\\s]+(").concat(go,")[,|\\s]+(").concat(go,")\\s*\\)?"),xf="[\\s|\\(]+(".concat(go,")[,|\\s]+(").concat(go,")[,|\\s]+(").concat(go,")[,|\\s]+(").concat(go,")\\s*\\)?"),ir={CSS_UNIT:new RegExp(go),rgb:new RegExp("rgb"+Qf),rgba:new RegExp("rgba"+xf),hsl:new RegExp("hsl"+Qf),hsla:new RegExp("hsla"+xf),hsv:new RegExp("hsv"+Qf),hsva:new RegExp("hsva"+xf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function tF(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ev[e])e=Ev[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ir.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ir.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ir.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ir.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ir.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ir.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ir.hex8.exec(e),n?{r:Sn(n[1]),g:Sn(n[2]),b:Sn(n[3]),a:Cv(n[4]),format:t?"name":"hex8"}:(n=ir.hex6.exec(e),n?{r:Sn(n[1]),g:Sn(n[2]),b:Sn(n[3]),format:t?"name":"hex"}:(n=ir.hex4.exec(e),n?{r:Sn(n[1]+n[1]),g:Sn(n[2]+n[2]),b:Sn(n[3]+n[3]),a:Cv(n[4]+n[4]),format:t?"name":"hex8"}:(n=ir.hex3.exec(e),n?{r:Sn(n[1]+n[1]),g:Sn(n[2]+n[2]),b:Sn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function kr(e){return!!ir.CSS_UNIT.exec(String(e))}var lc=2,mv=.16,nF=.05,rF=.05,oF=.15,Iv=5,Bv=4,iF=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function vv(e){var t=e.r,n=e.g,r=e.b,i=X2(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function cc(e){var t=e.r,n=e.g,r=e.b;return"#".concat(q2(t,n,r,!1))}function sF(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function yv(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-lc*t:Math.round(e.h)+lc*t:r=n?Math.round(e.h)+lc*t:Math.round(e.h)-lc*t,r<0?r+=360:r>=360&&(r-=360),r}function bv(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-mv*t:t===Bv?r=e.s+mv:r=e.s+nF*t,r>1&&(r=1),n&&t===Iv&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Qv(e,t,n){var r;return n?r=e.v+rF*t:r=e.v-oF*t,r>1&&(r=1),Number(r.toFixed(2))}function xv(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ta(e),i=Iv;i>0;i-=1){var s=vv(r),l=cc(ta({h:yv(s,i,!0),s:bv(s,i,!0),v:Qv(s,i,!0)}));n.push(l)}n.push(cc(r));for(var u=1;u<=Bv;u+=1){var A=vv(r),f=cc(ta({h:yv(A,u),s:bv(A,u),v:Qv(A,u)}));n.push(f)}return t.theme==="dark"?iF.map(function(p){var C=p.index,h=p.opacity,m=cc(sF(ta(t.backgroundColor||"#141414"),ta(n[C]),h*100));return m}):n}var wf={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Jt={},uc={};Object.keys(wf).forEach(function(e){Jt[e]=xv(wf[e]),Jt[e].primary=Jt[e][5],uc[e]=xv(wf[e],{theme:"dark",backgroundColor:"#141414"}),uc[e].primary=uc[e][5]}),Jt.red,Jt.volcano,Jt.gold,Jt.orange,Jt.yellow,Jt.lime,Jt.green,Jt.cyan,Jt.blue,Jt.geekblue,Jt.purple,Jt.magenta,Jt.grey,Jt.grey;const wv=e=>{const{blue:t,red:n,gold:r,cyan:i,green:s,grey:l}=e,u={0:l[0],50:l[1],100:l[2],200:l[3],300:l[4],400:l[5],500:l[6],600:l[7],700:l[8],800:l[9],900:l[10],A50:l[15],A100:l[11],A200:l[12],A400:l[13],A700:l[14],A800:l[16]},A="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:A},secondary:{lighter:u[100],100:u[100],200:u[200],light:u[300],400:u[400],main:u[500],600:u[600],dark:u[700],800:u[800],darker:u[900],A100:u[0],A200:u.A400,A300:u.A700,contrastText:u[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:A},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:u[100]},info:{lighter:i[0],light:i[3],main:i[5],dark:i[7],darker:i[9],contrastText:A},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:A},grey:u}};wv.propTypes={colors:c.object};const aF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],l=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],u=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],A=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],f=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],l=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],u=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],A=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],f=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},lF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},cF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},uF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},AF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},dF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},fF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},gF=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},i="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],l=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],u=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],f=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],l=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],u=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],f=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:i},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:l[0],light:l[1],main:l[2],dark:l[3],darker:l[4],contrastText:i},warning:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:i},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:i},grey:r}},Tv=(e,t,n)=>{switch(t){case"theme1":return aF(e,n);case"theme2":return lF(e,n);case"theme3":return cF(e,n);case"theme4":return uF(e,n);case"theme5":return AF(e,n);case"theme6":return dF(e,n);case"theme7":return fF(e,n);case"theme8":return gF(e,n);default:return wv(e)}};Tv.propTypes={colors:c.object,presetColor:c.any};const pF=(e,t)=>{const n=e==="dark"?uc:Jt;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],i=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],i=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...i,...s];const l=Tv(n,t,e);return ju({palette:{mode:e,common:{black:"#000",white:"#fff"},...l,text:{primary:e==="dark"?Ve(l.grey[900],.87):l.grey[700],secondary:e==="dark"?Ve(l.grey[900],.45):l.grey[500],disabled:e==="dark"?Ve(l.grey[900],.1):l.grey[400]},action:{disabled:l.grey[300]},divider:e==="dark"?Ve(l.grey[900],.05):l.grey[200],background:{paper:e==="dark"?l.grey[100]:l.grey[0],default:l.grey.A50}}})},hF=e=>({htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}});function CF(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function EF(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function mF(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:g.jsx(tt.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function No({color:e,theme:t}){const n=en(t,e),{lighter:r,light:i,main:s}=n;return{borderColor:Ve(i,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function IF(e){const t=No({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":No({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":No({color:"secondary",theme:e}),"&.MuiAlert-borderError":No({color:"error",theme:e}),"&.MuiAlert-borderSuccess":No({color:"success",theme:e}),"&.MuiAlert-borderInfo":No({color:"info",theme:e}),"&.MuiAlert-borderWarning":No({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function BF(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function vF(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Vo({color:e,theme:t}){const n=en(t,e),{lighter:r,main:i}=n;return{color:i,backgroundColor:r}}function yF(e){const t=Vo({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Vo({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Vo({color:"secondary",theme:e}),"&.MuiBadge-colorError":Vo({color:"error",theme:e}),"&.MuiBadge-colorInfo":Vo({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Vo({color:"success",theme:e}),"&.MuiBadge-colorWarning":Vo({color:"warning",theme:e})}}}}}function $e({variant:e,color:t,theme:n}){const r=en(n,t),{lighter:i,main:s,dark:l,contrastText:u}=r,A=`${t}Button`,f=yi(n,A),p={"&::after":{boxShadow:`0 0 5px 5px ${Ve(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ve(s,.9)}`},"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:l},...p};case"shadow":return{color:u,backgroundColor:s,boxShadow:f,"&:hover":{boxShadow:"none",backgroundColor:l},...p};case"outlined":return{borderColor:s,"&:hover":{color:l,backgroundColor:"transparent",borderColor:l},...p};case"dashed":return{color:s,borderColor:s,backgroundColor:i,"&:hover":{color:l,borderColor:l},...p};case"text":default:return{"&:hover":{color:l,backgroundColor:i},...p}}}function bF(e){const t=$e({variant:"dashed",color:"primary",theme:e}),n=$e({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},i={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...i},startIcon:{...i},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":$e({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":$e({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":$e({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":$e({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":$e({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":$e({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":$e({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":$e({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":$e({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":$e({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":$e({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":$e({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:$e({variant:"contained",color:"primary",theme:e}),containedSecondary:$e({variant:"contained",color:"secondary",theme:e}),containedError:$e({variant:"contained",color:"error",theme:e}),containedSuccess:$e({variant:"contained",color:"success",theme:e}),containedInfo:$e({variant:"contained",color:"info",theme:e}),containedWarning:$e({variant:"contained",color:"warning",theme:e}),outlinedPrimary:$e({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:$e({variant:"outlined",color:"secondary",theme:e}),outlinedError:$e({variant:"outlined",color:"error",theme:e}),outlinedSuccess:$e({variant:"outlined",color:"success",theme:e}),outlinedInfo:$e({variant:"outlined",color:"info",theme:e}),outlinedWarning:$e({variant:"outlined",color:"warning",theme:e}),textPrimary:$e({variant:"text",color:"primary",theme:e}),textSecondary:$e({variant:"text",color:"secondary",theme:e}),textError:$e({variant:"text",color:"error",theme:e}),textSuccess:$e({variant:"text",color:"success",theme:e}),textInfo:$e({variant:"text",color:"info",theme:e}),textWarning:$e({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function QF(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function xF(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function wF(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Vi({color:e,theme:t}){const n=en(t,e),{lighter:r,main:i,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:i}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function TF(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function Tf(e){const t=TF(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function PF(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:g.jsx(tt.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:g.jsx(tt.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Tf("small")},"&.size-medium":{...Tf("medium")},"&.size-large":{...Tf("large")}},colorPrimary:Vi({color:"primary",theme:e}),colorSecondary:Vi({color:"secondary",theme:e}),colorSuccess:Vi({color:"success",theme:e}),colorWarning:Vi({color:"warning",theme:e}),colorInfo:Vi({color:"info",theme:e}),colorError:Vi({color:"error",theme:e})}}}}function Hi({color:e,theme:t}){const n=en(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function On({color:e,theme:t}){const n=en(t,e),{light:r,lighter:i,main:s}=n;return{color:s,backgroundColor:i,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function SF(e){const t=On({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Hi({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Hi({color:"secondary",theme:e}),"&.MuiChip-colorError":Hi({color:"error",theme:e}),"&.MuiChip-colorInfo":Hi({color:"info",theme:e}),"&.MuiChip-colorSuccess":Hi({color:"success",theme:e}),"&.MuiChip-colorWarning":Hi({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":On({color:"primary",theme:e}),"&.MuiChip-lightSecondary":On({color:"secondary",theme:e}),"&.MuiChip-lightError":On({color:"error",theme:e}),"&.MuiChip-lightInfo":On({color:"info",theme:e}),"&.MuiChip-lightSuccess":On({color:"success",theme:e}),"&.MuiChip-lightWarning":On({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":On({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":On({color:"secondary",theme:e}),"&.MuiChip-combinedError":On({color:"error",theme:e}),"&.MuiChip-combinedInfo":On({color:"info",theme:e}),"&.MuiChip-combinedSuccess":On({color:"success",theme:e}),"&.MuiChip-combinedWarning":On({color:"warning",theme:e})}}}}}function OF(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:Ve("#000",.7)}}}}}}function MF(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function DF(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function zi({color:e,theme:t}){const n=en(t,e),{main:r,dark:i,contrastText:s}=n,l=`${e}Button`,u=yi(t,l);return{color:s,backgroundColor:r,boxShadow:u,"&:hover":{boxShadow:"none",backgroundColor:i},"&:focus-visible":{outline:`2px solid ${i}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${Ve(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${Ve(r,.9)}`}}}function RF(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":zi({color:"primary",theme:e}),"&.MuiFab-secondary":zi({color:"secondary",theme:e}),"&.Mui-error":zi({color:"error",theme:e}),"&.MuiFab-success":zi({color:"success",theme:e}),"&.MuiFab-info":zi({color:"info",theme:e}),"&.MuiFab-warning":zi({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function jF(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function kF(){return{MuiInputBase:{styleOverrides:{}}}}function FF(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function LF(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function NF(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function VF(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function HF(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function zF(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function WF(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Ho({variant:e,theme:t}){const n=en(t,e),{light:r}=n,i=yi(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:i,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function UF(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...Ho({variant:"primary",theme:e}),"&.Mui-error":{...Ho({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:Ho({variant:"secondary",theme:e}),colorError:Ho({variant:"error",theme:e}),colorWarning:Ho({variant:"warning",theme:e}),colorInfo:Ho({variant:"info",theme:e}),colorSuccess:Ho({variant:"success",theme:e})}}}}function GF(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function vt({variant:e,color:t,theme:n}){const r=en(n,t),{lighter:i,light:s,dark:l,main:u,contrastText:A}=r,f={"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:A,backgroundColor:u,"&:hover":{backgroundColor:s},...f};case"outlined":return{borderColor:u,"&:hover":{backgroundColor:i,borderColor:s},...f};case"text":default:return{color:u,"&:hover":{backgroundColor:u,color:i},...f}}}function YF(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":vt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":vt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":vt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":vt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":vt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":vt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":vt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":vt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":vt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":vt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":vt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":vt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":vt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":vt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":vt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":vt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":vt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":vt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":vt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":vt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":vt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":vt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":vt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":vt({variant:"outlined",color:"warning",theme:e})}}}}}}function KF(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Wi({color:e,theme:t}){const n=en(t,e),{lighter:r,main:i,dark:s}=n;return{"& .dot":{backgroundColor:i},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function _F(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function Pf(e){const t=_F(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function JF(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:g.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:g.jsx(b.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...Pf("small")},"&.size-medium":{...Pf("medium")},"&.size-large":{...Pf("large")}},colorPrimary:Wi({color:"primary",theme:e}),colorSecondary:Wi({color:"secondary",theme:e}),colorSuccess:Wi({color:"success",theme:e}),colorWarning:Wi({color:"warning",theme:e}),colorInfo:Wi({color:"info",theme:e}),colorError:Wi({color:"error",theme:e})}}}}function Ui({color:e,theme:t}){const n=en(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function XF(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":Ui({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Ui({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Ui({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Ui({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Ui({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Ui({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function ZF(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function Sf(e,t){const n=ZF(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function qF(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...Sf(e,"medium")},sizeLarge:{...Sf(e,"large")},sizeSmall:{...Sf(e,"small")}}}}}function $F(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function eL(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function tL(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function nL(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function rL(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function oL(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function iL(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function sL(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function aL(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function lL(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function cL(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function uL(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function AL(e){return at.merge(CF(e),EF(e),mF(e),IF(e),BF(),vF(e),yF(e),bF(e),QF(),xF(),wF(),PF(e),SF(e),OF(),MF(e),DF(),RF(e),jF(e),kF(),FF(e),LF(),NF(),VF(e),HF(e),zF(),WF(),UF(e),GF(),YF(e),KF(e),JF(e),XF(e),qF(e),$F(e),eL(e),tL(e),nL(e),rL(e),oL(),iL(),sL(),aL(e),lL(e),cL(),uL())}const Of=({themeOverrides:e,children:t})=>{const{themeDirection:n,mode:r,presetColor:i,fontFamily:s}=Qn(),l=T.useMemo(()=>pF(r,i),[r,i]),u=T.useMemo(()=>hF(s),[s]),A=T.useMemo(()=>U2(l),[l]),f=T.useMemo(()=>Pe.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:n,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:l.palette,customShadows:A,typography:u,shadows:l.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:l.spacing(2.6875),height:l.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(l):e),[n,l,u,A,e]),p=ju(f),C=Pe.cloneDeep(p.components??{});return p.components=Pe.merge(AL(p),C),g.jsx(b.StyledEngineProvider,{injectFirst:!0,children:g.jsxs($p,{theme:p,children:[g.jsx(b.CssBaseline,{}),t]})})};Of.propTypes={children:c.node,themeOverrides:c.oneOfType([c.object,c.func])};const Pv=({children:e,theme:t,...n})=>g.jsx(M.CoreAdminContext,{...n,children:g.jsx(Of,{themeOverrides:t,children:g.jsx(pf,{children:e})})});Pv.displayName="ApplicaAdminContext";const Gi=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:i,dataProvider:s,disableTelemetry:l,history:u,i18nProvider:A,layout:f,loading:p,loginPage:C,authCallbackPage:h,menu:m,notification:I,queryClient:B,requireAuth:y,store:O,ready:j,theme:x,title:S="React Admin"}=e;return g.jsx(Pv,{authProvider:t,dataProvider:s,i18nProvider:A,store:O,history:u,queryClient:B,theme:x,children:g.jsx(M.AdminUI,{layout:f,dashboard:i,disableTelemetry:l,menu:m,catchAll:n,title:S,loading:p,loginPage:C,authCallbackPage:h,notification:I,requireAuth:y,ready:j,children:r})})};Gi.defaultProps={store:M.localStorageStore(),title:"Applica Admin"},Gi.propTypes={...M.AdminUI.propTypes};class Sv{constructor({catch:t,display:n,log:r,error:i}){va(this,"catch");va(this,"display");va(this,"log");va(this,"error");this.catch=t,this.display=n,this.log=r,this.error=i}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const dL=({apiUrl:e,endpoint:t,message:n,bodyBuilder:r})=>fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(r(n))}),fL=({enabled:e=!0,apiUrl:t,endpoint:n="/ui-errors/put",loading:r,catcherFn:i=l=>new Sv({catch:l!=null,display:!1,log:!1}),bodyBuilder:s=l=>({message:l})})=>(V.useMemo(()=>{if(r||!e)return;const l=console.error;console.error=function(u,...A){if(!u||typeof u!="string"){l.apply(console,arguments);return}const f=u.replace(/%s/g,()=>A.shift()),p=i(f);if(!p.isCatched()){l.apply(console,arguments);return}p.logError()&&dL({apiUrl:t,endpoint:n,message:f,bodyBuilder:s}),p.displayError()?l.apply(console,arguments):console.debug.apply(console,arguments)}},[t,r,s,n,i,e]),!0),Mf=({languages:e,defaultLocale:t,allowMissing:n=!1})=>sQ(r=>at.get(e,r,{}),t,[{locale:t}],{allowMissing:n}),Ov=[],gL=({apiUrl:e,endpoint:t,locale:n,message:r,bodyBuilder:i})=>r!=null&&r!=="undefined"&&r.indexOf("[")===-1&&r.indexOf("]")===-1&&Ov.indexOf(`${n}-${r}`)===-1&&Ov.push(`${n}-${r}`)&&fetch(`${e}${t}`,{method:"PUT",headers:new Headers({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(i(n,r)||{})}),Mv=({apiUrl:e,enabled:t=!0,endpoint:n="/languages/put-message",loading:r,bodyBuilder:i=(s,l)=>({lang:s,code:l,text:l})})=>{const[s]=M.useLocaleState();return V.useMemo(()=>{if(r||!t)return;const l=console.error;console.error=function(u){if(!(typeof u=="string"&&u==="%c%s")){if(typeof u=="string"&&u.indexOf("Missing translation for key: ")>=0){if(u=u.replace("Warning: Missing translation for key: ",""),u=u.split('"').join("").trim(),u===null||u.indexOf(" ")!==-1||u.indexOf(".")===-1)return;const A=localStorage.getItem("locale")||s;gL({apiUrl:e,endpoint:n,locale:A,message:u,bodyBuilder:i});return}l.apply(console,arguments)}}},[e,s,r,i,n,t]),!0};window.React=T;const Dv=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,i]=T.useState({loading:!0,languages:null});return T.useEffect(()=>{let s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(l=>l.json()).then(l=>i({loading:!1,...n(l)}))},[e,t,n]),r},pL=({apiUrl:e,locale:t="en",languages:n={}})=>Mf({apiUrl:e,locale:t,languages:n}),hL=e=>e.reduce((t,n)=>({...t,[n.lang]:{...t[n.lang]||{},[n.code]:n.text}}),{}),CL=(e,t)=>({lang:e,code:t,text:t}),EL=new au.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Df=({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r,development:i,logoMain:s,logoIcon:l,loginPage:u,menu:A,name:f,copy:p,version:C,dataProvider:h,authProvider:m,notification:I,enableNotification:B,enableRegistration:y,enablePasswordRecover:O,...j})=>{const x=Dv({apiUrl:n,endpoint:"/i18n/messages",mapper:hL});Mv({bodyBuilder:CL,apiUrl:n,endpoint:"/i18n/message",loading:x==null?void 0:x.loading,enabled:i}),fL({apiUrl:n,endpoint:"/cli/error",catcherFn:k=>{const _=k==null?void 0:k.toString(),G=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>."].some(le=>_==null?void 0:_.includes(le));return new Sv({catch:G,display:!G,log:!G,error:k})}});const S=T.useMemo(()=>T.isValidElement(u)?T.cloneElement(u,{name:f,copy:p,version:C,enableRegistration:y,enablePasswordRecover:O}):u,[u,f,C,p,y,O]),P=T.useMemo(()=>k=>{const _=f?g.jsx(rc,{title:f}):s,X=f?g.jsx(hf,{title:f}):l;return g.jsx(qB,{...k,name:f,copy:p,version:C,logoMain:_,logoIcon:X,notification:I,enableNotification:B})},[s,l,f,C,I,B]);if(x!=null&&x.loading)return null;const N=Mf({languages:x,defaultLocale:r,allowMissing:i});return g.jsx(Nu,{children:g.jsx(Wu,{menu:A,children:g.jsx(Hu,{initialConfig:t,children:g.jsx(Gi,{theme:e,layout:P,notification:av,queryClient:EL,dataProvider:h,authProvider:m,i18nProvider:N,loginPage:S,...j})})})})};Df.defaultProps={...Gi.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:g.jsx(sc,{version:"0.0.0",name:"Applica",redirectTo:"/"})},Df.propTypes={...Gi.propTypes,theme:c.oneOfType([c.object,c.func]),apiUrl:c.string.isRequired,defaultLocale:c.string,development:c.bool,logoMain:c.node,logoIcon:c.node,menu:c.arrayOf(fi),name:c.string,version:c.string,authProvider:c.oneOfType([c.func,c.object]),dataProvider:c.oneOfType([c.func,c.object]),notification:c.string,enableNotification:c.bool,enableRegistration:c.bool,enableForgotPassword:c.bool},Object.defineProperty(R,"ArrayInputContext",{enumerable:!0,get:()=>M.ArrayInputContext}),Object.defineProperty(R,"BooleanField",{enumerable:!0,get:()=>M.BooleanField}),Object.defineProperty(R,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>M.BulkDeleteWithConfirmButton}),Object.defineProperty(R,"Button",{enumerable:!0,get:()=>M.Button}),Object.defineProperty(R,"ChipField",{enumerable:!0,get:()=>M.ChipField}),Object.defineProperty(R,"Confirm",{enumerable:!0,get:()=>M.Confirm}),Object.defineProperty(R,"CreateButton",{enumerable:!0,get:()=>M.CreateButton}),Object.defineProperty(R,"CreateContextProvider",{enumerable:!0,get:()=>M.CreateContextProvider}),Object.defineProperty(R,"CustomRoutes",{enumerable:!0,get:()=>M.CustomRoutes}),Object.defineProperty(R,"DeleteWithConfirmButton",{enumerable:!0,get:()=>M.DeleteWithConfirmButton}),Object.defineProperty(R,"DeleteWithUndoButton",{enumerable:!0,get:()=>M.DeleteWithUndoButton}),Object.defineProperty(R,"EditButton",{enumerable:!0,get:()=>M.EditButton}),Object.defineProperty(R,"EditContextProvider",{enumerable:!0,get:()=>M.EditContextProvider}),Object.defineProperty(R,"FieldTitle",{enumerable:!0,get:()=>M.FieldTitle}),Object.defineProperty(R,"Form",{enumerable:!0,get:()=>M.Form}),Object.defineProperty(R,"FormDataConsumer",{enumerable:!0,get:()=>M.FormDataConsumer}),Object.defineProperty(R,"HttpError",{enumerable:!0,get:()=>M.HttpError}),Object.defineProperty(R,"I18nContextProvider",{enumerable:!0,get:()=>M.I18nContextProvider}),Object.defineProperty(R,"ListToolbar",{enumerable:!0,get:()=>M.ListToolbar}),Object.defineProperty(R,"LoadingIndicator",{enumerable:!0,get:()=>M.LoadingIndicator}),Object.defineProperty(R,"Pagination",{enumerable:!0,get:()=>M.Pagination}),Object.defineProperty(R,"RaSimpleFormIterator",{enumerable:!0,get:()=>M.SimpleFormIterator}),Object.defineProperty(R,"RecordContextProvider",{enumerable:!0,get:()=>M.RecordContextProvider}),Object.defineProperty(R,"ReferenceArrayField",{enumerable:!0,get:()=>M.ReferenceArrayField}),Object.defineProperty(R,"ReferenceField",{enumerable:!0,get:()=>M.ReferenceField}),Object.defineProperty(R,"Resource",{enumerable:!0,get:()=>M.Resource}),Object.defineProperty(R,"ResourceContextProvider",{enumerable:!0,get:()=>M.ResourceContextProvider}),Object.defineProperty(R,"SaveButton",{enumerable:!0,get:()=>M.SaveButton}),Object.defineProperty(R,"SimpleFormIteratorContext",{enumerable:!0,get:()=>M.SimpleFormIteratorContext}),Object.defineProperty(R,"SimpleList",{enumerable:!0,get:()=>M.SimpleList}),Object.defineProperty(R,"SimpleShowLayout",{enumerable:!0,get:()=>M.SimpleShowLayout}),Object.defineProperty(R,"SingleFieldList",{enumerable:!0,get:()=>M.SingleFieldList}),Object.defineProperty(R,"TopToolbar",{enumerable:!0,get:()=>M.TopToolbar}),Object.defineProperty(R,"UrlField",{enumerable:!0,get:()=>M.UrlField}),Object.defineProperty(R,"choices",{enumerable:!0,get:()=>M.choices}),Object.defineProperty(R,"email",{enumerable:!0,get:()=>M.email}),Object.defineProperty(R,"maxLength",{enumerable:!0,get:()=>M.maxLength}),Object.defineProperty(R,"maxValue",{enumerable:!0,get:()=>M.maxValue}),Object.defineProperty(R,"minLength",{enumerable:!0,get:()=>M.minLength}),Object.defineProperty(R,"minValue",{enumerable:!0,get:()=>M.minValue}),Object.defineProperty(R,"number",{enumerable:!0,get:()=>M.number}),Object.defineProperty(R,"regex",{enumerable:!0,get:()=>M.regex}),Object.defineProperty(R,"required",{enumerable:!0,get:()=>M.required}),Object.defineProperty(R,"useArrayInput",{enumerable:!0,get:()=>M.useArrayInput}),Object.defineProperty(R,"useAuthProvider",{enumerable:!0,get:()=>M.useAuthProvider}),Object.defineProperty(R,"useChoices",{enumerable:!0,get:()=>M.useChoices}),Object.defineProperty(R,"useChoicesContext",{enumerable:!0,get:()=>M.useChoicesContext}),Object.defineProperty(R,"useCreateController",{enumerable:!0,get:()=>M.useCreateController}),Object.defineProperty(R,"useDataProvider",{enumerable:!0,get:()=>M.useDataProvider}),Object.defineProperty(R,"useEditContext",{enumerable:!0,get:()=>M.useEditContext}),Object.defineProperty(R,"useGetIdentity",{enumerable:!0,get:()=>M.useGetIdentity}),Object.defineProperty(R,"useGetList",{enumerable:!0,get:()=>M.useGetList}),Object.defineProperty(R,"useGetMany",{enumerable:!0,get:()=>M.useGetMany}),Object.defineProperty(R,"useGetManyReference",{enumerable:!0,get:()=>M.useGetManyReference}),Object.defineProperty(R,"useGetOne",{enumerable:!0,get:()=>M.useGetOne}),Object.defineProperty(R,"useInput",{enumerable:!0,get:()=>M.useInput}),Object.defineProperty(R,"useListContext",{enumerable:!0,get:()=>M.useListContext}),Object.defineProperty(R,"useLocaleState",{enumerable:!0,get:()=>M.useLocaleState}),Object.defineProperty(R,"useNotify",{enumerable:!0,get:()=>M.useNotify}),Object.defineProperty(R,"usePermissions",{enumerable:!0,get:()=>M.usePermissions}),Object.defineProperty(R,"useRecordContext",{enumerable:!0,get:()=>M.useRecordContext}),Object.defineProperty(R,"useRefresh",{enumerable:!0,get:()=>M.useRefresh}),Object.defineProperty(R,"useResourceContext",{enumerable:!0,get:()=>M.useResourceContext}),Object.defineProperty(R,"useResourceDefinition",{enumerable:!0,get:()=>M.useResourceDefinition}),Object.defineProperty(R,"useResourceDefinitions",{enumerable:!0,get:()=>M.useResourceDefinitions}),Object.defineProperty(R,"useShowContext",{enumerable:!0,get:()=>M.useShowContext}),Object.defineProperty(R,"useShowController",{enumerable:!0,get:()=>M.useShowController}),Object.defineProperty(R,"useSimpleFormIterator",{enumerable:!0,get:()=>M.useSimpleFormIterator}),Object.defineProperty(R,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>M.useSimpleFormIteratorItem}),Object.defineProperty(R,"useTranslate",{enumerable:!0,get:()=>M.useTranslate}),Object.defineProperty(R,"useTranslateLabel",{enumerable:!0,get:()=>M.useTranslateLabel}),Object.defineProperty(R,"useUnselect",{enumerable:!0,get:()=>M.useUnselect}),Object.defineProperty(R,"useUnselectAll",{enumerable:!0,get:()=>M.useUnselectAll}),Object.defineProperty(R,"useUpdateMany",{enumerable:!0,get:()=>M.useUpdateMany}),R.ActionsField=ZA,R.ActionsMenu=di,R.ActivatePage=gv,R.Admin=Gi,R.AnimateButton=HE,R.AppConfigContext=Lu,R.AppConfigProvider=Nu,R.ApplicaAdmin=Df,R.ArrayInput=KO,R.AttachmentField=qA,R.AttachmentInput=id,R.AutocompleteArrayInput=sd,R.AutocompleteInput=ad,R.Avatar=Ms,R.BooleanInput=ld,R.Breadcrumbs=Il,R.CardForm=bl,R.ChangePasswordForm=md,R.CircularWithLabel=Em,R.CircularWithPath=mm,R.CoverField=wl,R.Create=zO,R.CreateInDialogButton=mf,R.Datagrid=Bf,R.DateAgoField=Tl,R.DateField=$A,R.DateInput=cd,R.DateTimeInput=ud,R.Dot=Bl,R.Drawer=YB,R.DrawerHeader=T0,R.DrawerHeaderStyled=ef,R.DrawerToggle=SI,R.Edit=E3,R.EditInDialogButton=If,R.EmailField=ed,R.Empty=uv,R.FileField=td,R.FileInput=Ad,R.Footer=Fs,R.FormHeader=Id,R.FunctionField=Pm,R.Header=OI,R.HeaderNotification=MI,R.HeaderProfile=DI,R.HeaderSpacer=jI,R.HorizontalBar=KB,R.IconButton=ro,R.ImageField=Rs,R.ImageInput=dd,R.ImpersonateUserButton=cv,R.LabeledArrayInput=xl,R.LabeledInput=lt,R.Layout=qB,R.LayoutContent=kI,R.LayoutProvider=wI,R.LayoutWrapper=FI,R.LinearWithIcon=Im,R.LinearWithLabel=Bm,R.List=Av,R.ListItem=vf,R.Loadable=P2,R.Loader=sv,R.LoadingButton=JA,R.LoginPage=sc,R.Logo=tf,R.LongForm=Rt,R.MainCard=or,R.MainIcon=rc,R.MenuConfigContext=zu,R.MenuConfigProvider=Wu,R.MenuPopover=Ya,R.MenuPropTypes=fi,R.NavMenu=_B,R.Navigation=ZB,R.Notification=av,R.NotificationList=W2,R.NumberInput=fd,R.ReadonlyField=rd,R.RecordInput=Dm,R.RecoverPage=pv,R.ReferenceArrayInput=gd,R.ReferenceInput=pd,R.ReferenceManyField=bi,R.ReferenceManyInput=hd,R.RegisterPage=hv,R.ResponsiveSection=RI,R.ScrollTop=pf,R.ScrollX=S2,R.SearchInput=d3,R.SelectArrayInput=Cd,R.SelectInput=jm,R.Show=j3,R.SimpleBar=df,R.SimpleForm=Ql,R.SimpleFormIterator=k3,R.SizeField=Om,R.SmallIcon=hf,R.SmartTextInput=Pl,R.TabbedForm=Ml,R.TableFormIterator=pj,R.TextField=od,R.TextInput=Hn,R.ThemeConfigContext=Vu,R.ThemeConfigProvider=Hu,R.ThemeProvider=Of,R.TimeInput=Ed,R.Toolbar=Dr,R.Tooltip=Cm,R.Transitions=io,R.createI18nProvider=Mf,R.parseTime=km,R.useAppConfig=xo,R.useBreadcrumbs=dh,R.useI18nCatcher=Mv,R.useI18nLanguages=Dv,R.useI18nProvider=pL,R.useLayoutContext=Dd,R.useLayoutDispatch=Ej,R.useLayoutDrawerState=ko,R.useLayoutLogoState=PI,R.useLayoutMediaState=zn,R.useLayoutNotificationsState=kl,R.useLayoutState=Ti,R.useLayoutThemeState=Fl,R.useLocalStorage=Yu,R.useMenu=Gu,R.useMenuConfig=Jr,R.useRefDimensions=J1,R.useResourceDefaultValues=HO,R.useResourceTitle=fh,R.useSx=gi,R.useThemeConfig=Qn,R.uuid=g3,R.withLayoutProvider=TI,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
266
266
|
//# sourceMappingURL=react-admin.umd.js.map
|