(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8604],{65752:e=>{e.exports={calendar:"calendar-N6r5jhbE",popupStyle:"popupStyle-N6r5jhbE",header:"header-N6r5jhbE","flip-horizontal":"flip-horizontal-N6r5jhbE","sub-header":"sub-header-N6r5jhbE","view-month":"view-month-N6r5jhbE","view-year":"view-year-N6r5jhbE","view-decades":"view-decades-N6r5jhbE",weeks:"weeks-N6r5jhbE",week:"week-N6r5jhbE",day:"day-N6r5jhbE",hover:"hover-N6r5jhbE","accent-color":"accent-color-N6r5jhbE","another-month":"another-month-N6r5jhbE","current-day":"current-day-N6r5jhbE","slot-wrapper":"slot-wrapper-N6r5jhbE","hide-focus-ring":"hide-focus-ring-N6r5jhbE","decade-button":"decade-button-N6r5jhbE","visually-hidden":"visually-hidden-N6r5jhbE","grid-row":"grid-row-N6r5jhbE"}},21187:e=>{e.exports={container:"container-PNiXwSz6",icon:"icon-PNiXwSz6",tooltip:"tooltip-PNiXwSz6",date:"date-PNiXwSz6",time:"time-PNiXwSz6"}},14770:e=>{e.exports={pickerInput:"pickerInput-P2cJzZdH",icon:"icon-P2cJzZdH",disabled:"disabled-P2cJzZdH",picker:"picker-P2cJzZdH",fixed:"fixed-P2cJzZdH",absolute:"absolute-P2cJzZdH",nativePicker:"nativePicker-P2cJzZdH"}},90132:e=>{e.exports={tooltip:"tooltip-RU08GcsY"}},67268:e=>{e.exports={desktopTimeInput:"desktopTimeInput-cW0jHi4o"}},56718:e=>{e.exports={wrap:"wrap-NsE0FV0Z",input:"input-NsE0FV0Z"}},79245:e=>{e.exports={icon:"icon-Rubz29lH"}},27365:(e,t,n)=>{"use strict";n.d(t,{getChartTimezoneOffsetMs:()=>r,getTimezoneName:()=>a});var s=n(37236);function a(e){const t=e.model().timezone();if("exchange"!==t)return t;const n=e.model().mainSeries().symbolInfo();return n?.timezone}function r(e,t){if(void 0===t)return 0;return(0,s.get_timezone)(t).offset_utc(e)}},51826:(e,t,n)=>{"use strict";n.d(t,{DialogsOpenerManager:()=>s,dialogsOpenerManager:()=>a});class s{constructor(){this._storage=new Map}setAsOpened(e,t){this._storage.set(e,t)}setAsClosed(e){this._storage.delete(e)}isOpened(e){return this._storage.has(e)}getDialogPayload(e){return this._storage.get(e)}}const a=new s},15499:(e,t,n)=>{"use strict";n.d(t,{CalendarViewType:()=>c,DECADES_YEARS_AMOUNT:()=>p,getCurrentAriaLabel:()=>v,getCurrentVisibleTitle:()=>D,getDayAriaLabel:()=>g,getMonths:()=>o,getMonthsShort:()=>i,getNextAriaLabel:()=>m,getNextLiveRegionConfirmation:()=>w,getNextMonth:()=>C,getPrevAriaLabel:()=>f,getPrevLiveRegionConfirmation:()=>y,getSubHeaderDecades:()=>d,getSubHeaderYear:()=>h,getViewTypeLiveRegionConfirmation:()=>b,getWeekDaysMin:()=>a});var s=n(11542);const a=()=>[s.t(null,{context:"day_of_week"},n(30961)),s.t(null,{context:"day_of_week"},n(9135)),s.t(null,{context:"day_of_week"},n(92578)),s.t(null,{context:"day_of_week"},n(8765)),s.t(null,{context:"day_of_week"},n(23230)),s.t(null,{context:"day_of_week"},n(94748)),s.t(null,{context:"day_of_week"
},n(75005))],r=()=>[s.t(null,void 0,n(61480)),s.t(null,void 0,n(19573)),s.t(null,void 0,n(82160)),s.t(null,void 0,n(94226)),s.t(null,void 0,n(79137)),s.t(null,void 0,n(3570)),s.t(null,void 0,n(30348))],o=()=>[s.t(null,void 0,n(200)),s.t(null,void 0,n(81069)),s.t(null,void 0,n(93878)),s.t(null,void 0,n(28896)),s.t(null,void 0,n(25734)),s.t(null,void 0,n(61487)),s.t(null,void 0,n(6608)),s.t(null,void 0,n(11081)),s.t(null,void 0,n(32179)),s.t(null,void 0,n(37997)),s.t(null,void 0,n(4607)),s.t(null,void 0,n(90082))],i=()=>[s.t(null,void 0,n(62310)),s.t(null,void 0,n(2507)),s.t(null,void 0,n(92767)),s.t(null,void 0,n(27072)),s.t(null,void 0,n(25734)),s.t(null,void 0,n(429)),s.t(null,void 0,n(53786)),s.t(null,void 0,n(46450)),s.t(null,void 0,n(6816)),s.t(null,void 0,n(12179)),s.t(null,void 0,n(26899)),s.t(null,void 0,n(32084))],l={get prevMonth(){return s.t(null,void 0,n(93984))},get nextMonth(){return s.t(null,void 0,n(92790))},get prevYear(){return s.t(null,void 0,n(75776))},get nextYear(){return s.t(null,void 0,n(69102))},get prevDecades(){return s.t(null,void 0,n(44701))},get nextDecades(){return s.t(null,void 0,n(17538))},get selectMonth(){return s.t(null,void 0,n(70235))},get selectYear(){return s.t(null,void 0,n(71961))},get selectDate(){return s.t(null,void 0,n(91245))}},u={get setMonth(){return s.t(null,void 0,n(99470))},get setYear(){return s.t(null,void 0,n(7861))},get setDecades(){return s.t(null,void 0,n(65728))}};var c;!function(e){e.Month="month",e.Year="year",e.Decades="decades"}(c||(c={}));const d=()=>s.t(null,void 0,n(66181)),h=()=>s.t(null,void 0,n(43154)),p=20;function g(e){return`${r()[e.getDay()]} ${e.getDate()} ${o()[e.getMonth()]} ${e.getFullYear()}`}function f(e,t){switch(e){case c.Month:{const e=new Date(t);return e.setMonth(e.getMonth()-1),`${l.prevMonth}, ${o()[e.getMonth()]} ${e.getFullYear()}`}case c.Year:return`${l.prevYear}, ${t.getFullYear()-1}`;case c.Decades:return`${l.prevDecades}, ${t.getFullYear()-p} - ${t.getFullYear()-1}`}}function m(e,t){switch(e){case c.Month:{const e=new Date(t);return e.setMonth(e.getMonth()+1),`${l.nextMonth}, ${o()[e.getMonth()]} ${e.getFullYear()}`}case c.Year:return`${l.nextYear}, ${t.getFullYear()+1}`;case c.Decades:return`${l.nextDecades}, ${t.getFullYear()+p} - ${t.getFullYear()+2*p-1}`}}function v(e,t){switch(e){case c.Month:return`${l.selectMonth}, ${t.getFullYear()}`;case c.Year:return`${l.selectYear}, ${t.getFullYear()} - ${t.getFullYear()+p-1}`;case c.Decades:return`${l.selectDate}, ${o()[t.getMonth()]} ${t.getFullYear()}`}}function D(e,t){switch(e){case c.Month:return`${o()[t.getMonth()]} ${t.getFullYear()}`;case c.Year:return`${t.getFullYear()}`;case c.Decades:return`${t.getFullYear()} - ${t.getFullYear()+p-1}`}}function y(e,t){switch(e){case c.Month:{const e=new Date(t);return e.setMonth(e.getMonth()-1),u.setMonth.format({month:o()[e.getMonth()]})}case c.Year:return u.setYear.format({year:""+(t.getFullYear()-1)});case c.Decades:return u.setDecades.format({year_start:""+(t.getFullYear()-p),year_end:""+(t.getFullYear()-1)})}}function w(e,t){
switch(e){case c.Month:{const e=C(t);return u.setMonth.format({month:o()[e.getMonth()]})}case c.Year:return u.setYear.format({year:`${t.getFullYear()+1}`});case c.Decades:return u.setDecades.format({year_start:`${t.getFullYear()+p}`,year_end:""+(t.getFullYear()+2*p-1)})}}function b(e,t){switch(e){case c.Month:return u.setYear.format({year:`${t.getFullYear()}`});case c.Year:return u.setDecades.format({year_start:`${t.getFullYear()}`,year_end:""+(t.getFullYear()+p-1)});case c.Decades:return u.setMonth.format({month:o()[t.getMonth()]})}}function C(e){return 11===e.getMonth()?new Date(e.getFullYear()+1,0,1):new Date(e.getFullYear(),e.getMonth()+1,1)}},44313:(e,t,n)=>{"use strict";n.d(t,{Calendar:()=>R});var s=n(50959),a=n(97754),r=n.n(a),o=n(14543),i=n(9745),l=n(17140),u=n(65752);function c(e){const{prevAriaLabel:t,nextAriaLabel:n,currentAriaLabel:a,currentVisibleTitle:r,isNextDisabled:c,isPrevDisabled:d,isViewModeDisabled:h,prevRef:p,middleRef:g,onPrevClick:f,onNextClick:m,onCurrentClick:v,onPrevKeyDown:D,onMiddleKeyDown:y,onHeaderKeyDown:w}=e;return s.createElement("div",{className:u.header,onKeyDown:w},s.createElement(o.LightButton,{startSlot:s.createElement(i.Icon,{icon:l}),onClick:f,size:"small",variant:"ghost","aria-label":t,disabled:d,onKeyDown:D,reference:p}),s.createElement(o.LightButton,{size:"small",variant:"ghost","aria-label":a,onClick:v,disabled:h,onKeyDown:y,reference:g},r),s.createElement(o.LightButton,{startSlot:s.createElement(i.Icon,{icon:l}),onClick:m,size:"small",variant:"ghost","aria-label":n,disabled:c,className:u["flip-horizontal"]}))}var d=n(23935),h=n(60336),p=n(7145),g=n(15499);class f extends s.PureComponent{constructor(){super(...arguments),this._dateFormatter=new h.DateFormatter,this._getVariant=()=>{let e="ghost";return this._withinSelectedRange()&&(e=this.props.isDisabled?"secondary":"quiet-primary"),this._isOnHighlightedEdge()&&this.props.isDisabled&&(e="quiet-primary"),e},this._onClick=()=>{this.props.onClick&&!this.props.isDisabled&&this.props.onClick(new Date(this.props.day))},this._onPointerOver=()=>{this.props.onHover&&!this.props.isDisabled&&this.props.onHover(new Date(this.props.day))},this._onPointerOut=()=>{this.props.onHover&&!this.props.isDisabled&&this.props.onHover(null)}}render(){const e=a(u.day,this.props.isDisabled&&u.disabled,!this.props.isDisabled&&(this.props.isSelected||this._isOnHighlightedEdge())&&u["accent-color"],this._withinSelectedRange()&&u["within-selected-range"],this._isCurrentDay()&&u["current-day"],!this.props.showFocusRing&&u["hide-focus-ring"],this.props.isAnotherMonth&&u["another-month"]),t=this.props.isSelected||this._isOnHighlightedEdge()||this._withinSelectedRange(),n=t||this._isCurrentDay();return s.createElement(o.LightButton,{role:"cell",onClick:this._onClick,onPointerOver:this._onPointerOver,onPointerOut:this._onPointerOut,onFocus:this.props.onFocus,size:"small",variant:this._getVariant(),isSelected:n,"data-day":this._dateFormatter.formatLocal(this.props.day),className:a(e,this.props.forceHover&&u.hover),disabled:this.props.isDisabled,
reference:this.props.reference,tabIndex:this.props.tabIndex,"aria-label":(0,g.getDayAriaLabel)(this.props.day),"aria-selected":t,"aria-current":this._isCurrentDay()?"date":void 0,"aria-colindex":this.props.ariaColIndex},this.props.day.getDate())}_isOnHighlightedEdge(){const{day:e,highlightedFrom:t,highlightedTo:n}=this.props;return!(!t||!n)&&((0,d.isSameDay)(e,t)||(0,d.isSameDay)(e,n))}_withinSelectedRange(){const{day:e,highlightedFrom:t,highlightedTo:n}=this.props;return!(!t||!n)&&this._isBetweenByDay(t,e,n)}_isCurrentDay(){return(0,d.isSameDay)(this.props.todayDate??new Date,this.props.day)}_isBetweenByDay(e,t,n){const s=(0,p.resetToDayStart)(e),a=(0,p.resetToDayStart)(t),r=(0,p.resetToDayStart)(n);return s<a&&a<r}}const m=7;function v(e){const{rowIndex:t,days:n,showFocusRing:a,dateInTabOrder:o,isDisabledDate:i,highlightedFrom:l,highlightedTo:c,setCurrentlyFocused:h,setItemRef:p,selectedDate:g,viewDate:v,onClickDay:D,onDayHover:y,onDayFocus:w,todayDate:b,forceHoverTo:C,forceHoverFrom:F,className:_}=e;return s.createElement("div",{role:"row",className:r()(u.week,_)},n.map(((e,r)=>s.createElement(f,{key:e.toDateString(),day:e,isDisabled:i(e),isSelected:!!g&&(0,d.isSameDay)(e,g),onClick:D,onHover:y,highlightedFrom:l,highlightedTo:c,forceHover:F&&C&&e>=F&&e<=C,reference:p(e),tabIndex:(0,d.isSameDay)(e,o)?0:-1,onFocus:()=>function(e){w?.(e),(0,d.isSameDay)(e,o)&&h(e)}(e),showFocusRing:a,todayDate:b,isAnotherMonth:!(0,d.isSameMonth)(e,v),ariaColIndex:0===t?m-n.length+r+1:void 0}))))}var D=n(78869),y=n(68335);function w({isDisabledDate:e,findDate:t,getFirstDate:n,getLastDate:a,setNext:r,setPrev:o,dateToFocus:i,verticalOffset:l,dateLevel:u}){const[c,h]=(0,D.useRefsMap)(),p=(0,s.useCallback)((t=>t?e(t)?null:t:null),[e]),g=(0,s.useCallback)(((n,s)=>{if(!n)return null;const a=(0,d.getCloneDateWithOffset)({dateFrom:n,offset:s,isDisabledDate:e,level:u});return p(t(a))}),[t,p]),f=(0,s.useCallback)((()=>{const e=n();return p(e)||g(e,1)}),[p,g]),m=(0,s.useCallback)((()=>{const e=a();return p(e)||g(e,-1)}),[p,g]),v=(0,s.useCallback)(((t,n)=>{if(!t)return;const s=(0,d.getCloneDateWithOffset)({dateFrom:t,offset:n,isDisabledDate:e,level:u});s&&(n>0?r(s):o(s))}),[e,r,o]),{currentlyFocused:w,setCurrentlyFocused:b,focusItem:C,bindings:F}=function({refsMap:e,verticalOffset:t,getNextKeyToFocus:n,getFirstKey:a,getLastKey:r,onGridEnd:o}){const[i,l]=(0,s.useState)(null),u=(0,s.useCallback)((t=>{if(!t)return;const n=e.current.get(t);n&&(n.focus(),l(t))}),[e]),c=(0,s.useCallback)((e=>{const t=n(i,e);t?u(t):o(i,e)}),[i,n]),d=(0,s.useCallback)((e=>{const n=(0,y.hashFromEvent)(e);if(40===n&&(e.preventDefault(),c(t)),38===n&&(e.preventDefault(),c(-1*t)),39===n&&(e.preventDefault(),c(1)),37===n&&(e.preventDefault(),c(-1)),36===n){e.preventDefault();const t=a();u(t)}if(35===n){e.preventDefault();const t=r();u(t)}}),[i,n]);return{currentlyFocused:i,setCurrentlyFocused:l,focusItem:u,bindings:{onKeyDown:d}}}({refsMap:c,verticalOffset:l,getNextKeyToFocus:g,getFirstKey:f,getLastKey:m,onGridEnd:v});return(0,s.useEffect)((()=>C(p(t(i)))),[i]),{itemsRefs:c,
setItemRef:h,ensureNotDisabledDate:p,currentlyFocused:w,setCurrentlyFocused:b,focusItem:C,bindings:F}}function b(e){const{selectedDate:t,viewDate:n,dateToFocus:a,weeks:r,onClickDay:o,setPrevMonth:i,setNextMonth:l,maxDate:c,minDate:h,isDateDisabled:p,showFocusRing:f,highlightedFrom:m,highlightedTo:D,isDisabled:y,focusableDateRef:b,onDayHover:C,onDayFocus:F,todayDate:_,forceHoverFrom:M,forceHoverTo:S,weekClassName:E}=e,k=(0,s.useCallback)((e=>{if(!e)return null;let t=null;return r.find((({days:n})=>(t=n.find((t=>(0,d.isSameDay)(t,e))),t))),t}),[r]),N=(0,s.useCallback)((()=>r[0].days[0]),[r]),T=(0,s.useCallback)((()=>{const e=r[r.length-1].days;return e[e.length-1]}),[r]),x=(0,s.useCallback)((e=>y||(0,d.isDayDisabled)({day:e,minDate:h,maxDate:c,isDateDisabled:p})),[h,c,p,y]),{itemsRefs:I,setItemRef:R,currentlyFocused:Y,setCurrentlyFocused:P,bindings:V}=w({isDisabledDate:x,findDate:k,getFirstDate:N,getLastDate:T,setPrev:i,setNext:l,dateToFocus:a,verticalOffset:7,dateLevel:"day"}),H=(0,d.getDateInTabOrder)({selectedDate:t??new Date,dateToFocus:a,currentlyFocused:Y,firstEnabledDate:(0,d.getFirstEnabledDay)(r,x),getFirstDate:N,getLastDate:T,isDisabledDate:x});return(0,s.useEffect)((()=>{b.current=H&&I.current.get(H)||null}),[H,b]),s.createElement(s.Fragment,null,s.createElement("div",{className:u["sub-header"],"aria-hidden":!0},(0,g.getWeekDaysMin)().map((e=>s.createElement("span",{key:e},e)))),s.createElement("div",{className:u["view-month"],tabIndex:-1,...V},s.createElement("div",{role:"grid",className:u.weeks},r.map(((e,a)=>s.createElement(v,{className:E,key:e.week,rowIndex:a,setCurrentlyFocused:P,setItemRef:R,dateInTabOrder:H,days:e.days,onDayFocus:F,onDayHover:C,isDisabledDate:x,selectedDate:t,viewDate:n,onClickDay:o,highlightedFrom:m,highlightedTo:D,showFocusRing:f,todayDate:_,forceHoverFrom:M,forceHoverTo:S}))))))}var C=n(82665);const F=3;function _(e){const{months:t,selectedDate:n,maxDate:a,minDate:r,showFocusRing:i,dateToFocus:l,isDisabled:c,focusableDateRef:h,onSelect:p,setPrevYear:f,setNextYear:m}=e,v=(0,s.useCallback)((e=>c||!(0,d.isInRange)(e,r,a,"month")),[r,a,c]),D=(0,s.useCallback)((e=>{if(!e)return null;let n=null;return t.find((({date:t})=>(n=(0,d.isSameMonth)(e,t)?t:null,n))),n}),[t]),y=(0,s.useCallback)((()=>t[0].date),[t]),b=(0,s.useCallback)((()=>t[t.length-1].date),[t]),{itemsRefs:_,setItemRef:M,currentlyFocused:S,setCurrentlyFocused:E,bindings:k}=w({isDisabledDate:v,findDate:D,getFirstDate:y,getLastDate:b,setPrev:f,setNext:m,verticalOffset:F,dateToFocus:l,dateLevel:"month"}),N=(0,d.getDateInTabOrder)({selectedDate:n,dateToFocus:l,currentlyFocused:S,firstEnabledDate:(0,d.getFirstEnabledMonth)(t,v),getFirstDate:y,getLastDate:b,isDisabledDate:v});(0,s.useEffect)((()=>{h.current=N&&_.current.get(N)||null}),[N,h]);const T=(0,s.useMemo)((()=>(0,C.default)(t,F)),[t]);return s.createElement(s.Fragment,null,s.createElement("div",{className:u["sub-header"],"aria-hidden":!0},s.createElement("span",null,(0,g.getSubHeaderYear)())),s.createElement("div",{role:"grid",className:u["view-year"],...k
},T.map(((e,t)=>s.createElement("div",{key:t,role:"row",className:u["grid-row"]},e.map((({title:e,ariaLabel:t,date:a})=>{const r=(0,d.isSameMonth)(a,n),l=v(a),c=r?"quiet-primary":"ghost";return s.createElement(o.LightButton,{key:a.toDateString(),role:"cell",size:"small",variant:c,disabled:l,isSelected:r,className:!i&&u["hide-focus-ring"],onClick:()=>p(a),reference:M(a),tabIndex:(0,d.isSameMonth)(a,N)?0:-1,onFocus:(0,d.isSameMonth)(a,N)?()=>E(a):void 0,"aria-label":`${t} ${a.getFullYear()}`,"aria-selected":r},e)})))))))}const M=4;function S(e){const{years:t,selectedDate:n,dateToFocus:a,maxDate:i,minDate:l,showFocusRing:c,isDisabled:h,focusableDateRef:p,onSelect:f,setPrevDecades:m,setNextDecades:v}=e,D=(0,s.useCallback)((e=>h||!(0,d.isInRange)(e,l,i,"year")),[l,i,h]),y=(0,s.useCallback)((e=>e&&t.find((t=>(0,d.isSameYear)(e,t)))||null),[t]),b=(0,s.useCallback)((()=>t[0]),[t]),F=(0,s.useCallback)((()=>t[t.length-1]),[t]),{itemsRefs:_,setItemRef:S,currentlyFocused:E,setCurrentlyFocused:k,bindings:N}=w({isDisabledDate:D,findDate:y,getFirstDate:b,getLastDate:F,setPrev:m,setNext:v,dateToFocus:a,verticalOffset:M,dateLevel:"year"}),T=(0,d.getDateInTabOrder)({selectedDate:n,dateToFocus:a,currentlyFocused:E,firstEnabledDate:(0,d.getFirstEnabledYear)(t,D),getFirstDate:b,getLastDate:F,isDisabledDate:D});(0,s.useEffect)((()=>{p.current=T&&_.current.get(T)||null}),[T,p]);const x=(0,s.useMemo)((()=>(0,C.default)(t,M)),[t]);return s.createElement(s.Fragment,null,s.createElement("div",{className:u["sub-header"],"aria-hidden":!0},s.createElement("span",null,(0,g.getSubHeaderDecades)())),s.createElement("div",{role:"grid",className:u["view-decades"],...N},x.map(((e,t)=>s.createElement("div",{key:t,role:"row",className:u["grid-row"]},e.map((e=>{const t=e.getFullYear(),a=(0,d.isSameYear)(e,n),i=D(e),l=a?"quiet-primary":"ghost";return s.createElement(o.LightButton,{key:e.toDateString(),role:"cell",size:"small",variant:l,disabled:i,isSelected:a,className:r()(u["decade-button"],!c&&u["hide-focus-ring"]),onClick:()=>f(e),reference:S(e),tabIndex:(0,d.isSameYear)(e,T)?0:-1,onFocus:(0,d.isSameYear)(e,T)?()=>k(e):void 0,"aria-selected":a},t)})))))))}function E({selectedDate:e,autoFocus:t,showFocusRing:n,minDate:a,maxDate:r,onSelect:o,onMonthSwitch:i,onYearSwitch:l,onDecadesSwitch:u,onViewTypeChange:c,fullSixWeeks:h}){const[f,m]=(0,s.useState)(e),[v,D]=(0,s.useState)(g.CalendarViewType.Month),[y,w]=(0,s.useState)(t?e:null),b=(0,s.useMemo)((()=>(0,d.getDecadesStart)(f)),[f]),C=(0,s.useCallback)((e=>{const t=new Date(f),n=(0,g.getNextMonth)(f),s=new Date(n.getFullYear(),n.getMonth()+e,0).getDate(),a=f.getDate()>s?s:f.getDate();t.setMonth(t.getMonth()+e,a),m(t),i&&i(t)}),[f,i]),F=(0,s.useCallback)((e=>{const t=new Date(f);t.setFullYear(t.getFullYear()+e),m(t),l&&l(t)}),[f,l]),_=(0,s.useCallback)((e=>{const t=new Date(b);t.setFullYear(t.getFullYear()+e),m(t),u&&u(t)}),[b,f,u]),M=(0,s.useCallback)(((e,t)=>{switch(t&&w(t),v){case g.CalendarViewType.Month:return C(1*e);case g.CalendarViewType.Year:return F(1*e);case g.CalendarViewType.Decades:
return _(e*g.DECADES_YEARS_AMOUNT)}}),[v,C,F,_]),S=(0,s.useCallback)((e=>M(-1,e)),[M]),E=(0,s.useCallback)((e=>M(1,e)),[M]),k=(0,s.useCallback)((()=>{const e=Object.values(g.CalendarViewType);let t=e.indexOf(v)+1;t>=e.length&&(t=0),D(e[t]),c&&c(e[t])}),[v]),N=(0,s.useCallback)((e=>{m(new Date(e)),o&&o(new Date(e))}),[o]),T=(0,s.useCallback)((e=>{const t=new Date(f);t.setMonth(e.getMonth()),(0,d.isSameMonth)(t,e)||t.setMonth(e.getMonth(),1),m(t);const n=new Date(y||f);n.setMonth(e.getMonth()),(0,d.isSameMonth)(n,e)||n.setMonth(e.getMonth(),1),w(n),D(g.CalendarViewType.Month)}),[f,o,k]),x=(0,s.useCallback)((e=>{const t=new Date(f);t.setFullYear(e.getFullYear()),m(t);const n=new Date(y||f);n.setFullYear(e.getFullYear()),w(n),D(g.CalendarViewType.Year)}),[f,o,k]),I=(0,s.useMemo)((()=>(0,d.getWeeks)(f,h)),[f,h]),R=(0,s.useMemo)((()=>function(e){return(0,g.getMonthsShort)().map(((t,n)=>{const s=(0,p.resetToMonthStart)(e);return s.setMonth(n),{title:t,ariaLabel:(0,g.getMonths)()[n],date:s}}))}(f)),[f]),Y=(0,s.useMemo)((()=>function(e){const t=[];for(let n=0;n<g.DECADES_YEARS_AMOUNT;n++){const s=new Date(e);s.setFullYear(e.getFullYear()+n),t.push(s)}return t}(b)),[b]),P=(0,s.useMemo)((()=>{switch(v){case g.CalendarViewType.Month:{const e=I[I.length-1].days,t=new Date(e[e.length-1]);return t.setDate(t.getDate()+1),!(0,d.isInRange)(t,a,r)}case g.CalendarViewType.Year:{const e=new Date(R[R.length-1].date);return e.setMonth(e.getMonth()+1),!(0,d.isInRange)(e,a,r,"month")}case g.CalendarViewType.Decades:{const e=new Date(Y[Y.length-1]);return e.setFullYear(e.getFullYear()+1),!(0,d.isInRange)(e,a,r,"year")}}}),[v,a,r,I,R,Y]),V=(0,s.useMemo)((()=>{switch(v){case g.CalendarViewType.Month:{const e=new Date(I[0].days[0]);return e.setDate(e.getDate()-1),!(0,d.isInRange)(e,a,r)}case g.CalendarViewType.Year:{const e=new Date(R[0].date);return e.setMonth(e.getMonth()-1),!(0,d.isInRange)(e,a,r,"month")}case g.CalendarViewType.Decades:{const e=new Date(Y[0]);return e.setFullYear(e.getFullYear()-1),!(0,d.isInRange)(e,a,r,"year")}}}),[v,a,r,I,R,Y]);return(0,s.useEffect)((()=>{!y&&n&&t&&w(e),n||w(null)}),[t,e,y,n]),{viewDate:f,setViewDate:m,viewType:v,setViewType:D,dateToFocus:y,weeks:I,months:R,years:Y,isNextDisabled:P,isPrevDisabled:V,setPrev:S,setNext:E,switchViewType:k,onClickDay:N,onClickMonth:T,onClickYear:x}}class k{constructor(e,t=[]){this._messagesQueue=[],this._alternate=!1,this._renderedMessage=null,this._idCounter=0,this._containers=[...t],this._type=e}setContainers(e){this._containers=[...e]}addMessage(e,t=0){const n=this._generateId(),s={id:n,message:e,destroyTimeout:this._calculateDestroyTimeout(e,t)};return this._messagesQueue.push(s),this._renderedMessage||this._renderMessage(),{...s,type:this._type,destroy:this._getDestroyMessageCallback(n)}}destroyAll(){this._messagesQueue=[],clearTimeout(this._renderedMessage?.destroyTimer),this._containers.forEach((e=>{e.innerText=""})),this._renderedMessage=null,this._alternate=!1}_generateId(){return`live-region-${this._type}-${this._idCounter++}`}_calculateDestroyTimeout(e,t=0){
const n=50*e.trim().length+200,s=250*e.trim().length;return Math.min(Math.max(n,t),s)}_findById(e){return this._renderedMessage?.id===e?this._renderedMessage:this._messagesQueue.find((t=>t.id===e))}_getDestroyMessageCallback(e){return async t=>{const n=this._findById(e);return!!n&&(n.renderedTo?!!t&&(this._removeRenderedMessage(),this._renderMessage(),!0):(this._removeFromQueue(n),!0))}}_removeRenderedMessage(){const e=this._renderedMessage?.renderedTo;e&&(e.innerText=""),this._renderedMessage=null}_removeFromQueue(e){this._messagesQueue=this._messagesQueue.filter((t=>t!==e))}async _renderMessage(){if(!this._containers.length||!this._messagesQueue.length)return;const e=this._alternate?this._containers[0]:this._containers[1],t=this._messagesQueue.shift();let n;e.innerText=t.message;const s=new Promise(((e,s)=>{n=setTimeout((()=>{if(this._renderedMessage?.id===t.id)return this._removeRenderedMessage(),void this._renderMessage().then(e);s("Currently rendered message is not the one that you 're trying to destroy")}),t.destroyTimeout)}));this._renderedMessage={...t,renderedTo:e,destroyTimer:n,destroyPromise:s},this._alternate=!this._alternate}}class N extends k{}const T=new class{constructor(){this.isInited=!1,this._politeQueue=new N("polite"),this._assertiveQueue=new N("assertive")}renderTo(e,t=!1){return t&&this.destroy(),this._init(e)}destroy(){this._politeQueue.destroyAll(),this._assertiveQueue.destroyAll(),this.isInited=!1}sayPolitely(e,t){return this.isInited?this._politeQueue.addMessage(e,t):null}interrupt(e,t){return this.isInited?this._assertiveQueue.addMessage(e,t):null}_init(e){if(!e)return!1;if(this.isInited)return!1;return!!this._setContainers(e)&&(this.isInited=!0,!0)}_setContainers(e){const t=document.getElementById(e);if(!t)return!1;const n=t.querySelectorAll('[aria-live="polite"]'),s=t.querySelectorAll('[aria-live="assertive"]');return!(!n||2!==n.length||!s||2!==s.length)&&(this._politeQueue.setContainers([n[0],n[1]]),this._assertiveQueue.setContainers([s[0],s[1]]),!0)}};var x;function I({viewType:e,decadesStartYear:t,viewDate:n,setPrev:a,setNext:r,switchViewType:o}){const[i,l]=(0,s.useState)(null),u=(0,s.useCallback)((e=>{i&&i.destroy(),l(T.sayPolitely(e))}),[i,l]);return{onPrevClick:(0,s.useCallback)((()=>{u((0,g.getPrevLiveRegionConfirmation)(e,e===g.CalendarViewType.Decades?t:n)),a(null)}),[a,u]),onNextClick:(0,s.useCallback)((()=>{u((0,g.getNextLiveRegionConfirmation)(e,e===g.CalendarViewType.Decades?t:n)),r(null)}),[r,u]),onSwitchViewType:(0,s.useCallback)((s=>{u((0,g.getViewTypeLiveRegionConfirmation)(e,e===g.CalendarViewType.Year?t:n)),o(s)}),[o,u])}}function R(e){const{selectedDate:t,maxDate:n,minDate:r,className:o,weekClassName:i,isDateDisabled:l,highlightedFrom:d,highlightedTo:h,todayDate:p,popupStyle:f=!0,showFocusRing:m=!1,autoFocus:v=!1,isDisabled:D=!1,withFocusTrap:w=!1,endSlot:C,onSelect:F,onMonthSwitch:M,onYearSwitch:k,onDecadesSwitch:N,onViewTypeChange:T,focusTriggerElement:x,fullSixWeeks:R,onDayHover:Y,onDayFocus:P,forceHoverTo:V,forceHoverFrom:H,calendarRef:L}=e,[O,z]=(0,
s.useState)(m),K=(0,s.useCallback)((()=>z(!0)),[z]);(0,s.useEffect)((()=>{m&&z(!0)}),[m]);const A=(0,s.useCallback)((e=>{x&&38===(0,y.hashFromEvent)(e)&&(e.preventDefault(),e.stopPropagation(),z(!1),x())}),[x]),$=t??new Date,{viewDate:B,setViewDate:Q,viewType:j,setViewType:W,dateToFocus:Z,weeks:q,months:J,years:U,isNextDisabled:X,isPrevDisabled:G,setPrev:ee,setNext:te,switchViewType:ne,onClickDay:se,onClickMonth:ae,onClickYear:re}=E({selectedDate:$,minDate:r,maxDate:n,autoFocus:v,showFocusRing:O,onMonthSwitch:M,onYearSwitch:k,onDecadesSwitch:N,onViewTypeChange:T,onSelect:F,fullSixWeeks:R}),{focusableDateRef:oe,prevRef:ie,middleRef:le,onPrevKeyDown:ue,onMiddleKeyDown:ce,forwardFocusToStart:de}=function({withFocusTrap:e,isPrevDisabled:t}){const n=(0,s.useRef)(null),a=(0,s.useCallback)((t=>{e&&y.Modifiers.Shift+9===(0,y.hashFromEvent)(t)&&(t.preventDefault(),n.current?.focus())}),[e]),r=(0,s.useCallback)((e=>{t||a(e)}),[t,a]),o=(0,s.useCallback)((e=>{t&&a(e)}),[t,a]),i=(0,s.useRef)(null),l=(0,s.useRef)(null),u=(0,s.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),t?l.current?.focus():i.current?.focus()}),[t]);return{focusableDateRef:n,prevRef:i,middleRef:l,onPrevKeyDown:r,onMiddleKeyDown:o,forwardFocusToStart:u}}({withFocusTrap:w,isPrevDisabled:G}),he=(0,s.useMemo)((()=>U[0]),[U]),{onPrevClick:pe,onNextClick:ge,onSwitchViewType:fe}=I({viewType:j,decadesStartYear:he,viewDate:B,setPrev:ee,setNext:te,switchViewType:ne});return(0,s.useImperativeHandle)(L,(()=>({focus(){G?le.current?.focus():ie.current?.focus()},setViewDate:Q,setViewType:W})),[G]),s.createElement("div",{className:a(u.calendar,f&&u.popupStyle,o),tabIndex:-1,onKeyDown:K},s.createElement(c,{prevAriaLabel:(0,g.getPrevAriaLabel)(j,j===g.CalendarViewType.Decades?he:B),nextAriaLabel:(0,g.getNextAriaLabel)(j,j===g.CalendarViewType.Decades?he:B),currentAriaLabel:(0,g.getCurrentAriaLabel)(j,j===g.CalendarViewType.Year?he:B),currentVisibleTitle:(0,g.getCurrentVisibleTitle)(j,j===g.CalendarViewType.Decades?he:B),onPrevClick:pe,onNextClick:ge,onPrevKeyDown:ue,onMiddleKeyDown:ce,onHeaderKeyDown:A,onCurrentClick:fe,isNextDisabled:D||X,isPrevDisabled:D||G,isViewModeDisabled:D,prevRef:ie,middleRef:le}),j===g.CalendarViewType.Month&&s.createElement(b,{weeks:q,selectedDate:t,viewDate:B,dateToFocus:Z,maxDate:n,minDate:r,onClickDay:se,isDateDisabled:l,highlightedFrom:d,highlightedTo:h,setPrevMonth:ee,setNextMonth:te,showFocusRing:O,isDisabled:D,focusableDateRef:oe,todayDate:p,onDayHover:Y,onDayFocus:P,forceHoverFrom:H,forceHoverTo:V,weekClassName:i}),j===g.CalendarViewType.Year&&s.createElement(_,{months:J,selectedDate:$,dateToFocus:Z,maxDate:n,minDate:r,onSelect:ae,setPrevYear:ee,setNextYear:te,showFocusRing:O,isDisabled:D,focusableDateRef:oe}),j===g.CalendarViewType.Decades&&s.createElement(S,{years:U,selectedDate:$,dateToFocus:Z,maxDate:n,minDate:r,onSelect:re,setPrevDecades:ee,setNextDecades:te,showFocusRing:O,isDisabled:D,focusableDateRef:oe}),s.createElement("div",{className:u["slot-wrapper"]},C),w&&s.createElement("div",{tabIndex:0,onFocus:de}))}!function(e){
e.Assertive="assertive",e.Polite="polite"}(x||(x={}))},85528:(e,t,n)=>{"use strict";n.d(t,{DatePicker:()=>M});var s=n(11542),a=n(50959),r=n(97754),o=n(75774),i=n(32563),l=n(60336),u=n(44313),c=n(50151),d=n(9745),h=n(86623),p=n(1140),g=n(78274),f=n(52778),m=n(65718),v=n(68335),D=n(14770);class y extends a.PureComponent{constructor(e){super(e),this._input=null,this._inputContainer=null,this._popupContainer=null,this._handleFocus=e=>{this.props.showOnFocus&&this.props.onShowPicker(),this.props.onFocus?.(e)},this._handleInputRef=e=>{this._input=e,this.props.inputReference&&this.props.inputReference(this._input)},this._handleContainerRef=e=>{this._inputContainer=e},this._onShowPicker=e=>{if(this._popupContainer=e,e&&this._inputContainer){const t=e.getBoundingClientRect(),n=this._inputContainer.getBoundingClientRect();t.width&&t.width>window.innerWidth-n.left?(e.style.right="0",e.style.left="auto"):(e.style.right="auto",e.style.left=`${n.left}px`);const s=window.innerHeight-n.bottom,a=n.top;if(s>=t.height)return void(e.style.top=`${n.bottom}px`);e.style.top="auto",e.style.bottom=a<t.height?"0":`${s+n.height}px`}},this._onChange=()=>{const e=(0,c.ensureNotNull)(this._input).value;this.setState({value:e}),this.props.onType(e)},this._onKeyDown=e=>{this.props.hideOnKeyDown&&this.props.onHidePicker(),this.props.onKeyDown&&this.props.onKeyDown(e)},this._onKeyPress=e=>{if(e.charCode){const t=String.fromCharCode(e.charCode);this.props.inputRegex.test(t)||e.preventDefault()}},this._onKeyUp=e=>{if(8!==e.keyCode){const e=(0,c.ensureNotNull)(this._input).value,t=this.props.fixValue(e);t!==e&&this.setState({value:t})}},this._handleDropdownKeydown=e=>{27===(0,v.hashFromEvent)(e)&&(this._input?.focus(),this.props.onHidePicker())},this._onBlur=e=>{this._popupContainer&&this._popupContainer.contains(e.relatedTarget)||this._inputContainer&&this._inputContainer.contains(e.relatedTarget)||this.props.onBlur?.(e)},this.state={value:e.value??"",updateValueKey:e.updateValueKey}}render(){const{position:e="fixed",className:t,size:n,disabled:s,readonly:o,errors:i,icon:l,InputComponent:u=h.FormInput}=this.props;return a.createElement("div",{className:D.pickerInput,ref:this._handleContainerRef,onBlur:this._onBlur},a.createElement(u,{value:this.state.value,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onChange:this._onChange,onFocus:this._handleFocus,onClick:this.props.onShowPicker,reference:this._handleInputRef,className:r(t,s&&D.disabled),size:n,disabled:s,errors:i,messagesPosition:p.MessagesPosition.Attached,hasErrors:this.props.showErrorMessages&&i&&i.length>0,name:this.props.name,readonly:o,endSlot:i&&i.length?void 0:a.createElement(g.EndSlot,null,a.createElement(d.Icon,{icon:l,className:D.icon,onClick:s||o?void 0:this.props.onShowPicker})),"data-name":this.props.name,placeholder:this.props.placeholder,dataQaId:this.props.dataQaId}),this.props.showPicker&&!o?a.createElement(m.Portal,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},a.createElement(f.OutsideEvent,{mouseDown:!0,handler:this.props.onHidePicker
},(t=>a.createElement("span",{ref:t,style:{pointerEvents:"auto"}},a.createElement("div",{className:r(D.picker,D[e]),key:"0",ref:this._onShowPicker,onKeyDown:this._handleDropdownKeydown},this.props.children))))):null)}static getDerivedStateFromProps(e,t){return e.updateValueKey!==t.updateValueKey?{value:e.value??"",updateValueKey:e.updateValueKey}:null}}y.defaultProps={showOnFocus:!0};class w extends a.PureComponent{constructor(e){super(e),this._input=null,this._nativeInputRef=a.createRef(),this._handleInputRef=e=>{this._input=e,this.props.inputReference&&this.props.inputReference(this._input)},this._onFocus=()=>{this.setState({isFocused:!0})},this._onBlur=()=>{this._nativeInputRef.current&&(this._nativeInputRef.current.defaultValue=this.props.value),this.setState({isFocused:!1})},this._onChange=e=>{const{value:t}=e.target;t&&(this.setState({value:t}),this.props.onChange(t))},this.state={value:e.value,isFocused:!1}}componentDidMount(){this._nativeInputRef.current&&(this._nativeInputRef.current.defaultValue=this.props.value)}render(){const{className:e,containerClassName:t,disabled:n,errors:s,InputComponent:o=h.FormInput}=this.props,i=!this.props.readonly&&!n,l=this.props.showErrorMessages&&s&&s.length>0;return a.createElement("div",{className:r(D.pickerInput,t)},a.createElement(o,{value:this.props.value,readonly:!0,noReadonlyStyles:!0,endSlot:s&&s.length?void 0:a.createElement(g.EndSlot,null,a.createElement(d.Icon,{icon:this.props.icon,className:r(D.icon,n&&D.disabled)})),className:e,inputClassName:D.textInput,size:this.props.size,disabled:n,hasErrors:l,errors:s,alwaysShowAttachedErrors:!0,messagesPosition:p.MessagesPosition.Attached,name:i?void 0:this.props.name,reference:this._handleInputRef,highlight:this.state.isFocused,intent:!l&&this.state.isFocused?"primary":void 0}),i&&a.createElement("input",{ref:this._nativeInputRef,type:this.props.type,className:D.nativePicker,onChange:this._onChange,onInput:this._onChange,min:this.props.min,max:this.props.max,name:this.props.name,onFocus:this._onFocus,onBlur:this._onBlur}))}}var b=n(23935),C=n(67029),F=n(53017),_=n(10429);class M extends a.PureComponent{constructor(e){super(e),this._pickerInpuRef=a.createRef(),this._onPickerInputKeyDown=e=>{const t=(0,v.hashFromEvent)(e);if([v.Modifiers.Shift+9,9].includes(t))this._hideCalendar();else{if(40===t||38===t)return e.preventDefault(),this._showCalendar(),void this.setState({autofocusCalendar:!0});13===t&&this.props.onEnter&&this.props.onEnter(e),this._hideCalendar()}},this._returnFocusToInput=e=>{this.setState({autofocusCalendar:!1}),this._pickerInpuRef.current?.focus(),e&&this._hideCalendar()},this._fixValue=e=>(e=(e=e.substring(0,10)).replace(/-+/g,"-"),(/^\d{4}$/.test(e)||/^\d{4}-\d{2}$/.test(e))&&(e+="-"),e),this._isValid=e=>{const t=M._dateFormatter.parse(e);if(t.res&&/^[0-9]{4}(-[0-9]{2}){2}$/.test(t.value)){const e=new Date(t.value);return!(0,b.isInvalidDateObj)(e)&&(!!(this.props.noRangeValidation||i.mobiletouch&&o.isIOS)||(0,b.isInRange)(e,this.props.minDate,this.props.maxDate))}return!1},this._onBlur=e=>{
this.props.revertInvalidData&&!this._isValid(e.target.value)&&this.setState((e=>{if(!e.isInvalid)return this.props.onPick(e.date),e;const t=new Date(this.state.date);return this.props.onPick(t),{pickerInputValueKey:e.pickerInputValueKey+1,date:t,isInvalid:!1}}))},this._onType=e=>{let t=this._isValid(e)?new Date(e.concat("T00:00")):null;t&&isNaN(t.valueOf())&&(t=null),t?this.setState({date:t,isInvalid:!1}):this.setState({isInvalid:!0}),this.props.onPick(t)},this._onSelect=e=>{this.setState((t=>({date:e,showCalendar:!1,isInvalid:!1,pickerInputValueKey:t.pickerInputValueKey+1}))),this._returnFocusToInput(!0),this.props.onPick(e)},this._showCalendar=()=>{this.setState({showCalendar:!0})},this._hideCalendar=()=>{this.setState({showCalendar:!1,autofocusCalendar:!1})},this._getErrors=()=>{const e=this.props.errors?[...this.props.errors]:[];return this.state.isInvalid&&e.push(s.t(null,void 0,n(46420))),e};const t=new Date,r=e.initial??t;this.state={pickerInputValueKey:0,date:r,showCalendar:!1,isInvalid:!this._isValid(M._dateFormatter.formatLocal(r)),autofocusCalendar:!1,initial:r}}render(){const e=this.props.endSlotComponent,t=(0,F.mergeRefs)([this._pickerInpuRef,this.props.inputReference]);return i.mobiletouch?a.createElement(w,{value:M._dateFormatter.formatLocal(this.state.date),type:"date",onChange:this._onType,icon:_,disabled:this.props.disabled,size:this.props.size,min:this.props.minDate&&M._dateFormatter.formatLocal(this.props.minDate),max:this.props.maxDate&&M._dateFormatter.formatLocal(this.props.maxDate),errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly,className:r(this._getFontSizeClassName(this.props.size),this.props.className),containerClassName:this.props.containerClassName,inputReference:this.props.inputReference,InputComponent:this.props.InputComponent}):a.createElement("div",{className:this.props.containerClassName},a.createElement(y,{value:this.props.initial?M._dateFormatter.formatLocal(this.state.date):"",inputRegex:/[0-9.]/,fixValue:this._fixValue,onType:this._onType,onBlur:this._onBlur,onShowPicker:this._showCalendar,onHidePicker:this._hideCalendar,showPicker:this.state.showCalendar&&this.props.withCalendar,showOnFocus:this.props.showOnFocus,icon:_,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly,position:this.props.position,className:r(this._getFontSizeClassName(this.props.size),this.props.className),inputReference:t,InputComponent:this.props.InputComponent,onKeyDown:this._onPickerInputKeyDown,onFocus:this.props.onFocus,placeholder:"YYYY-MM-DD",dataQaId:this.props.dataQaId,updateValueKey:this.state.pickerInputValueKey},a.createElement(u.Calendar,{selectedDate:this.props.initial?this.state.date:null,maxDate:this.props.maxDate,minDate:this.props.minDate,onSelect:this._onSelect,endSlot:e&&a.createElement(e,{onSelectDate:this._onSelect}),autoFocus:this.state.autofocusCalendar,
showFocusRing:this.state.autofocusCalendar,focusTriggerElement:this._returnFocusToInput,withFocusTrap:!0})))}static getDerivedStateFromProps(e,t){const n=new Date,s=e.initial??n;return M._dateFormatter.formatLocal(t.initial)!==M._dateFormatter.formatLocal(s)?{...t,date:s,initial:s,pickerInputValueKey:t.pickerInputValueKey+1}:null}_getFontSizeClassName(e){return e?"large"===e?C.InputClasses.FontSizeLarge:C.InputClasses.FontSizeMedium:void 0}}M.defaultProps={position:"fixed",withCalendar:!0},M._dateFormatter=new l.DateFormatter},76056:(e,t,n)=>{"use strict";n.d(t,{DateInput:()=>g});var s=n(50959),a=n(11542),r=n(9745),o=n(78274),i=n(86623),l=n(97754),u=n.n(l),c=n(90132);function d(e){const{className:t,text:n}=e;return s.createElement("span",{className:u()(c.tooltip,t)},n)}var h=n(98475);const p=n(21187);function g(e){const{hasErrors:t,onClick:l,errors:u,className:c,theme:g=p,...f}=e;return s.createElement("div",{className:g.container,onClick:l},s.createElement(i.FormInput,{...f,className:g.date,hasErrors:t,errors:[],endSlot:!t&&s.createElement(o.EndSlot,{icon:!0,interactive:!1},s.createElement(r.Icon,{icon:h,className:g.icon}))}),t&&s.createElement(d,{text:a.t(null,void 0,n(27254)),className:g.tooltip}))}},7145:(e,t,n)=>{"use strict";function s(e){const t=new Date(e);return t.setMilliseconds(0),t.setSeconds(0),t.setMinutes(0),t.setHours(0),t}function a(e){const t=new Date(e);return t.setMilliseconds(999),t.setSeconds(59),t.setMinutes(59),t.setHours(23),t}function r(e,t=!1){const n=s(e),a=t?function(e){if(e>6)throw new Error("Invalid day is provided");return 0===e?6:e-1}(n.getDay()):n.getDay();return n.setDate(n.getDate()-a),n}function o(e){const t=s(e);return t.setDate(1),t}function i(e){const t=o(e);return t.setMonth(0),t}n.d(t,{resetToDayEnd:()=>a,resetToDayStart:()=>s,resetToMonthStart:()=>o,resetToWeekStart:()=>r,resetToYearStart:()=>i})},23935:(e,t,n)=>{"use strict";n.d(t,{addLocalTime:()=>m,getCloneDateWithOffset:()=>F,getDateInTabOrder:()=>_,getDecadesStart:()=>v,getFirstEnabledDay:()=>w,getFirstEnabledMonth:()=>b,getFirstEnabledYear:()=>C,getWeeks:()=>D,isDayDisabled:()=>y,isInRange:()=>h,isInvalidDateObj:()=>p,isSameDay:()=>o,isSameMonth:()=>i,isSameYear:()=>l,subtractLocalTime:()=>f,twoDigitsFormat:()=>r});var s,a=n(7145);function r(e){return("0"+e).slice(-2)}function o(e,t){return!!t&&Number((0,a.resetToDayStart)(e))===Number((0,a.resetToDayStart)(t))}function i(e,t){return!!t&&Number((0,a.resetToMonthStart)(e))===Number((0,a.resetToMonthStart)(t))}function l(e,t){return!!t&&Number((0,a.resetToYearStart)(e))===Number((0,a.resetToYearStart)(t))}function u(e){const t=new Date(e.getFullYear(),0,1),n=(Number(e)-Number(t))/864e5;return Math.ceil((n+t.getDay()+1)/7)}function c(e){const t=new Date(e);return t.setDate(t.getDate()+7),t}!function(e){e.Day="day",e.Month="month",e.Year="year"}(s||(s={}));const d={day:a.resetToDayStart,month:a.resetToMonthStart,year:a.resetToYearStart};function h(e,t,n,s="day"){const a=d[s],r=!t||Number(a(t))-Number(a(e))<=0;return(!n||Number(a(n))-Number(a(e))>=0)&&r}function p(e){
return Number.isNaN(Number(e))}function g(e){return new Date(e).getTimezoneOffset()/60}function f(e){const t=new Date(e);return t.setHours(t.getHours()+g(t)),t}function m(e){const t=new Date(e);return t.setHours(t.getHours()-g(t)),t}function v(e){const t=e.getFullYear()%10*-1,n=new Date(e);return n.setFullYear(e.getFullYear()+t),n}function D(e,t){const n=[];let s=(0,a.resetToWeekStart)((0,a.resetToMonthStart)(e),!0);for(let a=0;a<6;a++){const a=[];for(let n=0;n<7;n++){const r=new Date(s);r.setDate(r.getDate()+n),(i(r,e)||t)&&a.push(r)}a.length&&n.push({week:u(s),days:a}),s=new Date(c(s))}return n}function y({day:e,minDate:t,maxDate:n,isDateDisabled:s}){return!h(e,t,n)||!!s&&s(e)}function w(e,t){return function n(s=0,a=0){if(!e[s]||!e[s].days[a])return;const r=e[s].days,o=r[a];return t(o)?a+1<r.length?n(s,a+1):n(s+1,0):o}()}function b(e,t){return function n(s=0){if(!e[s])return;const a=e[s].date;return t(a)?n(s+1):a}()}function C(e,t){return function n(s=0){if(!e[s])return;const a=e[s];return t(a)?n(s+1):a}()}function F({dateFrom:e,offset:t,level:n="day",maxIterations:s=6,isDisabledDate:a=()=>!1}){return function e(r,o=0){const i=new Date(r);switch(n){case"day":i.setDate(i.getDate()+t);break;case"month":i.setMonth(i.getMonth()+t);break;case"year":i.setFullYear(i.getFullYear()+t)}const l=a(i);return o>s||!l?l?null:i:e(i,o+1)}(e)}function _({selectedDate:e,dateToFocus:t,currentlyFocused:n,firstEnabledDate:s,getFirstDate:a,getLastDate:r,isDisabledDate:o}){const i=h(e,a(),r(),"day")&&!o(e)?e:null,l=t&&h(t,a(),r(),"day")&&!o(t)?t:null;return(n&&h(n,a(),r(),"day")&&!o(n)?n:null)||i||l||s}},70412:(e,t,n)=>{"use strict";n.d(t,{hoverMouseEventFilter:()=>o,useAccurateHover:()=>i,useHover:()=>a,useHoverDeprecated:()=>r});var s=n(50959);function a(){const[e,t]=(0,s.useState)(!1);return[e,{onMouseEnter:function(e){t(!0)},onMouseLeave:function(e){t(!1)}}]}function r(){const[e,t]=(0,s.useState)(!1);return[e,{onMouseOver:function(e){o(e)&&t(!0)},onMouseOut:function(e){o(e)&&t(!1)}}]}function o(e){return!e.currentTarget.contains(e.relatedTarget)}function i(e){const[t,n]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{const t=t=>{if(null===e.current)return;const s=e.current.contains(t.target);n(s)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},42707:(e,t,n)=>{"use strict";n.d(t,{useSafeMatchMedia:()=>s.useSafeMatchMedia});var s=n(86781)},36565:(e,t,n)=>{"use strict";n.d(t,{TimeInput:()=>K});var s=n(49483),a=n(50959),r=n(97754),o=n.n(r),i=n(50151),l=n(94489),u=n(47201),c=n(78274),d=n(31261),h=n(9745),p=n(79245),g=n(39346);function f(e){return a.createElement(h.Icon,{className:p.icon,icon:g})}var m=n(29202),v=n(56718);var D=n(89880),y=n(38528),w=n(36383),b=n(77914);const C={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}};function F(e,t,n){const s=[],a=n;let r=0,o=0;const i=e.length,l=a.length;let u=-1,c=0;const d=[],h=i-1,p=[];let g;for(;r<i&&o<l;){const n=e.charAt(r),i=a.charAt(o),l=C[n]
;l?(i.match(l.pattern)?(s.push(i),l.recursive&&(-1===u?u=r:r===h&&r!==u&&(r=u-1),h===u&&(r-=1)),r+=1):i===g?(c--,g=void 0):l.optional?(r+=1,o-=1):l.fallback?(s.push(l.fallback),r+=1,o-=1):p.push({p:o,v:i,e:l.pattern}),o+=1):(t||s.push(n),i===n?(d.push(o),o+=1):(g=n,d.push(o+c),c++),r+=1)}const f=e.charAt(h);i!==l+1||C[f]||s.push(f);const m=s.join(""),v=function(e,t){const n=0,s={};for(let e=0;e<t.length;e++)s[t[e]+n]=1;return s}(0,d);return[m,v,p]}function _(e,t,n){const s=function(e){let t=!0;for(let n=0;n<e.length;n++){const s=C[e.charAt(n)];if(s&&s.recursive){t=!1;break}}return t?e.length:void 0}(e),[r,o]=F(e,!1,t),[l,u]=(0,a.useState)(r),[c,d]=(0,a.useState)(0),[h,p]=(0,a.useState)(!1),g=(0,a.useRef)(o),f=(0,a.useRef)(l);return(0,a.useEffect)((()=>{const[n,s]=F(e,!1,t);u(n),m(s)}),[t,e]),(0,a.useLayoutEffect)((()=>{const e=(0,i.ensureNotNull)(n.current);h&&(e.setSelectionRange(c,c),p(!1)),d(M(e))}),[h]),[t,f,{onChange:function(){const t=(0,i.ensureNotNull)(n.current),s=t.value,[a,r]=F(e,!1,s);u(a),f.current=a;const o=m(r),h=function(e,t,n,s,a,r){if(e!==t){const o=t.length,i=e.length;let l=0,u=0,c=0,d=0,h=0;for(h=s;h<o&&a[h];h++)u++;for(h=s-1;h>=0&&a[h];h--)l++;for(h=s-1;h>=0;h--)a[h]&&c++;for(h=n-1;h>=0;h--)r[h]&&d++;if(s>i)s=10*o;else if(n>=s&&n!==i){if(r[s]){const e=s;s-=d-c,a[s-=l]&&(s=e)}}else s>n&&(s+=c-d,s+=u)}return s}(l,a,c,M(t),r,o);d(h),p(!0)},onSelect:function(){const e=(0,i.ensureNotNull)(n.current);d(M(e))},maxLength:s}];function m(e){const t=g.current;return g.current=e,t}}function M(e){return e.selectionStart||0}function S(e){const{value:t,mask:n,onChange:s,...r}=e,o=(0,a.useRef)(null),[i,l,u]=_(n,t,o);return(0,a.useLayoutEffect)((()=>{void 0!==e.reference&&(e.reference.current=o.current)}),[e.reference]),a.createElement(d.InputControl,{...r,maxLength:u.maxLength,value:i,autoComplete:"off",reference:function(e){o.current=e},onChange:function(){u.onChange(),s(l.current)},onSelect:u.onSelect})}var E=n(68335),k=n(20520),N=n(16396),T=n(12217),x=n(1140),I=n(67268);const R=(()=>{const e=[];for(let t=0;t<24;++t)for(let n=0;n<60;n+=15){const[s,a]=[O(t.toString()),O(n.toString())],r=`${s}:${a}`,o=H(r)?r:L(r);e.push(o)}return e})();const Y="desktop_time_input_item";function P(e){if(void 0!==e)return`${Y}_${e}`}function V(e){const[t="",n=""]=e.split(":"),[s,a]=[O(t),z(n)];return`${s}:${a}`}function H(e){return/^(0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/g.test(e)}function L(e){const[t,n]=e.split(":"),[s,a]=[(0,b.clamp)(parseInt(t),0,23),(0,b.clamp)(parseInt(n),0,59)],[r,o]=[O(s.toString()),z(a.toString())];return`${r}:${o}`}function O(e){return e.slice(0,2).padStart(2,"0")}function z(e){return e.slice(0,2).padEnd(2,"0")}const K=s.CheckMobile.any()?function(e){const{onChange:t,onFocus:n,value:s,className:r,dataQaId:h,...p}=e,g=(0,a.useRef)(null),[D,y]=(0,m.useFocus)(),w=(0,u.createSafeMulticastEventHandler)(y.onBlur,(function(){g.current&&s&&(g.current.defaultValue=s)}));return(0,a.useLayoutEffect)((()=>{g.current&&s&&(g.current.defaultValue=s)}),[]),(0,a.useLayoutEffect)((()=>{g.current&&s&&(g.current.value=s)
}),[s]),a.createElement("div",{"data-qa-id":"time-input-wrapper",className:o()(v.wrap,r)},a.createElement(d.InputControl,{...p,type:"text",endSlot:a.createElement(c.EndSlot,{icon:!0},a.createElement(f,null)),value:s,highlight:D,intent:D?"primary":void 0,onFocus:function(e){(0,i.ensureNotNull)(g.current).focus(),n&&n(e)},onChange:function(){},dataQaId:(0,l.dataQaIds)("time-input",h)}),a.createElement("input",{...y,disabled:e.disabled,className:v.input,type:"time",onBlur:w,onChange:function(e){const{value:n}=e.currentTarget;t&&n&&t(n)},ref:g}))}:function(e){const{openPopupByFocus:t=!0}=e,[s,r]=(0,a.useState)(t);let d=!1;const h=(0,a.useRef)(null),p=(0,a.useRef)(null),g=(0,a.useRef)(null),v=(0,a.useRef)(null),[C,F]=(0,m.useFocus)(),[_,M]=(0,a.useState)(e.value),Y=V(_),O=H(Y)?Y:L(Y),[z,K]=(0,a.useState)(O),A=C||te().some((e=>null!==e&&e.contains(document.activeElement)));(0,a.useLayoutEffect)((()=>M(e.value)),[e.value]),(0,a.useLayoutEffect)((()=>K(O)),[_,A]),(0,a.useEffect)((()=>ne(z===O?"auto":"smooth")),[z]);const $=A&&s,B=(0,T.lowerbound)(R,O,((e,t)=>e<t));let Q=R;R[B]!==O&&(Q=[...R],Q.splice(B,0,O));const j=(0,w.useOutsideEvent)({mouseDown:!0,touchStart:!0,handler:function(e){null!==p.current&&A&&e.target instanceof Node&&null!==g.current&&!g.current.contains(e.target)&&p.current.blur()}}),W=(0,x.useControlValidationLayout)({hasErrors:e.showErrorMessages&&Y!==O,messagesPosition:x.MessagesPosition.Attached,errors:[D.t(null,{context:"time_input"},n(56525))]}),Z=(0,u.createSafeMulticastEventHandler)((function(t){setTimeout(se,0),e.onFocus?.(t)}),W.onFocus),q=(0,u.createSafeMulticastEventHandler)((function(e){G(e)||(r(t),J(_))}),W.onBlur);return a.createElement("div",{className:o()(e.className,I.desktopTimeInput),onKeyDown:function(e){if(e.defaultPrevented)return;const n=(0,E.hashFromEvent)(e.nativeEvent);if(38===n){if(e.preventDefault(),$){const e=(Q.indexOf(z)+Q.length-1)%Q.length;K(Q[e])}t||r(!0)}if(40===n){if(e.preventDefault(),$){const e=(Q.indexOf(z)+Q.length+1)%Q.length;K(Q[e])}t||r(!0)}},onFocus:function(e){G(e)||F.onFocus(e)},onBlur:function(e){G(e)||F.onBlur(e)},onClick:function(){t||r(!0)},ref:j,"data-qa-id":"time-input-wrapper"},a.createElement(S,{dataQaId:(0,l.dataQaIds)("time-input",e.dataQaId),role:"combobox",disabled:e.disabled,name:e.name,endSlot:a.createElement(c.EndSlot,{icon:!0},W.icon??a.createElement(f,null)),reference:p,containerReference:(0,y.useMergedRefs)([h,W.containerReference]),mask:"09:00",value:_,onFocus:Z,onBlur:q,onMouseOver:W.onMouseOver,onMouseOut:W.onMouseOut,onChange:function(t){M(t),e.onInput&&e.onInput(t)},onKeyDown:function(n){if(n.defaultPrevented)return;const s=(0,E.hashFromEvent)(n.nativeEvent);13===s&&(n.preventDefault(),J(z),e.keepFocusOnKeyBoardNavigation||(0,i.ensureNotNull)(p.current).blur(),t||r(!1));27===s&&(n.preventDefault(),e.keepFocusOnKeyBoardNavigation||(0,i.ensureNotNull)(p.current).blur(),t||r(!1))},"aria-activedescendant":P(z),intent:W.intent}),W.renderedErrors,a.createElement(k.PopupMenu,{role:"listbox",onOpen:function(){ne()},onClose:function(){},
position:function(){const e=(0,i.ensureNotNull)(h.current).getBoundingClientRect(),t=window.innerHeight-e.bottom,n=e.top;let s=231,a=e.bottom;if(s>n&&s>t){const r=(0,b.clamp)(s,0,n),o=(0,b.clamp)(s,0,t);s=Math.max(r,o),a=r>o?e.top-r:e.bottom}else s>t&&(a=e.top-s);return{x:e.left,y:a,overrideWidth:e.width,overrideHeight:s}},closeOnClickOutside:!1,isOpened:$,tabIndex:-1,reference:g},Q.map((e=>a.createElement(N.PopupMenuItem,{key:e,id:P(e),role:"option",label:e,isActive:e===O,"aria-selected":e===O,isHovered:e===z,reference:e===z?U:void 0,onClick:X,onClickArg:e})))));function J(t){const n=V(t),s=H(n)?n:L(n);M(s),d||(d=!0,e.onChange(s))}function U(e){v.current=e}function X(e){J((0,i.ensureDefined)(e)),(0,i.ensureNotNull)(g.current).blur()}function G(e){return C&&(null!==ee(document.activeElement)||null!==ee(e.relatedTarget))}function ee(e){return e instanceof Node&&te().find((t=>null!==t&&t.contains(e)))||null}function te(){return[g.current,p.current]}function ne(e="auto"){if(null!==v.current){const t=(0,i.ensureNotNull)(g.current).getBoundingClientRect(),n=v.current.getBoundingClientRect();(t.top>n.top||t.bottom<n.bottom)&&v.current.scrollIntoView({behavior:e})}}function se(){const e=p.current;if(null!==e){const t=e.value||"";e.setSelectionRange(0,t.length)}}}},17140:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="m16.47 7.47 1.06 1.06L12.06 14l5.47 5.47-1.06 1.06L9.94 14l6.53-6.53Z"/></svg>'},10429:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path fill="currentColor" d="M10 6h8V4h1v2h1.5A2.5 2.5 0 0 1 23 8.5v11a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 5 19.5v-11A2.5 2.5 0 0 1 7.5 6H9V4h1zM6 19.5A1.5 1.5 0 0 0 7.5 21h13a1.5 1.5 0 0 0 1.5-1.5V11H6zM7.5 7A1.5 1.5 0 0 0 6 8.5V10h16V8.5A1.5 1.5 0 0 0 20.5 7H19v1h-1V7h-8v1H9V7z"/></svg>'},39346:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path fill="currentColor" d="M14 3c6.075 0 11 4.925 11 11s-4.925 11-11 11S3 20.075 3 14 7.925 3 14 3m0 1C8.477 4 4 8.477 4 14s4.477 10 10 10 10-4.477 10-10S19.523 4 14 4m1 12h-5v-1h4V8h1z"/></svg>'},98475:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M10 4h1v2h6V4h1v2h2.5A2.5 2.5 0 0 1 23 8.5v11a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 5 19.5v-11A2.5 2.5 0 0 1 7.5 6H10V4zm8 3H7.5C6.67 7 6 7.67 6 8.5v11c0 .83.67 1.5 1.5 1.5h13c.83 0 1.5-.67 1.5-1.5v-11c0-.83-.67-1.5-1.5-1.5H18zm-3 2h-2v2h2V9zm-7 4h2v2H8v-2zm12-4h-2v2h2V9zm-7 4h2v2h-2v-2zm-3 4H8v2h2v-2zm3 0h2v2h-2v-2zm7-4h-2v2h2v-2z"/></svg>'},82665:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var s=n(38459),a=n(61833),r=n(56882),o=Math.ceil,i=Math.max;const l=function(e,t,n){t=(n?(0,a.default)(e,t,n):void 0===t)?1:i((0,r.default)(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var u=0,c=0,d=Array(o(l/t));u<l;)d[c++]=(0,s.default)(e,u,u+=t);return d}}
}]);