@applica-software-guru/react-admin 1.3.155 → 1.3.157
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/Layout/Header/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Layout/Header/Profile/Profile.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react-admin.cjs.js +2 -2
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +109 -148
- 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/Layout/Header/Notification/Notification.tsx +2 -18
- package/src/components/Layout/Header/Profile/Profile.tsx +3 -19
- package/src/index.jsx +2 -1
package/dist/react-admin.umd.js
CHANGED
|
@@ -215,7 +215,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
215
215
|
animation: ${0} 1.4s linear infinite;
|
|
216
216
|
`),A3)),p3=Ae("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),h3=Ae("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>W({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&&Xt.css(gm||(gm=Ul`
|
|
217
217
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
218
|
-
`),d3)),fm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ue(r,u3),E=W({},r,{color:s,disableShrink:l,size:u,thickness:f,value:p,variant:C}),m=g3(E),B={},v={},j={};if(C==="determinate"){const R=2*Math.PI*((uo-f)/2);B.strokeDasharray=R.toFixed(3),j["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*R).toFixed(3)}px`,v.transform="rotate(-90deg)"}return g.jsx(f3,W({className:Ye(m.root,o),style:W({width:u,height:u},v,A),ownerState:E,ref:n,role:"progressbar"},j,h,{children:g.jsx(p3,{className:m.svg,ownerState:E,viewBox:`${uo/2} ${uo/2} ${uo} ${uo}`,children:g.jsx(h3,{className:m.circle,style:B,ownerState:E,cx:uo,cy:uo,r:(uo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(fm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Cr(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 Dd=fm;function C3(e){return Lt("MuiLoadingButton",e)}const Nr=Ht("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),E3=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],I3=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=ir.unstable_composeClasses(o,C3,r);return W({},r,s)},m3=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",B3=Ae(l3,{shouldForwardProp:e=>m3(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Nr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Nr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>W({[`& .${Nr.startIconLoadingStart}, & .${Nr.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}),[`&.${Nr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),v3=Ae("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>W({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})),pm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=Ue(r,E3),h=$u(l),E=A??g.jsx(Dd,{"aria-labelledby":h,color:"inherit",size:16}),m=W({},r,{disabled:s,loading:u,loadingIndicator:E,loadingPosition:f,variant:p}),B=I3(m),v=u?g.jsx(v3,{className:B.loadingIndicator,ownerState:m,children:E}):null;return g.jsxs(B3,W({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:m,children:[m.loadingPosition==="end"?o:v,m.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(pm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:Cr(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 y3=pm;function kd({variant:e,theme:t,color:n,loadingPosition:r}){const o=rn(t,n),{lighter:s,main:l,dark:u,contrastText:A}=o,f=`${n}Button`,p=ki(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},E={"&::after":{boxShadow:`0 0 6px 6px ${He(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${He(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},...E};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...E};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...E};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...E};case"text":default:return{color:l,...C,...E}}}const b3=Ae(y3,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,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"&&{...kd({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")&&!o&&{color:"#fff"},...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})}}})),Fd=w.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const l=Pt();return g.jsx(b3,{ref:s,variant:e,shape:t,theme:l,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});Fd.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},Fd.displayName="LoadingButton";function Q3({color:e,theme:t,labelColor:n}){const r=rn(t,e),{main:o,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const x3=Ae(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&Q3({color:t,theme:e,labelColor:n})}));function Ld({children:e,arrow:t,labelColor:n="",...r}){const o=Pt();return g.jsx(b.Box,{display:"flex",children:g.jsx(x3,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Ld.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const Ao=w.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},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,{...o,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...o,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...o,children:g.jsx(b.Box,{sx:l,children:e})})]})});Ao.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"])},w.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function hm({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)}%`})})]})}hm.propTypes={value:c.number};function Cm({value:e,size:t,variant:n,thickness:r,showLabel:o,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}),o&&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})]})}Cm.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 Em({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})]})}Em.propTypes={icon:c.node,value:c.number};function Im({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)}%`})})]})}Im.propTypes={value:c.number};const w3=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return g.jsx(Fi,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Js=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return g.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})}),mm=w.createContext({});function T3(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=S.useResourceContext(),o=S.useDataProvider(),{search:s}=fi.useLocation(),l=`${r}/new`,u=w.useCallback(()=>{if(!t||!ge.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((E,m)=>{h[m]=E}),o.get(l,h).then(E=>E.data).then(E=>{const{responseCode:m,value:B}=E;return m==="ok"?B:Promise.reject(E)})},[r,t,s,o]),A=w.useMemo(()=>ge.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:f,isLoading:p}=Hu.useQuery(A),C=ge.omit(e,["useDefaults"]);return p?g.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:g.jsx(b.CircularProgress,{})}):g.jsx(mm.Provider,{value:f??{},children:g.jsx(S.Create,{...C})})}function P3(){return w.useContext(mm)}const S3=Ae(T3,{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",backgroundColor:e.palette.background.default}})),O3=Ts(S.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)}})),lr=e=>g.jsx(O3,{...e});lr.defaultProps={...S.Toolbar.defaultProps},lr.propTypes={...S.Toolbar.propTypes};const Nd=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...l})=>{const u=S.useTranslate(),A=S.useResourceContext(),{cardTitle:f,cardSubheader:p}=w.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(Wn,{content:t,title:f,subheader:p,secondary:o,divider:!0,children:g.jsxs(w.Fragment,{children:[e,s===!0?g.jsx(lr,{children:g.jsx(S.SaveButton,{})}):s]})})})};Nd.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},Nd.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 j3=Ae(S.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),Yl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=wn();return g.jsx(j3,{defaultValues:n,spacing:t||o,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};Yl.propTypes={...b.Grid.propTypes,...S.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},Yl.defaultProps={...b.Stack.defaultProps},Yl.Section=Nd;const M3=Ts(S.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}})),Gl=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...l})=>{const u=SA(e),A=S.useRecordContext();return g.jsx(Wn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:g.jsx(M3,{toolbar:g.jsx(lr,{}),...l})})};Gl.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},Gl.propTypes={...S.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 Kl=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{getFieldState:E,formState:m}=Oo.useFormContext(),{error:B}=E(p,m),v=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},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(S.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),w.isValidElement(t)?w.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})]})};Kl.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},Kl.defaultProps={display:"label",divider:!1};const R3=Ae(S.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%"}}})),D3=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>g.jsx(Kl,{label:e,addLabel:t,source:n,helperText:r,divider:o,children:g.jsx(R3,{source:n,label:!1,...s})}),Vd=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(Ro,{children:[e&&g.jsx(S.EditButton,{}),t&&g.jsx(S.DeleteWithConfirmButton,{}),n&&g.jsx(S.CloneButton,{})]});Vd.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},Vd.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Bm=Ae("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),k3=Ae("ul")({display:"inline-block"}),vm=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,l=de.useRecordContext(e),u=dt.get(l,r),A=de.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):g.jsx(Bm,{className:t,...s});if(Array.isArray(u))return g.jsx(k3,{className:t,...s,children:u.map((C,h)=>{var m;const E=o instanceof String?(m=dt.get(C,o))==null?void 0:m.toString():o;return g.jsx("li",{children:E},h)})});const f=o instanceof String?(p=dt.get(l,o))==null?void 0:p.toString():o;return g.jsx(Bm,{className:t,...s,children:f})};vm.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};const Hd=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,l]=w.useState(null),u=S.useRecordContext(o),A=S.useDataProvider(),f=S.useResourceContext(),p=w.useCallback(async E=>{E.preventDefault(),E.stopPropagation();const m=dt.get(u,o==null?void 0:o.source),B=f.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(o==null?void 0:o.source)}/${(m==null?void 0:m.id)||(u==null?void 0:u.id)}`),j=document.createElement("a");j.href=v,j.download=dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source)),j.click()},[A,u,e,f,t,o==null?void 0:o.source,o==null?void 0:o.title]),C=w.useMemo(()=>({...u,[o==null?void 0:o.source]:(u==null?void 0:u.src)||dt.get(u,o==null?void 0:o.source),[o==null?void 0:o.title]:(u==null?void 0:u.title)||dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[u,o==null?void 0:o.source,o==null?void 0:o.title]),h=S.useTranslate();return w.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:E})=>l(E)).catch(()=>l(null))},[u,A,r]),g.jsx(vm,{...o,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:Mr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Hd.propTypes={...S.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const F3=Ae(S.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Xs=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(F3,{...e,source:t})};Xs.propTypes={...S.ImageField.propTypes,source:c.string};const Jl=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const l=w.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=S.useRecordContext(),A=o||u;return g.jsx(Xs,{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})};Jl.defaultProps={...Xs.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},Jl.propTypes={...Xs.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 ym={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Hn,function(){return function(n,r,o){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)}o.en.relativeTime=l,s.fromToBase=function(f,p,C,h,E){for(var m,B,v,j=C.$locale().relativeTime||l,R=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=R.length,O=0;O<x;O+=1){var P=R[O];P.d&&(m=h?o(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var N=(n.rounding||Math.round)(Math.abs(m));if(v=m>0,N<=P.r||!P.r){N<=1&&O>0&&(P=R[O-1]);var F=j[P.l];E&&(N=E(""+N)),B=typeof F=="string"?F.replace("%d",N):F(N,p,P.l,v);break}}if(p)return B;var X=v?j.future:j.past;return typeof X=="function"?X(B):X.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?o.utc():o()};s.toNow=function(f){return this.to(A(this),f)},s.fromNow=function(f){return this.from(A(this),f)}}})})(ym);var L3=ym.exports;const N3=$r(L3);Mr.extend(N3);const Xl=e=>{const t=S.useRecordContext(e),[n]=S.useLocaleState(),r=w.useMemo(()=>Mr(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(w.Fragment,{children:[g.jsx(S.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Xl.displayName="DateAgoField",Xl.propTypes={source:c.string.isRequired};const bm=Ae(S.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));bm.propTypes={...S.DateField.propTypes};const zd=e=>g.jsx(bm,{...e});zd.defaultProps={...S.DateField.defaultProps,variant:"body1"},zd.propTypes={...S.DateField.propTypes};const Qm=Ae(S.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Qm.propTypes={...S.EmailField.propTypes};const Wd=e=>g.jsx(Qm,{...e});Wd.defaultProps={...S.EmailField.defaultProps,variant:"body1"},Wd.propTypes={...S.EmailField.propTypes};const V3=Ae(S.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Ud=({...e})=>{const t=S.useRecordContext(e),n=w.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.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=o,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(V3,{...e,record:t,onClick:n})};Ud.propTypes={...S.FileField.propTypes,source:c.string,title:c.string};const xm=e=>g.jsx(S.FunctionField,{...e});xm.defaultProps={variant:"body1"};const wm=Ae(S.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));wm.propTypes={...S.TextField.propTypes};const Zl=e=>g.jsx(wm,{...e});Zl.defaultProps={...S.TextField.defaultProps,variant:"body1"},Zl.propTypes={...S.TextField.propTypes};function H3(e){const t=b.useTheme(),n=de.useLocales(),{source:r=""}=e,o=de.useRecordContext(e),s=o[r],l=!wA(s,n),u=Ir(e,{flex:1}),[A]=de.useLocaleState(),f=w.useMemo(()=>l?g.jsx(et.FlagFilled,{style:{color:t.palette.warning.main}}):g.jsx(et.FlagOutlined,{}),[l]),p=w.useMemo(()=>g.jsx(b.Stack,{children:ge.map(n,(C,h)=>g.jsx(b.Typography,{children:`${C.locale.toUpperCase()}: ${(s??{})[C.locale]??""}`},h))}),[s,n]);return g.jsx(Ld,{title:p,arrow:!1,children:g.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[f,g.jsx(Zl,{...e,source:`${r}.${A}`,sx:u})]})})}const z3=Ae("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"}})),Yd=({source:e,defaultValue:t,...n})=>{const r=S.useRecordContext(n),o=dt.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})};Yd.propTypes={defaultValue:c.any,source:c.string,record:c.object},Yd.defaultProps={defaultValue:" "};const Tm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Tm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Gd=({label:e,source:t,defaultValue:n,children:r,tooltip:o,...s})=>{const{getCurrentDialog:l}=Do(),u=S.useRecordContext(s),A=S.useResourceContext(s),f=l(),p=w.useMemo(()=>!o||o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]);return g.jsx(Tm,{title:p,children:g.jsxs(w.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(S.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(z3,{...s,children:w.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};Gd.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},Gd.defaultProps={defaultValue:" ",children:g.jsx(Yd,{})};const Kd=function({children:e,className:t}){return g.jsx("div",{className:t,children:e})};Kd.defaultProps={children:null,className:""},Kd.propTypes={children:c.node,className:c.string};const W3=Ts(Kd,{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n,bulkActionButtons:r})=>({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:r===!1?0: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}}})),Li=e=>g.jsx(W3,{...e,children:g.jsx(S.ReferenceManyField,{pagination:g.jsx(S.Pagination,{}),...e})});Li.defaultProps={margin:!1,border:!1},Li.propTypes={...S.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Pm=({source:e,...t})=>{const n=S.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Pm.propTypes={record:c.object,source:c.string};const nt=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:E}}=S.useInput(u),m=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:E?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:E===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(S.FieldTitle,{label:e,source:p,resource:m||C,isRequired:h})}),w.isValidElement(t)?w.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:E===!0,children:r})]})};nt.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},nt.defaultProps={display:"label",divider:!1};const U3=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},Y3=Ae(S.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}},...U3(e)})),Jd=({children:e,disabled:t,type:n,...r})=>{const o=S.useRecordContext(r),s=r==null?void 0:r.source,l=o==null?void 0:o.id;return S.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(nt,{...r,children:g.jsx(Y3,{disabled:t,children:w.cloneElement(e,{...e.props,entityId:l,property:s})})})};Jd.propTypes={...S.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},Jd.defaultProps={children:g.jsx(Hd,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const G3=Ae(S.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"}})),Xd=({...e})=>g.jsx(nt,{...e,children:g.jsx(G3,{})});Xd.propTypes={...S.AutocompleteArrayInput.propTypes,...nt.propTypes},Xd.defaultProps={...S.AutocompleteArrayInput.defaultProps,size:"small"};const K3=Ae(S.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"}})),Zd=e=>{const{perPage:t,...n}=e;return g.jsx(nt,{...n,children:g.jsx(K3,{})})};Zd.propTypes={...S.AutocompleteInput.propTypes,...nt.propTypes},Zd.defaultProps={...S.AutocompleteInput.defaultProps,size:"small"};const J3=Ae(S.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),_d=({horizontal:e,...t})=>{const n=Pt();return g.jsx(nt,{...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(J3,{})})};_d.defaultProps={...S.BooleanInput.defaultProps,...nt.defaultProps},_d.propTypes={...S.BooleanInput.propTypes,...nt.propTypes,horizontal:c.bool};const X3=Ae(S.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qd=e=>g.jsx(nt,{...e,children:g.jsx(X3,{})});qd.propTypes={...S.DateInput.propTypes,...nt.propTypes},qd.defaultProps={...S.DateInput.defaultProps,...nt.defaultProps};const Z3=Ae(S.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),$d=e=>g.jsx(nt,{...e,children:g.jsx(Z3,{})});$d.propTypes={...S.DateTimeInput.propTypes,...nt.propTypes},$d.defaultProps={...nt.defaultProps};const _3=Ae(S.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}}})),eg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n,l=w.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=dt.get(o,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[o,s,r]);return g.jsx(nt,{...n,children:g.jsx(_3,{children:w.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:l}})})})};eg.propTypes={...S.FileInput.propTypes,source:c.string,title:c.string,children:c.node},eg.defaultProps={children:g.jsx(Ud,{})};const tg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n;return S.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(nt,{...n,children:g.jsx(S.ImageInput,{accept:"image/*",children:w.cloneElement(e,{...e.props,title:t,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`)}})})})};tg.defaultProps={children:g.jsx(Jl,{}),multiple:!1},tg.propTypes={...S.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const Pn=e=>g.jsx(nt,{...e,children:g.jsx(S.TextInput,{})});Pn.propTypes={...S.TextInput.propTypes,...nt.propTypes};const q3={vertical:"bottom",horizontal:"right"},$3={vertical:"top",horizontal:"right"};function eM(e){const{source:t}=e,{fieldState:n}=de.useInput(e),r=Oo.useWatch({name:t}),{error:o}=n,s=de.useLocales(),l=!wA(r,s),[u]=de.useLocaleState(),[A,f]=w.useState(u),[p,C]=w.useState(null),h=!!p,E=w.useCallback(v=>C(h?null:v.currentTarget),[h,C]),m=w.useCallback(()=>C(null),[C]),B=w.useMemo(()=>ge.map(s,(v,j)=>g.jsx(b.MenuItem,{onClick:()=>{f(v.locale),m()},children:g.jsx(b.ListItemText,{primary:`${v.locale.toUpperCase()}: ${(r??{})[v.locale]??""}`})},j)),[s,f,m,r]);return g.jsx(nt,{...e,helperText:o==null?void 0:o.message,children:g.jsxs(b.Box,{flex:1,children:[ge.map(s,(v,j)=>g.jsx(Pn,{...e,source:`${t}.${v.locale}`,sx:{width:"100%",display:v.locale===A?"inline-flex":"none"},label:!1,InputProps:{endAdornment:g.jsx(b.Chip,{label:g.jsx(b.Typography,{variant:"button",children:A}),size:"small",onClick:E,color:l?"warning":void 0})}},j)),g.jsx(b.Menu,{anchorEl:p,open:h,anchorOrigin:q3,transformOrigin:$3,onClose:m,children:B})]})})}const tM=Ae(S.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ng=e=>g.jsx(nt,{...e,children:g.jsx(tM,{})});ng.propTypes={...S.NumberInput.propTypes,...nt.propTypes},ng.defaultProps={...S.NumberInput.defaultProps,...nt.defaultProps};const Sm=({source:e,minWidth:t=300,children:n})=>{const r=S.useResourceContext(),o=S.useRecordContext(),[s,l]=w.useState(dt.get(o,e,"")),[u,A]=w.useState(!1),f=w.useCallback(m=>l(m.target.value),[]),p=S.useDataProvider(),C=w.useCallback(m=>{m.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),h=w.useCallback(()=>{dt.get(o,e)!==s&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,o]),E=w.useCallback(m=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:m,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return w.useEffect(()=>l(dt.get(o,e)),[o,e]),n?w.cloneElement(n,{...n.props,source:e,value:s,onChange:E}):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"})};Sm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const rg=({children:e,...t})=>g.jsx(S.ReferenceArrayInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});rg.propTypes={...S.ReferenceArrayInput.propTypes,children:c.element},rg.defaultProps={...S.ReferenceArrayInput.defaultProps};const og=({children:e,...t})=>g.jsx(S.ReferenceInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});og.propTypes={...S.ReferenceInput.propTypes,children:c.element},og.defaultProps={...S.ReferenceInput.defaultProps};const ig=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>g.jsx(S.ResourceContextProvider,{value:e,children:g.jsx(Li,{perPage:5,pagination:g.jsx(S.Pagination,{}),...s,reference:e,target:t,children:g.jsxs(w.Fragment,{children:[g.jsx(S.ListToolbar,{filters:r,actions:o}),n]})})});ig.propTypes={...Li.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])},ig.defaultProps={...Li.defaultProps};const nM=Ae(S.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),rM=e=>g.jsx(nM,{...e}),Om=Ae(S.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"}}));Om.propTypes={...S.SelectArrayInput.propTypes};const sg=e=>g.jsx(nt,{...e,children:g.jsx(Om,{options:{autoWidth:!1}})});sg.defaultProps={optionText:"name",optionValue:"id"},sg.propTypes={...S.SelectArrayInput.propTypes,...nt.propTypes};const oM=Ae(S.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(nt,{...e,children:g.jsx(oM,{})});jm.propTypes={...S.SelectInput.propTypes,...nt.propTypes};const _l=({...e})=>{var u,A;const t=S.useTranslate(),n=S.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=Oo.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let o=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&&(o=o&&o.length>0?`${l} - ${t(o)}`:l),g.jsx(Pn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};_l.displayName="SmartTextInput",_l.defaultProps={multiline:!1},_l.propTypes={...Pn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const iM=e=>{if(!e)return"";const t=cC(e);return t?t.format("HH:mm"):""},sM=e=>e,aM=Ae(S.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ag=e=>g.jsx(nt,{...e,children:g.jsx(aM,{})});ag.defaultProps={...S.TimeInput.defaultProps,format:iM,parse:sM},ag.propTypes={...S.TimeInput.propTypes,...nt.propTypes};const lg=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=wn(),[r,o]=w.useState(!1),s=de.useAuthProvider(),l=de.useTranslate(),u=de.useNotify(),A=w.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;o(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>{u((h==null?void 0:h.message)||(h==null?void 0:h.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return g.jsx(de.ResourceContextProvider,{value:"user/change-password",children:g.jsx(de.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Gl,{onSubmit:A,toolbar:g.jsx(lr,{children:g.jsx(S.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(Pn,{source:"oldPassword",type:"password",validate:de.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Pn,{source:"newPassword",type:"password",validate:de.required()})})]})})})})},lM=Ae(S.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",backgroundColor:e.palette.background.default}})),cM=Ae(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),uM=Ae(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),cg=({title:e,divider:t,variant:n})=>{const r=S.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsx(cM,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(uM,{})]})};cg.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},cg.defaultProps={divider:!0,variant:"h4"};const AM=Ae(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",marginRight:0}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function Mm(e){const{spacing:t}=wn(),{spacing:n=t}=e,r=ge.omit(e,["spacing"]);return g.jsx(S.Form,{...r,children:g.jsx(AM,{container:!0,spacing:n*2,children:e.children})})}function ug(e){return e.id??e.label}function Rm(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function dM(e){return ge.map(e,"id")}function ql(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function Dm(e,t){const n=e!==void 0?ql(e):0;return ge.chain(t).filter(o=>e!==void 0?Rm(e,o.id):!0).filter(o=>ql(o.id)===n+1).value()}function gM(e,t){var s;const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ge.extend(n,{formRootPath:o});case"setSyncWithLocation":return ge.extend(n,{syncWithLocation:o});case"setErrorCount":return ge.extend(n,{errorCount:o});case"setActiveItem":return ge.includes(dM(e.items),o)?ge.extend(n,{activeItem:o}):n;case"addItem":{const{id:l}=o;return ge.extend(n,{items:ge.chain(n.items).clone().reject(u=>u.id===l).concat([o]).orderBy(u=>u.index).value()})}case"removeItem":{const l=ge.isString(o)?o:o.id,u=ge.chain(n.items).clone().reject(A=>A.id===l).value();return ge.extend(n,{items:u}),n.activeItem===l&&ge.extend(n,{activeItem:((s=ge.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const fM={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},km=w.createContext(void 0);function Fm(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=fi.useLocation(),[s,l]=w.useReducer(gM,ge.cloneDeep(fM)),{formRootPath:u,items:A}=s,f=w.useMemo(()=>({state:s,dispatch:l}),[s,l]);return w.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const C=ge.chain(p).map(E=>fi.matchPath(E,o)).reject(E=>E===null).first().value(),h=C==null?void 0:C.pathnameBase;h!==void 0&&h!==u&&l({type:"setFormRootPath",payload:h})},[o,u,r]),w.useEffect(()=>{l({type:"setSyncWithLocation",payload:!!t})},[t,l]),w.useEffect(()=>{l({type:"setErrorCount",payload:!!n})},[n,l]),w.useEffect(()=>{var p;if(t&&u!==void 0){let C=o.replace(u,"").replace(new RegExp(/^\/?/),"");ge.isEmpty(C)&&(C=((p=ge.chain(A).filter(h=>Dm(h.id,A).length===0).orderBy([h=>ql(h.id),h=>h.index]).first().value())==null?void 0:p.id)??void 0),l({type:"setActiveItem",payload:C})}},[l,u,o,A]),g.jsx(km.Provider,{value:f,children:e.children})}function Lm(){const e=w.useContext(km);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Zs(){return Lm().state}function Ag(){return Lm().dispatch}function Nm(){return Zs().formRootPath}function Vm(){return Zs().activeItem}function Hm(){return Zs().items}function zm(){return Zs().syncWithLocation}function Wm(){return Zs().errorCount}function Um(){const e=Ag();return w.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function Ym(){const e=Ag();return w.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Gm(){const e=Ag();return w.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var pM=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},Km=e=>e.firstChild?e.firstChild.offsetParent===e:!0,hM=(e,t)=>{let n=e,r=0;Km(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},CM=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},_s=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?_s="sticky":CSS.supports("position","-webkit-sticky")&&(_s="-webkit-sticky"));var $l=!1;try{const e=Object.defineProperty({},"passive",{get(){$l={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var dg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=o(s()),u=()=>{Object.assign(l,o(s())),n()};return window.addEventListener("resize",u,$l),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=o(t.getBoundingClientRect()),l=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},EM=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}},IM=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,l=pM(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const F=C();F!==x&&O(F),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=F=>{const{offsetTop:X,height:Z}=E,{naturalTop:Y}=v,{height:$}=j;return F+X+Z>=Y+$+R+o},C=()=>{const{height:F}=E,{height:X}=j;return X+s+o<=F?3:p(f)?1:2},h=l!==window&&Km(l),E=dg({el:l,onChange:A,unsubs:t,measure:({height:F,top:X})=>({height:F,offsetTop:h?X:0})}),m=CM(e),B=m===window?{top:0,bottom:0}:EM(m),v=dg({el:m,onChange:A,unsubs:t,measure:({height:F})=>({height:F-B.top-B.bottom,naturalTop:m===window?0:hM(m,l)+B.top+E.offsetTop})}),j=dg({el:e,onChange:A,unsubs:t,measure:({height:F})=>({height:F})});let R=0,x=C();const O=F=>{const X=x;if(x=F,X===2&&(R=-1),F===3){e.style.position=_s,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:Y}=E,{height:$,naturalTop:ce}=v,{height:se}=j;if(F===2)if(e.style.position="relative",R=X===0?Math.max(0,Y+f-ce+s):Math.max(0,Y+f+Z-(ce+se+o)),r){const q=Math.max(0,$-se-R);e.style.bottom=`${q}px`}else e.style.top=`${R}px`;else e.style.position=_s,F===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-se-o}px`:r?e.style.bottom=`${Z-se-o}px`:e.style.top=`${s}px`};O(x);const P=F=>{if(F===f)return;const X=F-f;if(f=F,x===3)return;const{offsetTop:Z,height:Y}=E,{naturalTop:$,height:ce}=v,{height:se}=j;if(X>0)if(x===0){if(F+Z+s>$){const q=Math.max(0,Z+f-$+s);F+Z+Y<=$+se+q+o?O(2):O(1)}}else x===2&&p(F)&&O(1);else if(x===1){if(Z+F+Y<$+ce+o){const q=Math.max(0,Z+f+Y-($+se+o));Z+F+s>=$+q?O(2):O(0)}}else x===2&&Z+F+s<$+R&&O(0)},N=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",N,$l),l.addEventListener("mousewheel",N,$l),t.push(()=>l.removeEventListener("scroll",N),()=>l.removeEventListener("mousewheel",N))},mM=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=w.useState(null);return w.useEffect(()=>{if(!r||!_s)return;const s=[];return IM(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),o},BM=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:l}=e,u=mM({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:s,style:l,ref:u,children:o})},vM=BM,Jm=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(Jm||{});function Xm(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ge.omit(e,["sticky","disposition","spacing"]),s=t?vM:b.Box,l=w.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return g.jsx(b.Grid,{...o,item:!0,...n,children:g.jsx(s,{...l,children:g.jsx(b.Stack,{spacing:r,children:e.children})})})}function Zm(e){return g.jsx(g.Fragment,{children:e.children})}function _m(e){const{children:t}=e;return w.useMemo(()=>{const r={top:[],bottom:[]};return w.Children.forEach(t,o=>{if(w.isValidElement(o)&&(o==null?void 0:o.type)===Zm){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function qm(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ge.omit(e,["disposition"]);return g.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function $m(e){const t=Vm();return t===void 0?!1:e===t||Rm(e,t)}function e0(e){const t=Hm();return w.useMemo(()=>Dm(e,t),[t,e])}function yM(){const e=Nm(),{search:t}=fi.useLocation(),n=fi.useNavigate();return w.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function t0(){const e=e0();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:ge.map(e,(t,n)=>g.jsx(gg,{...t},n))})})}function gg(e){const t=de.useTranslate()??ge.identity,n=n0(e),{selected:r,label:o,icon:s,onClick:l,badge:u,items:A,isGroup:f,level:p,errors:C=0}=n,{spacing:h}=wn(),[E,m]=w.useState(r),B=w.useCallback(R=>{m(!E),l(R)},[l,E]),v=s!==void 0,j=ge.omit(e,["label","icon","selected","badge"]);return w.useEffect(()=>{r&&!E&&m(r)},[r,E,m]),g.jsxs(g.Fragment,{children:[g.jsx(b.ListItem,{...j,disablePadding:!0,children:g.jsxs(b.ListItemButton,{selected:r&&!f,onClick:B,sx:{pl:h*p},children:[v&&g.jsx(b.ListItemIcon,{children:s}),g.jsx(b.ListItemText,{inset:!v,primary:C===0?t(o):g.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),u&&g.jsx(b.ListItemAvatar,{children:g.jsx(Gs,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),f&&(E?g.jsx(fn.ExpandLess,{}):g.jsx(fn.ExpandMore,{}))]})}),f&&g.jsx(b.Collapse,{in:E,timeout:"auto",children:g.jsx(b.List,{children:ge.map(A,(R,x)=>g.jsx(gg,{...R},x))})})]})}function n0(e){const{id:t}=e,n=$m(t),r=ql(t),o=yM(),s=zm(),l=Um(),u=e0(t),A=!ge.isEmpty(u),f=w.useCallback(C=>{A||(s?o(e.id):l(e.id)),ge.isFunction(e.onClick)&&e.onClick(C)},[l,o,e,s,A]);return w.useMemo(()=>({...e,selected:n,onClick:f,items:u,isGroup:A,level:r}),[e,n,f,u,A])}function r0(e=[],t){const n=ge.isArray(e)?e:[e],r=ge.filter(n,o=>w.isValidElement(o));ge.each(r,o=>{var s;t(o),r0(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function o0(e){const{errors:t}=Oo.useFormState(),n=Wm(),{label:r,icon:o,badge:s,index:l=0,children:u}=e,A=ug(e),f=Ym(),p=Gm(),C=$m(A),h=[];n&&(e.sources!==void 0?h.push(...e.sources):r0(u,m=>{var B;((B=m==null?void 0:m.props)==null?void 0:B.source)!==void 0&&h.push(m.props.source)}));const E=ge.chain(h).uniq().map(m=>ge.get(t,m)).reject(m=>m===void 0).value().length;return w.useEffect(()=>{f({id:A,index:l,label:r,icon:o,badge:s,errors:E})},[f,p,r,o,A,s,l,E]),w.useEffect(()=>()=>{p(A)},[A]),g.jsx(b.Box,{display:C?"unset":"none",children:e.children})}function i0(e){const t=fg(e),n=ug(e);return g.jsx(o0,{...e,id:n,children:w.Children.map(t,r=>{const o=ug(r.props);return w.cloneElement(r,{id:`${n}.${o}`})})})}function s0(e){return g.jsx(o0,{...e})}function fg(e){const{children:t}=e;return w.useMemo(()=>ge.chain(w.Children.toArray(t)).filter(r=>w.isValidElement(r)&&((r==null?void 0:r.type)===s0||(r==null?void 0:r.type)===i0)).map((r,o)=>w.cloneElement(r,{index:o})).value(),[t])}function bM(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ge.pick(e,["syncWithLocation","errorCount"]),s=ge.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=_m(e),A=fg(e);return g.jsx(Fm,{...o,children:g.jsxs(Mm,{...s,spacing:r,children:[g.jsxs(Xm,{disposition:t,spacing:r,children:[l,g.jsx(t0,{}),u]}),g.jsx(qm,{disposition:n,children:A})]})})}const kt=bM;kt.BaseForm=Mm,kt.Content=qm,kt.Provider=Fm,kt.useItems=Hm,kt.useSyncWithLocation=zm,kt.useErrorCount=Wm,kt.useFormRootPath=Nm,kt.useActiveItem=Vm,kt.useSetActiveItem=Um,kt.useAddItem=Ym,kt.useRemoveItem=Gm,kt.Sidebar=Xm,kt.SidebarSection=Zm,kt.SidebarSectionPosition=Jm,kt.useSidebarChildren=_m,kt.NavMenu=t0,kt.NavMenuItem=gg,kt.useNavMenuItem=n0,kt.Tab=s0,kt.Group=i0,kt.useBaseItemChildren=fg;const QM=Ae(S.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"}})),xM=Ae(S.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}}})),wM=Ts(S.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),pg=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:l,...u}=e,A=SA(t);return g.jsx(Wn,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...l,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:g.jsx(wM,{toolbar:g.jsx(lr,{}),...u})})};pg.defaultProps={toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},pg.Tab=S.TabbedForm.Tab;const TM=k.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:l,resource:u}=e,A=S.useTranslate(),[f,p]=k.useState(!1),{total:C,remove:h}=dC(),E=k.useCallback(()=>{p(!1),h(s)},[s,h]),m=w.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return g.jsxs(bA.Provider,{value:m,children:[w.Children.map(n,(B,v)=>{if(!w.isValidElement(B))return null;const{source:j,...R}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:w.cloneElement(B,{source:j?`${l}.${j}`:l,index:j?void 0:v,resource:u,disabled:r,...R,label:""})})}),!o&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:g.jsx(Ro,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(S.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:E,onClose:()=>p(!1)})]})});var PM=Array.isArray,ec=PM,SM=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,OM=SM,jM=OM,MM=typeof self=="object"&&self&&self.Object===Object&&self,RM=jM||MM||Function("return this")(),tc=RM,DM=tc,kM=DM.Symbol,nc=kM,a0=nc,l0=Object.prototype,FM=l0.hasOwnProperty,LM=l0.toString,qs=a0?a0.toStringTag:void 0;function NM(e){var t=FM.call(e,qs),n=e[qs];try{e[qs]=void 0;var r=!0}catch{}var o=LM.call(e);return r&&(t?e[qs]=n:delete e[qs]),o}var VM=NM,HM=Object.prototype,zM=HM.toString;function WM(e){return zM.call(e)}var UM=WM,c0=nc,YM=VM,GM=UM,KM="[object Null]",JM="[object Undefined]",u0=c0?c0.toStringTag:void 0;function XM(e){return e==null?e===void 0?JM:KM:u0&&u0 in Object(e)?YM(e):GM(e)}var hg=XM;function ZM(e){return e!=null&&typeof e=="object"}var rc=ZM,_M=hg,qM=rc,$M="[object Symbol]";function eR(e){return typeof e=="symbol"||qM(e)&&_M(e)==$M}var Cg=eR,tR=ec,nR=Cg,rR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oR=/^\w*$/;function iR(e,t){if(tR(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||nR(e)?!0:oR.test(e)||!rR.test(e)||t!=null&&e in Object(t)}var sR=iR;function aR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var A0=aR,lR=hg,cR=A0,uR="[object AsyncFunction]",AR="[object Function]",dR="[object GeneratorFunction]",gR="[object Proxy]";function fR(e){if(!cR(e))return!1;var t=lR(e);return t==AR||t==dR||t==uR||t==gR}var d0=fR,pR=tc,hR=pR["__core-js_shared__"],CR=hR,Eg=CR,g0=function(){var e=/[^.]+$/.exec(Eg&&Eg.keys&&Eg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ER(e){return!!g0&&g0 in e}var IR=ER,mR=Function.prototype,BR=mR.toString;function vR(e){if(e!=null){try{return BR.call(e)}catch{}try{return e+""}catch{}}return""}var yR=vR,bR=d0,QR=IR,xR=A0,wR=yR,TR=/[\\^$.*+?()[\]{}|]/g,PR=/^\[object .+?Constructor\]$/,SR=Function.prototype,OR=Object.prototype,jR=SR.toString,MR=OR.hasOwnProperty,RR=RegExp("^"+jR.call(MR).replace(TR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DR(e){if(!xR(e)||QR(e))return!1;var t=bR(e)?RR:PR;return t.test(wR(e))}var kR=DR;function FR(e,t){return e==null?void 0:e[t]}var LR=FR,NR=kR,VR=LR;function HR(e,t){var n=VR(e,t);return NR(n)?n:void 0}var oc=HR,zR=oc,WR=zR(Object,"create"),ic=WR,f0=ic;function UR(){this.__data__=f0?f0(null):{},this.size=0}var YR=UR;function GR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KR=GR,JR=ic,XR="__lodash_hash_undefined__",ZR=Object.prototype,_R=ZR.hasOwnProperty;function qR(e){var t=this.__data__;if(JR){var n=t[e];return n===XR?void 0:n}return _R.call(t,e)?t[e]:void 0}var $R=qR,eD=ic,tD=Object.prototype,nD=tD.hasOwnProperty;function rD(e){var t=this.__data__;return eD?t[e]!==void 0:nD.call(t,e)}var oD=rD,iD=ic,sD="__lodash_hash_undefined__";function aD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iD&&t===void 0?sD:t,this}var lD=aD,cD=YR,uD=KR,AD=$R,dD=oD,gD=lD;function Ni(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])}}Ni.prototype.clear=cD,Ni.prototype.delete=uD,Ni.prototype.get=AD,Ni.prototype.has=dD,Ni.prototype.set=gD;var fD=Ni;function pD(){this.__data__=[],this.size=0}var hD=pD;function CD(e,t){return e===t||e!==e&&t!==t}var ED=CD,ID=ED;function mD(e,t){for(var n=e.length;n--;)if(ID(e[n][0],t))return n;return-1}var sc=mD,BD=sc,vD=Array.prototype,yD=vD.splice;function bD(e){var t=this.__data__,n=BD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yD.call(t,n,1),--this.size,!0}var QD=bD,xD=sc;function wD(e){var t=this.__data__,n=xD(t,e);return n<0?void 0:t[n][1]}var TD=wD,PD=sc;function SD(e){return PD(this.__data__,e)>-1}var OD=SD,jD=sc;function MD(e,t){var n=this.__data__,r=jD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var RD=MD,DD=hD,kD=QD,FD=TD,LD=OD,ND=RD;function Vi(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])}}Vi.prototype.clear=DD,Vi.prototype.delete=kD,Vi.prototype.get=FD,Vi.prototype.has=LD,Vi.prototype.set=ND;var VD=Vi,HD=oc,zD=tc,WD=HD(zD,"Map"),UD=WD,p0=fD,YD=VD,GD=UD;function KD(){this.size=0,this.__data__={hash:new p0,map:new(GD||YD),string:new p0}}var JD=KD;function XD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ZD=XD,_D=ZD;function qD(e,t){var n=e.__data__;return _D(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ac=qD,$D=ac;function ek(e){var t=$D(this,e).delete(e);return this.size-=t?1:0,t}var tk=ek,nk=ac;function rk(e){return nk(this,e).get(e)}var ok=rk,ik=ac;function sk(e){return ik(this,e).has(e)}var ak=sk,lk=ac;function ck(e,t){var n=lk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var uk=ck,Ak=JD,dk=tk,gk=ok,fk=ak,pk=uk;function Hi(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])}}Hi.prototype.clear=Ak,Hi.prototype.delete=dk,Hi.prototype.get=gk,Hi.prototype.has=fk,Hi.prototype.set=pk;var h0=Hi,C0=h0,hk="Expected a function";function Ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hk);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Ig.Cache||C0),n}Ig.Cache=C0;var Ck=Ig,Ek=Ck,Ik=500;function mk(e){var t=Ek(e,function(r){return n.size===Ik&&n.clear(),r}),n=t.cache;return t}var Bk=mk,vk=Bk,yk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bk=/\\(\\)?/g,Qk=vk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yk,function(n,r,o,s){t.push(o?s.replace(bk,"$1"):r||n)}),t}),xk=Qk;function wk(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var E0=wk,I0=nc,Tk=E0,Pk=ec,Sk=Cg,Ok=1/0,m0=I0?I0.prototype:void 0,B0=m0?m0.toString:void 0;function v0(e){if(typeof e=="string")return e;if(Pk(e))return Tk(e,v0)+"";if(Sk(e))return B0?B0.call(e):"";var t=e+"";return t=="0"&&1/e==-Ok?"-0":t}var jk=v0,Mk=jk;function Rk(e){return e==null?"":Mk(e)}var Dk=Rk,kk=ec,Fk=sR,Lk=xk,Nk=Dk;function Vk(e,t){return kk(e)?e:Fk(e,t)?[e]:Lk(Nk(e))}var Hk=Vk,zk=Cg,Wk=1/0;function Uk(e){if(typeof e=="string"||zk(e))return e;var t=e+"";return t=="0"&&1/e==-Wk?"-0":t}var Yk=Uk,Gk=Hk,Kk=Yk;function Jk(e,t){t=Gk(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Kk(t[n++])];return n&&n==r?e:void 0}var Xk=Jk,Zk=Xk;function _k(e,t,n){var r=e==null?void 0:Zk(e,t);return r===void 0?n:r}var qk=_k;const $k=$r(qk),y0=e=>{var q,J;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f,template:p={}}=e,[C,h]=w.useState(!1),{fields:E,remove:m,replace:B,append:v}=S.useArrayInput(e),{resetField:j}=Oo.useFormContext(),R=Pt(),x=de.useTranslate(),O=de.useRecordContext(e),P=w.useRef(p||{}),N=de.useTranslateLabel(),F=w.useCallback(H=>{m(H)},[m]);if(E.length>0){const{...H}=E[0];P.current=H;for(const K in P.current)P.current[K]=null}const X=w.useCallback((H=void 0)=>{let K=H;H==null&&(K=P.current,w.Children.count(t)===1&&k.isValidElement(w.Children.only(t))&&!w.Children.only(t).props.source&&w.Children.map(t,ee=>k.isValidElement(ee)&&ee.type!==de.FormDataConsumer).some(Boolean)?K="":(K=K||{},w.Children.forEach(t,ee=>{k.isValidElement(ee)&&ee.type!==de.FormDataConsumer&&ee.props.source&&(K[ee.props.source]=ee.props.defaultValue??null)})));const L={...K,...p};v(L),j(`${r}.${E.length}`,{defaultValue:K})},[v,t,j,r,E.length,p]),Z=H=>K=>{X(),H&&H(K)},Y=w.useCallback(()=>{B([]),h(!1)},[B]),$=$k(O,r),ce=w.useMemo(()=>({total:E.length,remove:F,source:r}),[E.length,F,r]),se=R.palette.mode==="dark"?R.palette.grey.A400:R.palette.grey.A800;return E?g.jsx(yA.Provider,{value:ce,children:g.jsxs("div",{className:A,children:[k.cloneElement(g.jsx(b0,{}),{label:o,source:r,disableAdd:l,template:p,onClick:Z((J=(q=e==null?void 0:e.addButton)==null?void 0:q.props)==null?void 0:J.onClick)}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${se}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${se}`},children:g.jsxs(b.TableRow,{children:[w.Children.map(t,(H,K)=>k.isValidElement(H)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:N({...H.props,resource:n})})},K):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:[E.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:"-"})})}),E.length>0&&E.map((H,K)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${se}}`},children:g.jsx(TM,{disableRemove:u,disableActions:s,index:K,member:`${r}.${K}`,onRemoveField:F,record:$&&$[K]||{},resource:n,source:r,children:t})},H.id))]})]})}),E.length>0&&g.jsx(S.Confirm,{isOpen:C,title:x("ra.action.clear_array_input"),content:x("ra.message.clear_array_input"),onConfirm:Y,onClose:()=>h(!1)})]})}):null},b0=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Pt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,l=o.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[t!==!1&&g.jsx(b.Typography,{children:t}),!n&&(k.isValidElement(e==null?void 0:e.addButton)?k.cloneElement(e==null?void 0:e.addButton,{onClick:r}):g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:g.jsx(et.PlusCircleOutlined,{style:{color:l}})}))]})},e5=Ae(y0,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));b0.propTypes={label:c.oneOfType([c.string,c.bool]),source:c.string,defaultValue:c.any},y0.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.oneOfType([c.string,c.bool]),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 t5(e,t){const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ge.chain(n.media).clone().extend(o).value();return ge.extend(n,{media:s})}case"updateDrawer":{const s=ge.chain(n.drawer).clone().extend(o).value();return ge.extend(n,{drawer:s})}case"updateLogo":{const s=ge.chain(n.logo).clone().extend(o).value();return ge.extend(n,{logo:s})}case"updateNotifications":{const s=ge.chain(n.notifications).clone().extend(o).value();return ge.extend(n,s)}case"updateTheme":{const s=ge.chain(n.theme).clone().extend(o).value();return ge.extend(n,{theme:s})}default:return n}}const n5={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"}},Q0=w.createContext(void 0);function x0(e){var Z;const t=de.useAuthProvider(),n=de.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),l=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:u,isHorizontalLayout:A,menuOrientation:f,drawerWidth:p}=wn(),C=A(f)&&!s,{drawerOpen:h,openDrawer:E}=no(),m=w.useCallback(()=>{E(!h)},[h,E]),[B,v]=w.useState(!1),[j,R]=w.useReducer(t5,ge.chain(n5).clone().merge({drawer:{open:!u||h}}).value()),x=w.useCallback(()=>v(!1),[]),O=w.useMemo(()=>({state:j,dispatch:R}),[j,R]),{logoIcon:P,logoMain:N,enableNotification:F,notification:X}=e;return w.useEffect(()=>{R({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:l,horizontal:C}})},[f,o,s,l]),w.useEffect(()=>{R({type:"updateDrawer",payload:{open:h,width:p,handleDrawerToggle:m}})},[h,p,m]),w.useEffect(()=>{u||E(!l)},[l,u]),w.useEffect(()=>{R({type:"updateLogo",payload:{main:N,icon:P}})},[P,N]),w.useEffect(()=>{R({type:"updateNotifications",payload:{enable:F,resource:X??"entities/notification"}})},[F,X]),w.useEffect(()=>{R({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),w.useEffect(()=>{t.isImpersonating().then(Y=>{var $;v(!Y&&(($=n==null?void 0:n.data)==null?void 0:$.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),g.jsxs(Q0.Provider,{value:O,children:[g.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:x,firstAccess:!0})}),e.children]})}function w0(e){return w.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:l}=t;return g.jsx(x0,{logoIcon:r,logoMain:o,enableNotification:s,notification:l,children:g.jsx(e,{ref:n,...t})})})}function mg(){const e=w.useContext(Q0);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function r5(){return mg().dispatch}function zi(){return mg().state}function Yn(){return zi().media}function Yo(){return zi().drawer}function T0(){return zi().logo}function lc(){return zi().notifications}function o5(){return zi().theme}const i5={ml:{xs:0,lg:-2}};function P0(){const{open:e,handleDrawerToggle:t}=Yo();return g.jsx(Js,{value:"drawer","aria-label":"open drawer",sx:i5,onChange:t,selected:e,children:e?g.jsx(et.MenuFoldOutlined,{}):g.jsx(et.MenuUnfoldOutlined,{})})}function S0(e){const t=w.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=Yn(),{open:s,width:l}=Yo(),u=r?b.AppBar:gC,A=Ir(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||ge.extend(f,{open:s}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&g.jsx(P0,{}),e.children]})})}function s5(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:l}=lc(),u=de.useNotify(),A=de.useRedirect(),[f]=de.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Mr().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()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=w.useCallback(()=>f(),[f]),[C]=de.useLocaleState(),h=w.useMemo(()=>Mr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:s,children:g.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(et.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 a5={width:36,height:36,fontSize:"1rem"},l5={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function O0(){const{enable:e}=lc();return e?g.jsx(c5,{}):null}function c5(){const e=de.useTranslate(),t=b.useTheme(),{downMd:n}=Yn(),{resource:r}=lc(),[o,s]=w.useState([]),{data:l,isLoading:u}=de.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),A=o.filter(E=>E.readed===null).length,{open:f,anchorEl:p,handleClose:C,handleToggle:h}=pl();return w.useEffect(()=>{!u&&l&&s(l??[])},[l,u]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{value:"notifications",selected:f,onChange:h,children:g.jsx(b.Badge,{badgeContent:A,color:"primary",children:g.jsx(et.BellOutlined,{})})}),g.jsx(b.Popper,{placement:n?"bottom":"bottom-end",open:f,anchorEl:p,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[n?-5:0,9]}}]},children:({TransitionProps:E})=>g.jsx(Ao,{type:"grow",position:n?"top":"top-right",in:f,...E,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:C,children:g.jsxs(Wn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:A>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(Fi,{color:"success",size:"small",children:g.jsx(et.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":a5,"& .MuiListItemSecondaryAction-root":{...l5,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:o.map((m,B)=>g.jsx(s5,{selected:A>0,notification:m,onClick:C,divider:B<o.length-1},m.id))}),g.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:mt.Link,onClick:C,children:g.jsx(b.ListItemText,{primary:g.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),g.jsx(b.Divider,{})]})})})})})]})}const u5=()=>{const[e,t]=w.useState(!1),n=w.useCallback(()=>t(!1),[t]),r=w.useCallback(()=>t(!0),[t]),o=de.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.Key,{})}),g.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:n})})]})},A5=()=>{const e=de.useLogout(),t=de.useTranslate();return g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},d5=()=>{const e=de.useTranslate(),t=de.useAuthProvider(),n=w.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=w.useState(!1);return w.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function j0(){var E;const e=b.useTheme(),t=de.useDataProvider(),n=de.useAuthProvider(),{identity:r}=de.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,l]=w.useState(null),{open:u,anchorEl:A,handleToggle:f,handleClose:p}=pl(),C=de.useLogout(),h=w.useCallback(()=>{C()},[n,C]);return w.useEffect(()=>{o&&t.getFile("/profile/me/image").then(m=>l(m))},[t,o]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Gs,{alt:(E=r==null?void 0:r.name)==null?void 0:E.toUpperCase(),src:s,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),g.jsx(ir.Popper,{placement:"bottom-end",open:u,anchorEl:A,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:m})=>{var B;return g.jsx(Ao,{type:"grow",position:"top-right",in:u,...m,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:p,children:g.jsxs(Wn,{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(Gs,{alt:"profile user",src:s,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(B=r==null?void 0:r.roles)==null?void 0:B.map(v=>v.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(Fi,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(et.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(u5,{}),g.jsx(A5,{}),g.jsx(d5,{})]})})})]})})})})}})]})}const M0=e=>{const t=Pt(),{downMd:n}=Yn(),{open:r,anchorEl:o,handleToggle:s,handleClose:l}=pl();return n?g.jsxs(g.Fragment,{children:[g.jsx(Js,{"aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:g.jsx(et.MoreOutlined,{})}),g.jsx(b.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:u})=>g.jsx(Ao,{type:"fade",in:r,...u,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:l,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function R0(e){return g.jsx(b.Box,{...e,flex:1})}function $s(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]})})}$s.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},$s.defaultProps={copy:"© Applica Software Guru for"};var D0={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})(D0);var cc=D0.exports,Bg={};const g5=Hx($j);var k0;function uc(){return k0||(k0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=g5}(Bg)),Bg}function F0(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=F0(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function L0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=F0(e))&&(r&&(r+=" "),r+=t);return r}var f5="__lodash_hash_undefined__";function p5(e){return this.__data__.set(e,f5),this}var h5=p5;function C5(e){return this.__data__.has(e)}var E5=C5,I5=h0,m5=h5,B5=E5;function Ac(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new I5;++t<n;)this.add(e[t])}Ac.prototype.add=Ac.prototype.push=m5,Ac.prototype.has=B5;var N0=Ac;function v5(e,t){return e.has(t)}var V0=v5;function y5(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var H0=y5;function b5(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Q5=b5,x5=hg,w5=rc,T5="[object Arguments]";function P5(e){return w5(e)&&x5(e)==T5}var S5=P5,z0=S5,O5=rc,W0=Object.prototype,j5=W0.hasOwnProperty,M5=W0.propertyIsEnumerable,R5=z0(function(){return arguments}())?z0:function(e){return O5(e)&&j5.call(e,"callee")&&!M5.call(e,"callee")},D5=R5,k5=9007199254740991;function F5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k5}var L5=F5;function N5(e){return function(t){return e(t)}}var V5=N5,H5=d0,z5=L5;function W5(e){return e!=null&&z5(e.length)&&!H5(e)}var U5=W5,Y5=oc,G5=tc,K5=Y5(G5,"Set"),J5=K5,vg=globalThis&&globalThis.__assign||function(){return vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},vg.apply(this,arguments)},X5=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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},U0=function(e){var t=e.className,n=e.sx,r=X5(e,["className","sx"]),o=de.useLoading(),s=Pt();return k.createElement(Z5,{className:t,sx:n},o?k.createElement(Dd,vg({className:L0("app-loader",dc.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):k.createElement(OB,{className:dc.loadedIcon}))};U0.propTypes={classes:c.object,className:c.string,width:c.string};var yg="RaLoadingIndicator",dc={loader:"".concat(yg,"-loader"),loadedIcon:"".concat(yg,"-loadedIcon")},Z5=Ae("div",{name:yg,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(dc.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(dc.loadedIcon)]={},t});const bg=e=>e.scrollTop;function Wi(e,t){var n,r;const{timeout:o,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const _5=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function q5(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=Ei(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"?o?`translateX(${o.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?o?`translateY(${o.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function Y0(e){return typeof e=="function"?e():e}function gc(e,t,n){const r=Y0(n),o=q5(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const G0=k.forwardRef(function(t,n){const r=Pt(),o={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=o,in:h,onEnter:E,onEntered:m,onEntering:B,onExit:v,onExited:j,onExiting:R,style:x,timeout:O=s,TransitionComponent:P=Td}=t,N=Ue(t,_5),F=k.useRef(null),X=Qn(A.ref,F,n),Z=L=>ee=>{L&&(ee===void 0?L(F.current):L(F.current,ee))},Y=Z((L,ee)=>{gc(p,L,f),bg(L),E&&E(L,ee)}),$=Z((L,ee)=>{const z=Wi({timeout:O,style:x,easing:C},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",W({},z)),L.style.transition=r.transitions.create("transform",W({},z)),L.style.webkitTransform="none",L.style.transform="none",B&&B(L,ee)}),ce=Z(m),se=Z(R),q=Z(L=>{const ee=Wi({timeout:O,style:x,easing:C},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",ee),L.style.transition=r.transitions.create("transform",ee),gc(p,L,f),v&&v(L)}),J=Z(L=>{L.style.webkitTransition="",L.style.transition="",j&&j(L)}),H=L=>{l&&l(F.current,L)},K=k.useCallback(()=>{F.current&&gc(p,F.current,f)},[p,f]);return k.useEffect(()=>{if(h||p==="down"||p==="right")return;const L=hh(()=>{F.current&&gc(p,F.current,f)}),ee=Ei(F.current);return ee.addEventListener("resize",L),()=>{L.clear(),ee.removeEventListener("resize",L)}},[p,h,f]),k.useEffect(()=>{h||K()},[h,K]),g.jsx(P,W({nodeRef:F,onEnter:Y,onEntered:ce,onEntering:$,onExit:q,onExited:J,onExiting:se,addEndListener:H,appear:u,in:h,timeout:O},N,{children:(L,ee)=>k.cloneElement(A,W({ref:X,style:W({visibility:L==="exited"&&!h?"hidden":void 0},x,A.props.style)},ee))}))});process.env.NODE_ENV!=="production"&&(G0.propTypes={addEndListener:c.func,appear:c.bool,children:hi.isRequired,container:Cr(c.oneOfType([jo,c.func]),e=>{if(e.open){const t=Y0(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(`
|
|
218
|
+
`),d3)),fm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ue(r,u3),E=W({},r,{color:s,disableShrink:l,size:u,thickness:f,value:p,variant:C}),m=g3(E),B={},v={},j={};if(C==="determinate"){const R=2*Math.PI*((uo-f)/2);B.strokeDasharray=R.toFixed(3),j["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*R).toFixed(3)}px`,v.transform="rotate(-90deg)"}return g.jsx(f3,W({className:Ye(m.root,o),style:W({width:u,height:u},v,A),ownerState:E,ref:n,role:"progressbar"},j,h,{children:g.jsx(p3,{className:m.svg,ownerState:E,viewBox:`${uo/2} ${uo/2} ${uo} ${uo}`,children:g.jsx(h3,{className:m.circle,style:B,ownerState:E,cx:uo,cy:uo,r:(uo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(fm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:Cr(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 Dd=fm;function C3(e){return Lt("MuiLoadingButton",e)}const Nr=Ht("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),E3=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],I3=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=ir.unstable_composeClasses(o,C3,r);return W({},r,s)},m3=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",B3=Ae(l3,{shouldForwardProp:e=>m3(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Nr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Nr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>W({[`& .${Nr.startIconLoadingStart}, & .${Nr.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}),[`&.${Nr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Nr.startIconLoadingStart}, & .${Nr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),v3=Ae("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>W({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})),pm=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=Ue(r,E3),h=$u(l),E=A??g.jsx(Dd,{"aria-labelledby":h,color:"inherit",size:16}),m=W({},r,{disabled:s,loading:u,loadingIndicator:E,loadingPosition:f,variant:p}),B=I3(m),v=u?g.jsx(v3,{className:B.loadingIndicator,ownerState:m,children:E}):null;return g.jsxs(B3,W({disabled:s||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:m,children:[m.loadingPosition==="end"?o:v,m.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(pm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:Cr(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 y3=pm;function kd({variant:e,theme:t,color:n,loadingPosition:r}){const o=rn(t,n),{lighter:s,main:l,dark:u,contrastText:A}=o,f=`${n}Button`,p=ki(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},E={"&::after":{boxShadow:`0 0 6px 6px ${He(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${He(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},...E};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...E};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...E};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:s,borderColor:l,...h,...C,...E};case"text":default:return{color:l,...C,...E}}}const b3=Ae(y3,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,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"&&{...kd({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")&&!o&&{color:"#fff"},...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...kd({variant:t,theme:e,color:r,loadingPosition:s})}}})),Fd=w.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const l=Pt();return g.jsx(b3,{ref:s,variant:e,shape:t,theme:l,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});Fd.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},Fd.displayName="LoadingButton";function Q3({color:e,theme:t,labelColor:n}){const r=rn(t,e),{main:o,contrastText:s}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const x3=Ae(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&Q3({color:t,theme:e,labelColor:n})}));function Ld({children:e,arrow:t,labelColor:n="",...r}){const o=Pt();return g.jsx(b.Box,{display:"flex",children:g.jsx(x3,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Ld.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const Ao=w.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},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,{...o,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...o,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...o,children:g.jsx(b.Box,{sx:l,children:e})})]})});Ao.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"])},w.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function hm({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)}%`})})]})}hm.propTypes={value:c.number};function Cm({value:e,size:t,variant:n,thickness:r,showLabel:o,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}),o&&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})]})}Cm.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 Em({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})]})}Em.propTypes={icon:c.node,value:c.number};function Im({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)}%`})})]})}Im.propTypes={value:c.number};const w3=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary"},{defaults:!0});return g.jsx(Fi,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Js=w.forwardRef(function(t,n){const r=Ir(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return g.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})}),mm=w.createContext({});function T3(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=S.useResourceContext(),o=S.useDataProvider(),{search:s}=fi.useLocation(),l=`${r}/new`,u=w.useCallback(()=>{if(!t||!ge.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(s??"").forEach((E,m)=>{h[m]=E}),o.get(l,h).then(E=>E.data).then(E=>{const{responseCode:m,value:B}=E;return m==="ok"?B:Promise.reject(E)})},[r,t,s,o]),A=w.useMemo(()=>ge.chain(n).extend({queryKey:[r,s],queryFn:u}).value(),[r,s,u,n]),{data:f,isLoading:p}=Hu.useQuery(A),C=ge.omit(e,["useDefaults"]);return p?g.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:g.jsx(b.CircularProgress,{})}):g.jsx(mm.Provider,{value:f??{},children:g.jsx(S.Create,{...C})})}function P3(){return w.useContext(mm)}const S3=Ae(T3,{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",backgroundColor:e.palette.background.default}})),O3=Ts(S.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)}})),lr=e=>g.jsx(O3,{...e});lr.defaultProps={...S.Toolbar.defaultProps},lr.propTypes={...S.Toolbar.propTypes};const Nd=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...l})=>{const u=S.useTranslate(),A=S.useResourceContext(),{cardTitle:f,cardSubheader:p}=w.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(Wn,{content:t,title:f,subheader:p,secondary:o,divider:!0,children:g.jsxs(w.Fragment,{children:[e,s===!0?g.jsx(lr,{children:g.jsx(S.SaveButton,{})}):s]})})})};Nd.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},Nd.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 j3=Ae(S.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),Yl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=wn();return g.jsx(j3,{defaultValues:n,spacing:t||o,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};Yl.propTypes={...b.Grid.propTypes,...S.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},Yl.defaultProps={...b.Stack.defaultProps},Yl.Section=Nd;const M3=Ts(S.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}})),Gl=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...l})=>{const u=SA(e),A=S.useRecordContext();return g.jsx(Wn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:g.jsx(M3,{toolbar:g.jsx(lr,{}),...l})})};Gl.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},Gl.propTypes={...S.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 Kl=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{getFieldState:E,formState:m}=Oo.useFormContext(),{error:B}=E(p,m),v=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},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(S.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),w.isValidElement(t)?w.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})]})};Kl.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},Kl.defaultProps={display:"label",divider:!1};const R3=Ae(S.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%"}}})),D3=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>g.jsx(Kl,{label:e,addLabel:t,source:n,helperText:r,divider:o,children:g.jsx(R3,{source:n,label:!1,...s})}),Vd=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(Ro,{children:[e&&g.jsx(S.EditButton,{}),t&&g.jsx(S.DeleteWithConfirmButton,{}),n&&g.jsx(S.CloneButton,{})]});Vd.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},Vd.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Bm=Ae("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),k3=Ae("ul")({display:"inline-block"}),vm=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,l=de.useRecordContext(e),u=dt.get(l,r),A=de.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):g.jsx(Bm,{className:t,...s});if(Array.isArray(u))return g.jsx(k3,{className:t,...s,children:u.map((C,h)=>{var m;const E=o instanceof String?(m=dt.get(C,o))==null?void 0:m.toString():o;return g.jsx("li",{children:E},h)})});const f=o instanceof String?(p=dt.get(l,o))==null?void 0:p.toString():o;return g.jsx(Bm,{className:t,...s,children:f})};vm.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};const Hd=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,l]=w.useState(null),u=S.useRecordContext(o),A=S.useDataProvider(),f=S.useResourceContext(),p=w.useCallback(async E=>{E.preventDefault(),E.stopPropagation();const m=dt.get(u,o==null?void 0:o.source),B=f.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(o==null?void 0:o.source)}/${(m==null?void 0:m.id)||(u==null?void 0:u.id)}`),j=document.createElement("a");j.href=v,j.download=dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source)),j.click()},[A,u,e,f,t,o==null?void 0:o.source,o==null?void 0:o.title]),C=w.useMemo(()=>({...u,[o==null?void 0:o.source]:(u==null?void 0:u.src)||dt.get(u,o==null?void 0:o.source),[o==null?void 0:o.title]:(u==null?void 0:u.title)||dt.get(u,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[u,o==null?void 0:o.source,o==null?void 0:o.title]),h=S.useTranslate();return w.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:E})=>l(E)).catch(()=>l(null))},[u,A,r]),g.jsx(vm,{...o,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),s&&" | ",s&&h("ra.attachment.info",{user:s==null?void 0:s.name,created:Mr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Hd.propTypes={...S.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const F3=Ae(S.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Xs=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(F3,{...e,source:t})};Xs.propTypes={...S.ImageField.propTypes,source:c.string};const Jl=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const l=w.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=S.useRecordContext(),A=o||u;return g.jsx(Xs,{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})};Jl.defaultProps={...Xs.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},Jl.propTypes={...Xs.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 ym={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Hn,function(){return function(n,r,o){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)}o.en.relativeTime=l,s.fromToBase=function(f,p,C,h,E){for(var m,B,v,j=C.$locale().relativeTime||l,R=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=R.length,O=0;O<x;O+=1){var P=R[O];P.d&&(m=h?o(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var N=(n.rounding||Math.round)(Math.abs(m));if(v=m>0,N<=P.r||!P.r){N<=1&&O>0&&(P=R[O-1]);var F=j[P.l];E&&(N=E(""+N)),B=typeof F=="string"?F.replace("%d",N):F(N,p,P.l,v);break}}if(p)return B;var X=v?j.future:j.past;return typeof X=="function"?X(B):X.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?o.utc():o()};s.toNow=function(f){return this.to(A(this),f)},s.fromNow=function(f){return this.from(A(this),f)}}})})(ym);var L3=ym.exports;const N3=$r(L3);Mr.extend(N3);const Xl=e=>{const t=S.useRecordContext(e),[n]=S.useLocaleState(),r=w.useMemo(()=>Mr(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(w.Fragment,{children:[g.jsx(S.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Xl.displayName="DateAgoField",Xl.propTypes={source:c.string.isRequired};const bm=Ae(S.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));bm.propTypes={...S.DateField.propTypes};const zd=e=>g.jsx(bm,{...e});zd.defaultProps={...S.DateField.defaultProps,variant:"body1"},zd.propTypes={...S.DateField.propTypes};const Qm=Ae(S.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Qm.propTypes={...S.EmailField.propTypes};const Wd=e=>g.jsx(Qm,{...e});Wd.defaultProps={...S.EmailField.defaultProps,variant:"body1"},Wd.propTypes={...S.EmailField.propTypes};const V3=Ae(S.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Ud=({...e})=>{const t=S.useRecordContext(e),n=w.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.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=o,l.download=s,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(V3,{...e,record:t,onClick:n})};Ud.propTypes={...S.FileField.propTypes,source:c.string,title:c.string};const xm=e=>g.jsx(S.FunctionField,{...e});xm.defaultProps={variant:"body1"};const wm=Ae(S.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));wm.propTypes={...S.TextField.propTypes};const Zl=e=>g.jsx(wm,{...e});Zl.defaultProps={...S.TextField.defaultProps,variant:"body1"},Zl.propTypes={...S.TextField.propTypes};function H3(e){const t=b.useTheme(),n=de.useLocales(),{source:r=""}=e,o=de.useRecordContext(e),s=o[r],l=!wA(s,n),u=Ir(e,{flex:1}),[A]=de.useLocaleState(),f=w.useMemo(()=>l?g.jsx(et.FlagFilled,{style:{color:t.palette.warning.main}}):g.jsx(et.FlagOutlined,{}),[l]),p=w.useMemo(()=>g.jsx(b.Stack,{children:ge.map(n,(C,h)=>g.jsx(b.Typography,{children:`${C.locale.toUpperCase()}: ${(s??{})[C.locale]??""}`},h))}),[s,n]);return g.jsx(Ld,{title:p,arrow:!1,children:g.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[f,g.jsx(Zl,{...e,source:`${r}.${A}`,sx:u})]})})}const z3=Ae("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"}})),Yd=({source:e,defaultValue:t,...n})=>{const r=S.useRecordContext(n),o=dt.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})};Yd.propTypes={defaultValue:c.any,source:c.string,record:c.object},Yd.defaultProps={defaultValue:" "};const Tm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Tm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Gd=({label:e,source:t,defaultValue:n,children:r,tooltip:o,...s})=>{const{getCurrentDialog:l}=Do(),u=S.useRecordContext(s),A=S.useResourceContext(s),f=l(),p=w.useMemo(()=>!o||o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]);return g.jsx(Tm,{title:p,children:g.jsxs(w.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(S.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(z3,{...s,children:w.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};Gd.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},Gd.defaultProps={defaultValue:" ",children:g.jsx(Yd,{})};const Kd=function({children:e,className:t}){return g.jsx("div",{className:t,children:e})};Kd.defaultProps={children:null,className:""},Kd.propTypes={children:c.node,className:c.string};const W3=Ts(Kd,{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n,bulkActionButtons:r})=>({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:r===!1?0: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}}})),Li=e=>g.jsx(W3,{...e,children:g.jsx(S.ReferenceManyField,{pagination:g.jsx(S.Pagination,{}),...e})});Li.defaultProps={margin:!1,border:!1},Li.propTypes={...S.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Pm=({source:e,...t})=>{const n=S.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,l=s/1024,u=l>1?`${l.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Pm.propTypes={record:c.object,source:c.string};const nt=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:l,...u})=>{const A=Xt.useTheme(),{getCurrentDialog:f}=Do(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:E}}=S.useInput(u),m=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:E?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&g.jsx(b.InputLabel,{error:E===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(S.FieldTitle,{label:e,source:p,resource:m||C,isRequired:h})}),w.isValidElement(t)?w.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:E===!0,children:r})]})};nt.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},nt.defaultProps={display:"label",divider:!1};const U3=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},Y3=Ae(S.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}},...U3(e)})),Jd=({children:e,disabled:t,type:n,...r})=>{const o=S.useRecordContext(r),s=r==null?void 0:r.source,l=o==null?void 0:o.id;return S.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(nt,{...r,children:g.jsx(Y3,{disabled:t,children:w.cloneElement(e,{...e.props,entityId:l,property:s})})})};Jd.propTypes={...S.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},Jd.defaultProps={children:g.jsx(Hd,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const G3=Ae(S.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"}})),Xd=({...e})=>g.jsx(nt,{...e,children:g.jsx(G3,{})});Xd.propTypes={...S.AutocompleteArrayInput.propTypes,...nt.propTypes},Xd.defaultProps={...S.AutocompleteArrayInput.defaultProps,size:"small"};const K3=Ae(S.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"}})),Zd=e=>{const{perPage:t,...n}=e;return g.jsx(nt,{...n,children:g.jsx(K3,{})})};Zd.propTypes={...S.AutocompleteInput.propTypes,...nt.propTypes},Zd.defaultProps={...S.AutocompleteInput.defaultProps,size:"small"};const J3=Ae(S.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),_d=({horizontal:e,...t})=>{const n=Pt();return g.jsx(nt,{...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(J3,{})})};_d.defaultProps={...S.BooleanInput.defaultProps,...nt.defaultProps},_d.propTypes={...S.BooleanInput.propTypes,...nt.propTypes,horizontal:c.bool};const X3=Ae(S.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),qd=e=>g.jsx(nt,{...e,children:g.jsx(X3,{})});qd.propTypes={...S.DateInput.propTypes,...nt.propTypes},qd.defaultProps={...S.DateInput.defaultProps,...nt.defaultProps};const Z3=Ae(S.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),$d=e=>g.jsx(nt,{...e,children:g.jsx(Z3,{})});$d.propTypes={...S.DateTimeInput.propTypes,...nt.propTypes},$d.defaultProps={...nt.defaultProps};const _3=Ae(S.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}}})),eg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n,l=w.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=dt.get(o,s);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[o,s,r]);return g.jsx(nt,{...n,children:g.jsx(_3,{children:w.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:l}})})})};eg.propTypes={...S.FileInput.propTypes,source:c.string,title:c.string,children:c.node},eg.defaultProps={children:g.jsx(Ud,{})};const tg=({children:e,title:t,...n})=>{const r=Oo.useWatch({name:n.source}),o=S.useRecordContext(n),{source:s}=n;return S.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(nt,{...n,children:g.jsx(S.ImageInput,{accept:"image/*",children:w.cloneElement(e,{...e.props,title:t,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`)}})})})};tg.defaultProps={children:g.jsx(Jl,{}),multiple:!1},tg.propTypes={...S.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const Pn=e=>g.jsx(nt,{...e,children:g.jsx(S.TextInput,{})});Pn.propTypes={...S.TextInput.propTypes,...nt.propTypes};const q3={vertical:"bottom",horizontal:"right"},$3={vertical:"top",horizontal:"right"};function eM(e){const{source:t}=e,{fieldState:n}=de.useInput(e),r=Oo.useWatch({name:t}),{error:o}=n,s=de.useLocales(),l=!wA(r,s),[u]=de.useLocaleState(),[A,f]=w.useState(u),[p,C]=w.useState(null),h=!!p,E=w.useCallback(v=>C(h?null:v.currentTarget),[h,C]),m=w.useCallback(()=>C(null),[C]),B=w.useMemo(()=>ge.map(s,(v,j)=>g.jsx(b.MenuItem,{onClick:()=>{f(v.locale),m()},children:g.jsx(b.ListItemText,{primary:`${v.locale.toUpperCase()}: ${(r??{})[v.locale]??""}`})},j)),[s,f,m,r]);return g.jsx(nt,{...e,helperText:o==null?void 0:o.message,children:g.jsxs(b.Box,{flex:1,children:[ge.map(s,(v,j)=>g.jsx(Pn,{...e,source:`${t}.${v.locale}`,sx:{width:"100%",display:v.locale===A?"inline-flex":"none"},label:!1,InputProps:{endAdornment:g.jsx(b.Chip,{label:g.jsx(b.Typography,{variant:"button",children:A}),size:"small",onClick:E,color:l?"warning":void 0})}},j)),g.jsx(b.Menu,{anchorEl:p,open:h,anchorOrigin:q3,transformOrigin:$3,onClose:m,children:B})]})})}const tM=Ae(S.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ng=e=>g.jsx(nt,{...e,children:g.jsx(tM,{})});ng.propTypes={...S.NumberInput.propTypes,...nt.propTypes},ng.defaultProps={...S.NumberInput.defaultProps,...nt.defaultProps};const Sm=({source:e,minWidth:t=300,children:n})=>{const r=S.useResourceContext(),o=S.useRecordContext(),[s,l]=w.useState(dt.get(o,e,"")),[u,A]=w.useState(!1),f=w.useCallback(m=>l(m.target.value),[]),p=S.useDataProvider(),C=w.useCallback(m=>{m.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),h=w.useCallback(()=>{dt.get(o,e)!==s&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,e,o]),E=w.useCallback(m=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:m,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return w.useEffect(()=>l(dt.get(o,e)),[o,e]),n?w.cloneElement(n,{...n.props,source:e,value:s,onChange:E}):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"})};Sm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const rg=({children:e,...t})=>g.jsx(S.ReferenceArrayInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});rg.propTypes={...S.ReferenceArrayInput.propTypes,children:c.element},rg.defaultProps={...S.ReferenceArrayInput.defaultProps};const og=({children:e,...t})=>g.jsx(S.ReferenceInput,{...t,children:w.cloneElement(e,{...t,source:e.props.source||t.source})});og.propTypes={...S.ReferenceInput.propTypes,children:c.element},og.defaultProps={...S.ReferenceInput.defaultProps};const ig=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>g.jsx(S.ResourceContextProvider,{value:e,children:g.jsx(Li,{perPage:5,pagination:g.jsx(S.Pagination,{}),...s,reference:e,target:t,children:g.jsxs(w.Fragment,{children:[g.jsx(S.ListToolbar,{filters:r,actions:o}),n]})})});ig.propTypes={...Li.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])},ig.defaultProps={...Li.defaultProps};const nM=Ae(S.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),rM=e=>g.jsx(nM,{...e}),Om=Ae(S.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"}}));Om.propTypes={...S.SelectArrayInput.propTypes};const sg=e=>g.jsx(nt,{...e,children:g.jsx(Om,{options:{autoWidth:!1}})});sg.defaultProps={optionText:"name",optionValue:"id"},sg.propTypes={...S.SelectArrayInput.propTypes,...nt.propTypes};const oM=Ae(S.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(nt,{...e,children:g.jsx(oM,{})});jm.propTypes={...S.SelectInput.propTypes,...nt.propTypes};const _l=({...e})=>{var u,A;const t=S.useTranslate(),n=S.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=Oo.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let o=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&&(o=o&&o.length>0?`${l} - ${t(o)}`:l),g.jsx(Pn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};_l.displayName="SmartTextInput",_l.defaultProps={multiline:!1},_l.propTypes={...Pn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const iM=e=>{if(!e)return"";const t=cC(e);return t?t.format("HH:mm"):""},sM=e=>e,aM=Ae(S.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ag=e=>g.jsx(nt,{...e,children:g.jsx(aM,{})});ag.defaultProps={...S.TimeInput.defaultProps,format:iM,parse:sM},ag.propTypes={...S.TimeInput.propTypes,...nt.propTypes};const lg=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=wn(),[r,o]=w.useState(!1),s=de.useAuthProvider(),l=de.useTranslate(),u=de.useNotify(),A=w.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;o(!0),s==null||s.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>{u((h==null?void 0:h.message)||(h==null?void 0:h.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return g.jsx(de.ResourceContextProvider,{value:"user/change-password",children:g.jsx(de.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Gl,{onSubmit:A,toolbar:g.jsx(lr,{children:g.jsx(S.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(Pn,{source:"oldPassword",type:"password",validate:de.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Pn,{source:"newPassword",type:"password",validate:de.required()})})]})})})})},lM=Ae(S.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",backgroundColor:e.palette.background.default}})),cM=Ae(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),uM=Ae(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),cg=({title:e,divider:t,variant:n})=>{const r=S.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsx(cM,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(uM,{})]})};cg.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},cg.defaultProps={divider:!0,variant:"h4"};const AM=Ae(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",marginRight:0}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function Mm(e){const{spacing:t}=wn(),{spacing:n=t}=e,r=ge.omit(e,["spacing"]);return g.jsx(S.Form,{...r,children:g.jsx(AM,{container:!0,spacing:n*2,children:e.children})})}function ug(e){return e.id??e.label}function Rm(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function dM(e){return ge.map(e,"id")}function ql(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function Dm(e,t){const n=e!==void 0?ql(e):0;return ge.chain(t).filter(o=>e!==void 0?Rm(e,o.id):!0).filter(o=>ql(o.id)===n+1).value()}function gM(e,t){var s;const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ge.extend(n,{formRootPath:o});case"setSyncWithLocation":return ge.extend(n,{syncWithLocation:o});case"setErrorCount":return ge.extend(n,{errorCount:o});case"setActiveItem":return ge.includes(dM(e.items),o)?ge.extend(n,{activeItem:o}):n;case"addItem":{const{id:l}=o;return ge.extend(n,{items:ge.chain(n.items).clone().reject(u=>u.id===l).concat([o]).orderBy(u=>u.index).value()})}case"removeItem":{const l=ge.isString(o)?o:o.id,u=ge.chain(n.items).clone().reject(A=>A.id===l).value();return ge.extend(n,{items:u}),n.activeItem===l&&ge.extend(n,{activeItem:((s=ge.first(u))==null?void 0:s.id)??void 0}),n}default:return n}}const fM={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},km=w.createContext(void 0);function Fm(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=fi.useLocation(),[s,l]=w.useReducer(gM,ge.cloneDeep(fM)),{formRootPath:u,items:A}=s,f=w.useMemo(()=>({state:s,dispatch:l}),[s,l]);return w.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const C=ge.chain(p).map(E=>fi.matchPath(E,o)).reject(E=>E===null).first().value(),h=C==null?void 0:C.pathnameBase;h!==void 0&&h!==u&&l({type:"setFormRootPath",payload:h})},[o,u,r]),w.useEffect(()=>{l({type:"setSyncWithLocation",payload:!!t})},[t,l]),w.useEffect(()=>{l({type:"setErrorCount",payload:!!n})},[n,l]),w.useEffect(()=>{var p;if(t&&u!==void 0){let C=o.replace(u,"").replace(new RegExp(/^\/?/),"");ge.isEmpty(C)&&(C=((p=ge.chain(A).filter(h=>Dm(h.id,A).length===0).orderBy([h=>ql(h.id),h=>h.index]).first().value())==null?void 0:p.id)??void 0),l({type:"setActiveItem",payload:C})}},[l,u,o,A]),g.jsx(km.Provider,{value:f,children:e.children})}function Lm(){const e=w.useContext(km);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Zs(){return Lm().state}function Ag(){return Lm().dispatch}function Nm(){return Zs().formRootPath}function Vm(){return Zs().activeItem}function Hm(){return Zs().items}function zm(){return Zs().syncWithLocation}function Wm(){return Zs().errorCount}function Um(){const e=Ag();return w.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function Ym(){const e=Ag();return w.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Gm(){const e=Ag();return w.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var pM=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},Km=e=>e.firstChild?e.firstChild.offsetParent===e:!0,hM=(e,t)=>{let n=e,r=0;Km(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},CM=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},_s=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?_s="sticky":CSS.supports("position","-webkit-sticky")&&(_s="-webkit-sticky"));var $l=!1;try{const e=Object.defineProperty({},"passive",{get(){$l={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var dg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=o(s()),u=()=>{Object.assign(l,o(s())),n()};return window.addEventListener("resize",u,$l),r.push(()=>window.removeEventListener("resize",u)),l}else{const s=o(t.getBoundingClientRect()),l=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),s}},EM=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}},IM=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,l=pM(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const F=C();F!==x&&O(F),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=F=>{const{offsetTop:X,height:Z}=E,{naturalTop:Y}=v,{height:$}=j;return F+X+Z>=Y+$+R+o},C=()=>{const{height:F}=E,{height:X}=j;return X+s+o<=F?3:p(f)?1:2},h=l!==window&&Km(l),E=dg({el:l,onChange:A,unsubs:t,measure:({height:F,top:X})=>({height:F,offsetTop:h?X:0})}),m=CM(e),B=m===window?{top:0,bottom:0}:EM(m),v=dg({el:m,onChange:A,unsubs:t,measure:({height:F})=>({height:F-B.top-B.bottom,naturalTop:m===window?0:hM(m,l)+B.top+E.offsetTop})}),j=dg({el:e,onChange:A,unsubs:t,measure:({height:F})=>({height:F})});let R=0,x=C();const O=F=>{const X=x;if(x=F,X===2&&(R=-1),F===3){e.style.position=_s,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:Y}=E,{height:$,naturalTop:ce}=v,{height:se}=j;if(F===2)if(e.style.position="relative",R=X===0?Math.max(0,Y+f-ce+s):Math.max(0,Y+f+Z-(ce+se+o)),r){const q=Math.max(0,$-se-R);e.style.bottom=`${q}px`}else e.style.top=`${R}px`;else e.style.position=_s,F===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-se-o}px`:r?e.style.bottom=`${Z-se-o}px`:e.style.top=`${s}px`};O(x);const P=F=>{if(F===f)return;const X=F-f;if(f=F,x===3)return;const{offsetTop:Z,height:Y}=E,{naturalTop:$,height:ce}=v,{height:se}=j;if(X>0)if(x===0){if(F+Z+s>$){const q=Math.max(0,Z+f-$+s);F+Z+Y<=$+se+q+o?O(2):O(1)}}else x===2&&p(F)&&O(1);else if(x===1){if(Z+F+Y<$+ce+o){const q=Math.max(0,Z+f+Y-($+se+o));Z+F+s>=$+q?O(2):O(0)}}else x===2&&Z+F+s<$+R&&O(0)},N=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",N,$l),l.addEventListener("mousewheel",N,$l),t.push(()=>l.removeEventListener("scroll",N),()=>l.removeEventListener("mousewheel",N))},mM=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=w.useState(null);return w.useEffect(()=>{if(!r||!_s)return;const s=[];return IM(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(l=>l())}},[r,t,e,n]),o},BM=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:l}=e,u=mM({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:s,style:l,ref:u,children:o})},vM=BM,Jm=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(Jm||{});function Xm(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ge.omit(e,["sticky","disposition","spacing"]),s=t?vM:b.Box,l=w.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return g.jsx(b.Grid,{...o,item:!0,...n,children:g.jsx(s,{...l,children:g.jsx(b.Stack,{spacing:r,children:e.children})})})}function Zm(e){return g.jsx(g.Fragment,{children:e.children})}function _m(e){const{children:t}=e;return w.useMemo(()=>{const r={top:[],bottom:[]};return w.Children.forEach(t,o=>{if(w.isValidElement(o)&&(o==null?void 0:o.type)===Zm){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function qm(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ge.omit(e,["disposition"]);return g.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function $m(e){const t=Vm();return t===void 0?!1:e===t||Rm(e,t)}function e0(e){const t=Hm();return w.useMemo(()=>Dm(e,t),[t,e])}function yM(){const e=Nm(),{search:t}=fi.useLocation(),n=fi.useNavigate();return w.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function t0(){const e=e0();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:ge.map(e,(t,n)=>g.jsx(gg,{...t},n))})})}function gg(e){const t=de.useTranslate()??ge.identity,n=n0(e),{selected:r,label:o,icon:s,onClick:l,badge:u,items:A,isGroup:f,level:p,errors:C=0}=n,{spacing:h}=wn(),[E,m]=w.useState(r),B=w.useCallback(R=>{m(!E),l(R)},[l,E]),v=s!==void 0,j=ge.omit(e,["label","icon","selected","badge"]);return w.useEffect(()=>{r&&!E&&m(r)},[r,E,m]),g.jsxs(g.Fragment,{children:[g.jsx(b.ListItem,{...j,disablePadding:!0,children:g.jsxs(b.ListItemButton,{selected:r&&!f,onClick:B,sx:{pl:h*p},children:[v&&g.jsx(b.ListItemIcon,{children:s}),g.jsx(b.ListItemText,{inset:!v,primary:C===0?t(o):g.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),u&&g.jsx(b.ListItemAvatar,{children:g.jsx(Gs,{type:"filled",size:"xs",color:u.color??"default",children:u.content})}),f&&(E?g.jsx(fn.ExpandLess,{}):g.jsx(fn.ExpandMore,{}))]})}),f&&g.jsx(b.Collapse,{in:E,timeout:"auto",children:g.jsx(b.List,{children:ge.map(A,(R,x)=>g.jsx(gg,{...R},x))})})]})}function n0(e){const{id:t}=e,n=$m(t),r=ql(t),o=yM(),s=zm(),l=Um(),u=e0(t),A=!ge.isEmpty(u),f=w.useCallback(C=>{A||(s?o(e.id):l(e.id)),ge.isFunction(e.onClick)&&e.onClick(C)},[l,o,e,s,A]);return w.useMemo(()=>({...e,selected:n,onClick:f,items:u,isGroup:A,level:r}),[e,n,f,u,A])}function r0(e=[],t){const n=ge.isArray(e)?e:[e],r=ge.filter(n,o=>w.isValidElement(o));ge.each(r,o=>{var s;t(o),r0(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function o0(e){const{errors:t}=Oo.useFormState(),n=Wm(),{label:r,icon:o,badge:s,index:l=0,children:u}=e,A=ug(e),f=Ym(),p=Gm(),C=$m(A),h=[];n&&(e.sources!==void 0?h.push(...e.sources):r0(u,m=>{var B;((B=m==null?void 0:m.props)==null?void 0:B.source)!==void 0&&h.push(m.props.source)}));const E=ge.chain(h).uniq().map(m=>ge.get(t,m)).reject(m=>m===void 0).value().length;return w.useEffect(()=>{f({id:A,index:l,label:r,icon:o,badge:s,errors:E})},[f,p,r,o,A,s,l,E]),w.useEffect(()=>()=>{p(A)},[A]),g.jsx(b.Box,{display:C?"unset":"none",children:e.children})}function i0(e){const t=fg(e),n=ug(e);return g.jsx(o0,{...e,id:n,children:w.Children.map(t,r=>{const o=ug(r.props);return w.cloneElement(r,{id:`${n}.${o}`})})})}function s0(e){return g.jsx(o0,{...e})}function fg(e){const{children:t}=e;return w.useMemo(()=>ge.chain(w.Children.toArray(t)).filter(r=>w.isValidElement(r)&&((r==null?void 0:r.type)===s0||(r==null?void 0:r.type)===i0)).map((r,o)=>w.cloneElement(r,{index:o})).value(),[t])}function bM(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ge.pick(e,["syncWithLocation","errorCount"]),s=ge.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:l,bottom:u}=_m(e),A=fg(e);return g.jsx(Fm,{...o,children:g.jsxs(Mm,{...s,spacing:r,children:[g.jsxs(Xm,{disposition:t,spacing:r,children:[l,g.jsx(t0,{}),u]}),g.jsx(qm,{disposition:n,children:A})]})})}const kt=bM;kt.BaseForm=Mm,kt.Content=qm,kt.Provider=Fm,kt.useItems=Hm,kt.useSyncWithLocation=zm,kt.useErrorCount=Wm,kt.useFormRootPath=Nm,kt.useActiveItem=Vm,kt.useSetActiveItem=Um,kt.useAddItem=Ym,kt.useRemoveItem=Gm,kt.Sidebar=Xm,kt.SidebarSection=Zm,kt.SidebarSectionPosition=Jm,kt.useSidebarChildren=_m,kt.NavMenu=t0,kt.NavMenuItem=gg,kt.useNavMenuItem=n0,kt.Tab=s0,kt.Group=i0,kt.useBaseItemChildren=fg;const QM=Ae(S.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"}})),xM=Ae(S.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}}})),wM=Ts(S.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?0:1)},[e.breakpoints.down("sm")]:{paddingBottom:0}})),pg=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:l,...u}=e,A=SA(t);return g.jsx(Wn,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...l,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:g.jsx(wM,{toolbar:g.jsx(lr,{}),...u})})};pg.defaultProps={toolbar:g.jsx(lr,{children:g.jsx(S.SaveButton,{type:"button"})}),secondary:g.jsx(Ro,{children:g.jsx(S.DeleteWithConfirmButton,{})})},pg.Tab=S.TabbedForm.Tab;const TM=k.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:l,resource:u}=e,A=S.useTranslate(),[f,p]=k.useState(!1),{total:C,remove:h}=dC(),E=k.useCallback(()=>{p(!1),h(s)},[s,h]),m=w.useMemo(()=>({index:s,total:C,remove:()=>h(s)}),[s,C,h]);return g.jsxs(bA.Provider,{value:m,children:[w.Children.map(n,(B,v)=>{if(!w.isValidElement(B))return null;const{source:j,...R}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:w.cloneElement(B,{source:j?`${l}.${j}`:l,index:j?void 0:v,resource:u,disabled:r,...R,label:""})})}),!o&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:g.jsx(Ro,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(S.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:E,onClose:()=>p(!1)})]})});var PM=Array.isArray,ec=PM,SM=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,OM=SM,jM=OM,MM=typeof self=="object"&&self&&self.Object===Object&&self,RM=jM||MM||Function("return this")(),tc=RM,DM=tc,kM=DM.Symbol,nc=kM,a0=nc,l0=Object.prototype,FM=l0.hasOwnProperty,LM=l0.toString,qs=a0?a0.toStringTag:void 0;function NM(e){var t=FM.call(e,qs),n=e[qs];try{e[qs]=void 0;var r=!0}catch{}var o=LM.call(e);return r&&(t?e[qs]=n:delete e[qs]),o}var VM=NM,HM=Object.prototype,zM=HM.toString;function WM(e){return zM.call(e)}var UM=WM,c0=nc,YM=VM,GM=UM,KM="[object Null]",JM="[object Undefined]",u0=c0?c0.toStringTag:void 0;function XM(e){return e==null?e===void 0?JM:KM:u0&&u0 in Object(e)?YM(e):GM(e)}var hg=XM;function ZM(e){return e!=null&&typeof e=="object"}var rc=ZM,_M=hg,qM=rc,$M="[object Symbol]";function eR(e){return typeof e=="symbol"||qM(e)&&_M(e)==$M}var Cg=eR,tR=ec,nR=Cg,rR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oR=/^\w*$/;function iR(e,t){if(tR(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||nR(e)?!0:oR.test(e)||!rR.test(e)||t!=null&&e in Object(t)}var sR=iR;function aR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var A0=aR,lR=hg,cR=A0,uR="[object AsyncFunction]",AR="[object Function]",dR="[object GeneratorFunction]",gR="[object Proxy]";function fR(e){if(!cR(e))return!1;var t=lR(e);return t==AR||t==dR||t==uR||t==gR}var d0=fR,pR=tc,hR=pR["__core-js_shared__"],CR=hR,Eg=CR,g0=function(){var e=/[^.]+$/.exec(Eg&&Eg.keys&&Eg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ER(e){return!!g0&&g0 in e}var IR=ER,mR=Function.prototype,BR=mR.toString;function vR(e){if(e!=null){try{return BR.call(e)}catch{}try{return e+""}catch{}}return""}var yR=vR,bR=d0,QR=IR,xR=A0,wR=yR,TR=/[\\^$.*+?()[\]{}|]/g,PR=/^\[object .+?Constructor\]$/,SR=Function.prototype,OR=Object.prototype,jR=SR.toString,MR=OR.hasOwnProperty,RR=RegExp("^"+jR.call(MR).replace(TR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function DR(e){if(!xR(e)||QR(e))return!1;var t=bR(e)?RR:PR;return t.test(wR(e))}var kR=DR;function FR(e,t){return e==null?void 0:e[t]}var LR=FR,NR=kR,VR=LR;function HR(e,t){var n=VR(e,t);return NR(n)?n:void 0}var oc=HR,zR=oc,WR=zR(Object,"create"),ic=WR,f0=ic;function UR(){this.__data__=f0?f0(null):{},this.size=0}var YR=UR;function GR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KR=GR,JR=ic,XR="__lodash_hash_undefined__",ZR=Object.prototype,_R=ZR.hasOwnProperty;function qR(e){var t=this.__data__;if(JR){var n=t[e];return n===XR?void 0:n}return _R.call(t,e)?t[e]:void 0}var $R=qR,eD=ic,tD=Object.prototype,nD=tD.hasOwnProperty;function rD(e){var t=this.__data__;return eD?t[e]!==void 0:nD.call(t,e)}var oD=rD,iD=ic,sD="__lodash_hash_undefined__";function aD(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iD&&t===void 0?sD:t,this}var lD=aD,cD=YR,uD=KR,AD=$R,dD=oD,gD=lD;function Ni(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])}}Ni.prototype.clear=cD,Ni.prototype.delete=uD,Ni.prototype.get=AD,Ni.prototype.has=dD,Ni.prototype.set=gD;var fD=Ni;function pD(){this.__data__=[],this.size=0}var hD=pD;function CD(e,t){return e===t||e!==e&&t!==t}var ED=CD,ID=ED;function mD(e,t){for(var n=e.length;n--;)if(ID(e[n][0],t))return n;return-1}var sc=mD,BD=sc,vD=Array.prototype,yD=vD.splice;function bD(e){var t=this.__data__,n=BD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yD.call(t,n,1),--this.size,!0}var QD=bD,xD=sc;function wD(e){var t=this.__data__,n=xD(t,e);return n<0?void 0:t[n][1]}var TD=wD,PD=sc;function SD(e){return PD(this.__data__,e)>-1}var OD=SD,jD=sc;function MD(e,t){var n=this.__data__,r=jD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var RD=MD,DD=hD,kD=QD,FD=TD,LD=OD,ND=RD;function Vi(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])}}Vi.prototype.clear=DD,Vi.prototype.delete=kD,Vi.prototype.get=FD,Vi.prototype.has=LD,Vi.prototype.set=ND;var VD=Vi,HD=oc,zD=tc,WD=HD(zD,"Map"),UD=WD,p0=fD,YD=VD,GD=UD;function KD(){this.size=0,this.__data__={hash:new p0,map:new(GD||YD),string:new p0}}var JD=KD;function XD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ZD=XD,_D=ZD;function qD(e,t){var n=e.__data__;return _D(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ac=qD,$D=ac;function ek(e){var t=$D(this,e).delete(e);return this.size-=t?1:0,t}var tk=ek,nk=ac;function rk(e){return nk(this,e).get(e)}var ok=rk,ik=ac;function sk(e){return ik(this,e).has(e)}var ak=sk,lk=ac;function ck(e,t){var n=lk(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var uk=ck,Ak=JD,dk=tk,gk=ok,fk=ak,pk=uk;function Hi(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])}}Hi.prototype.clear=Ak,Hi.prototype.delete=dk,Hi.prototype.get=gk,Hi.prototype.has=fk,Hi.prototype.set=pk;var h0=Hi,C0=h0,hk="Expected a function";function Ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hk);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(Ig.Cache||C0),n}Ig.Cache=C0;var Ck=Ig,Ek=Ck,Ik=500;function mk(e){var t=Ek(e,function(r){return n.size===Ik&&n.clear(),r}),n=t.cache;return t}var Bk=mk,vk=Bk,yk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bk=/\\(\\)?/g,Qk=vk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yk,function(n,r,o,s){t.push(o?s.replace(bk,"$1"):r||n)}),t}),xk=Qk;function wk(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var E0=wk,I0=nc,Tk=E0,Pk=ec,Sk=Cg,Ok=1/0,m0=I0?I0.prototype:void 0,B0=m0?m0.toString:void 0;function v0(e){if(typeof e=="string")return e;if(Pk(e))return Tk(e,v0)+"";if(Sk(e))return B0?B0.call(e):"";var t=e+"";return t=="0"&&1/e==-Ok?"-0":t}var jk=v0,Mk=jk;function Rk(e){return e==null?"":Mk(e)}var Dk=Rk,kk=ec,Fk=sR,Lk=xk,Nk=Dk;function Vk(e,t){return kk(e)?e:Fk(e,t)?[e]:Lk(Nk(e))}var Hk=Vk,zk=Cg,Wk=1/0;function Uk(e){if(typeof e=="string"||zk(e))return e;var t=e+"";return t=="0"&&1/e==-Wk?"-0":t}var Yk=Uk,Gk=Hk,Kk=Yk;function Jk(e,t){t=Gk(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Kk(t[n++])];return n&&n==r?e:void 0}var Xk=Jk,Zk=Xk;function _k(e,t,n){var r=e==null?void 0:Zk(e,t);return r===void 0?n:r}var qk=_k;const $k=$r(qk),y0=e=>{var q,J;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f,template:p={}}=e,[C,h]=w.useState(!1),{fields:E,remove:m,replace:B,append:v}=S.useArrayInput(e),{resetField:j}=Oo.useFormContext(),R=Pt(),x=de.useTranslate(),O=de.useRecordContext(e),P=w.useRef(p||{}),N=de.useTranslateLabel(),F=w.useCallback(H=>{m(H)},[m]);if(E.length>0){const{...H}=E[0];P.current=H;for(const K in P.current)P.current[K]=null}const X=w.useCallback((H=void 0)=>{let K=H;H==null&&(K=P.current,w.Children.count(t)===1&&k.isValidElement(w.Children.only(t))&&!w.Children.only(t).props.source&&w.Children.map(t,ee=>k.isValidElement(ee)&&ee.type!==de.FormDataConsumer).some(Boolean)?K="":(K=K||{},w.Children.forEach(t,ee=>{k.isValidElement(ee)&&ee.type!==de.FormDataConsumer&&ee.props.source&&(K[ee.props.source]=ee.props.defaultValue??null)})));const L={...K,...p};v(L),j(`${r}.${E.length}`,{defaultValue:K})},[v,t,j,r,E.length,p]),Z=H=>K=>{X(),H&&H(K)},Y=w.useCallback(()=>{B([]),h(!1)},[B]),$=$k(O,r),ce=w.useMemo(()=>({total:E.length,remove:F,source:r}),[E.length,F,r]),se=R.palette.mode==="dark"?R.palette.grey.A400:R.palette.grey.A800;return E?g.jsx(yA.Provider,{value:ce,children:g.jsxs("div",{className:A,children:[k.cloneElement(g.jsx(b0,{}),{label:o,source:r,disableAdd:l,template:p,onClick:Z((J=(q=e==null?void 0:e.addButton)==null?void 0:q.props)==null?void 0:J.onClick)}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${se}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${se}`},children:g.jsxs(b.TableRow,{children:[w.Children.map(t,(H,K)=>k.isValidElement(H)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:N({...H.props,resource:n})})},K):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:[E.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:"-"})})}),E.length>0&&E.map((H,K)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${se}}`},children:g.jsx(TM,{disableRemove:u,disableActions:s,index:K,member:`${r}.${K}`,onRemoveField:F,record:$&&$[K]||{},resource:n,source:r,children:t})},H.id))]})]})}),E.length>0&&g.jsx(S.Confirm,{isOpen:C,title:x("ra.action.clear_array_input"),content:x("ra.message.clear_array_input"),onConfirm:Y,onClose:()=>h(!1)})]})}):null},b0=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Pt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,l=o.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[t!==!1&&g.jsx(b.Typography,{children:t}),!n&&(k.isValidElement(e==null?void 0:e.addButton)?k.cloneElement(e==null?void 0:e.addButton,{onClick:r}):g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:g.jsx(et.PlusCircleOutlined,{style:{color:l}})}))]})},e5=Ae(y0,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));b0.propTypes={label:c.oneOfType([c.string,c.bool]),source:c.string,defaultValue:c.any},y0.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.oneOfType([c.string,c.bool]),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 t5(e,t){const n=ge.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ge.chain(n.media).clone().extend(o).value();return ge.extend(n,{media:s})}case"updateDrawer":{const s=ge.chain(n.drawer).clone().extend(o).value();return ge.extend(n,{drawer:s})}case"updateLogo":{const s=ge.chain(n.logo).clone().extend(o).value();return ge.extend(n,{logo:s})}case"updateNotifications":{const s=ge.chain(n.notifications).clone().extend(o).value();return ge.extend(n,s)}case"updateTheme":{const s=ge.chain(n.theme).clone().extend(o).value();return ge.extend(n,{theme:s})}default:return n}}const n5={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"}},Q0=w.createContext(void 0);function x0(e){var Z;const t=de.useAuthProvider(),n=de.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),l=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:u,isHorizontalLayout:A,menuOrientation:f,drawerWidth:p}=wn(),C=A(f)&&!s,{drawerOpen:h,openDrawer:E}=no(),m=w.useCallback(()=>{E(!h)},[h,E]),[B,v]=w.useState(!1),[j,R]=w.useReducer(t5,ge.chain(n5).clone().merge({drawer:{open:!u||h}}).value()),x=w.useCallback(()=>v(!1),[]),O=w.useMemo(()=>({state:j,dispatch:R}),[j,R]),{logoIcon:P,logoMain:N,enableNotification:F,notification:X}=e;return w.useEffect(()=>{R({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:l,horizontal:C}})},[f,o,s,l]),w.useEffect(()=>{R({type:"updateDrawer",payload:{open:h,width:p,handleDrawerToggle:m}})},[h,p,m]),w.useEffect(()=>{u||E(!l)},[l,u]),w.useEffect(()=>{R({type:"updateLogo",payload:{main:N,icon:P}})},[P,N]),w.useEffect(()=>{R({type:"updateNotifications",payload:{enable:F,resource:X??"entities/notification"}})},[F,X]),w.useEffect(()=>{R({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),w.useEffect(()=>{t.isImpersonating().then(Y=>{var $;v(!Y&&(($=n==null?void 0:n.data)==null?void 0:$.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),g.jsxs(Q0.Provider,{value:O,children:[g.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:x,firstAccess:!0})}),e.children]})}function w0(e){return w.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:l}=t;return g.jsx(x0,{logoIcon:r,logoMain:o,enableNotification:s,notification:l,children:g.jsx(e,{ref:n,...t})})})}function mg(){const e=w.useContext(Q0);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function r5(){return mg().dispatch}function zi(){return mg().state}function Yn(){return zi().media}function Yo(){return zi().drawer}function T0(){return zi().logo}function lc(){return zi().notifications}function o5(){return zi().theme}const i5={ml:{xs:0,lg:-2}};function P0(){const{open:e,handleDrawerToggle:t}=Yo();return g.jsx(Js,{value:"drawer","aria-label":"open drawer",sx:i5,onChange:t,selected:e,children:e?g.jsx(et.MenuFoldOutlined,{}):g.jsx(et.MenuUnfoldOutlined,{})})}function S0(e){const t=w.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=Yn(),{open:s,width:l}=Yo(),u=r?b.AppBar:gC,A=Ir(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||ge.extend(f,{open:s}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&g.jsx(P0,{}),e.children]})})}function s5(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:l}=lc(),u=de.useNotify(),A=de.useRedirect(),[f]=de.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Mr().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()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=w.useCallback(()=>f(),[f]),[C]=de.useLocaleState(),h=w.useMemo(()=>Mr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:s,children:g.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(et.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 a5={width:36,height:36,fontSize:"1rem"},l5={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function O0(){const{enable:e}=lc();return e?g.jsx(c5,{}):null}function c5(){const e=de.useTranslate(),t=b.useTheme(),{downMd:n}=Yn(),{resource:r}=lc(),[o,s]=w.useState([]),{data:l,isLoading:u}=de.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),A=o.filter(E=>E.readed===null).length,{open:f,anchorEl:p,handleClose:C,handleToggle:h}=pl();return w.useEffect(()=>{!u&&l&&s(l??[])},[l,u]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{value:"notifications",selected:f,onChange:h,children:g.jsx(b.Badge,{badgeContent:A,color:"primary",children:g.jsx(et.BellOutlined,{})})}),g.jsx(b.Popper,{placement:n?"bottom":"bottom-end",open:f,anchorEl:p,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:E})=>g.jsx(Ao,{type:"grow",position:n?"top":"top-right",in:f,...E,children:g.jsx(b.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:C,children:g.jsxs(Wn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:A>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(Fi,{color:"success",size:"small",children:g.jsx(et.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":a5,"& .MuiListItemSecondaryAction-root":{...l5,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:o.map((m,B)=>g.jsx(s5,{selected:A>0,notification:m,onClick:C,divider:B<o.length-1},m.id))}),g.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:mt.Link,onClick:C,children:g.jsx(b.ListItemText,{primary:g.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),g.jsx(b.Divider,{})]})})})})})]})}const u5=()=>{const[e,t]=w.useState(!1),n=w.useCallback(()=>t(!1),[t]),r=w.useCallback(()=>t(!0),[t]),o=de.useTranslate();return g.jsxs(w.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.Key,{})}),g.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(lg,{onSuccess:n})})]})},A5=()=>{const e=de.useLogout(),t=de.useTranslate();return g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},d5=()=>{const e=de.useTranslate(),t=de.useAuthProvider(),n=w.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=w.useState(!1);return w.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?g.jsx(w.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(fn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function j0(){var E;const e=b.useTheme(),t=de.useDataProvider(),n=de.useAuthProvider(),{identity:r}=de.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,l]=w.useState(null),{open:u,anchorEl:A,handleToggle:f,handleClose:p}=pl(),C=de.useLogout(),h=w.useCallback(()=>{C()},[n,C]);return w.useEffect(()=>{o&&t.getFile("/profile/me/image").then(m=>l(m))},[t,o]),g.jsxs(g.Fragment,{children:[g.jsx(Js,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Gs,{alt:(E=r==null?void 0:r.name)==null?void 0:E.toUpperCase(),src:s,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),g.jsx(ir.Popper,{placement:"bottom-end",open:u,anchorEl:A,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:m})=>{var B;return g.jsx(Ao,{type:"grow",position:"top-right",in:u,...m,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:g.jsx(b.ClickAwayListener,{onClickAway:p,children:g.jsxs(Wn,{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(Gs,{alt:"profile user",src:s,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(B=r==null?void 0:r.roles)==null?void 0:B.map(v=>v.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(Fi,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(et.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(u5,{}),g.jsx(A5,{}),g.jsx(d5,{})]})})})]})})})})}})]})}const M0=e=>{const t=Pt(),{downMd:n}=Yn(),{open:r,anchorEl:o,handleToggle:s,handleClose:l}=pl();return n?g.jsxs(g.Fragment,{children:[g.jsx(Js,{"aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:g.jsx(et.MoreOutlined,{})}),g.jsx(b.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:u})=>g.jsx(Ao,{type:"fade",in:r,...u,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:l,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function R0(e){return g.jsx(b.Box,{...e,flex:1})}function $s(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]})})}$s.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},$s.defaultProps={copy:"© Applica Software Guru for"};var D0={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})(D0);var cc=D0.exports,Bg={};const g5=Hx($j);var k0;function uc(){return k0||(k0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=g5}(Bg)),Bg}function F0(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=F0(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function L0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=F0(e))&&(r&&(r+=" "),r+=t);return r}var f5="__lodash_hash_undefined__";function p5(e){return this.__data__.set(e,f5),this}var h5=p5;function C5(e){return this.__data__.has(e)}var E5=C5,I5=h0,m5=h5,B5=E5;function Ac(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new I5;++t<n;)this.add(e[t])}Ac.prototype.add=Ac.prototype.push=m5,Ac.prototype.has=B5;var N0=Ac;function v5(e,t){return e.has(t)}var V0=v5;function y5(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var H0=y5;function b5(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Q5=b5,x5=hg,w5=rc,T5="[object Arguments]";function P5(e){return w5(e)&&x5(e)==T5}var S5=P5,z0=S5,O5=rc,W0=Object.prototype,j5=W0.hasOwnProperty,M5=W0.propertyIsEnumerable,R5=z0(function(){return arguments}())?z0:function(e){return O5(e)&&j5.call(e,"callee")&&!M5.call(e,"callee")},D5=R5,k5=9007199254740991;function F5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k5}var L5=F5;function N5(e){return function(t){return e(t)}}var V5=N5,H5=d0,z5=L5;function W5(e){return e!=null&&z5(e.length)&&!H5(e)}var U5=W5,Y5=oc,G5=tc,K5=Y5(G5,"Set"),J5=K5,vg=globalThis&&globalThis.__assign||function(){return vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},vg.apply(this,arguments)},X5=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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},U0=function(e){var t=e.className,n=e.sx,r=X5(e,["className","sx"]),o=de.useLoading(),s=Pt();return k.createElement(Z5,{className:t,sx:n},o?k.createElement(Dd,vg({className:L0("app-loader",dc.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):k.createElement(OB,{className:dc.loadedIcon}))};U0.propTypes={classes:c.object,className:c.string,width:c.string};var yg="RaLoadingIndicator",dc={loader:"".concat(yg,"-loader"),loadedIcon:"".concat(yg,"-loadedIcon")},Z5=Ae("div",{name:yg,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(dc.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(dc.loadedIcon)]={},t});const bg=e=>e.scrollTop;function Wi(e,t){var n,r;const{timeout:o,easing:s,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:l.transitionDelay}}const _5=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function q5(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=Ei(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"?o?`translateX(${o.right+u-r.left}px)`:`translateX(${s.innerWidth+u-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?o?`translateY(${o.bottom+A-r.top}px)`:`translateY(${s.innerHeight+A-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function Y0(e){return typeof e=="function"?e():e}function gc(e,t,n){const r=Y0(n),o=q5(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const G0=k.forwardRef(function(t,n){const r=Pt(),o={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=o,in:h,onEnter:E,onEntered:m,onEntering:B,onExit:v,onExited:j,onExiting:R,style:x,timeout:O=s,TransitionComponent:P=Td}=t,N=Ue(t,_5),F=k.useRef(null),X=Qn(A.ref,F,n),Z=L=>ee=>{L&&(ee===void 0?L(F.current):L(F.current,ee))},Y=Z((L,ee)=>{gc(p,L,f),bg(L),E&&E(L,ee)}),$=Z((L,ee)=>{const z=Wi({timeout:O,style:x,easing:C},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",W({},z)),L.style.transition=r.transitions.create("transform",W({},z)),L.style.webkitTransform="none",L.style.transform="none",B&&B(L,ee)}),ce=Z(m),se=Z(R),q=Z(L=>{const ee=Wi({timeout:O,style:x,easing:C},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",ee),L.style.transition=r.transitions.create("transform",ee),gc(p,L,f),v&&v(L)}),J=Z(L=>{L.style.webkitTransition="",L.style.transition="",j&&j(L)}),H=L=>{l&&l(F.current,L)},K=k.useCallback(()=>{F.current&&gc(p,F.current,f)},[p,f]);return k.useEffect(()=>{if(h||p==="down"||p==="right")return;const L=hh(()=>{F.current&&gc(p,F.current,f)}),ee=Ei(F.current);return ee.addEventListener("resize",L),()=>{L.clear(),ee.removeEventListener("resize",L)}},[p,h,f]),k.useEffect(()=>{h||K()},[h,K]),g.jsx(P,W({nodeRef:F,onEnter:Y,onEntered:ce,onEntering:$,onExit:q,onExited:J,onExiting:se,addEndListener:H,appear:u,in:h,timeout:O},N,{children:(L,ee)=>k.cloneElement(A,W({ref:X,style:W({visibility:L==="exited"&&!h?"hidden":void 0},x,A.props.style)},ee))}))});process.env.NODE_ENV!=="production"&&(G0.propTypes={addEndListener:c.func,appear:c.bool,children:hi.isRequired,container:Cr(c.oneOfType([jo,c.func]),e=>{if(e.open){const t=Y0(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(`
|
|
219
219
|
`))}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(`
|
|
220
220
|
`))}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 $5=G0;function e8(e){return typeof e=="string"}function t8(e,t,n){return e===void 0||e8(e)?t:W({},t,{ownerState:W({},t.ownerState,n)})}const n8={disableDefaultClasses:!1},r8=k.createContext(n8);function o8(e){const{disableDefaultClasses:t}=k.useContext(r8);return n=>t?"":e(n)}function K0(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 i8(e,t,n){return typeof e=="function"?e(t,n):e}function J0(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 s8(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const E=Ye(o==null?void 0:o.className,r==null?void 0:r.className,s,n==null?void 0:n.className),m=W({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),B=W({},n,o,r);return E.length>0&&(B.className=E),Object.keys(m).length>0&&(B.style=m),{props:B,internalRef:void 0}}const l=K0(W({},o,r)),u=J0(r),A=J0(o),f=t(l),p=Ye(f==null?void 0:f.className,n==null?void 0:n.className,s,o==null?void 0:o.className,r==null?void 0:r.className),C=W({},f==null?void 0:f.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),h=W({},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 a8=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function l8(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:s=!1}=e,l=Ue(e,a8),u=s?{}:i8(r,o),{props:A,internalRef:f}=s8(W({},l,{externalSlotProps:u})),p=Qn(f,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return t8(n,W({},A,{ref:p}),o)}function c8(e){const t=ar(e);return t.body===e?Ei(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ea(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function X0(e){return parseInt(Ei(e).getComputedStyle(e).paddingRight,10)||0}function u8(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 Z0(e,t,n,r,o){const s=[t,n,...r];[].forEach.call(e.children,l=>{const u=s.indexOf(l)===-1,A=!u8(l);u&&A&&ea(l,o)})}function Qg(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function A8(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(c8(r)){const l=E1(ar(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${X0(r)+l}px`;const u=ar(r).querySelectorAll(".mui-fixed");[].forEach.call(u,A=>{n.push({value:A.style.paddingRight,property:"padding-right",el:A}),A.style.paddingRight=`${X0(A)+l}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=ar(r).body;else{const l=r.parentElement,u=Ei(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 d8(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class g8{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&&ea(t.modalRef,!1);const o=d8(n);Z0(n,t.mount,t.modalRef,o,!0);const s=Qg(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:o}),r)}mount(t,n){const r=Qg(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=A8(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Qg(this.containers,l=>l.modals.indexOf(t)!==-1),s=this.containers[o];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&ea(t.modalRef,n),Z0(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(o,1);else{const l=s.modals[s.modals.length-1];l.modalRef&&ea(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function f8(e){return typeof e=="function"?e():e}function p8(e){return e?e.props.hasOwnProperty("in"):!1}const h8=new g8;function C8(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=h8,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:u,children:A,onClose:f,open:p,rootRef:C}=e,h=k.useRef({}),E=k.useRef(null),m=k.useRef(null),B=Qn(m,C),[v,j]=k.useState(!p),R=p8(A);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const O=()=>ar(E.current),P=()=>(h.current.modalRef=m.current,h.current.mount=E.current,h.current),N=()=>{o.mount(P(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},F=eo(()=>{const H=f8(t)||O().body;o.add(P(),H),m.current&&N()}),X=k.useCallback(()=>o.isTopModal(P()),[o]),Z=eo(H=>{E.current=H,H&&(p&&X()?N():m.current&&ea(m.current,x))}),Y=k.useCallback(()=>{o.remove(P(),x)},[x,o]);k.useEffect(()=>()=>{Y()},[Y]),k.useEffect(()=>{p?F():(!R||!s)&&Y()},[p,Y,R,s,F]);const $=H=>K=>{var L;(L=H.onKeyDown)==null||L.call(H,K),!(K.key!=="Escape"||!X())&&(n||(K.stopPropagation(),f&&f(K,"escapeKeyDown")))},ce=H=>K=>{var L;(L=H.onClick)==null||L.call(H,K),K.target===K.currentTarget&&f&&f(K,"backdropClick")};return{getRootProps:(H={})=>{const K=K0(e);delete K.onTransitionEnter,delete K.onTransitionExited;const L=W({},K,H);return W({role:"presentation"},L,{onKeyDown:$(L),ref:B})},getBackdropProps:(H={})=>{const K=H;return W({"aria-hidden":!0},K,{onClick:ce(K),open:p})},getTransitionProps:()=>{const H=()=>{j(!1),l&&l()},K=()=>{j(!0),u&&u(),s&&Y()};return{onEnter:qu(H,A==null?void 0:A.props.onEnter),onExited:qu(K,A==null?void 0:A.props.onExited)}},rootRef:B,portalRef:Z,isTopModal:X,exited:v,hasTransition:R}}const E8=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function I8(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 m8(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 B8(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||m8(e))}function v8(e){const t=[],n=[];return Array.from(e.querySelectorAll(E8)).forEach((r,o)=>{const s=I8(r);s===-1||!B8(r)||(s===0?t.push(r):n.push({documentOrder:o,tabIndex:s,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function y8(){return!0}function fc(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=v8,isEnabled:l=y8,open:u}=e,A=k.useRef(!1),f=k.useRef(null),p=k.useRef(null),C=k.useRef(null),h=k.useRef(null),E=k.useRef(!1),m=k.useRef(null),B=Qn(t.ref,m),v=k.useRef(null);k.useEffect(()=>{!u||!m.current||(E.current=!n)},[n,u]),k.useEffect(()=>{if(!u||!m.current)return;const x=ar(m.current);return m.current.contains(x.activeElement)||(m.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(`
|
|
221
221
|
`)),m.current.setAttribute("tabIndex","-1")),E.current&&m.current.focus()),()=>{o||(C.current&&C.current.focus&&(A.current=!0,C.current.focus()),C.current=null)}},[u]),k.useEffect(()=>{if(!u||!m.current)return;const x=ar(m.current),O=F=>{v.current=F,!(r||!l()||F.key!=="Tab")&&x.activeElement===m.current&&F.shiftKey&&(A.current=!0,p.current&&p.current.focus())},P=()=>{const F=m.current;if(F===null)return;if(!x.hasFocus()||!l()||A.current){A.current=!1;return}if(F.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(!E.current)return;let X=[];if((x.activeElement===f.current||x.activeElement===p.current)&&(X=s(m.current)),X.length>0){var Z,Y;const $=!!((Z=v.current)!=null&&Z.shiftKey&&((Y=v.current)==null?void 0:Y.key)==="Tab"),ce=X[0],se=X[X.length-1];typeof ce!="string"&&typeof se!="string"&&($?se.focus():ce.focus())}else F.focus()};x.addEventListener("focusin",P),x.addEventListener("keydown",O,!0);const N=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(N),x.removeEventListener("focusin",P),x.removeEventListener("keydown",O,!0)}},[n,r,o,l,u,s]);const j=x=>{C.current===null&&(C.current=x.relatedTarget),E.current=!0,h.current=x.target;const O=t.props.onFocus;O&&O(x)},R=x=>{C.current===null&&(C.current=x.relatedTarget),E.current=!0};return g.jsxs(k.Fragment,{children:[g.jsx("div",{tabIndex:u?0:-1,onFocus:R,ref:f,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:B,onFocus:j}),g.jsx("div",{tabIndex:u?0:-1,onFocus:R,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(fc.propTypes={children:hi,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired}),process.env.NODE_ENV!=="production"&&(fc["propTypes"]=Ya(fc.propTypes));function b8(e){return typeof e=="function"?e():e}const ta=k.forwardRef(function(t,n){const{children:r,container:o,disablePortal:s=!1}=t,[l,u]=k.useState(null),A=Qn(k.isValidElement(r)?r.ref:null,n);if(Ii(()=>{s||u(b8(o)||document.body)},[o,s]),Ii(()=>{if(l&&!s)return Ga(n,l),()=>{Ga(n,null)}},[n,l,s]),s){if(k.isValidElement(r)){const f={ref:A};return k.cloneElement(r,f)}return g.jsx(k.Fragment,{children:r})}return g.jsx(k.Fragment,{children:l&&Vx.createPortal(r,l)})});process.env.NODE_ENV!=="production"&&(ta.propTypes={children:c.node,container:c.oneOfType([jo,c.func]),disablePortal:c.bool}),process.env.NODE_ENV!=="production"&&(ta["propTypes"]=Ya(ta.propTypes));const Q8=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],x8={entering:{opacity:1},entered:{opacity:1}},_0=k.forwardRef(function(t,n){const r=Pt(),o={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:E,onExited:m,onExiting:B,style:v,timeout:j=o,TransitionComponent:R=Td}=t,x=Ue(t,Q8),O=k.useRef(null),P=Qn(O,u.ref,n),N=q=>J=>{if(q){const H=O.current;J===void 0?q(H):q(H,J)}},F=N(h),X=N((q,J)=>{bg(q);const H=Wi({style:v,timeout:j,easing:A},{mode:"enter"});q.style.webkitTransition=r.transitions.create("opacity",H),q.style.transition=r.transitions.create("opacity",H),p&&p(q,J)}),Z=N(C),Y=N(B),$=N(q=>{const J=Wi({style:v,timeout:j,easing:A},{mode:"exit"});q.style.webkitTransition=r.transitions.create("opacity",J),q.style.transition=r.transitions.create("opacity",J),E&&E(q)}),ce=N(m),se=q=>{s&&s(O.current,q)};return g.jsx(R,W({appear:l,in:f,nodeRef:O,onEnter:X,onEntered:Z,onEntering:F,onExit:$,onExited:ce,onExiting:Y,addEndListener:se,timeout:j},x,{children:(q,J)=>k.cloneElement(u,W({style:W({opacity:0,visibility:q==="exited"&&!f?"hidden":void 0},x8[q],v,u.props.style),ref:P},J))}))});process.env.NODE_ENV!=="production"&&(_0.propTypes={addEndListener:c.func,appear:c.bool,children:hi.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 w8=_0;function T8(e){return Lt("MuiBackdrop",e)}Ht("MuiBackdrop",["root","invisible"]);const P8=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],S8=e=>{const{classes:t,invisible:n}=e;return nn({root:["root",n&&"invisible"]},T8,t)},O8=Ae("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>W({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"})),q0=k.forwardRef(function(t,n){var r,o,s;const l=zt({props:t,name:"MuiBackdrop"}),{children:u,className:A,component:f="div",components:p={},componentsProps:C={},invisible:h=!1,open:E,slotProps:m={},slots:B={},TransitionComponent:v=w8,transitionDuration:j}=l,R=Ue(l,P8),x=W({},l,{component:f,invisible:h}),O=S8(x),P=(r=m.root)!=null?r:C.root;return g.jsx(v,W({in:E,timeout:j},R,{children:g.jsx(O8,W({"aria-hidden":!0},P,{as:(o=(s=B.root)!=null?s:p.Root)!=null?o:f,className:Ye(O.root,A,P==null?void 0:P.className),ownerState:W({},x,P==null?void 0:P.ownerState),classes:O,ref:n,children:u}))}))});process.env.NODE_ENV!=="production"&&(q0.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 j8=q0;function M8(e){return Lt("MuiModal",e)}Ht("MuiModal",["root","hidden","backdrop"]);const R8=["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"],D8=e=>{const{open:t,exited:n,classes:r}=e;return nn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},M8,r)},k8=Ae("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})=>W({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),F8=Ae(j8,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),$0=k.forwardRef(function(t,n){var r,o,s,l,u,A;const f=zt({name:"MuiModal",props:t}),{BackdropComponent:p=F8,BackdropProps:C,className:h,closeAfterTransition:E=!1,children:m,container:B,component:v,components:j={},componentsProps:R={},disableAutoFocus:x=!1,disableEnforceFocus:O=!1,disableEscapeKeyDown:P=!1,disablePortal:N=!1,disableRestoreFocus:F=!1,disableScrollLock:X=!1,hideBackdrop:Z=!1,keepMounted:Y=!1,onBackdropClick:$,open:ce,slotProps:se,slots:q}=f,J=Ue(f,R8),H=W({},f,{closeAfterTransition:E,disableAutoFocus:x,disableEnforceFocus:O,disableEscapeKeyDown:P,disablePortal:N,disableRestoreFocus:F,disableScrollLock:X,hideBackdrop:Z,keepMounted:Y}),{getRootProps:K,getBackdropProps:L,getTransitionProps:ee,portalRef:z,isTopModal:_,exited:fe,hasTransition:he}=C8(W({},H,{rootRef:n})),ue=W({},H,{exited:fe}),pe=D8(ue),Ce={};if(m.props.tabIndex===void 0&&(Ce.tabIndex="-1"),he){const{onEnter:Ve,onExited:ne}=ee();Ce.onEnter=Ve,Ce.onExited=ne}const ve=(r=(o=q==null?void 0:q.root)!=null?o:j.Root)!=null?r:k8,Ie=(s=(l=q==null?void 0:q.backdrop)!=null?l:j.Backdrop)!=null?s:p,Ee=(u=se==null?void 0:se.root)!=null?u:R.root,Be=(A=se==null?void 0:se.backdrop)!=null?A:R.backdrop,xe=ir.useSlotProps({elementType:ve,externalSlotProps:Ee,externalForwardedProps:J,getSlotProps:K,additionalProps:{ref:n,as:v},ownerState:ue,className:Ye(h,Ee==null?void 0:Ee.className,pe==null?void 0:pe.root,!ue.open&&ue.exited&&(pe==null?void 0:pe.hidden))}),le=ir.useSlotProps({elementType:Ie,externalSlotProps:Be,additionalProps:C,getSlotProps:Ve=>L(W({},Ve,{onClick:ne=>{$&&$(ne),Ve!=null&&Ve.onClick&&Ve.onClick(ne)}})),className:Ye(Be==null?void 0:Be.className,C==null?void 0:C.className,pe==null?void 0:pe.backdrop),ownerState:ue});return!Y&&!ce&&(!he||fe)?null:g.jsx(ta,{ref:z,container:B,disablePortal:N,children:g.jsxs(ve,W({},xe,{children:[!Z&&p?g.jsx(Ie,W({},le)):null,g.jsx(fc,{disableEnforceFocus:O,disableAutoFocus:x,disableRestoreFocus:F,isEnabled:_,open:ce,children:k.cloneElement(m,Ce)})]}))})});process.env.NODE_ENV!=="production"&&($0.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:hi.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([jo,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 L8=$0;var xg={},N8=cc;Object.defineProperty(xg,"__esModule",{value:!0});var eB=xg.default=void 0,V8=N8(uc()),H8=g,z8=(0,V8.default)((0,H8.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"History");eB=xg.default=z8;var wg={},W8=cc;Object.defineProperty(wg,"__esModule",{value:!0});var tB=wg.default=void 0,U8=W8(uc()),Y8=g,G8=(0,U8.default)((0,Y8.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");tB=wg.default=G8;var K8=function(e){var t=e.children,n=e.editor,r=e.preferenceKey,o=e.openButtonLabel,s=o===void 0?"ra.configurable.customize":o,l=e.sx,u="preferences.".concat(r),A=de.usePreferencesEditor(),f=!!A,p=de.useTranslate(),C=A||{},h=C.isEnabled,E=C.setEditor,m=C.preferenceKey,B=C.setPreferenceKey,v=u===m,j=w.useRef(v),R=w.useRef(null),x=w.useState(!1),O=x[0],P=x[1];if(w.useEffect(function(){j.current=v},[v]),w.useEffect(function(){return function(){j.current&&(B&&B(null),E&&E(null))}},[E,B]),!f)return t;var N=function(){E(w.cloneElement(n,{preferenceKey:u,key:u})),B(u)},F=function(){P(!0)},X=function(){P(!1)};return k.createElement(de.PreferenceKeyContextProvider,{value:u},k.createElement(J8,{className:L0(Vr.root,h&&Vr.editMode,v&&Vr.editorActive),sx:l,ref:R,onMouseEnter:h?F:void 0,onMouseLeave:h?X:void 0},t),k.createElement(b.Popover,{open:h&&(O||v),sx:{pointerEvents:"none","& .MuiPaper-root":{pointerEvents:"auto",borderRadius:10,padding:"2px",lineHeight:0,backgroundColor:"warning.light",color:"warning.contrastText","&:hover":{cursor:"pointer"}}},anchorEl:R.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"center"},onClose:X,PaperProps:{elevation:1,onMouseEnter:F,onMouseLeave:X,title:p(s),onClick:N},disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,disableScrollLock:!0,marginThreshold:8},k.createElement(tB,{fontSize:"12px"})))},pc="RaConfigurable",Vr={root:"".concat(pc,"-root"),editMode:"".concat(pc,"-editMode"),editorActive:"".concat(pc,"-editorActive")},J8=Ae("span",{name:pc,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={position:"relative",display:"inline-block"},t["&.".concat(Vr.editMode)]={transition:n.transitions.create("outline"),outline:"".concat(b.alpha(n.palette.warning.main,.3)," solid 2px")},t["&.".concat(Vr.editMode,":hover ")]={outline:"".concat(b.alpha(n.palette.warning.main,.5)," solid 2px")},t["&.".concat(Vr.editMode,".").concat(Vr.editorActive," , &.").concat(Vr.editMode,".").concat(Vr.editorActive,":hover ")]={outline:"".concat(n.palette.warning.main," solid 2px")},t}),Go=globalThis&&globalThis.__assign||function(){return Go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Go.apply(this,arguments)},X8=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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Z8=function(e){var t=e.title,n=e.defaultTitle,r=e.className,o=X8(e,["title","defaultTitle","className"]),s=de.usePreference()[0],l=de.useTranslate(),u=de.useRecordContext();return s?k.createElement("span",Go({className:r},o),l(s,Go(Go({},u),{_:s}))):k.createElement("span",{className:r},t?typeof t=="string"?k.createElement("span",Go({},o),l(t,{_:t})):t:k.createElement("span",Go({},o),n))},hc=globalThis&&globalThis.__assign||function(){return hc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},hc.apply(this,arguments)},_8=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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},q8=function(){var e=de.usePreferenceInput();return k.createElement("form",null,k.createElement(b.TextField,hc({label:"title",variant:"filled",size:"small",fullWidth:!0,sx:{mb:1}},e)))},$8=function(e){var t=e.preferenceKey,n=_8(e,["preferenceKey"]),r=mt.useLocation().pathname;return k.createElement(K8,{editor:k.createElement(q8,null),preferenceKey:t||"".concat(r,".title"),sx:{"&.RaConfigurable-editMode":{margin:"2px"}}},k.createElement(Z8,hc({},n)))},Tg=globalThis&&globalThis.__assign||function(){return Tg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Tg.apply(this,arguments)},eF=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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},nB=function(e){var t=e.defaultTitle,n=e.title,r=e.preferenceKey,o=eF(e,["defaultTitle","title","preferenceKey"]),s=w.useState(function(){return typeof document<"u"?document.getElementById("react-admin-title"):null}),l=s[0],u=s[1];return w.useEffect(function(){u(function(A){var f=typeof document<"u"&&document.body.contains(A);return A&&f?A:typeof document<"u"?document.getElementById("react-admin-title"):null})},[]),l?(de.warning(!t&&!n,"Missing title prop in <Title> element"),pi.createPortal(k.createElement($8,Tg({title:n,defaultTitle:t,preferenceKey:r},o)),l)):null},rB=c.oneOfType([c.string,c.element]);nB.propTypes={defaultTitle:c.string,className:c.string,record:c.any,title:rB};var tF=function(e){var t=fi.useLocation().pathname,n=w.useRef(t);w.useEffect(function(){t!==n.current&&e()},[t,e])},nF=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),t.length!==n.length||t.some(function(r,o){return!Object.is(r,n[o])})},oB={error:null},rF=function(e){xd(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.state=oB,r.resetErrorBoundary=function(){for(var u,A=arguments.length,f=new Array(A),p=0;p<A;p++)f[p]=arguments[p];r.props.onReset==null||(u=r.props).onReset.apply(u,f),r.reset()},r}t.getDerivedStateFromError=function(o){return{error:o}};var n=t.prototype;return n.reset=function(){this.setState(oB)},n.componentDidCatch=function(o,s){var l,u;(l=(u=this.props).onError)==null||l.call(u,o,s)},n.componentDidUpdate=function(o,s){var l=this.state.error,u=this.props.resetKeys;if(l!==null&&s.error!==null&&nF(o.resetKeys,u)){var A,f;(A=(f=this.props).onResetKeysChange)==null||A.call(f,o.resetKeys,u),this.reset()}},n.render=function(){var o=this.state.error,s=this.props,l=s.fallbackRender,u=s.FallbackComponent,A=s.fallback;if(o!==null){var f={error:o,resetErrorBoundary:this.resetErrorBoundary};if(k.isValidElement(A))return A;if(typeof l=="function")return l(f);if(u)return k.createElement(u,f);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(k.Component),Pg=globalThis&&globalThis.__assign||function(){return Pg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Pg.apply(this,arguments)},oF=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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},iB=function(e){var t=e.className,n=e.loadingPrimary,r=n===void 0?"ra.page.loading":n,o=e.loadingSecondary,s=o===void 0?"ra.message.loading":o,l=oF(e,["className","loadingPrimary","loadingSecondary"]),u=de.useTimeout(1e3),A=de.useTranslate();return u?k.createElement(iF,Pg({className:t},l),k.createElement("div",{className:Ec.message},k.createElement(Dd,{className:Ec.icon}),k.createElement(b.Typography,{variant:"h5",mt:3,color:"text.secondary"},A(r,{_:r})),k.createElement(b.Typography,{variant:"body2"},A(s,{_:s})))):null};iB.propTypes={className:c.string,loadingPrimary:c.string,loadingSecondary:c.string};var Cc="RaLoading",Ec={root:"".concat(Cc,"-root"),icon:"".concat(Cc,"-icon"),message:"".concat(Cc,"-message")},iF=Ae("div",{name:Cc,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%"},t["& .".concat(Ec.message)]={textAlign:"center",fontFamily:"Roboto, sans-serif",color:n.palette.text.disabled,paddingTop:"1em",paddingBottom:"1em"},t["& .".concat(Ec.icon)]={width:"9em",height:"9em"},t});function sF(e){return Lt("MuiToolbar",e)}Ht("MuiToolbar",["root","gutters","regular","dense"]);const aF=["className","component","disableGutters","variant"],lF=e=>{const{classes:t,disableGutters:n,variant:r}=e;return nn({root:["root",!n&&"gutters",r]},sF,t)},cF=Ae("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>W({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),sB=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiToolbar"}),{className:o,component:s="div",disableGutters:l=!1,variant:u="regular"}=r,A=Ue(r,aF),f=W({},r,{component:s,disableGutters:l,variant:u}),p=lF(f);return g.jsx(cF,W({as:s,className:Ye(p.root,o),ref:n,ownerState:f},A))});process.env.NODE_ENV!=="production"&&(sB.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disableGutters:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["dense","regular"]),c.string])});const uF=sB;var Sg={},AF=cc;Object.defineProperty(Sg,"__esModule",{value:!0});var aB=Sg.default=void 0,dF=AF(uc()),gF=g,fF=(0,dF.default)((0,gF.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");aB=Sg.default=fF;const pF=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Og(e){return`scale(${e}, ${e**2})`}const hF={entering:{opacity:1,transform:Og(1)},entered:{opacity:1,transform:"none"}},jg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Mg=k.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:l,in:u,onEnter:A,onEntered:f,onEntering:p,onExit:C,onExited:h,onExiting:E,style:m,timeout:B="auto",TransitionComponent:v=Td}=t,j=Ue(t,pF),R=k.useRef(),x=k.useRef(),O=Pt(),P=k.useRef(null),N=Qn(P,s.ref,n),F=J=>H=>{if(J){const K=P.current;H===void 0?J(K):J(K,H)}},X=F(p),Z=F((J,H)=>{bg(J);const{duration:K,delay:L,easing:ee}=Wi({style:m,timeout:B,easing:l},{mode:"enter"});let z;B==="auto"?(z=O.transitions.getAutoHeightDuration(J.clientHeight),x.current=z):z=K,J.style.transition=[O.transitions.create("opacity",{duration:z,delay:L}),O.transitions.create("transform",{duration:jg?z:z*.666,delay:L,easing:ee})].join(","),A&&A(J,H)}),Y=F(f),$=F(E),ce=F(J=>{const{duration:H,delay:K,easing:L}=Wi({style:m,timeout:B,easing:l},{mode:"exit"});let ee;B==="auto"?(ee=O.transitions.getAutoHeightDuration(J.clientHeight),x.current=ee):ee=H,J.style.transition=[O.transitions.create("opacity",{duration:ee,delay:K}),O.transitions.create("transform",{duration:jg?ee:ee*.666,delay:jg?K:K||ee*.333,easing:L})].join(","),J.style.opacity=0,J.style.transform=Og(.75),C&&C(J)}),se=F(h),q=J=>{B==="auto"&&(R.current=setTimeout(J,x.current||0)),r&&r(P.current,J)};return k.useEffect(()=>()=>{clearTimeout(R.current)},[]),g.jsx(v,W({appear:o,in:u,nodeRef:P,onEnter:Z,onEntered:Y,onEntering:X,onExit:ce,onExited:se,onExiting:$,addEndListener:q,timeout:B==="auto"?null:B},j,{children:(J,H)=>k.cloneElement(s,W({style:W({opacity:0,transform:Og(.75),visibility:J==="exited"&&!u?"hidden":void 0},hF[J],m,s.props.style),ref:N},H))}))});process.env.NODE_ENV!=="production"&&(Mg.propTypes={addEndListener:c.func,appear:c.bool,children:hi.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})])}),Mg.muiSupportAuto=!0;const lB=Mg;var hn="top",Gn="bottom",Kn="right",Cn="left",Rg="auto",na=[hn,Gn,Kn,Cn],Ui="start",ra="end",CF="clippingParents",cB="viewport",oa="popper",EF="reference",uB=na.reduce(function(e,t){return e.concat([t+"-"+Ui,t+"-"+ra])},[]),AB=[].concat(na,[Rg]).reduce(function(e,t){return e.concat([t,t+"-"+Ui,t+"-"+ra])},[]),IF="beforeRead",mF="read",BF="afterRead",vF="beforeMain",yF="main",bF="afterMain",QF="beforeWrite",xF="write",wF="afterWrite",TF=[IF,mF,BF,vF,yF,bF,QF,xF,wF];function yr(e){return e?(e.nodeName||"").toLowerCase():null}function Sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ko(e){var t=Sn(e).Element;return e instanceof t||e instanceof Element}function Jn(e){var t=Sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Dg(e){if(typeof ShadowRoot>"u")return!1;var t=Sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function PF(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!Jn(s)||!yr(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(l){var u=o[l];u===!1?s.removeAttribute(l):s.setAttribute(l,u===!0?"":u)}))})}function SF(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 o=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},{});!Jn(o)||!yr(o)||(Object.assign(o.style,u),Object.keys(s).forEach(function(A){o.removeAttribute(A)}))})}}const OF={name:"applyStyles",enabled:!0,phase:"write",fn:PF,effect:SF,requires:["computeStyles"]};function br(e){return e.split("-")[0]}var Jo=Math.max,Ic=Math.min,Yi=Math.round;function kg(){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 dB(){return!/^((?!chrome|android).)*safari/i.test(kg())}function Gi(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&Jn(e)&&(o=e.offsetWidth>0&&Yi(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Yi(r.height)/e.offsetHeight||1);var l=Ko(e)?Sn(e):window,u=l.visualViewport,A=!dB()&&n,f=(r.left+(A&&u?u.offsetLeft:0))/o,p=(r.top+(A&&u?u.offsetTop:0))/s,C=r.width/o,h=r.height/s;return{width:C,height:h,top:p,right:f+C,bottom:p+h,left:f,x:f,y:p}}function Fg(e){var t=Gi(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 gB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dg(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Hr(e){return Sn(e).getComputedStyle(e)}function jF(e){return["table","td","th"].indexOf(yr(e))>=0}function go(e){return((Ko(e)?e.ownerDocument:e.document)||window.document).documentElement}function mc(e){return yr(e)==="html"?e:e.assignedSlot||e.parentNode||(Dg(e)?e.host:null)||go(e)}function fB(e){return!Jn(e)||Hr(e).position==="fixed"?null:e.offsetParent}function MF(e){var t=/firefox/i.test(kg()),n=/Trident/i.test(kg());if(n&&Jn(e)){var r=Hr(e);if(r.position==="fixed")return null}var o=mc(e);for(Dg(o)&&(o=o.host);Jn(o)&&["html","body"].indexOf(yr(o))<0;){var s=Hr(o);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 o;o=o.parentNode}return null}function ia(e){for(var t=Sn(e),n=fB(e);n&&jF(n)&&Hr(n).position==="static";)n=fB(n);return n&&(yr(n)==="html"||yr(n)==="body"&&Hr(n).position==="static")?t:n||MF(e)||t}function Lg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sa(e,t,n){return Jo(e,Ic(t,n))}function RF(e,t,n){var r=sa(e,t,n);return r>n?n:r}function pB(){return{top:0,right:0,bottom:0,left:0}}function hB(e){return Object.assign({},pB(),e)}function CB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var DF=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,hB(typeof t!="number"?t:CB(t,na))};function kF(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,l=n.modifiersData.popperOffsets,u=br(n.placement),A=Lg(u),f=[Cn,Kn].indexOf(u)>=0,p=f?"height":"width";if(!(!s||!l)){var C=DF(o.padding,n),h=Fg(s),E=A==="y"?hn:Cn,m=A==="y"?Gn:Kn,B=n.rects.reference[p]+n.rects.reference[A]-l[A]-n.rects.popper[p],v=l[A]-n.rects.reference[A],j=ia(s),R=j?A==="y"?j.clientHeight||0:j.clientWidth||0:0,x=B/2-v/2,O=C[E],P=R-h[p]-C[m],N=R/2-h[p]/2+x,F=sa(O,N,P),X=A;n.modifiersData[r]=(t={},t[X]=F,t.centerOffset=F-N,t)}}function FF(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||gB(t.elements.popper,o)&&(t.elements.arrow=o))}const LF={name:"arrow",enabled:!0,phase:"main",fn:kF,effect:FF,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ki(e){return e.split("-")[1]}var NF={top:"auto",right:"auto",bottom:"auto",left:"auto"};function VF(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Yi(n*o)/o||0,y:Yi(r*o)/o||0}}function EB(e){var t,n=e.popper,r=e.popperRect,o=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,E=h===void 0?0:h,m=l.y,B=m===void 0?0:m,v=typeof p=="function"?p({x:E,y:B}):{x:E,y:B};E=v.x,B=v.y;var j=l.hasOwnProperty("x"),R=l.hasOwnProperty("y"),x=Cn,O=hn,P=window;if(f){var N=ia(n),F="clientHeight",X="clientWidth";if(N===Sn(n)&&(N=go(n),Hr(N).position!=="static"&&u==="absolute"&&(F="scrollHeight",X="scrollWidth")),N=N,o===hn||(o===Cn||o===Kn)&&s===ra){O=Gn;var Z=C&&N===P&&P.visualViewport?P.visualViewport.height:N[F];B-=Z-r.height,B*=A?1:-1}if(o===Cn||(o===hn||o===Gn)&&s===ra){x=Kn;var Y=C&&N===P&&P.visualViewport?P.visualViewport.width:N[X];E-=Y-r.width,E*=A?1:-1}}var $=Object.assign({position:u},f&&NF),ce=p===!0?VF({x:E,y:B},Sn(n)):{x:E,y:B};if(E=ce.x,B=ce.y,A){var se;return Object.assign({},$,(se={},se[O]=R?"0":"",se[x]=j?"0":"",se.transform=(P.devicePixelRatio||1)<=1?"translate("+E+"px, "+B+"px)":"translate3d("+E+"px, "+B+"px, 0)",se))}return Object.assign({},$,(t={},t[O]=R?B+"px":"",t[x]=j?E+"px":"",t.transform="",t))}function HF(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=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:br(t.placement),variation:Ki(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,EB(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,EB(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 zF={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:HF,data:{}};var Bc={passive:!0};function WF(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,l=r.resize,u=l===void 0?!0:l,A=Sn(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&f.forEach(function(p){p.addEventListener("scroll",n.update,Bc)}),u&&A.addEventListener("resize",n.update,Bc),function(){s&&f.forEach(function(p){p.removeEventListener("scroll",n.update,Bc)}),u&&A.removeEventListener("resize",n.update,Bc)}}const UF={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:WF,data:{}};var YF={left:"right",right:"left",bottom:"top",top:"bottom"};function vc(e){return e.replace(/left|right|bottom|top/g,function(t){return YF[t]})}var GF={start:"end",end:"start"};function IB(e){return e.replace(/start|end/g,function(t){return GF[t]})}function Ng(e){var t=Sn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Vg(e){return Gi(go(e)).left+Ng(e).scrollLeft}function KF(e,t){var n=Sn(e),r=go(e),o=n.visualViewport,s=r.clientWidth,l=r.clientHeight,u=0,A=0;if(o){s=o.width,l=o.height;var f=dB();(f||!f&&t==="fixed")&&(u=o.offsetLeft,A=o.offsetTop)}return{width:s,height:l,x:u+Vg(e),y:A}}function JF(e){var t,n=go(e),r=Ng(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Jo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=Jo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+Vg(e),A=-r.scrollTop;return Hr(o||n).direction==="rtl"&&(u+=Jo(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:l,x:u,y:A}}function Hg(e){var t=Hr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function mB(e){return["html","body","#document"].indexOf(yr(e))>=0?e.ownerDocument.body:Jn(e)&&Hg(e)?e:mB(mc(e))}function aa(e,t){var n;t===void 0&&(t=[]);var r=mB(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Sn(r),l=o?[s].concat(s.visualViewport||[],Hg(r)?r:[]):r,u=t.concat(l);return o?u:u.concat(aa(mc(l)))}function zg(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XF(e,t){var n=Gi(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 BB(e,t,n){return t===cB?zg(KF(e,n)):Ko(t)?XF(t,n):zg(JF(go(e)))}function ZF(e){var t=aa(mc(e)),n=["absolute","fixed"].indexOf(Hr(e).position)>=0,r=n&&Jn(e)?ia(e):e;return Ko(r)?t.filter(function(o){return Ko(o)&&gB(o,r)&&yr(o)!=="body"}):[]}function _F(e,t,n,r){var o=t==="clippingParents"?ZF(e):[].concat(t),s=[].concat(o,[n]),l=s[0],u=s.reduce(function(A,f){var p=BB(e,f,r);return A.top=Jo(p.top,A.top),A.right=Ic(p.right,A.right),A.bottom=Ic(p.bottom,A.bottom),A.left=Jo(p.left,A.left),A},BB(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 vB(e){var t=e.reference,n=e.element,r=e.placement,o=r?br(r):null,s=r?Ki(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,A;switch(o){case hn:A={x:l,y:t.y-n.height};break;case Gn:A={x:l,y:t.y+t.height};break;case Kn:A={x:t.x+t.width,y:u};break;case Cn:A={x:t.x-n.width,y:u};break;default:A={x:t.x,y:t.y}}var f=o?Lg(o):null;if(f!=null){var p=f==="y"?"height":"width";switch(s){case Ui:A[f]=A[f]-(t[p]/2-n[p]/2);break;case ra:A[f]=A[f]+(t[p]/2-n[p]/2);break}}return A}function la(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,l=s===void 0?e.strategy:s,u=n.boundary,A=u===void 0?CF:u,f=n.rootBoundary,p=f===void 0?cB:f,C=n.elementContext,h=C===void 0?oa:C,E=n.altBoundary,m=E===void 0?!1:E,B=n.padding,v=B===void 0?0:B,j=hB(typeof v!="number"?v:CB(v,na)),R=h===oa?EF:oa,x=e.rects.popper,O=e.elements[m?R:h],P=_F(Ko(O)?O:O.contextElement||go(e.elements.popper),A,p,l),N=Gi(e.elements.reference),F=vB({reference:N,element:x,strategy:"absolute",placement:o}),X=zg(Object.assign({},x,F)),Z=h===oa?X:N,Y={top:P.top-Z.top+j.top,bottom:Z.bottom-P.bottom+j.bottom,left:P.left-Z.left+j.left,right:Z.right-P.right+j.right},$=e.modifiersData.offset;if(h===oa&&$){var ce=$[o];Object.keys(Y).forEach(function(se){var q=[Kn,Gn].indexOf(se)>=0?1:-1,J=[hn,Gn].indexOf(se)>=0?"y":"x";Y[se]+=ce[J]*q})}return Y}function qF(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,l=n.padding,u=n.flipVariations,A=n.allowedAutoPlacements,f=A===void 0?AB:A,p=Ki(r),C=p?u?uB:uB.filter(function(m){return Ki(m)===p}):na,h=C.filter(function(m){return f.indexOf(m)>=0});h.length===0&&(h=C);var E=h.reduce(function(m,B){return m[B]=la(e,{placement:B,boundary:o,rootBoundary:s,padding:l})[br(B)],m},{});return Object.keys(E).sort(function(m,B){return E[m]-E[B]})}function $F(e){if(br(e)===Rg)return[];var t=vc(e);return[IB(e),t,IB(t)]}function e6(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,l=n.altAxis,u=l===void 0?!0:l,A=n.fallbackPlacements,f=n.padding,p=n.boundary,C=n.rootBoundary,h=n.altBoundary,E=n.flipVariations,m=E===void 0?!0:E,B=n.allowedAutoPlacements,v=t.options.placement,j=br(v),R=j===v,x=A||(R||!m?[vc(v)]:$F(v)),O=[v].concat(x).reduce(function(ue,pe){return ue.concat(br(pe)===Rg?qF(t,{placement:pe,boundary:p,rootBoundary:C,padding:f,flipVariations:m,allowedAutoPlacements:B}):pe)},[]),P=t.rects.reference,N=t.rects.popper,F=new Map,X=!0,Z=O[0],Y=0;Y<O.length;Y++){var $=O[Y],ce=br($),se=Ki($)===Ui,q=[hn,Gn].indexOf(ce)>=0,J=q?"width":"height",H=la(t,{placement:$,boundary:p,rootBoundary:C,altBoundary:h,padding:f}),K=q?se?Kn:Cn:se?Gn:hn;P[J]>N[J]&&(K=vc(K));var L=vc(K),ee=[];if(s&&ee.push(H[ce]<=0),u&&ee.push(H[K]<=0,H[L]<=0),ee.every(function(ue){return ue})){Z=$,X=!1;break}F.set($,ee)}if(X)for(var z=m?3:1,_=function(pe){var Ce=O.find(function(ve){var Ie=F.get(ve);if(Ie)return Ie.slice(0,pe).every(function(Ee){return Ee})});if(Ce)return Z=Ce,"break"},fe=z;fe>0;fe--){var he=_(fe);if(he==="break")break}t.placement!==Z&&(t.modifiersData[r]._skip=!0,t.placement=Z,t.reset=!0)}}const t6={name:"flip",enabled:!0,phase:"main",fn:e6,requiresIfExists:["offset"],data:{_skip:!1}};function yB(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 bB(e){return[hn,Kn,Gn,Cn].some(function(t){return e[t]>=0})}function n6(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,l=la(t,{elementContext:"reference"}),u=la(t,{altBoundary:!0}),A=yB(l,r),f=yB(u,o,s),p=bB(A),C=bB(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 r6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:n6};function o6(e,t,n){var r=br(e),o=[Cn,hn].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)*o,[Cn,Kn].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function i6(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,l=AB.reduce(function(p,C){return p[C]=o6(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 s6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:i6};function a6(e){var t=e.state,n=e.name;t.modifiersData[n]=vB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const l6={name:"popperOffsets",enabled:!0,phase:"read",fn:a6,data:{}};function c6(e){return e==="x"?"y":"x"}function u6(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,l=n.altAxis,u=l===void 0?!1:l,A=n.boundary,f=n.rootBoundary,p=n.altBoundary,C=n.padding,h=n.tether,E=h===void 0?!0:h,m=n.tetherOffset,B=m===void 0?0:m,v=la(t,{boundary:A,rootBoundary:f,padding:C,altBoundary:p}),j=br(t.placement),R=Ki(t.placement),x=!R,O=Lg(j),P=c6(O),N=t.modifiersData.popperOffsets,F=t.rects.reference,X=t.rects.popper,Z=typeof B=="function"?B(Object.assign({},t.rects,{placement:t.placement})):B,Y=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ce={x:0,y:0};if(N){if(s){var se,q=O==="y"?hn:Cn,J=O==="y"?Gn:Kn,H=O==="y"?"height":"width",K=N[O],L=K+v[q],ee=K-v[J],z=E?-X[H]/2:0,_=R===Ui?F[H]:X[H],fe=R===Ui?-X[H]:-F[H],he=t.elements.arrow,ue=E&&he?Fg(he):{width:0,height:0},pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:pB(),Ce=pe[q],ve=pe[J],Ie=sa(0,F[H],ue[H]),Ee=x?F[H]/2-z-Ie-Ce-Y.mainAxis:_-Ie-Ce-Y.mainAxis,Be=x?-F[H]/2+z+Ie+ve+Y.mainAxis:fe+Ie+ve+Y.mainAxis,xe=t.elements.arrow&&ia(t.elements.arrow),le=xe?O==="y"?xe.clientTop||0:xe.clientLeft||0:0,Ve=(se=$==null?void 0:$[O])!=null?se:0,ne=K+Ee-Ve-le,$e=K+Be-Ve,xt=sa(E?Ic(L,ne):L,K,E?Jo(ee,$e):ee);N[O]=xt,ce[O]=xt-K}if(u){var ft,Ot=O==="x"?hn:Cn,xr=O==="x"?Gn:Kn,wt=N[P],vt=P==="y"?"height":"width",pt=wt+v[Ot],Ut=wt-v[xr],Yt=[hn,Cn].indexOf(j)!==-1,Oe=(ft=$==null?void 0:$[P])!=null?ft:0,Fe=Yt?pt:wt-F[vt]-X[vt]-Oe+Y.altAxis,Te=Yt?wt+F[vt]+X[vt]-Oe-Y.altAxis:Ut,Ge=E&&Yt?RF(Fe,wt,Te):sa(E?Fe:pt,wt,E?Te:Ut);N[P]=Ge,ce[P]=Ge-wt}t.modifiersData[r]=ce}}const A6={name:"preventOverflow",enabled:!0,phase:"main",fn:u6,requiresIfExists:["offset"]};function d6(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function g6(e){return e===Sn(e)||!Jn(e)?Ng(e):d6(e)}function f6(e){var t=e.getBoundingClientRect(),n=Yi(t.width)/e.offsetWidth||1,r=Yi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function p6(e,t,n){n===void 0&&(n=!1);var r=Jn(t),o=Jn(t)&&f6(t),s=go(t),l=Gi(e,o,n),u={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(r||!r&&!n)&&((yr(t)!=="body"||Hg(s))&&(u=g6(t)),Jn(t)?(A=Gi(t,!0),A.x+=t.clientLeft,A.y+=t.clientTop):s&&(A.x=Vg(s))),{x:l.left+u.scrollLeft-A.x,y:l.top+u.scrollTop-A.y,width:l.width,height:l.height}}function h6(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(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&&o(A)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function C6(e){var t=h6(e);return TF.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function E6(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function I6(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var QB={placement:"bottom",modifiers:[],strategy:"absolute"};function xB(){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 m6(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?QB:o;return function(u,A,f){f===void 0&&(f=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},QB,s),modifiersData:{},elements:{reference:u,popper:A},attributes:{},styles:{}},C=[],h=!1,E={state:p,setOptions:function(j){var R=typeof j=="function"?j(p.options):j;B(),p.options=Object.assign({},s,p.options,R),p.scrollParents={reference:Ko(u)?aa(u):u.contextElement?aa(u.contextElement):[],popper:aa(A)};var x=C6(I6([].concat(r,p.options.modifiers)));return p.orderedModifiers=x.filter(function(O){return O.enabled}),m(),E.update()},forceUpdate:function(){if(!h){var j=p.elements,R=j.reference,x=j.popper;if(xB(R,x)){p.rects={reference:p6(R,ia(x),p.options.strategy==="fixed"),popper:Fg(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(Y){return p.modifiersData[Y.name]=Object.assign({},Y.data)});for(var O=0;O<p.orderedModifiers.length;O++){if(p.reset===!0){p.reset=!1,O=-1;continue}var P=p.orderedModifiers[O],N=P.fn,F=P.options,X=F===void 0?{}:F,Z=P.name;typeof N=="function"&&(p=N({state:p,options:X,name:Z,instance:E})||p)}}}},update:E6(function(){return new Promise(function(v){E.forceUpdate(),v(p)})}),destroy:function(){B(),h=!0}};if(!xB(u,A))return E;E.setOptions(f).then(function(v){!h&&f.onFirstUpdate&&f.onFirstUpdate(v)});function m(){p.orderedModifiers.forEach(function(v){var j=v.name,R=v.options,x=R===void 0?{}:R,O=v.effect;if(typeof O=="function"){var P=O({state:p,name:j,instance:E,options:x}),N=function(){};C.push(P||N)}})}function B(){C.forEach(function(v){return v()}),C=[]}return E}}var B6=[UF,l6,zF,OF,s6,t6,A6,LF,r6],v6=m6({defaultModifiers:B6});function y6(e){return Lt("MuiPopper",e)}Ht("MuiPopper",["root"]);const b6=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Q6=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function x6(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 yc(e){return typeof e=="function"?e():e}function bc(e){return e.nodeType!==void 0}function w6(e){return!bc(e)}const T6=()=>nn({root:["root"]},o8(y6)),P6={},S6=k.forwardRef(function(t,n){var r;const{anchorEl:o,children:s,direction:l,disablePortal:u,modifiers:A,open:f,placement:p,popperOptions:C,popperRef:h,slotProps:E={},slots:m={},TransitionProps:B}=t,v=Ue(t,b6),j=k.useRef(null),R=Qn(j,n),x=k.useRef(null),O=Qn(x,h),P=k.useRef(O);Ii(()=>{P.current=O},[O]),k.useImperativeHandle(h,()=>x.current,[]);const N=x6(p,l),[F,X]=k.useState(N),[Z,Y]=k.useState(yc(o));k.useEffect(()=>{x.current&&x.current.forceUpdate()}),k.useEffect(()=>{o&&Y(yc(o))},[o]),Ii(()=>{if(!Z||!f)return;const J=L=>{X(L.placement)};if(process.env.NODE_ENV!=="production"&&Z&&bc(Z)&&Z.nodeType===1){const L=Z.getBoundingClientRect();process.env.NODE_ENV!=="test"&&L.top===0&&L.left===0&&L.right===0&&L.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(`
|
|
@@ -278,5 +278,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
278
278
|
`),t7)),l7=Ae("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Pe(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>W({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:lf(t,e.color),transition:`transform .${af}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Xt.css(Sy||(Sy=qi`
|
|
279
279
|
width: auto;
|
|
280
280
|
animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
281
|
-
`),n7)),Oy=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:l,valueBuffer:u,variant:A="indeterminate"}=r,f=Ue(r,e7),p=W({},r,{color:s,variant:A}),C=o7(p),h=Pt(),E={},m={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(l!==void 0){E["aria-valuenow"]=Math.round(l),E["aria-valuemin"]=0,E["aria-valuemax"]=100;let B=l-100;h.direction==="rtl"&&(B=-B),m.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),m.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(i7,W({className:Ye(C.root,o),ownerState:p,role:"progressbar"},E,{ref:n},f,{children:[A==="buffer"?g.jsx(s7,{className:C.dashed,ownerState:p}):null,g.jsx(a7,{className:C.bar1,ownerState:p,style:m.bar1}),A==="determinate"?null:g.jsx(l7,{className:C.bar2,ownerState:p,style:m.bar2})]}))});process.env.NODE_ENV!=="production"&&(Oy.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 c7=Oy,u7=Ae("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),jy=()=>g.jsx(u7,{children:g.jsx(c7,{color:"primary"})}),A7=e=>t=>g.jsx(w.Suspense,{fallback:g.jsx(jy,{}),children:g.jsx(e,{...t})}),kc=({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})]});kc.propTypes={title:c.string.isRequired};const My=Ae(S.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),cf=({children:e})=>{const t=mt.useLocation(),{pathname:n}=t;return w.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};cf.propTypes={children:c.node};const d7=Ae("div")({width:"100%",overflowX:"auto",display:"block"}),uf=({title:e})=>g.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});uf.propTypes={title:c.string.isRequired};const Af=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},g7=(e,t)=>e&&e.data?{data:Af(e.data,t),total:e.total+1}:e,f7=(e,t)=>e&&e.length>0?Af(e,t):e,p7=(e,t)=>e&&e.data?{...e,data:Af(e.data,t),total:e.total+1}:e,df=({onClose:e,record:t,children:n,redirect:r,onSubmit:o,onSuccess:s,onError:l})=>{const u=Hu.useQueryClient(),A=S.useResourceContext(),f=S.useRedirect(),p=S.useNotify(),C=w.useCallback(B=>{const j=Date.now();u.setQueryData([A,"getOne",{id:B.id}],B),u.setQueriesData([A,"getList"],R=>p7(R,B),{updatedAt:j}),u.setQueriesData([A,"getMany"],R=>f7(R,B),{updatedAt:j}),u.setQueriesData([A,"getManyReference"],R=>g7(R,B),{updatedAt:j}),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,...E}=S.useCreateController({mutationOptions:{onSuccess:C,onError:l}}),m=w.useCallback(B=>{o?o(B,e):h&&h(B)},[o,h,e]);return g.jsx(S.CreateContextProvider,{value:{record:t,save:m,saving:E==null?void 0:E.saving,redirect:r},children:w.cloneElement(n,{...n.props,toolbar:g.jsxs(lr,{children:[g.jsx(S.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:E==null?void 0:E.saving}),g.jsx(S.SaveButton,{disabled:E==null?void 0:E.saving})]})})})};df.propTypes={children:c.node,onClose:c.func,record:c.object,redirect:c.oneOf(["list","edit","show",!1])},df.defaultProps={redirect:!1};const h7={true:{_scrollToTop:!0},false:{}},C7=Ae(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${S.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),gf=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:o,scrollToTop:s,className:l,sx:u,onSubmit:A,onSuccess:f,onError:p,...C})=>{const[h,E]=w.useState(!1),m=S.useTranslate(),B=S.useResourceContext(),{openDialog:v,closeDialog:j}=Do(),R=w.useCallback(()=>v(B,()=>E(!0)),[v,B]),x=w.useCallback(()=>j(B,()=>E(!1)),[j,B]),O=b.useMediaQuery(P=>P.breakpoints.down("md"));return g.jsxs(g.Fragment,{children:[O?g.jsx(C7,{...C,state:h7[String(s)],color:"primary",className:Ye(S.CreateButtonClasses.floating,l),"aria-label":n&&m(n),onClick:R,children:g.jsx(fn.Add,{})}):g.jsx(S.Button,{...C,sx:u,label:n,onClick:R,children:g.jsx(fn.Add,{})}),g.jsx(b.Dialog,{open:h,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:g.jsx(df,{...C,redirect:o,record:r,onClose:x,onSubmit:A,onSuccess:f,onError:p})})]})};gf.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},gf.propTypes={...S.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 Ry=({onClose:e,children:t})=>{const n=S.useNotify(),r=S.useRecordContext(),o=S.useResourceContext(),{id:s}=r,{isLoading:l,data:u}=S.useGetOne(o,{id:s}),A=w.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:f,saving:p}=S.useEditController({resource:o,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return g.jsx(S.EditContextProvider,{value:{record:u,isLoading:l,save:f,saving:p},children:w.cloneElement(t,{toolbar:g.jsxs(lr,{children:[g.jsx(S.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),g.jsx(S.SaveButton,{})]})})})};Ry.propTypes={children:c.node,onClose:c.func};const ff=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[o,s]=w.useState(!1),{openDialog:l,closeDialog:u}=Do(),A=S.useResourceContext(),f=w.useCallback(()=>l(A,()=>s(!0)),[l,A]),p=w.useCallback(()=>u(A,()=>s(!1)),[u,A]);return g.jsxs(g.Fragment,{children:[g.jsx(S.Button,{label:n,onClick:f,children:g.jsx(fn.Edit,{})}),g.jsx(b.Dialog,{open:o,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:g.jsx(Ry,{...r,onClose:p})})]})};ff.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},ff.propTypes={fullWidth:c.bool,maxWidth:c.oneOf(["xs","sm","md","lg","xl",!1]),label:c.string};const Dy=({label:e="ra.auth.sign_in",...t})=>{const n=S.useRecordContext(),[r,o]=w.useState(!1),s=S.useAuthProvider(),l=w.useCallback(u=>{u.stopPropagation(),u.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return g.jsx(S.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:l,...t,children:g.jsx(fn.VpnKey,{})})};Dy.propTypes={label:c.string};const ky=w.createContext({});ky.displayName="DatagridContext";const E7=({children:e,value:t})=>g.jsx(ky.Provider,{value:t,children:e}),pf=e=>{const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:l,selectedIds:u=[],onUnselectItems:A}=de.useListContext(e),f=de.useTranslate(),p=w.useCallback(()=>{A()},[A]);return g.jsx(I7,{className:r,children:g.jsxs(uF,{"data-test":"bulk-actions-toolbar",className:Ye(cr.toolbar,{[cr.collapsed]:u.length===0}),...de.sanitizeListRestProps(o),children:[g.jsxs("div",{className:cr.title,children:[g.jsx(Rd,{className:cr.icon,"aria-label":f("ra.action.unselect"),title:f("ra.action.unselect"),onClick:p,size:"small",children:g.jsx(wc,{fontSize:"small"})}),g.jsx(JI,{color:"inherit",variant:"subtitle1",children:f(t,{_:t,smart_count:u.length})})]}),g.jsx(S.TopToolbar,{className:cr.topToolbar,children:w.Children.map(n,C=>w.isValidElement(C)?w.cloneElement(C,{filterValues:s,resource:l,selectedIds:u}):null)})]})})};pf.propTypes={children:c.node,label:c.string};const Xo="RaBulkActionsToolbar",cr={toolbar:`${Xo}-toolbar`,topToolbar:`${Xo}-topToolbar`,buttons:`${Xo}-buttons`,collapsed:`${Xo}-collapsed`,title:`${Xo}-title`,icon:`${Xo}-icon`},I7=Ae("div",{name:Xo,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${cr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Bi(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${cr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${cr.buttons}`]:{},[`& .${cr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${cr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${cr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Fy=g.jsx(S.BulkDeleteButton,{}),hf=k.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?S.PureDatagridBody:S.DatagridBody,header:o=S.DatagridHeader,children:s,className:l,empty:u=v7,expand:A,bulkActionsToolbar:f=!1,bulkActionButtons:p=Fy,hover:C,isRowSelectable:h,isRowExpandable:E,resource:m,rowClick:B,rowSx:v,rowStyle:j,size:R="small",sx:x,expandSingle:O=!1,...P}=e,{sort:N,data:F,isLoading:X,onSelect:Z,onToggleItem:Y,selectedIds:$,setSort:ce,total:se}=de.useListContext(e),q=!!p,J=w.useMemo(()=>({isRowExpandable:E,expandSingle:O}),[E,O]),H=w.useRef(null);w.useEffect(()=>{(!$||$.length===0)&&(H.current=null)},[JSON.stringify($)]);const K=w.useCallback((L,ee)=>{const z=F.map(fe=>fe.id),_=z.indexOf(H.current);if(H.current=ee.target.checked?L:null,ee.shiftKey&&_!==-1){const fe=z.indexOf(L),he=z.slice(Math.min(_,fe),Math.max(_,fe)+1),ue=ee.target.checked?lL($,he):yL($,he);Z(h?ue.filter(pe=>h(F.find(Ce=>Ce.id===pe))):ue)}else Y(L)},[F,h,Z,Y,$]);return X===!0?g.jsx(S.DatagridLoading,{className:l,expand:A,hasBulkActions:q,nbChildren:k.Children.count(s),size:R}):F==null||F.length===0||se===0?u||null:g.jsx(E7,{value:J,children:g.jsxs(S.DatagridRoot,{sx:x,className:Ye(S.DatagridClasses.root,l),children:[f!=null&&w.isValidElement(f)?w.cloneElement(f,{selectedIds:$,total:se}):p!==!1?g.jsx(pf,{children:w.isValidElement(p)?p:Fy}):null,g.jsx("div",{className:S.DatagridClasses.tableWrapper,children:g.jsxs(b.Table,{ref:t,className:S.DatagridClasses.table,size:R,...B7(P),children:[Ly(o,{children:s,sort:N,data:F,hasExpand:!!A,hasBulkActions:q,isRowSelectable:h,onSelect:Z,resource:m,selectedIds:$,setSort:ce},s),Ly(r,{expand:A,rowClick:B,data:F,hasBulkActions:q,hover:C,onToggleItem:K,resource:m,rowSx:v,rowStyle:j,selectedIds:$,isRowSelectable:h},s)]})})]})})}),Ly=(e,t,n)=>w.isValidElement(e)?w.cloneElement(e,t,n):w.createElement(e,t,n);hf.propTypes={body:c.oneOfType([c.element,c.elementType]),bulkActionButtons:c.oneOfType([c.bool,c.element]),children:c.node.isRequired,className:c.string,sort:c.exact({field:c.string,order:c.oneOf(["ASC","DESC"])}),data:c.arrayOf(c.any),empty:c.element,expand:c.oneOfType([c.element,c.elementType]),header:c.oneOfType([c.element,c.elementType]),hover:c.bool,isLoading:c.bool,onSelect:c.func,onToggleItem:c.func,resource:c.string,rowClick:c.oneOfType([c.string,c.func,c.bool]),rowSx:c.func,rowStyle:c.func,selectedIds:c.arrayOf(c.any),setSort:c.func,total:c.number,isRowSelectable:c.func,isRowExpandable:c.func,expandSingle:c.bool};const m7=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],B7=e=>Object.keys(de.sanitizeListRestProps(e)).filter(t=>!m7.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});hf.displayName="Datagrid";const v7=g.jsx(S.ListNoResults,{}),y7=Ae(hf,{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"}})),b7=e=>g.jsx(y7,{...e}),Q7=Ae("div")(({theme:e})=>({padding:e.spacing(2)})),Ny=({actions:e,className:t,...n})=>{const{hasCreate:r}=de.useResourceDefinition(n),o=de.useResourceContext(n),s=de.useTranslate(),l=de.useGetResourceLabel(),u=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:l(o,0)}),A=s("ra.page.empty",{name:u}),f=s("ra.page.invite");return g.jsxs(x7,{className:t,children:[g.jsxs("div",{className:$i.message,children:[g.jsx(fn.Inbox,{className:$i.icon}),g.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:A})}),r&&g.jsx(b.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:f})})]}),g.jsx(Q7,{className:$i.toolbar,children:e})]})},Fc="ApplicaEmpty",$i={message:`${Fc}-message`,icon:`${Fc}-icon`,toolbar:`${Fc}-toolbar`},x7=Ae("span",{name:Fc,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${$i.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${$i.icon}`]:{width:"9em",height:"9em"},[`& .${$i.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));Ny.propTypes={actions:c.element,className:c.string};const w7=()=>{const e=S.useRefresh(),t=S.useNotify(),n=S.useUnselectAll(),r=S.useResourceContext(),{selectedIds:o,data:s}=S.useListContext(),l=S.useRecordContext(),u=o.map(C=>s.find(h=>h.id===C)),[A,{isLoading:f}]=S.useUpdateMany(r,{ids:o.length>0?o:[l==null?void 0:l.id],data:{readed:Mr().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=w.useCallback(()=>{A()},[A]);return g.jsx(S.Button,{label:"ra.notification.mark_as_readed",disabled:f||(l==null?void 0:l.readed)!==null,onClick:p,children:g.jsx(fn.Email,{})})},T7=()=>{const e=S.useRefresh(),t=S.useNotify(),n=S.useUnselectAll(),{selectedIds:r,data:o}=S.useListContext(),s=S.useRecordContext(),l=S.useResourceContext(),u=r.map(C=>o.find(h=>h.id===C)).concat([s]),[A,{isLoading:f}]=S.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=w.useCallback(()=>{A()},[A]);return g.jsx(S.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:f||s&&!(s!=null&&s.readed),onClick:p,children:g.jsx(fn.Drafts,{})})},P7=e=>{const t=S.useRecordContext(e),n=S.useResourceContext(e),r=S.useRedirect(),o=S.useNotify(),s=S.useTranslate(),[l]=S.useLocaleState(),u=w.useMemo(()=>t!=null&&t.readed?Mr(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]=S.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Mr().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:()=>{o("ra.notification.readed_error","warning")}}),f=w.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})})]})},S7=({...e})=>{const t=b.useTheme(),{mode:n,colorize:r,density:o}=w.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=w.useCallback(l=>({backgroundColor:l!=null&&l.readed?r(t.palette.primary[n],o):r(t.palette.secondary[n],o)}),[t,n,r,o]);return g.jsxs(S.Datagrid,{...e,rowStyle:s,children:[g.jsx(P7,{source:"notification",sortable:!1,label:"ra.notification"}),g.jsx(Xl,{source:"created",label:"ra.notification.created"}),g.jsxs(Ro,{children:[g.jsx(w7,{}),g.jsx(T7,{})]})]})},O7=g.jsx(S.ListActions,{}),j7=g.jsx(S.Pagination,{}),M7=g.jsx(S.Empty,{}),R7=jL,Vy=e=>{const{actions:t=O7,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:l,pagination:u=j7,children:A,className:f,component:p=R7,title:C,empty:h=M7,...E}=e,{defaultTitle:m,data:B,error:v,isLoading:j,filterValues:R,resource:x}=de.useListContext(e);if(!A||!B&&j&&s)return null;const O=()=>g.jsxs("div",{className:mo.main,children:[(r||t)&&g.jsx(S.ListToolbar,{className:mo.actions,filters:r,actions:t,hasCreate:l}),!v&&g.jsx(p,{className:mo.content,children:o&&A&&k.isValidElement(A)?w.cloneElement(A,{bulkActionButtons:o}):A}),v?g.jsx(Kg,{error:v,resetErrorBoundary:null}):u!==!1&&u]}),P=()=>h!==!1&&w.cloneElement(h,{className:mo.noResults,hasCreate:l}),N=!j&&(B==null?void 0:B.length)===0&&!Object.keys(R).length&&h!==!1;return g.jsxs(D7,{className:Ye("list-page",f),...E,children:[g.jsx(S.Title,{title:C,defaultTitle:m,preferenceKey:`${x}.list.title`}),N?P():O(),n]})};Vy.propTypes={actions:c.oneOfType([c.bool,c.element]),aside:c.element,children:c.node,className:c.string,component:de.ComponentPropType,emptyWhileLoading:c.bool,filters:c.oneOfType([c.element,c.arrayOf(c.element)]),hasCreate:c.bool,pagination:c.oneOfType([c.element,c.bool]),title:S.TitlePropType};const ha="RaList",mo={main:`${ha}-main`,content:`${ha}-content`,actions:`${ha}-actions`,noResults:`${ha}-noResults`},D7=Ae("div",{name:ha,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${mo.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${mo.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${mo.actions}`]:{},[`& .${mo.noResults}`]:{}})),Cf=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=k7,filterDefaultValues:s,perPage:l=10,queryOptions:u,resource:A,sort:f,storeKey:p,...C})=>g.jsx(de.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:l,queryOptions:u,resource:A,sort:f,storeKey:p,children:g.jsx(Vy,{...C})});Cf.propTypes={actions:c.oneOfType([c.bool,c.element]),aside:c.element,children:c.node.isRequired,className:c.string,emptyWhileLoading:c.bool,filter:c.object,filterDefaultValues:c.object,filters:c.oneOfType([c.element,c.arrayOf(c.element)]),pagination:c.oneOfType([c.element,c.bool]),perPage:c.number,sort:c.shape({field:c.string,order:c.oneOf(["ASC","DESC"])}),sx:c.any,title:S.TitlePropType,disableSyncWithLocation:c.bool,hasCreate:c.bool,resource:c.string};const k7={},F7=Ts(Cf,{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":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}})),Hy=e=>g.jsx(Wn,{content:!1,children:g.jsx(F7,{...e})});Hy.propTypes={...Cf.propTypes};const Ef={p:0,m:0},zy={p:2,m:0,borderRadius:0,width:"100%"},Wy=e=>{const{children:t}=e,[n,r]=k.useState(null),o=m=>{r(m.currentTarget)},s=()=>{r(null)},l=b.useMediaQuery(m=>m.breakpoints.down("md")),u=!!n,A=u?"simple-popover":void 0,{filterValues:f,resource:p,selectedIds:C=[],onUnselectItems:h}=S.useListContext(e),E=k.useCallback(()=>{h(),r(null)},[h,r]);return g.jsx(b.Fade,{in:C!==void 0&&C.length>0,children:g.jsxs(b.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[g.jsx(b.Fab,{color:"primary","aria-label":"manage",onClick:o,children:C==null?void 0:C.length}),g.jsx(b.Popover,{id:A,open:u,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:l?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:l?"center":"right"},disableScrollLock:!0,elevation:10,children:g.jsxs(b.List,{sx:Ef,children:[g.jsx(b.ListItem,{sx:Ef,children:g.jsx(S.Button,{onClick:E,sx:zy,label:"ra.action.unselect",startIcon:g.jsx(wc,{}),children:g.jsx(wc,{})})}),k.Children.map(t,m=>{var B;return g.jsx(b.ListItem,{sx:Ef,children:k.isValidElement(m)?k.cloneElement(m,{filterValues:f,resource:p,selectedIds:C,sx:zy,...(B=m.props)!=null&&B.popover?{closePopover:s}:{}}):null})})]})})]})})};Wy.propTypes={children:c.node};const Lc={width:"1.5rem",alignSelf:"center"},If=({source:e,label:t,variant:n,record:r,spaceBottom:o,spaceTop:s,component:l,leftIcon:u,rightIcon:A,button:f,buttonProps:p,...C})=>{const{getCurrentDialog:h}=Do(),E=de.useResourceContext(C),m=h(),B=de.useRecordContext(),v=r||B,j=dt.get(v,e||"");return g.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:R=>({pt:1,pb:1,borderBottom:`1px solid ${R.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[g.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[u&&(w.isValidElement(u)?w.cloneElement(u,{style:Lc}):w.createElement(u,{style:Lc})),g.jsx(de.FieldTitle,{label:t,source:e,resource:m||E})]}),g.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[l?w.isValidElement(l)?w.cloneElement(l,{record:v,resource:E,value:j}):w.createElement(l,{source:e,record:v,resource:E,value:j}):g.jsx(b.Typography,{variant:n,children:j}),A&&(w.isValidElement(A)?w.cloneElement(A,{style:Lc}):w.createElement(A,{style:Lc})),f&&g.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:f})]})]})};If.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},If.defaultProps={variant:"body1"};const Uy=()=>{const e=Xt.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"})]})})},Yy=({children:e,...t})=>{const n=Pt();return g.jsx(Wn,{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})})};Yy.propTypes={children:c.node};const Ca=({version:e,name:t,copy:n,children:r,background:o=Uy})=>g.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[w.isValidElement(o)?o:w.createElement(o),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(kc,{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(Yy,{children:r})})}),g.jsx(b.Grid,{item:!0,sx:{pb:1},children:g.jsx($s,{name:t,copy:n,version:e})})]})]})]});Ca.propTypes={children:c.node,version:c.string,name:c.string,copy:c.string,background:c.oneOfType([c.node,c.func,c.object])};const Gy=({name:e,copy:t,version:n,background:r})=>{const o=de.useTranslate(),s=de.useAuthProvider(),l=de.useNotify(),u=mt.useNavigate(),{token:A}=mt.useParams();return w.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"}),ge.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),ge.delay(()=>u("/login"),1e3)})},[A]),g.jsx(Ca,{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:o("ra.auth.activate")}),g.jsx(b.Typography,{component:mt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:o("ra.auth.back_to_login")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:o("ra.auth.activate_pending")})]})})};Gy.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const Nc=({version:e,name:t,copy:n,enablePasswordRecover:r,enableRegistration:o,redirectTo:s,background:l})=>{const[u,A]=de.useSafeSetState(!1),f=de.useLogin(),p=de.useTranslate(),C=de.useNotify(),h=de.useCheckAuth(),E=mt.useNavigate();w.useEffect(()=>{h({},!1).then(()=>{E("/")}).catch(()=>{})},[h,E]);const m=B=>{A(!0),f(B,s).then(()=>{A(!1)}).catch(v=>{A(!1),C(typeof v=="string"?v:typeof v>"u"||!v.message?"ra.auth.sign_in_error":v.message,{type:"error",messageArgs:{_:typeof v=="string"?v:v&&v.message?v.message:void 0}})})};return g.jsx(Ca,{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"}),o&&g.jsx(b.Typography,{component:mt.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(de.Form,{onSubmit:m,children:[g.jsxs(b.Grid,{container:!0,children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Pn,{autoFocus:!0,source:"username",label:p("ra.auth.username"),autoComplete:"username",validate:de.required(),placeholder:"user@company.name",fullWidth:!0})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Pn,{source:"password",label:p("ra.auth.password"),type:"password",autoComplete:"current-password",validate:de.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:mt.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")})})]})})]})})};Nc.propTypes={version:c.string.isRequired,name:c.string.isRequired,enablePasswordRecover:c.bool,enableRegister:c.bool,background:c.element},Nc.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:g.jsx(Uy,{})};const Ky=({name:e,copy:t,version:n,background:r})=>{const[o,s]=w.useState(!1),l=de.useTranslate(),u=de.useRedirect(),A=de.useNotify(),f=de.useAuthProvider(),p=({email:C})=>{s(!0),f.recover(C).then(h=>{const E=`ra.auth.recover_${h.responseCode}`,m=h.responseCode==="ok"?"info":"error";A(E,{type:m}),u("/login")}).catch(h=>{A(h,{type:"error"})}).finally(()=>s(!1))};return g.jsx(Ca,{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:mt.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(S.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(Pn,{source:"email",validate:[de.required(),de.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:o,fullWidth:!0,children:o?g.jsx(b.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})};Ky.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const Jy=({name:e,copy:t,version:n})=>{const[r,o]=w.useState(!1),s=de.useTranslate(),l=de.useRedirect(),u=de.useNotify(),A=de.useAuthProvider(),f=p=>{o(!0),A.register(p).then(C=>{const h=`ra.auth.register_${C.responseCode}`,E=C.responseCode==="ok"?"info":"error";u(h,{type:E}),l("/login")}).catch(C=>{u(C,{type:"error"})}).finally(()=>o(!1))};return g.jsx(Ca,{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:mt.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(S.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(Pn,{source:"name",label:s("ra.register.name"),validate:de.required()})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Pn,{source:"email",type:"email",validate:[de.required(),de.email()]})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Pn,{source:"password",type:"password",validate:de.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")})})]})})]})})};Jy.propTypes={name:c.string.isRequired,version:c.string.isRequired};function Xy(){const e=w.useCallback(()=>location.reload(),[]);return g.jsx(b.Container,{children:g.jsxs(b.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[g.jsx("img",{src:YB,style:{width:"100%",maxWidth:450}}),g.jsx(b.Typography,{variant:"h2",children:"Ops! An error occurred..."}),g.jsx(b.Typography,{children:"We're fixing the problem. Please try again later."}),g.jsx(b.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}const L7=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 ${He(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${He(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${He(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${He(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${He(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${He(e.palette.info.main,.2)}`,success:`0 0 0 2px ${He(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${He(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${He(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${He(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${He(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${He(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${He(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${He(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${He(e.palette.grey[500],.2)}`});function Zn(e,t){N7(e)&&(e="100%");var n=V7(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 N7(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function V7(e){return typeof e=="string"&&e.indexOf("%")!==-1}function H7(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Vc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mf(e){return e.length===1?"0"+e:String(e)}function z7(e,t,n){return{r:Zn(e,255)*255,g:Zn(t,255)*255,b:Zn(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 W7(e,t,n){var r,o,s;if(e=Zn(e,360),t=Zn(t,100),n=Zn(n,100),t===0)o=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),o=Bf(u,l,e),s=Bf(u,l,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function U7(e,t,n){e=Zn(e,255),t=Zn(t,255),n=Zn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s=0,l=r,u=r-o,A=r===0?0:u/r;if(r===o)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 Y7(e,t,n){e=Zn(e,360)*6,t=Zn(t,100),n=Zn(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),l=n*(1-o*t),u=n*(1-(1-o)*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 G7(e,t,n,r){var o=[mf(Math.round(e).toString(16)),mf(Math.round(t).toString(16)),mf(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Zy(e){return Mn(e)/255}function Mn(e){return parseInt(e,16)}var _y={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 Ea(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,l=!1,u=!1;return typeof e=="string"&&(e=X7(e)),typeof e=="object"&&(zr(e.r)&&zr(e.g)&&zr(e.b)?(t=z7(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):zr(e.h)&&zr(e.s)&&zr(e.v)?(r=Vc(e.s),o=Vc(e.v),t=Y7(e.h,r,o),l=!0,u="hsv"):zr(e.h)&&zr(e.s)&&zr(e.l)&&(r=Vc(e.s),s=Vc(e.l),t=W7(e.h,r,s),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=H7(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 K7="[-\\+]?\\d+%?",J7="[-\\+]?\\d*\\.\\d+%?",Bo="(?:".concat(J7,")|(?:").concat(K7,")"),vf="[\\s|\\(]+(".concat(Bo,")[,|\\s]+(").concat(Bo,")[,|\\s]+(").concat(Bo,")\\s*\\)?"),yf="[\\s|\\(]+(".concat(Bo,")[,|\\s]+(").concat(Bo,")[,|\\s]+(").concat(Bo,")[,|\\s]+(").concat(Bo,")\\s*\\)?"),ur={CSS_UNIT:new RegExp(Bo),rgb:new RegExp("rgb"+vf),rgba:new RegExp("rgba"+yf),hsl:new RegExp("hsl"+vf),hsla:new RegExp("hsla"+yf),hsv:new RegExp("hsv"+vf),hsva:new RegExp("hsva"+yf),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 X7(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(_y[e])e=_y[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ur.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ur.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ur.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ur.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ur.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ur.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ur.hex8.exec(e),n?{r:Mn(n[1]),g:Mn(n[2]),b:Mn(n[3]),a:Zy(n[4]),format:t?"name":"hex8"}:(n=ur.hex6.exec(e),n?{r:Mn(n[1]),g:Mn(n[2]),b:Mn(n[3]),format:t?"name":"hex"}:(n=ur.hex4.exec(e),n?{r:Mn(n[1]+n[1]),g:Mn(n[2]+n[2]),b:Mn(n[3]+n[3]),a:Zy(n[4]+n[4]),format:t?"name":"hex8"}:(n=ur.hex3.exec(e),n?{r:Mn(n[1]+n[1]),g:Mn(n[2]+n[2]),b:Mn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function zr(e){return!!ur.CSS_UNIT.exec(String(e))}var Hc=2,qy=.16,Z7=.05,_7=.05,q7=.15,$y=5,eb=4,$7=[{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 tb(e){var t=e.r,n=e.g,r=e.b,o=U7(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function zc(e){var t=e.r,n=e.g,r=e.b;return"#".concat(G7(t,n,r,!1))}function eV(e,t,n){var r=n/100,o={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 o}function nb(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Hc*t:Math.round(e.h)+Hc*t:r=n?Math.round(e.h)+Hc*t:Math.round(e.h)-Hc*t,r<0?r+=360:r>=360&&(r-=360),r}function rb(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-qy*t:t===eb?r=e.s+qy:r=e.s+Z7*t,r>1&&(r=1),n&&t===$y&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function ob(e,t,n){var r;return n?r=e.v+_7*t:r=e.v-q7*t,r>1&&(r=1),Number(r.toFixed(2))}function ib(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ea(e),o=$y;o>0;o-=1){var s=tb(r),l=zc(Ea({h:nb(s,o,!0),s:rb(s,o,!0),v:ob(s,o,!0)}));n.push(l)}n.push(zc(r));for(var u=1;u<=eb;u+=1){var A=tb(r),f=zc(Ea({h:nb(A,u),s:rb(A,u),v:ob(A,u)}));n.push(f)}return t.theme==="dark"?$7.map(function(p){var C=p.index,h=p.opacity,E=zc(eV(Ea(t.backgroundColor||"#141414"),Ea(n[C]),h*100));return E}):n}var bf={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"},_t={},Wc={};Object.keys(bf).forEach(function(e){_t[e]=ib(bf[e]),_t[e].primary=_t[e][5],Wc[e]=ib(bf[e],{theme:"dark",backgroundColor:"#141414"}),Wc[e].primary=Wc[e][5]}),_t.red,_t.volcano,_t.gold,_t.orange,_t.yellow,_t.lime,_t.green,_t.cyan,_t.blue,_t.geekblue,_t.purple,_t.magenta,_t.grey,_t.grey;const sb=e=>{const{blue:t,red:n,gold:r,cyan:o,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:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:A},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:A},grey:u}};sb.propTypes={colors:c.object};const tV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},nV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},rV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},oV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},iV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},sV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},aV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},lV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},ab=(e,t,n)=>{switch(t){case"theme1":return tV(e,n);case"theme2":return nV(e,n);case"theme3":return rV(e,n);case"theme4":return oV(e,n);case"theme5":return iV(e,n);case"theme6":return sV(e,n);case"theme7":return aV(e,n);case"theme8":return lV(e,n);default:return sb(e)}};ab.propTypes={colors:c.object,presetColor:c.any};const cV=(e,t)=>{const n=e==="dark"?Wc:_t;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const l=ab(n,t,e);return fA({palette:{mode:e,common:{black:"#000",white:"#fff"},...l,text:{primary:e==="dark"?He(l.grey[900],.87):l.grey[700],secondary:e==="dark"?He(l.grey[900],.45):l.grey[500],disabled:e==="dark"?He(l.grey[900],.1):l.grey[400]},action:{disabled:l.grey[300]},divider:e==="dark"?He(l.grey[900],.05):l.grey[200],background:{paper:e==="dark"?l.grey[100]:l.grey[0],default:l.grey.A50}}})},uV=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 AV(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 dV(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function gV(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:g.jsx(et.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 Zo({color:e,theme:t}){const n=rn(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:He(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function fV(e){const t=Zo({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":Zo({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Zo({color:"secondary",theme:e}),"&.MuiAlert-borderError":Zo({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Zo({color:"success",theme:e}),"&.MuiAlert-borderInfo":Zo({color:"info",theme:e}),"&.MuiAlert-borderWarning":Zo({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 pV(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function hV(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 _o({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function CV(e){const t=_o({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":_o({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":_o({color:"secondary",theme:e}),"&.MuiBadge-colorError":_o({color:"error",theme:e}),"&.MuiBadge-colorInfo":_o({color:"info",theme:e}),"&.MuiBadge-colorSuccess":_o({color:"success",theme:e}),"&.MuiBadge-colorWarning":_o({color:"warning",theme:e})}}}}}function tt({variant:e,color:t,theme:n}){const r=rn(n,t),{lighter:o,main:s,dark:l,contrastText:u}=r,A=`${t}Button`,f=ki(n,A),p={"&::after":{boxShadow:`0 0 5px 5px ${He(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${He(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:o,"&:hover":{color:l,borderColor:l},...p};case"text":default:return{"&:hover":{color:l,backgroundColor:o},...p}}}function EV(e){const t=tt({variant:"dashed",color:"primary",theme:e}),n=tt({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*: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:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":tt({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":tt({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":tt({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":tt({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":tt({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":tt({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":tt({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":tt({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":tt({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":tt({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":tt({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":tt({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:tt({variant:"contained",color:"primary",theme:e}),containedSecondary:tt({variant:"contained",color:"secondary",theme:e}),containedError:tt({variant:"contained",color:"error",theme:e}),containedSuccess:tt({variant:"contained",color:"success",theme:e}),containedInfo:tt({variant:"contained",color:"info",theme:e}),containedWarning:tt({variant:"contained",color:"warning",theme:e}),outlinedPrimary:tt({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:tt({variant:"outlined",color:"secondary",theme:e}),outlinedError:tt({variant:"outlined",color:"error",theme:e}),outlinedSuccess:tt({variant:"outlined",color:"success",theme:e}),outlinedInfo:tt({variant:"outlined",color:"info",theme:e}),outlinedWarning:tt({variant:"outlined",color:"warning",theme:e}),textPrimary:tt({variant:"text",color:"primary",theme:e}),textSecondary:tt({variant:"text",color:"secondary",theme:e}),textError:tt({variant:"text",color:"error",theme:e}),textSuccess:tt({variant:"text",color:"success",theme:e}),textInfo:tt({variant:"text",color:"info",theme:e}),textWarning:tt({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function IV(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function mV(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function BV(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function es({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function vV(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 Qf(e){const t=vV(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function yV(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(et.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(et.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Qf("small")},"&.size-medium":{...Qf("medium")},"&.size-large":{...Qf("large")}},colorPrimary:es({color:"primary",theme:e}),colorSecondary:es({color:"secondary",theme:e}),colorSuccess:es({color:"success",theme:e}),colorWarning:es({color:"warning",theme:e}),colorInfo:es({color:"info",theme:e}),colorError:es({color:"error",theme:e})}}}}function ts({color:e,theme:t}){const n=rn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Rn({color:e,theme:t}){const n=rn(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function bV(e){const t=Rn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ts({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ts({color:"secondary",theme:e}),"&.MuiChip-colorError":ts({color:"error",theme:e}),"&.MuiChip-colorInfo":ts({color:"info",theme:e}),"&.MuiChip-colorSuccess":ts({color:"success",theme:e}),"&.MuiChip-colorWarning":ts({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Rn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Rn({color:"secondary",theme:e}),"&.MuiChip-lightError":Rn({color:"error",theme:e}),"&.MuiChip-lightInfo":Rn({color:"info",theme:e}),"&.MuiChip-lightSuccess":Rn({color:"success",theme:e}),"&.MuiChip-lightWarning":Rn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Rn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Rn({color:"secondary",theme:e}),"&.MuiChip-combinedError":Rn({color:"error",theme:e}),"&.MuiChip-combinedInfo":Rn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Rn({color:"success",theme:e}),"&.MuiChip-combinedWarning":Rn({color:"warning",theme:e})}}}}}function QV(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:He("#000",.7)}}}}}}function xV(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function wV(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function ns({color:e,theme:t}){const n=rn(t,e),{main:r,dark:o,contrastText:s}=n,l=`${e}Button`,u=ki(t,l);return{color:s,backgroundColor:r,boxShadow:u,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${He(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${He(r,.9)}`}}}function TV(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":ns({color:"primary",theme:e}),"&.MuiFab-secondary":ns({color:"secondary",theme:e}),"&.Mui-error":ns({color:"error",theme:e}),"&.MuiFab-success":ns({color:"success",theme:e}),"&.MuiFab-info":ns({color:"info",theme:e}),"&.MuiFab-warning":ns({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 PV(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 SV(){return{MuiInputBase:{styleOverrides:{}}}}function OV(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 jV(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function MV(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function RV(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function DV(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function kV(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function FV(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function qo({variant:e,theme:t}){const n=rn(t,e),{light:r}=n,o=ki(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function LV(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:{...qo({variant:"primary",theme:e}),"&.Mui-error":{...qo({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:qo({variant:"secondary",theme:e}),colorError:qo({variant:"error",theme:e}),colorWarning:qo({variant:"warning",theme:e}),colorInfo:qo({variant:"info",theme:e}),colorSuccess:qo({variant:"success",theme:e})}}}}function NV(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Qt({variant:e,color:t,theme:n}){const r=rn(n,t),{lighter:o,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:o,borderColor:s},...f};case"text":default:return{color:u,"&:hover":{backgroundColor:u,color:o},...f}}}function VV(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":Qt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Qt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Qt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Qt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Qt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Qt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Qt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Qt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Qt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Qt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Qt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Qt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Qt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Qt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Qt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Qt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Qt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Qt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Qt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Qt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Qt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Qt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Qt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Qt({variant:"outlined",color:"warning",theme:e})}}}}}}function HV(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function rs({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function zV(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 xf(e){const t=zV(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function WV(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":{...xf("small")},"&.size-medium":{...xf("medium")},"&.size-large":{...xf("large")}},colorPrimary:rs({color:"primary",theme:e}),colorSecondary:rs({color:"secondary",theme:e}),colorSuccess:rs({color:"success",theme:e}),colorWarning:rs({color:"warning",theme:e}),colorInfo:rs({color:"info",theme:e}),colorError:rs({color:"error",theme:e})}}}}function os({color:e,theme:t}){const n=rn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function UV(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":os({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":os({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":os({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":os({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":os({color:"info",theme:e}),"&.MuiSlider-thumbColorError":os({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 YV(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 wf(e,t){const n=YV(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 GV(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},...wf(e,"medium")},sizeLarge:{...wf(e,"large")},sizeSmall:{...wf(e,"small")}}}}}function KV(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 JV(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 XV(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 ZV(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function _V(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function qV(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function $V(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function eH(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function tH(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 nH(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function rH(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function oH(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function iH(e){return dt.merge(AV(e),dV(e),gV(e),fV(e),pV(),hV(e),CV(e),EV(e),IV(),mV(),BV(),yV(e),bV(e),QV(),xV(e),wV(),TV(e),PV(e),SV(),OV(e),jV(),MV(),RV(e),DV(e),kV(),FV(),LV(e),NV(),VV(e),HV(e),WV(e),UV(e),GV(e),KV(e),JV(e),XV(e),ZV(e),_V(e),qV(),$V(),eH(),tH(e),nH(e),rH(),oH())}const Uc=({themeOverrides:e,children:t})=>{const{themeDirection:n,mode:r,presetColor:o,fontFamily:s}=wn(),l=w.useMemo(()=>cV(r,o),[r,o]),u=w.useMemo(()=>uV(s),[s]),A=w.useMemo(()=>L7(l),[l]),f=w.useMemo(()=>ge.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=fA(f),C=ge.cloneDeep(p.components??{});return p.components=ge.merge(iH(p),C),g.jsx(b.StyledEngineProvider,{injectFirst:!0,children:g.jsxs(Xh,{theme:p,children:[g.jsx(b.CssBaseline,{}),t]})})};Uc.propTypes={children:c.node,themeOverrides:c.oneOfType([c.object,c.func])};const lb=({children:e,theme:t,...n})=>g.jsx(S.CoreAdminContext,{...n,children:g.jsx(Uc,{themeOverrides:t,children:g.jsx(cf,{children:e})})});lb.displayName="ApplicaAdminContext";const is=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:l,history:u,i18nProvider:A,layout:f,loading:p,loginPage:C,authCallbackPage:h,menu:E,notification:m,queryClient:B,requireAuth:v,store:j,ready:R,theme:x,title:O="React Admin"}=e;return g.jsx(lb,{authProvider:t,dataProvider:s,i18nProvider:A,store:j,history:u,queryClient:B,theme:x,children:g.jsx(S.AdminUI,{layout:f,dashboard:o,disableTelemetry:l,menu:E,catchAll:n,title:O,loading:p,loginPage:C,authCallbackPage:h,notification:m,requireAuth:v,ready:R,children:r})})};is.defaultProps={store:S.localStorageStore(),title:"Applica Admin"},is.propTypes={...S.AdminUI.propTypes};class sH{constructor(t){gi(this,Ia,void 0);gi(this,ma,void 0);gi(this,ss,new Set);const{apiUrl:n}=t??{};if(!ge.isString(n)||ge.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");vs(this,ma,n),vs(this,Ia,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var u;const{message:n,filename:r,lineno:o,colno:s}=t,l=`${n}${r}${o}${s}`;hr(this,ss).has(l)||(hr(this,ss).add(l),fetch(`${hr(this,ma)}/ui/error-log`,{method:"PUT",headers:hr(this,Ia),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(u=t.error)==null?void 0:u.stack})}).catch(()=>{console.log("Unable to send error to server"),hr(this,ss).delete(l)}))}}Ia=new WeakMap,ma=new WeakMap,ss=new WeakMap;class cb{constructor({catch:t,display:n,log:r,error:o}){Wa(this,"catch");Wa(this,"display");Wa(this,"log");Wa(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const aH=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new cb({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=k.useMemo(()=>o.errorHandler?o.errorHandler:new sH({apiUrl:t}),[t,o.errorHandler]),l=console.error,u=k.useCallback(function(A,...f){var C;if(!A)return!1;const p=r(A instanceof ErrorEvent?A:(C=A==null?void 0:A.toString())==null?void 0:C.replace(/%s/g,()=>f.shift()));if(p.isCatched())return!1;p.logError()&&(A instanceof ErrorEvent?s.handle(A):s.handle(new ErrorEvent("window.onerror",{error:A,message:A.toString()}))),p.displayError()&&l.apply(console,arguments)},[t,n,r,e,s]);return k.useEffect(()=>(window.removeEventListener("error",u),window.addEventListener("error",u),console.error=u,()=>{window.removeEventListener("error",u),console.error=l}),[u]),!0};class lH{constructor(t){gi(this,Ba,void 0);gi(this,va,void 0);gi(this,$o,[]);const{apiUrl:n}=t??{};if(!ge.isString(n)||ge.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");vs(this,va,n),vs(this,Ba,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ge.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ge.isString(n)||ge.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ge.isString(r)||ge.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ge.some(hr(this,$o),o=>ge.isEqual(o,{code:n,lang:r}))){hr(this,$o).push({code:n,lang:r}),fetch(`${hr(this,va)}/i18n/message`,{method:"put",headers:hr(this,Ba),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),vs(this,$o,ge.reject(hr(this,$o),s=>ge.isEqual(s,{code:n,lang:r})))});return}}}Ba=new WeakMap,va=new WeakMap,$o=new WeakMap;function ub(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],l=new Headers({Accept:"application/json","Content-Type":"application/json"}),u=new lH({apiUrl:t}),A=()=>fetch(`${t}/i18n/languages`,{headers:l,method:"get"}).then(C=>C.json()).catch(()=>Promise.resolve(s)),f=()=>fetch(`${t}/i18n/messages`,{headers:l,method:"get"}).then(C=>C.json()).then(C=>C.reduce((h,E)=>({...h,[E.lang]:{...h[E.lang]||{},[E.code]:E.text}}),{})),p=(C,h,E)=>(r||console.error(`Warning: Missing translation for key: "${C}"`),o&&(ge.isString(C)?C.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${C}`):u.handleMessage({code:C,lang:E}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),C);return Promise.all([A(),f()]).then(C=>{const[h,E]=C;function m(B){return ge.get(E,B,{})}return Nx(m,n,h,{allowMissing:r||o,onMissingKey:p})})}window.React=w;const cH=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,o]=w.useState({loading:!0,languages:null});return w.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=>o({loading:!1,...n(l)}))},[e,t,n]),r};function Ab(e){const[t,n]=w.useState(),r=AC(e);return w.useEffect(()=>{ub(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const uH=new Hu.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Tf=({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r,development:o,logoMain:s,logoIcon:l,loginPage:u,menu:A,name:f,copy:p,version:C,dataProvider:h,authProvider:E,errorHandler:m,error:B,notification:v,enableNotification:j,enableRegistration:R,enablePasswordRecover:x,...O})=>{aH({apiUrl:n,errorHandler:m,catcherFn:X=>{const Z=X==null?void 0:X.toString(),$=["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>.","Missing translation for key:","HttpError: "].some(se=>Z==null?void 0:Z.includes(se));return new cb({catch:$,display:!$,log:!$,error:Z})}});const P=w.useMemo(()=>w.isValidElement(u)?w.cloneElement(u,{name:f,copy:p,version:C,enableRegistration:R,enablePasswordRecover:x}):u,[u,f,C,p,R,x]),N=w.useMemo(()=>X=>{const Z=f?g.jsx(kc,{title:f}):s,Y=f?g.jsx(uf,{title:f}):l;return g.jsx(by,{...X,name:f,copy:p,version:C,logoMain:Z,logoIcon:Y,notification:v,enableNotification:j,error:B})},[s,l,f,C,B,v,j]),F=Ab({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return F===void 0?g.jsx(g.Fragment,{}):F.error?g.jsx(fl,{initialConfig:t,children:g.jsx(Uc,{themeOverrides:e,children:g.jsx(Xy,{})})}):g.jsx(IA,{children:g.jsx(vA,{menu:A,children:g.jsx(fl,{initialConfig:t,children:g.jsx(is,{theme:e,layout:N,notification:My,queryClient:uH,dataProvider:h,authProvider:E,i18nProvider:F,loginPage:P,...O})})})})};Tf.defaultProps={...is.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:g.jsx(Nc,{version:"0.0.0",name:"Applica",redirectTo:"/"})},Tf.propTypes={...is.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(wi),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(M,"ArrayInputContext",{enumerable:!0,get:()=>S.ArrayInputContext}),Object.defineProperty(M,"BooleanField",{enumerable:!0,get:()=>S.BooleanField}),Object.defineProperty(M,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>S.BulkDeleteWithConfirmButton}),Object.defineProperty(M,"Button",{enumerable:!0,get:()=>S.Button}),Object.defineProperty(M,"ChipField",{enumerable:!0,get:()=>S.ChipField}),Object.defineProperty(M,"Confirm",{enumerable:!0,get:()=>S.Confirm}),Object.defineProperty(M,"CreateButton",{enumerable:!0,get:()=>S.CreateButton}),Object.defineProperty(M,"CreateContextProvider",{enumerable:!0,get:()=>S.CreateContextProvider}),Object.defineProperty(M,"CustomRoutes",{enumerable:!0,get:()=>S.CustomRoutes}),Object.defineProperty(M,"DeleteWithConfirmButton",{enumerable:!0,get:()=>S.DeleteWithConfirmButton}),Object.defineProperty(M,"DeleteWithUndoButton",{enumerable:!0,get:()=>S.DeleteWithUndoButton}),Object.defineProperty(M,"EditButton",{enumerable:!0,get:()=>S.EditButton}),Object.defineProperty(M,"EditContextProvider",{enumerable:!0,get:()=>S.EditContextProvider}),Object.defineProperty(M,"FieldTitle",{enumerable:!0,get:()=>S.FieldTitle}),Object.defineProperty(M,"Form",{enumerable:!0,get:()=>S.Form}),Object.defineProperty(M,"FormDataConsumer",{enumerable:!0,get:()=>S.FormDataConsumer}),Object.defineProperty(M,"HttpError",{enumerable:!0,get:()=>S.HttpError}),Object.defineProperty(M,"I18nContextProvider",{enumerable:!0,get:()=>S.I18nContextProvider}),Object.defineProperty(M,"ListToolbar",{enumerable:!0,get:()=>S.ListToolbar}),Object.defineProperty(M,"LoadingIndicator",{enumerable:!0,get:()=>S.LoadingIndicator}),Object.defineProperty(M,"Pagination",{enumerable:!0,get:()=>S.Pagination}),Object.defineProperty(M,"RaSimpleFormIterator",{enumerable:!0,get:()=>S.SimpleFormIterator}),Object.defineProperty(M,"RecordContextProvider",{enumerable:!0,get:()=>S.RecordContextProvider}),Object.defineProperty(M,"ReferenceArrayField",{enumerable:!0,get:()=>S.ReferenceArrayField}),Object.defineProperty(M,"ReferenceField",{enumerable:!0,get:()=>S.ReferenceField}),Object.defineProperty(M,"Resource",{enumerable:!0,get:()=>S.Resource}),Object.defineProperty(M,"ResourceContextProvider",{enumerable:!0,get:()=>S.ResourceContextProvider}),Object.defineProperty(M,"SaveButton",{enumerable:!0,get:()=>S.SaveButton}),Object.defineProperty(M,"SimpleFormIteratorContext",{enumerable:!0,get:()=>S.SimpleFormIteratorContext}),Object.defineProperty(M,"SimpleList",{enumerable:!0,get:()=>S.SimpleList}),Object.defineProperty(M,"SimpleShowLayout",{enumerable:!0,get:()=>S.SimpleShowLayout}),Object.defineProperty(M,"SingleFieldList",{enumerable:!0,get:()=>S.SingleFieldList}),Object.defineProperty(M,"TopToolbar",{enumerable:!0,get:()=>S.TopToolbar}),Object.defineProperty(M,"UrlField",{enumerable:!0,get:()=>S.UrlField}),Object.defineProperty(M,"choices",{enumerable:!0,get:()=>S.choices}),Object.defineProperty(M,"email",{enumerable:!0,get:()=>S.email}),Object.defineProperty(M,"maxLength",{enumerable:!0,get:()=>S.maxLength}),Object.defineProperty(M,"maxValue",{enumerable:!0,get:()=>S.maxValue}),Object.defineProperty(M,"minLength",{enumerable:!0,get:()=>S.minLength}),Object.defineProperty(M,"minValue",{enumerable:!0,get:()=>S.minValue}),Object.defineProperty(M,"number",{enumerable:!0,get:()=>S.number}),Object.defineProperty(M,"regex",{enumerable:!0,get:()=>S.regex}),Object.defineProperty(M,"required",{enumerable:!0,get:()=>S.required}),Object.defineProperty(M,"useArrayInput",{enumerable:!0,get:()=>S.useArrayInput}),Object.defineProperty(M,"useAuthProvider",{enumerable:!0,get:()=>S.useAuthProvider}),Object.defineProperty(M,"useChoices",{enumerable:!0,get:()=>S.useChoices}),Object.defineProperty(M,"useChoicesContext",{enumerable:!0,get:()=>S.useChoicesContext}),Object.defineProperty(M,"useCreateController",{enumerable:!0,get:()=>S.useCreateController}),Object.defineProperty(M,"useDataProvider",{enumerable:!0,get:()=>S.useDataProvider}),Object.defineProperty(M,"useEditContext",{enumerable:!0,get:()=>S.useEditContext}),Object.defineProperty(M,"useGetIdentity",{enumerable:!0,get:()=>S.useGetIdentity}),Object.defineProperty(M,"useGetList",{enumerable:!0,get:()=>S.useGetList}),Object.defineProperty(M,"useGetMany",{enumerable:!0,get:()=>S.useGetMany}),Object.defineProperty(M,"useGetManyReference",{enumerable:!0,get:()=>S.useGetManyReference}),Object.defineProperty(M,"useGetOne",{enumerable:!0,get:()=>S.useGetOne}),Object.defineProperty(M,"useInput",{enumerable:!0,get:()=>S.useInput}),Object.defineProperty(M,"useListContext",{enumerable:!0,get:()=>S.useListContext}),Object.defineProperty(M,"useLocaleState",{enumerable:!0,get:()=>S.useLocaleState}),Object.defineProperty(M,"useNotify",{enumerable:!0,get:()=>S.useNotify}),Object.defineProperty(M,"usePermissions",{enumerable:!0,get:()=>S.usePermissions}),Object.defineProperty(M,"useRecordContext",{enumerable:!0,get:()=>S.useRecordContext}),Object.defineProperty(M,"useRefresh",{enumerable:!0,get:()=>S.useRefresh}),Object.defineProperty(M,"useResourceContext",{enumerable:!0,get:()=>S.useResourceContext}),Object.defineProperty(M,"useResourceDefinition",{enumerable:!0,get:()=>S.useResourceDefinition}),Object.defineProperty(M,"useResourceDefinitions",{enumerable:!0,get:()=>S.useResourceDefinitions}),Object.defineProperty(M,"useShowContext",{enumerable:!0,get:()=>S.useShowContext}),Object.defineProperty(M,"useShowController",{enumerable:!0,get:()=>S.useShowController}),Object.defineProperty(M,"useSimpleFormIterator",{enumerable:!0,get:()=>S.useSimpleFormIterator}),Object.defineProperty(M,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>S.useSimpleFormIteratorItem}),Object.defineProperty(M,"useTranslate",{enumerable:!0,get:()=>S.useTranslate}),Object.defineProperty(M,"useTranslateLabel",{enumerable:!0,get:()=>S.useTranslateLabel}),Object.defineProperty(M,"useUnselect",{enumerable:!0,get:()=>S.useUnselect}),Object.defineProperty(M,"useUnselectAll",{enumerable:!0,get:()=>S.useUnselectAll}),Object.defineProperty(M,"useUpdateMany",{enumerable:!0,get:()=>S.useUpdateMany}),M.ActionsField=Vd,M.ActionsMenu=Ro,M.ActivatePage=Gy,M.Admin=is,M.AnimateButton=VI,M.AppConfigContext=EA,M.AppConfigProvider=IA,M.ApplicaAdmin=Tf,M.ArrayInput=D3,M.AttachmentField=Hd,M.AttachmentInput=Jd,M.AutocompleteArrayInput=Xd,M.AutocompleteInput=Zd,M.Avatar=Gs,M.BooleanInput=_d,M.Breadcrumbs=Hl,M.BulkActionsToolbar=pf,M.BulkFloatingActionsToolbar=Wy,M.CardForm=Yl,M.ChangePasswordForm=lg,M.CircularWithLabel=hm,M.CircularWithPath=Cm,M.CoverField=Jl,M.Create=S3,M.CreateInDialogButton=gf,M.Datagrid=b7,M.DateAgoField=Xl,M.DateField=zd,M.DateInput=qd,M.DateTimeInput=$d,M.Dot=zl,M.Drawer=Ey,M.DrawerHeader=ev,M.DrawerHeaderStyled=Jg,M.DrawerToggle=P0,M.Edit=lM,M.EditInDialogButton=ff,M.EmailField=Wd,M.Empty=Ny,M.FileField=Ud,M.FileInput=eg,M.Footer=$s,M.FormHeader=cg,M.FunctionField=xm,M.GenericErrorPage=Xy,M.Header=S0,M.HeaderButton=RT,M.HeaderIconButton=w3,M.HeaderNotification=O0,M.HeaderProfile=j0,M.HeaderSpacer=R0,M.HeaderToggleButton=Js,M.HorizontalBar=Iy,M.IconButton=Fi,M.ImageField=Xs,M.ImageInput=tg,M.ImpersonateUserButton=Dy,M.LabeledArrayInput=Kl,M.LabeledInput=nt,M.Layout=by,M.LayoutContent=GB,M.LayoutProvider=x0,M.LayoutWrapper=KB,M.LinearWithIcon=Em,M.LinearWithLabel=Im,M.List=Hy,M.ListItem=If,M.Loadable=A7,M.Loader=jy,M.LoadingButton=Fd,M.LocalizedTextField=H3,M.LocalizedTextInput=eM,M.LoginPage=Nc,M.Logo=Xg,M.LongForm=kt,M.MainCard=Wn,M.MainIcon=kc,M.MenuConfigContext=BA,M.MenuConfigProvider=vA,M.MenuPopover=Al,M.MenuPropTypes=wi,M.NavMenu=my,M.Navigation=yy,M.Notification=My,M.NotificationList=S7,M.NumberInput=ng,M.ReadonlyField=Gd,M.RecordInput=Sm,M.RecoverPage=Ky,M.ReferenceArrayInput=rg,M.ReferenceInput=og,M.ReferenceManyField=Li,M.ReferenceManyInput=ig,M.RegisterPage=Jy,M.ResponsiveSection=M0,M.ScrollTop=cf,M.ScrollX=d7,M.SearchInput=rM,M.SelectArrayInput=sg,M.SelectInput=jm,M.Show=QM,M.SimpleBar=sf,M.SimpleForm=Gl,M.SimpleFormIterator=xM,M.SizeField=Pm,M.SmallIcon=uf,M.SmartTextInput=_l,M.TabbedForm=pg,M.TableFormIterator=e5,M.TableFormIteratorContext=yA,M.TableFormIteratorItemContext=bA,M.TextField=Zl,M.TextInput=Pn,M.ThemeConfigContext=mA,M.ThemeConfigProvider=fl,M.ThemeProvider=Uc,M.TimeInput=ag,M.Toolbar=lr,M.Tooltip=Ld,M.Transitions=Ao,M.createI18nProvider=ub,M.getLocalizedValue=TA,M.localizedValueHasAllLocales=wA,M.parseTime=cC,M.useAppConfig=Do,M.useBreadcrumbs=aC,M.useGetLocalizedValue=OT,M.useI18nLanguages=cH,M.useI18nProvider=Ab,M.useLayoutContext=mg,M.useLayoutDispatch=r5,M.useLayoutDrawerState=Yo,M.useLayoutLogoState=T0,M.useLayoutMediaState=Yn,M.useLayoutNotificationsState=lc,M.useLayoutState=zi,M.useLayoutThemeState=o5,M.useLocalStorage=PA,M.useLocalizedValue=ST,M.useMemoizedObject=AC,M.useMenu=xA,M.useMenuConfig=no,M.usePopoverState=pl,M.useRefDimensions=jT,M.useResourceDefaultValues=P3,M.useResourceTitle=SA,M.useSx=Ir,M.useTableFormIterator=dC,M.useTableFormIteratorItem=MT,M.useThemeConfig=wn,M.uuid=PT,M.withLayoutProvider=w0,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
281
|
+
`),n7)),Oy=k.forwardRef(function(t,n){const r=zt({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:l,valueBuffer:u,variant:A="indeterminate"}=r,f=Ue(r,e7),p=W({},r,{color:s,variant:A}),C=o7(p),h=Pt(),E={},m={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(l!==void 0){E["aria-valuenow"]=Math.round(l),E["aria-valuemin"]=0,E["aria-valuemax"]=100;let B=l-100;h.direction==="rtl"&&(B=-B),m.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),m.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(i7,W({className:Ye(C.root,o),ownerState:p,role:"progressbar"},E,{ref:n},f,{children:[A==="buffer"?g.jsx(s7,{className:C.dashed,ownerState:p}):null,g.jsx(a7,{className:C.bar1,ownerState:p,style:m.bar1}),A==="determinate"?null:g.jsx(l7,{className:C.bar2,ownerState:p,style:m.bar2})]}))});process.env.NODE_ENV!=="production"&&(Oy.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 c7=Oy,u7=Ae("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),jy=()=>g.jsx(u7,{children:g.jsx(c7,{color:"primary"})}),A7=e=>t=>g.jsx(w.Suspense,{fallback:g.jsx(jy,{}),children:g.jsx(e,{...t})}),kc=({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})]});kc.propTypes={title:c.string.isRequired};const My=Ae(S.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),cf=({children:e})=>{const t=mt.useLocation(),{pathname:n}=t;return w.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};cf.propTypes={children:c.node};const d7=Ae("div")({width:"100%",overflowX:"auto",display:"block"}),uf=({title:e})=>g.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});uf.propTypes={title:c.string.isRequired};const Af=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},g7=(e,t)=>e&&e.data?{data:Af(e.data,t),total:e.total+1}:e,f7=(e,t)=>e&&e.length>0?Af(e,t):e,p7=(e,t)=>e&&e.data?{...e,data:Af(e.data,t),total:e.total+1}:e,df=({onClose:e,record:t,children:n,redirect:r,onSubmit:o,onSuccess:s,onError:l})=>{const u=Hu.useQueryClient(),A=S.useResourceContext(),f=S.useRedirect(),p=S.useNotify(),C=w.useCallback(B=>{const j=Date.now();u.setQueryData([A,"getOne",{id:B.id}],B),u.setQueriesData([A,"getList"],R=>p7(R,B),{updatedAt:j}),u.setQueriesData([A,"getMany"],R=>f7(R,B),{updatedAt:j}),u.setQueriesData([A,"getManyReference"],R=>g7(R,B),{updatedAt:j}),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,...E}=S.useCreateController({mutationOptions:{onSuccess:C,onError:l}}),m=w.useCallback(B=>{o?o(B,e):h&&h(B)},[o,h,e]);return g.jsx(S.CreateContextProvider,{value:{record:t,save:m,saving:E==null?void 0:E.saving,redirect:r},children:w.cloneElement(n,{...n.props,toolbar:g.jsxs(lr,{children:[g.jsx(S.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:E==null?void 0:E.saving}),g.jsx(S.SaveButton,{disabled:E==null?void 0:E.saving})]})})})};df.propTypes={children:c.node,onClose:c.func,record:c.object,redirect:c.oneOf(["list","edit","show",!1])},df.defaultProps={redirect:!1};const h7={true:{_scrollToTop:!0},false:{}},C7=Ae(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${S.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),gf=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:o,scrollToTop:s,className:l,sx:u,onSubmit:A,onSuccess:f,onError:p,...C})=>{const[h,E]=w.useState(!1),m=S.useTranslate(),B=S.useResourceContext(),{openDialog:v,closeDialog:j}=Do(),R=w.useCallback(()=>v(B,()=>E(!0)),[v,B]),x=w.useCallback(()=>j(B,()=>E(!1)),[j,B]),O=b.useMediaQuery(P=>P.breakpoints.down("md"));return g.jsxs(g.Fragment,{children:[O?g.jsx(C7,{...C,state:h7[String(s)],color:"primary",className:Ye(S.CreateButtonClasses.floating,l),"aria-label":n&&m(n),onClick:R,children:g.jsx(fn.Add,{})}):g.jsx(S.Button,{...C,sx:u,label:n,onClick:R,children:g.jsx(fn.Add,{})}),g.jsx(b.Dialog,{open:h,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:g.jsx(df,{...C,redirect:o,record:r,onClose:x,onSubmit:A,onSuccess:f,onError:p})})]})};gf.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},gf.propTypes={...S.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 Ry=({onClose:e,children:t})=>{const n=S.useNotify(),r=S.useRecordContext(),o=S.useResourceContext(),{id:s}=r,{isLoading:l,data:u}=S.useGetOne(o,{id:s}),A=w.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:f,saving:p}=S.useEditController({resource:o,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return g.jsx(S.EditContextProvider,{value:{record:u,isLoading:l,save:f,saving:p},children:w.cloneElement(t,{toolbar:g.jsxs(lr,{children:[g.jsx(S.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),g.jsx(S.SaveButton,{})]})})})};Ry.propTypes={children:c.node,onClose:c.func};const ff=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[o,s]=w.useState(!1),{openDialog:l,closeDialog:u}=Do(),A=S.useResourceContext(),f=w.useCallback(()=>l(A,()=>s(!0)),[l,A]),p=w.useCallback(()=>u(A,()=>s(!1)),[u,A]);return g.jsxs(g.Fragment,{children:[g.jsx(S.Button,{label:n,onClick:f,children:g.jsx(fn.Edit,{})}),g.jsx(b.Dialog,{open:o,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:g.jsx(Ry,{...r,onClose:p})})]})};ff.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},ff.propTypes={fullWidth:c.bool,maxWidth:c.oneOf(["xs","sm","md","lg","xl",!1]),label:c.string};const Dy=({label:e="ra.auth.sign_in",...t})=>{const n=S.useRecordContext(),[r,o]=w.useState(!1),s=S.useAuthProvider(),l=w.useCallback(u=>{u.stopPropagation(),u.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return g.jsx(S.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:l,...t,children:g.jsx(fn.VpnKey,{})})};Dy.propTypes={label:c.string};const ky=w.createContext({});ky.displayName="DatagridContext";const E7=({children:e,value:t})=>g.jsx(ky.Provider,{value:t,children:e}),pf=e=>{const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:l,selectedIds:u=[],onUnselectItems:A}=de.useListContext(e),f=de.useTranslate(),p=w.useCallback(()=>{A()},[A]);return g.jsx(I7,{className:r,children:g.jsxs(uF,{"data-test":"bulk-actions-toolbar",className:Ye(cr.toolbar,{[cr.collapsed]:u.length===0}),...de.sanitizeListRestProps(o),children:[g.jsxs("div",{className:cr.title,children:[g.jsx(Rd,{className:cr.icon,"aria-label":f("ra.action.unselect"),title:f("ra.action.unselect"),onClick:p,size:"small",children:g.jsx(wc,{fontSize:"small"})}),g.jsx(JI,{color:"inherit",variant:"subtitle1",children:f(t,{_:t,smart_count:u.length})})]}),g.jsx(S.TopToolbar,{className:cr.topToolbar,children:w.Children.map(n,C=>w.isValidElement(C)?w.cloneElement(C,{filterValues:s,resource:l,selectedIds:u}):null)})]})})};pf.propTypes={children:c.node,label:c.string};const Xo="RaBulkActionsToolbar",cr={toolbar:`${Xo}-toolbar`,topToolbar:`${Xo}-topToolbar`,buttons:`${Xo}-buttons`,collapsed:`${Xo}-collapsed`,title:`${Xo}-title`,icon:`${Xo}-icon`},I7=Ae("div",{name:Xo,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${cr.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Bi(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${cr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${cr.buttons}`]:{},[`& .${cr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${cr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${cr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Fy=g.jsx(S.BulkDeleteButton,{}),hf=k.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?S.PureDatagridBody:S.DatagridBody,header:o=S.DatagridHeader,children:s,className:l,empty:u=v7,expand:A,bulkActionsToolbar:f=!1,bulkActionButtons:p=Fy,hover:C,isRowSelectable:h,isRowExpandable:E,resource:m,rowClick:B,rowSx:v,rowStyle:j,size:R="small",sx:x,expandSingle:O=!1,...P}=e,{sort:N,data:F,isLoading:X,onSelect:Z,onToggleItem:Y,selectedIds:$,setSort:ce,total:se}=de.useListContext(e),q=!!p,J=w.useMemo(()=>({isRowExpandable:E,expandSingle:O}),[E,O]),H=w.useRef(null);w.useEffect(()=>{(!$||$.length===0)&&(H.current=null)},[JSON.stringify($)]);const K=w.useCallback((L,ee)=>{const z=F.map(fe=>fe.id),_=z.indexOf(H.current);if(H.current=ee.target.checked?L:null,ee.shiftKey&&_!==-1){const fe=z.indexOf(L),he=z.slice(Math.min(_,fe),Math.max(_,fe)+1),ue=ee.target.checked?lL($,he):yL($,he);Z(h?ue.filter(pe=>h(F.find(Ce=>Ce.id===pe))):ue)}else Y(L)},[F,h,Z,Y,$]);return X===!0?g.jsx(S.DatagridLoading,{className:l,expand:A,hasBulkActions:q,nbChildren:k.Children.count(s),size:R}):F==null||F.length===0||se===0?u||null:g.jsx(E7,{value:J,children:g.jsxs(S.DatagridRoot,{sx:x,className:Ye(S.DatagridClasses.root,l),children:[f!=null&&w.isValidElement(f)?w.cloneElement(f,{selectedIds:$,total:se}):p!==!1?g.jsx(pf,{children:w.isValidElement(p)?p:Fy}):null,g.jsx("div",{className:S.DatagridClasses.tableWrapper,children:g.jsxs(b.Table,{ref:t,className:S.DatagridClasses.table,size:R,...B7(P),children:[Ly(o,{children:s,sort:N,data:F,hasExpand:!!A,hasBulkActions:q,isRowSelectable:h,onSelect:Z,resource:m,selectedIds:$,setSort:ce},s),Ly(r,{expand:A,rowClick:B,data:F,hasBulkActions:q,hover:C,onToggleItem:K,resource:m,rowSx:v,rowStyle:j,selectedIds:$,isRowSelectable:h},s)]})})]})})}),Ly=(e,t,n)=>w.isValidElement(e)?w.cloneElement(e,t,n):w.createElement(e,t,n);hf.propTypes={body:c.oneOfType([c.element,c.elementType]),bulkActionButtons:c.oneOfType([c.bool,c.element]),children:c.node.isRequired,className:c.string,sort:c.exact({field:c.string,order:c.oneOf(["ASC","DESC"])}),data:c.arrayOf(c.any),empty:c.element,expand:c.oneOfType([c.element,c.elementType]),header:c.oneOfType([c.element,c.elementType]),hover:c.bool,isLoading:c.bool,onSelect:c.func,onToggleItem:c.func,resource:c.string,rowClick:c.oneOfType([c.string,c.func,c.bool]),rowSx:c.func,rowStyle:c.func,selectedIds:c.arrayOf(c.any),setSort:c.func,total:c.number,isRowSelectable:c.func,isRowExpandable:c.func,expandSingle:c.bool};const m7=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],B7=e=>Object.keys(de.sanitizeListRestProps(e)).filter(t=>!m7.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});hf.displayName="Datagrid";const v7=g.jsx(S.ListNoResults,{}),y7=Ae(hf,{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"}})),b7=e=>g.jsx(y7,{...e}),Q7=Ae("div")(({theme:e})=>({padding:e.spacing(2)})),Ny=({actions:e,className:t,...n})=>{const{hasCreate:r}=de.useResourceDefinition(n),o=de.useResourceContext(n),s=de.useTranslate(),l=de.useGetResourceLabel(),u=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:l(o,0)}),A=s("ra.page.empty",{name:u}),f=s("ra.page.invite");return g.jsxs(x7,{className:t,children:[g.jsxs("div",{className:$i.message,children:[g.jsx(fn.Inbox,{className:$i.icon}),g.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:A})}),r&&g.jsx(b.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:f})})]}),g.jsx(Q7,{className:$i.toolbar,children:e})]})},Fc="ApplicaEmpty",$i={message:`${Fc}-message`,icon:`${Fc}-icon`,toolbar:`${Fc}-toolbar`},x7=Ae("span",{name:Fc,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${$i.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${$i.icon}`]:{width:"9em",height:"9em"},[`& .${$i.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));Ny.propTypes={actions:c.element,className:c.string};const w7=()=>{const e=S.useRefresh(),t=S.useNotify(),n=S.useUnselectAll(),r=S.useResourceContext(),{selectedIds:o,data:s}=S.useListContext(),l=S.useRecordContext(),u=o.map(C=>s.find(h=>h.id===C)),[A,{isLoading:f}]=S.useUpdateMany(r,{ids:o.length>0?o:[l==null?void 0:l.id],data:{readed:Mr().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=w.useCallback(()=>{A()},[A]);return g.jsx(S.Button,{label:"ra.notification.mark_as_readed",disabled:f||(l==null?void 0:l.readed)!==null,onClick:p,children:g.jsx(fn.Email,{})})},T7=()=>{const e=S.useRefresh(),t=S.useNotify(),n=S.useUnselectAll(),{selectedIds:r,data:o}=S.useListContext(),s=S.useRecordContext(),l=S.useResourceContext(),u=r.map(C=>o.find(h=>h.id===C)).concat([s]),[A,{isLoading:f}]=S.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=w.useCallback(()=>{A()},[A]);return g.jsx(S.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:f||s&&!(s!=null&&s.readed),onClick:p,children:g.jsx(fn.Drafts,{})})},P7=e=>{const t=S.useRecordContext(e),n=S.useResourceContext(e),r=S.useRedirect(),o=S.useNotify(),s=S.useTranslate(),[l]=S.useLocaleState(),u=w.useMemo(()=>t!=null&&t.readed?Mr(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]=S.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Mr().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:()=>{o("ra.notification.readed_error","warning")}}),f=w.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})})]})},S7=({...e})=>{const t=b.useTheme(),{mode:n,colorize:r,density:o}=w.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=w.useCallback(l=>({backgroundColor:l!=null&&l.readed?r(t.palette.primary[n],o):r(t.palette.secondary[n],o)}),[t,n,r,o]);return g.jsxs(S.Datagrid,{...e,rowStyle:s,children:[g.jsx(P7,{source:"notification",sortable:!1,label:"ra.notification"}),g.jsx(Xl,{source:"created",label:"ra.notification.created"}),g.jsxs(Ro,{children:[g.jsx(w7,{}),g.jsx(T7,{})]})]})},O7=g.jsx(S.ListActions,{}),j7=g.jsx(S.Pagination,{}),M7=g.jsx(S.Empty,{}),R7=jL,Vy=e=>{const{actions:t=O7,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:l,pagination:u=j7,children:A,className:f,component:p=R7,title:C,empty:h=M7,...E}=e,{defaultTitle:m,data:B,error:v,isLoading:j,filterValues:R,resource:x}=de.useListContext(e);if(!A||!B&&j&&s)return null;const O=()=>g.jsxs("div",{className:mo.main,children:[(r||t)&&g.jsx(S.ListToolbar,{className:mo.actions,filters:r,actions:t,hasCreate:l}),!v&&g.jsx(p,{className:mo.content,children:o&&A&&k.isValidElement(A)?w.cloneElement(A,{bulkActionButtons:o}):A}),v?g.jsx(Kg,{error:v,resetErrorBoundary:null}):u!==!1&&u]}),P=()=>h!==!1&&w.cloneElement(h,{className:mo.noResults,hasCreate:l}),N=!j&&(B==null?void 0:B.length)===0&&!Object.keys(R).length&&h!==!1;return g.jsxs(D7,{className:Ye("list-page",f),...E,children:[g.jsx(S.Title,{title:C,defaultTitle:m,preferenceKey:`${x}.list.title`}),N?P():O(),n]})};Vy.propTypes={actions:c.oneOfType([c.bool,c.element]),aside:c.element,children:c.node,className:c.string,component:de.ComponentPropType,emptyWhileLoading:c.bool,filters:c.oneOfType([c.element,c.arrayOf(c.element)]),hasCreate:c.bool,pagination:c.oneOfType([c.element,c.bool]),title:S.TitlePropType};const ha="RaList",mo={main:`${ha}-main`,content:`${ha}-content`,actions:`${ha}-actions`,noResults:`${ha}-noResults`},D7=Ae("div",{name:ha,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${mo.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${mo.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${mo.actions}`]:{},[`& .${mo.noResults}`]:{}})),Cf=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=k7,filterDefaultValues:s,perPage:l=10,queryOptions:u,resource:A,sort:f,storeKey:p,...C})=>g.jsx(de.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:l,queryOptions:u,resource:A,sort:f,storeKey:p,children:g.jsx(Vy,{...C})});Cf.propTypes={actions:c.oneOfType([c.bool,c.element]),aside:c.element,children:c.node.isRequired,className:c.string,emptyWhileLoading:c.bool,filter:c.object,filterDefaultValues:c.object,filters:c.oneOfType([c.element,c.arrayOf(c.element)]),pagination:c.oneOfType([c.element,c.bool]),perPage:c.number,sort:c.shape({field:c.string,order:c.oneOf(["ASC","DESC"])}),sx:c.any,title:S.TitlePropType,disableSyncWithLocation:c.bool,hasCreate:c.bool,resource:c.string};const k7={},F7=Ts(Cf,{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":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}})),Hy=e=>g.jsx(Wn,{content:!1,children:g.jsx(F7,{...e})});Hy.propTypes={...Cf.propTypes};const Ef={p:0,m:0},zy={p:2,m:0,borderRadius:0,width:"100%"},Wy=e=>{const{children:t}=e,[n,r]=k.useState(null),o=m=>{r(m.currentTarget)},s=()=>{r(null)},l=b.useMediaQuery(m=>m.breakpoints.down("md")),u=!!n,A=u?"simple-popover":void 0,{filterValues:f,resource:p,selectedIds:C=[],onUnselectItems:h}=S.useListContext(e),E=k.useCallback(()=>{h(),r(null)},[h,r]);return g.jsx(b.Fade,{in:C!==void 0&&C.length>0,children:g.jsxs(b.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[g.jsx(b.Fab,{color:"primary","aria-label":"manage",onClick:o,children:C==null?void 0:C.length}),g.jsx(b.Popover,{id:A,open:u,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:l?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:l?"center":"right"},disableScrollLock:!0,elevation:10,children:g.jsxs(b.List,{sx:Ef,children:[g.jsx(b.ListItem,{sx:Ef,children:g.jsx(S.Button,{onClick:E,sx:zy,label:"ra.action.unselect",startIcon:g.jsx(wc,{}),children:g.jsx(wc,{})})}),k.Children.map(t,m=>{var B;return g.jsx(b.ListItem,{sx:Ef,children:k.isValidElement(m)?k.cloneElement(m,{filterValues:f,resource:p,selectedIds:C,sx:zy,...(B=m.props)!=null&&B.popover?{closePopover:s}:{}}):null})})]})})]})})};Wy.propTypes={children:c.node};const Lc={width:"1.5rem",alignSelf:"center"},If=({source:e,label:t,variant:n,record:r,spaceBottom:o,spaceTop:s,component:l,leftIcon:u,rightIcon:A,button:f,buttonProps:p,...C})=>{const{getCurrentDialog:h}=Do(),E=de.useResourceContext(C),m=h(),B=de.useRecordContext(),v=r||B,j=dt.get(v,e||"");return g.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:R=>({pt:1,pb:1,borderBottom:`1px solid ${R.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[g.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[u&&(w.isValidElement(u)?w.cloneElement(u,{style:Lc}):w.createElement(u,{style:Lc})),g.jsx(de.FieldTitle,{label:t,source:e,resource:m||E})]}),g.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[l?w.isValidElement(l)?w.cloneElement(l,{record:v,resource:E,value:j}):w.createElement(l,{source:e,record:v,resource:E,value:j}):g.jsx(b.Typography,{variant:n,children:j}),A&&(w.isValidElement(A)?w.cloneElement(A,{style:Lc}):w.createElement(A,{style:Lc})),f&&g.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:f})]})]})};If.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},If.defaultProps={variant:"body1"};const Uy=()=>{const e=Xt.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"})]})})},Yy=({children:e,...t})=>{const n=Pt();return g.jsx(Wn,{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})})};Yy.propTypes={children:c.node};const Ca=({version:e,name:t,copy:n,children:r,background:o=Uy})=>g.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[w.isValidElement(o)?o:w.createElement(o),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(kc,{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(Yy,{children:r})})}),g.jsx(b.Grid,{item:!0,sx:{pb:1},children:g.jsx($s,{name:t,copy:n,version:e})})]})]})]});Ca.propTypes={children:c.node,version:c.string,name:c.string,copy:c.string,background:c.oneOfType([c.node,c.func,c.object])};const Gy=({name:e,copy:t,version:n,background:r})=>{const o=de.useTranslate(),s=de.useAuthProvider(),l=de.useNotify(),u=mt.useNavigate(),{token:A}=mt.useParams();return w.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"}),ge.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),ge.delay(()=>u("/login"),1e3)})},[A]),g.jsx(Ca,{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:o("ra.auth.activate")}),g.jsx(b.Typography,{component:mt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:o("ra.auth.back_to_login")})]})}),g.jsx(b.Grid,{item:!0,xs:12,children:o("ra.auth.activate_pending")})]})})};Gy.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const Nc=({version:e,name:t,copy:n,enablePasswordRecover:r,enableRegistration:o,redirectTo:s,background:l})=>{const[u,A]=de.useSafeSetState(!1),f=de.useLogin(),p=de.useTranslate(),C=de.useNotify(),h=de.useCheckAuth(),E=mt.useNavigate();w.useEffect(()=>{h({},!1).then(()=>{E("/")}).catch(()=>{})},[h,E]);const m=B=>{A(!0),f(B,s).then(()=>{A(!1)}).catch(v=>{A(!1),C(typeof v=="string"?v:typeof v>"u"||!v.message?"ra.auth.sign_in_error":v.message,{type:"error",messageArgs:{_:typeof v=="string"?v:v&&v.message?v.message:void 0}})})};return g.jsx(Ca,{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"}),o&&g.jsx(b.Typography,{component:mt.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(de.Form,{onSubmit:m,children:[g.jsxs(b.Grid,{container:!0,children:[g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Pn,{autoFocus:!0,source:"username",label:p("ra.auth.username"),autoComplete:"username",validate:de.required(),placeholder:"user@company.name",fullWidth:!0})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:g.jsx(Pn,{source:"password",label:p("ra.auth.password"),type:"password",autoComplete:"current-password",validate:de.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:mt.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")})})]})})]})})};Nc.propTypes={version:c.string.isRequired,name:c.string.isRequired,enablePasswordRecover:c.bool,enableRegister:c.bool,background:c.element},Nc.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:g.jsx(Uy,{})};const Ky=({name:e,copy:t,version:n,background:r})=>{const[o,s]=w.useState(!1),l=de.useTranslate(),u=de.useRedirect(),A=de.useNotify(),f=de.useAuthProvider(),p=({email:C})=>{s(!0),f.recover(C).then(h=>{const E=`ra.auth.recover_${h.responseCode}`,m=h.responseCode==="ok"?"info":"error";A(E,{type:m}),u("/login")}).catch(h=>{A(h,{type:"error"})}).finally(()=>s(!1))};return g.jsx(Ca,{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:mt.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(S.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(Pn,{source:"email",validate:[de.required(),de.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:o,fullWidth:!0,children:o?g.jsx(b.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})};Ky.propTypes={name:c.string.isRequired,version:c.string.isRequired,background:c.node};const Jy=({name:e,copy:t,version:n})=>{const[r,o]=w.useState(!1),s=de.useTranslate(),l=de.useRedirect(),u=de.useNotify(),A=de.useAuthProvider(),f=p=>{o(!0),A.register(p).then(C=>{const h=`ra.auth.register_${C.responseCode}`,E=C.responseCode==="ok"?"info":"error";u(h,{type:E}),l("/login")}).catch(C=>{u(C,{type:"error"})}).finally(()=>o(!1))};return g.jsx(Ca,{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:mt.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(S.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(Pn,{source:"name",label:s("ra.register.name"),validate:de.required()})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Pn,{source:"email",type:"email",validate:[de.required(),de.email()]})}),g.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:g.jsx(Pn,{source:"password",type:"password",validate:de.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")})})]})})]})})};Jy.propTypes={name:c.string.isRequired,version:c.string.isRequired};function Xy(){const e=w.useCallback(()=>location.reload(),[]);return g.jsx(b.Container,{children:g.jsxs(b.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[g.jsx("img",{src:YB,style:{width:"100%",maxWidth:450}}),g.jsx(b.Typography,{variant:"h2",children:"Ops! An error occurred..."}),g.jsx(b.Typography,{children:"We're fixing the problem. Please try again later."}),g.jsx(b.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}const L7=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 ${He(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${He(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${He(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${He(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${He(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${He(e.palette.info.main,.2)}`,success:`0 0 0 2px ${He(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${He(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${He(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${He(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${He(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${He(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${He(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${He(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${He(e.palette.grey[500],.2)}`});function Zn(e,t){N7(e)&&(e="100%");var n=V7(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 N7(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function V7(e){return typeof e=="string"&&e.indexOf("%")!==-1}function H7(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Vc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mf(e){return e.length===1?"0"+e:String(e)}function z7(e,t,n){return{r:Zn(e,255)*255,g:Zn(t,255)*255,b:Zn(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 W7(e,t,n){var r,o,s;if(e=Zn(e,360),t=Zn(t,100),n=Zn(n,100),t===0)o=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),o=Bf(u,l,e),s=Bf(u,l,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function U7(e,t,n){e=Zn(e,255),t=Zn(t,255),n=Zn(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s=0,l=r,u=r-o,A=r===0?0:u/r;if(r===o)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 Y7(e,t,n){e=Zn(e,360)*6,t=Zn(t,100),n=Zn(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),l=n*(1-o*t),u=n*(1-(1-o)*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 G7(e,t,n,r){var o=[mf(Math.round(e).toString(16)),mf(Math.round(t).toString(16)),mf(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Zy(e){return Mn(e)/255}function Mn(e){return parseInt(e,16)}var _y={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 Ea(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,l=!1,u=!1;return typeof e=="string"&&(e=X7(e)),typeof e=="object"&&(zr(e.r)&&zr(e.g)&&zr(e.b)?(t=z7(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):zr(e.h)&&zr(e.s)&&zr(e.v)?(r=Vc(e.s),o=Vc(e.v),t=Y7(e.h,r,o),l=!0,u="hsv"):zr(e.h)&&zr(e.s)&&zr(e.l)&&(r=Vc(e.s),s=Vc(e.l),t=W7(e.h,r,s),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=H7(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 K7="[-\\+]?\\d+%?",J7="[-\\+]?\\d*\\.\\d+%?",Bo="(?:".concat(J7,")|(?:").concat(K7,")"),vf="[\\s|\\(]+(".concat(Bo,")[,|\\s]+(").concat(Bo,")[,|\\s]+(").concat(Bo,")\\s*\\)?"),yf="[\\s|\\(]+(".concat(Bo,")[,|\\s]+(").concat(Bo,")[,|\\s]+(").concat(Bo,")[,|\\s]+(").concat(Bo,")\\s*\\)?"),ur={CSS_UNIT:new RegExp(Bo),rgb:new RegExp("rgb"+vf),rgba:new RegExp("rgba"+yf),hsl:new RegExp("hsl"+vf),hsla:new RegExp("hsla"+yf),hsv:new RegExp("hsv"+vf),hsva:new RegExp("hsva"+yf),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 X7(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(_y[e])e=_y[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ur.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ur.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ur.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ur.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ur.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ur.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ur.hex8.exec(e),n?{r:Mn(n[1]),g:Mn(n[2]),b:Mn(n[3]),a:Zy(n[4]),format:t?"name":"hex8"}:(n=ur.hex6.exec(e),n?{r:Mn(n[1]),g:Mn(n[2]),b:Mn(n[3]),format:t?"name":"hex"}:(n=ur.hex4.exec(e),n?{r:Mn(n[1]+n[1]),g:Mn(n[2]+n[2]),b:Mn(n[3]+n[3]),a:Zy(n[4]+n[4]),format:t?"name":"hex8"}:(n=ur.hex3.exec(e),n?{r:Mn(n[1]+n[1]),g:Mn(n[2]+n[2]),b:Mn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function zr(e){return!!ur.CSS_UNIT.exec(String(e))}var Hc=2,qy=.16,Z7=.05,_7=.05,q7=.15,$y=5,eb=4,$7=[{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 tb(e){var t=e.r,n=e.g,r=e.b,o=U7(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function zc(e){var t=e.r,n=e.g,r=e.b;return"#".concat(G7(t,n,r,!1))}function eV(e,t,n){var r=n/100,o={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 o}function nb(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Hc*t:Math.round(e.h)+Hc*t:r=n?Math.round(e.h)+Hc*t:Math.round(e.h)-Hc*t,r<0?r+=360:r>=360&&(r-=360),r}function rb(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-qy*t:t===eb?r=e.s+qy:r=e.s+Z7*t,r>1&&(r=1),n&&t===$y&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function ob(e,t,n){var r;return n?r=e.v+_7*t:r=e.v-q7*t,r>1&&(r=1),Number(r.toFixed(2))}function ib(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ea(e),o=$y;o>0;o-=1){var s=tb(r),l=zc(Ea({h:nb(s,o,!0),s:rb(s,o,!0),v:ob(s,o,!0)}));n.push(l)}n.push(zc(r));for(var u=1;u<=eb;u+=1){var A=tb(r),f=zc(Ea({h:nb(A,u),s:rb(A,u),v:ob(A,u)}));n.push(f)}return t.theme==="dark"?$7.map(function(p){var C=p.index,h=p.opacity,E=zc(eV(Ea(t.backgroundColor||"#141414"),Ea(n[C]),h*100));return E}):n}var bf={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"},_t={},Wc={};Object.keys(bf).forEach(function(e){_t[e]=ib(bf[e]),_t[e].primary=_t[e][5],Wc[e]=ib(bf[e],{theme:"dark",backgroundColor:"#141414"}),Wc[e].primary=Wc[e][5]}),_t.red,_t.volcano,_t.gold,_t.orange,_t.yellow,_t.lime,_t.green,_t.cyan,_t.blue,_t.geekblue,_t.purple,_t.magenta,_t.grey,_t.grey;const sb=e=>{const{blue:t,red:n,gold:r,cyan:o,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:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:A},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:A},grey:u}};sb.propTypes={colors:c.object};const tV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},nV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},rV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},oV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},iV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},sV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},aV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},lV=(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]},o="#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:o},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:o},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:o},success:{lighter:f[0],light:f[1],main:f[2],dark:f[3],darker:f[4],contrastText:o},grey:r}},ab=(e,t,n)=>{switch(t){case"theme1":return tV(e,n);case"theme2":return nV(e,n);case"theme3":return rV(e,n);case"theme4":return oV(e,n);case"theme5":return iV(e,n);case"theme6":return sV(e,n);case"theme7":return aV(e,n);case"theme8":return lV(e,n);default:return sb(e)}};ab.propTypes={colors:c.object,presetColor:c.any};const cV=(e,t)=>{const n=e==="dark"?Wc:_t;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const l=ab(n,t,e);return fA({palette:{mode:e,common:{black:"#000",white:"#fff"},...l,text:{primary:e==="dark"?He(l.grey[900],.87):l.grey[700],secondary:e==="dark"?He(l.grey[900],.45):l.grey[500],disabled:e==="dark"?He(l.grey[900],.1):l.grey[400]},action:{disabled:l.grey[300]},divider:e==="dark"?He(l.grey[900],.05):l.grey[200],background:{paper:e==="dark"?l.grey[100]:l.grey[0],default:l.grey.A50}}})},uV=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 AV(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 dV(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function gV(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:g.jsx(et.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 Zo({color:e,theme:t}){const n=rn(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:He(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function fV(e){const t=Zo({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":Zo({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Zo({color:"secondary",theme:e}),"&.MuiAlert-borderError":Zo({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Zo({color:"success",theme:e}),"&.MuiAlert-borderInfo":Zo({color:"info",theme:e}),"&.MuiAlert-borderWarning":Zo({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 pV(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function hV(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 _o({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function CV(e){const t=_o({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":_o({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":_o({color:"secondary",theme:e}),"&.MuiBadge-colorError":_o({color:"error",theme:e}),"&.MuiBadge-colorInfo":_o({color:"info",theme:e}),"&.MuiBadge-colorSuccess":_o({color:"success",theme:e}),"&.MuiBadge-colorWarning":_o({color:"warning",theme:e})}}}}}function tt({variant:e,color:t,theme:n}){const r=rn(n,t),{lighter:o,main:s,dark:l,contrastText:u}=r,A=`${t}Button`,f=ki(n,A),p={"&::after":{boxShadow:`0 0 5px 5px ${He(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${He(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:o,"&:hover":{color:l,borderColor:l},...p};case"text":default:return{"&:hover":{color:l,backgroundColor:o},...p}}}function EV(e){const t=tt({variant:"dashed",color:"primary",theme:e}),n=tt({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*: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:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":tt({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":tt({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":tt({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":tt({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":tt({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":tt({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":tt({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":tt({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":tt({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":tt({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":tt({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":tt({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:tt({variant:"contained",color:"primary",theme:e}),containedSecondary:tt({variant:"contained",color:"secondary",theme:e}),containedError:tt({variant:"contained",color:"error",theme:e}),containedSuccess:tt({variant:"contained",color:"success",theme:e}),containedInfo:tt({variant:"contained",color:"info",theme:e}),containedWarning:tt({variant:"contained",color:"warning",theme:e}),outlinedPrimary:tt({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:tt({variant:"outlined",color:"secondary",theme:e}),outlinedError:tt({variant:"outlined",color:"error",theme:e}),outlinedSuccess:tt({variant:"outlined",color:"success",theme:e}),outlinedInfo:tt({variant:"outlined",color:"info",theme:e}),outlinedWarning:tt({variant:"outlined",color:"warning",theme:e}),textPrimary:tt({variant:"text",color:"primary",theme:e}),textSecondary:tt({variant:"text",color:"secondary",theme:e}),textError:tt({variant:"text",color:"error",theme:e}),textSuccess:tt({variant:"text",color:"success",theme:e}),textInfo:tt({variant:"text",color:"info",theme:e}),textWarning:tt({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function IV(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function mV(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function BV(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function es({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function vV(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 Qf(e){const t=vV(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function yV(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(et.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(et.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Qf("small")},"&.size-medium":{...Qf("medium")},"&.size-large":{...Qf("large")}},colorPrimary:es({color:"primary",theme:e}),colorSecondary:es({color:"secondary",theme:e}),colorSuccess:es({color:"success",theme:e}),colorWarning:es({color:"warning",theme:e}),colorInfo:es({color:"info",theme:e}),colorError:es({color:"error",theme:e})}}}}function ts({color:e,theme:t}){const n=rn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Rn({color:e,theme:t}){const n=rn(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function bV(e){const t=Rn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ts({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ts({color:"secondary",theme:e}),"&.MuiChip-colorError":ts({color:"error",theme:e}),"&.MuiChip-colorInfo":ts({color:"info",theme:e}),"&.MuiChip-colorSuccess":ts({color:"success",theme:e}),"&.MuiChip-colorWarning":ts({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Rn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Rn({color:"secondary",theme:e}),"&.MuiChip-lightError":Rn({color:"error",theme:e}),"&.MuiChip-lightInfo":Rn({color:"info",theme:e}),"&.MuiChip-lightSuccess":Rn({color:"success",theme:e}),"&.MuiChip-lightWarning":Rn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Rn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Rn({color:"secondary",theme:e}),"&.MuiChip-combinedError":Rn({color:"error",theme:e}),"&.MuiChip-combinedInfo":Rn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Rn({color:"success",theme:e}),"&.MuiChip-combinedWarning":Rn({color:"warning",theme:e})}}}}}function QV(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:He("#000",.7)}}}}}}function xV(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function wV(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function ns({color:e,theme:t}){const n=rn(t,e),{main:r,dark:o,contrastText:s}=n,l=`${e}Button`,u=ki(t,l);return{color:s,backgroundColor:r,boxShadow:u,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${He(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${He(r,.9)}`}}}function TV(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":ns({color:"primary",theme:e}),"&.MuiFab-secondary":ns({color:"secondary",theme:e}),"&.Mui-error":ns({color:"error",theme:e}),"&.MuiFab-success":ns({color:"success",theme:e}),"&.MuiFab-info":ns({color:"info",theme:e}),"&.MuiFab-warning":ns({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 PV(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 SV(){return{MuiInputBase:{styleOverrides:{}}}}function OV(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 jV(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function MV(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function RV(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function DV(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function kV(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function FV(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function qo({variant:e,theme:t}){const n=rn(t,e),{light:r}=n,o=ki(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function LV(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:{...qo({variant:"primary",theme:e}),"&.Mui-error":{...qo({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:qo({variant:"secondary",theme:e}),colorError:qo({variant:"error",theme:e}),colorWarning:qo({variant:"warning",theme:e}),colorInfo:qo({variant:"info",theme:e}),colorSuccess:qo({variant:"success",theme:e})}}}}function NV(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Qt({variant:e,color:t,theme:n}){const r=rn(n,t),{lighter:o,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:o,borderColor:s},...f};case"text":default:return{color:u,"&:hover":{backgroundColor:u,color:o},...f}}}function VV(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":Qt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Qt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Qt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Qt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Qt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Qt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Qt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Qt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Qt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Qt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Qt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Qt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Qt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Qt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Qt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Qt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Qt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Qt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Qt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Qt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Qt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Qt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Qt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Qt({variant:"outlined",color:"warning",theme:e})}}}}}}function HV(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function rs({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function zV(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 xf(e){const t=zV(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function WV(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":{...xf("small")},"&.size-medium":{...xf("medium")},"&.size-large":{...xf("large")}},colorPrimary:rs({color:"primary",theme:e}),colorSecondary:rs({color:"secondary",theme:e}),colorSuccess:rs({color:"success",theme:e}),colorWarning:rs({color:"warning",theme:e}),colorInfo:rs({color:"info",theme:e}),colorError:rs({color:"error",theme:e})}}}}function os({color:e,theme:t}){const n=rn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function UV(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":os({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":os({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":os({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":os({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":os({color:"info",theme:e}),"&.MuiSlider-thumbColorError":os({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 YV(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 wf(e,t){const n=YV(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 GV(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},...wf(e,"medium")},sizeLarge:{...wf(e,"large")},sizeSmall:{...wf(e,"small")}}}}}function KV(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 JV(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 XV(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 ZV(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function _V(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function qV(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function $V(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function eH(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function tH(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 nH(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function rH(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function oH(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function iH(e){return dt.merge(AV(e),dV(e),gV(e),fV(e),pV(),hV(e),CV(e),EV(e),IV(),mV(),BV(),yV(e),bV(e),QV(),xV(e),wV(),TV(e),PV(e),SV(),OV(e),jV(),MV(),RV(e),DV(e),kV(),FV(),LV(e),NV(),VV(e),HV(e),WV(e),UV(e),GV(e),KV(e),JV(e),XV(e),ZV(e),_V(e),qV(),$V(),eH(),tH(e),nH(e),rH(),oH())}const Uc=({themeOverrides:e,children:t})=>{const{themeDirection:n,mode:r,presetColor:o,fontFamily:s}=wn(),l=w.useMemo(()=>cV(r,o),[r,o]),u=w.useMemo(()=>uV(s),[s]),A=w.useMemo(()=>L7(l),[l]),f=w.useMemo(()=>ge.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=fA(f),C=ge.cloneDeep(p.components??{});return p.components=ge.merge(iH(p),C),g.jsx(b.StyledEngineProvider,{injectFirst:!0,children:g.jsxs(Xh,{theme:p,children:[g.jsx(b.CssBaseline,{}),t]})})};Uc.propTypes={children:c.node,themeOverrides:c.oneOfType([c.object,c.func])};const lb=({children:e,theme:t,...n})=>g.jsx(S.CoreAdminContext,{...n,children:g.jsx(Uc,{themeOverrides:t,children:g.jsx(cf,{children:e})})});lb.displayName="ApplicaAdminContext";const is=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:l,history:u,i18nProvider:A,layout:f,loading:p,loginPage:C,authCallbackPage:h,menu:E,notification:m,queryClient:B,requireAuth:v,store:j,ready:R,theme:x,title:O="React Admin"}=e;return g.jsx(lb,{authProvider:t,dataProvider:s,i18nProvider:A,store:j,history:u,queryClient:B,theme:x,children:g.jsx(S.AdminUI,{layout:f,dashboard:o,disableTelemetry:l,menu:E,catchAll:n,title:O,loading:p,loginPage:C,authCallbackPage:h,notification:m,requireAuth:v,ready:R,children:r})})};is.defaultProps={store:S.localStorageStore(),title:"Applica Admin"},is.propTypes={...S.AdminUI.propTypes};class sH{constructor(t){gi(this,Ia,void 0);gi(this,ma,void 0);gi(this,ss,new Set);const{apiUrl:n}=t??{};if(!ge.isString(n)||ge.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");vs(this,ma,n),vs(this,Ia,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var u;const{message:n,filename:r,lineno:o,colno:s}=t,l=`${n}${r}${o}${s}`;hr(this,ss).has(l)||(hr(this,ss).add(l),fetch(`${hr(this,ma)}/ui/error-log`,{method:"PUT",headers:hr(this,Ia),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(u=t.error)==null?void 0:u.stack})}).catch(()=>{console.log("Unable to send error to server"),hr(this,ss).delete(l)}))}}Ia=new WeakMap,ma=new WeakMap,ss=new WeakMap;class cb{constructor({catch:t,display:n,log:r,error:o}){Wa(this,"catch");Wa(this,"display");Wa(this,"log");Wa(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const aH=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new cb({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=k.useMemo(()=>o.errorHandler?o.errorHandler:new sH({apiUrl:t}),[t,o.errorHandler]),l=console.error,u=k.useCallback(function(A,...f){var C;if(!A)return!1;const p=r(A instanceof ErrorEvent?A:(C=A==null?void 0:A.toString())==null?void 0:C.replace(/%s/g,()=>f.shift()));if(p.isCatched())return!1;p.logError()&&(A instanceof ErrorEvent?s.handle(A):s.handle(new ErrorEvent("window.onerror",{error:A,message:A.toString()}))),p.displayError()&&l.apply(console,arguments)},[t,n,r,e,s]);return k.useEffect(()=>(window.removeEventListener("error",u),window.addEventListener("error",u),console.error=u,()=>{window.removeEventListener("error",u),console.error=l}),[u]),!0};class lH{constructor(t){gi(this,Ba,void 0);gi(this,va,void 0);gi(this,$o,[]);const{apiUrl:n}=t??{};if(!ge.isString(n)||ge.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");vs(this,va,n),vs(this,Ba,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ge.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ge.isString(n)||ge.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ge.isString(r)||ge.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ge.some(hr(this,$o),o=>ge.isEqual(o,{code:n,lang:r}))){hr(this,$o).push({code:n,lang:r}),fetch(`${hr(this,va)}/i18n/message`,{method:"put",headers:hr(this,Ba),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),vs(this,$o,ge.reject(hr(this,$o),s=>ge.isEqual(s,{code:n,lang:r})))});return}}}Ba=new WeakMap,va=new WeakMap,$o=new WeakMap;function ub(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],l=new Headers({Accept:"application/json","Content-Type":"application/json"}),u=new lH({apiUrl:t}),A=()=>fetch(`${t}/i18n/languages`,{headers:l,method:"get"}).then(C=>C.json()).catch(()=>Promise.resolve(s)),f=()=>fetch(`${t}/i18n/messages`,{headers:l,method:"get"}).then(C=>C.json()).then(C=>C.reduce((h,E)=>({...h,[E.lang]:{...h[E.lang]||{},[E.code]:E.text}}),{})),p=(C,h,E)=>(r||console.error(`Warning: Missing translation for key: "${C}"`),o&&(ge.isString(C)?C.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${C}`):u.handleMessage({code:C,lang:E}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),C);return Promise.all([A(),f()]).then(C=>{const[h,E]=C;function m(B){return ge.get(E,B,{})}return Nx(m,n,h,{allowMissing:r||o,onMissingKey:p})})}window.React=w;const cH=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,o]=w.useState({loading:!0,languages:null});return w.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=>o({loading:!1,...n(l)}))},[e,t,n]),r};function Ab(e){const[t,n]=w.useState(),r=AC(e);return w.useEffect(()=>{ub(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const uH=new Hu.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Tf=({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r,development:o,logoMain:s,logoIcon:l,loginPage:u,menu:A,name:f,copy:p,version:C,dataProvider:h,authProvider:E,errorHandler:m,error:B,notification:v,enableNotification:j,enableRegistration:R,enablePasswordRecover:x,...O})=>{aH({apiUrl:n,errorHandler:m,catcherFn:X=>{const Z=X==null?void 0:X.toString(),$=["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>.","Missing translation for key:","HttpError: "].some(se=>Z==null?void 0:Z.includes(se));return new cb({catch:$,display:!$,log:!$,error:Z})}});const P=w.useMemo(()=>w.isValidElement(u)?w.cloneElement(u,{name:f,copy:p,version:C,enableRegistration:R,enablePasswordRecover:x}):u,[u,f,C,p,R,x]),N=w.useMemo(()=>X=>{const Z=f?g.jsx(kc,{title:f}):s,Y=f?g.jsx(uf,{title:f}):l;return g.jsx(by,{...X,name:f,copy:p,version:C,logoMain:Z,logoIcon:Y,notification:v,enableNotification:j,error:B})},[s,l,f,C,B,v,j]),F=Ab({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return F===void 0?g.jsx(g.Fragment,{}):F.error?g.jsx(fl,{initialConfig:t,children:g.jsx(Uc,{themeOverrides:e,children:g.jsx(Xy,{})})}):g.jsx(IA,{children:g.jsx(vA,{menu:A,children:g.jsx(fl,{initialConfig:t,children:g.jsx(is,{theme:e,layout:N,notification:My,queryClient:uH,dataProvider:h,authProvider:E,i18nProvider:F,loginPage:P,...O})})})})};Tf.defaultProps={...is.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:g.jsx(Nc,{version:"0.0.0",name:"Applica",redirectTo:"/"})},Tf.propTypes={...is.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(wi),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(M,"ArrayInputContext",{enumerable:!0,get:()=>S.ArrayInputContext}),Object.defineProperty(M,"BooleanField",{enumerable:!0,get:()=>S.BooleanField}),Object.defineProperty(M,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>S.BulkDeleteWithConfirmButton}),Object.defineProperty(M,"Button",{enumerable:!0,get:()=>S.Button}),Object.defineProperty(M,"ChipField",{enumerable:!0,get:()=>S.ChipField}),Object.defineProperty(M,"Confirm",{enumerable:!0,get:()=>S.Confirm}),Object.defineProperty(M,"CreateButton",{enumerable:!0,get:()=>S.CreateButton}),Object.defineProperty(M,"CreateContextProvider",{enumerable:!0,get:()=>S.CreateContextProvider}),Object.defineProperty(M,"CustomRoutes",{enumerable:!0,get:()=>S.CustomRoutes}),Object.defineProperty(M,"DeleteWithConfirmButton",{enumerable:!0,get:()=>S.DeleteWithConfirmButton}),Object.defineProperty(M,"DeleteWithUndoButton",{enumerable:!0,get:()=>S.DeleteWithUndoButton}),Object.defineProperty(M,"EditButton",{enumerable:!0,get:()=>S.EditButton}),Object.defineProperty(M,"EditContextProvider",{enumerable:!0,get:()=>S.EditContextProvider}),Object.defineProperty(M,"FieldTitle",{enumerable:!0,get:()=>S.FieldTitle}),Object.defineProperty(M,"Form",{enumerable:!0,get:()=>S.Form}),Object.defineProperty(M,"FormDataConsumer",{enumerable:!0,get:()=>S.FormDataConsumer}),Object.defineProperty(M,"HttpError",{enumerable:!0,get:()=>S.HttpError}),Object.defineProperty(M,"I18nContextProvider",{enumerable:!0,get:()=>S.I18nContextProvider}),Object.defineProperty(M,"ListToolbar",{enumerable:!0,get:()=>S.ListToolbar}),Object.defineProperty(M,"LoadingIndicator",{enumerable:!0,get:()=>S.LoadingIndicator}),Object.defineProperty(M,"Pagination",{enumerable:!0,get:()=>S.Pagination}),Object.defineProperty(M,"RaSimpleFormIterator",{enumerable:!0,get:()=>S.SimpleFormIterator}),Object.defineProperty(M,"RecordContextProvider",{enumerable:!0,get:()=>S.RecordContextProvider}),Object.defineProperty(M,"ReferenceArrayField",{enumerable:!0,get:()=>S.ReferenceArrayField}),Object.defineProperty(M,"ReferenceField",{enumerable:!0,get:()=>S.ReferenceField}),Object.defineProperty(M,"Resource",{enumerable:!0,get:()=>S.Resource}),Object.defineProperty(M,"ResourceContextProvider",{enumerable:!0,get:()=>S.ResourceContextProvider}),Object.defineProperty(M,"SaveButton",{enumerable:!0,get:()=>S.SaveButton}),Object.defineProperty(M,"SimpleFormIteratorContext",{enumerable:!0,get:()=>S.SimpleFormIteratorContext}),Object.defineProperty(M,"SimpleList",{enumerable:!0,get:()=>S.SimpleList}),Object.defineProperty(M,"SimpleShowLayout",{enumerable:!0,get:()=>S.SimpleShowLayout}),Object.defineProperty(M,"SingleFieldList",{enumerable:!0,get:()=>S.SingleFieldList}),Object.defineProperty(M,"TopToolbar",{enumerable:!0,get:()=>S.TopToolbar}),Object.defineProperty(M,"UrlField",{enumerable:!0,get:()=>S.UrlField}),Object.defineProperty(M,"choices",{enumerable:!0,get:()=>S.choices}),Object.defineProperty(M,"email",{enumerable:!0,get:()=>S.email}),Object.defineProperty(M,"maxLength",{enumerable:!0,get:()=>S.maxLength}),Object.defineProperty(M,"maxValue",{enumerable:!0,get:()=>S.maxValue}),Object.defineProperty(M,"minLength",{enumerable:!0,get:()=>S.minLength}),Object.defineProperty(M,"minValue",{enumerable:!0,get:()=>S.minValue}),Object.defineProperty(M,"number",{enumerable:!0,get:()=>S.number}),Object.defineProperty(M,"regex",{enumerable:!0,get:()=>S.regex}),Object.defineProperty(M,"required",{enumerable:!0,get:()=>S.required}),Object.defineProperty(M,"useArrayInput",{enumerable:!0,get:()=>S.useArrayInput}),Object.defineProperty(M,"useAuthProvider",{enumerable:!0,get:()=>S.useAuthProvider}),Object.defineProperty(M,"useChoices",{enumerable:!0,get:()=>S.useChoices}),Object.defineProperty(M,"useChoicesContext",{enumerable:!0,get:()=>S.useChoicesContext}),Object.defineProperty(M,"useCreateController",{enumerable:!0,get:()=>S.useCreateController}),Object.defineProperty(M,"useDataProvider",{enumerable:!0,get:()=>S.useDataProvider}),Object.defineProperty(M,"useEditContext",{enumerable:!0,get:()=>S.useEditContext}),Object.defineProperty(M,"useGetIdentity",{enumerable:!0,get:()=>S.useGetIdentity}),Object.defineProperty(M,"useGetList",{enumerable:!0,get:()=>S.useGetList}),Object.defineProperty(M,"useGetMany",{enumerable:!0,get:()=>S.useGetMany}),Object.defineProperty(M,"useGetManyReference",{enumerable:!0,get:()=>S.useGetManyReference}),Object.defineProperty(M,"useGetOne",{enumerable:!0,get:()=>S.useGetOne}),Object.defineProperty(M,"useInput",{enumerable:!0,get:()=>S.useInput}),Object.defineProperty(M,"useListContext",{enumerable:!0,get:()=>S.useListContext}),Object.defineProperty(M,"useLocaleState",{enumerable:!0,get:()=>S.useLocaleState}),Object.defineProperty(M,"useNotify",{enumerable:!0,get:()=>S.useNotify}),Object.defineProperty(M,"usePermissions",{enumerable:!0,get:()=>S.usePermissions}),Object.defineProperty(M,"useRecordContext",{enumerable:!0,get:()=>S.useRecordContext}),Object.defineProperty(M,"useRefresh",{enumerable:!0,get:()=>S.useRefresh}),Object.defineProperty(M,"useResourceContext",{enumerable:!0,get:()=>S.useResourceContext}),Object.defineProperty(M,"useResourceDefinition",{enumerable:!0,get:()=>S.useResourceDefinition}),Object.defineProperty(M,"useResourceDefinitions",{enumerable:!0,get:()=>S.useResourceDefinitions}),Object.defineProperty(M,"useShowContext",{enumerable:!0,get:()=>S.useShowContext}),Object.defineProperty(M,"useShowController",{enumerable:!0,get:()=>S.useShowController}),Object.defineProperty(M,"useSimpleFormIterator",{enumerable:!0,get:()=>S.useSimpleFormIterator}),Object.defineProperty(M,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>S.useSimpleFormIteratorItem}),Object.defineProperty(M,"useTranslate",{enumerable:!0,get:()=>S.useTranslate}),Object.defineProperty(M,"useTranslateLabel",{enumerable:!0,get:()=>S.useTranslateLabel}),Object.defineProperty(M,"useUnselect",{enumerable:!0,get:()=>S.useUnselect}),Object.defineProperty(M,"useUnselectAll",{enumerable:!0,get:()=>S.useUnselectAll}),Object.defineProperty(M,"useUpdateMany",{enumerable:!0,get:()=>S.useUpdateMany}),Object.defineProperty(M,"withLifecycleCallbacks",{enumerable:!0,get:()=>S.withLifecycleCallbacks}),M.ActionsField=Vd,M.ActionsMenu=Ro,M.ActivatePage=Gy,M.Admin=is,M.AnimateButton=VI,M.AppConfigContext=EA,M.AppConfigProvider=IA,M.ApplicaAdmin=Tf,M.ArrayInput=D3,M.AttachmentField=Hd,M.AttachmentInput=Jd,M.AutocompleteArrayInput=Xd,M.AutocompleteInput=Zd,M.Avatar=Gs,M.BooleanInput=_d,M.Breadcrumbs=Hl,M.BulkActionsToolbar=pf,M.BulkFloatingActionsToolbar=Wy,M.CardForm=Yl,M.ChangePasswordForm=lg,M.CircularWithLabel=hm,M.CircularWithPath=Cm,M.CoverField=Jl,M.Create=S3,M.CreateInDialogButton=gf,M.Datagrid=b7,M.DateAgoField=Xl,M.DateField=zd,M.DateInput=qd,M.DateTimeInput=$d,M.Dot=zl,M.Drawer=Ey,M.DrawerHeader=ev,M.DrawerHeaderStyled=Jg,M.DrawerToggle=P0,M.Edit=lM,M.EditInDialogButton=ff,M.EmailField=Wd,M.Empty=Ny,M.FileField=Ud,M.FileInput=eg,M.Footer=$s,M.FormHeader=cg,M.FunctionField=xm,M.GenericErrorPage=Xy,M.Header=S0,M.HeaderButton=RT,M.HeaderIconButton=w3,M.HeaderNotification=O0,M.HeaderProfile=j0,M.HeaderSpacer=R0,M.HeaderToggleButton=Js,M.HorizontalBar=Iy,M.IconButton=Fi,M.ImageField=Xs,M.ImageInput=tg,M.ImpersonateUserButton=Dy,M.LabeledArrayInput=Kl,M.LabeledInput=nt,M.Layout=by,M.LayoutContent=GB,M.LayoutProvider=x0,M.LayoutWrapper=KB,M.LinearWithIcon=Em,M.LinearWithLabel=Im,M.List=Hy,M.ListItem=If,M.Loadable=A7,M.Loader=jy,M.LoadingButton=Fd,M.LocalizedTextField=H3,M.LocalizedTextInput=eM,M.LoginPage=Nc,M.Logo=Xg,M.LongForm=kt,M.MainCard=Wn,M.MainIcon=kc,M.MenuConfigContext=BA,M.MenuConfigProvider=vA,M.MenuPopover=Al,M.MenuPropTypes=wi,M.NavMenu=my,M.Navigation=yy,M.Notification=My,M.NotificationList=S7,M.NumberInput=ng,M.ReadonlyField=Gd,M.RecordInput=Sm,M.RecoverPage=Ky,M.ReferenceArrayInput=rg,M.ReferenceInput=og,M.ReferenceManyField=Li,M.ReferenceManyInput=ig,M.RegisterPage=Jy,M.ResponsiveSection=M0,M.ScrollTop=cf,M.ScrollX=d7,M.SearchInput=rM,M.SelectArrayInput=sg,M.SelectInput=jm,M.Show=QM,M.SimpleBar=sf,M.SimpleForm=Gl,M.SimpleFormIterator=xM,M.SizeField=Pm,M.SmallIcon=uf,M.SmartTextInput=_l,M.TabbedForm=pg,M.TableFormIterator=e5,M.TableFormIteratorContext=yA,M.TableFormIteratorItemContext=bA,M.TextField=Zl,M.TextInput=Pn,M.ThemeConfigContext=mA,M.ThemeConfigProvider=fl,M.ThemeProvider=Uc,M.TimeInput=ag,M.Toolbar=lr,M.Tooltip=Ld,M.Transitions=Ao,M.createI18nProvider=ub,M.getLocalizedValue=TA,M.localizedValueHasAllLocales=wA,M.parseTime=cC,M.useAppConfig=Do,M.useBreadcrumbs=aC,M.useGetLocalizedValue=OT,M.useI18nLanguages=cH,M.useI18nProvider=Ab,M.useLayoutContext=mg,M.useLayoutDispatch=r5,M.useLayoutDrawerState=Yo,M.useLayoutLogoState=T0,M.useLayoutMediaState=Yn,M.useLayoutNotificationsState=lc,M.useLayoutState=zi,M.useLayoutThemeState=o5,M.useLocalStorage=PA,M.useLocalizedValue=ST,M.useMemoizedObject=AC,M.useMenu=xA,M.useMenuConfig=no,M.usePopoverState=pl,M.useRefDimensions=jT,M.useResourceDefaultValues=P3,M.useResourceTitle=SA,M.useSx=Ir,M.useTableFormIterator=dC,M.useTableFormIteratorItem=MT,M.useThemeConfig=wn,M.uuid=PT,M.withLayoutProvider=w0,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
282
282
|
//# sourceMappingURL=react-admin.umd.js.map
|