@applica-software-guru/react-admin 1.3.173 → 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.
@@ -281,5 +281,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
281
281
  `),ZV)),rz=ge("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})=>W({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:Uf(t,e.color),transition:`transform .${Wf}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&Xt.css(Mb||(Mb=Cs`
282
282
  width: auto;
283
283
  animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
284
- `),_V)),Rb=F.forwardRef(function(t,n){const r=Ht({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:a,valueBuffer:c,variant:A="indeterminate"}=r,d=Ue(r,XV),p=W({},r,{color:s,variant:A}),h=$V(p),C=Qt(),E={},m={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(a!==void 0){E["aria-valuenow"]=Math.round(a),E["aria-valuemin"]=0,E["aria-valuemax"]=100;let B=a-100;C.direction==="rtl"&&(B=-B),m.bar1.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(A==="buffer")if(c!==void 0){let B=(c||0)-100;C.direction==="rtl"&&(B=-B),m.bar2.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return f.jsxs(ez,W({className:Ye(h.root,o),ownerState:p,role:"progressbar"},E,{ref:n},d,{children:[A==="buffer"?f.jsx(tz,{className:h.dashed,ownerState:p}):null,f.jsx(nz,{className:h.bar1,ownerState:p,style:m.bar1}),A==="determinate"?null:f.jsx(rz,{className:h.bar2,ownerState:p,style:m.bar2})]}))});process.env.NODE_ENV!=="production"&&(Rb.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 oz=Rb,iz=ge("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),kb=()=>f.jsx(iz,{children:f.jsx(oz,{color:"primary"})}),sz=e=>t=>f.jsx(Q.Suspense,{fallback:f.jsx(kb,{}),children:f.jsx(e,{...t})}),Yf=({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})]}),Fb=ge(P.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),Gf=({children:e})=>{const t=mt.useLocation(),{pathname:n}=t;return Q.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};Gf.propTypes={children:u.node};const az=ge("div")({width:"100%",overflowX:"auto",display:"block"}),Kf=({title:e})=>f.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});Kf.propTypes={title:u.string.isRequired};var Ma=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(Ma||{});const lz=Vr().required(),cz=Vr().oneOf(Object.values(Ma));function uz(e){var O;const t=Pi.useQueryClient(),[n,r]=Q.useState(!1),[o,s]=Q.useState(()=>()=>Promise.resolve()),a=de.useGetIdentity(),c=(O=a==null?void 0:a.data)==null?void 0:O.email,A=de.useDataProvider(),d=Q.useCallback(()=>c?A.get("onboarding").then(M=>{var x;return(x=M==null?void 0:M.data)==null?void 0:x.value}):Promise.reject(),[A,c]),{data:p,isLoading:h,isError:C}=Pi.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[E,m]=Q.useState(()=>()=>Promise.resolve()),B=Pi.useMutation({mutationFn:E}),v=B.mutateAsync;return Q.useEffect(()=>{function M(){const x=re.chain(p??{}).clone().extend({[e]:Date.now()}).value();return A.post("onboarding",x).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}m(()=>M)},[A,p,e,t,c]),Q.useEffect(()=>{r(re.isNil((p??{})[e]))},[p,e,r]),Q.useEffect(()=>{s(()=>()=>v())},[v]),{loading:h,error:C,onboardingRequired:n,acknowledgeOnboarding:o}}function Az(e){const[t,n]=Ul("onboarding",{}),[r,o]=Q.useState(!1),[s,a]=Q.useState(()=>()=>Promise.resolve());return Q.useEffect(()=>{o(re.isNil((t??{})[e]))},[t,e,o]),Q.useEffect(()=>{a(()=>()=>(n(c=>re.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function dz(){return{onboardingRequired:!1,acknowledgeOnboarding:Q.useRef(()=>Promise.resolve()).current}}function gz(e,t){fd({mode:cz,topic:lz}).validateSync({mode:e,topic:t});const n=uz(t),r=Az(t),o=dz();switch(e){case Ma.USER:return n.loading?o:n.error?r:re.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case Ma.BROWSER:return r;default:return o}}var Ra=(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))(Ra||{});function fz(e,t){var o;const n=re.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return re.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=re.chain(n.tips).clone().reject(p=>p.id===a).value(),A=re.find(n.tips,{id:a}),d=re.chain(A??{}).clone().extend(s).value();return c.push(d),re.extend(n,{tips:re.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=re.isString(s)?s:s.id,c=re.chain(n.tips).reject(A=>A.id===a).sortBy(["step"]).value();return re.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=re.isString(s)?s:s.id,c=re.chain(n.tips).reject(C=>C.id===a).value(),A=re.find(n.tips,{id:a});if(re.isNil(A))return n;const d=re.chain(A).clone().extend({dismissed:!0}).value();c.push(d);const p=((o=re.chain(c).reject(C=>C.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&re.chain(c).reject(C=>C.step<p).reject(C=>C.dismissed??!1).isEmpty().value()&&e.onComplete(),re.extend(n,{tips:re.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:s}=t;return re.extend(n,{onComplete:s})}case"RESTART":{const s=re.chain(n.tips).clone().map(a=>re.omit(a,"dismissed")).value();return re.extend(n,{tips:s,currentStep:0})}default:return n}}const Lb=Q.createContext(void 0);function pz(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=gz(t,n),[s,a]=Q.useReducer(fz,{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(Lb.Provider,{value:c,children:e.children})}function Nb(){const e=Q.useContext(Lb);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function hz(){return Nb().state}function Vb(){return Nb().dispatch}function Cz(e){fd({id:Vr().required(),step:sE().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=hz(),c=re.find(s,{id:t}),{dismissed:A}=c??{},d=Vb(),p=Q.useCallback(()=>{d({type:Ra.DISMISS_TIP,payload:t})},[d,t]);return Q.useEffect(()=>{(re.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:Ra.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c]),Q.useEffect(()=>()=>{d({type:Ra.UNREGISTER_TIP,payload:t})},[t,d]),{tip:re.chain(c??e).clone().extend({open:o&&!re.isNil(c)&&a===n&&!A}).value(),dismiss:p}}function Ez(){const e=Vb();return Q.useCallback(()=>{e({type:Ra.RESTART})},[e])}function Iz(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=Cz({id:t,step:n,completeOnboarding:o}),{open:c}=s,A=re.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(Bc,{...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 mz=b.styled(Iz)(({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}}}),Jf=(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)]},Bz=(e,t)=>e&&e.data?{data:Jf(e.data,t),total:e.total+1}:e,vz=(e,t)=>e&&e.length>0?Jf(e,t):e,yz=(e,t)=>e&&e.data?{...e,data:Jf(e.data,t),total:e.total+1}:e,Xf=({onClose:e,record:t,children:n,redirect:r,onSubmit:o,onSuccess:s,onError:a})=>{const c=Pi.useQueryClient(),A=P.useResourceContext(),d=P.useRedirect(),p=P.useNotify(),h=Q.useCallback(B=>{const O=Date.now();c.setQueryData([A,"getOne",{id:B.id}],B),c.setQueriesData([A,"getList"],M=>yz(M,B),{updatedAt:O}),c.setQueriesData([A,"getMany"],M=>vz(M,B),{updatedAt:O}),c.setQueriesData([A,"getManyReference"],M=>Bz(M,B),{updatedAt:O}),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,...E}=P.useCreateController({mutationOptions:{onSuccess:h,onError:a}}),m=Q.useCallback(B=>{o?o(B,e):C&&C(B)},[o,C,e]);return f.jsx(P.CreateContextProvider,{value:{record:t,save:m,saving:E==null?void 0:E.saving,redirect:r},children:Q.cloneElement(n,{...n.props,toolbar:f.jsxs(gr,{children:[f.jsx(P.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:E==null?void 0:E.saving}),f.jsx(P.SaveButton,{disabled:E==null?void 0:E.saving})]})})})};Xf.propTypes={children:u.node,onClose:u.func,record:u.object,redirect:u.oneOf(["list","edit","show",!1])},Xf.defaultProps={redirect:!1};const bz={true:{_scrollToTop:!0},false:{}},Qz=ge(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${P.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),Zf=({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,E]=Q.useState(!1),m=P.useTranslate(),B=P.useResourceContext(),{openDialog:v,closeDialog:O}=Go(),M=Q.useCallback(()=>v(B,()=>E(!0)),[v,B]),x=Q.useCallback(()=>O(B,()=>E(!1)),[O,B]),j=b.useMediaQuery(S=>S.breakpoints.down("md"));return f.jsxs(f.Fragment,{children:[j?f.jsx(Qz,{...h,state:bz[String(s)],color:"primary",className:Ye(P.CreateButtonClasses.floating,a),"aria-label":n&&m(n),onClick:M,children:f.jsx(fn.Add,{})}):f.jsx(P.Button,{...h,sx:c,label:n,onClick:M,children:f.jsx(fn.Add,{})}),f.jsx(b.Dialog,{open:C,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:f.jsx(Xf,{...h,redirect:o,record:r,onClose:x,onSubmit:A,onSuccess:d,onError:p})})]})};Zf.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},Zf.propTypes={...P.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 zb=({onClose:e,children:t})=>{const n=P.useNotify(),r=P.useRecordContext(),o=P.useResourceContext(),{id:s}=r,{isLoading:a,data:c}=P.useGetOne(o,{id:s}),A=Q.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:d,saving:p}=P.useEditController({resource:o,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return f.jsx(P.EditContextProvider,{value:{record:c,isLoading:a,save:d,saving:p},children:Q.cloneElement(t,{toolbar:f.jsxs(gr,{children:[f.jsx(P.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),f.jsx(P.SaveButton,{})]})})})};zb.propTypes={children:u.node,onClose:u.func};const _f=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[o,s]=Q.useState(!1),{openDialog:a,closeDialog:c}=Go(),A=P.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(P.Button,{label:n,onClick:d,children:f.jsx(fn.Edit,{})}),f.jsx(b.Dialog,{open:o,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:f.jsx(zb,{...r,onClose:p})})]})};_f.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},_f.propTypes={fullWidth:u.bool,maxWidth:u.oneOf(["xs","sm","md","lg","xl",!1]),label:u.string};const Hb=({label:e="ra.auth.sign_in",...t})=>{const n=P.useRecordContext(),[r,o]=Q.useState(!1),s=P.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(P.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(fn.VpnKey,{})})};Hb.propTypes={label:u.string};const Wb=Q.createContext({});Wb.displayName="DatagridContext";const xz=({children:e,value:t})=>f.jsx(Wb.Provider,{value:t,children:e}),qf=e=>{const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:A}=de.useListContext(e),d=de.useTranslate(),p=Q.useCallback(()=>{A()},[A]);return f.jsx(wz,{className:r,children:f.jsxs(i6,{"data-test":"bulk-actions-toolbar",className:Ye(fr.toolbar,{[fr.collapsed]:c.length===0}),...de.sanitizeListRestProps(o),children:[f.jsxs("div",{className:fr.title,children:[f.jsx(Ig,{className:fr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(ou,{fontSize:"small"})}),f.jsx(qm,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(P.TopToolbar,{className:fr.topToolbar,children:Q.Children.map(n,h=>Q.isValidElement(h)?Q.cloneElement(h,{filterValues:s,resource:a,selectedIds:c}):null)})]})})};qf.propTypes={children:u.node,label:u.string};const ui="RaBulkActionsToolbar",fr={toolbar:`${ui}-toolbar`,topToolbar:`${ui}-topToolbar`,buttons:`${ui}-buttons`,collapsed:`${ui}-collapsed`,title:`${ui}-title`,icon:`${ui}-icon`},wz=ge("div",{name:ui,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"?Fi(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"}})),Ub=f.jsx(P.BulkDeleteButton,{}),$f=F.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?P.PureDatagridBody:P.DatagridBody,header:o=P.DatagridHeader,children:s,className:a,empty:c=Pz,expand:A,bulkActionsToolbar:d=!1,bulkActionButtons:p=Ub,hover:h,isRowSelectable:C,isRowExpandable:E,resource:m,rowClick:B,rowSx:v,rowStyle:O,size:M="small",sx:x,expandSingle:j=!1,...S}=e,{sort:N,data:L,isLoading:_,onSelect:q,onToggleItem:Y,selectedIds:K,setSort:le,total:ie}=de.useListContext(e),Z=!!p,J=Q.useMemo(()=>({isRowExpandable:E,expandSingle:j}),[E,j]),z=Q.useRef(null);Q.useEffect(()=>{(!K||K.length===0)&&(z.current=null)},[JSON.stringify(K)]);const $=Q.useCallback((k,ee)=>{const H=L.map(fe=>fe.id),X=H.indexOf(z.current);if(z.current=ee.target.checked?k:null,ee.shiftKey&&X!==-1){const fe=H.indexOf(k),he=H.slice(Math.min(X,fe),Math.max(X,fe)+1),Ae=ee.target.checked?rN(K,he):EN(K,he);q(C?Ae.filter(pe=>C(L.find(Ce=>Ce.id===pe))):Ae)}else Y(k)},[L,C,q,Y,K]);return _===!0?f.jsx(P.DatagridLoading,{className:a,expand:A,hasBulkActions:Z,nbChildren:F.Children.count(s),size:M}):L==null||L.length===0||ie===0?c||null:f.jsx(xz,{value:J,children:f.jsxs(P.DatagridRoot,{sx:x,className:Ye(P.DatagridClasses.root,a),children:[d!=null&&Q.isValidElement(d)?Q.cloneElement(d,{selectedIds:K,total:ie}):p!==!1?f.jsx(qf,{children:Q.isValidElement(p)?p:Ub}):null,f.jsx("div",{className:P.DatagridClasses.tableWrapper,children:f.jsxs(b.Table,{ref:t,className:P.DatagridClasses.table,size:M,...Sz(S),children:[Yb(o,{children:s,sort:N,data:L,hasExpand:!!A,hasBulkActions:Z,isRowSelectable:C,onSelect:q,resource:m,selectedIds:K,setSort:le},s),Yb(r,{expand:A,rowClick:B,data:L,hasBulkActions:Z,hover:h,onToggleItem:$,resource:m,rowSx:v,rowStyle:O,selectedIds:K,isRowSelectable:C},s)]})})]})})}),Yb=(e,t,n)=>Q.isValidElement(e)?Q.cloneElement(e,t,n):Q.createElement(e,t,n);$f.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 Tz=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],Sz=e=>Object.keys(de.sanitizeListRestProps(e)).filter(t=>!Tz.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});$f.displayName="Datagrid";const Pz=f.jsx(P.ListNoResults,{}),Oz=ge($f,{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"}})),jz=e=>f.jsx(Oz,{...e}),Dz=ge("div")(({theme:e})=>({padding:e.spacing(2)})),Gb=({actions:e,className:t,...n})=>{const{hasCreate:r}=de.useResourceDefinition(n),o=de.useResourceContext(n),s=de.useTranslate(),a=de.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(Mz,{className:t,children:[f.jsxs("div",{className:Es.message,children:[f.jsx(fn.Inbox,{className:Es.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(Dz,{className:Es.toolbar,children:e})]})},gu="ApplicaEmpty",Es={message:`${gu}-message`,icon:`${gu}-icon`,toolbar:`${gu}-toolbar`},Mz=ge("span",{name:gu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Es.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Es.icon}`]:{width:"9em",height:"9em"},[`& .${Es.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));Gb.propTypes={actions:u.element,className:u.string};const Rz=()=>{const e=P.useRefresh(),t=P.useNotify(),n=P.useUnselectAll(),r=P.useResourceContext(),{selectedIds:o,data:s}=P.useListContext(),a=P.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)),[A,{isLoading:d}]=P.useUpdateMany(r,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Lr().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(P.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(fn.Email,{})})},kz=()=>{const e=P.useRefresh(),t=P.useNotify(),n=P.useUnselectAll(),{selectedIds:r,data:o}=P.useListContext(),s=P.useRecordContext(),a=P.useResourceContext(),c=r.map(h=>o.find(C=>C.id===h)).concat([s]),[A,{isLoading:d}]=P.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(P.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||s&&!(s!=null&&s.readed),onClick:p,children:f.jsx(fn.Drafts,{})})},Fz=e=>{const t=P.useRecordContext(e),n=P.useResourceContext(e),r=P.useRedirect(),o=P.useNotify(),s=P.useTranslate(),[a]=P.useLocaleState(),c=Q.useMemo(()=>t!=null&&t.readed?Lr(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]=P.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Lr().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})})]})},Lz=({...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(P.Datagrid,{...e,rowStyle:s,children:[f.jsx(Fz,{source:"notification",sortable:!1,label:"ra.notification"}),f.jsx(xc,{source:"created",label:"ra.notification.created"}),f.jsxs(uo,{children:[f.jsx(Rz,{}),f.jsx(kz,{})]})]})},Nz=f.jsx(P.ListActions,{}),Vz=f.jsx(P.Pagination,{}),zz=f.jsx(P.Empty,{}),Hz=wN,Kb=e=>{const{actions:t=Nz,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=Vz,children:A,className:d,component:p=Hz,title:h,empty:C=zz,...E}=e,{defaultTitle:m,data:B,error:v,isLoading:O,filterValues:M,resource:x}=de.useListContext(e);if(!A||!B&&O&&s)return null;const j=()=>f.jsxs("div",{className:Po.main,children:[(r||t)&&f.jsx(P.ListToolbar,{className:Po.actions,filters:r,actions:t,hasCreate:a}),!v&&f.jsx(p,{className:Po.content,children:o&&A&&F.isValidElement(A)?Q.cloneElement(A,{bulkActionButtons:o}):A}),v?f.jsx(Pf,{error:v,resetErrorBoundary:null}):c!==!1&&c]}),S=()=>C!==!1&&Q.cloneElement(C,{className:Po.noResults,hasCreate:a}),N=!O&&(B==null?void 0:B.length)===0&&!Object.keys(M).length&&C!==!1;return f.jsxs(Wz,{className:Ye("list-page",d),...E,children:[f.jsx(P.Title,{title:h,defaultTitle:m,preferenceKey:`${x}.list.title`}),N?S():j(),n]})};Kb.propTypes={actions:u.oneOfType([u.bool,u.element]),aside:u.element,children:u.node,className:u.string,component:de.ComponentPropType,emptyWhileLoading:u.bool,filters:u.oneOfType([u.element,u.arrayOf(u.element)]),hasCreate:u.bool,pagination:u.oneOfType([u.element,u.bool]),title:P.TitlePropType};const ka="RaList",Po={main:`${ka}-main`,content:`${ka}-content`,actions:`${ka}-actions`,noResults:`${ka}-noResults`},Wz=ge("div",{name:ka,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${Po.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Po.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Po.actions}`]:{},[`& .${Po.noResults}`]:{}})),ep=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=Uz,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:A,sort:d,storeKey:p,...h})=>f.jsx(de.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(Kb,{...h})});ep.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:P.TitlePropType,disableSyncWithLocation:u.bool,hasCreate:u.bool,resource:u.string};const Uz={},Yz=Gs(ep,{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)}})),Jb=e=>f.jsx(Gn,{content:!1,children:f.jsx(Yz,{...e})});Jb.propTypes={...ep.propTypes};const tp={p:0,m:0},Xb={p:2,m:0,borderRadius:0,width:"100%"},Zb=e=>{const{children:t}=e,[n,r]=F.useState(null),o=m=>{r(m.currentTarget)},s=()=>{r(null)},a=b.useMediaQuery(m=>m.breakpoints.down("md")),c=!!n,A=c?"simple-popover":void 0,{filterValues:d,resource:p,selectedIds:h=[],onUnselectItems:C}=P.useListContext(e),E=F.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:tp,children:[f.jsx(b.ListItem,{sx:tp,children:f.jsx(P.Button,{onClick:E,sx:Xb,label:"ra.action.unselect",startIcon:f.jsx(ou,{}),children:f.jsx(ou,{})})}),F.Children.map(t,m=>{var B;return f.jsx(b.ListItem,{sx:tp,children:F.isValidElement(m)?F.cloneElement(m,{filterValues:d,resource:p,selectedIds:h,sx:Xb,...(B=m.props)!=null&&B.popover?{closePopover:s}:{}}):null})})]})})]})})};Zb.propTypes={children:u.node};const fu={width:"1.5rem",alignSelf:"center"},np=({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}=Go(),E=de.useResourceContext(h),m=C(),B=de.useRecordContext(),v=r||B,O=dt.get(v,e||"");return f.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.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:fu}):Q.createElement(c,{style:fu})),f.jsx(de.FieldTitle,{label:t,source:e,resource:m||E})]}),f.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[a?Q.isValidElement(a)?Q.cloneElement(a,{record:v,resource:E,value:O}):Q.createElement(a,{source:e,record:v,resource:E,value:O}):f.jsx(b.Typography,{variant:n,children:O}),A&&(Q.isValidElement(A)?Q.cloneElement(A,{style:fu}):Q.createElement(A,{style:fu})),d&&f.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:d})]})]})};np.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},np.defaultProps={variant:"body1"};const _b=()=>{const e=Xt.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"})]})})},qb=({children:e,...t})=>{const n=Qt();return f.jsx(Gn,{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})})};qb.propTypes={children:u.node};const Fa=({version:e,name:t,copy:n,children:r,logo:o,background:s=_b})=>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(Yf,{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(qb,{children:r})})}),f.jsx(b.Grid,{item:!0,sx:{pb:1},children:f.jsx(Ca,{name:t,copy:n,version:e})})]})]})]});Fa.propTypes={children:u.node,version:u.string,name:u.string,copy:u.string,background:u.oneOfType([u.node,u.func,u.object])};const $b=({name:e,copy:t,logo:n,version:r,background:o})=>{const s=de.useTranslate(),a=de.useAuthProvider(),c=de.useNotify(),A=mt.useNavigate(),{token:d}=mt.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"}),re.delay(()=>A("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),re.delay(()=>A("/login"),1e3)})},[d]),f.jsx(Fa,{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:mt.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")})]})})};$b.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const pu=({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o,enableRegistration:s,redirectTo:a,background:c})=>{const[A,d]=de.useSafeSetState(!1),p=de.useLogin(),h=de.useTranslate(),C=de.useNotify(),E=de.useCheckAuth(),m=mt.useNavigate();Q.useEffect(()=>{E({},!1).then(()=>{m("/")}).catch(()=>{})},[E,m]);const B=v=>{d(!0),p(v,a).then(()=>{d(!1)}).catch(O=>{d(!1),C(typeof O=="string"?O:typeof O>"u"||!O.message?"ra.auth.sign_in_error":O.message,{type:"error",messageArgs:{_:typeof O=="string"?O:O&&O.message?O.message:void 0}})})};return f.jsx(Fa,{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:mt.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(de.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(On,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:de.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(On,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:de.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:mt.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")})})]})})]})})};pu.propTypes={version:u.string.isRequired,name:u.string.isRequired,enablePasswordRecover:u.bool,enableRegister:u.bool,background:u.element},pu.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:f.jsx(_b,{})};const eQ=({name:e,copy:t,logo:n,version:r,background:o})=>{const[s,a]=Q.useState(!1),c=de.useTranslate(),A=de.useRedirect(),d=de.useNotify(),p=de.useAuthProvider(),h=({email:C})=>{a(!0),p.recover(C).then(E=>{const m=`ra.auth.recover_${E.responseCode}`,B=E.responseCode==="ok"?"info":"error";d(m,{type:B}),A("/login")}).catch(E=>{d(E,{type:"error"})}).finally(()=>a(!1))};return f.jsx(Fa,{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:mt.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(P.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(On,{source:"email",validate:[de.required(),de.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")})})]})})]})})};eQ.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const tQ=({name:e,copy:t,version:n,logo:r,background:o})=>{const[s,a]=Q.useState(!1),c=de.useTranslate(),A=de.useRedirect(),d=de.useNotify(),p=de.useAuthProvider(),h=C=>{a(!0),p.register(C).then(E=>{const m=`ra.auth.register_${E.responseCode}`,B=E.responseCode==="ok"?"info":"error";d(m,{type:B}),A("/login")}).catch(E=>{d(E,{type:"error"})}).finally(()=>a(!1))};return f.jsx(Fa,{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:mt.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(P.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(On,{source:"name",label:c("ra.register.name"),validate:de.required()})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(On,{source:"email",type:"email",validate:[de.required(),de.email()]})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(On,{source:"password",type:"password",validate:de.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")})})]})})]})})};tQ.propTypes={name:u.string.isRequired,version:u.string.isRequired};function nQ(){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:Jv,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 Gz=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 $n(e,t){Kz(e)&&(e="100%");var n=Jz(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 Kz(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jz(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Xz(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function rp(e){return e.length===1?"0"+e:String(e)}function Zz(e,t,n){return{r:$n(e,255)*255,g:$n(t,255)*255,b:$n(n,255)*255}}function op(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 _z(e,t,n){var r,o,s;if(e=$n(e,360),t=$n(t,100),n=$n(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=op(c,a,e+1/3),o=op(c,a,e),s=op(c,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function qz(e,t,n){e=$n(e,255),t=$n(t,255),n=$n(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 $z(e,t,n){e=$n(e,360)*6,t=$n(t,100),n=$n(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 eH(e,t,n,r){var o=[rp(Math.round(e).toString(16)),rp(Math.round(t).toString(16)),rp(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 rQ(e){return Rn(e)/255}function Rn(e){return parseInt(e,16)}var oQ={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 La(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=rH(e)),typeof e=="object"&&(Zr(e.r)&&Zr(e.g)&&Zr(e.b)?(t=Zz(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zr(e.h)&&Zr(e.s)&&Zr(e.v)?(r=hu(e.s),o=hu(e.v),t=$z(e.h,r,o),a=!0,c="hsv"):Zr(e.h)&&Zr(e.s)&&Zr(e.l)&&(r=hu(e.s),s=hu(e.l),t=_z(e.h,r,s),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Xz(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 tH="[-\\+]?\\d+%?",nH="[-\\+]?\\d*\\.\\d+%?",Oo="(?:".concat(nH,")|(?:").concat(tH,")"),ip="[\\s|\\(]+(".concat(Oo,")[,|\\s]+(").concat(Oo,")[,|\\s]+(").concat(Oo,")\\s*\\)?"),sp="[\\s|\\(]+(".concat(Oo,")[,|\\s]+(").concat(Oo,")[,|\\s]+(").concat(Oo,")[,|\\s]+(").concat(Oo,")\\s*\\)?"),pr={CSS_UNIT:new RegExp(Oo),rgb:new RegExp("rgb"+ip),rgba:new RegExp("rgba"+sp),hsl:new RegExp("hsl"+ip),hsla:new RegExp("hsla"+sp),hsv:new RegExp("hsv"+ip),hsva:new RegExp("hsva"+sp),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 rH(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(oQ[e])e=oQ[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=pr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=pr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=pr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=pr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=pr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=pr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=pr.hex8.exec(e),n?{r:Rn(n[1]),g:Rn(n[2]),b:Rn(n[3]),a:rQ(n[4]),format:t?"name":"hex8"}:(n=pr.hex6.exec(e),n?{r:Rn(n[1]),g:Rn(n[2]),b:Rn(n[3]),format:t?"name":"hex"}:(n=pr.hex4.exec(e),n?{r:Rn(n[1]+n[1]),g:Rn(n[2]+n[2]),b:Rn(n[3]+n[3]),a:rQ(n[4]+n[4]),format:t?"name":"hex8"}:(n=pr.hex3.exec(e),n?{r:Rn(n[1]+n[1]),g:Rn(n[2]+n[2]),b:Rn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Zr(e){return!!pr.CSS_UNIT.exec(String(e))}var Cu=2,iQ=.16,oH=.05,iH=.05,sH=.15,sQ=5,aQ=4,aH=[{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 lQ(e){var t=e.r,n=e.g,r=e.b,o=qz(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Eu(e){var t=e.r,n=e.g,r=e.b;return"#".concat(eH(t,n,r,!1))}function lH(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 cQ(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Cu*t:Math.round(e.h)+Cu*t:r=n?Math.round(e.h)+Cu*t:Math.round(e.h)-Cu*t,r<0?r+=360:r>=360&&(r-=360),r}function uQ(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-iQ*t:t===aQ?r=e.s+iQ:r=e.s+oH*t,r>1&&(r=1),n&&t===sQ&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function AQ(e,t,n){var r;return n?r=e.v+iH*t:r=e.v-sH*t,r>1&&(r=1),Number(r.toFixed(2))}function dQ(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=La(e),o=sQ;o>0;o-=1){var s=lQ(r),a=Eu(La({h:cQ(s,o,!0),s:uQ(s,o,!0),v:AQ(s,o,!0)}));n.push(a)}n.push(Eu(r));for(var c=1;c<=aQ;c+=1){var A=lQ(r),d=Eu(La({h:cQ(A,c),s:uQ(A,c),v:AQ(A,c)}));n.push(d)}return t.theme==="dark"?aH.map(function(p){var h=p.index,C=p.opacity,E=Eu(lH(La(t.backgroundColor||"#141414"),La(n[h]),C*100));return E}):n}var ap={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},_t={},Iu={};Object.keys(ap).forEach(function(e){_t[e]=dQ(ap[e]),_t[e].primary=_t[e][5],Iu[e]=dQ(ap[e],{theme:"dark",backgroundColor:"#141414"}),Iu[e].primary=Iu[e][5]}),_t.red,_t.volcano,_t.gold,_t.orange,_t.yellow,_t.lime,_t.green,_t.cyan,_t.blue,_t.geekblue,_t.purple,_t.magenta,_t.grey,_t.grey;const gQ=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}};gQ.propTypes={colors:u.object};const cH=(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}},uH=(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}},AH=(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}},dH=(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}},gH=(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}},fH=(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}},pH=(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}},hH=(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}},fQ=(e,t,n)=>{switch(t){case"theme1":return cH(e,n);case"theme2":return uH(e,n);case"theme3":return AH(e,n);case"theme4":return dH(e,n);case"theme5":return gH(e,n);case"theme6":return fH(e,n);case"theme7":return pH(e,n);case"theme8":return hH(e,n);default:return gQ(e)}};fQ.propTypes={colors:u.object,presetColor:u.any};const CH=(e,t)=>{const n=e==="dark"?Iu:_t;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=fQ(n,t,e);return WA({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}}})},EH=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 IH(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 mH(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function BH(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 Ai({color:e,theme:t}){const n=rn(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:ze(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function vH(e){const t=Ai({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":Ai({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ai({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ai({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ai({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ai({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ai({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 yH(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function bH(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 di({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function QH(e){const t=di({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":di({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":di({color:"secondary",theme:e}),"&.MuiBadge-colorError":di({color:"error",theme:e}),"&.MuiBadge-colorInfo":di({color:"info",theme:e}),"&.MuiBadge-colorSuccess":di({color:"success",theme:e}),"&.MuiBadge-colorWarning":di({color:"warning",theme:e})}}}}}function tt({variant:e,color:t,theme:n}){const r=rn(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,A=`${t}Button`,d=es(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 xH(e){const t=tt({variant:"dashed",color:"primary",theme:e}),n=tt({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":tt({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":tt({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":tt({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":tt({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":tt({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":tt({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":tt({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":tt({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":tt({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":tt({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":tt({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":tt({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:tt({variant:"contained",color:"primary",theme:e}),containedSecondary:tt({variant:"contained",color:"secondary",theme:e}),containedError:tt({variant:"contained",color:"error",theme:e}),containedSuccess:tt({variant:"contained",color:"success",theme:e}),containedInfo:tt({variant:"contained",color:"info",theme:e}),containedWarning:tt({variant:"contained",color:"warning",theme:e}),outlinedPrimary:tt({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:tt({variant:"outlined",color:"secondary",theme:e}),outlinedError:tt({variant:"outlined",color:"error",theme:e}),outlinedSuccess:tt({variant:"outlined",color:"success",theme:e}),outlinedInfo:tt({variant:"outlined",color:"info",theme:e}),outlinedWarning:tt({variant:"outlined",color:"warning",theme:e}),textPrimary:tt({variant:"text",color:"primary",theme:e}),textSecondary:tt({variant:"text",color:"secondary",theme:e}),textError:tt({variant:"text",color:"error",theme:e}),textSuccess:tt({variant:"text",color:"success",theme:e}),textInfo:tt({variant:"text",color:"info",theme:e}),textWarning:tt({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function wH(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function TH(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function SH(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Is({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function PH(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 lp(e){const t=PH(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function OH(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":{...lp("small")},"&.size-medium":{...lp("medium")},"&.size-large":{...lp("large")}},colorPrimary:Is({color:"primary",theme:e}),colorSecondary:Is({color:"secondary",theme:e}),colorSuccess:Is({color:"success",theme:e}),colorWarning:Is({color:"warning",theme:e}),colorInfo:Is({color:"info",theme:e}),colorError:Is({color:"error",theme:e})}}}}function ms({color:e,theme:t}){const n=rn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function kn({color:e,theme:t}){const n=rn(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function jH(e){const t=kn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ms({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ms({color:"secondary",theme:e}),"&.MuiChip-colorError":ms({color:"error",theme:e}),"&.MuiChip-colorInfo":ms({color:"info",theme:e}),"&.MuiChip-colorSuccess":ms({color:"success",theme:e}),"&.MuiChip-colorWarning":ms({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":kn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":kn({color:"secondary",theme:e}),"&.MuiChip-lightError":kn({color:"error",theme:e}),"&.MuiChip-lightInfo":kn({color:"info",theme:e}),"&.MuiChip-lightSuccess":kn({color:"success",theme:e}),"&.MuiChip-lightWarning":kn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":kn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":kn({color:"secondary",theme:e}),"&.MuiChip-combinedError":kn({color:"error",theme:e}),"&.MuiChip-combinedInfo":kn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":kn({color:"success",theme:e}),"&.MuiChip-combinedWarning":kn({color:"warning",theme:e})}}}}}function DH(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:ze("#000",.7)}}}}}}function MH(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function RH(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Bs({color:e,theme:t}){const n=rn(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=es(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 kH(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Bs({color:"primary",theme:e}),"&.MuiFab-secondary":Bs({color:"secondary",theme:e}),"&.Mui-error":Bs({color:"error",theme:e}),"&.MuiFab-success":Bs({color:"success",theme:e}),"&.MuiFab-info":Bs({color:"info",theme:e}),"&.MuiFab-warning":Bs({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 FH(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 LH(){return{MuiInputBase:{styleOverrides:{}}}}function NH(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 VH(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function zH(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function HH(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function WH(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function UH(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function YH(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function gi({variant:e,theme:t}){const n=rn(t,e),{light:r}=n,o=es(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function GH(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:{...gi({variant:"primary",theme:e}),"&.Mui-error":{...gi({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:gi({variant:"secondary",theme:e}),colorError:gi({variant:"error",theme:e}),colorWarning:gi({variant:"warning",theme:e}),colorInfo:gi({variant:"info",theme:e}),colorSuccess:gi({variant:"success",theme:e})}}}}function KH(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function xt({variant:e,color:t,theme:n}){const r=rn(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 JH(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":xt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":xt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":xt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":xt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":xt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":xt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":xt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":xt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":xt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":xt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":xt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":xt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":xt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":xt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":xt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":xt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":xt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":xt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":xt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":xt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":xt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":xt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":xt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":xt({variant:"outlined",color:"warning",theme:e})}}}}}}function XH(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function vs({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function ZH(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 cp(e){const t=ZH(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function _H(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":{...cp("small")},"&.size-medium":{...cp("medium")},"&.size-large":{...cp("large")}},colorPrimary:vs({color:"primary",theme:e}),colorSecondary:vs({color:"secondary",theme:e}),colorSuccess:vs({color:"success",theme:e}),colorWarning:vs({color:"warning",theme:e}),colorInfo:vs({color:"info",theme:e}),colorError:vs({color:"error",theme:e})}}}}function ys({color:e,theme:t}){const n=rn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function qH(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":ys({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":ys({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":ys({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":ys({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":ys({color:"info",theme:e}),"&.MuiSlider-thumbColorError":ys({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 $H(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 up(e,t){const n=$H(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 eW(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},...up(e,"medium")},sizeLarge:{...up(e,"large")},sizeSmall:{...up(e,"small")}}}}}function tW(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 nW(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 rW(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 oW(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function iW(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function sW(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function aW(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function lW(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function cW(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 uW(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function AW(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function dW(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function gW(e){return dt.merge(IH(e),mH(e),BH(e),vH(e),yH(),bH(e),QH(e),xH(e),wH(),TH(),SH(),OH(e),jH(e),DH(),MH(e),RH(),kH(e),FH(e),LH(),NH(e),VH(),zH(),HH(e),WH(e),UH(),YH(),GH(e),KH(),JH(e),XH(e),_H(e),qH(e),eW(e),tW(e),nW(e),rW(e),oW(e),iW(e),sW(),aW(),lW(),cW(e),uW(e),AW(),dW())}const mu=({themeOverrides:e,children:t})=>{const n=hn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=Q.useMemo(()=>CH(o,s),[o,s]),A=Q.useMemo(()=>EH(a),[a]),d=Q.useMemo(()=>Gz(c),[c]),p=Q.useMemo(()=>re.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=WA(p),C=re.cloneDeep(h.components??{});return h.components=re.merge(gW(h),C),f.jsx(b.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(DC,{theme:h,children:[f.jsx(b.CssBaseline,{}),t]})})};mu.propTypes={children:u.node,themeOverrides:u.oneOfType([u.object,u.func])};const pQ=({children:e,theme:t,...n})=>f.jsx(P.CoreAdminContext,{...n,children:f.jsx(mu,{themeOverrides:t,children:f.jsx(Gf,{children:e})})});pQ.displayName="ApplicaAdminContext";const bs=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:E,notification:m,queryClient:B,requireAuth:v,store:O,ready:M,theme:x,title:j="React Admin"}=e;return f.jsx(pQ,{authProvider:t,dataProvider:s,i18nProvider:A,store:O,history:c,queryClient:B,theme:x,children:f.jsx(P.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:E,catchAll:n,title:j,loading:p,loginPage:h,authCallbackPage:C,notification:m,requireAuth:v,ready:M,children:r})})};bs.defaultProps={store:P.localStorageStore(),title:"Applica Admin"},bs.propTypes={...P.AdminUI.propTypes};class fW{constructor(t){ao(this,Na,void 0);ao(this,Va,void 0);ao(this,Qs,new Set);const{apiUrl:n}=t??{};if(!re.isString(n)||re.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Ho(this,Va,n),Ho(this,Na,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}`;wn(this,Qs).has(a)||(wn(this,Qs).add(a),fetch(`${wn(this,Va)}/ui/error-log`,{method:"PUT",headers:wn(this,Na),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"),wn(this,Qs).delete(a)}))}}Na=new WeakMap,Va=new WeakMap,Qs=new WeakMap;class hQ{constructor({catch:t,display:n,log:r,error:o}){cl(this,"catch");cl(this,"display");cl(this,"log");cl(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 pW=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new hQ({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=F.useMemo(()=>o.errorHandler?o.errorHandler:new fW({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=F.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 F.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c]),!0};class hW{constructor(t){ao(this,za,void 0);ao(this,Ha,void 0);ao(this,pi,[]);const{apiUrl:n}=t??{};if(!re.isString(n)||re.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Ho(this,Ha,n),Ho(this,za,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!re.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!re.isString(n)||re.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!re.isString(r)||re.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!re.some(wn(this,pi),o=>re.isEqual(o,{code:n,lang:r}))){wn(this,pi).push({code:n,lang:r}),fetch(`${wn(this,Ha)}/i18n/message`,{method:"put",headers:wn(this,za),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),Ho(this,pi,re.reject(wn(this,pi),s=>re.isEqual(s,{code:n,lang:r})))});return}}}za=new WeakMap,Ha=new WeakMap,pi=new WeakMap;function CQ(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 hW({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,E)=>({...C,[E.lang]:{...C[E.lang]||{},[E.code]:E.text}}),{})),p=(h,C,E)=>(r||console.error(`Warning: Missing translation for key: "${h}"`),o&&(re.isString(h)?h.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${h}`):c.handleMessage({code:h,lang:E}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),h);return Promise.all([A(),d()]).then(h=>{const[C,E]=h;function m(B){return re.get(E,B,{})}return Y1(m,n,C,{allowMissing:r||o,onMissingKey:p})})}window.React=Q;const CW=({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 EQ(e){const[t,n]=Q.useState(),r=pE(e);return Q.useEffect(()=>{CQ(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const EW=new Pi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Ap=({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:E,errorHandler:m,error:B,notification:v,enableNotification:O,enableRegistration:M,enablePasswordRecover:x,queryClient:j,background:S,enableThemeToggler:N,...L})=>{pW({apiUrl:n,errorHandler:m,catcherFn:K=>{const le=K==null?void 0:K.toString(),Z=["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(z=>le==null?void 0:le.includes(z));return new hQ({catch:Z,display:!Z,log:!Z,error:le})}});const _=Q.useMemo(()=>Q.isValidElement(c)?Q.cloneElement(c,{name:d,copy:p,logo:s,version:h,background:S,enableRegistration:M,enablePasswordRecover:x}):c,[c,d,h,p,S,s,M,x]),q=Q.useMemo(()=>K=>{const le=d?f.jsx(Yf,{title:d}):s,ie=d?f.jsx(Kf,{title:d}):a;return f.jsx(Tb,{...K,name:d,copy:p,enableThemeToggler:N,version:h,logoMain:le,logoIcon:ie,notification:v,enableNotification:O,error:B})},[s,a,d,h,B,v,O]),Y=EQ({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return Y===void 0?f.jsx(f.Fragment,{}):Y.error?f.jsx(kl,{initialConfig:t,children:f.jsx(mu,{themeOverrides:e,children:f.jsx(nQ,{})})}):f.jsx(JA,{children:f.jsx(_A,{menu:A,children:f.jsx(kl,{initialConfig:t,children:f.jsx(bs,{theme:e,layout:q,notification:Fb,queryClient:j,dataProvider:C,authProvider:E,i18nProvider:Y,loginPage:_,...L})})})})};Ap.defaultProps={...bs.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:f.jsx(pu,{version:"0.0.0",name:"Applica",redirectTo:"/"}),queryClient:EW,enableThemeToggler:!1},Ap.propTypes={...bs.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(Wi),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(D,"ArrayInputContext",{enumerable:!0,get:()=>P.ArrayInputContext}),Object.defineProperty(D,"BooleanField",{enumerable:!0,get:()=>P.BooleanField}),Object.defineProperty(D,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>P.BulkDeleteWithConfirmButton}),Object.defineProperty(D,"Button",{enumerable:!0,get:()=>P.Button}),Object.defineProperty(D,"ChipField",{enumerable:!0,get:()=>P.ChipField}),Object.defineProperty(D,"Confirm",{enumerable:!0,get:()=>P.Confirm}),Object.defineProperty(D,"CreateButton",{enumerable:!0,get:()=>P.CreateButton}),Object.defineProperty(D,"CreateContextProvider",{enumerable:!0,get:()=>P.CreateContextProvider}),Object.defineProperty(D,"CustomRoutes",{enumerable:!0,get:()=>P.CustomRoutes}),Object.defineProperty(D,"DeleteWithConfirmButton",{enumerable:!0,get:()=>P.DeleteWithConfirmButton}),Object.defineProperty(D,"DeleteWithUndoButton",{enumerable:!0,get:()=>P.DeleteWithUndoButton}),Object.defineProperty(D,"EditButton",{enumerable:!0,get:()=>P.EditButton}),Object.defineProperty(D,"EditContextProvider",{enumerable:!0,get:()=>P.EditContextProvider}),Object.defineProperty(D,"FieldTitle",{enumerable:!0,get:()=>P.FieldTitle}),Object.defineProperty(D,"Form",{enumerable:!0,get:()=>P.Form}),Object.defineProperty(D,"FormDataConsumer",{enumerable:!0,get:()=>P.FormDataConsumer}),Object.defineProperty(D,"HttpError",{enumerable:!0,get:()=>P.HttpError}),Object.defineProperty(D,"I18nContextProvider",{enumerable:!0,get:()=>P.I18nContextProvider}),Object.defineProperty(D,"ListToolbar",{enumerable:!0,get:()=>P.ListToolbar}),Object.defineProperty(D,"LoadingIndicator",{enumerable:!0,get:()=>P.LoadingIndicator}),Object.defineProperty(D,"Pagination",{enumerable:!0,get:()=>P.Pagination}),Object.defineProperty(D,"RaSimpleFormIterator",{enumerable:!0,get:()=>P.SimpleFormIterator}),Object.defineProperty(D,"RecordContextProvider",{enumerable:!0,get:()=>P.RecordContextProvider}),Object.defineProperty(D,"ReferenceArrayField",{enumerable:!0,get:()=>P.ReferenceArrayField}),Object.defineProperty(D,"ReferenceField",{enumerable:!0,get:()=>P.ReferenceField}),Object.defineProperty(D,"Resource",{enumerable:!0,get:()=>P.Resource}),Object.defineProperty(D,"ResourceContextProvider",{enumerable:!0,get:()=>P.ResourceContextProvider}),Object.defineProperty(D,"SaveButton",{enumerable:!0,get:()=>P.SaveButton}),Object.defineProperty(D,"SimpleFormIteratorContext",{enumerable:!0,get:()=>P.SimpleFormIteratorContext}),Object.defineProperty(D,"SimpleList",{enumerable:!0,get:()=>P.SimpleList}),Object.defineProperty(D,"SimpleShowLayout",{enumerable:!0,get:()=>P.SimpleShowLayout}),Object.defineProperty(D,"SingleFieldList",{enumerable:!0,get:()=>P.SingleFieldList}),Object.defineProperty(D,"TopToolbar",{enumerable:!0,get:()=>P.TopToolbar}),Object.defineProperty(D,"UrlField",{enumerable:!0,get:()=>P.UrlField}),Object.defineProperty(D,"choices",{enumerable:!0,get:()=>P.choices}),Object.defineProperty(D,"email",{enumerable:!0,get:()=>P.email}),Object.defineProperty(D,"maxLength",{enumerable:!0,get:()=>P.maxLength}),Object.defineProperty(D,"maxValue",{enumerable:!0,get:()=>P.maxValue}),Object.defineProperty(D,"minLength",{enumerable:!0,get:()=>P.minLength}),Object.defineProperty(D,"minValue",{enumerable:!0,get:()=>P.minValue}),Object.defineProperty(D,"number",{enumerable:!0,get:()=>P.number}),Object.defineProperty(D,"regex",{enumerable:!0,get:()=>P.regex}),Object.defineProperty(D,"required",{enumerable:!0,get:()=>P.required}),Object.defineProperty(D,"useArrayInput",{enumerable:!0,get:()=>P.useArrayInput}),Object.defineProperty(D,"useAuthProvider",{enumerable:!0,get:()=>P.useAuthProvider}),Object.defineProperty(D,"useChoices",{enumerable:!0,get:()=>P.useChoices}),Object.defineProperty(D,"useChoicesContext",{enumerable:!0,get:()=>P.useChoicesContext}),Object.defineProperty(D,"useCreateController",{enumerable:!0,get:()=>P.useCreateController}),Object.defineProperty(D,"useDataProvider",{enumerable:!0,get:()=>P.useDataProvider}),Object.defineProperty(D,"useEditContext",{enumerable:!0,get:()=>P.useEditContext}),Object.defineProperty(D,"useGetIdentity",{enumerable:!0,get:()=>P.useGetIdentity}),Object.defineProperty(D,"useGetList",{enumerable:!0,get:()=>P.useGetList}),Object.defineProperty(D,"useGetMany",{enumerable:!0,get:()=>P.useGetMany}),Object.defineProperty(D,"useGetManyReference",{enumerable:!0,get:()=>P.useGetManyReference}),Object.defineProperty(D,"useGetOne",{enumerable:!0,get:()=>P.useGetOne}),Object.defineProperty(D,"useInput",{enumerable:!0,get:()=>P.useInput}),Object.defineProperty(D,"useListContext",{enumerable:!0,get:()=>P.useListContext}),Object.defineProperty(D,"useLocaleState",{enumerable:!0,get:()=>P.useLocaleState}),Object.defineProperty(D,"useNotify",{enumerable:!0,get:()=>P.useNotify}),Object.defineProperty(D,"usePermissions",{enumerable:!0,get:()=>P.usePermissions}),Object.defineProperty(D,"useRecordContext",{enumerable:!0,get:()=>P.useRecordContext}),Object.defineProperty(D,"useRefresh",{enumerable:!0,get:()=>P.useRefresh}),Object.defineProperty(D,"useResourceContext",{enumerable:!0,get:()=>P.useResourceContext}),Object.defineProperty(D,"useResourceDefinition",{enumerable:!0,get:()=>P.useResourceDefinition}),Object.defineProperty(D,"useResourceDefinitions",{enumerable:!0,get:()=>P.useResourceDefinitions}),Object.defineProperty(D,"useShowContext",{enumerable:!0,get:()=>P.useShowContext}),Object.defineProperty(D,"useShowController",{enumerable:!0,get:()=>P.useShowController}),Object.defineProperty(D,"useSimpleFormIterator",{enumerable:!0,get:()=>P.useSimpleFormIterator}),Object.defineProperty(D,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>P.useSimpleFormIteratorItem}),Object.defineProperty(D,"useTranslate",{enumerable:!0,get:()=>P.useTranslate}),Object.defineProperty(D,"useTranslateLabel",{enumerable:!0,get:()=>P.useTranslateLabel}),Object.defineProperty(D,"useUnselect",{enumerable:!0,get:()=>P.useUnselect}),Object.defineProperty(D,"useUnselectAll",{enumerable:!0,get:()=>P.useUnselectAll}),Object.defineProperty(D,"useUpdateMany",{enumerable:!0,get:()=>P.useUpdateMany}),Object.defineProperty(D,"withLifecycleCallbacks",{enumerable:!0,get:()=>P.withLifecycleCallbacks}),D.ActionsField=bg,D.ActionsMenu=uo,D.ActivatePage=$b,D.Admin=bs,D.AnimateButton=Um,D.AppConfigContext=KA,D.AppConfigProvider=JA,D.ApplicaAdmin=Ap,D.ArrayInput=w3,D.AttachmentField=Qg,D.AttachmentInput=Pg,D.AutocompleteArrayInput=Og,D.AutocompleteInput=jg,D.Avatar=Aa,D.BooleanInput=Dg,D.Breadcrumbs=Cc,D.BulkActionsToolbar=qf,D.BulkFloatingActionsToolbar=Zb,D.CardForm=vc,D.ChangePasswordForm=Ug,D.CircularWithLabel=m0,D.CircularWithPath=B0,D.CoverField=Qc,D.Create=v3,D.CreateInDialogButton=Zf,D.Datagrid=jz,D.DateAgoField=xc,D.DateField=xg,D.DateInput=Mg,D.DateTimeInput=Rg,D.Dot=Ec,D.Drawer=Bb,D.DrawerHeader=ry,D.DrawerHeaderStyled=Of,D.DrawerToggle=jB,D.Edit=rR,D.EditInDialogButton=_f,D.EmailField=wg,D.Empty=Gb,D.FileField=Tg,D.FileInput=kg,D.Footer=Ca,D.FormHeader=Yg,D.FunctionField=P0,D.GenericErrorPage=nQ,D.Header=DB,D.HeaderButton=xP,D.HeaderIconButton=I3,D.HeaderNotification=MB,D.HeaderProfile=RB,D.HeaderSpacer=FB,D.HeaderToggleButton=ns,D.HorizontalBar=vb,D.IconButton=ts,D.ImageField=ga,D.ImageInput=Fg,D.ImpersonateUserButton=Hb,D.LabeledArrayInput=bc,D.LabeledInput=nt,D.Layout=Tb,D.LayoutContent=Xv,D.LayoutProvider=SB,D.LayoutWrapper=Zv,D.LinearWithIcon=v0,D.LinearWithLabel=y0,D.List=Jb,D.ListItem=np,D.Loadable=sz,D.Loader=kb,D.LoadingButton=vg,D.LocalStorage=gE,D.LocalizedTextField=D3,D.LocalizedTextInput=X3,D.LoginPage=pu,D.Logo=jf,D.LongForm=kt,D.MainCard=Gn,D.MainIcon=Yf,D.MenuConfigContext=ZA,D.MenuConfigProvider=_A,D.MenuPopover=Dl,D.MenuPropTypes=Wi,D.NavMenu=yb,D.Navigation=xb,D.Notification=Fb,D.NotificationList=Lz,D.NumberInput=Lg,D.OnboardingModes=Ma,D.OnboardingProvider=pz,D.OnboardingTip=mz,D.ReadonlyField=F3,D.RecordInput=D0,D.RecoverPage=eQ,D.ReferenceArrayInput=Ng,D.ReferenceInput=Vg,D.ReferenceManyField=rs,D.ReferenceManyInput=zg,D.RegisterPage=tQ,D.ResponsiveSection=kB,D.ScrollTop=Gf,D.ScrollX=az,D.SearchInput=q3,D.SelectArrayInput=Hg,D.SelectInput=R0,D.Show=mR,D.SimpleBar=Hf,D.SimpleForm=yc,D.SimpleFormIterator=BR,D.SizeField=j0,D.SmallIcon=Kf,D.SmartTextInput=Tc,D.TabbedForm=_g,D.TableFormIterator=X2,D.TableFormIteratorContext=qA,D.TableFormIteratorItemContext=$A,D.TextField=wc,D.TextInput=On,D.ThemeConfigContext=XA,D.ThemeConfigProvider=kl,D.ThemeProvider=mu,D.ThemeToggler=wb,D.TimeInput=Wg,D.Toolbar=gr,D.Tooltip=Bc,D.Transitions=vo,D.createI18nProvider=CQ,D.getLocalizedValue=rd,D.localizedValueHasAllLocales=nd,D.parseTime=KC,D.useAppConfig=Go,D.useBreadcrumbs=YC,D.useGetLocalizedValue=vP,D.useI18nLanguages=CW,D.useI18nProvider=EQ,D.useLayoutContext=nf,D.useLayoutDispatch=q2,D.useLayoutDrawerState=si,D.useLayoutLogoState=OB,D.useLayoutMediaState=Jn,D.useLayoutNotificationsState=Nc,D.useLayoutState=as,D.useLayoutThemeState=$2,D.useLocalStorage=Ul,D.useLocalizedValue=BP,D.useMemoizedObject=pE,D.useMenu=td,D.useMenuConfig=Ko,D.usePopoverState=Yl,D.useRefDimensions=bP,D.useResourceDefaultValues=B3,D.useResourceTitle=pd,D.useRestartOnboarding=Ez,D.useSx=dr,D.useTableFormIterator=hE,D.useTableFormIteratorItem=QP,D.useThemeConfig=hn,D.uuid=RS,D.withLayoutProvider=PB,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
284
+ `),_V)),Rb=F.forwardRef(function(t,n){const r=Ht({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:a,valueBuffer:c,variant:A="indeterminate"}=r,d=Ue(r,XV),p=W({},r,{color:s,variant:A}),h=$V(p),C=Qt(),E={},m={bar1:{},bar2:{}};if(A==="determinate"||A==="buffer")if(a!==void 0){E["aria-valuenow"]=Math.round(a),E["aria-valuemin"]=0,E["aria-valuemax"]=100;let B=a-100;C.direction==="rtl"&&(B=-B),m.bar1.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(A==="buffer")if(c!==void 0){let B=(c||0)-100;C.direction==="rtl"&&(B=-B),m.bar2.transform=`translateX(${B}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return f.jsxs(ez,W({className:Ye(h.root,o),ownerState:p,role:"progressbar"},E,{ref:n},d,{children:[A==="buffer"?f.jsx(tz,{className:h.dashed,ownerState:p}):null,f.jsx(nz,{className:h.bar1,ownerState:p,style:m.bar1}),A==="determinate"?null:f.jsx(rz,{className:h.bar2,ownerState:p,style:m.bar2})]}))});process.env.NODE_ENV!=="production"&&(Rb.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 oz=Rb,iz=ge("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),kb=()=>f.jsx(iz,{children:f.jsx(oz,{color:"primary"})}),sz=e=>t=>f.jsx(Q.Suspense,{fallback:f.jsx(kb,{}),children:f.jsx(e,{...t})}),Yf=({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})]}),Fb=ge(P.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}})),Gf=({children:e})=>{const t=mt.useLocation(),{pathname:n}=t;return Q.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};Gf.propTypes={children:u.node};const az=ge("div")({width:"100%",overflowX:"auto",display:"block"}),Kf=({title:e})=>f.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});Kf.propTypes={title:u.string.isRequired};var Ma=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(Ma||{});const lz=Vr().required(),cz=Vr().oneOf(Object.values(Ma));function uz(e){var O;const t=Pi.useQueryClient(),[n,r]=Q.useState(!1),[o,s]=Q.useState(()=>()=>Promise.resolve()),a=de.useGetIdentity(),c=(O=a==null?void 0:a.data)==null?void 0:O.email,A=de.useDataProvider(),d=Q.useCallback(()=>c?A.get("onboarding").then(M=>{var x;return(x=M==null?void 0:M.data)==null?void 0:x.value}):Promise.reject(),[A,c]),{data:p,isLoading:h,isError:C}=Pi.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[E,m]=Q.useState(()=>()=>Promise.resolve()),B=Pi.useMutation({mutationFn:E}),v=B.mutateAsync;return Q.useEffect(()=>{function M(){const x=re.chain(p??{}).clone().extend({[e]:Date.now()}).value();return A.post("onboarding",x).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}m(()=>M)},[A,p,e,t,c]),Q.useEffect(()=>{r(re.isNil((p??{})[e]))},[p,e,r]),Q.useEffect(()=>{s(()=>()=>v())},[v]),{loading:h,error:C,onboardingRequired:n,acknowledgeOnboarding:o}}function Az(e){const[t,n]=Ul("onboarding",{}),[r,o]=Q.useState(!1),[s,a]=Q.useState(()=>()=>Promise.resolve());return Q.useEffect(()=>{o(re.isNil((t??{})[e]))},[t,e,o]),Q.useEffect(()=>{a(()=>()=>(n(c=>re.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function dz(){return{onboardingRequired:!1,acknowledgeOnboarding:Q.useRef(()=>Promise.resolve()).current}}function gz(e,t){fd({mode:cz,topic:lz}).validateSync({mode:e,topic:t});const n=uz(t),r=Az(t),o=dz();switch(e){case Ma.USER:return n.loading?o:n.error?r:re.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case Ma.BROWSER:return r;default:return o}}var Ra=(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))(Ra||{});function fz(e,t){var o;const n=re.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return re.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=re.chain(n.tips).clone().reject(p=>p.id===a).value(),A=re.find(n.tips,{id:a}),d=re.chain(A??{}).clone().extend(s).value();return c.push(d),re.extend(n,{tips:re.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=re.isString(s)?s:s.id,c=re.chain(n.tips).reject(A=>A.id===a).sortBy(["step"]).value();return re.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=re.isString(s)?s:s.id,c=re.chain(n.tips).reject(C=>C.id===a).value(),A=re.find(n.tips,{id:a});if(re.isNil(A))return n;const d=re.chain(A).clone().extend({dismissed:!0}).value();c.push(d);const p=((o=re.chain(c).reject(C=>C.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&re.chain(c).reject(C=>C.step<p).reject(C=>C.dismissed??!1).isEmpty().value()&&e.onComplete(),re.extend(n,{tips:re.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:s}=t;return re.extend(n,{onComplete:s})}case"RESTART":{const s=re.chain(n.tips).clone().map(a=>re.omit(a,"dismissed")).value();return re.extend(n,{tips:s,currentStep:0})}default:return n}}const Lb=Q.createContext(void 0);function pz(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=gz(t,n),[s,a]=Q.useReducer(fz,{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(Lb.Provider,{value:c,children:e.children})}function Nb(){const e=Q.useContext(Lb);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function hz(){return Nb().state}function Vb(){return Nb().dispatch}function Cz(e){fd({id:Vr().required(),step:sE().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=hz(),c=re.find(s,{id:t}),{dismissed:A}=c??{},d=Vb(),p=Q.useCallback(()=>{d({type:Ra.DISMISS_TIP,payload:t})},[d,t]);return Q.useEffect(()=>{(re.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:Ra.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c]),Q.useEffect(()=>()=>{d({type:Ra.UNREGISTER_TIP,payload:t})},[t,d]),{tip:re.chain(c??e).clone().extend({open:o&&!re.isNil(c)&&a===n&&!A}).value(),dismiss:p}}function Ez(){const e=Vb();return Q.useCallback(()=>{e({type:Ra.RESTART})},[e])}function Iz(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=Cz({id:t,step:n,completeOnboarding:o}),{open:c}=s,A=re.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(Bc,{...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 mz=b.styled(Iz)(({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}}}),Jf=(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)]},Bz=(e,t)=>e&&e.data?{data:Jf(e.data,t),total:e.total+1}:e,vz=(e,t)=>e&&e.length>0?Jf(e,t):e,yz=(e,t)=>e&&e.data?{...e,data:Jf(e.data,t),total:e.total+1}:e,Xf=({onClose:e,record:t,children:n,redirect:r,onSubmit:o,onSuccess:s,onError:a})=>{const c=Pi.useQueryClient(),A=P.useResourceContext(),d=P.useRedirect(),p=P.useNotify(),h=Q.useCallback(B=>{const O=Date.now();c.setQueryData([A,"getOne",{id:B.id}],B),c.setQueriesData([A,"getList"],M=>yz(M,B),{updatedAt:O}),c.setQueriesData([A,"getMany"],M=>vz(M,B),{updatedAt:O}),c.setQueriesData([A,"getManyReference"],M=>Bz(M,B),{updatedAt:O}),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,...E}=P.useCreateController({mutationOptions:{onSuccess:h,onError:a}}),m=Q.useCallback(B=>{o?o(B,e):C&&C(B)},[o,C,e]);return f.jsx(P.CreateContextProvider,{value:{record:t,save:m,saving:E==null?void 0:E.saving,redirect:r},children:Q.cloneElement(n,{...n.props,toolbar:f.jsxs(gr,{children:[f.jsx(P.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:E==null?void 0:E.saving}),f.jsx(P.SaveButton,{disabled:E==null?void 0:E.saving})]})})})};Xf.propTypes={children:u.node,onClose:u.func,record:u.object,redirect:u.oneOf(["list","edit","show",!1])},Xf.defaultProps={redirect:!1};const bz={true:{_scrollToTop:!0},false:{}},Qz=ge(b.Fab,{name:"RaApplicaCreateInDialogButton",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${P.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}})),Zf=({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,E]=Q.useState(!1),m=P.useTranslate(),B=P.useResourceContext(),{openDialog:v,closeDialog:O}=Go(),M=Q.useCallback(()=>v(B,()=>E(!0)),[v,B]),x=Q.useCallback(()=>O(B,()=>E(!1)),[O,B]),j=b.useMediaQuery(S=>S.breakpoints.down("md"));return f.jsxs(f.Fragment,{children:[j?f.jsx(Qz,{...h,state:bz[String(s)],color:"primary",className:Ye(P.CreateButtonClasses.floating,a),"aria-label":n&&m(n),onClick:M,children:f.jsx(fn.Add,{})}):f.jsx(P.Button,{...h,sx:c,label:n,onClick:M,children:f.jsx(fn.Add,{})}),f.jsx(b.Dialog,{open:C,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:x,fullWidth:e,maxWidth:t,children:f.jsx(Xf,{...h,redirect:o,record:r,onClose:x,onSubmit:A,onSuccess:d,onError:p})})]})};Zf.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.create",scrollToTop:!0},Zf.propTypes={...P.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 zb=({onClose:e,children:t})=>{const n=P.useNotify(),r=P.useRecordContext(),o=P.useResourceContext(),{id:s}=r,{isLoading:a,data:c}=P.useGetOne(o,{id:s}),A=Q.useCallback(()=>{n("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e()},[e,n]),{save:d,saving:p}=P.useEditController({resource:o,id:s,mutationMode:"pessimistic",mutationOptions:{onSuccess:A}});return f.jsx(P.EditContextProvider,{value:{record:c,isLoading:a,save:d,saving:p},children:Q.cloneElement(t,{toolbar:f.jsxs(gr,{children:[f.jsx(P.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),f.jsx(P.SaveButton,{})]})})})};zb.propTypes={children:u.node,onClose:u.func};const _f=({fullWidth:e,maxWidth:t,label:n,...r})=>{const[o,s]=Q.useState(!1),{openDialog:a,closeDialog:c}=Go(),A=P.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(P.Button,{label:n,onClick:d,children:f.jsx(fn.Edit,{})}),f.jsx(b.Dialog,{open:o,scroll:"body",sx:{"& .MuiToolbar-root":{position:"initial"}},onClose:p,fullWidth:e,maxWidth:t,children:f.jsx(zb,{...r,onClose:p})})]})};_f.defaultProps={fullWidth:!0,maxWidth:"md",label:"ra.action.edit"},_f.propTypes={fullWidth:u.bool,maxWidth:u.oneOf(["xs","sm","md","lg","xl",!1]),label:u.string};const Hb=({label:e="ra.auth.sign_in",...t})=>{const n=P.useRecordContext(),[r,o]=Q.useState(!1),s=P.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(P.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(fn.VpnKey,{})})};Hb.propTypes={label:u.string};const Wb=Q.createContext({});Wb.displayName="DatagridContext";const xz=({children:e,value:t})=>f.jsx(Wb.Provider,{value:t,children:e}),qf=e=>{const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:A}=de.useListContext(e),d=de.useTranslate(),p=Q.useCallback(()=>{A()},[A]);return f.jsx(wz,{className:r,children:f.jsxs(i6,{"data-test":"bulk-actions-toolbar",className:Ye(fr.toolbar,{[fr.collapsed]:c.length===0}),...de.sanitizeListRestProps(o),children:[f.jsxs("div",{className:fr.title,children:[f.jsx(Ig,{className:fr.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(ou,{fontSize:"small"})}),f.jsx(qm,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(P.TopToolbar,{className:fr.topToolbar,children:Q.Children.map(n,h=>Q.isValidElement(h)?Q.cloneElement(h,{filterValues:s,resource:a,selectedIds:c}):null)})]})})};qf.propTypes={children:u.node,label:u.string};const ui="RaBulkActionsToolbar",fr={toolbar:`${ui}-toolbar`,topToolbar:`${ui}-topToolbar`,buttons:`${ui}-buttons`,collapsed:`${ui}-collapsed`,title:`${ui}-title`,icon:`${ui}-icon`},wz=ge("div",{name:ui,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"?Fi(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"}})),Ub=f.jsx(P.BulkDeleteButton,{}),$f=F.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?P.PureDatagridBody:P.DatagridBody,header:o=P.DatagridHeader,children:s,className:a,empty:c=Pz,expand:A,bulkActionsToolbar:d=!1,bulkActionButtons:p=Ub,hover:h,isRowSelectable:C,isRowExpandable:E,resource:m,rowClick:B,rowSx:v,rowStyle:O,size:M="small",sx:x,expandSingle:j=!1,...S}=e,{sort:N,data:L,isLoading:_,onSelect:q,onToggleItem:Y,selectedIds:K,setSort:le,total:ie}=de.useListContext(e),Z=!!p,J=Q.useMemo(()=>({isRowExpandable:E,expandSingle:j}),[E,j]),z=Q.useRef(null);Q.useEffect(()=>{(!K||K.length===0)&&(z.current=null)},[JSON.stringify(K)]);const $=Q.useCallback((k,ee)=>{const H=L.map(fe=>fe.id),X=H.indexOf(z.current);if(z.current=ee.target.checked?k:null,ee.shiftKey&&X!==-1){const fe=H.indexOf(k),he=H.slice(Math.min(X,fe),Math.max(X,fe)+1),Ae=ee.target.checked?rN(K,he):EN(K,he);q(C?Ae.filter(pe=>C(L.find(Ce=>Ce.id===pe))):Ae)}else Y(k)},[L,C,q,Y,K]);return _===!0?f.jsx(P.DatagridLoading,{className:a,expand:A,hasBulkActions:Z,nbChildren:F.Children.count(s),size:M}):L==null||L.length===0||ie===0?c||null:f.jsx(xz,{value:J,children:f.jsxs(P.DatagridRoot,{sx:x,className:Ye(P.DatagridClasses.root,a),children:[d!=null&&Q.isValidElement(d)?Q.cloneElement(d,{selectedIds:K,total:ie}):p!==!1?f.jsx(qf,{children:Q.isValidElement(p)?p:Ub}):null,f.jsx("div",{className:P.DatagridClasses.tableWrapper,children:f.jsxs(b.Table,{ref:t,className:P.DatagridClasses.table,size:M,...Sz(S),children:[Yb(o,{children:s,sort:N,data:L,hasExpand:!!A,hasBulkActions:Z,isRowSelectable:C,onSelect:q,resource:m,selectedIds:K,setSort:le},s),Yb(r,{expand:A,rowClick:B,data:L,hasBulkActions:Z,hover:h,onToggleItem:$,resource:m,rowSx:v,rowStyle:O,selectedIds:K,isRowSelectable:C},s)]})})]})})}),Yb=(e,t,n)=>Q.isValidElement(e)?Q.cloneElement(e,t,n):Q.createElement(e,t,n);$f.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 Tz=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],Sz=e=>Object.keys(de.sanitizeListRestProps(e)).filter(t=>!Tz.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});$f.displayName="Datagrid";const Pz=f.jsx(P.ListNoResults,{}),Oz=ge($f,{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"}})),jz=e=>f.jsx(Oz,{...e}),Dz=ge("div")(({theme:e})=>({padding:e.spacing(2)})),Gb=({actions:e,className:t,...n})=>{const{hasCreate:r}=de.useResourceDefinition(n),o=de.useResourceContext(n),s=de.useTranslate(),a=de.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(Mz,{className:t,children:[f.jsxs("div",{className:Es.message,children:[f.jsx(fn.Inbox,{className:Es.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(Dz,{className:Es.toolbar,children:e})]})},gu="ApplicaEmpty",Es={message:`${gu}-message`,icon:`${gu}-icon`,toolbar:`${gu}-toolbar`},Mz=ge("span",{name:gu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Es.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Es.icon}`]:{width:"9em",height:"9em"},[`& .${Es.toolbar}`]:{textAlign:"center",marginTop:"2em"}}));Gb.propTypes={actions:u.element,className:u.string};const Rz=()=>{const e=P.useRefresh(),t=P.useNotify(),n=P.useUnselectAll(),r=P.useResourceContext(),{selectedIds:o,data:s}=P.useListContext(),a=P.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)),[A,{isLoading:d}]=P.useUpdateMany(r,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Lr().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(P.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(fn.Email,{})})},kz=()=>{const e=P.useRefresh(),t=P.useNotify(),n=P.useUnselectAll(),{selectedIds:r,data:o}=P.useListContext(),s=P.useRecordContext(),a=P.useResourceContext(),c=r.map(h=>o.find(C=>C.id===h)).concat([s]),[A,{isLoading:d}]=P.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(P.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||s&&!(s!=null&&s.readed),onClick:p,children:f.jsx(fn.Drafts,{})})},Fz=e=>{const t=P.useRecordContext(e),n=P.useResourceContext(e),r=P.useRedirect(),o=P.useNotify(),s=P.useTranslate(),[a]=P.useLocaleState(),c=Q.useMemo(()=>t!=null&&t.readed?Lr(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]=P.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Lr().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})})]})},Lz=({...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(P.Datagrid,{...e,rowStyle:s,children:[f.jsx(Fz,{source:"notification",sortable:!1,label:"ra.notification"}),f.jsx(xc,{source:"created",label:"ra.notification.created"}),f.jsxs(uo,{children:[f.jsx(Rz,{}),f.jsx(kz,{})]})]})},Nz=f.jsx(P.ListActions,{}),Vz=f.jsx(P.Pagination,{}),zz=f.jsx(P.Empty,{}),Hz=wN,Kb=e=>{const{actions:t=Nz,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=Vz,children:A,className:d,component:p=Hz,title:h,empty:C=zz,...E}=e,{defaultTitle:m,data:B,error:v,isLoading:O,filterValues:M,resource:x}=de.useListContext(e);if(!A||!B&&O&&s)return null;const j=()=>f.jsxs("div",{className:Po.main,children:[(r||t)&&f.jsx(P.ListToolbar,{className:Po.actions,filters:r,actions:t,hasCreate:a}),!v&&f.jsx(p,{className:Po.content,children:o&&A&&F.isValidElement(A)?Q.cloneElement(A,{bulkActionButtons:o}):A}),v?f.jsx(Pf,{error:v,resetErrorBoundary:null}):c!==!1&&c]}),S=()=>C!==!1&&Q.cloneElement(C,{className:Po.noResults,hasCreate:a}),N=!O&&(B==null?void 0:B.length)===0&&!Object.keys(M).length&&C!==!1;return f.jsxs(Wz,{className:Ye("list-page",d),...E,children:[f.jsx(P.Title,{title:h,defaultTitle:m,preferenceKey:`${x}.list.title`}),N?S():j(),n]})};Kb.propTypes={actions:u.oneOfType([u.bool,u.element]),aside:u.element,children:u.node,className:u.string,component:de.ComponentPropType,emptyWhileLoading:u.bool,filters:u.oneOfType([u.element,u.arrayOf(u.element)]),hasCreate:u.bool,pagination:u.oneOfType([u.element,u.bool]),title:P.TitlePropType};const ka="RaList",Po={main:`${ka}-main`,content:`${ka}-content`,actions:`${ka}-actions`,noResults:`${ka}-noResults`},Wz=ge("div",{name:ka,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${Po.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Po.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Po.actions}`]:{},[`& .${Po.noResults}`]:{}})),ep=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=Uz,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:A,sort:d,storeKey:p,...h})=>f.jsx(de.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(Kb,{...h})});ep.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:P.TitlePropType,disableSyncWithLocation:u.bool,hasCreate:u.bool,resource:u.string};const Uz={},Yz=Gs(ep,{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)}})),Jb=e=>f.jsx(Gn,{content:!1,children:f.jsx(Yz,{...e})});Jb.propTypes={...ep.propTypes};const tp={p:0,m:0},Xb={p:2,m:0,borderRadius:0,width:"100%"},Zb=e=>{const{children:t}=e,[n,r]=F.useState(null),o=m=>{r(m.currentTarget)},s=()=>{r(null)},a=b.useMediaQuery(m=>m.breakpoints.down("md")),{filterValues:c,resource:A,selectedIds:d=[],onUnselectItems:p}=P.useListContext(e),h=!!n&&d!==void 0&&d.length>0,C=h?"simple-popover":void 0,E=F.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:tp,children:[f.jsx(b.ListItem,{sx:tp,children:f.jsx(P.Button,{onClick:E,sx:Xb,label:"ra.action.unselect",startIcon:f.jsx(ou,{}),children:f.jsx(ou,{})})}),F.Children.map(t,m=>{var B;return f.jsx(b.ListItem,{sx:tp,children:F.isValidElement(m)?F.cloneElement(m,{filterValues:c,resource:A,selectedIds:d,sx:Xb,...(B=m.props)!=null&&B.popover?{closePopover:s}:{}}):null})})]})})]})})};Zb.propTypes={children:u.node};const fu={width:"1.5rem",alignSelf:"center"},np=({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}=Go(),E=de.useResourceContext(h),m=C(),B=de.useRecordContext(),v=r||B,O=dt.get(v,e||"");return f.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.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:fu}):Q.createElement(c,{style:fu})),f.jsx(de.FieldTitle,{label:t,source:e,resource:m||E})]}),f.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[a?Q.isValidElement(a)?Q.cloneElement(a,{record:v,resource:E,value:O}):Q.createElement(a,{source:e,record:v,resource:E,value:O}):f.jsx(b.Typography,{variant:n,children:O}),A&&(Q.isValidElement(A)?Q.cloneElement(A,{style:fu}):Q.createElement(A,{style:fu})),d&&f.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:d})]})]})};np.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},np.defaultProps={variant:"body1"};const _b=()=>{const e=Xt.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"})]})})},qb=({children:e,...t})=>{const n=Qt();return f.jsx(Gn,{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})})};qb.propTypes={children:u.node};const Fa=({version:e,name:t,copy:n,children:r,logo:o,background:s=_b})=>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(Yf,{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(qb,{children:r})})}),f.jsx(b.Grid,{item:!0,sx:{pb:1},children:f.jsx(Ca,{name:t,copy:n,version:e})})]})]})]});Fa.propTypes={children:u.node,version:u.string,name:u.string,copy:u.string,background:u.oneOfType([u.node,u.func,u.object])};const $b=({name:e,copy:t,logo:n,version:r,background:o})=>{const s=de.useTranslate(),a=de.useAuthProvider(),c=de.useNotify(),A=mt.useNavigate(),{token:d}=mt.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"}),re.delay(()=>A("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),re.delay(()=>A("/login"),1e3)})},[d]),f.jsx(Fa,{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:mt.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")})]})})};$b.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const pu=({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o,enableRegistration:s,redirectTo:a,background:c})=>{const[A,d]=de.useSafeSetState(!1),p=de.useLogin(),h=de.useTranslate(),C=de.useNotify(),E=de.useCheckAuth(),m=mt.useNavigate();Q.useEffect(()=>{E({},!1).then(()=>{m("/")}).catch(()=>{})},[E,m]);const B=v=>{d(!0),p(v,a).then(()=>{d(!1)}).catch(O=>{d(!1),C(typeof O=="string"?O:typeof O>"u"||!O.message?"ra.auth.sign_in_error":O.message,{type:"error",messageArgs:{_:typeof O=="string"?O:O&&O.message?O.message:void 0}})})};return f.jsx(Fa,{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:mt.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(de.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(On,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:de.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(On,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:de.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:mt.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")})})]})})]})})};pu.propTypes={version:u.string.isRequired,name:u.string.isRequired,enablePasswordRecover:u.bool,enableRegister:u.bool,background:u.element},pu.defaultProps={enablePasswordRecover:!1,enableRegister:!1,background:f.jsx(_b,{})};const eQ=({name:e,copy:t,logo:n,version:r,background:o})=>{const[s,a]=Q.useState(!1),c=de.useTranslate(),A=de.useRedirect(),d=de.useNotify(),p=de.useAuthProvider(),h=({email:C})=>{a(!0),p.recover(C).then(E=>{const m=`ra.auth.recover_${E.responseCode}`,B=E.responseCode==="ok"?"info":"error";d(m,{type:B}),A("/login")}).catch(E=>{d(E,{type:"error"})}).finally(()=>a(!1))};return f.jsx(Fa,{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:mt.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(P.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(On,{source:"email",validate:[de.required(),de.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")})})]})})]})})};eQ.propTypes={name:u.string.isRequired,version:u.string.isRequired,background:u.node};const tQ=({name:e,copy:t,version:n,logo:r,background:o})=>{const[s,a]=Q.useState(!1),c=de.useTranslate(),A=de.useRedirect(),d=de.useNotify(),p=de.useAuthProvider(),h=C=>{a(!0),p.register(C).then(E=>{const m=`ra.auth.register_${E.responseCode}`,B=E.responseCode==="ok"?"info":"error";d(m,{type:B}),A("/login")}).catch(E=>{d(E,{type:"error"})}).finally(()=>a(!1))};return f.jsx(Fa,{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:mt.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(P.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(On,{source:"name",label:c("ra.register.name"),validate:de.required()})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(On,{source:"email",type:"email",validate:[de.required(),de.email()]})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(On,{source:"password",type:"password",validate:de.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")})})]})})]})})};tQ.propTypes={name:u.string.isRequired,version:u.string.isRequired};function nQ(){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:Jv,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 Gz=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 $n(e,t){Kz(e)&&(e="100%");var n=Jz(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 Kz(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Jz(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Xz(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function rp(e){return e.length===1?"0"+e:String(e)}function Zz(e,t,n){return{r:$n(e,255)*255,g:$n(t,255)*255,b:$n(n,255)*255}}function op(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 _z(e,t,n){var r,o,s;if(e=$n(e,360),t=$n(t,100),n=$n(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=op(c,a,e+1/3),o=op(c,a,e),s=op(c,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function qz(e,t,n){e=$n(e,255),t=$n(t,255),n=$n(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 $z(e,t,n){e=$n(e,360)*6,t=$n(t,100),n=$n(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 eH(e,t,n,r){var o=[rp(Math.round(e).toString(16)),rp(Math.round(t).toString(16)),rp(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 rQ(e){return Rn(e)/255}function Rn(e){return parseInt(e,16)}var oQ={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 La(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=rH(e)),typeof e=="object"&&(Zr(e.r)&&Zr(e.g)&&Zr(e.b)?(t=Zz(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zr(e.h)&&Zr(e.s)&&Zr(e.v)?(r=hu(e.s),o=hu(e.v),t=$z(e.h,r,o),a=!0,c="hsv"):Zr(e.h)&&Zr(e.s)&&Zr(e.l)&&(r=hu(e.s),s=hu(e.l),t=_z(e.h,r,s),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Xz(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 tH="[-\\+]?\\d+%?",nH="[-\\+]?\\d*\\.\\d+%?",Oo="(?:".concat(nH,")|(?:").concat(tH,")"),ip="[\\s|\\(]+(".concat(Oo,")[,|\\s]+(").concat(Oo,")[,|\\s]+(").concat(Oo,")\\s*\\)?"),sp="[\\s|\\(]+(".concat(Oo,")[,|\\s]+(").concat(Oo,")[,|\\s]+(").concat(Oo,")[,|\\s]+(").concat(Oo,")\\s*\\)?"),pr={CSS_UNIT:new RegExp(Oo),rgb:new RegExp("rgb"+ip),rgba:new RegExp("rgba"+sp),hsl:new RegExp("hsl"+ip),hsla:new RegExp("hsla"+sp),hsv:new RegExp("hsv"+ip),hsva:new RegExp("hsva"+sp),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 rH(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(oQ[e])e=oQ[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=pr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=pr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=pr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=pr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=pr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=pr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=pr.hex8.exec(e),n?{r:Rn(n[1]),g:Rn(n[2]),b:Rn(n[3]),a:rQ(n[4]),format:t?"name":"hex8"}:(n=pr.hex6.exec(e),n?{r:Rn(n[1]),g:Rn(n[2]),b:Rn(n[3]),format:t?"name":"hex"}:(n=pr.hex4.exec(e),n?{r:Rn(n[1]+n[1]),g:Rn(n[2]+n[2]),b:Rn(n[3]+n[3]),a:rQ(n[4]+n[4]),format:t?"name":"hex8"}:(n=pr.hex3.exec(e),n?{r:Rn(n[1]+n[1]),g:Rn(n[2]+n[2]),b:Rn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Zr(e){return!!pr.CSS_UNIT.exec(String(e))}var Cu=2,iQ=.16,oH=.05,iH=.05,sH=.15,sQ=5,aQ=4,aH=[{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 lQ(e){var t=e.r,n=e.g,r=e.b,o=qz(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Eu(e){var t=e.r,n=e.g,r=e.b;return"#".concat(eH(t,n,r,!1))}function lH(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 cQ(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Cu*t:Math.round(e.h)+Cu*t:r=n?Math.round(e.h)+Cu*t:Math.round(e.h)-Cu*t,r<0?r+=360:r>=360&&(r-=360),r}function uQ(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-iQ*t:t===aQ?r=e.s+iQ:r=e.s+oH*t,r>1&&(r=1),n&&t===sQ&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function AQ(e,t,n){var r;return n?r=e.v+iH*t:r=e.v-sH*t,r>1&&(r=1),Number(r.toFixed(2))}function dQ(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=La(e),o=sQ;o>0;o-=1){var s=lQ(r),a=Eu(La({h:cQ(s,o,!0),s:uQ(s,o,!0),v:AQ(s,o,!0)}));n.push(a)}n.push(Eu(r));for(var c=1;c<=aQ;c+=1){var A=lQ(r),d=Eu(La({h:cQ(A,c),s:uQ(A,c),v:AQ(A,c)}));n.push(d)}return t.theme==="dark"?aH.map(function(p){var h=p.index,C=p.opacity,E=Eu(lH(La(t.backgroundColor||"#141414"),La(n[h]),C*100));return E}):n}var ap={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},_t={},Iu={};Object.keys(ap).forEach(function(e){_t[e]=dQ(ap[e]),_t[e].primary=_t[e][5],Iu[e]=dQ(ap[e],{theme:"dark",backgroundColor:"#141414"}),Iu[e].primary=Iu[e][5]}),_t.red,_t.volcano,_t.gold,_t.orange,_t.yellow,_t.lime,_t.green,_t.cyan,_t.blue,_t.geekblue,_t.purple,_t.magenta,_t.grey,_t.grey;const gQ=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}};gQ.propTypes={colors:u.object};const cH=(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}},uH=(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}},AH=(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}},dH=(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}},gH=(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}},fH=(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}},pH=(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}},hH=(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}},fQ=(e,t,n)=>{switch(t){case"theme1":return cH(e,n);case"theme2":return uH(e,n);case"theme3":return AH(e,n);case"theme4":return dH(e,n);case"theme5":return gH(e,n);case"theme6":return fH(e,n);case"theme7":return pH(e,n);case"theme8":return hH(e,n);default:return gQ(e)}};fQ.propTypes={colors:u.object,presetColor:u.any};const CH=(e,t)=>{const n=e==="dark"?Iu:_t;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=fQ(n,t,e);return WA({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}}})},EH=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 IH(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 mH(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function BH(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 Ai({color:e,theme:t}){const n=rn(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:ze(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function vH(e){const t=Ai({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":Ai({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ai({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ai({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ai({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ai({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ai({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 yH(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function bH(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 di({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function QH(e){const t=di({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":di({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":di({color:"secondary",theme:e}),"&.MuiBadge-colorError":di({color:"error",theme:e}),"&.MuiBadge-colorInfo":di({color:"info",theme:e}),"&.MuiBadge-colorSuccess":di({color:"success",theme:e}),"&.MuiBadge-colorWarning":di({color:"warning",theme:e})}}}}}function tt({variant:e,color:t,theme:n}){const r=rn(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,A=`${t}Button`,d=es(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 xH(e){const t=tt({variant:"dashed",color:"primary",theme:e}),n=tt({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":tt({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":tt({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":tt({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":tt({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":tt({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":tt({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":tt({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":tt({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":tt({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":tt({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":tt({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":tt({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:tt({variant:"contained",color:"primary",theme:e}),containedSecondary:tt({variant:"contained",color:"secondary",theme:e}),containedError:tt({variant:"contained",color:"error",theme:e}),containedSuccess:tt({variant:"contained",color:"success",theme:e}),containedInfo:tt({variant:"contained",color:"info",theme:e}),containedWarning:tt({variant:"contained",color:"warning",theme:e}),outlinedPrimary:tt({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:tt({variant:"outlined",color:"secondary",theme:e}),outlinedError:tt({variant:"outlined",color:"error",theme:e}),outlinedSuccess:tt({variant:"outlined",color:"success",theme:e}),outlinedInfo:tt({variant:"outlined",color:"info",theme:e}),outlinedWarning:tt({variant:"outlined",color:"warning",theme:e}),textPrimary:tt({variant:"text",color:"primary",theme:e}),textSecondary:tt({variant:"text",color:"secondary",theme:e}),textError:tt({variant:"text",color:"error",theme:e}),textSuccess:tt({variant:"text",color:"success",theme:e}),textInfo:tt({variant:"text",color:"info",theme:e}),textWarning:tt({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function wH(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function TH(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function SH(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Is({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function PH(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 lp(e){const t=PH(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function OH(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":{...lp("small")},"&.size-medium":{...lp("medium")},"&.size-large":{...lp("large")}},colorPrimary:Is({color:"primary",theme:e}),colorSecondary:Is({color:"secondary",theme:e}),colorSuccess:Is({color:"success",theme:e}),colorWarning:Is({color:"warning",theme:e}),colorInfo:Is({color:"info",theme:e}),colorError:Is({color:"error",theme:e})}}}}function ms({color:e,theme:t}){const n=rn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function kn({color:e,theme:t}){const n=rn(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function jH(e){const t=kn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ms({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ms({color:"secondary",theme:e}),"&.MuiChip-colorError":ms({color:"error",theme:e}),"&.MuiChip-colorInfo":ms({color:"info",theme:e}),"&.MuiChip-colorSuccess":ms({color:"success",theme:e}),"&.MuiChip-colorWarning":ms({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":kn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":kn({color:"secondary",theme:e}),"&.MuiChip-lightError":kn({color:"error",theme:e}),"&.MuiChip-lightInfo":kn({color:"info",theme:e}),"&.MuiChip-lightSuccess":kn({color:"success",theme:e}),"&.MuiChip-lightWarning":kn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":kn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":kn({color:"secondary",theme:e}),"&.MuiChip-combinedError":kn({color:"error",theme:e}),"&.MuiChip-combinedInfo":kn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":kn({color:"success",theme:e}),"&.MuiChip-combinedWarning":kn({color:"warning",theme:e})}}}}}function DH(){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:ze("#000",.7)}}}}}}function MH(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function RH(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Bs({color:e,theme:t}){const n=rn(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=es(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 kH(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Bs({color:"primary",theme:e}),"&.MuiFab-secondary":Bs({color:"secondary",theme:e}),"&.Mui-error":Bs({color:"error",theme:e}),"&.MuiFab-success":Bs({color:"success",theme:e}),"&.MuiFab-info":Bs({color:"info",theme:e}),"&.MuiFab-warning":Bs({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 FH(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 LH(){return{MuiInputBase:{styleOverrides:{}}}}function NH(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 VH(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function zH(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function HH(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function WH(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function UH(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function YH(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function gi({variant:e,theme:t}){const n=rn(t,e),{light:r}=n,o=es(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function GH(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:{...gi({variant:"primary",theme:e}),"&.Mui-error":{...gi({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:gi({variant:"secondary",theme:e}),colorError:gi({variant:"error",theme:e}),colorWarning:gi({variant:"warning",theme:e}),colorInfo:gi({variant:"info",theme:e}),colorSuccess:gi({variant:"success",theme:e})}}}}function KH(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function xt({variant:e,color:t,theme:n}){const r=rn(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 JH(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":xt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":xt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":xt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":xt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":xt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":xt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":xt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":xt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":xt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":xt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":xt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":xt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":xt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":xt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":xt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":xt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":xt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":xt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":xt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":xt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":xt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":xt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":xt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":xt({variant:"outlined",color:"warning",theme:e})}}}}}}function XH(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function vs({color:e,theme:t}){const n=rn(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function ZH(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 cp(e){const t=ZH(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function _H(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":{...cp("small")},"&.size-medium":{...cp("medium")},"&.size-large":{...cp("large")}},colorPrimary:vs({color:"primary",theme:e}),colorSecondary:vs({color:"secondary",theme:e}),colorSuccess:vs({color:"success",theme:e}),colorWarning:vs({color:"warning",theme:e}),colorInfo:vs({color:"info",theme:e}),colorError:vs({color:"error",theme:e})}}}}function ys({color:e,theme:t}){const n=rn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function qH(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":ys({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":ys({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":ys({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":ys({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":ys({color:"info",theme:e}),"&.MuiSlider-thumbColorError":ys({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 $H(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 up(e,t){const n=$H(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 eW(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},...up(e,"medium")},sizeLarge:{...up(e,"large")},sizeSmall:{...up(e,"small")}}}}}function tW(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 nW(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 rW(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 oW(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function iW(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function sW(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function aW(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function lW(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function cW(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 uW(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function AW(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function dW(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function gW(e){return dt.merge(IH(e),mH(e),BH(e),vH(e),yH(),bH(e),QH(e),xH(e),wH(),TH(),SH(),OH(e),jH(e),DH(),MH(e),RH(),kH(e),FH(e),LH(),NH(e),VH(),zH(),HH(e),WH(e),UH(),YH(),GH(e),KH(),JH(e),XH(e),_H(e),qH(e),eW(e),tW(e),nW(e),rW(e),oW(e),iW(e),sW(),aW(),lW(),cW(e),uW(e),AW(),dW())}const mu=({themeOverrides:e,children:t})=>{const n=hn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=Q.useMemo(()=>CH(o,s),[o,s]),A=Q.useMemo(()=>EH(a),[a]),d=Q.useMemo(()=>Gz(c),[c]),p=Q.useMemo(()=>re.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=WA(p),C=re.cloneDeep(h.components??{});return h.components=re.merge(gW(h),C),f.jsx(b.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(DC,{theme:h,children:[f.jsx(b.CssBaseline,{}),t]})})};mu.propTypes={children:u.node,themeOverrides:u.oneOfType([u.object,u.func])};const pQ=({children:e,theme:t,...n})=>f.jsx(P.CoreAdminContext,{...n,children:f.jsx(mu,{themeOverrides:t,children:f.jsx(Gf,{children:e})})});pQ.displayName="ApplicaAdminContext";const bs=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:E,notification:m,queryClient:B,requireAuth:v,store:O,ready:M,theme:x,title:j="React Admin"}=e;return f.jsx(pQ,{authProvider:t,dataProvider:s,i18nProvider:A,store:O,history:c,queryClient:B,theme:x,children:f.jsx(P.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:E,catchAll:n,title:j,loading:p,loginPage:h,authCallbackPage:C,notification:m,requireAuth:v,ready:M,children:r})})};bs.defaultProps={store:P.localStorageStore(),title:"Applica Admin"},bs.propTypes={...P.AdminUI.propTypes};class fW{constructor(t){ao(this,Na,void 0);ao(this,Va,void 0);ao(this,Qs,new Set);const{apiUrl:n}=t??{};if(!re.isString(n)||re.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");Ho(this,Va,n),Ho(this,Na,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}`;wn(this,Qs).has(a)||(wn(this,Qs).add(a),fetch(`${wn(this,Va)}/ui/error-log`,{method:"PUT",headers:wn(this,Na),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"),wn(this,Qs).delete(a)}))}}Na=new WeakMap,Va=new WeakMap,Qs=new WeakMap;class hQ{constructor({catch:t,display:n,log:r,error:o}){cl(this,"catch");cl(this,"display");cl(this,"log");cl(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 pW=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new hQ({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=F.useMemo(()=>o.errorHandler?o.errorHandler:new fW({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=F.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 F.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c]),!0};class hW{constructor(t){ao(this,za,void 0);ao(this,Ha,void 0);ao(this,pi,[]);const{apiUrl:n}=t??{};if(!re.isString(n)||re.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");Ho(this,Ha,n),Ho(this,za,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!re.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!re.isString(n)||re.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!re.isString(r)||re.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!re.some(wn(this,pi),o=>re.isEqual(o,{code:n,lang:r}))){wn(this,pi).push({code:n,lang:r}),fetch(`${wn(this,Ha)}/i18n/message`,{method:"put",headers:wn(this,za),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),Ho(this,pi,re.reject(wn(this,pi),s=>re.isEqual(s,{code:n,lang:r})))});return}}}za=new WeakMap,Ha=new WeakMap,pi=new WeakMap;function CQ(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 hW({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,E)=>({...C,[E.lang]:{...C[E.lang]||{},[E.code]:E.text}}),{})),p=(h,C,E)=>(r||console.error(`Warning: Missing translation for key: "${h}"`),o&&(re.isString(h)?h.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${h}`):c.handleMessage({code:h,lang:E}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),h);return Promise.all([A(),d()]).then(h=>{const[C,E]=h;function m(B){return re.get(E,B,{})}return Y1(m,n,C,{allowMissing:r||o,onMissingKey:p})})}window.React=Q;const CW=({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 EQ(e){const[t,n]=Q.useState(),r=pE(e);return Q.useEffect(()=>{CQ(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const EW=new Pi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),Ap=({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:E,errorHandler:m,error:B,notification:v,enableNotification:O,enableRegistration:M,enablePasswordRecover:x,queryClient:j,background:S,enableThemeToggler:N,...L})=>{pW({apiUrl:n,errorHandler:m,catcherFn:K=>{const le=K==null?void 0:K.toString(),Z=["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(z=>le==null?void 0:le.includes(z));return new hQ({catch:Z,display:!Z,log:!Z,error:le})}});const _=Q.useMemo(()=>Q.isValidElement(c)?Q.cloneElement(c,{name:d,copy:p,logo:s,version:h,background:S,enableRegistration:M,enablePasswordRecover:x}):c,[c,d,h,p,S,s,M,x]),q=Q.useMemo(()=>K=>{const le=d?f.jsx(Yf,{title:d}):s,ie=d?f.jsx(Kf,{title:d}):a;return f.jsx(Tb,{...K,name:d,copy:p,enableThemeToggler:N,version:h,logoMain:le,logoIcon:ie,notification:v,enableNotification:O,error:B})},[s,a,d,h,B,v,O]),Y=EQ({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return Y===void 0?f.jsx(f.Fragment,{}):Y.error?f.jsx(kl,{initialConfig:t,children:f.jsx(mu,{themeOverrides:e,children:f.jsx(nQ,{})})}):f.jsx(JA,{children:f.jsx(_A,{menu:A,children:f.jsx(kl,{initialConfig:t,children:f.jsx(bs,{theme:e,layout:q,notification:Fb,queryClient:j,dataProvider:C,authProvider:E,i18nProvider:Y,loginPage:_,...L})})})})};Ap.defaultProps={...bs.defaultProps,fileFields:[],defaultLocale:"en",development:!1,version:"0.0.0",notification:"entities/notification",enableNotification:!1,enableRegistration:!1,enableForgotPassword:!1,loginPage:f.jsx(pu,{version:"0.0.0",name:"Applica",redirectTo:"/"}),queryClient:EW,enableThemeToggler:!1},Ap.propTypes={...bs.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(Wi),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(D,"ArrayInputContext",{enumerable:!0,get:()=>P.ArrayInputContext}),Object.defineProperty(D,"BooleanField",{enumerable:!0,get:()=>P.BooleanField}),Object.defineProperty(D,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>P.BulkDeleteWithConfirmButton}),Object.defineProperty(D,"Button",{enumerable:!0,get:()=>P.Button}),Object.defineProperty(D,"ChipField",{enumerable:!0,get:()=>P.ChipField}),Object.defineProperty(D,"Confirm",{enumerable:!0,get:()=>P.Confirm}),Object.defineProperty(D,"CreateButton",{enumerable:!0,get:()=>P.CreateButton}),Object.defineProperty(D,"CreateContextProvider",{enumerable:!0,get:()=>P.CreateContextProvider}),Object.defineProperty(D,"CustomRoutes",{enumerable:!0,get:()=>P.CustomRoutes}),Object.defineProperty(D,"DeleteWithConfirmButton",{enumerable:!0,get:()=>P.DeleteWithConfirmButton}),Object.defineProperty(D,"DeleteWithUndoButton",{enumerable:!0,get:()=>P.DeleteWithUndoButton}),Object.defineProperty(D,"EditButton",{enumerable:!0,get:()=>P.EditButton}),Object.defineProperty(D,"EditContextProvider",{enumerable:!0,get:()=>P.EditContextProvider}),Object.defineProperty(D,"FieldTitle",{enumerable:!0,get:()=>P.FieldTitle}),Object.defineProperty(D,"Form",{enumerable:!0,get:()=>P.Form}),Object.defineProperty(D,"FormDataConsumer",{enumerable:!0,get:()=>P.FormDataConsumer}),Object.defineProperty(D,"HttpError",{enumerable:!0,get:()=>P.HttpError}),Object.defineProperty(D,"I18nContextProvider",{enumerable:!0,get:()=>P.I18nContextProvider}),Object.defineProperty(D,"ListToolbar",{enumerable:!0,get:()=>P.ListToolbar}),Object.defineProperty(D,"LoadingIndicator",{enumerable:!0,get:()=>P.LoadingIndicator}),Object.defineProperty(D,"Pagination",{enumerable:!0,get:()=>P.Pagination}),Object.defineProperty(D,"RaSimpleFormIterator",{enumerable:!0,get:()=>P.SimpleFormIterator}),Object.defineProperty(D,"RecordContextProvider",{enumerable:!0,get:()=>P.RecordContextProvider}),Object.defineProperty(D,"ReferenceArrayField",{enumerable:!0,get:()=>P.ReferenceArrayField}),Object.defineProperty(D,"ReferenceField",{enumerable:!0,get:()=>P.ReferenceField}),Object.defineProperty(D,"Resource",{enumerable:!0,get:()=>P.Resource}),Object.defineProperty(D,"ResourceContextProvider",{enumerable:!0,get:()=>P.ResourceContextProvider}),Object.defineProperty(D,"SaveButton",{enumerable:!0,get:()=>P.SaveButton}),Object.defineProperty(D,"SimpleFormIteratorContext",{enumerable:!0,get:()=>P.SimpleFormIteratorContext}),Object.defineProperty(D,"SimpleList",{enumerable:!0,get:()=>P.SimpleList}),Object.defineProperty(D,"SimpleShowLayout",{enumerable:!0,get:()=>P.SimpleShowLayout}),Object.defineProperty(D,"SingleFieldList",{enumerable:!0,get:()=>P.SingleFieldList}),Object.defineProperty(D,"TopToolbar",{enumerable:!0,get:()=>P.TopToolbar}),Object.defineProperty(D,"UrlField",{enumerable:!0,get:()=>P.UrlField}),Object.defineProperty(D,"choices",{enumerable:!0,get:()=>P.choices}),Object.defineProperty(D,"email",{enumerable:!0,get:()=>P.email}),Object.defineProperty(D,"maxLength",{enumerable:!0,get:()=>P.maxLength}),Object.defineProperty(D,"maxValue",{enumerable:!0,get:()=>P.maxValue}),Object.defineProperty(D,"minLength",{enumerable:!0,get:()=>P.minLength}),Object.defineProperty(D,"minValue",{enumerable:!0,get:()=>P.minValue}),Object.defineProperty(D,"number",{enumerable:!0,get:()=>P.number}),Object.defineProperty(D,"regex",{enumerable:!0,get:()=>P.regex}),Object.defineProperty(D,"required",{enumerable:!0,get:()=>P.required}),Object.defineProperty(D,"useArrayInput",{enumerable:!0,get:()=>P.useArrayInput}),Object.defineProperty(D,"useAuthProvider",{enumerable:!0,get:()=>P.useAuthProvider}),Object.defineProperty(D,"useChoices",{enumerable:!0,get:()=>P.useChoices}),Object.defineProperty(D,"useChoicesContext",{enumerable:!0,get:()=>P.useChoicesContext}),Object.defineProperty(D,"useCreateController",{enumerable:!0,get:()=>P.useCreateController}),Object.defineProperty(D,"useDataProvider",{enumerable:!0,get:()=>P.useDataProvider}),Object.defineProperty(D,"useEditContext",{enumerable:!0,get:()=>P.useEditContext}),Object.defineProperty(D,"useGetIdentity",{enumerable:!0,get:()=>P.useGetIdentity}),Object.defineProperty(D,"useGetList",{enumerable:!0,get:()=>P.useGetList}),Object.defineProperty(D,"useGetMany",{enumerable:!0,get:()=>P.useGetMany}),Object.defineProperty(D,"useGetManyReference",{enumerable:!0,get:()=>P.useGetManyReference}),Object.defineProperty(D,"useGetOne",{enumerable:!0,get:()=>P.useGetOne}),Object.defineProperty(D,"useInput",{enumerable:!0,get:()=>P.useInput}),Object.defineProperty(D,"useListContext",{enumerable:!0,get:()=>P.useListContext}),Object.defineProperty(D,"useLocaleState",{enumerable:!0,get:()=>P.useLocaleState}),Object.defineProperty(D,"useNotify",{enumerable:!0,get:()=>P.useNotify}),Object.defineProperty(D,"usePermissions",{enumerable:!0,get:()=>P.usePermissions}),Object.defineProperty(D,"useRecordContext",{enumerable:!0,get:()=>P.useRecordContext}),Object.defineProperty(D,"useRefresh",{enumerable:!0,get:()=>P.useRefresh}),Object.defineProperty(D,"useResourceContext",{enumerable:!0,get:()=>P.useResourceContext}),Object.defineProperty(D,"useResourceDefinition",{enumerable:!0,get:()=>P.useResourceDefinition}),Object.defineProperty(D,"useResourceDefinitions",{enumerable:!0,get:()=>P.useResourceDefinitions}),Object.defineProperty(D,"useShowContext",{enumerable:!0,get:()=>P.useShowContext}),Object.defineProperty(D,"useShowController",{enumerable:!0,get:()=>P.useShowController}),Object.defineProperty(D,"useSimpleFormIterator",{enumerable:!0,get:()=>P.useSimpleFormIterator}),Object.defineProperty(D,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>P.useSimpleFormIteratorItem}),Object.defineProperty(D,"useTranslate",{enumerable:!0,get:()=>P.useTranslate}),Object.defineProperty(D,"useTranslateLabel",{enumerable:!0,get:()=>P.useTranslateLabel}),Object.defineProperty(D,"useUnselect",{enumerable:!0,get:()=>P.useUnselect}),Object.defineProperty(D,"useUnselectAll",{enumerable:!0,get:()=>P.useUnselectAll}),Object.defineProperty(D,"useUpdateMany",{enumerable:!0,get:()=>P.useUpdateMany}),Object.defineProperty(D,"withLifecycleCallbacks",{enumerable:!0,get:()=>P.withLifecycleCallbacks}),D.ActionsField=bg,D.ActionsMenu=uo,D.ActivatePage=$b,D.Admin=bs,D.AnimateButton=Um,D.AppConfigContext=KA,D.AppConfigProvider=JA,D.ApplicaAdmin=Ap,D.ArrayInput=w3,D.AttachmentField=Qg,D.AttachmentInput=Pg,D.AutocompleteArrayInput=Og,D.AutocompleteInput=jg,D.Avatar=Aa,D.BooleanInput=Dg,D.Breadcrumbs=Cc,D.BulkActionsToolbar=qf,D.BulkFloatingActionsToolbar=Zb,D.CardForm=vc,D.ChangePasswordForm=Ug,D.CircularWithLabel=m0,D.CircularWithPath=B0,D.CoverField=Qc,D.Create=v3,D.CreateInDialogButton=Zf,D.Datagrid=jz,D.DateAgoField=xc,D.DateField=xg,D.DateInput=Mg,D.DateTimeInput=Rg,D.Dot=Ec,D.Drawer=Bb,D.DrawerHeader=ry,D.DrawerHeaderStyled=Of,D.DrawerToggle=jB,D.Edit=rR,D.EditInDialogButton=_f,D.EmailField=wg,D.Empty=Gb,D.FileField=Tg,D.FileInput=kg,D.Footer=Ca,D.FormHeader=Yg,D.FunctionField=P0,D.GenericErrorPage=nQ,D.Header=DB,D.HeaderButton=xP,D.HeaderIconButton=I3,D.HeaderNotification=MB,D.HeaderProfile=RB,D.HeaderSpacer=FB,D.HeaderToggleButton=ns,D.HorizontalBar=vb,D.IconButton=ts,D.ImageField=ga,D.ImageInput=Fg,D.ImpersonateUserButton=Hb,D.LabeledArrayInput=bc,D.LabeledInput=nt,D.Layout=Tb,D.LayoutContent=Xv,D.LayoutProvider=SB,D.LayoutWrapper=Zv,D.LinearWithIcon=v0,D.LinearWithLabel=y0,D.List=Jb,D.ListItem=np,D.Loadable=sz,D.Loader=kb,D.LoadingButton=vg,D.LocalStorage=gE,D.LocalizedTextField=D3,D.LocalizedTextInput=X3,D.LoginPage=pu,D.Logo=jf,D.LongForm=kt,D.MainCard=Gn,D.MainIcon=Yf,D.MenuConfigContext=ZA,D.MenuConfigProvider=_A,D.MenuPopover=Dl,D.MenuPropTypes=Wi,D.NavMenu=yb,D.Navigation=xb,D.Notification=Fb,D.NotificationList=Lz,D.NumberInput=Lg,D.OnboardingModes=Ma,D.OnboardingProvider=pz,D.OnboardingTip=mz,D.ReadonlyField=F3,D.RecordInput=D0,D.RecoverPage=eQ,D.ReferenceArrayInput=Ng,D.ReferenceInput=Vg,D.ReferenceManyField=rs,D.ReferenceManyInput=zg,D.RegisterPage=tQ,D.ResponsiveSection=kB,D.ScrollTop=Gf,D.ScrollX=az,D.SearchInput=q3,D.SelectArrayInput=Hg,D.SelectInput=R0,D.Show=mR,D.SimpleBar=Hf,D.SimpleForm=yc,D.SimpleFormIterator=BR,D.SizeField=j0,D.SmallIcon=Kf,D.SmartTextInput=Tc,D.TabbedForm=_g,D.TableFormIterator=X2,D.TableFormIteratorContext=qA,D.TableFormIteratorItemContext=$A,D.TextField=wc,D.TextInput=On,D.ThemeConfigContext=XA,D.ThemeConfigProvider=kl,D.ThemeProvider=mu,D.ThemeToggler=wb,D.TimeInput=Wg,D.Toolbar=gr,D.Tooltip=Bc,D.Transitions=vo,D.createI18nProvider=CQ,D.getLocalizedValue=rd,D.localizedValueHasAllLocales=nd,D.parseTime=KC,D.useAppConfig=Go,D.useBreadcrumbs=YC,D.useGetLocalizedValue=vP,D.useI18nLanguages=CW,D.useI18nProvider=EQ,D.useLayoutContext=nf,D.useLayoutDispatch=q2,D.useLayoutDrawerState=si,D.useLayoutLogoState=OB,D.useLayoutMediaState=Jn,D.useLayoutNotificationsState=Nc,D.useLayoutState=as,D.useLayoutThemeState=$2,D.useLocalStorage=Ul,D.useLocalizedValue=BP,D.useMemoizedObject=pE,D.useMenu=td,D.useMenuConfig=Ko,D.usePopoverState=Yl,D.useRefDimensions=bP,D.useResourceDefaultValues=B3,D.useResourceTitle=pd,D.useRestartOnboarding=Ez,D.useSx=dr,D.useTableFormIterator=hE,D.useTableFormIteratorItem=QP,D.useThemeConfig=hn,D.uuid=RS,D.withLayoutProvider=PB,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
285
285
  //# sourceMappingURL=react-admin.umd.js.map