@carto/meridian-ds 1.4.2-alpha-unit-tests.1 → 1.4.2-multiple-selectall.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +147 -136
- package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts +2 -0
- package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts.map +1 -1
- package/dist/types/widgets/RangeWidgetUI/RangeSkeleton.d.ts.map +1 -1
- package/dist/widgets/index.cjs +2 -2
- package/dist/widgets/index.js +2 -2
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Fix: MultipleSelectField: select all filter is not working [#183](https://github.com/CartoDB/meridian-ds/pull/183)
|
|
6
|
+
- Fix: Mocks are not properly reset between test executions [#177](https://github.com/CartoDB/meridian-ds/pull/177)
|
|
7
|
+
- Improve Eslint rules regarding testing in Meridian [#172](https://github.com/CartoDB/meridian-ds/pull/172)
|
|
5
8
|
- Unit tests refactor: replace destructuring with screen [#173](https://github.com/CartoDB/meridian-ds/pull/173)
|
|
6
9
|
- Add unit tests for SelectField & Alert components [#164](https://github.com/CartoDB/meridian-ds/pull/164)
|
|
7
10
|
- Add unit tests for Custom Icons [#170](https://github.com/CartoDB/meridian-ds/pull/170)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),a=require("@mui/material"),y=require("../TablePaginationActions-V8ultBUz.cjs"),k=require("react-intl"),S=require("@mui/icons-material"),H=require("../Alert-hBzSt1O0.cjs");require("cartocolor");const _=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-BD0WmQR3.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=a.styled(a.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=a.styled(a.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:n,startIcon:i,endIcon:r,loadingPosition:l,...s},d){const c=o.jsx(a.CircularProgress,{size:18,color:"inherit"}),g=e&&l===void 0,m=()=>g?o.jsxs(a.Box,{sx:{position:"relative"},children:[o.jsx(mt,{children:c}),o.jsx(ht,{children:t})]}):t,u=f=>{if(!g)return e&&l!==void 0?l===f?c:void 0:f==="start"?i:r};return o.jsx(a.Button,{disabled:e||n,startIcon:u("start"),endIcon:u("end"),...s,role:s.href?"link":"button",ref:d,children:o.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=a.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=a.styled(a.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function O({label:t,type:e,icon:n,inheritSize:i}){return o.jsxs(jt,{children:[t,e&&o.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),n&&o.jsx(It,{children:n})]})}function Ct({InputProps:t,size:e="small",...n},i){const r=k.useIntl(),l=y.useImperativeIntl(r),[s,d]=h.useState(!1),c=()=>d(!s);return o.jsx(a.TextField,{...n,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:o.jsx(a.InputAdornment,{position:"end",children:o.jsx(a.IconButton,{size:e,onClick:c,children:o.jsx(a.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?o.jsx(S.VisibilityOffOutlined,{}):o.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),$={};function Bt(t="$lodash$"){$[t]||($[t]=0);const e=++$[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=a.styled(a.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),At=a.styled(a.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:n="small",displayEmpty:i,menuProps:r,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:g,name:m,error:u,focused:f,disabled:p,fullWidth:x,required:M,"aria-label":b,...D},C){const v=n==="small",[j]=h.useState(()=>Bt("select-label-")),I=d?s??j:void 0;return o.jsxs(a.FormControl,{size:n,error:u,focused:f,disabled:p,fullWidth:x,required:M,"data-name":"select-field","data-size":n,children:[o.jsxs(a.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&o.jsx(a.InputLabel,{shrink:!0,id:I,children:d}),c&&o.jsx(a.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),o.jsxs(Dt,{...D,labelId:I,name:m,ref:C,size:n,fullWidth:x,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...r,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&o.jsx(At,{disabled:!0,value:"",children:o.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),g&&o.jsx(a.FormHelperText,{"aria-label":`${m}-helper`,children:g})]})}const Q=h.forwardRef(Tt),St=a.styled(a.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:n})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:n.spacing(.5),"& .MuiDivider-root":{height:n.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:n.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:n.spacing(4),margin:`${n.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:n.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:n.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:n.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:n.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:n.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:n.palette.background.paper},...e==="secondary"&&{backgroundColor:n.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function kt({children:t,variant:e="floating",backgroundColor:n,...i}){const l=e==="unbounded"?"transparent":"primary";return o.jsx(St,{...i,variant:e,backgroundColor:n??l,children:t})}const wt=a.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=a.styled(a.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:n,size:i="medium",variant:r="icon",color:l="default",sx:s,className:d,loading:c,disabled:g,active:m,...u},f){return o.jsx(a.Tooltip,{placement:e,title:t??"",children:o.jsx(wt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:o.jsx(Rt,{...u,ref:f,size:i,variant:r,color:l,active:m,disabled:g||c,role:"button",children:c?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):n})})})}const tt=h.forwardRef(Ft),Ot=a.styled(a.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:n,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...n&&{".MuiList-root":{width:n,minWidth:n}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:n,MenuListProps:i,...r},l){return o.jsx(Ot,{...r,ref:l,"data-name":"menu",width:e,height:n,extended:t,MenuListProps:{...i,"data-width":e,"data-height":n,"data-extended":t}})}const Lt=h.forwardRef($t),Et=a.styled(a.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:n,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...n&&{width:n,minWidth:n},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:n,...i},r){return o.jsx(Et,{...i,ref:r,width:e,height:n,extended:t,"data-name":"menu-list","data-width":e,"data-height":n,"data-extended":t})}const Ht=h.forwardRef(Wt),_t=a.styled(_.MenuItem)(()=>({marginTop:"0 !important"})),Pt=a.styled(a.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:n,selectAllDisabled:i,...r},l){const s=k.useIntl(),d=y.useImperativeIntl(s);return o.jsx(_t,{...r,ref:l,fixed:!0,"data-name":"menu-filter",children:o.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:n,tabIndex:0,children:[o.jsx(a.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),d.formatMessage({id:"c4r.form.selectAll"})]})})}const N=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:n}){const[i,r]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&r(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:u}}=m,f=typeof u=="string"?u.split(","):u.filter(p=>p!==void 0);r(f),n(f)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:u})=>!u).map(({value:u})=>u);m&&(m.every(f=>i.includes(f))?(r([]),n([])):(r(m),n(m)))},unselectAll:()=>{r([]),n([])}}}const Gt=a.styled(a.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=a.styled(a.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:n="small",placeholder:i,showCounter:r,showFilters:l=!0,onChange:s=zt,selectAllDisabled:d,tooltipPlacement:c,variant:g,...m},u){const{areAllSelected:f,areAnySelected:p,currentOptions:x,handleChange:M,selectAll:b,unselectAll:D}=qt({options:t,selectedOptions:e,onChange:s}),C=n==="small",v=C||g==="standard"?0:2,j=k.useIntl(),I=y.useImperativeIntl(j),T=`${x.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=h.useMemo(()=>f?o.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:I.formatMessage({id:"c4r.form.allSelected"})}):p?o.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:r&&x.length>1?T:x.join(", ")}):o.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"text.hint",ml:v,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,p,T,x,I,C,v,i,r]);return o.jsxs(Q,{...m,ref:u,multiple:!0,displayEmpty:!0,placeholder:i,value:x,renderValue:()=>w,onChange:M,size:n,variant:g,endAdornment:l&&p&&o.jsx(Vt,{position:"end",size:n,children:o.jsx(a.IconButton,{onClick:D,size:n,children:o.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&o.jsx(N,{areAllSelected:f,areAnySelected:p,selectAll:b,selectAllDisabled:d}),t==null?void 0:t.map(A=>{const F=o.jsxs(Gt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[o.jsx(a.Checkbox,{disabled:A.disabled,checked:x.includes(A.value)}),o.jsx(a.ListItemText,{primary:A.label})]},A.value);return A.tooltip?o.jsx(a.Tooltip,{title:A.tooltip,placement:c,children:F},A.value):F})]})}const Zt=h.forwardRef(Yt),Jt=a.styled(a.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:n,error:i,disabled:r,handleReset:l,handleOpen:s,inProgress:d}){return o.jsx(a.InputAdornment,{position:"end",children:d?o.jsx(a.IconButton,{"aria-label":"loading",disabled:!0,size:n,children:o.jsx(a.CircularProgress,{size:18})}):e?o.jsx(a.IconButton,{onClick:l,size:n,"aria-label":"delete",disabled:r,children:o.jsx(S.Cancel,{})}):o.jsx(a.Button,{onClick:s,size:n,variant:"text",color:i?"default":"primary",disabled:r,children:t})})}function et({name:t,multiple:e,handleReset:n,handleOpen:i,dragOver:r,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:g,InputProps:m,size:u="small",hasFiles:f,cursor:p="pointer",...x}){return o.jsx(Jt,{...x,size:u,error:l,placeholder:s,focused:d??r,cursor:p,InputProps:{...m,name:t,readOnly:!0,endAdornment:o.jsx(Xt,{buttonText:c,hasFiles:f,size:u,error:l,disabled:!!r,handleReset:n,handleOpen:i,inProgress:g})}})}function Kt({onChange:t,files:e,multiple:n,placeholder:i,uploadInputRef:r}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=h.useState(""),[g,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const u=()=>{var j;(j=r.current)==null||j.click()},f=j=>{j.preventDefault(),m(!0)},p=j=>{j.preventDefault(),m(!1)},x=j=>{j.preventDefault(),m(!1);const I=j.dataTransfer.items,T=M(I);t==null||t(T)},M=j=>{const I=[];for(const T of Array.from(j))if(T.kind==="file"){const w=T.getAsFile();I.push(w)}return I},b=j=>{const I=Array.from(j.target.files);t==null||t(I)},D=j=>{j.stopPropagation(),c("")},C=h.useMemo(()=>{const j=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:n?0:1}),I=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:n?0:1});let T="";return g?T=I:T=i??j,T},[g,n,i,s]);return{filesText:d,getPlaceholder:C,dragOver:g,inputEvents:{onDragOver:f,onDragLeave:p,onDrop:x,onClick:u},handleFiles:b,handleReset:D}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:n,files:i,inProgress:r,onChange:l,multiple:s,placeholder:d,error:c,focused:g,nativeInputProps:m,...u}){const f=n??Qt,p=h.useRef(null),{filesText:x,getPlaceholder:M,dragOver:b,inputEvents:D,handleFiles:C,handleReset:v}=Kt({uploadInputRef:p,files:i,onChange:l,multiple:s,placeholder:d});return o.jsxs(o.Fragment,{children:[o.jsx(et,{...u,placeholder:M,value:x,error:c,focused:g??b,handleReset:v,dragOver:b,inProgress:r,hasFiles:!!x,InputProps:D,buttonText:e}),o.jsx("input",{...m,ref:p,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:C})]})}function ee({disabled:t,loading:e,...n},i){return o.jsx(a.Autocomplete,{...n,ref:i,disabled:t||e,popupIcon:e?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):o.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...n.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>o.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function at(){return{renderOption:(e,n,i,r,l)=>{const{title:s,inputValue:d,divider:c,fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M,startAdornment:b,endAdornment:D,alternativeTitle:C,secondaryText:v,multiple:j}=n,{key:I,...T}=e,w=typeof n=="string"||typeof n=="number",A=(F,B,R,z)=>R||z||(B&&typeof B=="object"&&"value"in B?String(B.value):F(B));return o.jsx(h.Fragment,{children:c?o.jsx(a.Divider,{}):o.jsxs(o.Fragment,{children:[d&&o.jsx(a.Divider,{}),o.jsxs(_.MenuItem,{...T,...!w&&{fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M},"aria-disabled":x||p,"aria-selected":i.selected,children:[!x&&(b||j||l)&&o.jsxs(a.ListItemIcon,{children:[l||j&&o.jsx(a.Checkbox,{checked:i.selected}),b]}),o.jsxs(a.ListItemText,{children:[A(r??nt,n,C,s),v&&o.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!x&&D]})]})},I)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:n,multiple:i}){const r=k.useIntl(),l=y.useImperativeIntl(r),s=a.createFilterOptions(),{renderOption:d}=at();return{creatableFilterOptions:(u,f)=>{const p=s(u,f),{inputValue:x}=f,M=u.some(b=>x===t(b));if(x.length>1&&x!==""&&!M){let b;typeof e=="function"?b=e(x):e?b=`${e} "${x}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${x}"`,p.push({inputValue:x,title:b})}return p},creatableOptionLabel:u=>typeof u=="string"?u:u.inputValue?u.inputValue:t(u),creatableRenderOption:(u,f,p)=>{const x=f.inputValue?n??o.jsx(S.AddCircleOutlineOutlined,{}):void 0,M=ot(f,!!i);return d(u,M,p,t,x)}}}function rt({options:t,value:e,onChange:n,getOptionLabel:i}){const[r,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=at();h.useEffect(()=>{const f=Array.isArray(e)?e:e?[e]:[];l(f)},[e]);const d=r.length===t.length,c=r.length>0&&r.length<t.length;return{multipleValue:r,allSelected:d,someSelected:c,handleSelectAll:f=>{const p=d?[]:[...t];l(p),n==null||n(f,p,"selectOption")},handleChange:(f,p,x)=>{l(p===null?[]:p),n==null||n(f,p,x)},multipleRenderOption:(f,p,x)=>{const M=ot(p,!0);return s(f,M,x,i)}}}function ie({children:t,showFilters:e,allSelected:n,someSelected:i,handleSelectAll:r=()=>{},multiple:l,...s},d){return o.jsxs("ul",{ref:d,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&o.jsx(N,{areAllSelected:!!n,areAnySelected:!!i,selectAll:r}),t]})}const lt=h.forwardRef(ie);function ae({newItemLabel:t,newItemIcon:e,getOptionLabel:n=nt,multiple:i,disableCloseOnSelect:r,disabled:l,loading:s,showFilters:d,options:c=[],value:g,onChange:m,getLimitTagsText:u,...f},p){const{freeSolo:x=!0,...M}=f,{multipleValue:b,allSelected:D,someSelected:C,handleSelectAll:v,handleChange:j}=rt({options:c,value:g,onChange:m}),{creatableFilterOptions:I,creatableOptionLabel:T,creatableRenderOption:w}=oe({getOptionLabel:n,newItemLabel:t,newItemIcon:e,multiple:i});return o.jsx(a.Autocomplete,{...M,ref:p,options:c,value:i?b:g,onChange:j,filterOptions:I,getOptionLabel:T,renderOption:w,freeSolo:x,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:r??i,ListboxComponent:lt,ListboxProps:{showFilters:d,allSelected:D,someSelected:C,handleSelectAll:v,multiple:i},getLimitTagsText:u??it,disabled:l||s,popupIcon:s?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):o.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const re=h.forwardRef(ae);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:n,loading:i,showFilters:r,options:l,value:s,onChange:d,getOptionLabel:c,getLimitTagsText:g,...m},u){const{multipleValue:f,allSelected:p,someSelected:x,handleSelectAll:M,handleChange:b,multipleRenderOption:D}=rt({options:l,value:s,onChange:d,getOptionLabel:c});return o.jsx(a.Autocomplete,{...m,ref:u,options:l,value:f,onChange:b,getOptionLabel:c,renderOption:t??D,ListboxComponent:lt,ListboxProps:{showFilters:r,allSelected:p,someSelected:x,handleSelectAll:M,multiple:!0},multiple:!0,getLimitTagsText:g??it,disableCloseOnSelect:e,disabled:n||i,popupIcon:i?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):o.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=a.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...n}){return o.jsx(ce,{...n,variant:t,children:e.map((i,r)=>o.jsxs(a.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[o.jsx(a.AccordionSummary,{"aria-controls":`${r}-content`,id:`${r}-header`,children:i.summary}),o.jsx(a.AccordionDetails,{children:i.content})]},r))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=a.styled(a.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:n=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...n&&{opacity:.6}}));function pe(t){return o.jsx(ue,{...t})}const st=480,ge=a.styled(a.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=a.styled(a.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=a.styled(H.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:n,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...n!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=a.styled(a.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:n=!0,children:i,title:r,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:g,...m}){const u=k.useIntl(),f=y.useImperativeIntl(u),x=g===!1||t==="neutral"&&!g,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return o.jsx(a.Portal,{children:o.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:d,TransitionComponent:c?a.Fade:a.Slide,"data-auto-width":c,children:o.jsxs(xe,{sx:{position:"relative"},autoWidth:c,children:[o.jsx(fe,{severity:t,action:l,icon:x?!1:g,elevation:6,hasActions:!!l,closeable:n,title:r,children:i}),n&&o.jsx(me,{children:o.jsx(tt,{color:"default",onClick:D=>d(D,"timeout"),icon:o.jsx(S.CloseOutlined,{}),tooltip:f.formatMessage({id:"c4r.button.close"})})})]})})})}const be=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=a.styled(a.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=a.styled(a.Divider)(({theme:t})=>({borderColor:a.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return o.jsx(a.Box,{sx:{display:{md:"none",xs:"block"}},children:o.jsxs(be,{children:[o.jsx(ye,{onClick:t,children:o.jsx(S.MenuOutlined,{})}),o.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=a.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Ce({logo:t}){return o.jsx(Ie,{children:t})}const ve=a.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=a.useTheme();return o.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=a.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=a.useTheme();return o.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=a.styled(a.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),ke=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function we({children:t,brandLogo:e,brandText:n,secondaryText:i,showBurgerMenu:r=!1,onClickMenu:l,...s}){return o.jsx(Te,{...s,children:o.jsxs(a.Toolbar,{children:[o.jsxs(Se,{children:[r&&o.jsx(Me,{onClickMenu:l}),e&&o.jsx(Ce,{logo:e}),n&&o.jsx(Be,{text:n}),i&&o.jsx(Ae,{text:i})]}),o.jsx(ke,{children:t})]})})}const Re=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:n})=>({position:"absolute",right:n.spacing(5.75),...t==="small"&&{right:n.spacing(4),top:"3px"},...e==="standard"&&{right:n.spacing(4.75),...t==="small"&&{right:n.spacing(3.5)}}}));function q({size:t,variant:e,...n}){const i=k.useIntl(),r=y.useImperativeIntl(i);return o.jsx(Re,{size:t,variant:e,children:o.jsx(a.IconButton,{...n,size:t,"aria-label":r.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:n,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...n&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function G({children:t,size:e,variant:n,readOnly:i,...r}){return o.jsx(Fe,{...r,size:e,variant:n,readOnly:i,children:t})}function L({handleClear:t,variant:e="outlined",size:n="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,slotProps:c,slots:g,error:m,showCalendar:u=!0,readOnly:f,"aria-label":p,"data-testid":x,...M}){const b=k.useIntl(),D=y.useImperativeIntl(b);return o.jsx(a.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:o.jsx(G,{size:n,variant:e,readOnly:f,"data-name":"date-picker","aria-label":p,"data-testid":x,children:o.jsx(ut.DatePicker,{...M,label:i&&o.jsx(O,{label:i,type:l,icon:r&&o.jsx(a.Tooltip,{title:r,children:o.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:n,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:C=>o.jsx(q,{...C,size:n,variant:e}),openPickerButton:C=>o.jsx(a.IconButton,{...C,size:n,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f})})})}const Oe=a.styled(a.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:n,isEndDate:i,isSelectedMonth:r,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&r&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(n||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(n||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=a.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:n,selectedMonth:i,...r}){const l=!!(e&&Z(e,t)),s=!!(n&&Z(n,t)),d=!!(e&&n&&t.getTime()>=e.getTime()&&t.getTime()<=n.getTime()),c=t.getDate()===1,g=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return o.jsx(Oe,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:g,isFirstDay:c,children:o.jsx($e,{...r,day:t,selected:d||l||s,isDateRangeLimit:l||s,"data-name":"pickers-day"})})}const Le=a.styled(a.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:n="outlined",startProps:i,endProps:r,"aria-label":l,"data-testid":s,...d}){const c=k.useIntl(),g=y.useImperativeIntl(c),[m,u]=h.useState(!1),[f,p]=h.useState(!1),[x,M]=h.useState((i==null?void 0:i.value)||null),[b,D]=h.useState((r==null?void 0:r.value)||null),[C,v]=h.useState((r==null?void 0:r.value)??(i==null?void 0:i.value)??new Date),j=e??(i==null?void 0:i.error)??(r==null?void 0:r.error),I=(B,R)=>{M(B),i!=null&&i.onChange&&i.onChange(B,R),B&&R.validationError===null&&!f&&R.trigger===null&&(p(!1),u(!0))},T=(B,R)=>{D(B),r!=null&&r.onChange&&r.onChange(B,R)},w=()=>{p(!0),u(!1),setTimeout(()=>{v(x??new Date)},120)},A=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)},F=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)};return o.jsxs(a.Box,{children:[o.jsxs(Le,{variant:n,"data-name":"date-range-picker","aria-label":l,"data-testid":s,children:[o.jsx(L,{...d,...i,value:(i==null?void 0:i.value)??x,maxDate:b??void 0,label:(i==null?void 0:i.label)??g.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":g.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:B=>o.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:f,onChange:I,onOpen:w,onClose:A,onMonthChange:B=>v(B),variant:n}),o.jsx(L,{...d,...r,value:(r==null?void 0:r.value)??b,minDate:x??void 0,slotProps:{popper:{"aria-label":g.formatMessage({id:"c4r.form.endDateCalendar"})},...r==null?void 0:r.slotProps},slots:{day:B=>o.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...r==null?void 0:r.slots},label:(r==null?void 0:r.label)??g.formatMessage({id:"c4r.form.endDate"}),error:(r==null?void 0:r.error)??e,open:m,onOpen:F,onClose:()=>u(!1),onChange:T,onMonthChange:B=>v(B),variant:n})]}),t&&o.jsx(a.FormHelperText,{error:j,children:t})]})}const ct=(t,e,n,i)=>{const r=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const c=[];return e&&c.push("MM/dd/yyyy "),r&&c.push(n?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),n&&c.push(" a"),c.join("")};function We({handleClear:t,variant:e="outlined",size:n="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showClock:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v),I=h.useRef(null),[T,w]=h.useState(0);return h.useEffect(()=>{if(!I.current)return;const A=new ResizeObserver(F=>{var R;const B=(R=F[0])==null?void 0:R.contentRect.width;B&&w(B)});return A.observe(I.current),()=>{A.disconnect()}},[]),o.jsx(G,{size:n,variant:e,readOnly:m,"data-name":"time-picker","data-testid":b??"time-picker","aria-label":D,children:o.jsx(gt.TimePicker,{...C,ref:I,label:o.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&o.jsx(a.Tooltip,{title:r,children:o.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(x,!1,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:n,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:T}},...u},slots:{clearButton:A=>o.jsx(q,{...A,size:n,variant:e}),openPickerButton:A=>o.jsx(a.IconButton,{...A,size:n,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}function He({handleClear:t,variant:e="outlined",size:n="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showCalendar:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v);return o.jsx(G,{size:n,variant:e,readOnly:m,"data-name":"date-time-picker","data-testid":b??"date-time-picker","aria-label":D,children:o.jsx(xt.DateTimePicker,{...C,label:o.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&o.jsx(a.Tooltip,{title:r,children:o.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(x,!0,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:n,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...u},slots:{clearButton:I=>o.jsx(q,{...I,size:n,variant:e}),openPickerButton:I=>o.jsx(a.IconButton,{...I,size:n,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}const _e=[{outlinedBullet:!1,value:""}],Pe=a.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=a.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=a.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Ge=a.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=_e,title:e}){return o.jsxs(o.Fragment,{children:[e&&o.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),o.jsx(Pe,{children:t.map((n,i)=>o.jsxs(Ne,{children:[o.jsx(qe,{style:{backgroundColor:`${n.outlinedBullet?"transparent":n.color}`,borderColor:n.color}}),n.category&&o.jsx(Ge,{color:"inherit",variant:"caption",children:n.category}),o.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:n.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},E={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},W=a.styled(a.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:n,hasForm:i,size:r="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...E[r],maxHeight:X[r],[`@media (max-height:${X[r]})`]:{maxHeight:"calc(100vh - 80px)",...r==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...n&&{width:n},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...E[r],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...n&&{width:n},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:n="small",PaperProps:i,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,...m},u){return t?o.jsx(W,{size:n,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,"data-name":"dialog",...m,ref:u,children:e}):o.jsx(a.Dialog,{PaperComponent:W,PaperProps:{...i,size:n,fullScreen:r,height:l,width:s,hasForm:d},fullScreen:r,role:"section","aria-label":c,"data-testid":g,"data-size":n,"data-width":s,"data-height":l,"data-name":"dialog",...m,ref:u,children:e})}const ze=h.forwardRef(Ue),Ye=a.styled(a.DialogTitle)(()=>({padding:0,zIndex:10})),Ze=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Je=a.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Xe=a.styled(a.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ke({title:t,chipLabel:e,chipProps:n,children:i,onClose:r,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const g=k.useIntl(),m=y.useImperativeIntl(g);return o.jsxs(o.Fragment,{children:[o.jsxs(Ye,{component:"div","data-name":"dialog-header",...c,children:[o.jsxs(Ze,{children:[o.jsxs(K,{flex:1,maxWidth:.8,children:[o.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,role:"heading",children:t}),e&&o.jsx(a.Chip,{color:"default",label:e,...n})]}),o.jsxs(K,{children:[l,r&&o.jsx(a.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:o.jsx(a.IconButton,{onClick:r,children:d||o.jsx(Je,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&o.jsx(Xe,{})]})}const Qe=a.styled(a.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:n,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...n&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function tn({children:t,scrollableContent:e,hasFooterAlert:n,withGutter:i=!0,withBottomGutter:r=!0,onScroll:l,...s},d){const c=a.useTheme(),[g,m]=h.useState(null);h.useImperativeHandle(d,()=>g,[g]);const u=h.useCallback(p=>{const x=Math.abs(p.scrollHeight-p.clientHeight-p.scrollTop)<1,M=p.scrollTop===0,b=`1px solid ${c.palette.divider}`;p.style.borderTop=M?"none":b,p.style.borderBottom=x&&!n?"none":b},[c.palette.divider,n]),f=h.useCallback(p=>{u(p.target),l==null||l(p)},[u,l]);return h.useEffect(()=>{g&&u(g)},[g,u]),h.useEffect(()=>{if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{u(g)});return p.observe(g),()=>p.disconnect()},[g,u]),o.jsx(Qe,{ref:m,onScroll:f,scrollableContent:e,withGutter:i,withBottomGutter:r&&i,"data-name":"dialog-content",...s,children:t})}const dt=h.forwardRef(tn),en=a.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),nn=a.styled(H.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function V({children:t,severity:e="neutral",...n}){return o.jsx(nn,{severity:e,...n,"data-name":"dialog-alert",children:t})}const on=a.styled(a.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:n})=>({flex:"0 0 auto",display:"block",minHeight:e?n.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:n.palette.common.black,color:n.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:n.palette.white[60],a:{color:`${n.palette.secondary.main} !important`}},".MuiAlert-icon":{color:n.palette.white[60]}}}})),an=a.styled(a.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=a.styled(a.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),U=a.styled(a.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),ln=a.styled(a.Divider)(()=>({marginTop:"-1px"}));function sn({children:t,secondaryActions:e,alertContent:n,alertProps:i,dark:r,topContent:l,...s}){return o.jsxs(o.Fragment,{children:[l,!!n&&o.jsx(ln,{}),o.jsxs(on,{...s,dark:r,"data-theme":r?"dark":"light","data-name":"dialog-footer",hasChildren:!!t,children:[!!n&&o.jsx(a.Box,{sx:{p:2,pt:1.5,pb:1},children:o.jsx(V,{...i,children:n})}),o.jsxs(an,{children:[o.jsx(rn,{hasAlert:!!n,children:e}),o.jsx(U,{hasAlert:!!n,children:t})]})]})]})}const cn=a.styled(a.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),dn=a.styled("div")(()=>({width:"100%"})),un=a.styled(a.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function pn({children:t,onClickAway:e,actions:n,severity:i="warning",opened:r,"data-testid":l,"aria-label":s,...d}){const c=h.useRef(null),g=a.useTheme(),m=()=>{e&&e()};return o.jsx(cn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation","data-name":"dialog-confirmation",children:o.jsx(ft,{onClickAway:m,children:o.jsx(a.Slide,{direction:"up",in:r,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:g.transitions.easing.easeOut,timeout:350,children:o.jsx(dn,{children:o.jsxs(un,{children:[o.jsx(V,{severity:i,...d,children:t}),o.jsx(U,{children:n})]})})})})})}const gn=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),xn=a.styled(a.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function fn({theme:t,completed:e,current:n}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:n?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const mn=a.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:n})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...fn({theme:t,completed:e,current:n})}));function hn({currentStep:t,stepsLabels:e,...n}){return o.jsx(gn,{...n,"data-name":"dialog-stepper",children:o.jsx(a.Box,{sx:{display:"flex"},children:e.map((i,r)=>{const l=r+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return o.jsxs(xn,{"data-state":d?"completed":s?"current":"uncompleted",children:[o.jsx(mn,{completed:d,current:s,children:d?o.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),o.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:i})]},r)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=H.Alert;exports.MenuItem=_.MenuItem;exports.AccordionGroup=de;exports.AppBar=we;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=re;exports.DatePicker=L;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=ze;exports.DialogActions=U;exports.DialogAlert=V;exports.DialogConfirmation=pn;exports.DialogContent=dt;exports.DialogContentPadded=en;exports.DialogFooter=sn;exports.DialogHeader=Ke;exports.DialogPaper=W;exports.DialogStepper=hn;exports.IconButton=tt;exports.LabelWithIndicator=O;exports.Menu=Lt;exports.MenuItemFilter=N;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=kt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=E;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),a=require("@mui/material"),y=require("../TablePaginationActions-V8ultBUz.cjs"),k=require("react-intl"),S=require("@mui/icons-material"),H=require("../Alert-hBzSt1O0.cjs");require("cartocolor");const _=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-BD0WmQR3.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=a.styled(a.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=a.styled(a.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:n,startIcon:i,endIcon:r,loadingPosition:l,...s},d){const c=o.jsx(a.CircularProgress,{size:18,color:"inherit"}),g=e&&l===void 0,m=()=>g?o.jsxs(a.Box,{sx:{position:"relative"},children:[o.jsx(mt,{children:c}),o.jsx(ht,{children:t})]}):t,u=f=>{if(!g)return e&&l!==void 0?l===f?c:void 0:f==="start"?i:r};return o.jsx(a.Button,{disabled:e||n,startIcon:u("start"),endIcon:u("end"),...s,role:s.href?"link":"button",ref:d,children:o.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=a.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=a.styled(a.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function O({label:t,type:e,icon:n,inheritSize:i}){return o.jsxs(jt,{children:[t,e&&o.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),n&&o.jsx(It,{children:n})]})}function Ct({InputProps:t,size:e="small",...n},i){const r=k.useIntl(),l=y.useImperativeIntl(r),[s,d]=h.useState(!1),c=()=>d(!s);return o.jsx(a.TextField,{...n,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:o.jsx(a.InputAdornment,{position:"end",children:o.jsx(a.IconButton,{size:e,onClick:c,children:o.jsx(a.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?o.jsx(S.VisibilityOffOutlined,{}):o.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),$={};function Bt(t="$lodash$"){$[t]||($[t]=0);const e=++$[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=a.styled(a.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),At=a.styled(a.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:n="small",displayEmpty:i,menuProps:r,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:g,name:m,error:u,focused:f,disabled:p,fullWidth:x,required:M,"aria-label":b,...D},C){const v=n==="small",[j]=h.useState(()=>Bt("select-label-")),I=d?s??j:void 0;return o.jsxs(a.FormControl,{size:n,error:u,focused:f,disabled:p,fullWidth:x,required:M,"data-name":"select-field","data-size":n,children:[o.jsxs(a.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&o.jsx(a.InputLabel,{shrink:!0,id:I,children:d}),c&&o.jsx(a.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),o.jsxs(Dt,{...D,labelId:I,name:m,ref:C,size:n,fullWidth:x,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...r,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&o.jsx(At,{disabled:!0,value:"",children:o.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),g&&o.jsx(a.FormHelperText,{"aria-label":`${m}-helper`,children:g})]})}const Q=h.forwardRef(Tt),St=a.styled(a.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:n})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:n.spacing(.5),"& .MuiDivider-root":{height:n.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:n.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:n.spacing(4),margin:`${n.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:n.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:n.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:n.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:n.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:n.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:n.palette.background.paper},...e==="secondary"&&{backgroundColor:n.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function kt({children:t,variant:e="floating",backgroundColor:n,...i}){const l=e==="unbounded"?"transparent":"primary";return o.jsx(St,{...i,variant:e,backgroundColor:n??l,children:t})}const wt=a.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=a.styled(a.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:n,size:i="medium",variant:r="icon",color:l="default",sx:s,className:d,loading:c,disabled:g,active:m,...u},f){return o.jsx(a.Tooltip,{placement:e,title:t??"",children:o.jsx(wt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:o.jsx(Rt,{...u,ref:f,size:i,variant:r,color:l,active:m,disabled:g||c,role:"button",children:c?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):n})})})}const tt=h.forwardRef(Ft),Ot=a.styled(a.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:n,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...n&&{".MuiList-root":{width:n,minWidth:n}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:n,MenuListProps:i,...r},l){return o.jsx(Ot,{...r,ref:l,"data-name":"menu",width:e,height:n,extended:t,MenuListProps:{...i,"data-width":e,"data-height":n,"data-extended":t}})}const Lt=h.forwardRef($t),Et=a.styled(a.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:n,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...n&&{width:n,minWidth:n},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:n,...i},r){return o.jsx(Et,{...i,ref:r,width:e,height:n,extended:t,"data-name":"menu-list","data-width":e,"data-height":n,"data-extended":t})}const Ht=h.forwardRef(Wt),_t=a.styled(_.MenuItem)(()=>({marginTop:"0 !important"})),Pt=a.styled(a.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:n,selectAllDisabled:i,"aria-label":r,"data-testid":l},s){const d=k.useIntl(),c=y.useImperativeIntl(d);return o.jsx(_t,{ref:s,fixed:!0,"data-name":"menu-filter","aria-label":r,"data-testid":l,children:o.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:n,tabIndex:0,children:[o.jsx(a.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),c.formatMessage({id:"c4r.form.selectAll"})]})})}const N=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:n}){const[i,r]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&r(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:u}}=m,f=typeof u=="string"?u.split(","):u.filter(p=>p!==void 0);r(f),n(f)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:u})=>!u).map(({value:u})=>u);m&&(m.every(f=>i.includes(f))?(r([]),n([])):(r(m),n(m)))},unselectAll:()=>{r([]),n([])}}}const Gt=a.styled(a.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=a.styled(a.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:n="small",placeholder:i,showCounter:r,showFilters:l=!0,onChange:s=zt,selectAllDisabled:d,tooltipPlacement:c,variant:g,...m},u){const{areAllSelected:f,areAnySelected:p,currentOptions:x,handleChange:M,selectAll:b,unselectAll:D}=qt({options:t,selectedOptions:e,onChange:s}),C=n==="small",v=C||g==="standard"?0:2,j=k.useIntl(),I=y.useImperativeIntl(j),T=`${x.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=h.useMemo(()=>f?o.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:I.formatMessage({id:"c4r.form.allSelected"})}):p?o.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:r&&x.length>1?T:x.join(", ")}):o.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"text.hint",ml:v,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,p,T,x,I,C,v,i,r]);return o.jsxs(Q,{...m,ref:u,multiple:!0,displayEmpty:!0,placeholder:i,value:x,renderValue:()=>w,onChange:M,size:n,variant:g,endAdornment:l&&p&&o.jsx(Vt,{position:"end",size:n,children:o.jsx(a.IconButton,{onClick:D,size:n,children:o.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&o.jsx(N,{areAllSelected:f,areAnySelected:p,selectAll:b,selectAllDisabled:d}),t==null?void 0:t.map(A=>{const F=o.jsxs(Gt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[o.jsx(a.Checkbox,{disabled:A.disabled,checked:x.includes(A.value)}),o.jsx(a.ListItemText,{primary:A.label})]},A.value);return A.tooltip?o.jsx(a.Tooltip,{title:A.tooltip,placement:c,children:F},A.value):F})]})}const Zt=h.forwardRef(Yt),Jt=a.styled(a.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:n,error:i,disabled:r,handleReset:l,handleOpen:s,inProgress:d}){return o.jsx(a.InputAdornment,{position:"end",children:d?o.jsx(a.IconButton,{"aria-label":"Loading",disabled:!0,size:n,children:o.jsx(a.CircularProgress,{size:18})}):e?o.jsx(a.IconButton,{onClick:l,size:n,"aria-label":"Delete",disabled:r,children:o.jsx(S.Cancel,{})}):o.jsx(a.Button,{onClick:s,size:n,variant:"text",color:i?"default":"primary",disabled:r,children:t})})}function et({name:t,multiple:e,handleReset:n,handleOpen:i,dragOver:r,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:g,InputProps:m,size:u="small",hasFiles:f,cursor:p="pointer",...x}){return o.jsx(Jt,{...x,size:u,error:l,placeholder:s,focused:d??r,cursor:p,InputProps:{...m,name:t,readOnly:!0,endAdornment:o.jsx(Xt,{buttonText:c,hasFiles:f,size:u,error:l,disabled:!!r,handleReset:n,handleOpen:i,inProgress:g})}})}function Kt({onChange:t,files:e,multiple:n,placeholder:i,uploadInputRef:r}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=h.useState(""),[g,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const u=()=>{var j;(j=r.current)==null||j.click()},f=j=>{j.preventDefault(),m(!0)},p=j=>{j.preventDefault(),m(!1)},x=j=>{j.preventDefault(),m(!1);const I=j.dataTransfer.items,T=M(I);t==null||t(T)},M=j=>{const I=[];for(const T of Array.from(j))if(T.kind==="file"){const w=T.getAsFile();I.push(w)}return I},b=j=>{const I=Array.from(j.target.files);t==null||t(I)},D=j=>{j.stopPropagation(),c("")},C=h.useMemo(()=>{const j=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:n?0:1}),I=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:n?0:1});let T="";return g?T=I:T=i??j,T},[g,n,i,s]);return{filesText:d,getPlaceholder:C,dragOver:g,inputEvents:{onDragOver:f,onDragLeave:p,onDrop:x,onClick:u},handleFiles:b,handleReset:D}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:n,files:i,inProgress:r,onChange:l,multiple:s,placeholder:d,error:c,focused:g,nativeInputProps:m,...u}){const f=n??Qt,p=h.useRef(null),{filesText:x,getPlaceholder:M,dragOver:b,inputEvents:D,handleFiles:C,handleReset:v}=Kt({uploadInputRef:p,files:i,onChange:l,multiple:s,placeholder:d});return o.jsxs(o.Fragment,{children:[o.jsx(et,{...u,placeholder:M,value:x,error:c,focused:g??b,handleReset:v,dragOver:b,inProgress:r,hasFiles:!!x,InputProps:D,buttonText:e}),o.jsx("input",{...m,ref:p,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:C})]})}function ee({disabled:t,loading:e,...n},i){return o.jsx(a.Autocomplete,{...n,ref:i,disabled:t||e,popupIcon:e?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):o.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...n.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>o.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function at(){return{renderOption:(e,n,i,r,l)=>{const{title:s,inputValue:d,divider:c,fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M,startAdornment:b,endAdornment:D,alternativeTitle:C,secondaryText:v,multiple:j}=n,{key:I,...T}=e,w=typeof n=="string"||typeof n=="number",A=(F,B,R,z)=>R||z||(B&&typeof B=="object"&&"value"in B?String(B.value):F(B));return o.jsx(h.Fragment,{children:c?o.jsx(a.Divider,{}):o.jsxs(o.Fragment,{children:[d&&o.jsx(a.Divider,{}),o.jsxs(_.MenuItem,{...T,...!w&&{fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M},"aria-disabled":x||p,"aria-selected":i.selected,children:[!x&&(b||j||l)&&o.jsxs(a.ListItemIcon,{children:[l||j&&o.jsx(a.Checkbox,{checked:i.selected}),b]}),o.jsxs(a.ListItemText,{children:[A(r??nt,n,C,s),v&&o.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!x&&D]})]})},I)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:n,multiple:i}){const r=k.useIntl(),l=y.useImperativeIntl(r),s=a.createFilterOptions(),{renderOption:d}=at();return{creatableFilterOptions:(u,f)=>{const p=s(u,f),{inputValue:x}=f,M=u.some(b=>x===t(b));if(x.length>1&&x!==""&&!M){let b;typeof e=="function"?b=e(x):e?b=`${e} "${x}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${x}"`,p.push({inputValue:x,title:b})}return p},creatableOptionLabel:u=>typeof u=="string"?u:u.inputValue?u.inputValue:t(u),creatableRenderOption:(u,f,p)=>{const x=f.inputValue?n??o.jsx(S.AddCircleOutlineOutlined,{}):void 0,M=ot(f,!!i);return d(u,M,p,t,x)}}}function rt({options:t,value:e,onChange:n,getOptionLabel:i}){const[r,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=at();h.useEffect(()=>{const f=Array.isArray(e)?e:e?[e]:[];l(f)},[e]);const d=r.length===t.length,c=r.length>0&&r.length<t.length;return{multipleValue:r,allSelected:d,someSelected:c,handleSelectAll:f=>{const p=d?[]:[...t];l(p),n==null||n(f,p,"selectOption")},handleChange:(f,p,x)=>{l(p===null?[]:p),n==null||n(f,p,x)},multipleRenderOption:(f,p,x)=>{const M=ot(p,!0);return s(f,M,x,i)}}}function ie({children:t,showFilters:e,allSelected:n,someSelected:i,handleSelectAll:r=()=>{},multiple:l,...s},d){return o.jsxs("ul",{ref:d,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&o.jsx(N,{areAllSelected:!!n,areAnySelected:!!i,selectAll:r}),t]})}const lt=h.forwardRef(ie);function ae({newItemLabel:t,newItemIcon:e,getOptionLabel:n=nt,multiple:i,disableCloseOnSelect:r,disabled:l,loading:s,showFilters:d,options:c=[],value:g,onChange:m,getLimitTagsText:u,...f},p){const{freeSolo:x=!0,...M}=f,{multipleValue:b,allSelected:D,someSelected:C,handleSelectAll:v,handleChange:j}=rt({options:c,value:g,onChange:m}),{creatableFilterOptions:I,creatableOptionLabel:T,creatableRenderOption:w}=oe({getOptionLabel:n,newItemLabel:t,newItemIcon:e,multiple:i});return o.jsx(a.Autocomplete,{...M,ref:p,options:c,value:i?b:g,onChange:j,filterOptions:I,getOptionLabel:T,renderOption:w,freeSolo:x,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:r??i,ListboxComponent:lt,ListboxProps:{showFilters:d,allSelected:D,someSelected:C,handleSelectAll:v,multiple:i},getLimitTagsText:u??it,disabled:l||s,popupIcon:s?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):o.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const re=h.forwardRef(ae);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:n,loading:i,showFilters:r,options:l,value:s,onChange:d,getOptionLabel:c,getLimitTagsText:g,...m},u){const{multipleValue:f,allSelected:p,someSelected:x,handleSelectAll:M,handleChange:b,multipleRenderOption:D}=rt({options:l,value:s,onChange:d,getOptionLabel:c});return o.jsx(a.Autocomplete,{...m,ref:u,options:l,value:f,onChange:b,getOptionLabel:c,renderOption:t??D,ListboxComponent:lt,ListboxProps:{showFilters:r,allSelected:p,someSelected:x,handleSelectAll:M,multiple:!0},multiple:!0,getLimitTagsText:g??it,disableCloseOnSelect:e,disabled:n||i,popupIcon:i?o.jsx(a.CircularProgress,{size:18,color:"inherit"}):o.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=a.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...n}){return o.jsx(ce,{...n,variant:t,children:e.map((i,r)=>o.jsxs(a.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[o.jsx(a.AccordionSummary,{"aria-controls":`${r}-content`,id:`${r}-header`,children:i.summary}),o.jsx(a.AccordionDetails,{children:i.content})]},r))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=a.styled(a.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:n=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...n&&{opacity:.6}}));function pe(t){return o.jsx(ue,{...t})}const st=480,ge=a.styled(a.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=a.styled(a.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=a.styled(H.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:n,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...n!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=a.styled(a.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:n=!0,children:i,title:r,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:g,...m}){const u=k.useIntl(),f=y.useImperativeIntl(u),x=g===!1||t==="neutral"&&!g,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return o.jsx(a.Portal,{children:o.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:d,TransitionComponent:c?a.Fade:a.Slide,"data-auto-width":c,children:o.jsxs(xe,{sx:{position:"relative"},autoWidth:c,children:[o.jsx(fe,{severity:t,action:l,icon:x?!1:g,elevation:6,hasActions:!!l,closeable:n,title:r,children:i}),n&&o.jsx(me,{children:o.jsx(tt,{color:"default",onClick:D=>d(D,"timeout"),icon:o.jsx(S.CloseOutlined,{}),tooltip:f.formatMessage({id:"c4r.button.close"})})})]})})})}const be=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=a.styled(a.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=a.styled(a.Divider)(({theme:t})=>({borderColor:a.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return o.jsx(a.Box,{sx:{display:{md:"none",xs:"block"}},children:o.jsxs(be,{children:[o.jsx(ye,{onClick:t,children:o.jsx(S.MenuOutlined,{})}),o.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=a.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Ce({logo:t}){return o.jsx(Ie,{children:t})}const ve=a.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=a.useTheme();return o.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=a.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=a.useTheme();return o.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=a.styled(a.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),ke=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function we({children:t,brandLogo:e,brandText:n,secondaryText:i,showBurgerMenu:r=!1,onClickMenu:l,...s}){return o.jsx(Te,{...s,children:o.jsxs(a.Toolbar,{children:[o.jsxs(Se,{children:[r&&o.jsx(Me,{onClickMenu:l}),e&&o.jsx(Ce,{logo:e}),n&&o.jsx(Be,{text:n}),i&&o.jsx(Ae,{text:i})]}),o.jsx(ke,{children:t})]})})}const Re=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:n})=>({position:"absolute",right:n.spacing(5.75),...t==="small"&&{right:n.spacing(4),top:"3px"},...e==="standard"&&{right:n.spacing(4.75),...t==="small"&&{right:n.spacing(3.5)}}}));function q({size:t,variant:e,...n}){const i=k.useIntl(),r=y.useImperativeIntl(i);return o.jsx(Re,{size:t,variant:e,children:o.jsx(a.IconButton,{...n,size:t,"aria-label":r.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:n,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...n&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function G({children:t,size:e,variant:n,readOnly:i,...r}){return o.jsx(Fe,{...r,size:e,variant:n,readOnly:i,children:t})}function L({handleClear:t,variant:e="outlined",size:n="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,slotProps:c,slots:g,error:m,showCalendar:u=!0,readOnly:f,"aria-label":p,"data-testid":x,...M}){const b=k.useIntl(),D=y.useImperativeIntl(b);return o.jsx(a.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:o.jsx(G,{size:n,variant:e,readOnly:f,"data-name":"date-picker","aria-label":p,"data-testid":x,children:o.jsx(ut.DatePicker,{...M,label:i&&o.jsx(O,{label:i,type:l,icon:r&&o.jsx(a.Tooltip,{title:r,children:o.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:n,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:C=>o.jsx(q,{...C,size:n,variant:e}),openPickerButton:C=>o.jsx(a.IconButton,{...C,size:n,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f})})})}const Oe=a.styled(a.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:n,isEndDate:i,isSelectedMonth:r,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&r&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(n||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(n||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=a.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:n,selectedMonth:i,...r}){const l=!!(e&&Z(e,t)),s=!!(n&&Z(n,t)),d=!!(e&&n&&t.getTime()>=e.getTime()&&t.getTime()<=n.getTime()),c=t.getDate()===1,g=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return o.jsx(Oe,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:g,isFirstDay:c,children:o.jsx($e,{...r,day:t,selected:d||l||s,isDateRangeLimit:l||s,"data-name":"pickers-day"})})}const Le=a.styled(a.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:n="outlined",startProps:i,endProps:r,"aria-label":l,"data-testid":s,...d}){const c=k.useIntl(),g=y.useImperativeIntl(c),[m,u]=h.useState(!1),[f,p]=h.useState(!1),[x,M]=h.useState((i==null?void 0:i.value)||null),[b,D]=h.useState((r==null?void 0:r.value)||null),[C,v]=h.useState((r==null?void 0:r.value)??(i==null?void 0:i.value)??new Date),j=e??(i==null?void 0:i.error)??(r==null?void 0:r.error),I=(B,R)=>{M(B),i!=null&&i.onChange&&i.onChange(B,R),B&&R.validationError===null&&!f&&R.trigger===null&&(p(!1),u(!0))},T=(B,R)=>{D(B),r!=null&&r.onChange&&r.onChange(B,R)},w=()=>{p(!0),u(!1),setTimeout(()=>{v(x??new Date)},120)},A=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)},F=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)};return o.jsxs(a.Box,{children:[o.jsxs(Le,{variant:n,"data-name":"date-range-picker","aria-label":l,"data-testid":s,children:[o.jsx(L,{...d,...i,value:(i==null?void 0:i.value)??x,maxDate:b??void 0,label:(i==null?void 0:i.label)??g.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":g.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:B=>o.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:f,onChange:I,onOpen:w,onClose:A,onMonthChange:B=>v(B),variant:n}),o.jsx(L,{...d,...r,value:(r==null?void 0:r.value)??b,minDate:x??void 0,slotProps:{popper:{"aria-label":g.formatMessage({id:"c4r.form.endDateCalendar"})},...r==null?void 0:r.slotProps},slots:{day:B=>o.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...r==null?void 0:r.slots},label:(r==null?void 0:r.label)??g.formatMessage({id:"c4r.form.endDate"}),error:(r==null?void 0:r.error)??e,open:m,onOpen:F,onClose:()=>u(!1),onChange:T,onMonthChange:B=>v(B),variant:n})]}),t&&o.jsx(a.FormHelperText,{error:j,children:t})]})}const ct=(t,e,n,i)=>{const r=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const c=[];return e&&c.push("MM/dd/yyyy "),r&&c.push(n?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),n&&c.push(" a"),c.join("")};function We({handleClear:t,variant:e="outlined",size:n="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showClock:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v),I=h.useRef(null),[T,w]=h.useState(0);return h.useEffect(()=>{if(!I.current)return;const A=new ResizeObserver(F=>{var R;const B=(R=F[0])==null?void 0:R.contentRect.width;B&&w(B)});return A.observe(I.current),()=>{A.disconnect()}},[]),o.jsx(G,{size:n,variant:e,readOnly:m,"data-name":"time-picker","data-testid":b??"time-picker","aria-label":D,children:o.jsx(gt.TimePicker,{...C,ref:I,label:o.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&o.jsx(a.Tooltip,{title:r,children:o.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(x,!1,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:n,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:T}},...u},slots:{clearButton:A=>o.jsx(q,{...A,size:n,variant:e}),openPickerButton:A=>o.jsx(a.IconButton,{...A,size:n,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}function He({handleClear:t,variant:e="outlined",size:n="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showCalendar:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v);return o.jsx(G,{size:n,variant:e,readOnly:m,"data-name":"date-time-picker","data-testid":b??"date-time-picker","aria-label":D,children:o.jsx(xt.DateTimePicker,{...C,label:o.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&o.jsx(a.Tooltip,{title:r,children:o.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(x,!0,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:n,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...u},slots:{clearButton:I=>o.jsx(q,{...I,size:n,variant:e}),openPickerButton:I=>o.jsx(a.IconButton,{...I,size:n,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}const _e=[{outlinedBullet:!1,value:""}],Pe=a.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=a.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=a.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Ge=a.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=_e,title:e}){return o.jsxs(o.Fragment,{children:[e&&o.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),o.jsx(Pe,{children:t.map((n,i)=>o.jsxs(Ne,{children:[o.jsx(qe,{style:{backgroundColor:`${n.outlinedBullet?"transparent":n.color}`,borderColor:n.color}}),n.category&&o.jsx(Ge,{color:"inherit",variant:"caption",children:n.category}),o.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:n.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},E={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},W=a.styled(a.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:n,hasForm:i,size:r="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...E[r],maxHeight:X[r],[`@media (max-height:${X[r]})`]:{maxHeight:"calc(100vh - 80px)",...r==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...n&&{width:n},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...E[r],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...n&&{width:n},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:n="small",PaperProps:i,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,...m},u){return t?o.jsx(W,{size:n,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,"data-name":"dialog",...m,ref:u,children:e}):o.jsx(a.Dialog,{PaperComponent:W,PaperProps:{...i,size:n,fullScreen:r,height:l,width:s,hasForm:d},fullScreen:r,role:"section","aria-label":c,"data-testid":g,"data-size":n,"data-width":s,"data-height":l,"data-name":"dialog",...m,ref:u,children:e})}const ze=h.forwardRef(Ue),Ye=a.styled(a.DialogTitle)(()=>({padding:0,zIndex:10})),Ze=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Je=a.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Xe=a.styled(a.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ke({title:t,chipLabel:e,chipProps:n,children:i,onClose:r,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const g=k.useIntl(),m=y.useImperativeIntl(g);return o.jsxs(o.Fragment,{children:[o.jsxs(Ye,{component:"div","data-name":"dialog-header",...c,children:[o.jsxs(Ze,{children:[o.jsxs(K,{flex:1,maxWidth:.8,children:[o.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,role:"heading",children:t}),e&&o.jsx(a.Chip,{color:"default",label:e,...n})]}),o.jsxs(K,{children:[l,r&&o.jsx(a.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:o.jsx(a.IconButton,{onClick:r,children:d||o.jsx(Je,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&o.jsx(Xe,{})]})}const Qe=a.styled(a.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:n,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...n&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function tn({children:t,scrollableContent:e,hasFooterAlert:n,withGutter:i=!0,withBottomGutter:r=!0,onScroll:l,...s},d){const c=a.useTheme(),[g,m]=h.useState(null);h.useImperativeHandle(d,()=>g,[g]);const u=h.useCallback(p=>{const x=Math.abs(p.scrollHeight-p.clientHeight-p.scrollTop)<1,M=p.scrollTop===0,b=`1px solid ${c.palette.divider}`;p.style.borderTop=M?"none":b,p.style.borderBottom=x&&!n?"none":b},[c.palette.divider,n]),f=h.useCallback(p=>{u(p.target),l==null||l(p)},[u,l]);return h.useEffect(()=>{g&&u(g)},[g,u]),h.useEffect(()=>{if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{u(g)});return p.observe(g),()=>p.disconnect()},[g,u]),o.jsx(Qe,{ref:m,onScroll:f,scrollableContent:e,withGutter:i,withBottomGutter:r&&i,"data-name":"dialog-content",...s,children:t})}const dt=h.forwardRef(tn),en=a.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),nn=a.styled(H.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function V({children:t,severity:e="neutral",...n}){return o.jsx(nn,{severity:e,...n,"data-name":"dialog-alert",children:t})}const on=a.styled(a.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:n})=>({flex:"0 0 auto",display:"block",minHeight:e?n.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:n.palette.common.black,color:n.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:n.palette.white[60],a:{color:`${n.palette.secondary.main} !important`}},".MuiAlert-icon":{color:n.palette.white[60]}}}})),an=a.styled(a.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=a.styled(a.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),U=a.styled(a.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),ln=a.styled(a.Divider)(()=>({marginTop:"-1px"}));function sn({children:t,secondaryActions:e,alertContent:n,alertProps:i,dark:r,topContent:l,...s}){return o.jsxs(o.Fragment,{children:[l,!!n&&o.jsx(ln,{}),o.jsxs(on,{...s,dark:r,"data-theme":r?"dark":"light","data-name":"dialog-footer",hasChildren:!!t,children:[!!n&&o.jsx(a.Box,{sx:{p:2,pt:1.5,pb:1},children:o.jsx(V,{...i,children:n})}),o.jsxs(an,{children:[o.jsx(rn,{hasAlert:!!n,children:e}),o.jsx(U,{hasAlert:!!n,children:t})]})]})]})}const cn=a.styled(a.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),dn=a.styled("div")(()=>({width:"100%"})),un=a.styled(a.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function pn({children:t,onClickAway:e,actions:n,severity:i="warning",opened:r,"data-testid":l,"aria-label":s,...d}){const c=h.useRef(null),g=a.useTheme(),m=()=>{e&&e()};return o.jsx(cn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation","data-name":"dialog-confirmation",children:o.jsx(ft,{onClickAway:m,children:o.jsx(a.Slide,{direction:"up",in:r,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:g.transitions.easing.easeOut,timeout:350,children:o.jsx(dn,{children:o.jsxs(un,{children:[o.jsx(V,{severity:i,...d,children:t}),o.jsx(U,{children:n})]})})})})})}const gn=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),xn=a.styled(a.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function fn({theme:t,completed:e,current:n}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:n?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const mn=a.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:n})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...fn({theme:t,completed:e,current:n})}));function hn({currentStep:t,stepsLabels:e,...n}){return o.jsx(gn,{...n,"data-name":"dialog-stepper",children:o.jsx(a.Box,{sx:{display:"flex"},children:e.map((i,r)=>{const l=r+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return o.jsxs(xn,{"data-state":d?"completed":s?"current":"uncompleted",children:[o.jsx(mn,{completed:d,current:s,children:d?o.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),o.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:i})]},r)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=H.Alert;exports.MenuItem=_.MenuItem;exports.AccordionGroup=de;exports.AppBar=we;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=re;exports.DatePicker=L;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=ze;exports.DialogActions=U;exports.DialogAlert=V;exports.DialogConfirmation=pn;exports.DialogContent=dt;exports.DialogContentPadded=en;exports.DialogFooter=sn;exports.DialogHeader=Ke;exports.DialogPaper=W;exports.DialogStepper=hn;exports.IconButton=tt;exports.LabelWithIndicator=O;exports.Menu=Lt;exports.MenuItemFilter=N;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=kt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=E;
|