@applica-software-guru/react-admin 1.3.172 → 1.3.174

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.
@@ -218,7 +218,7 @@ attempted value: ${a}
218
218
  animation: ${0} 1.4s linear infinite;
219
219
  `),Z6)),tL=de("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),nL=de("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Se(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>z({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&&_t.css(c0||(c0=Yu`
220
220
  animation: ${0} 1.4s ease-in-out infinite;
221
- `),_6)),Jy=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,size:c=40,style:A,thickness:d=3.6,value:p=0,variant:h="indeterminate"}=r,C=Ke(r,X6),m=z({},r,{color:s,disableShrink:a,size:c,thickness:d,value:p,variant:h}),I=$6(m),B={},v={},P={};if(h==="determinate"){const j=2*Math.PI*((mo-d)/2);B.strokeDasharray=j.toFixed(3),P["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*j).toFixed(3)}px`,v.transform="rotate(-90deg)"}return f.jsx(eL,z({className:Ge(I.root,o),style:z({width:c,height:c},v,A),ownerState:m,ref:n,role:"progressbar"},P,C,{children:f.jsx(tL,{className:I.svg,ownerState:m,viewBox:`${mo/2} ${mo/2} ${mo} ${mo}`,children:f.jsx(nL,{className:I.circle,style:B,ownerState:m,cx:mo,cy:mo,r:(mo-d)/2,fill:"none",strokeWidth:d})})}))});process.env.NODE_ENV!=="production"&&(Jy.propTypes={classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","primary","secondary","error","info","success","warning"]),u.string]),disableShrink:jr(u.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:u.oneOfType([u.number,u.string]),style:u.object,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),thickness:u.number,value:u.number,variant:u.oneOf(["determinate","indeterminate"])});const Bp=Jy;function rL(e){return Nt("MuiLoadingButton",e)}const oL=Ut("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Gr=oL,iL=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],sL=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Se(n)}`],endIcon:[t&&`endIconLoading${Se(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Se(n)}`]},s=pr.unstable_composeClasses(o,rL,r);return z({},r,s)},aL=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",lL=de(q6,{shouldForwardProp:e=>aL(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Gr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Gr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>z({[`& .${Gr.startIconLoadingStart}, & .${Gr.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}),[`&.${Gr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Gr.startIconLoadingStart}, & .${Gr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Gr.startIconLoadingStart}, & .${Gr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),cL=de("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Se(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>z({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})),Xy=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:a,loading:c=!1,loadingIndicator:A,loadingPosition:d="center",variant:p="text"}=r,h=Ke(r,iL),C=hf(a),m=A??f.jsx(Bp,{"aria-labelledby":C,color:"inherit",size:16}),I=z({},r,{disabled:s,loading:c,loadingIndicator:m,loadingPosition:d,variant:p}),B=sL(I),v=c?f.jsx(cL,{className:B.loadingIndicator,ownerState:I,children:m}):null;return f.jsxs(lL,z({disabled:s||c,id:C,ref:n},h,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?o:v,I.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(Xy.propTypes={children:u.node,classes:u.object,disabled:u.bool,id:u.string,loading:u.bool,loadingIndicator:u.node,loadingPosition:jr(u.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:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),variant:u.oneOfType([u.oneOf(["contained","outlined","text"]),u.string])});const uL=Xy;function ag({variant:e,theme:t,color:n,loadingPosition:r}){const o=an(t,n),{lighter:s,main:a,dark:c,contrastText:A}=o,d=`${n}Button`,p=Ss(t,d),h={"& .MuiLoadingButton-loadingIndicator":{color:a}},C={...r&&r!=="center"&&{color:a}},m={"&::after":{boxShadow:`0 0 6px 6px ${ze(a,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${ze(a,.9)}`},"&:focus-visible":{outline:`2px solid ${c}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:a,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:c,color:A},...m};case"light":return{backgroundColor:a,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:c,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:a,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:c,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:a,...C,...h};case"dashed":return{backgroundColor:s,borderColor:a,...C,...h,...m};case"text":default:return{color:a,...h,...m}}}const AL=de(uL,{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"&&{...ag({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"&&{...ag({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...ag({variant:t,theme:e,color:r,loadingPosition:s})}}})),vp=Q.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const a=Tt();return f.jsx(AL,{ref:s,variant:e,shape:t,theme:a,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});vp.propTypes={variant:u.string,shape:u.string,children:u.node,color:u.string};vp.displayName="LoadingButton";function dL({color:e,theme:t,labelColor:n}){const r=an(t,e),{main:o,contrastText:s}=r;let a=e||"";return["primary","secondary","info","success","warning","error"].includes(a)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:a,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:a}}}const gL=de(({className:e,...t})=>f.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&dL({color:t,theme:e,labelColor:n})}));function Gu({children:e,arrow:t,labelColor:n="",...r}){const o=Tt();return f.jsx(b.Box,{display:"flex",children:f.jsx(gL,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Gu.propTypes={children:u.element,arrow:u.bool,labelColor:u.string,rest:u.array};const Mo=Q.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let a={transformOrigin:"0 0 0"};switch(t){case"top-right":a={transformOrigin:"top right"};break;case"top":a={transformOrigin:"top"};break;case"bottom-left":a={transformOrigin:"bottom left"};break;case"bottom-right":a={transformOrigin:"bottom right"};break;case"bottom":a={transformOrigin:"bottom"};break;case"top-left":default:a={transformOrigin:"0 0 0"};break}return f.jsxs(b.Box,{ref:s,children:[n==="grow"&&f.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="collapse"&&f.jsx(b.Collapse,{...o,sx:a,children:e}),n==="fade"&&f.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="slide"&&f.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:f.jsx(b.Box,{sx:a,children:e})}),n==="zoom"&&f.jsx(b.Zoom,{...o,children:f.jsx(b.Box,{sx:a,children:e})})]})});Mo.propTypes={children:u.node,type:u.oneOf(["grow","fade","collapse","slide","zoom"]),position:u.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:u.oneOf(["up","down","left","right"])};Q.forwardRef(function(t,n){return f.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Zy({value:e,...t}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Zy.propTypes={value:u.number};function _y({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:a,...c}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...c,value:100}),o&&f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),f.jsx(b.CircularProgress,{variant:n,sx:{...a,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...c})]})}_y.propTypes={value:u.number,size:u.number,variant:u.string,thickness:u.number,showLabel:u.bool,pathColor:u.string,sx:u.array,others:u.array};function $y({icon:e,value:t,...n}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),f.jsx(b.Box,{sx:{minWidth:35},children:e})]})}$y.propTypes={icon:u.node,value:u.number};function eb({value:e,...t}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),f.jsx(b.Box,{sx:{minWidth:35},children:f.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}eb.propTypes={value:u.number};const fL=Q.forwardRef(function(t,n){const r=mr(t,{color:"text.primary"},{defaults:!0});return f.jsx(Ps,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Rs=Q.forwardRef(function(t,n){const r=mr(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})}),tb=Q.createContext({});function pL(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=O.useResourceContext(),o=O.useDataProvider(),{search:s}=ps.useLocation(),a=`${r}/new`,c=Q.useCallback(()=>{if(!t||!ne.isFunction(o.get))return Promise.resolve({});const C={};return new URLSearchParams(s??"").forEach((m,I)=>{C[I]=m}),o.get(a,C).then(m=>m.data).then(m=>{const{responseCode:I,value:B}=m;return I==="ok"?B:Promise.reject(m)})},[r,t,s,o]),A=Q.useMemo(()=>ne.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:p}=us.useQuery(A),h=ne.omit(e,["useDefaults"]);return p?f.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(b.CircularProgress,{})}):f.jsx(tb.Provider,{value:d??{},children:f.jsx(O.Create,{...h})})}function hL(){return Q.useContext(tb)}const CL=de(pL,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaCreate-main:has(.ApplicaLongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}})),mL=Za(O.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)}})),Er=e=>f.jsx(mL,{...e});Er.defaultProps={...O.Toolbar.defaultProps};Er.propTypes={...O.Toolbar.propTypes};const yp=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...a})=>{const c=O.useTranslate(),A=O.useResourceContext(),{cardTitle:d,cardSubheader:p}=Q.useMemo(()=>{const h=n||`resources.${A}.title`;return{cardTitle:c(h,{_:h}),cardSubheader:r!==null?c(r,{_:r}):null}},[A,r,n,c]);return f.jsx(b.Grid,{item:!0,...a,children:f.jsx($n,{content:t,title:d,subheader:p,secondary:o,divider:!0,children:f.jsxs(Q.Fragment,{children:[e,s===!0?f.jsx(Er,{children:f.jsx(O.SaveButton,{})}):s]})})})};yp.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12};yp.propTypes={...b.Grid.propTypes,children:u.oneOfType([u.node,u.arrayOf(u.node)]),contained:u.bool,content:u.bool,subheader:u.oneOfType([u.string,u.node]),title:u.oneOfType([u.string,u.node]),secondary:u.oneOfType([u.node,u.string,u.object]),spacing:u.number,toolbar:u.oneOfType([u.node,u.bool])};const EL=de(O.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),Ku=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=xn();return f.jsx(EL,{defaultValues:n,spacing:t||o,children:f.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};Ku.propTypes={...b.Grid.propTypes,...O.Form.propTypes,children:u.oneOfType([u.node,u.arrayOf(u.node)]),spacing:u.number,defaultValues:u.oneOfType([u.object,u.func]),record:u.object,validate:u.func};Ku.defaultProps={...b.Stack.defaultProps};Ku.Section=yp;const IL=Za(O.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}})),qu=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...a})=>{const c=Gf(e),A=O.useRecordContext();return f.jsx($n,{content:n,title:c,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:f.jsx(IL,{toolbar:f.jsx(Er,{}),...a})})};qu.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:f.jsx(Er,{children:f.jsx(O.SaveButton,{type:"button"})}),secondary:f.jsx(Fo,{children:f.jsx(O.DeleteWithConfirmButton,{})})};qu.propTypes={...O.SimpleForm.propTypes,modal:u.bool,content:u.bool,contained:u.bool,subheader:u.oneOfType([u.string,u.node]),title:u.oneOfType([u.string,u.node]),secondary:u.oneOfType([u.node,u.string,u.object])};const Ju=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:a,fullWidth:c,...A})=>{const d=_t.useTheme(),{getCurrentDialog:p}=vi(),{source:h,resource:C,isRequired:m}=A,{getFieldState:I,formState:B}=Bi.useFormContext(),{error:v}=I(h,B),P=p();return f.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:v?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:!!v,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(O.FieldTitle,{label:e,source:h,resource:P||C,isRequired:m})}),Q.isValidElement(t)?Q.cloneElement(t,{...t.props,...A,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!v,children:r})]})};Ju.propTypes={sx:u.object,children:u.element,label:u.oneOfType([u.string,u.bool]),addLabel:u.bool,resource:u.string,isRequired:u.bool,source:u.string,display:u.oneOf(["legend","label"]),helperText:u.oneOfType([u.string,u.bool]),divider:u.bool};Ju.defaultProps={display:"label",divider:!1};const BL=de(O.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%"}}})),vL=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>f.jsx(Ju,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(BL,{source:n,label:!1,...s})}),bp=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:f.jsxs(Fo,{children:[e&&f.jsx(O.EditButton,{}),t&&f.jsx(O.DeleteWithConfirmButton,{}),n&&f.jsx(O.CloneButton,{})]});bp.defaultProps={canEdit:!0,canDelete:!0,canClone:!1};bp.propTypes={canEdit:u.bool,canDelete:u.bool,canClone:u.bool};const u0=de("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),yL=de("ul")({display:"inline-block"}),nb=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=Ae.useRecordContext(e),c=dt.get(a,r),A=Ae.useTranslate();if(!c)return n?f.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):f.jsx(u0,{className:t,...s});if(Array.isArray(c))return f.jsx(yL,{className:t,...s,children:c.map((h,C)=>{var I;const m=o instanceof String?(I=dt.get(h,o))==null?void 0:I.toString():o;return f.jsx("li",{children:m},C)})});const d=o instanceof String?(p=dt.get(a,o))==null?void 0:p.toString():o;return f.jsx(u0,{className:t,...s,children:d})};nb.propTypes={className:u.string,emptyText:u.string,source:u.string.isRequired,src:u.string,title:u.oneOfType([u.string,u.element]),target:u.string,download:u.oneOfType([u.bool,u.string]),ping:u.string,rel:u.string};const Qp=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...o})=>{const[s,a]=Q.useState(null),c=O.useRecordContext(o),A=O.useDataProvider(),d=O.useResourceContext(),p=Q.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=dt.get(c,o==null?void 0:o.source),B=d.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(c==null?void 0:c.id)}/${t||(o==null?void 0:o.source)}/${(I==null?void 0:I.id)||(c==null?void 0:c.id)}`),P=document.createElement("a");P.href=v,P.download=dt.get(c,(o==null?void 0:o.title)||(o==null?void 0:o.source)),P.click()},[A,c,e,d,t,o==null?void 0:o.source,o==null?void 0:o.title]),h=Q.useMemo(()=>({...c,[o==null?void 0:o.source]:(c==null?void 0:c.src)||dt.get(c,o==null?void 0:o.source),[o==null?void 0:o.title]:(c==null?void 0:c.title)||dt.get(c,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),[c,o==null?void 0:o.source,o==null?void 0:o.title]),C=O.useTranslate();return Q.useEffect(()=>{!c||!(c!=null&&c.userId)||A.getOne(r,{id:c==null?void 0:c.userId}).then(({data:m})=>a(m)).catch(()=>a(null))},[c,A,r]),f.jsx(nb,{...o,disabled:n,record:h,onClick:p,title:f.jsxs(b.Box,{sx:{cursor:"pointer"},children:[f.jsx(b.Typography,{variant:"subtitle1",children:dt.get(h,(o==null?void 0:o.title)||(o==null?void 0:o.source))}),f.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(h,"sizeDescription"),s&&" | ",s&&C("ra.attachment.info",{user:s==null?void 0:s.name,created:no(h==null?void 0:h.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Qp.propTypes={...O.FileField.propTypes,source:u.string,title:u.string,disabled:u.bool};const bL=de(O.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),rl=e=>{const t=`_${e==null?void 0:e.source}`;return f.jsx(bL,{...e,source:t})};rl.propTypes={...O.ImageField.propTypes,source:u.string};const Xu=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const a=Q.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]),c=O.useRecordContext(),A=o||c;return f.jsx(rl,{sx:d=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${d.palette.divider}`,objectFit:"cover !important",...a,minWidth:a.width,minHeight:a.height}}),...s,record:A})};Xu.defaultProps={...rl.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"};Xu.propTypes={...rl.propTypes,width:u.oneOfType([u.number,u.string]),height:u.oneOfType([u.number,u.string]),circle:u.bool,justify:u.oneOf(["flex-start","center","flex-end"])};var rb={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(_n,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={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 c(d,p,h,C){return s.fromToBase(d,p,h,C)}o.en.relativeTime=a,s.fromToBase=function(d,p,h,C,m){for(var I,B,v,P=h.$locale().relativeTime||a,j=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=j.length,R=0;R<x;R+=1){var S=j[R];S.d&&(I=C?o(d).diff(h,S.d,!0):h.diff(d,S.d,!0));var L=(n.rounding||Math.round)(Math.abs(I));if(v=I>0,L<=S.r||!S.r){L<=1&&R>0&&(S=j[R-1]);var F=P[S.l];m&&(L=m(""+L)),B=typeof F=="string"?F.replace("%d",L):F(L,p,S.l,v);break}}if(p)return B;var X=v?P.future:P.past;return typeof X=="function"?X(B):X.replace("%s",B)},s.to=function(d,p){return c(d,p,this,!0)},s.from=function(d,p){return c(d,p,this)};var A=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(A(this),d)},s.fromNow=function(d){return this.from(A(this),d)}}})})(rb);var QL=rb.exports;const xL=io(QL);no.extend(xL);const Zu=e=>{const t=O.useRecordContext(e),[n]=O.useLocaleState(),r=Q.useMemo(()=>no(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(Q.Fragment,{children:[f.jsx(O.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Zu.displayName="DateAgoField";Zu.propTypes={source:u.string.isRequired};const ob=de(O.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));ob.propTypes={...O.DateField.propTypes};const xp=e=>f.jsx(ob,{...e});xp.defaultProps={...O.DateField.defaultProps,variant:"body1"};xp.propTypes={...O.DateField.propTypes};const ib=de(O.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));ib.propTypes={...O.EmailField.propTypes};const wp=e=>f.jsx(ib,{...e});wp.defaultProps={...O.EmailField.defaultProps,variant:"body1"};wp.propTypes={...O.EmailField.propTypes};const wL=de(O.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Tp=({...e})=>{const t=O.useRecordContext(e),n=Q.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),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(wL,{...e,record:t,onClick:n})};Tp.propTypes={...O.FileField.propTypes,source:u.string,title:u.string};const sb=e=>f.jsx(O.FunctionField,{...e});sb.defaultProps={variant:"body1"};const ab=de(O.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));ab.propTypes={...O.TextField.propTypes};const _u=e=>f.jsx(ab,{...e});_u.defaultProps={...O.TextField.defaultProps,variant:"body1"};_u.propTypes={...O.TextField.propTypes};function TL(e){const t=b.useTheme(),n=Ae.useLocales(),{source:r=""}=e,o=Ae.useRecordContext(e),s=o[r],a=!Lf(s,n),c=mr(e,{flex:1}),[A]=Ae.useLocaleState(),d=Q.useMemo(()=>a?f.jsx(_e.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(_e.FlagOutlined,{}),[a]),p=Q.useMemo(()=>f.jsx(b.Stack,{children:ne.map(n,(h,C)=>f.jsx(b.Typography,{children:`${h.locale.toUpperCase()}: ${(s??{})[h.locale]??""}`},C))}),[s,n]);return f.jsx(Gu,{title:p,arrow:!1,children:f.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,f.jsx(_u,{...e,source:`${r}.${A}`,sx:c})]})})}const SL=de("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),PL=({source:e,defaultValue:t="&nbsp;",...n})=>{const r=O.useRecordContext(n),o=dt.get(r,e,t);return f.jsx(b.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})},RL=({title:e,children:t})=>t==null?null:typeof e=="string"||e===!0?f.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t,OL=({label:e,source:t,defaultValue:n="&nbsp;",children:r=f.jsx(PL,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s})=>{const{getCurrentDialog:a}=vi(),c=O.useRecordContext(s),A=O.useResourceContext(s),d=a(),p=Q.useMemo(()=>o===!1?!1:typeof o=="function"?o(c):typeof o=="string"?dt.get(c,o,o):o,[c,o]),h=mr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(RL,{title:p,children:f.jsxs(Q.Fragment,{children:[f.jsx(b.InputLabel,{sx:{pt:1},children:f.jsx(O.FieldTitle,{label:e,source:t,resource:d||A})}),f.jsx(SL,{...s,children:Q.cloneElement(r,{source:t,record:c,defaultValue:n,resource:d||A,sx:h})})]})})},Sp=function({children:e,className:t}){return f.jsx("div",{className:t,children:e})};Sp.defaultProps={children:null,className:""};Sp.propTypes={children:u.node,className:u.string};const jL=Za(Sp,{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}}})),Os=e=>f.jsx(jL,{...e,children:f.jsx(O.ReferenceManyField,{pagination:f.jsx(O.Pagination,{}),...e})});Os.defaultProps={margin:!1,border:!1};Os.propTypes={...O.ReferenceManyField.propTypes,margin:u.bool,border:u.bool};const lb=({source:e,...t})=>{const n=O.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(b.Typography,{component:"span",variant:"body1",...t,children:c})};lb.propTypes={record:u.object,source:u.string};const nt=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:a,...c})=>{const A=_t.useTheme(),{getCurrentDialog:d}=vi(),{source:p,resource:h,isRequired:C}=c,{fieldState:{invalid:m}}=O.useInput(c),I=d();return f.jsxs(b.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:a?`1px solid ${A.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(O.FieldTitle,{label:e,source:p,resource:I||h,isRequired:C})}),Q.isValidElement(t)?Q.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};nt.propTypes={sx:u.object,children:u.element,label:u.oneOfType([u.string,u.bool]),addLabel:u.bool,resource:u.string,isRequired:u.bool,source:u.string,display:u.oneOf(["legend","label"]),helperText:u.oneOfType([u.string,u.bool]),divider:u.bool};nt.defaultProps={display:"label",divider:!1};const DL=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},ML=de(O.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}},...DL(e)})),Pp=({children:e,disabled:t,type:n,...r})=>{const o=O.useRecordContext(r),s=r==null?void 0:r.source,a=o==null?void 0:o.id;return O.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(nt,{...r,children:f.jsx(ML,{disabled:t,children:Q.cloneElement(e,{...e.props,entityId:a,property:s})})})};Pp.propTypes={...O.FileInput.propTypes,children:u.node,multiple:u.bool,disabled:u.bool};Pp.defaultProps={children:f.jsx(Qp,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const kL=de(O.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"}})),Rp=({...e})=>f.jsx(nt,{...e,children:f.jsx(kL,{})});Rp.propTypes={...O.AutocompleteArrayInput.propTypes,...nt.propTypes};Rp.defaultProps={...O.AutocompleteArrayInput.defaultProps,size:"small"};const FL=de(O.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"}})),Op=e=>{const{perPage:t,...n}=e;return f.jsx(nt,{...n,children:f.jsx(FL,{})})};Op.propTypes={...O.AutocompleteInput.propTypes,...nt.propTypes};Op.defaultProps={...O.AutocompleteInput.defaultProps,size:"small"};const LL=de(O.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({marginTop:"0 !important"})),jp=({horizontal:e,...t})=>{const n=Tt();return f.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:f.jsx(LL,{})})};jp.defaultProps={...O.BooleanInput.defaultProps,...nt.defaultProps};jp.propTypes={...O.BooleanInput.propTypes,...nt.propTypes,horizontal:u.bool};const NL=de(O.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Dp=e=>f.jsx(nt,{...e,children:f.jsx(NL,{})});Dp.propTypes={...O.DateInput.propTypes,...nt.propTypes};Dp.defaultProps={...O.DateInput.defaultProps,...nt.defaultProps};const VL=de(O.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Mp=e=>f.jsx(nt,{...e,children:f.jsx(VL,{})});Mp.propTypes={...O.DateTimeInput.propTypes,...nt.propTypes};Mp.defaultProps={...nt.defaultProps};const HL=de(O.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}}})),kp=({children:e,title:t,...n})=>{const r=Bi.useWatch({name:n.source}),o=O.useRecordContext(n),{source:s}=n,a=Q.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=dt.get(o,s);if(c){const A=c.split("__");return A.length>0?A[A.length-1]:c}return c},[o,s,r]);return f.jsx(nt,{...n,children:f.jsx(HL,{children:Q.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]:a}})})})};kp.propTypes={...O.FileInput.propTypes,source:u.string,title:u.string,children:u.node};kp.defaultProps={children:f.jsx(Tp,{})};const Fp=({children:e,title:t,...n})=>{const r=Bi.useWatch({name:n.source}),o=O.useRecordContext(n),{source:s}=n;return O.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),f.jsx(nt,{...n,children:f.jsx(O.ImageInput,{accept:"image/*",children:Q.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}`)}})})})};Fp.defaultProps={children:f.jsx(Xu,{}),multiple:!1};Fp.propTypes={...O.ImageInput.propTypes,source:u.string,title:u.string,children:u.node,multiple:u.bool};const Fn=e=>f.jsx(nt,{...e,children:f.jsx(O.TextInput,{})});Fn.propTypes={...O.TextInput.propTypes,...nt.propTypes};const zL={vertical:"bottom",horizontal:"right"},WL={vertical:"top",horizontal:"right"};function UL(e){const{source:t}=e,{fieldState:n}=Ae.useInput(e),r=Bi.useWatch({name:t}),{error:o}=n,s=Ae.useLocales(),a=!Lf(r,s),[c]=Ae.useLocaleState(),[A,d]=Q.useState(c),[p,h]=Q.useState(null),C=!!p,m=Q.useCallback(v=>h(C?null:v.currentTarget),[C,h]),I=Q.useCallback(()=>h(null),[h]),B=Q.useMemo(()=>ne.map(s,(v,P)=>f.jsx(b.MenuItem,{onClick:()=>{d(v.locale),I()},children:f.jsx(b.ListItemText,{primary:`${v.locale.toUpperCase()}: ${(r??{})[v.locale]??""}`})},P)),[s,d,I,r]);return f.jsx(nt,{...e,helperText:o==null?void 0:o.message,children:f.jsxs(b.Box,{flex:1,children:[ne.map(s,(v,P)=>f.jsx(Fn,{...e,source:`${t}.${v.locale}`,sx:{width:"100%",display:v.locale===A?"inline-flex":"none"},label:!1,InputProps:{endAdornment:f.jsx(b.Chip,{label:f.jsx(b.Typography,{variant:"button",children:A}),size:"small",onClick:m,color:a?"warning":void 0})}},P)),f.jsx(b.Menu,{anchorEl:p,open:C,anchorOrigin:zL,transformOrigin:WL,onClose:I,children:B})]})})}const YL=de(O.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Lp=e=>f.jsx(nt,{...e,children:f.jsx(YL,{})});Lp.propTypes={...O.NumberInput.propTypes,...nt.propTypes};Lp.defaultProps={...O.NumberInput.defaultProps,...nt.defaultProps};const cb=({source:e,minWidth:t=300,children:n})=>{const r=O.useResourceContext(),o=O.useRecordContext(),[s,a]=Q.useState(dt.get(o,e,"")),[c,A]=Q.useState(!1),d=Q.useCallback(I=>a(I.target.value),[]),p=O.useDataProvider(),h=Q.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),C=Q.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]),m=Q.useCallback(I=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return Q.useEffect(()=>a(dt.get(o,e)),[o,e]),n?Q.cloneElement(n,{...n.props,source:e,value:s,onChange:m}):f.jsx(b.TextField,{value:s,disabled:c,onChange:d,onKeyPress:h,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};cb.propTypes={source:u.string.isRequired,minWidth:u.number,children:u.element};const Np=({children:e,...t})=>f.jsx(O.ReferenceArrayInput,{...t,children:Q.cloneElement(e,{...t,source:e.props.source||t.source})});Np.propTypes={...O.ReferenceArrayInput.propTypes,children:u.element};Np.defaultProps={...O.ReferenceArrayInput.defaultProps};const Vp=({children:e,...t})=>f.jsx(O.ReferenceInput,{...t,children:Q.cloneElement(e,{...t,source:e.props.source||t.source})});Vp.propTypes={...O.ReferenceInput.propTypes,children:u.element};Vp.defaultProps={...O.ReferenceInput.defaultProps};const Hp=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>f.jsx(O.ResourceContextProvider,{value:e,children:f.jsx(Os,{perPage:5,pagination:f.jsx(O.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(Q.Fragment,{children:[f.jsx(O.ListToolbar,{filters:r,actions:o}),n]})})});Hp.propTypes={...Os.propTypes,children:u.node.isRequired,reference:u.string.isRequired,target:u.string.isRequired,filters:u.oneOfType([u.element,u.func,u.element,u.arrayOf(u.node)]),actions:u.oneOfType([u.element,u.func,u.element])};Hp.defaultProps={...Os.defaultProps};const GL=de(O.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),KL=e=>f.jsx(GL,{...e}),ub=de(O.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"}}));ub.propTypes={...O.SelectArrayInput.propTypes};const zp=e=>f.jsx(nt,{...e,children:f.jsx(ub,{options:{autoWidth:!1}})});zp.defaultProps={optionText:"name",optionValue:"id"};zp.propTypes={...O.SelectArrayInput.propTypes,...nt.propTypes};const qL=de(O.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),Ab=e=>f.jsx(nt,{...e,children:f.jsx(qL,{})});Ab.propTypes={...O.SelectInput.propTypes,...nt.propTypes};const $u=({...e})=>{var c,A;const t=O.useTranslate(),n=O.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(c=Bi.useController({name:e==null?void 0:e.source}))==null?void 0:c.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 a=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?`${a} - ${t(o)}`:a),f.jsx(Fn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};$u.displayName="SmartTextInput";$u.defaultProps={multiline:!1};$u.propTypes={...Fn.propTypes,maxLength:u.number,multiline:u.bool,rows:u.number};const JL=e=>{if(!e)return"";const t=ZB(e);return t?t.format("HH:mm"):""},XL=e=>e,ZL=de(O.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Wp=e=>f.jsx(nt,{...e,children:f.jsx(ZL,{})});Wp.defaultProps={...O.TimeInput.defaultProps,format:JL,parse:XL};Wp.propTypes={...O.TimeInput.propTypes,...nt.propTypes};const Up=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=xn(),[r,o]=Q.useState(!1),s=Ae.useAuthProvider(),a=Ae.useTranslate(),c=Ae.useNotify(),A=Q.useCallback(d=>{const{oldPassword:p,newPassword:h}=d;o(!0),s==null||s.changePassword(p,h).then(()=>{c("ra.auth.password_changed"),e()}).catch(C=>{c((C==null?void 0:C.message)||(C==null?void 0:C.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return f.jsx(Ae.ResourceContextProvider,{value:"user/change-password",children:f.jsx(Ae.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:f.jsx(qu,{onSubmit:A,toolbar:f.jsx(Er,{children:f.jsx(O.SaveButton,{disabled:r})}),children:f.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Alert,{severity:"warning",children:[f.jsx(b.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Fn,{source:"oldPassword",type:"password",validate:Ae.required()})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Fn,{source:"newPassword",type:"password",validate:Ae.required()})})]})})})})},_L=de(O.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":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.ApplicaLongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}})),$L=de(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),e9=de(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),Yp=({title:e,divider:t,variant:n})=>{const r=O.useTranslate();return f.jsxs(Q.Fragment,{children:[f.jsx($L,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&f.jsx(e9,{})]})};Yp.propTypes={title:u.string.isRequired,divider:u.bool,variant:u.oneOf(["h1","h2","h3","h4","h5","h6"])};Yp.defaultProps={divider:!0,variant:"h4"};const t9=de(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 db(e){const{spacing:t}=xn(),{spacing:n=t}=e,r=ne.omit(e,["spacing"]);return f.jsx(O.Form,{...r,className:"ApplicaLongFormView",children:f.jsx(t9,{container:!0,spacing:n*2,children:e.children})})}function $g(e){return e.id??e.label}function gb(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function n9(e){return ne.map(e,"id")}function ru(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function fb(e,t){const n=e!==void 0?ru(e):0;return ne.chain(t).filter(o=>e!==void 0?gb(e,o.id):!0).filter(o=>ru(o.id)===n+1).value()}function r9(e,t){var s;const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ne.extend(n,{formRootPath:o});case"setSyncWithLocation":return ne.extend(n,{syncWithLocation:o});case"setErrorCount":return ne.extend(n,{errorCount:o});case"setActiveItem":return ne.includes(n9(e.items),o)?ne.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return ne.extend(n,{items:ne.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=ne.isString(o)?o:o.id,c=ne.chain(n.items).clone().reject(A=>A.id===a).value();return ne.extend(n,{items:c}),n.activeItem===a&&ne.extend(n,{activeItem:((s=ne.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const o9={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},pb=Q.createContext(void 0);function hb(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=ps.useLocation(),[s,a]=Q.useReducer(r9,ne.cloneDeep(o9)),{formRootPath:c,items:A}=s,d=Q.useMemo(()=>({state:s,dispatch:a}),[s,a]);return Q.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 h=ne.chain(p).map(m=>ps.matchPath(m,o)).reject(m=>m===null).first().value(),C=h==null?void 0:h.pathnameBase;C!==void 0&&C!==c&&a({type:"setFormRootPath",payload:C})},[o,c,r]),Q.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),Q.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),Q.useEffect(()=>{var p;if(t&&c!==void 0){let h=o.replace(c,"").replace(new RegExp(/^\/?/),"");ne.isEmpty(h)&&(h=((p=ne.chain(A).filter(C=>fb(C.id,A).length===0).orderBy([C=>ru(C.id),C=>C.index]).first().value())==null?void 0:p.id)??void 0),a({type:"setActiveItem",payload:h})}},[a,c,o,A]),f.jsx(pb.Provider,{value:d,children:e.children})}function Cb(){const e=Q.useContext(pb);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function ol(){return Cb().state}function Gp(){return Cb().dispatch}function mb(){return ol().formRootPath}function Eb(){return ol().activeItem}function Ib(){return ol().items}function Bb(){return ol().syncWithLocation}function vb(){return ol().errorCount}function yb(){const e=Gp();return Q.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function bb(){const e=Gp();return Q.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Qb(){const e=Gp();return Q.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var i9=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},xb=e=>e.firstChild?e.firstChild.offsetParent===e:!0,s9=(e,t)=>{let n=e,r=0;xb(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},a9=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Va=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Va="sticky":CSS.supports("position","-webkit-sticky")&&(Va="-webkit-sticky"));var ou=!1;try{const e=Object.defineProperty({},"passive",{get(){ou={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var lg=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}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,ou),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},l9=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}},c9=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=i9(e);let c=!1;const A=()=>{c||requestAnimationFrame(()=>{const F=h();F!==x&&R(F),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const p=F=>{const{offsetTop:X,height:Z}=m,{naturalTop:U}=v,{height:G}=P;return F+X+Z>=U+G+j+o},h=()=>{const{height:F}=m,{height:X}=P;return X+s+o<=F?3:p(d)?1:2},C=a!==window&&xb(a),m=lg({el:a,onChange:A,unsubs:t,measure:({height:F,top:X})=>({height:F,offsetTop:C?X:0})}),I=a9(e),B=I===window?{top:0,bottom:0}:l9(I),v=lg({el:I,onChange:A,unsubs:t,measure:({height:F})=>({height:F-B.top-B.bottom,naturalTop:I===window?0:s9(I,a)+B.top+m.offsetTop})}),P=lg({el:e,onChange:A,unsubs:t,measure:({height:F})=>({height:F})});let j=0,x=h();const R=F=>{const X=x;if(x=F,X===2&&(j=-1),F===3){e.style.position=Va,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:U}=m,{height:G,naturalTop:ae}=v,{height:oe}=P;if(F===2)if(e.style.position="relative",j=X===0?Math.max(0,U+d-ae+s):Math.max(0,U+d+Z-(ae+oe+o)),r){const J=Math.max(0,G-oe-j);e.style.bottom=`${J}px`}else e.style.top=`${j}px`;else e.style.position=Va,F===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-oe-o}px`:r?e.style.bottom=`${Z-oe-o}px`:e.style.top=`${s}px`};R(x);const S=F=>{if(F===d)return;const X=F-d;if(d=F,x===3)return;const{offsetTop:Z,height:U}=m,{naturalTop:G,height:ae}=v,{height:oe}=P;if(X>0)if(x===0){if(F+Z+s>G){const J=Math.max(0,Z+d-G+s);F+Z+U<=G+oe+J+o?R(2):R(1)}}else x===2&&p(F)&&R(1);else if(x===1){if(Z+F+U<G+ae+o){const J=Math.max(0,Z+d+U-(G+oe+o));Z+F+s>=G+J?R(2):R(0)}}else x===2&&Z+F+s<G+j&&R(0)},L=a===window?()=>S(window.scrollY):()=>S(a.scrollTop);a.addEventListener("scroll",L,ou),a.addEventListener("mousewheel",L,ou),t.push(()=>a.removeEventListener("scroll",L),()=>a.removeEventListener("mousewheel",L))},u9=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=Q.useState(null);return Q.useEffect(()=>{if(!r||!Va)return;const s=[];return c9(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},A9=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=u9({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},d9=A9,wb=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(wb||{});function Tb(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ne.omit(e,["sticky","disposition","spacing"]),s=t?d9:b.Box,a=Q.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(b.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(b.Stack,{spacing:r,children:e.children})})})}function Sb(e){return f.jsx(f.Fragment,{children:e.children})}function Pb(e){const{children:t}=e;return Q.useMemo(()=>{const r={top:[],bottom:[]};return Q.Children.forEach(t,o=>{if(Q.isValidElement(o)&&(o==null?void 0:o.type)===Sb){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function Rb(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ne.omit(e,["disposition"]);return f.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function Ob(e){const t=Eb();return t===void 0?!1:e===t||gb(e,t)}function jb(e){const t=Ib();return Q.useMemo(()=>fb(e,t),[t,e])}function g9(){const e=mb(),{search:t}=ps.useLocation(),n=ps.useNavigate();return Q.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function Db(){const e=jb();return f.jsx(b.Card,{variant:"outlined",children:f.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ne.map(e,(t,n)=>f.jsx(Kp,{...t},n))})})}function Kp(e){const t=Ae.useTranslate()??ne.identity,n=Mb(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:A,isGroup:d,level:p,errors:h=0}=n,{spacing:C}=xn(),[m,I]=Q.useState(r),B=Q.useCallback(j=>{I(!m),a(j)},[a,m]),v=s!==void 0,P=ne.omit(e,["label","icon","selected","badge"]);return Q.useEffect(()=>{r&&!m&&I(r)},[r,m,I]),f.jsxs(f.Fragment,{children:[f.jsx(b.ListItem,{...P,disablePadding:!0,children:f.jsxs(b.ListItemButton,{selected:r&&!d,onClick:B,sx:{pl:C*p},children:[v&&f.jsx(b.ListItemIcon,{children:s}),f.jsx(b.ListItemText,{inset:!v,primary:h===0?t(o):f.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c&&f.jsx(b.ListItemAvatar,{children:f.jsx(Na,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}),d&&(m?f.jsx(yn.ExpandLess,{}):f.jsx(yn.ExpandMore,{}))]})}),d&&f.jsx(b.Collapse,{in:m,timeout:"auto",children:f.jsx(b.List,{children:ne.map(A,(j,x)=>f.jsx(Kp,{...j},x))})})]})}function Mb(e){const{id:t}=e,n=Ob(t),r=ru(t),o=g9(),s=Bb(),a=yb(),c=jb(t),A=!ne.isEmpty(c),d=Q.useCallback(h=>{A||(s?o(e.id):a(e.id)),ne.isFunction(e.onClick)&&e.onClick(h)},[a,o,e,s,A]);return Q.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:A,level:r}),[e,n,d,c,A])}function kb(e=[],t){const n=ne.isArray(e)?e:[e],r=ne.filter(n,o=>Q.isValidElement(o));ne.each(r,o=>{var s;t(o),kb(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function Fb(e){const{errors:t}=Bi.useFormState(),n=vb(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,A=$g(e),d=bb(),p=Qb(),h=Ob(A),C=[];n&&(e.sources!==void 0?C.push(...e.sources):kb(c,I=>{var B;((B=I==null?void 0:I.props)==null?void 0:B.source)!==void 0&&C.push(I.props.source)}));const m=ne.chain(C).uniq().map(I=>ne.get(t,I)).reject(I=>I===void 0).value().length;return Q.useEffect(()=>{d({id:A,index:a,label:r,icon:o,badge:s,errors:m})},[d,p,r,o,A,s,a,m]),Q.useEffect(()=>()=>{p(A)},[A]),f.jsx(b.Box,{display:h?"unset":"none",children:e.children})}function Lb(e){const t=qp(e),n=$g(e);return f.jsx(Fb,{...e,id:n,children:Q.Children.map(t,r=>{const o=$g(r.props);return Q.cloneElement(r,{id:`${n}.${o}`})})})}function Nb(e){return f.jsx(Fb,{...e})}function qp(e){const{children:t}=e;return Q.useMemo(()=>ne.chain(Q.Children.toArray(t)).filter(r=>Q.isValidElement(r)&&((r==null?void 0:r.type)===Nb||(r==null?void 0:r.type)===Lb)).map((r,o)=>Q.cloneElement(r,{index:o})).value(),[t])}function f9(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ne.pick(e,["syncWithLocation","errorCount"]),s=ne.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=Pb(e),A=qp(e);return f.jsx(hb,{...o,children:f.jsxs(db,{...s,spacing:r,children:[f.jsxs(Tb,{disposition:t,spacing:r,children:[a,f.jsx(Db,{}),c]}),f.jsx(Rb,{disposition:n,children:A})]})})}const kt=f9;kt.BaseForm=db;kt.Content=Rb;kt.Provider=hb;kt.useItems=Ib;kt.useSyncWithLocation=Bb;kt.useErrorCount=vb;kt.useFormRootPath=mb;kt.useActiveItem=Eb;kt.useSetActiveItem=yb;kt.useAddItem=bb;kt.useRemoveItem=Qb;kt.Sidebar=Tb;kt.SidebarSection=Sb;kt.SidebarSectionPosition=wb;kt.useSidebarChildren=Pb;kt.NavMenu=Db;kt.NavMenuItem=Kp;kt.useNavMenuItem=Mb;kt.Tab=Nb;kt.Group=Lb;kt.useBaseItemChildren=qp;const p9=de(O.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"}})),h9=de(O.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}}})),C9=Za(O.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}})),Jp=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:a,...c}=e,A=Gf(t);return f.jsx($n,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:f.jsx(C9,{toolbar:f.jsx(Er,{}),...c})})};Jp.defaultProps={toolbar:f.jsx(Er,{children:f.jsx(O.SaveButton,{type:"button"})}),secondary:f.jsx(Fo,{children:f.jsx(O.DeleteWithConfirmButton,{})})};Jp.Tab=O.TabbedForm.Tab;const m9=k.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:a,resource:c}=e,A=O.useTranslate(),[d,p]=k.useState(!1),{total:h,remove:C}=gv(),m=k.useCallback(()=>{p(!1),C(s)},[s,C]),I=Q.useMemo(()=>({index:s,total:h,remove:()=>C(s)}),[s,h,C]);return f.jsxs(kf.Provider,{value:I,children:[Q.Children.map(n,(B,v)=>{if(!Q.isValidElement(B))return null;const{source:P,...j}=B.props;return f.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:Q.cloneElement(B,{source:P?`${a}.${P}`:a,index:P?void 0:v,resource:c,disabled:r,...j,label:""})})}),!o&&f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:f.jsx(Fo,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&f.jsx(O.Confirm,{isOpen:d,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var E9=Array.isArray,eA=E9,I9=typeof _n=="object"&&_n&&_n.Object===Object&&_n,B9=I9,v9=B9,y9=typeof self=="object"&&self&&self.Object===Object&&self,b9=v9||y9||Function("return this")(),tA=b9,Q9=tA,x9=Q9.Symbol,nA=x9,A0=nA,Vb=Object.prototype,w9=Vb.hasOwnProperty,T9=Vb.toString,Aa=A0?A0.toStringTag:void 0;function S9(e){var t=w9.call(e,Aa),n=e[Aa];try{e[Aa]=void 0;var r=!0}catch{}var o=T9.call(e);return r&&(t?e[Aa]=n:delete e[Aa]),o}var P9=S9,R9=Object.prototype,O9=R9.toString;function j9(e){return O9.call(e)}var D9=j9,d0=nA,M9=P9,k9=D9,F9="[object Null]",L9="[object Undefined]",g0=d0?d0.toStringTag:void 0;function N9(e){return e==null?e===void 0?L9:F9:g0&&g0 in Object(e)?M9(e):k9(e)}var Xp=N9;function V9(e){return e!=null&&typeof e=="object"}var rA=V9,H9=Xp,z9=rA,W9="[object Symbol]";function U9(e){return typeof e=="symbol"||z9(e)&&H9(e)==W9}var Zp=U9,Y9=eA,G9=Zp,K9=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q9=/^\w*$/;function J9(e,t){if(Y9(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||G9(e)?!0:q9.test(e)||!K9.test(e)||t!=null&&e in Object(t)}var X9=J9;function Z9(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hb=Z9,_9=Xp,$9=Hb,eN="[object AsyncFunction]",tN="[object Function]",nN="[object GeneratorFunction]",rN="[object Proxy]";function oN(e){if(!$9(e))return!1;var t=_9(e);return t==tN||t==nN||t==eN||t==rN}var zb=oN,iN=tA,sN=iN["__core-js_shared__"],aN=sN,cg=aN,f0=function(){var e=/[^.]+$/.exec(cg&&cg.keys&&cg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lN(e){return!!f0&&f0 in e}var cN=lN,uN=Function.prototype,AN=uN.toString;function dN(e){if(e!=null){try{return AN.call(e)}catch{}try{return e+""}catch{}}return""}var gN=dN,fN=zb,pN=cN,hN=Hb,CN=gN,mN=/[\\^$.*+?()[\]{}|]/g,EN=/^\[object .+?Constructor\]$/,IN=Function.prototype,BN=Object.prototype,vN=IN.toString,yN=BN.hasOwnProperty,bN=RegExp("^"+vN.call(yN).replace(mN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QN(e){if(!hN(e)||pN(e))return!1;var t=fN(e)?bN:EN;return t.test(CN(e))}var xN=QN;function wN(e,t){return e==null?void 0:e[t]}var TN=wN,SN=xN,PN=TN;function RN(e,t){var n=PN(e,t);return SN(n)?n:void 0}var oA=RN,ON=oA,jN=ON(Object,"create"),iA=jN,p0=iA;function DN(){this.__data__=p0?p0(null):{},this.size=0}var MN=DN;function kN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var FN=kN,LN=iA,NN="__lodash_hash_undefined__",VN=Object.prototype,HN=VN.hasOwnProperty;function zN(e){var t=this.__data__;if(LN){var n=t[e];return n===NN?void 0:n}return HN.call(t,e)?t[e]:void 0}var WN=zN,UN=iA,YN=Object.prototype,GN=YN.hasOwnProperty;function KN(e){var t=this.__data__;return UN?t[e]!==void 0:GN.call(t,e)}var qN=KN,JN=iA,XN="__lodash_hash_undefined__";function ZN(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=JN&&t===void 0?XN:t,this}var _N=ZN,$N=MN,e7=FN,t7=WN,n7=qN,r7=_N;function js(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])}}js.prototype.clear=$N;js.prototype.delete=e7;js.prototype.get=t7;js.prototype.has=n7;js.prototype.set=r7;var o7=js;function i7(){this.__data__=[],this.size=0}var s7=i7;function a7(e,t){return e===t||e!==e&&t!==t}var l7=a7,c7=l7;function u7(e,t){for(var n=e.length;n--;)if(c7(e[n][0],t))return n;return-1}var sA=u7,A7=sA,d7=Array.prototype,g7=d7.splice;function f7(e){var t=this.__data__,n=A7(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():g7.call(t,n,1),--this.size,!0}var p7=f7,h7=sA;function C7(e){var t=this.__data__,n=h7(t,e);return n<0?void 0:t[n][1]}var m7=C7,E7=sA;function I7(e){return E7(this.__data__,e)>-1}var B7=I7,v7=sA;function y7(e,t){var n=this.__data__,r=v7(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var b7=y7,Q7=s7,x7=p7,w7=m7,T7=B7,S7=b7;function Ds(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])}}Ds.prototype.clear=Q7;Ds.prototype.delete=x7;Ds.prototype.get=w7;Ds.prototype.has=T7;Ds.prototype.set=S7;var P7=Ds,R7=oA,O7=tA,j7=R7(O7,"Map"),D7=j7,h0=o7,M7=P7,k7=D7;function F7(){this.size=0,this.__data__={hash:new h0,map:new(k7||M7),string:new h0}}var L7=F7;function N7(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var V7=N7,H7=V7;function z7(e,t){var n=e.__data__;return H7(t)?n[typeof t=="string"?"string":"hash"]:n.map}var aA=z7,W7=aA;function U7(e){var t=W7(this,e).delete(e);return this.size-=t?1:0,t}var Y7=U7,G7=aA;function K7(e){return G7(this,e).get(e)}var q7=K7,J7=aA;function X7(e){return J7(this,e).has(e)}var Z7=X7,_7=aA;function $7(e,t){var n=_7(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var eV=$7,tV=L7,nV=Y7,rV=q7,oV=Z7,iV=eV;function Ms(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])}}Ms.prototype.clear=tV;Ms.prototype.delete=nV;Ms.prototype.get=rV;Ms.prototype.has=oV;Ms.prototype.set=iV;var Wb=Ms,Ub=Wb,sV="Expected a function";function _p(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(sV);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 a=e.apply(this,r);return n.cache=s.set(o,a)||s,a};return n.cache=new(_p.Cache||Ub),n}_p.Cache=Ub;var aV=_p,lV=aV,cV=500;function uV(e){var t=lV(e,function(r){return n.size===cV&&n.clear(),r}),n=t.cache;return t}var AV=uV,dV=AV,gV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fV=/\\(\\)?/g,pV=dV(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gV,function(n,r,o,s){t.push(o?s.replace(fV,"$1"):r||n)}),t}),hV=pV;function CV(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 Yb=CV,C0=nA,mV=Yb,EV=eA,IV=Zp,BV=1/0,m0=C0?C0.prototype:void 0,E0=m0?m0.toString:void 0;function Gb(e){if(typeof e=="string")return e;if(EV(e))return mV(e,Gb)+"";if(IV(e))return E0?E0.call(e):"";var t=e+"";return t=="0"&&1/e==-BV?"-0":t}var vV=Gb,yV=vV;function bV(e){return e==null?"":yV(e)}var QV=bV,xV=eA,wV=X9,TV=hV,SV=QV;function PV(e,t){return xV(e)?e:wV(e,t)?[e]:TV(SV(e))}var RV=PV,OV=Zp,jV=1/0;function DV(e){if(typeof e=="string"||OV(e))return e;var t=e+"";return t=="0"&&1/e==-jV?"-0":t}var MV=DV,kV=RV,FV=MV;function LV(e,t){t=kV(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[FV(t[n++])];return n&&n==r?e:void 0}var NV=LV,VV=NV;function HV(e,t,n){var r=e==null?void 0:VV(e,t);return r===void 0?n:r}var zV=HV;const WV=io(zV),Kb=e=>{var V,_;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:a=!1,disableRemove:c=!1,enableClearAll:A=!1,className:d,empty:p,template:h={}}=e,[C,m]=Q.useState(!1),{fields:I,remove:B,replace:v,append:P}=O.useArrayInput(e),{resetField:j}=Bi.useFormContext(),x=Tt(),R=Ae.useTranslate(),S=Ae.useRecordContext(e),L=Q.useRef(h||{}),F=Ae.useTranslateLabel(),X=Q.useCallback(M=>{B(M)},[B]);if(I.length>0){const{...M}=I[0];L.current=M;for(const $ in L.current)L.current[$]=null}const Z=Q.useCallback((M=void 0)=>{let $=M;M==null&&($=L.current,Q.Children.count(t)===1&&k.isValidElement(Q.Children.only(t))&&!Q.Children.only(t).props.source&&Q.Children.map(t,q=>k.isValidElement(q)&&q.type!==Ae.FormDataConsumer).some(Boolean)?$="":($=$||{},Q.Children.forEach(t,q=>{k.isValidElement(q)&&q.type!==Ae.FormDataConsumer&&q.props.source&&($[q.props.source]=q.props.defaultValue??null)})));const H={...$,...h};P(H),j(`${r}.${I.length}`,{defaultValue:$})},[P,t,j,r,I.length,h]),U=M=>$=>{Z(),M&&M($)},G=Q.useCallback(()=>{v([]),m(!1)},[v]),ae=WV(S,r),oe=Q.useMemo(()=>({total:I.length,remove:X,source:r}),[I.length,X,r]),J=x.palette.mode==="dark"?x.palette.grey.A400:x.palette.grey.A800,K=I.length>0&&A;return I?f.jsx(Mf.Provider,{value:oe,children:f.jsxs("div",{className:d,children:[k.cloneElement(f.jsx(qb,{}),{label:o,source:r,disableAdd:a,template:h,onClick:U((_=(V=e==null?void 0:e.addButton)==null?void 0:V.props)==null?void 0:_.onClick)}),f.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${J}`},children:f.jsxs(b.Table,{children:[f.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${J}`},children:f.jsxs(b.TableRow,{children:[Q.Children.map(t,(M,$)=>k.isValidElement(M)?f.jsx(b.TableCell,{children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:F({...M.props,resource:n})})},$):null),!s&&(K?f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(Fo,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>m(!0),children:R("ra.action.delete")})})},"actions"):f.jsx(b.TableCell,{},"empty_actions"))]})}),f.jsxs(b.TableBody,{children:[I.length===0&&f.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:p||f.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),I.length>0&&I.map((M,$)=>f.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${J}}`},children:f.jsx(m9,{disableRemove:c,disableActions:s,index:$,member:`${r}.${$}`,onRemoveField:X,record:ae&&ae[$]||{},resource:n,source:r,children:t})},M.id))]})]})}),I.length>0&&f.jsx(O.Confirm,{isOpen:C,title:R("ra.action.clear_array_input"),content:R("ra.message.clear_array_input"),onConfirm:G,onClose:()=>m(!1)})]})}):null},qb=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Tt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,a=o.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:{mt:.5},children:[t!==!1&&f.jsx(b.Typography,{children:t}),!n&&(k.isValidElement(e==null?void 0:e.addButton)?k.cloneElement(e==null?void 0:e.addButton,{onClick:r}):f.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:f.jsx(_e.PlusCircleOutlined,{style:{color:a}})}))]})},UV=de(Kb,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));qb.propTypes={label:u.oneOfType([u.string,u.bool]),source:u.string,defaultValue:u.any};Kb.propTypes={addButton:u.element,children:u.node,className:u.string,field:u.object,fields:u.array,fieldState:u.object,formState:u.object,record:u.object,source:u.string,label:u.oneOfType([u.string,u.bool]),resource:u.string,translate:u.func,disableAdd:u.bool,enableClearAll:u.bool,disableRemove:u.oneOfType([u.func,u.bool]),TransitionProps:u.shape({}),empty:u.oneOfType([u.node,u.string]),template:u.object};function YV(e,t){const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ne.chain(n.media).clone().extend(o).value();return ne.extend(n,{media:s})}case"updateDrawer":{const s=ne.chain(n.drawer).clone().extend(o).value();return ne.extend(n,{drawer:s})}case"updateLogo":{const s=ne.chain(n.logo).clone().extend(o).value();return ne.extend(n,{logo:s})}case"updateNotifications":{const s=ne.chain(n.notifications).clone().extend(o).value();return ne.extend(n,s)}case"updateTheme":{const s=ne.chain(n.theme).clone().extend(o).value();return ne.extend(n,{theme:s})}default:return n}}const GV={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"}},Jb=Q.createContext(void 0);function Xb(e){var Z;const t=Ae.useAuthProvider(),n=Ae.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),a=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:A,menuOrientation:d,drawerWidth:p}=xn(),h=A(d)&&!s,{drawerOpen:C,openDrawer:m}=Ei(),I=Q.useCallback(()=>{m(!C)},[C,m]),[B,v]=Q.useState(!1),[P,j]=Q.useReducer(YV,ne.chain(GV).clone().merge({drawer:{open:!c||C}}).value()),x=Q.useCallback(()=>v(!1),[]),R=Q.useMemo(()=>({state:P,dispatch:j}),[P,j]),{logoIcon:S,logoMain:L,enableNotification:F,notification:X}=e;return Q.useEffect(()=>{j({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:h}})},[d,o,s,a]),Q.useEffect(()=>{j({type:"updateDrawer",payload:{open:C,width:p,handleDrawerToggle:I}})},[C,p,I]),Q.useEffect(()=>{c||m(!a)},[a,c]),Q.useEffect(()=>{j({type:"updateLogo",payload:{main:L,icon:S}})},[S,L]),Q.useEffect(()=>{j({type:"updateNotifications",payload:{enable:F,resource:X??"entities/notification"}})},[F,X]),Q.useEffect(()=>{j({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),Q.useEffect(()=>{t.isImpersonating().then(U=>{var G;v(!U&&((G=n==null?void 0:n.data)==null?void 0:G.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),f.jsxs(Jb.Provider,{value:R,children:[f.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:f.jsx(Up,{onSuccess:x,firstAccess:!0})}),e.children]})}function Zb(e){return Q.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx(Xb,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function $p(){const e=Q.useContext(Jb);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function KV(){return $p().dispatch}function ks(){return $p().state}function ir(){return ks().media}function wi(){return ks().drawer}function _b(){return ks().logo}function lA(){return ks().notifications}function qV(){return ks().theme}const JV={ml:{xs:0,lg:-2}};function $b(){const{open:e,handleDrawerToggle:t}=wi();return f.jsx(Rs,{value:"drawer","aria-label":"open drawer",sx:JV,onChange:t,selected:e,children:e?f.jsx(_e.MenuFoldOutlined,{}):f.jsx(_e.MenuUnfoldOutlined,{})})}function eQ(e){const t=Q.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=ir(),{open:s,width:a}=wi(),c=r?b.AppBar:fv,A=mr(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),d={position:"fixed",color:"inherit",elevation:0,sx:A};return r||ne.extend(d,{open:s}),f.jsx(c,{ref:t,...d,children:f.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx($b,{}),e.children]})})}function XV(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=lA(),c=Ae.useNotify(),A=Ae.useRedirect(),[d]=Ae.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:no().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:()=>{c("resources.notifications.messages.readed.error","warning")}}),p=Q.useCallback(()=>d(),[d]),[h]=Ae.useLocaleState(),C=Q.useMemo(()=>no(n.created).locale(h).fromNow(),[n,h]);return f.jsx(b.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[f.jsx(b.ListItemAvatar,{children:f.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(_e.MessageOutlined,{})})}),f.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),f.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(b.ListItemText,{primary:C,primaryTypographyProps:{variant:"caption"}})]})})}const ZV={width:36,height:36,fontSize:"1rem"},_V={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function tQ(){const{enable:e}=lA();return e?f.jsx($V,{}):null}function $V(){const e=Ae.useTranslate(),t=b.useTheme(),{downMd:n}=ir(),{resource:r}=lA(),[o,s]=Q.useState([]),{data:a,isLoading:c}=Ae.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),A=o.filter(m=>m.readed===null).length,{open:d,anchorEl:p,handleClose:h,handleToggle:C}=Du();return Q.useEffect(()=>{!c&&a&&s(a??[])},[a,c]),f.jsxs(f.Fragment,{children:[f.jsx(Rs,{value:"notifications",selected:d,onChange:C,children:f.jsx(b.Badge,{badgeContent:A,color:"primary",children:f.jsx(_e.BellOutlined,{})})}),f.jsx(b.Popper,{placement:n?"bottom":"bottom-end",open:d,anchorEl:p,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:m})=>f.jsx(Mo,{type:"grow",position:n?"top":"top-right",in:d,...m,children:f.jsx(b.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(b.ClickAwayListener,{onClickAway:h,children:f.jsxs($n,{title:"Notification",elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:A>0&&f.jsx(b.Tooltip,{title:"Mark as all read",children:f.jsx(Ps,{color:"success",size:"small",children:f.jsx(_e.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":ZV,"& .MuiListItemSecondaryAction-root":{..._V,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:o.map((I,B)=>f.jsx(XV,{selected:A>0,notification:I,onClick:h,divider:B<o.length-1},I.id))}),f.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:Bt.Link,onClick:h,children:f.jsx(b.ListItemText,{primary:f.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(b.Divider,{})]})})})})})]})}const eH=()=>{const[e,t]=Q.useState(!1),n=Q.useCallback(()=>t(!1),[t]),r=Q.useCallback(()=>t(!0),[t]),o=Ae.useTranslate();return f.jsxs(Q.Fragment,{children:[f.jsxs(b.ListItemButton,{onClick:r,children:[f.jsx(b.ListItemIcon,{children:f.jsx(yn.Key,{})}),f.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(Up,{onSuccess:n})})]})},tH=()=>{const e=Ae.useLogout(),t=Ae.useTranslate();return f.jsx(Q.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:e,children:[f.jsx(b.ListItemIcon,{children:f.jsx(yn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},nH=()=>{const e=Ae.useTranslate(),t=Ae.useAuthProvider(),n=Q.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=Q.useState(!1);return Q.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(Q.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:n,children:[f.jsx(b.ListItemIcon,{children:f.jsx(yn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function nQ(){var m;const e=b.useTheme(),t=Ae.useDataProvider(),n=Ae.useAuthProvider(),{identity:r}=Ae.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,a]=Q.useState(null),{open:c,anchorEl:A,handleToggle:d,handleClose:p}=Du(),h=Ae.useLogout(),C=Q.useCallback(()=>{h()},[n,h]);return Q.useEffect(()=>{o&&t.getFile("/profile/me/image").then(I=>a(I))},[t,o]),f.jsxs(f.Fragment,{children:[f.jsx(Rs,{sx:{p:.25,width:"auto"},onClick:d,value:"profile",selected:c,children:f.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Na,{alt:(m=r==null?void 0:r.name)==null?void 0:m.toUpperCase(),src:s,size:"xs"}),f.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),f.jsx(pr.Popper,{placement:"bottom-end",open:c,anchorEl:A,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:I})=>{var B;return f.jsx(Mo,{type:"grow",position:"top-right",in:c,...I,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(b.ClickAwayListener,{onClickAway:p,children:f.jsxs($n,{elevation:0,border:!1,content:!1,children:[f.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(b.Grid,{item:!0,children:f.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Na,{alt:"profile user",src:s,sx:{width:32,height:32}}),f.jsxs(b.Stack,{children:[f.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),f.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(",")})]})]})}),f.jsx(b.Grid,{item:!0,children:f.jsx(b.Tooltip,{title:"Logout",children:f.jsx(Ps,{size:"large",sx:{color:"text.primary"},onClick:C,children:f.jsx(_e.LogoutOutlined,{})})})})]})}),f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(eH,{}),f.jsx(tH,{}),f.jsx(nH,{})]})})})]})})})})}})]})}const rQ=e=>{const t=Tt(),{downMd:n}=ir(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Du();return n?f.jsxs(f.Fragment,{children:[f.jsx(Rs,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(_e.MoreOutlined,{})}),f.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:c})=>f.jsx(Mo,{type:"fade",in:r,...c,children:f.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(b.ClickAwayListener,{onClickAway:a,children:f.jsx(b.AppBar,{color:"inherit",children:f.jsx(b.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})};function oQ(e){return f.jsx(b.Box,{...e,flex:1})}function il(e){const{name:t,version:n}=e;return f.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:f.jsxs(b.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}il.propTypes={name:u.string.isRequired,version:u.string.isRequired,copy:u.string};il.defaultProps={copy:"&copy; Applica Software Guru for"};var iQ={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})(iQ);var cA=iQ.exports,ug={};const rH=n4(L6);var I0;function uA(){return I0||(I0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=rH}(ug)),ug}function sQ(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=sQ(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function aQ(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=sQ(e))&&(r&&(r+=" "),r+=t);return r}var oH="__lodash_hash_undefined__";function iH(e){return this.__data__.set(e,oH),this}var sH=iH;function aH(e){return this.__data__.has(e)}var lH=aH,cH=Wb,uH=sH,AH=lH;function iu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new cH;++t<n;)this.add(e[t])}iu.prototype.add=iu.prototype.push=uH;iu.prototype.has=AH;var lQ=iu;function dH(e,t){return e.has(t)}var cQ=dH;function gH(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var uQ=gH;function fH(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var pH=fH,hH=Xp,CH=rA,mH="[object Arguments]";function EH(e){return CH(e)&&hH(e)==mH}var IH=EH,B0=IH,BH=rA,AQ=Object.prototype,vH=AQ.hasOwnProperty,yH=AQ.propertyIsEnumerable,bH=B0(function(){return arguments}())?B0:function(e){return BH(e)&&vH.call(e,"callee")&&!yH.call(e,"callee")},QH=bH,xH=9007199254740991;function wH(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xH}var TH=wH;function SH(e){return function(t){return e(t)}}var PH=SH,RH=zb,OH=TH;function jH(e){return e!=null&&OH(e.length)&&!RH(e)}var DH=jH,MH=oA,kH=tA,FH=MH(kH,"Set"),LH=FH,ef=globalThis&&globalThis.__assign||function(){return ef=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},ef.apply(this,arguments)},NH=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},dQ=function(e){var t=e.className,n=e.sx,r=NH(e,["className","sx"]),o=Ae.useLoading(),s=Tt();return k.createElement(VH,{className:t,sx:n},o?k.createElement(Bp,ef({className:aQ("app-loader",su.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):k.createElement(NQ,{className:su.loadedIcon}))};dQ.propTypes={classes:u.object,className:u.string,width:u.string};var tf="RaLoadingIndicator",su={loader:"".concat(tf,"-loader"),loadedIcon:"".concat(tf,"-loadedIcon")},VH=de("div",{name:tf,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(su.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(su.loadedIcon)]={},t});const eh=e=>e.scrollTop;function vs(e,t){var n,r;const{timeout:o,easing:s,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:a.transitionDelay}}const HH=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function zH(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=Ts(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const d=s.getComputedStyle(t);a=d.getPropertyValue("-webkit-transform")||d.getPropertyValue("transform")}let c=0,A=0;if(a&&a!=="none"&&typeof a=="string"){const d=a.split("(")[1].split(")")[0].split(",");c=parseInt(d[4],10),A=parseInt(d[5],10)}return e==="left"?o?`translateX(${o.right+c-r.left}px)`:`translateX(${s.innerWidth+c-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-c}px)`:`translateX(-${r.left+r.width-c}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 gQ(e){return typeof e=="function"?e():e}function Cc(e,t,n){const r=gQ(n),o=zH(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const fQ=k.forwardRef(function(t,n){const r=Tt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:A,container:d,direction:p="down",easing:h=o,in:C,onEnter:m,onEntered:I,onEntering:B,onExit:v,onExited:P,onExiting:j,style:x,timeout:R=s,TransitionComponent:S=hp}=t,L=Ke(t,HH),F=k.useRef(null),X=Ln(A.ref,F,n),Z=M=>$=>{M&&($===void 0?M(F.current):M(F.current,$))},U=Z((M,$)=>{Cc(p,M,d),eh(M),m&&m(M,$)}),G=Z((M,$)=>{const H=vs({timeout:R,style:x,easing:h},{mode:"enter"});M.style.webkitTransition=r.transitions.create("-webkit-transform",z({},H)),M.style.transition=r.transitions.create("transform",z({},H)),M.style.webkitTransform="none",M.style.transform="none",B&&B(M,$)}),ae=Z(I),oe=Z(j),J=Z(M=>{const $=vs({timeout:R,style:x,easing:h},{mode:"exit"});M.style.webkitTransition=r.transitions.create("-webkit-transform",$),M.style.transition=r.transitions.create("transform",$),Cc(p,M,d),v&&v(M)}),K=Z(M=>{M.style.webkitTransition="",M.style.transition="",P&&P(M)}),V=M=>{a&&a(F.current,M)},_=k.useCallback(()=>{F.current&&Cc(p,F.current,d)},[p,d]);return k.useEffect(()=>{if(C||p==="down"||p==="right")return;const M=bB(()=>{F.current&&Cc(p,F.current,d)}),$=Ts(F.current);return $.addEventListener("resize",M),()=>{M.clear(),$.removeEventListener("resize",M)}},[p,C,d]),k.useEffect(()=>{C||_()},[C,_]),f.jsx(S,z({nodeRef:F,onEnter:U,onEntered:ae,onEntering:G,onExit:J,onExited:K,onExiting:oe,addEndListener:V,appear:c,in:C,timeout:R},L,{children:(M,$)=>k.cloneElement(A,z({ref:X,style:z({visibility:M==="exited"&&!C?"hidden":void 0},x,A.props.style)},$))}))});process.env.NODE_ENV!=="production"&&(fQ.propTypes={addEndListener:u.func,appear:u.bool,children:ws.isRequired,container:jr(u.oneOfType([Ci,u.func]),e=>{if(e.open){const t=gQ(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(`
221
+ `),_6)),Jy=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,size:c=40,style:A,thickness:d=3.6,value:p=0,variant:h="indeterminate"}=r,C=Ke(r,X6),m=z({},r,{color:s,disableShrink:a,size:c,thickness:d,value:p,variant:h}),I=$6(m),B={},v={},P={};if(h==="determinate"){const j=2*Math.PI*((mo-d)/2);B.strokeDasharray=j.toFixed(3),P["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*j).toFixed(3)}px`,v.transform="rotate(-90deg)"}return f.jsx(eL,z({className:Ge(I.root,o),style:z({width:c,height:c},v,A),ownerState:m,ref:n,role:"progressbar"},P,C,{children:f.jsx(tL,{className:I.svg,ownerState:m,viewBox:`${mo/2} ${mo/2} ${mo} ${mo}`,children:f.jsx(nL,{className:I.circle,style:B,ownerState:m,cx:mo,cy:mo,r:(mo-d)/2,fill:"none",strokeWidth:d})})}))});process.env.NODE_ENV!=="production"&&(Jy.propTypes={classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","primary","secondary","error","info","success","warning"]),u.string]),disableShrink:jr(u.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:u.oneOfType([u.number,u.string]),style:u.object,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),thickness:u.number,value:u.number,variant:u.oneOf(["determinate","indeterminate"])});const Bp=Jy;function rL(e){return Nt("MuiLoadingButton",e)}const oL=Ut("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),Gr=oL,iL=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],sL=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Se(n)}`],endIcon:[t&&`endIconLoading${Se(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Se(n)}`]},s=pr.unstable_composeClasses(o,rL,r);return z({},r,s)},aL=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",lL=de(q6,{shouldForwardProp:e=>aL(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Gr.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Gr.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>z({[`& .${Gr.startIconLoadingStart}, & .${Gr.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}),[`&.${Gr.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Gr.startIconLoadingStart}, & .${Gr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Gr.startIconLoadingStart}, & .${Gr.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),cL=de("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Se(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>z({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})),Xy=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:a,loading:c=!1,loadingIndicator:A,loadingPosition:d="center",variant:p="text"}=r,h=Ke(r,iL),C=hf(a),m=A??f.jsx(Bp,{"aria-labelledby":C,color:"inherit",size:16}),I=z({},r,{disabled:s,loading:c,loadingIndicator:m,loadingPosition:d,variant:p}),B=sL(I),v=c?f.jsx(cL,{className:B.loadingIndicator,ownerState:I,children:m}):null;return f.jsxs(lL,z({disabled:s||c,id:C,ref:n},h,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?o:v,I.loadingPosition==="end"?v:o]}))});process.env.NODE_ENV!=="production"&&(Xy.propTypes={children:u.node,classes:u.object,disabled:u.bool,id:u.string,loading:u.bool,loadingIndicator:u.node,loadingPosition:jr(u.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:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),variant:u.oneOfType([u.oneOf(["contained","outlined","text"]),u.string])});const uL=Xy;function ag({variant:e,theme:t,color:n,loadingPosition:r}){const o=an(t,n),{lighter:s,main:a,dark:c,contrastText:A}=o,d=`${n}Button`,p=Ss(t,d),h={"& .MuiLoadingButton-loadingIndicator":{color:a}},C={...r&&r!=="center"&&{color:a}},m={"&::after":{boxShadow:`0 0 6px 6px ${ze(a,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${ze(a,.9)}`},"&:focus-visible":{outline:`2px solid ${c}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:a,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:c,color:A},...m};case"light":return{backgroundColor:a,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:c,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:a,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:c,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:a,...C,...h};case"dashed":return{backgroundColor:s,borderColor:a,...C,...h,...m};case"text":default:return{color:a,...h,...m}}}const AL=de(uL,{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"&&{...ag({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"&&{...ag({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...ag({variant:t,theme:e,color:r,loadingPosition:s})}}})),vp=Q.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const a=Tt();return f.jsx(AL,{ref:s,variant:e,shape:t,theme:a,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});vp.propTypes={variant:u.string,shape:u.string,children:u.node,color:u.string};vp.displayName="LoadingButton";function dL({color:e,theme:t,labelColor:n}){const r=an(t,e),{main:o,contrastText:s}=r;let a=e||"";return["primary","secondary","info","success","warning","error"].includes(a)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:a,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:a}}}const gL=de(({className:e,...t})=>f.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&dL({color:t,theme:e,labelColor:n})}));function Gu({children:e,arrow:t,labelColor:n="",...r}){const o=Tt();return f.jsx(b.Box,{display:"flex",children:f.jsx(gL,{arrow:t,...r,theme:o,labelColor:n,children:e})})}Gu.propTypes={children:u.element,arrow:u.bool,labelColor:u.string,rest:u.array};const Mo=Q.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let a={transformOrigin:"0 0 0"};switch(t){case"top-right":a={transformOrigin:"top right"};break;case"top":a={transformOrigin:"top"};break;case"bottom-left":a={transformOrigin:"bottom left"};break;case"bottom-right":a={transformOrigin:"bottom right"};break;case"bottom":a={transformOrigin:"bottom"};break;case"top-left":default:a={transformOrigin:"0 0 0"};break}return f.jsxs(b.Box,{ref:s,children:[n==="grow"&&f.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="collapse"&&f.jsx(b.Collapse,{...o,sx:a,children:e}),n==="fade"&&f.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="slide"&&f.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:f.jsx(b.Box,{sx:a,children:e})}),n==="zoom"&&f.jsx(b.Zoom,{...o,children:f.jsx(b.Box,{sx:a,children:e})})]})});Mo.propTypes={children:u.node,type:u.oneOf(["grow","fade","collapse","slide","zoom"]),position:u.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:u.oneOf(["up","down","left","right"])};Q.forwardRef(function(t,n){return f.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Zy({value:e,...t}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Zy.propTypes={value:u.number};function _y({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:a,...c}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...c,value:100}),o&&f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),f.jsx(b.CircularProgress,{variant:n,sx:{...a,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...c})]})}_y.propTypes={value:u.number,size:u.number,variant:u.string,thickness:u.number,showLabel:u.bool,pathColor:u.string,sx:u.array,others:u.array};function $y({icon:e,value:t,...n}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),f.jsx(b.Box,{sx:{minWidth:35},children:e})]})}$y.propTypes={icon:u.node,value:u.number};function eb({value:e,...t}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),f.jsx(b.Box,{sx:{minWidth:35},children:f.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}eb.propTypes={value:u.number};const fL=Q.forwardRef(function(t,n){const r=mr(t,{color:"text.primary"},{defaults:!0});return f.jsx(Ps,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Rs=Q.forwardRef(function(t,n){const r=mr(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})}),tb=Q.createContext({});function pL(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=O.useResourceContext(),o=O.useDataProvider(),{search:s}=ps.useLocation(),a=`${r}/new`,c=Q.useCallback(()=>{if(!t||!ne.isFunction(o.get))return Promise.resolve({});const C={};return new URLSearchParams(s??"").forEach((m,I)=>{C[I]=m}),o.get(a,C).then(m=>m.data).then(m=>{const{responseCode:I,value:B}=m;return I==="ok"?B:Promise.reject(m)})},[r,t,s,o]),A=Q.useMemo(()=>ne.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:p}=us.useQuery(A),h=ne.omit(e,["useDefaults"]);return p?f.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(b.CircularProgress,{})}):f.jsx(tb.Provider,{value:d??{},children:f.jsx(O.Create,{...h})})}function hL(){return Q.useContext(tb)}const CL=de(pL,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaCreate-main:has(.ApplicaLongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}})),mL=Za(O.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)}})),Er=e=>f.jsx(mL,{...e});Er.defaultProps={...O.Toolbar.defaultProps};Er.propTypes={...O.Toolbar.propTypes};const yp=({children:e,content:t,title:n,subheader:r,secondary:o,toolbar:s,...a})=>{const c=O.useTranslate(),A=O.useResourceContext(),{cardTitle:d,cardSubheader:p}=Q.useMemo(()=>{const h=n||`resources.${A}.title`;return{cardTitle:c(h,{_:h}),cardSubheader:r!==null?c(r,{_:r}):null}},[A,r,n,c]);return f.jsx(b.Grid,{item:!0,...a,children:f.jsx($n,{content:t,title:d,subheader:p,secondary:o,divider:!0,children:f.jsxs(Q.Fragment,{children:[e,s===!0?f.jsx(Er,{children:f.jsx(O.SaveButton,{})}):s]})})})};yp.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12};yp.propTypes={...b.Grid.propTypes,children:u.oneOfType([u.node,u.arrayOf(u.node)]),contained:u.bool,content:u.bool,subheader:u.oneOfType([u.string,u.node]),title:u.oneOfType([u.string,u.node]),secondary:u.oneOfType([u.node,u.string,u.object]),spacing:u.number,toolbar:u.oneOfType([u.node,u.bool])};const EL=de(O.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),Ku=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:o}=xn();return f.jsx(EL,{defaultValues:n,spacing:t||o,children:f.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})};Ku.propTypes={...b.Grid.propTypes,...O.Form.propTypes,children:u.oneOfType([u.node,u.arrayOf(u.node)]),spacing:u.number,defaultValues:u.oneOfType([u.object,u.func]),record:u.object,validate:u.func};Ku.defaultProps={...b.Stack.defaultProps};Ku.Section=yp;const IL=Za(O.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}})),qu=({title:e,modal:t,content:n,subheader:r,secondary:o,sx:s,...a})=>{const c=Gf(e),A=O.useRecordContext();return f.jsx($n,{content:n,title:c,subheader:r,secondary:A!=null&&A.id?o:null,sx:{...s,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!t,divider:!0,children:f.jsx(IL,{toolbar:f.jsx(Er,{}),...a})})};qu.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:f.jsx(Er,{children:f.jsx(O.SaveButton,{type:"button"})}),secondary:f.jsx(Fo,{children:f.jsx(O.DeleteWithConfirmButton,{})})};qu.propTypes={...O.SimpleForm.propTypes,modal:u.bool,content:u.bool,contained:u.bool,subheader:u.oneOfType([u.string,u.node]),title:u.oneOfType([u.string,u.node]),secondary:u.oneOfType([u.node,u.string,u.object])};const Ju=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:a,fullWidth:c,...A})=>{const d=_t.useTheme(),{getCurrentDialog:p}=vi(),{source:h,resource:C,isRequired:m}=A,{getFieldState:I,formState:B}=Bi.useFormContext(),{error:v}=I(h,B),P=p();return f.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:v?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:!!v,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(O.FieldTitle,{label:e,source:h,resource:P||C,isRequired:m})}),Q.isValidElement(t)?Q.cloneElement(t,{...t.props,...A,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!v,children:r})]})};Ju.propTypes={sx:u.object,children:u.element,label:u.oneOfType([u.string,u.bool]),addLabel:u.bool,resource:u.string,isRequired:u.bool,source:u.string,display:u.oneOf(["legend","label"]),helperText:u.oneOfType([u.string,u.bool]),divider:u.bool};Ju.defaultProps={display:"label",divider:!1};const BL=de(O.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%"}}})),vL=({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s})=>f.jsx(Ju,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(BL,{source:n,label:!1,...s})}),bp=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:f.jsxs(Fo,{children:[e&&f.jsx(O.EditButton,{}),t&&f.jsx(O.DeleteWithConfirmButton,{}),n&&f.jsx(O.CloneButton,{})]});bp.defaultProps={canEdit:!0,canDelete:!0,canClone:!1};bp.propTypes={canEdit:u.bool,canDelete:u.bool,canClone:u.bool};const u0=de("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),yL=de("ul")({display:"inline-block"}),nb=e=>{var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=Ae.useRecordContext(e),c=dt.get(a,r),A=Ae.useTranslate();if(!c)return n?f.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&A(n,{_:n})}):f.jsx(u0,{className:t,...s});if(Array.isArray(c))return f.jsx(yL,{className:t,...s,children:c.map((h,C)=>{var I;const m=o instanceof String?(I=dt.get(h,o))==null?void 0:I.toString():o;return f.jsx("li",{children:m},C)})});const d=o instanceof String?(p=dt.get(a,o))==null?void 0:p.toString():o;return f.jsx(u0,{className:t,...s,children:d})};nb.propTypes={className:u.string,emptyText:u.string,source:u.string.isRequired,src:u.string,title:u.oneOfType([u.string,u.element]),target:u.string,download:u.oneOfType([u.bool,u.string]),ping:u.string,rel:u.string};const Qp=({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",...s})=>{const[a,c]=Q.useState(null),A=O.useRecordContext(s),d=O.useDataProvider(),p=O.useResourceContext(),h=Q.useCallback(async I=>{I.preventDefault(),I.stopPropagation();const B=dt.get(A,s==null?void 0:s.source),v=p.replace("entities/",""),P=await d.getFile(`/attachments/${v}/${e||(A==null?void 0:A.id)}/${t||(s==null?void 0:s.source)}/${(B==null?void 0:B.id)||(A==null?void 0:A.id)}`),j=document.createElement("a");j.href=P,j.download=dt.get(A,(s==null?void 0:s.title)||(s==null?void 0:s.source)),j.click()},[d,A,e,p,t,s==null?void 0:s.source,s==null?void 0:s.title]),C=Q.useMemo(()=>({...A,[s==null?void 0:s.source]:(A==null?void 0:A.src)||dt.get(A,s==null?void 0:s.source),[s==null?void 0:s.title]:(A==null?void 0:A.title)||dt.get(A,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),[A,s==null?void 0:s.source,s==null?void 0:s.title]),m=O.useTranslate();return Q.useEffect(()=>{!A||!(A!=null&&A.userId)||r===!1||d.getOne(o,{id:A==null?void 0:A.userId}).then(({data:I})=>c(I)).catch(()=>c(null))},[A,d,o]),f.jsx(nb,{...s,disabled:n,record:C,onClick:h,title:f.jsxs(b.Box,{sx:{cursor:"pointer"},children:[f.jsx(b.Typography,{variant:"subtitle1",children:dt.get(C,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),f.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[dt.get(C,"sizeDescription"),r&&a&&" | ",r&&a&&m("ra.attachment.info",{user:a==null?void 0:a.name,created:no(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Qp.propTypes={...O.FileField.propTypes,source:u.string,title:u.string,disabled:u.bool};const bL=de(O.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),rl=e=>{const t=`_${e==null?void 0:e.source}`;return f.jsx(bL,{...e,source:t})};rl.propTypes={...O.ImageField.propTypes,source:u.string};const Xu=({width:e,height:t,circle:n,justify:r,record:o,...s})=>{const a=Q.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]),c=O.useRecordContext(),A=o||c;return f.jsx(rl,{sx:d=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${d.palette.divider}`,objectFit:"cover !important",...a,minWidth:a.width,minHeight:a.height}}),...s,record:A})};Xu.defaultProps={...rl.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"};Xu.propTypes={...rl.propTypes,width:u.oneOfType([u.number,u.string]),height:u.oneOfType([u.number,u.string]),circle:u.bool,justify:u.oneOf(["flex-start","center","flex-end"])};var rb={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(_n,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={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 c(d,p,h,C){return s.fromToBase(d,p,h,C)}o.en.relativeTime=a,s.fromToBase=function(d,p,h,C,m){for(var I,B,v,P=h.$locale().relativeTime||a,j=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],x=j.length,R=0;R<x;R+=1){var S=j[R];S.d&&(I=C?o(d).diff(h,S.d,!0):h.diff(d,S.d,!0));var L=(n.rounding||Math.round)(Math.abs(I));if(v=I>0,L<=S.r||!S.r){L<=1&&R>0&&(S=j[R-1]);var F=P[S.l];m&&(L=m(""+L)),B=typeof F=="string"?F.replace("%d",L):F(L,p,S.l,v);break}}if(p)return B;var X=v?P.future:P.past;return typeof X=="function"?X(B):X.replace("%s",B)},s.to=function(d,p){return c(d,p,this,!0)},s.from=function(d,p){return c(d,p,this)};var A=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(A(this),d)},s.fromNow=function(d){return this.from(A(this),d)}}})})(rb);var QL=rb.exports;const xL=io(QL);no.extend(xL);const Zu=e=>{const t=O.useRecordContext(e),[n]=O.useLocaleState(),r=Q.useMemo(()=>no(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(Q.Fragment,{children:[f.jsx(O.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Zu.displayName="DateAgoField";Zu.propTypes={source:u.string.isRequired};const ob=de(O.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));ob.propTypes={...O.DateField.propTypes};const xp=e=>f.jsx(ob,{...e});xp.defaultProps={...O.DateField.defaultProps,variant:"body1"};xp.propTypes={...O.DateField.propTypes};const ib=de(O.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));ib.propTypes={...O.EmailField.propTypes};const wp=e=>f.jsx(ib,{...e});wp.defaultProps={...O.EmailField.defaultProps,variant:"body1"};wp.propTypes={...O.EmailField.propTypes};const wL=de(O.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),Tp=({...e})=>{const t=O.useRecordContext(e),n=Q.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),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(wL,{...e,record:t,onClick:n})};Tp.propTypes={...O.FileField.propTypes,source:u.string,title:u.string};const sb=e=>f.jsx(O.FunctionField,{...e});sb.defaultProps={variant:"body1"};const ab=de(O.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));ab.propTypes={...O.TextField.propTypes};const _u=e=>f.jsx(ab,{...e});_u.defaultProps={...O.TextField.defaultProps,variant:"body1"};_u.propTypes={...O.TextField.propTypes};function TL(e){const t=b.useTheme(),n=Ae.useLocales(),{source:r=""}=e,o=Ae.useRecordContext(e),s=o[r],a=!Lf(s,n),c=mr(e,{flex:1}),[A]=Ae.useLocaleState(),d=Q.useMemo(()=>a?f.jsx(_e.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(_e.FlagOutlined,{}),[a]),p=Q.useMemo(()=>f.jsx(b.Stack,{children:ne.map(n,(h,C)=>f.jsx(b.Typography,{children:`${h.locale.toUpperCase()}: ${(s??{})[h.locale]??""}`},C))}),[s,n]);return f.jsx(Gu,{title:p,arrow:!1,children:f.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,f.jsx(_u,{...e,source:`${r}.${A}`,sx:c})]})})}const SL=de("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),PL=({source:e,defaultValue:t="&nbsp;",...n})=>{const r=O.useRecordContext(n),o=dt.get(r,e,t);return f.jsx(b.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})},RL=({title:e,children:t})=>t==null?null:typeof e=="string"||e===!0?f.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t,OL=({label:e,source:t,defaultValue:n="&nbsp;",children:r=f.jsx(PL,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s})=>{const{getCurrentDialog:a}=vi(),c=O.useRecordContext(s),A=O.useResourceContext(s),d=a(),p=Q.useMemo(()=>o===!1?!1:typeof o=="function"?o(c):typeof o=="string"?dt.get(c,o,o):o,[c,o]),h=mr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(RL,{title:p,children:f.jsxs(Q.Fragment,{children:[f.jsx(b.InputLabel,{sx:{pt:1},children:f.jsx(O.FieldTitle,{label:e,source:t,resource:d||A})}),f.jsx(SL,{...s,children:Q.cloneElement(r,{source:t,record:c,defaultValue:n,resource:d||A,sx:h})})]})})},Sp=function({children:e,className:t}){return f.jsx("div",{className:t,children:e})};Sp.defaultProps={children:null,className:""};Sp.propTypes={children:u.node,className:u.string};const jL=Za(Sp,{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}}})),Os=e=>f.jsx(jL,{...e,children:f.jsx(O.ReferenceManyField,{pagination:f.jsx(O.Pagination,{}),...e})});Os.defaultProps={margin:!1,border:!1};Os.propTypes={...O.ReferenceManyField.propTypes,margin:u.bool,border:u.bool};const lb=({source:e,...t})=>{const n=O.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(b.Typography,{component:"span",variant:"body1",...t,children:c})};lb.propTypes={record:u.object,source:u.string};const nt=({label:e,children:t,display:n,helperText:r,sx:o,addLabel:s,divider:a,...c})=>{const A=_t.useTheme(),{getCurrentDialog:d}=vi(),{source:p,resource:h,isRequired:C}=c,{fieldState:{invalid:m}}=O.useInput(c),I=d();return f.jsxs(b.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:a?`1px solid ${A.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(O.FieldTitle,{label:e,source:p,resource:I||h,isRequired:C})}),Q.isValidElement(t)?Q.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};nt.propTypes={sx:u.object,children:u.element,label:u.oneOfType([u.string,u.bool]),addLabel:u.bool,resource:u.string,isRequired:u.bool,source:u.string,display:u.oneOf(["legend","label"]),helperText:u.oneOfType([u.string,u.bool]),divider:u.bool};nt.defaultProps={display:"label",divider:!1};const DL=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},ML=de(O.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}},...DL(e)})),Pp=({children:e,disabled:t,type:n,...r})=>{const o=O.useRecordContext(r),s=r==null?void 0:r.source,a=o==null?void 0:o.id;return O.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(nt,{...r,children:f.jsx(ML,{disabled:t,children:Q.cloneElement(e,{...e.props,entityId:a,property:s})})})};Pp.propTypes={...O.FileInput.propTypes,children:u.node,multiple:u.bool,disabled:u.bool};Pp.defaultProps={children:f.jsx(Qp,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const kL=de(O.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"}})),Rp=({...e})=>f.jsx(nt,{...e,children:f.jsx(kL,{})});Rp.propTypes={...O.AutocompleteArrayInput.propTypes,...nt.propTypes};Rp.defaultProps={...O.AutocompleteArrayInput.defaultProps,size:"small"};const FL=de(O.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"}})),Op=e=>{const{perPage:t,...n}=e;return f.jsx(nt,{...n,children:f.jsx(FL,{})})};Op.propTypes={...O.AutocompleteInput.propTypes,...nt.propTypes};Op.defaultProps={...O.AutocompleteInput.defaultProps,size:"small"};const LL=de(O.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({marginTop:"0 !important"})),jp=({horizontal:e,...t})=>{const n=Tt();return f.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:f.jsx(LL,{})})};jp.defaultProps={...O.BooleanInput.defaultProps,...nt.defaultProps};jp.propTypes={...O.BooleanInput.propTypes,...nt.propTypes,horizontal:u.bool};const NL=de(O.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Dp=e=>f.jsx(nt,{...e,children:f.jsx(NL,{})});Dp.propTypes={...O.DateInput.propTypes,...nt.propTypes};Dp.defaultProps={...O.DateInput.defaultProps,...nt.defaultProps};const VL=de(O.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Mp=e=>f.jsx(nt,{...e,children:f.jsx(VL,{})});Mp.propTypes={...O.DateTimeInput.propTypes,...nt.propTypes};Mp.defaultProps={...nt.defaultProps};const HL=de(O.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}}})),kp=({children:e,title:t,...n})=>{const r=Bi.useWatch({name:n.source}),o=O.useRecordContext(n),{source:s}=n,a=Q.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=dt.get(o,s);if(c){const A=c.split("__");return A.length>0?A[A.length-1]:c}return c},[o,s,r]);return f.jsx(nt,{...n,children:f.jsx(HL,{children:Q.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]:a}})})})};kp.propTypes={...O.FileInput.propTypes,source:u.string,title:u.string,children:u.node};kp.defaultProps={children:f.jsx(Tp,{})};const Fp=({children:e,title:t,...n})=>{const r=Bi.useWatch({name:n.source}),o=O.useRecordContext(n),{source:s}=n;return O.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),f.jsx(nt,{...n,children:f.jsx(O.ImageInput,{accept:"image/*",children:Q.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}`)}})})})};Fp.defaultProps={children:f.jsx(Xu,{}),multiple:!1};Fp.propTypes={...O.ImageInput.propTypes,source:u.string,title:u.string,children:u.node,multiple:u.bool};const Fn=e=>f.jsx(nt,{...e,children:f.jsx(O.TextInput,{})});Fn.propTypes={...O.TextInput.propTypes,...nt.propTypes};const zL={vertical:"bottom",horizontal:"right"},WL={vertical:"top",horizontal:"right"};function UL(e){const{source:t}=e,{fieldState:n}=Ae.useInput(e),r=Bi.useWatch({name:t}),{error:o}=n,s=Ae.useLocales(),a=!Lf(r,s),[c]=Ae.useLocaleState(),[A,d]=Q.useState(c),[p,h]=Q.useState(null),C=!!p,m=Q.useCallback(v=>h(C?null:v.currentTarget),[C,h]),I=Q.useCallback(()=>h(null),[h]),B=Q.useMemo(()=>ne.map(s,(v,P)=>f.jsx(b.MenuItem,{onClick:()=>{d(v.locale),I()},children:f.jsx(b.ListItemText,{primary:`${v.locale.toUpperCase()}: ${(r??{})[v.locale]??""}`})},P)),[s,d,I,r]);return f.jsx(nt,{...e,helperText:o==null?void 0:o.message,children:f.jsxs(b.Box,{flex:1,children:[ne.map(s,(v,P)=>f.jsx(Fn,{...e,source:`${t}.${v.locale}`,sx:{width:"100%",display:v.locale===A?"inline-flex":"none"},label:!1,InputProps:{endAdornment:f.jsx(b.Chip,{label:f.jsx(b.Typography,{variant:"button",children:A}),size:"small",onClick:m,color:a?"warning":void 0})}},P)),f.jsx(b.Menu,{anchorEl:p,open:C,anchorOrigin:zL,transformOrigin:WL,onClose:I,children:B})]})})}const YL=de(O.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Lp=e=>f.jsx(nt,{...e,children:f.jsx(YL,{})});Lp.propTypes={...O.NumberInput.propTypes,...nt.propTypes};Lp.defaultProps={...O.NumberInput.defaultProps,...nt.defaultProps};const cb=({source:e,minWidth:t=300,children:n})=>{const r=O.useResourceContext(),o=O.useRecordContext(),[s,a]=Q.useState(dt.get(o,e,"")),[c,A]=Q.useState(!1),d=Q.useCallback(I=>a(I.target.value),[]),p=O.useDataProvider(),h=Q.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e}}).then(()=>A(!1)))},[s,p,r,o,e]),C=Q.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]),m=Q.useCallback(I=>{A(!0),p.update(r,{id:o.id,data:{...o,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,o]);return Q.useEffect(()=>a(dt.get(o,e)),[o,e]),n?Q.cloneElement(n,{...n.props,source:e,value:s,onChange:m}):f.jsx(b.TextField,{value:s,disabled:c,onChange:d,onKeyPress:h,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};cb.propTypes={source:u.string.isRequired,minWidth:u.number,children:u.element};const Np=({children:e,...t})=>f.jsx(O.ReferenceArrayInput,{...t,children:Q.cloneElement(e,{...t,source:e.props.source||t.source})});Np.propTypes={...O.ReferenceArrayInput.propTypes,children:u.element};Np.defaultProps={...O.ReferenceArrayInput.defaultProps};const Vp=({children:e,...t})=>f.jsx(O.ReferenceInput,{...t,children:Q.cloneElement(e,{...t,source:e.props.source||t.source})});Vp.propTypes={...O.ReferenceInput.propTypes,children:u.element};Vp.defaultProps={...O.ReferenceInput.defaultProps};const Hp=({reference:e,target:t,children:n,filters:r,actions:o,...s})=>f.jsx(O.ResourceContextProvider,{value:e,children:f.jsx(Os,{perPage:5,pagination:f.jsx(O.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(Q.Fragment,{children:[f.jsx(O.ListToolbar,{filters:r,actions:o}),n]})})});Hp.propTypes={...Os.propTypes,children:u.node.isRequired,reference:u.string.isRequired,target:u.string.isRequired,filters:u.oneOfType([u.element,u.func,u.element,u.arrayOf(u.node)]),actions:u.oneOfType([u.element,u.func,u.element])};Hp.defaultProps={...Os.defaultProps};const GL=de(O.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),KL=e=>f.jsx(GL,{...e}),ub=de(O.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"}}));ub.propTypes={...O.SelectArrayInput.propTypes};const zp=e=>f.jsx(nt,{...e,children:f.jsx(ub,{options:{autoWidth:!1}})});zp.defaultProps={optionText:"name",optionValue:"id"};zp.propTypes={...O.SelectArrayInput.propTypes,...nt.propTypes};const qL=de(O.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),Ab=e=>f.jsx(nt,{...e,children:f.jsx(qL,{})});Ab.propTypes={...O.SelectInput.propTypes,...nt.propTypes};const $u=({...e})=>{var c,A;const t=O.useTranslate(),n=O.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(c=Bi.useController({name:e==null?void 0:e.source}))==null?void 0:c.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 a=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?`${a} - ${t(o)}`:a),f.jsx(Fn,{...e,validate:s,helperText:o,inputProps:{maxLength:e==null?void 0:e.maxLength}})};$u.displayName="SmartTextInput";$u.defaultProps={multiline:!1};$u.propTypes={...Fn.propTypes,maxLength:u.number,multiline:u.bool,rows:u.number};const JL=e=>{if(!e)return"";const t=ZB(e);return t?t.format("HH:mm"):""},XL=e=>e,ZL=de(O.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Wp=e=>f.jsx(nt,{...e,children:f.jsx(ZL,{})});Wp.defaultProps={...O.TimeInput.defaultProps,format:JL,parse:XL};Wp.propTypes={...O.TimeInput.propTypes,...nt.propTypes};const Up=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=xn(),[r,o]=Q.useState(!1),s=Ae.useAuthProvider(),a=Ae.useTranslate(),c=Ae.useNotify(),A=Q.useCallback(d=>{const{oldPassword:p,newPassword:h}=d;o(!0),s==null||s.changePassword(p,h).then(()=>{c("ra.auth.password_changed"),e()}).catch(C=>{c((C==null?void 0:C.message)||(C==null?void 0:C.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return f.jsx(Ae.ResourceContextProvider,{value:"user/change-password",children:f.jsx(Ae.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:f.jsx(qu,{onSubmit:A,toolbar:f.jsx(Er,{children:f.jsx(O.SaveButton,{disabled:r})}),children:f.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Alert,{severity:"warning",children:[f.jsx(b.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Fn,{source:"oldPassword",type:"password",validate:Ae.required()})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(Fn,{source:"newPassword",type:"password",validate:Ae.required()})})]})})})})},_L=de(O.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":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.ApplicaLongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}})),$L=de(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),e9=de(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),Yp=({title:e,divider:t,variant:n})=>{const r=O.useTranslate();return f.jsxs(Q.Fragment,{children:[f.jsx($L,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&f.jsx(e9,{})]})};Yp.propTypes={title:u.string.isRequired,divider:u.bool,variant:u.oneOf(["h1","h2","h3","h4","h5","h6"])};Yp.defaultProps={divider:!0,variant:"h4"};const t9=de(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 db(e){const{spacing:t}=xn(),{spacing:n=t}=e,r=ne.omit(e,["spacing"]);return f.jsx(O.Form,{...r,className:"ApplicaLongFormView",children:f.jsx(t9,{container:!0,spacing:n*2,children:e.children})})}function $g(e){return e.id??e.label}function gb(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function n9(e){return ne.map(e,"id")}function ru(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function fb(e,t){const n=e!==void 0?ru(e):0;return ne.chain(t).filter(o=>e!==void 0?gb(e,o.id):!0).filter(o=>ru(o.id)===n+1).value()}function r9(e,t){var s;const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ne.extend(n,{formRootPath:o});case"setSyncWithLocation":return ne.extend(n,{syncWithLocation:o});case"setErrorCount":return ne.extend(n,{errorCount:o});case"setActiveItem":return ne.includes(n9(e.items),o)?ne.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return ne.extend(n,{items:ne.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=ne.isString(o)?o:o.id,c=ne.chain(n.items).clone().reject(A=>A.id===a).value();return ne.extend(n,{items:c}),n.activeItem===a&&ne.extend(n,{activeItem:((s=ne.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const o9={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},pb=Q.createContext(void 0);function hb(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=ps.useLocation(),[s,a]=Q.useReducer(r9,ne.cloneDeep(o9)),{formRootPath:c,items:A}=s,d=Q.useMemo(()=>({state:s,dispatch:a}),[s,a]);return Q.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 h=ne.chain(p).map(m=>ps.matchPath(m,o)).reject(m=>m===null).first().value(),C=h==null?void 0:h.pathnameBase;C!==void 0&&C!==c&&a({type:"setFormRootPath",payload:C})},[o,c,r]),Q.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),Q.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),Q.useEffect(()=>{var p;if(t&&c!==void 0){let h=o.replace(c,"").replace(new RegExp(/^\/?/),"");ne.isEmpty(h)&&(h=((p=ne.chain(A).filter(C=>fb(C.id,A).length===0).orderBy([C=>ru(C.id),C=>C.index]).first().value())==null?void 0:p.id)??void 0),a({type:"setActiveItem",payload:h})}},[a,c,o,A]),f.jsx(pb.Provider,{value:d,children:e.children})}function Cb(){const e=Q.useContext(pb);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function ol(){return Cb().state}function Gp(){return Cb().dispatch}function mb(){return ol().formRootPath}function Eb(){return ol().activeItem}function Ib(){return ol().items}function Bb(){return ol().syncWithLocation}function vb(){return ol().errorCount}function yb(){const e=Gp();return Q.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function bb(){const e=Gp();return Q.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Qb(){const e=Gp();return Q.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}var i9=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},xb=e=>e.firstChild?e.firstChild.offsetParent===e:!0,s9=(e,t)=>{let n=e,r=0;xb(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},a9=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Va=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Va="sticky":CSS.supports("position","-webkit-sticky")&&(Va="-webkit-sticky"));var ou=!1;try{const e=Object.defineProperty({},"passive",{get(){ou={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var lg=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}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,ou),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},l9=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}},c9=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=i9(e);let c=!1;const A=()=>{c||requestAnimationFrame(()=>{const F=h();F!==x&&R(F),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const p=F=>{const{offsetTop:X,height:Z}=m,{naturalTop:U}=v,{height:G}=P;return F+X+Z>=U+G+j+o},h=()=>{const{height:F}=m,{height:X}=P;return X+s+o<=F?3:p(d)?1:2},C=a!==window&&xb(a),m=lg({el:a,onChange:A,unsubs:t,measure:({height:F,top:X})=>({height:F,offsetTop:C?X:0})}),I=a9(e),B=I===window?{top:0,bottom:0}:l9(I),v=lg({el:I,onChange:A,unsubs:t,measure:({height:F})=>({height:F-B.top-B.bottom,naturalTop:I===window?0:s9(I,a)+B.top+m.offsetTop})}),P=lg({el:e,onChange:A,unsubs:t,measure:({height:F})=>({height:F})});let j=0,x=h();const R=F=>{const X=x;if(x=F,X===2&&(j=-1),F===3){e.style.position=Va,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:U}=m,{height:G,naturalTop:ae}=v,{height:oe}=P;if(F===2)if(e.style.position="relative",j=X===0?Math.max(0,U+d-ae+s):Math.max(0,U+d+Z-(ae+oe+o)),r){const J=Math.max(0,G-oe-j);e.style.bottom=`${J}px`}else e.style.top=`${j}px`;else e.style.position=Va,F===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-oe-o}px`:r?e.style.bottom=`${Z-oe-o}px`:e.style.top=`${s}px`};R(x);const S=F=>{if(F===d)return;const X=F-d;if(d=F,x===3)return;const{offsetTop:Z,height:U}=m,{naturalTop:G,height:ae}=v,{height:oe}=P;if(X>0)if(x===0){if(F+Z+s>G){const J=Math.max(0,Z+d-G+s);F+Z+U<=G+oe+J+o?R(2):R(1)}}else x===2&&p(F)&&R(1);else if(x===1){if(Z+F+U<G+ae+o){const J=Math.max(0,Z+d+U-(G+oe+o));Z+F+s>=G+J?R(2):R(0)}}else x===2&&Z+F+s<G+j&&R(0)},L=a===window?()=>S(window.scrollY):()=>S(a.scrollTop);a.addEventListener("scroll",L,ou),a.addEventListener("mousewheel",L,ou),t.push(()=>a.removeEventListener("scroll",L),()=>a.removeEventListener("mousewheel",L))},u9=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=Q.useState(null);return Q.useEffect(()=>{if(!r||!Va)return;const s=[];return c9(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},A9=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=u9({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},d9=A9,wb=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(wb||{});function Tb(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ne.omit(e,["sticky","disposition","spacing"]),s=t?d9:b.Box,a=Q.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(b.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(b.Stack,{spacing:r,children:e.children})})})}function Sb(e){return f.jsx(f.Fragment,{children:e.children})}function Pb(e){const{children:t}=e;return Q.useMemo(()=>{const r={top:[],bottom:[]};return Q.Children.forEach(t,o=>{if(Q.isValidElement(o)&&(o==null?void 0:o.type)===Sb){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function Rb(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ne.omit(e,["disposition"]);return f.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function Ob(e){const t=Eb();return t===void 0?!1:e===t||gb(e,t)}function jb(e){const t=Ib();return Q.useMemo(()=>fb(e,t),[t,e])}function g9(){const e=mb(),{search:t}=ps.useLocation(),n=ps.useNavigate();return Q.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function Db(){const e=jb();return f.jsx(b.Card,{variant:"outlined",children:f.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ne.map(e,(t,n)=>f.jsx(Kp,{...t},n))})})}function Kp(e){const t=Ae.useTranslate()??ne.identity,n=Mb(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:A,isGroup:d,level:p,errors:h=0}=n,{spacing:C}=xn(),[m,I]=Q.useState(r),B=Q.useCallback(j=>{I(!m),a(j)},[a,m]),v=s!==void 0,P=ne.omit(e,["label","icon","selected","badge"]);return Q.useEffect(()=>{r&&!m&&I(r)},[r,m,I]),f.jsxs(f.Fragment,{children:[f.jsx(b.ListItem,{...P,disablePadding:!0,children:f.jsxs(b.ListItemButton,{selected:r&&!d,onClick:B,sx:{pl:C*p},children:[v&&f.jsx(b.ListItemIcon,{children:s}),f.jsx(b.ListItemText,{inset:!v,primary:h===0?t(o):f.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c&&f.jsx(b.ListItemAvatar,{children:f.jsx(Na,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}),d&&(m?f.jsx(yn.ExpandLess,{}):f.jsx(yn.ExpandMore,{}))]})}),d&&f.jsx(b.Collapse,{in:m,timeout:"auto",children:f.jsx(b.List,{children:ne.map(A,(j,x)=>f.jsx(Kp,{...j},x))})})]})}function Mb(e){const{id:t}=e,n=Ob(t),r=ru(t),o=g9(),s=Bb(),a=yb(),c=jb(t),A=!ne.isEmpty(c),d=Q.useCallback(h=>{A||(s?o(e.id):a(e.id)),ne.isFunction(e.onClick)&&e.onClick(h)},[a,o,e,s,A]);return Q.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:A,level:r}),[e,n,d,c,A])}function kb(e=[],t){const n=ne.isArray(e)?e:[e],r=ne.filter(n,o=>Q.isValidElement(o));ne.each(r,o=>{var s;t(o),kb(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function Fb(e){const{errors:t}=Bi.useFormState(),n=vb(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,A=$g(e),d=bb(),p=Qb(),h=Ob(A),C=[];n&&(e.sources!==void 0?C.push(...e.sources):kb(c,I=>{var B;((B=I==null?void 0:I.props)==null?void 0:B.source)!==void 0&&C.push(I.props.source)}));const m=ne.chain(C).uniq().map(I=>ne.get(t,I)).reject(I=>I===void 0).value().length;return Q.useEffect(()=>{d({id:A,index:a,label:r,icon:o,badge:s,errors:m})},[d,p,r,o,A,s,a,m]),Q.useEffect(()=>()=>{p(A)},[A]),f.jsx(b.Box,{display:h?"unset":"none",children:e.children})}function Lb(e){const t=qp(e),n=$g(e);return f.jsx(Fb,{...e,id:n,children:Q.Children.map(t,r=>{const o=$g(r.props);return Q.cloneElement(r,{id:`${n}.${o}`})})})}function Nb(e){return f.jsx(Fb,{...e})}function qp(e){const{children:t}=e;return Q.useMemo(()=>ne.chain(Q.Children.toArray(t)).filter(r=>Q.isValidElement(r)&&((r==null?void 0:r.type)===Nb||(r==null?void 0:r.type)===Lb)).map((r,o)=>Q.cloneElement(r,{index:o})).value(),[t])}function f9(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ne.pick(e,["syncWithLocation","errorCount"]),s=ne.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=Pb(e),A=qp(e);return f.jsx(hb,{...o,children:f.jsxs(db,{...s,spacing:r,children:[f.jsxs(Tb,{disposition:t,spacing:r,children:[a,f.jsx(Db,{}),c]}),f.jsx(Rb,{disposition:n,children:A})]})})}const kt=f9;kt.BaseForm=db;kt.Content=Rb;kt.Provider=hb;kt.useItems=Ib;kt.useSyncWithLocation=Bb;kt.useErrorCount=vb;kt.useFormRootPath=mb;kt.useActiveItem=Eb;kt.useSetActiveItem=yb;kt.useAddItem=bb;kt.useRemoveItem=Qb;kt.Sidebar=Tb;kt.SidebarSection=Sb;kt.SidebarSectionPosition=wb;kt.useSidebarChildren=Pb;kt.NavMenu=Db;kt.NavMenuItem=Kp;kt.useNavMenuItem=Mb;kt.Tab=Nb;kt.Group=Lb;kt.useBaseItemChildren=qp;const p9=de(O.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"}})),h9=de(O.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}}})),C9=Za(O.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}})),Jp=e=>{const{title:t,modal:n,content:r,subheader:o,secondary:s,sx:a,...c}=e,A=Gf(t);return f.jsx($n,{title:A,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiToolbar-root":{paddingLeft:"20px !important",paddingRight:"20px !important"}},border:!n,divider:!0,children:f.jsx(C9,{toolbar:f.jsx(Er,{}),...c})})};Jp.defaultProps={toolbar:f.jsx(Er,{children:f.jsx(O.SaveButton,{type:"button"})}),secondary:f.jsx(Fo,{children:f.jsx(O.DeleteWithConfirmButton,{})})};Jp.Tab=O.TabbedForm.Tab;const m9=k.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:o=!1,index:s,member:a,resource:c}=e,A=O.useTranslate(),[d,p]=k.useState(!1),{total:h,remove:C}=gv(),m=k.useCallback(()=>{p(!1),C(s)},[s,C]),I=Q.useMemo(()=>({index:s,total:h,remove:()=>C(s)}),[s,h,C]);return f.jsxs(kf.Provider,{value:I,children:[Q.Children.map(n,(B,v)=>{if(!Q.isValidElement(B))return null;const{source:P,...j}=B.props;return f.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:Q.cloneElement(B,{source:P?`${a}.${P}`:a,index:P?void 0:v,resource:c,disabled:r,...j,label:""})})}),!o&&f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2.5},children:f.jsx(Fo,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&f.jsx(O.Confirm,{isOpen:d,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var E9=Array.isArray,eA=E9,I9=typeof _n=="object"&&_n&&_n.Object===Object&&_n,B9=I9,v9=B9,y9=typeof self=="object"&&self&&self.Object===Object&&self,b9=v9||y9||Function("return this")(),tA=b9,Q9=tA,x9=Q9.Symbol,nA=x9,A0=nA,Vb=Object.prototype,w9=Vb.hasOwnProperty,T9=Vb.toString,Aa=A0?A0.toStringTag:void 0;function S9(e){var t=w9.call(e,Aa),n=e[Aa];try{e[Aa]=void 0;var r=!0}catch{}var o=T9.call(e);return r&&(t?e[Aa]=n:delete e[Aa]),o}var P9=S9,R9=Object.prototype,O9=R9.toString;function j9(e){return O9.call(e)}var D9=j9,d0=nA,M9=P9,k9=D9,F9="[object Null]",L9="[object Undefined]",g0=d0?d0.toStringTag:void 0;function N9(e){return e==null?e===void 0?L9:F9:g0&&g0 in Object(e)?M9(e):k9(e)}var Xp=N9;function V9(e){return e!=null&&typeof e=="object"}var rA=V9,H9=Xp,z9=rA,W9="[object Symbol]";function U9(e){return typeof e=="symbol"||z9(e)&&H9(e)==W9}var Zp=U9,Y9=eA,G9=Zp,K9=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q9=/^\w*$/;function J9(e,t){if(Y9(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||G9(e)?!0:q9.test(e)||!K9.test(e)||t!=null&&e in Object(t)}var X9=J9;function Z9(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hb=Z9,_9=Xp,$9=Hb,eN="[object AsyncFunction]",tN="[object Function]",nN="[object GeneratorFunction]",rN="[object Proxy]";function oN(e){if(!$9(e))return!1;var t=_9(e);return t==tN||t==nN||t==eN||t==rN}var zb=oN,iN=tA,sN=iN["__core-js_shared__"],aN=sN,cg=aN,f0=function(){var e=/[^.]+$/.exec(cg&&cg.keys&&cg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function lN(e){return!!f0&&f0 in e}var cN=lN,uN=Function.prototype,AN=uN.toString;function dN(e){if(e!=null){try{return AN.call(e)}catch{}try{return e+""}catch{}}return""}var gN=dN,fN=zb,pN=cN,hN=Hb,CN=gN,mN=/[\\^$.*+?()[\]{}|]/g,EN=/^\[object .+?Constructor\]$/,IN=Function.prototype,BN=Object.prototype,vN=IN.toString,yN=BN.hasOwnProperty,bN=RegExp("^"+vN.call(yN).replace(mN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QN(e){if(!hN(e)||pN(e))return!1;var t=fN(e)?bN:EN;return t.test(CN(e))}var xN=QN;function wN(e,t){return e==null?void 0:e[t]}var TN=wN,SN=xN,PN=TN;function RN(e,t){var n=PN(e,t);return SN(n)?n:void 0}var oA=RN,ON=oA,jN=ON(Object,"create"),iA=jN,p0=iA;function DN(){this.__data__=p0?p0(null):{},this.size=0}var MN=DN;function kN(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var FN=kN,LN=iA,NN="__lodash_hash_undefined__",VN=Object.prototype,HN=VN.hasOwnProperty;function zN(e){var t=this.__data__;if(LN){var n=t[e];return n===NN?void 0:n}return HN.call(t,e)?t[e]:void 0}var WN=zN,UN=iA,YN=Object.prototype,GN=YN.hasOwnProperty;function KN(e){var t=this.__data__;return UN?t[e]!==void 0:GN.call(t,e)}var qN=KN,JN=iA,XN="__lodash_hash_undefined__";function ZN(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=JN&&t===void 0?XN:t,this}var _N=ZN,$N=MN,e7=FN,t7=WN,n7=qN,r7=_N;function js(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])}}js.prototype.clear=$N;js.prototype.delete=e7;js.prototype.get=t7;js.prototype.has=n7;js.prototype.set=r7;var o7=js;function i7(){this.__data__=[],this.size=0}var s7=i7;function a7(e,t){return e===t||e!==e&&t!==t}var l7=a7,c7=l7;function u7(e,t){for(var n=e.length;n--;)if(c7(e[n][0],t))return n;return-1}var sA=u7,A7=sA,d7=Array.prototype,g7=d7.splice;function f7(e){var t=this.__data__,n=A7(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():g7.call(t,n,1),--this.size,!0}var p7=f7,h7=sA;function C7(e){var t=this.__data__,n=h7(t,e);return n<0?void 0:t[n][1]}var m7=C7,E7=sA;function I7(e){return E7(this.__data__,e)>-1}var B7=I7,v7=sA;function y7(e,t){var n=this.__data__,r=v7(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var b7=y7,Q7=s7,x7=p7,w7=m7,T7=B7,S7=b7;function Ds(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])}}Ds.prototype.clear=Q7;Ds.prototype.delete=x7;Ds.prototype.get=w7;Ds.prototype.has=T7;Ds.prototype.set=S7;var P7=Ds,R7=oA,O7=tA,j7=R7(O7,"Map"),D7=j7,h0=o7,M7=P7,k7=D7;function F7(){this.size=0,this.__data__={hash:new h0,map:new(k7||M7),string:new h0}}var L7=F7;function N7(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var V7=N7,H7=V7;function z7(e,t){var n=e.__data__;return H7(t)?n[typeof t=="string"?"string":"hash"]:n.map}var aA=z7,W7=aA;function U7(e){var t=W7(this,e).delete(e);return this.size-=t?1:0,t}var Y7=U7,G7=aA;function K7(e){return G7(this,e).get(e)}var q7=K7,J7=aA;function X7(e){return J7(this,e).has(e)}var Z7=X7,_7=aA;function $7(e,t){var n=_7(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var eV=$7,tV=L7,nV=Y7,rV=q7,oV=Z7,iV=eV;function Ms(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])}}Ms.prototype.clear=tV;Ms.prototype.delete=nV;Ms.prototype.get=rV;Ms.prototype.has=oV;Ms.prototype.set=iV;var Wb=Ms,Ub=Wb,sV="Expected a function";function _p(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(sV);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 a=e.apply(this,r);return n.cache=s.set(o,a)||s,a};return n.cache=new(_p.Cache||Ub),n}_p.Cache=Ub;var aV=_p,lV=aV,cV=500;function uV(e){var t=lV(e,function(r){return n.size===cV&&n.clear(),r}),n=t.cache;return t}var AV=uV,dV=AV,gV=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fV=/\\(\\)?/g,pV=dV(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gV,function(n,r,o,s){t.push(o?s.replace(fV,"$1"):r||n)}),t}),hV=pV;function CV(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 Yb=CV,C0=nA,mV=Yb,EV=eA,IV=Zp,BV=1/0,m0=C0?C0.prototype:void 0,E0=m0?m0.toString:void 0;function Gb(e){if(typeof e=="string")return e;if(EV(e))return mV(e,Gb)+"";if(IV(e))return E0?E0.call(e):"";var t=e+"";return t=="0"&&1/e==-BV?"-0":t}var vV=Gb,yV=vV;function bV(e){return e==null?"":yV(e)}var QV=bV,xV=eA,wV=X9,TV=hV,SV=QV;function PV(e,t){return xV(e)?e:wV(e,t)?[e]:TV(SV(e))}var RV=PV,OV=Zp,jV=1/0;function DV(e){if(typeof e=="string"||OV(e))return e;var t=e+"";return t=="0"&&1/e==-jV?"-0":t}var MV=DV,kV=RV,FV=MV;function LV(e,t){t=kV(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[FV(t[n++])];return n&&n==r?e:void 0}var NV=LV,VV=NV;function HV(e,t,n){var r=e==null?void 0:VV(e,t);return r===void 0?n:r}var zV=HV;const WV=io(zV),Kb=e=>{var V,_;const{children:t,resource:n,source:r,label:o,disableActions:s=!1,disableAdd:a=!1,disableRemove:c=!1,enableClearAll:A=!1,className:d,empty:p,template:h={}}=e,[C,m]=Q.useState(!1),{fields:I,remove:B,replace:v,append:P}=O.useArrayInput(e),{resetField:j}=Bi.useFormContext(),x=Tt(),R=Ae.useTranslate(),S=Ae.useRecordContext(e),L=Q.useRef(h||{}),F=Ae.useTranslateLabel(),X=Q.useCallback(M=>{B(M)},[B]);if(I.length>0){const{...M}=I[0];L.current=M;for(const $ in L.current)L.current[$]=null}const Z=Q.useCallback((M=void 0)=>{let $=M;M==null&&($=L.current,Q.Children.count(t)===1&&k.isValidElement(Q.Children.only(t))&&!Q.Children.only(t).props.source&&Q.Children.map(t,q=>k.isValidElement(q)&&q.type!==Ae.FormDataConsumer).some(Boolean)?$="":($=$||{},Q.Children.forEach(t,q=>{k.isValidElement(q)&&q.type!==Ae.FormDataConsumer&&q.props.source&&($[q.props.source]=q.props.defaultValue??null)})));const H={...$,...h};P(H),j(`${r}.${I.length}`,{defaultValue:$})},[P,t,j,r,I.length,h]),U=M=>$=>{Z(),M&&M($)},G=Q.useCallback(()=>{v([]),m(!1)},[v]),ae=WV(S,r),oe=Q.useMemo(()=>({total:I.length,remove:X,source:r}),[I.length,X,r]),J=x.palette.mode==="dark"?x.palette.grey.A400:x.palette.grey.A800,K=I.length>0&&A;return I?f.jsx(Mf.Provider,{value:oe,children:f.jsxs("div",{className:d,children:[k.cloneElement(f.jsx(qb,{}),{label:o,source:r,disableAdd:a,template:h,onClick:U((_=(V=e==null?void 0:e.addButton)==null?void 0:V.props)==null?void 0:_.onClick)}),f.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${J}`},children:f.jsxs(b.Table,{children:[f.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${J}`},children:f.jsxs(b.TableRow,{children:[Q.Children.map(t,(M,$)=>k.isValidElement(M)?f.jsx(b.TableCell,{children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:F({...M.props,resource:n})})},$):null),!s&&(K?f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(Fo,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>m(!0),children:R("ra.action.delete")})})},"actions"):f.jsx(b.TableCell,{},"empty_actions"))]})}),f.jsxs(b.TableBody,{children:[I.length===0&&f.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(b.TableCell,{colSpan:4+(s?0:1),align:"center",children:p||f.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),I.length>0&&I.map((M,$)=>f.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${J}}`},children:f.jsx(m9,{disableRemove:c,disableActions:s,index:$,member:`${r}.${$}`,onRemoveField:X,record:ae&&ae[$]||{},resource:n,source:r,children:t})},M.id))]})]})}),I.length>0&&f.jsx(O.Confirm,{isOpen:C,title:R("ra.action.clear_array_input"),content:R("ra.message.clear_array_input"),onConfirm:G,onClose:()=>m(!1)})]})}):null},qb=e=>{const{label:t,disableAdd:n,onClick:r}=e,o=Tt(),s=o.palette.mode==="dark"?o.palette.grey.A400:o.palette.grey.A800,a=o.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:{mt:.5},children:[t!==!1&&f.jsx(b.Typography,{children:t}),!n&&(k.isValidElement(e==null?void 0:e.addButton)?k.cloneElement(e==null?void 0:e.addButton,{onClick:r}):f.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${s}`},onClick:r,children:f.jsx(_e.PlusCircleOutlined,{style:{color:a}})}))]})},UV=de(Kb,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));qb.propTypes={label:u.oneOfType([u.string,u.bool]),source:u.string,defaultValue:u.any};Kb.propTypes={addButton:u.element,children:u.node,className:u.string,field:u.object,fields:u.array,fieldState:u.object,formState:u.object,record:u.object,source:u.string,label:u.oneOfType([u.string,u.bool]),resource:u.string,translate:u.func,disableAdd:u.bool,enableClearAll:u.bool,disableRemove:u.oneOfType([u.func,u.bool]),TransitionProps:u.shape({}),empty:u.oneOfType([u.node,u.string]),template:u.object};function YV(e,t){const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ne.chain(n.media).clone().extend(o).value();return ne.extend(n,{media:s})}case"updateDrawer":{const s=ne.chain(n.drawer).clone().extend(o).value();return ne.extend(n,{drawer:s})}case"updateLogo":{const s=ne.chain(n.logo).clone().extend(o).value();return ne.extend(n,{logo:s})}case"updateNotifications":{const s=ne.chain(n.notifications).clone().extend(o).value();return ne.extend(n,s)}case"updateTheme":{const s=ne.chain(n.theme).clone().extend(o).value();return ne.extend(n,{theme:s})}default:return n}}const GV={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"}},Jb=Q.createContext(void 0);function Xb(e){var Z;const t=Ae.useAuthProvider(),n=Ae.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),a=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:A,menuOrientation:d,drawerWidth:p}=xn(),h=A(d)&&!s,{drawerOpen:C,openDrawer:m}=Ei(),I=Q.useCallback(()=>{m(!C)},[C,m]),[B,v]=Q.useState(!1),[P,j]=Q.useReducer(YV,ne.chain(GV).clone().merge({drawer:{open:!c||C}}).value()),x=Q.useCallback(()=>v(!1),[]),R=Q.useMemo(()=>({state:P,dispatch:j}),[P,j]),{logoIcon:S,logoMain:L,enableNotification:F,notification:X}=e;return Q.useEffect(()=>{j({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:h}})},[d,o,s,a]),Q.useEffect(()=>{j({type:"updateDrawer",payload:{open:C,width:p,handleDrawerToggle:I}})},[C,p,I]),Q.useEffect(()=>{c||m(!a)},[a,c]),Q.useEffect(()=>{j({type:"updateLogo",payload:{main:L,icon:S}})},[S,L]),Q.useEffect(()=>{j({type:"updateNotifications",payload:{enable:F,resource:X??"entities/notification"}})},[F,X]),Q.useEffect(()=>{j({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),Q.useEffect(()=>{t.isImpersonating().then(U=>{var G;v(!U&&((G=n==null?void 0:n.data)==null?void 0:G.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),f.jsxs(Jb.Provider,{value:R,children:[f.jsx(b.Dialog,{open:B,maxWidth:"xs",fullWidth:!0,children:f.jsx(Up,{onSuccess:x,firstAccess:!0})}),e.children]})}function Zb(e){return Q.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx(Xb,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function $p(){const e=Q.useContext(Jb);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function KV(){return $p().dispatch}function ks(){return $p().state}function ir(){return ks().media}function wi(){return ks().drawer}function _b(){return ks().logo}function lA(){return ks().notifications}function qV(){return ks().theme}const JV={ml:{xs:0,lg:-2}};function $b(){const{open:e,handleDrawerToggle:t}=wi();return f.jsx(Rs,{value:"drawer","aria-label":"open drawer",sx:JV,onChange:t,selected:e,children:e?f.jsx(_e.MenuFoldOutlined,{}):f.jsx(_e.MenuUnfoldOutlined,{})})}function eQ(e){const t=Q.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=ir(),{open:s,width:a}=wi(),c=r?b.AppBar:fv,A=mr(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),d={position:"fixed",color:"inherit",elevation:0,sx:A};return r||ne.extend(d,{open:s}),f.jsx(c,{ref:t,...d,children:f.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx($b,{}),e.children]})})}function XV(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=lA(),c=Ae.useNotify(),A=Ae.useRedirect(),[d]=Ae.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:no().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:()=>{c("resources.notifications.messages.readed.error","warning")}}),p=Q.useCallback(()=>d(),[d]),[h]=Ae.useLocaleState(),C=Q.useMemo(()=>no(n.created).locale(h).fromNow(),[n,h]);return f.jsx(b.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[f.jsx(b.ListItemAvatar,{children:f.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(_e.MessageOutlined,{})})}),f.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),f.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(b.ListItemText,{primary:C,primaryTypographyProps:{variant:"caption"}})]})})}const ZV={width:36,height:36,fontSize:"1rem"},_V={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function tQ(){const{enable:e}=lA();return e?f.jsx($V,{}):null}function $V(){const e=Ae.useTranslate(),t=b.useTheme(),{downMd:n}=ir(),{resource:r}=lA(),[o,s]=Q.useState([]),{data:a,isLoading:c}=Ae.useGetList(r,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),A=o.filter(m=>m.readed===null).length,{open:d,anchorEl:p,handleClose:h,handleToggle:C}=Du();return Q.useEffect(()=>{!c&&a&&s(a??[])},[a,c]),f.jsxs(f.Fragment,{children:[f.jsx(Rs,{value:"notifications",selected:d,onChange:C,children:f.jsx(b.Badge,{badgeContent:A,color:"primary",children:f.jsx(_e.BellOutlined,{})})}),f.jsx(b.Popper,{placement:n?"bottom":"bottom-end",open:d,anchorEl:p,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:m})=>f.jsx(Mo,{type:"grow",position:n?"top":"top-right",in:d,...m,children:f.jsx(b.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(b.ClickAwayListener,{onClickAway:h,children:f.jsxs($n,{title:"Notification",elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:A>0&&f.jsx(b.Tooltip,{title:"Mark as all read",children:f.jsx(Ps,{color:"success",size:"small",children:f.jsx(_e.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":ZV,"& .MuiListItemSecondaryAction-root":{..._V,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:o.map((I,B)=>f.jsx(XV,{selected:A>0,notification:I,onClick:h,divider:B<o.length-1},I.id))}),f.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${r}`,LinkComponent:Bt.Link,onClick:h,children:f.jsx(b.ListItemText,{primary:f.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(b.Divider,{})]})})})})})]})}const eH=()=>{const[e,t]=Q.useState(!1),n=Q.useCallback(()=>t(!1),[t]),r=Q.useCallback(()=>t(!0),[t]),o=Ae.useTranslate();return f.jsxs(Q.Fragment,{children:[f.jsxs(b.ListItemButton,{onClick:r,children:[f.jsx(b.ListItemIcon,{children:f.jsx(yn.Key,{})}),f.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(Up,{onSuccess:n})})]})},tH=()=>{const e=Ae.useLogout(),t=Ae.useTranslate();return f.jsx(Q.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:e,children:[f.jsx(b.ListItemIcon,{children:f.jsx(yn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},nH=()=>{const e=Ae.useTranslate(),t=Ae.useAuthProvider(),n=Q.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=Q.useState(!1);return Q.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(Q.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:n,children:[f.jsx(b.ListItemIcon,{children:f.jsx(yn.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function nQ(){var m;const e=b.useTheme(),t=Ae.useDataProvider(),n=Ae.useAuthProvider(),{identity:r}=Ae.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,a]=Q.useState(null),{open:c,anchorEl:A,handleToggle:d,handleClose:p}=Du(),h=Ae.useLogout(),C=Q.useCallback(()=>{h()},[n,h]);return Q.useEffect(()=>{o&&t.getFile("/profile/me/image").then(I=>a(I))},[t,o]),f.jsxs(f.Fragment,{children:[f.jsx(Rs,{sx:{p:.25,width:"auto"},onClick:d,value:"profile",selected:c,children:f.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Na,{alt:(m=r==null?void 0:r.name)==null?void 0:m.toUpperCase(),src:s,size:"xs"}),f.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),f.jsx(pr.Popper,{placement:"bottom-end",open:c,anchorEl:A,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:I})=>{var B;return f.jsx(Mo,{type:"grow",position:"top-right",in:c,...I,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(b.ClickAwayListener,{onClickAway:p,children:f.jsxs($n,{elevation:0,border:!1,content:!1,children:[f.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(b.Grid,{item:!0,children:f.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Na,{alt:"profile user",src:s,sx:{width:32,height:32}}),f.jsxs(b.Stack,{children:[f.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),f.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(",")})]})]})}),f.jsx(b.Grid,{item:!0,children:f.jsx(b.Tooltip,{title:"Logout",children:f.jsx(Ps,{size:"large",sx:{color:"text.primary"},onClick:C,children:f.jsx(_e.LogoutOutlined,{})})})})]})}),f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(eH,{}),f.jsx(tH,{}),f.jsx(nH,{})]})})})]})})})})}})]})}const rQ=e=>{const t=Tt(),{downMd:n}=ir(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Du();return n?f.jsxs(f.Fragment,{children:[f.jsx(Rs,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(_e.MoreOutlined,{})}),f.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:c})=>f.jsx(Mo,{type:"fade",in:r,...c,children:f.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(b.ClickAwayListener,{onClickAway:a,children:f.jsx(b.AppBar,{color:"inherit",children:f.jsx(b.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})};function oQ(e){return f.jsx(b.Box,{...e,flex:1})}function il(e){const{name:t,version:n}=e;return f.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:f.jsxs(b.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}il.propTypes={name:u.string.isRequired,version:u.string.isRequired,copy:u.string};il.defaultProps={copy:"&copy; Applica Software Guru for"};var iQ={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})(iQ);var cA=iQ.exports,ug={};const rH=n4(L6);var I0;function uA(){return I0||(I0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=rH}(ug)),ug}function sQ(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=sQ(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function aQ(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=sQ(e))&&(r&&(r+=" "),r+=t);return r}var oH="__lodash_hash_undefined__";function iH(e){return this.__data__.set(e,oH),this}var sH=iH;function aH(e){return this.__data__.has(e)}var lH=aH,cH=Wb,uH=sH,AH=lH;function iu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new cH;++t<n;)this.add(e[t])}iu.prototype.add=iu.prototype.push=uH;iu.prototype.has=AH;var lQ=iu;function dH(e,t){return e.has(t)}var cQ=dH;function gH(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var uQ=gH;function fH(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var pH=fH,hH=Xp,CH=rA,mH="[object Arguments]";function EH(e){return CH(e)&&hH(e)==mH}var IH=EH,B0=IH,BH=rA,AQ=Object.prototype,vH=AQ.hasOwnProperty,yH=AQ.propertyIsEnumerable,bH=B0(function(){return arguments}())?B0:function(e){return BH(e)&&vH.call(e,"callee")&&!yH.call(e,"callee")},QH=bH,xH=9007199254740991;function wH(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xH}var TH=wH;function SH(e){return function(t){return e(t)}}var PH=SH,RH=zb,OH=TH;function jH(e){return e!=null&&OH(e.length)&&!RH(e)}var DH=jH,MH=oA,kH=tA,FH=MH(kH,"Set"),LH=FH,ef=globalThis&&globalThis.__assign||function(){return ef=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},ef.apply(this,arguments)},NH=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},dQ=function(e){var t=e.className,n=e.sx,r=NH(e,["className","sx"]),o=Ae.useLoading(),s=Tt();return k.createElement(VH,{className:t,sx:n},o?k.createElement(Bp,ef({className:aQ("app-loader",su.loader),color:"inherit",size:s.spacing(2),thickness:6},r)):k.createElement(NQ,{className:su.loadedIcon}))};dQ.propTypes={classes:u.object,className:u.string,width:u.string};var tf="RaLoadingIndicator",su={loader:"".concat(tf,"-loader"),loadedIcon:"".concat(tf,"-loadedIcon")},VH=de("div",{name:tf,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(su.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(su.loadedIcon)]={},t});const eh=e=>e.scrollTop;function vs(e,t){var n,r;const{timeout:o,easing:s,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:a.transitionDelay}}const HH=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function zH(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=Ts(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const d=s.getComputedStyle(t);a=d.getPropertyValue("-webkit-transform")||d.getPropertyValue("transform")}let c=0,A=0;if(a&&a!=="none"&&typeof a=="string"){const d=a.split("(")[1].split(")")[0].split(",");c=parseInt(d[4],10),A=parseInt(d[5],10)}return e==="left"?o?`translateX(${o.right+c-r.left}px)`:`translateX(${s.innerWidth+c-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-c}px)`:`translateX(-${r.left+r.width-c}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 gQ(e){return typeof e=="function"?e():e}function Cc(e,t,n){const r=gQ(n),o=zH(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const fQ=k.forwardRef(function(t,n){const r=Tt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:A,container:d,direction:p="down",easing:h=o,in:C,onEnter:m,onEntered:I,onEntering:B,onExit:v,onExited:P,onExiting:j,style:x,timeout:R=s,TransitionComponent:S=hp}=t,L=Ke(t,HH),F=k.useRef(null),X=Ln(A.ref,F,n),Z=M=>$=>{M&&($===void 0?M(F.current):M(F.current,$))},U=Z((M,$)=>{Cc(p,M,d),eh(M),m&&m(M,$)}),G=Z((M,$)=>{const H=vs({timeout:R,style:x,easing:h},{mode:"enter"});M.style.webkitTransition=r.transitions.create("-webkit-transform",z({},H)),M.style.transition=r.transitions.create("transform",z({},H)),M.style.webkitTransform="none",M.style.transform="none",B&&B(M,$)}),ae=Z(I),oe=Z(j),J=Z(M=>{const $=vs({timeout:R,style:x,easing:h},{mode:"exit"});M.style.webkitTransition=r.transitions.create("-webkit-transform",$),M.style.transition=r.transitions.create("transform",$),Cc(p,M,d),v&&v(M)}),K=Z(M=>{M.style.webkitTransition="",M.style.transition="",P&&P(M)}),V=M=>{a&&a(F.current,M)},_=k.useCallback(()=>{F.current&&Cc(p,F.current,d)},[p,d]);return k.useEffect(()=>{if(C||p==="down"||p==="right")return;const M=bB(()=>{F.current&&Cc(p,F.current,d)}),$=Ts(F.current);return $.addEventListener("resize",M),()=>{M.clear(),$.removeEventListener("resize",M)}},[p,C,d]),k.useEffect(()=>{C||_()},[C,_]),f.jsx(S,z({nodeRef:F,onEnter:U,onEntered:ae,onEntering:G,onExit:J,onExited:K,onExiting:oe,addEndListener:V,appear:c,in:C,timeout:R},L,{children:(M,$)=>k.cloneElement(A,z({ref:X,style:z({visibility:M==="exited"&&!C?"hidden":void 0},x,A.props.style)},$))}))});process.env.NODE_ENV!=="production"&&(fQ.propTypes={addEndListener:u.func,appear:u.bool,children:ws.isRequired,container:jr(u.oneOfType([Ci,u.func]),e=>{if(e.open){const t=gQ(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(`
222
222
  `))}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(`
223
223
  `))}return null}),direction:u.oneOf(["down","left","right","up"]),easing:u.oneOfType([u.shape({enter:u.string,exit:u.string}),u.string]),in:u.bool,onEnter:u.func,onEntered:u.func,onEntering:u.func,onExit:u.func,onExited:u.func,onExiting:u.func,style:u.object,timeout:u.oneOfType([u.number,u.shape({appear:u.number,enter:u.number,exit:u.number})])});const WH=fQ;function UH(e){return typeof e=="string"}function YH(e,t,n){return e===void 0||UH(e)?t:z({},t,{ownerState:z({},t.ownerState,n)})}const GH={disableDefaultClasses:!1},KH=k.createContext(GH);function qH(e){const{disableDefaultClasses:t}=k.useContext(KH);return n=>t?"":e(n)}function pQ(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 JH(e,t,n){return typeof e=="function"?e(t,n):e}function v0(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 XH(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const m=Ge(o==null?void 0:o.className,r==null?void 0:r.className,s,n==null?void 0:n.className),I=z({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),B=z({},n,o,r);return m.length>0&&(B.className=m),Object.keys(I).length>0&&(B.style=I),{props:B,internalRef:void 0}}const a=pQ(z({},o,r)),c=v0(r),A=v0(o),d=t(a),p=Ge(d==null?void 0:d.className,n==null?void 0:n.className,s,o==null?void 0:o.className,r==null?void 0:r.className),h=z({},d==null?void 0:d.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),C=z({},d,n,A,c);return p.length>0&&(C.className=p),Object.keys(h).length>0&&(C.style=h),{props:C,internalRef:d.ref}}const ZH=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function _H(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:s=!1}=e,a=Ke(e,ZH),c=s?{}:JH(r,o),{props:A,internalRef:d}=XH(z({},a,{externalSlotProps:c})),p=Ln(d,c==null?void 0:c.ref,(t=e.additionalProps)==null?void 0:t.ref);return YH(n,z({},A,{ref:p}),o)}function $H(e){const t=Cr(e);return t.body===e?Ts(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function wa(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function y0(e){return parseInt(Ts(e).getComputedStyle(e).paddingRight,10)||0}function ez(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 b0(e,t,n,r,o){const s=[t,n,...r];[].forEach.call(e.children,a=>{const c=s.indexOf(a)===-1,A=!ez(a);c&&A&&wa(a,o)})}function Ag(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function tz(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if($H(r)){const a=M4(Cr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${y0(r)+a}px`;const c=Cr(r).querySelectorAll(".mui-fixed");[].forEach.call(c,A=>{n.push({value:A.style.paddingRight,property:"padding-right",el:A}),A.style.paddingRight=`${y0(A)+a}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Cr(r).body;else{const a=r.parentElement,c=Ts(r);s=(a==null?void 0:a.nodeName)==="HTML"&&c.getComputedStyle(a).overflowY==="scroll"?a: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:a,property:c})=>{s?a.style.setProperty(c,s):a.style.removeProperty(c)})}}function nz(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class rz{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&&wa(t.modalRef,!1);const o=nz(n);b0(n,t.mount,t.modalRef,o,!0);const s=Ag(this.containers,a=>a.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=Ag(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=tz(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Ag(this.containers,a=>a.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&&wa(t.modalRef,n),b0(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&wa(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function oz(e){return typeof e=="function"?e():e}function iz(e){return e?e.props.hasOwnProperty("in"):!1}const sz=new rz;function az(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=sz,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:c,children:A,onClose:d,open:p,rootRef:h}=e,C=k.useRef({}),m=k.useRef(null),I=k.useRef(null),B=Ln(I,h),[v,P]=k.useState(!p),j=iz(A);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const R=()=>Cr(m.current),S=()=>(C.current.modalRef=I.current,C.current.mount=m.current,C.current),L=()=>{o.mount(S(),{disableScrollLock:r}),I.current&&(I.current.scrollTop=0)},F=xo(()=>{const V=oz(t)||R().body;o.add(S(),V),I.current&&L()}),X=k.useCallback(()=>o.isTopModal(S()),[o]),Z=xo(V=>{m.current=V,V&&(p&&X()?L():I.current&&wa(I.current,x))}),U=k.useCallback(()=>{o.remove(S(),x)},[x,o]);k.useEffect(()=>()=>{U()},[U]),k.useEffect(()=>{p?F():(!j||!s)&&U()},[p,U,j,s,F]);const G=V=>_=>{var M;(M=V.onKeyDown)==null||M.call(V,_),!(_.key!=="Escape"||!X())&&(n||(_.stopPropagation(),d&&d(_,"escapeKeyDown")))},ae=V=>_=>{var M;(M=V.onClick)==null||M.call(V,_),_.target===_.currentTarget&&d&&d(_,"backdropClick")};return{getRootProps:(V={})=>{const _=pQ(e);delete _.onTransitionEnter,delete _.onTransitionExited;const M=z({},_,V);return z({role:"presentation"},M,{onKeyDown:G(M),ref:B})},getBackdropProps:(V={})=>{const _=V;return z({"aria-hidden":!0},_,{onClick:ae(_),open:p})},getTransitionProps:()=>{const V=()=>{P(!1),a&&a()},_=()=>{P(!0),c&&c(),s&&U()};return{onEnter:Tg(V,A==null?void 0:A.props.onEnter),onExited:Tg(_,A==null?void 0:A.props.onExited)}},rootRef:B,portalRef:Z,isTopModal:X,exited:v,hasTransition:j}}const lz=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function cz(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 uz(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 Az(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||uz(e))}function dz(e){const t=[],n=[];return Array.from(e.querySelectorAll(lz)).forEach((r,o)=>{const s=cz(r);s===-1||!Az(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 gz(){return!0}function au(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=dz,isEnabled:a=gz,open:c}=e,A=k.useRef(!1),d=k.useRef(null),p=k.useRef(null),h=k.useRef(null),C=k.useRef(null),m=k.useRef(!1),I=k.useRef(null),B=Ln(t.ref,I),v=k.useRef(null);k.useEffect(()=>{!c||!I.current||(m.current=!n)},[n,c]),k.useEffect(()=>{if(!c||!I.current)return;const x=Cr(I.current);return I.current.contains(x.activeElement)||(I.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
224
224
  `)),I.current.setAttribute("tabIndex","-1")),m.current&&I.current.focus()),()=>{o||(h.current&&h.current.focus&&(A.current=!0,h.current.focus()),h.current=null)}},[c]),k.useEffect(()=>{if(!c||!I.current)return;const x=Cr(I.current),R=F=>{v.current=F,!(r||!a()||F.key!=="Tab")&&x.activeElement===I.current&&F.shiftKey&&(A.current=!0,p.current&&p.current.focus())},S=()=>{const F=I.current;if(F===null)return;if(!x.hasFocus()||!a()||A.current){A.current=!1;return}if(F.contains(x.activeElement)||r&&x.activeElement!==d.current&&x.activeElement!==p.current)return;if(x.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!m.current)return;let X=[];if((x.activeElement===d.current||x.activeElement===p.current)&&(X=s(I.current)),X.length>0){var Z,U;const G=!!((Z=v.current)!=null&&Z.shiftKey&&((U=v.current)==null?void 0:U.key)==="Tab"),ae=X[0],oe=X[X.length-1];typeof ae!="string"&&typeof oe!="string"&&(G?oe.focus():ae.focus())}else F.focus()};x.addEventListener("focusin",S),x.addEventListener("keydown",R,!0);const L=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(L),x.removeEventListener("focusin",S),x.removeEventListener("keydown",R,!0)}},[n,r,o,a,c,s]);const P=x=>{h.current===null&&(h.current=x.relatedTarget),m.current=!0,C.current=x.target;const R=t.props.onFocus;R&&R(x)},j=x=>{h.current===null&&(h.current=x.relatedTarget),m.current=!0};return f.jsxs(k.Fragment,{children:[f.jsx("div",{tabIndex:c?0:-1,onFocus:j,ref:d,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:B,onFocus:P}),f.jsx("div",{tabIndex:c?0:-1,onFocus:j,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(au.propTypes={children:ws,disableAutoFocus:u.bool,disableEnforceFocus:u.bool,disableRestoreFocus:u.bool,getTabbable:u.func,isEnabled:u.func,open:u.bool.isRequired});process.env.NODE_ENV!=="production"&&(au["propTypes"]=Cu(au.propTypes));function fz(e){return typeof e=="function"?e():e}const Ha=k.forwardRef(function(t,n){const{children:r,container:o,disablePortal:s=!1}=t,[a,c]=k.useState(null),A=Ln(k.isValidElement(r)?r.ref:null,n);if(Cs(()=>{s||c(fz(o)||document.body)},[o,s]),Cs(()=>{if(a&&!s)return Lc(n,a),()=>{Lc(n,null)}},[n,a,s]),s){if(k.isValidElement(r)){const d={ref:A};return k.cloneElement(r,d)}return f.jsx(k.Fragment,{children:r})}return f.jsx(k.Fragment,{children:a&&t4.createPortal(r,a)})});process.env.NODE_ENV!=="production"&&(Ha.propTypes={children:u.node,container:u.oneOfType([Ci,u.func]),disablePortal:u.bool});process.env.NODE_ENV!=="production"&&(Ha["propTypes"]=Cu(Ha.propTypes));const pz=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],hz={entering:{opacity:1},entered:{opacity:1}},hQ=k.forwardRef(function(t,n){const r=Tt(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:c,easing:A,in:d,onEnter:p,onEntered:h,onEntering:C,onExit:m,onExited:I,onExiting:B,style:v,timeout:P=o,TransitionComponent:j=hp}=t,x=Ke(t,pz),R=k.useRef(null),S=Ln(R,c.ref,n),L=J=>K=>{if(J){const V=R.current;K===void 0?J(V):J(V,K)}},F=L(C),X=L((J,K)=>{eh(J);const V=vs({style:v,timeout:P,easing:A},{mode:"enter"});J.style.webkitTransition=r.transitions.create("opacity",V),J.style.transition=r.transitions.create("opacity",V),p&&p(J,K)}),Z=L(h),U=L(B),G=L(J=>{const K=vs({style:v,timeout:P,easing:A},{mode:"exit"});J.style.webkitTransition=r.transitions.create("opacity",K),J.style.transition=r.transitions.create("opacity",K),m&&m(J)}),ae=L(I),oe=J=>{s&&s(R.current,J)};return f.jsx(j,z({appear:a,in:d,nodeRef:R,onEnter:X,onEntered:Z,onEntering:F,onExit:G,onExited:ae,onExiting:U,addEndListener:oe,timeout:P},x,{children:(J,K)=>k.cloneElement(c,z({style:z({opacity:0,visibility:J==="exited"&&!d?"hidden":void 0},hz[J],v,c.props.style),ref:S},K))}))});process.env.NODE_ENV!=="production"&&(hQ.propTypes={addEndListener:u.func,appear:u.bool,children:ws.isRequired,easing:u.oneOfType([u.shape({enter:u.string,exit:u.string}),u.string]),in:u.bool,onEnter:u.func,onEntered:u.func,onEntering:u.func,onExit:u.func,onExited:u.func,onExiting:u.func,style:u.object,timeout:u.oneOfType([u.number,u.shape({appear:u.number,enter:u.number,exit:u.number})])});const Cz=hQ;function mz(e){return Nt("MuiBackdrop",e)}Ut("MuiBackdrop",["root","invisible"]);const Ez=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Iz=e=>{const{classes:t,invisible:n}=e;return sn({root:["root",n&&"invisible"]},mz,t)},Bz=de("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>z({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"})),CQ=k.forwardRef(function(t,n){var r,o,s;const a=Yt({props:t,name:"MuiBackdrop"}),{children:c,className:A,component:d="div",components:p={},componentsProps:h={},invisible:C=!1,open:m,slotProps:I={},slots:B={},TransitionComponent:v=Cz,transitionDuration:P}=a,j=Ke(a,Ez),x=z({},a,{component:d,invisible:C}),R=Iz(x),S=(r=I.root)!=null?r:h.root;return f.jsx(v,z({in:m,timeout:P},j,{children:f.jsx(Bz,z({"aria-hidden":!0},S,{as:(o=(s=B.root)!=null?s:p.Root)!=null?o:d,className:Ge(R.root,A,S==null?void 0:S.className),ownerState:z({},x,S==null?void 0:S.ownerState),classes:R,ref:n,children:c}))}))});process.env.NODE_ENV!=="production"&&(CQ.propTypes={children:u.node,classes:u.object,className:u.string,component:u.elementType,components:u.shape({Root:u.elementType}),componentsProps:u.shape({root:u.object}),invisible:u.bool,open:u.bool.isRequired,slotProps:u.shape({root:u.object}),slots:u.shape({root:u.elementType}),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),TransitionComponent:u.elementType,transitionDuration:u.oneOfType([u.number,u.shape({appear:u.number,enter:u.number,exit:u.number})])});const vz=CQ;function yz(e){return Nt("MuiModal",e)}Ut("MuiModal",["root","hidden","backdrop"]);const bz=["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"],Qz=e=>{const{open:t,exited:n,classes:r}=e;return sn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},yz,r)},xz=de("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})=>z({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),wz=de(vz,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),mQ=k.forwardRef(function(t,n){var r,o,s,a,c,A;const d=Yt({name:"MuiModal",props:t}),{BackdropComponent:p=wz,BackdropProps:h,className:C,closeAfterTransition:m=!1,children:I,container:B,component:v,components:P={},componentsProps:j={},disableAutoFocus:x=!1,disableEnforceFocus:R=!1,disableEscapeKeyDown:S=!1,disablePortal:L=!1,disableRestoreFocus:F=!1,disableScrollLock:X=!1,hideBackdrop:Z=!1,keepMounted:U=!1,onBackdropClick:G,open:ae,slotProps:oe,slots:J}=d,K=Ke(d,bz),V=z({},d,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:R,disableEscapeKeyDown:S,disablePortal:L,disableRestoreFocus:F,disableScrollLock:X,hideBackdrop:Z,keepMounted:U}),{getRootProps:_,getBackdropProps:M,getTransitionProps:$,portalRef:H,isTopModal:q,exited:ge,hasTransition:pe}=az(z({},V,{rootRef:n})),ue=z({},V,{exited:ge}),fe=Qz(ue),he={};if(I.props.tabIndex===void 0&&(he.tabIndex="-1"),pe){const{onEnter:Ne,onExited:te}=$();he.onEnter=Ne,he.onExited=te}const Be=(r=(o=J==null?void 0:J.root)!=null?o:P.Root)!=null?r:xz,me=(s=(a=J==null?void 0:J.backdrop)!=null?a:P.Backdrop)!=null?s:p,Ce=(c=oe==null?void 0:oe.root)!=null?c:j.root,Ie=(A=oe==null?void 0:oe.backdrop)!=null?A:j.backdrop,Qe=pr.useSlotProps({elementType:Be,externalSlotProps:Ce,externalForwardedProps:K,getSlotProps:_,additionalProps:{ref:n,as:v},ownerState:ue,className:Ge(C,Ce==null?void 0:Ce.className,fe==null?void 0:fe.root,!ue.open&&ue.exited&&(fe==null?void 0:fe.hidden))}),ce=pr.useSlotProps({elementType:me,externalSlotProps:Ie,additionalProps:h,getSlotProps:Ne=>M(z({},Ne,{onClick:te=>{G&&G(te),Ne!=null&&Ne.onClick&&Ne.onClick(te)}})),className:Ge(Ie==null?void 0:Ie.className,h==null?void 0:h.className,fe==null?void 0:fe.backdrop),ownerState:ue});return!U&&!ae&&(!pe||ge)?null:f.jsx(Ha,{ref:H,container:B,disablePortal:L,children:f.jsxs(Be,z({},Qe,{children:[!Z&&p?f.jsx(me,z({},ce)):null,f.jsx(au,{disableEnforceFocus:R,disableAutoFocus:x,disableRestoreFocus:F,isEnabled:q,open:ae,children:k.cloneElement(I,he)})]}))})});process.env.NODE_ENV!=="production"&&(mQ.propTypes={BackdropComponent:u.elementType,BackdropProps:u.object,children:ws.isRequired,classes:u.object,className:u.string,closeAfterTransition:u.bool,component:u.elementType,components:u.shape({Backdrop:u.elementType,Root:u.elementType}),componentsProps:u.shape({backdrop:u.oneOfType([u.func,u.object]),root:u.oneOfType([u.func,u.object])}),container:u.oneOfType([Ci,u.func]),disableAutoFocus:u.bool,disableEnforceFocus:u.bool,disableEscapeKeyDown:u.bool,disablePortal:u.bool,disableRestoreFocus:u.bool,disableScrollLock:u.bool,hideBackdrop:u.bool,keepMounted:u.bool,onBackdropClick:u.func,onClose:u.func,onTransitionEnter:u.func,onTransitionExited:u.func,open:u.bool.isRequired,slotProps:u.shape({backdrop:u.oneOfType([u.func,u.object]),root:u.oneOfType([u.func,u.object])}),slots:u.shape({backdrop:u.elementType,root:u.elementType}),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object])});const Tz=mQ;var th={},Sz=cA;Object.defineProperty(th,"__esModule",{value:!0});var EQ=th.default=void 0,Pz=Sz(uA()),Rz=f,Oz=(0,Pz.default)((0,Rz.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");EQ=th.default=Oz;var nh={},jz=cA;Object.defineProperty(nh,"__esModule",{value:!0});var IQ=nh.default=void 0,Dz=jz(uA()),Mz=f,kz=(0,Dz.default)((0,Mz.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");IQ=nh.default=kz;var Fz=function(e){var t=e.children,n=e.editor,r=e.preferenceKey,o=e.openButtonLabel,s=o===void 0?"ra.configurable.customize":o,a=e.sx,c="preferences.".concat(r),A=Ae.usePreferencesEditor(),d=!!A,p=Ae.useTranslate(),h=A||{},C=h.isEnabled,m=h.setEditor,I=h.preferenceKey,B=h.setPreferenceKey,v=c===I,P=Q.useRef(v),j=Q.useRef(null),x=Q.useState(!1),R=x[0],S=x[1];if(Q.useEffect(function(){P.current=v},[v]),Q.useEffect(function(){return function(){P.current&&(B&&B(null),m&&m(null))}},[m,B]),!d)return t;var L=function(){m(Q.cloneElement(n,{preferenceKey:c,key:c})),B(c)},F=function(){S(!0)},X=function(){S(!1)};return k.createElement(Ae.PreferenceKeyContextProvider,{value:c},k.createElement(Lz,{className:aQ(qr.root,C&&qr.editMode,v&&qr.editorActive),sx:a,ref:j,onMouseEnter:C?F:void 0,onMouseLeave:C?X:void 0},t),k.createElement(b.Popover,{open:C&&(R||v),sx:{pointerEvents:"none","& .MuiPaper-root":{pointerEvents:"auto",borderRadius:10,padding:"2px",lineHeight:0,backgroundColor:"warning.light",color:"warning.contrastText","&:hover":{cursor:"pointer"}}},anchorEl:j.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"center"},onClose:X,PaperProps:{elevation:1,onMouseEnter:F,onMouseLeave:X,title:p(s),onClick:L},disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,disableScrollLock:!0,marginThreshold:8},k.createElement(IQ,{fontSize:"12px"})))},Rc="RaConfigurable",qr={root:"".concat(Rc,"-root"),editMode:"".concat(Rc,"-editMode"),editorActive:"".concat(Rc,"-editorActive")},Lz=de("span",{name:Rc,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={position:"relative",display:"inline-block"},t["&.".concat(qr.editMode)]={transition:n.transitions.create("outline"),outline:"".concat(b.alpha(n.palette.warning.main,.3)," solid 2px")},t["&.".concat(qr.editMode,":hover ")]={outline:"".concat(b.alpha(n.palette.warning.main,.5)," solid 2px")},t["&.".concat(qr.editMode,".").concat(qr.editorActive," , &.").concat(qr.editMode,".").concat(qr.editorActive,":hover ")]={outline:"".concat(n.palette.warning.main," solid 2px")},t}),ui=globalThis&&globalThis.__assign||function(){return ui=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},ui.apply(this,arguments)},Nz=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},Vz=function(e){var t=e.title,n=e.defaultTitle,r=e.className,o=Nz(e,["title","defaultTitle","className"]),s=Ae.usePreference()[0],a=Ae.useTranslate(),c=Ae.useRecordContext();return s?k.createElement("span",ui({className:r},o),a(s,ui(ui({},c),{_:s}))):k.createElement("span",{className:r},t?typeof t=="string"?k.createElement("span",ui({},o),a(t,{_:t})):t:k.createElement("span",ui({},o),n))},lu=globalThis&&globalThis.__assign||function(){return lu=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},lu.apply(this,arguments)},Hz=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},zz=function(){var e=Ae.usePreferenceInput();return k.createElement("form",null,k.createElement(b.TextField,lu({label:"title",variant:"filled",size:"small",fullWidth:!0,sx:{mb:1}},e)))},Wz=function(e){var t=e.preferenceKey,n=Hz(e,["preferenceKey"]),r=Bt.useLocation().pathname;return k.createElement(Fz,{editor:k.createElement(zz,null),preferenceKey:t||"".concat(r,".title"),sx:{"&.RaConfigurable-editMode":{margin:"2px"}}},k.createElement(Vz,lu({},n)))},nf=globalThis&&globalThis.__assign||function(){return nf=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},nf.apply(this,arguments)},Uz=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},BQ=function(e){var t=e.defaultTitle,n=e.title,r=e.preferenceKey,o=Uz(e,["defaultTitle","title","preferenceKey"]),s=Q.useState(function(){return typeof document<"u"?document.getElementById("react-admin-title"):null}),a=s[0],c=s[1];return Q.useEffect(function(){c(function(A){var d=typeof document<"u"&&document.body.contains(A);return A&&d?A:typeof document<"u"?document.getElementById("react-admin-title"):null})},[]),a?(Ae.warning(!t&&!n,"Missing title prop in <Title> element"),rs.createPortal(k.createElement(Wz,nf({title:n,defaultTitle:t,preferenceKey:r},o)),a)):null},vQ=u.oneOfType([u.string,u.element]);BQ.propTypes={defaultTitle:u.string,className:u.string,record:u.any,title:vQ};var Yz=function(e){var t=ps.useLocation().pathname,n=Q.useRef(t);Q.useEffect(function(){t!==n.current&&e()},[t,e])},Gz=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])})},Q0={error:null},Kz=function(e){pp(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s))||this,r.state=Q0,r.resetErrorBoundary=function(){for(var c,A=arguments.length,d=new Array(A),p=0;p<A;p++)d[p]=arguments[p];r.props.onReset==null||(c=r.props).onReset.apply(c,d),r.reset()},r}t.getDerivedStateFromError=function(o){return{error:o}};var n=t.prototype;return n.reset=function(){this.setState(Q0)},n.componentDidCatch=function(o,s){var a,c;(a=(c=this.props).onError)==null||a.call(c,o,s)},n.componentDidUpdate=function(o,s){var a=this.state.error,c=this.props.resetKeys;if(a!==null&&s.error!==null&&Gz(o.resetKeys,c)){var A,d;(A=(d=this.props).onResetKeysChange)==null||A.call(d,o.resetKeys,c),this.reset()}},n.render=function(){var o=this.state.error,s=this.props,a=s.fallbackRender,c=s.FallbackComponent,A=s.fallback;if(o!==null){var d={error:o,resetErrorBoundary:this.resetErrorBoundary};if(k.isValidElement(A))return A;if(typeof a=="function")return a(d);if(c)return k.createElement(c,d);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(k.Component),rf=globalThis&&globalThis.__assign||function(){return rf=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},rf.apply(this,arguments)},qz=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},yQ=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,a=qz(e,["className","loadingPrimary","loadingSecondary"]),c=Ae.useTimeout(1e3),A=Ae.useTranslate();return c?k.createElement(Jz,rf({className:t},a),k.createElement("div",{className:cu.message},k.createElement(Bp,{className:cu.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};yQ.propTypes={className:u.string,loadingPrimary:u.string,loadingSecondary:u.string};var Oc="RaLoading",cu={root:"".concat(Oc,"-root"),icon:"".concat(Oc,"-icon"),message:"".concat(Oc,"-message")},Jz=de("div",{name:Oc,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(cu.message)]={textAlign:"center",fontFamily:"Roboto, sans-serif",color:n.palette.text.disabled,paddingTop:"1em",paddingBottom:"1em"},t["& .".concat(cu.icon)]={width:"9em",height:"9em"},t});function Xz(e){return Nt("MuiToolbar",e)}Ut("MuiToolbar",["root","gutters","regular","dense"]);const Zz=["className","component","disableGutters","variant"],_z=e=>{const{classes:t,disableGutters:n,variant:r}=e;return sn({root:["root",!n&&"gutters",r]},Xz,t)},$z=de("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})=>z({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),bQ=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiToolbar"}),{className:o,component:s="div",disableGutters:a=!1,variant:c="regular"}=r,A=Ke(r,Zz),d=z({},r,{component:s,disableGutters:a,variant:c}),p=_z(d);return f.jsx($z,z({as:s,className:Ge(p.root,o),ref:n,ownerState:d},A))});process.env.NODE_ENV!=="production"&&(bQ.propTypes={children:u.node,classes:u.object,className:u.string,component:u.elementType,disableGutters:u.bool,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),variant:u.oneOfType([u.oneOf(["dense","regular"]),u.string])});const eW=bQ;var rh={},tW=cA;Object.defineProperty(rh,"__esModule",{value:!0});var QQ=rh.default=void 0,nW=tW(uA()),rW=f,oW=(0,nW.default)((0,rW.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");QQ=rh.default=oW;const iW=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function of(e){return`scale(${e}, ${e**2})`}const sW={entering:{opacity:1,transform:of(1)},entered:{opacity:1,transform:"none"}},dg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),oh=k.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:a,in:c,onEnter:A,onEntered:d,onEntering:p,onExit:h,onExited:C,onExiting:m,style:I,timeout:B="auto",TransitionComponent:v=hp}=t,P=Ke(t,iW),j=k.useRef(),x=k.useRef(),R=Tt(),S=k.useRef(null),L=Ln(S,s.ref,n),F=K=>V=>{if(K){const _=S.current;V===void 0?K(_):K(_,V)}},X=F(p),Z=F((K,V)=>{eh(K);const{duration:_,delay:M,easing:$}=vs({style:I,timeout:B,easing:a},{mode:"enter"});let H;B==="auto"?(H=R.transitions.getAutoHeightDuration(K.clientHeight),x.current=H):H=_,K.style.transition=[R.transitions.create("opacity",{duration:H,delay:M}),R.transitions.create("transform",{duration:dg?H:H*.666,delay:M,easing:$})].join(","),A&&A(K,V)}),U=F(d),G=F(m),ae=F(K=>{const{duration:V,delay:_,easing:M}=vs({style:I,timeout:B,easing:a},{mode:"exit"});let $;B==="auto"?($=R.transitions.getAutoHeightDuration(K.clientHeight),x.current=$):$=V,K.style.transition=[R.transitions.create("opacity",{duration:$,delay:_}),R.transitions.create("transform",{duration:dg?$:$*.666,delay:dg?_:_||$*.333,easing:M})].join(","),K.style.opacity=0,K.style.transform=of(.75),h&&h(K)}),oe=F(C),J=K=>{B==="auto"&&(j.current=setTimeout(K,x.current||0)),r&&r(S.current,K)};return k.useEffect(()=>()=>{clearTimeout(j.current)},[]),f.jsx(v,z({appear:o,in:c,nodeRef:S,onEnter:Z,onEntered:U,onEntering:X,onExit:ae,onExited:oe,onExiting:G,addEndListener:J,timeout:B==="auto"?null:B},P,{children:(K,V)=>k.cloneElement(s,z({style:z({opacity:0,transform:of(.75),visibility:K==="exited"&&!c?"hidden":void 0},sW[K],I,s.props.style),ref:L},V))}))});process.env.NODE_ENV!=="production"&&(oh.propTypes={addEndListener:u.func,appear:u.bool,children:ws.isRequired,easing:u.oneOfType([u.shape({enter:u.string,exit:u.string}),u.string]),in:u.bool,onEnter:u.func,onEntered:u.func,onEntering:u.func,onExit:u.func,onExited:u.func,onExiting:u.func,style:u.object,timeout:u.oneOfType([u.oneOf(["auto"]),u.number,u.shape({appear:u.number,enter:u.number,exit:u.number})])});oh.muiSupportAuto=!0;const x0=oh;var Bn="top",rr="bottom",or="right",vn="left",ih="auto",sl=[Bn,rr,or,vn],ys="start",za="end",aW="clippingParents",xQ="viewport",da="popper",lW="reference",w0=sl.reduce(function(e,t){return e.concat([t+"-"+ys,t+"-"+za])},[]),wQ=[].concat(sl,[ih]).reduce(function(e,t){return e.concat([t,t+"-"+ys,t+"-"+za])},[]),cW="beforeRead",uW="read",AW="afterRead",dW="beforeMain",gW="main",fW="afterMain",pW="beforeWrite",hW="write",CW="afterWrite",mW=[cW,uW,AW,dW,gW,fW,pW,hW,CW];function Or(e){return e?(e.nodeName||"").toLowerCase():null}function Vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ii(e){var t=Vn(e).Element;return e instanceof t||e instanceof Element}function er(e){var t=Vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function sh(e){if(typeof ShadowRoot>"u")return!1;var t=Vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function EW(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];!er(s)||!Or(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(a){var c=o[a];c===!1?s.removeAttribute(a):s.setAttribute(a,c===!0?"":c)}))})}function IW(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]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=a.reduce(function(A,d){return A[d]="",A},{});!er(o)||!Or(o)||(Object.assign(o.style,c),Object.keys(s).forEach(function(A){o.removeAttribute(A)}))})}}const BW={name:"applyStyles",enabled:!0,phase:"write",fn:EW,effect:IW,requires:["computeStyles"]};function Pr(e){return e.split("-")[0]}var hi=Math.max,uu=Math.min,bs=Math.round;function sf(){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 TQ(){return!/^((?!chrome|android).)*safari/i.test(sf())}function Qs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&er(e)&&(o=e.offsetWidth>0&&bs(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&bs(r.height)/e.offsetHeight||1);var a=Ii(e)?Vn(e):window,c=a.visualViewport,A=!TQ()&&n,d=(r.left+(A&&c?c.offsetLeft:0))/o,p=(r.top+(A&&c?c.offsetTop:0))/s,h=r.width/o,C=r.height/s;return{width:h,height:C,top:p,right:d+h,bottom:p+C,left:d,x:d,y:p}}function ah(e){var t=Qs(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 SQ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&sh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function oo(e){return Vn(e).getComputedStyle(e)}function vW(e){return["table","td","th"].indexOf(Or(e))>=0}function No(e){return((Ii(e)?e.ownerDocument:e.document)||window.document).documentElement}function AA(e){return Or(e)==="html"?e:e.assignedSlot||e.parentNode||(sh(e)?e.host:null)||No(e)}function T0(e){return!er(e)||oo(e).position==="fixed"?null:e.offsetParent}function yW(e){var t=/firefox/i.test(sf()),n=/Trident/i.test(sf());if(n&&er(e)){var r=oo(e);if(r.position==="fixed")return null}var o=AA(e);for(sh(o)&&(o=o.host);er(o)&&["html","body"].indexOf(Or(o))<0;){var s=oo(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 al(e){for(var t=Vn(e),n=T0(e);n&&vW(n)&&oo(n).position==="static";)n=T0(n);return n&&(Or(n)==="html"||Or(n)==="body"&&oo(n).position==="static")?t:n||yW(e)||t}function lh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ta(e,t,n){return hi(e,uu(t,n))}function bW(e,t,n){var r=Ta(e,t,n);return r>n?n:r}function PQ(){return{top:0,right:0,bottom:0,left:0}}function RQ(e){return Object.assign({},PQ(),e)}function OQ(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var QW=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,RQ(typeof t!="number"?t:OQ(t,sl))};function xW(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,c=Pr(n.placement),A=lh(c),d=[vn,or].indexOf(c)>=0,p=d?"height":"width";if(!(!s||!a)){var h=QW(o.padding,n),C=ah(s),m=A==="y"?Bn:vn,I=A==="y"?rr:or,B=n.rects.reference[p]+n.rects.reference[A]-a[A]-n.rects.popper[p],v=a[A]-n.rects.reference[A],P=al(s),j=P?A==="y"?P.clientHeight||0:P.clientWidth||0:0,x=B/2-v/2,R=h[m],S=j-C[p]-h[I],L=j/2-C[p]/2+x,F=Ta(R,L,S),X=A;n.modifiersData[r]=(t={},t[X]=F,t.centerOffset=F-L,t)}}function wW(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)||SQ(t.elements.popper,o)&&(t.elements.arrow=o))}const TW={name:"arrow",enabled:!0,phase:"main",fn:xW,effect:wW,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xs(e){return e.split("-")[1]}var SW={top:"auto",right:"auto",bottom:"auto",left:"auto"};function PW(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:bs(n*o)/o||0,y:bs(r*o)/o||0}}function S0(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,a=e.offsets,c=e.position,A=e.gpuAcceleration,d=e.adaptive,p=e.roundOffsets,h=e.isFixed,C=a.x,m=C===void 0?0:C,I=a.y,B=I===void 0?0:I,v=typeof p=="function"?p({x:m,y:B}):{x:m,y:B};m=v.x,B=v.y;var P=a.hasOwnProperty("x"),j=a.hasOwnProperty("y"),x=vn,R=Bn,S=window;if(d){var L=al(n),F="clientHeight",X="clientWidth";if(L===Vn(n)&&(L=No(n),oo(L).position!=="static"&&c==="absolute"&&(F="scrollHeight",X="scrollWidth")),L=L,o===Bn||(o===vn||o===or)&&s===za){R=rr;var Z=h&&L===S&&S.visualViewport?S.visualViewport.height:L[F];B-=Z-r.height,B*=A?1:-1}if(o===vn||(o===Bn||o===rr)&&s===za){x=or;var U=h&&L===S&&S.visualViewport?S.visualViewport.width:L[X];m-=U-r.width,m*=A?1:-1}}var G=Object.assign({position:c},d&&SW),ae=p===!0?PW({x:m,y:B},Vn(n)):{x:m,y:B};if(m=ae.x,B=ae.y,A){var oe;return Object.assign({},G,(oe={},oe[R]=j?"0":"",oe[x]=P?"0":"",oe.transform=(S.devicePixelRatio||1)<=1?"translate("+m+"px, "+B+"px)":"translate3d("+m+"px, "+B+"px, 0)",oe))}return Object.assign({},G,(t={},t[R]=j?B+"px":"",t[x]=P?m+"px":"",t.transform="",t))}function RW(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,a=s===void 0?!0:s,c=n.roundOffsets,A=c===void 0?!0:c,d={placement:Pr(t.placement),variation:xs(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,S0(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:A})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,S0(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const OW={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:RW,data:{}};var mc={passive:!0};function jW(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,a=r.resize,c=a===void 0?!0:a,A=Vn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach(function(p){p.addEventListener("scroll",n.update,mc)}),c&&A.addEventListener("resize",n.update,mc),function(){s&&d.forEach(function(p){p.removeEventListener("scroll",n.update,mc)}),c&&A.removeEventListener("resize",n.update,mc)}}const DW={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jW,data:{}};var MW={left:"right",right:"left",bottom:"top",top:"bottom"};function jc(e){return e.replace(/left|right|bottom|top/g,function(t){return MW[t]})}var kW={start:"end",end:"start"};function P0(e){return e.replace(/start|end/g,function(t){return kW[t]})}function ch(e){var t=Vn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function uh(e){return Qs(No(e)).left+ch(e).scrollLeft}function FW(e,t){var n=Vn(e),r=No(e),o=n.visualViewport,s=r.clientWidth,a=r.clientHeight,c=0,A=0;if(o){s=o.width,a=o.height;var d=TQ();(d||!d&&t==="fixed")&&(c=o.offsetLeft,A=o.offsetTop)}return{width:s,height:a,x:c+uh(e),y:A}}function LW(e){var t,n=No(e),r=ch(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=hi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=hi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+uh(e),A=-r.scrollTop;return oo(o||n).direction==="rtl"&&(c+=hi(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:a,x:c,y:A}}function Ah(e){var t=oo(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function jQ(e){return["html","body","#document"].indexOf(Or(e))>=0?e.ownerDocument.body:er(e)&&Ah(e)?e:jQ(AA(e))}function Sa(e,t){var n;t===void 0&&(t=[]);var r=jQ(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Vn(r),a=o?[s].concat(s.visualViewport||[],Ah(r)?r:[]):r,c=t.concat(a);return o?c:c.concat(Sa(AA(a)))}function af(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function NW(e,t){var n=Qs(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 R0(e,t,n){return t===xQ?af(FW(e,n)):Ii(t)?NW(t,n):af(LW(No(e)))}function VW(e){var t=Sa(AA(e)),n=["absolute","fixed"].indexOf(oo(e).position)>=0,r=n&&er(e)?al(e):e;return Ii(r)?t.filter(function(o){return Ii(o)&&SQ(o,r)&&Or(o)!=="body"}):[]}function HW(e,t,n,r){var o=t==="clippingParents"?VW(e):[].concat(t),s=[].concat(o,[n]),a=s[0],c=s.reduce(function(A,d){var p=R0(e,d,r);return A.top=hi(p.top,A.top),A.right=uu(p.right,A.right),A.bottom=uu(p.bottom,A.bottom),A.left=hi(p.left,A.left),A},R0(e,a,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function DQ(e){var t=e.reference,n=e.element,r=e.placement,o=r?Pr(r):null,s=r?xs(r):null,a=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,A;switch(o){case Bn:A={x:a,y:t.y-n.height};break;case rr:A={x:a,y:t.y+t.height};break;case or:A={x:t.x+t.width,y:c};break;case vn:A={x:t.x-n.width,y:c};break;default:A={x:t.x,y:t.y}}var d=o?lh(o):null;if(d!=null){var p=d==="y"?"height":"width";switch(s){case ys:A[d]=A[d]-(t[p]/2-n[p]/2);break;case za:A[d]=A[d]+(t[p]/2-n[p]/2);break}}return A}function Wa(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,a=s===void 0?e.strategy:s,c=n.boundary,A=c===void 0?aW:c,d=n.rootBoundary,p=d===void 0?xQ:d,h=n.elementContext,C=h===void 0?da:h,m=n.altBoundary,I=m===void 0?!1:m,B=n.padding,v=B===void 0?0:B,P=RQ(typeof v!="number"?v:OQ(v,sl)),j=C===da?lW:da,x=e.rects.popper,R=e.elements[I?j:C],S=HW(Ii(R)?R:R.contextElement||No(e.elements.popper),A,p,a),L=Qs(e.elements.reference),F=DQ({reference:L,element:x,strategy:"absolute",placement:o}),X=af(Object.assign({},x,F)),Z=C===da?X:L,U={top:S.top-Z.top+P.top,bottom:Z.bottom-S.bottom+P.bottom,left:S.left-Z.left+P.left,right:Z.right-S.right+P.right},G=e.modifiersData.offset;if(C===da&&G){var ae=G[o];Object.keys(U).forEach(function(oe){var J=[or,rr].indexOf(oe)>=0?1:-1,K=[Bn,rr].indexOf(oe)>=0?"y":"x";U[oe]+=ae[K]*J})}return U}function zW(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,a=n.padding,c=n.flipVariations,A=n.allowedAutoPlacements,d=A===void 0?wQ:A,p=xs(r),h=p?c?w0:w0.filter(function(I){return xs(I)===p}):sl,C=h.filter(function(I){return d.indexOf(I)>=0});C.length===0&&(C=h);var m=C.reduce(function(I,B){return I[B]=Wa(e,{placement:B,boundary:o,rootBoundary:s,padding:a})[Pr(B)],I},{});return Object.keys(m).sort(function(I,B){return m[I]-m[B]})}function WW(e){if(Pr(e)===ih)return[];var t=jc(e);return[P0(e),t,P0(t)]}function UW(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,a=n.altAxis,c=a===void 0?!0:a,A=n.fallbackPlacements,d=n.padding,p=n.boundary,h=n.rootBoundary,C=n.altBoundary,m=n.flipVariations,I=m===void 0?!0:m,B=n.allowedAutoPlacements,v=t.options.placement,P=Pr(v),j=P===v,x=A||(j||!I?[jc(v)]:WW(v)),R=[v].concat(x).reduce(function(ue,fe){return ue.concat(Pr(fe)===ih?zW(t,{placement:fe,boundary:p,rootBoundary:h,padding:d,flipVariations:I,allowedAutoPlacements:B}):fe)},[]),S=t.rects.reference,L=t.rects.popper,F=new Map,X=!0,Z=R[0],U=0;U<R.length;U++){var G=R[U],ae=Pr(G),oe=xs(G)===ys,J=[Bn,rr].indexOf(ae)>=0,K=J?"width":"height",V=Wa(t,{placement:G,boundary:p,rootBoundary:h,altBoundary:C,padding:d}),_=J?oe?or:vn:oe?rr:Bn;S[K]>L[K]&&(_=jc(_));var M=jc(_),$=[];if(s&&$.push(V[ae]<=0),c&&$.push(V[_]<=0,V[M]<=0),$.every(function(ue){return ue})){Z=G,X=!1;break}F.set(G,$)}if(X)for(var H=I?3:1,q=function(fe){var he=R.find(function(Be){var me=F.get(Be);if(me)return me.slice(0,fe).every(function(Ce){return Ce})});if(he)return Z=he,"break"},ge=H;ge>0;ge--){var pe=q(ge);if(pe==="break")break}t.placement!==Z&&(t.modifiersData[r]._skip=!0,t.placement=Z,t.reset=!0)}}const YW={name:"flip",enabled:!0,phase:"main",fn:UW,requiresIfExists:["offset"],data:{_skip:!1}};function O0(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 j0(e){return[Bn,or,rr,vn].some(function(t){return e[t]>=0})}function GW(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,a=Wa(t,{elementContext:"reference"}),c=Wa(t,{altBoundary:!0}),A=O0(a,r),d=O0(c,o,s),p=j0(A),h=j0(d);t.modifiersData[n]={referenceClippingOffsets:A,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}const KW={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:GW};function qW(e,t,n){var r=Pr(e),o=[vn,Bn].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=s[0],c=s[1];return a=a||0,c=(c||0)*o,[vn,or].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}function JW(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,a=wQ.reduce(function(p,h){return p[h]=qW(h,t.rects,s),p},{}),c=a[t.placement],A=c.x,d=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=A,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=a}const XW={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:JW};function ZW(e){var t=e.state,n=e.name;t.modifiersData[n]=DQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const _W={name:"popperOffsets",enabled:!0,phase:"read",fn:ZW,data:{}};function $W(e){return e==="x"?"y":"x"}function eU(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,a=n.altAxis,c=a===void 0?!1:a,A=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.padding,C=n.tether,m=C===void 0?!0:C,I=n.tetherOffset,B=I===void 0?0:I,v=Wa(t,{boundary:A,rootBoundary:d,padding:h,altBoundary:p}),P=Pr(t.placement),j=xs(t.placement),x=!j,R=lh(P),S=$W(R),L=t.modifiersData.popperOffsets,F=t.rects.reference,X=t.rects.popper,Z=typeof B=="function"?B(Object.assign({},t.rects,{placement:t.placement})):B,U=typeof Z=="number"?{mainAxis:Z,altAxis:Z}:Object.assign({mainAxis:0,altAxis:0},Z),G=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ae={x:0,y:0};if(L){if(s){var oe,J=R==="y"?Bn:vn,K=R==="y"?rr:or,V=R==="y"?"height":"width",_=L[R],M=_+v[J],$=_-v[K],H=m?-X[V]/2:0,q=j===ys?F[V]:X[V],ge=j===ys?-X[V]:-F[V],pe=t.elements.arrow,ue=m&&pe?ah(pe):{width:0,height:0},fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:PQ(),he=fe[J],Be=fe[K],me=Ta(0,F[V],ue[V]),Ce=x?F[V]/2-H-me-he-U.mainAxis:q-me-he-U.mainAxis,Ie=x?-F[V]/2+H+me+Be+U.mainAxis:ge+me+Be+U.mainAxis,Qe=t.elements.arrow&&al(t.elements.arrow),ce=Qe?R==="y"?Qe.clientTop||0:Qe.clientLeft||0:0,Ne=(oe=G==null?void 0:G[R])!=null?oe:0,te=_+Ce-Ne-ce,$e=_+Ie-Ne,yt=Ta(m?uu(M,te):M,_,m?hi($,$e):$);L[R]=yt,ae[R]=yt-_}if(c){var gt,St=R==="x"?Bn:vn,Ir=R==="x"?rr:or,bt=L[S],Et=S==="y"?"height":"width",ft=bt+v[St],Vt=bt-v[Ir],Ht=[Bn,vn].indexOf(P)!==-1,Pe=(gt=G==null?void 0:G[S])!=null?gt:0,ke=Ht?ft:bt-F[Et]-X[Et]-Pe+U.altAxis,we=Ht?bt+F[Et]+X[Et]-Pe-U.altAxis:Vt,We=m&&Ht?bW(ke,bt,we):Ta(m?ke:ft,bt,m?we:Vt);L[S]=We,ae[S]=We-bt}t.modifiersData[r]=ae}}const tU={name:"preventOverflow",enabled:!0,phase:"main",fn:eU,requiresIfExists:["offset"]};function nU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function rU(e){return e===Vn(e)||!er(e)?ch(e):nU(e)}function oU(e){var t=e.getBoundingClientRect(),n=bs(t.width)/e.offsetWidth||1,r=bs(t.height)/e.offsetHeight||1;return n!==1||r!==1}function iU(e,t,n){n===void 0&&(n=!1);var r=er(t),o=er(t)&&oU(t),s=No(t),a=Qs(e,o,n),c={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(r||!r&&!n)&&((Or(t)!=="body"||Ah(s))&&(c=rU(t)),er(t)?(A=Qs(t,!0),A.x+=t.clientLeft,A.y+=t.clientTop):s&&(A.x=uh(s))),{x:a.left+c.scrollLeft-A.x,y:a.top+c.scrollTop-A.y,width:a.width,height:a.height}}function sU(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 a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(c){if(!n.has(c)){var A=t.get(c);A&&o(A)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function aU(e){var t=sU(e);return mW.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function lU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function cU(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 D0={placement:"bottom",modifiers:[],strategy:"absolute"};function M0(){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 uU(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?D0:o;return function(c,A,d){d===void 0&&(d=s);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},D0,s),modifiersData:{},elements:{reference:c,popper:A},attributes:{},styles:{}},h=[],C=!1,m={state:p,setOptions:function(P){var j=typeof P=="function"?P(p.options):P;B(),p.options=Object.assign({},s,p.options,j),p.scrollParents={reference:Ii(c)?Sa(c):c.contextElement?Sa(c.contextElement):[],popper:Sa(A)};var x=aU(cU([].concat(r,p.options.modifiers)));return p.orderedModifiers=x.filter(function(R){return R.enabled}),I(),m.update()},forceUpdate:function(){if(!C){var P=p.elements,j=P.reference,x=P.popper;if(M0(j,x)){p.rects={reference:iU(j,al(x),p.options.strategy==="fixed"),popper:ah(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(U){return p.modifiersData[U.name]=Object.assign({},U.data)});for(var R=0;R<p.orderedModifiers.length;R++){if(p.reset===!0){p.reset=!1,R=-1;continue}var S=p.orderedModifiers[R],L=S.fn,F=S.options,X=F===void 0?{}:F,Z=S.name;typeof L=="function"&&(p=L({state:p,options:X,name:Z,instance:m})||p)}}}},update:lU(function(){return new Promise(function(v){m.forceUpdate(),v(p)})}),destroy:function(){B(),C=!0}};if(!M0(c,A))return m;m.setOptions(d).then(function(v){!C&&d.onFirstUpdate&&d.onFirstUpdate(v)});function I(){p.orderedModifiers.forEach(function(v){var P=v.name,j=v.options,x=j===void 0?{}:j,R=v.effect;if(typeof R=="function"){var S=R({state:p,name:P,instance:m,options:x}),L=function(){};h.push(S||L)}})}function B(){h.forEach(function(v){return v()}),h=[]}return m}}var AU=[DW,_W,OW,BW,XW,YW,tU,TW,KW],dU=uU({defaultModifiers:AU});function gU(e){return Nt("MuiPopper",e)}Ut("MuiPopper",["root"]);const fU=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],pU=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function hU(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 Au(e){return typeof e=="function"?e():e}function dA(e){return e.nodeType!==void 0}function CU(e){return!dA(e)}const mU=()=>sn({root:["root"]},qH(gU)),EU={},IU=k.forwardRef(function(t,n){var r;const{anchorEl:o,children:s,direction:a,disablePortal:c,modifiers:A,open:d,placement:p,popperOptions:h,popperRef:C,slotProps:m={},slots:I={},TransitionProps:B}=t,v=Ke(t,fU),P=k.useRef(null),j=Ln(P,n),x=k.useRef(null),R=Ln(x,C),S=k.useRef(R);Cs(()=>{S.current=R},[R]),k.useImperativeHandle(C,()=>x.current,[]);const L=hU(p,a),[F,X]=k.useState(L),[Z,U]=k.useState(Au(o));k.useEffect(()=>{x.current&&x.current.forceUpdate()}),k.useEffect(()=>{o&&U(Au(o))},[o]),Cs(()=>{if(!Z||!d)return;const K=M=>{X(M.placement)};if(process.env.NODE_ENV!=="production"&&Z&&dA(Z)&&Z.nodeType===1){const M=Z.getBoundingClientRect();process.env.NODE_ENV!=="test"&&M.top===0&&M.left===0&&M.right===0&&M.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(`
@@ -281,5 +281,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
281
281
  `),Gq)),$q=de("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Se(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>z({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:Ih(t,e.color),transition:`transform .${gf}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&_t.css(iB||(iB=Ls`
282
282
  width: auto;
283
283
  animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
284
- `),Kq)),h1=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:a,valueBuffer:c,variant:A="indeterminate"}=r,d=Ke(r,Yq),p=z({},r,{color:s,variant:A}),h=Jq(p),C=Tt(),m={},I={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(a!==void 0){m["aria-valuenow"]=Math.round(a),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let B=a-100;C.direction==="rtl"&&(B=-B),I.bar1.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(A==="buffer")if(c!==void 0){let B=(c||0)-100;C.direction==="rtl"&&(B=-B),I.bar2.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return f.jsxs(Xq,z({className:Ge(h.root,o),ownerState:p,role:"progressbar"},m,{ref:n},d,{children:[A==="buffer"?f.jsx(Zq,{className:h.dashed,ownerState:p}):null,f.jsx(_q,{className:h.bar1,ownerState:p,style:I.bar1}),A==="determinate"?null:f.jsx($q,{className:h.bar2,ownerState:p,style:I.bar2})]}))});process.env.NODE_ENV!=="production"&&(h1.propTypes={classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","primary","secondary"]),u.string]),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),value:u.number,valueBuffer:u.number,variant:u.oneOf(["buffer","determinate","indeterminate","query"])});const eJ=h1,tJ=de("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),C1=()=>f.jsx(tJ,{children:f.jsx(eJ,{color:"primary"})}),nJ=e=>t=>f.jsx(Q.Suspense,{fallback:f.jsx(C1,{}),children:f.jsx(e,{...t})}),Bh=({title:e})=>f.jsxs(b.Stack,{direction:"row",children:[f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]}),m1=de(O.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),vh=({children:e})=>{const t=Bt.useLocation(),{pathname:n}=t;return Q.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};vh.propTypes={children:u.node};const rJ=de("div")({width:"100%",overflowX:"auto",display:"block"}),yh=({title:e})=>f.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});yh.propTypes={title:u.string.isRequired};var Ua=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(Ua||{});const oJ=Zr().required(),iJ=Zr().oneOf(Object.values(Ua));function sJ(e){var P;const t=us.useQueryClient(),[n,r]=Q.useState(!1),[o,s]=Q.useState(()=>()=>Promise.resolve()),a=Ae.useGetIdentity(),c=(P=a==null?void 0:a.data)==null?void 0:P.email,A=Ae.useDataProvider(),d=Q.useCallback(()=>c?A.get("onboarding").then(j=>{var x;return(x=j==null?void 0:j.data)==null?void 0:x.value}):Promise.reject(),[A,c]),{data:p,isLoading:h,isError:C}=us.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[m,I]=Q.useState(()=>()=>Promise.resolve()),B=us.useMutation({mutationFn:m}),v=B.mutateAsync;return Q.useEffect(()=>{function j(){const x=ne.chain(p??{}).clone().extend({[e]:Date.now()}).value();return A.post("onboarding",x).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}I(()=>j)},[A,p,e,t,c]),Q.useEffect(()=>{r(ne.isNil((p??{})[e]))},[p,e,r]),Q.useEffect(()=>{s(()=>()=>v())},[v]),{loading:h,error:C,onboardingRequired:n,acknowledgeOnboarding:o}}function aJ(e){const[t,n]=ju("onboarding",{}),[r,o]=Q.useState(!1),[s,a]=Q.useState(()=>()=>Promise.resolve());return Q.useEffect(()=>{o(ne.isNil((t??{})[e]))},[t,e,o]),Q.useEffect(()=>{a(()=>()=>(n(c=>ne.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function lJ(){return{onboardingRequired:!1,acknowledgeOnboarding:Q.useRef(()=>Promise.resolve()).current}}function cJ(e,t){Yf({mode:iJ,topic:oJ}).validateSync({mode:e,topic:t});const n=sJ(t),r=aJ(t),o=lJ();switch(e){case Ua.USER:return n.loading?o:n.error?r:ne.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case Ua.BROWSER:return r;default:return o}}var ja=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(ja||{});function uJ(e,t){var o;const n=ne.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return ne.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=ne.chain(n.tips).clone().reject(p=>p.id===a).value(),A=ne.find(n.tips,{id:a}),d=ne.chain(A??{}).clone().extend(s).value();return c.push(d),ne.extend(n,{tips:ne.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(A=>A.id===a).sortBy(["step"]).value();return ne.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(C=>C.id===a).value(),A=ne.find(n.tips,{id:a});if(ne.isNil(A))return n;const d=ne.chain(A).clone().extend({dismissed:!0}).value();c.push(d);const p=((o=ne.chain(c).reject(C=>C.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&ne.chain(c).reject(C=>C.step<p).reject(C=>C.dismissed??!1).isEmpty().value()&&e.onComplete(),ne.extend(n,{tips:ne.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:s}=t;return ne.extend(n,{onComplete:s})}case"RESTART":{const s=ne.chain(n.tips).clone().map(a=>ne.omit(a,"dismissed")).value();return ne.extend(n,{tips:s,currentStep:0})}default:return n}}const E1=Q.createContext(void 0);function AJ(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=cJ(t,n),[s,a]=Q.useReducer(uJ,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=Q.useMemo(()=>({state:s,dispatch:a}),[s,a]);return Q.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),Q.useEffect(()=>{function A(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:A})},[o,a]),f.jsx(E1.Provider,{value:c,children:e.children})}function I1(){const e=Q.useContext(E1);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function dJ(){return I1().state}function B1(){return I1().dispatch}function gJ(e){Yf({id:Zr().required(),step:sv().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=dJ(),c=ne.find(s,{id:t}),{dismissed:A}=c??{},d=B1(),p=Q.useCallback(()=>{d({type:ja.DISMISS_TIP,payload:t})},[d,t]);return Q.useEffect(()=>{(ne.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:ja.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c]),Q.useEffect(()=>()=>{d({type:ja.UNREGISTER_TIP,payload:t})},[t,d]),{tip:ne.chain(c??e).clone().extend({open:o&&!ne.isNil(c)&&a===n&&!A}).value(),dismiss:p}}function fJ(){const e=B1();return Q.useCallback(()=>{e({type:ja.RESTART})},[e])}function pJ(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=gJ({id:t,step:n,completeOnboarding:o}),{open:c}=s,A=ne.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(Gu,{...A,arrow:!0,open:c,title:f.jsxs(b.Stack,{gap:1,children:[f.jsx(b.Typography,{children:r}),f.jsx(b.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const hJ=b.styled(pJ)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${b.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${b.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${b.tooltipClasses.arrow}`]:{color:r.main}}}),bh=(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)]},CJ=(e,t)=>e&&e.data?{data:bh(e.data,t),total:e.total+1}:e,mJ=(e,t)=>e&&e.length>0?bh(e,t):e,EJ=(e,t)=>e&&e.data?{...e,data:bh(e.data,t),total:e.total+1}:e,Qh=({onClose:e,record:t,children:n,redirect:r,onSubmit:o,onSuccess:s,onError:a})=>{const c=us.useQueryClient(),A=O.useResourceContext(),d=O.useRedirect(),p=O.useNotify(),h=Q.useCallback(B=>{const P=Date.now();c.setQueryData([A,"getOne",{id:B.id}],B),c.setQueriesData([A,"getList"],j=>EJ(j,B),{updatedAt:P}),c.setQueriesData([A,"getMany"],j=>mJ(j,B),{updatedAt:P}),c.setQueriesData([A,"getManyReference"],j=>CJ(j,B),{updatedAt:P}),e(),p("ra.notification.created"),r!==void 0&&d(r,A,B.id,B),s&&s(B)},[e,s,c,A,p,d,r]),{save:C,...m}=O.useCreateController({mutationOptions:{onSuccess:h,onError:a}}),I=Q.useCallback(B=>{o?o(B,e):C&&C(B)},[o,C,e]);return f.jsx(O.CreateContextProvider,{value:{record:t,save:I,saving:m==null?void 0:m.saving,redirect:r},children:Q.cloneElement(n,{...n.props,toolbar:f.jsxs(Er,{children:[f.jsx(O.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:m==null?void 0:m.saving}),f.jsx(O.SaveButton,{disabled:m==null?void 0:m.saving})]})})})};Qh.propTypes={children:u.node,onClose:u.func,record:u.object,redirect:u.oneOf(["list","edit","show",!1])};Qh.defaultProps={redirect:!1};const IJ={true:{_scrollToTop:!0},false:{}},BJ=de(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${O.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),xh=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:o,scrollToTop:s,className:a,sx:c,onSubmit:A,onSuccess:d,onError:p,...h})=>{const[C,m]=Q.useState(!1),I=O.useTranslate(),B=O.useResourceContext(),{openDialog:v,closeDialog:P}=vi(),j=Q.useCallback(()=>v(B,()=>m(!0)),[v,B]),x=Q.useCallback(()=>P(B,()=>m(!1)),[P,B]),R=b.useMediaQuery(S=>S.breakpoints.down("md"));return f.jsxs(f.Fragment,{children:[R?f.jsx(BJ,{...h,state:IJ[String(s)],color:"primary",className:Ge(O.CreateButtonClasses.floating,a),"aria-label":n&&I(n),onClick:j,children:f.jsx(yn.Add,{})}):f.jsx(O.Button,{...h,sx:c,label:n,onClick:j,children:f.jsx(yn.Add,{})}),f.jsx(b.Dialog,{open:C,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:f.jsx(Qh,{...h,redirect:o,record:r,onClose:x,onSubmit:A,onSuccess:d,onError:p})})]})};xh.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0};xh.propTypes={...O.Button.propTypes,redirect:u.oneOf(["list","edit","show",!1]),fullWidth:u.bool,maxWidth:u.oneOf(["xs","sm","md","lg","xl",!1]),label:u.string,record:u.object,scrollToTop:u.bool,className:u.string,sx:u.object,children:u.node,onSubmit:u.func,onSuccess:u.func,onError:u.func};const v1=({onClose:e,children:t})=>{const n=O.useNotify(),r=O.useRecordContext(),o=O.useResourceContext(),{id:s}=r,{isLoading:a,data:c}=O.useGetOne(o,{id:s}),A=Q.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:d,saving:p}=O.useEditController({resource:o,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return f.jsx(O.EditContextProvider,{value:{record:c,isLoading:a,save:d,saving:p},children:Q.cloneElement(t,{toolbar:f.jsxs(Er,{children:[f.jsx(O.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),f.jsx(O.SaveButton,{})]})})})};v1.propTypes={children:u.node,onClose:u.func};const wh=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[o,s]=Q.useState(!1),{openDialog:a,closeDialog:c}=vi(),A=O.useResourceContext(),d=Q.useCallback(()=>a(A,()=>s(!0)),[a,A]),p=Q.useCallback(()=>c(A,()=>s(!1)),[c,A]);return f.jsxs(f.Fragment,{children:[f.jsx(O.Button,{label:n,onClick:d,children:f.jsx(yn.Edit,{})}),f.jsx(b.Dialog,{open:o,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:f.jsx(v1,{...r,onClose:p})})]})};wh.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"};wh.propTypes={fullWidth:u.bool,maxWidth:u.oneOf(["xs","sm","md","lg","xl",!1]),label:u.string};const y1=({label:e="ra.auth.sign_in",...t})=>{const n=O.useRecordContext(),[r,o]=Q.useState(!1),s=O.useAuthProvider(),a=Q.useCallback(c=>{c.stopPropagation(),c.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 f.jsx(O.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(yn.VpnKey,{})})};y1.propTypes={label:u.string};const b1=Q.createContext({});b1.displayName="DatagridContext";const vJ=({children:e,value:t})=>f.jsx(b1.Provider,{value:t,children:e}),Th=e=>{const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:A}=Ae.useListContext(e),d=Ae.useTranslate(),p=Q.useCallback(()=>{A()},[A]);return f.jsx(yJ,{className:r,children:f.jsxs(eW,{"data-test":"bulk-actions-toolbar",className:Ge(fr.toolbar,{[fr.collapsed]:c.length===0}),...Ae.sanitizeListRestProps(o),children:[f.jsxs("div",{className:fr.title,children:[f.jsx(Ip,{className:fr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(du,{fontSize:"small"})}),f.jsx(Ly,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(O.TopToolbar,{className:fr.topToolbar,children:Q.Children.map(n,h=>Q.isValidElement(h)?Q.cloneElement(h,{filterValues:s,resource:a,selectedIds:c}):null)})]})})};Th.propTypes={children:u.node,label:u.string};const ci="RaBulkActionsToolbar",fr={toolbar:`${ci}-toolbar`,topToolbar:`${ci}-topToolbar`,buttons:`${ci}-buttons`,collapsed:`${ci}-collapsed`,title:`${ci}-title`,icon:`${ci}-icon`},yJ=de("div",{name:ci,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${fr.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"?ms(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},[`& .${fr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${fr.buttons}`]:{},[`& .${fr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${fr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${fr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),sB=f.jsx(O.BulkDeleteButton,{}),Sh=k.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?O.PureDatagridBody:O.DatagridBody,header:o=O.DatagridHeader,children:s,className:a,empty:c=xJ,expand:A,bulkActionsToolbar:d=!1,bulkActionButtons:p=sB,hover:h,isRowSelectable:C,isRowExpandable:m,resource:I,rowClick:B,rowSx:v,rowStyle:P,size:j="small",sx:x,expandSingle:R=!1,...S}=e,{sort:L,data:F,isLoading:X,onSelect:Z,onToggleItem:U,selectedIds:G,setSort:ae,total:oe}=Ae.useListContext(e),J=!!p,K=Q.useMemo(()=>({isRowExpandable:m,expandSingle:R}),[m,R]),V=Q.useRef(null);Q.useEffect(()=>{(!G||G.length===0)&&(V.current=null)},[JSON.stringify(G)]);const _=Q.useCallback((M,$)=>{const H=F.map(ge=>ge.id),q=H.indexOf(V.current);if(V.current=$.target.checked?M:null,$.shiftKey&&q!==-1){const ge=H.indexOf(M),pe=H.slice(Math.min(q,ge),Math.max(q,ge)+1),ue=$.target.checked?$Y(G,pe):fG(G,pe);Z(C?ue.filter(fe=>C(F.find(he=>he.id===fe))):ue)}else U(M)},[F,C,Z,U,G]);return X===!0?f.jsx(O.DatagridLoading,{className:a,expand:A,hasBulkActions:J,nbChildren:k.Children.count(s),size:j}):F==null||F.length===0||oe===0?c||null:f.jsx(vJ,{value:K,children:f.jsxs(O.DatagridRoot,{sx:x,className:Ge(O.DatagridClasses.root,a),children:[d!=null&&Q.isValidElement(d)?Q.cloneElement(d,{selectedIds:G,total:oe}):p!==!1?f.jsx(Th,{children:Q.isValidElement(p)?p:sB}):null,f.jsx("div",{className:O.DatagridClasses.tableWrapper,children:f.jsxs(b.Table,{ref:t,className:O.DatagridClasses.table,size:j,...QJ(S),children:[aB(o,{children:s,sort:L,data:F,hasExpand:!!A,hasBulkActions:J,isRowSelectable:C,onSelect:Z,resource:I,selectedIds:G,setSort:ae},s),aB(r,{expand:A,rowClick:B,data:F,hasBulkActions:J,hover:h,onToggleItem:_,resource:I,rowSx:v,rowStyle:P,selectedIds:G,isRowSelectable:C},s)]})})]})})}),aB=(e,t,n)=>Q.isValidElement(e)?Q.cloneElement(e,t,n):Q.createElement(e,t,n);Sh.propTypes={body:u.oneOfType([u.element,u.elementType]),bulkActionButtons:u.oneOfType([u.bool,u.element]),children:u.node.isRequired,className:u.string,sort:u.exact({field:u.string,order:u.oneOf(["ASC","DESC"])}),data:u.arrayOf(u.any),empty:u.element,expand:u.oneOfType([u.element,u.elementType]),header:u.oneOfType([u.element,u.elementType]),hover:u.bool,isLoading:u.bool,onSelect:u.func,onToggleItem:u.func,resource:u.string,rowClick:u.oneOfType([u.string,u.func,u.bool]),rowSx:u.func,rowStyle:u.func,selectedIds:u.arrayOf(u.any),setSort:u.func,total:u.number,isRowSelectable:u.func,isRowExpandable:u.func,expandSingle:u.bool};const bJ=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],QJ=e=>Object.keys(Ae.sanitizeListRestProps(e)).filter(t=>!bJ.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});Sh.displayName="Datagrid";const xJ=f.jsx(O.ListNoResults,{}),wJ=de(Sh,{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"}})),TJ=e=>f.jsx(wJ,{...e}),SJ=de("div")(({theme:e})=>({padding:e.spacing(2)})),Q1=({actions:e,className:t,...n})=>{const{hasCreate:r}=Ae.useResourceDefinition(n),o=Ae.useResourceContext(n),s=Ae.useTranslate(),a=Ae.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),A=s("ra.page.empty",{name:c}),d=s("ra.page.invite");return f.jsxs(PJ,{className:t,children:[f.jsxs("div",{className:gs.message,children:[f.jsx(yn.Inbox,{className:gs.icon}),f.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:A})}),r&&f.jsx(b.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:d})})]}),f.jsx(SJ,{className:gs.toolbar,children:e})]})},kc="ApplicaEmpty",gs={message:`${kc}-message`,icon:`${kc}-icon`,toolbar:`${kc}-toolbar`},PJ=de("span",{name:kc,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${gs.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${gs.icon}`]:{width:"9em",height:"9em"},[`& .${gs.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));Q1.propTypes={actions:u.element,className:u.string};const RJ=()=>{const e=O.useRefresh(),t=O.useNotify(),n=O.useUnselectAll(),r=O.useResourceContext(),{selectedIds:o,data:s}=O.useListContext(),a=O.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)),[A,{isLoading:d}]=O.useUpdateMany(r,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:no().format("YYYY-MM-DD HH:mm:ss")},rows:c},{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=Q.useCallback(()=>{A()},[A]);return f.jsx(O.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(yn.Email,{})})},OJ=()=>{const e=O.useRefresh(),t=O.useNotify(),n=O.useUnselectAll(),{selectedIds:r,data:o}=O.useListContext(),s=O.useRecordContext(),a=O.useResourceContext(),c=r.map(h=>o.find(C=>C.id===h)).concat([s]),[A,{isLoading:d}]=O.useUpdateMany(a,{ids:r.length>0?r:[s==null?void 0:s.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),n("notifications")},onFailure:()=>t("resources.notifications.messages.unreaded.error","warning")}),p=Q.useCallback(()=>{A()},[A]);return f.jsx(O.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||s&&!(s!=null&&s.readed),onClick:p,children:f.jsx(yn.Drafts,{})})},jJ=e=>{const t=O.useRecordContext(e),n=O.useResourceContext(e),r=O.useRedirect(),o=O.useNotify(),s=O.useTranslate(),[a]=O.useLocaleState(),c=Q.useMemo(()=>t!=null&&t.readed?no(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[A]=O.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:no().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")}}),d=Q.useCallback(()=>A(),[A]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(b.Typography,{variant:"subtitle1",children:f.jsxs(b.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.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}}),c&&f.jsx(b.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})})]})},DJ=({...e})=>{const t=b.useTheme(),{mode:n,colorize:r,density:o}=Q.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=Q.useCallback(a=>({backgroundColor:a!=null&&a.readed?r(t.palette.primary[n],o):r(t.palette.secondary[n],o)}),[t,n,r,o]);return f.jsxs(O.Datagrid,{...e,rowStyle:s,children:[f.jsx(jJ,{source:"notification",sortable:!1,label:"ra.notification"}),f.jsx(Zu,{source:"created",label:"ra.notification.created"}),f.jsxs(Fo,{children:[f.jsx(RJ,{}),f.jsx(OJ,{})]})]})},MJ=f.jsx(O.ListActions,{}),kJ=f.jsx(O.Pagination,{}),FJ=f.jsx(O.Empty,{}),LJ=yG,x1=e=>{const{actions:t=MJ,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=kJ,children:A,className:d,component:p=LJ,title:h,empty:C=FJ,...m}=e,{defaultTitle:I,data:B,error:v,isLoading:P,filterValues:j,resource:x}=Ae.useListContext(e);if(!A||!B&&P&&s)return null;const R=()=>f.jsxs("div",{className:To.main,children:[(r||t)&&f.jsx(O.ListToolbar,{className:To.actions,filters:r,actions:t,hasCreate:a}),!v&&f.jsx(p,{className:To.content,children:o&&A&&k.isValidElement(A)?Q.cloneElement(A,{bulkActionButtons:o}):A}),v?f.jsx(gh,{error:v,resetErrorBoundary:null}):c!==!1&&c]}),S=()=>C!==!1&&Q.cloneElement(C,{className:To.noResults,hasCreate:a}),L=!P&&(B==null?void 0:B.length)===0&&!Object.keys(j).length&&C!==!1;return f.jsxs(NJ,{className:Ge("list-page",d),...m,children:[f.jsx(O.Title,{title:h,defaultTitle:I,preferenceKey:`${x}.list.title`}),L?S():R(),n]})};x1.propTypes={actions:u.oneOfType([u.bool,u.element]),aside:u.element,children:u.node,className:u.string,component:Ae.ComponentPropType,emptyWhileLoading:u.bool,filters:u.oneOfType([u.element,u.arrayOf(u.element)]),hasCreate:u.bool,pagination:u.oneOfType([u.element,u.bool]),title:O.TitlePropType};const Ia="RaList",To={main:`${Ia}-main`,content:`${Ia}-content`,actions:`${Ia}-actions`,noResults:`${Ia}-noResults`},NJ=de("div",{name:Ia,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${To.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${To.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${To.actions}`]:{},[`& .${To.noResults}`]:{}})),Ph=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=VJ,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:A,sort:d,storeKey:p,...h})=>f.jsx(Ae.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:A,sort:d,storeKey:p,children:f.jsx(x1,{...h})});Ph.propTypes={actions:u.oneOfType([u.bool,u.element]),aside:u.element,children:u.node.isRequired,className:u.string,emptyWhileLoading:u.bool,filter:u.object,filterDefaultValues:u.object,filters:u.oneOfType([u.element,u.arrayOf(u.element)]),pagination:u.oneOfType([u.element,u.bool]),perPage:u.number,sort:u.shape({field:u.string,order:u.oneOf(["ASC","DESC"])}),sx:u.any,title:O.TitlePropType,disableSyncWithLocation:u.bool,hasCreate:u.bool,resource:u.string};const VJ={},HJ=Za(Ph,{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)}})),w1=e=>f.jsx($n,{content:!1,children:f.jsx(HJ,{...e})});w1.propTypes={...Ph.propTypes};const Cg={p:0,m:0},lB={p:2,m:0,borderRadius:0,width:"100%"},T1=e=>{const{children:t}=e,[n,r]=k.useState(null),o=I=>{r(I.currentTarget)},s=()=>{r(null)},a=b.useMediaQuery(I=>I.breakpoints.down("md")),c=!!n,A=c?"simple-popover":void 0,{filterValues:d,resource:p,selectedIds:h=[],onUnselectItems:C}=O.useListContext(e),m=k.useCallback(()=>{C(),r(null)},[C,r]);return f.jsx(b.Fade,{in:h!==void 0&&h.length>0,children:f.jsxs(b.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(b.Fab,{color:"primary","aria-label":"manage",onClick:o,children:h==null?void 0:h.length}),f.jsx(b.Popover,{id:A,open:c,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(b.List,{sx:Cg,children:[f.jsx(b.ListItem,{sx:Cg,children:f.jsx(O.Button,{onClick:m,sx:lB,label:"ra.action.unselect",startIcon:f.jsx(du,{}),children:f.jsx(du,{})})}),k.Children.map(t,I=>{var B;return f.jsx(b.ListItem,{sx:Cg,children:k.isValidElement(I)?k.cloneElement(I,{filterValues:d,resource:p,selectedIds:h,sx:lB,...(B=I.props)!=null&&B.popover?{closePopover:s}:{}}):null})})]})})]})})};T1.propTypes={children:u.node};const vc={width:"1.5rem",alignSelf:"center"},Rh=({source:e,label:t,variant:n,record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:A,button:d,buttonProps:p,...h})=>{const{getCurrentDialog:C}=vi(),m=Ae.useResourceContext(h),I=C(),B=Ae.useRecordContext(),v=r||B,P=dt.get(v,e||"");return f.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:j=>({pt:1,pb:1,borderBottom:`1px solid ${j.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[c&&(Q.isValidElement(c)?Q.cloneElement(c,{style:vc}):Q.createElement(c,{style:vc})),f.jsx(Ae.FieldTitle,{label:t,source:e,resource:I||m})]}),f.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[a?Q.isValidElement(a)?Q.cloneElement(a,{record:v,resource:m,value:P}):Q.createElement(a,{source:e,record:v,resource:m,value:P}):f.jsx(b.Typography,{variant:n,children:P}),A&&(Q.isValidElement(A)?Q.cloneElement(A,{style:vc}):Q.createElement(A,{style:vc})),d&&f.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:d})]})]})};Rh.propTypes={source:u.string,label:u.string,record:u.object,variant:u.oneOf(["body1","body2","caption","button","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),spaceTop:u.bool,spaceBottom:u.bool,leftIcon:u.oneOfType([u.elementType,u.element,u.func]),rightIcon:u.oneOfType([u.elementType,u.element,u.func]),component:u.oneOfType([u.elementType,u.element,u.func]),buttonProps:u.object,button:u.string};Rh.defaultProps={variant:"body1"};const S1=()=>{const e=_t.useTheme(),n=e.palette.mode==="dark"?e.palette.primary.dark:e.palette.primary.light;return f.jsx(b.Box,{sx:{position:"absolute",filter:"blur(20px)",bottom:0,p:4,pb:8},children:f.jsxs("svg",{width:"100%",height:"calc(100vh - 175px)",viewBox:"0 0 117 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.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}),f.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}),f.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}),f.jsx("path",{d:"M55.5449 21.96V0H58.1407V21.96H55.5449Z",fill:n}),f.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}),f.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}),f.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}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"})]})})},P1=({children:e,...t})=>{const n=Tt();return f.jsx($n,{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:f.jsx(b.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})};P1.propTypes={children:u.node};const ul=({version:e,name:t,copy:n,children:r,logo:o,background:s=S1})=>f.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[Q.isValidElement(s)?s:Q.createElement(s),f.jsxs(b.Grid,{container:!0,direction:"column",justifyContent:"flex-end",sx:{minHeight:"100vh"},children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(Bh,{title:t})}),f.jsxs(b.Grid,{item:!0,xs:12,children:[f.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:f.jsx(b.Grid,{item:!0,children:f.jsx(P1,{children:r})})}),f.jsx(b.Grid,{item:!0,sx:{pb:1},children:f.jsx(il,{name:t,copy:n,version:e})})]})]})]});ul.propTypes={children:u.node,version:u.string,name:u.string,copy:u.string,background:u.oneOfType([u.node,u.func,u.object])};const R1=({name:e,copy:t,logo:n,version:r,background:o})=>{const s=Ae.useTranslate(),a=Ae.useAuthProvider(),c=Ae.useNotify(),A=Bt.useNavigate(),{token:d}=Bt.useParams();return Q.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),ne.delay(()=>A("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),ne.delay(()=>A("/login"),1e3)})},[d]),f.jsx(ul,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(b.Typography,{component:Bt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})};R1.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const fA=({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o,enableRegistration:s,redirectTo:a,background:c})=>{const[A,d]=Ae.useSafeSetState(!1),p=Ae.useLogin(),h=Ae.useTranslate(),C=Ae.useNotify(),m=Ae.useCheckAuth(),I=Bt.useNavigate();Q.useEffect(()=>{m({},!1).then(()=>{I("/")}).catch(()=>{})},[m,I]);const B=v=>{d(!0),p(v,a).then(()=>{d(!1)}).catch(P=>{d(!1),C(typeof P=="string"?P:typeof P>"u"||!P.message?"ra.auth.sign_in_error":P.message,{type:"error",messageArgs:{_:typeof P=="string"?P:P&&P.message?P.message:void 0}})})};return f.jsx(ul,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:"Login"}),s&&f.jsx(b.Typography,{component:Bt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(Ae.Form,{onSubmit:B,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Fn,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:Ae.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Fn,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:Ae.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o&&f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(b.Link,{variant:"h6",component:Bt.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:A,fullWidth:!0,children:A?f.jsx(b.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]})})]})})};fA.propTypes={version:u.string.isRequired,name:u.string.isRequired,enablePasswordRecover:u.bool,enableRegister:u.bool,background:u.element};fA.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:f.jsx(S1,{})};const O1=({name:e,copy:t,logo:n,version:r,background:o})=>{const[s,a]=Q.useState(!1),c=Ae.useTranslate(),A=Ae.useRedirect(),d=Ae.useNotify(),p=Ae.useAuthProvider(),h=({email:C})=>{a(!0),p.recover(C).then(m=>{const I=`ra.auth.recover_${m.responseCode}`,B=m.responseCode==="ok"?"info":"error";d(I,{type:B}),A("/login")}).catch(m=>{d(m,{type:"error"})}).finally(()=>a(!1))};return f.jsx(ul,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(b.Typography,{component:Bt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(O.Form,{onSubmit:h,children:[f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"email",validate:[Ae.required(),Ae.email()]})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(b.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})};O1.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const j1=({name:e,copy:t,version:n,logo:r,background:o})=>{const[s,a]=Q.useState(!1),c=Ae.useTranslate(),A=Ae.useRedirect(),d=Ae.useNotify(),p=Ae.useAuthProvider(),h=C=>{a(!0),p.register(C).then(m=>{const I=`ra.auth.register_${m.responseCode}`,B=m.responseCode==="ok"?"info":"error";d(I,{type:B}),A("/login")}).catch(m=>{d(m,{type:"error"})}).finally(()=>a(!1))};return f.jsx(ul,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(b.Typography,{component:Bt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(O.Form,{onSubmit:h,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"name",label:c("ra.register.name"),validate:Ae.required()})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"email",type:"email",validate:[Ae.required(),Ae.email()]})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"password",type:"password",validate:Ae.required()})})]}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})};j1.propTypes={name:u.string.isRequired,version:u.string.isRequired};function D1(){const e=Q.useCallback(()=>location.reload(),[]);return f.jsx(b.Container,{children:f.jsxs(b.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{src:qQ,style:{width:"100%",maxWidth:450}}),f.jsx(b.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(b.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(b.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}const zJ=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 ${ze(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${ze(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${ze(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${ze(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${ze(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${ze(e.palette.info.main,.2)}`,success:`0 0 0 2px ${ze(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${ze(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${ze(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${ze(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${ze(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${ze(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${ze(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${ze(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${ze(e.palette.grey[500],.2)}`});function tr(e,t){WJ(e)&&(e="100%");var n=UJ(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 WJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function UJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YJ(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function yc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mg(e){return e.length===1?"0"+e:String(e)}function GJ(e,t,n){return{r:tr(e,255)*255,g:tr(t,255)*255,b:tr(n,255)*255}}function Eg(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 KJ(e,t,n){var r,o,s;if(e=tr(e,360),t=tr(t,100),n=tr(n,100),t===0)o=n,s=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=Eg(c,a,e+1/3),o=Eg(c,a,e),s=Eg(c,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function qJ(e,t,n){e=tr(e,255),t=tr(t,255),n=tr(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s=0,a=r,c=r-o,A=r===0?0:c/r;if(r===o)s=0;else{switch(r){case e:s=(t-n)/c+(t<n?6:0);break;case t:s=(n-e)/c+2;break;case n:s=(e-t)/c+4;break}s/=6}return{h:s,s:A,v:a}}function JJ(e,t,n){e=tr(e,360)*6,t=tr(t,100),n=tr(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),a=n*(1-o*t),c=n*(1-(1-o)*t),A=r%6,d=[n,a,s,s,c,n][A],p=[c,n,n,a,s,s][A],h=[s,s,c,n,n,a][A];return{r:d*255,g:p*255,b:h*255}}function XJ(e,t,n,r){var o=[mg(Math.round(e).toString(16)),mg(Math.round(t).toString(16)),mg(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 cB(e){return Dn(e)/255}function Dn(e){return parseInt(e,16)}var uB={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 pa(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,a=!1,c=!1;return typeof e=="string"&&(e=$J(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=GJ(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(r=yc(e.s),o=yc(e.v),t=JJ(e.h,r,o),a=!0,c="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(r=yc(e.s),s=yc(e.l),t=KJ(e.h,r,s),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YJ(n),{ok:a,format:e.format||c,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 ZJ="[-\\+]?\\d+%?",_J="[-\\+]?\\d*\\.\\d+%?",So="(?:".concat(_J,")|(?:").concat(ZJ,")"),Ig="[\\s|\\(]+(".concat(So,")[,|\\s]+(").concat(So,")[,|\\s]+(").concat(So,")\\s*\\)?"),Bg="[\\s|\\(]+(".concat(So,")[,|\\s]+(").concat(So,")[,|\\s]+(").concat(So,")[,|\\s]+(").concat(So,")\\s*\\)?"),gr={CSS_UNIT:new RegExp(So),rgb:new RegExp("rgb"+Ig),rgba:new RegExp("rgba"+Bg),hsl:new RegExp("hsl"+Ig),hsla:new RegExp("hsla"+Bg),hsv:new RegExp("hsv"+Ig),hsva:new RegExp("hsva"+Bg),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 $J(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(uB[e])e=uB[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=gr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=gr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=gr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=gr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=gr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=gr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=gr.hex8.exec(e),n?{r:Dn(n[1]),g:Dn(n[2]),b:Dn(n[3]),a:cB(n[4]),format:t?"name":"hex8"}:(n=gr.hex6.exec(e),n?{r:Dn(n[1]),g:Dn(n[2]),b:Dn(n[3]),format:t?"name":"hex"}:(n=gr.hex4.exec(e),n?{r:Dn(n[1]+n[1]),g:Dn(n[2]+n[2]),b:Dn(n[3]+n[3]),a:cB(n[4]+n[4]),format:t?"name":"hex8"}:(n=gr.hex3.exec(e),n?{r:Dn(n[1]+n[1]),g:Dn(n[2]+n[2]),b:Dn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Kr(e){return!!gr.CSS_UNIT.exec(String(e))}var bc=2,AB=.16,eX=.05,tX=.05,nX=.15,M1=5,k1=4,rX=[{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 dB(e){var t=e.r,n=e.g,r=e.b,o=qJ(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Qc(e){var t=e.r,n=e.g,r=e.b;return"#".concat(XJ(t,n,r,!1))}function oX(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 gB(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-bc*t:Math.round(e.h)+bc*t:r=n?Math.round(e.h)+bc*t:Math.round(e.h)-bc*t,r<0?r+=360:r>=360&&(r-=360),r}function fB(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-AB*t:t===k1?r=e.s+AB:r=e.s+eX*t,r>1&&(r=1),n&&t===M1&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function pB(e,t,n){var r;return n?r=e.v+tX*t:r=e.v-nX*t,r>1&&(r=1),Number(r.toFixed(2))}function hB(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=pa(e),o=M1;o>0;o-=1){var s=dB(r),a=Qc(pa({h:gB(s,o,!0),s:fB(s,o,!0),v:pB(s,o,!0)}));n.push(a)}n.push(Qc(r));for(var c=1;c<=k1;c+=1){var A=dB(r),d=Qc(pa({h:gB(A,c),s:fB(A,c),v:pB(A,c)}));n.push(d)}return t.theme==="dark"?rX.map(function(p){var h=p.index,C=p.opacity,m=Qc(oX(pa(t.backgroundColor||"#141414"),pa(n[h]),C*100));return m}):n}var vg={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"},Zt={},Fc={};Object.keys(vg).forEach(function(e){Zt[e]=hB(vg[e]),Zt[e].primary=Zt[e][5],Fc[e]=hB(vg[e],{theme:"dark",backgroundColor:"#141414"}),Fc[e].primary=Fc[e][5]});Zt.red;Zt.volcano;Zt.gold;Zt.orange;Zt.yellow;Zt.lime;Zt.green;Zt.cyan;Zt.blue;Zt.geekblue;Zt.purple;Zt.magenta;Zt.grey;Zt.grey;const F1=e=>{const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[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:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[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:c[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:c}};F1.propTypes={colors:u.object};const iX=(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"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],A=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],A=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},sX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},aX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},lX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},cX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},uX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},AX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},dX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},L1=(e,t,n)=>{switch(t){case"theme1":return iX(e,n);case"theme2":return sX(e,n);case"theme3":return aX(e,n);case"theme4":return lX(e,n);case"theme5":return cX(e,n);case"theme6":return uX(e,n);case"theme7":return AX(e,n);case"theme8":return dX(e,n);default:return F1(e)}};L1.propTypes={colors:u.object,presetColor:u.any};const gX=(e,t)=>{const n=e==="dark"?Fc:Zt;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 a=L1(n,t,e);return xf({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?ze(a.grey[900],.87):a.grey[700],secondary:e==="dark"?ze(a.grey[900],.45):a.grey[500],disabled:e==="dark"?ze(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?ze(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})},fX=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 pX(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 hX(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function CX(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(_e.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 ni({color:e,theme:t}){const n=an(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:ze(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function mX(e){const t=ni({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":ni({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":ni({color:"secondary",theme:e}),"&.MuiAlert-borderError":ni({color:"error",theme:e}),"&.MuiAlert-borderSuccess":ni({color:"success",theme:e}),"&.MuiAlert-borderInfo":ni({color:"info",theme:e}),"&.MuiAlert-borderWarning":ni({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 EX(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function IX(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 ri({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function BX(e){const t=ri({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":ri({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":ri({color:"secondary",theme:e}),"&.MuiBadge-colorError":ri({color:"error",theme:e}),"&.MuiBadge-colorInfo":ri({color:"info",theme:e}),"&.MuiBadge-colorSuccess":ri({color:"success",theme:e}),"&.MuiBadge-colorWarning":ri({color:"warning",theme:e})}}}}}function et({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,A=`${t}Button`,d=Ss(n,A),p={"&::after":{boxShadow:`0 0 5px 5px ${ze(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${ze(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...p};case"shadow":return{color:c,backgroundColor:s,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...p};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...p};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...p};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...p}}}function vX(e){const t=et({variant:"dashed",color:"primary",theme:e}),n=et({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":et({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":et({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":et({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":et({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":et({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":et({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":et({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":et({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":et({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":et({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":et({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":et({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:et({variant:"contained",color:"primary",theme:e}),containedSecondary:et({variant:"contained",color:"secondary",theme:e}),containedError:et({variant:"contained",color:"error",theme:e}),containedSuccess:et({variant:"contained",color:"success",theme:e}),containedInfo:et({variant:"contained",color:"info",theme:e}),containedWarning:et({variant:"contained",color:"warning",theme:e}),outlinedPrimary:et({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:et({variant:"outlined",color:"secondary",theme:e}),outlinedError:et({variant:"outlined",color:"error",theme:e}),outlinedSuccess:et({variant:"outlined",color:"success",theme:e}),outlinedInfo:et({variant:"outlined",color:"info",theme:e}),outlinedWarning:et({variant:"outlined",color:"warning",theme:e}),textPrimary:et({variant:"text",color:"primary",theme:e}),textSecondary:et({variant:"text",color:"secondary",theme:e}),textError:et({variant:"text",color:"error",theme:e}),textSuccess:et({variant:"text",color:"success",theme:e}),textInfo:et({variant:"text",color:"info",theme:e}),textWarning:et({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function yX(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function bX(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function QX(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Xi({color:e,theme:t}){const n=an(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 xX(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 yg(e){const t=xX(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function wX(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(_e.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(_e.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...yg("small")},"&.size-medium":{...yg("medium")},"&.size-large":{...yg("large")}},colorPrimary:Xi({color:"primary",theme:e}),colorSecondary:Xi({color:"secondary",theme:e}),colorSuccess:Xi({color:"success",theme:e}),colorWarning:Xi({color:"warning",theme:e}),colorInfo:Xi({color:"info",theme:e}),colorError:Xi({color:"error",theme:e})}}}}function Zi({color:e,theme:t}){const n=an(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function jn({color:e,theme:t}){const n=an(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function TX(e){const t=jn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Zi({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Zi({color:"secondary",theme:e}),"&.MuiChip-colorError":Zi({color:"error",theme:e}),"&.MuiChip-colorInfo":Zi({color:"info",theme:e}),"&.MuiChip-colorSuccess":Zi({color:"success",theme:e}),"&.MuiChip-colorWarning":Zi({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":jn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":jn({color:"secondary",theme:e}),"&.MuiChip-lightError":jn({color:"error",theme:e}),"&.MuiChip-lightInfo":jn({color:"info",theme:e}),"&.MuiChip-lightSuccess":jn({color:"success",theme:e}),"&.MuiChip-lightWarning":jn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":jn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":jn({color:"secondary",theme:e}),"&.MuiChip-combinedError":jn({color:"error",theme:e}),"&.MuiChip-combinedInfo":jn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":jn({color:"success",theme:e}),"&.MuiChip-combinedWarning":jn({color:"warning",theme:e})}}}}}function SX(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:ze("#000",.7)}}}}}}function PX(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function RX(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function _i({color:e,theme:t}){const n=an(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Ss(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${ze(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${ze(r,.9)}`}}}function OX(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":_i({color:"primary",theme:e}),"&.MuiFab-secondary":_i({color:"secondary",theme:e}),"&.Mui-error":_i({color:"error",theme:e}),"&.MuiFab-success":_i({color:"success",theme:e}),"&.MuiFab-info":_i({color:"info",theme:e}),"&.MuiFab-warning":_i({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 jX(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 DX(){return{MuiInputBase:{styleOverrides:{}}}}function MX(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 kX(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function FX(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function LX(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function NX(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function VX(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function HX(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function oi({variant:e,theme:t}){const n=an(t,e),{light:r}=n,o=Ss(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function zX(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:{...oi({variant:"primary",theme:e}),"&.Mui-error":{...oi({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:oi({variant:"secondary",theme:e}),colorError:oi({variant:"error",theme:e}),colorWarning:oi({variant:"warning",theme:e}),colorInfo:oi({variant:"info",theme:e}),colorSuccess:oi({variant:"success",theme:e})}}}}function WX(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function wt({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:A}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:A,backgroundColor:c,"&:hover":{backgroundColor:s},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function UX(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":wt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":wt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":wt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":wt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":wt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":wt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":wt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":wt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":wt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":wt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":wt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":wt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":wt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":wt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":wt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":wt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":wt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":wt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":wt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":wt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":wt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":wt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":wt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":wt({variant:"outlined",color:"warning",theme:e})}}}}}}function YX(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function $i({color:e,theme:t}){const n=an(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 GX(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 bg(e){const t=GX(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function KX(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.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":{...bg("small")},"&.size-medium":{...bg("medium")},"&.size-large":{...bg("large")}},colorPrimary:$i({color:"primary",theme:e}),colorSecondary:$i({color:"secondary",theme:e}),colorSuccess:$i({color:"success",theme:e}),colorWarning:$i({color:"warning",theme:e}),colorInfo:$i({color:"info",theme:e}),colorError:$i({color:"error",theme:e})}}}}function es({color:e,theme:t}){const n=an(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function qX(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":es({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":es({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":es({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":es({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":es({color:"info",theme:e}),"&.MuiSlider-thumbColorError":es({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 JX(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 Qg(e,t){const n=JX(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 XX(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},...Qg(e,"medium")},sizeLarge:{...Qg(e,"large")},sizeSmall:{...Qg(e,"small")}}}}}function ZX(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 _X(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 $X(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 eZ(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function tZ(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function nZ(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function rZ(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function oZ(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function iZ(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 sZ(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function aZ(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function lZ(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function cZ(e){return dt.merge(pX(e),hX(e),CX(e),mX(e),EX(),IX(e),BX(e),vX(e),yX(),bX(),QX(),wX(e),TX(e),SX(),PX(e),RX(),OX(e),jX(e),DX(),MX(e),kX(),FX(),LX(e),NX(e),VX(),HX(),zX(e),WX(),UX(e),YX(e),KX(e),qX(e),XX(e),ZX(e),_X(e),$X(e),eZ(e),tZ(e),nZ(),rZ(),oZ(),iZ(e),sZ(e),aZ(),lZ())}const pA=({themeOverrides:e,children:t})=>{const n=xn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=Q.useMemo(()=>gX(o,s),[o,s]),A=Q.useMemo(()=>fX(a),[a]),d=Q.useMemo(()=>zJ(c),[c]),p=Q.useMemo(()=>ne.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:c.palette,customShadows:d,typography:A,shadows:c.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:c.spacing(2.6875),height:c.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(c):e),[r,c,A,d,e]),h=xf(p),C=ne.cloneDeep(h.components??{});return h.components=ne.merge(cZ(h),C),f.jsx(b.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(NB,{theme:h,children:[f.jsx(b.CssBaseline,{}),t]})})};pA.propTypes={children:u.node,themeOverrides:u.oneOfType([u.object,u.func])};const N1=({children:e,theme:t,...n})=>f.jsx(O.CoreAdminContext,{...n,children:f.jsx(pA,{themeOverrides:t,children:f.jsx(vh,{children:e})})});N1.displayName="ApplicaAdminContext";const Ns=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:A,layout:d,loading:p,loginPage:h,authCallbackPage:C,menu:m,notification:I,queryClient:B,requireAuth:v,store:P,ready:j,theme:x,title:R="React Admin"}=e;return f.jsx(N1,{authProvider:t,dataProvider:s,i18nProvider:A,store:P,history:c,queryClient:B,theme:x,children:f.jsx(O.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:m,catchAll:n,title:R,loading:p,loginPage:h,authCallbackPage:C,notification:I,requireAuth:v,ready:j,children:r})})};Ns.defaultProps={store:O.localStorageStore(),title:"Applica Admin"};Ns.propTypes={...O.AdminUI.propTypes};var Ya,Ga,fs;class uZ{constructor(t){Ur(this,Ya,void 0);Ur(this,Ga,void 0);Ur(this,fs,new Set);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Co(this,Ga,n),Co(this,Ya,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;mn(this,fs).has(a)||(mn(this,fs).add(a),fetch(`${mn(this,Ga)}/ui/error-log`,{method:"PUT",headers:mn(this,Ya),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(()=>{console.log("Unable to send error to server"),mn(this,fs).delete(a)}))}}Ya=new WeakMap,Ga=new WeakMap,fs=new WeakMap;class V1{constructor({catch:t,display:n,log:r,error:o}){sa(this,"catch");sa(this,"display");sa(this,"log");sa(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 AZ=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new V1({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=k.useMemo(()=>o.errorHandler?o.errorHandler:new uZ({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=k.useCallback(function(A,...d){var h;if(!A)return!1;const p=r(A instanceof ErrorEvent?A:(h=A==null?void 0:A.toString())==null?void 0:h.replace(/%s/g,()=>d.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()&&a.apply(console,arguments)},[t,n,r,e,s]);return k.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c]),!0};var Ka,qa,fi;class dZ{constructor(t){Ur(this,Ka,void 0);Ur(this,qa,void 0);Ur(this,fi,[]);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Co(this,qa,n),Co(this,Ka,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ne.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ne.isString(r)||ne.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ne.some(mn(this,fi),o=>ne.isEqual(o,{code:n,lang:r}))){mn(this,fi).push({code:n,lang:r}),fetch(`${mn(this,qa)}/i18n/message`,{method:"put",headers:mn(this,Ka),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),Co(this,fi,ne.reject(mn(this,fi),s=>ne.isEqual(s,{code:n,lang:r})))});return}}}Ka=new WeakMap,qa=new WeakMap,fi=new WeakMap;function H1(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new dZ({apiUrl:t}),A=()=>fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(h=>h.json()).catch(()=>Promise.resolve(s)),d=()=>fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(h=>h.json()).then(h=>h.reduce((C,m)=>({...C,[m.lang]:{...C[m.lang]||{},[m.code]:m.text}}),{})),p=(h,C,m)=>(r||console.error(`Warning: Missing translation for key: "${h}"`),o&&(ne.isString(h)?h.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${h}`):c.handleMessage({code:h,lang:m}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),h);return Promise.all([A(),d()]).then(h=>{const[C,m]=h;function I(B){return ne.get(m,B,{})}return e4(I,n,C,{allowMissing:r||o,onMissingKey:p})})}window.React=Q;const gZ=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,o]=Q.useState({loading:!0,languages:null});return Q.useEffect(()=>{let s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r};function z1(e){const[t,n]=Q.useState(),r=dv(e);return Q.useEffect(()=>{H1(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const fZ=new us.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Oh=({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r,development:o,logoMain:s,logoIcon:a,loginPage:c,menu:A,name:d,copy:p,version:h,dataProvider:C,authProvider:m,errorHandler:I,error:B,notification:v,enableNotification:P,enableRegistration:j,enablePasswordRecover:x,queryClient:R,background:S,enableThemeToggler:L,...F})=>{AZ({apiUrl:n,errorHandler:I,catcherFn:G=>{const ae=G==null?void 0:G.toString(),J=["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(V=>ae==null?void 0:ae.includes(V));return new V1({catch:J,display:!J,log:!J,error:ae})}});const X=Q.useMemo(()=>Q.isValidElement(c)?Q.cloneElement(c,{name:d,copy:p,logo:s,version:h,background:S,enableRegistration:j,enablePasswordRecover:x}):c,[c,d,h,p,S,s,j,x]),Z=Q.useMemo(()=>G=>{const ae=d?f.jsx(Bh,{title:d}):s,oe=d?f.jsx(yh,{title:d}):a;return f.jsx(p1,{...G,name:d,copy:p,enableThemeToggler:L,version:h,logoMain:ae,logoIcon:oe,notification:v,enableNotification:P,error:B})},[s,a,d,h,B,v,P]),U=z1({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return U===void 0?f.jsx(f.Fragment,{}):U.error?f.jsx(Yc,{initialConfig:t,children:f.jsx(pA,{themeOverrides:e,children:f.jsx(D1,{})})}):f.jsx(Rf,{children:f.jsx(Df,{menu:A,children:f.jsx(Yc,{initialConfig:t,children:f.jsx(Ns,{theme:e,layout:Z,notification:m1,queryClient:R,dataProvider:C,authProvider:m,i18nProvider:U,loginPage:X,...F})})})})};Oh.defaultProps={...Ns.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:f.jsx(fA,{version:"0.0.0",name:"Applica",redirectTo:"/"}),queryClient:fZ,enableThemeToggler:!1};Oh.propTypes={...Ns.propTypes,theme:u.oneOfType([u.object,u.func]),apiUrl:u.string.isRequired,defaultLocale:u.string,development:u.bool,logoMain:u.node,logoIcon:u.node,menu:u.arrayOf(Es),name:u.string,version:u.string,authProvider:u.oneOfType([u.func,u.object]),dataProvider:u.oneOfType([u.func,u.object]),notification:u.string,enableNotification:u.bool,enableRegistration:u.bool,enableForgotPassword:u.bool,queryClient:u.oneOfType([u.func,u.object]),enableThemeToggler:u.bool};Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>O.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>O.BooleanField});Object.defineProperty(exports,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>O.BulkDeleteWithConfirmButton});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>O.Button});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>O.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>O.Confirm});Object.defineProperty(exports,"CreateButton",{enumerable:!0,get:()=>O.CreateButton});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>O.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>O.CustomRoutes});Object.defineProperty(exports,"DeleteWithConfirmButton",{enumerable:!0,get:()=>O.DeleteWithConfirmButton});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>O.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>O.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>O.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>O.FieldTitle});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>O.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>O.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>O.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>O.I18nContextProvider});Object.defineProperty(exports,"ListToolbar",{enumerable:!0,get:()=>O.ListToolbar});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>O.LoadingIndicator});Object.defineProperty(exports,"Pagination",{enumerable:!0,get:()=>O.Pagination});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>O.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>O.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>O.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>O.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>O.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>O.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>O.SaveButton});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>O.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleList",{enumerable:!0,get:()=>O.SimpleList});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>O.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>O.SingleFieldList});Object.defineProperty(exports,"TopToolbar",{enumerable:!0,get:()=>O.TopToolbar});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>O.UrlField});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>O.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>O.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>O.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>O.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>O.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>O.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>O.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>O.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>O.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>O.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>O.useAuthProvider});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>O.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>O.useChoicesContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>O.useCreateController});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>O.useDataProvider});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>O.useEditContext});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>O.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>O.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>O.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>O.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>O.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>O.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>O.useListContext});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>O.useLocaleState});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>O.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>O.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>O.useRecordContext});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>O.useRefresh});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>O.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>O.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>O.useResourceDefinitions});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>O.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>O.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>O.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>O.useSimpleFormIteratorItem});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>O.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>O.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>O.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>O.useUnselectAll});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>O.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>O.withLifecycleCallbacks});exports.ActionsField=bp;exports.ActionsMenu=Fo;exports.ActivatePage=R1;exports.Admin=Ns;exports.AnimateButton=My;exports.AppConfigContext=Pf;exports.AppConfigProvider=Rf;exports.ApplicaAdmin=Oh;exports.ArrayInput=vL;exports.AttachmentField=Qp;exports.AttachmentInput=Pp;exports.AutocompleteArrayInput=Rp;exports.AutocompleteInput=Op;exports.Avatar=Na;exports.BooleanInput=jp;exports.Breadcrumbs=Wu;exports.BulkActionsToolbar=Th;exports.BulkFloatingActionsToolbar=T1;exports.CardForm=Ku;exports.ChangePasswordForm=Up;exports.CircularWithLabel=Zy;exports.CircularWithPath=_y;exports.CoverField=Xu;exports.Create=CL;exports.CreateInDialogButton=xh;exports.Datagrid=TJ;exports.DateAgoField=Zu;exports.DateField=xp;exports.DateInput=Dp;exports.DateTimeInput=Mp;exports.Dot=Uu;exports.Drawer=c1;exports.DrawerHeader=ex;exports.DrawerHeaderStyled=fh;exports.DrawerToggle=$b;exports.Edit=_L;exports.EditInDialogButton=wh;exports.EmailField=wp;exports.Empty=Q1;exports.FileField=Tp;exports.FileInput=kp;exports.Footer=il;exports.FormHeader=Yp;exports.FunctionField=sb;exports.GenericErrorPage=D1;exports.Header=eQ;exports.HeaderButton=u3;exports.HeaderIconButton=fL;exports.HeaderNotification=tQ;exports.HeaderProfile=nQ;exports.HeaderSpacer=oQ;exports.HeaderToggleButton=Rs;exports.HorizontalBar=u1;exports.IconButton=Ps;exports.ImageField=rl;exports.ImageInput=Fp;exports.ImpersonateUserButton=y1;exports.LabeledArrayInput=Ju;exports.LabeledInput=nt;exports.Layout=p1;exports.LayoutContent=JQ;exports.LayoutProvider=Xb;exports.LayoutWrapper=XQ;exports.LinearWithIcon=$y;exports.LinearWithLabel=eb;exports.List=w1;exports.ListItem=Rh;exports.Loadable=nJ;exports.Loader=C1;exports.LoadingButton=vp;exports.LocalStorage=uv;exports.LocalizedTextField=TL;exports.LocalizedTextInput=UL;exports.LoginPage=fA;exports.Logo=ph;exports.LongForm=kt;exports.MainCard=$n;exports.MainIcon=Bh;exports.MenuConfigContext=jf;exports.MenuConfigProvider=Df;exports.MenuPopover=Su;exports.MenuPropTypes=Es;exports.NavMenu=A1;exports.Navigation=g1;exports.Notification=m1;exports.NotificationList=DJ;exports.NumberInput=Lp;exports.OnboardingModes=Ua;exports.OnboardingProvider=AJ;exports.OnboardingTip=hJ;exports.ReadonlyField=OL;exports.RecordInput=cb;exports.RecoverPage=O1;exports.ReferenceArrayInput=Np;exports.ReferenceInput=Vp;exports.ReferenceManyField=Os;exports.ReferenceManyInput=Hp;exports.RegisterPage=j1;exports.ResponsiveSection=rQ;exports.ScrollTop=vh;exports.ScrollX=rJ;exports.SearchInput=KL;exports.SelectArrayInput=zp;exports.SelectInput=Ab;exports.Show=p9;exports.SimpleBar=Eh;exports.SimpleForm=qu;exports.SimpleFormIterator=h9;exports.SizeField=lb;exports.SmallIcon=yh;exports.SmartTextInput=$u;exports.TabbedForm=Jp;exports.TableFormIterator=UV;exports.TableFormIteratorContext=Mf;exports.TableFormIteratorItemContext=kf;exports.TextField=_u;exports.TextInput=Fn;exports.ThemeConfigContext=Of;exports.ThemeConfigProvider=Yc;exports.ThemeProvider=pA;exports.ThemeToggler=f1;exports.TimeInput=Wp;exports.Toolbar=Er;exports.Tooltip=Gu;exports.Transitions=Mo;exports.createI18nProvider=H1;exports.getLocalizedValue=Nf;exports.localizedValueHasAllLocales=Lf;exports.parseTime=ZB;exports.useAppConfig=vi;exports.useBreadcrumbs=JB;exports.useGetLocalizedValue=s3;exports.useI18nLanguages=gZ;exports.useI18nProvider=z1;exports.useLayoutContext=$p;exports.useLayoutDispatch=KV;exports.useLayoutDrawerState=wi;exports.useLayoutLogoState=_b;exports.useLayoutMediaState=ir;exports.useLayoutNotificationsState=lA;exports.useLayoutState=ks;exports.useLayoutThemeState=qV;exports.useLocalStorage=ju;exports.useLocalizedValue=i3;exports.useMemoizedObject=dv;exports.useMenu=Ff;exports.useMenuConfig=Ei;exports.usePopoverState=Du;exports.useRefDimensions=l3;exports.useResourceDefaultValues=hL;exports.useResourceTitle=Gf;exports.useRestartOnboarding=fJ;exports.useSx=mr;exports.useTableFormIterator=gv;exports.useTableFormIteratorItem=c3;exports.useThemeConfig=xn;exports.uuid=dM;exports.withLayoutProvider=Zb;
284
+ `),Kq)),h1=k.forwardRef(function(t,n){const r=Yt({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:a,valueBuffer:c,variant:A="indeterminate"}=r,d=Ke(r,Yq),p=z({},r,{color:s,variant:A}),h=Jq(p),C=Tt(),m={},I={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(a!==void 0){m["aria-valuenow"]=Math.round(a),m["aria-valuemin"]=0,m["aria-valuemax"]=100;let B=a-100;C.direction==="rtl"&&(B=-B),I.bar1.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(A==="buffer")if(c!==void 0){let B=(c||0)-100;C.direction==="rtl"&&(B=-B),I.bar2.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return f.jsxs(Xq,z({className:Ge(h.root,o),ownerState:p,role:"progressbar"},m,{ref:n},d,{children:[A==="buffer"?f.jsx(Zq,{className:h.dashed,ownerState:p}):null,f.jsx(_q,{className:h.bar1,ownerState:p,style:I.bar1}),A==="determinate"?null:f.jsx($q,{className:h.bar2,ownerState:p,style:I.bar2})]}))});process.env.NODE_ENV!=="production"&&(h1.propTypes={classes:u.object,className:u.string,color:u.oneOfType([u.oneOf(["inherit","primary","secondary"]),u.string]),sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),value:u.number,valueBuffer:u.number,variant:u.oneOf(["buffer","determinate","indeterminate","query"])});const eJ=h1,tJ=de("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),C1=()=>f.jsx(tJ,{children:f.jsx(eJ,{color:"primary"})}),nJ=e=>t=>f.jsx(Q.Suspense,{fallback:f.jsx(C1,{}),children:f.jsx(e,{...t})}),Bh=({title:e})=>f.jsxs(b.Stack,{direction:"row",children:[f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]}),m1=de(O.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),vh=({children:e})=>{const t=Bt.useLocation(),{pathname:n}=t;return Q.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};vh.propTypes={children:u.node};const rJ=de("div")({width:"100%",overflowX:"auto",display:"block"}),yh=({title:e})=>f.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});yh.propTypes={title:u.string.isRequired};var Ua=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(Ua||{});const oJ=Zr().required(),iJ=Zr().oneOf(Object.values(Ua));function sJ(e){var P;const t=us.useQueryClient(),[n,r]=Q.useState(!1),[o,s]=Q.useState(()=>()=>Promise.resolve()),a=Ae.useGetIdentity(),c=(P=a==null?void 0:a.data)==null?void 0:P.email,A=Ae.useDataProvider(),d=Q.useCallback(()=>c?A.get("onboarding").then(j=>{var x;return(x=j==null?void 0:j.data)==null?void 0:x.value}):Promise.reject(),[A,c]),{data:p,isLoading:h,isError:C}=us.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[m,I]=Q.useState(()=>()=>Promise.resolve()),B=us.useMutation({mutationFn:m}),v=B.mutateAsync;return Q.useEffect(()=>{function j(){const x=ne.chain(p??{}).clone().extend({[e]:Date.now()}).value();return A.post("onboarding",x).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}I(()=>j)},[A,p,e,t,c]),Q.useEffect(()=>{r(ne.isNil((p??{})[e]))},[p,e,r]),Q.useEffect(()=>{s(()=>()=>v())},[v]),{loading:h,error:C,onboardingRequired:n,acknowledgeOnboarding:o}}function aJ(e){const[t,n]=ju("onboarding",{}),[r,o]=Q.useState(!1),[s,a]=Q.useState(()=>()=>Promise.resolve());return Q.useEffect(()=>{o(ne.isNil((t??{})[e]))},[t,e,o]),Q.useEffect(()=>{a(()=>()=>(n(c=>ne.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function lJ(){return{onboardingRequired:!1,acknowledgeOnboarding:Q.useRef(()=>Promise.resolve()).current}}function cJ(e,t){Yf({mode:iJ,topic:oJ}).validateSync({mode:e,topic:t});const n=sJ(t),r=aJ(t),o=lJ();switch(e){case Ua.USER:return n.loading?o:n.error?r:ne.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case Ua.BROWSER:return r;default:return o}}var ja=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(ja||{});function uJ(e,t){var o;const n=ne.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return ne.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=ne.chain(n.tips).clone().reject(p=>p.id===a).value(),A=ne.find(n.tips,{id:a}),d=ne.chain(A??{}).clone().extend(s).value();return c.push(d),ne.extend(n,{tips:ne.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(A=>A.id===a).sortBy(["step"]).value();return ne.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(C=>C.id===a).value(),A=ne.find(n.tips,{id:a});if(ne.isNil(A))return n;const d=ne.chain(A).clone().extend({dismissed:!0}).value();c.push(d);const p=((o=ne.chain(c).reject(C=>C.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&ne.chain(c).reject(C=>C.step<p).reject(C=>C.dismissed??!1).isEmpty().value()&&e.onComplete(),ne.extend(n,{tips:ne.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:s}=t;return ne.extend(n,{onComplete:s})}case"RESTART":{const s=ne.chain(n.tips).clone().map(a=>ne.omit(a,"dismissed")).value();return ne.extend(n,{tips:s,currentStep:0})}default:return n}}const E1=Q.createContext(void 0);function AJ(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=cJ(t,n),[s,a]=Q.useReducer(uJ,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=Q.useMemo(()=>({state:s,dispatch:a}),[s,a]);return Q.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),Q.useEffect(()=>{function A(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:A})},[o,a]),f.jsx(E1.Provider,{value:c,children:e.children})}function I1(){const e=Q.useContext(E1);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function dJ(){return I1().state}function B1(){return I1().dispatch}function gJ(e){Yf({id:Zr().required(),step:sv().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=dJ(),c=ne.find(s,{id:t}),{dismissed:A}=c??{},d=B1(),p=Q.useCallback(()=>{d({type:ja.DISMISS_TIP,payload:t})},[d,t]);return Q.useEffect(()=>{(ne.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:ja.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c]),Q.useEffect(()=>()=>{d({type:ja.UNREGISTER_TIP,payload:t})},[t,d]),{tip:ne.chain(c??e).clone().extend({open:o&&!ne.isNil(c)&&a===n&&!A}).value(),dismiss:p}}function fJ(){const e=B1();return Q.useCallback(()=>{e({type:ja.RESTART})},[e])}function pJ(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=gJ({id:t,step:n,completeOnboarding:o}),{open:c}=s,A=ne.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(Gu,{...A,arrow:!0,open:c,title:f.jsxs(b.Stack,{gap:1,children:[f.jsx(b.Typography,{children:r}),f.jsx(b.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const hJ=b.styled(pJ)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${b.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${b.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${b.tooltipClasses.arrow}`]:{color:r.main}}}),bh=(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)]},CJ=(e,t)=>e&&e.data?{data:bh(e.data,t),total:e.total+1}:e,mJ=(e,t)=>e&&e.length>0?bh(e,t):e,EJ=(e,t)=>e&&e.data?{...e,data:bh(e.data,t),total:e.total+1}:e,Qh=({onClose:e,record:t,children:n,redirect:r,onSubmit:o,onSuccess:s,onError:a})=>{const c=us.useQueryClient(),A=O.useResourceContext(),d=O.useRedirect(),p=O.useNotify(),h=Q.useCallback(B=>{const P=Date.now();c.setQueryData([A,"getOne",{id:B.id}],B),c.setQueriesData([A,"getList"],j=>EJ(j,B),{updatedAt:P}),c.setQueriesData([A,"getMany"],j=>mJ(j,B),{updatedAt:P}),c.setQueriesData([A,"getManyReference"],j=>CJ(j,B),{updatedAt:P}),e(),p("ra.notification.created"),r!==void 0&&d(r,A,B.id,B),s&&s(B)},[e,s,c,A,p,d,r]),{save:C,...m}=O.useCreateController({mutationOptions:{onSuccess:h,onError:a}}),I=Q.useCallback(B=>{o?o(B,e):C&&C(B)},[o,C,e]);return f.jsx(O.CreateContextProvider,{value:{record:t,save:I,saving:m==null?void 0:m.saving,redirect:r},children:Q.cloneElement(n,{...n.props,toolbar:f.jsxs(Er,{children:[f.jsx(O.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:m==null?void 0:m.saving}),f.jsx(O.SaveButton,{disabled:m==null?void 0:m.saving})]})})})};Qh.propTypes={children:u.node,onClose:u.func,record:u.object,redirect:u.oneOf(["list","edit","show",!1])};Qh.defaultProps={redirect:!1};const IJ={true:{_scrollToTop:!0},false:{}},BJ=de(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${O.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),xh=({fullWidth:e,maxWidth:t,label:n,record:r,redirect:o,scrollToTop:s,className:a,sx:c,onSubmit:A,onSuccess:d,onError:p,...h})=>{const[C,m]=Q.useState(!1),I=O.useTranslate(),B=O.useResourceContext(),{openDialog:v,closeDialog:P}=vi(),j=Q.useCallback(()=>v(B,()=>m(!0)),[v,B]),x=Q.useCallback(()=>P(B,()=>m(!1)),[P,B]),R=b.useMediaQuery(S=>S.breakpoints.down("md"));return f.jsxs(f.Fragment,{children:[R?f.jsx(BJ,{...h,state:IJ[String(s)],color:"primary",className:Ge(O.CreateButtonClasses.floating,a),"aria-label":n&&I(n),onClick:j,children:f.jsx(yn.Add,{})}):f.jsx(O.Button,{...h,sx:c,label:n,onClick:j,children:f.jsx(yn.Add,{})}),f.jsx(b.Dialog,{open:C,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:f.jsx(Qh,{...h,redirect:o,record:r,onClose:x,onSubmit:A,onSuccess:d,onError:p})})]})};xh.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0};xh.propTypes={...O.Button.propTypes,redirect:u.oneOf(["list","edit","show",!1]),fullWidth:u.bool,maxWidth:u.oneOf(["xs","sm","md","lg","xl",!1]),label:u.string,record:u.object,scrollToTop:u.bool,className:u.string,sx:u.object,children:u.node,onSubmit:u.func,onSuccess:u.func,onError:u.func};const v1=({onClose:e,children:t})=>{const n=O.useNotify(),r=O.useRecordContext(),o=O.useResourceContext(),{id:s}=r,{isLoading:a,data:c}=O.useGetOne(o,{id:s}),A=Q.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:d,saving:p}=O.useEditController({resource:o,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return f.jsx(O.EditContextProvider,{value:{record:c,isLoading:a,save:d,saving:p},children:Q.cloneElement(t,{toolbar:f.jsxs(Er,{children:[f.jsx(O.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),f.jsx(O.SaveButton,{})]})})})};v1.propTypes={children:u.node,onClose:u.func};const wh=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[o,s]=Q.useState(!1),{openDialog:a,closeDialog:c}=vi(),A=O.useResourceContext(),d=Q.useCallback(()=>a(A,()=>s(!0)),[a,A]),p=Q.useCallback(()=>c(A,()=>s(!1)),[c,A]);return f.jsxs(f.Fragment,{children:[f.jsx(O.Button,{label:n,onClick:d,children:f.jsx(yn.Edit,{})}),f.jsx(b.Dialog,{open:o,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:f.jsx(v1,{...r,onClose:p})})]})};wh.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"};wh.propTypes={fullWidth:u.bool,maxWidth:u.oneOf(["xs","sm","md","lg","xl",!1]),label:u.string};const y1=({label:e="ra.auth.sign_in",...t})=>{const n=O.useRecordContext(),[r,o]=Q.useState(!1),s=O.useAuthProvider(),a=Q.useCallback(c=>{c.stopPropagation(),c.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 f.jsx(O.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(yn.VpnKey,{})})};y1.propTypes={label:u.string};const b1=Q.createContext({});b1.displayName="DatagridContext";const vJ=({children:e,value:t})=>f.jsx(b1.Provider,{value:t,children:e}),Th=e=>{const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:A}=Ae.useListContext(e),d=Ae.useTranslate(),p=Q.useCallback(()=>{A()},[A]);return f.jsx(yJ,{className:r,children:f.jsxs(eW,{"data-test":"bulk-actions-toolbar",className:Ge(fr.toolbar,{[fr.collapsed]:c.length===0}),...Ae.sanitizeListRestProps(o),children:[f.jsxs("div",{className:fr.title,children:[f.jsx(Ip,{className:fr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(du,{fontSize:"small"})}),f.jsx(Ly,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(O.TopToolbar,{className:fr.topToolbar,children:Q.Children.map(n,h=>Q.isValidElement(h)?Q.cloneElement(h,{filterValues:s,resource:a,selectedIds:c}):null)})]})})};Th.propTypes={children:u.node,label:u.string};const ci="RaBulkActionsToolbar",fr={toolbar:`${ci}-toolbar`,topToolbar:`${ci}-topToolbar`,buttons:`${ci}-buttons`,collapsed:`${ci}-collapsed`,title:`${ci}-title`,icon:`${ci}-icon`},yJ=de("div",{name:ci,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${fr.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"?ms(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},[`& .${fr.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${fr.buttons}`]:{},[`& .${fr.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${fr.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${fr.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),sB=f.jsx(O.BulkDeleteButton,{}),Sh=k.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?O.PureDatagridBody:O.DatagridBody,header:o=O.DatagridHeader,children:s,className:a,empty:c=xJ,expand:A,bulkActionsToolbar:d=!1,bulkActionButtons:p=sB,hover:h,isRowSelectable:C,isRowExpandable:m,resource:I,rowClick:B,rowSx:v,rowStyle:P,size:j="small",sx:x,expandSingle:R=!1,...S}=e,{sort:L,data:F,isLoading:X,onSelect:Z,onToggleItem:U,selectedIds:G,setSort:ae,total:oe}=Ae.useListContext(e),J=!!p,K=Q.useMemo(()=>({isRowExpandable:m,expandSingle:R}),[m,R]),V=Q.useRef(null);Q.useEffect(()=>{(!G||G.length===0)&&(V.current=null)},[JSON.stringify(G)]);const _=Q.useCallback((M,$)=>{const H=F.map(ge=>ge.id),q=H.indexOf(V.current);if(V.current=$.target.checked?M:null,$.shiftKey&&q!==-1){const ge=H.indexOf(M),pe=H.slice(Math.min(q,ge),Math.max(q,ge)+1),ue=$.target.checked?$Y(G,pe):fG(G,pe);Z(C?ue.filter(fe=>C(F.find(he=>he.id===fe))):ue)}else U(M)},[F,C,Z,U,G]);return X===!0?f.jsx(O.DatagridLoading,{className:a,expand:A,hasBulkActions:J,nbChildren:k.Children.count(s),size:j}):F==null||F.length===0||oe===0?c||null:f.jsx(vJ,{value:K,children:f.jsxs(O.DatagridRoot,{sx:x,className:Ge(O.DatagridClasses.root,a),children:[d!=null&&Q.isValidElement(d)?Q.cloneElement(d,{selectedIds:G,total:oe}):p!==!1?f.jsx(Th,{children:Q.isValidElement(p)?p:sB}):null,f.jsx("div",{className:O.DatagridClasses.tableWrapper,children:f.jsxs(b.Table,{ref:t,className:O.DatagridClasses.table,size:j,...QJ(S),children:[aB(o,{children:s,sort:L,data:F,hasExpand:!!A,hasBulkActions:J,isRowSelectable:C,onSelect:Z,resource:I,selectedIds:G,setSort:ae},s),aB(r,{expand:A,rowClick:B,data:F,hasBulkActions:J,hover:h,onToggleItem:_,resource:I,rowSx:v,rowStyle:P,selectedIds:G,isRowSelectable:C},s)]})})]})})}),aB=(e,t,n)=>Q.isValidElement(e)?Q.cloneElement(e,t,n):Q.createElement(e,t,n);Sh.propTypes={body:u.oneOfType([u.element,u.elementType]),bulkActionButtons:u.oneOfType([u.bool,u.element]),children:u.node.isRequired,className:u.string,sort:u.exact({field:u.string,order:u.oneOf(["ASC","DESC"])}),data:u.arrayOf(u.any),empty:u.element,expand:u.oneOfType([u.element,u.elementType]),header:u.oneOfType([u.element,u.elementType]),hover:u.bool,isLoading:u.bool,onSelect:u.func,onToggleItem:u.func,resource:u.string,rowClick:u.oneOfType([u.string,u.func,u.bool]),rowSx:u.func,rowStyle:u.func,selectedIds:u.arrayOf(u.any),setSort:u.func,total:u.number,isRowSelectable:u.func,isRowExpandable:u.func,expandSingle:u.bool};const bJ=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],QJ=e=>Object.keys(Ae.sanitizeListRestProps(e)).filter(t=>!bJ.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});Sh.displayName="Datagrid";const xJ=f.jsx(O.ListNoResults,{}),wJ=de(Sh,{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"}})),TJ=e=>f.jsx(wJ,{...e}),SJ=de("div")(({theme:e})=>({padding:e.spacing(2)})),Q1=({actions:e,className:t,...n})=>{const{hasCreate:r}=Ae.useResourceDefinition(n),o=Ae.useResourceContext(n),s=Ae.useTranslate(),a=Ae.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),A=s("ra.page.empty",{name:c}),d=s("ra.page.invite");return f.jsxs(PJ,{className:t,children:[f.jsxs("div",{className:gs.message,children:[f.jsx(yn.Inbox,{className:gs.icon}),f.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:A})}),r&&f.jsx(b.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:d})})]}),f.jsx(SJ,{className:gs.toolbar,children:e})]})},kc="ApplicaEmpty",gs={message:`${kc}-message`,icon:`${kc}-icon`,toolbar:`${kc}-toolbar`},PJ=de("span",{name:kc,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${gs.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${gs.icon}`]:{width:"9em",height:"9em"},[`& .${gs.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));Q1.propTypes={actions:u.element,className:u.string};const RJ=()=>{const e=O.useRefresh(),t=O.useNotify(),n=O.useUnselectAll(),r=O.useResourceContext(),{selectedIds:o,data:s}=O.useListContext(),a=O.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)),[A,{isLoading:d}]=O.useUpdateMany(r,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:no().format("YYYY-MM-DD HH:mm:ss")},rows:c},{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=Q.useCallback(()=>{A()},[A]);return f.jsx(O.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(yn.Email,{})})},OJ=()=>{const e=O.useRefresh(),t=O.useNotify(),n=O.useUnselectAll(),{selectedIds:r,data:o}=O.useListContext(),s=O.useRecordContext(),a=O.useResourceContext(),c=r.map(h=>o.find(C=>C.id===h)).concat([s]),[A,{isLoading:d}]=O.useUpdateMany(a,{ids:r.length>0?r:[s==null?void 0:s.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),n("notifications")},onFailure:()=>t("resources.notifications.messages.unreaded.error","warning")}),p=Q.useCallback(()=>{A()},[A]);return f.jsx(O.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||s&&!(s!=null&&s.readed),onClick:p,children:f.jsx(yn.Drafts,{})})},jJ=e=>{const t=O.useRecordContext(e),n=O.useResourceContext(e),r=O.useRedirect(),o=O.useNotify(),s=O.useTranslate(),[a]=O.useLocaleState(),c=Q.useMemo(()=>t!=null&&t.readed?no(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[A]=O.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:no().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")}}),d=Q.useCallback(()=>A(),[A]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(b.Typography,{variant:"subtitle1",children:f.jsxs(b.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.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}}),c&&f.jsx(b.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})})]})},DJ=({...e})=>{const t=b.useTheme(),{mode:n,colorize:r,density:o}=Q.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=Q.useCallback(a=>({backgroundColor:a!=null&&a.readed?r(t.palette.primary[n],o):r(t.palette.secondary[n],o)}),[t,n,r,o]);return f.jsxs(O.Datagrid,{...e,rowStyle:s,children:[f.jsx(jJ,{source:"notification",sortable:!1,label:"ra.notification"}),f.jsx(Zu,{source:"created",label:"ra.notification.created"}),f.jsxs(Fo,{children:[f.jsx(RJ,{}),f.jsx(OJ,{})]})]})},MJ=f.jsx(O.ListActions,{}),kJ=f.jsx(O.Pagination,{}),FJ=f.jsx(O.Empty,{}),LJ=yG,x1=e=>{const{actions:t=MJ,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=kJ,children:A,className:d,component:p=LJ,title:h,empty:C=FJ,...m}=e,{defaultTitle:I,data:B,error:v,isLoading:P,filterValues:j,resource:x}=Ae.useListContext(e);if(!A||!B&&P&&s)return null;const R=()=>f.jsxs("div",{className:To.main,children:[(r||t)&&f.jsx(O.ListToolbar,{className:To.actions,filters:r,actions:t,hasCreate:a}),!v&&f.jsx(p,{className:To.content,children:o&&A&&k.isValidElement(A)?Q.cloneElement(A,{bulkActionButtons:o}):A}),v?f.jsx(gh,{error:v,resetErrorBoundary:null}):c!==!1&&c]}),S=()=>C!==!1&&Q.cloneElement(C,{className:To.noResults,hasCreate:a}),L=!P&&(B==null?void 0:B.length)===0&&!Object.keys(j).length&&C!==!1;return f.jsxs(NJ,{className:Ge("list-page",d),...m,children:[f.jsx(O.Title,{title:h,defaultTitle:I,preferenceKey:`${x}.list.title`}),L?S():R(),n]})};x1.propTypes={actions:u.oneOfType([u.bool,u.element]),aside:u.element,children:u.node,className:u.string,component:Ae.ComponentPropType,emptyWhileLoading:u.bool,filters:u.oneOfType([u.element,u.arrayOf(u.element)]),hasCreate:u.bool,pagination:u.oneOfType([u.element,u.bool]),title:O.TitlePropType};const Ia="RaList",To={main:`${Ia}-main`,content:`${Ia}-content`,actions:`${Ia}-actions`,noResults:`${Ia}-noResults`},NJ=de("div",{name:Ia,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${To.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${To.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${To.actions}`]:{},[`& .${To.noResults}`]:{}})),Ph=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=VJ,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:A,sort:d,storeKey:p,...h})=>f.jsx(Ae.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:A,sort:d,storeKey:p,children:f.jsx(x1,{...h})});Ph.propTypes={actions:u.oneOfType([u.bool,u.element]),aside:u.element,children:u.node.isRequired,className:u.string,emptyWhileLoading:u.bool,filter:u.object,filterDefaultValues:u.object,filters:u.oneOfType([u.element,u.arrayOf(u.element)]),pagination:u.oneOfType([u.element,u.bool]),perPage:u.number,sort:u.shape({field:u.string,order:u.oneOf(["ASC","DESC"])}),sx:u.any,title:O.TitlePropType,disableSyncWithLocation:u.bool,hasCreate:u.bool,resource:u.string};const VJ={},HJ=Za(Ph,{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)}})),w1=e=>f.jsx($n,{content:!1,children:f.jsx(HJ,{...e})});w1.propTypes={...Ph.propTypes};const Cg={p:0,m:0},lB={p:2,m:0,borderRadius:0,width:"100%"},T1=e=>{const{children:t}=e,[n,r]=k.useState(null),o=I=>{r(I.currentTarget)},s=()=>{r(null)},a=b.useMediaQuery(I=>I.breakpoints.down("md")),{filterValues:c,resource:A,selectedIds:d=[],onUnselectItems:p}=O.useListContext(e),h=!!n&&d!==void 0&&d.length>0,C=h?"simple-popover":void 0,m=k.useCallback(()=>{p(),r(null)},[p,r]);return f.jsx(b.Fade,{in:d!==void 0&&d.length>0,children:f.jsxs(b.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(b.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),f.jsx(b.Popover,{id:C,open:h,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(b.List,{sx:Cg,children:[f.jsx(b.ListItem,{sx:Cg,children:f.jsx(O.Button,{onClick:m,sx:lB,label:"ra.action.unselect",startIcon:f.jsx(du,{}),children:f.jsx(du,{})})}),k.Children.map(t,I=>{var B;return f.jsx(b.ListItem,{sx:Cg,children:k.isValidElement(I)?k.cloneElement(I,{filterValues:c,resource:A,selectedIds:d,sx:lB,...(B=I.props)!=null&&B.popover?{closePopover:s}:{}}):null})})]})})]})})};T1.propTypes={children:u.node};const vc={width:"1.5rem",alignSelf:"center"},Rh=({source:e,label:t,variant:n,record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:A,button:d,buttonProps:p,...h})=>{const{getCurrentDialog:C}=vi(),m=Ae.useResourceContext(h),I=C(),B=Ae.useRecordContext(),v=r||B,P=dt.get(v,e||"");return f.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:j=>({pt:1,pb:1,borderBottom:`1px solid ${j.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[c&&(Q.isValidElement(c)?Q.cloneElement(c,{style:vc}):Q.createElement(c,{style:vc})),f.jsx(Ae.FieldTitle,{label:t,source:e,resource:I||m})]}),f.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[a?Q.isValidElement(a)?Q.cloneElement(a,{record:v,resource:m,value:P}):Q.createElement(a,{source:e,record:v,resource:m,value:P}):f.jsx(b.Typography,{variant:n,children:P}),A&&(Q.isValidElement(A)?Q.cloneElement(A,{style:vc}):Q.createElement(A,{style:vc})),d&&f.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:d})]})]})};Rh.propTypes={source:u.string,label:u.string,record:u.object,variant:u.oneOf(["body1","body2","caption","button","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),spaceTop:u.bool,spaceBottom:u.bool,leftIcon:u.oneOfType([u.elementType,u.element,u.func]),rightIcon:u.oneOfType([u.elementType,u.element,u.func]),component:u.oneOfType([u.elementType,u.element,u.func]),buttonProps:u.object,button:u.string};Rh.defaultProps={variant:"body1"};const S1=()=>{const e=_t.useTheme(),n=e.palette.mode==="dark"?e.palette.primary.dark:e.palette.primary.light;return f.jsx(b.Box,{sx:{position:"absolute",filter:"blur(20px)",bottom:0,p:4,pb:8},children:f.jsxs("svg",{width:"100%",height:"calc(100vh - 175px)",viewBox:"0 0 117 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.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}),f.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}),f.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}),f.jsx("path",{d:"M55.5449 21.96V0H58.1407V21.96H55.5449Z",fill:n}),f.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}),f.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}),f.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}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"}),f.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"})]})})},P1=({children:e,...t})=>{const n=Tt();return f.jsx($n,{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:f.jsx(b.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})};P1.propTypes={children:u.node};const ul=({version:e,name:t,copy:n,children:r,logo:o,background:s=S1})=>f.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[Q.isValidElement(s)?s:Q.createElement(s),f.jsxs(b.Grid,{container:!0,direction:"column",justifyContent:"flex-end",sx:{minHeight:"100vh"},children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(Bh,{title:t})}),f.jsxs(b.Grid,{item:!0,xs:12,children:[f.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:f.jsx(b.Grid,{item:!0,children:f.jsx(P1,{children:r})})}),f.jsx(b.Grid,{item:!0,sx:{pb:1},children:f.jsx(il,{name:t,copy:n,version:e})})]})]})]});ul.propTypes={children:u.node,version:u.string,name:u.string,copy:u.string,background:u.oneOfType([u.node,u.func,u.object])};const R1=({name:e,copy:t,logo:n,version:r,background:o})=>{const s=Ae.useTranslate(),a=Ae.useAuthProvider(),c=Ae.useNotify(),A=Bt.useNavigate(),{token:d}=Bt.useParams();return Q.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),ne.delay(()=>A("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),ne.delay(()=>A("/login"),1e3)})},[d]),f.jsx(ul,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(b.Typography,{component:Bt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})};R1.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const fA=({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o,enableRegistration:s,redirectTo:a,background:c})=>{const[A,d]=Ae.useSafeSetState(!1),p=Ae.useLogin(),h=Ae.useTranslate(),C=Ae.useNotify(),m=Ae.useCheckAuth(),I=Bt.useNavigate();Q.useEffect(()=>{m({},!1).then(()=>{I("/")}).catch(()=>{})},[m,I]);const B=v=>{d(!0),p(v,a).then(()=>{d(!1)}).catch(P=>{d(!1),C(typeof P=="string"?P:typeof P>"u"||!P.message?"ra.auth.sign_in_error":P.message,{type:"error",messageArgs:{_:typeof P=="string"?P:P&&P.message?P.message:void 0}})})};return f.jsx(ul,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:"Login"}),s&&f.jsx(b.Typography,{component:Bt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(Ae.Form,{onSubmit:B,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Fn,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:Ae.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Fn,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:Ae.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o&&f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(b.Link,{variant:"h6",component:Bt.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:A,fullWidth:!0,children:A?f.jsx(b.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]})})]})})};fA.propTypes={version:u.string.isRequired,name:u.string.isRequired,enablePasswordRecover:u.bool,enableRegister:u.bool,background:u.element};fA.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:f.jsx(S1,{})};const O1=({name:e,copy:t,logo:n,version:r,background:o})=>{const[s,a]=Q.useState(!1),c=Ae.useTranslate(),A=Ae.useRedirect(),d=Ae.useNotify(),p=Ae.useAuthProvider(),h=({email:C})=>{a(!0),p.recover(C).then(m=>{const I=`ra.auth.recover_${m.responseCode}`,B=m.responseCode==="ok"?"info":"error";d(I,{type:B}),A("/login")}).catch(m=>{d(m,{type:"error"})}).finally(()=>a(!1))};return f.jsx(ul,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(b.Typography,{component:Bt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(O.Form,{onSubmit:h,children:[f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"email",validate:[Ae.required(),Ae.email()]})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(b.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})};O1.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const j1=({name:e,copy:t,version:n,logo:r,background:o})=>{const[s,a]=Q.useState(!1),c=Ae.useTranslate(),A=Ae.useRedirect(),d=Ae.useNotify(),p=Ae.useAuthProvider(),h=C=>{a(!0),p.register(C).then(m=>{const I=`ra.auth.register_${m.responseCode}`,B=m.responseCode==="ok"?"info":"error";d(I,{type:B}),A("/login")}).catch(m=>{d(m,{type:"error"})}).finally(()=>a(!1))};return f.jsx(ul,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(b.Typography,{component:Bt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(O.Form,{onSubmit:h,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"name",label:c("ra.register.name"),validate:Ae.required()})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"email",type:"email",validate:[Ae.required(),Ae.email()]})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Fn,{source:"password",type:"password",validate:Ae.required()})})]}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})};j1.propTypes={name:u.string.isRequired,version:u.string.isRequired};function D1(){const e=Q.useCallback(()=>location.reload(),[]);return f.jsx(b.Container,{children:f.jsxs(b.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{src:qQ,style:{width:"100%",maxWidth:450}}),f.jsx(b.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(b.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(b.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}const zJ=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 ${ze(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${ze(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${ze(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${ze(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${ze(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${ze(e.palette.info.main,.2)}`,success:`0 0 0 2px ${ze(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${ze(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${ze(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${ze(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${ze(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${ze(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${ze(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${ze(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${ze(e.palette.grey[500],.2)}`});function tr(e,t){WJ(e)&&(e="100%");var n=UJ(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 WJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function UJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function YJ(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function yc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mg(e){return e.length===1?"0"+e:String(e)}function GJ(e,t,n){return{r:tr(e,255)*255,g:tr(t,255)*255,b:tr(n,255)*255}}function Eg(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 KJ(e,t,n){var r,o,s;if(e=tr(e,360),t=tr(t,100),n=tr(n,100),t===0)o=n,s=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=Eg(c,a,e+1/3),o=Eg(c,a,e),s=Eg(c,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function qJ(e,t,n){e=tr(e,255),t=tr(t,255),n=tr(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s=0,a=r,c=r-o,A=r===0?0:c/r;if(r===o)s=0;else{switch(r){case e:s=(t-n)/c+(t<n?6:0);break;case t:s=(n-e)/c+2;break;case n:s=(e-t)/c+4;break}s/=6}return{h:s,s:A,v:a}}function JJ(e,t,n){e=tr(e,360)*6,t=tr(t,100),n=tr(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),a=n*(1-o*t),c=n*(1-(1-o)*t),A=r%6,d=[n,a,s,s,c,n][A],p=[c,n,n,a,s,s][A],h=[s,s,c,n,n,a][A];return{r:d*255,g:p*255,b:h*255}}function XJ(e,t,n,r){var o=[mg(Math.round(e).toString(16)),mg(Math.round(t).toString(16)),mg(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 cB(e){return Dn(e)/255}function Dn(e){return parseInt(e,16)}var uB={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 pa(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,a=!1,c=!1;return typeof e=="string"&&(e=$J(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=GJ(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(r=yc(e.s),o=yc(e.v),t=JJ(e.h,r,o),a=!0,c="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(r=yc(e.s),s=yc(e.l),t=KJ(e.h,r,s),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=YJ(n),{ok:a,format:e.format||c,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 ZJ="[-\\+]?\\d+%?",_J="[-\\+]?\\d*\\.\\d+%?",So="(?:".concat(_J,")|(?:").concat(ZJ,")"),Ig="[\\s|\\(]+(".concat(So,")[,|\\s]+(").concat(So,")[,|\\s]+(").concat(So,")\\s*\\)?"),Bg="[\\s|\\(]+(".concat(So,")[,|\\s]+(").concat(So,")[,|\\s]+(").concat(So,")[,|\\s]+(").concat(So,")\\s*\\)?"),gr={CSS_UNIT:new RegExp(So),rgb:new RegExp("rgb"+Ig),rgba:new RegExp("rgba"+Bg),hsl:new RegExp("hsl"+Ig),hsla:new RegExp("hsla"+Bg),hsv:new RegExp("hsv"+Ig),hsva:new RegExp("hsva"+Bg),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 $J(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(uB[e])e=uB[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=gr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=gr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=gr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=gr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=gr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=gr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=gr.hex8.exec(e),n?{r:Dn(n[1]),g:Dn(n[2]),b:Dn(n[3]),a:cB(n[4]),format:t?"name":"hex8"}:(n=gr.hex6.exec(e),n?{r:Dn(n[1]),g:Dn(n[2]),b:Dn(n[3]),format:t?"name":"hex"}:(n=gr.hex4.exec(e),n?{r:Dn(n[1]+n[1]),g:Dn(n[2]+n[2]),b:Dn(n[3]+n[3]),a:cB(n[4]+n[4]),format:t?"name":"hex8"}:(n=gr.hex3.exec(e),n?{r:Dn(n[1]+n[1]),g:Dn(n[2]+n[2]),b:Dn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Kr(e){return!!gr.CSS_UNIT.exec(String(e))}var bc=2,AB=.16,eX=.05,tX=.05,nX=.15,M1=5,k1=4,rX=[{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 dB(e){var t=e.r,n=e.g,r=e.b,o=qJ(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Qc(e){var t=e.r,n=e.g,r=e.b;return"#".concat(XJ(t,n,r,!1))}function oX(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 gB(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-bc*t:Math.round(e.h)+bc*t:r=n?Math.round(e.h)+bc*t:Math.round(e.h)-bc*t,r<0?r+=360:r>=360&&(r-=360),r}function fB(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-AB*t:t===k1?r=e.s+AB:r=e.s+eX*t,r>1&&(r=1),n&&t===M1&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function pB(e,t,n){var r;return n?r=e.v+tX*t:r=e.v-nX*t,r>1&&(r=1),Number(r.toFixed(2))}function hB(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=pa(e),o=M1;o>0;o-=1){var s=dB(r),a=Qc(pa({h:gB(s,o,!0),s:fB(s,o,!0),v:pB(s,o,!0)}));n.push(a)}n.push(Qc(r));for(var c=1;c<=k1;c+=1){var A=dB(r),d=Qc(pa({h:gB(A,c),s:fB(A,c),v:pB(A,c)}));n.push(d)}return t.theme==="dark"?rX.map(function(p){var h=p.index,C=p.opacity,m=Qc(oX(pa(t.backgroundColor||"#141414"),pa(n[h]),C*100));return m}):n}var vg={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"},Zt={},Fc={};Object.keys(vg).forEach(function(e){Zt[e]=hB(vg[e]),Zt[e].primary=Zt[e][5],Fc[e]=hB(vg[e],{theme:"dark",backgroundColor:"#141414"}),Fc[e].primary=Fc[e][5]});Zt.red;Zt.volcano;Zt.gold;Zt.orange;Zt.yellow;Zt.lime;Zt.green;Zt.cyan;Zt.blue;Zt.geekblue;Zt.purple;Zt.magenta;Zt.grey;Zt.grey;const F1=e=>{const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[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:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[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:c[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:c}};F1.propTypes={colors:u.object};const iX=(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"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],A=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],A=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},sX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},aX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},lX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},cX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},uX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},AX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},dX=(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"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],A=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],A=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#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:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}},L1=(e,t,n)=>{switch(t){case"theme1":return iX(e,n);case"theme2":return sX(e,n);case"theme3":return aX(e,n);case"theme4":return lX(e,n);case"theme5":return cX(e,n);case"theme6":return uX(e,n);case"theme7":return AX(e,n);case"theme8":return dX(e,n);default:return F1(e)}};L1.propTypes={colors:u.object,presetColor:u.any};const gX=(e,t)=>{const n=e==="dark"?Fc:Zt;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 a=L1(n,t,e);return xf({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?ze(a.grey[900],.87):a.grey[700],secondary:e==="dark"?ze(a.grey[900],.45):a.grey[500],disabled:e==="dark"?ze(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?ze(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})},fX=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 pX(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 hX(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function CX(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(_e.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 ni({color:e,theme:t}){const n=an(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:ze(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function mX(e){const t=ni({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":ni({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":ni({color:"secondary",theme:e}),"&.MuiAlert-borderError":ni({color:"error",theme:e}),"&.MuiAlert-borderSuccess":ni({color:"success",theme:e}),"&.MuiAlert-borderInfo":ni({color:"info",theme:e}),"&.MuiAlert-borderWarning":ni({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 EX(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function IX(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 ri({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function BX(e){const t=ri({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":ri({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":ri({color:"secondary",theme:e}),"&.MuiBadge-colorError":ri({color:"error",theme:e}),"&.MuiBadge-colorInfo":ri({color:"info",theme:e}),"&.MuiBadge-colorSuccess":ri({color:"success",theme:e}),"&.MuiBadge-colorWarning":ri({color:"warning",theme:e})}}}}}function et({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,A=`${t}Button`,d=Ss(n,A),p={"&::after":{boxShadow:`0 0 5px 5px ${ze(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${ze(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...p};case"shadow":return{color:c,backgroundColor:s,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...p};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...p};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...p};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...p}}}function vX(e){const t=et({variant:"dashed",color:"primary",theme:e}),n=et({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":et({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":et({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":et({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":et({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":et({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":et({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":et({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":et({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":et({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":et({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":et({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":et({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:et({variant:"contained",color:"primary",theme:e}),containedSecondary:et({variant:"contained",color:"secondary",theme:e}),containedError:et({variant:"contained",color:"error",theme:e}),containedSuccess:et({variant:"contained",color:"success",theme:e}),containedInfo:et({variant:"contained",color:"info",theme:e}),containedWarning:et({variant:"contained",color:"warning",theme:e}),outlinedPrimary:et({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:et({variant:"outlined",color:"secondary",theme:e}),outlinedError:et({variant:"outlined",color:"error",theme:e}),outlinedSuccess:et({variant:"outlined",color:"success",theme:e}),outlinedInfo:et({variant:"outlined",color:"info",theme:e}),outlinedWarning:et({variant:"outlined",color:"warning",theme:e}),textPrimary:et({variant:"text",color:"primary",theme:e}),textSecondary:et({variant:"text",color:"secondary",theme:e}),textError:et({variant:"text",color:"error",theme:e}),textSuccess:et({variant:"text",color:"success",theme:e}),textInfo:et({variant:"text",color:"info",theme:e}),textWarning:et({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function yX(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function bX(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function QX(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Xi({color:e,theme:t}){const n=an(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 xX(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 yg(e){const t=xX(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function wX(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(_e.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(_e.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...yg("small")},"&.size-medium":{...yg("medium")},"&.size-large":{...yg("large")}},colorPrimary:Xi({color:"primary",theme:e}),colorSecondary:Xi({color:"secondary",theme:e}),colorSuccess:Xi({color:"success",theme:e}),colorWarning:Xi({color:"warning",theme:e}),colorInfo:Xi({color:"info",theme:e}),colorError:Xi({color:"error",theme:e})}}}}function Zi({color:e,theme:t}){const n=an(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function jn({color:e,theme:t}){const n=an(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function TX(e){const t=jn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Zi({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Zi({color:"secondary",theme:e}),"&.MuiChip-colorError":Zi({color:"error",theme:e}),"&.MuiChip-colorInfo":Zi({color:"info",theme:e}),"&.MuiChip-colorSuccess":Zi({color:"success",theme:e}),"&.MuiChip-colorWarning":Zi({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":jn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":jn({color:"secondary",theme:e}),"&.MuiChip-lightError":jn({color:"error",theme:e}),"&.MuiChip-lightInfo":jn({color:"info",theme:e}),"&.MuiChip-lightSuccess":jn({color:"success",theme:e}),"&.MuiChip-lightWarning":jn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":jn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":jn({color:"secondary",theme:e}),"&.MuiChip-combinedError":jn({color:"error",theme:e}),"&.MuiChip-combinedInfo":jn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":jn({color:"success",theme:e}),"&.MuiChip-combinedWarning":jn({color:"warning",theme:e})}}}}}function SX(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:ze("#000",.7)}}}}}}function PX(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function RX(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function _i({color:e,theme:t}){const n=an(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Ss(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${ze(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${ze(r,.9)}`}}}function OX(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":_i({color:"primary",theme:e}),"&.MuiFab-secondary":_i({color:"secondary",theme:e}),"&.Mui-error":_i({color:"error",theme:e}),"&.MuiFab-success":_i({color:"success",theme:e}),"&.MuiFab-info":_i({color:"info",theme:e}),"&.MuiFab-warning":_i({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 jX(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 DX(){return{MuiInputBase:{styleOverrides:{}}}}function MX(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 kX(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function FX(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function LX(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function NX(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function VX(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function HX(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function oi({variant:e,theme:t}){const n=an(t,e),{light:r}=n,o=Ss(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function zX(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:{...oi({variant:"primary",theme:e}),"&.Mui-error":{...oi({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:oi({variant:"secondary",theme:e}),colorError:oi({variant:"error",theme:e}),colorWarning:oi({variant:"warning",theme:e}),colorInfo:oi({variant:"info",theme:e}),colorSuccess:oi({variant:"success",theme:e})}}}}function WX(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function wt({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:A}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:A,backgroundColor:c,"&:hover":{backgroundColor:s},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function UX(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":wt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":wt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":wt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":wt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":wt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":wt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":wt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":wt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":wt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":wt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":wt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":wt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":wt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":wt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":wt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":wt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":wt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":wt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":wt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":wt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":wt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":wt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":wt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":wt({variant:"outlined",color:"warning",theme:e})}}}}}}function YX(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function $i({color:e,theme:t}){const n=an(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 GX(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 bg(e){const t=GX(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function KX(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.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":{...bg("small")},"&.size-medium":{...bg("medium")},"&.size-large":{...bg("large")}},colorPrimary:$i({color:"primary",theme:e}),colorSecondary:$i({color:"secondary",theme:e}),colorSuccess:$i({color:"success",theme:e}),colorWarning:$i({color:"warning",theme:e}),colorInfo:$i({color:"info",theme:e}),colorError:$i({color:"error",theme:e})}}}}function es({color:e,theme:t}){const n=an(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function qX(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":es({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":es({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":es({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":es({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":es({color:"info",theme:e}),"&.MuiSlider-thumbColorError":es({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 JX(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 Qg(e,t){const n=JX(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 XX(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},...Qg(e,"medium")},sizeLarge:{...Qg(e,"large")},sizeSmall:{...Qg(e,"small")}}}}}function ZX(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 _X(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 $X(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 eZ(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function tZ(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function nZ(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function rZ(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function oZ(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function iZ(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 sZ(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function aZ(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function lZ(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function cZ(e){return dt.merge(pX(e),hX(e),CX(e),mX(e),EX(),IX(e),BX(e),vX(e),yX(),bX(),QX(),wX(e),TX(e),SX(),PX(e),RX(),OX(e),jX(e),DX(),MX(e),kX(),FX(),LX(e),NX(e),VX(),HX(),zX(e),WX(),UX(e),YX(e),KX(e),qX(e),XX(e),ZX(e),_X(e),$X(e),eZ(e),tZ(e),nZ(),rZ(),oZ(),iZ(e),sZ(e),aZ(),lZ())}const pA=({themeOverrides:e,children:t})=>{const n=xn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=Q.useMemo(()=>gX(o,s),[o,s]),A=Q.useMemo(()=>fX(a),[a]),d=Q.useMemo(()=>zJ(c),[c]),p=Q.useMemo(()=>ne.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:c.palette,customShadows:d,typography:A,shadows:c.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:c.spacing(2.6875),height:c.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(c):e),[r,c,A,d,e]),h=xf(p),C=ne.cloneDeep(h.components??{});return h.components=ne.merge(cZ(h),C),f.jsx(b.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(NB,{theme:h,children:[f.jsx(b.CssBaseline,{}),t]})})};pA.propTypes={children:u.node,themeOverrides:u.oneOfType([u.object,u.func])};const N1=({children:e,theme:t,...n})=>f.jsx(O.CoreAdminContext,{...n,children:f.jsx(pA,{themeOverrides:t,children:f.jsx(vh,{children:e})})});N1.displayName="ApplicaAdminContext";const Ns=e=>{const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:A,layout:d,loading:p,loginPage:h,authCallbackPage:C,menu:m,notification:I,queryClient:B,requireAuth:v,store:P,ready:j,theme:x,title:R="React Admin"}=e;return f.jsx(N1,{authProvider:t,dataProvider:s,i18nProvider:A,store:P,history:c,queryClient:B,theme:x,children:f.jsx(O.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:m,catchAll:n,title:R,loading:p,loginPage:h,authCallbackPage:C,notification:I,requireAuth:v,ready:j,children:r})})};Ns.defaultProps={store:O.localStorageStore(),title:"Applica Admin"};Ns.propTypes={...O.AdminUI.propTypes};var Ya,Ga,fs;class uZ{constructor(t){Ur(this,Ya,void 0);Ur(this,Ga,void 0);Ur(this,fs,new Set);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Co(this,Ga,n),Co(this,Ya,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;mn(this,fs).has(a)||(mn(this,fs).add(a),fetch(`${mn(this,Ga)}/ui/error-log`,{method:"PUT",headers:mn(this,Ya),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(()=>{console.log("Unable to send error to server"),mn(this,fs).delete(a)}))}}Ya=new WeakMap,Ga=new WeakMap,fs=new WeakMap;class V1{constructor({catch:t,display:n,log:r,error:o}){sa(this,"catch");sa(this,"display");sa(this,"log");sa(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 AZ=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new V1({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=k.useMemo(()=>o.errorHandler?o.errorHandler:new uZ({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=k.useCallback(function(A,...d){var h;if(!A)return!1;const p=r(A instanceof ErrorEvent?A:(h=A==null?void 0:A.toString())==null?void 0:h.replace(/%s/g,()=>d.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()&&a.apply(console,arguments)},[t,n,r,e,s]);return k.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c]),!0};var Ka,qa,fi;class dZ{constructor(t){Ur(this,Ka,void 0);Ur(this,qa,void 0);Ur(this,fi,[]);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Co(this,qa,n),Co(this,Ka,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ne.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ne.isString(r)||ne.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ne.some(mn(this,fi),o=>ne.isEqual(o,{code:n,lang:r}))){mn(this,fi).push({code:n,lang:r}),fetch(`${mn(this,qa)}/i18n/message`,{method:"put",headers:mn(this,Ka),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),Co(this,fi,ne.reject(mn(this,fi),s=>ne.isEqual(s,{code:n,lang:r})))});return}}}Ka=new WeakMap,qa=new WeakMap,fi=new WeakMap;function H1(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new dZ({apiUrl:t}),A=()=>fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(h=>h.json()).catch(()=>Promise.resolve(s)),d=()=>fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(h=>h.json()).then(h=>h.reduce((C,m)=>({...C,[m.lang]:{...C[m.lang]||{},[m.code]:m.text}}),{})),p=(h,C,m)=>(r||console.error(`Warning: Missing translation for key: "${h}"`),o&&(ne.isString(h)?h.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${h}`):c.handleMessage({code:h,lang:m}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),h);return Promise.all([A(),d()]).then(h=>{const[C,m]=h;function I(B){return ne.get(m,B,{})}return e4(I,n,C,{allowMissing:r||o,onMissingKey:p})})}window.React=Q;const gZ=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,o]=Q.useState({loading:!0,languages:null});return Q.useEffect(()=>{let s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r};function z1(e){const[t,n]=Q.useState(),r=dv(e);return Q.useEffect(()=>{H1(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const fZ=new us.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Oh=({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r,development:o,logoMain:s,logoIcon:a,loginPage:c,menu:A,name:d,copy:p,version:h,dataProvider:C,authProvider:m,errorHandler:I,error:B,notification:v,enableNotification:P,enableRegistration:j,enablePasswordRecover:x,queryClient:R,background:S,enableThemeToggler:L,...F})=>{AZ({apiUrl:n,errorHandler:I,catcherFn:G=>{const ae=G==null?void 0:G.toString(),J=["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(V=>ae==null?void 0:ae.includes(V));return new V1({catch:J,display:!J,log:!J,error:ae})}});const X=Q.useMemo(()=>Q.isValidElement(c)?Q.cloneElement(c,{name:d,copy:p,logo:s,version:h,background:S,enableRegistration:j,enablePasswordRecover:x}):c,[c,d,h,p,S,s,j,x]),Z=Q.useMemo(()=>G=>{const ae=d?f.jsx(Bh,{title:d}):s,oe=d?f.jsx(yh,{title:d}):a;return f.jsx(p1,{...G,name:d,copy:p,enableThemeToggler:L,version:h,logoMain:ae,logoIcon:oe,notification:v,enableNotification:P,error:B})},[s,a,d,h,B,v,P]),U=z1({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return U===void 0?f.jsx(f.Fragment,{}):U.error?f.jsx(Yc,{initialConfig:t,children:f.jsx(pA,{themeOverrides:e,children:f.jsx(D1,{})})}):f.jsx(Rf,{children:f.jsx(Df,{menu:A,children:f.jsx(Yc,{initialConfig:t,children:f.jsx(Ns,{theme:e,layout:Z,notification:m1,queryClient:R,dataProvider:C,authProvider:m,i18nProvider:U,loginPage:X,...F})})})})};Oh.defaultProps={...Ns.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:f.jsx(fA,{version:"0.0.0",name:"Applica",redirectTo:"/"}),queryClient:fZ,enableThemeToggler:!1};Oh.propTypes={...Ns.propTypes,theme:u.oneOfType([u.object,u.func]),apiUrl:u.string.isRequired,defaultLocale:u.string,development:u.bool,logoMain:u.node,logoIcon:u.node,menu:u.arrayOf(Es),name:u.string,version:u.string,authProvider:u.oneOfType([u.func,u.object]),dataProvider:u.oneOfType([u.func,u.object]),notification:u.string,enableNotification:u.bool,enableRegistration:u.bool,enableForgotPassword:u.bool,queryClient:u.oneOfType([u.func,u.object]),enableThemeToggler:u.bool};Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>O.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>O.BooleanField});Object.defineProperty(exports,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>O.BulkDeleteWithConfirmButton});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>O.Button});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>O.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>O.Confirm});Object.defineProperty(exports,"CreateButton",{enumerable:!0,get:()=>O.CreateButton});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>O.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>O.CustomRoutes});Object.defineProperty(exports,"DeleteWithConfirmButton",{enumerable:!0,get:()=>O.DeleteWithConfirmButton});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>O.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>O.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>O.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>O.FieldTitle});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>O.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>O.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>O.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>O.I18nContextProvider});Object.defineProperty(exports,"ListToolbar",{enumerable:!0,get:()=>O.ListToolbar});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>O.LoadingIndicator});Object.defineProperty(exports,"Pagination",{enumerable:!0,get:()=>O.Pagination});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>O.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>O.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>O.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>O.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>O.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>O.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>O.SaveButton});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>O.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleList",{enumerable:!0,get:()=>O.SimpleList});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>O.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>O.SingleFieldList});Object.defineProperty(exports,"TopToolbar",{enumerable:!0,get:()=>O.TopToolbar});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>O.UrlField});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>O.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>O.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>O.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>O.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>O.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>O.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>O.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>O.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>O.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>O.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>O.useAuthProvider});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>O.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>O.useChoicesContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>O.useCreateController});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>O.useDataProvider});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>O.useEditContext});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>O.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>O.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>O.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>O.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>O.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>O.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>O.useListContext});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>O.useLocaleState});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>O.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>O.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>O.useRecordContext});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>O.useRefresh});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>O.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>O.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>O.useResourceDefinitions});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>O.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>O.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>O.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>O.useSimpleFormIteratorItem});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>O.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>O.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>O.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>O.useUnselectAll});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>O.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>O.withLifecycleCallbacks});exports.ActionsField=bp;exports.ActionsMenu=Fo;exports.ActivatePage=R1;exports.Admin=Ns;exports.AnimateButton=My;exports.AppConfigContext=Pf;exports.AppConfigProvider=Rf;exports.ApplicaAdmin=Oh;exports.ArrayInput=vL;exports.AttachmentField=Qp;exports.AttachmentInput=Pp;exports.AutocompleteArrayInput=Rp;exports.AutocompleteInput=Op;exports.Avatar=Na;exports.BooleanInput=jp;exports.Breadcrumbs=Wu;exports.BulkActionsToolbar=Th;exports.BulkFloatingActionsToolbar=T1;exports.CardForm=Ku;exports.ChangePasswordForm=Up;exports.CircularWithLabel=Zy;exports.CircularWithPath=_y;exports.CoverField=Xu;exports.Create=CL;exports.CreateInDialogButton=xh;exports.Datagrid=TJ;exports.DateAgoField=Zu;exports.DateField=xp;exports.DateInput=Dp;exports.DateTimeInput=Mp;exports.Dot=Uu;exports.Drawer=c1;exports.DrawerHeader=ex;exports.DrawerHeaderStyled=fh;exports.DrawerToggle=$b;exports.Edit=_L;exports.EditInDialogButton=wh;exports.EmailField=wp;exports.Empty=Q1;exports.FileField=Tp;exports.FileInput=kp;exports.Footer=il;exports.FormHeader=Yp;exports.FunctionField=sb;exports.GenericErrorPage=D1;exports.Header=eQ;exports.HeaderButton=u3;exports.HeaderIconButton=fL;exports.HeaderNotification=tQ;exports.HeaderProfile=nQ;exports.HeaderSpacer=oQ;exports.HeaderToggleButton=Rs;exports.HorizontalBar=u1;exports.IconButton=Ps;exports.ImageField=rl;exports.ImageInput=Fp;exports.ImpersonateUserButton=y1;exports.LabeledArrayInput=Ju;exports.LabeledInput=nt;exports.Layout=p1;exports.LayoutContent=JQ;exports.LayoutProvider=Xb;exports.LayoutWrapper=XQ;exports.LinearWithIcon=$y;exports.LinearWithLabel=eb;exports.List=w1;exports.ListItem=Rh;exports.Loadable=nJ;exports.Loader=C1;exports.LoadingButton=vp;exports.LocalStorage=uv;exports.LocalizedTextField=TL;exports.LocalizedTextInput=UL;exports.LoginPage=fA;exports.Logo=ph;exports.LongForm=kt;exports.MainCard=$n;exports.MainIcon=Bh;exports.MenuConfigContext=jf;exports.MenuConfigProvider=Df;exports.MenuPopover=Su;exports.MenuPropTypes=Es;exports.NavMenu=A1;exports.Navigation=g1;exports.Notification=m1;exports.NotificationList=DJ;exports.NumberInput=Lp;exports.OnboardingModes=Ua;exports.OnboardingProvider=AJ;exports.OnboardingTip=hJ;exports.ReadonlyField=OL;exports.RecordInput=cb;exports.RecoverPage=O1;exports.ReferenceArrayInput=Np;exports.ReferenceInput=Vp;exports.ReferenceManyField=Os;exports.ReferenceManyInput=Hp;exports.RegisterPage=j1;exports.ResponsiveSection=rQ;exports.ScrollTop=vh;exports.ScrollX=rJ;exports.SearchInput=KL;exports.SelectArrayInput=zp;exports.SelectInput=Ab;exports.Show=p9;exports.SimpleBar=Eh;exports.SimpleForm=qu;exports.SimpleFormIterator=h9;exports.SizeField=lb;exports.SmallIcon=yh;exports.SmartTextInput=$u;exports.TabbedForm=Jp;exports.TableFormIterator=UV;exports.TableFormIteratorContext=Mf;exports.TableFormIteratorItemContext=kf;exports.TextField=_u;exports.TextInput=Fn;exports.ThemeConfigContext=Of;exports.ThemeConfigProvider=Yc;exports.ThemeProvider=pA;exports.ThemeToggler=f1;exports.TimeInput=Wp;exports.Toolbar=Er;exports.Tooltip=Gu;exports.Transitions=Mo;exports.createI18nProvider=H1;exports.getLocalizedValue=Nf;exports.localizedValueHasAllLocales=Lf;exports.parseTime=ZB;exports.useAppConfig=vi;exports.useBreadcrumbs=JB;exports.useGetLocalizedValue=s3;exports.useI18nLanguages=gZ;exports.useI18nProvider=z1;exports.useLayoutContext=$p;exports.useLayoutDispatch=KV;exports.useLayoutDrawerState=wi;exports.useLayoutLogoState=_b;exports.useLayoutMediaState=ir;exports.useLayoutNotificationsState=lA;exports.useLayoutState=ks;exports.useLayoutThemeState=qV;exports.useLocalStorage=ju;exports.useLocalizedValue=i3;exports.useMemoizedObject=dv;exports.useMenu=Ff;exports.useMenuConfig=Ei;exports.usePopoverState=Du;exports.useRefDimensions=l3;exports.useResourceDefaultValues=hL;exports.useResourceTitle=Gf;exports.useRestartOnboarding=fJ;exports.useSx=mr;exports.useTableFormIterator=gv;exports.useTableFormIteratorItem=c3;exports.useThemeConfig=xn;exports.uuid=dM;exports.withLayoutProvider=Zb;
285
285
  //# sourceMappingURL=react-admin.cjs.js.map