1import{o as e}from"./rolldown-runtime.DAXXjFlN.js";import{o as t,x as n,y as r}from"./vendor-@mui-material-material-colors-createSimplePaletteValueFilter.Ph9BMT50.js";import{nn as i}from"./vendor-datadog.CbXwTgUc.js";import{t as a}from"./vendor-react-react-cjs-jsx-runtime.BfiOPkxk.js";import{t as o}from"./app-theme-dsm-Icon.XXxHe72V.js";import{n as s,r as c,t as l}from"./[email protected]";import{W as u,o as d}from"./app-hooks-useBoolean-LocalizationProvider.BXNw5IM4.js";import{a as f,i as p,o as m,t as h}from"./[email protected]";import{t as g}from"./vendor-@mui-utils-utils-isHostComponent-buttonClasses.jrPuKtOV.js";import{E as _,T as v,g as y}from"./app-components-DialogTitle-DialogTitle.w2XCJGpC.js";import{O as ee,x as b}from"./app-shared-di-file-download.sxjSHajW.js";import{t as x}from"./[email protected]";import{Gr as S,Jt as C,Zt as te}from"./account-application-demo-checkout.oilVSmvE.js";import{Ft as w,Kt as T,N as E,P as D,Rt as O,S as k,Vt as A,X as j,b as M,bt as N,ft as P,g as F,ht as I,kt as L,l as ne,lt as R,mt as z,pt as B,r as V,s as H,t as re,xt as U}from"./vendor-datefns.D54m-q0k.js";import{ao as W,oo as G}from"./vendor-fortawesome.4BqgzknP.js";import{t as ie}from"./vendor-react-i18next-dist-es-useTranslation.py8bq3XP.js";import{a as ae,o as oe}from"./vendor-@mui-x-date-pickers-locales-utils-useReduceAnimations.C46Ij0dm.js";import{n as se,t as ce}from"./vendor-@mui-x-date-pickers-components-PickerViewRoot-DateCalendar.nCgHMUXt.js";import{n as K,t as q}from"./vendor-@mui-x-date-pickers-pro-x-date-pickers-pro-DateRangePickerDay-DateRangePickerDay.VNZsRXsq.js";var J=e(i()),Y=a(),le=12,ue=t(y,{shouldForwardProp:e=>e!==`isSelected`})(({theme:{palette:e,spacing:t},isSelected:r})=>({minWidth:0,padding:t(.75,2),height:t(5),textTransform:`capitalize`,...r&&{[`&.${g.contained}.${g.colorPrimary}`]:{backgroundColor:e.primary.main}},...!r&&{[`&.${g.contained}Ghost:hover`]:{backgroundColor:n(e.primary.main,.9)}}})),de=({pickerYear:e,selectedMonth:t,locale:n,isMonthDisabled:r,onMonthSelect:i})=>(0,Y.jsx)(u,{container:!0,spacing:.5,children:Array.from({length:le},(a,o)=>{let c=new Date(e,o,1),l=j(c,`MMM`,{locale:n}),d=o===t.getMonth()&&e===t.getFullYear(),f=r?.(c)??!1;return(0,Y.jsx)(u,{size:3,children:(0,Y.jsx)(ue,{color:d?`primary`:`ghost`,disabled:f,isSelected:d,size:`small`,onClick:()=>{i(o)},children:(0,Y.jsx)(s,{color:d?`gray.white`:`gray.800`,sx:{textTransform:`capitalize`},children:l})})},o)})}),fe=({currentMonth:e,onMonthChange:t,disablePrev:n,disableNext:r,isMonthDisabled:i})=>{let a=C(),c=(0,J.useRef)(null),{value:u,setTrue:p,setFalse:m}=d(!1),h=j(e,`MMMM yyyy`,{locale:a}),[g,_]=(0,J.useState)(e.getFullYear()),v=(0,J.useCallback)(e=>i?Array.from({length:le},(t,n)=>new Date(e,n,1)).every(e=>i(e)):!1,[i]);return(0,Y.jsxs)(l,{sx:{flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`,px:1.5,pt:1.5,pb:.5},children:[(0,Y.jsx)(x,{color:`ghost`,disabled:n,size:`small`,onClick:()=>{t(T(e,-1))},children:(0,Y.jsx)(o,{variant:W})}),(0,Y.jsx)(y,{ref:c,color:`ghost`,size:`small`,onClick:()=>{_(e.getFullYear()),p()},children:(0,Y.jsx)(s,{sx:{textTransform:`capitalize`},variant:`subtitle1`,children:h})}),(0,Y.jsx)(f,{anchorEl:c.current,anchorOrigin:{vertical:`bottom`,horizontal:`center`},open:u,transformOrigin:{vertical:`top`,horizontal:`center`},onClose:m,children:(0,Y.jsxs)(l,{sx:{p:2,width:240,gap:1},children:[(0,Y.jsxs)(l,{sx:{flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Y.jsx)(x,{color:`ghost`,disabled:v(g-1),size:`small`,onClick:()=>{_(e=>e-1)},children:(0,Y.jsx)(o,{sx:({palette:e})=>({color:e.gray[700]}),variant:W})}),(0,Y.jsx)(s,{variant:`subtitle1`,children:g}),(0,Y.jsx)(x,{color:`ghost`,disabled:v(g+1),size:`small`,onClick:()=>{_(e=>e+1)},children:(0,Y.jsx)(o,{sx:({palette:e})=>({color:e.gray[700]}),variant:G})})]}),(0,Y.jsx)(de,{isMonthDisabled:i,locale:a,pickerYear:g,selectedMonth:e,onMonthSelect:n=>{t(ne(F(e,n),g)),m()}})]})}),(0,Y.jsx)(x,{color:`ghost`,disabled:r,size:`small`,onClick:()=>{t(T(e,1))},children:(0,Y.jsx)(o,{variant:G})})]})},pe=(e,t)=>!e||!t||E(e,t)||L(e,t)?[e,t]:[t,e],X=({day:e,rangeStart:t,rangeEnd:n,hoveredDay:r,outsideCurrentMonth:i})=>{let a=t!==null&&n===null,[o,s]=pe(t,n??(a&&r?r:null)),c=!!(o&&s&&!E(e,o)&&!D(e,s))&&!i,l=!!(o&&L(e,o)),u=!!(s&&L(e,s)),d=a&&!!(r&&t),[f,p]=pe(t,r);return{isHighlighting:c,isStartOfHighlighting:l,isEndOfHighlighting:u,isPreviewing:d&&!!(f&&p&&!E(e,f)&&!D(e,p))&&!i,isStartOfPreviewing:d&&!!(f&&L(e,f)),isEndOfPreviewing:d&&!!(p&&L(e,p)),selected:l||u}}
1,me=t(q)(({theme:{palette:e,shape:t}})=>({borderRadius:t.borderRadius,[`&.${K.today}`]:{border:0,outline:0,color:e.primary.main,[`&:not(.${K.selected})`]:{border:0,outline:0}},[`&:not(.${K.selected}):hover`]:{border:0,borderRadius:t.borderRadius,backgroundColor:n(e.primary.main,.9)},[`&.${K.selectionStart}`]:{borderTopLeftRadius:t.borderRadius,borderBottomLeftRadius:t.borderRadius},[`&.${K.selectionEnd}`]:{borderTopRightRadius:t.borderRadius,borderBottomRightRadius:t.borderRadius},[`&.${K.insideSelection}::before, 2 &.${K.selectionStart}::before, 3 &.${K.selectionEnd}::before`]:{backgroundColor:n(e.primary.main,.9)},[`&.${K.selected}:not(.${K.insideSelection})`]:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderRadius:t.borderRadius,"&:hover, &:focus":{backgroundColor:r(e.primary.main,.1)}},[`&.${K.insidePreviewing}::after, 4 &.${K.previewStart}::after, 5 &.${K.previewEnd}::after`]:{backgroundColor:n(e.primary.main,.9),borderColor:`transparent`},[`&.${K.previewStart}::after`]:{borderTopLeftRadius:t.borderRadius,borderBottomLeftRadius:t.borderRadius},[`&.${K.previewEnd}::after`]:{borderTopRightRadius:t.borderRadius,borderBottomRightRadius:t.borderRadius},[`&.${K.dayOutsideMonth}.${K.insidePreviewing}::after`]:{backgroundColor:`transparent`},[`&.${K.fillerCell}, &.${K.fillerCell}:hover`]:{backgroundColor:`transparent`}})),he=t(ce)(({theme:e})=>({[`.${c.subtitle1}:first-letter`]:{textTransform:`capitalize`},[`& .${oe.root}.${ae.slideTransition}`]:{overflowX:`clip`},[`& .${K.root}`]:{borderRadius:e.shape.borderRadius,[`&:not(.${K.selected}):hover`]:{backgroundColor:e.palette.gray[100]}}})),ge=e=>{let{day:t,rangeStart:n=null,rangeEnd:r=null,hoveredDay:i=null,onHover:a,outsideCurrentMonth:o,draggable:s,...c}=e,l=X({day:t,rangeStart:n,rangeEnd:r,hoveredDay:i,outsideCurrentMonth:o??!1});return(0,Y.jsx)(me,{...c,day:t,draggable:s===!0||s===`true`?!0:void 0,outsideCurrentMonth:o,onMouseEnter:()=>{a?.(t)},...l})},_e=e=>e.startsWith(`year:`),ve=e=>e.startsWith(`dquarter:`),ye=e=>e.startsWith(`dmonth:`),Z=(e,t=new Date)=>{let n=t.getFullYear();return Array.from({length:e},(e,t)=>`year:${n-2-t}`)},be=(e,t=new Date)=>Array.from({length:e},(e,n)=>{let r=V(t,2+n);return`dquarter:${r.getFullYear()}:${Math.ceil((r.getMonth()+1)/3)}`}),xe=(e,t=new Date)=>Array.from({length:e},(e,n)=>{let r=H(t,2+n);return`dmonth:${r.getFullYear()}:${r.getMonth()+1}`}),Se=()=>[`today`,`yesterday`,`last7Days`,`currentMonth`,`currentQuarter`,`currentYear`,`last12Months`,`lastMonth`,`previousQuarter`,`lastYear`,`1quarter`,`2quarter`,`3quarter`,`4quarter`,...Z(3),`custom`],Q=[`currentYear`,`nextYear`,`lastYear`,`last12Months`,`custom`],Ce=`currentYear`,$=e=>{if(e<=0)throw Error(`Invalid days argument`);let t=U(new Date);return{start:A(k(t,e-1)),end:t}},we={last12Months:()=>{let e=new Date;return{start:z(H(e,11)),end:N(e)}},currentYear:()=>{let e=new Date;return{start:P(e),end:B(e)}},lastYear:()=>{let e=re(new Date,1);return{start:P(e),end:B(e)}},nextYear:()=>{let e=w(new Date,1);return{start:P(e),end:B(e)}},last7Months:()=>{let e=new Date;return{start:z(H(e,7)),end:N(e)}},currentMonth:()=>{let e=new Date;return{start:z(e),end:N(e)}},lastMonth:()=>{let e=z(H(new Date,1));return{start:e,end:N(e)}},last7Days:()=>$(7),last30Days:()=>$(30),last60Days:()=>$(60),last90Days:()=>$(90),last150Days:()=>$(150),last180Days:()=>$(180),"1quarter":()=>{let e=P(new Date);return{start:e,end:M(e)}},"2quarter":()=>{let e=O(P(new Date),1);return{start:e,end:M(e)}},"3quarter":()=>{let e=O(P(new Date),2);return{start:e,end:M(e)}},"4quarter":()=>{let e=O(P(new Date),3);return{start:e,end:M(e)}},sinceEver:()=>({start:null,end:null}),today:()=>{let e=new Date;return{start:A(e),end:U(e)}},yesterday:()=>{let e=k(new Date,1);return{start:A(e),end:U(e)}},previousQuarter:()=>{let e=V(new Date,1);return{start:I(e),end:R(e)}},currentQuarter:()=>{let e=new Date;return{start:I(e),end:R(e)}}},Te=e=>{if(e===`custom`)return{start:null,end:null};if(_e(e)){let t=parseInt(e.slice(5),10),n=new Date(t,0,1);return{start:P(n),end:B(n)}}if(ve(e)){let[,t,n]=e.split(`:`),r=new Date(parseInt(t,10),(parseInt(n,10)-1)*3,1);return{start:I(r),end:R(r)}}if(ye(e)){let[,t,n]=e.split(`:`),r=new Date(parseInt(t,10),parseInt(n,10)-1,1);return{start:z(r),end:N(r)}}if((e=>e in we)(e))return we[e]();throw Error(`Unknown period: "${e}"`)},Ee=e=>({last12Months:{value:`last12Months`,label:e(e=>
5e[`period.last.12.months`])},currentYear:{value:`currentYear`,label:e(e=>e[`period.current.year`])},lastYear:{value:`lastYear`,label:e(e=>e[`period.last.year`])},nextYear:{value:`nextYear`,label:e(e=>e[`period.next.year`])},custom:{value:`custom`,label:e(e=>e[`period.custom`])}}),De=[[`last12Months`],[`today`,`yesterday`,`last7Days`,`currentMonth`,`lastMonth`,`currentQuarter`,`previousQuarter`,`currentYear`,`lastYear`]],Oe=[`years`,`quarters`,`months`],ke=150,Ae={display:`flex`,justifyContent:`space-between`,gap:2,minWidth:180},je={years:_e,quarters:ve,months:ye},Me=({anchorEl:e,open:t,displayedPeriod:n,showAllDatesOption:r=!1,onPeriodSelect:i,onClose:a,getPeriodLabel:s})=>{let{t:c}=ie(`shared`),l=(0,J.useMemo)(()=>({years:Z(3),quarters:be(4),months:xe(12)}),[]),[u,d]=(0,J.useState)(null),[f,h]=(0,J.useState)(null),g=(0,J.useRef)(null),_=(0,J.useMemo)(()=>({years:c(e=>e[`period.flyout.years`]),quarters:c(e=>e[`period.flyout.quarters`]),months:c(e=>e[`period.flyout.months`])}),[c]),y=(0,J.useCallback)(()=>{g.current&&=(clearTimeout(g.current),null)},[]),x=(0,J.useCallback)(()=>{h(null),d(null)},[]),C=(0,J.useCallback)((e,n)=>{t&&(y(),d(e),h(n))},[t,y]),te=(0,J.useCallback)(()=>{g.current=setTimeout(()=>{x()},ke)},[x]),w=(0,J.useCallback)(()=>{x(),a()},[a,x]),T=(0,J.useCallback)(e=>{x(),y(),i(e)},[i,x,y]);return(0,J.useEffect)(()=>{t||(x(),y())},[t,x,y]),(0,J.useEffect)(()=>()=>y(),[y]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(p,{anchorEl:e,anchorOrigin:{vertical:`bottom`,horizontal:`left`},open:t,transformOrigin:{vertical:`top`,horizontal:`left`},onClose:w,children:[De.flatMap((e,t)=>[...t>0?[(0,Y.jsx)(S,{},`divider-${e[0]}`)]:[],...e.map(e=>(0,Y.jsx)(b,{selected:n===e,onClick:()=>T(e),children:s(e)},e))]),(0,Y.jsx)(S,{}),Oe.map(e=>(0,Y.jsxs)(b,{selected:je[e](n),sx:Ae,onMouseEnter:t=>C(t.currentTarget,e),onMouseLeave:te,children:[_[e],(0,Y.jsx)(o,{sx:{fontSize:`small`,opacity:.54},variant:G})]},e)),(0,Y.jsx)(S,{}),r&&(0,Y.jsx)(b,{selected:n===`sinceEver`,onClick:()=>T(`sinceEver`),children:s(`sinceEver`)}),(0,Y.jsx)(b,{selected:n===`custom`,onClick:()=>T(`custom`),children:s(`custom`)})]}),(0,Y.jsx)(ee,{anchorEl:u,open:f!==null,placement:`right-start`,sx:e=>({zIndex:e.zIndex.modal+1}),children:(0,Y.jsx)(v,{sx:{py:.5,boxShadow:3},onMouseEnter:y,onMouseLeave:te,children:(0,Y.jsx)(m,{children:f&&l[f].map(e=>(0,Y.jsx)(b,{selected:n===e,onClick:()=>T(e),children:s(e)},e))})})})]})},Ne=({initialStart:e,initialEnd:t})=>{let[n,r]=(0,J.useState)(()=>z(e??new Date)),[i,a]=(0,J.useState)(()=>{let n=z(e??new Date),r=z(t??T(new Date,1));return E(n,r)?r:T(n,1)}),[o,s]=(0,J.useState)(0);return{leftMonth:n,rightMonth:i,calendarKey:o,setLeftMonth:r,setRightMonth:a,adjacentMonths:!E(T(n,1),i),isLeftMonthDisabled:(0,J.useCallback)(e=>!E(z(e),i),[i]),isRightMonthDisabled:(0,J.useCallback)(e=>!D(z(e),n),[n]),resetCalendar:(0,J.useCallback)(({resetToCurrentMonth:e,dates:t}={})=>{if(s(e=>e+1),e)r(z(new Date)),a(T(z(new Date),1));else if(t){let e=z(t.start??new Date),n=z(t.end??T(new Date,1));r(e),a(E(e,n)?n:T(e,1))}},[])}},Pe=({onRangeComplete:e})=>{let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null),[a,o]=(0,J.useState)(null),s=t!==null&&r===null,c=(0,J.useCallback)(a=>{if(a)if(!t||r)n(a),i(null),o(null);else{let[r,s]=E(a,t)?[a,t]:[t,a];n(r),i(s),o(null),e(r,s)}},[t,r,e]),l=(0,J.useCallback)(e=>{s&&o(e)},[s]);return{handleDayClick:c,clearHoveredDay:(0,J.useCallback)(()=>o(null),[]),daySlotProps:(0,J.useMemo)(()=>({rangeStart:t,rangeEnd:r,hoveredDay:a,onHover:l}),[t,r,a,l]),resetRange:(0,J.useCallback)((e,t)=>{n(e??null),i(t??null),o(null)},[])}},Fe={calendarHeader:fe,day:ge},Ie=626,Le=[`1quarter`,`2quarter`,`3quarter`,`4quarter`],Re=({onChange:e,dates:t,periods:n,allowAllDates:r=!1,allDatesLabel:i,fullWidth:a=!1,dateFormat:s=`dd/MM/yyyy`,icon:c,dayOfWeekFormatter:u})=>{let{t:p,i18n:m}=ie(`shared`),{isMobile:g}=te(),v=new Date().getFullYear(),y=(0,J.useMemo)(()=>{let e=e=>p(e=>e[`period.last.num.days`],{num:e});return{last12Months:{value:`last12Months`,label:p(e=>e[`period.last.12.months`])},currentYear:{value:`currentYear`,label:p(e=>
5e[`period.current.year`])},nextYear:{value:`nextYear`,label:p(e=>e[`period.next.year`])},lastYear:{value:`lastYear`,label:p(e=>e[`period.last.year`])},last7Months:{value:`last7Months`,label:p(e=>e[`period.last.7.months`])},currentMonth:{value:`currentMonth`,label:p(e=>e[`period.current.month`])},currentQuarter:{value:`currentQuarter`,label:p(e=>e[`period.current.quarter`])},last7Days:{value:`last7Days`,label:e(7)},lastMonth:{value:`lastMonth`,label:p(e=>e[`period.last.month`])},last30Days:{value:`last30Days`,label:e(30)},last60Days:{value:`last60Days`,label:e(60)},last90Days:{value:`last90Days`,label:e(90)},last150Days:{value:`last150Days`,label:e(150)},last180Days:{value:`last180Days`,label:e(180)},"1quarter":{value:`1quarter`,label:p(e=>e[`period.1.quarter`])},"2quarter":{value:`2quarter`,label:p(e=>e[`period.2.quarter`])},"3quarter":{value:`3quarter`,label:p(e=>e[`period.3.quarter`])},"4quarter":{value:`4quarter`,label:p(e=>e[`period.4.quarter`])},sinceEver:{value:`sinceEver`,label:p(e=>e[`period.since.ever`])},custom:{value:`custom`,label:p(e=>e[`period.custom`])},today:{value:`today`,label:p(e=>e[`period.today`])},yesterday:{value:`yesterday`,label:p(e=>e[`period.yesterday`])},previousQuarter:{value:`previousQuarter`,label:p(e=>e[`period.previous.quarter`])}}},[p]),ee=(0,J.useCallback)(e=>{let[,t,n]=e.split(`:`),r=new Date(parseInt(t,10),parseInt(n,10)-1,1),i=new Intl.DateTimeFormat(m.language,{month:`long`}).format(r);return`${i.charAt(0).toUpperCase()+i.slice(1)} ${t}`},[m.language]),x=(0,J.useCallback)(e=>{let[,t,n]=e.split(`:`);return parseInt(t,10)===v?p(e=>e[`period.quarter.label.noyear`],{n}):p(e=>e[`period.quarter.label`],{n,year:t})},[p,v]),S=(0,J.useCallback)(e=>e===`sinceEver`&&i?i:_e(e)?e.slice(5):ve(e)?x(e):ye(e)?ee(e):y[e].label,[y,x,ee,i]),C=!n,w=(0,J.useMemo)(()=>n?n.includes(`custom`)?n:[...n,`custom`]:[...Se().filter(e=>!Le.includes(e)),...be(4),...xe(12)],[n]),T=r&&t.start===null&&t.end===null,E=T?`sinceEver`:n?w[0]:Ce,[D,O]=(0,J.useState)(E),k=(0,J.useRef)(E),[A,M]=(0,J.useState)(E),[N,P]=(0,J.useState)([t.start,t.end]),F=(0,J.useRef)(null),{value:
5I,setTrue:ne,setFalse:R}=d(!1),{value:z,setTrue:B,setFalse:V}=d(!1),H=(0,J.useRef)(null),re=(0,J.useRef)(null);(0,J.useEffect)(()=>{if(!w.includes(D)&&Se().includes(D))throw Error(`Period ${D} is not in periods array.`)},[w,D]);let U=(0,J.useCallback)(()=>{V(),R()},[V,R]),W=(0,J.useCallback)((e,t,n)=>{if(e===`custom`)return!1;let{start:r,end:i}=Te(e);return!!(r&&i&&L(r,t)&&L(i,n))},[]),G=(0,J.useCallback)((e,t)=>{let n=w.find(n=>W(n,e,t));if(n){O(n),M(n);return}w.includes(`custom`)&&(O(`custom`),M(`custom`))},[w,W]),{handleDayClick:oe,clearHoveredDay:ce,daySlotProps:K,resetRange:q}=Pe({onRangeComplete:(0,J.useCallback)((t,n)=>{e({start:t,end:n}),P([t,n]),U(),G(t,n)},[e,U,G])}),{leftMonth:le,rightMonth:ue,calendarKey:de,setLeftMonth:fe,setRightMonth:pe,adjacentMonths:X,isLeftMonthDisabled:me,isRightMonthDisabled:ge,resetCalendar:Z}=Ne({initialStart:t.start,initialEnd:t.end}),Q=(0,J.useCallback)(({resetToCurrentMonth:e=!1}={})=>{ne(),e?(q(),Z({resetToCurrentMonth:!0})):(q(t.start,t.end),Z({dates:{start:t.start,end:t.end}}))},[ne,t.start,t.end,q,Z]),$=(0,J.useCallback)(t=>{F.current=t,O(e=>(k.current=e,t)),t===`custom`?(Q({resetToCurrentMonth:!0}),P([null,null])):(U(),e(Te(t)),M(t))},[U,e,Q]),we=(0,J.useCallback)(e=>{$(e.target.value)},[$]),Ee=(0,J.useCallback)(()=>{B(),D===`custom`&&Q()},[B,D,Q]),De=(0,J.useCallback)(()=>{if(F.current&&F.current!==`custom`){F.current=null;return}D===`custom`&&!I&&Q()},[D,I,Q]),Oe=(0,J.useCallback)((e,t)=>{t===`backdropClick`&&(U(),I&&O(k.current))},[U,I]),ke=(0,J.useCallback)((e,t)=>{t===`backdropClick`&&R()},[R]),Ae=(0,J.useCallback)(e=>e===`custom`&&N[0]&&N[1]?`${j(N[0],s)} - ${j(N[1],s)}`:S(e),[N,s,S]);(0,J.useEffect)(()=>{if(T){O(`sinceEver`),M(`sinceEver`);return}!t.start||!t.end||(G(t.start,t.end),N[0]&&N[1]&&!I&&(!L(t.start,N[0])||!L(t.end,N[1]))&&P([t.start,t.end]))},[I,N,t.start,t.end,G,T]);let je=(0,J.useMemo)(()=>I&&window.innerWidth-(H.current?.getBoundingClientRect().right??0)<Ie?{anchorOrigin:{vertical:`bottom`,horizontal:-16},transformOrigin:{vertical:`top`,horizontal:`right`}}:{anchorOrigin:{vertical:`bottom`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`left`}},[I]),Re=(0,J.useMemo)(()=>({day:K,calendarHeader:g?{}:{disableNext:X,isMonthDisabled:me}}),[K,X,me,g]),ze=(0,J.useMemo)(()=>({day:K,calendarHeader:{disablePrev:X,isMonthDisabled:ge}}),[K,X,ge]),Be=(0,J.useMemo)(()=>({onOpen:Ee,renderValue:e=>Ae(e),startAdornment:c?(0,Y.jsx)(o,{sx:{ml:2},variant:c}):void 0}),[Ee,Ae,c]),Ve=(0,J.useMemo)(()=>({width:a?`100%`:`auto`}),[a]);return(0,Y.jsxs)(Y.Fragment,{children:[C?(0,Y.jsx)(h,{ref:H,select:!0,sx:Ve,value:A,slotProps:{select:{...Be,open:!1}},children:(0,Y.jsx)(b,{sx:{display:`none`},value:A})}):(0,Y.jsx)(h,{ref:H,select:!0,sx:Ve,value:A,slotProps:{select:{...Be,open:z,onClose:De,MenuProps:{onClose:Oe,ref:re}}},onChange:we,children:w.map(e=>(0,Y.jsx)(b,{value:e,children:S(e)},e))}),C&&(0,Y.jsx)(Me,{anchorEl:H.current,displayedPeriod:A,getPeriodLabel:S,open:z,showAllDatesOption:r,onClose:U,onPeriodSelect:$}),(0,Y.jsx)(f,{anchorEl:H.current,disablePortal:!1,open:I,sx:({palette:e})=>({[`.${_.root}`]:{border:`1px solid`,borderColor:e.divider,p:0}}),onClose:ke,...je,children:(0,Y.jsxs)(l,{direction:`row`,sx:{[`& .${se.root}`]:{height:`auto`,maxHeight:`none`},[`& .${ae.slideTransition}`]:{overflowX:`clip`,minHeight:264}},onMouseLeave:ce,children:[(0,Y.jsx)(he,{dayOfWeekFormatter:u,referenceDate:le,slotProps:Re,slots:Fe,views:[`day`],onChange:oe,onMonthChange:fe},`left-${de}`),!g&&(0,Y.jsx)(he,{dayOfWeekFormatter:u,referenceDate:ue,slotProps:ze,slots:Fe,views:[`day`],onChange:oe,onMonthChange:pe},`right-${de}`)]})})]})};export{Ce as a,be as c,Se as d,Ee as f,fe as h,Me as i,Z as l,he as m,Pe as n,Q as o,ge as p,Ne as r,xe as s,Re as t,Te as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.