@applica-software-guru/react-admin 1.1.92 → 1.1.93

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.
@@ -167,7 +167,7 @@ function print() { __p += __j.call(arguments, '') }
167
167
  `),wn.rippleVisible,fv,Hc,({theme:e})=>e.transitions.easing.easeInOut,wn.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,wn.child,wn.childLeaving,pv,Hc,({theme:e})=>e.transitions.easing.easeInOut,wn.childPulsate,hv,({theme:e})=>e.transitions.easing.easeInOut),kf=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:l}=r,A=_e(r,dv),[d,f]=K.useState([]),h=K.useRef(0),E=K.useRef(null);K.useEffect(()=>{E.current&&(E.current(),E.current=null)},[d]);const C=K.useRef(!1),I=K.useRef(0),B=K.useRef(null),Q=K.useRef(null);K.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]);const y=K.useCallback(S=>{const{pulsate:O,rippleX:V,rippleY:R,rippleSize:_,cb:Z}=S;f(Y=>[...Y,g.jsx(Ev,{classes:{ripple:at(a.ripple,wn.ripple),rippleVisible:at(a.rippleVisible,wn.rippleVisible),ripplePulsate:at(a.ripplePulsate,wn.ripplePulsate),child:at(a.child,wn.child),childLeaving:at(a.childLeaving,wn.childLeaving),childPulsate:at(a.childPulsate,wn.childPulsate)},timeout:Hc,pulsate:O,rippleX:V,rippleY:R,rippleSize:_},h.current)]),h.current+=1,E.current=Z},[a]),D=K.useCallback((S={},O={},V=()=>{})=>{const{pulsate:R=!1,center:_=i||O.pulsate,fakeElement:Z=!1}=O;if((S==null?void 0:S.type)==="mousedown"&&C.current){C.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(C.current=!0);const Y=Z?null:Q.current,re=Y?Y.getBoundingClientRect():{width:0,height:0,left:0,top:0};let de,pe,J;if(_||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)de=Math.round(re.width/2),pe=Math.round(re.height/2);else{const{clientX:X,clientY:U}=S.touches&&S.touches.length>0?S.touches[0]:S;de=Math.round(X-re.left),pe=Math.round(U-re.top)}if(_)J=Math.sqrt((2*re.width**2+re.height**2)/3),J%2===0&&(J+=1);else{const X=Math.max(Math.abs((Y?Y.clientWidth:0)-de),de)*2+2,U=Math.max(Math.abs((Y?Y.clientHeight:0)-pe),pe)*2+2;J=Math.sqrt(X**2+U**2)}S!=null&&S.touches?B.current===null&&(B.current=()=>{y({pulsate:R,rippleX:de,rippleY:pe,rippleSize:J,cb:V})},I.current=setTimeout(()=>{B.current&&(B.current(),B.current=null)},gv)):y({pulsate:R,rippleX:de,rippleY:pe,rippleSize:J,cb:V})},[i,y]),k=K.useCallback(()=>{D({},{pulsate:!0})},[D]),T=K.useCallback((S,O)=>{if(clearTimeout(I.current),(S==null?void 0:S.type)==="touchend"&&B.current){B.current(),B.current=null,I.current=setTimeout(()=>{T(S,O)});return}B.current=null,f(V=>V.length>0?V.slice(1):V),E.current=O},[]);return K.useImperativeHandle(n,()=>({pulsate:k,start:D,stop:T}),[k,D,T]),g.jsx(Cv,q({className:at(wn.root,a.root,l),ref:Q},A,{children:g.jsx(uv,{component:null,exit:!0,children:d})}))});process.env.NODE_ENV!=="production"&&(kf.propTypes={center:c.bool,classes:c.object,className:c.string});const Iv=kf;function Bv(e){return Rt("MuiButtonBase",e)}const Qv=zt("MuiButtonBase",["root","disabled","focusVisible"]),mv=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],yv=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,l=An({root:["root",t&&"disabled",n&&"focusVisible"]},Bv,i);return n&&r&&(l.root+=` ${r}`),l},bv=le("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Qv.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ff=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:l,className:A,component:d="button",disabled:f=!1,disableRipple:h=!1,disableTouchRipple:E=!1,focusRipple:C=!1,LinkComponent:I="a",onBlur:B,onClick:Q,onContextMenu:y,onDragLeave:D,onFocus:k,onFocusVisible:T,onKeyDown:S,onKeyUp:O,onMouseDown:V,onMouseLeave:R,onMouseUp:_,onTouchEnd:Z,onTouchMove:Y,onTouchStart:re,tabIndex:de=0,TouchRippleProps:pe,touchRippleRef:J,type:X}=r,U=_e(r,mv),$=K.useRef(null),z=K.useRef(null),oe=eo(z,J),{isFocusVisibleRef:W,onFocus:H,onBlur:se,ref:fe}=zm(),[ce,ge]=K.useState(!1);f&&ce&&ge(!1),K.useImperativeHandle(i,()=>({focusVisible:()=>{ge(!0),$.current.focus()}}),[]);const[he,Qe]=K.useState(!1);K.useEffect(()=>{Qe(!0)},[]);const ye=he&&!h&&!f;K.useEffect(()=>{ce&&C&&!h&&he&&z.current.pulsate()},[h,C,ce,he]);function Ie(ve,jt,We=E){return To(xe=>(jt&&jt(xe),!We&&z.current&&z.current[ve](xe),!0))}const Be=Ie("start",V),Fe=Ie("stop",y),ae=Ie("stop",D),Ge=Ie("stop",_),Ae=Ie("stop",ve=>{ce&&ve.preventDefault(),R&&R(ve)}),qt=Ie("start",re),Mn=Ie("stop",Z),Tt=Ie("stop",Y),Ur=Ie("stop",ve=>{se(ve),W.current===!1&&ge(!1),B&&B(ve)},!1),us=To(ve=>{$.current||($.current=ve.currentTarget),H(ve),W.current===!0&&(ge(!0),T&&T(ve)),k&&k(ve)}),Dn=()=>{const ve=$.current;return d&&d!=="button"&&!(ve.tagName==="A"&&ve.href)},Lt=K.useRef(!1),Pt=To(ve=>{C&&!Lt.current&&ce&&z.current&&ve.key===" "&&(Lt.current=!0,z.current.stop(ve,()=>{z.current.start(ve)})),ve.target===ve.currentTarget&&Dn()&&ve.key===" "&&ve.preventDefault(),S&&S(ve),ve.target===ve.currentTarget&&Dn()&&ve.key==="Enter"&&!f&&(ve.preventDefault(),Q&&Q(ve))}),Cn=To(ve=>{C&&ve.key===" "&&z.current&&ce&&!ve.defaultPrevented&&(Lt.current=!1,z.current.stop(ve,()=>{z.current.pulsate(ve)})),O&&O(ve),Q&&ve.target===ve.currentTarget&&Dn()&&ve.key===" "&&!ve.defaultPrevented&&Q(ve)});let Gn=d;Gn==="button"&&(U.href||U.to)&&(Gn=I);const De={};Gn==="button"?(De.type=X===void 0?"button":X,De.disabled=f):(!U.href&&!U.to&&(De.role="button"),f&&(De["aria-disabled"]=f));const qe=eo(n,fe,$);process.env.NODE_ENV!=="production"&&K.useEffect(()=>{ye&&!z.current&&console.error(["MUI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join(`
168
168
  `))},[ye]);const we=q({},r,{centerRipple:a,component:d,disabled:f,disableRipple:h,disableTouchRipple:E,focusRipple:C,tabIndex:de,focusVisible:ce}),Ye=yv(we);return g.jsxs(bv,q({as:Gn,className:at(Ye.root,A),ownerState:we,onBlur:Ur,onClick:Q,onContextMenu:Fe,onFocus:us,onKeyDown:Pt,onKeyUp:Cn,onMouseDown:Be,onMouseLeave:Ae,onMouseUp:Ge,onDragLeave:ae,onTouchEnd:Mn,onTouchMove:Tt,onTouchStart:qt,ref:qe,tabIndex:f?-1:de,type:X},De,U,{children:[l,ye?g.jsx(Iv,q({ref:oe,center:a},pe)):null]}))});process.env.NODE_ENV!=="production"&&(Ff.propTypes={action:Mm,centerRipple:c.bool,children:c.node,classes:c.object,className:c.string,component:vm,disabled:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,href:c.any,LinkComponent:c.elementType,onBlur:c.func,onClick:c.func,onContextMenu:c.func,onDragLeave:c.func,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onKeyUp:c.func,onMouseDown:c.func,onMouseLeave:c.func,onMouseUp:c.func,onTouchEnd:c.func,onTouchMove:c.func,onTouchStart:c.func,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string])});const zc=Ff,vv=["slots","slotProps"],xv=le(zc)(({theme:e})=>q({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":q({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":q({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:Xg(e.palette.grey[200],.12)}:{backgroundColor:Xg(e.palette.grey[600],.12)})})),wv=le(nv)({width:24,height:16});function Lf(e){const{slots:t={},slotProps:n={}}=e,r=_e(e,vv),i=e;return g.jsx("li",{children:g.jsx(xv,q({focusRipple:!0},r,{ownerState:i,children:g.jsx(wv,q({as:t.CollapsedIcon,ownerState:i},n.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(Lf.propTypes={slotProps:c.shape({collapsedIcon:c.oneOfType([c.func,c.object])}),slots:c.shape({CollapsedIcon:c.elementType}),sx:c.object});function Tv(e){return Rt("MuiBreadcrumbs",e)}const Pv=zt("MuiBreadcrumbs",["root","ol","li","separator"]),Sv=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Ov=e=>{const{classes:t}=e,n={root:["root"],li:["li"],ol:["ol"],separator:["separator"]};return bi.unstable_composeClasses(n,Tv,t)},Mv=le(Xb,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${Pv.li}`]:t.li},t.root]})({}),Dv=le("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),kv=le("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Fv(e,t,n,r){return e.reduce((i,a,l)=>(l<e.length-1?i=i.concat(a,g.jsx(kv,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${l}`)):i.push(a),i),[])}const Nf=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiBreadcrumbs"}),{children:i,className:a,component:l="nav",slots:A={},slotProps:d={},expandText:f="Show path",itemsAfterCollapse:h=1,itemsBeforeCollapse:E=1,maxItems:C=8,separator:I="/"}=r,B=_e(r,Sv),[Q,y]=K.useState(!1),D=q({},r,{component:l,expanded:Q,expandText:f,itemsAfterCollapse:h,itemsBeforeCollapse:E,maxItems:C,separator:I}),k=Ov(D),T=bi.useSlotProps({elementType:A.CollapsedIcon,externalSlotProps:d.collapsedIcon,ownerState:D}),S=K.useRef(null),O=R=>{const _=()=>{y(!0);const Z=S.current.querySelector("a[href],button,[tabindex]");Z&&Z.focus()};return E+h>=R.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${h}} + itemsBeforeCollapse={${E}} >= maxItems={${C}}`].join(`
169
169
  `)),R):[...R.slice(0,E),g.jsx(Lf,{"aria-label":f,slots:{CollapsedIcon:A.CollapsedIcon},slotProps:{collapsedIcon:T},onClick:_},"ellipsis"),...R.slice(R.length-h,R.length)]},V=K.Children.toArray(i).filter(R=>(process.env.NODE_ENV!=="production"&&lc.isFragment(R)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
170
- `)),K.isValidElement(R))).map((R,_)=>g.jsx("li",{className:k.li,children:R},`child-${_}`));return g.jsx(Mv,q({ref:n,component:l,color:"text.secondary",className:at(k.root,a),ownerState:D},B,{children:g.jsx(Dv,{className:k.ol,ref:S,ownerState:D,children:Fv(Q||C&&V.length<=C?V:O(V),k.separator,I,D)})}))});process.env.NODE_ENV!=="production"&&(Nf.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,expandText:c.string,itemsAfterCollapse:wi,itemsBeforeCollapse:wi,maxItems:wi,separator:c.node,slotProps:c.shape({collapsedIcon:c.oneOfType([c.func,c.object])}),slots:c.shape({CollapsedIcon:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const Wc=Nf,Lv=({id:e,title:t,icon:n,url:r,last:i})=>{const a=n||Ze.ApartmentOutlined;return g.jsxs(b.Typography,{component:ut.Link,to:r,variant:i?"subtitle1":"h6",sx:{textDecoration:"none",display:"inline-flex",alignItems:"center"},color:"textSecondary",children:[n&&g.jsx(a,{style:{marginRight:8,fontSize:"0.875rem"}}),t]},e)},ea=({home:e,card:t,divider:n=!0,icon:r,icons:i,maxItems:a,navigation:l,rightAlign:A,separator:d,title:f,titleBottom:h,sx:E,breadcrumbs:C,mode:I,...B})=>{const Q=lt(),y=ut.useLocation(),[D,k]=P.useState(),[T,S]=P.useState();let O=y.pathname;const V={marginRight:Q.spacing(.75),marginTop:`-${Q.spacing(.25)}`,width:"1rem",height:"1rem",color:Q.palette.secondary.main},R=$=>{$.children&&$.children.filter(z=>(z.type&&z.type==="collapse"?(R(z),z.url===O&&(k(z),S(z))):z.type&&z.type==="item"&&O.includes(z.url)&&(k($),S(z)),!1))};P.useEffect(()=>{var $;($=l==null?void 0:l.items)==null||$.map(z=>(z.type&&z.type==="group"&&R(z),!1))});const _=d,Z=d?g.jsx(_,{style:{fontSize:"0.75rem",marginTop:2}}):"/",Y={mb:2,bgcolor:t===!1?"transparent":"inherit",...E,[Q.breakpoints.down("sm")]:{mb:1}};let re,de,pe=g.jsx(b.Typography,{}),J="",X,U;return I==="breadcrumbs"?g.jsxs(xn,{border:t,sx:Y,...B,content:t,shadow:"none",children:[g.jsxs(b.Grid,{container:!0,direction:A?"row":"column",justifyContent:A?"space-between":"flex-start",alignItems:A?"center":"flex-start",spacing:1,children:[f&&!h&&g.jsx(b.Grid,{item:!0,children:g.jsx(b.Typography,{variant:"h2",children:T.title})}),g.jsx(b.Grid,{item:!0,children:g.jsxs(Wc,{"aria-label":"breadcrumb",maxItems:a||8,separator:Z,sx:{[Q.breakpoints.down("sm")]:{mt:1}},children:[e!==!1&&g.jsxs(b.Typography,{component:ut.Link,to:"/",color:"textSecondary",variant:"h6",sx:{textDecoration:"none"},children:[i&&g.jsx(Ze.HomeOutlined,{style:V}),r&&!i&&g.jsx(Ze.HomeFilled,{style:{...V,marginRight:0}}),(!r||i)&&e]}),C.map(Lv)]})}),f&&h&&g.jsx(b.Grid,{item:!0,sx:{mt:t===!1?.25:1},children:g.jsx(b.Typography,{variant:"h2",children:T.title})})]}),t===!1&&n!==!1&&g.jsx(b.Divider,{sx:{mt:2}})]}):(D&&D.type==="collapse"&&D.breadcrumbs===!0&&(X=D.icon?D.icon:Ze.ApartmentOutlined,re=g.jsxs(b.Typography,{component:ut.Link,to:(T==null?void 0:T.url)||document.location.pathname,variant:"h6",sx:{textDecoration:"none"},color:"textSecondary",children:[i&&g.jsx(X,{style:V}),D.title]}),pe=g.jsxs(xn,{border:t,sx:Y,...B,content:t,shadow:"none",children:[g.jsxs(b.Grid,{container:!0,direction:A?"row":"column",justifyContent:A?"space-between":"flex-start",alignItems:A?"center":"flex-start",spacing:1,children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(Wc,{"aria-label":"breadcrumb",maxItems:a||8,separator:Z,children:[e!==!1&&g.jsxs(b.Typography,{component:ut.Link,to:"/",color:"textSecondary",variant:"h6",sx:{textDecoration:"none"},children:[i&&g.jsx(Ze.HomeOutlined,{style:V}),r&&!i&&g.jsx(Ze.HomeFilled,{style:{...V,marginRight:0}}),(!r||i)&&e]}),re]})}),f&&h&&g.jsx(b.Grid,{item:!0,sx:{mt:t===!1?.25:1},children:g.jsx(b.Typography,{variant:"h2",children:D.title})})]}),t===!1&&n!==!1&&g.jsx(b.Divider,{sx:{mt:2}})]})),T&&T.type==="item"&&(J=T.title,U=T.icon?T.icon:Ze.ApartmentOutlined,de=g.jsxs(b.Typography,{variant:"subtitle1",color:"textPrimary",component:ut.Link,to:T.url,sx:{textDecoration:"none"},children:[i&&g.jsx(U,{style:V}),J]}),T.breadcrumbs!==!1&&(pe=g.jsxs(xn,{border:t,sx:{mb:3,bgcolor:t===!1?"transparent":"inherit",...E,[Q.breakpoints.down("sm")]:{mb:1}},...B,content:t,shadow:"none",children:[g.jsxs(b.Grid,{container:!0,direction:A?"row":"column",justifyContent:A?"space-between":"flex-start",alignItems:A?"center":"flex-start",spacing:1,children:[f&&!h&&g.jsx(b.Grid,{item:!0,children:g.jsx(b.Typography,{variant:"h2",children:T.title})}),g.jsx(b.Grid,{item:!0,children:g.jsxs(Wc,{"aria-label":"breadcrumb",maxItems:a||8,separator:Z,children:[e!==!1&&g.jsxs(b.Typography,{component:ut.Link,to:"/",color:"textSecondary",variant:"h6",sx:{textDecoration:"none"},children:[i&&g.jsx(Ze.HomeOutlined,{style:V}),r&&!i&&g.jsx(Ze.HomeFilled,{style:{...V,marginRight:0}}),(!r||i)&&e]}),re,de]})}),f&&h&&g.jsx(b.Grid,{item:!0,sx:{mt:t===!1?.25:1},children:g.jsx(b.Typography,{variant:"h2",children:T.title})})]}),t===!1&&n!==!1&&g.jsx(b.Divider,{sx:{mt:2}})]}))),pe)};ea.defaultProps={home:"Home",mode:"navigation"},ea.propTypes={home:c.oneOfType([c.string,c.bool]),card:c.bool,divider:c.bool,icon:c.bool,icons:c.bool,maxItems:c.number,navigation:c.object,rightAlign:c.bool,separator:c.oneOfType([c.func,c.object]),title:c.bool,titleBottom:c.bool,sx:c.oneOfType([c.object,c.string]),breadcrumbs:c.arrayOf(No),mode:c.oneOf(["navigation","breadcrumbs"])};const Nv=So(w.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),ar=e=>g.jsx(Nv,{...e});ar.defaultProps={...w.Toolbar.defaultProps},ar.propTypes={...w.Toolbar.propTypes};const Uc=({children:e,content:t,title:n,subheader:r,secondary:i,toolbar:a,...l})=>{const A=w.useTranslate(),d=w.useResourceContext(),{cardTitle:f,cardSubheader:h}=P.useMemo(()=>{const E=n||`resources.${d}.title`;return{cardTitle:A(E,{_:E}),cardSubheader:r!==null?A(r,{_:r}):null}},[d,r,n,A]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(xn,{content:t,title:f,subheader:h,secondary:i,divider:!0,children:g.jsxs(P.Fragment,{children:[e,a===!0?g.jsx(ar,{children:g.jsx(w.SaveButton,{})}):a]})})})};Uc.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},Uc.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const Rv=le(w.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),ta=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:i}=Dt();return g.jsx(Rv,{defaultValues:n,spacing:t||i,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||i,children:e})})};ta.propTypes={...b.Grid.propTypes,...w.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},ta.defaultProps={...b.Stack.defaultProps},ta.Section=Uc;const jv=So(w.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),na=({title:e,modal:t,content:n,subheader:r,secondary:i,sx:a,...l})=>{const A=Bf(e),d=w.useRecordContext();return g.jsx(xn,{content:n,title:A,subheader:r,secondary:d!=null&&d.id?i:null,sx:a,border:!t,divider:!0,children:g.jsx(jv,{toolbar:g.jsx(ar,{}),...l})})};na.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(ar,{children:g.jsx(w.SaveButton,{type:"button"})}),secondary:g.jsx(Lo,{children:g.jsx(w.DeleteWithConfirmButton,{})})},na.propTypes={...w.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const ra=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...A})=>{const d=Mt.useTheme(),{getCurrentDialog:f}=no(),{source:h,resource:E,isRequired:C}=A,{getFieldState:I,formState:B}=Ts.useFormContext(),{error:Q}=I(h,B),y=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:Q?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:!!Q,sx:{borderBottom:l?`1px solid ${d.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(w.FieldTitle,{label:e,source:h,resource:y||E,isRequired:C})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...A,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!Q,children:r})]})};ra.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},ra.defaultProps={display:"label",divider:!1};const Vv=le(w.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),Hv=({label:e,addLabel:t,source:n,helperText:r,divider:i=!0,...a})=>g.jsx(ra,{label:e,addLabel:t,source:n,helperText:r,divider:i,children:g.jsx(Vv,{source:n,label:!1,...a})}),Gc=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(Lo,{children:[e&&g.jsx(w.EditButton,{}),t&&g.jsx(w.DeleteWithConfirmButton,{}),n&&g.jsx(w.CloneButton,{})]});Gc.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},Gc.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Rf=le("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),zv=le("ul")({display:"inline-block"}),jf=e=>{var h;const{className:t,emptyText:n,source:r,title:i,...a}=e,l=Pe.useRecordContext(e),A=ot.get(l,r),d=Pe.useTranslate();if(!A)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...a,children:n&&d(n,{_:n})}):g.jsx(Rf,{className:t,...a});if(Array.isArray(A))return g.jsx(zv,{className:t,...a,children:A.map((E,C)=>{var B;const I=i instanceof String?(B=ot.get(E,i))==null?void 0:B.toString():i;return g.jsx("li",{children:I},C)})});const f=i instanceof String?(h=ot.get(l,i))==null?void 0:h.toString():i;return g.jsx(Rf,{className:t,...a,children:f})};jf.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var Vf={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vn,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",l="second",A="minute",d="hour",f="day",h="week",E="month",C="quarter",I="year",B="date",Q="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(J){var X=["th","st","nd","rd"],U=J%100;return"["+J+(X[(U-20)%10]||X[U]||X[0])+"]"}},T=function(J,X,U){var $=String(J);return!$||$.length>=X?J:""+Array(X+1-$.length).join(U)+J},S={s:T,z:function(J){var X=-J.utcOffset(),U=Math.abs(X),$=Math.floor(U/60),z=U%60;return(X<=0?"+":"-")+T($,2,"0")+":"+T(z,2,"0")},m:function J(X,U){if(X.date()<U.date())return-J(U,X);var $=12*(U.year()-X.year())+(U.month()-X.month()),z=X.clone().add($,E),oe=U-z<0,W=X.clone().add($+(oe?-1:1),E);return+(-($+(U-z)/(oe?z-W:W-z))||0)},a:function(J){return J<0?Math.ceil(J)||0:Math.floor(J)},p:function(J){return{M:E,y:I,w:h,d:f,D:B,h:d,m:A,s:l,ms:a,Q:C}[J]||String(J||"").toLowerCase().replace(/s$/,"")},u:function(J){return J===void 0}},O="en",V={};V[O]=k;var R="$isDayjsObject",_=function(J){return J instanceof de||!(!J||!J[R])},Z=function J(X,U,$){var z;if(!X)return O;if(typeof X=="string"){var oe=X.toLowerCase();V[oe]&&(z=oe),U&&(V[oe]=U,z=oe);var W=X.split("-");if(!z&&W.length>1)return J(W[0])}else{var H=X.name;V[H]=X,z=H}return!$&&z&&(O=z),z||!$&&O},Y=function(J,X){if(_(J))return J.clone();var U=typeof X=="object"?X:{};return U.date=J,U.args=arguments,new de(U)},re=S;re.l=Z,re.i=_,re.w=function(J,X){return Y(J,{locale:X.$L,utc:X.$u,x:X.$x,$offset:X.$offset})};var de=function(){function J(U){this.$L=Z(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[R]=!0}var X=J.prototype;return X.parse=function(U){this.$d=function($){var z=$.date,oe=$.utc;if(z===null)return new Date(NaN);if(re.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var W=z.match(y);if(W){var H=W[2]-1||0,se=(W[7]||"0").substring(0,3);return oe?new Date(Date.UTC(W[1],H,W[3]||1,W[4]||0,W[5]||0,W[6]||0,se)):new Date(W[1],H,W[3]||1,W[4]||0,W[5]||0,W[6]||0,se)}}return new Date(z)}(U),this.init()},X.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},X.$utils=function(){return re},X.isValid=function(){return this.$d.toString()!==Q},X.isSame=function(U,$){var z=Y(U);return this.startOf($)<=z&&z<=this.endOf($)},X.isAfter=function(U,$){return Y(U)<this.startOf($)},X.isBefore=function(U,$){return this.endOf($)<Y(U)},X.$g=function(U,$,z){return re.u(U)?this[$]:this.set(z,U)},X.unix=function(){return Math.floor(this.valueOf()/1e3)},X.valueOf=function(){return this.$d.getTime()},X.startOf=function(U,$){var z=this,oe=!!re.u($)||$,W=re.p(U),H=function(Ie,Be){var Fe=re.w(z.$u?Date.UTC(z.$y,Be,Ie):new Date(z.$y,Be,Ie),z);return oe?Fe:Fe.endOf(f)},se=function(Ie,Be){return re.w(z.toDate()[Ie].apply(z.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(Be)),z)},fe=this.$W,ce=this.$M,ge=this.$D,he="set"+(this.$u?"UTC":"");switch(W){case I:return oe?H(1,0):H(31,11);case E:return oe?H(1,ce):H(0,ce+1);case h:var Qe=this.$locale().weekStart||0,ye=(fe<Qe?fe+7:fe)-Qe;return H(oe?ge-ye:ge+(6-ye),ce);case f:case B:return se(he+"Hours",0);case d:return se(he+"Minutes",1);case A:return se(he+"Seconds",2);case l:return se(he+"Milliseconds",3);default:return this.clone()}},X.endOf=function(U){return this.startOf(U,!1)},X.$set=function(U,$){var z,oe=re.p(U),W="set"+(this.$u?"UTC":""),H=(z={},z[f]=W+"Date",z[B]=W+"Date",z[E]=W+"Month",z[I]=W+"FullYear",z[d]=W+"Hours",z[A]=W+"Minutes",z[l]=W+"Seconds",z[a]=W+"Milliseconds",z)[oe],se=oe===f?this.$D+($-this.$W):$;if(oe===E||oe===I){var fe=this.clone().set(B,1);fe.$d[H](se),fe.init(),this.$d=fe.set(B,Math.min(this.$D,fe.daysInMonth())).$d}else H&&this.$d[H](se);return this.init(),this},X.set=function(U,$){return this.clone().$set(U,$)},X.get=function(U){return this[re.p(U)]()},X.add=function(U,$){var z,oe=this;U=Number(U);var W=re.p($),H=function(ce){var ge=Y(oe);return re.w(ge.date(ge.date()+Math.round(ce*U)),oe)};if(W===E)return this.set(E,this.$M+U);if(W===I)return this.set(I,this.$y+U);if(W===f)return H(1);if(W===h)return H(7);var se=(z={},z[A]=r,z[d]=i,z[l]=n,z)[W]||1,fe=this.$d.getTime()+U*se;return re.w(fe,this)},X.subtract=function(U,$){return this.add(-1*U,$)},X.format=function(U){var $=this,z=this.$locale();if(!this.isValid())return z.invalidDate||Q;var oe=U||"YYYY-MM-DDTHH:mm:ssZ",W=re.z(this),H=this.$H,se=this.$m,fe=this.$M,ce=z.weekdays,ge=z.months,he=z.meridiem,Qe=function(Be,Fe,ae,Ge){return Be&&(Be[Fe]||Be($,oe))||ae[Fe].slice(0,Ge)},ye=function(Be){return re.s(H%12||12,Be,"0")},Ie=he||function(Be,Fe,ae){var Ge=Be<12?"AM":"PM";return ae?Ge.toLowerCase():Ge};return oe.replace(D,function(Be,Fe){return Fe||function(ae){switch(ae){case"YY":return String($.$y).slice(-2);case"YYYY":return re.s($.$y,4,"0");case"M":return fe+1;case"MM":return re.s(fe+1,2,"0");case"MMM":return Qe(z.monthsShort,fe,ge,3);case"MMMM":return Qe(ge,fe);case"D":return $.$D;case"DD":return re.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Qe(z.weekdaysMin,$.$W,ce,2);case"ddd":return Qe(z.weekdaysShort,$.$W,ce,3);case"dddd":return ce[$.$W];case"H":return String(H);case"HH":return re.s(H,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return Ie(H,se,!0);case"A":return Ie(H,se,!1);case"m":return String(se);case"mm":return re.s(se,2,"0");case"s":return String($.$s);case"ss":return re.s($.$s,2,"0");case"SSS":return re.s($.$ms,3,"0");case"Z":return W}return null}(Be)||W.replace(":","")})},X.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},X.diff=function(U,$,z){var oe,W=this,H=re.p($),se=Y(U),fe=(se.utcOffset()-this.utcOffset())*r,ce=this-se,ge=function(){return re.m(W,se)};switch(H){case I:oe=ge()/12;break;case E:oe=ge();break;case C:oe=ge()/3;break;case h:oe=(ce-fe)/6048e5;break;case f:oe=(ce-fe)/864e5;break;case d:oe=ce/i;break;case A:oe=ce/r;break;case l:oe=ce/n;break;default:oe=ce}return z?oe:re.a(oe)},X.daysInMonth=function(){return this.endOf(E).$D},X.$locale=function(){return V[this.$L]},X.locale=function(U,$){if(!U)return this.$L;var z=this.clone(),oe=Z(U,$,!0);return oe&&(z.$L=oe),z},X.clone=function(){return re.w(this.$d,this)},X.toDate=function(){return new Date(this.valueOf())},X.toJSON=function(){return this.isValid()?this.toISOString():null},X.toISOString=function(){return this.$d.toISOString()},X.toString=function(){return this.$d.toUTCString()},J}(),pe=de.prototype;return Y.prototype=pe,[["$ms",a],["$s",l],["$m",A],["$H",d],["$W",f],["$M",E],["$y",I],["$D",B]].forEach(function(J){pe[J[1]]=function(X){return this.$g(X,J[0],J[1])}}),Y.extend=function(J,X){return J.$i||(J(X,de,Y),J.$i=!0),Y},Y.locale=Z,Y.isDayjs=_,Y.unix=function(J){return Y(1e3*J)},Y.en=V[O],Y.Ls=V,Y.p={},Y})})(Vf);var Wv=Vf.exports;const lr=xo(Wv),Yc=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...i})=>{const[a,l]=P.useState(null),A=w.useRecordContext(i),d=w.useDataProvider(),f=w.useResourceContext(),h=P.useCallback(async I=>{I.preventDefault(),I.stopPropagation();const B=ot.get(A,i==null?void 0:i.source),Q=f.replace("entities/",""),y=await d.getFile(`/attachments/${Q}/${e||(A==null?void 0:A.id)}/${t||(i==null?void 0:i.source)}/${(B==null?void 0:B.id)||(A==null?void 0:A.id)}`),D=document.createElement("a");D.href=y,D.download=ot.get(A,(i==null?void 0:i.title)||(i==null?void 0:i.source)),D.click()},[d,A,e,f,t,i==null?void 0:i.source,i==null?void 0:i.title]),E=P.useMemo(()=>({...A,[i==null?void 0:i.source]:(A==null?void 0:A.src)||ot.get(A,i==null?void 0:i.source),[i==null?void 0:i.title]:(A==null?void 0:A.title)||ot.get(A,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),[A,i==null?void 0:i.source,i==null?void 0:i.title]),C=w.useTranslate();return P.useEffect(()=>{!A||!(A!=null&&A.userId)||d.getOne(r,{id:A==null?void 0:A.userId}).then(({data:I})=>l(I)).catch(()=>l(null))},[A,d,r]),g.jsx(jf,{...i,disabled:n,record:E,onClick:h,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:ot.get(E,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[ot.get(E,"sizeDescription"),a&&" | ",a&&C("ra.attachment.info",{user:a==null?void 0:a.name,created:lr(E==null?void 0:E.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Yc.propTypes={...w.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const Uv=le(w.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Ni=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(Uv,{...e,source:t})};Ni.propTypes={...w.ImageField.propTypes,source:c.string};const oa=({width:e,height:t,circle:n,justify:r,record:i,...a})=>{const l=P.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),A=w.useRecordContext(),d=i||A;return g.jsx(Ni,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:d})};oa.defaultProps={...Ni.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},oa.propTypes={...Ni.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var Hf={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vn,function(){return function(n,r,i){n=n||{};var a=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function A(f,h,E,C){return a.fromToBase(f,h,E,C)}i.en.relativeTime=l,a.fromToBase=function(f,h,E,C,I){for(var B,Q,y,D=E.$locale().relativeTime||l,k=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=k.length,S=0;S<T;S+=1){var O=k[S];O.d&&(B=C?i(f).diff(E,O.d,!0):E.diff(f,O.d,!0));var V=(n.rounding||Math.round)(Math.abs(B));if(y=B>0,V<=O.r||!O.r){V<=1&&S>0&&(O=k[S-1]);var R=D[O.l];I&&(V=I(""+V)),Q=typeof R=="string"?R.replace("%d",V):R(V,h,O.l,y);break}}if(h)return Q;var _=y?D.future:D.past;return typeof _=="function"?_(Q):_.replace("%s",Q)},a.to=function(f,h){return A(f,h,this,!0)},a.from=function(f,h){return A(f,h,this)};var d=function(f){return f.$u?i.utc():i()};a.toNow=function(f){return this.to(d(this),f)},a.fromNow=function(f){return this.from(d(this),f)}}})})(Hf);var Gv=Hf.exports;const Yv=xo(Gv);lr.extend(Yv);const ia=e=>{const t=w.useRecordContext(e),[n]=w.useLocaleState(),r=P.useMemo(()=>lr(ot.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(P.Fragment,{children:[g.jsx(w.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};ia.displayName="DateAgoField",ia.propTypes={source:c.string.isRequired};const zf=le(w.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));zf.propTypes={...w.DateField.propTypes};const Kc=e=>g.jsx(zf,{...e});Kc.defaultProps={...w.DateField.defaultProps,variant:"body1"},Kc.propTypes={...w.DateField.propTypes};const Wf=le(w.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Wf.propTypes={...w.EmailField.propTypes};const qc=e=>g.jsx(Wf,{...e});qc.defaultProps={...w.EmailField.defaultProps,variant:"body1"},qc.propTypes={...w.EmailField.propTypes};const Kv=le(w.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),_c=({...e})=>{const t=w.useRecordContext(e),n=P.useCallback(r=>{r.preventDefault(),r.stopPropagation();const i=ot.get(t,`_${e==null?void 0:e.source}`,ot.get(t,e==null?void 0:e.source)),a=ot.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=i,l.download=a,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(Kv,{...e,record:t,onClick:n})};_c.propTypes={...w.FileField.propTypes,source:c.string,title:c.string};const Uf=e=>g.jsx(w.FunctionField,{...e});Uf.defaultProps={variant:"body1"};const qv=le("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),Jc=({source:e,defaultValue:t,...n})=>{const r=w.useRecordContext(n),i=ot.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:i&&i!==null?i:t}})};Jc.propTypes={defaultValue:c.any,source:c.string,record:c.object},Jc.defaultProps={defaultValue:"&nbsp;"};const Gf=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Gf.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Xc=({label:e,source:t,defaultValue:n,children:r,tooltip:i,...a})=>{const{getCurrentDialog:l}=no(),A=w.useRecordContext(a),d=w.useResourceContext(a),f=l(),h=P.useMemo(()=>!i||i===!1?!1:typeof i=="function"?i(A):typeof i=="string"?ot.get(A,i,i):i,[A,i]);return g.jsx(Gf,{title:h,children:g.jsxs(P.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(w.FieldTitle,{label:e,source:t,resource:f||d})}),g.jsx(qv,{...a,children:P.cloneElement(r,{source:t,record:A,defaultValue:n,resource:f||d})})]})})};Xc.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},Xc.defaultProps={defaultValue:"&nbsp;",children:g.jsx(Jc,{})};const _v=So("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2.5),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),Vo=e=>g.jsx(_v,{children:g.jsx(w.ReferenceManyField,{...e})});Vo.defaultProps={...w.ReferenceManyField.defaultProps,margin:!1,border:!1},Vo.propTypes={...w.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Yf=({source:e,...t})=>{const n=w.useRecordContext(t),r=ot.get(n,e,0),i=r/1024,a=i/1024,l=a/1024,A=l>1?`${l.toFixed(2)} GB`:a>1?`${a.toFixed(2)} MB`:i>1?`${i.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:A})};Yf.propTypes={record:c.object,source:c.string};const Kf=le(w.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));Kf.propTypes={...w.TextField.propTypes};const Zc=e=>g.jsx(Kf,{...e});Zc.defaultProps={...w.TextField.defaultProps,variant:"body1"},Zc.propTypes={...w.TextField.propTypes};const it=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...A})=>{const d=Mt.useTheme(),{getCurrentDialog:f}=no(),{source:h,resource:E,isRequired:C}=A,{fieldState:{invalid:I}}=w.useInput(A),B=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:A!=null&&A.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:I?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:I===!0,sx:{borderBottom:l?`1px solid ${d.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(w.FieldTitle,{label:e,source:h,resource:B||E,isRequired:C})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...A,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:I===!0,children:r})]})};it.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},it.defaultProps={display:"label",divider:!1};const Jv=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},Xv=le(w.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...Jv(e)})),$c=({children:e,disabled:t,type:n,...r})=>{const i=w.useRecordContext(r),a=r==null?void 0:r.source,l=i==null?void 0:i.id;return w.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(it,{...r,children:g.jsx(Xv,{disabled:t,children:P.cloneElement(e,{...e.props,entityId:l,property:a})})})};$c.propTypes={...w.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},$c.defaultProps={children:g.jsx(Yc,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const Zv=le(w.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}})),qf=({...e})=>g.jsx(it,{...e,children:g.jsx(Zv,{})});qf.propTypes={...w.AutocompleteArrayInput.propTypes,...it.propTypes};const $v=le(w.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),_f=e=>{const{perPage:t,...n}=e;return g.jsx(it,{...n,children:g.jsx($v,{})})};_f.propTypes={...w.AutocompleteInput.propTypes,...it.propTypes};const e1=le(w.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),eA=({horizontal:e,...t})=>{const n=lt();return g.jsx(it,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(e1,{})})};eA.defaultProps={...w.BooleanInput.defaultProps,...it.defaultProps},eA.propTypes={...w.BooleanInput.propTypes,...it.propTypes,horizontal:c.bool};const t1=le(w.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),tA=e=>g.jsx(it,{...e,children:g.jsx(t1,{})});tA.propTypes={...w.DateInput.propTypes,...it.propTypes},tA.defaultProps={...w.DateInput.defaultProps,...it.defaultProps};const n1=le(w.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),nA=e=>g.jsx(it,{...e,children:g.jsx(n1,{})});nA.propTypes={...w.DateTimeInput.propTypes,...it.propTypes},nA.defaultProps={...it.defaultProps};const r1=le(w.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),rA=({children:e,title:t,...n})=>{const r=Ts.useWatch({name:n.source}),i=w.useRecordContext(n),{source:a}=n,l=P.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const A=ot.get(i,a);if(A){const d=A.split("__");return d.length>0?d[d.length-1]:A}return A},[i,a,r]);return g.jsx(it,{...n,children:g.jsx(r1,{children:P.cloneElement(e,{...e.props,title:t||a,source:a,record:{...i,[a]:(r==null?void 0:r.title)||ot.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||ot.get(i,`_${a}`),[t||a]:l}})})})};rA.propTypes={...w.FileInput.propTypes,source:c.string,title:c.string,children:c.node},rA.defaultProps={children:g.jsx(_c,{})};const oA=({children:e,title:t,...n})=>{const r=Ts.useWatch({name:n.source}),i=w.useRecordContext(n),{source:a}=n;return w.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(it,{...n,children:g.jsx(w.ImageInput,{accept:"image/*",children:P.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(r==null?void 0:r.title)||ot.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||ot.get(i,`_${a}`)}})})})};oA.defaultProps={children:g.jsx(oa,{}),multiple:!1},oA.propTypes={...w.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const o1=le(w.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),iA=e=>g.jsx(it,{...e,children:g.jsx(o1,{})});iA.propTypes={...w.NumberInput.propTypes,...it.propTypes},iA.defaultProps={...w.NumberInput.defaultProps,...it.defaultProps};const Jf=({source:e,minWidth:t=300,children:n})=>{const r=w.useResourceContext(),i=w.useRecordContext(),[a,l]=P.useState(ot.get(i,e,"")),[A,d]=P.useState(!1),f=P.useCallback(B=>l(B.target.value),[]),h=w.useDataProvider(),E=P.useCallback(B=>{B.key==="Enter"&&(d(!0),h.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>d(!1)))},[a,h,r,i,e]),C=P.useCallback(()=>{ot.get(i,e)!==a&&(d(!0),h.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>d(!1)))},[a,h,r,e,i]),I=P.useCallback(B=>{d(!0),h.update(r,{id:i.id,data:{...i,[e]:B,_changed:e}}).then(()=>d(!1))},[h,r,e,i]);return P.useEffect(()=>l(ot.get(i,e)),[i,e]),n?P.cloneElement(n,{...n.props,source:e,value:a,onChange:I}):g.jsx(b.TextField,{value:a,disabled:A,onChange:f,onKeyPress:E,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Jf.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const sA=({children:e,...t})=>g.jsx(w.ReferenceArrayInput,{...t,children:P.cloneElement(e,{...t,source:e.props.source||t.source})});sA.propTypes={...w.ReferenceArrayInput.propTypes,children:c.element},sA.defaultProps={...w.ReferenceArrayInput.defaultProps};const aA=({children:e,...t})=>g.jsx(w.ReferenceInput,{...t,children:P.cloneElement(e,{...t,source:e.props.source||t.source})});aA.propTypes={...w.ReferenceInput.propTypes,children:c.element},aA.defaultProps={...w.ReferenceInput.defaultProps};const lA=({reference:e,target:t,children:n,filters:r,actions:i,...a})=>g.jsx(w.ResourceContextProvider,{value:e,children:g.jsx(Vo,{perPage:5,pagination:g.jsx(w.Pagination,{}),...a,reference:e,target:t,children:g.jsxs(P.Fragment,{children:[g.jsx(w.ListToolbar,{filters:r,actions:i}),n]})})});lA.propTypes={...Vo.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},lA.defaultProps={...Vo.defaultProps};const i1=le(w.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),s1=e=>g.jsx(i1,{...e}),Xf=le(w.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"}}));Xf.propTypes={...w.SelectArrayInput.propTypes};const cA=e=>g.jsx(it,{...e,children:g.jsx(Xf,{options:{autoWidth:!1}})});cA.defaultProps={optionText:"name",optionValue:"id"},cA.propTypes={...w.SelectArrayInput.propTypes,...it.propTypes};const a1=le(w.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Zf=e=>g.jsx(it,{...e,children:g.jsx(a1,{})});Zf.propTypes={...w.SelectInput.propTypes,...it.propTypes};const Tn=e=>g.jsx(it,{...e,children:g.jsx(w.TextInput,{})});Tn.propTypes={...w.TextInput.propTypes,...it.propTypes};const sa=({...e})=>{var A,d;const t=w.useTranslate(),n=w.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(d=(A=Ts.useController({name:e==null?void 0:e.source}))==null?void 0:A.field)==null?void 0:d.value;let i=e.helperText,a=e.validate;a?Array.isArray(a)&&a.indexOf(n)===-1&&a.push(n):a=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(i=i&&i.length>0?`${l} - ${t(i)}`:l),g.jsx(Tn,{...e,validate:a,helperText:i})};sa.displayName="SmartTextInput",sa.defaultProps={multiline:!1},sa.propTypes={...Tn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const $f=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return lr().hour(n).minute(r)};function l1(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const c1=e=>{if(!e)return"";const t=$f(e);return t?t.format("HH:mm"):""},A1=e=>e,u1=le(w.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),AA=e=>g.jsx(it,{...e,children:g.jsx(u1,{})});AA.defaultProps={...w.TimeInput.defaultProps,format:c1,parse:A1},AA.propTypes={...w.TimeInput.propTypes,...it.propTypes};const uA=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Dt(),[r,i]=P.useState(!1),a=Pe.useAuthProvider(),l=Pe.useTranslate(),A=Pe.useNotify(),d=P.useCallback(f=>{const{oldPassword:h,newPassword:E}=f;i(!0),a==null||a.changePassword(h,E).then(()=>{A("ra.auth.password_changed"),e()}).catch(C=>A(C,{type:"error"})).finally(()=>i(!1))},[a,e]);return g.jsx(Pe.ResourceContextProvider,{value:"user/change-password",children:g.jsx(Pe.EditContextProvider,{value:{record:{},resource:"user/change-password",save:d},children:g.jsx(na,{onSubmit:d,toolbar:g.jsx(ar,{children:g.jsx(w.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Tn,{source:"oldPassword",type:"password",validate:Pe.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Tn,{source:"newPassword",type:"password",validate:Pe.required()})})]})})})})},d1=le(w.Create,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default,"& .RaToolbar-mobileToolbar":{backgroundColor:"yellow"}},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),g1=le(w.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),f1=le(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),p1=le(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),dA=({title:e,divider:t,variant:n})=>{const r=w.useTranslate();return g.jsxs(P.Fragment,{children:[g.jsx(f1,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(p1,{})]})};dA.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},dA.defaultProps={divider:!0,variant:"h4"};const aa=c.shape({xl:c.number,lg:c.number,md:c.number,sm:c.number,xs:c.number}),h1=le("div")(({theme:e})=>({marginBottom:e.spacing(2)})),la=({children:e,visibility:t})=>b.useMediaQuery(r=>r.breakpoints.up(t))?g.jsx(h1,{children:e}):null;la.propTypes={visibility:c.oneOf(["xl","lg","md","sm","xs"]),position:c.oneOf(["top","bottom"]).isRequired,children:c.node.isRequired},la.defaultProps={position:"top",visibility:"md"};const C1={display:"none"},ca=({intent:e,hidden:t,unmountOnExit:n,label:r,icon:i,value:a,syncWithLocation:l,selected:A,onChange:d,children:f,badgeColor:h,badgeContent:E,...C})=>{const I=w.useTranslate(),B=br.useLocation(),Q={component:ut.Link,to:{...B,pathname:a}},y=P.isValidElement(r)?r:I(r,{_:r}),D=P.useCallback(()=>d(a),[d,a]);return e==="header"?(()=>g.jsxs(b.ListItemButton,{selected:A,...l?Q:{},onClick:D,children:[i&&g.jsx(b.ListItemIcon,{children:i}),g.jsx(b.ListItemText,{primary:y}),E&&g.jsx(b.ListItemSecondaryAction,{children:g.jsx(b.Avatar,{sx:{width:24,height:24,fontSize:12,backgroundColor:S=>{var O;return(O=S.palette[h])==null?void 0:O.main},color:S=>{var O;return(O=S.palette[h])==null?void 0:O.contrastText}},children:E})})]}))():(()=>n&&t?null:g.jsx(w.FormGroupContextProvider,{name:a.toString(),children:g.jsx(b.Stack,{alignContent:"stretch",style:t?C1:{},id:`tabpanel-${a}`,"aria-labelledby":`tabheader-${a}`,"aria-hidden":t||void 0,...C,children:f})}))()};ca.propTypes={intent:c.oneOf(["header","content","sidebar"]),className:c.string,contentClassName:c.string,url:c.string,icon:c.element,label:c.oneOfType([c.string,c.element]).isRequired,value:c.oneOfType([c.string,c.number]),syncWithLocation:c.bool,onChange:c.func,selected:c.bool,hidden:c.bool,unmountOnExit:c.bool,children:c.node,badgeColor:c.oneOf(["default","error","info","primary","secondary","success","warning"]),badgeContent:c.oneOfType([c.string,c.number])},ca.defaultProps={badgeColor:"default",unmountOnExit:!1};const E1=So(b.List,{name:"RaLongFormTabs",slot:"Root"})(({theme:e})=>({p:0,"& .MuiListItemIcon-root":{minWidth:32,color:e.palette.grey[500]},"& .MuiListItemButton-root.Mui-selected":{borderRight:`2px solid ${e.palette.primary.main}`,marginRight:"-2px"}})),ep=({children:e,syncWithLocation:t,value:n,url:r,onChange:i})=>{const a=br.useLocation();return g.jsx(xn,{children:g.jsx(E1,{component:"nav",children:P.Children.map(e,(l,A)=>{if(!P.isValidElement(l))return null;const d=I1(l,A),f=t?!!br.matchPath(`${r}/${d}`,a.pathname):A===n;return P.cloneElement(l,{intent:"header",value:t?d:A,syncWithLocation:t,onChange:i,url:r,selected:f})})})})},I1=(e,t)=>e.props.path!=null?e.props.path:t>0?t.toString():"";ep.propTypes={children:c.node,url:c.string,tabsWithErrors:c.arrayOf(c.string),syncWithLocation:c.bool,onChange:c.func,value:c.oneOfType([c.string,c.number])};var B1=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},tp=e=>e.firstChild?e.firstChild.offsetParent===e:!0,Q1=(e,t)=>{let n=e,r=0;tp(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},m1=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Ri=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Ri="sticky":CSS.supports("position","-webkit-sticky")&&(Ri="-webkit-sticky"));var Aa=!1;try{const e=Object.defineProperty({},"passive",{get(){Aa={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var gA=e=>{const{el:t,onChange:n,unsubs:r,measure:i}=e;if(t===window){const a=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=i(a()),A=()=>{Object.assign(l,i(a())),n()};return window.addEventListener("resize",A,Aa),r.push(()=>window.removeEventListener("resize",A)),l}else{const a=i(t.getBoundingClientRect()),l=()=>{Object.assign(a,i(t.getBoundingClientRect())),n()},A=new ResizeObserver(l);return A.observe(t),r.push(()=>A.disconnect()),a}},y1=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},b1=(e,t,n)=>{const{bottom:r,offsetBottom:i,offsetTop:a}=n,l=B1(e);let A=!1;const d=()=>{A||requestAnimationFrame(()=>{const R=E();R!==T&&S(R),A=!1}),A=!0};let f=l===window?window.scrollY:l.scrollTop;const h=R=>{const{offsetTop:_,height:Z}=I,{naturalTop:Y}=y,{height:re}=D;return R+_+Z>=Y+re+k+i},E=()=>{const{height:R}=I,{height:_}=D;return _+a+i<=R?3:h(f)?1:2},C=l!==window&&tp(l),I=gA({el:l,onChange:d,unsubs:t,measure:({height:R,top:_})=>({height:R,offsetTop:C?_:0})}),B=m1(e),Q=B===window?{top:0,bottom:0}:y1(B),y=gA({el:B,onChange:d,unsubs:t,measure:({height:R})=>({height:R-Q.top-Q.bottom,naturalTop:B===window?0:Q1(B,l)+Q.top+I.offsetTop})}),D=gA({el:e,onChange:d,unsubs:t,measure:({height:R})=>({height:R})});let k=0,T=E();const S=R=>{const _=T;if(T=R,_===2&&(k=-1),R===3){e.style.position=Ri,r?e.style.bottom=`${i}px`:e.style.top=`${a}px`;return}const{height:Z,offsetTop:Y}=I,{height:re,naturalTop:de}=y,{height:pe}=D;if(R===2)if(e.style.position="relative",k=_===0?Math.max(0,Y+f-de+a):Math.max(0,Y+f+Z-(de+pe+i)),r){const J=Math.max(0,re-pe-k);e.style.bottom=`${J}px`}else e.style.top=`${k}px`;else e.style.position=Ri,R===1?r?e.style.bottom=`${i}px`:e.style.top=`${Z-pe-i}px`:r?e.style.bottom=`${Z-pe-i}px`:e.style.top=`${a}px`};S(T);const O=R=>{if(R===f)return;const _=R-f;if(f=R,T===3)return;const{offsetTop:Z,height:Y}=I,{naturalTop:re,height:de}=y,{height:pe}=D;if(_>0)if(T===0){if(R+Z+a>re){const J=Math.max(0,Z+f-re+a);R+Z+Y<=re+pe+J+i?S(2):S(1)}}else T===2&&h(R)&&S(1);else if(T===1){if(Z+R+Y<re+de+i){const J=Math.max(0,Z+f+Y-(re+pe+i));Z+R+a>=re+J?S(2):S(0)}}else T===2&&Z+R+a<re+k&&S(0)},V=l===window?()=>O(window.scrollY):()=>O(l.scrollTop);l.addEventListener("scroll",V,Aa),l.addEventListener("mousewheel",V,Aa),t.push(()=>l.removeEventListener("scroll",V),()=>l.removeEventListener("mousewheel",V))},v1=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,i]=P.useState(null);return P.useEffect(()=>{if(!r||!Ri)return;const a=[];return b1(r,a,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{a.forEach(l=>l())}},[r,t,e,n]),i},x1=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:i,className:a,style:l}=e,A=v1({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:a,style:l,ref:A,children:i})},w1=x1;const T1=le(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important"}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}})),np=(e,t)=>e&&e.type===la&&e.props.position===t,P1=e=>e&&e.type===ca,fA=({children:e,formRootPathname:t,syncWithLocation:n,spacing:r,tabs:i,tabsDisposition:a,contentDisposition:l,sticky:A,...d})=>{const[f,h]=P.useState(0),E=br.useResolvedPath(""),C=w.useResourceContext(d),I=br.useLocation(),B=P.useMemo(()=>P.Children.toArray(e).find(S=>np(S,"top")),[e]),Q=P.useMemo(()=>P.Children.toArray(e).find(S=>np(S,"bottom")),[e]),y=P.useMemo(()=>P.Children.toArray(e).filter(S=>P1(S)),[e]),D=S=>{n||h(S)},k=()=>P.cloneElement(i,{onChange:D,syncWithLocation:n,url:t,value:f,intent:"header"},y),T=P.useMemo(()=>g.jsxs(P.Fragment,{children:[B,n?g.jsx(br.Routes,{children:g.jsx(br.Route,{path:"/*",element:k()})}):k(),Q]}),[B,n,k,Q]);return g.jsxs(T1,{container:!0,spacing:r*2,children:[g.jsx(b.Grid,{item:!0,...a,children:A?g.jsx(w1,{offsetTop:74,offsetBottom:r*2,children:T}):T}),g.jsx(b.Grid,{item:!0,...l,children:P.Children.map(y,(S,O)=>{if(!S)return null;const V=w.getTabbedFormTabFullPath(S,O),R=n?!br.matchPath(`${E.pathname}/${V}`,I.pathname):f!==O;return P.isValidElement(S)?P.cloneElement(S,{intent:"content",resource:C,hidden:R,value:n?V:O}):null})})]})};fA.propTypes={children:c.node,spacing:c.number,syncWithLocation:c.bool,tabs:c.element,formRootPathname:c.string,tabsDisposition:aa,contentDisposition:aa},fA.defaultProps={tabs:g.jsx(ep,{})};const S1=()=>{const e=ut.useLocation(),t=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/*",":resource/:id/*"];for(const n of t){const r=ut.matchPath(n,e.pathname);if(r)return r.pathnameBase}return""},ji=({spacing:e,...t})=>{const n=S1(),{spacing:r}=Dt(),i=e||r;return g.jsx(w.Form,{formRootPathname:n,...t,children:g.jsx(fA,{formRootPathname:n,...t,spacing:i})})};ji.propTypes={syncWithLocation:c.bool,spacing:c.number,tabsDisposition:aa,contentDisposition:aa,sticky:c.bool},ji.defaultProps={syncWithLocation:!1,sticky:!0,spacing:2,tabsDisposition:{xl:3,lg:3,md:4,sm:4,xs:12},contentDisposition:{xl:9,lg:9,md:8,sm:8,xs:12}},ji.Tab=ca,ji.Sidebar=la;const O1=le(w.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),ua=So(w.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));ua.propTypes={...w.TabbedForm.propTypes},ua.defaultProps={...w.TabbedForm.defaultProps},ua.Tab=w.TabbedForm.Tab;const rp=P.createContext(void 0),M1=P.createContext(void 0),D1=()=>P.useContext(rp),k1=K.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:i=!1,index:a,member:l,resource:A}=e,d=w.useTranslate(),[f,h]=K.useState(!1),{total:E,remove:C}=D1(),I=K.useCallback(()=>{h(!1),C(a)},[a,C]),B=P.useMemo(()=>({index:a,total:E,remove:()=>C(a)}),[a,E,C]);return g.jsxs(M1.Provider,{value:B,children:[P.Children.map(n,(Q,y)=>{if(!P.isValidElement(Q))return null;const{source:D,...k}=Q.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:P.cloneElement(Q,{source:D?`${l}.${D}`:l,index:D?void 0:y,resource:A,disabled:r,...k,label:!1})})}),!i&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2},children:g.jsx(Lo,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>h(!0),children:d("ra.action.delete")})})}),n.length>0&&g.jsx(w.Confirm,{isOpen:f,title:d("ra.action.remove_item"),content:d("ra.message.remove_item"),onConfirm:I,onClose:()=>h(!1)})]})});var F1=Array.isArray,pA=F1,L1=typeof vn=="object"&&vn&&vn.Object===Object&&vn,N1=L1,R1=N1,j1=typeof self=="object"&&self&&self.Object===Object&&self,V1=R1||j1||Function("return this")(),hA=V1,H1=hA,z1=H1.Symbol,CA=z1,op=CA,ip=Object.prototype,W1=ip.hasOwnProperty,U1=ip.toString,Vi=op?op.toStringTag:void 0;function G1(e){var t=W1.call(e,Vi),n=e[Vi];try{e[Vi]=void 0;var r=!0}catch{}var i=U1.call(e);return r&&(t?e[Vi]=n:delete e[Vi]),i}var Y1=G1,K1=Object.prototype,q1=K1.toString;function _1(e){return q1.call(e)}var J1=_1,sp=CA,X1=Y1,Z1=J1,$1="[object Null]",ex="[object Undefined]",ap=sp?sp.toStringTag:void 0;function tx(e){return e==null?e===void 0?ex:$1:ap&&ap in Object(e)?X1(e):Z1(e)}var lp=tx;function nx(e){return e!=null&&typeof e=="object"}var rx=nx,ox=lp,ix=rx,sx="[object Symbol]";function ax(e){return typeof e=="symbol"||ix(e)&&ox(e)==sx}var EA=ax,lx=pA,cx=EA,Ax=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ux=/^\w*$/;function dx(e,t){if(lx(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||cx(e)?!0:ux.test(e)||!Ax.test(e)||t!=null&&e in Object(t)}var gx=dx;function fx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cp=fx,px=lp,hx=cp,Cx="[object AsyncFunction]",Ex="[object Function]",Ix="[object GeneratorFunction]",Bx="[object Proxy]";function Qx(e){if(!hx(e))return!1;var t=px(e);return t==Ex||t==Ix||t==Cx||t==Bx}var mx=Qx,yx=hA,bx=yx["__core-js_shared__"],vx=bx,IA=vx,Ap=function(){var e=/[^.]+$/.exec(IA&&IA.keys&&IA.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xx(e){return!!Ap&&Ap in e}var wx=xx,Tx=Function.prototype,Px=Tx.toString;function Sx(e){if(e!=null){try{return Px.call(e)}catch{}try{return e+""}catch{}}return""}var Ox=Sx,Mx=mx,Dx=wx,kx=cp,Fx=Ox,Lx=/[\\^$.*+?()[\]{}|]/g,Nx=/^\[object .+?Constructor\]$/,Rx=Function.prototype,jx=Object.prototype,Vx=Rx.toString,Hx=jx.hasOwnProperty,zx=RegExp("^"+Vx.call(Hx).replace(Lx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wx(e){if(!kx(e)||Dx(e))return!1;var t=Mx(e)?zx:Nx;return t.test(Fx(e))}var Ux=Wx;function Gx(e,t){return e==null?void 0:e[t]}var Yx=Gx,Kx=Ux,qx=Yx;function _x(e,t){var n=qx(e,t);return Kx(n)?n:void 0}var up=_x,Jx=up,Xx=Jx(Object,"create"),da=Xx,dp=da;function Zx(){this.__data__=dp?dp(null):{},this.size=0}var $x=Zx;function ew(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tw=ew,nw=da,rw="__lodash_hash_undefined__",ow=Object.prototype,iw=ow.hasOwnProperty;function sw(e){var t=this.__data__;if(nw){var n=t[e];return n===rw?void 0:n}return iw.call(t,e)?t[e]:void 0}var aw=sw,lw=da,cw=Object.prototype,Aw=cw.hasOwnProperty;function uw(e){var t=this.__data__;return lw?t[e]!==void 0:Aw.call(t,e)}var dw=uw,gw=da,fw="__lodash_hash_undefined__";function pw(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gw&&t===void 0?fw:t,this}var hw=pw,Cw=$x,Ew=tw,Iw=aw,Bw=dw,Qw=hw;function Ho(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ho.prototype.clear=Cw,Ho.prototype.delete=Ew,Ho.prototype.get=Iw,Ho.prototype.has=Bw,Ho.prototype.set=Qw;var mw=Ho;function yw(){this.__data__=[],this.size=0}var bw=yw;function vw(e,t){return e===t||e!==e&&t!==t}var xw=vw,ww=xw;function Tw(e,t){for(var n=e.length;n--;)if(ww(e[n][0],t))return n;return-1}var ga=Tw,Pw=ga,Sw=Array.prototype,Ow=Sw.splice;function Mw(e){var t=this.__data__,n=Pw(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ow.call(t,n,1),--this.size,!0}var Dw=Mw,kw=ga;function Fw(e){var t=this.__data__,n=kw(t,e);return n<0?void 0:t[n][1]}var Lw=Fw,Nw=ga;function Rw(e){return Nw(this.__data__,e)>-1}var jw=Rw,Vw=ga;function Hw(e,t){var n=this.__data__,r=Vw(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var zw=Hw,Ww=bw,Uw=Dw,Gw=Lw,Yw=jw,Kw=zw;function zo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zo.prototype.clear=Ww,zo.prototype.delete=Uw,zo.prototype.get=Gw,zo.prototype.has=Yw,zo.prototype.set=Kw;var qw=zo,_w=up,Jw=hA,Xw=_w(Jw,"Map"),Zw=Xw,gp=mw,$w=qw,eT=Zw;function tT(){this.size=0,this.__data__={hash:new gp,map:new(eT||$w),string:new gp}}var nT=tT;function rT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var oT=rT,iT=oT;function sT(e,t){var n=e.__data__;return iT(t)?n[typeof t=="string"?"string":"hash"]:n.map}var fa=sT,aT=fa;function lT(e){var t=aT(this,e).delete(e);return this.size-=t?1:0,t}var cT=lT,AT=fa;function uT(e){return AT(this,e).get(e)}var dT=uT,gT=fa;function fT(e){return gT(this,e).has(e)}var pT=fT,hT=fa;function CT(e,t){var n=hT(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var ET=CT,IT=nT,BT=cT,QT=dT,mT=pT,yT=ET;function Wo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wo.prototype.clear=IT,Wo.prototype.delete=BT,Wo.prototype.get=QT,Wo.prototype.has=mT,Wo.prototype.set=yT;var bT=Wo,fp=bT,vT="Expected a function";function BA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(vT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(BA.Cache||fp),n}BA.Cache=fp;var xT=BA,wT=xT,TT=500;function PT(e){var t=wT(e,function(r){return n.size===TT&&n.clear(),r}),n=t.cache;return t}var ST=PT,OT=ST,MT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DT=/\\(\\)?/g,kT=OT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(MT,function(n,r,i,a){t.push(i?a.replace(DT,"$1"):r||n)}),t}),FT=kT;function LT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var NT=LT,pp=CA,RT=NT,jT=pA,VT=EA,HT=1/0,hp=pp?pp.prototype:void 0,Cp=hp?hp.toString:void 0;function Ep(e){if(typeof e=="string")return e;if(jT(e))return RT(e,Ep)+"";if(VT(e))return Cp?Cp.call(e):"";var t=e+"";return t=="0"&&1/e==-HT?"-0":t}var zT=Ep,WT=zT;function UT(e){return e==null?"":WT(e)}var GT=UT,YT=pA,KT=gx,qT=FT,_T=GT;function JT(e,t){return YT(e)?e:KT(e,t)?[e]:qT(_T(e))}var XT=JT,ZT=EA,$T=1/0;function e2(e){if(typeof e=="string"||ZT(e))return e;var t=e+"";return t=="0"&&1/e==-$T?"-0":t}var t2=e2,n2=XT,r2=t2;function o2(e,t){t=n2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[r2(t[n++])];return n&&n==r?e:void 0}var i2=o2,s2=i2;function a2(e,t,n){var r=e==null?void 0:s2(e,t);return r===void 0?n:r}var l2=a2;const c2=xo(l2),Ip=e=>{const{children:t,resource:n,source:r,label:i,disableActions:a=!1,disableAdd:l=!1,disableRemove:A=!1,className:d,empty:f}=e,[h,E]=P.useState(!1),{fields:C,remove:I,replace:B}=w.useArrayInput(e),Q=lt(),y=Pe.useTranslate(),D=Pe.useRecordContext(e),k=P.useRef({}),T=Pe.useTranslateLabel(),S=P.useCallback(Z=>{I(Z)},[I]);if(C.length>0){const{...Z}=C[0];k.current=Z;for(const Y in k.current)k.current[Y]=null}const O=P.useCallback(()=>{B([]),E(!1)},[B]),V=c2(D,r),R=P.useMemo(()=>({total:C.length,remove:S,source:r}),[C.length,S,r]),_=Q.palette.mode==="dark"?Q.palette.grey.A400:Q.palette.grey.A800;return C?g.jsx(rp.Provider,{value:R,children:g.jsxs("div",{className:d,children:[g.jsx(Bp,{label:i,source:r,disableAdd:l}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${_}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${_}`},children:g.jsxs(b.TableRow,{children:[P.Children.map(t,(Z,Y)=>K.isValidElement(Z)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:T({...Z.props,resource:n})})},Y):null),!a&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[C.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(a?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),C.length>0&&C.map((Z,Y)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${_}}`},children:g.jsx(k1,{disableRemove:A,disableActions:a,index:Y,member:`${r}.${Y}`,onRemoveField:S,record:V&&V[Y]||{},resource:n,source:r,children:t})},Z.id))]})]})}),C.length>0&&g.jsx(w.Confirm,{isOpen:h,title:y("ra.action.clear_array_input"),content:y("ra.message.clear_array_input"),onConfirm:O,onClose:()=>E(!1)})]})}):null},Bp=e=>{const{label:t,disableAdd:n}=e,{append:r}=w.useArrayInput(e),i=lt(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,l=i.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[g.jsx(b.Typography,{children:t}),!n&&g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${a}`},onClick:()=>r({}),children:g.jsx(Ze.PlusCircleOutlined,{style:{color:l}})})]})},A2=le(Ip,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));Bp.propTypes={label:c.string.isRequired,source:c.string.isRequired},Ip.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.string,resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string])};const Qp=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),pa=P.createContext({}),QA=P.createContext(null),ha=typeof document<"u",u2=ha?P.useLayoutEffect:P.useEffect,mp=P.createContext({strict:!1});function d2(e,t,n,r){const{visualElement:i}=P.useContext(pa),a=P.useContext(mp),l=P.useContext(QA),A=P.useContext(Qp).reducedMotion,d=P.useRef();r=r||a.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:A}));const f=d.current;P.useInsertionEffect(()=>{f&&f.update(n,l)});const h=P.useRef(!!window.HandoffAppearAnimations);return u2(()=>{f&&(f.render(),h.current&&f.animationState&&f.animationState.animateChanges())}),P.useEffect(()=>{f&&(f.updateFeatures(),!h.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,h.current=!1)}),f}function Uo(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function g2(e,t,n){return P.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Uo(n)&&(n.current=r))},[t])}function Hi(e){return typeof e=="string"||Array.isArray(e)}function Ca(e){return typeof e=="object"&&typeof e.start=="function"}const mA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yA=["initial",...mA];function Ea(e){return Ca(e.animate)||yA.some(t=>Hi(e[t]))}function yp(e){return!!(Ea(e)||e.variants)}function f2(e,t){if(Ea(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hi(n)?n:void 0,animate:Hi(r)?r:void 0}}return e.inherit!==!1?t:{}}function p2(e){const{initial:t,animate:n}=f2(e,P.useContext(pa));return P.useMemo(()=>({initial:t,animate:n}),[bp(t),bp(n)])}function bp(e){return Array.isArray(e)?e.join(" "):e}const vp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zi={};for(const e in vp)zi[e]={isEnabled:t=>vp[e].some(n=>!!t[n])};function h2(e){for(const t in e)zi[t]={...zi[t],...e[t]}}const xp=P.createContext({}),wp=P.createContext({}),C2=Symbol.for("motionComponentSymbol");function E2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&h2(e);function a(A,d){let f;const h={...P.useContext(Qp),...A,layoutId:I2(A)},{isStatic:E}=h,C=p2(A),I=r(A,E);if(!E&&ha){C.visualElement=d2(i,I,h,t);const B=P.useContext(wp),Q=P.useContext(mp).strict;C.visualElement&&(f=C.visualElement.loadFeatures(h,Q,e,B))}return K.createElement(pa.Provider,{value:C},f&&C.visualElement?K.createElement(f,{visualElement:C.visualElement,...h}):null,n(i,A,g2(I,C.visualElement,d),I,E,C.visualElement))}const l=P.forwardRef(a);return l[C2]=i,l}function I2({layoutId:e}){const t=P.useContext(xp).id;return t&&e!==void 0?t+"-"+e:e}function B2(e){function t(r,i={}){return E2(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Q2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function bA(e){return typeof e!="string"||e.includes("-")?!1:!!(Q2.indexOf(e)>-1||/[A-Z]/.test(e))}const Ia={};function m2(e){Object.assign(Ia,e)}const Wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],so=new Set(Wi);function Tp(e,{layout:t,layoutId:n}){return so.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ia[e]||e==="opacity")}const nn=e=>!!(e&&e.getVelocity),y2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b2=Wi.length;function v2(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let l=0;l<b2;l++){const A=Wi[l];if(e[A]!==void 0){const d=y2[A]||A;a+=`${d}(${e[A]}) `}}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}const Pp=e=>t=>typeof t=="string"&&t.startsWith(e),Sp=Pp("--"),vA=Pp("var(--"),x2=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,w2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Tr=(e,t,n)=>Math.min(Math.max(n,e),t),ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ui={...ao,transform:e=>Tr(0,1,e)},Ba={...ao,default:1},Gi=e=>Math.round(e*1e5)/1e5,Qa=/(-)?([\d]*\.?[\d])+/g,Op=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,T2=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Yi(e){return typeof e=="string"}const Ki=e=>({test:t=>Yi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=Ki("deg"),Xn=Ki("%"),Me=Ki("px"),P2=Ki("vh"),S2=Ki("vw"),Mp={...Xn,parse:e=>Xn.parse(e)/100,transform:e=>Xn.transform(e*100)},Dp={...ao,transform:Math.round},kp={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,size:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:Ba,scaleX:Ba,scaleY:Ba,scaleZ:Ba,skew:Pr,skewX:Pr,skewY:Pr,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:Ui,originX:Mp,originY:Mp,originZ:Me,zIndex:Dp,fillOpacity:Ui,strokeOpacity:Ui,numOctaves:Dp};function xA(e,t,n,r){const{style:i,vars:a,transform:l,transformOrigin:A}=e;let d=!1,f=!1,h=!0;for(const E in t){const C=t[E];if(Sp(E)){a[E]=C;continue}const I=kp[E],B=w2(C,I);if(so.has(E)){if(d=!0,l[E]=B,!h)continue;C!==(I.default||0)&&(h=!1)}else E.startsWith("origin")?(f=!0,A[E]=B):i[E]=B}if(t.transform||(d||r?i.transform=v2(e.transform,n,h,r):i.transform&&(i.transform="none")),f){const{originX:E="50%",originY:C="50%",originZ:I=0}=A;i.transformOrigin=`${E} ${C} ${I}`}}const wA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fp(e,t,n){for(const r in t)!nn(t[r])&&!Tp(r,n)&&(e[r]=t[r])}function O2({transformTemplate:e},t,n){return P.useMemo(()=>{const r=wA();return xA(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function M2(e,t,n){const r=e.style||{},i={};return Fp(i,r,e),Object.assign(i,O2(e,t,n)),e.transformValues?e.transformValues(i):i}function D2(e,t,n){const r={},i=M2(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const k2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ma(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||k2.has(e)}let Lp=e=>!ma(e);function F2(e){e&&(Lp=t=>t.startsWith("on")?!ma(t):e(t))}try{F2(require("@emotion/is-prop-valid").default)}catch{}function L2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Lp(i)||n===!0&&ma(i)||!t&&!ma(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Np(e,t,n){return typeof e=="string"?e:Me.transform(t+n*e)}function N2(e,t,n){const r=Np(t,e.x,e.width),i=Np(n,e.y,e.height);return`${r} ${i}`}const R2={offset:"stroke-dashoffset",array:"stroke-dasharray"},j2={offset:"strokeDashoffset",array:"strokeDasharray"};function V2(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?R2:j2;e[a.offset]=Me.transform(-r);const l=Me.transform(t),A=Me.transform(n);e[a.array]=`${l} ${A}`}function TA(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:l,pathSpacing:A=1,pathOffset:d=0,...f},h,E,C){if(xA(e,f,h,C),E){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:I,style:B,dimensions:Q}=e;I.transform&&(Q&&(B.transform=I.transform),delete I.transform),Q&&(i!==void 0||a!==void 0||B.transform)&&(B.transformOrigin=N2(Q,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(I.x=t),n!==void 0&&(I.y=n),r!==void 0&&(I.scale=r),l!==void 0&&V2(I,l,A,d,!1)}const Rp=()=>({...wA(),attrs:{}}),PA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function H2(e,t,n,r){const i=P.useMemo(()=>{const a=Rp();return TA(a,t,{enableHardwareAcceleration:!1},PA(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Fp(a,e.style,e),i.style={...a,...i.style}}return i}function z2(e=!1){return(n,r,i,{latestValues:a},l)=>{const d=(bA(n)?H2:D2)(r,a,l,n),h={...L2(r,typeof n=="string",e),...d,ref:i},{children:E}=r,C=P.useMemo(()=>nn(E)?E.get():E,[E]);return P.createElement(n,{...h,children:C})}}const SA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function jp(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Vp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hp(e,t,n,r){jp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Vp.has(i)?i:SA(i),t.attrs[i])}function OA(e,t){const{style:n}=e,r={};for(const i in n)(nn(n[i])||t.style&&nn(t.style[i])||Tp(i,e))&&(r[i]=n[i]);return r}function zp(e,t){const n=OA(e,t);for(const r in e)if(nn(e[r])||nn(t[r])){const i=Wi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function MA(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function W2(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const ya=e=>Array.isArray(e),U2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),G2=e=>ya(e)?e[e.length-1]||0:e;function ba(e){const t=nn(e)?e.get():e;return U2(t)?t.toValue():t}function Y2({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const l={latestValues:K2(r,i,a,e),renderState:t()};return n&&(l.mount=A=>n(r,A,l)),l}const Wp=e=>(t,n)=>{const r=P.useContext(pa),i=P.useContext(QA),a=()=>Y2(e,t,r,i);return n?a():W2(a)};function K2(e,t,n,r){const i={},a=r(e,{});for(const C in a)i[C]=ba(a[C]);let{initial:l,animate:A}=e;const d=Ea(e),f=yp(e);t&&f&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),A===void 0&&(A=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const E=h?A:l;return E&&typeof E!="boolean"&&!Ca(E)&&(Array.isArray(E)?E:[E]).forEach(I=>{const B=MA(e,I);if(!B)return;const{transitionEnd:Q,transition:y,...D}=B;for(const k in D){let T=D[k];if(Array.isArray(T)){const S=h?T.length-1:0;T=T[S]}T!==null&&(i[k]=T)}for(const k in Q)i[k]=Q[k]}),i}const yt=e=>e;class Up{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function q2(e){let t=new Up,n=new Up,r=0,i=!1,a=!1;const l=new WeakSet,A={schedule:(d,f=!1,h=!1)=>{const E=h&&i,C=E?t:n;return f&&l.add(d),C.add(d)&&E&&i&&(r=t.order.length),d},cancel:d=>{n.remove(d),l.delete(d)},process:d=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let f=0;f<r;f++){const h=t.order[f];h(d),l.has(h)&&(A.schedule(h),e())}i=!1,a&&(a=!1,A.process(d))}};return A}const va=["prepare","read","update","preRender","render","postRender"],_2=40;function J2(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=va.reduce((E,C)=>(E[C]=q2(()=>n=!0),E),{}),l=E=>a[E].process(i),A=()=>{const E=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,_2),1),i.timestamp=E,i.isProcessing=!0,va.forEach(l),i.isProcessing=!1,n&&t&&(r=!1,e(A))},d=()=>{n=!0,r=!0,i.isProcessing||e(A)};return{schedule:va.reduce((E,C)=>{const I=a[C];return E[C]=(B,Q=!1,y=!1)=>(n||d(),I.schedule(B,Q,y)),E},{}),cancel:E=>va.forEach(C=>a[C].cancel(E)),state:i,steps:a}}const{schedule:ft,cancel:cr,state:kt,steps:DA}=J2(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),X2={useVisualState:Wp({scrapeMotionValuesFromProps:zp,createRenderState:Rp,onMount:(e,t,{renderState:n,latestValues:r})=>{ft.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ft.render(()=>{TA(n,r,{enableHardwareAcceleration:!1},PA(t.tagName),e.transformTemplate),Hp(t,n)})}})},Z2={useVisualState:Wp({scrapeMotionValuesFromProps:OA,createRenderState:wA})};function $2(e,{forwardMotionProps:t=!1},n,r){return{...bA(e)?X2:Z2,preloadedFeatures:n,useRender:z2(t),createVisualElement:r,Component:e}}function Ar(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Gp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xa(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const eP=e=>t=>Gp(t)&&e(t,xa(t));function ur(e,t,n,r){return Ar(e,t,eP(n),r)}const tP=(e,t)=>n=>t(e(n)),Sr=(...e)=>e.reduce(tP);function Yp(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Kp=Yp("dragHorizontal"),qp=Yp("dragVertical");function _p(e){let t=!1;if(e==="y")t=qp();else if(e==="x")t=Kp();else{const n=Kp(),r=qp();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Jp(){const e=_p(!0);return e?(e(),!1):!0}class Or{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xp(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,l)=>{if(a.type==="touch"||Jp())return;const A=e.getProps();e.animationState&&A.whileHover&&e.animationState.setActive("whileHover",t),A[r]&&ft.update(()=>A[r](a,l))};return ur(e.current,n,i,{passive:!e.getProps()[r]})}class nP extends Or{mount(){this.unmount=Sr(Xp(this.node,!0),Xp(this.node,!1))}unmount(){}}class rP extends Or{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sr(Ar(this.node.current,"focus",()=>this.onFocus()),Ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Zp=(e,t)=>t?e===t?!0:Zp(e,t.parentElement):!1;function kA(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,xa(n))}class oP extends Or{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=ur(window,"pointerup",(A,d)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h}=this.node.getProps();ft.update(()=>{Zp(this.node.current,A.target)?f&&f(A,d):h&&h(A,d)})},{passive:!(r.onTap||r.onPointerUp)}),l=ur(window,"pointercancel",(A,d)=>this.cancelPress(A,d),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sr(a,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const l=A=>{A.key!=="Enter"||!this.checkPressEnd()||kA("up",(d,f)=>{const{onTap:h}=this.node.getProps();h&&ft.update(()=>h(d,f))})};this.removeEndListeners(),this.removeEndListeners=Ar(this.node.current,"keyup",l),kA("down",(A,d)=>{this.startPress(A,d)})},n=Ar(this.node.current,"keydown",t),r=()=>{this.isPressing&&kA("cancel",(a,l)=>this.cancelPress(a,l))},i=Ar(this.node.current,"blur",r);this.removeAccessibleListeners=Sr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ft.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Jp()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ft.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=ur(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ar(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const FA=new WeakMap,LA=new WeakMap,iP=e=>{const t=FA.get(e.target);t&&t(e)},sP=e=>{e.forEach(iP)};function aP({root:e,...t}){const n=e||document;LA.has(n)||LA.set(n,{});const r=LA.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(sP,{root:e,...t})),r[i]}function lP(e,t,n){const r=aP(t);return FA.set(e,n),r.observe(e),()=>{FA.delete(e),r.unobserve(e)}}const cP={some:0,all:1};class AP extends Or{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:cP[i]},A=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:E}=this.node.getProps(),C=f?h:E;C&&C(d)};return lP(this.node.current,l,A)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(uP(t,n))&&this.startObserver()}unmount(){}}function uP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dP={inView:{Feature:AP},tap:{Feature:oP},focus:{Feature:rP},hover:{Feature:nP}};function $p(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function gP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function fP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function wa(e,t,n){const r=e.getProps();return MA(r,t,n!==void 0?n:r.custom,gP(e),fP(e))}const pP="data-"+SA("framerAppearId");let qi=yt,Zn=yt;process.env.NODE_ENV!=="production"&&(qi=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Zn=(e,t)=>{if(!e)throw new Error(t)});const Mr=e=>e*1e3,dr=e=>e/1e3,hP={current:!1},eh=e=>Array.isArray(e)&&typeof e[0]=="number";function th(e){return!!(!e||typeof e=="string"&&nh[e]||eh(e)||Array.isArray(e)&&e.every(th))}const _i=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_i([0,.65,.55,1]),circOut:_i([.55,0,1,.45]),backIn:_i([.31,.01,.66,-.59]),backOut:_i([.33,1.53,.69,.99])};function rh(e){if(e)return eh(e)?_i(e):Array.isArray(e)?e.map(rh):nh[e]}function CP(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:l="loop",ease:A,times:d}={}){const f={[t]:n};d&&(f.offset=d);const h=rh(A);return Array.isArray(h)&&(f.easing=h),e.animate(f,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:l==="reverse"?"alternate":"normal"})}function EP(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const oh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IP=1e-7,BP=12;function QP(e,t,n,r,i){let a,l,A=0;do l=t+(n-t)/2,a=oh(l,r,i)-e,a>0?n=l:t=l;while(Math.abs(a)>IP&&++A<BP);return l}function Ji(e,t,n,r){if(e===t&&n===r)return yt;const i=a=>QP(a,0,1,e,n);return a=>a===0||a===1?a:oh(i(a),t,r)}const mP=Ji(.42,0,1,1),yP=Ji(0,0,.58,1),ih=Ji(.42,0,.58,1),bP=e=>Array.isArray(e)&&typeof e[0]!="number",sh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ah=e=>t=>1-e(1-t),lh=e=>1-Math.sin(Math.acos(e)),NA=ah(lh),vP=sh(NA),ch=Ji(.33,1.53,.69,.99),RA=ah(ch),xP=sh(RA),Ah={linear:yt,easeIn:mP,easeInOut:ih,easeOut:yP,circIn:lh,circInOut:vP,circOut:NA,backIn:RA,backInOut:xP,backOut:ch,anticipate:e=>(e*=2)<1?.5*RA(e):.5*(2-Math.pow(2,-10*(e-1)))},uh=e=>{if(Array.isArray(e)){Zn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Ji(t,n,r,i)}else if(typeof e=="string")return Zn(Ah[e]!==void 0,`Invalid easing type '${e}'`),Ah[e];return e},jA=(e,t)=>n=>!!(Yi(n)&&T2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),dh=(e,t,n)=>r=>{if(!Yi(r))return r;const[i,a,l,A]=r.match(Qa);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(l),alpha:A!==void 0?parseFloat(A):1}},wP=e=>Tr(0,255,e),VA={...ao,transform:e=>Math.round(wP(e))},lo={test:jA("rgb","red"),parse:dh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+VA.transform(e)+", "+VA.transform(t)+", "+VA.transform(n)+", "+Gi(Ui.transform(r))+")"};function TP(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const HA={test:jA("#"),parse:TP,transform:lo.transform},Go={test:jA("hsl","hue"),parse:dh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xn.transform(Gi(t))+", "+Xn.transform(Gi(n))+", "+Gi(Ui.transform(r))+")"},Xt={test:e=>lo.test(e)||HA.test(e)||Go.test(e),parse:e=>lo.test(e)?lo.parse(e):Go.test(e)?Go.parse(e):HA.parse(e),transform:e=>Yi(e)?e:e.hasOwnProperty("red")?lo.transform(e):Go.transform(e)},It=(e,t,n)=>-n*e+n*t+e;function zA(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 PP({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,l=0;if(!t)i=a=l=n;else{const A=n<.5?n*(1+t):n+t-n*t,d=2*n-A;i=zA(d,A,e+1/3),a=zA(d,A,e),l=zA(d,A,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(l*255),alpha:r}}const WA=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},SP=[HA,lo,Go],OP=e=>SP.find(t=>t.test(e));function gh(e){const t=OP(e);Zn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Go&&(n=PP(n)),n}const fh=(e,t)=>{const n=gh(e),r=gh(t),i={...n};return a=>(i.red=WA(n.red,r.red,a),i.green=WA(n.green,r.green,a),i.blue=WA(n.blue,r.blue,a),i.alpha=It(n.alpha,r.alpha,a),lo.transform(i))};function MP(e){var t,n;return isNaN(e)&&Yi(e)&&(((t=e.match(Qa))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Op))===null||n===void 0?void 0:n.length)||0)>0}const ph={regex:x2,countKey:"Vars",token:"${v}",parse:yt},hh={regex:Op,countKey:"Colors",token:"${c}",parse:Xt.parse},Ch={regex:Qa,countKey:"Numbers",token:"${n}",parse:ao.parse};function UA(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function Ta(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&UA(n,ph),UA(n,hh),UA(n,Ch),n}function Eh(e){return Ta(e).values}function Ih(e){const{values:t,numColors:n,numVars:r,tokenised:i}=Ta(e),a=t.length;return l=>{let A=i;for(let d=0;d<a;d++)d<r?A=A.replace(ph.token,l[d]):d<r+n?A=A.replace(hh.token,Xt.transform(l[d])):A=A.replace(Ch.token,Gi(l[d]));return A}}const DP=e=>typeof e=="number"?0:e;function kP(e){const t=Eh(e);return Ih(e)(t.map(DP))}const Dr={test:MP,parse:Eh,createTransformer:Ih,getAnimatableNone:kP},Bh=(e,t)=>n=>`${n>0?t:e}`;function Qh(e,t){return typeof e=="number"?n=>It(e,t,n):Xt.test(e)?fh(e,t):e.startsWith("var(")?Bh(e,t):yh(e,t)}const mh=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,l)=>Qh(a,t[l]));return a=>{for(let l=0;l<r;l++)n[l]=i[l](a);return n}},FP=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qh(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},yh=(e,t)=>{const n=Dr.createTransformer(t),r=Ta(e),i=Ta(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Sr(mh(r.values,i.values),n):(qi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Bh(e,t))},Xi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},bh=(e,t)=>n=>It(e,t,n);function LP(e){return typeof e=="number"?bh:typeof e=="string"?Xt.test(e)?fh:yh:Array.isArray(e)?mh:typeof e=="object"?FP:bh}function NP(e,t,n){const r=[],i=n||LP(e[0]),a=e.length-1;for(let l=0;l<a;l++){let A=i(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||yt:t;A=Sr(d,A)}r.push(A)}return r}function vh(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Zn(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=NP(t,r,i),A=l.length,d=f=>{let h=0;if(A>1)for(;h<e.length-2&&!(f<e[h+1]);h++);const E=Xi(e[h],e[h+1],f);return l[h](E)};return n?f=>d(Tr(e[0],e[a-1],f)):d}function RP(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Xi(0,t,r);e.push(It(n,1,i))}}function jP(e){const t=[0];return RP(t,e.length-1),t}function VP(e,t){return e.map(n=>n*t)}function HP(e,t){return e.map(()=>t||ih).splice(0,e.length-1)}function Pa({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=bP(r)?r.map(uh):uh(r),a={done:!1,value:t[0]},l=VP(n&&n.length===t.length?n:jP(t),e),A=vh(l,t,{ease:Array.isArray(i)?i:HP(t,i)});return{calculatedDuration:e,next:d=>(a.value=A(d),a.done=d>=e,a)}}function xh(e,t){return t?e*(1e3/t):0}const zP=5;function wh(e,t,n){const r=Math.max(t-zP,0);return xh(n-e(r),t-r)}const GA=.001,WP=.01,Th=10,UP=.05,GP=1;function YP({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;qi(e<=Mr(Th),"Spring duration must be 10 seconds or less");let l=1-t;l=Tr(UP,GP,l),e=Tr(WP,Th,dr(e)),l<1?(i=f=>{const h=f*l,E=h*e,C=h-n,I=YA(f,l),B=Math.exp(-E);return GA-C/I*B},a=f=>{const E=f*l*e,C=E*n+n,I=Math.pow(l,2)*Math.pow(f,2)*e,B=Math.exp(-E),Q=YA(Math.pow(f,2),l);return(-i(f)+GA>0?-1:1)*((C-I)*B)/Q}):(i=f=>{const h=Math.exp(-f*e),E=(f-n)*e+1;return-GA+h*E},a=f=>{const h=Math.exp(-f*e),E=(n-f)*(e*e);return h*E});const A=5/e,d=qP(i,a,A);if(e=Mr(e),isNaN(d))return{stiffness:100,damping:10,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const KP=12;function qP(e,t,n){let r=n;for(let i=1;i<KP;i++)r=r-e(r)/t(r);return r}function YA(e,t){return e*Math.sqrt(1-t*t)}const _P=["duration","bounce"],JP=["stiffness","damping","mass"];function Ph(e,t){return t.some(n=>e[n]!==void 0)}function XP(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Ph(e,JP)&&Ph(e,_P)){const n=YP(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Sh({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],l={done:!1,value:i},{stiffness:A,damping:d,mass:f,velocity:h,duration:E,isResolvedFromDuration:C}=XP(r),I=h?-dr(h):0,B=d/(2*Math.sqrt(A*f)),Q=a-i,y=dr(Math.sqrt(A/f)),D=Math.abs(Q)<5;n||(n=D?.01:2),t||(t=D?.005:.5);let k;if(B<1){const T=YA(y,B);k=S=>{const O=Math.exp(-B*y*S);return a-O*((I+B*y*Q)/T*Math.sin(T*S)+Q*Math.cos(T*S))}}else if(B===1)k=T=>a-Math.exp(-y*T)*(Q+(I+y*Q)*T);else{const T=y*Math.sqrt(B*B-1);k=S=>{const O=Math.exp(-B*y*S),V=Math.min(T*S,300);return a-O*((I+B*y*Q)*Math.sinh(V)+T*Q*Math.cosh(V))/T}}return{calculatedDuration:C&&E||null,next:T=>{const S=k(T);if(C)l.done=T>=E;else{let O=I;T!==0&&(B<1?O=wh(k,T,S):O=0);const V=Math.abs(O)<=n,R=Math.abs(a-S)<=t;l.done=V&&R}return l.value=l.done?a:S,l}}}function Oh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:l,min:A,max:d,restDelta:f=.5,restSpeed:h}){const E=e[0],C={done:!1,value:E},I=_=>A!==void 0&&_<A||d!==void 0&&_>d,B=_=>A===void 0?d:d===void 0||Math.abs(A-_)<Math.abs(d-_)?A:d;let Q=n*t;const y=E+Q,D=l===void 0?y:l(y);D!==y&&(Q=D-E);const k=_=>-Q*Math.exp(-_/r),T=_=>D+k(_),S=_=>{const Z=k(_),Y=T(_);C.done=Math.abs(Z)<=f,C.value=C.done?D:Y};let O,V;const R=_=>{I(C.value)&&(O=_,V=Sh({keyframes:[C.value,B(C.value)],velocity:wh(T,_,C.value),damping:i,stiffness:a,restDelta:f,restSpeed:h}))};return R(0),{calculatedDuration:null,next:_=>{let Z=!1;return!V&&O===void 0&&(Z=!0,S(_),R(_)),O!==void 0&&_>O?V.next(_-O):(!Z&&S(_),C)}}}const ZP=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ft.update(t,!0),stop:()=>cr(t),now:()=>kt.isProcessing?kt.timestamp:performance.now()}},Mh=2e4;function Dh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mh;)t+=n,r=e.next(t);return t>=Mh?1/0:t}const $P={decay:Oh,inertia:Oh,tween:Pa,keyframes:Pa,spring:Sh};function Sa({autoplay:e=!0,delay:t=0,driver:n=ZP,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:l=0,repeatType:A="loop",onPlay:d,onStop:f,onComplete:h,onUpdate:E,...C}){let I=1,B=!1,Q,y;const D=()=>{y=new Promise(H=>{Q=H})};D();let k;const T=$P[i]||Pa;let S;T!==Pa&&typeof r[0]!="number"&&(S=vh([0,100],r,{clamp:!1}),r=[0,100]);const O=T({...C,keyframes:r});let V;A==="mirror"&&(V=T({...C,keyframes:[...r].reverse(),velocity:-(C.velocity||0)}));let R="idle",_=null,Z=null,Y=null;O.calculatedDuration===null&&a&&(O.calculatedDuration=Dh(O));const{calculatedDuration:re}=O;let de=1/0,pe=1/0;re!==null&&(de=re+l,pe=de*(a+1)-l);let J=0;const X=H=>{if(Z===null)return;I>0&&(Z=Math.min(Z,H)),I<0&&(Z=Math.min(H-pe/I,Z)),_!==null?J=_:J=Math.round(H-Z)*I;const se=J-t*(I>=0?1:-1),fe=I>=0?se<0:se>pe;J=Math.max(se,0),R==="finished"&&_===null&&(J=pe);let ce=J,ge=O;if(a){const Ie=J/de;let Be=Math.floor(Ie),Fe=Ie%1;!Fe&&Ie>=1&&(Fe=1),Fe===1&&Be--,Be=Math.min(Be,a+1);const ae=!!(Be%2);ae&&(A==="reverse"?(Fe=1-Fe,l&&(Fe-=l/de)):A==="mirror"&&(ge=V));let Ge=Tr(0,1,Fe);J>pe&&(Ge=A==="reverse"&&ae?1:0),ce=Ge*de}const he=fe?{done:!1,value:r[0]}:ge.next(ce);S&&(he.value=S(he.value));let{done:Qe}=he;!fe&&re!==null&&(Qe=I>=0?J>=pe:J<=0);const ye=_===null&&(R==="finished"||R==="running"&&Qe);return E&&E(he.value),ye&&z(),he},U=()=>{k&&k.stop(),k=void 0},$=()=>{R="idle",U(),Q(),D(),Z=Y=null},z=()=>{R="finished",h&&h(),U(),Q()},oe=()=>{if(B)return;k||(k=n(X));const H=k.now();d&&d(),_!==null?Z=H-_:(!Z||R==="finished")&&(Z=H),R==="finished"&&D(),Y=Z,_=null,R="running",k.start()};e&&oe();const W={then(H,se){return y.then(H,se)},get time(){return dr(J)},set time(H){H=Mr(H),J=H,_!==null||!k||I===0?_=H:Z=k.now()-H/I},get duration(){const H=O.calculatedDuration===null?Dh(O):O.calculatedDuration;return dr(H)},get speed(){return I},set speed(H){H===I||!k||(I=H,W.time=dr(J))},get state(){return R},play:oe,pause:()=>{R="paused",_=J},stop:()=>{B=!0,R!=="idle"&&(R="idle",f&&f(),$())},cancel:()=>{Y!==null&&X(Y),$()},complete:()=>{R="finished"},sample:H=>(Z=0,X(H))};return W}function e4(e){let t;return()=>(t===void 0&&(t=e()),t)}const t4=e4(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),n4=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Oa=10,r4=2e4,o4=(e,t)=>t.type==="spring"||e==="backgroundColor"||!th(t.ease);function i4(e,t,{onUpdate:n,onComplete:r,...i}){if(!(t4()&&n4.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let l=!1,A,d;const f=()=>{d=new Promise(k=>{A=k})};f();let{keyframes:h,duration:E=300,ease:C,times:I}=i;if(o4(t,i)){const k=Sa({...i,repeat:0,delay:0});let T={done:!1,value:h[0]};const S=[];let O=0;for(;!T.done&&O<r4;)T=k.sample(O),S.push(T.value),O+=Oa;I=void 0,h=S,E=O-Oa,C="linear"}const B=CP(e.owner.current,t,h,{...i,duration:E,ease:C,times:I});i.syncStart&&(B.startTime=kt.isProcessing?kt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const Q=()=>B.cancel(),y=()=>{ft.update(Q),A(),f()};return B.onfinish=()=>{e.set(EP(h,i)),r&&r(),y()},{then(k,T){return d.then(k,T)},attachTimeline(k){return B.timeline=k,B.onfinish=null,yt},get time(){return dr(B.currentTime||0)},set time(k){B.currentTime=Mr(k)},get speed(){return B.playbackRate},set speed(k){B.playbackRate=k},get duration(){return dr(E)},play:()=>{l||(B.play(),cr(Q))},pause:()=>B.pause(),stop:()=>{if(l=!0,B.playState==="idle")return;const{currentTime:k}=B;if(k){const T=Sa({...i,autoplay:!1});e.setWithVelocity(T.sample(k-Oa).value,T.sample(k).value,Oa)}y()},complete:()=>B.finish(),cancel:y}}function s4({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:yt,pause:yt,stop:yt,then:a=>(a(),Promise.resolve()),cancel:yt,complete:yt});return t?Sa({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const a4={type:"spring",stiffness:500,damping:25,restSpeed:10},l4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),c4={type:"keyframes",duration:.8},A4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},u4=(e,{keyframes:t})=>t.length>2?c4:so.has(e)?e.startsWith("scale")?l4(t[1]):a4:A4,KA=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Dr.test(t)||t==="0")&&!t.startsWith("url(")),d4=new Set(["brightness","contrast","saturate","opacity"]);function g4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qa)||[];if(!r)return e;const i=n.replace(r,"");let a=d4.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const f4=/([a-z-]*)\(.*?\)/g,qA={...Dr,getAnimatableNone:e=>{const t=e.match(f4);return t?t.map(g4).join(" "):e}},p4={...kp,color:Xt,backgroundColor:Xt,outlineColor:Xt,fill:Xt,stroke:Xt,borderColor:Xt,borderTopColor:Xt,borderRightColor:Xt,borderBottomColor:Xt,borderLeftColor:Xt,filter:qA,WebkitFilter:qA},_A=e=>p4[e];function kh(e,t){let n=_A(e);return n!==qA&&(n=Dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fh=e=>/^0[^.\s]+$/.test(e);function h4(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Fh(e)}function C4(e,t,n,r){const i=KA(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const l=r.from!==void 0?r.from:e.get();let A;const d=[];for(let f=0;f<a.length;f++)a[f]===null&&(a[f]=f===0?l:a[f-1]),h4(a[f])&&d.push(f),typeof a[f]=="string"&&a[f]!=="none"&&a[f]!=="0"&&(A=a[f]);if(i&&d.length&&A)for(let f=0;f<d.length;f++){const h=d[f];a[h]=kh(t,A)}return a}function E4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:l,repeatDelay:A,from:d,elapsed:f,...h}){return!!Object.keys(h).length}function Lh(e,t){return e[t]||e.default||e}const JA=(e,t,n,r={})=>i=>{const a=Lh(r,e)||{},l=a.delay||r.delay||0;let{elapsed:A=0}=r;A=A-Mr(l);const d=C4(t,e,n,a),f=d[0],h=d[d.length-1],E=KA(e,f),C=KA(e,h);qi(E===C,`You are trying to animate ${e} from "${f}" to "${h}". ${f} is not an animatable value - to enable this animation set ${f} to a value animatable to ${h} via the \`style\` property.`);let I={keyframes:d,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-A,onUpdate:B=>{t.set(B),a.onUpdate&&a.onUpdate(B)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(E4(a)||(I={...I,...u4(e,I)}),I.duration&&(I.duration=Mr(I.duration)),I.repeatDelay&&(I.repeatDelay=Mr(I.repeatDelay)),!E||!C||hP.current||a.type===!1)return s4(I);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const B=i4(t,e,I);if(B)return B}return Sa(I)};function Ma(e){return!!(nn(e)&&e.add)}const Nh=e=>/^\-?\d*\.?\d+$/.test(e);function XA(e,t){e.indexOf(t)===-1&&e.push(t)}function ZA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $A{constructor(){this.subscriptions=[]}add(t){return XA(this.subscriptions,t),()=>ZA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const l=this.subscriptions[a];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rh=new Set;function eu(e,t,n){e||Rh.has(t)||(console.warn(t),n&&console.warn(n),Rh.add(t))}const I4=e=>!isNaN(parseFloat(e));class B4{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:l}=kt;this.lastUpdated!==l&&(this.timeDelta=a,this.lastUpdated=l,ft.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ft.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=I4(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&eu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new $A);const r=this.events[t].add(n);return t==="change"?()=>{r(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?xh(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Yo(e,t){return new B4(e,t)}const jh=e=>t=>t.test(e),Vh=[ao,Me,Xn,Pr,S2,P2,{test:e=>e==="auto",parse:e=>e}],Zi=e=>Vh.find(jh(e)),Q4=[...Vh,Xt,Dr],m4=e=>Q4.find(jh(e));function y4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yo(n))}function b4(e,t){const n=wa(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const l in a){const A=G2(a[l]);y4(e,l,A)}}function v4(e,t,n){var r,i;const a=Object.keys(t).filter(A=>!e.hasValue(A)),l=a.length;if(l)for(let A=0;A<l;A++){const d=a[A],f=t[d];let h=null;Array.isArray(f)&&(h=f[0]),h===null&&(h=(i=(r=n[d])!==null&&r!==void 0?r:e.readValue(d))!==null&&i!==void 0?i:t[d]),h!=null&&(typeof h=="string"&&(Nh(h)||Fh(h))?h=parseFloat(h):!m4(h)&&Dr.test(f)&&(h=kh(d,f)),e.addValue(d,Yo(h,{owner:e})),n[d]===void 0&&(n[d]=h),h!==null&&e.setBaseTarget(d,h))}}function x4(e,t){return t?(t[e]||t.default||t).from:void 0}function w4(e,t,n){const r={};for(const i in e){const a=x4(i,t);if(a!==void 0)r[i]=a;else{const l=n.getValue(i);l&&(r[i]=l.get())}}return r}function T4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:l,...A}=e.makeTargetAnimatable(t);const d=e.getValue("willChange");r&&(a=r);const f=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const E in A){const C=e.getValue(E),I=A[E];if(!C||I===void 0||h&&T4(h,E))continue;const B={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!C.hasAnimated){const y=e.getProps()[pP];y&&(B.elapsed=window.HandoffAppearAnimations(y,E,C,ft),B.syncStart=!0)}C.start(JA(E,C,I,e.shouldReduceMotion&&so.has(E)?{type:!1}:B));const Q=C.animation;Ma(d)&&(d.add(E),Q.then(()=>d.remove(E))),f.push(Q)}return l&&Promise.all(f).then(()=>{l&&b4(e,l)}),f}function tu(e,t,n={}){const r=wa(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Hh(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:E}=i;return P4(e,t,f+d,h,E,n)}:()=>Promise.resolve(),{when:A}=i;if(A){const[d,f]=A==="beforeChildren"?[a,l]:[l,a];return d().then(()=>f())}else return Promise.all([a(),l(n.delay)])}function P4(e,t,n=0,r=0,i=1,a){const l=[],A=(e.variantChildren.size-1)*r,d=i===1?(f=0)=>f*r:(f=0)=>A-f*r;return Array.from(e.variantChildren).sort(S4).forEach((f,h)=>{f.notify("AnimationStart",t),l.push(tu(f,t,{...a,delay:n+d(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function S4(e,t){return e.sortNodePosition(t)}function O4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>tu(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=tu(e,t,n);else{const i=typeof t=="function"?wa(e,t,n.custom):t;r=Promise.all(Hh(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const M4=[...mA].reverse(),D4=mA.length;function k4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>O4(e,n,r)))}function F4(e){let t=k4(e);const n=N4();let r=!0;const i=(d,f)=>{const h=wa(e,f);if(h){const{transition:E,transitionEnd:C,...I}=h;d={...d,...I,...C}}return d};function a(d){t=d(e)}function l(d,f){const h=e.getProps(),E=e.getVariantContext(!0)||{},C=[],I=new Set;let B={},Q=1/0;for(let D=0;D<D4;D++){const k=M4[D],T=n[k],S=h[k]!==void 0?h[k]:E[k],O=Hi(S),V=k===f?T.isActive:null;V===!1&&(Q=D);let R=S===E[k]&&S!==h[k]&&O;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),T.protectedKeys={...B},!T.isActive&&V===null||!S&&!T.prevProp||Ca(S)||typeof S=="boolean")continue;const _=L4(T.prevProp,S);let Z=_||k===f&&T.isActive&&!R&&O||D>Q&&O;const Y=Array.isArray(S)?S:[S];let re=Y.reduce(i,{});V===!1&&(re={});const{prevResolvedValues:de={}}=T,pe={...de,...re},J=X=>{Z=!0,I.delete(X),T.needsAnimating[X]=!0};for(const X in pe){const U=re[X],$=de[X];B.hasOwnProperty(X)||(U!==$?ya(U)&&ya($)?!$p(U,$)||_?J(X):T.protectedKeys[X]=!0:U!==void 0?J(X):I.add(X):U!==void 0&&I.has(X)?J(X):T.protectedKeys[X]=!0)}T.prevProp=S,T.prevResolvedValues=re,T.isActive&&(B={...B,...re}),r&&e.blockInitialAnimation&&(Z=!1),Z&&!R&&C.push(...Y.map(X=>({animation:X,options:{type:k,...d}})))}if(I.size){const D={};I.forEach(k=>{const T=e.getBaseTarget(k);T!==void 0&&(D[k]=T)}),C.push({animation:D})}let y=!!C.length;return r&&h.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(C):Promise.resolve()}function A(d,f,h){var E;if(n[d].isActive===f)return Promise.resolve();(E=e.variantChildren)===null||E===void 0||E.forEach(I=>{var B;return(B=I.animationState)===null||B===void 0?void 0:B.setActive(d,f)}),n[d].isActive=f;const C=l(h,d);for(const I in n)n[I].protectedKeys={};return C}return{animateChanges:l,setActive:A,setAnimateFunction:a,getState:()=>n}}function L4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$p(t,e):!1}function co(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function N4(){return{animate:co(!0),whileInView:co(),whileHover:co(),whileTap:co(),whileDrag:co(),whileFocus:co(),exit:co()}}class R4 extends Or{constructor(t){super(t),t.animationState||(t.animationState=F4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ca(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let j4=0;class V4 extends Or{constructor(){super(...arguments),this.id=j4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const H4={animation:{Feature:R4},exit:{Feature:V4}},zh=(e,t)=>Math.abs(e-t);function z4(e,t){const n=zh(e.x,t.x),r=zh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Wh{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=ru(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,E=z4(f.offset,{x:0,y:0})>=3;if(!h&&!E)return;const{point:C}=f,{timestamp:I}=kt;this.history.push({...C,timestamp:I});const{onStart:B,onMove:Q}=this.handlers;h||(B&&B(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),Q&&Q(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=nu(h,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:E,onSessionEnd:C}=this.handlers,I=ru(f.type==="pointercancel"?this.lastMoveEventInfo:nu(h,this.transformPagePoint),this.history);this.startEvent&&E&&E(f,I),C&&C(f,I)},!Gp(t))return;this.handlers=n,this.transformPagePoint=r;const i=xa(t),a=nu(i,this.transformPagePoint),{point:l}=a,{timestamp:A}=kt;this.history=[{...l,timestamp:A}];const{onSessionStart:d}=n;d&&d(t,ru(a,this.history)),this.removeListeners=Sr(ur(window,"pointermove",this.handlePointerMove),ur(window,"pointerup",this.handlePointerUp),ur(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cr(this.updatePoint)}}function nu(e,t){return t?{point:t(e.point)}:e}function Uh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ru({point:e},t){return{point:e,delta:Uh(e,Gh(t)),offset:Uh(e,W4(t)),velocity:U4(t,.1)}}function W4(e){return e[0]}function Gh(e){return e[e.length-1]}function U4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Gh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mr(t)));)n--;if(!r)return{x:0,y:0};const a=dr(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const l={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function dn(e){return e.max-e.min}function ou(e,t=0,n=.01){return Math.abs(e-t)<=n}function Yh(e,t,n,r=.5){e.origin=r,e.originPoint=It(t.min,t.max,e.origin),e.scale=dn(n)/dn(t),(ou(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=It(n.min,n.max,e.origin)-e.originPoint,(ou(e.translate)||isNaN(e.translate))&&(e.translate=0)}function $i(e,t,n,r){Yh(e.x,t.x,n.x,r?r.originX:void 0),Yh(e.y,t.y,n.y,r?r.originY:void 0)}function Kh(e,t,n){e.min=n.min+t.min,e.max=e.min+dn(t)}function G4(e,t,n){Kh(e.x,t.x,n.x),Kh(e.y,t.y,n.y)}function qh(e,t,n){e.min=t.min-n.min,e.max=e.min+dn(t)}function es(e,t,n){qh(e.x,t.x,n.x),qh(e.y,t.y,n.y)}function Y4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?It(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?It(n,e,r.max):Math.min(e,n)),e}function _h(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function K4(e,{top:t,left:n,bottom:r,right:i}){return{x:_h(e.x,n,i),y:_h(e.y,t,r)}}function Jh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function q4(e,t){return{x:Jh(e.x,t.x),y:Jh(e.y,t.y)}}function _4(e,t){let n=.5;const r=dn(e),i=dn(t);return i>r?n=Xi(t.min,t.max-r,e.min):r>i&&(n=Xi(e.min,e.max-i,t.min)),Tr(0,1,n)}function J4(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iu=.35;function X4(e=iu){return e===!1?e=0:e===!0&&(e=iu),{x:Xh(e,"left","right"),y:Xh(e,"top","bottom")}}function Xh(e,t,n){return{min:Zh(e,t),max:Zh(e,n)}}function Zh(e,t){return typeof e=="number"?e:e[t]||0}const $h=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ko=()=>({x:$h(),y:$h()}),eC=()=>({min:0,max:0}),wt=()=>({x:eC(),y:eC()});function $n(e){return[e("x"),e("y")]}function tC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Z4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $4(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function su(e){return e===void 0||e===1}function au({scale:e,scaleX:t,scaleY:n}){return!su(e)||!su(t)||!su(n)}function Ao(e){return au(e)||nC(e)||e.z||e.rotate||e.rotateX||e.rotateY}function nC(e){return rC(e.x)||rC(e.y)}function rC(e){return e&&e!=="0%"}function Da(e,t,n){const r=e-n,i=t*r;return n+i}function oC(e,t,n,r,i){return i!==void 0&&(e=Da(e,i,r)),Da(e,n,r)+t}function lu(e,t=0,n=1,r,i){e.min=oC(e.min,t,n,r,i),e.max=oC(e.max,t,n,r,i)}function iC(e,{x:t,y:n}){lu(e.x,t.translate,t.scale,t.originPoint),lu(e.y,n.translate,n.scale,n.originPoint)}function eS(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,l;for(let A=0;A<i;A++){a=n[A],l=a.projectionDelta;const d=a.instance;d&&d.style&&d.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&qo(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,iC(e,l)),r&&Ao(a.latestValues)&&qo(e,a.latestValues))}t.x=sC(t.x),t.y=sC(t.y)}function sC(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function kr(e,t){e.min=e.min+t,e.max=e.max+t}function aC(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,l=It(e.min,e.max,a);lu(e,t[n],t[r],l,t.scale)}const tS=["x","scaleX","originX"],nS=["y","scaleY","originY"];function qo(e,t){aC(e.x,t,tS),aC(e.y,t,nS)}function lC(e,t){return tC($4(e.getBoundingClientRect(),t))}function rS(e,t,n){const r=lC(e,n),{scroll:i}=t;return i&&(kr(r.x,i.offset.x),kr(r.y,i.offset.y)),r}const oS=new WeakMap;class iS{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{this.stopAnimation(),n&&this.snapToCursor(xa(d,"page").point)},a=(d,f)=>{const{drag:h,dragPropagation:E,onDragStart:C}=this.getProps();if(h&&!E&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=_p(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$n(B=>{let Q=this.getAxisMotionValue(B).get()||0;if(Xn.test(Q)){const{projection:y}=this.visualElement;if(y&&y.layout){const D=y.layout.layoutBox[B];D&&(Q=dn(D)*(parseFloat(Q)/100))}}this.originPoint[B]=Q}),C&&ft.update(()=>C(d,f),!1,!0);const{animationState:I}=this.visualElement;I&&I.setActive("whileDrag",!0)},l=(d,f)=>{const{dragPropagation:h,dragDirectionLock:E,onDirectionLock:C,onDrag:I}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:B}=f;if(E&&this.currentDirection===null){this.currentDirection=sS(B),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",f.point,B),this.updateAxis("y",f.point,B),this.visualElement.render(),I&&I(d,f)},A=(d,f)=>this.stop(d,f);this.panSession=new Wh(t,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:A},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&ft.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ka(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=Y4(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Uo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=K4(r.layoutBox,t):this.constraints=!1,this.elastic=X4(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&$n(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=J4(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Uo(t))return!1;const r=t.current;Zn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=rS(r,i.root,this.visualElement.getTransformPagePoint());let l=q4(i.layout.layoutBox,a);if(n){const A=n(Z4(l));this.hasMutatedConstraints=!!A,A&&(l=tC(A))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:A}=this.getProps(),d=this.constraints||{},f=$n(h=>{if(!ka(h,n,this.currentDirection))return;let E=d&&d[h]||{};l&&(E={min:0,max:0});const C=i?200:1e6,I=i?40:1e7,B={type:"inertia",velocity:r?t[h]:0,bounceStiffness:C,bounceDamping:I,timeConstant:750,restDelta:1,restSpeed:10,...a,...E};return this.startAxisValueAnimation(h,B)});return Promise.all(f).then(A)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(JA(t,r,0,n))}stopAnimation(){$n(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){$n(n=>{const{drag:r}=this.getProps();if(!ka(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:A}=i.layout.layoutBox[n];a.set(t[n]-It(l,A,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Uo(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};$n(l=>{const A=this.getAxisMotionValue(l);if(A){const d=A.get();i[l]=_4({min:d,max:d},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),$n(l=>{if(!ka(l,t,null))return;const A=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];A.set(It(d,f,i[l]))})}addListeners(){if(!this.visualElement.current)return;oS.set(this.visualElement,this);const t=this.visualElement.current,n=ur(t,"pointerdown",d=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();Uo(d)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const l=Ar(window,"resize",()=>this.scalePositionWithinConstraints()),A=i.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&($n(h=>{const E=this.getAxisMotionValue(h);E&&(this.originPoint[h]+=d[h].translate,E.set(E.get()+d[h].translate))}),this.visualElement.render())});return()=>{l(),n(),a(),A&&A()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:l=iu,dragMomentum:A=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:l,dragMomentum:A}}}function ka(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aS extends Or{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new iS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const cC=e=>(t,n)=>{e&&ft.update(()=>e(t,n))};class lS extends Or{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Wh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cC(t),onStart:cC(n),onMove:r,onEnd:(a,l)=>{delete this.session,i&&ft.update(()=>i(a,l))}}}mount(){this.removePointerDownListener=ur(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function cS(){const e=P.useContext(QA);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=P.useId();return P.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Fa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function AC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ts={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=AC(e,t.target.x),r=AC(e,t.target.y);return`${n}% ${r}%`}},AS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Dr.parse(e);if(i.length>5)return r;const a=Dr.createTransformer(e),l=typeof i[0]!="number"?1:0,A=n.x.scale*t.x,d=n.y.scale*t.y;i[0+l]/=A,i[1+l]/=d;const f=It(A,d,.5);return typeof i[2+l]=="number"&&(i[2+l]/=f),typeof i[3+l]=="number"&&(i[3+l]/=f),a(i)}};class uS extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;m2(dS),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Fa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,l=r.projection;return l&&(l.isPresent=a,i||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||ft.postRender(()=>{const A=l.getStack();(!A||!A.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function uC(e){const[t,n]=cS(),r=P.useContext(xp);return P.createElement(uS,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(wp),isPresent:t,safeToRemove:n})}const dS={borderRadius:{...ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ts,borderTopRightRadius:ts,borderBottomLeftRadius:ts,borderBottomRightRadius:ts,boxShadow:AS},dC=["TopLeft","TopRight","BottomLeft","BottomRight"],gS=dC.length,gC=e=>typeof e=="string"?parseFloat(e):e,fC=e=>typeof e=="number"||Me.test(e);function fS(e,t,n,r,i,a){i?(e.opacity=It(0,n.opacity!==void 0?n.opacity:1,pS(r)),e.opacityExit=It(t.opacity!==void 0?t.opacity:1,0,hS(r))):a&&(e.opacity=It(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<gS;l++){const A=`border${dC[l]}Radius`;let d=pC(t,A),f=pC(n,A);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||fC(d)===fC(f)?(e[A]=Math.max(It(gC(d),gC(f),r),0),(Xn.test(f)||Xn.test(d))&&(e[A]+="%")):e[A]=f}(t.rotate||n.rotate)&&(e.rotate=It(t.rotate||0,n.rotate||0,r))}function pC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pS=hC(0,.5,NA),hS=hC(.5,.95,yt);function hC(e,t,n){return r=>r<e?0:r>t?1:n(Xi(e,t,r))}function CC(e,t){e.min=t.min,e.max=t.max}function Pn(e,t){CC(e.x,t.x),CC(e.y,t.y)}function EC(e,t,n,r,i){return e-=t,e=Da(e,1/n,r),i!==void 0&&(e=Da(e,1/i,r)),e}function CS(e,t=0,n=1,r=.5,i,a=e,l=e){if(Xn.test(t)&&(t=parseFloat(t),t=It(l.min,l.max,t/100)-l.min),typeof t!="number")return;let A=It(a.min,a.max,r);e===a&&(A-=t),e.min=EC(e.min,t,n,A,i),e.max=EC(e.max,t,n,A,i)}function IC(e,t,[n,r,i],a,l){CS(e,t[n],t[r],t[i],t.scale,a,l)}const ES=["x","scaleX","originX"],IS=["y","scaleY","originY"];function BC(e,t,n,r){IC(e.x,t,ES,n?n.x:void 0,r?r.x:void 0),IC(e.y,t,IS,n?n.y:void 0,r?r.y:void 0)}function QC(e){return e.translate===0&&e.scale===1}function mC(e){return QC(e.x)&&QC(e.y)}function BS(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function yC(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function bC(e){return dn(e.x)/dn(e.y)}class QS{constructor(){this.members=[]}add(t){XA(this.members,t),t.scheduleRender()}remove(t){if(ZA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vC(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:d,rotateX:f,rotateY:h}=n;d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `)}const l=e.x.scale*t.x,A=e.y.scale*t.y;return(l!==1||A!==1)&&(r+=`scale(${l}, ${A})`),r||"none"}const mS=(e,t)=>e.depth-t.depth;class yS{constructor(){this.children=[],this.isDirty=!1}add(t){XA(this.children,t),this.isDirty=!0}remove(t){ZA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mS),this.isDirty=!1,this.children.forEach(t)}}function bS(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(cr(r),e(a-t))};return ft.read(r,!0),()=>cr(r)}function vS(e){window.MotionDebug&&window.MotionDebug.record(e)}function xS(e){return e instanceof SVGElement&&e.tagName!=="svg"}function wS(e,t,n){const r=nn(e)?e:Yo(e);return r.start(JA("",r,t,n)),r.animation}const xC=["","X","Y","Z"],wC=1e3;let TS=0;const uo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function TC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},A=t==null?void 0:t()){this.id=TS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{uo.totalNodes=uo.resolvedTargetDeltas=uo.recalculatedProjection=0,this.nodes.forEach(OS),this.nodes.forEach(LS),this.nodes.forEach(NS),this.nodes.forEach(MS),vS(uo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=A?A.root||A:this,this.path=A?[...A.path,A]:[],this.parent=A,this.depth=A?A.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new yS)}addEventListener(l,A){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new $A),this.eventHandlers.get(l).add(A)}notifyListeners(l,...A){const d=this.eventHandlers.get(l);d&&d.notify(...A)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,A=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=xS(l),this.instance=l;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),A&&(f||d)&&(this.isLayoutDirty=!0),e){let E;const C=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,E&&E(),E=bS(C,250),Fa.hasAnimatedSinceResize&&(Fa.hasAnimatedSinceResize=!1,this.nodes.forEach(SC))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:E,hasLayoutChanged:C,hasRelativeTargetChanged:I,layout:B})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const Q=this.options.transition||h.getDefaultTransition()||zS,{onLayoutAnimationStart:y,onLayoutAnimationComplete:D}=h.getProps(),k=!this.targetLayout||!yC(this.targetLayout,B)||I,T=!C&&I;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||C&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(E,T);const S={...Lh(Q,"layout"),onPlay:y,onComplete:D};(h.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else C||SC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=B})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(RS),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const E=this.path[h];E.shouldResetTransform=!0,E.updateScroll("snapshot"),E.options.layoutRoot&&E.willUpdate(!1)}const{layoutId:A,layout:d}=this.options;if(A===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(PC);return}this.isUpdating||this.nodes.forEach(kS),this.isUpdating=!1,this.nodes.forEach(FS),this.nodes.forEach(PS),this.nodes.forEach(SS),this.clearAllSnapshots();const A=performance.now();kt.delta=Tr(0,1e3/60,A-kt.timestamp),kt.timestamp=A,kt.isProcessing=!0,DA.update.process(kt),DA.preRender.process(kt),DA.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(DS),this.sharedNodes.forEach(jS)}scheduleUpdateProjection(){ft.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:A}=this.options;A&&A.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let A=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(A=!1),A&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform,A=this.projectionDelta&&!mC(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;l&&(A||Ao(this.latestValues)||h)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const A=this.measurePageBox();let d=this.removeElementScroll(A);return l&&(d=this.removeTransform(d)),WS(d),{animationId:this.root.animationId,measuredBox:A,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return wt();const A=l.measureViewportBox(),{scroll:d}=this.root;return d&&(kr(A.x,d.offset.x),kr(A.y,d.offset.y)),A}removeElementScroll(l){const A=wt();Pn(A,l);for(let d=0;d<this.path.length;d++){const f=this.path[d],{scroll:h,options:E}=f;if(f!==this.root&&h&&E.layoutScroll){if(h.isRoot){Pn(A,l);const{scroll:C}=this.root;C&&(kr(A.x,-C.offset.x),kr(A.y,-C.offset.y))}kr(A.x,h.offset.x),kr(A.y,h.offset.y)}}return A}applyTransform(l,A=!1){const d=wt();Pn(d,l);for(let f=0;f<this.path.length;f++){const h=this.path[f];!A&&h.options.layoutScroll&&h.scroll&&h!==h.root&&qo(d,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Ao(h.latestValues)&&qo(d,h.latestValues)}return Ao(this.latestValues)&&qo(d,this.latestValues),d}removeTransform(l){const A=wt();Pn(A,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!Ao(f.latestValues))continue;au(f.latestValues)&&f.updateSnapshot();const h=wt(),E=f.measurePageBox();Pn(h,E),BC(A,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return Ao(this.latestValues)&&BC(A,this.latestValues),A}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var A;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||!((A=this.parent)===null||A===void 0)&&A.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:E,layoutId:C}=this.options;if(!(!this.layout||!(E||C))){if(this.resolvedRelativeTargetAt=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const I=this.getClosestProjectingParent();I&&I.layout&&this.animationProgress!==1?(this.relativeParent=I,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),es(this.relativeTargetOrigin,this.layout.layoutBox,I.layout.layoutBox),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wt(),this.targetWithTransforms=wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),G4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pn(this.target,this.layout.layoutBox),iC(this.target,this.targetDelta)):Pn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const I=this.getClosestProjectingParent();I&&!!I.resumingFrom==!!this.resumingFrom&&!I.options.layoutScroll&&I.target&&this.animationProgress!==1?(this.relativeParent=I,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),es(this.relativeTargetOrigin,this.target,I.target),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}uo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||au(this.parent.latestValues)||nC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const A=this.getLead(),d=!!this.resumingFrom||this!==A;let f=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===kt.timestamp&&(f=!1),f)return;const{layout:h,layoutId:E}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||E))return;Pn(this.layoutCorrected,this.layout.layoutBox);const C=this.treeScale.x,I=this.treeScale.y;eS(this.layoutCorrected,this.treeScale,this.path,d),A.layout&&!A.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(A.target=A.layout.layoutBox);const{target:B}=A;if(!B){this.projectionTransform&&(this.projectionDelta=Ko(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Ko(),this.projectionDeltaWithTransform=Ko());const Q=this.projectionTransform;$i(this.projectionDelta,this.layoutCorrected,B,this.latestValues),this.projectionTransform=vC(this.projectionDelta,this.treeScale),(this.projectionTransform!==Q||this.treeScale.x!==C||this.treeScale.y!==I)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",B)),uo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const A=this.getStack();A&&A.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,A=!1){const d=this.snapshot,f=d?d.latestValues:{},h={...this.latestValues},E=Ko();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!A;const C=wt(),I=d?d.source:void 0,B=this.layout?this.layout.source:void 0,Q=I!==B,y=this.getStack(),D=!y||y.members.length<=1,k=!!(Q&&!D&&this.options.crossfade===!0&&!this.path.some(HS));this.animationProgress=0;let T;this.mixTargetDelta=S=>{const O=S/1e3;OC(E.x,l.x,O),OC(E.y,l.y,O),this.setTargetDelta(E),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(es(C,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VS(this.relativeTarget,this.relativeTargetOrigin,C,O),T&&BS(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=wt()),Pn(T,this.relativeTarget)),Q&&(this.animationValues=h,fS(h,f,this.latestValues,O,k,D)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Fa.hasAnimatedSinceResize=!0,this.currentAnimation=wS(0,wC,{...l,onUpdate:A=>{this.mixTargetDelta(A),l.onUpdate&&l.onUpdate(A)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:A,target:d,layout:f,latestValues:h}=l;if(!(!A||!d||!f)){if(this!==l&&this.layout&&f&&LC(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||wt();const E=dn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+E;const C=dn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+C}Pn(A,d),qo(A,h),$i(this.projectionDeltaWithTransform,this.layoutCorrected,A,h)}}registerSharedNode(l,A){this.sharedNodes.has(l)||this.sharedNodes.set(l,new QS),this.sharedNodes.get(l).add(A);const f=A.options.initialPromotionConfig;A.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(A):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:A}=this.options;return A?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:A}=this.options;return A?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:A,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),A&&this.setOptions({transition:A})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let A=!1;const{latestValues:d}=l;if((d.rotate||d.rotateX||d.rotateY||d.rotateZ)&&(A=!0),!A)return;const f={};for(let h=0;h<xC.length;h++){const E="rotate"+xC[h];d[E]&&(f[E]=d[E],l.setStaticValue(E,0))}l.render();for(const h in f)l.setStaticValue(h,f[h]);l.scheduleRender()}getProjectionStyles(l={}){var A,d;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=ba(l.pointerEvents)||"",f.transform=h?h(this.latestValues,""):"none",f;const E=this.getLead();if(!this.projectionDelta||!this.layout||!E.target){const Q={};return this.options.layoutId&&(Q.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,Q.pointerEvents=ba(l.pointerEvents)||""),this.hasProjected&&!Ao(this.latestValues)&&(Q.transform=h?h({},""):"none",this.hasProjected=!1),Q}const C=E.animationValues||E.latestValues;this.applyTransformsToTarget(),f.transform=vC(this.projectionDeltaWithTransform,this.treeScale,C),h&&(f.transform=h(C,f.transform));const{x:I,y:B}=this.projectionDelta;f.transformOrigin=`${I.origin*100}% ${B.origin*100}% 0`,E.animationValues?f.opacity=E===this?(d=(A=C.opacity)!==null&&A!==void 0?A:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:C.opacityExit:f.opacity=E===this?C.opacity!==void 0?C.opacity:"":C.opacityExit!==void 0?C.opacityExit:0;for(const Q in Ia){if(C[Q]===void 0)continue;const{correct:y,applyTo:D}=Ia[Q],k=f.transform==="none"?C[Q]:y(C[Q],E);if(D){const T=D.length;for(let S=0;S<T;S++)f[D[S]]=k}else f[Q]=k}return this.options.layoutId&&(f.pointerEvents=E===this?ba(l.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var A;return(A=l.currentAnimation)===null||A===void 0?void 0:A.stop()}),this.root.nodes.forEach(PC),this.root.sharedNodes.clear()}}}function PS(e){e.updateLayout()}function SS(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,l=n.source!==e.layout.source;a==="size"?$n(E=>{const C=l?n.measuredBox[E]:n.layoutBox[E],I=dn(C);C.min=r[E].min,C.max=C.min+I}):LC(a,n.layoutBox,r)&&$n(E=>{const C=l?n.measuredBox[E]:n.layoutBox[E],I=dn(r[E]);C.max=C.min+I,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[E].max=e.relativeTarget[E].min+I)});const A=Ko();$i(A,r,n.layoutBox);const d=Ko();l?$i(d,e.applyTransform(i,!0),n.measuredBox):$i(d,r,n.layoutBox);const f=!mC(A);let h=!1;if(!e.resumeFrom){const E=e.getClosestProjectingParent();if(E&&!E.resumeFrom){const{snapshot:C,layout:I}=E;if(C&&I){const B=wt();es(B,n.layoutBox,C.layoutBox);const Q=wt();es(Q,r,I.layoutBox),yC(B,Q)||(h=!0),E.options.layoutRoot&&(e.relativeTarget=Q,e.relativeTargetOrigin=B,e.relativeParent=E)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:d,layoutDelta:A,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function OS(e){uo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function MS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DS(e){e.clearSnapshot()}function PC(e){e.clearMeasurements()}function kS(e){e.isLayoutDirty=!1}function FS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function SC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LS(e){e.resolveTargetDelta()}function NS(e){e.calcProjection()}function RS(e){e.resetRotation()}function jS(e){e.removeLeadSnapshot()}function OC(e,t,n){e.translate=It(t.translate,0,n),e.scale=It(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function MC(e,t,n,r){e.min=It(t.min,n.min,r),e.max=It(t.max,n.max,r)}function VS(e,t,n,r){MC(e.x,t.x,n.x,r),MC(e.y,t.y,n.y,r)}function HS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zS={duration:.45,ease:[.4,0,.1,1]},DC=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),kC=DC("applewebkit/")&&!DC("chrome/")?Math.round:yt;function FC(e){e.min=kC(e.min),e.max=kC(e.max)}function WS(e){FC(e.x),FC(e.y)}function LC(e,t,n){return e==="position"||e==="preserve-aspect"&&!ou(bC(t),bC(n),.2)}const US=TC({attachResizeListener:(e,t)=>Ar(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cu={current:void 0},NC=TC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cu.current){const e=new US({});e.mount(window),e.setOptions({layoutScroll:!0}),cu.current=e}return cu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),GS={pan:{Feature:lS},drag:{Feature:aS,ProjectionNode:NC,MeasureLayout:uC}},YS=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function KS(e){const t=YS.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const qS=4;function Au(e,t,n=1){Zn(n<=qS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=KS(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const l=a.trim();return Nh(l)?parseFloat(l):l}else return vA(i)?Au(i,t,n+1):i}function _S(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!vA(a))return;const l=Au(a,r);l&&i.set(l)});for(const i in t){const a=t[i];if(!vA(a))continue;const l=Au(a,r);l&&(t[i]=l,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const JS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),RC=e=>JS.has(e),XS=e=>Object.keys(e).some(RC),La=e=>e===ao||e===Me,jC=(e,t)=>parseFloat(e.split(", ")[t]),VC=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return jC(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?jC(a[1],e):0}},ZS=new Set(["x","y","z"]),$S=Wi.filter(e=>!ZS.has(e));function e3(e){const t=[];return $S.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const _o={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:VC(4,13),y:VC(5,14)};_o.translateX=_o.x,_o.translateY=_o.y;const t3=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:l}=a,A={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(f=>{A[f]=_o[f](r,a)}),t.render();const d=t.measureViewportBox();return n.forEach(f=>{const h=t.getValue(f);h&&h.jump(A[f]),e[f]=_o[f](d,a)}),e},n3=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(RC);let a=[],l=!1;const A=[];if(i.forEach(d=>{const f=e.getValue(d);if(!e.hasValue(d))return;let h=n[d],E=Zi(h);const C=t[d];let I;if(ya(C)){const B=C.length,Q=C[0]===null?1:0;h=C[Q],E=Zi(h);for(let y=Q;y<B&&C[y]!==null;y++)I?Zn(Zi(C[y])===I,"All keyframes must be of the same type"):(I=Zi(C[y]),Zn(I===E||La(E)&&La(I),"Keyframes must be of the same dimension as the current value"))}else I=Zi(C);if(E!==I)if(La(E)&&La(I)){const B=f.get();typeof B=="string"&&f.set(parseFloat(B)),typeof C=="string"?t[d]=parseFloat(C):Array.isArray(C)&&I===Me&&(t[d]=C.map(parseFloat))}else E!=null&&E.transform&&(I!=null&&I.transform)&&(h===0||C===0)?h===0?f.set(I.transform(h)):t[d]=E.transform(C):(l||(a=e3(e),l=!0),A.push(d),r[d]=r[d]!==void 0?r[d]:t[d],f.jump(C))}),A.length){const d=A.indexOf("height")>=0?window.pageYOffset:null,f=t3(t,e,A);return a.length&&a.forEach(([h,E])=>{e.getValue(h).set(E)}),e.render(),ha&&d!==null&&window.scrollTo({top:d}),{target:f,transitionEnd:r}}else return{target:t,transitionEnd:r}};function r3(e,t,n,r){return XS(t)?n3(e,t,n,r):{target:t,transitionEnd:r}}const o3=(e,t,n,r)=>{const i=_S(e,t,r);return t=i.target,r=i.transitionEnd,r3(e,t,n,r)},uu={current:null},HC={current:!1};function i3(){if(HC.current=!0,!!ha)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uu.current=e.matches;e.addListener(t),t()}else uu.current=!1}function s3(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],l=n[i];if(nn(a))e.addValue(i,a),Ma(r)&&r.add(i),process.env.NODE_ENV==="development"&&eu(a.version==="10.16.4",`Attempting to mix Framer Motion versions ${a.version} with 10.16.4 may not work as expected.`);else if(nn(l))e.addValue(i,Yo(a,{owner:e})),Ma(r)&&r.remove(i);else if(l!==a)if(e.hasValue(i)){const A=e.getValue(i);!A.hasAnimated&&A.set(a)}else{const A=e.getStaticValue(i);e.addValue(i,Yo(A!==void 0?A:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const zC=new WeakMap,WC=Object.keys(zi),a3=WC.length,UC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],l3=yA.length;class c3{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ft.render(this.render,!1,!0);const{latestValues:A,renderState:d}=a;this.latestValues=A,this.baseTarget={...A},this.initialValues=n.initial?{...A}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.isControllingVariants=Ea(n),this.isVariantNode=yp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{});for(const E in h){const C=h[E];A[E]!==void 0&&nn(C)&&(C.set(A[E],!1),Ma(f)&&f.add(E))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,zC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),HC.current||i3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uu.current,process.env.NODE_ENV!=="production"&&eu(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zC.delete(this.current),this.projection&&this.projection.unmount(),cr(this.notifyUpdate),cr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=so.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ft.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let l,A;if(process.env.NODE_ENV!=="production"&&i&&r){const d="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?qi(!1,d):Zn(!1,d)}for(let d=0;d<a3;d++){const f=WC[d],{isEnabled:h,Feature:E,ProjectionNode:C,MeasureLayout:I}=zi[f];C&&(l=C),h(n)&&(!this.features[f]&&E&&(this.features[f]=new E(this)),I&&(A=I))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:d,layout:f,drag:h,dragConstraints:E,layoutScroll:C,layoutRoot:I}=n;this.projection.setOptions({layoutId:d,layout:f,alwaysMeasureLayout:!!h||E&&Uo(E),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:C,layoutRoot:I})}return A}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<UC.length;r++){const i=UC[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a=t["on"+i];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=s3(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<l3;r++){const i=yA[r],a=this.props[i];(Hi(a)||a===!1)&&(n[i]=a)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yo(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=MA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!nn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $A),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class GC extends c3{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let l=w4(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),l&&(l=i(l))),a){v4(this,r,l);const A=o3(this,r,l,n);n=A.transitionEnd,r=A.target}return{transition:t,transitionEnd:n,...r}}}function A3(e){return window.getComputedStyle(e)}class u3 extends GC{readValueFromInstance(t,n){if(so.has(n)){const r=_A(n);return r&&r.default||0}else{const r=A3(t),i=(Sp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return lC(t,n)}build(t,n,r,i){xA(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return OA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){jp(t,n,r,i)}}class d3 extends GC{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(so.has(n)){const r=_A(n);return r&&r.default||0}return n=Vp.has(n)?n:SA(n),t.getAttribute(n)}measureInstanceViewportBox(){return wt()}scrapeMotionValuesFromProps(t,n){return zp(t,n)}build(t,n,r,i){TA(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Hp(t,n,r,i)}mount(t){this.isSVGTag=PA(t.tagName),super.mount(t)}}const g3=(e,t)=>bA(e)?new d3(t,{enableHardwareAcceleration:!1}):new u3(t,{enableHardwareAcceleration:!0}),f3={...H4,...dP,...GS,...{layout:{ProjectionNode:NC,MeasureLayout:uC}}},Na=B2((e,t)=>$2(e,t,f3,g3)),p3=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function YC(...e){const t=P.useRef(0),[n,r]=P.useState(e[t.current]),i=P.useCallback(a=>{t.current=typeof a!="number"?p3(0,e.length,t.current+1):a,r(e[t.current])},[e.length,...e]);return[n,i]}function KC({children:e,type:t="scale",direction:n="right",offset:r=10,scale:i={hover:1.05,tap:.95}}){let a,l;switch(n){case"up":case"left":a=r,l=0;break;case"right":case"down":default:a=0,l=r;break}const[A,d]=YC(a,l),[f,h]=YC(a,l);switch(t){case"rotate":return g.jsx(Na.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:e});case"slide":return n==="up"||n==="down"?g.jsx(Na.div,{animate:{y:f!==void 0?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:e}):g.jsx(Na.div,{animate:{x:A!==void 0?A:""},onHoverEnd:()=>d(),onHoverStart:()=>d(),children:e});case"scale":default:return typeof i=="number"&&(i={hover:i,tap:i}),g.jsx(Na.div,{whileHover:{scale:i==null?void 0:i.hover},whileTap:{scale:i==null?void 0:i.tap},children:e})}}KC.propTypes={children:c.node,offset:c.number,type:c.oneOf(["slide","scale","rotate"]),direction:c.oneOf(["up","down","left","right"]),scale:c.oneOfType([c.number,c.object])};const h3=vf(g.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function C3(e){return Rt("MuiAvatar",e)}zt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const E3=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],I3=e=>{const{classes:t,variant:n,colorDefault:r}=e;return An({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},C3,t)},B3=le("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>q({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&q({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),Q3=le("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),m3=le(h3,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function y3({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,a]=K.useState(!1);return K.useEffect(()=>{if(!n&&!r)return;a(!1);let l=!0;const A=new Image;return A.onload=()=>{l&&a("loaded")},A.onerror=()=>{l&&a("error")},A.crossOrigin=e,A.referrerPolicy=t,A.src=n,r&&(A.srcset=r),()=>{l=!1}},[e,t,n,r]),i}const qC=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiAvatar"}),{alt:i,children:a,className:l,component:A="div",imgProps:d,sizes:f,src:h,srcSet:E,variant:C="circular"}=r,I=_e(r,E3);let B=null;const Q=y3(q({},d,{src:h,srcSet:E})),y=h||E,D=y&&Q!=="error",k=q({},r,{colorDefault:!D,component:A,variant:C}),T=I3(k);return D?B=g.jsx(Q3,q({alt:i,srcSet:E,src:h,sizes:f,ownerState:k,className:T.img},d)):a!=null?B=a:y&&i?B=i[0]:B=g.jsx(m3,{ownerState:k,className:T.fallback}),g.jsx(B3,q({as:A,ownerState:k,className:at(T.root,l),ref:n},I,{children:B}))});process.env.NODE_ENV!=="production"&&(qC.propTypes={alt:c.string,children:c.node,classes:c.object,className:c.string,component:c.elementType,imgProps:c.object,sizes:c.string,src:c.string,srcSet:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["circular","rounded","square"]),c.string])});const b3=qC,Ut=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}};function v3({theme:e,color:t,type:n}){const r=Ut(e,t),{lighter:i,light:a,main:l,contrastText:A}=r;switch(n){case"filled":return{color:A,backgroundColor:l};case"outlined":return{color:l,border:"1px solid",borderColor:l,backgroundColor:"transparent"};case"combined":return{color:l,border:"1px solid",borderColor:a,backgroundColor:i};default:return{color:l,backgroundColor:i}}}function x3(e){switch(e){case"badge":return{border:"2px solid",fontSize:"0.675rem",width:20,height:20};case"xs":return{fontSize:"0.75rem",width:24,height:24};case"sm":return{fontSize:"0.875rem",width:32,height:32};case"lg":return{fontSize:"1.2rem",width:52,height:52};case"xl":return{fontSize:"1.5rem",width:64,height:64};case"md":default:return{fontSize:"1rem",width:40,height:40}}}const w3=le(b3,{shouldForwardProp:e=>e!=="color"&&e!=="type"&&e!=="size"})(({theme:e,variant:t,color:n,type:r,size:i})=>({...x3(i),...v3({variant:t,theme:e,color:n,type:r}),...i==="badge"&&{borderColor:e.palette.background.default}}));function Ra({variant:e="circular",children:t,color:n="primary",type:r,size:i="md",...a}){const l=lt();return g.jsx(w3,{variant:e,theme:l,color:n,type:r,size:i,...a,children:t})}Ra.propTypes={children:c.node,color:c.string,type:c.string,size:c.string,variant:c.string};const ja=({color:e,size:t,variant:n,sx:r})=>{const i=lt(),a=Ut(i,e||"primary"),{main:l}=a;return g.jsx(b.Box,{component:"span",sx:{width:t||8,height:t||8,borderRadius:"50%",bgcolor:n==="outlined"?"":l,...n==="outlined"&&{border:`1px solid ${l}`},...r}})};ja.propTypes={color:c.string,size:c.number,variant:c.string,sx:c.oneOfType([c.object,c.string])};function T3(e){return Rt("MuiIconButton",e)}const P3=zt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),S3=["edge","children","className","color","disabled","disableFocusRipple","size"],O3=e=>{const{classes:t,disabled:n,color:r,edge:i,size:a}=e,l={root:["root",n&&"disabled",r!=="default"&&`color${be(r)}`,i&&`edge${be(i)}`,`size${be(a)}`]};return An(l,T3,t)},M3=le(zc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${be(n.color)}`],n.edge&&t[`edge${be(n.edge)}`],t[`size${be(n.size)}`]]}})(({theme:e,ownerState:t})=>q({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return q({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&q({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":q({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${P3.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),_C=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:l,color:A="default",disabled:d=!1,disableFocusRipple:f=!1,size:h="medium"}=r,E=_e(r,S3),C=q({},r,{edge:i,color:A,disabled:d,disableFocusRipple:f,size:h}),I=O3(C);return g.jsx(M3,q({className:at(I.root,l),centerRipple:!0,focusRipple:!f,disabled:d,ref:n,ownerState:C},E,{children:a}))});process.env.NODE_ENV!=="production"&&(_C.propTypes={children:vr(c.node,e=>K.Children.toArray(e.children).some(n=>K.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
170
+ `)),K.isValidElement(R))).map((R,_)=>g.jsx("li",{className:k.li,children:R},`child-${_}`));return g.jsx(Mv,q({ref:n,component:l,color:"text.secondary",className:at(k.root,a),ownerState:D},B,{children:g.jsx(Dv,{className:k.ol,ref:S,ownerState:D,children:Fv(Q||C&&V.length<=C?V:O(V),k.separator,I,D)})}))});process.env.NODE_ENV!=="production"&&(Nf.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,expandText:c.string,itemsAfterCollapse:wi,itemsBeforeCollapse:wi,maxItems:wi,separator:c.node,slotProps:c.shape({collapsedIcon:c.oneOfType([c.func,c.object])}),slots:c.shape({CollapsedIcon:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const Wc=Nf,Lv=({id:e,title:t,icon:n,url:r,last:i})=>{const a=n||Ze.ApartmentOutlined;return g.jsxs(b.Typography,{component:ut.Link,to:r,variant:i?"subtitle1":"h6",sx:{textDecoration:"none",display:"inline-flex",alignItems:"center"},color:"textSecondary",children:[n&&g.jsx(a,{style:{marginRight:8,fontSize:"0.875rem"}}),t]},e)},ea=({home:e,card:t,divider:n=!0,icon:r,icons:i,maxItems:a,navigation:l,rightAlign:A,separator:d,title:f,titleBottom:h,sx:E,breadcrumbs:C,mode:I,...B})=>{const Q=lt(),y=ut.useLocation(),[D,k]=P.useState(),[T,S]=P.useState();let O=y.pathname;const V={marginRight:Q.spacing(.75),marginTop:`-${Q.spacing(.25)}`,width:"1rem",height:"1rem",color:Q.palette.secondary.main},R=$=>{$.children&&$.children.filter(z=>(z.type&&z.type==="collapse"?(R(z),z.url===O&&(k(z),S(z))):z.type&&z.type==="item"&&O.includes(z.url)&&(k($),S(z)),!1))};P.useEffect(()=>{var $;($=l==null?void 0:l.items)==null||$.map(z=>(z.type&&z.type==="group"&&R(z),!1))});const _=d,Z=d?g.jsx(_,{style:{fontSize:"0.75rem",marginTop:2}}):"/",Y={mb:2,bgcolor:t===!1?"transparent":"inherit",...E,[Q.breakpoints.down("sm")]:{mb:1}};let re,de,pe=g.jsx(b.Typography,{}),J="",X,U;return I==="breadcrumbs"?g.jsxs(xn,{border:t,sx:Y,...B,content:t,shadow:"none",children:[g.jsxs(b.Grid,{container:!0,direction:A?"row":"column",justifyContent:A?"space-between":"flex-start",alignItems:A?"center":"flex-start",spacing:1,children:[f&&!h&&g.jsx(b.Grid,{item:!0,children:g.jsx(b.Typography,{variant:"h2",children:T.title})}),g.jsx(b.Grid,{item:!0,children:g.jsxs(Wc,{"aria-label":"breadcrumb",maxItems:a||8,separator:Z,sx:{[Q.breakpoints.down("sm")]:{mt:1}},children:[e!==!1&&g.jsxs(b.Typography,{component:ut.Link,to:"/",color:"textSecondary",variant:"h6",sx:{textDecoration:"none"},children:[i&&g.jsx(Ze.HomeOutlined,{style:V}),r&&!i&&g.jsx(Ze.HomeFilled,{style:{...V,marginRight:0}}),(!r||i)&&e]}),C.map(Lv)]})}),f&&h&&g.jsx(b.Grid,{item:!0,sx:{mt:t===!1?.25:1},children:g.jsx(b.Typography,{variant:"h2",children:T.title})})]}),t===!1&&n!==!1&&g.jsx(b.Divider,{sx:{mt:2}})]}):(D&&D.type==="collapse"&&D.breadcrumbs===!0&&(X=D.icon?D.icon:Ze.ApartmentOutlined,re=g.jsxs(b.Typography,{component:ut.Link,to:(T==null?void 0:T.url)||document.location.pathname,variant:"h6",sx:{textDecoration:"none"},color:"textSecondary",children:[i&&g.jsx(X,{style:V}),D.title]}),pe=g.jsxs(xn,{border:t,sx:Y,...B,content:t,shadow:"none",children:[g.jsxs(b.Grid,{container:!0,direction:A?"row":"column",justifyContent:A?"space-between":"flex-start",alignItems:A?"center":"flex-start",spacing:1,children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(Wc,{"aria-label":"breadcrumb",maxItems:a||8,separator:Z,children:[e!==!1&&g.jsxs(b.Typography,{component:ut.Link,to:"/",color:"textSecondary",variant:"h6",sx:{textDecoration:"none"},children:[i&&g.jsx(Ze.HomeOutlined,{style:V}),r&&!i&&g.jsx(Ze.HomeFilled,{style:{...V,marginRight:0}}),(!r||i)&&e]}),re]})}),f&&h&&g.jsx(b.Grid,{item:!0,sx:{mt:t===!1?.25:1},children:g.jsx(b.Typography,{variant:"h2",children:D.title})})]}),t===!1&&n!==!1&&g.jsx(b.Divider,{sx:{mt:2}})]})),T&&T.type==="item"&&(J=T.title,U=T.icon?T.icon:Ze.ApartmentOutlined,de=g.jsxs(b.Typography,{variant:"subtitle1",color:"textPrimary",component:ut.Link,to:T.url,sx:{textDecoration:"none"},children:[i&&g.jsx(U,{style:V}),J]}),T.breadcrumbs!==!1&&(pe=g.jsxs(xn,{border:t,sx:{mb:3,bgcolor:t===!1?"transparent":"inherit",...E,[Q.breakpoints.down("sm")]:{mb:1}},...B,content:t,shadow:"none",children:[g.jsxs(b.Grid,{container:!0,direction:A?"row":"column",justifyContent:A?"space-between":"flex-start",alignItems:A?"center":"flex-start",spacing:1,children:[f&&!h&&g.jsx(b.Grid,{item:!0,children:g.jsx(b.Typography,{variant:"h2",children:T.title})}),g.jsx(b.Grid,{item:!0,children:g.jsxs(Wc,{"aria-label":"breadcrumb",maxItems:a||8,separator:Z,children:[e!==!1&&g.jsxs(b.Typography,{component:ut.Link,to:"/",color:"textSecondary",variant:"h6",sx:{textDecoration:"none"},children:[i&&g.jsx(Ze.HomeOutlined,{style:V}),r&&!i&&g.jsx(Ze.HomeFilled,{style:{...V,marginRight:0}}),(!r||i)&&e]}),re,de]})}),f&&h&&g.jsx(b.Grid,{item:!0,sx:{mt:t===!1?.25:1},children:g.jsx(b.Typography,{variant:"h2",children:T.title})})]}),t===!1&&n!==!1&&g.jsx(b.Divider,{sx:{mt:2}})]}))),pe)};ea.defaultProps={home:"Home",mode:"navigation"},ea.propTypes={home:c.oneOfType([c.string,c.bool]),card:c.bool,divider:c.bool,icon:c.bool,icons:c.bool,maxItems:c.number,navigation:c.object,rightAlign:c.bool,separator:c.oneOfType([c.func,c.object]),title:c.bool,titleBottom:c.bool,sx:c.oneOfType([c.object,c.string]),breadcrumbs:c.arrayOf(No),mode:c.oneOf(["navigation","breadcrumbs"])};const Nv=So(w.Toolbar,{name:"RaApplicaToolbar",slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}})),ar=e=>g.jsx(Nv,{...e});ar.defaultProps={...w.Toolbar.defaultProps},ar.propTypes={...w.Toolbar.propTypes};const Uc=({children:e,content:t,title:n,subheader:r,secondary:i,toolbar:a,...l})=>{const A=w.useTranslate(),d=w.useResourceContext(),{cardTitle:f,cardSubheader:h}=P.useMemo(()=>{const E=n||`resources.${d}.title`;return{cardTitle:A(E,{_:E}),cardSubheader:r!==null?A(r,{_:r}):null}},[d,r,n,A]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(xn,{content:t,title:f,subheader:h,secondary:i,divider:!0,children:g.jsxs(P.Fragment,{children:[e,a===!0?g.jsx(ar,{children:g.jsx(w.SaveButton,{})}):a]})})})};Uc.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},Uc.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const Rv=le(w.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),ta=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:i}=Dt();return g.jsx(Rv,{defaultValues:n,spacing:t||i,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||i,children:e})})};ta.propTypes={...b.Grid.propTypes,...w.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},ta.defaultProps={...b.Stack.defaultProps},ta.Section=Uc;const jv=So(w.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),na=({title:e,modal:t,content:n,subheader:r,secondary:i,sx:a,...l})=>{const A=Bf(e),d=w.useRecordContext();return g.jsx(xn,{content:n,title:A,subheader:r,secondary:d!=null&&d.id?i:null,sx:a,border:!t,divider:!0,children:g.jsx(jv,{toolbar:g.jsx(ar,{}),...l})})};na.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(ar,{children:g.jsx(w.SaveButton,{type:"button"})}),secondary:g.jsx(Lo,{children:g.jsx(w.DeleteWithConfirmButton,{})})},na.propTypes={...w.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const ra=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...A})=>{const d=Mt.useTheme(),{getCurrentDialog:f}=no(),{source:h,resource:E,isRequired:C}=A,{getFieldState:I,formState:B}=Ts.useFormContext(),{error:Q}=I(h,B),y=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:Q?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:!!Q,sx:{borderBottom:l?`1px solid ${d.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(w.FieldTitle,{label:e,source:h,resource:y||E,isRequired:C})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...A,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!Q,children:r})]})};ra.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},ra.defaultProps={display:"label",divider:!1};const Vv=le(w.ArrayInput,{name:"ApplicaArrayInput",slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}})),Hv=({label:e,addLabel:t,source:n,helperText:r,divider:i=!0,...a})=>g.jsx(ra,{label:e,addLabel:t,source:n,helperText:r,divider:i,children:g.jsx(Vv,{source:n,label:!1,...a})}),Gc=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(Lo,{children:[e&&g.jsx(w.EditButton,{}),t&&g.jsx(w.DeleteWithConfirmButton,{}),n&&g.jsx(w.CloneButton,{})]});Gc.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},Gc.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Rf=le("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),zv=le("ul")({display:"inline-block"}),jf=e=>{var h;const{className:t,emptyText:n,source:r,title:i,...a}=e,l=Pe.useRecordContext(e),A=ot.get(l,r),d=Pe.useTranslate();if(!A)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...a,children:n&&d(n,{_:n})}):g.jsx(Rf,{className:t,...a});if(Array.isArray(A))return g.jsx(zv,{className:t,...a,children:A.map((E,C)=>{var B;const I=i instanceof String?(B=ot.get(E,i))==null?void 0:B.toString():i;return g.jsx("li",{children:I},C)})});const f=i instanceof String?(h=ot.get(l,i))==null?void 0:h.toString():i;return g.jsx(Rf,{className:t,...a,children:f})};jf.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var Vf={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vn,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",l="second",A="minute",d="hour",f="day",h="week",E="month",C="quarter",I="year",B="date",Q="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(J){var X=["th","st","nd","rd"],U=J%100;return"["+J+(X[(U-20)%10]||X[U]||X[0])+"]"}},T=function(J,X,U){var $=String(J);return!$||$.length>=X?J:""+Array(X+1-$.length).join(U)+J},S={s:T,z:function(J){var X=-J.utcOffset(),U=Math.abs(X),$=Math.floor(U/60),z=U%60;return(X<=0?"+":"-")+T($,2,"0")+":"+T(z,2,"0")},m:function J(X,U){if(X.date()<U.date())return-J(U,X);var $=12*(U.year()-X.year())+(U.month()-X.month()),z=X.clone().add($,E),oe=U-z<0,W=X.clone().add($+(oe?-1:1),E);return+(-($+(U-z)/(oe?z-W:W-z))||0)},a:function(J){return J<0?Math.ceil(J)||0:Math.floor(J)},p:function(J){return{M:E,y:I,w:h,d:f,D:B,h:d,m:A,s:l,ms:a,Q:C}[J]||String(J||"").toLowerCase().replace(/s$/,"")},u:function(J){return J===void 0}},O="en",V={};V[O]=k;var R="$isDayjsObject",_=function(J){return J instanceof de||!(!J||!J[R])},Z=function J(X,U,$){var z;if(!X)return O;if(typeof X=="string"){var oe=X.toLowerCase();V[oe]&&(z=oe),U&&(V[oe]=U,z=oe);var W=X.split("-");if(!z&&W.length>1)return J(W[0])}else{var H=X.name;V[H]=X,z=H}return!$&&z&&(O=z),z||!$&&O},Y=function(J,X){if(_(J))return J.clone();var U=typeof X=="object"?X:{};return U.date=J,U.args=arguments,new de(U)},re=S;re.l=Z,re.i=_,re.w=function(J,X){return Y(J,{locale:X.$L,utc:X.$u,x:X.$x,$offset:X.$offset})};var de=function(){function J(U){this.$L=Z(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[R]=!0}var X=J.prototype;return X.parse=function(U){this.$d=function($){var z=$.date,oe=$.utc;if(z===null)return new Date(NaN);if(re.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var W=z.match(y);if(W){var H=W[2]-1||0,se=(W[7]||"0").substring(0,3);return oe?new Date(Date.UTC(W[1],H,W[3]||1,W[4]||0,W[5]||0,W[6]||0,se)):new Date(W[1],H,W[3]||1,W[4]||0,W[5]||0,W[6]||0,se)}}return new Date(z)}(U),this.init()},X.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},X.$utils=function(){return re},X.isValid=function(){return this.$d.toString()!==Q},X.isSame=function(U,$){var z=Y(U);return this.startOf($)<=z&&z<=this.endOf($)},X.isAfter=function(U,$){return Y(U)<this.startOf($)},X.isBefore=function(U,$){return this.endOf($)<Y(U)},X.$g=function(U,$,z){return re.u(U)?this[$]:this.set(z,U)},X.unix=function(){return Math.floor(this.valueOf()/1e3)},X.valueOf=function(){return this.$d.getTime()},X.startOf=function(U,$){var z=this,oe=!!re.u($)||$,W=re.p(U),H=function(Ie,Be){var Fe=re.w(z.$u?Date.UTC(z.$y,Be,Ie):new Date(z.$y,Be,Ie),z);return oe?Fe:Fe.endOf(f)},se=function(Ie,Be){return re.w(z.toDate()[Ie].apply(z.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(Be)),z)},fe=this.$W,ce=this.$M,ge=this.$D,he="set"+(this.$u?"UTC":"");switch(W){case I:return oe?H(1,0):H(31,11);case E:return oe?H(1,ce):H(0,ce+1);case h:var Qe=this.$locale().weekStart||0,ye=(fe<Qe?fe+7:fe)-Qe;return H(oe?ge-ye:ge+(6-ye),ce);case f:case B:return se(he+"Hours",0);case d:return se(he+"Minutes",1);case A:return se(he+"Seconds",2);case l:return se(he+"Milliseconds",3);default:return this.clone()}},X.endOf=function(U){return this.startOf(U,!1)},X.$set=function(U,$){var z,oe=re.p(U),W="set"+(this.$u?"UTC":""),H=(z={},z[f]=W+"Date",z[B]=W+"Date",z[E]=W+"Month",z[I]=W+"FullYear",z[d]=W+"Hours",z[A]=W+"Minutes",z[l]=W+"Seconds",z[a]=W+"Milliseconds",z)[oe],se=oe===f?this.$D+($-this.$W):$;if(oe===E||oe===I){var fe=this.clone().set(B,1);fe.$d[H](se),fe.init(),this.$d=fe.set(B,Math.min(this.$D,fe.daysInMonth())).$d}else H&&this.$d[H](se);return this.init(),this},X.set=function(U,$){return this.clone().$set(U,$)},X.get=function(U){return this[re.p(U)]()},X.add=function(U,$){var z,oe=this;U=Number(U);var W=re.p($),H=function(ce){var ge=Y(oe);return re.w(ge.date(ge.date()+Math.round(ce*U)),oe)};if(W===E)return this.set(E,this.$M+U);if(W===I)return this.set(I,this.$y+U);if(W===f)return H(1);if(W===h)return H(7);var se=(z={},z[A]=r,z[d]=i,z[l]=n,z)[W]||1,fe=this.$d.getTime()+U*se;return re.w(fe,this)},X.subtract=function(U,$){return this.add(-1*U,$)},X.format=function(U){var $=this,z=this.$locale();if(!this.isValid())return z.invalidDate||Q;var oe=U||"YYYY-MM-DDTHH:mm:ssZ",W=re.z(this),H=this.$H,se=this.$m,fe=this.$M,ce=z.weekdays,ge=z.months,he=z.meridiem,Qe=function(Be,Fe,ae,Ge){return Be&&(Be[Fe]||Be($,oe))||ae[Fe].slice(0,Ge)},ye=function(Be){return re.s(H%12||12,Be,"0")},Ie=he||function(Be,Fe,ae){var Ge=Be<12?"AM":"PM";return ae?Ge.toLowerCase():Ge};return oe.replace(D,function(Be,Fe){return Fe||function(ae){switch(ae){case"YY":return String($.$y).slice(-2);case"YYYY":return re.s($.$y,4,"0");case"M":return fe+1;case"MM":return re.s(fe+1,2,"0");case"MMM":return Qe(z.monthsShort,fe,ge,3);case"MMMM":return Qe(ge,fe);case"D":return $.$D;case"DD":return re.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Qe(z.weekdaysMin,$.$W,ce,2);case"ddd":return Qe(z.weekdaysShort,$.$W,ce,3);case"dddd":return ce[$.$W];case"H":return String(H);case"HH":return re.s(H,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return Ie(H,se,!0);case"A":return Ie(H,se,!1);case"m":return String(se);case"mm":return re.s(se,2,"0");case"s":return String($.$s);case"ss":return re.s($.$s,2,"0");case"SSS":return re.s($.$ms,3,"0");case"Z":return W}return null}(Be)||W.replace(":","")})},X.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},X.diff=function(U,$,z){var oe,W=this,H=re.p($),se=Y(U),fe=(se.utcOffset()-this.utcOffset())*r,ce=this-se,ge=function(){return re.m(W,se)};switch(H){case I:oe=ge()/12;break;case E:oe=ge();break;case C:oe=ge()/3;break;case h:oe=(ce-fe)/6048e5;break;case f:oe=(ce-fe)/864e5;break;case d:oe=ce/i;break;case A:oe=ce/r;break;case l:oe=ce/n;break;default:oe=ce}return z?oe:re.a(oe)},X.daysInMonth=function(){return this.endOf(E).$D},X.$locale=function(){return V[this.$L]},X.locale=function(U,$){if(!U)return this.$L;var z=this.clone(),oe=Z(U,$,!0);return oe&&(z.$L=oe),z},X.clone=function(){return re.w(this.$d,this)},X.toDate=function(){return new Date(this.valueOf())},X.toJSON=function(){return this.isValid()?this.toISOString():null},X.toISOString=function(){return this.$d.toISOString()},X.toString=function(){return this.$d.toUTCString()},J}(),pe=de.prototype;return Y.prototype=pe,[["$ms",a],["$s",l],["$m",A],["$H",d],["$W",f],["$M",E],["$y",I],["$D",B]].forEach(function(J){pe[J[1]]=function(X){return this.$g(X,J[0],J[1])}}),Y.extend=function(J,X){return J.$i||(J(X,de,Y),J.$i=!0),Y},Y.locale=Z,Y.isDayjs=_,Y.unix=function(J){return Y(1e3*J)},Y.en=V[O],Y.Ls=V,Y.p={},Y})})(Vf);var Wv=Vf.exports;const lr=xo(Wv),Yc=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...i})=>{const[a,l]=P.useState(null),A=w.useRecordContext(i),d=w.useDataProvider(),f=w.useResourceContext(),h=P.useCallback(async I=>{I.preventDefault(),I.stopPropagation();const B=ot.get(A,i==null?void 0:i.source),Q=f.replace("entities/",""),y=await d.getFile(`/attachments/${Q}/${e||(A==null?void 0:A.id)}/${t||(i==null?void 0:i.source)}/${(B==null?void 0:B.id)||(A==null?void 0:A.id)}`),D=document.createElement("a");D.href=y,D.download=ot.get(A,(i==null?void 0:i.title)||(i==null?void 0:i.source)),D.click()},[d,A,e,f,t,i==null?void 0:i.source,i==null?void 0:i.title]),E=P.useMemo(()=>({...A,[i==null?void 0:i.source]:(A==null?void 0:A.src)||ot.get(A,i==null?void 0:i.source),[i==null?void 0:i.title]:(A==null?void 0:A.title)||ot.get(A,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),[A,i==null?void 0:i.source,i==null?void 0:i.title]),C=w.useTranslate();return P.useEffect(()=>{!A||!(A!=null&&A.userId)||d.getOne(r,{id:A==null?void 0:A.userId}).then(({data:I})=>l(I)).catch(()=>l(null))},[A,d,r]),g.jsx(jf,{...i,disabled:n,record:E,onClick:h,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:ot.get(E,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[ot.get(E,"sizeDescription"),a&&" | ",a&&C("ra.attachment.info",{user:a==null?void 0:a.name,created:lr(E==null?void 0:E.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};Yc.propTypes={...w.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const Uv=le(w.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Ni=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(Uv,{...e,source:t})};Ni.propTypes={...w.ImageField.propTypes,source:c.string};const oa=({width:e,height:t,circle:n,justify:r,record:i,...a})=>{const l=P.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),A=w.useRecordContext(),d=i||A;return g.jsx(Ni,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:d})};oa.defaultProps={...Ni.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},oa.propTypes={...Ni.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var Hf={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vn,function(){return function(n,r,i){n=n||{};var a=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function A(f,h,E,C){return a.fromToBase(f,h,E,C)}i.en.relativeTime=l,a.fromToBase=function(f,h,E,C,I){for(var B,Q,y,D=E.$locale().relativeTime||l,k=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=k.length,S=0;S<T;S+=1){var O=k[S];O.d&&(B=C?i(f).diff(E,O.d,!0):E.diff(f,O.d,!0));var V=(n.rounding||Math.round)(Math.abs(B));if(y=B>0,V<=O.r||!O.r){V<=1&&S>0&&(O=k[S-1]);var R=D[O.l];I&&(V=I(""+V)),Q=typeof R=="string"?R.replace("%d",V):R(V,h,O.l,y);break}}if(h)return Q;var _=y?D.future:D.past;return typeof _=="function"?_(Q):_.replace("%s",Q)},a.to=function(f,h){return A(f,h,this,!0)},a.from=function(f,h){return A(f,h,this)};var d=function(f){return f.$u?i.utc():i()};a.toNow=function(f){return this.to(d(this),f)},a.fromNow=function(f){return this.from(d(this),f)}}})})(Hf);var Gv=Hf.exports;const Yv=xo(Gv);lr.extend(Yv);const ia=e=>{const t=w.useRecordContext(e),[n]=w.useLocaleState(),r=P.useMemo(()=>lr(ot.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(P.Fragment,{children:[g.jsx(w.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};ia.displayName="DateAgoField",ia.propTypes={source:c.string.isRequired};const zf=le(w.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));zf.propTypes={...w.DateField.propTypes};const Kc=e=>g.jsx(zf,{...e});Kc.defaultProps={...w.DateField.defaultProps,variant:"body1"},Kc.propTypes={...w.DateField.propTypes};const Wf=le(w.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Wf.propTypes={...w.EmailField.propTypes};const qc=e=>g.jsx(Wf,{...e});qc.defaultProps={...w.EmailField.defaultProps,variant:"body1"},qc.propTypes={...w.EmailField.propTypes};const Kv=le(w.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),_c=({...e})=>{const t=w.useRecordContext(e),n=P.useCallback(r=>{r.preventDefault(),r.stopPropagation();const i=ot.get(t,`_${e==null?void 0:e.source}`,ot.get(t,e==null?void 0:e.source)),a=ot.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=i,l.download=a,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(Kv,{...e,record:t,onClick:n})};_c.propTypes={...w.FileField.propTypes,source:c.string,title:c.string};const Uf=e=>g.jsx(w.FunctionField,{...e});Uf.defaultProps={variant:"body1"};const qv=le("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),Jc=({source:e,defaultValue:t,...n})=>{const r=w.useRecordContext(n),i=ot.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:i&&i!==null?i:t}})};Jc.propTypes={defaultValue:c.any,source:c.string,record:c.object},Jc.defaultProps={defaultValue:"&nbsp;"};const Gf=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;Gf.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const Xc=({label:e,source:t,defaultValue:n,children:r,tooltip:i,...a})=>{const{getCurrentDialog:l}=no(),A=w.useRecordContext(a),d=w.useResourceContext(a),f=l(),h=P.useMemo(()=>!i||i===!1?!1:typeof i=="function"?i(A):typeof i=="string"?ot.get(A,i,i):i,[A,i]);return g.jsx(Gf,{title:h,children:g.jsxs(P.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(w.FieldTitle,{label:e,source:t,resource:f||d})}),g.jsx(qv,{...a,children:P.cloneElement(r,{source:t,record:A,defaultValue:n,resource:f||d})})]})})};Xc.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},Xc.defaultProps={defaultValue:"&nbsp;",children:g.jsx(Jc,{})};const _v=So("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2.5),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),Vo=e=>g.jsx(_v,{children:g.jsx(w.ReferenceManyField,{...e})});Vo.defaultProps={...w.ReferenceManyField.defaultProps,margin:!1,border:!1},Vo.propTypes={...w.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Yf=({source:e,...t})=>{const n=w.useRecordContext(t),r=ot.get(n,e,0),i=r/1024,a=i/1024,l=a/1024,A=l>1?`${l.toFixed(2)} GB`:a>1?`${a.toFixed(2)} MB`:i>1?`${i.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:A})};Yf.propTypes={record:c.object,source:c.string};const Kf=le(w.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));Kf.propTypes={...w.TextField.propTypes};const Zc=e=>g.jsx(Kf,{...e});Zc.defaultProps={...w.TextField.defaultProps,variant:"body1"},Zc.propTypes={...w.TextField.propTypes};const it=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...A})=>{const d=Mt.useTheme(),{getCurrentDialog:f}=no(),{source:h,resource:E,isRequired:C}=A,{fieldState:{invalid:I}}=w.useInput(A),B=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:A!=null&&A.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:I?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:I===!0,sx:{borderBottom:l?`1px solid ${d.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(w.FieldTitle,{label:e,source:h,resource:B||E,isRequired:C})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...A,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:I===!0,children:r})]})};it.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},it.defaultProps={display:"label",divider:!1};const Jv=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},Xv=le(w.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...Jv(e)})),$c=({children:e,disabled:t,type:n,...r})=>{const i=w.useRecordContext(r),a=r==null?void 0:r.source,l=i==null?void 0:i.id;return w.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(it,{...r,children:g.jsx(Xv,{disabled:t,children:P.cloneElement(e,{...e.props,entityId:l,property:a})})})};$c.propTypes={...w.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},$c.defaultProps={children:g.jsx(Yc,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const Zv=le(w.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px",marginTop:"-4px"}})),qf=({...e})=>g.jsx(it,{...e,children:g.jsx(Zv,{})});qf.propTypes={...w.AutocompleteArrayInput.propTypes,...it.propTypes};const $v=le(w.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px",marginTop:"-4px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),_f=e=>{const{perPage:t,...n}=e;return g.jsx(it,{...n,children:g.jsx($v,{})})};_f.propTypes={...w.AutocompleteInput.propTypes,...it.propTypes};const e1=le(w.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),eA=({horizontal:e,...t})=>{const n=lt();return g.jsx(it,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(e1,{})})};eA.defaultProps={...w.BooleanInput.defaultProps,...it.defaultProps},eA.propTypes={...w.BooleanInput.propTypes,...it.propTypes,horizontal:c.bool};const t1=le(w.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),tA=e=>g.jsx(it,{...e,children:g.jsx(t1,{})});tA.propTypes={...w.DateInput.propTypes,...it.propTypes},tA.defaultProps={...w.DateInput.defaultProps,...it.defaultProps};const n1=le(w.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),nA=e=>g.jsx(it,{...e,children:g.jsx(n1,{})});nA.propTypes={...w.DateTimeInput.propTypes,...it.propTypes},nA.defaultProps={...it.defaultProps};const r1=le(w.FileInput,{name:"RaApplicaFileInput",slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}})),rA=({children:e,title:t,...n})=>{const r=Ts.useWatch({name:n.source}),i=w.useRecordContext(n),{source:a}=n,l=P.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const A=ot.get(i,a);if(A){const d=A.split("__");return d.length>0?d[d.length-1]:A}return A},[i,a,r]);return g.jsx(it,{...n,children:g.jsx(r1,{children:P.cloneElement(e,{...e.props,title:t||a,source:a,record:{...i,[a]:(r==null?void 0:r.title)||ot.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||ot.get(i,`_${a}`),[t||a]:l}})})})};rA.propTypes={...w.FileInput.propTypes,source:c.string,title:c.string,children:c.node},rA.defaultProps={children:g.jsx(_c,{})};const oA=({children:e,title:t,...n})=>{const r=Ts.useWatch({name:n.source}),i=w.useRecordContext(n),{source:a}=n;return w.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(it,{...n,children:g.jsx(w.ImageInput,{accept:"image/*",children:P.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(r==null?void 0:r.title)||ot.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||ot.get(i,`_${a}`)}})})})};oA.defaultProps={children:g.jsx(oa,{}),multiple:!1},oA.propTypes={...w.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const o1=le(w.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),iA=e=>g.jsx(it,{...e,children:g.jsx(o1,{})});iA.propTypes={...w.NumberInput.propTypes,...it.propTypes},iA.defaultProps={...w.NumberInput.defaultProps,...it.defaultProps};const Jf=({source:e,minWidth:t=300,children:n})=>{const r=w.useResourceContext(),i=w.useRecordContext(),[a,l]=P.useState(ot.get(i,e,"")),[A,d]=P.useState(!1),f=P.useCallback(B=>l(B.target.value),[]),h=w.useDataProvider(),E=P.useCallback(B=>{B.key==="Enter"&&(d(!0),h.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>d(!1)))},[a,h,r,i,e]),C=P.useCallback(()=>{ot.get(i,e)!==a&&(d(!0),h.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>d(!1)))},[a,h,r,e,i]),I=P.useCallback(B=>{d(!0),h.update(r,{id:i.id,data:{...i,[e]:B,_changed:e}}).then(()=>d(!1))},[h,r,e,i]);return P.useEffect(()=>l(ot.get(i,e)),[i,e]),n?P.cloneElement(n,{...n.props,source:e,value:a,onChange:I}):g.jsx(b.TextField,{value:a,disabled:A,onChange:f,onKeyPress:E,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Jf.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const sA=({children:e,...t})=>g.jsx(w.ReferenceArrayInput,{...t,children:P.cloneElement(e,{...t,source:e.props.source||t.source})});sA.propTypes={...w.ReferenceArrayInput.propTypes,children:c.element},sA.defaultProps={...w.ReferenceArrayInput.defaultProps};const aA=({children:e,...t})=>g.jsx(w.ReferenceInput,{...t,children:P.cloneElement(e,{...t,source:e.props.source||t.source})});aA.propTypes={...w.ReferenceInput.propTypes,children:c.element},aA.defaultProps={...w.ReferenceInput.defaultProps};const lA=({reference:e,target:t,children:n,filters:r,actions:i,...a})=>g.jsx(w.ResourceContextProvider,{value:e,children:g.jsx(Vo,{perPage:5,pagination:g.jsx(w.Pagination,{}),...a,reference:e,target:t,children:g.jsxs(P.Fragment,{children:[g.jsx(w.ListToolbar,{filters:r,actions:i}),n]})})});lA.propTypes={...Vo.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},lA.defaultProps={...Vo.defaultProps};const i1=le(w.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),s1=e=>g.jsx(i1,{...e}),Xf=le(w.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Xf.propTypes={...w.SelectArrayInput.propTypes};const cA=e=>g.jsx(it,{...e,children:g.jsx(Xf,{options:{autoWidth:!1}})});cA.defaultProps={optionText:"name",optionValue:"id"},cA.propTypes={...w.SelectArrayInput.propTypes,...it.propTypes};const a1=le(w.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),Zf=e=>g.jsx(it,{...e,children:g.jsx(a1,{})});Zf.propTypes={...w.SelectInput.propTypes,...it.propTypes};const Tn=e=>g.jsx(it,{...e,children:g.jsx(w.TextInput,{})});Tn.propTypes={...w.TextInput.propTypes,...it.propTypes};const sa=({...e})=>{var A,d;const t=w.useTranslate(),n=w.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(d=(A=Ts.useController({name:e==null?void 0:e.source}))==null?void 0:A.field)==null?void 0:d.value;let i=e.helperText,a=e.validate;a?Array.isArray(a)&&a.indexOf(n)===-1&&a.push(n):a=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(i=i&&i.length>0?`${l} - ${t(i)}`:l),g.jsx(Tn,{...e,validate:a,helperText:i})};sa.displayName="SmartTextInput",sa.defaultProps={multiline:!1},sa.propTypes={...Tn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const $f=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return lr().hour(n).minute(r)};function l1(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const c1=e=>{if(!e)return"";const t=$f(e);return t?t.format("HH:mm"):""},A1=e=>e,u1=le(w.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),AA=e=>g.jsx(it,{...e,children:g.jsx(u1,{})});AA.defaultProps={...w.TimeInput.defaultProps,format:c1,parse:A1},AA.propTypes={...w.TimeInput.propTypes,...it.propTypes};const uA=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Dt(),[r,i]=P.useState(!1),a=Pe.useAuthProvider(),l=Pe.useTranslate(),A=Pe.useNotify(),d=P.useCallback(f=>{const{oldPassword:h,newPassword:E}=f;i(!0),a==null||a.changePassword(h,E).then(()=>{A("ra.auth.password_changed"),e()}).catch(C=>A(C,{type:"error"})).finally(()=>i(!1))},[a,e]);return g.jsx(Pe.ResourceContextProvider,{value:"user/change-password",children:g.jsx(Pe.EditContextProvider,{value:{record:{},resource:"user/change-password",save:d},children:g.jsx(na,{onSubmit:d,toolbar:g.jsx(ar,{children:g.jsx(w.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Tn,{source:"oldPassword",type:"password",validate:Pe.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Tn,{source:"newPassword",type:"password",validate:Pe.required()})})]})})})})},d1=le(w.Create,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default,"& .RaToolbar-mobileToolbar":{backgroundColor:"yellow"}},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),g1=le(w.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),f1=le(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),p1=le(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`})),dA=({title:e,divider:t,variant:n})=>{const r=w.useTranslate();return g.jsxs(P.Fragment,{children:[g.jsx(f1,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(p1,{})]})};dA.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},dA.defaultProps={divider:!0,variant:"h4"};const aa=c.shape({xl:c.number,lg:c.number,md:c.number,sm:c.number,xs:c.number}),h1=le("div")(({theme:e})=>({marginBottom:e.spacing(2)})),la=({children:e,visibility:t})=>b.useMediaQuery(r=>r.breakpoints.up(t))?g.jsx(h1,{children:e}):null;la.propTypes={visibility:c.oneOf(["xl","lg","md","sm","xs"]),position:c.oneOf(["top","bottom"]).isRequired,children:c.node.isRequired},la.defaultProps={position:"top",visibility:"md"};const C1={display:"none"},ca=({intent:e,hidden:t,unmountOnExit:n,label:r,icon:i,value:a,syncWithLocation:l,selected:A,onChange:d,children:f,badgeColor:h,badgeContent:E,...C})=>{const I=w.useTranslate(),B=br.useLocation(),Q={component:ut.Link,to:{...B,pathname:a}},y=P.isValidElement(r)?r:I(r,{_:r}),D=P.useCallback(()=>d(a),[d,a]);return e==="header"?(()=>g.jsxs(b.ListItemButton,{selected:A,...l?Q:{},onClick:D,children:[i&&g.jsx(b.ListItemIcon,{children:i}),g.jsx(b.ListItemText,{primary:y}),E&&g.jsx(b.ListItemSecondaryAction,{children:g.jsx(b.Avatar,{sx:{width:24,height:24,fontSize:12,backgroundColor:S=>{var O;return(O=S.palette[h])==null?void 0:O.main},color:S=>{var O;return(O=S.palette[h])==null?void 0:O.contrastText}},children:E})})]}))():(()=>n&&t?null:g.jsx(w.FormGroupContextProvider,{name:a.toString(),children:g.jsx(b.Stack,{alignContent:"stretch",style:t?C1:{},id:`tabpanel-${a}`,"aria-labelledby":`tabheader-${a}`,"aria-hidden":t||void 0,...C,children:f})}))()};ca.propTypes={intent:c.oneOf(["header","content","sidebar"]),className:c.string,contentClassName:c.string,url:c.string,icon:c.element,label:c.oneOfType([c.string,c.element]).isRequired,value:c.oneOfType([c.string,c.number]),syncWithLocation:c.bool,onChange:c.func,selected:c.bool,hidden:c.bool,unmountOnExit:c.bool,children:c.node,badgeColor:c.oneOf(["default","error","info","primary","secondary","success","warning"]),badgeContent:c.oneOfType([c.string,c.number])},ca.defaultProps={badgeColor:"default",unmountOnExit:!1};const E1=So(b.List,{name:"RaLongFormTabs",slot:"Root"})(({theme:e})=>({p:0,"& .MuiListItemIcon-root":{minWidth:32,color:e.palette.grey[500]},"& .MuiListItemButton-root.Mui-selected":{borderRight:`2px solid ${e.palette.primary.main}`,marginRight:"-2px"}})),ep=({children:e,syncWithLocation:t,value:n,url:r,onChange:i})=>{const a=br.useLocation();return g.jsx(xn,{children:g.jsx(E1,{component:"nav",children:P.Children.map(e,(l,A)=>{if(!P.isValidElement(l))return null;const d=I1(l,A),f=t?!!br.matchPath(`${r}/${d}`,a.pathname):A===n;return P.cloneElement(l,{intent:"header",value:t?d:A,syncWithLocation:t,onChange:i,url:r,selected:f})})})})},I1=(e,t)=>e.props.path!=null?e.props.path:t>0?t.toString():"";ep.propTypes={children:c.node,url:c.string,tabsWithErrors:c.arrayOf(c.string),syncWithLocation:c.bool,onChange:c.func,value:c.oneOfType([c.string,c.number])};var B1=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},tp=e=>e.firstChild?e.firstChild.offsetParent===e:!0,Q1=(e,t)=>{let n=e,r=0;tp(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},m1=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Ri=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Ri="sticky":CSS.supports("position","-webkit-sticky")&&(Ri="-webkit-sticky"));var Aa=!1;try{const e=Object.defineProperty({},"passive",{get(){Aa={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var gA=e=>{const{el:t,onChange:n,unsubs:r,measure:i}=e;if(t===window){const a=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=i(a()),A=()=>{Object.assign(l,i(a())),n()};return window.addEventListener("resize",A,Aa),r.push(()=>window.removeEventListener("resize",A)),l}else{const a=i(t.getBoundingClientRect()),l=()=>{Object.assign(a,i(t.getBoundingClientRect())),n()},A=new ResizeObserver(l);return A.observe(t),r.push(()=>A.disconnect()),a}},y1=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},b1=(e,t,n)=>{const{bottom:r,offsetBottom:i,offsetTop:a}=n,l=B1(e);let A=!1;const d=()=>{A||requestAnimationFrame(()=>{const R=E();R!==T&&S(R),A=!1}),A=!0};let f=l===window?window.scrollY:l.scrollTop;const h=R=>{const{offsetTop:_,height:Z}=I,{naturalTop:Y}=y,{height:re}=D;return R+_+Z>=Y+re+k+i},E=()=>{const{height:R}=I,{height:_}=D;return _+a+i<=R?3:h(f)?1:2},C=l!==window&&tp(l),I=gA({el:l,onChange:d,unsubs:t,measure:({height:R,top:_})=>({height:R,offsetTop:C?_:0})}),B=m1(e),Q=B===window?{top:0,bottom:0}:y1(B),y=gA({el:B,onChange:d,unsubs:t,measure:({height:R})=>({height:R-Q.top-Q.bottom,naturalTop:B===window?0:Q1(B,l)+Q.top+I.offsetTop})}),D=gA({el:e,onChange:d,unsubs:t,measure:({height:R})=>({height:R})});let k=0,T=E();const S=R=>{const _=T;if(T=R,_===2&&(k=-1),R===3){e.style.position=Ri,r?e.style.bottom=`${i}px`:e.style.top=`${a}px`;return}const{height:Z,offsetTop:Y}=I,{height:re,naturalTop:de}=y,{height:pe}=D;if(R===2)if(e.style.position="relative",k=_===0?Math.max(0,Y+f-de+a):Math.max(0,Y+f+Z-(de+pe+i)),r){const J=Math.max(0,re-pe-k);e.style.bottom=`${J}px`}else e.style.top=`${k}px`;else e.style.position=Ri,R===1?r?e.style.bottom=`${i}px`:e.style.top=`${Z-pe-i}px`:r?e.style.bottom=`${Z-pe-i}px`:e.style.top=`${a}px`};S(T);const O=R=>{if(R===f)return;const _=R-f;if(f=R,T===3)return;const{offsetTop:Z,height:Y}=I,{naturalTop:re,height:de}=y,{height:pe}=D;if(_>0)if(T===0){if(R+Z+a>re){const J=Math.max(0,Z+f-re+a);R+Z+Y<=re+pe+J+i?S(2):S(1)}}else T===2&&h(R)&&S(1);else if(T===1){if(Z+R+Y<re+de+i){const J=Math.max(0,Z+f+Y-(re+pe+i));Z+R+a>=re+J?S(2):S(0)}}else T===2&&Z+R+a<re+k&&S(0)},V=l===window?()=>O(window.scrollY):()=>O(l.scrollTop);l.addEventListener("scroll",V,Aa),l.addEventListener("mousewheel",V,Aa),t.push(()=>l.removeEventListener("scroll",V),()=>l.removeEventListener("mousewheel",V))},v1=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,i]=P.useState(null);return P.useEffect(()=>{if(!r||!Ri)return;const a=[];return b1(r,a,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{a.forEach(l=>l())}},[r,t,e,n]),i},x1=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:i,className:a,style:l}=e,A=v1({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:a,style:l,ref:A,children:i})},w1=x1;const T1=le(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important"}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}})),np=(e,t)=>e&&e.type===la&&e.props.position===t,P1=e=>e&&e.type===ca,fA=({children:e,formRootPathname:t,syncWithLocation:n,spacing:r,tabs:i,tabsDisposition:a,contentDisposition:l,sticky:A,...d})=>{const[f,h]=P.useState(0),E=br.useResolvedPath(""),C=w.useResourceContext(d),I=br.useLocation(),B=P.useMemo(()=>P.Children.toArray(e).find(S=>np(S,"top")),[e]),Q=P.useMemo(()=>P.Children.toArray(e).find(S=>np(S,"bottom")),[e]),y=P.useMemo(()=>P.Children.toArray(e).filter(S=>P1(S)),[e]),D=S=>{n||h(S)},k=()=>P.cloneElement(i,{onChange:D,syncWithLocation:n,url:t,value:f,intent:"header"},y),T=P.useMemo(()=>g.jsxs(P.Fragment,{children:[B,n?g.jsx(br.Routes,{children:g.jsx(br.Route,{path:"/*",element:k()})}):k(),Q]}),[B,n,k,Q]);return g.jsxs(T1,{container:!0,spacing:r*2,children:[g.jsx(b.Grid,{item:!0,...a,children:A?g.jsx(w1,{offsetTop:74,offsetBottom:r*2,children:T}):T}),g.jsx(b.Grid,{item:!0,...l,children:P.Children.map(y,(S,O)=>{if(!S)return null;const V=w.getTabbedFormTabFullPath(S,O),R=n?!br.matchPath(`${E.pathname}/${V}`,I.pathname):f!==O;return P.isValidElement(S)?P.cloneElement(S,{intent:"content",resource:C,hidden:R,value:n?V:O}):null})})]})};fA.propTypes={children:c.node,spacing:c.number,syncWithLocation:c.bool,tabs:c.element,formRootPathname:c.string,tabsDisposition:aa,contentDisposition:aa},fA.defaultProps={tabs:g.jsx(ep,{})};const S1=()=>{const e=ut.useLocation(),t=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/*",":resource/:id/*"];for(const n of t){const r=ut.matchPath(n,e.pathname);if(r)return r.pathnameBase}return""},ji=({spacing:e,...t})=>{const n=S1(),{spacing:r}=Dt(),i=e||r;return g.jsx(w.Form,{formRootPathname:n,...t,children:g.jsx(fA,{formRootPathname:n,...t,spacing:i})})};ji.propTypes={syncWithLocation:c.bool,spacing:c.number,tabsDisposition:aa,contentDisposition:aa,sticky:c.bool},ji.defaultProps={syncWithLocation:!1,sticky:!0,spacing:2,tabsDisposition:{xl:3,lg:3,md:4,sm:4,xs:12},contentDisposition:{xl:9,lg:9,md:8,sm:8,xs:12}},ji.Tab=ca,ji.Sidebar=la;const O1=le(w.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}})),ua=So(w.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));ua.propTypes={...w.TabbedForm.propTypes},ua.defaultProps={...w.TabbedForm.defaultProps},ua.Tab=w.TabbedForm.Tab;const rp=P.createContext(void 0),M1=P.createContext(void 0),D1=()=>P.useContext(rp),k1=K.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:i=!1,index:a,member:l,resource:A}=e,d=w.useTranslate(),[f,h]=K.useState(!1),{total:E,remove:C}=D1(),I=K.useCallback(()=>{h(!1),C(a)},[a,C]),B=P.useMemo(()=>({index:a,total:E,remove:()=>C(a)}),[a,E,C]);return g.jsxs(M1.Provider,{value:B,children:[P.Children.map(n,(Q,y)=>{if(!P.isValidElement(Q))return null;const{source:D,...k}=Q.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:P.cloneElement(Q,{source:D?`${l}.${D}`:l,index:D?void 0:y,resource:A,disabled:r,...k,label:!1})})}),!i&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2},children:g.jsx(Lo,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>h(!0),children:d("ra.action.delete")})})}),n.length>0&&g.jsx(w.Confirm,{isOpen:f,title:d("ra.action.remove_item"),content:d("ra.message.remove_item"),onConfirm:I,onClose:()=>h(!1)})]})});var F1=Array.isArray,pA=F1,L1=typeof vn=="object"&&vn&&vn.Object===Object&&vn,N1=L1,R1=N1,j1=typeof self=="object"&&self&&self.Object===Object&&self,V1=R1||j1||Function("return this")(),hA=V1,H1=hA,z1=H1.Symbol,CA=z1,op=CA,ip=Object.prototype,W1=ip.hasOwnProperty,U1=ip.toString,Vi=op?op.toStringTag:void 0;function G1(e){var t=W1.call(e,Vi),n=e[Vi];try{e[Vi]=void 0;var r=!0}catch{}var i=U1.call(e);return r&&(t?e[Vi]=n:delete e[Vi]),i}var Y1=G1,K1=Object.prototype,q1=K1.toString;function _1(e){return q1.call(e)}var J1=_1,sp=CA,X1=Y1,Z1=J1,$1="[object Null]",ex="[object Undefined]",ap=sp?sp.toStringTag:void 0;function tx(e){return e==null?e===void 0?ex:$1:ap&&ap in Object(e)?X1(e):Z1(e)}var lp=tx;function nx(e){return e!=null&&typeof e=="object"}var rx=nx,ox=lp,ix=rx,sx="[object Symbol]";function ax(e){return typeof e=="symbol"||ix(e)&&ox(e)==sx}var EA=ax,lx=pA,cx=EA,Ax=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ux=/^\w*$/;function dx(e,t){if(lx(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||cx(e)?!0:ux.test(e)||!Ax.test(e)||t!=null&&e in Object(t)}var gx=dx;function fx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cp=fx,px=lp,hx=cp,Cx="[object AsyncFunction]",Ex="[object Function]",Ix="[object GeneratorFunction]",Bx="[object Proxy]";function Qx(e){if(!hx(e))return!1;var t=px(e);return t==Ex||t==Ix||t==Cx||t==Bx}var mx=Qx,yx=hA,bx=yx["__core-js_shared__"],vx=bx,IA=vx,Ap=function(){var e=/[^.]+$/.exec(IA&&IA.keys&&IA.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xx(e){return!!Ap&&Ap in e}var wx=xx,Tx=Function.prototype,Px=Tx.toString;function Sx(e){if(e!=null){try{return Px.call(e)}catch{}try{return e+""}catch{}}return""}var Ox=Sx,Mx=mx,Dx=wx,kx=cp,Fx=Ox,Lx=/[\\^$.*+?()[\]{}|]/g,Nx=/^\[object .+?Constructor\]$/,Rx=Function.prototype,jx=Object.prototype,Vx=Rx.toString,Hx=jx.hasOwnProperty,zx=RegExp("^"+Vx.call(Hx).replace(Lx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wx(e){if(!kx(e)||Dx(e))return!1;var t=Mx(e)?zx:Nx;return t.test(Fx(e))}var Ux=Wx;function Gx(e,t){return e==null?void 0:e[t]}var Yx=Gx,Kx=Ux,qx=Yx;function _x(e,t){var n=qx(e,t);return Kx(n)?n:void 0}var up=_x,Jx=up,Xx=Jx(Object,"create"),da=Xx,dp=da;function Zx(){this.__data__=dp?dp(null):{},this.size=0}var $x=Zx;function ew(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tw=ew,nw=da,rw="__lodash_hash_undefined__",ow=Object.prototype,iw=ow.hasOwnProperty;function sw(e){var t=this.__data__;if(nw){var n=t[e];return n===rw?void 0:n}return iw.call(t,e)?t[e]:void 0}var aw=sw,lw=da,cw=Object.prototype,Aw=cw.hasOwnProperty;function uw(e){var t=this.__data__;return lw?t[e]!==void 0:Aw.call(t,e)}var dw=uw,gw=da,fw="__lodash_hash_undefined__";function pw(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gw&&t===void 0?fw:t,this}var hw=pw,Cw=$x,Ew=tw,Iw=aw,Bw=dw,Qw=hw;function Ho(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ho.prototype.clear=Cw,Ho.prototype.delete=Ew,Ho.prototype.get=Iw,Ho.prototype.has=Bw,Ho.prototype.set=Qw;var mw=Ho;function yw(){this.__data__=[],this.size=0}var bw=yw;function vw(e,t){return e===t||e!==e&&t!==t}var xw=vw,ww=xw;function Tw(e,t){for(var n=e.length;n--;)if(ww(e[n][0],t))return n;return-1}var ga=Tw,Pw=ga,Sw=Array.prototype,Ow=Sw.splice;function Mw(e){var t=this.__data__,n=Pw(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ow.call(t,n,1),--this.size,!0}var Dw=Mw,kw=ga;function Fw(e){var t=this.__data__,n=kw(t,e);return n<0?void 0:t[n][1]}var Lw=Fw,Nw=ga;function Rw(e){return Nw(this.__data__,e)>-1}var jw=Rw,Vw=ga;function Hw(e,t){var n=this.__data__,r=Vw(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var zw=Hw,Ww=bw,Uw=Dw,Gw=Lw,Yw=jw,Kw=zw;function zo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zo.prototype.clear=Ww,zo.prototype.delete=Uw,zo.prototype.get=Gw,zo.prototype.has=Yw,zo.prototype.set=Kw;var qw=zo,_w=up,Jw=hA,Xw=_w(Jw,"Map"),Zw=Xw,gp=mw,$w=qw,eT=Zw;function tT(){this.size=0,this.__data__={hash:new gp,map:new(eT||$w),string:new gp}}var nT=tT;function rT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var oT=rT,iT=oT;function sT(e,t){var n=e.__data__;return iT(t)?n[typeof t=="string"?"string":"hash"]:n.map}var fa=sT,aT=fa;function lT(e){var t=aT(this,e).delete(e);return this.size-=t?1:0,t}var cT=lT,AT=fa;function uT(e){return AT(this,e).get(e)}var dT=uT,gT=fa;function fT(e){return gT(this,e).has(e)}var pT=fT,hT=fa;function CT(e,t){var n=hT(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var ET=CT,IT=nT,BT=cT,QT=dT,mT=pT,yT=ET;function Wo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wo.prototype.clear=IT,Wo.prototype.delete=BT,Wo.prototype.get=QT,Wo.prototype.has=mT,Wo.prototype.set=yT;var bT=Wo,fp=bT,vT="Expected a function";function BA(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(vT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(BA.Cache||fp),n}BA.Cache=fp;var xT=BA,wT=xT,TT=500;function PT(e){var t=wT(e,function(r){return n.size===TT&&n.clear(),r}),n=t.cache;return t}var ST=PT,OT=ST,MT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DT=/\\(\\)?/g,kT=OT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(MT,function(n,r,i,a){t.push(i?a.replace(DT,"$1"):r||n)}),t}),FT=kT;function LT(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var NT=LT,pp=CA,RT=NT,jT=pA,VT=EA,HT=1/0,hp=pp?pp.prototype:void 0,Cp=hp?hp.toString:void 0;function Ep(e){if(typeof e=="string")return e;if(jT(e))return RT(e,Ep)+"";if(VT(e))return Cp?Cp.call(e):"";var t=e+"";return t=="0"&&1/e==-HT?"-0":t}var zT=Ep,WT=zT;function UT(e){return e==null?"":WT(e)}var GT=UT,YT=pA,KT=gx,qT=FT,_T=GT;function JT(e,t){return YT(e)?e:KT(e,t)?[e]:qT(_T(e))}var XT=JT,ZT=EA,$T=1/0;function e2(e){if(typeof e=="string"||ZT(e))return e;var t=e+"";return t=="0"&&1/e==-$T?"-0":t}var t2=e2,n2=XT,r2=t2;function o2(e,t){t=n2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[r2(t[n++])];return n&&n==r?e:void 0}var i2=o2,s2=i2;function a2(e,t,n){var r=e==null?void 0:s2(e,t);return r===void 0?n:r}var l2=a2;const c2=xo(l2),Ip=e=>{const{children:t,resource:n,source:r,label:i,disableActions:a=!1,disableAdd:l=!1,disableRemove:A=!1,className:d,empty:f}=e,[h,E]=P.useState(!1),{fields:C,remove:I,replace:B}=w.useArrayInput(e),Q=lt(),y=Pe.useTranslate(),D=Pe.useRecordContext(e),k=P.useRef({}),T=Pe.useTranslateLabel(),S=P.useCallback(Z=>{I(Z)},[I]);if(C.length>0){const{...Z}=C[0];k.current=Z;for(const Y in k.current)k.current[Y]=null}const O=P.useCallback(()=>{B([]),E(!1)},[B]),V=c2(D,r),R=P.useMemo(()=>({total:C.length,remove:S,source:r}),[C.length,S,r]),_=Q.palette.mode==="dark"?Q.palette.grey.A400:Q.palette.grey.A800;return C?g.jsx(rp.Provider,{value:R,children:g.jsxs("div",{className:d,children:[g.jsx(Bp,{label:i,source:r,disableAdd:l}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${_}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${_}`},children:g.jsxs(b.TableRow,{children:[P.Children.map(t,(Z,Y)=>K.isValidElement(Z)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:T({...Z.props,resource:n})})},Y):null),!a&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[C.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(a?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),C.length>0&&C.map((Z,Y)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${_}}`},children:g.jsx(k1,{disableRemove:A,disableActions:a,index:Y,member:`${r}.${Y}`,onRemoveField:S,record:V&&V[Y]||{},resource:n,source:r,children:t})},Z.id))]})]})}),C.length>0&&g.jsx(w.Confirm,{isOpen:h,title:y("ra.action.clear_array_input"),content:y("ra.message.clear_array_input"),onConfirm:O,onClose:()=>E(!1)})]})}):null},Bp=e=>{const{label:t,disableAdd:n}=e,{append:r}=w.useArrayInput(e),i=lt(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,l=i.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[g.jsx(b.Typography,{children:t}),!n&&g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${a}`},onClick:()=>r({}),children:g.jsx(Ze.PlusCircleOutlined,{style:{color:l}})})]})},A2=le(Ip,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));Bp.propTypes={label:c.string.isRequired,source:c.string.isRequired},Ip.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.string,resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string])};const Qp=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),pa=P.createContext({}),QA=P.createContext(null),ha=typeof document<"u",u2=ha?P.useLayoutEffect:P.useEffect,mp=P.createContext({strict:!1});function d2(e,t,n,r){const{visualElement:i}=P.useContext(pa),a=P.useContext(mp),l=P.useContext(QA),A=P.useContext(Qp).reducedMotion,d=P.useRef();r=r||a.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:A}));const f=d.current;P.useInsertionEffect(()=>{f&&f.update(n,l)});const h=P.useRef(!!window.HandoffAppearAnimations);return u2(()=>{f&&(f.render(),h.current&&f.animationState&&f.animationState.animateChanges())}),P.useEffect(()=>{f&&(f.updateFeatures(),!h.current&&f.animationState&&f.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,h.current=!1)}),f}function Uo(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function g2(e,t,n){return P.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Uo(n)&&(n.current=r))},[t])}function Hi(e){return typeof e=="string"||Array.isArray(e)}function Ca(e){return typeof e=="object"&&typeof e.start=="function"}const mA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yA=["initial",...mA];function Ea(e){return Ca(e.animate)||yA.some(t=>Hi(e[t]))}function yp(e){return!!(Ea(e)||e.variants)}function f2(e,t){if(Ea(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hi(n)?n:void 0,animate:Hi(r)?r:void 0}}return e.inherit!==!1?t:{}}function p2(e){const{initial:t,animate:n}=f2(e,P.useContext(pa));return P.useMemo(()=>({initial:t,animate:n}),[bp(t),bp(n)])}function bp(e){return Array.isArray(e)?e.join(" "):e}const vp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zi={};for(const e in vp)zi[e]={isEnabled:t=>vp[e].some(n=>!!t[n])};function h2(e){for(const t in e)zi[t]={...zi[t],...e[t]}}const xp=P.createContext({}),wp=P.createContext({}),C2=Symbol.for("motionComponentSymbol");function E2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&h2(e);function a(A,d){let f;const h={...P.useContext(Qp),...A,layoutId:I2(A)},{isStatic:E}=h,C=p2(A),I=r(A,E);if(!E&&ha){C.visualElement=d2(i,I,h,t);const B=P.useContext(wp),Q=P.useContext(mp).strict;C.visualElement&&(f=C.visualElement.loadFeatures(h,Q,e,B))}return K.createElement(pa.Provider,{value:C},f&&C.visualElement?K.createElement(f,{visualElement:C.visualElement,...h}):null,n(i,A,g2(I,C.visualElement,d),I,E,C.visualElement))}const l=P.forwardRef(a);return l[C2]=i,l}function I2({layoutId:e}){const t=P.useContext(xp).id;return t&&e!==void 0?t+"-"+e:e}function B2(e){function t(r,i={}){return E2(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Q2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function bA(e){return typeof e!="string"||e.includes("-")?!1:!!(Q2.indexOf(e)>-1||/[A-Z]/.test(e))}const Ia={};function m2(e){Object.assign(Ia,e)}const Wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],so=new Set(Wi);function Tp(e,{layout:t,layoutId:n}){return so.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ia[e]||e==="opacity")}const nn=e=>!!(e&&e.getVelocity),y2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b2=Wi.length;function v2(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let l=0;l<b2;l++){const A=Wi[l];if(e[A]!==void 0){const d=y2[A]||A;a+=`${d}(${e[A]}) `}}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}const Pp=e=>t=>typeof t=="string"&&t.startsWith(e),Sp=Pp("--"),vA=Pp("var(--"),x2=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,w2=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Tr=(e,t,n)=>Math.min(Math.max(n,e),t),ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ui={...ao,transform:e=>Tr(0,1,e)},Ba={...ao,default:1},Gi=e=>Math.round(e*1e5)/1e5,Qa=/(-)?([\d]*\.?[\d])+/g,Op=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,T2=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Yi(e){return typeof e=="string"}const Ki=e=>({test:t=>Yi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=Ki("deg"),Xn=Ki("%"),Me=Ki("px"),P2=Ki("vh"),S2=Ki("vw"),Mp={...Xn,parse:e=>Xn.parse(e)/100,transform:e=>Xn.transform(e*100)},Dp={...ao,transform:Math.round},kp={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,size:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:Ba,scaleX:Ba,scaleY:Ba,scaleZ:Ba,skew:Pr,skewX:Pr,skewY:Pr,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:Ui,originX:Mp,originY:Mp,originZ:Me,zIndex:Dp,fillOpacity:Ui,strokeOpacity:Ui,numOctaves:Dp};function xA(e,t,n,r){const{style:i,vars:a,transform:l,transformOrigin:A}=e;let d=!1,f=!1,h=!0;for(const E in t){const C=t[E];if(Sp(E)){a[E]=C;continue}const I=kp[E],B=w2(C,I);if(so.has(E)){if(d=!0,l[E]=B,!h)continue;C!==(I.default||0)&&(h=!1)}else E.startsWith("origin")?(f=!0,A[E]=B):i[E]=B}if(t.transform||(d||r?i.transform=v2(e.transform,n,h,r):i.transform&&(i.transform="none")),f){const{originX:E="50%",originY:C="50%",originZ:I=0}=A;i.transformOrigin=`${E} ${C} ${I}`}}const wA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fp(e,t,n){for(const r in t)!nn(t[r])&&!Tp(r,n)&&(e[r]=t[r])}function O2({transformTemplate:e},t,n){return P.useMemo(()=>{const r=wA();return xA(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function M2(e,t,n){const r=e.style||{},i={};return Fp(i,r,e),Object.assign(i,O2(e,t,n)),e.transformValues?e.transformValues(i):i}function D2(e,t,n){const r={},i=M2(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const k2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ma(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||k2.has(e)}let Lp=e=>!ma(e);function F2(e){e&&(Lp=t=>t.startsWith("on")?!ma(t):e(t))}try{F2(require("@emotion/is-prop-valid").default)}catch{}function L2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Lp(i)||n===!0&&ma(i)||!t&&!ma(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Np(e,t,n){return typeof e=="string"?e:Me.transform(t+n*e)}function N2(e,t,n){const r=Np(t,e.x,e.width),i=Np(n,e.y,e.height);return`${r} ${i}`}const R2={offset:"stroke-dashoffset",array:"stroke-dasharray"},j2={offset:"strokeDashoffset",array:"strokeDasharray"};function V2(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?R2:j2;e[a.offset]=Me.transform(-r);const l=Me.transform(t),A=Me.transform(n);e[a.array]=`${l} ${A}`}function TA(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:l,pathSpacing:A=1,pathOffset:d=0,...f},h,E,C){if(xA(e,f,h,C),E){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:I,style:B,dimensions:Q}=e;I.transform&&(Q&&(B.transform=I.transform),delete I.transform),Q&&(i!==void 0||a!==void 0||B.transform)&&(B.transformOrigin=N2(Q,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(I.x=t),n!==void 0&&(I.y=n),r!==void 0&&(I.scale=r),l!==void 0&&V2(I,l,A,d,!1)}const Rp=()=>({...wA(),attrs:{}}),PA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function H2(e,t,n,r){const i=P.useMemo(()=>{const a=Rp();return TA(a,t,{enableHardwareAcceleration:!1},PA(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Fp(a,e.style,e),i.style={...a,...i.style}}return i}function z2(e=!1){return(n,r,i,{latestValues:a},l)=>{const d=(bA(n)?H2:D2)(r,a,l,n),h={...L2(r,typeof n=="string",e),...d,ref:i},{children:E}=r,C=P.useMemo(()=>nn(E)?E.get():E,[E]);return P.createElement(n,{...h,children:C})}}const SA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function jp(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const Vp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hp(e,t,n,r){jp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Vp.has(i)?i:SA(i),t.attrs[i])}function OA(e,t){const{style:n}=e,r={};for(const i in n)(nn(n[i])||t.style&&nn(t.style[i])||Tp(i,e))&&(r[i]=n[i]);return r}function zp(e,t){const n=OA(e,t);for(const r in e)if(nn(e[r])||nn(t[r])){const i=Wi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function MA(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function W2(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const ya=e=>Array.isArray(e),U2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),G2=e=>ya(e)?e[e.length-1]||0:e;function ba(e){const t=nn(e)?e.get():e;return U2(t)?t.toValue():t}function Y2({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const l={latestValues:K2(r,i,a,e),renderState:t()};return n&&(l.mount=A=>n(r,A,l)),l}const Wp=e=>(t,n)=>{const r=P.useContext(pa),i=P.useContext(QA),a=()=>Y2(e,t,r,i);return n?a():W2(a)};function K2(e,t,n,r){const i={},a=r(e,{});for(const C in a)i[C]=ba(a[C]);let{initial:l,animate:A}=e;const d=Ea(e),f=yp(e);t&&f&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),A===void 0&&(A=t.animate));let h=n?n.initial===!1:!1;h=h||l===!1;const E=h?A:l;return E&&typeof E!="boolean"&&!Ca(E)&&(Array.isArray(E)?E:[E]).forEach(I=>{const B=MA(e,I);if(!B)return;const{transitionEnd:Q,transition:y,...D}=B;for(const k in D){let T=D[k];if(Array.isArray(T)){const S=h?T.length-1:0;T=T[S]}T!==null&&(i[k]=T)}for(const k in Q)i[k]=Q[k]}),i}const yt=e=>e;class Up{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function q2(e){let t=new Up,n=new Up,r=0,i=!1,a=!1;const l=new WeakSet,A={schedule:(d,f=!1,h=!1)=>{const E=h&&i,C=E?t:n;return f&&l.add(d),C.add(d)&&E&&i&&(r=t.order.length),d},cancel:d=>{n.remove(d),l.delete(d)},process:d=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let f=0;f<r;f++){const h=t.order[f];h(d),l.has(h)&&(A.schedule(h),e())}i=!1,a&&(a=!1,A.process(d))}};return A}const va=["prepare","read","update","preRender","render","postRender"],_2=40;function J2(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=va.reduce((E,C)=>(E[C]=q2(()=>n=!0),E),{}),l=E=>a[E].process(i),A=()=>{const E=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,_2),1),i.timestamp=E,i.isProcessing=!0,va.forEach(l),i.isProcessing=!1,n&&t&&(r=!1,e(A))},d=()=>{n=!0,r=!0,i.isProcessing||e(A)};return{schedule:va.reduce((E,C)=>{const I=a[C];return E[C]=(B,Q=!1,y=!1)=>(n||d(),I.schedule(B,Q,y)),E},{}),cancel:E=>va.forEach(C=>a[C].cancel(E)),state:i,steps:a}}const{schedule:ft,cancel:cr,state:kt,steps:DA}=J2(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),X2={useVisualState:Wp({scrapeMotionValuesFromProps:zp,createRenderState:Rp,onMount:(e,t,{renderState:n,latestValues:r})=>{ft.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ft.render(()=>{TA(n,r,{enableHardwareAcceleration:!1},PA(t.tagName),e.transformTemplate),Hp(t,n)})}})},Z2={useVisualState:Wp({scrapeMotionValuesFromProps:OA,createRenderState:wA})};function $2(e,{forwardMotionProps:t=!1},n,r){return{...bA(e)?X2:Z2,preloadedFeatures:n,useRender:z2(t),createVisualElement:r,Component:e}}function Ar(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Gp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function xa(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const eP=e=>t=>Gp(t)&&e(t,xa(t));function ur(e,t,n,r){return Ar(e,t,eP(n),r)}const tP=(e,t)=>n=>t(e(n)),Sr=(...e)=>e.reduce(tP);function Yp(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Kp=Yp("dragHorizontal"),qp=Yp("dragVertical");function _p(e){let t=!1;if(e==="y")t=qp();else if(e==="x")t=Kp();else{const n=Kp(),r=qp();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Jp(){const e=_p(!0);return e?(e(),!1):!0}class Or{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xp(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,l)=>{if(a.type==="touch"||Jp())return;const A=e.getProps();e.animationState&&A.whileHover&&e.animationState.setActive("whileHover",t),A[r]&&ft.update(()=>A[r](a,l))};return ur(e.current,n,i,{passive:!e.getProps()[r]})}class nP extends Or{mount(){this.unmount=Sr(Xp(this.node,!0),Xp(this.node,!1))}unmount(){}}class rP extends Or{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sr(Ar(this.node.current,"focus",()=>this.onFocus()),Ar(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Zp=(e,t)=>t?e===t?!0:Zp(e,t.parentElement):!1;function kA(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,xa(n))}class oP extends Or{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=ur(window,"pointerup",(A,d)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h}=this.node.getProps();ft.update(()=>{Zp(this.node.current,A.target)?f&&f(A,d):h&&h(A,d)})},{passive:!(r.onTap||r.onPointerUp)}),l=ur(window,"pointercancel",(A,d)=>this.cancelPress(A,d),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Sr(a,l),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const l=A=>{A.key!=="Enter"||!this.checkPressEnd()||kA("up",(d,f)=>{const{onTap:h}=this.node.getProps();h&&ft.update(()=>h(d,f))})};this.removeEndListeners(),this.removeEndListeners=Ar(this.node.current,"keyup",l),kA("down",(A,d)=>{this.startPress(A,d)})},n=Ar(this.node.current,"keydown",t),r=()=>{this.isPressing&&kA("cancel",(a,l)=>this.cancelPress(a,l))},i=Ar(this.node.current,"blur",r);this.removeAccessibleListeners=Sr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&ft.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Jp()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ft.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=ur(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ar(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const FA=new WeakMap,LA=new WeakMap,iP=e=>{const t=FA.get(e.target);t&&t(e)},sP=e=>{e.forEach(iP)};function aP({root:e,...t}){const n=e||document;LA.has(n)||LA.set(n,{});const r=LA.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(sP,{root:e,...t})),r[i]}function lP(e,t,n){const r=aP(t);return FA.set(e,n),r.observe(e),()=>{FA.delete(e),r.unobserve(e)}}const cP={some:0,all:1};class AP extends Or{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:cP[i]},A=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:E}=this.node.getProps(),C=f?h:E;C&&C(d)};return lP(this.node.current,l,A)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(uP(t,n))&&this.startObserver()}unmount(){}}function uP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dP={inView:{Feature:AP},tap:{Feature:oP},focus:{Feature:rP},hover:{Feature:nP}};function $p(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function gP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function fP(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function wa(e,t,n){const r=e.getProps();return MA(r,t,n!==void 0?n:r.custom,gP(e),fP(e))}const pP="data-"+SA("framerAppearId");let qi=yt,Zn=yt;process.env.NODE_ENV!=="production"&&(qi=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Zn=(e,t)=>{if(!e)throw new Error(t)});const Mr=e=>e*1e3,dr=e=>e/1e3,hP={current:!1},eh=e=>Array.isArray(e)&&typeof e[0]=="number";function th(e){return!!(!e||typeof e=="string"&&nh[e]||eh(e)||Array.isArray(e)&&e.every(th))}const _i=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,nh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_i([0,.65,.55,1]),circOut:_i([.55,0,1,.45]),backIn:_i([.31,.01,.66,-.59]),backOut:_i([.33,1.53,.69,.99])};function rh(e){if(e)return eh(e)?_i(e):Array.isArray(e)?e.map(rh):nh[e]}function CP(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:l="loop",ease:A,times:d}={}){const f={[t]:n};d&&(f.offset=d);const h=rh(A);return Array.isArray(h)&&(f.easing=h),e.animate(f,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:l==="reverse"?"alternate":"normal"})}function EP(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const oh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IP=1e-7,BP=12;function QP(e,t,n,r,i){let a,l,A=0;do l=t+(n-t)/2,a=oh(l,r,i)-e,a>0?n=l:t=l;while(Math.abs(a)>IP&&++A<BP);return l}function Ji(e,t,n,r){if(e===t&&n===r)return yt;const i=a=>QP(a,0,1,e,n);return a=>a===0||a===1?a:oh(i(a),t,r)}const mP=Ji(.42,0,1,1),yP=Ji(0,0,.58,1),ih=Ji(.42,0,.58,1),bP=e=>Array.isArray(e)&&typeof e[0]!="number",sh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ah=e=>t=>1-e(1-t),lh=e=>1-Math.sin(Math.acos(e)),NA=ah(lh),vP=sh(NA),ch=Ji(.33,1.53,.69,.99),RA=ah(ch),xP=sh(RA),Ah={linear:yt,easeIn:mP,easeInOut:ih,easeOut:yP,circIn:lh,circInOut:vP,circOut:NA,backIn:RA,backInOut:xP,backOut:ch,anticipate:e=>(e*=2)<1?.5*RA(e):.5*(2-Math.pow(2,-10*(e-1)))},uh=e=>{if(Array.isArray(e)){Zn(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Ji(t,n,r,i)}else if(typeof e=="string")return Zn(Ah[e]!==void 0,`Invalid easing type '${e}'`),Ah[e];return e},jA=(e,t)=>n=>!!(Yi(n)&&T2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),dh=(e,t,n)=>r=>{if(!Yi(r))return r;const[i,a,l,A]=r.match(Qa);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(l),alpha:A!==void 0?parseFloat(A):1}},wP=e=>Tr(0,255,e),VA={...ao,transform:e=>Math.round(wP(e))},lo={test:jA("rgb","red"),parse:dh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+VA.transform(e)+", "+VA.transform(t)+", "+VA.transform(n)+", "+Gi(Ui.transform(r))+")"};function TP(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const HA={test:jA("#"),parse:TP,transform:lo.transform},Go={test:jA("hsl","hue"),parse:dh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xn.transform(Gi(t))+", "+Xn.transform(Gi(n))+", "+Gi(Ui.transform(r))+")"},Xt={test:e=>lo.test(e)||HA.test(e)||Go.test(e),parse:e=>lo.test(e)?lo.parse(e):Go.test(e)?Go.parse(e):HA.parse(e),transform:e=>Yi(e)?e:e.hasOwnProperty("red")?lo.transform(e):Go.transform(e)},It=(e,t,n)=>-n*e+n*t+e;function zA(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 PP({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,l=0;if(!t)i=a=l=n;else{const A=n<.5?n*(1+t):n+t-n*t,d=2*n-A;i=zA(d,A,e+1/3),a=zA(d,A,e),l=zA(d,A,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(l*255),alpha:r}}const WA=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},SP=[HA,lo,Go],OP=e=>SP.find(t=>t.test(e));function gh(e){const t=OP(e);Zn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Go&&(n=PP(n)),n}const fh=(e,t)=>{const n=gh(e),r=gh(t),i={...n};return a=>(i.red=WA(n.red,r.red,a),i.green=WA(n.green,r.green,a),i.blue=WA(n.blue,r.blue,a),i.alpha=It(n.alpha,r.alpha,a),lo.transform(i))};function MP(e){var t,n;return isNaN(e)&&Yi(e)&&(((t=e.match(Qa))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Op))===null||n===void 0?void 0:n.length)||0)>0}const ph={regex:x2,countKey:"Vars",token:"${v}",parse:yt},hh={regex:Op,countKey:"Colors",token:"${c}",parse:Xt.parse},Ch={regex:Qa,countKey:"Numbers",token:"${n}",parse:ao.parse};function UA(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function Ta(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&UA(n,ph),UA(n,hh),UA(n,Ch),n}function Eh(e){return Ta(e).values}function Ih(e){const{values:t,numColors:n,numVars:r,tokenised:i}=Ta(e),a=t.length;return l=>{let A=i;for(let d=0;d<a;d++)d<r?A=A.replace(ph.token,l[d]):d<r+n?A=A.replace(hh.token,Xt.transform(l[d])):A=A.replace(Ch.token,Gi(l[d]));return A}}const DP=e=>typeof e=="number"?0:e;function kP(e){const t=Eh(e);return Ih(e)(t.map(DP))}const Dr={test:MP,parse:Eh,createTransformer:Ih,getAnimatableNone:kP},Bh=(e,t)=>n=>`${n>0?t:e}`;function Qh(e,t){return typeof e=="number"?n=>It(e,t,n):Xt.test(e)?fh(e,t):e.startsWith("var(")?Bh(e,t):yh(e,t)}const mh=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,l)=>Qh(a,t[l]));return a=>{for(let l=0;l<r;l++)n[l]=i[l](a);return n}},FP=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Qh(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},yh=(e,t)=>{const n=Dr.createTransformer(t),r=Ta(e),i=Ta(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Sr(mh(r.values,i.values),n):(qi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Bh(e,t))},Xi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},bh=(e,t)=>n=>It(e,t,n);function LP(e){return typeof e=="number"?bh:typeof e=="string"?Xt.test(e)?fh:yh:Array.isArray(e)?mh:typeof e=="object"?FP:bh}function NP(e,t,n){const r=[],i=n||LP(e[0]),a=e.length-1;for(let l=0;l<a;l++){let A=i(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||yt:t;A=Sr(d,A)}r.push(A)}return r}function vh(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Zn(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=NP(t,r,i),A=l.length,d=f=>{let h=0;if(A>1)for(;h<e.length-2&&!(f<e[h+1]);h++);const E=Xi(e[h],e[h+1],f);return l[h](E)};return n?f=>d(Tr(e[0],e[a-1],f)):d}function RP(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Xi(0,t,r);e.push(It(n,1,i))}}function jP(e){const t=[0];return RP(t,e.length-1),t}function VP(e,t){return e.map(n=>n*t)}function HP(e,t){return e.map(()=>t||ih).splice(0,e.length-1)}function Pa({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=bP(r)?r.map(uh):uh(r),a={done:!1,value:t[0]},l=VP(n&&n.length===t.length?n:jP(t),e),A=vh(l,t,{ease:Array.isArray(i)?i:HP(t,i)});return{calculatedDuration:e,next:d=>(a.value=A(d),a.done=d>=e,a)}}function xh(e,t){return t?e*(1e3/t):0}const zP=5;function wh(e,t,n){const r=Math.max(t-zP,0);return xh(n-e(r),t-r)}const GA=.001,WP=.01,Th=10,UP=.05,GP=1;function YP({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;qi(e<=Mr(Th),"Spring duration must be 10 seconds or less");let l=1-t;l=Tr(UP,GP,l),e=Tr(WP,Th,dr(e)),l<1?(i=f=>{const h=f*l,E=h*e,C=h-n,I=YA(f,l),B=Math.exp(-E);return GA-C/I*B},a=f=>{const E=f*l*e,C=E*n+n,I=Math.pow(l,2)*Math.pow(f,2)*e,B=Math.exp(-E),Q=YA(Math.pow(f,2),l);return(-i(f)+GA>0?-1:1)*((C-I)*B)/Q}):(i=f=>{const h=Math.exp(-f*e),E=(f-n)*e+1;return-GA+h*E},a=f=>{const h=Math.exp(-f*e),E=(n-f)*(e*e);return h*E});const A=5/e,d=qP(i,a,A);if(e=Mr(e),isNaN(d))return{stiffness:100,damping:10,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const KP=12;function qP(e,t,n){let r=n;for(let i=1;i<KP;i++)r=r-e(r)/t(r);return r}function YA(e,t){return e*Math.sqrt(1-t*t)}const _P=["duration","bounce"],JP=["stiffness","damping","mass"];function Ph(e,t){return t.some(n=>e[n]!==void 0)}function XP(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Ph(e,JP)&&Ph(e,_P)){const n=YP(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Sh({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],l={done:!1,value:i},{stiffness:A,damping:d,mass:f,velocity:h,duration:E,isResolvedFromDuration:C}=XP(r),I=h?-dr(h):0,B=d/(2*Math.sqrt(A*f)),Q=a-i,y=dr(Math.sqrt(A/f)),D=Math.abs(Q)<5;n||(n=D?.01:2),t||(t=D?.005:.5);let k;if(B<1){const T=YA(y,B);k=S=>{const O=Math.exp(-B*y*S);return a-O*((I+B*y*Q)/T*Math.sin(T*S)+Q*Math.cos(T*S))}}else if(B===1)k=T=>a-Math.exp(-y*T)*(Q+(I+y*Q)*T);else{const T=y*Math.sqrt(B*B-1);k=S=>{const O=Math.exp(-B*y*S),V=Math.min(T*S,300);return a-O*((I+B*y*Q)*Math.sinh(V)+T*Q*Math.cosh(V))/T}}return{calculatedDuration:C&&E||null,next:T=>{const S=k(T);if(C)l.done=T>=E;else{let O=I;T!==0&&(B<1?O=wh(k,T,S):O=0);const V=Math.abs(O)<=n,R=Math.abs(a-S)<=t;l.done=V&&R}return l.value=l.done?a:S,l}}}function Oh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:l,min:A,max:d,restDelta:f=.5,restSpeed:h}){const E=e[0],C={done:!1,value:E},I=_=>A!==void 0&&_<A||d!==void 0&&_>d,B=_=>A===void 0?d:d===void 0||Math.abs(A-_)<Math.abs(d-_)?A:d;let Q=n*t;const y=E+Q,D=l===void 0?y:l(y);D!==y&&(Q=D-E);const k=_=>-Q*Math.exp(-_/r),T=_=>D+k(_),S=_=>{const Z=k(_),Y=T(_);C.done=Math.abs(Z)<=f,C.value=C.done?D:Y};let O,V;const R=_=>{I(C.value)&&(O=_,V=Sh({keyframes:[C.value,B(C.value)],velocity:wh(T,_,C.value),damping:i,stiffness:a,restDelta:f,restSpeed:h}))};return R(0),{calculatedDuration:null,next:_=>{let Z=!1;return!V&&O===void 0&&(Z=!0,S(_),R(_)),O!==void 0&&_>O?V.next(_-O):(!Z&&S(_),C)}}}const ZP=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ft.update(t,!0),stop:()=>cr(t),now:()=>kt.isProcessing?kt.timestamp:performance.now()}},Mh=2e4;function Dh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mh;)t+=n,r=e.next(t);return t>=Mh?1/0:t}const $P={decay:Oh,inertia:Oh,tween:Pa,keyframes:Pa,spring:Sh};function Sa({autoplay:e=!0,delay:t=0,driver:n=ZP,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:l=0,repeatType:A="loop",onPlay:d,onStop:f,onComplete:h,onUpdate:E,...C}){let I=1,B=!1,Q,y;const D=()=>{y=new Promise(H=>{Q=H})};D();let k;const T=$P[i]||Pa;let S;T!==Pa&&typeof r[0]!="number"&&(S=vh([0,100],r,{clamp:!1}),r=[0,100]);const O=T({...C,keyframes:r});let V;A==="mirror"&&(V=T({...C,keyframes:[...r].reverse(),velocity:-(C.velocity||0)}));let R="idle",_=null,Z=null,Y=null;O.calculatedDuration===null&&a&&(O.calculatedDuration=Dh(O));const{calculatedDuration:re}=O;let de=1/0,pe=1/0;re!==null&&(de=re+l,pe=de*(a+1)-l);let J=0;const X=H=>{if(Z===null)return;I>0&&(Z=Math.min(Z,H)),I<0&&(Z=Math.min(H-pe/I,Z)),_!==null?J=_:J=Math.round(H-Z)*I;const se=J-t*(I>=0?1:-1),fe=I>=0?se<0:se>pe;J=Math.max(se,0),R==="finished"&&_===null&&(J=pe);let ce=J,ge=O;if(a){const Ie=J/de;let Be=Math.floor(Ie),Fe=Ie%1;!Fe&&Ie>=1&&(Fe=1),Fe===1&&Be--,Be=Math.min(Be,a+1);const ae=!!(Be%2);ae&&(A==="reverse"?(Fe=1-Fe,l&&(Fe-=l/de)):A==="mirror"&&(ge=V));let Ge=Tr(0,1,Fe);J>pe&&(Ge=A==="reverse"&&ae?1:0),ce=Ge*de}const he=fe?{done:!1,value:r[0]}:ge.next(ce);S&&(he.value=S(he.value));let{done:Qe}=he;!fe&&re!==null&&(Qe=I>=0?J>=pe:J<=0);const ye=_===null&&(R==="finished"||R==="running"&&Qe);return E&&E(he.value),ye&&z(),he},U=()=>{k&&k.stop(),k=void 0},$=()=>{R="idle",U(),Q(),D(),Z=Y=null},z=()=>{R="finished",h&&h(),U(),Q()},oe=()=>{if(B)return;k||(k=n(X));const H=k.now();d&&d(),_!==null?Z=H-_:(!Z||R==="finished")&&(Z=H),R==="finished"&&D(),Y=Z,_=null,R="running",k.start()};e&&oe();const W={then(H,se){return y.then(H,se)},get time(){return dr(J)},set time(H){H=Mr(H),J=H,_!==null||!k||I===0?_=H:Z=k.now()-H/I},get duration(){const H=O.calculatedDuration===null?Dh(O):O.calculatedDuration;return dr(H)},get speed(){return I},set speed(H){H===I||!k||(I=H,W.time=dr(J))},get state(){return R},play:oe,pause:()=>{R="paused",_=J},stop:()=>{B=!0,R!=="idle"&&(R="idle",f&&f(),$())},cancel:()=>{Y!==null&&X(Y),$()},complete:()=>{R="finished"},sample:H=>(Z=0,X(H))};return W}function e4(e){let t;return()=>(t===void 0&&(t=e()),t)}const t4=e4(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),n4=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Oa=10,r4=2e4,o4=(e,t)=>t.type==="spring"||e==="backgroundColor"||!th(t.ease);function i4(e,t,{onUpdate:n,onComplete:r,...i}){if(!(t4()&&n4.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let l=!1,A,d;const f=()=>{d=new Promise(k=>{A=k})};f();let{keyframes:h,duration:E=300,ease:C,times:I}=i;if(o4(t,i)){const k=Sa({...i,repeat:0,delay:0});let T={done:!1,value:h[0]};const S=[];let O=0;for(;!T.done&&O<r4;)T=k.sample(O),S.push(T.value),O+=Oa;I=void 0,h=S,E=O-Oa,C="linear"}const B=CP(e.owner.current,t,h,{...i,duration:E,ease:C,times:I});i.syncStart&&(B.startTime=kt.isProcessing?kt.timestamp:document.timeline?document.timeline.currentTime:performance.now());const Q=()=>B.cancel(),y=()=>{ft.update(Q),A(),f()};return B.onfinish=()=>{e.set(EP(h,i)),r&&r(),y()},{then(k,T){return d.then(k,T)},attachTimeline(k){return B.timeline=k,B.onfinish=null,yt},get time(){return dr(B.currentTime||0)},set time(k){B.currentTime=Mr(k)},get speed(){return B.playbackRate},set speed(k){B.playbackRate=k},get duration(){return dr(E)},play:()=>{l||(B.play(),cr(Q))},pause:()=>B.pause(),stop:()=>{if(l=!0,B.playState==="idle")return;const{currentTime:k}=B;if(k){const T=Sa({...i,autoplay:!1});e.setWithVelocity(T.sample(k-Oa).value,T.sample(k).value,Oa)}y()},complete:()=>B.finish(),cancel:y}}function s4({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:yt,pause:yt,stop:yt,then:a=>(a(),Promise.resolve()),cancel:yt,complete:yt});return t?Sa({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const a4={type:"spring",stiffness:500,damping:25,restSpeed:10},l4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),c4={type:"keyframes",duration:.8},A4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},u4=(e,{keyframes:t})=>t.length>2?c4:so.has(e)?e.startsWith("scale")?l4(t[1]):a4:A4,KA=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Dr.test(t)||t==="0")&&!t.startsWith("url(")),d4=new Set(["brightness","contrast","saturate","opacity"]);function g4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qa)||[];if(!r)return e;const i=n.replace(r,"");let a=d4.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const f4=/([a-z-]*)\(.*?\)/g,qA={...Dr,getAnimatableNone:e=>{const t=e.match(f4);return t?t.map(g4).join(" "):e}},p4={...kp,color:Xt,backgroundColor:Xt,outlineColor:Xt,fill:Xt,stroke:Xt,borderColor:Xt,borderTopColor:Xt,borderRightColor:Xt,borderBottomColor:Xt,borderLeftColor:Xt,filter:qA,WebkitFilter:qA},_A=e=>p4[e];function kh(e,t){let n=_A(e);return n!==qA&&(n=Dr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Fh=e=>/^0[^.\s]+$/.test(e);function h4(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Fh(e)}function C4(e,t,n,r){const i=KA(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const l=r.from!==void 0?r.from:e.get();let A;const d=[];for(let f=0;f<a.length;f++)a[f]===null&&(a[f]=f===0?l:a[f-1]),h4(a[f])&&d.push(f),typeof a[f]=="string"&&a[f]!=="none"&&a[f]!=="0"&&(A=a[f]);if(i&&d.length&&A)for(let f=0;f<d.length;f++){const h=d[f];a[h]=kh(t,A)}return a}function E4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:l,repeatDelay:A,from:d,elapsed:f,...h}){return!!Object.keys(h).length}function Lh(e,t){return e[t]||e.default||e}const JA=(e,t,n,r={})=>i=>{const a=Lh(r,e)||{},l=a.delay||r.delay||0;let{elapsed:A=0}=r;A=A-Mr(l);const d=C4(t,e,n,a),f=d[0],h=d[d.length-1],E=KA(e,f),C=KA(e,h);qi(E===C,`You are trying to animate ${e} from "${f}" to "${h}". ${f} is not an animatable value - to enable this animation set ${f} to a value animatable to ${h} via the \`style\` property.`);let I={keyframes:d,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-A,onUpdate:B=>{t.set(B),a.onUpdate&&a.onUpdate(B)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(E4(a)||(I={...I,...u4(e,I)}),I.duration&&(I.duration=Mr(I.duration)),I.repeatDelay&&(I.repeatDelay=Mr(I.repeatDelay)),!E||!C||hP.current||a.type===!1)return s4(I);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const B=i4(t,e,I);if(B)return B}return Sa(I)};function Ma(e){return!!(nn(e)&&e.add)}const Nh=e=>/^\-?\d*\.?\d+$/.test(e);function XA(e,t){e.indexOf(t)===-1&&e.push(t)}function ZA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $A{constructor(){this.subscriptions=[]}add(t){return XA(this.subscriptions,t),()=>ZA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const l=this.subscriptions[a];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Rh=new Set;function eu(e,t,n){e||Rh.has(t)||(console.warn(t),n&&console.warn(n),Rh.add(t))}const I4=e=>!isNaN(parseFloat(e));class B4{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:l}=kt;this.lastUpdated!==l&&(this.timeDelta=a,this.lastUpdated=l,ft.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ft.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=I4(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&eu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new $A);const r=this.events[t].add(n);return t==="change"?()=>{r(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?xh(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Yo(e,t){return new B4(e,t)}const jh=e=>t=>t.test(e),Vh=[ao,Me,Xn,Pr,S2,P2,{test:e=>e==="auto",parse:e=>e}],Zi=e=>Vh.find(jh(e)),Q4=[...Vh,Xt,Dr],m4=e=>Q4.find(jh(e));function y4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yo(n))}function b4(e,t){const n=wa(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const l in a){const A=G2(a[l]);y4(e,l,A)}}function v4(e,t,n){var r,i;const a=Object.keys(t).filter(A=>!e.hasValue(A)),l=a.length;if(l)for(let A=0;A<l;A++){const d=a[A],f=t[d];let h=null;Array.isArray(f)&&(h=f[0]),h===null&&(h=(i=(r=n[d])!==null&&r!==void 0?r:e.readValue(d))!==null&&i!==void 0?i:t[d]),h!=null&&(typeof h=="string"&&(Nh(h)||Fh(h))?h=parseFloat(h):!m4(h)&&Dr.test(f)&&(h=kh(d,f)),e.addValue(d,Yo(h,{owner:e})),n[d]===void 0&&(n[d]=h),h!==null&&e.setBaseTarget(d,h))}}function x4(e,t){return t?(t[e]||t.default||t).from:void 0}function w4(e,t,n){const r={};for(const i in e){const a=x4(i,t);if(a!==void 0)r[i]=a;else{const l=n.getValue(i);l&&(r[i]=l.get())}}return r}function T4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:l,...A}=e.makeTargetAnimatable(t);const d=e.getValue("willChange");r&&(a=r);const f=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const E in A){const C=e.getValue(E),I=A[E];if(!C||I===void 0||h&&T4(h,E))continue;const B={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!C.hasAnimated){const y=e.getProps()[pP];y&&(B.elapsed=window.HandoffAppearAnimations(y,E,C,ft),B.syncStart=!0)}C.start(JA(E,C,I,e.shouldReduceMotion&&so.has(E)?{type:!1}:B));const Q=C.animation;Ma(d)&&(d.add(E),Q.then(()=>d.remove(E))),f.push(Q)}return l&&Promise.all(f).then(()=>{l&&b4(e,l)}),f}function tu(e,t,n={}){const r=wa(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Hh(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:E}=i;return P4(e,t,f+d,h,E,n)}:()=>Promise.resolve(),{when:A}=i;if(A){const[d,f]=A==="beforeChildren"?[a,l]:[l,a];return d().then(()=>f())}else return Promise.all([a(),l(n.delay)])}function P4(e,t,n=0,r=0,i=1,a){const l=[],A=(e.variantChildren.size-1)*r,d=i===1?(f=0)=>f*r:(f=0)=>A-f*r;return Array.from(e.variantChildren).sort(S4).forEach((f,h)=>{f.notify("AnimationStart",t),l.push(tu(f,t,{...a,delay:n+d(h)}).then(()=>f.notify("AnimationComplete",t)))}),Promise.all(l)}function S4(e,t){return e.sortNodePosition(t)}function O4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>tu(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=tu(e,t,n);else{const i=typeof t=="function"?wa(e,t,n.custom):t;r=Promise.all(Hh(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const M4=[...mA].reverse(),D4=mA.length;function k4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>O4(e,n,r)))}function F4(e){let t=k4(e);const n=N4();let r=!0;const i=(d,f)=>{const h=wa(e,f);if(h){const{transition:E,transitionEnd:C,...I}=h;d={...d,...I,...C}}return d};function a(d){t=d(e)}function l(d,f){const h=e.getProps(),E=e.getVariantContext(!0)||{},C=[],I=new Set;let B={},Q=1/0;for(let D=0;D<D4;D++){const k=M4[D],T=n[k],S=h[k]!==void 0?h[k]:E[k],O=Hi(S),V=k===f?T.isActive:null;V===!1&&(Q=D);let R=S===E[k]&&S!==h[k]&&O;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),T.protectedKeys={...B},!T.isActive&&V===null||!S&&!T.prevProp||Ca(S)||typeof S=="boolean")continue;const _=L4(T.prevProp,S);let Z=_||k===f&&T.isActive&&!R&&O||D>Q&&O;const Y=Array.isArray(S)?S:[S];let re=Y.reduce(i,{});V===!1&&(re={});const{prevResolvedValues:de={}}=T,pe={...de,...re},J=X=>{Z=!0,I.delete(X),T.needsAnimating[X]=!0};for(const X in pe){const U=re[X],$=de[X];B.hasOwnProperty(X)||(U!==$?ya(U)&&ya($)?!$p(U,$)||_?J(X):T.protectedKeys[X]=!0:U!==void 0?J(X):I.add(X):U!==void 0&&I.has(X)?J(X):T.protectedKeys[X]=!0)}T.prevProp=S,T.prevResolvedValues=re,T.isActive&&(B={...B,...re}),r&&e.blockInitialAnimation&&(Z=!1),Z&&!R&&C.push(...Y.map(X=>({animation:X,options:{type:k,...d}})))}if(I.size){const D={};I.forEach(k=>{const T=e.getBaseTarget(k);T!==void 0&&(D[k]=T)}),C.push({animation:D})}let y=!!C.length;return r&&h.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(C):Promise.resolve()}function A(d,f,h){var E;if(n[d].isActive===f)return Promise.resolve();(E=e.variantChildren)===null||E===void 0||E.forEach(I=>{var B;return(B=I.animationState)===null||B===void 0?void 0:B.setActive(d,f)}),n[d].isActive=f;const C=l(h,d);for(const I in n)n[I].protectedKeys={};return C}return{animateChanges:l,setActive:A,setAnimateFunction:a,getState:()=>n}}function L4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$p(t,e):!1}function co(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function N4(){return{animate:co(!0),whileInView:co(),whileHover:co(),whileTap:co(),whileDrag:co(),whileFocus:co(),exit:co()}}class R4 extends Or{constructor(t){super(t),t.animationState||(t.animationState=F4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ca(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let j4=0;class V4 extends Or{constructor(){super(...arguments),this.id=j4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const H4={animation:{Feature:R4},exit:{Feature:V4}},zh=(e,t)=>Math.abs(e-t);function z4(e,t){const n=zh(e.x,t.x),r=zh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Wh{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=ru(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,E=z4(f.offset,{x:0,y:0})>=3;if(!h&&!E)return;const{point:C}=f,{timestamp:I}=kt;this.history.push({...C,timestamp:I});const{onStart:B,onMove:Q}=this.handlers;h||(B&&B(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),Q&&Q(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=nu(h,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:E,onSessionEnd:C}=this.handlers,I=ru(f.type==="pointercancel"?this.lastMoveEventInfo:nu(h,this.transformPagePoint),this.history);this.startEvent&&E&&E(f,I),C&&C(f,I)},!Gp(t))return;this.handlers=n,this.transformPagePoint=r;const i=xa(t),a=nu(i,this.transformPagePoint),{point:l}=a,{timestamp:A}=kt;this.history=[{...l,timestamp:A}];const{onSessionStart:d}=n;d&&d(t,ru(a,this.history)),this.removeListeners=Sr(ur(window,"pointermove",this.handlePointerMove),ur(window,"pointerup",this.handlePointerUp),ur(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cr(this.updatePoint)}}function nu(e,t){return t?{point:t(e.point)}:e}function Uh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ru({point:e},t){return{point:e,delta:Uh(e,Gh(t)),offset:Uh(e,W4(t)),velocity:U4(t,.1)}}function W4(e){return e[0]}function Gh(e){return e[e.length-1]}function U4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Gh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mr(t)));)n--;if(!r)return{x:0,y:0};const a=dr(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const l={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function dn(e){return e.max-e.min}function ou(e,t=0,n=.01){return Math.abs(e-t)<=n}function Yh(e,t,n,r=.5){e.origin=r,e.originPoint=It(t.min,t.max,e.origin),e.scale=dn(n)/dn(t),(ou(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=It(n.min,n.max,e.origin)-e.originPoint,(ou(e.translate)||isNaN(e.translate))&&(e.translate=0)}function $i(e,t,n,r){Yh(e.x,t.x,n.x,r?r.originX:void 0),Yh(e.y,t.y,n.y,r?r.originY:void 0)}function Kh(e,t,n){e.min=n.min+t.min,e.max=e.min+dn(t)}function G4(e,t,n){Kh(e.x,t.x,n.x),Kh(e.y,t.y,n.y)}function qh(e,t,n){e.min=t.min-n.min,e.max=e.min+dn(t)}function es(e,t,n){qh(e.x,t.x,n.x),qh(e.y,t.y,n.y)}function Y4(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?It(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?It(n,e,r.max):Math.min(e,n)),e}function _h(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function K4(e,{top:t,left:n,bottom:r,right:i}){return{x:_h(e.x,n,i),y:_h(e.y,t,r)}}function Jh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function q4(e,t){return{x:Jh(e.x,t.x),y:Jh(e.y,t.y)}}function _4(e,t){let n=.5;const r=dn(e),i=dn(t);return i>r?n=Xi(t.min,t.max-r,e.min):r>i&&(n=Xi(e.min,e.max-i,t.min)),Tr(0,1,n)}function J4(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iu=.35;function X4(e=iu){return e===!1?e=0:e===!0&&(e=iu),{x:Xh(e,"left","right"),y:Xh(e,"top","bottom")}}function Xh(e,t,n){return{min:Zh(e,t),max:Zh(e,n)}}function Zh(e,t){return typeof e=="number"?e:e[t]||0}const $h=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ko=()=>({x:$h(),y:$h()}),eC=()=>({min:0,max:0}),wt=()=>({x:eC(),y:eC()});function $n(e){return[e("x"),e("y")]}function tC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Z4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $4(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function su(e){return e===void 0||e===1}function au({scale:e,scaleX:t,scaleY:n}){return!su(e)||!su(t)||!su(n)}function Ao(e){return au(e)||nC(e)||e.z||e.rotate||e.rotateX||e.rotateY}function nC(e){return rC(e.x)||rC(e.y)}function rC(e){return e&&e!=="0%"}function Da(e,t,n){const r=e-n,i=t*r;return n+i}function oC(e,t,n,r,i){return i!==void 0&&(e=Da(e,i,r)),Da(e,n,r)+t}function lu(e,t=0,n=1,r,i){e.min=oC(e.min,t,n,r,i),e.max=oC(e.max,t,n,r,i)}function iC(e,{x:t,y:n}){lu(e.x,t.translate,t.scale,t.originPoint),lu(e.y,n.translate,n.scale,n.originPoint)}function eS(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,l;for(let A=0;A<i;A++){a=n[A],l=a.projectionDelta;const d=a.instance;d&&d.style&&d.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&qo(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,iC(e,l)),r&&Ao(a.latestValues)&&qo(e,a.latestValues))}t.x=sC(t.x),t.y=sC(t.y)}function sC(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function kr(e,t){e.min=e.min+t,e.max=e.max+t}function aC(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,l=It(e.min,e.max,a);lu(e,t[n],t[r],l,t.scale)}const tS=["x","scaleX","originX"],nS=["y","scaleY","originY"];function qo(e,t){aC(e.x,t,tS),aC(e.y,t,nS)}function lC(e,t){return tC($4(e.getBoundingClientRect(),t))}function rS(e,t,n){const r=lC(e,n),{scroll:i}=t;return i&&(kr(r.x,i.offset.x),kr(r.y,i.offset.y)),r}const oS=new WeakMap;class iS{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{this.stopAnimation(),n&&this.snapToCursor(xa(d,"page").point)},a=(d,f)=>{const{drag:h,dragPropagation:E,onDragStart:C}=this.getProps();if(h&&!E&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=_p(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$n(B=>{let Q=this.getAxisMotionValue(B).get()||0;if(Xn.test(Q)){const{projection:y}=this.visualElement;if(y&&y.layout){const D=y.layout.layoutBox[B];D&&(Q=dn(D)*(parseFloat(Q)/100))}}this.originPoint[B]=Q}),C&&ft.update(()=>C(d,f),!1,!0);const{animationState:I}=this.visualElement;I&&I.setActive("whileDrag",!0)},l=(d,f)=>{const{dragPropagation:h,dragDirectionLock:E,onDirectionLock:C,onDrag:I}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:B}=f;if(E&&this.currentDirection===null){this.currentDirection=sS(B),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",f.point,B),this.updateAxis("y",f.point,B),this.visualElement.render(),I&&I(d,f)},A=(d,f)=>this.stop(d,f);this.panSession=new Wh(t,{onSessionStart:i,onStart:a,onMove:l,onSessionEnd:A},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&ft.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ka(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=Y4(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Uo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=K4(r.layoutBox,t):this.constraints=!1,this.elastic=X4(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&$n(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=J4(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Uo(t))return!1;const r=t.current;Zn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=rS(r,i.root,this.visualElement.getTransformPagePoint());let l=q4(i.layout.layoutBox,a);if(n){const A=n(Z4(l));this.hasMutatedConstraints=!!A,A&&(l=tC(A))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:A}=this.getProps(),d=this.constraints||{},f=$n(h=>{if(!ka(h,n,this.currentDirection))return;let E=d&&d[h]||{};l&&(E={min:0,max:0});const C=i?200:1e6,I=i?40:1e7,B={type:"inertia",velocity:r?t[h]:0,bounceStiffness:C,bounceDamping:I,timeConstant:750,restDelta:1,restSpeed:10,...a,...E};return this.startAxisValueAnimation(h,B)});return Promise.all(f).then(A)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(JA(t,r,0,n))}stopAnimation(){$n(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){$n(n=>{const{drag:r}=this.getProps();if(!ka(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:A}=i.layout.layoutBox[n];a.set(t[n]-It(l,A,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Uo(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};$n(l=>{const A=this.getAxisMotionValue(l);if(A){const d=A.get();i[l]=_4({min:d,max:d},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),$n(l=>{if(!ka(l,t,null))return;const A=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];A.set(It(d,f,i[l]))})}addListeners(){if(!this.visualElement.current)return;oS.set(this.visualElement,this);const t=this.visualElement.current,n=ur(t,"pointerdown",d=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();Uo(d)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const l=Ar(window,"resize",()=>this.scalePositionWithinConstraints()),A=i.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&($n(h=>{const E=this.getAxisMotionValue(h);E&&(this.originPoint[h]+=d[h].translate,E.set(E.get()+d[h].translate))}),this.visualElement.render())});return()=>{l(),n(),a(),A&&A()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:l=iu,dragMomentum:A=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:l,dragMomentum:A}}}function ka(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aS extends Or{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new iS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const cC=e=>(t,n)=>{e&&ft.update(()=>e(t,n))};class lS extends Or{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Wh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cC(t),onStart:cC(n),onMove:r,onEnd:(a,l)=>{delete this.session,i&&ft.update(()=>i(a,l))}}}mount(){this.removePointerDownListener=ur(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function cS(){const e=P.useContext(QA);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=P.useId();return P.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Fa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function AC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ts={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=AC(e,t.target.x),r=AC(e,t.target.y);return`${n}% ${r}%`}},AS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Dr.parse(e);if(i.length>5)return r;const a=Dr.createTransformer(e),l=typeof i[0]!="number"?1:0,A=n.x.scale*t.x,d=n.y.scale*t.y;i[0+l]/=A,i[1+l]/=d;const f=It(A,d,.5);return typeof i[2+l]=="number"&&(i[2+l]/=f),typeof i[3+l]=="number"&&(i[3+l]/=f),a(i)}};class uS extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;m2(dS),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Fa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,l=r.projection;return l&&(l.isPresent=a,i||t.layoutDependency!==n||n===void 0?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||ft.postRender(()=>{const A=l.getStack();(!A||!A.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function uC(e){const[t,n]=cS(),r=P.useContext(xp);return P.createElement(uS,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(wp),isPresent:t,safeToRemove:n})}const dS={borderRadius:{...ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ts,borderTopRightRadius:ts,borderBottomLeftRadius:ts,borderBottomRightRadius:ts,boxShadow:AS},dC=["TopLeft","TopRight","BottomLeft","BottomRight"],gS=dC.length,gC=e=>typeof e=="string"?parseFloat(e):e,fC=e=>typeof e=="number"||Me.test(e);function fS(e,t,n,r,i,a){i?(e.opacity=It(0,n.opacity!==void 0?n.opacity:1,pS(r)),e.opacityExit=It(t.opacity!==void 0?t.opacity:1,0,hS(r))):a&&(e.opacity=It(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let l=0;l<gS;l++){const A=`border${dC[l]}Radius`;let d=pC(t,A),f=pC(n,A);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||fC(d)===fC(f)?(e[A]=Math.max(It(gC(d),gC(f),r),0),(Xn.test(f)||Xn.test(d))&&(e[A]+="%")):e[A]=f}(t.rotate||n.rotate)&&(e.rotate=It(t.rotate||0,n.rotate||0,r))}function pC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pS=hC(0,.5,NA),hS=hC(.5,.95,yt);function hC(e,t,n){return r=>r<e?0:r>t?1:n(Xi(e,t,r))}function CC(e,t){e.min=t.min,e.max=t.max}function Pn(e,t){CC(e.x,t.x),CC(e.y,t.y)}function EC(e,t,n,r,i){return e-=t,e=Da(e,1/n,r),i!==void 0&&(e=Da(e,1/i,r)),e}function CS(e,t=0,n=1,r=.5,i,a=e,l=e){if(Xn.test(t)&&(t=parseFloat(t),t=It(l.min,l.max,t/100)-l.min),typeof t!="number")return;let A=It(a.min,a.max,r);e===a&&(A-=t),e.min=EC(e.min,t,n,A,i),e.max=EC(e.max,t,n,A,i)}function IC(e,t,[n,r,i],a,l){CS(e,t[n],t[r],t[i],t.scale,a,l)}const ES=["x","scaleX","originX"],IS=["y","scaleY","originY"];function BC(e,t,n,r){IC(e.x,t,ES,n?n.x:void 0,r?r.x:void 0),IC(e.y,t,IS,n?n.y:void 0,r?r.y:void 0)}function QC(e){return e.translate===0&&e.scale===1}function mC(e){return QC(e.x)&&QC(e.y)}function BS(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function yC(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function bC(e){return dn(e.x)/dn(e.y)}class QS{constructor(){this.members=[]}add(t){XA(this.members,t),t.scheduleRender()}remove(t){if(ZA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vC(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:d,rotateX:f,rotateY:h}=n;d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `)}const l=e.x.scale*t.x,A=e.y.scale*t.y;return(l!==1||A!==1)&&(r+=`scale(${l}, ${A})`),r||"none"}const mS=(e,t)=>e.depth-t.depth;class yS{constructor(){this.children=[],this.isDirty=!1}add(t){XA(this.children,t),this.isDirty=!0}remove(t){ZA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mS),this.isDirty=!1,this.children.forEach(t)}}function bS(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(cr(r),e(a-t))};return ft.read(r,!0),()=>cr(r)}function vS(e){window.MotionDebug&&window.MotionDebug.record(e)}function xS(e){return e instanceof SVGElement&&e.tagName!=="svg"}function wS(e,t,n){const r=nn(e)?e:Yo(e);return r.start(JA("",r,t,n)),r.animation}const xC=["","X","Y","Z"],wC=1e3;let TS=0;const uo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function TC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},A=t==null?void 0:t()){this.id=TS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{uo.totalNodes=uo.resolvedTargetDeltas=uo.recalculatedProjection=0,this.nodes.forEach(OS),this.nodes.forEach(LS),this.nodes.forEach(NS),this.nodes.forEach(MS),vS(uo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=A?A.root||A:this,this.path=A?[...A.path,A]:[],this.parent=A,this.depth=A?A.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new yS)}addEventListener(l,A){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new $A),this.eventHandlers.get(l).add(A)}notifyListeners(l,...A){const d=this.eventHandlers.get(l);d&&d.notify(...A)}hasListeners(l){return this.eventHandlers.has(l)}mount(l,A=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=xS(l),this.instance=l;const{layoutId:d,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),A&&(f||d)&&(this.isLayoutDirty=!0),e){let E;const C=()=>this.root.updateBlockedByResize=!1;e(l,()=>{this.root.updateBlockedByResize=!0,E&&E(),E=bS(C,250),Fa.hasAnimatedSinceResize&&(Fa.hasAnimatedSinceResize=!1,this.nodes.forEach(SC))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&h&&(d||f)&&this.addEventListener("didUpdate",({delta:E,hasLayoutChanged:C,hasRelativeTargetChanged:I,layout:B})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const Q=this.options.transition||h.getDefaultTransition()||zS,{onLayoutAnimationStart:y,onLayoutAnimationComplete:D}=h.getProps(),k=!this.targetLayout||!yC(this.targetLayout,B)||I,T=!C&&I;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||C&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(E,T);const S={...Lh(Q,"layout"),onPlay:y,onComplete:D};(h.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else C||SC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=B})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(RS),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const E=this.path[h];E.shouldResetTransform=!0,E.updateScroll("snapshot"),E.options.layoutRoot&&E.willUpdate(!1)}const{layoutId:A,layout:d}=this.options;if(A===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(PC);return}this.isUpdating||this.nodes.forEach(kS),this.isUpdating=!1,this.nodes.forEach(FS),this.nodes.forEach(PS),this.nodes.forEach(SS),this.clearAllSnapshots();const A=performance.now();kt.delta=Tr(0,1e3/60,A-kt.timestamp),kt.timestamp=A,kt.isProcessing=!0,DA.update.process(kt),DA.preRender.process(kt),DA.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(DS),this.sharedNodes.forEach(jS)}scheduleUpdateProjection(){ft.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:A}=this.options;A&&A.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let A=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(A=!1),A&&(this.scroll={animationId:this.root.animationId,phase:l,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform,A=this.projectionDelta&&!mC(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;l&&(A||Ao(this.latestValues)||h)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const A=this.measurePageBox();let d=this.removeElementScroll(A);return l&&(d=this.removeTransform(d)),WS(d),{animationId:this.root.animationId,measuredBox:A,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return wt();const A=l.measureViewportBox(),{scroll:d}=this.root;return d&&(kr(A.x,d.offset.x),kr(A.y,d.offset.y)),A}removeElementScroll(l){const A=wt();Pn(A,l);for(let d=0;d<this.path.length;d++){const f=this.path[d],{scroll:h,options:E}=f;if(f!==this.root&&h&&E.layoutScroll){if(h.isRoot){Pn(A,l);const{scroll:C}=this.root;C&&(kr(A.x,-C.offset.x),kr(A.y,-C.offset.y))}kr(A.x,h.offset.x),kr(A.y,h.offset.y)}}return A}applyTransform(l,A=!1){const d=wt();Pn(d,l);for(let f=0;f<this.path.length;f++){const h=this.path[f];!A&&h.options.layoutScroll&&h.scroll&&h!==h.root&&qo(d,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Ao(h.latestValues)&&qo(d,h.latestValues)}return Ao(this.latestValues)&&qo(d,this.latestValues),d}removeTransform(l){const A=wt();Pn(A,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!Ao(f.latestValues))continue;au(f.latestValues)&&f.updateSnapshot();const h=wt(),E=f.measurePageBox();Pn(h,E),BC(A,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return Ao(this.latestValues)&&BC(A,this.latestValues),A}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var A;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==d;if(!(l||f&&this.isSharedProjectionDirty||this.isProjectionDirty||!((A=this.parent)===null||A===void 0)&&A.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:E,layoutId:C}=this.options;if(!(!this.layout||!(E||C))){if(this.resolvedRelativeTargetAt=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const I=this.getClosestProjectingParent();I&&I.layout&&this.animationProgress!==1?(this.relativeParent=I,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),es(this.relativeTargetOrigin,this.layout.layoutBox,I.layout.layoutBox),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wt(),this.targetWithTransforms=wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),G4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Pn(this.target,this.layout.layoutBox),iC(this.target,this.targetDelta)):Pn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const I=this.getClosestProjectingParent();I&&!!I.resumingFrom==!!this.resumingFrom&&!I.options.layoutScroll&&I.target&&this.animationProgress!==1?(this.relativeParent=I,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),es(this.relativeTargetOrigin,this.target,I.target),Pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}uo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||au(this.parent.latestValues)||nC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var l;const A=this.getLead(),d=!!this.resumingFrom||this!==A;let f=!0;if((this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty)&&(f=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===kt.timestamp&&(f=!1),f)return;const{layout:h,layoutId:E}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||E))return;Pn(this.layoutCorrected,this.layout.layoutBox);const C=this.treeScale.x,I=this.treeScale.y;eS(this.layoutCorrected,this.treeScale,this.path,d),A.layout&&!A.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(A.target=A.layout.layoutBox);const{target:B}=A;if(!B){this.projectionTransform&&(this.projectionDelta=Ko(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Ko(),this.projectionDeltaWithTransform=Ko());const Q=this.projectionTransform;$i(this.projectionDelta,this.layoutCorrected,B,this.latestValues),this.projectionTransform=vC(this.projectionDelta,this.treeScale),(this.projectionTransform!==Q||this.treeScale.x!==C||this.treeScale.y!==I)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",B)),uo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),l){const A=this.getStack();A&&A.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(l,A=!1){const d=this.snapshot,f=d?d.latestValues:{},h={...this.latestValues},E=Ko();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!A;const C=wt(),I=d?d.source:void 0,B=this.layout?this.layout.source:void 0,Q=I!==B,y=this.getStack(),D=!y||y.members.length<=1,k=!!(Q&&!D&&this.options.crossfade===!0&&!this.path.some(HS));this.animationProgress=0;let T;this.mixTargetDelta=S=>{const O=S/1e3;OC(E.x,l.x,O),OC(E.y,l.y,O),this.setTargetDelta(E),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(es(C,this.layout.layoutBox,this.relativeParent.layout.layoutBox),VS(this.relativeTarget,this.relativeTargetOrigin,C,O),T&&BS(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=wt()),Pn(T,this.relativeTarget)),Q&&(this.animationValues=h,fS(h,f,this.latestValues,O,k,D)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Fa.hasAnimatedSinceResize=!0,this.currentAnimation=wS(0,wC,{...l,onUpdate:A=>{this.mixTargetDelta(A),l.onUpdate&&l.onUpdate(A)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:A,target:d,layout:f,latestValues:h}=l;if(!(!A||!d||!f)){if(this!==l&&this.layout&&f&&LC(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||wt();const E=dn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+E;const C=dn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+C}Pn(A,d),qo(A,h),$i(this.projectionDeltaWithTransform,this.layoutCorrected,A,h)}}registerSharedNode(l,A){this.sharedNodes.has(l)||this.sharedNodes.set(l,new QS),this.sharedNodes.get(l).add(A);const f=A.options.initialPromotionConfig;A.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(A):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var l;const{layoutId:A}=this.options;return A?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:A}=this.options;return A?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:A,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),A&&this.setOptions({transition:A})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetRotation(){const{visualElement:l}=this.options;if(!l)return;let A=!1;const{latestValues:d}=l;if((d.rotate||d.rotateX||d.rotateY||d.rotateZ)&&(A=!0),!A)return;const f={};for(let h=0;h<xC.length;h++){const E="rotate"+xC[h];d[E]&&(f[E]=d[E],l.setStaticValue(E,0))}l.render();for(const h in f)l.setStaticValue(h,f[h]);l.scheduleRender()}getProjectionStyles(l={}){var A,d;const f={};if(!this.instance||this.isSVG)return f;if(this.isVisible)f.visibility="";else return{visibility:"hidden"};const h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,f.opacity="",f.pointerEvents=ba(l.pointerEvents)||"",f.transform=h?h(this.latestValues,""):"none",f;const E=this.getLead();if(!this.projectionDelta||!this.layout||!E.target){const Q={};return this.options.layoutId&&(Q.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,Q.pointerEvents=ba(l.pointerEvents)||""),this.hasProjected&&!Ao(this.latestValues)&&(Q.transform=h?h({},""):"none",this.hasProjected=!1),Q}const C=E.animationValues||E.latestValues;this.applyTransformsToTarget(),f.transform=vC(this.projectionDeltaWithTransform,this.treeScale,C),h&&(f.transform=h(C,f.transform));const{x:I,y:B}=this.projectionDelta;f.transformOrigin=`${I.origin*100}% ${B.origin*100}% 0`,E.animationValues?f.opacity=E===this?(d=(A=C.opacity)!==null&&A!==void 0?A:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:C.opacityExit:f.opacity=E===this?C.opacity!==void 0?C.opacity:"":C.opacityExit!==void 0?C.opacityExit:0;for(const Q in Ia){if(C[Q]===void 0)continue;const{correct:y,applyTo:D}=Ia[Q],k=f.transform==="none"?C[Q]:y(C[Q],E);if(D){const T=D.length;for(let S=0;S<T;S++)f[D[S]]=k}else f[Q]=k}return this.options.layoutId&&(f.pointerEvents=E===this?ba(l.pointerEvents)||"":"none"),f}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var A;return(A=l.currentAnimation)===null||A===void 0?void 0:A.stop()}),this.root.nodes.forEach(PC),this.root.sharedNodes.clear()}}}function PS(e){e.updateLayout()}function SS(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,l=n.source!==e.layout.source;a==="size"?$n(E=>{const C=l?n.measuredBox[E]:n.layoutBox[E],I=dn(C);C.min=r[E].min,C.max=C.min+I}):LC(a,n.layoutBox,r)&&$n(E=>{const C=l?n.measuredBox[E]:n.layoutBox[E],I=dn(r[E]);C.max=C.min+I,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[E].max=e.relativeTarget[E].min+I)});const A=Ko();$i(A,r,n.layoutBox);const d=Ko();l?$i(d,e.applyTransform(i,!0),n.measuredBox):$i(d,r,n.layoutBox);const f=!mC(A);let h=!1;if(!e.resumeFrom){const E=e.getClosestProjectingParent();if(E&&!E.resumeFrom){const{snapshot:C,layout:I}=E;if(C&&I){const B=wt();es(B,n.layoutBox,C.layoutBox);const Q=wt();es(Q,r,I.layoutBox),yC(B,Q)||(h=!0),E.options.layoutRoot&&(e.relativeTarget=Q,e.relativeTargetOrigin=B,e.relativeParent=E)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:d,layoutDelta:A,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function OS(e){uo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function MS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DS(e){e.clearSnapshot()}function PC(e){e.clearMeasurements()}function kS(e){e.isLayoutDirty=!1}function FS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function SC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LS(e){e.resolveTargetDelta()}function NS(e){e.calcProjection()}function RS(e){e.resetRotation()}function jS(e){e.removeLeadSnapshot()}function OC(e,t,n){e.translate=It(t.translate,0,n),e.scale=It(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function MC(e,t,n,r){e.min=It(t.min,n.min,r),e.max=It(t.max,n.max,r)}function VS(e,t,n,r){MC(e.x,t.x,n.x,r),MC(e.y,t.y,n.y,r)}function HS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zS={duration:.45,ease:[.4,0,.1,1]},DC=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),kC=DC("applewebkit/")&&!DC("chrome/")?Math.round:yt;function FC(e){e.min=kC(e.min),e.max=kC(e.max)}function WS(e){FC(e.x),FC(e.y)}function LC(e,t,n){return e==="position"||e==="preserve-aspect"&&!ou(bC(t),bC(n),.2)}const US=TC({attachResizeListener:(e,t)=>Ar(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cu={current:void 0},NC=TC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cu.current){const e=new US({});e.mount(window),e.setOptions({layoutScroll:!0}),cu.current=e}return cu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),GS={pan:{Feature:lS},drag:{Feature:aS,ProjectionNode:NC,MeasureLayout:uC}},YS=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function KS(e){const t=YS.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const qS=4;function Au(e,t,n=1){Zn(n<=qS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=KS(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const l=a.trim();return Nh(l)?parseFloat(l):l}else return vA(i)?Au(i,t,n+1):i}function _S(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!vA(a))return;const l=Au(a,r);l&&i.set(l)});for(const i in t){const a=t[i];if(!vA(a))continue;const l=Au(a,r);l&&(t[i]=l,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const JS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),RC=e=>JS.has(e),XS=e=>Object.keys(e).some(RC),La=e=>e===ao||e===Me,jC=(e,t)=>parseFloat(e.split(", ")[t]),VC=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return jC(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?jC(a[1],e):0}},ZS=new Set(["x","y","z"]),$S=Wi.filter(e=>!ZS.has(e));function e3(e){const t=[];return $S.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const _o={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:VC(4,13),y:VC(5,14)};_o.translateX=_o.x,_o.translateY=_o.y;const t3=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:l}=a,A={};l==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(f=>{A[f]=_o[f](r,a)}),t.render();const d=t.measureViewportBox();return n.forEach(f=>{const h=t.getValue(f);h&&h.jump(A[f]),e[f]=_o[f](d,a)}),e},n3=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(RC);let a=[],l=!1;const A=[];if(i.forEach(d=>{const f=e.getValue(d);if(!e.hasValue(d))return;let h=n[d],E=Zi(h);const C=t[d];let I;if(ya(C)){const B=C.length,Q=C[0]===null?1:0;h=C[Q],E=Zi(h);for(let y=Q;y<B&&C[y]!==null;y++)I?Zn(Zi(C[y])===I,"All keyframes must be of the same type"):(I=Zi(C[y]),Zn(I===E||La(E)&&La(I),"Keyframes must be of the same dimension as the current value"))}else I=Zi(C);if(E!==I)if(La(E)&&La(I)){const B=f.get();typeof B=="string"&&f.set(parseFloat(B)),typeof C=="string"?t[d]=parseFloat(C):Array.isArray(C)&&I===Me&&(t[d]=C.map(parseFloat))}else E!=null&&E.transform&&(I!=null&&I.transform)&&(h===0||C===0)?h===0?f.set(I.transform(h)):t[d]=E.transform(C):(l||(a=e3(e),l=!0),A.push(d),r[d]=r[d]!==void 0?r[d]:t[d],f.jump(C))}),A.length){const d=A.indexOf("height")>=0?window.pageYOffset:null,f=t3(t,e,A);return a.length&&a.forEach(([h,E])=>{e.getValue(h).set(E)}),e.render(),ha&&d!==null&&window.scrollTo({top:d}),{target:f,transitionEnd:r}}else return{target:t,transitionEnd:r}};function r3(e,t,n,r){return XS(t)?n3(e,t,n,r):{target:t,transitionEnd:r}}const o3=(e,t,n,r)=>{const i=_S(e,t,r);return t=i.target,r=i.transitionEnd,r3(e,t,n,r)},uu={current:null},HC={current:!1};function i3(){if(HC.current=!0,!!ha)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uu.current=e.matches;e.addListener(t),t()}else uu.current=!1}function s3(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],l=n[i];if(nn(a))e.addValue(i,a),Ma(r)&&r.add(i),process.env.NODE_ENV==="development"&&eu(a.version==="10.16.4",`Attempting to mix Framer Motion versions ${a.version} with 10.16.4 may not work as expected.`);else if(nn(l))e.addValue(i,Yo(a,{owner:e})),Ma(r)&&r.remove(i);else if(l!==a)if(e.hasValue(i)){const A=e.getValue(i);!A.hasAnimated&&A.set(a)}else{const A=e.getStaticValue(i);e.addValue(i,Yo(A!==void 0?A:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const zC=new WeakMap,WC=Object.keys(zi),a3=WC.length,UC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],l3=yA.length;class c3{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ft.render(this.render,!1,!0);const{latestValues:A,renderState:d}=a;this.latestValues=A,this.baseTarget={...A},this.initialValues=n.initial?{...A}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.isControllingVariants=Ea(n),this.isVariantNode=yp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{});for(const E in h){const C=h[E];A[E]!==void 0&&nn(C)&&(C.set(A[E],!1),Ma(f)&&f.add(E))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,zC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),HC.current||i3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uu.current,process.env.NODE_ENV!=="production"&&eu(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zC.delete(this.current),this.projection&&this.projection.unmount(),cr(this.notifyUpdate),cr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=so.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ft.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let l,A;if(process.env.NODE_ENV!=="production"&&i&&r){const d="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?qi(!1,d):Zn(!1,d)}for(let d=0;d<a3;d++){const f=WC[d],{isEnabled:h,Feature:E,ProjectionNode:C,MeasureLayout:I}=zi[f];C&&(l=C),h(n)&&(!this.features[f]&&E&&(this.features[f]=new E(this)),I&&(A=I))}if(!this.projection&&l){this.projection=new l(this.latestValues,this.parent&&this.parent.projection);const{layoutId:d,layout:f,drag:h,dragConstraints:E,layoutScroll:C,layoutRoot:I}=n;this.projection.setOptions({layoutId:d,layout:f,alwaysMeasureLayout:!!h||E&&Uo(E),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:C,layoutRoot:I})}return A}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<UC.length;r++){const i=UC[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a=t["on"+i];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=s3(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<l3;r++){const i=yA[r],a=this.props[i];(Hi(a)||a===!1)&&(n[i]=a)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yo(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=MA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!nn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $A),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class GC extends c3{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let l=w4(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),l&&(l=i(l))),a){v4(this,r,l);const A=o3(this,r,l,n);n=A.transitionEnd,r=A.target}return{transition:t,transitionEnd:n,...r}}}function A3(e){return window.getComputedStyle(e)}class u3 extends GC{readValueFromInstance(t,n){if(so.has(n)){const r=_A(n);return r&&r.default||0}else{const r=A3(t),i=(Sp(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return lC(t,n)}build(t,n,r,i){xA(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return OA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){jp(t,n,r,i)}}class d3 extends GC{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(so.has(n)){const r=_A(n);return r&&r.default||0}return n=Vp.has(n)?n:SA(n),t.getAttribute(n)}measureInstanceViewportBox(){return wt()}scrapeMotionValuesFromProps(t,n){return zp(t,n)}build(t,n,r,i){TA(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Hp(t,n,r,i)}mount(t){this.isSVGTag=PA(t.tagName),super.mount(t)}}const g3=(e,t)=>bA(e)?new d3(t,{enableHardwareAcceleration:!1}):new u3(t,{enableHardwareAcceleration:!0}),f3={...H4,...dP,...GS,...{layout:{ProjectionNode:NC,MeasureLayout:uC}}},Na=B2((e,t)=>$2(e,t,f3,g3)),p3=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function YC(...e){const t=P.useRef(0),[n,r]=P.useState(e[t.current]),i=P.useCallback(a=>{t.current=typeof a!="number"?p3(0,e.length,t.current+1):a,r(e[t.current])},[e.length,...e]);return[n,i]}function KC({children:e,type:t="scale",direction:n="right",offset:r=10,scale:i={hover:1.05,tap:.95}}){let a,l;switch(n){case"up":case"left":a=r,l=0;break;case"right":case"down":default:a=0,l=r;break}const[A,d]=YC(a,l),[f,h]=YC(a,l);switch(t){case"rotate":return g.jsx(Na.div,{animate:{rotate:360},transition:{repeat:1/0,repeatType:"loop",duration:2,repeatDelay:0},children:e});case"slide":return n==="up"||n==="down"?g.jsx(Na.div,{animate:{y:f!==void 0?f:""},onHoverEnd:()=>h(),onHoverStart:()=>h(),children:e}):g.jsx(Na.div,{animate:{x:A!==void 0?A:""},onHoverEnd:()=>d(),onHoverStart:()=>d(),children:e});case"scale":default:return typeof i=="number"&&(i={hover:i,tap:i}),g.jsx(Na.div,{whileHover:{scale:i==null?void 0:i.hover},whileTap:{scale:i==null?void 0:i.tap},children:e})}}KC.propTypes={children:c.node,offset:c.number,type:c.oneOf(["slide","scale","rotate"]),direction:c.oneOf(["up","down","left","right"]),scale:c.oneOfType([c.number,c.object])};const h3=vf(g.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function C3(e){return Rt("MuiAvatar",e)}zt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const E3=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],I3=e=>{const{classes:t,variant:n,colorDefault:r}=e;return An({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},C3,t)},B3=le("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(({theme:e,ownerState:t})=>q({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.variant==="square"&&{borderRadius:0},t.colorDefault&&q({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}))),Q3=le("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),m3=le(h3,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function y3({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[i,a]=K.useState(!1);return K.useEffect(()=>{if(!n&&!r)return;a(!1);let l=!0;const A=new Image;return A.onload=()=>{l&&a("loaded")},A.onerror=()=>{l&&a("error")},A.crossOrigin=e,A.referrerPolicy=t,A.src=n,r&&(A.srcset=r),()=>{l=!1}},[e,t,n,r]),i}const qC=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiAvatar"}),{alt:i,children:a,className:l,component:A="div",imgProps:d,sizes:f,src:h,srcSet:E,variant:C="circular"}=r,I=_e(r,E3);let B=null;const Q=y3(q({},d,{src:h,srcSet:E})),y=h||E,D=y&&Q!=="error",k=q({},r,{colorDefault:!D,component:A,variant:C}),T=I3(k);return D?B=g.jsx(Q3,q({alt:i,srcSet:E,src:h,sizes:f,ownerState:k,className:T.img},d)):a!=null?B=a:y&&i?B=i[0]:B=g.jsx(m3,{ownerState:k,className:T.fallback}),g.jsx(B3,q({as:A,ownerState:k,className:at(T.root,l),ref:n},I,{children:B}))});process.env.NODE_ENV!=="production"&&(qC.propTypes={alt:c.string,children:c.node,classes:c.object,className:c.string,component:c.elementType,imgProps:c.object,sizes:c.string,src:c.string,srcSet:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["circular","rounded","square"]),c.string])});const b3=qC,Ut=(e,t)=>{switch(t){case"secondary":return e.palette.secondary;case"error":return e.palette.error;case"warning":return e.palette.warning;case"info":return e.palette.info;case"success":return e.palette.success;default:return e.palette.primary}};function v3({theme:e,color:t,type:n}){const r=Ut(e,t),{lighter:i,light:a,main:l,contrastText:A}=r;switch(n){case"filled":return{color:A,backgroundColor:l};case"outlined":return{color:l,border:"1px solid",borderColor:l,backgroundColor:"transparent"};case"combined":return{color:l,border:"1px solid",borderColor:a,backgroundColor:i};default:return{color:l,backgroundColor:i}}}function x3(e){switch(e){case"badge":return{border:"2px solid",fontSize:"0.675rem",width:20,height:20};case"xs":return{fontSize:"0.75rem",width:24,height:24};case"sm":return{fontSize:"0.875rem",width:32,height:32};case"lg":return{fontSize:"1.2rem",width:52,height:52};case"xl":return{fontSize:"1.5rem",width:64,height:64};case"md":default:return{fontSize:"1rem",width:40,height:40}}}const w3=le(b3,{shouldForwardProp:e=>e!=="color"&&e!=="type"&&e!=="size"})(({theme:e,variant:t,color:n,type:r,size:i})=>({...x3(i),...v3({variant:t,theme:e,color:n,type:r}),...i==="badge"&&{borderColor:e.palette.background.default}}));function Ra({variant:e="circular",children:t,color:n="primary",type:r,size:i="md",...a}){const l=lt();return g.jsx(w3,{variant:e,theme:l,color:n,type:r,size:i,...a,children:t})}Ra.propTypes={children:c.node,color:c.string,type:c.string,size:c.string,variant:c.string};const ja=({color:e,size:t,variant:n,sx:r})=>{const i=lt(),a=Ut(i,e||"primary"),{main:l}=a;return g.jsx(b.Box,{component:"span",sx:{width:t||8,height:t||8,borderRadius:"50%",bgcolor:n==="outlined"?"":l,...n==="outlined"&&{border:`1px solid ${l}`},...r}})};ja.propTypes={color:c.string,size:c.number,variant:c.string,sx:c.oneOfType([c.object,c.string])};function T3(e){return Rt("MuiIconButton",e)}const P3=zt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),S3=["edge","children","className","color","disabled","disableFocusRipple","size"],O3=e=>{const{classes:t,disabled:n,color:r,edge:i,size:a}=e,l={root:["root",n&&"disabled",r!=="default"&&`color${be(r)}`,i&&`edge${be(i)}`,`size${be(a)}`]};return An(l,T3,t)},M3=le(zc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${be(n.color)}`],n.edge&&t[`edge${be(n.edge)}`],t[`size${be(n.size)}`]]}})(({theme:e,ownerState:t})=>q({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return q({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&q({color:r==null?void 0:r.main},!t.disableRipple&&{"&:hover":q({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${P3.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),_C=K.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:l,color:A="default",disabled:d=!1,disableFocusRipple:f=!1,size:h="medium"}=r,E=_e(r,S3),C=q({},r,{edge:i,color:A,disabled:d,disableFocusRipple:f,size:h}),I=O3(C);return g.jsx(M3,q({className:at(I.root,l),centerRipple:!0,focusRipple:!f,disabled:d,ref:n,ownerState:C},E,{children:a}))});process.env.NODE_ENV!=="production"&&(_C.propTypes={children:vr(c.node,e=>K.Children.toArray(e.children).some(n=>K.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
171
171
  `)):null),classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),c.string]),disabled:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,edge:c.oneOf(["end","start",!1]),size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const D3=_C,Jo=(e,t)=>{switch(t){case"secondary":return e.customShadows.secondary;case"error":return e.customShadows.error;case"warning":return e.customShadows.warning;case"info":return e.customShadows.info;case"success":return e.customShadows.success;case"primaryButton":return e.customShadows.primaryButton;case"secondaryButton":return e.customShadows.secondaryButton;case"errorButton":return e.customShadows.errorButton;case"warningButton":return e.customShadows.warningButton;case"infoButton":return e.customShadows.infoButton;case"successButton":return e.customShadows.successButton;default:return e.customShadows.primary}};Jo.propTypes={theme:c.object,shadow:c.string};function k3({variant:e,theme:t,color:n}){const r=Ut(t,n),{lighter:i,light:a,dark:l,main:A,contrastText:d}=r,f=`${n}Button`,h=Jo(t,f),E={"&::after":{boxShadow:`0 0 6px 6px ${Ve(A,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ve(A,.9)}`},"&:focus-visible":{outline:`2px solid ${l}`,outlineOffset:2}};switch(e){case"contained":return{color:d,backgroundColor:A,"&:hover":{backgroundColor:l},...E};case"light":return{color:A,backgroundColor:i,"&:hover":{backgroundColor:a},...E};case"shadow":return{boxShadow:h,color:d,backgroundColor:A,"&:hover":{boxShadow:"none",backgroundColor:l},...E};case"outlined":return{"&:hover":{backgroundColor:"transparent",color:l,borderColor:l},...E};case"dashed":return{backgroundColor:i,"&:hover":{color:l,borderColor:l},...E};case"text":default:return{"&:hover":{color:l,backgroundColor:i},...E}}}const F3=le(D3,{shouldForwardProp:e=>e!=="variant"&&e!=="shape"})(({theme:e,variant:t,shape:n,color:r})=>({position:"relative","::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...n==="rounded"&&{borderRadius:"50%"},...t==="outlined"&&{border:"1px solid",borderColor:"inherit"},...t==="dashed"&&{border:"1px dashed",borderColor:"inherit"},...t!=="text"&&{"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},...k3({variant:t,theme:e,color:r})})),Fr=P.forwardRef(({variant:e="text",shape:t="square",children:n,color:r="primary",...i},a)=>{const l=lt();return g.jsx(F3,{ref:a,disableRipple:!0,variant:e,shape:t,theme:l,color:r,...i,children:n})});Fr.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},Fr.displayName="IconButton";function L3(e){return Rt("MuiButton",e)}const Va=zt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),JC=K.createContext({});process.env.NODE_ENV!=="production"&&(JC.displayName="ButtonGroupContext");const N3=JC,XC=K.createContext(void 0);process.env.NODE_ENV!=="production"&&(XC.displayName="ButtonGroupButtonContext");const R3=XC,j3=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],V3=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,classes:l}=e,A={root:["root",a,`${a}${be(t)}`,`size${be(i)}`,`${a}Size${be(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${be(i)}`],endIcon:["endIcon",`iconSize${be(i)}`]},d=An(A,L3,l);return q({},l,d)},ZC=e=>q({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),H3=le(zc,{shouldForwardProp:e=>xc(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${be(n.color)}`],t[`size${be(n.size)}`],t[`${n.variant}Size${be(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],a=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return q({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":q({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ve(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":q({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Va.focusVisible}`]:q({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Va.disabled}`]:q({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ve(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Va.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Va.disabled}`]:{boxShadow:"none"}}),z3=le("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${be(n.size)}`]]}})(({ownerState:e})=>q({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},ZC(e))),W3=le("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${be(n.size)}`]]}})(({ownerState:e})=>q({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},ZC(e))),$C=K.forwardRef(function(t,n){const r=K.useContext(N3),i=K.useContext(R3),a=pc(r,t),l=Wt({props:a,name:"MuiButton"}),{children:A,color:d="primary",component:f="button",className:h,disabled:E=!1,disableElevation:C=!1,disableFocusRipple:I=!1,endIcon:B,focusVisibleClassName:Q,fullWidth:y=!1,size:D="medium",startIcon:k,type:T,variant:S="text"}=l,O=_e(l,j3),V=q({},l,{color:d,component:f,disabled:E,disableElevation:C,disableFocusRipple:I,fullWidth:y,size:D,type:T,variant:S}),R=V3(V),_=k&&g.jsx(z3,{className:R.startIcon,ownerState:V,children:k}),Z=B&&g.jsx(W3,{className:R.endIcon,ownerState:V,children:B}),Y=i||"";return g.jsxs(H3,q({ownerState:V,className:at(r.className,R.root,h,Y),component:f,disabled:E,focusRipple:!I,focusVisibleClassName:at(R.focusVisible,Q),ref:n,type:T},O,{classes:R,children:[_,A,Z]}))});process.env.NODE_ENV!=="production"&&($C.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","success","error","info","warning"]),c.string]),component:c.elementType,disabled:c.bool,disableElevation:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,endIcon:c.node,focusVisibleClassName:c.string,fullWidth:c.bool,href:c.string,size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),startIcon:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const U3=$C;function G3(e){return Rt("MuiCircularProgress",e)}zt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Y3=["className","color","disableShrink","size","style","thickness","value","variant"];let Ha=e=>e,eE,tE,nE,rE;const Lr=44,K3=Mt.keyframes(eE||(eE=Ha`
172
172
  0% {
173
173
  transform: rotate(0deg);