@malloy-publisher/sdk 0.0.147 → 0.0.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js
CHANGED
|
@@ -210,7 +210,7 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
210
210
|
`));return x},[l,d,u,c,o]),b=k.useMemo(()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null,[h]),g=k.useMemo(()=>({utils:h,defaultDates:b,localeText:f}),[b,h,f]);return p.jsx(Od.Provider,{value:g,children:i})},LF=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:H({},e)}}}}),yx=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return a=>{const s=a!==null&&t.isValid(a)?t.format(a,n):null;return(o??r)(a,t,s)}},xx={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},FF=xx;LF(xx);const Uo=()=>{const e=k.useContext(Od);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
|
|
211
211
|
`));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
|
|
212
212
|
`));const t=k.useMemo(()=>H({},FF,e.localeText),[e.localeText]);return k.useMemo(()=>H({},e,{localeText:t}),[e,t])},_t=()=>Uo().utils,bi=()=>Uo().defaultDates,Iu=e=>{const t=_t(),n=k.useRef(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};function $F(e){return Fe("MuiPickersToolbar",e)}Re("MuiPickersToolbar",["root","content"]);const BF=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],jF=e=>{const{classes:t}=e;return Le({root:["root"],content:["content"]},$F,t)},HF=ae("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),UF=ae("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),zF=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersToolbar"}),{children:o,className:a,toolbarTitle:s,hidden:i,titleId:l}=r,u=je(r,BF),c=r,d=jF(c);return i?null:p.jsxs(HF,H({ref:n,className:De(d.root,a),ownerState:c},u,{children:[p.jsx(Cn,{color:"text.secondary",variant:"overline",id:l,children:s}),p.jsx(UF,{className:d.content,ownerState:c,children:o})]}))}),Hr=()=>Uo().localeText;function VF(e){return Fe("MuiDatePickerToolbar",e)}Re("MuiDatePickerToolbar",["root","title"]);const WF=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],qF=e=>{const{classes:t}=e;return Le({root:["root"],title:["title"]},VF,t)},YF=ae(zF,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),GF=ae(Cn,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),KF=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:a,toolbarFormat:s,toolbarPlaceholder:i="––",views:l,className:u}=r,c=je(r,WF),d=_t(),m=Hr(),f=qF(r),h=k.useMemo(()=>{if(!o)return i;const g=Qp(d,{format:s,views:l},!0);return d.formatByString(o,g)},[o,s,i,d,l]),b=r;return p.jsx(YF,H({ref:n,toolbarTitle:m.datePickerToolbarTitle,isLandscape:a,className:De(f.root,u)},c,{children:p.jsx(GF,{variant:"h4",align:a?"left":"center",ownerState:b,className:f.title,children:h})}))});function Cx(e,t){const n=_t(),r=bi(),o=St({props:e,name:t}),a=k.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:H({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return H({},o,{localeText:a},uF({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Wn(n,o.minDate,r.minDate),maxDate:Wn(n,o.maxDate,r.maxDate),slots:H({toolbar:KF},o.slots)})}const yi=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:a,shouldDisableYear:s,disablePast:i,disableFuture:l}=e,u=r.utils.date(void 0,n),c=Wn(r.utils,e.minDate,r.defaultDates.minDate),d=Wn(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(a&&a(t)):return"shouldDisableMonth";case!!(s&&s(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(i&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};yi.valueManager=xr;const Ex=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],QF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],XF=["minDateTime","maxDateTime"],ZF=[...Ex,...QF,...XF],vx=e=>ZF.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function Tx(e){const{props:t,validator:n,value:r,timezone:o,onError:a}=e,s=Uo(),i=k.useRef(n.valueManager.defaultErrorState),l=n({adapter:s,value:r,timezone:o,props:t}),u=n.valueManager.hasError(l);k.useEffect(()=>{a&&!n.valueManager.isSameError(l,i.current)&&a(l,r),i.current=l},[n,a,l,r]);const c=Ae(d=>n({adapter:s,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:c}}function JF(e){return Fe("MuiInputAdornment",e)}const Vg=Re("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Wg;const e7=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ke(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},t7=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:s}=e,i={root:["root",n&&"disablePointerEvents",o&&`position${ke(o)}`,s,r&&"hiddenLabel",a&&`size${ke(a)}`]};return Le(i,JF,t)},n7=ae("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:e7})(Je(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Vg.positionStart}&:not(.${Vg.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Sx=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiInputAdornment"}),{children:o,className:a,component:s="div",disablePointerEvents:i=!1,disableTypography:l=!1,position:u,variant:c,...d}=r,m=Qn()||{};let f=c;c&&m.variant,m&&!f&&(f=m.variant);const h={...r,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:i,position:u,variant:f},b=t7(h);return p.jsx(vu.Provider,{value:null,children:p.jsx(n7,{as:s,ownerState:h,className:De(b.root,a),ref:n,...d,children:typeof o=="string"&&!l?p.jsx(Cn,{color:"textSecondary",children:o}):p.jsxs(k.Fragment,{children:[u==="start"?Wg||(Wg=p.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,o]})})})});function r7(e){return Fe("MuiPickersPopper",e)}Re("MuiPickersPopper",["root","paper"]);function o7(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const a7=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},gn=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?gn(t.shadowRoot):t:null},s7="@media (pointer: fine)",i7="@media (prefers-reduced-motion: reduce)",ma=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),qg=ma&&ma[1]?parseInt(ma[1],10):null,Yg=ma&&ma[2]?parseInt(ma[2],10):null,l7=qg&&qg<10||Yg&&Yg<13||!1,kx=()=>dx(i7,{defaultMatches:!1})||l7,u7=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],c7=e=>{const{classes:t}=e;return Le({root:["root"],paper:["paper"]},r7,t)},d7=ae(Fp,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),p7=ae(Ho,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function f7(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function m7(e,t){const n=k.useRef(!1),r=k.useRef(!1),o=k.useRef(null),a=k.useRef(!1);k.useEffect(()=>{if(!e)return;function l(){a.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),a.current=!1}},[e]);const s=Ae(l=>{if(!a.current)return;const u=r.current;r.current=!1;const c=jt(o.current);if(!o.current||"clientX"in l&&f7(l,c))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!c.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!u&&t(l)}),i=()=>{r.current=!0};return k.useEffect(()=>{if(e){const l=jt(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",s),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",s),l.removeEventListener("touchmove",u)}}},[e,s]),k.useEffect(()=>{if(e){const l=jt(o.current);return l.addEventListener("click",s),()=>{l.removeEventListener("click",s),r.current=!1}}},[e,s]),[o,i,i]}const h7=k.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:a,paperSlotProps:s,paperClasses:i,onPaperClick:l,onPaperTouchStart:u}=e,c=je(e,u7),d=H({},o,{placement:r}),m=tt({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:i,ownerState:d});return p.jsx(n,H({},c,m,{onClick:f=>{l(f),m.onClick?.(f)},onTouchStart:f=>{u(f),m.onTouchStart?.(f)},ownerState:d,children:a}))});function g7(e){const t=St({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:a,onBlur:s,onDismiss:i,open:l,role:u,placement:c,slots:d,slotProps:m,reduceAnimations:f}=t;k.useEffect(()=>{function D(R){l&&R.key==="Escape"&&i()}return document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)}},[i,l]);const h=k.useRef(null);k.useEffect(()=>{u==="tooltip"||a&&!a()||(l?h.current=gn(document):h.current&&h.current instanceof HTMLElement&&setTimeout(()=>{h.current instanceof HTMLElement&&h.current.focus()}))},[l,u,a]);const[b,g,x]=m7(l,s??i),E=k.useRef(null),C=nt(E,o),T=nt(C,b),w=t,S=c7(w),O=kx(),F=f??O,B=D=>{D.key==="Escape"&&(D.stopPropagation(),i())},P=d?.desktopTransition??F?Oo:Gs,N=d?.desktopTrapFocus??tx,v=d?.desktopPaper??p7,M=d?.popper??d7,A=tt({elementType:M,externalSlotProps:m?.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:c,onKeyDown:B},className:S.root,ownerState:t});return p.jsx(M,H({},A,{children:({TransitionProps:D,placement:R})=>p.jsx(N,H({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},m?.desktopTrapFocus,{children:p.jsx(P,H({},D,m?.desktopTransition,{children:p.jsx(h7,{PaperComponent:v,ownerState:w,popperPlacement:R,ref:T,onPaperClick:g,onPaperTouchStart:x,paperClasses:S.paper,paperSlotProps:m?.desktopPaper,children:r})}))}))}))}const b7=({open:e,onOpen:t,onClose:n})=>{const r=k.useRef(typeof e=="boolean").current,[o,a]=k.useState(!1);k.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}},[r,e]);const s=k.useCallback(i=>{r||a(i),i&&t&&t(),!i&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:s}},Jp=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:a})=>{const s=_t(),i=k.useRef(n),l=t??i.current??a.emptyValue,u=k.useMemo(()=>a.getTimezone(s,l),[s,a,l]),c=Ae(h=>u==null?h:a.setTimezone(s,u,h));let d;e?d=e:u?d=u:r?d=s.getTimezone(r):d="default";const m=k.useMemo(()=>a.setTimezone(s,d,l),[a,s,d,l]),f=Ae((h,...b)=>{const g=c(h);o?.(g,...b)});return{value:m,handleValueChange:f,timezone:d}},ef=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:a,valueManager:s})=>{const[i,l]=_n({name:e,state:"value",controlled:n,default:r??s.emptyValue}),u=Ae((c,...d)=>{l(c),a?.(c,...d)});return Jp({timezone:t,value:i,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:s})},y7=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?a?!0:n(r.lastPublishedValue):!1},x7=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:a}=e,s=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?s&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&a?s?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},C7=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},E7=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:a,onChange:s,value:i,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:c,referenceDate:d}=e,{current:m}=k.useRef(l),{current:f}=k.useRef(i!==void 0),[h,b]=k.useState(c),g=_t(),x=Uo(),{isOpen:E,setIsOpen:C}=b7(e),{timezone:T,value:w,handleValueChange:S}=Jp({timezone:c,value:i,defaultValue:m,referenceDate:d,onChange:s,valueManager:t}),[O,F]=k.useState(()=>{let re;return w!==void 0?re=w:m!==void 0?re=m:re=t.emptyValue,{draft:re,lastPublishedValue:re,lastCommittedValue:re,lastControlledValue:i,hasBeenModifiedSinceMount:!1}}),B=t.getTimezone(g,O.draft);h!==c&&(b(c),c&&B&&c!==B&&F(re=>H({},re,{draft:t.setTimezone(g,c,re.draft)})));const{getValidationErrorForNewValue:P}=Tx({props:e,validator:o,timezone:T,value:O.draft,onError:e.onError}),N=Ae(re=>{const Q={action:re,dateState:O,hasChanged:de=>!t.areValuesEqual(g,re.value,de),isControlled:f,closeOnSelect:u},G=y7(Q),se=x7(Q),J=C7(Q);F(de=>H({},de,{draft:re.value,lastPublishedValue:G?re.value:de.lastPublishedValue,lastCommittedValue:se?re.value:de.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let ee=null;const xe=()=>(ee||(ee={validationError:re.name==="setValueFromField"?re.context.validationError:P(re.value)},re.name==="setValueFromShortcut"&&(ee.shortcut=re.shortcut)),ee);G&&S(re.value,xe()),se&&a&&a(re.value,xe()),J&&C(!1)});if(O.lastControlledValue!==i){const re=t.areValuesEqual(g,O.draft,w);F(Q=>H({},Q,{lastControlledValue:i},re?{}:{lastCommittedValue:w,lastPublishedValue:w,draft:w,hasBeenModifiedSinceMount:!0}))}const v=Ae(()=>{N({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),M=Ae(()=>{N({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),A=Ae(()=>{N({value:O.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),D=Ae(()=>{N({value:O.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),R=Ae(()=>{N({value:t.getTodayValue(g,T,n),name:"setValueFromAction",pickerAction:"today"})}),z=Ae(re=>{re.preventDefault(),C(!0)}),U=Ae(re=>{re?.preventDefault(),C(!1)}),j=Ae((re,Q="partial")=>N({name:"setValueFromView",value:re,selectionState:Q})),_=Ae((re,Q,G)=>N({name:"setValueFromShortcut",value:re,changeImportance:Q,shortcut:G})),K=Ae((re,Q)=>N({name:"setValueFromField",value:re,context:Q})),ne={onClear:v,onAccept:M,onDismiss:A,onCancel:D,onSetToday:R,onOpen:z,onClose:U},L={value:O.draft,onChange:K},fe=k.useMemo(()=>t.cleanValue(g,O.draft),[g,t,O.draft]),X={value:fe,onChange:j,onClose:U,open:E},te=H({},ne,{value:fe,onChange:j,onSelectShortcut:_,isValid:re=>{const Q=o({adapter:x,value:re,timezone:T,props:e});return!t.hasError(Q)}}),Z=k.useMemo(()=>({onOpen:z,onClose:U,open:E}),[E,U,z]);return{open:E,fieldProps:L,viewProps:X,layoutProps:te,actions:ne,contextValue:Z}};function wx({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:s,onFocusedViewChange:i}){const l=k.useRef(n),u=k.useRef(o),c=k.useRef(o.includes(n)?n:o[0]),[d,m]=_n({name:"useViews",state:"view",controlled:r,default:c.current}),f=k.useRef(a?d:null),[h,b]=_n({name:"useViews",state:"focusedView",controlled:s,default:f.current});k.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(O=>!o.includes(O)))&&(m(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,m,d,o]);const g=o.indexOf(d),x=o[g-1]??null,E=o[g+1]??null,C=Ae((O,F)=>{b(F?O:B=>O===B?null:B),i?.(O,F)}),T=Ae(O=>{C(O,!0),O!==d&&(m(O),t&&t(O))}),w=Ae(()=>{E&&T(E)}),S=Ae((O,F,B)=>{const P=F==="finish",N=B?o.indexOf(B)<o.length-1:!!E;if(e(O,P&&N?"partial":F,B),B&&B!==d){const M=o[o.indexOf(B)+1];M&&T(M)}else P&&w()});return{view:d,setView:T,focusedView:h,setFocusedView:C,nextView:E,previousView:x,defaultView:o.includes(n)?n:o[0],goToNextView:w,setValueAndGoToNextView:S}}const v7=["className","sx"],T7=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:a})=>{const{onChange:s,open:i,onClose:l}=t,{view:u,views:c,openTo:d,onViewChange:m,viewRenderers:f,timezone:h}=e,b=je(e,v7),{view:g,setView:x,defaultView:E,focusedView:C,setFocusedView:T,setValueAndGoToNextView:w}=wx({view:u,views:c,openTo:d,onChange:s,onViewChange:m,autoFocus:r}),{hasUIView:S,viewModeLookup:O}=k.useMemo(()=>c.reduce((A,D)=>{let R;return f[D]!=null?R="UI":R="field",A.viewModeLookup[D]=R,R==="UI"&&(A.hasUIView=!0),A},{hasUIView:!1,viewModeLookup:{}}),[f,c]),F=k.useMemo(()=>c.reduce((A,D)=>f[D]!=null&&hF(D)?A+1:A,0),[f,c]),B=O[g],P=Ae(()=>B==="UI"),[N,v]=k.useState(B==="UI"?g:null);return N!==g&&O[g]==="UI"&&v(g),Vt(()=>{B==="field"&&i&&(l(),setTimeout(()=>{a?.current?.setSelectedSections(g),a?.current?.focusField(g)}))},[g]),Vt(()=>{if(!i)return;let A=g;B==="field"&&N!=null&&(A=N),A!==E&&O[A]==="UI"&&O[E]==="UI"&&(A=E),A!==g&&x(A),T(A,!0)},[i]),{hasUIView:S,shouldRestoreFocus:P,layoutProps:{views:c,view:N,onViewChange:x},renderCurrentView:()=>{if(N==null)return null;const A=f[N];if(A==null)return null;const D=H({},b,n,t,{views:c,timezone:h,onChange:w,view:N,onViewChange:x,focusedView:C,onFocusedViewChange:T,showViewSwitcher:F>1,timeViewsCount:F});return o?o(f,N,D):A(D)}}};function Gg(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const S7=(e,t)=>{const[n,r]=k.useState(Gg);return Vt(()=>{const a=()=>{r(Gg())};return window.addEventListener("orientationchange",a),()=>{window.removeEventListener("orientationchange",a)}},[]),o7(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},k7=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,a=S7(n.views,o),s=Yn();return{layoutProps:H({},n,t,{isLandscape:a,isRtl:s,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function w7(e){const{props:t,pickerValueResponse:n}=e;return k.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const _x=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:a,autoFocusView:s,rendererInterceptor:i,fieldRef:l})=>{const u=E7({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:a}),c=T7({props:e,additionalViewProps:o,autoFocusView:s,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:i}),d=k7({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),m=w7({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:u.contextValue,ownerState:m}};function Ix(e){return Fe("MuiPickersLayout",e)}const co=Re("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);function _7(e){return Fe("MuiButton",e)}const po=Re("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),I7=k.createContext({}),A7=k.createContext(void 0),D7=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,loading:s,loadingPosition:i,classes:l}=e,u={root:["root",s&&"loading",a,`${a}${ke(t)}`,`size${ke(o)}`,`${a}Size${ke(o)}`,`color${ke(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${ke(i)}`],startIcon:["icon","startIcon",`iconSize${ke(o)}`],endIcon:["icon","endIcon",`iconSize${ke(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=Le(u,_7,l);return{...l,...c}},Ax=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],P7=ae(No,{shouldForwardProp:e=>fn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ke(n.color)}`],t[`size${ke(n.size)}`],t[`${n.variant}Size${ke(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Je(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${po.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${po.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${po.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${po.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(dn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${po.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${po.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${po.loading}`]:{color:"transparent"}}}]}})),R7=ae("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ke(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Ax]})),M7=ae("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ke(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Ax]})),N7=ae("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Kg=ae("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Dt=k.forwardRef(function(t,n){const r=k.useContext(I7),o=k.useContext(A7),a=Fs(r,t),s=Qe({props:a,name:"MuiButton"}),{children:i,color:l="primary",component:u="button",className:c,disabled:d=!1,disableElevation:m=!1,disableFocusRipple:f=!1,endIcon:h,focusVisibleClassName:b,fullWidth:g=!1,id:x,loading:E=null,loadingIndicator:C,loadingPosition:T="center",size:w="medium",startIcon:S,type:O,variant:F="text",...B}=s,P=nr(x),N=C??p.jsx(Up,{"aria-labelledby":P,color:"inherit",size:16}),v={...s,color:l,component:u,disabled:d,disableElevation:m,disableFocusRipple:f,fullWidth:g,loading:E,loadingIndicator:N,loadingPosition:T,size:w,type:O,variant:F},M=D7(v),A=(S||E&&T==="start")&&p.jsx(R7,{className:M.startIcon,ownerState:v,children:S||p.jsx(Kg,{className:M.loadingIconPlaceholder,ownerState:v})}),D=(h||E&&T==="end")&&p.jsx(M7,{className:M.endIcon,ownerState:v,children:h||p.jsx(Kg,{className:M.loadingIconPlaceholder,ownerState:v})}),R=o||"",z=typeof E=="boolean"?p.jsx("span",{className:M.loadingWrapper,style:{display:"contents"},children:E&&p.jsx(N7,{className:M.loadingIndicator,ownerState:v,children:N})}):null;return p.jsxs(P7,{ownerState:v,className:De(r.className,M.root,c,R),component:u,disabled:d||E,focusRipple:!f,focusVisibleClassName:De(M.focusVisible,b),ref:n,type:O,id:E?P:x,...B,classes:M,children:[A,T!=="end"&&z,i,T==="end"&&z,D]})});function O7(e){return Fe("MuiDialogActions",e)}Re("MuiDialogActions",["root","spacing"]);const L7=e=>{const{classes:t,disableSpacing:n}=e;return Le({root:["root",!n&&"spacing"]},O7,t)},F7=ae("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Tr=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:a=!1,...s}=r,i={...r,disableSpacing:a},l=L7(i);return p.jsx(F7,{className:De(l.root,o),ownerState:i,ref:n,...s})}),$7=["onAccept","onClear","onCancel","onSetToday","actions"];function B7(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:a}=e,s=je(e,$7),i=Hr();if(a==null||a.length===0)return null;const l=a?.map(u=>{switch(u){case"clear":return p.jsx(Dt,{onClick:n,children:i.clearButtonLabel},u);case"cancel":return p.jsx(Dt,{onClick:r,children:i.cancelButtonLabel},u);case"accept":return p.jsx(Dt,{onClick:t,children:i.okButtonLabel},u);case"today":return p.jsx(Dt,{onClick:o,children:i.todayButtonLabel},u);default:return null}});return p.jsx(Tr,H({},s,{children:l}))}function j7(e){return Fe("MuiListItem",e)}Re("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const H7=Re("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function U7(e){return Fe("MuiListItemSecondaryAction",e)}Re("MuiListItemSecondaryAction",["root","disableGutters"]);const z7=e=>{const{disableGutters:t,classes:n}=e;return Le({root:["root",t&&"disableGutters"]},U7,n)},V7=ae("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Dx=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...a}=r,s=k.useContext(Io),i={...r,disableGutters:s.disableGutters},l=z7(i);return p.jsx(V7,{className:De(l.root,o),ownerState:i,ref:n,...a})});Dx.muiName="ListItemSecondaryAction";const W7=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},q7=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:a,divider:s,hasSecondaryAction:i}=e;return Le({root:["root",r&&"dense",!o&&"gutters",!a&&"padding",s&&"divider",t==="flex-start"&&"alignItemsFlexStart",i&&"secondaryAction"],container:["container"]},j7,n)},Y7=ae("div",{name:"MuiListItem",slot:"Root",overridesResolver:W7})(Je(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${H7.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),G7=ae("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),K7=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiListItem"}),{alignItems:o="center",children:a,className:s,component:i,components:l={},componentsProps:u={},ContainerComponent:c="li",ContainerProps:{className:d,...m}={},dense:f=!1,disableGutters:h=!1,disablePadding:b=!1,divider:g=!1,secondaryAction:x,slotProps:E={},slots:C={},...T}=r,w=k.useContext(Io),S=k.useMemo(()=>({dense:f||w.dense||!1,alignItems:o,disableGutters:h}),[o,w.dense,f,h]),O=k.useRef(null),F=k.Children.toArray(a),B=F.length&&zi(F[F.length-1],["ListItemSecondaryAction"]),P={...r,alignItems:o,dense:S.dense,disableGutters:h,disablePadding:b,divider:g,hasSecondaryAction:B},N=q7(P),v=nt(O,n),M=C.root||l.Root||Y7,A=E.root||u.root||{},D={className:De(N.root,A.className,s),...T};let R=i||"li";return B?(R=!D.component&&!i?"div":R,c==="li"&&(R==="li"?R="div":D.component==="li"&&(D.component="div")),p.jsx(Io.Provider,{value:S,children:p.jsxs(G7,{as:c,className:De(N.container,d),ref:v,ownerState:P,...m,children:[p.jsx(M,{...A,...!wa(M)&&{as:R,ownerState:{...P,...A.ownerState}},...D,children:F}),F.pop()]})})):p.jsx(Io.Provider,{value:S,children:p.jsxs(M,{...A,as:R,ref:v,...!wa(M)&&{ownerState:{...P,...A.ownerState}},...D,children:[F,x&&p.jsx(Dx,{children:x})]})})}),Ks=36,Au=2,Du=320,Q7=280,tf=336,X7=["items","changeImportance","isLandscape","onChange","isValid"],Z7=["getValue"];function J7(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,a=je(e,X7);if(t==null||t.length===0)return null;const s=t.map(i=>{let{getValue:l}=i,u=je(i,Z7);const c=l({isValid:o});return H({},u,{label:u.label,onClick:()=>{r(c,n,u)},disabled:!o(c)})});return p.jsx(Xy,H({dense:!0,sx:[{maxHeight:tf,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:s.map(i=>p.jsx(K7,{children:p.jsx(Gy,H({},i))},i.id??i.label))}))}function e$(e){return e.view!==null}const t$=e=>{const{classes:t,isLandscape:n}=e;return Le({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Ix,t)},n$=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:a,view:s,views:i,onViewChange:l,value:u,onChange:c,onSelectShortcut:d,isValid:m,isLandscape:f,disabled:h,readOnly:b,children:g,slots:x,slotProps:E}=e,C=t$(e),T=x?.actionBar??B7,w=tt({elementType:T,externalSlotProps:E?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:a,actions:t==="desktop"?[]:["cancel","accept"]},className:C.actionBar,ownerState:H({},e,{wrapperVariant:t})}),S=p.jsx(T,H({},w)),O=x?.toolbar,F=tt({elementType:O,externalSlotProps:E?.toolbar,additionalProps:{isLandscape:f,onChange:c,value:u,view:s,onViewChange:l,views:i,disabled:h,readOnly:b},className:C.toolbar,ownerState:H({},e,{wrapperVariant:t})}),B=e$(F)&&O?p.jsx(O,H({},F)):null,P=g,N=x?.tabs,v=s&&N?p.jsx(N,H({view:s,onViewChange:l,className:C.tabs},E?.tabs)):null,M=x?.shortcuts??J7,A=tt({elementType:M,externalSlotProps:E?.shortcuts,additionalProps:{isValid:m,isLandscape:f,onChange:d},className:C.shortcuts,ownerState:{isValid:m,isLandscape:f,onChange:d,wrapperVariant:t}}),D=s&&M?p.jsx(M,H({},A)):null;return{toolbar:B,content:P,tabs:v,actionBar:S,shortcuts:D}},r$=e=>{const{isLandscape:t,classes:n}=e;return Le({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},Ix,n)},o$=ae("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${co.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${co.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${co.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${co.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${co.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${co.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${co.shortcuts}`]:{gridColumn:3}}}]}),a$=ae("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Px=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:a,tabs:s,actionBar:i,shortcuts:l}=n$(r),{sx:u,className:c,isLandscape:d,wrapperVariant:m}=r,f=r$(r);return p.jsxs(o$,{ref:n,sx:u,className:De(f.root,c),ownerState:r,children:[d?l:o,d?o:l,p.jsx(a$,{className:f.contentWrapper,children:m==="desktop"?p.jsxs(k.Fragment,{children:[a,s]}):p.jsxs(k.Fragment,{children:[s,a]})}),i]})}),s$=k.createContext(null);function Rx(e){const{contextValue:t,localeText:n,children:r}=e;return p.jsx(s$.Provider,{value:t,children:p.jsx(Ld,{localeText:n,children:r})})}const i$=["props","getOpenDialogAriaText"],l$=["ownerState"],u$=["ownerState"],c$=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=je(e,i$);const{slots:o,slotProps:a,className:s,sx:i,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:d,onSelectedSectionsChange:m,timezone:f,name:h,label:b,inputRef:g,readOnly:x,disabled:E,autoFocus:C,localeText:T,reduceAnimations:w}=t,S=k.useRef(null),O=k.useRef(null),F=nr(),B=a?.toolbar?.hidden??!1,{open:P,actions:N,hasUIView:v,layoutProps:M,renderCurrentView:A,shouldRestoreFocus:D,fieldProps:R,contextValue:z,ownerState:U}=_x(H({},r,{props:t,fieldRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),j=o.inputAdornment??Sx,_=tt({elementType:j,externalSlotProps:a?.inputAdornment,additionalProps:{position:"end"},ownerState:t}),K=je(_,l$),ne=o.openPickerButton??yr,L=tt({elementType:ne,externalSlotProps:a?.openPickerButton,additionalProps:{disabled:E||x,onClick:P?N.onClose:N.onOpen,"aria-label":n(R.value),edge:K.position},ownerState:t}),fe=je(L,u$),X=o.openPickerIcon,q=tt({elementType:X,externalSlotProps:a?.openPickerIcon,ownerState:U}),te=o.field,Z=tt({elementType:te,externalSlotProps:a?.field,additionalProps:H({},R,B&&{id:F},{readOnly:x,disabled:E,className:s,sx:i,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:d,onSelectedSectionsChange:m,timezone:f,label:b,name:h,autoFocus:C&&!t.open,focused:P?!0:void 0},g?{inputRef:g}:{}),ownerState:t});v&&(Z.InputProps=H({},Z.InputProps,{ref:S},!t.disableOpenPicker&&{[`${K.position}Adornment`]:p.jsx(j,H({},K,{children:p.jsx(ne,H({},fe,{children:p.jsx(X,H({},q))}))}))}));const re=H({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},Z.slots),Q=o.layout??Px;let G=F;B&&(b?G=`${F}-label`:G=void 0);const se=H({},a,{toolbar:H({},a?.toolbar,{titleId:F}),popper:H({"aria-labelledby":G},a?.popper)}),J=nt(O,Z.unstableFieldRef);return{renderPicker:()=>p.jsxs(Rx,{contextValue:z,localeText:T,children:[p.jsx(te,H({},Z,{slots:re,slotProps:se,unstableFieldRef:J})),p.jsx(g7,H({role:"dialog",placement:"bottom-start",anchorEl:S.current},N,{open:P,slots:o,slotProps:se,shouldRestoreFocus:D,reduceAnimations:w,children:p.jsx(Q,H({},M,se?.layout,{slots:o,slotProps:se,children:A()}))}))]})}},d$=rt(p.jsx("path",{d:"M7 10l5 5 5-5z"})),p$=rt(p.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),f$=rt(p.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),m$=rt(p.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}));rt(p.jsxs(k.Fragment,{children:[p.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),p.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));rt(p.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}));rt(p.jsxs(k.Fragment,{children:[p.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),p.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}));const h$=rt(p.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),g$=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},b$=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,a=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let s=null;for(;s=a.exec(t);)n.push({start:s.index,end:a.lastIndex-1});return n},y$=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},x$=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:a,token:s,startSeparator:i})=>{if(s==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=fx(e,s),u=bx(e,l.contentType,l.type,s),c=n?u:l.contentType==="digit",d=t!=null&&e.isValid(t);let m=d?e.formatByString(t,s):"",f=null;if(c)if(u)f=m===""?e.formatByString(a,s).length:m.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);f=l.maxLength,d&&(m=Xp(hx(Lo(m,o),f),o))}return H({},l,{format:s,maxLength:f,value:m,placeholder:y$(e,r,l,s),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:i,endSeparator:"",modified:!1})},C$=e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),a=[];let s="";const i=Object.keys(t.formatTokenMap).sort((f,h)=>h.length-f.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${i.join("|")})*$`),c=new RegExp(`^(${i.join("|")})`),d=f=>r.find(h=>h.start<=f&&h.end>=f);let m=0;for(;m<n.length;){const f=d(m),h=f!=null,b=l.exec(n.slice(m))?.[1];if(!h&&b!=null&&u.test(b)){let g=b;for(;g.length>0;){const x=c.exec(g)[1];g=g.slice(x.length),a.push(x$(H({},e,{now:o,token:x,startSeparator:s}))),s=""}m+=b.length}else{const g=n[m];h&&f?.start===m||f?.end===m||(a.length===0?s+=g:a[a.length-1].endSeparator+=g),m+=1}}return a.length===0&&s.length>0&&a.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:s,endSeparator:"",modified:!1}),a},E$=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=a=>{let s=a;return e&&s!==null&&s.includes(" ")&&(s=`${s}`),t==="spacious"&&["/",".","-"].includes(s)&&(s=` ${s} `),s};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),Qg=e=>{let t=g$(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=b$(H({},e,{expandedFormat:t})),r=C$(H({},e,{expandedFormat:t,escapedParts:n}));return E$(H({},e,{sections:r}))},v$=e=>{const t=_t(),n=Hr(),r=Uo(),o=Yn(),{valueManager:a,fieldValueManager:s,valueType:i,validator:l,internalProps:u,internalProps:{value:c,defaultValue:d,referenceDate:m,onChange:f,format:h,formatDensity:b="dense",selectedSections:g,onSelectedSectionsChange:x,shouldRespectLeadingZeros:E=!1,timezone:C,enableAccessibleFieldDOMStructure:T=!1}}=e,{timezone:w,value:S,handleValueChange:O}=Jp({timezone:C,value:c,defaultValue:d,referenceDate:m,onChange:f,valueManager:a}),F=k.useMemo(()=>EF(t),[t]),B=k.useMemo(()=>_F(t,F,w),[t,F,w]),P=k.useCallback((X,q=null)=>s.getSectionsFromValue(t,X,q,te=>Qg({utils:t,localeText:n,localizedDigits:F,format:h,date:te,formatDensity:b,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:T,isRtl:o})),[s,h,n,F,o,E,t,b,T]),[N,v]=k.useState(()=>{const X=P(S),q={sections:X,value:S,referenceValue:a.emptyValue,tempValueStrAndroid:null},te=bF(X),Z=a.getInitialReferenceValue({referenceDate:m,value:S,utils:t,props:u,granularity:te,timezone:w});return H({},q,{referenceValue:Z})}),[M,A]=_n({controlled:g,default:null,name:"useField",state:"selectedSections"}),D=X=>{A(X),x?.(X)},R=k.useMemo(()=>Nd(M,N.sections),[M,N.sections]),z=R==="all"?0:R,U=({value:X,referenceValue:q,sections:te})=>{if(v(re=>H({},re,{sections:te,value:X,referenceValue:q,tempValueStrAndroid:null})),a.areValuesEqual(t,N.value,X))return;const Z={validationError:l({adapter:r,value:X,timezone:w,props:u})};O(X,Z)},j=(X,q)=>{const te=[...N.sections];return te[X]=H({},te[X],{value:q,modified:!0}),te},_=()=>{U({value:a.emptyValue,referenceValue:N.referenceValue,sections:P(a.emptyValue)})},K=()=>{if(z==null)return;const X=N.sections[z],q=s.getActiveDateManager(t,N,X),Z=q.getSections(N.sections).filter(se=>se.value!=="").length===(X.value===""?0:1),re=j(z,""),Q=Z?null:t.getInvalidDate(),G=q.getNewValuesFromNewActiveDate(Q);U(H({},G,{sections:re}))},ne=X=>{const q=(re,Q)=>{const G=t.parse(re,h);if(G==null||!t.isValid(G))return null;const se=Qg({utils:t,localeText:n,localizedDigits:F,format:h,date:G,formatDensity:b,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:T,isRtl:o});return zg(t,G,se,Q,!1)},te=s.parseValueStr(X,N.referenceValue,q),Z=s.updateReferenceValue(t,te,N.referenceValue);U({value:te,referenceValue:Z,sections:P(te,N.sections)})},L=({activeSection:X,newSectionValue:q,shouldGoToNextSection:te})=>{te&&z<N.sections.length-1&&D(z+1);const Z=s.getActiveDateManager(t,N,X),re=j(z,q),Q=Z.getSections(re),G=SF(t,Q,F);let se,J;if(G!=null&&t.isValid(G)){const ee=zg(t,G,Q,Z.referenceDate,!0);se=Z.getNewValuesFromNewActiveDate(ee),J=!0}else se=Z.getNewValuesFromNewActiveDate(G),J=(G!=null&&!t.isValid(G))!=(Z.date!=null&&!t.isValid(Z.date));return J?U(H({},se,{sections:re})):v(ee=>H({},ee,se,{sections:re,tempValueStrAndroid:null}))},fe=X=>v(q=>H({},q,{tempValueStrAndroid:X}));return k.useEffect(()=>{const X=P(N.value);v(q=>H({},q,{sections:X}))},[h,t.locale,o]),k.useEffect(()=>{let X;a.areValuesEqual(t,N.value,S)?X=a.getTimezone(t,N.value)!==a.getTimezone(t,S):X=!0,X&&v(q=>H({},q,{value:S,referenceValue:s.updateReferenceValue(t,S,q.referenceValue),sections:P(S)}))},[S]),{state:N,activeSectionIndex:z,parsedSelectedSections:R,setSelectedSections:D,clearValue:_,clearActiveSection:K,updateSectionValue:L,updateValueFromValueStr:ne,setTempAndroidValueStr:fe,getSectionsFromValue:P,sectionsValueBoundaries:B,localizedDigits:F,timezone:w}},T$=5e3,ta=e=>e.saveQuery!=null,S$=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:a})=>{const s=_t(),[i,l]=k.useState(null),u=Ae(()=>l(null));k.useEffect(()=>{i!=null&&e[i.sectionIndex]?.type!==i.sectionType&&u()},[e,i,u]),k.useEffect(()=>{if(i!=null){const h=setTimeout(()=>u(),T$);return()=>{clearTimeout(h)}}return()=>{}},[i,u]);const c=({keyPressed:h,sectionIndex:b},g,x)=>{const E=h.toLowerCase(),C=e[b];if(i!=null&&(!x||x(i.value))&&i.sectionIndex===b){const w=`${i.value}${E}`,S=g(w,C);if(!ta(S))return l({sectionIndex:b,value:w,sectionType:C.type}),S}const T=g(E,C);return ta(T)&&!T.saveQuery?(u(),null):(l({sectionIndex:b,value:E,sectionType:C.type}),ta(T)?null:T)},d=h=>{const b=(E,C,T)=>{const w=C.filter(S=>S.toLowerCase().startsWith(T));return w.length===0?{saveQuery:!1}:{sectionValue:w[0],shouldGoToNextSection:w.length===1}},g=(E,C,T,w)=>{const S=O=>mx(s,a,C.type,O);if(C.contentType==="letter")return b(C.format,S(C.format),E);if(T&&w!=null&&fx(s,T).contentType==="letter"){const O=S(T),F=b(T,O,E);return ta(F)?{saveQuery:!1}:H({},F,{sectionValue:w(F.sectionValue,O)})}return{saveQuery:!1}};return c(h,(E,C)=>{switch(C.type){case"month":{const T=w=>Hg(s,w,s.formats.month,C.format);return g(E,C,s.formats.month,T)}case"weekDay":{const T=(w,S)=>S.indexOf(w).toString();return g(E,C,s.formats.weekday,T)}case"meridiem":return g(E,C);default:return{saveQuery:!1}}})},m=h=>{const b=(x,E)=>{const C=Lo(x,r),T=Number(C),w=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(T>w.maximum)return{saveQuery:!1};if(T<w.minimum)return{saveQuery:!0};const S=T*10>w.maximum||C.length===w.maximum.toString().length;return{sectionValue:gx(s,T,w,r,E),shouldGoToNextSection:S}};return c(h,(x,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return b(x,E);if(E.type==="month"){bx(s,"digit","month","MM");const C=b(x,{type:E.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ta(C))return C;const T=Hg(s,C.sectionValue,"MM",E.format);return H({},C,{sectionValue:T})}if(E.type==="weekDay"){const C=b(x,E);if(ta(C))return C;const T=_u(s,E.format)[Number(C.sectionValue)-1];return H({},C,{sectionValue:T})}return{saveQuery:!1}},x=>jg(x,r))};return{applyCharacterEditing:Ae(h=>{const b=e[h.sectionIndex],x=jg(h.keyPressed,r)?m(H({},h,{keyPressed:Xp(h.keyPressed,r)})):d(h);if(x==null){o(null);return}t({activeSection:b,newSectionValue:x.sectionValue,shouldGoToNextSection:x.shouldGoToNextSection})}),resetCharacterQuery:u}},k$=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:a,onFocus:s,onInput:i,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:d,applyCharacterEditing:m,resetCharacterQuery:f,setSelectedSections:h,parsedSelectedSections:b,state:g,clearActiveSection:x,clearValue:E,updateSectionValue:C,updateValueFromValueStr:T,sectionOrder:w,areAllSectionsEmpty:S,sectionsValueBoundaries:O}=e,F=k.useRef(null),B=nt(r,F),P=Hr(),N=_t(),v=nr(),[M,A]=k.useState(!1),D=k.useMemo(()=>({syncSelectionToDOM:()=>{if(!F.current)return;const J=document.getSelection();if(!J)return;if(b==null){J.rangeCount>0&&F.current.getRoot().contains(J.getRangeAt(0).startContainer)&&J.removeAllRanges(),M&&F.current.getRoot().blur();return}if(!F.current.getRoot().contains(gn(document)))return;const ee=new window.Range;let xe;b==="all"?xe=F.current.getRoot():g.sections[b].type==="empty"?xe=F.current.getSectionContainer(b):xe=F.current.getSectionContent(b),ee.selectNodeContents(xe),xe.focus(),J.removeAllRanges(),J.addRange(ee)},getActiveSectionIndexFromDOM:()=>{const J=gn(document);return!J||!F.current||!F.current.getRoot().contains(J)?null:F.current.getSectionIndexFromDOMElement(J)},focusField:(J=0)=>{if(!F.current||D.getActiveSectionIndexFromDOM()!=null)return;const ee=Nd(J,g.sections);A(!0),F.current.getSectionContent(ee).focus()},setSelectedSections:J=>{if(!F.current)return;const ee=Nd(J,g.sections);A((ee==="all"?0:ee)!==null),h(J)},isFieldFocused:()=>{const J=gn(document);return!!F.current&&F.current.getRoot().contains(J)}}),[b,h,g.sections,M]),R=Ae(J=>{if(!F.current)return;const ee=g.sections[J];F.current.getSectionContent(J).innerHTML=ee.value||ee.placeholder,D.syncSelectionToDOM()}),z=Ae((J,...ee)=>{J.isDefaultPrevented()||!F.current||(A(!0),a?.(J,...ee),b==="all"?setTimeout(()=>{const xe=document.getSelection().getRangeAt(0).startOffset;if(xe===0){h(w.startIndex);return}let de=0,be=0;for(;be<xe&&de<g.sections.length;){const le=g.sections[de];de+=1,be+=`${le.startSeparator}${le.value||le.placeholder}${le.endSeparator}`.length}h(de-1)}):M?F.current.getRoot().contains(J.target)||h(w.startIndex):(A(!0),h(w.startIndex)))}),U=Ae(J=>{if(i?.(J),!F.current||b!=="all")return;const xe=J.target.textContent??"";F.current.getRoot().innerHTML=g.sections.map(de=>`${de.startSeparator}${de.value||de.placeholder}${de.endSeparator}`).join(""),D.syncSelectionToDOM(),xe.length===0||xe.charCodeAt(0)===10?(f(),E(),h("all")):xe.length>1?T(xe):(b==="all"&&h(0),m({keyPressed:xe,sectionIndex:0}))}),j=Ae(J=>{if(l?.(J),n||b!=="all"){J.preventDefault();return}const ee=J.clipboardData.getData("text");J.preventDefault(),f(),T(ee)}),_=Ae((...J)=>{if(s?.(...J),M||!F.current)return;A(!0),F.current.getSectionIndexFromDOMElement(gn(document))!=null||h(w.startIndex)}),K=Ae((...J)=>{o?.(...J),setTimeout(()=>{if(!F.current)return;const ee=gn(document);!F.current.getRoot().contains(ee)&&(A(!1),h(null))})}),ne=Ae(J=>ee=>{ee.isDefaultPrevented()||h(J)}),L=Ae(J=>{J.preventDefault()}),fe=Ae(J=>()=>{h(J)}),X=Ae(J=>{if(J.preventDefault(),n||t||typeof b!="number")return;const ee=g.sections[b],xe=J.clipboardData.getData("text"),de=/^[a-zA-Z]+$/.test(xe),be=/^[0-9]+$/.test(xe),le=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);ee.contentType==="letter"&&de||ee.contentType==="digit"&&be||ee.contentType==="digit-with-letter"&&le?(f(),C({activeSection:ee,newSectionValue:xe,shouldGoToNextSection:!0})):!de&&!be&&(f(),T(xe))}),q=Ae(J=>{J.preventDefault(),J.dataTransfer.dropEffect="none"}),te=Ae(J=>{if(!F.current)return;const ee=J.target,xe=ee.textContent??"",de=F.current.getSectionIndexFromDOMElement(ee),be=g.sections[de];if(n||!F.current){R(de);return}if(xe.length===0){if(be.value===""){R(de);return}const le=J.nativeEvent.inputType;if(le==="insertParagraph"||le==="insertLineBreak"){R(de);return}f(),x();return}m({keyPressed:xe,sectionIndex:de}),R(de)});Vt(()=>{if(!(!M||!F.current)){if(b==="all")F.current.getRoot().focus();else if(typeof b=="number"){const J=F.current.getSectionContent(b);J&&J.focus()}}},[b,M]);const Z=k.useMemo(()=>g.sections.reduce((J,ee)=>(J[ee.type]=O[ee.type]({currentDate:null,contentType:ee.contentType,format:ee.format}),J),{}),[O,g.sections]),re=b==="all",Q=k.useMemo(()=>g.sections.map((J,ee)=>{const xe=!re&&!t&&!n;return{container:{"data-sectionindex":ee,onClick:ne(ee)},content:{tabIndex:re||ee>0?-1:0,contentEditable:!re&&!t&&!n,role:"spinbutton",id:`${v}-${J.type}`,"aria-labelledby":`${v}-${J.type}`,"aria-readonly":n,"aria-valuenow":RF(J,N),"aria-valuemin":Z[J.type].minimum,"aria-valuemax":Z[J.type].maximum,"aria-valuetext":J.value?PF(J,N):P.empty,"aria-label":P[J.type],"aria-disabled":t,spellCheck:xe?!1:void 0,autoCapitalize:xe?"off":void 0,autoCorrect:xe?"off":void 0,[parseInt(k.version,10)>=17?"enterKeyHint":"enterkeyhint"]:xe?"next":void 0,children:J.value||J.placeholder,onInput:te,onPaste:X,onFocus:fe(ee),onDragOver:q,onMouseUp:L,inputMode:J.contentType==="letter"?"text":"numeric"},before:{children:J.startSeparator},after:{children:J.endSeparator}}}),[g.sections,fe,X,q,te,ne,L,t,n,re,P,N,Z,v]),G=Ae(J=>{T(J.target.value)}),se=k.useMemo(()=>S?"":d.getV7HiddenInputValueFromSections(g.sections),[S,g.sections,d]);return k.useEffect(()=>{if(F.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
|
|
213
|
-
`));c&&F.current&&F.current.getSectionContent(w.startIndex).focus()},[]),{interactions:D,returnedValue:{autoFocus:c,readOnly:n,focused:u??M,sectionListRef:B,onBlur:K,onClick:z,onFocus:_,onInput:U,onPaste:j,enableAccessibleFieldDOMStructure:!0,elements:Q,tabIndex:b===0?-1:0,contentEditable:re,value:se,onChange:G,areAllSectionsEmpty:S}}},sa=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),w$=(e,t,n)=>{let r=0,o=n?1:0;const a=[];for(let s=0;s<e.length;s+=1){const i=e[s],l=Zp(i,n?"input-rtl":"input-ltr",t),u=`${i.startSeparator}${l}${i.endSeparator}`,c=sa(u).length,d=u.length,m=sa(l),f=o+(m===""?0:l.indexOf(m[0]))+i.startSeparator.length,h=f+m.length;a.push(H({},i,{start:r,end:r+c,startInInput:f,endInInput:h})),r+=c,o+=d}return a},_$=e=>{const t=Yn(),n=k.useRef(void 0),r=k.useRef(void 0),{forwardedProps:{onFocus:o,onClick:a,onPaste:s,onBlur:i,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:d=!1},parsedSelectedSections:m,activeSectionIndex:f,state:h,fieldValueManager:b,valueManager:g,applyCharacterEditing:x,resetCharacterQuery:E,updateSectionValue:C,updateValueFromValueStr:T,clearActiveSection:w,clearValue:S,setTempAndroidValueStr:O,setSelectedSections:F,getSectionsFromValue:B,areAllSectionsEmpty:P,localizedDigits:N}=e,v=k.useRef(null),M=nt(l,v),A=k.useMemo(()=>w$(h.sections,N,t),[h.sections,N,t]),D=k.useMemo(()=>({syncSelectionToDOM:()=>{if(!v.current)return;if(m==null){v.current.scrollLeft&&(v.current.scrollLeft=0);return}if(v.current!==gn(document))return;const te=v.current.scrollTop;if(m==="all")v.current.select();else{const Z=A[m],re=Z.type==="empty"?Z.startInInput-Z.startSeparator.length:Z.startInInput,Q=Z.type==="empty"?Z.endInInput+Z.endSeparator.length:Z.endInInput;(re!==v.current.selectionStart||Q!==v.current.selectionEnd)&&v.current===gn(document)&&v.current.setSelectionRange(re,Q),clearTimeout(r.current),r.current=setTimeout(()=>{v.current&&v.current===gn(document)&&v.current.selectionStart===v.current.selectionEnd&&(v.current.selectionStart!==re||v.current.selectionEnd!==Q)&&D.syncSelectionToDOM()})}v.current.scrollTop=te},getActiveSectionIndexFromDOM:()=>{const te=v.current.selectionStart??0,Z=v.current.selectionEnd??0;if(te===0&&Z===0)return null;const re=te<=A[0].startInInput?1:A.findIndex(Q=>Q.startInInput-Q.startSeparator.length>te);return re===-1?A.length-1:re-1},focusField:(te=0)=>{gn(document)!==v.current&&(v.current?.focus(),F(te))},setSelectedSections:te=>F(te),isFieldFocused:()=>v.current===gn(document)}),[v,m,A,F]),R=()=>{const te=v.current.selectionStart??0;let Z;te<=A[0].startInInput||te>=A[A.length-1].endInInput?Z=1:Z=A.findIndex(Q=>Q.startInInput-Q.startSeparator.length>te);const re=Z===-1?A.length-1:Z-1;F(re)},z=Ae((...te)=>{o?.(...te);const Z=v.current;clearTimeout(n.current),n.current=setTimeout(()=>{!Z||Z!==v.current||f==null&&(Z.value.length&&Number(Z.selectionEnd)-Number(Z.selectionStart)===Z.value.length?F("all"):R())})}),U=Ae((te,...Z)=>{te.isDefaultPrevented()||(a?.(te,...Z),R())}),j=Ae(te=>{if(s?.(te),te.preventDefault(),c||d)return;const Z=te.clipboardData.getData("text");if(typeof m=="number"){const re=h.sections[m],Q=/^[a-zA-Z]+$/.test(Z),G=/^[0-9]+$/.test(Z),se=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Z);if(re.contentType==="letter"&&Q||re.contentType==="digit"&&G||re.contentType==="digit-with-letter"&&se){E(),C({activeSection:re,newSectionValue:Z,shouldGoToNextSection:!0});return}if(Q||G)return}E(),T(Z)}),_=Ae((...te)=>{i?.(...te),F(null)}),K=Ae(te=>{if(c)return;const Z=te.target.value;if(Z===""){E(),S();return}const re=te.nativeEvent.data,Q=re&&re.length>1,G=Q?re:Z,se=sa(G);if(m==="all"&&F(f),f==null||Q){T(Q?re:se);return}let J;if(m==="all"&&se.length===1)J=se;else{const ee=sa(b.getV6InputValueFromSections(A,N,t));let xe=-1,de=-1;for(let Te=0;Te<ee.length;Te+=1)xe===-1&&ee[Te]!==se[Te]&&(xe=Te),de===-1&&ee[ee.length-Te-1]!==se[se.length-Te-1]&&(de=Te);const be=A[f];if(xe<be.start||ee.length-de-1>be.end)return;const Pe=se.length-ee.length+be.end-sa(be.endSeparator||"").length;J=se.slice(be.start+sa(be.startSeparator||"").length,Pe)}if(J.length===0){AF()&&O(G),E(),w();return}x({keyPressed:J,sectionIndex:f})}),ne=k.useMemo(()=>u!==void 0?u:b.getV6InputValueFromSections(B(g.emptyValue),N,t),[u,b,B,g.emptyValue,N,t]),L=k.useMemo(()=>h.tempValueStrAndroid??b.getV6InputValueFromSections(h.sections,N,t),[h.sections,b,h.tempValueStrAndroid,N,t]);k.useEffect(()=>(v.current&&v.current===gn(document)&&F("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const fe=k.useMemo(()=>f==null||h.sections[f].contentType==="letter"?"text":"numeric",[f,h.sections]),q=!(v.current&&v.current===gn(document))&&P;return{interactions:D,returnedValue:{readOnly:c,onBlur:_,onClick:U,onFocus:z,onPaste:j,inputRef:M,enableAccessibleFieldDOMStructure:!1,placeholder:ne,inputMode:fe,autoComplete:"off",value:q?"":L,onChange:K}}},I$=e=>{const t=_t(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:a=!1,disabled:s=!1,readOnly:i=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:d},fieldValueManager:m,valueManager:f,validator:h}=e,b=Yn(),g=v$(e),{state:x,activeSectionIndex:E,parsedSelectedSections:C,setSelectedSections:T,clearValue:w,clearActiveSection:S,updateSectionValue:O,setTempAndroidValueStr:F,sectionsValueBoundaries:B,localizedDigits:P,timezone:N}=g,v=S$({sections:x.sections,updateSectionValue:O,sectionsValueBoundaries:B,localizedDigits:P,setTempAndroidValueStr:F,timezone:N}),{resetCharacterQuery:M}=v,A=f.areValuesEqual(t,x.value,f.emptyValue),D=a?k$:_$,R=k.useMemo(()=>DF(x.sections,b&&!a),[x.sections,b,a]),{returnedValue:z,interactions:U}=D(H({},e,g,v,{areAllSectionsEmpty:A,sectionOrder:R})),j=Ae(X=>{if(l?.(X),!s)switch(!0){case((X.ctrlKey||X.metaKey)&&String.fromCharCode(X.keyCode)==="A"&&!X.shiftKey&&!X.altKey):{X.preventDefault(),T("all");break}case X.key==="ArrowRight":{if(X.preventDefault(),C==null)T(R.startIndex);else if(C==="all")T(R.endIndex);else{const q=R.neighbors[C].rightIndex;q!==null&&T(q)}break}case X.key==="ArrowLeft":{if(X.preventDefault(),C==null)T(R.endIndex);else if(C==="all")T(R.startIndex);else{const q=R.neighbors[C].leftIndex;q!==null&&T(q)}break}case X.key==="Delete":{if(X.preventDefault(),i)break;C==null||C==="all"?w():S(),M();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(X.key):{if(X.preventDefault(),i||E==null)break;C==="all"&&T(E);const q=x.sections[E],te=m.getActiveDateManager(t,x,q),Z=vF(t,N,q,X.key,B,P,te.date,{minutesStep:o});O({activeSection:q,newSectionValue:Z,shouldGoToNextSection:!1});break}}});Vt(()=>{U.syncSelectionToDOM()});const{hasValidationError:_}=Tx({props:n,validator:h,timezone:N,value:x.value,onError:n.onError}),K=k.useMemo(()=>u!==void 0?u:_,[_,u]);k.useEffect(()=>{!K&&E==null&&M()},[x.referenceValue,E,K]),k.useEffect(()=>{x.tempValueStrAndroid!=null&&E!=null&&(M(),S())},[x.sections]),k.useImperativeHandle(r,()=>({getSections:()=>x.sections,getActiveSectionIndex:U.getActiveSectionIndexFromDOM,setSelectedSections:U.setSelectedSections,focusField:U.focusField,isFieldFocused:U.isFieldFocused}));const ne=Ae((X,...q)=>{X.preventDefault(),d?.(X,...q),w(),U.isFieldFocused()?T(R.startIndex):U.focusField(0)}),L={onKeyDown:j,onClear:ne,error:K,clearable:!!(c&&!A&&!i&&!s)},fe={disabled:s,readOnly:i};return H({},e.forwardedProps,L,fe,z)},A$=["clearable","onClear","InputProps","sx","slots","slotProps"],D$=["ownerState"],P$=e=>{const t=Hr(),{clearable:n,onClear:r,InputProps:o,sx:a,slots:s,slotProps:i}=e,l=je(e,A$),u=s?.clearButton??yr,c=tt({elementType:u,externalSlotProps:i?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=je(c,D$),m=s?.clearIcon??h$,f=tt({elementType:m,externalSlotProps:i?.clearIcon,ownerState:{}});return H({},l,{InputProps:H({},o,{endAdornment:p.jsxs(k.Fragment,{children:[n&&p.jsx(Sx,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:p.jsx(u,H({},d,{onClick:r,children:p.jsx(m,H({fontSize:"small"},f))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})},R$=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],M$=(e,t)=>k.useMemo(()=>{const n=H({},e),r={},o=a=>{n.hasOwnProperty(a)&&(r[a]=n[a],delete n[a])};return R$.forEach(o),Ex.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),N$=e=>{const t=_t(),n=bi();return H({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Wn(t,e.minDate,n.minDate),maxDate:Wn(t,e.maxDate,n.maxDate)})},O$=e=>{const t=N$(e),{forwardedProps:n,internalProps:r}=M$(t,"date");return I$({forwardedProps:n,internalProps:r,valueManager:xr,fieldValueManager:NF,validator:yi,valueType:"date"})};function L$(e){return Fe("MuiPickersTextField",e)}Re("MuiPickersTextField",["root","focused","disabled","error","required"]);function F$(e){return Fe("MuiPickersInputBase",e)}const ha=Re("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function $$(e){return Fe("MuiPickersSectionList",e)}const us=Re("MuiPickersSectionList",["root","section","sectionContent"]),B$=["slots","slotProps","elements","sectionListRef"],Mx=ae("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Nx=ae("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Ox=ae("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Lx=ae("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),j$=e=>{const{classes:t}=e;return Le({root:["root"],section:["section"],sectionContent:["sectionContent"]},$$,t)};function H$(e){const{slots:t,slotProps:n,element:r,classes:o}=e,a=t?.section??Nx,s=tt({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),i=t?.sectionContent??Lx,l=tt({elementType:i,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Ox,c=tt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=tt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return p.jsxs(a,H({},s,{children:[p.jsx(u,H({},c)),p.jsx(i,H({},l)),p.jsx(u,H({},d))]}))}const U$=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:a,elements:s,sectionListRef:i}=r,l=je(r,B$),u=j$(r),c=k.useRef(null),d=nt(n,c),m=b=>{if(!c.current)throw new Error(`MUI X: Cannot call sectionListRef.${b} before the mount of the component.`);return c.current};k.useImperativeHandle(i,()=>({getRoot(){return m("getRoot")},getSectionContainer(b){return m("getSectionContainer").querySelector(`.${us.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return m("getSectionContent").querySelector(`.${us.section}[data-sectionindex="${b}"] .${us.sectionContent}`)},getSectionIndexFromDOMElement(b){const g=m("getSectionIndexFromDOMElement");if(b==null||!g.contains(b))return null;let x=null;return b.classList.contains(us.section)?x=b:b.classList.contains(us.sectionContent)&&(x=b.parentElement),x==null?null:Number(x.dataset.sectionindex)}}));const f=o?.root??Mx,h=tt({elementType:f,externalSlotProps:a?.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return p.jsx(f,H({},h,{children:h.contentEditable?s.map(({content:b,before:g,after:x})=>`${g.children}${b.children}${x.children}`).join(""):p.jsx(k.Fragment,{children:s.map((b,g)=>p.jsx(H$,{slots:o,slotProps:a,element:b,classes:u},g))})}))}),z$=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],V$=e=>Math.round(e*1e5)/1e5,Pu=ae("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>H({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${V$(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),nf=ae(Mx,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),W$=ae(Nx,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),q$=ae(Lx,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Y$=ae(Ox,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),G$=ae("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(H({},lF)),K$=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:a,readOnly:s,color:i,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",a&&"fullWidth",`color${ke(i)}`,l==="small"&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Le(d,F$,o)},rf=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:a,value:s,onChange:i,id:l,endAdornment:u,startAdornment:c,renderSuffix:d,slots:m,slotProps:f,contentEditable:h,tabIndex:b,onInput:g,onPaste:x,onKeyDown:E,name:C,readOnly:T,inputProps:w,inputRef:S,sectionListRef:O}=r,F=je(r,z$),B=k.useRef(null),P=nt(n,B),N=nt(w?.ref,S),v=Yn(),M=Qn();if(!M)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const A=_=>{if(M.disabled){_.stopPropagation();return}M.onFocus?.(_)};k.useEffect(()=>{M&&M.setAdornedStart(!!c)},[M,c]),k.useEffect(()=>{M&&(a?M.onEmpty():M.onFilled())},[M,a]);const D=H({},r,M,{isRtl:v}),R=K$(D),z=m?.root||Pu,U=tt({elementType:z,externalSlotProps:f?.root,externalForwardedProps:F,additionalProps:{"aria-invalid":M.error,ref:P},className:R.root,ownerState:D}),j=m?.input||nf;return p.jsxs(z,H({},U,{children:[c,p.jsx(U$,{sectionListRef:O,elements:o,contentEditable:h,tabIndex:b,className:R.sectionsContainer,onFocus:A,onBlur:M.onBlur,onInput:g,onPaste:x,onKeyDown:E,slots:{root:j,section:W$,sectionContent:q$,sectionSeparator:Y$},slotProps:{root:{ownerState:D},sectionContent:{className:ha.sectionContent},sectionSeparator:({position:_})=>({className:_==="before"?ha.sectionBefore:ha.sectionAfter})}}),u,d?d(H({},M)):null,p.jsx(G$,H({name:C,className:R.input,value:s,onChange:i,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:T,required:M.required,disabled:M.disabled},w,{ref:N}))]}))});function Q$(e){return Fe("MuiPickersOutlinedInput",e)}const Jn=H({},ha,Re("MuiPickersOutlinedInput",["root","notchedOutline","input"])),X$=["children","className","label","notched","shrink"],Z$=ae("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Xg=ae("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),J$=ae("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function eB(e){const{className:t,label:n}=e,r=je(e,X$),o=n!=null&&n!=="",a=H({},e,{withLabel:o});return p.jsx(Z$,H({"aria-hidden":!0,className:t},r,{ownerState:a,children:p.jsx(J$,{ownerState:a,children:o?p.jsx(Xg,{children:n}):p.jsx(Xg,{className:"notranslate",children:""})})}))}const tB=["label","autoFocus","ownerState","notched"],nB=ae(Pu,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Jn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Jn.focused} .${Jn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Jn.disabled}`]:{[`& .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Jn.error} .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${Jn.focused}:not(.${Jn.error}) .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),rB=ae(nf,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),oB=e=>{const{classes:t}=e,r=Le({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Q$,t);return H({},t,r)},Fx=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:a,notched:s}=r,i=je(r,tB),l=Qn(),u=H({},r,a,l,{color:l?.color||"primary"}),c=oB(u);return p.jsx(rf,H({slots:{root:nB,input:rB},renderSuffix:d=>p.jsx(eB,{shrink:!!(s||d.adornedStart||d.focused||d.filled),notched:!!(s||d.adornedStart||d.focused||d.filled),className:c.notchedOutline,label:o!=null&&o!==""&&l?.required?p.jsxs(k.Fragment,{children:[o," ","*"]}):o,ownerState:u})},i,{label:o,classes:c,ref:n}))});Fx.muiName="Input";function aB(e){return Fe("MuiPickersFilledInput",e)}const fo=H({},ha,Re("MuiPickersFilledInput",["root","underline","input"])),sB=["label","autoFocus","disableUnderline","ownerState"],iB=ae(Pu,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ut.shouldForwardProp(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fo.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fo.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(s=>(e.vars??e).palette[s].main).map(s=>({props:{color:s,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fo.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fo.disabled}, .${fo.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fo.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),lB=ae(nf,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),uB=e=>{const{classes:t,disableUnderline:n}=e,o=Le({root:["root",!n&&"underline"],input:["input"]},aB,t);return H({},t,o)},$x=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:a=!1,ownerState:s}=r,i=je(r,sB),l=Qn(),u=H({},r,s,l,{color:l?.color||"primary"}),c=uB(u);return p.jsx(rf,H({slots:{root:iB,input:lB},slotProps:{root:{disableUnderline:a}}},i,{label:o,classes:c,ref:n}))});$x.muiName="Input";function cB(e){return Fe("MuiPickersFilledInput",e)}const cs=H({},ha,Re("MuiPickersInput",["root","input"])),dB=["label","autoFocus","disableUnderline","ownerState"],pB=ae(Pu,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${cs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${cs.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${cs.disabled}, .${cs.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${cs.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),fB=e=>{const{classes:t,disableUnderline:n}=e,o=Le({root:["root",!n&&"underline"],input:["input"]},cB,t);return H({},t,o)},Bx=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:a=!1,ownerState:s}=r,i=je(r,dB),l=Qn(),u=H({},r,s,l,{disableUnderline:a,color:l?.color||"primary"}),c=fB(u);return p.jsx(rf,H({slots:{root:pB}},i,{label:o,classes:c,ref:n}))});Bx.muiName="Input";const mB=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],hB={standard:Bx,filled:$x,outlined:Fx},gB=ae(Hl,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),bB=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Le({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},L$,r)},yB=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:a,className:s,color:i="primary",disabled:l=!1,error:u=!1,variant:c="outlined",required:d=!1,InputProps:m,inputProps:f,inputRef:h,sectionListRef:b,elements:g,areAllSectionsEmpty:x,onClick:E,onKeyDown:C,onKeyUp:T,onPaste:w,onInput:S,endAdornment:O,startAdornment:F,tabIndex:B,contentEditable:P,focused:N,value:v,onChange:M,fullWidth:A,id:D,name:R,helperText:z,FormHelperTextProps:U,label:j,InputLabelProps:_}=r,K=je(r,mB),ne=k.useRef(null),L=nt(n,ne),fe=nr(D),X=z&&fe?`${fe}-helper-text`:void 0,q=j&&fe?`${fe}-label`:void 0,te=H({},r,{color:i,disabled:l,error:u,focused:N,required:d,variant:c}),Z=bB(te),re=hB[c];return p.jsxs(gB,H({className:De(Z.root,s),ref:L,focused:N,onFocus:o,onBlur:a,disabled:l,variant:c,error:u,color:i,fullWidth:A,required:d,ownerState:te},K,{children:[p.jsx(Ul,H({htmlFor:fe,id:q},_,{children:j})),p.jsx(re,H({elements:g,areAllSectionsEmpty:x,onClick:E,onKeyDown:C,onKeyUp:T,onInput:S,onPaste:w,endAdornment:O,startAdornment:F,tabIndex:B,contentEditable:P,value:v,onChange:M,id:fe,fullWidth:A,inputProps:f,inputRef:h,sectionListRef:b,label:j,name:R,role:"group","aria-labelledby":q,"aria-describedby":X,"aria-live":X?"polite":void 0},m)),z&&p.jsx(lx,H({id:X},U,{children:z}))]}))}),xB=["enableAccessibleFieldDOMStructure"],CB=["InputProps","readOnly"],EB=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],vB=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=je(e,xB);if(t){const{InputProps:d,readOnly:m}=n,f=je(n,CB);return H({},f,{InputProps:H({},d??{},{readOnly:m})})}const{onPaste:r,onKeyDown:o,inputMode:a,readOnly:s,InputProps:i,inputProps:l,inputRef:u}=n,c=je(n,EB);return H({},c,{InputProps:H({},i??{},{readOnly:s}),inputProps:H({},l??{},{inputMode:a,onPaste:r,onKeyDown:o,ref:u})})},TB=["slots","slotProps","InputProps","inputProps"],jx=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiDateField"}),{slots:o,slotProps:a,InputProps:s,inputProps:i}=r,l=je(r,TB),u=r,c=o?.textField??(t.enableAccessibleFieldDOMStructure?yB:Rt),d=tt({elementType:c,externalSlotProps:a?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});d.inputProps=H({},i,d.inputProps),d.InputProps=H({},s,d.InputProps);const m=O$(d),f=vB(m),h=P$(H({},f,{slots:o,slotProps:a}));return p.jsx(c,H({},h))}),Hx=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:s,timezone:i})=>{const l=Uo();return k.useCallback(u=>yi({adapter:l,value:u,timezone:i,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:s}})!==null,[l,e,t,n,r,o,a,s,i])},SB=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return H({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const a=o.newTimezone;if(n.getTimezone(r.currentMonth)===a)return r;let s=n.setTimezone(r.currentMonth,a);return n.getMonth(s)!==n.getMonth(r.currentMonth)&&(s=n.setMonth(s,n.getMonth(r.currentMonth))),H({},r,{currentMonth:s})}case"finishMonthSwitchingAnimation":return H({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const a=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return H({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:a&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:a?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},kB=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:i,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:d}=e,m=_t(),f=k.useRef(SB(!!u,a,m)).current,h=k.useMemo(()=>xr.getInitialReferenceValue({value:t,utils:m,timezone:d,props:e,referenceDate:n,granularity:fr.day}),[n,d]),[b,g]=k.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:h,currentMonth:m.startOfMonth(h),slideDirection:"left"});k.useEffect(()=>{g({type:"changeMonthTimezone",newTimezone:m.getTimezone(h)})},[h,m]);const x=k.useCallback(S=>{g(H({type:"changeMonth"},S)),l&&l(S.newMonth)},[l]),E=k.useCallback(S=>{const O=S;m.isSameMonth(O,b.currentMonth)||x({newMonth:m.startOfMonth(O),direction:m.isAfterDay(O,b.currentMonth)?"left":"right"})},[b.currentMonth,x,m]),C=Hx({shouldDisableDate:c,minDate:i,maxDate:s,disableFuture:r,disablePast:o,timezone:d}),T=k.useCallback(()=>{g({type:"finishMonthSwitchingAnimation"})},[]),w=Ae((S,O)=>{C(S)||g({type:"changeFocusedDay",focusedDay:S,withoutMonthSwitchingAnimation:O})});return{referenceDate:h,calendarState:b,changeMonth:E,changeFocusedDay:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:T,handleChangeMonth:x}},wB=e=>Fe("MuiPickersFadeTransitionGroup",e);Re("MuiPickersFadeTransitionGroup",["root"]);const _B=e=>{const{classes:t}=e;return Le({root:["root"]},wB,t)},IB=ae(gi,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Ux(e){const t=St({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,s=_B(t),i=no();return o?n:p.jsx(IB,{className:De(s.root,r),children:p.jsx(Oo,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:i.transitions.duration.enteringScreen,enter:i.transitions.duration.enteringScreen,exit:0},children:n},a)})}function AB(e){return Fe("MuiPickersDay",e)}const mo=Re("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),DB=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],PB=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:a,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:i,classes:l}=e,u=s&&!i;return Le({root:["root",t&&!u&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",s&&i&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},AB,l)},zx=({theme:e})=>H({},e.typography.caption,{width:Ks,height:Ks,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ut.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${mo.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${mo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${mo.disabled}:not(.${mo.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${mo.disabled}&.${mo.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Au}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${mo.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Vx=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},RB=ae(No,{name:"MuiPickersDay",slot:"Root",overridesResolver:Vx})(zx),MB=ae("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Vx})(({theme:e})=>H({},zx({theme:e}),{opacity:0,pointerEvents:"none"})),ds=()=>{},NB=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:a,day:s,disabled:i=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:c,onClick:d,onDaySelect:m,onFocus:f=ds,onBlur:h=ds,onKeyDown:b=ds,onMouseDown:g=ds,onMouseEnter:x=ds,outsideCurrentMonth:E,selected:C=!1,showDaysOutsideCurrentMonth:T=!1,children:w,today:S=!1}=r,O=je(r,DB),F=H({},r,{autoFocus:o,disabled:i,disableHighlightToday:l,disableMargin:u,selected:C,showDaysOutsideCurrentMonth:T,today:S}),B=PB(F),P=_t(),N=k.useRef(null),v=nt(N,n);Vt(()=>{o&&!i&&!c&&!E&&N.current.focus()},[o,i,c,E]);const M=D=>{g(D),E&&D.preventDefault()},A=D=>{i||m(s),E&&D.currentTarget.focus(),d&&d(D)};return E&&!T?p.jsx(MB,{className:De(B.root,B.hiddenDaySpacingFiller,a),ownerState:F,role:O.role}):p.jsx(RB,H({className:De(B.root,a),ref:v,centerRipple:!0,disabled:i,tabIndex:C?0:-1,onKeyDown:D=>b(D,s),onFocus:D=>f(D,s),onBlur:D=>h(D,s),onMouseEnter:D=>x(D,s),onClick:A,onMouseDown:M},O,{ownerState:F,children:w||P.format(s,"dayOfMonth")}))}),OB=k.memo(NB),LB=e=>Fe("MuiPickersSlideTransition",e),Mn=Re("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),FB=["children","className","reduceAnimations","slideDirection","transKey","classes"],$B=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Le(r,LB,t)},BB=ae(gi,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Mn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Mn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Mn.slideEnterActive}`]:t.slideEnterActive},{[`.${Mn.slideExit}`]:t.slideExit},{[`.${Mn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Mn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Mn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Mn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Mn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Mn.slideExit}`]:{transform:"translate(0%)"},[`& .${Mn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Mn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function jB(e){const t=St({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,s=je(t,FB),i=$B(t),l=no();if(o)return p.jsx("div",{className:De(i.root,r),children:n});const u={exit:i.exit,enterActive:i.enterActive,enter:i.enter,exitActive:i.exitActive};return p.jsx(BB,{className:De(i.root,r),childFactory:c=>k.cloneElement(c,{classNames:u}),role:"presentation",children:p.jsx(Bp,H({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},s,{children:n}),a)})}const HB=e=>Fe("MuiDayCalendar",e);Re("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const UB=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],zB=["ownerState"],VB=e=>{const{classes:t}=e;return Le({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},HB,t)},Wx=(Ks+Au*2)*6,WB=ae("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),qB=ae("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),YB=ae(Cn,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),GB=ae(Cn,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),KB=ae(Cn,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>H({},e.typography.caption,{width:Ks,height:Ks,padding:0,margin:`0 ${Au}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),QB=ae("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Wx}),XB=ae(jB,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Wx}),ZB=ae("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),JB=ae("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Au}px 0`,display:"flex",justifyContent:"center"});function ej(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:a,currentMonthNumber:s,isViewFocused:i}=e,l=je(e,UB);const{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:m,slots:f,slotProps:h,timezone:b}=t,g=_t(),x=Iu(b),E=r!==null&&g.isSameDay(n,r),C=o.some(v=>g.isSameDay(v,n)),T=g.isSameDay(n,x),w=f?.day??OB,S=tt({elementType:w,externalSlotProps:h?.day,additionalProps:H({disableHighlightToday:c,showDaysOutsideCurrentMonth:m,role:"gridcell",isAnimating:d,"data-timestamp":g.toJsDate(n).valueOf()},l),ownerState:H({},t,{day:n,selected:C})}),O=je(S,zB),F=k.useMemo(()=>u||a(n),[u,a,n]),B=k.useMemo(()=>g.getMonth(n)!==s,[g,n,s]),P=k.useMemo(()=>{const v=g.startOfMonth(g.setMonth(n,s));return m?g.isSameDay(n,g.startOfWeek(v)):g.isSameDay(n,v)},[s,n,m,g]),N=k.useMemo(()=>{const v=g.endOfMonth(g.setMonth(n,s));return m?g.isSameDay(n,g.endOfWeek(v)):g.isSameDay(n,v)},[s,n,m,g]);return p.jsx(w,H({},O,{day:n,disabled:F,autoFocus:i&&E,today:T,outsideCurrentMonth:B,isFirstVisibleCell:P,isLastVisibleCell:N,selected:C,tabIndex:E?0:-1,"aria-selected":C,"aria-current":T?"date":void 0}))}function tj(e){const t=St({props:e,name:"MuiDayCalendar"}),n=_t(),{onFocusedDayChange:r,className:o,currentMonth:a,selectedDays:s,focusedDay:i,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:c,readOnly:d,reduceAnimations:m,renderLoading:f=()=>p.jsx("span",{children:"..."}),slideDirection:h,TransitionProps:b,disablePast:g,disableFuture:x,minDate:E,maxDate:C,shouldDisableDate:T,shouldDisableMonth:w,shouldDisableYear:S,dayOfWeekFormatter:O=de=>n.format(de,"weekdayShort").charAt(0).toUpperCase(),hasFocus:F,onFocusedViewChange:B,gridLabelId:P,displayWeekNumber:N,fixedWeekNumber:v,autoFocus:M,timezone:A}=t,D=Iu(A),R=VB(t),z=Yn(),U=Hx({shouldDisableDate:T,shouldDisableMonth:w,shouldDisableYear:S,minDate:E,maxDate:C,disablePast:g,disableFuture:x,timezone:A}),j=Hr(),[_,K]=_n({name:"DayCalendar",state:"hasFocus",controlled:F,default:M??!1}),[ne,L]=k.useState(()=>i||D),fe=Ae(de=>{d||u(de)}),X=de=>{U(de)||(r(de),L(de),B?.(!0),K(!0))},q=Ae((de,be)=>{switch(de.key){case"ArrowUp":X(n.addDays(be,-7)),de.preventDefault();break;case"ArrowDown":X(n.addDays(be,7)),de.preventDefault();break;case"ArrowLeft":{const le=n.addDays(be,z?1:-1),Pe=n.addMonths(be,z?1:-1),Te=Ns({utils:n,date:le,minDate:z?le:n.startOfMonth(Pe),maxDate:z?n.endOfMonth(Pe):le,isDateDisabled:U,timezone:A});X(Te||le),de.preventDefault();break}case"ArrowRight":{const le=n.addDays(be,z?-1:1),Pe=n.addMonths(be,z?-1:1),Te=Ns({utils:n,date:le,minDate:z?n.startOfMonth(Pe):le,maxDate:z?le:n.endOfMonth(Pe),isDateDisabled:U,timezone:A});X(Te||le),de.preventDefault();break}case"Home":X(n.startOfWeek(be)),de.preventDefault();break;case"End":X(n.endOfWeek(be)),de.preventDefault();break;case"PageUp":X(n.addMonths(be,1)),de.preventDefault();break;case"PageDown":X(n.addMonths(be,-1)),de.preventDefault();break}}),te=Ae((de,be)=>X(be)),Z=Ae((de,be)=>{_&&n.isSameDay(ne,be)&&B?.(!1)}),re=n.getMonth(a),Q=n.getYear(a),G=k.useMemo(()=>s.filter(de=>!!de).map(de=>n.startOfDay(de)),[n,s]),se=`${Q}-${re}`,J=k.useMemo(()=>k.createRef(),[se]),ee=k.useMemo(()=>{const de=n.startOfMonth(a),be=n.endOfMonth(a);return U(ne)||n.isAfterDay(ne,be)||n.isBeforeDay(ne,de)?Ns({utils:n,date:ne,minDate:de,maxDate:be,disablePast:g,disableFuture:x,isDateDisabled:U,timezone:A}):ne},[a,x,g,ne,U,n,A]),xe=k.useMemo(()=>{const de=n.getWeekArray(a);let be=n.addMonths(a,1);for(;v&&de.length<v;){const le=n.getWeekArray(be),Pe=n.isSameDay(de[de.length-1][0],le[0][0]);le.slice(Pe?1:0).forEach(Te=>{de.length<v&&de.push(Te)}),be=n.addMonths(be,1)}return de},[a,v,n]);return p.jsxs(WB,{role:"grid","aria-labelledby":P,className:R.root,children:[p.jsxs(qB,{role:"row",className:R.header,children:[N&&p.jsx(GB,{variant:"caption",role:"columnheader","aria-label":j.calendarWeekNumberHeaderLabel,className:R.weekNumberLabel,children:j.calendarWeekNumberHeaderText}),fF(n,D).map((de,be)=>p.jsx(YB,{variant:"caption",role:"columnheader","aria-label":n.format(de,"weekday"),className:R.weekDayLabel,children:O(de)},be.toString()))]}),l?p.jsx(QB,{className:R.loadingContainer,children:f()}):p.jsx(XB,H({transKey:se,onExited:c,reduceAnimations:m,slideDirection:h,className:De(o,R.slideTransition)},b,{nodeRef:J,children:p.jsx(ZB,{ref:J,role:"rowgroup",className:R.monthContainer,children:xe.map((de,be)=>p.jsxs(JB,{role:"row",className:R.weekContainer,"aria-rowindex":be+1,children:[N&&p.jsx(KB,{className:R.weekNumber,role:"rowheader","aria-label":j.calendarWeekNumberAriaLabelText(n.getWeekNumber(de[0])),children:j.calendarWeekNumberText(n.getWeekNumber(de[0]))}),de.map((le,Pe)=>p.jsx(ej,{parentProps:t,day:le,selectedDays:G,focusableDay:ee,onKeyDown:q,onFocus:te,onBlur:Z,onDaySelect:fe,isDateDisabled:U,currentMonthNumber:re,isViewFocused:_,"aria-colindex":Pe+1},le.toString()))]},`week-${de[0]}`))})}))]})}function nj(e){return Fe("MuiPickersMonth",e)}const ji=Re("MuiPickersMonth",["root","monthButton","disabled","selected"]),rj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],oj=e=>{const{disabled:t,selected:n,classes:r}=e;return Le({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},nj,r)},aj=ae("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),sj=ae("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${ji.disabled}`]:t.disabled},{[`&.${ji.selected}`]:t.selected}]})(({theme:e})=>H({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ji.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ji.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),ij=k.memo(function(t){const n=St({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:a,disabled:s,selected:i,value:l,tabIndex:u,onClick:c,onKeyDown:d,onFocus:m,onBlur:f,"aria-current":h,"aria-label":b,slots:g,slotProps:x}=n,E=je(n,rj),C=k.useRef(null),T=oj(n);Vt(()=>{r&&C.current?.focus()},[r]);const w=g?.monthButton??sj,S=tt({elementType:w,externalSlotProps:x?.monthButton,additionalProps:{children:a,disabled:s,tabIndex:u,ref:C,type:"button",role:"radio","aria-current":h,"aria-checked":i,"aria-label":b,onClick:O=>c(O,l),onKeyDown:O=>d(O,l),onFocus:O=>m(O,l),onBlur:O=>f(O,l)},ownerState:n,className:T.monthButton});return p.jsx(aj,H({className:De(T.root,o),ownerState:n},E,{children:p.jsx(w,H({},S))}))});function lj(e){return Fe("MuiMonthCalendar",e)}Re("MuiMonthCalendar",["root"]);const uj=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],cj=e=>{const{classes:t}=e;return Le({root:["root"]},lj,t)};function dj(e,t){const n=_t(),r=bi(),o=St({props:e,name:t});return H({disableFuture:!1,disablePast:!1},o,{minDate:Wn(n,o.minDate,r.minDate),maxDate:Wn(n,o.maxDate,r.maxDate)})}const pj=ae("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Du,boxSizing:"border-box"}),fj=k.forwardRef(function(t,n){const r=dj(t,"MuiMonthCalendar"),{className:o,value:a,defaultValue:s,referenceDate:i,disabled:l,disableFuture:u,disablePast:c,maxDate:d,minDate:m,onChange:f,shouldDisableMonth:h,readOnly:b,autoFocus:g=!1,onMonthFocus:x,hasFocus:E,onFocusedViewChange:C,monthsPerRow:T=3,timezone:w,gridLabelId:S,slots:O,slotProps:F}=r,B=je(r,uj),{value:P,handleValueChange:N,timezone:v}=ef({name:"MonthCalendar",timezone:w,value:a,defaultValue:s,referenceDate:i,onChange:f,valueManager:xr}),M=Iu(v),A=Yn(),D=_t(),R=k.useMemo(()=>xr.getInitialReferenceValue({value:P,utils:D,props:r,timezone:v,referenceDate:i,granularity:fr.month}),[]),z=r,U=cj(z),j=k.useMemo(()=>D.getMonth(M),[D,M]),_=k.useMemo(()=>P!=null?D.getMonth(P):null,[P,D]),[K,ne]=k.useState(()=>_||D.getMonth(R)),[L,fe]=_n({name:"MonthCalendar",state:"hasFocus",controlled:E,default:g??!1}),X=Ae(se=>{fe(se),C&&C(se)}),q=k.useCallback(se=>{const J=D.startOfMonth(c&&D.isAfter(M,m)?M:m),ee=D.startOfMonth(u&&D.isBefore(M,d)?M:d),xe=D.startOfMonth(se);return D.isBefore(xe,J)||D.isAfter(xe,ee)?!0:h?h(xe):!1},[u,c,d,m,M,h,D]),te=Ae((se,J)=>{if(b)return;const ee=D.setMonth(P??R,J);N(ee)}),Z=Ae(se=>{q(D.setMonth(P??R,se))||(ne(se),X(!0),x&&x(se))});k.useEffect(()=>{ne(se=>_!==null&&se!==_?_:se)},[_]);const re=Ae((se,J)=>{switch(se.key){case"ArrowUp":Z((12+J-3)%12),se.preventDefault();break;case"ArrowDown":Z((12+J+3)%12),se.preventDefault();break;case"ArrowLeft":Z((12+J+(A?1:-1))%12),se.preventDefault();break;case"ArrowRight":Z((12+J+(A?-1:1))%12),se.preventDefault();break}}),Q=Ae((se,J)=>{Z(J)}),G=Ae((se,J)=>{K===J&&X(!1)});return p.jsx(pj,H({ref:n,className:De(U.root,o),ownerState:z,role:"radiogroup","aria-labelledby":S},B,{children:Kp(D,P??R).map(se=>{const J=D.getMonth(se),ee=D.format(se,"monthShort"),xe=D.format(se,"month"),de=J===_,be=l||q(se);return p.jsx(ij,{selected:de,value:J,onClick:te,onKeyDown:re,autoFocus:L&&J===K,disabled:be,tabIndex:J===K&&!be?0:-1,onFocus:Q,onBlur:G,"aria-current":j===J?"date":void 0,"aria-label":xe,monthsPerRow:T,slots:O,slotProps:F,children:ee},ee)})}))});function mj(e){return Fe("MuiPickersYear",e)}const Hi=Re("MuiPickersYear",["root","yearButton","selected","disabled"]),hj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],gj=e=>{const{disabled:t,selected:n,classes:r}=e;return Le({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},mj,r)},bj=ae("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),yj=ae("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Hi.disabled}`]:t.disabled},{[`&.${Hi.selected}`]:t.selected}]})(({theme:e})=>H({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Hi.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Hi.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),xj=k.memo(function(t){const n=St({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:a,disabled:s,selected:i,value:l,tabIndex:u,onClick:c,onKeyDown:d,onFocus:m,onBlur:f,"aria-current":h,slots:b,slotProps:g}=n,x=je(n,hj),E=k.useRef(null),C=gj(n);Vt(()=>{r&&E.current?.focus()},[r]);const T=b?.yearButton??yj,w=tt({elementType:T,externalSlotProps:g?.yearButton,additionalProps:{children:a,disabled:s,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":h,"aria-checked":i,onClick:S=>c(S,l),onKeyDown:S=>d(S,l),onFocus:S=>m(S,l),onBlur:S=>f(S,l)},ownerState:n,className:C.yearButton});return p.jsx(bj,H({className:De(C.root,o),ownerState:n},x,{children:p.jsx(T,H({},w))}))});function Cj(e){return Fe("MuiYearCalendar",e)}Re("MuiYearCalendar",["root"]);const Ej=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],vj=e=>{const{classes:t}=e;return Le({root:["root"]},Cj,t)};function Tj(e,t){const n=_t(),r=bi(),o=St({props:e,name:t});return H({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Wn(n,o.minDate,r.minDate),maxDate:Wn(n,o.maxDate,r.maxDate)})}const Sj=ae("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Du,maxHeight:Q7,boxSizing:"border-box",position:"relative"}),kj=k.forwardRef(function(t,n){const r=Tj(t,"MuiYearCalendar"),{autoFocus:o,className:a,value:s,defaultValue:i,referenceDate:l,disabled:u,disableFuture:c,disablePast:d,maxDate:m,minDate:f,onChange:h,readOnly:b,shouldDisableYear:g,onYearFocus:x,hasFocus:E,onFocusedViewChange:C,yearsOrder:T="asc",yearsPerRow:w,timezone:S,gridLabelId:O,slots:F,slotProps:B}=r,P=je(r,Ej),{value:N,handleValueChange:v,timezone:M}=ef({name:"YearCalendar",timezone:S,value:s,defaultValue:i,referenceDate:l,onChange:h,valueManager:xr}),A=Iu(M),D=Yn(),R=_t(),z=k.useMemo(()=>xr.getInitialReferenceValue({value:N,utils:R,props:r,timezone:M,referenceDate:l,granularity:fr.year}),[]),U=r,j=vj(U),_=k.useMemo(()=>R.getYear(A),[R,A]),K=k.useMemo(()=>N!=null?R.getYear(N):null,[N,R]),[ne,L]=k.useState(()=>K||R.getYear(z)),[fe,X]=_n({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),q=Ae(le=>{X(le),C&&C(le)}),te=k.useCallback(le=>{if(d&&R.isBeforeYear(le,A)||c&&R.isAfterYear(le,A)||f&&R.isBeforeYear(le,f)||m&&R.isAfterYear(le,m))return!0;if(!g)return!1;const Pe=R.startOfYear(le);return g(Pe)},[c,d,m,f,A,g,R]),Z=Ae((le,Pe)=>{if(b)return;const Te=R.setYear(N??z,Pe);v(Te)}),re=Ae(le=>{te(R.setYear(N??z,le))||(L(le),q(!0),x?.(le))});k.useEffect(()=>{L(le=>K!==null&&le!==K?K:le)},[K]);const Q=T!=="desc"?w*1:w*-1,G=D&&T==="asc"||!D&&T==="desc"?-1:1,se=Ae((le,Pe)=>{switch(le.key){case"ArrowUp":re(Pe-Q),le.preventDefault();break;case"ArrowDown":re(Pe+Q),le.preventDefault();break;case"ArrowLeft":re(Pe-G),le.preventDefault();break;case"ArrowRight":re(Pe+G),le.preventDefault();break}}),J=Ae((le,Pe)=>{re(Pe)}),ee=Ae((le,Pe)=>{ne===Pe&&q(!1)}),xe=k.useRef(null),de=nt(n,xe);k.useEffect(()=>{if(o||xe.current===null)return;const le=xe.current.querySelector('[tabindex="0"]');if(!le)return;const Pe=le.offsetHeight,Te=le.offsetTop,ze=xe.current.clientHeight,we=xe.current.scrollTop,Et=Te+Pe;Pe>ze||Te<we||(xe.current.scrollTop=Et-ze/2-Pe/2)},[o]);const be=R.getYearRange([f,m]);return T==="desc"&&be.reverse(),p.jsx(Sj,H({ref:de,className:De(j.root,a),ownerState:U,role:"radiogroup","aria-labelledby":O},P,{children:be.map(le=>{const Pe=R.getYear(le),Te=Pe===K,ze=u||te(le);return p.jsx(xj,{selected:Te,value:Pe,onClick:Z,onKeyDown:se,autoFocus:fe&&Pe===ne,disabled:ze,tabIndex:Pe===ne&&!ze?0:-1,onFocus:J,onBlur:ee,"aria-current":_===Pe?"date":void 0,yearsPerRow:w,slots:F,slotProps:B,children:R.format(le,"year")},R.format(le,"year"))})}))}),wj=e=>Fe("MuiPickersCalendarHeader",e),_j=Re("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function Ij(e){return Fe("MuiPickersArrowSwitcher",e)}Re("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Aj=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],Dj=["ownerState"],Pj=["ownerState"],Rj=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Mj=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Zg=ae(yr,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Nj=e=>{const{classes:t}=e;return Le({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Ij,t)},Oj=k.forwardRef(function(t,n){const r=Yn(),o=St({props:t,name:"MuiPickersArrowSwitcher"}),{children:a,className:s,slots:i,slotProps:l,isNextDisabled:u,isNextHidden:c,onGoToNext:d,nextLabel:m,isPreviousDisabled:f,isPreviousHidden:h,onGoToPrevious:b,previousLabel:g,labelId:x}=o,E=je(o,Aj),C=o,T=Nj(C),w={isDisabled:u,isHidden:c,goTo:d,label:m},S={isDisabled:f,isHidden:h,goTo:b,label:g},O=i?.previousIconButton??Zg,F=tt({elementType:O,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:H({},C,{hidden:S.isHidden}),className:De(T.button,T.previousIconButton)}),B=i?.nextIconButton??Zg,P=tt({elementType:B,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:H({},C,{hidden:w.isHidden}),className:De(T.button,T.nextIconButton)}),N=i?.leftArrowIcon??p$,v=tt({elementType:N,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:T.leftArrowIcon}),M=je(v,Dj),A=i?.rightArrowIcon??f$,D=tt({elementType:A,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:T.rightArrowIcon}),R=je(D,Pj);return p.jsxs(Rj,H({ref:n,className:De(T.root,s),ownerState:C},E,{children:[p.jsx(O,H({},F,{children:r?p.jsx(A,H({},R)):p.jsx(N,H({},M))})),a?p.jsx(Cn,{variant:"subtitle1",component:"span",id:x,children:a}):p.jsx(Mj,{className:T.spacer,ownerState:C}),p.jsx(B,H({},P,{children:r?p.jsx(N,H({},M)):p.jsx(A,H({},R))}))]}))});function Lj(e,{disableFuture:t,maxDate:n,timezone:r}){const o=_t();return k.useMemo(()=>{const a=o.date(void 0,r),s=o.startOfMonth(t&&o.isBefore(a,n)?a:n);return!o.isAfter(s,e)},[t,n,e,o,r])}function Fj(e,{disablePast:t,minDate:n,timezone:r}){const o=_t();return k.useMemo(()=>{const a=o.date(void 0,r),s=o.startOfMonth(t&&o.isAfter(a,n)?a:n);return!o.isBefore(s,e)},[t,n,e,o,r])}const $j=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Bj=["ownerState"],jj=e=>{const{classes:t}=e;return Le({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},wj,t)},Hj=ae("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Uj=ae("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>H({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),zj=ae("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Vj=ae(yr,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${_j.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Wj=ae(d$,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),qj=k.forwardRef(function(t,n){const r=Hr(),o=_t(),a=St({props:t,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:i,currentMonth:l,disabled:u,disableFuture:c,disablePast:d,maxDate:m,minDate:f,onMonthChange:h,onViewChange:b,view:g,reduceAnimations:x,views:E,labelId:C,className:T,timezone:w,format:S=`${o.formats.month} ${o.formats.year}`}=a,O=je(a,$j),F=a,B=jj(a),P=s?.switchViewButton??Vj,N=tt({elementType:P,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(g)},ownerState:F,className:B.switchViewButton}),v=s?.switchViewIcon??Wj,M=tt({elementType:v,externalSlotProps:i?.switchViewIcon,ownerState:F,className:B.switchViewIcon}),A=je(M,Bj),D=()=>h(o.addMonths(l,1),"left"),R=()=>h(o.addMonths(l,-1),"right"),z=Lj(l,{disableFuture:c,maxDate:m,timezone:w}),U=Fj(l,{disablePast:d,minDate:f,timezone:w}),j=()=>{if(!(E.length===1||!b||u))if(E.length===2)b(E.find(K=>K!==g)||E[0]);else{const K=E.indexOf(g)!==0?0:1;b(E[K])}};if(E.length===1&&E[0]==="year")return null;const _=o.formatByString(l,S);return p.jsxs(Hj,H({},O,{ownerState:F,className:De(B.root,T),ref:n,children:[p.jsxs(Uj,{role:"presentation",onClick:j,ownerState:F,"aria-live":"polite",className:B.labelContainer,children:[p.jsx(Ux,{reduceAnimations:x,transKey:_,children:p.jsx(zj,{id:C,ownerState:F,className:B.label,children:_})}),E.length>1&&!u&&p.jsx(P,H({},N,{children:p.jsx(v,H({},A))}))]}),p.jsx(Oo,{in:g==="day",appear:!x,enter:!x,children:p.jsx(Oj,{slots:s,slotProps:i,onGoToPrevious:R,isPreviousDisabled:U,previousLabel:r.previousMonth,onGoToNext:D,isNextDisabled:z,nextLabel:r.nextMonth})})]}))}),Yj=ae("div")({overflow:"hidden",width:Du,maxHeight:tf,display:"flex",flexDirection:"column",margin:"0 auto"}),Gj=e=>Fe("MuiDateCalendar",e);Re("MuiDateCalendar",["root","viewTransitionContainer"]);const Kj=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Qj=e=>{const{classes:t}=e;return Le({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Gj,t)};function Xj(e,t){const n=_t(),r=bi(),o=kx(),a=St({props:e,name:t});return H({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??o,renderLoading:a.renderLoading??(()=>p.jsx("span",{children:"..."})),minDate:Wn(n,a.minDate,r.minDate),maxDate:Wn(n,a.maxDate,r.maxDate)})}const Zj=ae(Yj,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:tf}),Jj=ae(Ux,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),eH=k.forwardRef(function(t,n){const r=_t(),o=nr(),a=Xj(t,"MuiDateCalendar"),{autoFocus:s,onViewChange:i,value:l,defaultValue:u,referenceDate:c,disableFuture:d,disablePast:m,onChange:f,onYearChange:h,onMonthChange:b,reduceAnimations:g,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:C,view:T,views:w,openTo:S,className:O,disabled:F,readOnly:B,minDate:P,maxDate:N,disableHighlightToday:v,focusedView:M,onFocusedViewChange:A,showDaysOutsideCurrentMonth:D,fixedWeekNumber:R,dayOfWeekFormatter:z,slots:U,slotProps:j,loading:_,renderLoading:K,displayWeekNumber:ne,yearsOrder:L,yearsPerRow:fe,monthsPerRow:X,timezone:q}=a,te=je(a,Kj),{value:Z,handleValueChange:re,timezone:Q}=ef({name:"DateCalendar",timezone:q,value:l,defaultValue:u,referenceDate:c,onChange:f,valueManager:xr}),{view:G,setView:se,focusedView:J,setFocusedView:ee,goToNextView:xe,setValueAndGoToNextView:de}=wx({view:T,views:w,openTo:S,onChange:re,onViewChange:i,autoFocus:s,focusedView:M,onFocusedViewChange:A}),{referenceDate:be,calendarState:le,changeFocusedDay:Pe,changeMonth:Te,handleChangeMonth:ze,isDateDisabled:we,onMonthSwitchingAnimationEnd:Et}=kB({value:Z,referenceDate:c,reduceAnimations:g,onMonthChange:b,minDate:P,maxDate:N,shouldDisableDate:x,disablePast:m,disableFuture:d,timezone:Q}),st=F&&Z||P,qe=F&&Z||N,ue=`${o}-grid-label`,Ee=J!==null,Me=U?.calendarHeader??qj,He=tt({elementType:Me,externalSlotProps:j?.calendarHeader,additionalProps:{views:w,view:G,currentMonth:le.currentMonth,onViewChange:se,onMonthChange:(We,kt)=>ze({newMonth:We,direction:kt}),minDate:st,maxDate:qe,disabled:F,disablePast:m,disableFuture:d,reduceAnimations:g,timezone:Q,labelId:ue},ownerState:a}),Be=Ae(We=>{const kt=r.startOfMonth(We),Pt=r.endOfMonth(We),bt=we(We)?Ns({utils:r,date:We,minDate:r.isBefore(P,kt)?kt:P,maxDate:r.isAfter(N,Pt)?Pt:N,disablePast:m,disableFuture:d,isDateDisabled:we,timezone:Q}):We;bt?(de(bt,"finish"),b?.(kt)):(xe(),Te(kt)),Pe(bt,!0)}),Ne=Ae(We=>{const kt=r.startOfYear(We),Pt=r.endOfYear(We),bt=we(We)?Ns({utils:r,date:We,minDate:r.isBefore(P,kt)?kt:P,maxDate:r.isAfter(N,Pt)?Pt:N,disablePast:m,disableFuture:d,isDateDisabled:we,timezone:Q}):We;bt?(de(bt,"finish"),h?.(bt)):(xe(),Te(kt)),Pe(bt,!0)}),Ze=Ae(We=>re(We&&Vl(r,We,Z??be),"finish",G));k.useEffect(()=>{Z!=null&&r.isValid(Z)&&Te(Z)},[Z]);const ht=a,pt=Qj(ht),ie={disablePast:m,disableFuture:d,maxDate:N,minDate:P},ye={disableHighlightToday:v,readOnly:B,disabled:F,timezone:Q,gridLabelId:ue,slots:U,slotProps:j},ve=k.useRef(G);k.useEffect(()=>{ve.current!==G&&(J===ve.current&&ee(G,!0),ve.current=G)},[J,ee,G]);const $e=k.useMemo(()=>[Z],[Z]);return p.jsxs(Zj,H({ref:n,className:De(pt.root,O),ownerState:ht},te,{children:[p.jsx(Me,H({},He,{slots:U,slotProps:j})),p.jsx(Jj,{reduceAnimations:g,className:pt.viewTransitionContainer,transKey:G,ownerState:ht,children:p.jsxs("div",{children:[G==="year"&&p.jsx(kj,H({},ie,ye,{value:Z,onChange:Ne,shouldDisableYear:C,hasFocus:Ee,onFocusedViewChange:We=>ee("year",We),yearsOrder:L,yearsPerRow:fe,referenceDate:be})),G==="month"&&p.jsx(fj,H({},ie,ye,{hasFocus:Ee,className:O,value:Z,onChange:Be,shouldDisableMonth:E,onFocusedViewChange:We=>ee("month",We),monthsPerRow:X,referenceDate:be})),G==="day"&&p.jsx(tj,H({},le,ie,ye,{onMonthSwitchingAnimationEnd:Et,onFocusedDayChange:Pe,reduceAnimations:g,selectedDays:$e,onSelectedDaysChange:Ze,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:C,hasFocus:Ee,onFocusedViewChange:We=>ee("day",We),showDaysOutsideCurrentMonth:D,fixedWeekNumber:R,dayOfWeekFormatter:z,displayWeekNumber:ne,loading:_,renderLoading:K}))]})})]}))}),ga=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:a,defaultValue:s,referenceDate:i,onChange:l,className:u,classes:c,disableFuture:d,disablePast:m,minDate:f,maxDate:h,shouldDisableDate:b,shouldDisableMonth:g,shouldDisableYear:x,reduceAnimations:E,onMonthChange:C,monthsPerRow:T,onYearChange:w,yearsOrder:S,yearsPerRow:O,slots:F,slotProps:B,loading:P,renderLoading:N,disableHighlightToday:v,readOnly:M,disabled:A,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:R,sx:z,autoFocus:U,fixedWeekNumber:j,displayWeekNumber:_,timezone:K})=>p.jsx(eH,{view:e,onViewChange:t,views:n.filter(Fg),focusedView:r&&Fg(r)?r:null,onFocusedViewChange:o,value:a,defaultValue:s,referenceDate:i,onChange:l,className:u,classes:c,disableFuture:d,disablePast:m,minDate:f,maxDate:h,shouldDisableDate:b,shouldDisableMonth:g,shouldDisableYear:x,reduceAnimations:E,onMonthChange:C,monthsPerRow:T,onYearChange:w,yearsOrder:S,yearsPerRow:O,slots:F,slotProps:B,loading:P,renderLoading:N,disableHighlightToday:v,readOnly:M,disabled:A,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:R,sx:z,autoFocus:U,fixedWeekNumber:j,displayWeekNumber:_,timezone:K}),qx=k.forwardRef(function(t,n){const r=Hr(),o=_t(),a=Cx(t,"MuiDesktopDatePicker"),s=H({day:ga,month:ga,year:ga},a.viewRenderers),i=H({},a,{viewRenderers:s,format:Qp(o,a,!1),yearsPerRow:a.yearsPerRow??4,slots:H({openPickerIcon:m$,field:jx},a.slots),slotProps:H({},a.slotProps,{field:u=>H({},jn(a.slotProps?.field,u),vx(a),{ref:n}),toolbar:H({hidden:!0},a.slotProps?.toolbar)})}),{renderPicker:l}=c$({props:i,valueManager:xr,valueType:"date",getOpenDialogAriaText:yx({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:i.localeText?.openDatePickerDialogue}),validator:yi});return l()});qx.propTypes={autoFocus:ce.bool,className:ce.string,closeOnSelect:ce.bool,dayOfWeekFormatter:ce.func,defaultValue:ce.object,disabled:ce.bool,disableFuture:ce.bool,disableHighlightToday:ce.bool,disableOpenPicker:ce.bool,disablePast:ce.bool,displayWeekNumber:ce.bool,enableAccessibleFieldDOMStructure:ce.any,fixedWeekNumber:ce.number,format:ce.string,formatDensity:ce.oneOf(["dense","spacious"]),inputRef:My,label:ce.node,loading:ce.bool,localeText:ce.object,maxDate:ce.object,minDate:ce.object,monthsPerRow:ce.oneOf([3,4]),name:ce.string,onAccept:ce.func,onChange:ce.func,onClose:ce.func,onError:ce.func,onMonthChange:ce.func,onOpen:ce.func,onSelectedSectionsChange:ce.func,onViewChange:ce.func,onYearChange:ce.func,open:ce.bool,openTo:ce.oneOf(["day","month","year"]),orientation:ce.oneOf(["landscape","portrait"]),readOnly:ce.bool,reduceAnimations:ce.bool,referenceDate:ce.object,renderLoading:ce.func,selectedSections:ce.oneOfType([ce.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ce.number]),shouldDisableDate:ce.func,shouldDisableMonth:ce.func,shouldDisableYear:ce.func,showDaysOutsideCurrentMonth:ce.bool,slotProps:ce.object,slots:ce.object,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),timezone:ce.string,value:ce.object,view:ce.oneOf(["day","month","year"]),viewRenderers:ce.shape({day:ce.func,month:ce.func,year:ce.func}),views:ce.arrayOf(ce.oneOf(["day","month","year"]).isRequired),yearsOrder:ce.oneOf(["asc","desc"]),yearsPerRow:ce.oneOf([3,4])};function tH(e){return Fe("MuiDialogContent",e)}Re("MuiDialogContent",["root","dividers"]);function nH(e){return Fe("MuiDialogTitle",e)}const rH=Re("MuiDialogTitle",["root"]),oH=e=>{const{classes:t,dividers:n}=e;return Le({root:["root",n&&"dividers"]},tH,t)},aH=ae("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Je(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${rH.root} + &`]:{paddingTop:0}}}]}))),Sr=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogContent"}),{className:o,dividers:a=!1,...s}=r,i={...r,dividers:a},l=oH(i);return p.jsx(aH,{className:De(l.root,o),ownerState:i,ref:n,...s})});function sH(e){return Fe("MuiDialog",e)}const Os=Re("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Yx=k.createContext({}),iH=ae(nx,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),lH=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,s={root:["root"],container:["container",`scroll${ke(n)}`],paper:["paper",`paperScroll${ke(n)}`,`paperWidth${ke(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return Le(s,sH,t)},uH=ae(rx,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),cH=ae("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ke(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),dH=ae(Ho,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ke(n.scroll)}`],t[`paperWidth${ke(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Je(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Os.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Os.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Os.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),kr=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialog"}),o=no(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":i,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:c,children:d,className:m,disableEscapeKeyDown:f=!1,fullScreen:h=!1,fullWidth:b=!1,maxWidth:g="sm",onClick:x,onClose:E,open:C,PaperComponent:T=Ho,PaperProps:w={},scroll:S="paper",slots:O={},slotProps:F={},TransitionComponent:B=Oo,transitionDuration:P=a,TransitionProps:N,...v}=r,M={...r,disableEscapeKeyDown:f,fullScreen:h,fullWidth:b,maxWidth:g,scroll:S},A=lH(M),D=k.useRef(),R=J=>{D.current=J.target===J.currentTarget},z=J=>{x&&x(J),D.current&&(D.current=null,E&&E(J,"backdropClick"))},U=nr(i),j=k.useMemo(()=>({titleId:U}),[U]),_={transition:B,...O},K={transition:N,paper:w,backdrop:c,...F},ne={slots:_,slotProps:K},[L,fe]=ct("root",{elementType:uH,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:M,className:De(A.root,m),ref:n}),[X,q]=ct("backdrop",{elementType:iH,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:M}),[te,Z]=ct("paper",{elementType:dH,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:M,className:De(A.paper,w.className)}),[re,Q]=ct("container",{elementType:cH,externalForwardedProps:ne,ownerState:M,className:A.container}),[G,se]=ct("transition",{elementType:Oo,externalForwardedProps:ne,ownerState:M,additionalProps:{appear:!0,in:C,timeout:P,role:"presentation"}});return p.jsx(L,{closeAfterTransition:!0,slots:{backdrop:X},slotProps:{backdrop:{transitionDuration:P,as:u,...q}},disableEscapeKeyDown:f,onClose:E,open:C,onClick:z,...fe,...v,children:p.jsx(G,{...se,children:p.jsx(re,{onMouseDown:R,...Q,children:p.jsx(te,{as:T,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":U,"aria-modal":l,...Z,children:p.jsx(Yx.Provider,{value:j,children:d})})})})})}),pH=ae(kr)({[`& .${Os.container}`]:{outline:0},[`& .${Os.paper}`]:{outline:0,minWidth:Du}}),fH=ae(Sr)({"&:first-of-type":{padding:0}});function mH(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:a}=e,s=o?.dialog??pH,i=o?.mobileTransition??Oo;return p.jsx(s,H({open:r,onClose:n},a?.dialog,{TransitionComponent:i,TransitionProps:a?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:a?.mobilePaper,children:p.jsx(fH,{children:t})}))}const hH=["props","getOpenDialogAriaText"],gH=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=je(e,hH);const{slots:o,slotProps:a,className:s,sx:i,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:d,onSelectedSectionsChange:m,timezone:f,name:h,label:b,inputRef:g,readOnly:x,disabled:E,localeText:C}=t,T=k.useRef(null),w=nr(),S=a?.toolbar?.hidden??!1,{open:O,actions:F,layoutProps:B,renderCurrentView:P,fieldProps:N,contextValue:v}=_x(H({},r,{props:t,fieldRef:T,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),M=o.field,A=tt({elementType:M,externalSlotProps:a?.field,additionalProps:H({},N,S&&{id:w},!(E||x)&&{onClick:F.onOpen,onKeyDown:a7(F.onOpen)},{readOnly:x??!0,disabled:E,className:s,sx:i,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:d,onSelectedSectionsChange:m,timezone:f,label:b,name:h},g?{inputRef:g}:{}),ownerState:t});A.inputProps=H({},A.inputProps,{"aria-label":n(N.value)});const D=H({textField:o.textField},A.slots),R=o.layout??Px;let z=w;S&&(b?z=`${w}-label`:z=void 0);const U=H({},a,{toolbar:H({},a?.toolbar,{titleId:w}),mobilePaper:H({"aria-labelledby":z},a?.mobilePaper)}),j=nt(T,A.unstableFieldRef);return{renderPicker:()=>p.jsxs(Rx,{contextValue:v,localeText:C,children:[p.jsx(M,H({},A,{slots:D,slotProps:U,unstableFieldRef:j})),p.jsx(mH,H({},F,{open:O,slots:o,slotProps:U,children:p.jsx(R,H({},B,U?.layout,{slots:o,slotProps:U,children:P()}))}))]})}},Gx=k.forwardRef(function(t,n){const r=Hr(),o=_t(),a=Cx(t,"MuiMobileDatePicker"),s=H({day:ga,month:ga,year:ga},a.viewRenderers),i=H({},a,{viewRenderers:s,format:Qp(o,a,!1),slots:H({field:jx},a.slots),slotProps:H({},a.slotProps,{field:u=>H({},jn(a.slotProps?.field,u),vx(a),{ref:n}),toolbar:H({hidden:!1},a.slotProps?.toolbar)})}),{renderPicker:l}=gH({props:i,valueManager:xr,valueType:"date",getOpenDialogAriaText:yx({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:i.localeText?.openDatePickerDialogue}),validator:yi});return l()});Gx.propTypes={autoFocus:ce.bool,className:ce.string,closeOnSelect:ce.bool,dayOfWeekFormatter:ce.func,defaultValue:ce.object,disabled:ce.bool,disableFuture:ce.bool,disableHighlightToday:ce.bool,disableOpenPicker:ce.bool,disablePast:ce.bool,displayWeekNumber:ce.bool,enableAccessibleFieldDOMStructure:ce.any,fixedWeekNumber:ce.number,format:ce.string,formatDensity:ce.oneOf(["dense","spacious"]),inputRef:My,label:ce.node,loading:ce.bool,localeText:ce.object,maxDate:ce.object,minDate:ce.object,monthsPerRow:ce.oneOf([3,4]),name:ce.string,onAccept:ce.func,onChange:ce.func,onClose:ce.func,onError:ce.func,onMonthChange:ce.func,onOpen:ce.func,onSelectedSectionsChange:ce.func,onViewChange:ce.func,onYearChange:ce.func,open:ce.bool,openTo:ce.oneOf(["day","month","year"]),orientation:ce.oneOf(["landscape","portrait"]),readOnly:ce.bool,reduceAnimations:ce.bool,referenceDate:ce.object,renderLoading:ce.func,selectedSections:ce.oneOfType([ce.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ce.number]),shouldDisableDate:ce.func,shouldDisableMonth:ce.func,shouldDisableYear:ce.func,showDaysOutsideCurrentMonth:ce.bool,slotProps:ce.object,slots:ce.object,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),timezone:ce.string,value:ce.object,view:ce.oneOf(["day","month","year"]),viewRenderers:ce.shape({day:ce.func,month:ce.func,year:ce.func}),views:ce.arrayOf(ce.oneOf(["day","month","year"]).isRequired),yearsOrder:ce.oneOf(["asc","desc"]),yearsPerRow:ce.oneOf([3,4])};const bH=["desktopModeMediaQuery"],Mc=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=s7}=r,a=je(r,bH);return dx(o,{defaultMatches:!0})?p.jsx(qx,H({ref:n},a)):p.jsx(Gx,H({ref:n},a))});var ll={exports:{}},yH=ll.exports,Jg;function xH(){return Jg||(Jg=1,(function(e,t){(function(n,r){e.exports=r()})(yH,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(a,s,i){var l=s.prototype;i.utc=function(b){var g={date:b,utc:!0,args:arguments};return new s(g)},l.utc=function(b){var g=i(this.toDate(),{locale:this.$L,utc:!0});return b?g.add(this.utcOffset(),n):g},l.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),u.call(this,b)};var c=l.init;l.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else c.call(this)};var d=l.utcOffset;l.utcOffset=function(b,g){var x=this.$utils().u;if(x(b))return this.$u?0:x(this.$offset)?d.call(this):this.$offset;if(typeof b=="string"&&(b=(function(w){w===void 0&&(w="");var S=w.match(r);if(!S)return null;var O=(""+S[0]).match(o)||["-",0,0],F=O[0],B=60*+O[1]+ +O[2];return B===0?0:F==="+"?B:-B})(b),b===null))return this;var E=Math.abs(b)<=16?60*b:b;if(E===0)return this.utc(g);var C=this.clone();if(g)return C.$offset=E,C.$u=!1,C;var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(E+T,n)).$offset=E,C.$x.$localOffset=T,C};var m=l.format;l.format=function(b){var g=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,g)},l.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var f=l.toDate;l.toDate=function(b){return b==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=l.diff;l.diff=function(b,g,x){if(b&&this.$u===b.$u)return h.call(this,b,g,x);var E=this.local(),C=i(b).local();return h.call(E,C,g,x)}}}))})(ll)),ll.exports}var CH=xH();const EH=tr(CH);yt.extend(EH);function Nc(e){switch(e){case"Star":return["Equals","Contains"];case"MinMax":return["Equals","Less Than","Greater Than","Between"];case"DateMinMax":return["Equals","Before","After","Between"];case"Retrieval":return["Semantic Search"];case"Boolean":return["Equals"];case"NONE":default:return[]}}function vH(e){return e==="DateMinMax"}function Oc(e){return e==="Between"}function Kx({spec:e,values:t,selection:n,onChange:r,retrievalFn:o}){const a=()=>n?.matchType?n.matchType:e.filterType==="DateMinMax"?"Between":Nc(e.filterType)[0]||"Equals",[s,i]=W.useState(a()),[l,u]=W.useState(n?.value??""),[c,d]=W.useState(n?.value2??""),[m,f]=W.useState([]),[h,b]=W.useState(!1),[g,x]=W.useState(""),[E,C]=W.useState(!1),[T,w]=W.useState(!1),S=W.useRef(null),O=W.useRef(0),[F,B]=W.useState(!1);W.useEffect(()=>{if(e.filterType!=="Retrieval"||!o)return;const _=g.trim();if(_.length<=2){f([]),C(!1);return}return S.current&&clearTimeout(S.current),S.current=setTimeout(async()=>{O.current+=1;const K=O.current;b(!0);try{const ne=await o(_,e);K===O.current&&f(ne)}catch(ne){K===O.current&&(console.error("Retrieval failed",ne),f([]))}finally{K===O.current&&(b(!1),C(!0))}},500),()=>{S.current&&clearTimeout(S.current)}},[g,e,o]),W.useEffect(()=>{n===null?(u(""),d(""),i(e.filterType==="DateMinMax"?"Between":Nc(e.filterType)[0]||"Equals")):n&&(i(n.matchType),u(n.value??""),d(n.value2??""))},[n,e.filterType]);const P=Nc(e.filterType),N=vH(e.filterType),v=Oc(s),M=N&&t.length>=2&&t[0].value instanceof Date?yt.utc(t[0].value):void 0,A=N&&t.length>=2&&t[1].value instanceof Date?yt.utc(t[1].value):void 0,D=e.filterType==="MinMax"&&t.length>=2&&typeof t[0].value=="number"?t[0].value:void 0,R=e.filterType==="MinMax"&&t.length>=2&&typeof t[1].value=="number"?t[1].value:void 0;if(P.length===0)return null;const z=_=>{const K=_.target.value;i(K),Oc(K)||d(""),l&&r({dimensionName:e.dimensionName,matchType:K,value:l,...Oc(K)&&c&&{value2:c}})},U=(_,K)=>{u(_??""),K!==void 0&&d(K??"");const ne=Array.isArray(_)&&_.length===0;r(!ne&&_!==""&&_!==null&&_!==void 0?{dimensionName:e.dimensionName,matchType:s,value:_,...v&&K&&{value2:K}}:null)},j=()=>{u(""),d(""),r(null)};return p.jsxs(ar,{sx:{display:"flex",flexDirection:"column",gap:1.5,fontSize:"0.75rem","& .MuiInputBase-root":{fontSize:"0.75rem"},"& .MuiInputBase-input":{padding:"6px 10px"},"& .MuiSelect-select":{padding:"6px 10px !important"},"& .MuiAutocomplete-input":{padding:"3px 6px !important"},"& .MuiAutocomplete-root .MuiInputBase-root":{padding:"3px 6px"},"& .MuiChip-root":{height:"20px"},"& .MuiChip-label":{fontSize:"0.7rem",padding:"0 6px"},"& .MuiInputLabel-root":{fontSize:"0.75rem",transform:"translate(10px, 6px) scale(1)"},"& .MuiInputLabel-shrink":{fontSize:"0.85rem",transform:"translate(14px, -9px) scale(0.75)"},"& .MuiOutlinedInput-notchedOutline legend":{fontSize:"0.65rem"},"& .MuiFormHelperText-root":{fontSize:"0.65rem",marginTop:"2px"},"& .MuiSvgIcon-root":{fontSize:"1.25rem"}},children:[p.jsx(ar,{sx:{fontWeight:600},children:e.label??e.dimensionName}),e.filterType!=="Boolean"&&p.jsxs(Hl,{size:"small",fullWidth:!0,children:[p.jsx(Ul,{children:"Match Type"}),p.jsx(zl,{value:s,label:"Match Type",onChange:z,disabled:P.length===1,MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:P.map(_=>p.jsx(aa,{value:_,children:_},_))})]}),e.filterType==="Star"&&s==="Equals"&&p.jsx(Rd,{multiple:!0,size:"small",options:t,getOptionLabel:_=>typeof _=="string"?_:typeof _=="object"&&_!==null&&"value"in _?String(_.value):String(_),value:Array.isArray(l)?l.map(_=>t.find(K=>K.value===_)||_):l?[t.find(_=>_.value===l)||l]:[],onChange:(_,K)=>{const ne=K.map(L=>typeof L=="string"?L:L&&typeof L=="object"&&"value"in L?L.value:L);U(ne)},noOptionsText:"No matches found",renderInput:_=>p.jsx(Rt,{..._,label:"Values",placeholder:"Select values..."}),freeSolo:!e.values||e.values.length===0,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="Star"&&s==="Contains"&&p.jsx(Rt,{size:"small",label:"Search Text",value:l,onChange:_=>U(_.target.value),placeholder:"Enter text to search...",fullWidth:!0}),e.filterType==="Boolean"&&p.jsxs(Hl,{size:"small",fullWidth:!0,children:[p.jsx(Ul,{children:"Value"}),p.jsxs(zl,{value:l===!0?"true":l===!1?"false":"",label:"Value",onChange:_=>{const K=_.target.value;K==="true"?U(!0):K==="false"?U(!1):j()},MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:[p.jsx(aa,{value:"",children:p.jsx("em",{children:"Blank"})}),p.jsx(aa,{value:"true",children:"True"}),p.jsx(aa,{value:"false",children:"False"})]})]}),e.filterType==="Retrieval"&&s==="Semantic Search"&&p.jsx(Rd,{multiple:!0,size:"small",options:m,loading:h,getOptionLabel:_=>typeof _=="string"?_:typeof _=="object"&&_!==null&&"value"in _?String(_.value):String(_),value:Array.isArray(l)?l.map(_=>m.find(ne=>ne.value===_)||{value:_}):l?[{value:l}]:[],onInputChange:(_,K)=>{x(K)},onChange:(_,K)=>{const ne=K.map(L=>typeof L=="string"?L:L&&typeof L=="object"&&"value"in L?L.value:L);U(ne)},noOptionsText:g.trim().length<=2?"Type at least 3 characters to search":"No matches found",renderInput:_=>p.jsx(Rt,{..._,label:"Search Values",placeholder:"Type to search...",onFocus:()=>w(!0),onBlur:()=>w(!1),helperText:T&&!h&&E&&m.length===0?"No matches found":void 0,InputProps:{..._.InputProps,endAdornment:p.jsxs(p.Fragment,{children:[h?p.jsx(Up,{color:"inherit",size:20}):null,_.InputProps.endAdornment]})}}),freeSolo:!0,filterOptions:_=>_,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="MinMax"&&!v&&p.jsx(Rt,{size:"small",type:"number",label:"Value",value:l,onChange:_=>U(parseFloat(_.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Enter number...",fullWidth:!0,inputProps:{min:D,max:R},helperText:F&&D!==void 0&&R!==void 0?`Valid range: [${D} - ${R}]`:void 0}),e.filterType==="MinMax"&&v&&p.jsxs(ar,{sx:{display:"flex",flexDirection:"column",gap:1},children:[p.jsxs(ar,{sx:{display:"flex",gap:1,alignItems:"center"},children:[p.jsx(Rt,{size:"small",type:"number",label:"From",value:l,onChange:_=>U(parseFloat(_.target.value)||"",c),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Min...",fullWidth:!0,inputProps:{min:D,max:c||R}}),p.jsx(ar,{children:"to"}),p.jsx(Rt,{size:"small",type:"number",label:"To",value:c,onChange:_=>U(l,parseFloat(_.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Max...",fullWidth:!0,inputProps:{min:l||D,max:R}})]}),F&&D!==void 0&&R!==void 0&&p.jsxs(Cn,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",D," - ",R,"]"]})]}),N&&!v&&p.jsx(Ld,{dateAdapter:Lg,children:p.jsx(Mc,{label:"Date",value:l instanceof Date?yt.utc(l):null,onChange:_=>{_===null?U(null):_.isValid()&&U(_.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?void 0:M,maxDate:l instanceof Date?void 0:A,referenceDate:s==="After"&&M?M:void 0,slotProps:{textField:{size:"small",fullWidth:!0,sx:{minWidth:150},onFocus:()=>B(!0),onBlur:()=>B(!1),helperText:F&&M&&A?`Valid range: [${M.format("YYYY-MM-DD")} - ${A.format("YYYY-MM-DD")}]`:void 0},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),N&&v&&p.jsx(Ld,{dateAdapter:Lg,children:p.jsxs(ar,{sx:{display:"flex",flexDirection:"column",gap:1},children:[p.jsxs(ar,{sx:{display:"flex",gap:1,alignItems:"center"},children:[p.jsx(ar,{sx:{flex:1,minWidth:0},children:p.jsx(Mc,{label:"From",value:l instanceof Date?yt.utc(l):null,onChange:_=>{_===null?U(null,c):_.isValid()&&U(_.utc().toDate(),c)},timezone:"UTC",minDate:l instanceof Date?void 0:M,maxDate:c instanceof Date?yt.utc(c):l instanceof Date?void 0:A,referenceDate:M,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),p.jsx(ar,{children:"to"}),p.jsx(ar,{sx:{flex:1,minWidth:0},children:p.jsx(Mc,{label:"To",value:c instanceof Date?yt.utc(c):null,onChange:_=>{_===null?U(l,null):_.isValid()&&U(l,_.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?yt.utc(l):c instanceof Date?void 0:M,maxDate:c instanceof Date?void 0:A,referenceDate:l instanceof Date?yt.utc(l):M,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})})]}),F&&M&&A&&p.jsxs(Cn,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",M.format("YYYY-MM-DD")," -"," ",A.format("YYYY-MM-DD"),"]"]})]})})]})}function Qx(e){const t=new Set,n=e.schema?.fields;if(!n)return t;for(const r of n)"kind"in r&&r.kind==="join"&&r.name&&t.add(r.name);return t}function Xx(e){if(!e)return null;for(const t of e)if(t.startsWith("##(filters)")){const n=t.slice(11).trim();try{const r=JSON.parse(n);if(Array.isArray(r)){const o=[];for(const a of r)if(typeof a=="string"){const s=a.indexOf(".");s>0&&s<a.length-1&&o.push({source:a.substring(0,s),dimension:a.substring(s+1)})}if(o.length>0)return{filters:o}}}catch(r){console.error(`Failed to parse "${t}" annotation:`,r)}}return null}function Zx(e){if(e.startsWith("#(filter)")){const t=e.slice(9).trim();try{const n=JSON.parse(t);if(n.type)return n}catch(n){console.error(`Failed to parse "${e}" annotation:`,n)}}return null}function TH(e){const t=e.match(/^#\s*label\s*=\s*"([^"]+)"/);return t?t[1]:null}function Jx(e){const t=new Map;let n="";for(const r of e)if(r.type==="code"){if(!n&&r.text){const o=r.text.match(/import\s+(?:\{[^}]*\}\s+from\s+)?['"]([^'"]+)['"]/);o&&(n=o[1])}if(r.newSources&&r.newSources.length>0)for(const o of r.newSources)try{const a=JSON.parse(o);a.name&&t.set(a.name,a)}catch(a){console.error("Failed to parse SourceInfo:",a)}}return{sourceInfoMap:t,modelPath:n}}function e2(e,t,n){const r=[];for(const{source:o,dimension:a}of t){const s=e.get(o);if(!s){console.warn(`Source "${o}" not found in notebook sources`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const i=s.schema?.fields;if(!i){r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const l=i.find(d=>d.name===a);if(!l){console.warn(`Dimension "${a}" not found in source "${o}"`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}let u="Star",c;if("annotations"in l&&l.annotations){for(const d of l.annotations)if(d.value){const m=Zx(d.value);m&&(u=m.type);const f=TH(d.value);f&&(c=f)}}r.push({source:o,model:n,dimensionName:a,filterType:u,label:c})}return r}function t2(e,t,n){return e.length===0?"":e.map(o=>{const{dimensionName:a,matchType:s,value:i,value2:l}=o,u=t.get(a),d=u&&u!==n?`\`${u}\`.\`${a}\``:`\`${a}\``,m=i instanceof Date,f=(h,b=!1)=>h==null?"null":b&&h instanceof Date?`@${h.getFullYear()}-${String(h.getMonth()+1).padStart(2,"0")}-${String(h.getDate()).padStart(2,"0")}`:typeof h=="string"?`'${h.replace(/'/g,"\\'")}'`:typeof h=="boolean"?h?"true":"false":String(h);switch(s){case"Equals":case"Semantic Search":return Array.isArray(i)&&i.length>0?`(${i.map(b=>`${d} = ${f(b,m)}`).join(" or ")})`:`${d} = ${f(i,m)}`;case"Contains":return typeof i=="string"?`${d} ~ f'%${i.replace(/'/g,"\\'")}%'`:`${d} = ${f(i)}`;case"After":case"Greater Than":return`${d} > ${f(i,m)}`;case"Before":case"Less Than":return`${d} < ${f(i,m)}`;case"Between":return l!==void 0?`${d} >= ${f(i,m)} and ${d} <= ${f(l,m)}`:`${d} >= ${f(i,m)}`;default:return""}}).filter(o=>o.length>0).join(" and ")}function n2(e){const t=e.match(/run\s*:\s*(\w+)\s*->/);if(t)return t[1];const n=e.match(/^\s*(\w+)\s*->/m);return n?n[1]:null}function r2(e,t){return`${e.trimEnd()} + {where: ${t}}`}const SH=rt(p.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),kH=rt(p.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),e0=rt(p.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),wH=rt(p.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),_H=rt(p.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),IH=rt([p.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),p.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),t0=rt(p.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),o2=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),r=t.split(/\n\s*\n/)[1]||t;if(r.length<=120)return r;const o=r.substring(0,120).split(" ");return o.pop(),o.join(" ")+"..."},a2=(e,t)=>{const n=(e.readme||void 0)?.split(`
|
|
213
|
+
`));c&&F.current&&F.current.getSectionContent(w.startIndex).focus()},[]),{interactions:D,returnedValue:{autoFocus:c,readOnly:n,focused:u??M,sectionListRef:B,onBlur:K,onClick:z,onFocus:_,onInput:U,onPaste:j,enableAccessibleFieldDOMStructure:!0,elements:Q,tabIndex:b===0?-1:0,contentEditable:re,value:se,onChange:G,areAllSectionsEmpty:S}}},sa=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),w$=(e,t,n)=>{let r=0,o=n?1:0;const a=[];for(let s=0;s<e.length;s+=1){const i=e[s],l=Zp(i,n?"input-rtl":"input-ltr",t),u=`${i.startSeparator}${l}${i.endSeparator}`,c=sa(u).length,d=u.length,m=sa(l),f=o+(m===""?0:l.indexOf(m[0]))+i.startSeparator.length,h=f+m.length;a.push(H({},i,{start:r,end:r+c,startInInput:f,endInInput:h})),r+=c,o+=d}return a},_$=e=>{const t=Yn(),n=k.useRef(void 0),r=k.useRef(void 0),{forwardedProps:{onFocus:o,onClick:a,onPaste:s,onBlur:i,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:d=!1},parsedSelectedSections:m,activeSectionIndex:f,state:h,fieldValueManager:b,valueManager:g,applyCharacterEditing:x,resetCharacterQuery:E,updateSectionValue:C,updateValueFromValueStr:T,clearActiveSection:w,clearValue:S,setTempAndroidValueStr:O,setSelectedSections:F,getSectionsFromValue:B,areAllSectionsEmpty:P,localizedDigits:N}=e,v=k.useRef(null),M=nt(l,v),A=k.useMemo(()=>w$(h.sections,N,t),[h.sections,N,t]),D=k.useMemo(()=>({syncSelectionToDOM:()=>{if(!v.current)return;if(m==null){v.current.scrollLeft&&(v.current.scrollLeft=0);return}if(v.current!==gn(document))return;const te=v.current.scrollTop;if(m==="all")v.current.select();else{const Z=A[m],re=Z.type==="empty"?Z.startInInput-Z.startSeparator.length:Z.startInInput,Q=Z.type==="empty"?Z.endInInput+Z.endSeparator.length:Z.endInInput;(re!==v.current.selectionStart||Q!==v.current.selectionEnd)&&v.current===gn(document)&&v.current.setSelectionRange(re,Q),clearTimeout(r.current),r.current=setTimeout(()=>{v.current&&v.current===gn(document)&&v.current.selectionStart===v.current.selectionEnd&&(v.current.selectionStart!==re||v.current.selectionEnd!==Q)&&D.syncSelectionToDOM()})}v.current.scrollTop=te},getActiveSectionIndexFromDOM:()=>{const te=v.current.selectionStart??0,Z=v.current.selectionEnd??0;if(te===0&&Z===0)return null;const re=te<=A[0].startInInput?1:A.findIndex(Q=>Q.startInInput-Q.startSeparator.length>te);return re===-1?A.length-1:re-1},focusField:(te=0)=>{gn(document)!==v.current&&(v.current?.focus(),F(te))},setSelectedSections:te=>F(te),isFieldFocused:()=>v.current===gn(document)}),[v,m,A,F]),R=()=>{const te=v.current.selectionStart??0;let Z;te<=A[0].startInInput||te>=A[A.length-1].endInInput?Z=1:Z=A.findIndex(Q=>Q.startInInput-Q.startSeparator.length>te);const re=Z===-1?A.length-1:Z-1;F(re)},z=Ae((...te)=>{o?.(...te);const Z=v.current;clearTimeout(n.current),n.current=setTimeout(()=>{!Z||Z!==v.current||f==null&&(Z.value.length&&Number(Z.selectionEnd)-Number(Z.selectionStart)===Z.value.length?F("all"):R())})}),U=Ae((te,...Z)=>{te.isDefaultPrevented()||(a?.(te,...Z),R())}),j=Ae(te=>{if(s?.(te),te.preventDefault(),c||d)return;const Z=te.clipboardData.getData("text");if(typeof m=="number"){const re=h.sections[m],Q=/^[a-zA-Z]+$/.test(Z),G=/^[0-9]+$/.test(Z),se=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Z);if(re.contentType==="letter"&&Q||re.contentType==="digit"&&G||re.contentType==="digit-with-letter"&&se){E(),C({activeSection:re,newSectionValue:Z,shouldGoToNextSection:!0});return}if(Q||G)return}E(),T(Z)}),_=Ae((...te)=>{i?.(...te),F(null)}),K=Ae(te=>{if(c)return;const Z=te.target.value;if(Z===""){E(),S();return}const re=te.nativeEvent.data,Q=re&&re.length>1,G=Q?re:Z,se=sa(G);if(m==="all"&&F(f),f==null||Q){T(Q?re:se);return}let J;if(m==="all"&&se.length===1)J=se;else{const ee=sa(b.getV6InputValueFromSections(A,N,t));let xe=-1,de=-1;for(let Te=0;Te<ee.length;Te+=1)xe===-1&&ee[Te]!==se[Te]&&(xe=Te),de===-1&&ee[ee.length-Te-1]!==se[se.length-Te-1]&&(de=Te);const be=A[f];if(xe<be.start||ee.length-de-1>be.end)return;const Pe=se.length-ee.length+be.end-sa(be.endSeparator||"").length;J=se.slice(be.start+sa(be.startSeparator||"").length,Pe)}if(J.length===0){AF()&&O(G),E(),w();return}x({keyPressed:J,sectionIndex:f})}),ne=k.useMemo(()=>u!==void 0?u:b.getV6InputValueFromSections(B(g.emptyValue),N,t),[u,b,B,g.emptyValue,N,t]),L=k.useMemo(()=>h.tempValueStrAndroid??b.getV6InputValueFromSections(h.sections,N,t),[h.sections,b,h.tempValueStrAndroid,N,t]);k.useEffect(()=>(v.current&&v.current===gn(document)&&F("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const fe=k.useMemo(()=>f==null||h.sections[f].contentType==="letter"?"text":"numeric",[f,h.sections]),q=!(v.current&&v.current===gn(document))&&P;return{interactions:D,returnedValue:{readOnly:c,onBlur:_,onClick:U,onFocus:z,onPaste:j,inputRef:M,enableAccessibleFieldDOMStructure:!1,placeholder:ne,inputMode:fe,autoComplete:"off",value:q?"":L,onChange:K}}},I$=e=>{const t=_t(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:a=!1,disabled:s=!1,readOnly:i=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:d},fieldValueManager:m,valueManager:f,validator:h}=e,b=Yn(),g=v$(e),{state:x,activeSectionIndex:E,parsedSelectedSections:C,setSelectedSections:T,clearValue:w,clearActiveSection:S,updateSectionValue:O,setTempAndroidValueStr:F,sectionsValueBoundaries:B,localizedDigits:P,timezone:N}=g,v=S$({sections:x.sections,updateSectionValue:O,sectionsValueBoundaries:B,localizedDigits:P,setTempAndroidValueStr:F,timezone:N}),{resetCharacterQuery:M}=v,A=f.areValuesEqual(t,x.value,f.emptyValue),D=a?k$:_$,R=k.useMemo(()=>DF(x.sections,b&&!a),[x.sections,b,a]),{returnedValue:z,interactions:U}=D(H({},e,g,v,{areAllSectionsEmpty:A,sectionOrder:R})),j=Ae(X=>{if(l?.(X),!s)switch(!0){case((X.ctrlKey||X.metaKey)&&String.fromCharCode(X.keyCode)==="A"&&!X.shiftKey&&!X.altKey):{X.preventDefault(),T("all");break}case X.key==="ArrowRight":{if(X.preventDefault(),C==null)T(R.startIndex);else if(C==="all")T(R.endIndex);else{const q=R.neighbors[C].rightIndex;q!==null&&T(q)}break}case X.key==="ArrowLeft":{if(X.preventDefault(),C==null)T(R.endIndex);else if(C==="all")T(R.startIndex);else{const q=R.neighbors[C].leftIndex;q!==null&&T(q)}break}case X.key==="Delete":{if(X.preventDefault(),i)break;C==null||C==="all"?w():S(),M();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(X.key):{if(X.preventDefault(),i||E==null)break;C==="all"&&T(E);const q=x.sections[E],te=m.getActiveDateManager(t,x,q),Z=vF(t,N,q,X.key,B,P,te.date,{minutesStep:o});O({activeSection:q,newSectionValue:Z,shouldGoToNextSection:!1});break}}});Vt(()=>{U.syncSelectionToDOM()});const{hasValidationError:_}=Tx({props:n,validator:h,timezone:N,value:x.value,onError:n.onError}),K=k.useMemo(()=>u!==void 0?u:_,[_,u]);k.useEffect(()=>{!K&&E==null&&M()},[x.referenceValue,E,K]),k.useEffect(()=>{x.tempValueStrAndroid!=null&&E!=null&&(M(),S())},[x.sections]),k.useImperativeHandle(r,()=>({getSections:()=>x.sections,getActiveSectionIndex:U.getActiveSectionIndexFromDOM,setSelectedSections:U.setSelectedSections,focusField:U.focusField,isFieldFocused:U.isFieldFocused}));const ne=Ae((X,...q)=>{X.preventDefault(),d?.(X,...q),w(),U.isFieldFocused()?T(R.startIndex):U.focusField(0)}),L={onKeyDown:j,onClear:ne,error:K,clearable:!!(c&&!A&&!i&&!s)},fe={disabled:s,readOnly:i};return H({},e.forwardedProps,L,fe,z)},A$=["clearable","onClear","InputProps","sx","slots","slotProps"],D$=["ownerState"],P$=e=>{const t=Hr(),{clearable:n,onClear:r,InputProps:o,sx:a,slots:s,slotProps:i}=e,l=je(e,A$),u=s?.clearButton??yr,c=tt({elementType:u,externalSlotProps:i?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=je(c,D$),m=s?.clearIcon??h$,f=tt({elementType:m,externalSlotProps:i?.clearIcon,ownerState:{}});return H({},l,{InputProps:H({},o,{endAdornment:p.jsxs(k.Fragment,{children:[n&&p.jsx(Sx,{position:"end",sx:{marginRight:o?.endAdornment?-1:-1.5},children:p.jsx(u,H({},d,{onClick:r,children:p.jsx(m,H({fontSize:"small"},f))}))}),o?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a)?a:[a]]})},R$=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],M$=(e,t)=>k.useMemo(()=>{const n=H({},e),r={},o=a=>{n.hasOwnProperty(a)&&(r[a]=n[a],delete n[a])};return R$.forEach(o),Ex.forEach(o),{forwardedProps:n,internalProps:r}},[e,t]),N$=e=>{const t=_t(),n=bi();return H({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Wn(t,e.minDate,n.minDate),maxDate:Wn(t,e.maxDate,n.maxDate)})},O$=e=>{const t=N$(e),{forwardedProps:n,internalProps:r}=M$(t,"date");return I$({forwardedProps:n,internalProps:r,valueManager:xr,fieldValueManager:NF,validator:yi,valueType:"date"})};function L$(e){return Fe("MuiPickersTextField",e)}Re("MuiPickersTextField",["root","focused","disabled","error","required"]);function F$(e){return Fe("MuiPickersInputBase",e)}const ha=Re("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function $$(e){return Fe("MuiPickersSectionList",e)}const us=Re("MuiPickersSectionList",["root","section","sectionContent"]),B$=["slots","slotProps","elements","sectionListRef"],Mx=ae("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Nx=ae("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Ox=ae("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Lx=ae("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),j$=e=>{const{classes:t}=e;return Le({root:["root"],section:["section"],sectionContent:["sectionContent"]},$$,t)};function H$(e){const{slots:t,slotProps:n,element:r,classes:o}=e,a=t?.section??Nx,s=tt({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),i=t?.sectionContent??Lx,l=tt({elementType:i,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Ox,c=tt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=tt({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return p.jsxs(a,H({},s,{children:[p.jsx(u,H({},c)),p.jsx(i,H({},l)),p.jsx(u,H({},d))]}))}const U$=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:a,elements:s,sectionListRef:i}=r,l=je(r,B$),u=j$(r),c=k.useRef(null),d=nt(n,c),m=b=>{if(!c.current)throw new Error(`MUI X: Cannot call sectionListRef.${b} before the mount of the component.`);return c.current};k.useImperativeHandle(i,()=>({getRoot(){return m("getRoot")},getSectionContainer(b){return m("getSectionContainer").querySelector(`.${us.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return m("getSectionContent").querySelector(`.${us.section}[data-sectionindex="${b}"] .${us.sectionContent}`)},getSectionIndexFromDOMElement(b){const g=m("getSectionIndexFromDOMElement");if(b==null||!g.contains(b))return null;let x=null;return b.classList.contains(us.section)?x=b:b.classList.contains(us.sectionContent)&&(x=b.parentElement),x==null?null:Number(x.dataset.sectionindex)}}));const f=o?.root??Mx,h=tt({elementType:f,externalSlotProps:a?.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return p.jsx(f,H({},h,{children:h.contentEditable?s.map(({content:b,before:g,after:x})=>`${g.children}${b.children}${x.children}`).join(""):p.jsx(k.Fragment,{children:s.map((b,g)=>p.jsx(H$,{slots:o,slotProps:a,element:b,classes:u},g))})}))}),z$=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],V$=e=>Math.round(e*1e5)/1e5,Pu=ae("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>H({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${V$(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),nf=ae(Mx,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),W$=ae(Nx,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),q$=ae(Lx,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Y$=ae(Ox,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),G$=ae("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(H({},lF)),K$=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:a,readOnly:s,color:i,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",a&&"fullWidth",`color${ke(i)}`,l==="small"&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Le(d,F$,o)},rf=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:a,value:s,onChange:i,id:l,endAdornment:u,startAdornment:c,renderSuffix:d,slots:m,slotProps:f,contentEditable:h,tabIndex:b,onInput:g,onPaste:x,onKeyDown:E,name:C,readOnly:T,inputProps:w,inputRef:S,sectionListRef:O}=r,F=je(r,z$),B=k.useRef(null),P=nt(n,B),N=nt(w?.ref,S),v=Yn(),M=Qn();if(!M)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const A=_=>{if(M.disabled){_.stopPropagation();return}M.onFocus?.(_)};k.useEffect(()=>{M&&M.setAdornedStart(!!c)},[M,c]),k.useEffect(()=>{M&&(a?M.onEmpty():M.onFilled())},[M,a]);const D=H({},r,M,{isRtl:v}),R=K$(D),z=m?.root||Pu,U=tt({elementType:z,externalSlotProps:f?.root,externalForwardedProps:F,additionalProps:{"aria-invalid":M.error,ref:P},className:R.root,ownerState:D}),j=m?.input||nf;return p.jsxs(z,H({},U,{children:[c,p.jsx(U$,{sectionListRef:O,elements:o,contentEditable:h,tabIndex:b,className:R.sectionsContainer,onFocus:A,onBlur:M.onBlur,onInput:g,onPaste:x,onKeyDown:E,slots:{root:j,section:W$,sectionContent:q$,sectionSeparator:Y$},slotProps:{root:{ownerState:D},sectionContent:{className:ha.sectionContent},sectionSeparator:({position:_})=>({className:_==="before"?ha.sectionBefore:ha.sectionAfter})}}),u,d?d(H({},M)):null,p.jsx(G$,H({name:C,className:R.input,value:s,onChange:i,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:T,required:M.required,disabled:M.disabled},w,{ref:N}))]}))});function Q$(e){return Fe("MuiPickersOutlinedInput",e)}const Jn=H({},ha,Re("MuiPickersOutlinedInput",["root","notchedOutline","input"])),X$=["children","className","label","notched","shrink"],Z$=ae("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Xg=ae("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),J$=ae("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function eB(e){const{className:t,label:n}=e,r=je(e,X$),o=n!=null&&n!=="",a=H({},e,{withLabel:o});return p.jsx(Z$,H({"aria-hidden":!0,className:t},r,{ownerState:a,children:p.jsx(J$,{ownerState:a,children:o?p.jsx(Xg,{children:n}):p.jsx(Xg,{className:"notranslate",children:""})})}))}const tB=["label","autoFocus","ownerState","notched"],nB=ae(Pu,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Jn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Jn.focused} .${Jn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Jn.disabled}`]:{[`& .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Jn.error} .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{color:n},style:{[`&.${Jn.focused}:not(.${Jn.error}) .${Jn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),rB=ae(nf,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),oB=e=>{const{classes:t}=e,r=Le({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Q$,t);return H({},t,r)},Fx=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:a,notched:s}=r,i=je(r,tB),l=Qn(),u=H({},r,a,l,{color:l?.color||"primary"}),c=oB(u);return p.jsx(rf,H({slots:{root:nB,input:rB},renderSuffix:d=>p.jsx(eB,{shrink:!!(s||d.adornedStart||d.focused||d.filled),notched:!!(s||d.adornedStart||d.focused||d.filled),className:c.notchedOutline,label:o!=null&&o!==""&&l?.required?p.jsxs(k.Fragment,{children:[o," ","*"]}):o,ownerState:u})},i,{label:o,classes:c,ref:n}))});Fx.muiName="Input";function aB(e){return Fe("MuiPickersFilledInput",e)}const fo=H({},ha,Re("MuiPickersFilledInput",["root","underline","input"])),sB=["label","autoFocus","disableUnderline","ownerState"],iB=ae(Pu,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ut.shouldForwardProp(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",a=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fo.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fo.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(s=>(e.vars??e).palette[s].main).map(s=>({props:{color:s,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[s]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fo.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fo.disabled}, .${fo.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fo.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),lB=ae(nf,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),uB=e=>{const{classes:t,disableUnderline:n}=e,o=Le({root:["root",!n&&"underline"],input:["input"]},aB,t);return H({},t,o)},$x=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:a=!1,ownerState:s}=r,i=je(r,sB),l=Qn(),u=H({},r,s,l,{color:l?.color||"primary"}),c=uB(u);return p.jsx(rf,H({slots:{root:iB,input:lB},slotProps:{root:{disableUnderline:a}}},i,{label:o,classes:c,ref:n}))});$x.muiName="Input";function cB(e){return Fe("MuiPickersFilledInput",e)}const cs=H({},ha,Re("MuiPickersInput",["root","input"])),dB=["label","autoFocus","disableUnderline","ownerState"],pB=ae(Pu,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${cs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${cs.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${cs.disabled}, .${cs.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${cs.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),fB=e=>{const{classes:t,disableUnderline:n}=e,o=Le({root:["root",!n&&"underline"],input:["input"]},cB,t);return H({},t,o)},Bx=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:a=!1,ownerState:s}=r,i=je(r,dB),l=Qn(),u=H({},r,s,l,{disableUnderline:a,color:l?.color||"primary"}),c=fB(u);return p.jsx(rf,H({slots:{root:pB}},i,{label:o,classes:c,ref:n}))});Bx.muiName="Input";const mB=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],hB={standard:Bx,filled:$x,outlined:Fx},gB=ae(Hl,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),bB=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Le({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},L$,r)},yB=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:a,className:s,color:i="primary",disabled:l=!1,error:u=!1,variant:c="outlined",required:d=!1,InputProps:m,inputProps:f,inputRef:h,sectionListRef:b,elements:g,areAllSectionsEmpty:x,onClick:E,onKeyDown:C,onKeyUp:T,onPaste:w,onInput:S,endAdornment:O,startAdornment:F,tabIndex:B,contentEditable:P,focused:N,value:v,onChange:M,fullWidth:A,id:D,name:R,helperText:z,FormHelperTextProps:U,label:j,InputLabelProps:_}=r,K=je(r,mB),ne=k.useRef(null),L=nt(n,ne),fe=nr(D),X=z&&fe?`${fe}-helper-text`:void 0,q=j&&fe?`${fe}-label`:void 0,te=H({},r,{color:i,disabled:l,error:u,focused:N,required:d,variant:c}),Z=bB(te),re=hB[c];return p.jsxs(gB,H({className:De(Z.root,s),ref:L,focused:N,onFocus:o,onBlur:a,disabled:l,variant:c,error:u,color:i,fullWidth:A,required:d,ownerState:te},K,{children:[p.jsx(Ul,H({htmlFor:fe,id:q},_,{children:j})),p.jsx(re,H({elements:g,areAllSectionsEmpty:x,onClick:E,onKeyDown:C,onKeyUp:T,onInput:S,onPaste:w,endAdornment:O,startAdornment:F,tabIndex:B,contentEditable:P,value:v,onChange:M,id:fe,fullWidth:A,inputProps:f,inputRef:h,sectionListRef:b,label:j,name:R,role:"group","aria-labelledby":q,"aria-describedby":X,"aria-live":X?"polite":void 0},m)),z&&p.jsx(lx,H({id:X},U,{children:z}))]}))}),xB=["enableAccessibleFieldDOMStructure"],CB=["InputProps","readOnly"],EB=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],vB=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=je(e,xB);if(t){const{InputProps:d,readOnly:m}=n,f=je(n,CB);return H({},f,{InputProps:H({},d??{},{readOnly:m})})}const{onPaste:r,onKeyDown:o,inputMode:a,readOnly:s,InputProps:i,inputProps:l,inputRef:u}=n,c=je(n,EB);return H({},c,{InputProps:H({},i??{},{readOnly:s}),inputProps:H({},l??{},{inputMode:a,onPaste:r,onKeyDown:o,ref:u})})},TB=["slots","slotProps","InputProps","inputProps"],jx=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiDateField"}),{slots:o,slotProps:a,InputProps:s,inputProps:i}=r,l=je(r,TB),u=r,c=o?.textField??(t.enableAccessibleFieldDOMStructure?yB:Rt),d=tt({elementType:c,externalSlotProps:a?.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});d.inputProps=H({},i,d.inputProps),d.InputProps=H({},s,d.InputProps);const m=O$(d),f=vB(m),h=P$(H({},f,{slots:o,slotProps:a}));return p.jsx(c,H({},h))}),Hx=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:s,timezone:i})=>{const l=Uo();return k.useCallback(u=>yi({adapter:l,value:u,timezone:i,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:s}})!==null,[l,e,t,n,r,o,a,s,i])},SB=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return H({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const a=o.newTimezone;if(n.getTimezone(r.currentMonth)===a)return r;let s=n.setTimezone(r.currentMonth,a);return n.getMonth(s)!==n.getMonth(r.currentMonth)&&(s=n.setMonth(s,n.getMonth(r.currentMonth))),H({},r,{currentMonth:s})}case"finishMonthSwitchingAnimation":return H({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const a=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return H({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:a&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:a?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},kB=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:i,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:d}=e,m=_t(),f=k.useRef(SB(!!u,a,m)).current,h=k.useMemo(()=>xr.getInitialReferenceValue({value:t,utils:m,timezone:d,props:e,referenceDate:n,granularity:fr.day}),[n,d]),[b,g]=k.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:h,currentMonth:m.startOfMonth(h),slideDirection:"left"});k.useEffect(()=>{g({type:"changeMonthTimezone",newTimezone:m.getTimezone(h)})},[h,m]);const x=k.useCallback(S=>{g(H({type:"changeMonth"},S)),l&&l(S.newMonth)},[l]),E=k.useCallback(S=>{const O=S;m.isSameMonth(O,b.currentMonth)||x({newMonth:m.startOfMonth(O),direction:m.isAfterDay(O,b.currentMonth)?"left":"right"})},[b.currentMonth,x,m]),C=Hx({shouldDisableDate:c,minDate:i,maxDate:s,disableFuture:r,disablePast:o,timezone:d}),T=k.useCallback(()=>{g({type:"finishMonthSwitchingAnimation"})},[]),w=Ae((S,O)=>{C(S)||g({type:"changeFocusedDay",focusedDay:S,withoutMonthSwitchingAnimation:O})});return{referenceDate:h,calendarState:b,changeMonth:E,changeFocusedDay:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:T,handleChangeMonth:x}},wB=e=>Fe("MuiPickersFadeTransitionGroup",e);Re("MuiPickersFadeTransitionGroup",["root"]);const _B=e=>{const{classes:t}=e;return Le({root:["root"]},wB,t)},IB=ae(gi,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Ux(e){const t=St({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,s=_B(t),i=no();return o?n:p.jsx(IB,{className:De(s.root,r),children:p.jsx(Oo,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:i.transitions.duration.enteringScreen,enter:i.transitions.duration.enteringScreen,exit:0},children:n},a)})}function AB(e){return Fe("MuiPickersDay",e)}const mo=Re("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),DB=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],PB=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:a,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:i,classes:l}=e,u=s&&!i;return Le({root:["root",t&&!u&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",s&&i&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},AB,l)},zx=({theme:e})=>H({},e.typography.caption,{width:Ks,height:Ks,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ut.alpha(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${mo.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${mo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${mo.disabled}:not(.${mo.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${mo.disabled}&.${mo.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Au}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${mo.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Vx=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},RB=ae(No,{name:"MuiPickersDay",slot:"Root",overridesResolver:Vx})(zx),MB=ae("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Vx})(({theme:e})=>H({},zx({theme:e}),{opacity:0,pointerEvents:"none"})),ds=()=>{},NB=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:a,day:s,disabled:i=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:c,onClick:d,onDaySelect:m,onFocus:f=ds,onBlur:h=ds,onKeyDown:b=ds,onMouseDown:g=ds,onMouseEnter:x=ds,outsideCurrentMonth:E,selected:C=!1,showDaysOutsideCurrentMonth:T=!1,children:w,today:S=!1}=r,O=je(r,DB),F=H({},r,{autoFocus:o,disabled:i,disableHighlightToday:l,disableMargin:u,selected:C,showDaysOutsideCurrentMonth:T,today:S}),B=PB(F),P=_t(),N=k.useRef(null),v=nt(N,n);Vt(()=>{o&&!i&&!c&&!E&&N.current.focus()},[o,i,c,E]);const M=D=>{g(D),E&&D.preventDefault()},A=D=>{i||m(s),E&&D.currentTarget.focus(),d&&d(D)};return E&&!T?p.jsx(MB,{className:De(B.root,B.hiddenDaySpacingFiller,a),ownerState:F,role:O.role}):p.jsx(RB,H({className:De(B.root,a),ref:v,centerRipple:!0,disabled:i,tabIndex:C?0:-1,onKeyDown:D=>b(D,s),onFocus:D=>f(D,s),onBlur:D=>h(D,s),onMouseEnter:D=>x(D,s),onClick:A,onMouseDown:M},O,{ownerState:F,children:w||P.format(s,"dayOfMonth")}))}),OB=k.memo(NB),LB=e=>Fe("MuiPickersSlideTransition",e),Mn=Re("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),FB=["children","className","reduceAnimations","slideDirection","transKey","classes"],$B=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Le(r,LB,t)},BB=ae(gi,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Mn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Mn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Mn.slideEnterActive}`]:t.slideEnterActive},{[`.${Mn.slideExit}`]:t.slideExit},{[`.${Mn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Mn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Mn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Mn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Mn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Mn.slideExit}`]:{transform:"translate(0%)"},[`& .${Mn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Mn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function jB(e){const t=St({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,s=je(t,FB),i=$B(t),l=no();if(o)return p.jsx("div",{className:De(i.root,r),children:n});const u={exit:i.exit,enterActive:i.enterActive,enter:i.enter,exitActive:i.exitActive};return p.jsx(BB,{className:De(i.root,r),childFactory:c=>k.cloneElement(c,{classNames:u}),role:"presentation",children:p.jsx(Bp,H({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},s,{children:n}),a)})}const HB=e=>Fe("MuiDayCalendar",e);Re("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const UB=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],zB=["ownerState"],VB=e=>{const{classes:t}=e;return Le({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},HB,t)},Wx=(Ks+Au*2)*6,WB=ae("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),qB=ae("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),YB=ae(Cn,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),GB=ae(Cn,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),KB=ae(Cn,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>H({},e.typography.caption,{width:Ks,height:Ks,padding:0,margin:`0 ${Au}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),QB=ae("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Wx}),XB=ae(jB,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:Wx}),ZB=ae("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),JB=ae("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Au}px 0`,display:"flex",justifyContent:"center"});function ej(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:a,currentMonthNumber:s,isViewFocused:i}=e,l=je(e,UB);const{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:m,slots:f,slotProps:h,timezone:b}=t,g=_t(),x=Iu(b),E=r!==null&&g.isSameDay(n,r),C=o.some(v=>g.isSameDay(v,n)),T=g.isSameDay(n,x),w=f?.day??OB,S=tt({elementType:w,externalSlotProps:h?.day,additionalProps:H({disableHighlightToday:c,showDaysOutsideCurrentMonth:m,role:"gridcell",isAnimating:d,"data-timestamp":g.toJsDate(n).valueOf()},l),ownerState:H({},t,{day:n,selected:C})}),O=je(S,zB),F=k.useMemo(()=>u||a(n),[u,a,n]),B=k.useMemo(()=>g.getMonth(n)!==s,[g,n,s]),P=k.useMemo(()=>{const v=g.startOfMonth(g.setMonth(n,s));return m?g.isSameDay(n,g.startOfWeek(v)):g.isSameDay(n,v)},[s,n,m,g]),N=k.useMemo(()=>{const v=g.endOfMonth(g.setMonth(n,s));return m?g.isSameDay(n,g.endOfWeek(v)):g.isSameDay(n,v)},[s,n,m,g]);return p.jsx(w,H({},O,{day:n,disabled:F,autoFocus:i&&E,today:T,outsideCurrentMonth:B,isFirstVisibleCell:P,isLastVisibleCell:N,selected:C,tabIndex:E?0:-1,"aria-selected":C,"aria-current":T?"date":void 0}))}function tj(e){const t=St({props:e,name:"MuiDayCalendar"}),n=_t(),{onFocusedDayChange:r,className:o,currentMonth:a,selectedDays:s,focusedDay:i,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:c,readOnly:d,reduceAnimations:m,renderLoading:f=()=>p.jsx("span",{children:"..."}),slideDirection:h,TransitionProps:b,disablePast:g,disableFuture:x,minDate:E,maxDate:C,shouldDisableDate:T,shouldDisableMonth:w,shouldDisableYear:S,dayOfWeekFormatter:O=de=>n.format(de,"weekdayShort").charAt(0).toUpperCase(),hasFocus:F,onFocusedViewChange:B,gridLabelId:P,displayWeekNumber:N,fixedWeekNumber:v,autoFocus:M,timezone:A}=t,D=Iu(A),R=VB(t),z=Yn(),U=Hx({shouldDisableDate:T,shouldDisableMonth:w,shouldDisableYear:S,minDate:E,maxDate:C,disablePast:g,disableFuture:x,timezone:A}),j=Hr(),[_,K]=_n({name:"DayCalendar",state:"hasFocus",controlled:F,default:M??!1}),[ne,L]=k.useState(()=>i||D),fe=Ae(de=>{d||u(de)}),X=de=>{U(de)||(r(de),L(de),B?.(!0),K(!0))},q=Ae((de,be)=>{switch(de.key){case"ArrowUp":X(n.addDays(be,-7)),de.preventDefault();break;case"ArrowDown":X(n.addDays(be,7)),de.preventDefault();break;case"ArrowLeft":{const le=n.addDays(be,z?1:-1),Pe=n.addMonths(be,z?1:-1),Te=Ns({utils:n,date:le,minDate:z?le:n.startOfMonth(Pe),maxDate:z?n.endOfMonth(Pe):le,isDateDisabled:U,timezone:A});X(Te||le),de.preventDefault();break}case"ArrowRight":{const le=n.addDays(be,z?-1:1),Pe=n.addMonths(be,z?-1:1),Te=Ns({utils:n,date:le,minDate:z?n.startOfMonth(Pe):le,maxDate:z?le:n.endOfMonth(Pe),isDateDisabled:U,timezone:A});X(Te||le),de.preventDefault();break}case"Home":X(n.startOfWeek(be)),de.preventDefault();break;case"End":X(n.endOfWeek(be)),de.preventDefault();break;case"PageUp":X(n.addMonths(be,1)),de.preventDefault();break;case"PageDown":X(n.addMonths(be,-1)),de.preventDefault();break}}),te=Ae((de,be)=>X(be)),Z=Ae((de,be)=>{_&&n.isSameDay(ne,be)&&B?.(!1)}),re=n.getMonth(a),Q=n.getYear(a),G=k.useMemo(()=>s.filter(de=>!!de).map(de=>n.startOfDay(de)),[n,s]),se=`${Q}-${re}`,J=k.useMemo(()=>k.createRef(),[se]),ee=k.useMemo(()=>{const de=n.startOfMonth(a),be=n.endOfMonth(a);return U(ne)||n.isAfterDay(ne,be)||n.isBeforeDay(ne,de)?Ns({utils:n,date:ne,minDate:de,maxDate:be,disablePast:g,disableFuture:x,isDateDisabled:U,timezone:A}):ne},[a,x,g,ne,U,n,A]),xe=k.useMemo(()=>{const de=n.getWeekArray(a);let be=n.addMonths(a,1);for(;v&&de.length<v;){const le=n.getWeekArray(be),Pe=n.isSameDay(de[de.length-1][0],le[0][0]);le.slice(Pe?1:0).forEach(Te=>{de.length<v&&de.push(Te)}),be=n.addMonths(be,1)}return de},[a,v,n]);return p.jsxs(WB,{role:"grid","aria-labelledby":P,className:R.root,children:[p.jsxs(qB,{role:"row",className:R.header,children:[N&&p.jsx(GB,{variant:"caption",role:"columnheader","aria-label":j.calendarWeekNumberHeaderLabel,className:R.weekNumberLabel,children:j.calendarWeekNumberHeaderText}),fF(n,D).map((de,be)=>p.jsx(YB,{variant:"caption",role:"columnheader","aria-label":n.format(de,"weekday"),className:R.weekDayLabel,children:O(de)},be.toString()))]}),l?p.jsx(QB,{className:R.loadingContainer,children:f()}):p.jsx(XB,H({transKey:se,onExited:c,reduceAnimations:m,slideDirection:h,className:De(o,R.slideTransition)},b,{nodeRef:J,children:p.jsx(ZB,{ref:J,role:"rowgroup",className:R.monthContainer,children:xe.map((de,be)=>p.jsxs(JB,{role:"row",className:R.weekContainer,"aria-rowindex":be+1,children:[N&&p.jsx(KB,{className:R.weekNumber,role:"rowheader","aria-label":j.calendarWeekNumberAriaLabelText(n.getWeekNumber(de[0])),children:j.calendarWeekNumberText(n.getWeekNumber(de[0]))}),de.map((le,Pe)=>p.jsx(ej,{parentProps:t,day:le,selectedDays:G,focusableDay:ee,onKeyDown:q,onFocus:te,onBlur:Z,onDaySelect:fe,isDateDisabled:U,currentMonthNumber:re,isViewFocused:_,"aria-colindex":Pe+1},le.toString()))]},`week-${de[0]}`))})}))]})}function nj(e){return Fe("MuiPickersMonth",e)}const ji=Re("MuiPickersMonth",["root","monthButton","disabled","selected"]),rj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],oj=e=>{const{disabled:t,selected:n,classes:r}=e;return Le({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},nj,r)},aj=ae("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),sj=ae("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${ji.disabled}`]:t.disabled},{[`&.${ji.selected}`]:t.selected}]})(({theme:e})=>H({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ji.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ji.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),ij=k.memo(function(t){const n=St({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:a,disabled:s,selected:i,value:l,tabIndex:u,onClick:c,onKeyDown:d,onFocus:m,onBlur:f,"aria-current":h,"aria-label":b,slots:g,slotProps:x}=n,E=je(n,rj),C=k.useRef(null),T=oj(n);Vt(()=>{r&&C.current?.focus()},[r]);const w=g?.monthButton??sj,S=tt({elementType:w,externalSlotProps:x?.monthButton,additionalProps:{children:a,disabled:s,tabIndex:u,ref:C,type:"button",role:"radio","aria-current":h,"aria-checked":i,"aria-label":b,onClick:O=>c(O,l),onKeyDown:O=>d(O,l),onFocus:O=>m(O,l),onBlur:O=>f(O,l)},ownerState:n,className:T.monthButton});return p.jsx(aj,H({className:De(T.root,o),ownerState:n},E,{children:p.jsx(w,H({},S))}))});function lj(e){return Fe("MuiMonthCalendar",e)}Re("MuiMonthCalendar",["root"]);const uj=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],cj=e=>{const{classes:t}=e;return Le({root:["root"]},lj,t)};function dj(e,t){const n=_t(),r=bi(),o=St({props:e,name:t});return H({disableFuture:!1,disablePast:!1},o,{minDate:Wn(n,o.minDate,r.minDate),maxDate:Wn(n,o.maxDate,r.maxDate)})}const pj=ae("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Du,boxSizing:"border-box"}),fj=k.forwardRef(function(t,n){const r=dj(t,"MuiMonthCalendar"),{className:o,value:a,defaultValue:s,referenceDate:i,disabled:l,disableFuture:u,disablePast:c,maxDate:d,minDate:m,onChange:f,shouldDisableMonth:h,readOnly:b,autoFocus:g=!1,onMonthFocus:x,hasFocus:E,onFocusedViewChange:C,monthsPerRow:T=3,timezone:w,gridLabelId:S,slots:O,slotProps:F}=r,B=je(r,uj),{value:P,handleValueChange:N,timezone:v}=ef({name:"MonthCalendar",timezone:w,value:a,defaultValue:s,referenceDate:i,onChange:f,valueManager:xr}),M=Iu(v),A=Yn(),D=_t(),R=k.useMemo(()=>xr.getInitialReferenceValue({value:P,utils:D,props:r,timezone:v,referenceDate:i,granularity:fr.month}),[]),z=r,U=cj(z),j=k.useMemo(()=>D.getMonth(M),[D,M]),_=k.useMemo(()=>P!=null?D.getMonth(P):null,[P,D]),[K,ne]=k.useState(()=>_||D.getMonth(R)),[L,fe]=_n({name:"MonthCalendar",state:"hasFocus",controlled:E,default:g??!1}),X=Ae(se=>{fe(se),C&&C(se)}),q=k.useCallback(se=>{const J=D.startOfMonth(c&&D.isAfter(M,m)?M:m),ee=D.startOfMonth(u&&D.isBefore(M,d)?M:d),xe=D.startOfMonth(se);return D.isBefore(xe,J)||D.isAfter(xe,ee)?!0:h?h(xe):!1},[u,c,d,m,M,h,D]),te=Ae((se,J)=>{if(b)return;const ee=D.setMonth(P??R,J);N(ee)}),Z=Ae(se=>{q(D.setMonth(P??R,se))||(ne(se),X(!0),x&&x(se))});k.useEffect(()=>{ne(se=>_!==null&&se!==_?_:se)},[_]);const re=Ae((se,J)=>{switch(se.key){case"ArrowUp":Z((12+J-3)%12),se.preventDefault();break;case"ArrowDown":Z((12+J+3)%12),se.preventDefault();break;case"ArrowLeft":Z((12+J+(A?1:-1))%12),se.preventDefault();break;case"ArrowRight":Z((12+J+(A?-1:1))%12),se.preventDefault();break}}),Q=Ae((se,J)=>{Z(J)}),G=Ae((se,J)=>{K===J&&X(!1)});return p.jsx(pj,H({ref:n,className:De(U.root,o),ownerState:z,role:"radiogroup","aria-labelledby":S},B,{children:Kp(D,P??R).map(se=>{const J=D.getMonth(se),ee=D.format(se,"monthShort"),xe=D.format(se,"month"),de=J===_,be=l||q(se);return p.jsx(ij,{selected:de,value:J,onClick:te,onKeyDown:re,autoFocus:L&&J===K,disabled:be,tabIndex:J===K&&!be?0:-1,onFocus:Q,onBlur:G,"aria-current":j===J?"date":void 0,"aria-label":xe,monthsPerRow:T,slots:O,slotProps:F,children:ee},ee)})}))});function mj(e){return Fe("MuiPickersYear",e)}const Hi=Re("MuiPickersYear",["root","yearButton","selected","disabled"]),hj=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],gj=e=>{const{disabled:t,selected:n,classes:r}=e;return Le({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},mj,r)},bj=ae("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),yj=ae("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Hi.disabled}`]:t.disabled},{[`&.${Hi.selected}`]:t.selected}]})(({theme:e})=>H({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ut.alpha(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Hi.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Hi.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),xj=k.memo(function(t){const n=St({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:a,disabled:s,selected:i,value:l,tabIndex:u,onClick:c,onKeyDown:d,onFocus:m,onBlur:f,"aria-current":h,slots:b,slotProps:g}=n,x=je(n,hj),E=k.useRef(null),C=gj(n);Vt(()=>{r&&E.current?.focus()},[r]);const T=b?.yearButton??yj,w=tt({elementType:T,externalSlotProps:g?.yearButton,additionalProps:{children:a,disabled:s,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":h,"aria-checked":i,onClick:S=>c(S,l),onKeyDown:S=>d(S,l),onFocus:S=>m(S,l),onBlur:S=>f(S,l)},ownerState:n,className:C.yearButton});return p.jsx(bj,H({className:De(C.root,o),ownerState:n},x,{children:p.jsx(T,H({},w))}))});function Cj(e){return Fe("MuiYearCalendar",e)}Re("MuiYearCalendar",["root"]);const Ej=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],vj=e=>{const{classes:t}=e;return Le({root:["root"]},Cj,t)};function Tj(e,t){const n=_t(),r=bi(),o=St({props:e,name:t});return H({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Wn(n,o.minDate,r.minDate),maxDate:Wn(n,o.maxDate,r.maxDate)})}const Sj=ae("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Du,maxHeight:Q7,boxSizing:"border-box",position:"relative"}),kj=k.forwardRef(function(t,n){const r=Tj(t,"MuiYearCalendar"),{autoFocus:o,className:a,value:s,defaultValue:i,referenceDate:l,disabled:u,disableFuture:c,disablePast:d,maxDate:m,minDate:f,onChange:h,readOnly:b,shouldDisableYear:g,onYearFocus:x,hasFocus:E,onFocusedViewChange:C,yearsOrder:T="asc",yearsPerRow:w,timezone:S,gridLabelId:O,slots:F,slotProps:B}=r,P=je(r,Ej),{value:N,handleValueChange:v,timezone:M}=ef({name:"YearCalendar",timezone:S,value:s,defaultValue:i,referenceDate:l,onChange:h,valueManager:xr}),A=Iu(M),D=Yn(),R=_t(),z=k.useMemo(()=>xr.getInitialReferenceValue({value:N,utils:R,props:r,timezone:M,referenceDate:l,granularity:fr.year}),[]),U=r,j=vj(U),_=k.useMemo(()=>R.getYear(A),[R,A]),K=k.useMemo(()=>N!=null?R.getYear(N):null,[N,R]),[ne,L]=k.useState(()=>K||R.getYear(z)),[fe,X]=_n({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),q=Ae(le=>{X(le),C&&C(le)}),te=k.useCallback(le=>{if(d&&R.isBeforeYear(le,A)||c&&R.isAfterYear(le,A)||f&&R.isBeforeYear(le,f)||m&&R.isAfterYear(le,m))return!0;if(!g)return!1;const Pe=R.startOfYear(le);return g(Pe)},[c,d,m,f,A,g,R]),Z=Ae((le,Pe)=>{if(b)return;const Te=R.setYear(N??z,Pe);v(Te)}),re=Ae(le=>{te(R.setYear(N??z,le))||(L(le),q(!0),x?.(le))});k.useEffect(()=>{L(le=>K!==null&&le!==K?K:le)},[K]);const Q=T!=="desc"?w*1:w*-1,G=D&&T==="asc"||!D&&T==="desc"?-1:1,se=Ae((le,Pe)=>{switch(le.key){case"ArrowUp":re(Pe-Q),le.preventDefault();break;case"ArrowDown":re(Pe+Q),le.preventDefault();break;case"ArrowLeft":re(Pe-G),le.preventDefault();break;case"ArrowRight":re(Pe+G),le.preventDefault();break}}),J=Ae((le,Pe)=>{re(Pe)}),ee=Ae((le,Pe)=>{ne===Pe&&q(!1)}),xe=k.useRef(null),de=nt(n,xe);k.useEffect(()=>{if(o||xe.current===null)return;const le=xe.current.querySelector('[tabindex="0"]');if(!le)return;const Pe=le.offsetHeight,Te=le.offsetTop,ze=xe.current.clientHeight,we=xe.current.scrollTop,Et=Te+Pe;Pe>ze||Te<we||(xe.current.scrollTop=Et-ze/2-Pe/2)},[o]);const be=R.getYearRange([f,m]);return T==="desc"&&be.reverse(),p.jsx(Sj,H({ref:de,className:De(j.root,a),ownerState:U,role:"radiogroup","aria-labelledby":O},P,{children:be.map(le=>{const Pe=R.getYear(le),Te=Pe===K,ze=u||te(le);return p.jsx(xj,{selected:Te,value:Pe,onClick:Z,onKeyDown:se,autoFocus:fe&&Pe===ne,disabled:ze,tabIndex:Pe===ne&&!ze?0:-1,onFocus:J,onBlur:ee,"aria-current":_===Pe?"date":void 0,yearsPerRow:w,slots:F,slotProps:B,children:R.format(le,"year")},R.format(le,"year"))})}))}),wj=e=>Fe("MuiPickersCalendarHeader",e),_j=Re("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function Ij(e){return Fe("MuiPickersArrowSwitcher",e)}Re("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Aj=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],Dj=["ownerState"],Pj=["ownerState"],Rj=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Mj=ae("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Zg=ae(yr,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Nj=e=>{const{classes:t}=e;return Le({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Ij,t)},Oj=k.forwardRef(function(t,n){const r=Yn(),o=St({props:t,name:"MuiPickersArrowSwitcher"}),{children:a,className:s,slots:i,slotProps:l,isNextDisabled:u,isNextHidden:c,onGoToNext:d,nextLabel:m,isPreviousDisabled:f,isPreviousHidden:h,onGoToPrevious:b,previousLabel:g,labelId:x}=o,E=je(o,Aj),C=o,T=Nj(C),w={isDisabled:u,isHidden:c,goTo:d,label:m},S={isDisabled:f,isHidden:h,goTo:b,label:g},O=i?.previousIconButton??Zg,F=tt({elementType:O,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:H({},C,{hidden:S.isHidden}),className:De(T.button,T.previousIconButton)}),B=i?.nextIconButton??Zg,P=tt({elementType:B,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:H({},C,{hidden:w.isHidden}),className:De(T.button,T.nextIconButton)}),N=i?.leftArrowIcon??p$,v=tt({elementType:N,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:T.leftArrowIcon}),M=je(v,Dj),A=i?.rightArrowIcon??f$,D=tt({elementType:A,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:C,className:T.rightArrowIcon}),R=je(D,Pj);return p.jsxs(Rj,H({ref:n,className:De(T.root,s),ownerState:C},E,{children:[p.jsx(O,H({},F,{children:r?p.jsx(A,H({},R)):p.jsx(N,H({},M))})),a?p.jsx(Cn,{variant:"subtitle1",component:"span",id:x,children:a}):p.jsx(Mj,{className:T.spacer,ownerState:C}),p.jsx(B,H({},P,{children:r?p.jsx(N,H({},M)):p.jsx(A,H({},R))}))]}))});function Lj(e,{disableFuture:t,maxDate:n,timezone:r}){const o=_t();return k.useMemo(()=>{const a=o.date(void 0,r),s=o.startOfMonth(t&&o.isBefore(a,n)?a:n);return!o.isAfter(s,e)},[t,n,e,o,r])}function Fj(e,{disablePast:t,minDate:n,timezone:r}){const o=_t();return k.useMemo(()=>{const a=o.date(void 0,r),s=o.startOfMonth(t&&o.isAfter(a,n)?a:n);return!o.isBefore(s,e)},[t,n,e,o,r])}const $j=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Bj=["ownerState"],jj=e=>{const{classes:t}=e;return Le({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},wj,t)},Hj=ae("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Uj=ae("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>H({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),zj=ae("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Vj=ae(yr,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${_j.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Wj=ae(d$,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),qj=k.forwardRef(function(t,n){const r=Hr(),o=_t(),a=St({props:t,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:i,currentMonth:l,disabled:u,disableFuture:c,disablePast:d,maxDate:m,minDate:f,onMonthChange:h,onViewChange:b,view:g,reduceAnimations:x,views:E,labelId:C,className:T,timezone:w,format:S=`${o.formats.month} ${o.formats.year}`}=a,O=je(a,$j),F=a,B=jj(a),P=s?.switchViewButton??Vj,N=tt({elementType:P,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(g)},ownerState:F,className:B.switchViewButton}),v=s?.switchViewIcon??Wj,M=tt({elementType:v,externalSlotProps:i?.switchViewIcon,ownerState:F,className:B.switchViewIcon}),A=je(M,Bj),D=()=>h(o.addMonths(l,1),"left"),R=()=>h(o.addMonths(l,-1),"right"),z=Lj(l,{disableFuture:c,maxDate:m,timezone:w}),U=Fj(l,{disablePast:d,minDate:f,timezone:w}),j=()=>{if(!(E.length===1||!b||u))if(E.length===2)b(E.find(K=>K!==g)||E[0]);else{const K=E.indexOf(g)!==0?0:1;b(E[K])}};if(E.length===1&&E[0]==="year")return null;const _=o.formatByString(l,S);return p.jsxs(Hj,H({},O,{ownerState:F,className:De(B.root,T),ref:n,children:[p.jsxs(Uj,{role:"presentation",onClick:j,ownerState:F,"aria-live":"polite",className:B.labelContainer,children:[p.jsx(Ux,{reduceAnimations:x,transKey:_,children:p.jsx(zj,{id:C,ownerState:F,className:B.label,children:_})}),E.length>1&&!u&&p.jsx(P,H({},N,{children:p.jsx(v,H({},A))}))]}),p.jsx(Oo,{in:g==="day",appear:!x,enter:!x,children:p.jsx(Oj,{slots:s,slotProps:i,onGoToPrevious:R,isPreviousDisabled:U,previousLabel:r.previousMonth,onGoToNext:D,isNextDisabled:z,nextLabel:r.nextMonth})})]}))}),Yj=ae("div")({overflow:"hidden",width:Du,maxHeight:tf,display:"flex",flexDirection:"column",margin:"0 auto"}),Gj=e=>Fe("MuiDateCalendar",e);Re("MuiDateCalendar",["root","viewTransitionContainer"]);const Kj=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Qj=e=>{const{classes:t}=e;return Le({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Gj,t)};function Xj(e,t){const n=_t(),r=bi(),o=kx(),a=St({props:e,name:t});return H({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??o,renderLoading:a.renderLoading??(()=>p.jsx("span",{children:"..."})),minDate:Wn(n,a.minDate,r.minDate),maxDate:Wn(n,a.maxDate,r.maxDate)})}const Zj=ae(Yj,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:tf}),Jj=ae(Ux,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),eH=k.forwardRef(function(t,n){const r=_t(),o=nr(),a=Xj(t,"MuiDateCalendar"),{autoFocus:s,onViewChange:i,value:l,defaultValue:u,referenceDate:c,disableFuture:d,disablePast:m,onChange:f,onYearChange:h,onMonthChange:b,reduceAnimations:g,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:C,view:T,views:w,openTo:S,className:O,disabled:F,readOnly:B,minDate:P,maxDate:N,disableHighlightToday:v,focusedView:M,onFocusedViewChange:A,showDaysOutsideCurrentMonth:D,fixedWeekNumber:R,dayOfWeekFormatter:z,slots:U,slotProps:j,loading:_,renderLoading:K,displayWeekNumber:ne,yearsOrder:L,yearsPerRow:fe,monthsPerRow:X,timezone:q}=a,te=je(a,Kj),{value:Z,handleValueChange:re,timezone:Q}=ef({name:"DateCalendar",timezone:q,value:l,defaultValue:u,referenceDate:c,onChange:f,valueManager:xr}),{view:G,setView:se,focusedView:J,setFocusedView:ee,goToNextView:xe,setValueAndGoToNextView:de}=wx({view:T,views:w,openTo:S,onChange:re,onViewChange:i,autoFocus:s,focusedView:M,onFocusedViewChange:A}),{referenceDate:be,calendarState:le,changeFocusedDay:Pe,changeMonth:Te,handleChangeMonth:ze,isDateDisabled:we,onMonthSwitchingAnimationEnd:Et}=kB({value:Z,referenceDate:c,reduceAnimations:g,onMonthChange:b,minDate:P,maxDate:N,shouldDisableDate:x,disablePast:m,disableFuture:d,timezone:Q}),st=F&&Z||P,qe=F&&Z||N,ue=`${o}-grid-label`,Ee=J!==null,Me=U?.calendarHeader??qj,He=tt({elementType:Me,externalSlotProps:j?.calendarHeader,additionalProps:{views:w,view:G,currentMonth:le.currentMonth,onViewChange:se,onMonthChange:(We,kt)=>ze({newMonth:We,direction:kt}),minDate:st,maxDate:qe,disabled:F,disablePast:m,disableFuture:d,reduceAnimations:g,timezone:Q,labelId:ue},ownerState:a}),Be=Ae(We=>{const kt=r.startOfMonth(We),Pt=r.endOfMonth(We),bt=we(We)?Ns({utils:r,date:We,minDate:r.isBefore(P,kt)?kt:P,maxDate:r.isAfter(N,Pt)?Pt:N,disablePast:m,disableFuture:d,isDateDisabled:we,timezone:Q}):We;bt?(de(bt,"finish"),b?.(kt)):(xe(),Te(kt)),Pe(bt,!0)}),Ne=Ae(We=>{const kt=r.startOfYear(We),Pt=r.endOfYear(We),bt=we(We)?Ns({utils:r,date:We,minDate:r.isBefore(P,kt)?kt:P,maxDate:r.isAfter(N,Pt)?Pt:N,disablePast:m,disableFuture:d,isDateDisabled:we,timezone:Q}):We;bt?(de(bt,"finish"),h?.(bt)):(xe(),Te(kt)),Pe(bt,!0)}),Ze=Ae(We=>re(We&&Vl(r,We,Z??be),"finish",G));k.useEffect(()=>{Z!=null&&r.isValid(Z)&&Te(Z)},[Z]);const ht=a,pt=Qj(ht),ie={disablePast:m,disableFuture:d,maxDate:N,minDate:P},ye={disableHighlightToday:v,readOnly:B,disabled:F,timezone:Q,gridLabelId:ue,slots:U,slotProps:j},ve=k.useRef(G);k.useEffect(()=>{ve.current!==G&&(J===ve.current&&ee(G,!0),ve.current=G)},[J,ee,G]);const $e=k.useMemo(()=>[Z],[Z]);return p.jsxs(Zj,H({ref:n,className:De(pt.root,O),ownerState:ht},te,{children:[p.jsx(Me,H({},He,{slots:U,slotProps:j})),p.jsx(Jj,{reduceAnimations:g,className:pt.viewTransitionContainer,transKey:G,ownerState:ht,children:p.jsxs("div",{children:[G==="year"&&p.jsx(kj,H({},ie,ye,{value:Z,onChange:Ne,shouldDisableYear:C,hasFocus:Ee,onFocusedViewChange:We=>ee("year",We),yearsOrder:L,yearsPerRow:fe,referenceDate:be})),G==="month"&&p.jsx(fj,H({},ie,ye,{hasFocus:Ee,className:O,value:Z,onChange:Be,shouldDisableMonth:E,onFocusedViewChange:We=>ee("month",We),monthsPerRow:X,referenceDate:be})),G==="day"&&p.jsx(tj,H({},le,ie,ye,{onMonthSwitchingAnimationEnd:Et,onFocusedDayChange:Pe,reduceAnimations:g,selectedDays:$e,onSelectedDaysChange:Ze,shouldDisableDate:x,shouldDisableMonth:E,shouldDisableYear:C,hasFocus:Ee,onFocusedViewChange:We=>ee("day",We),showDaysOutsideCurrentMonth:D,fixedWeekNumber:R,dayOfWeekFormatter:z,displayWeekNumber:ne,loading:_,renderLoading:K}))]})})]}))}),ga=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:a,defaultValue:s,referenceDate:i,onChange:l,className:u,classes:c,disableFuture:d,disablePast:m,minDate:f,maxDate:h,shouldDisableDate:b,shouldDisableMonth:g,shouldDisableYear:x,reduceAnimations:E,onMonthChange:C,monthsPerRow:T,onYearChange:w,yearsOrder:S,yearsPerRow:O,slots:F,slotProps:B,loading:P,renderLoading:N,disableHighlightToday:v,readOnly:M,disabled:A,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:R,sx:z,autoFocus:U,fixedWeekNumber:j,displayWeekNumber:_,timezone:K})=>p.jsx(eH,{view:e,onViewChange:t,views:n.filter(Fg),focusedView:r&&Fg(r)?r:null,onFocusedViewChange:o,value:a,defaultValue:s,referenceDate:i,onChange:l,className:u,classes:c,disableFuture:d,disablePast:m,minDate:f,maxDate:h,shouldDisableDate:b,shouldDisableMonth:g,shouldDisableYear:x,reduceAnimations:E,onMonthChange:C,monthsPerRow:T,onYearChange:w,yearsOrder:S,yearsPerRow:O,slots:F,slotProps:B,loading:P,renderLoading:N,disableHighlightToday:v,readOnly:M,disabled:A,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:R,sx:z,autoFocus:U,fixedWeekNumber:j,displayWeekNumber:_,timezone:K}),qx=k.forwardRef(function(t,n){const r=Hr(),o=_t(),a=Cx(t,"MuiDesktopDatePicker"),s=H({day:ga,month:ga,year:ga},a.viewRenderers),i=H({},a,{viewRenderers:s,format:Qp(o,a,!1),yearsPerRow:a.yearsPerRow??4,slots:H({openPickerIcon:m$,field:jx},a.slots),slotProps:H({},a.slotProps,{field:u=>H({},jn(a.slotProps?.field,u),vx(a),{ref:n}),toolbar:H({hidden:!0},a.slotProps?.toolbar)})}),{renderPicker:l}=c$({props:i,valueManager:xr,valueType:"date",getOpenDialogAriaText:yx({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:i.localeText?.openDatePickerDialogue}),validator:yi});return l()});qx.propTypes={autoFocus:ce.bool,className:ce.string,closeOnSelect:ce.bool,dayOfWeekFormatter:ce.func,defaultValue:ce.object,disabled:ce.bool,disableFuture:ce.bool,disableHighlightToday:ce.bool,disableOpenPicker:ce.bool,disablePast:ce.bool,displayWeekNumber:ce.bool,enableAccessibleFieldDOMStructure:ce.any,fixedWeekNumber:ce.number,format:ce.string,formatDensity:ce.oneOf(["dense","spacious"]),inputRef:My,label:ce.node,loading:ce.bool,localeText:ce.object,maxDate:ce.object,minDate:ce.object,monthsPerRow:ce.oneOf([3,4]),name:ce.string,onAccept:ce.func,onChange:ce.func,onClose:ce.func,onError:ce.func,onMonthChange:ce.func,onOpen:ce.func,onSelectedSectionsChange:ce.func,onViewChange:ce.func,onYearChange:ce.func,open:ce.bool,openTo:ce.oneOf(["day","month","year"]),orientation:ce.oneOf(["landscape","portrait"]),readOnly:ce.bool,reduceAnimations:ce.bool,referenceDate:ce.object,renderLoading:ce.func,selectedSections:ce.oneOfType([ce.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ce.number]),shouldDisableDate:ce.func,shouldDisableMonth:ce.func,shouldDisableYear:ce.func,showDaysOutsideCurrentMonth:ce.bool,slotProps:ce.object,slots:ce.object,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),timezone:ce.string,value:ce.object,view:ce.oneOf(["day","month","year"]),viewRenderers:ce.shape({day:ce.func,month:ce.func,year:ce.func}),views:ce.arrayOf(ce.oneOf(["day","month","year"]).isRequired),yearsOrder:ce.oneOf(["asc","desc"]),yearsPerRow:ce.oneOf([3,4])};function tH(e){return Fe("MuiDialogContent",e)}Re("MuiDialogContent",["root","dividers"]);function nH(e){return Fe("MuiDialogTitle",e)}const rH=Re("MuiDialogTitle",["root"]),oH=e=>{const{classes:t,dividers:n}=e;return Le({root:["root",n&&"dividers"]},tH,t)},aH=ae("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Je(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${rH.root} + &`]:{paddingTop:0}}}]}))),Sr=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogContent"}),{className:o,dividers:a=!1,...s}=r,i={...r,dividers:a},l=oH(i);return p.jsx(aH,{className:De(l.root,o),ownerState:i,ref:n,...s})});function sH(e){return Fe("MuiDialog",e)}const Os=Re("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Yx=k.createContext({}),iH=ae(nx,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),lH=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,s={root:["root"],container:["container",`scroll${ke(n)}`],paper:["paper",`paperScroll${ke(n)}`,`paperWidth${ke(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return Le(s,sH,t)},uH=ae(rx,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),cH=ae("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ke(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),dH=ae(Ho,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ke(n.scroll)}`],t[`paperWidth${ke(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Je(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Os.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Os.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Os.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),kr=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialog"}),o=no(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":i,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:c,children:d,className:m,disableEscapeKeyDown:f=!1,fullScreen:h=!1,fullWidth:b=!1,maxWidth:g="sm",onClick:x,onClose:E,open:C,PaperComponent:T=Ho,PaperProps:w={},scroll:S="paper",slots:O={},slotProps:F={},TransitionComponent:B=Oo,transitionDuration:P=a,TransitionProps:N,...v}=r,M={...r,disableEscapeKeyDown:f,fullScreen:h,fullWidth:b,maxWidth:g,scroll:S},A=lH(M),D=k.useRef(),R=J=>{D.current=J.target===J.currentTarget},z=J=>{x&&x(J),D.current&&(D.current=null,E&&E(J,"backdropClick"))},U=nr(i),j=k.useMemo(()=>({titleId:U}),[U]),_={transition:B,...O},K={transition:N,paper:w,backdrop:c,...F},ne={slots:_,slotProps:K},[L,fe]=ct("root",{elementType:uH,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:M,className:De(A.root,m),ref:n}),[X,q]=ct("backdrop",{elementType:iH,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:M}),[te,Z]=ct("paper",{elementType:dH,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:M,className:De(A.paper,w.className)}),[re,Q]=ct("container",{elementType:cH,externalForwardedProps:ne,ownerState:M,className:A.container}),[G,se]=ct("transition",{elementType:Oo,externalForwardedProps:ne,ownerState:M,additionalProps:{appear:!0,in:C,timeout:P,role:"presentation"}});return p.jsx(L,{closeAfterTransition:!0,slots:{backdrop:X},slotProps:{backdrop:{transitionDuration:P,as:u,...q}},disableEscapeKeyDown:f,onClose:E,open:C,onClick:z,...fe,...v,children:p.jsx(G,{...se,children:p.jsx(re,{onMouseDown:R,...Q,children:p.jsx(te,{as:T,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":U,"aria-modal":l,...Z,children:p.jsx(Yx.Provider,{value:j,children:d})})})})})}),pH=ae(kr)({[`& .${Os.container}`]:{outline:0},[`& .${Os.paper}`]:{outline:0,minWidth:Du}}),fH=ae(Sr)({"&:first-of-type":{padding:0}});function mH(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:a}=e,s=o?.dialog??pH,i=o?.mobileTransition??Oo;return p.jsx(s,H({open:r,onClose:n},a?.dialog,{TransitionComponent:i,TransitionProps:a?.mobileTransition,PaperComponent:o?.mobilePaper,PaperProps:a?.mobilePaper,children:p.jsx(fH,{children:t})}))}const hH=["props","getOpenDialogAriaText"],gH=e=>{let{props:t,getOpenDialogAriaText:n}=e,r=je(e,hH);const{slots:o,slotProps:a,className:s,sx:i,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:d,onSelectedSectionsChange:m,timezone:f,name:h,label:b,inputRef:g,readOnly:x,disabled:E,localeText:C}=t,T=k.useRef(null),w=nr(),S=a?.toolbar?.hidden??!1,{open:O,actions:F,layoutProps:B,renderCurrentView:P,fieldProps:N,contextValue:v}=_x(H({},r,{props:t,fieldRef:T,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),M=o.field,A=tt({elementType:M,externalSlotProps:a?.field,additionalProps:H({},N,S&&{id:w},!(E||x)&&{onClick:F.onOpen,onKeyDown:a7(F.onOpen)},{readOnly:x??!0,disabled:E,className:s,sx:i,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:c,selectedSections:d,onSelectedSectionsChange:m,timezone:f,label:b,name:h},g?{inputRef:g}:{}),ownerState:t});A.inputProps=H({},A.inputProps,{"aria-label":n(N.value)});const D=H({textField:o.textField},A.slots),R=o.layout??Px;let z=w;S&&(b?z=`${w}-label`:z=void 0);const U=H({},a,{toolbar:H({},a?.toolbar,{titleId:w}),mobilePaper:H({"aria-labelledby":z},a?.mobilePaper)}),j=nt(T,A.unstableFieldRef);return{renderPicker:()=>p.jsxs(Rx,{contextValue:v,localeText:C,children:[p.jsx(M,H({},A,{slots:D,slotProps:U,unstableFieldRef:j})),p.jsx(mH,H({},F,{open:O,slots:o,slotProps:U,children:p.jsx(R,H({},B,U?.layout,{slots:o,slotProps:U,children:P()}))}))]})}},Gx=k.forwardRef(function(t,n){const r=Hr(),o=_t(),a=Cx(t,"MuiMobileDatePicker"),s=H({day:ga,month:ga,year:ga},a.viewRenderers),i=H({},a,{viewRenderers:s,format:Qp(o,a,!1),slots:H({field:jx},a.slots),slotProps:H({},a.slotProps,{field:u=>H({},jn(a.slotProps?.field,u),vx(a),{ref:n}),toolbar:H({hidden:!1},a.slotProps?.toolbar)})}),{renderPicker:l}=gH({props:i,valueManager:xr,valueType:"date",getOpenDialogAriaText:yx({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:i.localeText?.openDatePickerDialogue}),validator:yi});return l()});Gx.propTypes={autoFocus:ce.bool,className:ce.string,closeOnSelect:ce.bool,dayOfWeekFormatter:ce.func,defaultValue:ce.object,disabled:ce.bool,disableFuture:ce.bool,disableHighlightToday:ce.bool,disableOpenPicker:ce.bool,disablePast:ce.bool,displayWeekNumber:ce.bool,enableAccessibleFieldDOMStructure:ce.any,fixedWeekNumber:ce.number,format:ce.string,formatDensity:ce.oneOf(["dense","spacious"]),inputRef:My,label:ce.node,loading:ce.bool,localeText:ce.object,maxDate:ce.object,minDate:ce.object,monthsPerRow:ce.oneOf([3,4]),name:ce.string,onAccept:ce.func,onChange:ce.func,onClose:ce.func,onError:ce.func,onMonthChange:ce.func,onOpen:ce.func,onSelectedSectionsChange:ce.func,onViewChange:ce.func,onYearChange:ce.func,open:ce.bool,openTo:ce.oneOf(["day","month","year"]),orientation:ce.oneOf(["landscape","portrait"]),readOnly:ce.bool,reduceAnimations:ce.bool,referenceDate:ce.object,renderLoading:ce.func,selectedSections:ce.oneOfType([ce.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),ce.number]),shouldDisableDate:ce.func,shouldDisableMonth:ce.func,shouldDisableYear:ce.func,showDaysOutsideCurrentMonth:ce.bool,slotProps:ce.object,slots:ce.object,sx:ce.oneOfType([ce.arrayOf(ce.oneOfType([ce.func,ce.object,ce.bool])),ce.func,ce.object]),timezone:ce.string,value:ce.object,view:ce.oneOf(["day","month","year"]),viewRenderers:ce.shape({day:ce.func,month:ce.func,year:ce.func}),views:ce.arrayOf(ce.oneOf(["day","month","year"]).isRequired),yearsOrder:ce.oneOf(["asc","desc"]),yearsPerRow:ce.oneOf([3,4])};const bH=["desktopModeMediaQuery"],Mc=k.forwardRef(function(t,n){const r=St({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=s7}=r,a=je(r,bH);return dx(o,{defaultMatches:!0})?p.jsx(qx,H({ref:n},a)):p.jsx(Gx,H({ref:n},a))});var ll={exports:{}},yH=ll.exports,Jg;function xH(){return Jg||(Jg=1,(function(e,t){(function(n,r){e.exports=r()})(yH,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(a,s,i){var l=s.prototype;i.utc=function(b){var g={date:b,utc:!0,args:arguments};return new s(g)},l.utc=function(b){var g=i(this.toDate(),{locale:this.$L,utc:!0});return b?g.add(this.utcOffset(),n):g},l.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),u.call(this,b)};var c=l.init;l.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else c.call(this)};var d=l.utcOffset;l.utcOffset=function(b,g){var x=this.$utils().u;if(x(b))return this.$u?0:x(this.$offset)?d.call(this):this.$offset;if(typeof b=="string"&&(b=(function(w){w===void 0&&(w="");var S=w.match(r);if(!S)return null;var O=(""+S[0]).match(o)||["-",0,0],F=O[0],B=60*+O[1]+ +O[2];return B===0?0:F==="+"?B:-B})(b),b===null))return this;var E=Math.abs(b)<=16?60*b:b;if(E===0)return this.utc(g);var C=this.clone();if(g)return C.$offset=E,C.$u=!1,C;var T=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(E+T,n)).$offset=E,C.$x.$localOffset=T,C};var m=l.format;l.format=function(b){var g=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,g)},l.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var f=l.toDate;l.toDate=function(b){return b==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=l.diff;l.diff=function(b,g,x){if(b&&this.$u===b.$u)return h.call(this,b,g,x);var E=this.local(),C=i(b).local();return h.call(E,C,g,x)}}}))})(ll)),ll.exports}var CH=xH();const EH=tr(CH);yt.extend(EH);function Nc(e){switch(e){case"Star":return["Equals","Contains"];case"MinMax":return["Equals","Less Than","Greater Than","Between"];case"DateMinMax":return["Equals","Before","After","Between"];case"Retrieval":return["Semantic Search"];case"Boolean":return["Equals"];case"NONE":default:return[]}}function vH(e){return e==="DateMinMax"}function Oc(e){return e==="Between"}function Kx({spec:e,values:t,selection:n,onChange:r,retrievalFn:o}){const a=()=>n?.matchType?n.matchType:e.filterType==="DateMinMax"?"Between":Nc(e.filterType)[0]||"Equals",[s,i]=W.useState(a()),[l,u]=W.useState(n?.value??""),[c,d]=W.useState(n?.value2??""),[m,f]=W.useState([]),[h,b]=W.useState(!1),[g,x]=W.useState(""),[E,C]=W.useState(!1),[T,w]=W.useState(!1),S=W.useRef(null),O=W.useRef(0),[F,B]=W.useState(!1);W.useEffect(()=>{if(e.filterType!=="Retrieval"||!o)return;const _=g.trim();if(_.length<=2){f([]),C(!1);return}return S.current&&clearTimeout(S.current),S.current=setTimeout(async()=>{O.current+=1;const K=O.current;b(!0);try{const ne=await o(_,e);K===O.current&&f(ne)}catch(ne){K===O.current&&(console.error("Retrieval failed",ne),f([]))}finally{K===O.current&&(b(!1),C(!0))}},500),()=>{S.current&&clearTimeout(S.current)}},[g,e,o]),W.useEffect(()=>{n===null?(u(""),d(""),i(e.filterType==="DateMinMax"?"Between":Nc(e.filterType)[0]||"Equals")):n&&(i(n.matchType),u(n.value??""),d(n.value2??""))},[n,e.filterType]);const P=Nc(e.filterType),N=vH(e.filterType),v=Oc(s),M=N&&t.length>=2&&t[0].value instanceof Date?yt.utc(t[0].value):void 0,A=N&&t.length>=2&&t[1].value instanceof Date?yt.utc(t[1].value):void 0,D=e.filterType==="MinMax"&&t.length>=2&&typeof t[0].value=="number"?t[0].value:void 0,R=e.filterType==="MinMax"&&t.length>=2&&typeof t[1].value=="number"?t[1].value:void 0;if(P.length===0)return null;const z=_=>{const K=_.target.value;i(K),Oc(K)||d(""),l&&r({dimensionName:e.dimensionName,matchType:K,value:l,...Oc(K)&&c&&{value2:c}})},U=(_,K)=>{u(_??""),K!==void 0&&d(K??"");const ne=Array.isArray(_)&&_.length===0;r(!ne&&_!==""&&_!==null&&_!==void 0?{dimensionName:e.dimensionName,matchType:s,value:_,...v&&K&&{value2:K}}:null)},j=()=>{u(""),d(""),r(null)};return p.jsxs(ar,{sx:{display:"flex",flexDirection:"column",gap:1.5,fontSize:"0.75rem","& .MuiInputBase-root":{fontSize:"0.75rem"},"& .MuiInputBase-input":{padding:"6px 10px"},"& .MuiSelect-select":{padding:"6px 10px !important"},"& .MuiAutocomplete-input":{padding:"0 !important"},"& .MuiAutocomplete-root .MuiInputBase-root":{padding:"5px 10px",minHeight:"29.5px",maxHeight:"29.5px",boxSizing:"border-box",overflow:"hidden"},"& .MuiChip-root":{height:"16px",margin:"0 2px 0 0"},"& .MuiChip-label":{fontSize:"0.7rem",padding:"0 6px"},"& .MuiChip-deleteIcon":{fontSize:"14px",margin:"0 2px 0 -4px"},"& .MuiInputLabel-root":{fontSize:"0.75rem",transform:"translate(10px, 6px) scale(1)"},"& .MuiInputLabel-shrink":{fontSize:"0.85rem",transform:"translate(14px, -9px) scale(0.75)"},"& .MuiOutlinedInput-notchedOutline legend":{fontSize:"0.65rem"},"& .MuiFormHelperText-root":{fontSize:"0.65rem",marginTop:"2px"},"& .MuiSvgIcon-root":{fontSize:"1.25rem"}},children:[p.jsx(ar,{sx:{fontWeight:600},children:e.label??e.dimensionName}),e.filterType!=="Boolean"&&p.jsxs(Hl,{size:"small",fullWidth:!0,children:[p.jsx(Ul,{children:"Match Type"}),p.jsx(zl,{value:s,label:"Match Type",onChange:z,disabled:P.length===1,MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:P.map(_=>p.jsx(aa,{value:_,children:_},_))})]}),e.filterType==="Star"&&s==="Equals"&&p.jsx(Rd,{multiple:!0,size:"small",options:t,getOptionLabel:_=>typeof _=="string"?_:typeof _=="object"&&_!==null&&"value"in _?String(_.value):String(_),value:Array.isArray(l)?l.map(_=>t.find(K=>K.value===_)||_):l?[t.find(_=>_.value===l)||l]:[],onChange:(_,K)=>{const ne=K.map(L=>typeof L=="string"?L:L&&typeof L=="object"&&"value"in L?L.value:L);U(ne)},noOptionsText:"No matches found",renderInput:_=>p.jsx(Rt,{..._,size:"small",label:"Values",placeholder:"Select values..."}),freeSolo:!e.values||e.values.length===0,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="Star"&&s==="Contains"&&p.jsx(Rt,{size:"small",label:"Search Text",value:l,onChange:_=>U(_.target.value),placeholder:"Enter text to search...",fullWidth:!0}),e.filterType==="Boolean"&&p.jsxs(Hl,{size:"small",fullWidth:!0,children:[p.jsx(Ul,{children:"Value"}),p.jsxs(zl,{value:l===!0?"true":l===!1?"false":"",label:"Value",onChange:_=>{const K=_.target.value;K==="true"?U(!0):K==="false"?U(!1):j()},MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}},children:[p.jsx(aa,{value:"",children:p.jsx("em",{children:"Blank"})}),p.jsx(aa,{value:"true",children:"True"}),p.jsx(aa,{value:"false",children:"False"})]})]}),e.filterType==="Retrieval"&&s==="Semantic Search"&&p.jsx(Rd,{multiple:!0,size:"small",options:m,loading:h,getOptionLabel:_=>typeof _=="string"?_:typeof _=="object"&&_!==null&&"value"in _?String(_.value):String(_),value:Array.isArray(l)?l.map(_=>m.find(ne=>ne.value===_)||{value:_}):l?[{value:l}]:[],onInputChange:(_,K)=>{x(K)},onChange:(_,K)=>{const ne=K.map(L=>typeof L=="string"?L:L&&typeof L=="object"&&"value"in L?L.value:L);U(ne)},noOptionsText:g.trim().length<=2?"Type at least 3 characters to search":"No matches found",renderInput:_=>p.jsx(Rt,{..._,size:"small",label:"Search Values",placeholder:"Type to search...",onFocus:()=>w(!0),onBlur:()=>w(!1),helperText:T&&!h&&E&&m.length===0?"No matches found":void 0,InputProps:{..._.InputProps,endAdornment:p.jsxs(p.Fragment,{children:[h?p.jsx(Up,{color:"inherit",size:20}):null,_.InputProps.endAdornment]})}}),freeSolo:!0,filterOptions:_=>_,slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"0.75rem",minHeight:"auto",padding:"4px 10px"}}}}}),e.filterType==="MinMax"&&!v&&p.jsx(Rt,{size:"small",type:"number",label:"Value",value:l,onChange:_=>U(parseFloat(_.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Enter number...",fullWidth:!0,inputProps:{min:D,max:R},helperText:F&&D!==void 0&&R!==void 0?`Valid range: [${D} - ${R}]`:void 0}),e.filterType==="MinMax"&&v&&p.jsxs(ar,{sx:{display:"flex",flexDirection:"column",gap:1},children:[p.jsxs(ar,{sx:{display:"flex",gap:1,alignItems:"center"},children:[p.jsx(Rt,{size:"small",type:"number",label:"From",value:l,onChange:_=>U(parseFloat(_.target.value)||"",c),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Min...",fullWidth:!0,inputProps:{min:D,max:c||R}}),p.jsx(ar,{children:"to"}),p.jsx(Rt,{size:"small",type:"number",label:"To",value:c,onChange:_=>U(l,parseFloat(_.target.value)||""),onFocus:()=>B(!0),onBlur:()=>B(!1),placeholder:"Max...",fullWidth:!0,inputProps:{min:l||D,max:R}})]}),F&&D!==void 0&&R!==void 0&&p.jsxs(Cn,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",D," - ",R,"]"]})]}),N&&!v&&p.jsx(Ld,{dateAdapter:Lg,children:p.jsx(Mc,{label:"Date",value:l instanceof Date?yt.utc(l):null,onChange:_=>{_===null?U(null):_.isValid()&&U(_.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?void 0:M,maxDate:l instanceof Date?void 0:A,referenceDate:s==="After"&&M?M:void 0,slotProps:{textField:{size:"small",fullWidth:!0,sx:{minWidth:150},onFocus:()=>B(!0),onBlur:()=>B(!1),helperText:F&&M&&A?`Valid range: [${M.format("YYYY-MM-DD")} - ${A.format("YYYY-MM-DD")}]`:void 0},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),N&&v&&p.jsx(Ld,{dateAdapter:Lg,children:p.jsxs(ar,{sx:{display:"flex",flexDirection:"column",gap:1},children:[p.jsxs(ar,{sx:{display:"flex",gap:1,alignItems:"center"},children:[p.jsx(ar,{sx:{flex:1,minWidth:0},children:p.jsx(Mc,{label:"From",value:l instanceof Date?yt.utc(l):null,onChange:_=>{_===null?U(null,c):_.isValid()&&U(_.utc().toDate(),c)},timezone:"UTC",minDate:l instanceof Date?void 0:M,maxDate:c instanceof Date?yt.utc(c):l instanceof Date?void 0:A,referenceDate:M,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})}),p.jsx(ar,{children:"to"}),p.jsx(ar,{sx:{flex:1,minWidth:0},children:p.jsx(Mc,{label:"To",value:c instanceof Date?yt.utc(c):null,onChange:_=>{_===null?U(l,null):_.isValid()&&U(l,_.utc().toDate())},timezone:"UTC",minDate:l instanceof Date?yt.utc(l):c instanceof Date?void 0:M,maxDate:c instanceof Date?void 0:A,referenceDate:l instanceof Date?yt.utc(l):M,slotProps:{textField:{size:"small",fullWidth:!0,onFocus:()=>B(!0),onBlur:()=>B(!1)},openPickerButton:{sx:{backgroundColor:"transparent"}}}})})]}),F&&M&&A&&p.jsxs(Cn,{variant:"caption",color:"text.secondary",sx:{mt:-.5,ml:1.5},children:["Valid range: [",M.format("YYYY-MM-DD")," -"," ",A.format("YYYY-MM-DD"),"]"]})]})})]})}function Qx(e){const t=new Set,n=e.schema?.fields;if(!n)return t;for(const r of n)"kind"in r&&r.kind==="join"&&r.name&&t.add(r.name);return t}function Xx(e){if(!e)return null;for(const t of e)if(t.startsWith("##(filters)")){const n=t.slice(11).trim();try{const r=JSON.parse(n);if(Array.isArray(r)){const o=[];for(const a of r)if(typeof a=="string"){const s=a.indexOf(".");s>0&&s<a.length-1&&o.push({source:a.substring(0,s),dimension:a.substring(s+1)})}if(o.length>0)return{filters:o}}}catch(r){console.error(`Failed to parse "${t}" annotation:`,r)}}return null}function Zx(e){if(e.startsWith("#(filter)")){const t=e.slice(9).trim();try{const n=JSON.parse(t);if(n.type)return n}catch(n){console.error(`Failed to parse "${e}" annotation:`,n)}}return null}function TH(e){const t=e.match(/^#\s*label\s*=\s*"([^"]+)"/);return t?t[1]:null}function Jx(e){const t=new Map;let n="";for(const r of e)if(r.type==="code"){if(!n&&r.text){const o=r.text.match(/import\s+(?:\{[^}]*\}\s+from\s+)?['"]([^'"]+)['"]/);o&&(n=o[1])}if(r.newSources&&r.newSources.length>0)for(const o of r.newSources)try{const a=JSON.parse(o);a.name&&t.set(a.name,a)}catch(a){console.error("Failed to parse SourceInfo:",a)}}return{sourceInfoMap:t,modelPath:n}}function e2(e,t,n){const r=[];for(const{source:o,dimension:a}of t){const s=e.get(o);if(!s){console.warn(`Source "${o}" not found in notebook sources`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const i=s.schema?.fields;if(!i){r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}const l=i.find(d=>d.name===a);if(!l){console.warn(`Dimension "${a}" not found in source "${o}"`),r.push({source:o,model:n,dimensionName:a,filterType:"Star"});continue}let u="Star",c;if("annotations"in l&&l.annotations){for(const d of l.annotations)if(d.value){const m=Zx(d.value);m&&(u=m.type);const f=TH(d.value);f&&(c=f)}}r.push({source:o,model:n,dimensionName:a,filterType:u,label:c})}return r}function t2(e,t,n){return e.length===0?"":e.map(o=>{const{dimensionName:a,matchType:s,value:i,value2:l}=o,u=t.get(a),d=u&&u!==n?`\`${u}\`.\`${a}\``:`\`${a}\``,m=i instanceof Date,f=(h,b=!1)=>h==null?"null":b&&h instanceof Date?`@${h.getFullYear()}-${String(h.getMonth()+1).padStart(2,"0")}-${String(h.getDate()).padStart(2,"0")}`:typeof h=="string"?`'${h.replace(/'/g,"\\'")}'`:typeof h=="boolean"?h?"true":"false":String(h);switch(s){case"Equals":case"Semantic Search":return Array.isArray(i)&&i.length>0?`(${i.map(b=>`${d} = ${f(b,m)}`).join(" or ")})`:`${d} = ${f(i,m)}`;case"Contains":return typeof i=="string"?`${d} ~ f'%${i.replace(/'/g,"\\'")}%'`:`${d} = ${f(i)}`;case"After":case"Greater Than":return`${d} > ${f(i,m)}`;case"Before":case"Less Than":return`${d} < ${f(i,m)}`;case"Between":return l!==void 0?`${d} >= ${f(i,m)} and ${d} <= ${f(l,m)}`:`${d} >= ${f(i,m)}`;default:return""}}).filter(o=>o.length>0).join(" and ")}function n2(e){const t=e.match(/run\s*:\s*(\w+)\s*->/);if(t)return t[1];const n=e.match(/^\s*(\w+)\s*->/m);return n?n[1]:null}function r2(e,t){return`${e.trimEnd()} + {where: ${t}}`}const SH=rt(p.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),kH=rt(p.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),e0=rt(p.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),wH=rt(p.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),_H=rt(p.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),IH=rt([p.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),p.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),t0=rt(p.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),o2=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),r=t.split(/\n\s*\n/)[1]||t;if(r.length<=120)return r;const o=r.substring(0,120).split(" ");return o.pop(),o.join(" ")+"..."},a2=(e,t)=>{const n=(e.readme||void 0)?.split(`
|
|
214
214
|
`)??[];return n.length===0&&(n.push(`# ${e.name}`),n.push("")),(e.readme?.length??0)>0&&t?n.splice(2,1,t):t&&n.push(t),n.join(`
|
|
215
215
|
`)};function AH(e){return Fe("MuiDialogContentText",e)}Re("MuiDialogContentText",["root"]);const DH=e=>{const{classes:t}=e,r=Le({root:["root"]},AH,t);return{...t,...r}},PH=ae(Cn,{shouldForwardProp:e=>fn(e)||e==="classes",name:"MuiDialogContentText",slot:"Root"})({}),Ua=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogContentText"}),{children:o,className:a,...s}=r,i=DH(s);return p.jsx(PH,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:s,className:De(i.root,a),...r,classes:i})}),RH=e=>{const{classes:t}=e;return Le({root:["root"]},nH,t)},MH=ae(Cn,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),Ur=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiDialogTitle"}),{className:o,id:a,...s}=r,i=r,l=RH(i),{titleId:u=a}=k.useContext(Yx);return p.jsx(MH,{component:"h2",className:De(l.root,o),ownerState:i,ref:n,variant:"h6",id:a??u,...s})});function NH(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:a}=e,s=Eu();k.useEffect(()=>{if(!o)return;function x(E){E.defaultPrevented||E.key==="Escape"&&r?.(E,"escapeKeyDown")}return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[o,r]);const i=Ae((x,E)=>{r?.(x,E)}),l=Ae(x=>{!r||x==null||s.start(x,()=>{i(null,"timeout")})});k.useEffect(()=>(o&&l(t),s.clear),[o,t,l,s]);const u=x=>{r?.(x,"clickaway")},c=s.clear,d=k.useCallback(()=>{t!=null&&l(a??t*.5)},[t,a,l]),m=x=>E=>{const C=x.onBlur;C?.(E),d()},f=x=>E=>{const C=x.onFocus;C?.(E),c()},h=x=>E=>{const C=x.onMouseEnter;C?.(E),c()},b=x=>E=>{const C=x.onMouseLeave;C?.(E),d()};return k.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",c)}},[n,o,d,c]),{getRootProps:(x={})=>{const E={...ln(e),...ln(x)};return{role:"presentation",...x,...E,onBlur:m(E),onFocus:f(E),onMouseEnter:h(E),onMouseLeave:b(E)}},onClickAway:u}}function n0(e){return e.substring(2).toLowerCase()}function OH(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function LH(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:a="onTouchEnd"}=e,s=k.useRef(!1),i=k.useRef(null),l=k.useRef(!1),u=k.useRef(!1);k.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const c=nt(ja(t),i),d=Ae(h=>{const b=u.current;u.current=!1;const g=jt(i.current);if(!l.current||!i.current||"clientX"in h&&OH(h,g))return;if(s.current){s.current=!1;return}let x;h.composedPath?x=h.composedPath().includes(i.current):x=!g.documentElement.contains(h.target)||i.current.contains(h.target),!x&&(n||!b)&&o(h)}),m=h=>b=>{u.current=!0;const g=t.props[h];g&&g(b)},f={ref:c};return a!==!1&&(f[a]=m(a)),k.useEffect(()=>{if(a!==!1){const h=n0(a),b=jt(i.current),g=()=>{s.current=!0};return b.addEventListener(h,d),b.addEventListener("touchmove",g),()=>{b.removeEventListener(h,d),b.removeEventListener("touchmove",g)}}},[d,a]),r!==!1&&(f[r]=m(r)),k.useEffect(()=>{if(r!==!1){const h=n0(r),b=jt(i.current);return b.addEventListener(h,d),()=>{b.removeEventListener(h,d)}}},[d,r]),k.cloneElement(t,f)}function FH(e){return Fe("MuiSnackbarContent",e)}Re("MuiSnackbarContent",["root","message","action"]);const $H=e=>{const{classes:t}=e;return Le({root:["root"],action:["action"],message:["message"]},FH,t)},BH=ae(Ho,{name:"MuiSnackbarContent",slot:"Root"})(Je(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(jc(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:jc(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),jH=ae("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),HH=ae("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),UH=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiSnackbarContent"}),{action:o,className:a,message:s,role:i="alert",...l}=r,u=r,c=$H(u);return p.jsxs(BH,{role:i,elevation:6,className:De(c.root,a),ownerState:u,ref:n,...l,children:[p.jsx(jH,{className:c.message,ownerState:u,children:s}),o?p.jsx(HH,{className:c.action,ownerState:u,children:o}):null]})});function zH(e){return Fe("MuiSnackbar",e)}Re("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const VH=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ke(n.vertical)}${ke(n.horizontal)}`]};return Le(r,zH,t)},WH=ae("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ke(n.anchorOrigin.vertical)}${ke(n.anchorOrigin.horizontal)}`]]}})(Je(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),qH=k.forwardRef(function(t,n){const r=Qe({props:t,name:"MuiSnackbar"}),o=no(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:i,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:u=null,children:c,className:d,ClickAwayListenerProps:m,ContentProps:f,disableWindowBlurListener:h=!1,message:b,onBlur:g,onClose:x,onFocus:E,onMouseEnter:C,onMouseLeave:T,open:w,resumeHideDuration:S,slots:O={},slotProps:F={},TransitionComponent:B,transitionDuration:P=a,TransitionProps:{onEnter:N,onExited:v,...M}={},...A}=r,D={...r,anchorOrigin:{vertical:i,horizontal:l},autoHideDuration:u,disableWindowBlurListener:h,TransitionComponent:B,transitionDuration:P},R=VH(D),{getRootProps:z,onClickAway:U}=NH({...D}),[j,_]=k.useState(!0),K=J=>{_(!0),v&&v(J)},ne=(J,ee)=>{_(!1),N&&N(J,ee)},L={slots:{transition:B,...O},slotProps:{content:f,clickAwayListener:m,transition:M,...F}},[fe,X]=ct("root",{ref:n,className:[R.root,d],elementType:WH,getSlotProps:z,externalForwardedProps:{...L,...A},ownerState:D}),[q,{ownerState:te,...Z}]=ct("clickAwayListener",{elementType:LH,externalForwardedProps:L,getSlotProps:J=>({onClickAway:(...ee)=>{const xe=ee[0];J.onClickAway?.(...ee),!xe?.defaultMuiPrevented&&U(...ee)}}),ownerState:D}),[re,Q]=ct("content",{elementType:UH,shouldForwardComponentProp:!0,externalForwardedProps:L,additionalProps:{message:b,action:s},ownerState:D}),[G,se]=ct("transition",{elementType:Gs,externalForwardedProps:L,getSlotProps:J=>({onEnter:(...ee)=>{J.onEnter?.(...ee),ne(...ee)},onExited:(...ee)=>{J.onExited?.(...ee),K(...ee)}}),additionalProps:{appear:!0,in:w,timeout:P,direction:i==="top"?"down":"up"},ownerState:D});return!w&&j?null:p.jsx(q,{...Z,...O.clickAwayListener&&{ownerState:te},children:p.jsx(fe,{...X,children:p.jsx(G,{...se,children:c||p.jsx(re,{...Q})})})})});function r0(){const[e,t]=W.useState(!1),{apiClients:n}=it.useServer(),[r,o]=W.useState(""),a=()=>{t(!0)},s=()=>{t(!1)},i=$r.useQueryClient(),l=hr({async mutationFn(c){return n.projects.createProject({name:c.name,readme:a2({name:c.name,readme:""},c.description)})},onSuccess(){s(),i.invalidateQueries({queryKey:["projects"]}),o("Project created successfully")},onError(c){o(c instanceof Error?c.message:"An unknown error occurred")}}),u=async c=>{c.preventDefault();const d=new FormData(c.currentTarget),m=d.get("name")?.toString(),f=d.get("description")?.toString();if(!m)throw new Error("Name is required");l.mutate({name:m,description:f})};return p.jsxs(W.Fragment,{children:[p.jsx(Dt,{variant:"contained",onClick:a,startIcon:p.jsx(An.AddCircleRounded,{}),sx:{mt:2,color:"white"},children:"Create New Project"}),p.jsxs(kr,{open:e,onClose:s,children:[p.jsx(Ur,{children:"Create New Project"}),p.jsxs(Sr,{children:[p.jsx(Ua,{children:"Add a new project to start exploring semantic models and analyzing data."}),p.jsxs("form",{onSubmit:u,id:"project-form",children:[p.jsx(Rt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Project Name",type:"text",fullWidth:!0,variant:"standard"}),p.jsx(Rt,{margin:"dense",id:"description",name:"description",label:"Project Description",placeholder:"Explore semantic models, run queries, and build dashboards",type:"text",fullWidth:!0,variant:"standard"})]})]}),p.jsxs(Tr,{children:[p.jsx(Dt,{disabled:l.isPending,onClick:s,children:"Cancel"}),p.jsx(Dt,{type:"submit",form:"project-form",loading:l.isPending,children:"Create Project"})]})]}),p.jsx(qH,{open:r!=="",autoHideDuration:6e3,onClose:()=>o(""),message:r})]})}function YH({project:e,onCloseDialog:t}){const[n,r]=W.useState(!1),{apiClients:o}=it.useServer(),a=$r.useQueryClient(),[s,i]=W.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},c=hr({mutationFn:()=>o.projects.deleteProject(e.name),onSuccess(){u(),a.invalidateQueries({queryKey:["projects"]}),i("Project deleted successfully")},onError(d){i(d instanceof Error?d.message:"An unknown error occurred")}});return p.jsxs(W.Fragment,{children:[p.jsxs(I.MenuItem,{onClick:l,children:[p.jsx(I.ListItemIcon,{children:p.jsx(An.Delete,{fontSize:"small"})}),p.jsx(I.ListItemText,{children:"Delete"})]}),p.jsxs(kr,{onClose:u,"aria-labelledby":"customized-dialog-title",open:n,children:[p.jsx(Ur,{sx:{m:0,p:2},id:"customized-dialog-title",children:"Delete Project"}),p.jsx(yr,{"aria-label":"close",onClick:u,sx:d=>({position:"absolute",right:8,top:8,color:d.palette.grey[500]}),children:p.jsx(to,{})}),p.jsx(Sr,{dividers:!0,children:p.jsxs(Cn,{gutterBottom:!0,children:['Are you sure you want to delete "',e.name,'"? This action cannot be undone.']})}),p.jsxs(Tr,{children:[p.jsx(Dt,{variant:"outlined",onClick:u,style:{borderColor:"#14b3cb",color:"#14b3cb"},children:"Cancel"}),p.jsx(Dt,{loading:c.isPending,variant:"contained",autoFocus:!0,onClick:()=>c.mutate(),color:"error",children:"Delete"})]}),p.jsx(I.Snackbar,{open:s!=="",autoHideDuration:6e3,onClose:()=>i(""),message:s})]})]})}function GH({project:e,onCloseDialog:t}){const[n,r]=W.useState(!1),{apiClients:o}=it.useServer(),a=$r.useQueryClient(),[s,i]=W.useState(""),l=()=>{r(!0)},u=()=>{r(!1),t()},c=hr({async mutationFn(m){return o.projects.updateProject(e.name,{name:e.name,readme:a2({name:e.name,readme:e.readme},m.description)})},onSuccess(){u(),a.invalidateQueries({queryKey:["projects"]}),i("Project updated successfully")},onError(m){i(m instanceof Error?m.message:"An unknown error occurred")}}),d=m=>{m.preventDefault();const h=new FormData(m.currentTarget).get("description")?.toString();c.mutate({description:h})};return p.jsxs(W.Fragment,{children:[p.jsxs(I.MenuItem,{onClick:l,children:[p.jsx(I.ListItemIcon,{children:p.jsx(An.Edit,{fontSize:"small"})}),p.jsx(I.ListItemText,{children:"Edit"})]}),p.jsxs(kr,{open:n,onClose:u,children:[p.jsx(Ur,{children:"Edit Project"}),p.jsxs(Sr,{children:[p.jsx(Ua,{children:"Add a new project to start exploring semantic models and analyzing data."}),p.jsxs("form",{onSubmit:d,id:"project-form",children:[p.jsx(Rt,{autoFocus:!0,required:!0,margin:"dense",id:"name",name:"name",label:"Project Name",disabled:!0,type:"text",fullWidth:!0,variant:"standard",defaultValue:e.name}),p.jsx(Rt,{margin:"dense",id:"description",name:"description",label:"Project Description",type:"text",fullWidth:!0,variant:"standard",defaultValue:o2(e.readme)})]})]}),p.jsxs(Tr,{children:[p.jsx(Dt,{disabled:c.isPending,onClick:u,children:"Cancel"}),p.jsx(Dt,{type:"submit",form:"project-form",loading:c.isPending,children:"Save Changes"})]})]}),p.jsx(I.Snackbar,{open:s!=="",autoHideDuration:6e3,onClose:()=>i(""),message:s})]})}function KH({onClickProject:e}){const{apiClients:t,mutable:n}=it.useServer(),{data:r,isSuccess:o,isError:a,error:s}=Jt({queryKey:["projects"],queryFn:()=>t.projects.listProjects()});return a?p.jsx(Zt,{error:s,context:"Projects List"}):o?p.jsxs(I.Container,{maxWidth:"lg",sx:{py:4},children:[p.jsxs(I.Box,{sx:{textAlign:"center",mb:6},children:[p.jsxs(I.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[p.jsx(e0,{sx:{fontSize:32,color:"primary.main"}}),p.jsx(I.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),p.jsx(I.Typography,{variant:"h5",color:"text.secondary",sx:{mb:3,maxWidth:600,mx:"auto"},children:"The open-source semantic model server for the Malloy data language"}),p.jsx(I.Typography,{variant:"body1",color:"text.secondary",sx:{maxWidth:800,mx:"auto"},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),p.jsxs(I.Grid,{container:!0,spacing:3,sx:{mb:6},children:[p.jsx(I.Grid,{size:{xs:12,md:4},children:p.jsx(I.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:p.jsxs(I.CardContent,{sx:{p:3},children:[p.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[p.jsx(SH,{sx:{color:"info.main",fontSize:28}}),p.jsx(I.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),p.jsx(I.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Use Explorer, a visual query builder that allows analysts to browse semantic sources, build queries, and run nested logic — all without writing code."}),p.jsx(I.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),p.jsx(I.Grid,{size:{xs:12,md:4},children:p.jsx(I.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:p.jsxs(I.CardContent,{sx:{p:3},children:[p.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[p.jsx(wH,{sx:{color:"warning.main",fontSize:28}}),p.jsx(I.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),p.jsx(I.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Create shareable, code-first dashboards using Malloy notebooks. Include text, charts, and reusable views — all versioned alongside your models."}),p.jsx(I.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),p.jsx(I.Grid,{size:{xs:12,md:4},children:p.jsx(I.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:p.jsxs(I.CardContent,{sx:{p:3},children:[p.jsxs(I.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[p.jsx(IH,{sx:{color:"success.main",fontSize:28}}),p.jsx(I.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),p.jsx(I.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Expose your semantic models via the Model Context Protocol (MCP), enabling AI agents to discover sources and ask well-formed questions."}),p.jsx(I.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),p.jsx(I.Divider,{sx:{my:4}}),r.data.length>0?p.jsxs(p.Fragment,{children:[p.jsxs(I.Box,{sx:{textAlign:"center",mb:4},children:[p.jsxs(I.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[p.jsx(t0,{sx:{color:"primary.main",fontSize:24}}),p.jsx(I.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),p.jsx(I.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"}),n&&p.jsx(r0,{})]}),p.jsx(I.Grid,{container:!0,spacing:3,justifyContent:"center",children:r.data.map(i=>p.jsx(I.Grid,{size:{xs:12,sm:6,md:4},children:p.jsx(QH,{project:i,onClickProject:e})},i.name))})]}):p.jsxs(I.Box,{sx:{textAlign:"center",mb:4},children:[p.jsxs(I.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[p.jsx(t0,{sx:{color:"primary.main",fontSize:24}}),p.jsx(I.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),p.jsx(I.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"No projects found. Create your first Malloy project to start exploring semantic models and building data experiences."}),n?p.jsx(r0,{}):p.jsx(I.Button,{variant:"contained",size:"large",color:"primary",startIcon:p.jsx(e0,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),p.jsx(I.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:p.jsxs(I.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",p.jsx("a",{href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",style:{color:"primary.main",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute to the future of data modeling."]})})]}):p.jsx(on,{text:"Loading projects..."})}function QH({project:e,onClickProject:t}){const{mutable:n}=it.useServer(),[r,o]=W.useState(null),a=!!r,s=l=>{o(l.currentTarget)},i=()=>{o(null)};return p.jsx("div",{children:p.jsxs(I.Card,{variant:"outlined",sx:{height:"100%",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2,borderColor:"primary.main"}},children:[n&&p.jsxs(p.Fragment,{children:[p.jsx(I.IconButton,{"aria-controls":a?"project-menu":void 0,"aria-haspopup":"true","aria-expanded":a?"true":void 0,onClick:s,sx:{position:"absolute",top:8,right:8},children:p.jsx(An.MoreVert,{fontSize:"small"})}),p.jsxs(I.Menu,{id:"project-menu","aria-haspopup":"true","aria-expanded":a?"true":void 0,open:a,anchorEl:r,onClose:i,disableRestoreFocus:!0,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:[p.jsx(GH,{project:e,onCloseDialog:i}),p.jsx(YH,{project:e,onCloseDialog:i})]})]}),p.jsxs(I.CardContent,{sx:{p:3,textAlign:"center"},children:[p.jsx(_H,{sx:{fontSize:48,color:"primary.main",mb:2}}),p.jsx(I.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:e.name}),p.jsx(I.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2,minHeight:"60px"},children:o2(e.readme)}),p.jsx(I.Button,{variant:"contained",color:"secondary",endIcon:p.jsx(kH,{}),fullWidth:!0,onClick:l=>t(`/${e.name}/`,l),children:"Open Project"})]})]})})}const Ia=rt(p.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})),XH=rt(p.jsx("path",{d:"M8 5v14l11-7z"}));function s2({open:e,onClose:t,result:n,title:r="Results"}){return p.jsxs(I.Dialog,{open:e,onClose:t,maxWidth:!1,fullWidth:!0,sx:{"& .MuiDialog-paper":{width:"95vw",height:"95vh",maxWidth:"none"}},children:[p.jsxs(I.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r,p.jsx(I.IconButton,{onClick:t,sx:{color:"#666666"},children:p.jsx(to,{})})]}),p.jsx(I.DialogContent,{sx:{height:"calc(95vh - 120px)",overflow:"auto",padding:"0 16px"},children:p.jsx(fi,{result:n,minHeight:800,maxHeight:800,hideToggle:!0})})]})}function ZH({queryName:e,annotations:t,resourceUri:n,runOnDemand:r=!1,maxResultSize:o=0}){const[a,s]=W.useState(),[i,l]=W.useState(!1),[u,c]=W.useState(!1),{packageName:d,projectName:m,versionId:f,modelPath:h}=Ct(n),{apiClients:b}=it.useServer(),{data:g,isSuccess:x,isLoading:E}=Jt({queryKey:["namedQueryResult",n,e],queryFn:()=>b.models.executeQueryModel(m,d,h,{query:void 0,sourceName:void 0,queryName:e,versionId:f}),enabled:r?u:!0});return W.useEffect(()=>{if(t&&t.length>0){const C=t.map(T=>`// ${T}`).join(`
|
|
216
216
|
`);Ll(C,"typescript").then(T=>{s(T)})}},[t]),p.jsxs(qc,{children:[a&&p.jsx(I.Box,{sx:{marginBottom:"16px"},children:p.jsx(I.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:p.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:a}})})}),p.jsxs(I.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[p.jsx(I.Typography,{variant:"body2",sx:{fontSize:"15px",fontWeight:"600",color:"#495057",padding:"8px 16px",backgroundColor:"#f8f9fa",borderRadius:"6px",border:"1px solid #e9ecef"},children:e}),p.jsx(I.IconButton,{sx:{backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px"},onClick:()=>l(!0),children:p.jsx(Ia,{sx:{fontSize:"18px",color:"#666666"}})})]}),p.jsxs(Vi,{sx:{position:"relative"},children:[r&&!u&&p.jsxs(I.Box,{sx:{padding:"40px 20px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[p.jsx(I.Typography,{variant:"body2",color:"text.secondary",children:"Click Run to execute the query"}),p.jsx(I.Button,{variant:"contained",startIcon:p.jsx(XH,{}),onClick:()=>c(!0),sx:{backgroundColor:"#1976d2","&:hover":{backgroundColor:"#1565c0"},textTransform:"none",fontSize:"14px",fontWeight:600,padding:"8px 24px"},children:"Run Query"})]}),(!r||u)&&E&&p.jsx(I.Box,{sx:{padding:"20px",textAlign:"center"},children:p.jsx(I.Typography,{children:"Loading results..."})}),(!r||u)&&x&&g?.data?.result&&p.jsx(fi,{result:g.data.result,minHeight:300,maxHeight:600,hideToggle:!1,maxResultSize:o})]}),p.jsx(s2,{open:i,onClose:()=>l(!1),result:g?.data?.result||"",title:`Query: ${e}`})]})}function of(e,t=!0){const{modelPath:n,projectName:r,packageName:o,versionId:a}=Ct(e),{apiClients:s}=it.useServer();return Jt({queryKey:["package",r,o,n,a],queryFn:async()=>(await s.models.getModel(r,o,n,a)).data,enabled:t})}function af({data:e,onChange:t,existingQuery:n,initialSelectedSourceIndex:r=0,onSourceChange:o,resourceUri:a}){const[s,i]=W.useState(r);W.useEffect(()=>{i(r)},[r]);const{data:l,isError:u,isLoading:c,error:d}=of(a,!e),{modelPath:m}=Ct(a),f=e||l;if(c&&!e)return p.jsx(on,{text:"Fetching Model..."});if(u&&!e)return console.log("error",d),p.jsx(Zt,{error:d,context:`ModelExplorer > ${m}`});if(!f)return p.jsx(on,{text:"Loading..."});const h=(f?.sourceInfos||[]).map((g,x)=>{try{return JSON.parse(g)?.name||`Source ${x+1}`}catch{return`Source ${x+1}`}}),b=h[s]||"";return p.jsxs(hl,{variant:"outlined",children:[p.jsx(I0,{children:p.jsx(I.Stack,{sx:{flexDirection:"row"},children:p.jsx(Rd,{size:"small",id:"size-small-standard",disablePortal:!0,options:h,value:b,onChange:(g,x)=>{if(!x)return;const E=h.indexOf(x);E>=0&&(i(E),o?.(E))},renderInput:g=>p.jsx(Rt,{...g}),style:{width:350,marginTop:"3px",marginLeft:"6px",marginBottom:"8px"}})})}),p.jsx(Vd,{children:p.jsxs(I.Stack,{spacing:2,component:"section",children:[Array.isArray(f.sourceInfos)&&f.sourceInfos.length>0&&p.jsx(Ip,{sourceAndPaths:f.sourceInfos.map(g=>({sourceInfo:JSON.parse(g),modelPath:m})),selectedSourceIndex:s,existingQuery:n,onQueryChange:t,resourceUri:a}),p.jsx(I.Box,{height:"5px"})]})})]})}function sf({open:e,onClose:t,resourceUri:n,data:r,title:o="Data Sources",hasValidImport:a=!0,existingQuery:s,initialSelectedSourceIndex:i,onChange:l,onSourceChange:u}){return p.jsxs(I.Dialog,{open:e,onClose:t,fullScreen:!0,children:[p.jsxs(I.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o,p.jsx(I.IconButton,{onClick:t,sx:{color:"#666666"},children:p.jsx(to,{})})]}),p.jsx(I.DialogContent,{children:a?p.jsx(af,{resourceUri:n,data:r,existingQuery:s,initialSelectedSourceIndex:i,onChange:l,onSourceChange:u}):p.jsx("div",{children:"No valid import statement found in cell"})})]})}function JH({onChange:e,resourceUri:t,runOnDemand:n=!1,maxResultSize:r=0}){const{modelPath:o}=Ct(t),{data:a,isError:s,isLoading:i,error:l}=of(t),[u,c]=W.useState(!1),[d,m]=W.useState(),[f,h]=W.useState(0),[b,g]=W.useState("");if(i)return p.jsx(on,{text:"Fetching Model..."});if(s)return console.log("error",l),p.jsx(Zt,{error:l,context:`Model > ${o}`});const x=T=>{m(T),e&&e(T)},E=T=>{h(T)},C=()=>{const T=window.location.href;navigator.clipboard.writeText(T).then(()=>g("URL copied to clipboard!")).catch(()=>g("Failed to copy URL"))};return p.jsxs(p.Fragment,{children:[p.jsxs(I.Box,{sx:{position:"relative",maxWidth:"1200px",margin:"0 auto",paddingTop:"24px"},children:[Array.isArray(a?.sourceInfos)&&a.sourceInfos.length>0&&p.jsxs(I.Stack,{spacing:2,component:"section",children:[p.jsxs(I.Box,{sx:{padding:"0 0 16px 0",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[p.jsx(I.Typography,{variant:"h1",sx:{fontSize:"28px",fontWeight:"600",color:"#1a1a1a",marginBottom:"8px",marginTop:"0",paddingLeft:"0"},children:"Sources"}),p.jsx(I.Tooltip,{title:"Click to copy link",children:p.jsx(Wd,{sx:{fontSize:"24px",color:"#666666",cursor:"pointer"},onClick:C})})]}),p.jsx(af,{data:a,onChange:x,onSourceChange:E,existingQuery:d,initialSelectedSourceIndex:f,resourceUri:t}),p.jsx(I.IconButton,{sx:{position:"absolute",top:"90px",right:"4px",backgroundColor:"rgba(255, 255, 255, 0.9)","&:hover":{backgroundColor:"rgba(255, 255, 255, 1)"},width:"32px",height:"32px",zIndex:2},onClick:()=>c(!0),children:p.jsx(Ia,{sx:{fontSize:"18px",color:"#666666",marginBottom:"5px"}})})]}),a?.queries?.length>0&&p.jsxs(I.Stack,{spacing:2,component:"section",sx:{marginTop:"24px"},children:[p.jsx(I.Box,{sx:{padding:"0 0 16px 0"},children:p.jsx(I.Typography,{variant:"h2",sx:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"0",marginTop:"8px",paddingLeft:"0"},children:"Named Queries"})}),a.queries.map(T=>p.jsx(ZH,{queryName:T.name,annotations:T.annotations,resourceUri:t,runOnDemand:n,maxResultSize:r},T.name))]}),p.jsx(sf,{open:u,onClose:()=>c(!1),resourceUri:t,data:a,title:`Model: ${o.split("/").pop()}`,existingQuery:d,initialSelectedSourceIndex:f,onChange:x,onSourceChange:E})]}),p.jsx(I.Snackbar,{open:b!=="",autoHideDuration:6e3,onClose:()=>g(""),message:b})]})}function i2(e){return e.replace(/'/g,"\\'").replace(/\\/g,"\\\\")}function sr(e,t=!1){return e==null?"null":t?e instanceof Date?`@${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:`@${e}`:typeof e=="string"?`'${i2(e)}'`:typeof e=="number"?String(e):typeof e=="boolean"?e?"true":"false":String(e)}function eU(e){const{dimensionName:t,matchType:n,value:r,value2:o}=e,a=`\`${t}\``,s=r instanceof Date;switch(n){case"Equals":case"Semantic Search":return Array.isArray(r)&&r.length>0?`(${r.map(l=>`${a} = ${sr(l,s)}`).join(" or ")})`:Array.isArray(r)?"":`${a} = ${sr(r,s)}`;case"Contains":return typeof r=="string"?`${a} ~ f'%${i2(r)}%'`:Array.isArray(r)?"":`${a} = ${sr(r)}`;case"After":return Array.isArray(r)?"":`${a} > ${sr(r,s)}`;case"Before":return Array.isArray(r)?"":`${a} < ${sr(r,s)}`;case"Greater Than":return Array.isArray(r)?"":`${a} > ${sr(r)}`;case"Less Than":return Array.isArray(r)?"":`${a} < ${sr(r)}`;case"Between":return Array.isArray(r)?"":o!==void 0?`${a} >= ${sr(r,s)} and ${a} <= ${sr(o,s)}`:`${a} >= ${sr(r,s)}`;default:return""}}function tU(e){const t=new Map;for(const n of e){const r=`${n.source}|${n.model}`,o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function nU(e,t,n,r){const o=t.filter(l=>(l.filterType==="Star"||l.filterType==="MinMax"||l.filterType==="DateMinMax")&&!l.values);if(o.length===0)return"";const a=o.map(l=>`\`${l.dimensionName}\``).join(", "),s=r?.filter(l=>t.find(c=>c.dimensionName===l.dimensionName)?.source===e)||[],i=s.length>0?s.map(l=>eU(l)).filter(l=>l.length>0).join(" and "):"";return`
|
package/dist/index.es.js
CHANGED
|
@@ -48189,12 +48189,20 @@ function vz({
|
|
|
48189
48189
|
"& .MuiInputBase-root": { fontSize: "0.75rem" },
|
|
48190
48190
|
"& .MuiInputBase-input": { padding: "6px 10px" },
|
|
48191
48191
|
"& .MuiSelect-select": { padding: "6px 10px !important" },
|
|
48192
|
-
"& .MuiAutocomplete-input": { padding: "
|
|
48192
|
+
"& .MuiAutocomplete-input": { padding: "0 !important" },
|
|
48193
48193
|
"& .MuiAutocomplete-root .MuiInputBase-root": {
|
|
48194
|
-
padding: "
|
|
48194
|
+
padding: "5px 10px",
|
|
48195
|
+
minHeight: "29.5px",
|
|
48196
|
+
maxHeight: "29.5px",
|
|
48197
|
+
boxSizing: "border-box",
|
|
48198
|
+
overflow: "hidden"
|
|
48195
48199
|
},
|
|
48196
|
-
"& .MuiChip-root": { height: "
|
|
48200
|
+
"& .MuiChip-root": { height: "16px", margin: "0 2px 0 0" },
|
|
48197
48201
|
"& .MuiChip-label": { fontSize: "0.7rem", padding: "0 6px" },
|
|
48202
|
+
"& .MuiChip-deleteIcon": {
|
|
48203
|
+
fontSize: "14px",
|
|
48204
|
+
margin: "0 2px 0 -4px"
|
|
48205
|
+
},
|
|
48198
48206
|
"& .MuiInputLabel-root": {
|
|
48199
48207
|
fontSize: "0.75rem",
|
|
48200
48208
|
transform: "translate(10px, 6px) scale(1)"
|
|
@@ -48257,6 +48265,7 @@ function vz({
|
|
|
48257
48265
|
Ft,
|
|
48258
48266
|
{
|
|
48259
48267
|
...w,
|
|
48268
|
+
size: "small",
|
|
48260
48269
|
label: "Values",
|
|
48261
48270
|
placeholder: "Select values..."
|
|
48262
48271
|
}
|
|
@@ -48339,6 +48348,7 @@ function vz({
|
|
|
48339
48348
|
Ft,
|
|
48340
48349
|
{
|
|
48341
48350
|
...w,
|
|
48351
|
+
size: "small",
|
|
48342
48352
|
label: "Search Values",
|
|
48343
48353
|
placeholder: "Type to search...",
|
|
48344
48354
|
onFocus: () => _(!0),
|
package/package.json
CHANGED
|
@@ -320,12 +320,20 @@ export function DimensionFilter({
|
|
|
320
320
|
"& .MuiInputBase-root": { fontSize: "0.75rem" },
|
|
321
321
|
"& .MuiInputBase-input": { padding: "6px 10px" },
|
|
322
322
|
"& .MuiSelect-select": { padding: "6px 10px !important" },
|
|
323
|
-
"& .MuiAutocomplete-input": { padding: "
|
|
323
|
+
"& .MuiAutocomplete-input": { padding: "0 !important" },
|
|
324
324
|
"& .MuiAutocomplete-root .MuiInputBase-root": {
|
|
325
|
-
padding: "
|
|
325
|
+
padding: "5px 10px",
|
|
326
|
+
minHeight: "29.5px",
|
|
327
|
+
maxHeight: "29.5px",
|
|
328
|
+
boxSizing: "border-box",
|
|
329
|
+
overflow: "hidden",
|
|
326
330
|
},
|
|
327
|
-
"& .MuiChip-root": { height: "
|
|
331
|
+
"& .MuiChip-root": { height: "16px", margin: "0 2px 0 0" },
|
|
328
332
|
"& .MuiChip-label": { fontSize: "0.7rem", padding: "0 6px" },
|
|
333
|
+
"& .MuiChip-deleteIcon": {
|
|
334
|
+
fontSize: "14px",
|
|
335
|
+
margin: "0 2px 0 -4px",
|
|
336
|
+
},
|
|
329
337
|
"& .MuiInputLabel-root": {
|
|
330
338
|
fontSize: "0.75rem",
|
|
331
339
|
transform: "translate(10px, 6px) scale(1)",
|
|
@@ -420,6 +428,7 @@ export function DimensionFilter({
|
|
|
420
428
|
renderInput={(params) => (
|
|
421
429
|
<TextField
|
|
422
430
|
{...params}
|
|
431
|
+
size="small"
|
|
423
432
|
label="Values"
|
|
424
433
|
placeholder="Select values..."
|
|
425
434
|
/>
|
|
@@ -542,6 +551,7 @@ export function DimensionFilter({
|
|
|
542
551
|
renderInput={(params) => (
|
|
543
552
|
<TextField
|
|
544
553
|
{...params}
|
|
554
|
+
size="small"
|
|
545
555
|
label="Search Values"
|
|
546
556
|
placeholder="Type to search..."
|
|
547
557
|
onFocus={() => setRetrievalFocused(true)}
|