(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4119],{837287: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","accent-color":"accent-color-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"}},153209:e=>{e.exports={container:"container-PNiXwSz6",icon:"icon-PNiXwSz6",tooltip:"tooltip-PNiXwSz6",date:"date-PNiXwSz6",time:"time-PNiXwSz6"}},220111:e=>{e.exports={pickerInput:"pickerInput-P2cJzZdH",icon:"icon-P2cJzZdH",disabled:"disabled-P2cJzZdH",picker:"picker-P2cJzZdH",fixed:"fixed-P2cJzZdH",absolute:"absolute-P2cJzZdH",nativePicker:"nativePicker-P2cJzZdH"}},230247:e=>{e.exports={tooltip:"tooltip-RU08GcsY"}},678634:e=>{e.exports={wrap:"wrap-NsE0FV0Z",input:"input-NsE0FV0Z"}},543832:e=>{e.exports={icon:"icon-Rubz29lH"}},325314:(e,t,n)=>{"use strict";n.d(t,{CalendarViewType:()=>D,DECADES_YEARS_AMOUNT:()=>b,MONTHS:()=>i,MONTHS_SHORT:()=>o,SUB_HEADER_DECADES:()=>y,SUB_HEADER_YEAR:()=>w,WEEKDAYS_MIN:()=>a,getCurrentAriaLabel:()=>E,getCurrentVisibleTitle:()=>S,getDayAriaLabel:()=>C,getNextAriaLabel:()=>F,getNextLiveRegionConfirmation:()=>N,getNextMonth:()=>x,getPrevAriaLabel:()=>_,getPrevLiveRegionConfirmation:()=>k,getViewTypeLiveRegionConfirmation:()=>M});var s=n(609838);const a=[s.t(null,{context:"day_of_week"},n(11268)),s.t(null,{context:"day_of_week"},n(831533)),s.t(null,{context:"day_of_week"},n(226230)),s.t(null,{context:"day_of_week"},n(24793)),s.t(null,{context:"day_of_week"},n(519801)),s.t(null,{context:"day_of_week"},n(963331)),s.t(null,{context:"day_of_week"
},n(85954))],r=[s.t(null,void 0,n(272149)),s.t(null,void 0,n(561199)),s.t(null,void 0,n(944979)),s.t(null,void 0,n(107147)),s.t(null,void 0,n(107951)),s.t(null,void 0,n(772970)),s.t(null,void 0,n(101144))],i=[s.t(null,void 0,n(926910)),s.t(null,void 0,n(316467)),s.t(null,void 0,n(684675)),s.t(null,void 0,n(997637)),s.t(null,void 0,n(668327)),s.t(null,void 0,n(49385)),s.t(null,void 0,n(323230)),s.t(null,void 0,n(486797)),s.t(null,void 0,n(661132)),s.t(null,void 0,n(290784)),s.t(null,void 0,n(171194)),s.t(null,void 0,n(55669))],o=[s.t(null,void 0,n(795425)),s.t(null,void 0,n(835050)),s.t(null,void 0,n(651369)),s.t(null,void 0,n(442762)),s.t(null,void 0,n(668327)),s.t(null,void 0,n(715224)),s.t(null,void 0,n(6215)),s.t(null,void 0,n(38465)),s.t(null,void 0,n(757902)),s.t(null,void 0,n(73546)),s.t(null,void 0,n(671230)),s.t(null,void 0,n(92203))],l=s.t(null,void 0,n(502587)),u=s.t(null,void 0,n(39752)),c=s.t(null,void 0,n(239329)),d=s.t(null,void 0,n(383771)),h=s.t(null,void 0,n(127004)),p=s.t(null,void 0,n(275385)),g=s.t(null,void 0,n(583583)),f=s.t(null,void 0,n(680879)),m=s.t(null,void 0,n(806244)),v={setMonth:s.t(null,void 0,n(692702)),setYear:s.t(null,void 0,n(952051)),setDecades:s.t(null,void 0,n(499990))};var D;!function(e){e.Month="month",e.Year="year",e.Decades="decades"}(D||(D={}));const y=s.t(null,void 0,n(669325)),w=s.t(null,void 0,n(695543)),b=20;function C(e){return`${r[e.getDay()]} ${e.getDate()} ${i[e.getMonth()]} ${e.getFullYear()}`}function _(e,t){switch(e){case D.Month:{const e=new Date(t);return e.setMonth(e.getMonth()-1),`${l}, ${i[e.getMonth()]} ${e.getFullYear()}`}case D.Year:return`${c}, ${t.getFullYear()-1}`;case D.Decades:return`${h}, ${t.getFullYear()-b} - ${t.getFullYear()-1}`}}function F(e,t){switch(e){case D.Month:{const e=new Date(t);return e.setMonth(e.getMonth()+1),`${u}, ${i[e.getMonth()]} ${e.getFullYear()}`}case D.Year:return`${d}, ${t.getFullYear()+1}`;case D.Decades:return`${p}, ${t.getFullYear()+b} - ${t.getFullYear()+2*b-1}`}}function E(e,t){switch(e){case D.Month:return`${g}, ${t.getFullYear()}`;case D.Year:return`${f}, ${t.getFullYear()} - ${t.getFullYear()+b-1}`;case D.Decades:return`${m}, ${i[t.getMonth()]} ${t.getFullYear()}`}}function S(e,t){switch(e){case D.Month:return`${i[t.getMonth()]} ${t.getFullYear()}`;case D.Year:return`${t.getFullYear()}`;case D.Decades:return`${t.getFullYear()} - ${t.getFullYear()+b-1}`}}function k(e,t){switch(e){case D.Month:{const e=new Date(t);return e.setMonth(e.getMonth()-1),v.setMonth.format({month:i[e.getMonth()]})}case D.Year:return v.setYear.format({year:""+(t.getFullYear()-1)});case D.Decades:return v.setDecades.format({year_start:""+(t.getFullYear()-b),year_end:""+(t.getFullYear()-1)})}}function N(e,t){switch(e){case D.Month:{const e=x(t);return v.setMonth.format({month:i[e.getMonth()]})}case D.Year:return v.setYear.format({year:`${t.getFullYear()+1}`});case D.Decades:return v.setDecades.format({year_start:`${t.getFullYear()+b}`,year_end:""+(t.getFullYear()+2*b-1)})}}function M(e,t){switch(e){case D.Month:return v.setYear.format({
year:`${t.getFullYear()}`});case D.Year:return v.setDecades.format({year_start:`${t.getFullYear()}`,year_end:""+(t.getFullYear()+b-1)});case D.Decades:return v.setMonth.format({month:i[t.getMonth()]})}}function x(e){return 11===e.getMonth()?new Date(e.getFullYear()+1,0,1):new Date(e.getFullYear(),e.getMonth()+1,1)}},626458:(e,t,n)=>{"use strict";n.d(t,{Calendar:()=>_});var s=n(50959),a=n(497754),r=n(898237),i=n(317140),o=n(837287);function l(e){const{prevAriaLabel:t,nextAriaLabel:n,currentAriaLabel:a,currentVisibleTitle:l,isNextDisabled:u,isPrevDisabled:c,isViewModeDisabled:d,prevRef:h,middleRef:p,onPrevClick:g,onNextClick:f,onCurrentClick:m,onPrevKeyDown:v,onMiddleKeyDown:D,onHeaderKeyDown:y}=e;return s.createElement("div",{className:o.header,onKeyDown:y},s.createElement(r.LightButton,{startIcon:i,onClick:g,size:"small",variant:"ghost","aria-label":t,disabled:c,onKeyDown:v,reference:h}),s.createElement(r.LightButton,{size:"small",variant:"ghost","aria-label":a,onClick:m,disabled:d,onKeyDown:D,reference:p},l),s.createElement(r.LightButton,{startIcon:i,onClick:f,size:"small",variant:"ghost","aria-label":n,disabled:u,className:o["flip-horizontal"]}))}var u=n(508550),c=n(325314),d=n(906355);class h extends s.PureComponent{constructor(){super(...arguments),this._dateFormatter=new d.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))}}render(){const e=a(o.day,this.props.isDisabled&&o.disabled,!this.props.isDisabled&&(this.props.isSelected||this._isOnHighlightedEdge())&&o["accent-color"],this._withinSelectedRange()&&o["within-selected-range"],this._isCurrentDay()&&o["current-day"],!this.props.showFocusRing&&o["hide-focus-ring"]),t=this.props.isSelected||this._isOnHighlightedEdge()||this._withinSelectedRange(),n=t||this._isCurrentDay();return s.createElement(r.LightButton,{onClick:this._onClick,onFocus:this.props.onFocus,size:"small",variant:this._getVariant(),isSelected:n,"data-day":this._dateFormatter.formatLocal(this.props.day),className:e,disabled:this.props.isDisabled,reference:this.props.reference,tabIndex:this.props.tabIndex,"aria-label":(0,c.getDayAriaLabel)(this.props.day),"aria-selected":t,"aria-current":this._isCurrentDay()?"date":void 0},this.props.day.getDate())}_isOnHighlightedEdge(){const{day:e,highlightedFrom:t,highlightedTo:n}=this.props;return!(!t||!n)&&((0,u.isSameDay)(e,t)||(0,u.isSameDay)(e,n))}_withinSelectedRange(){const{day:e,highlightedFrom:t,highlightedTo:n}=this.props;return!(!t||!n)&&this._isBetweenByDay(t,e,n)}_isCurrentDay(){return(0,u.isSameDay)(new Date,this.props.day)}_isBetweenByDay(e,t,n){const s=(0,u.resetToDayStart)(e),a=(0,u.resetToDayStart)(t),r=(0,u.resetToDayStart)(n);return s<a&&a<r}}var p=n(457927),g=n(180185)
;function f({isDisabledDate:e,findDate:t,getFirstDate:n,getLastDate:a,setNext:r,setPrev:i,dateToFocus:o,verticalOffset:l,dateLevel:c}){const[d,h]=(0,p.useRefsMap)(),f=(0,s.useCallback)((t=>t?e(t)?null:t:null),[e]),m=(0,s.useCallback)(((n,s)=>{if(!n)return null;const a=(0,u.getCloneDateWithOffset)({dateFrom:n,offset:s,isDisabledDate:e,level:c});return f(t(a))}),[t,f]),v=(0,s.useCallback)((()=>{const e=n();return f(e)||m(e,1)}),[f,m]),D=(0,s.useCallback)((()=>{const e=a();return f(e)||m(e,-1)}),[f,m]),y=(0,s.useCallback)(((t,n)=>{if(!t)return;const s=(0,u.getCloneDateWithOffset)({dateFrom:t,offset:n,isDisabledDate:e,level:c});s&&(n>0?r(s):i(s))}),[e,r,i]),{currentlyFocused:w,setCurrentlyFocused:b,focusItem:C,bindings:_}=function({refsMap:e,verticalOffset:t,getNextKeyToFocus:n,getFirstKey:a,getLastKey:r,onGridEnd:i}){const[o,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(o,e);t?u(t):i(o,e)}),[o,n]),d=(0,s.useCallback)((e=>{const n=(0,g.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)}}),[o,n]);return{currentlyFocused:o,setCurrentlyFocused:l,focusItem:u,bindings:{onKeyDown:d}}}({refsMap:d,verticalOffset:l,getNextKeyToFocus:m,getFirstKey:v,getLastKey:D,onGridEnd:y});return(0,s.useEffect)((()=>C(f(t(o)))),[o]),{itemsRefs:d,setItemRef:h,ensureNotDisabledDate:f,currentlyFocused:w,setCurrentlyFocused:b,focusItem:C,bindings:_}}function m(e){const{selectedDate:t,dateToFocus:n,weeks:a,onClickDay:r,setPrevMonth:i,setNextMonth:l,maxDate:d,minDate:p,disableWeekends:g,showFocusRing:m,highlightedFrom:v,highlightedTo:D,isDisabled:y,focusableDateRef:w}=e,b=(0,s.useCallback)((e=>{if(!e)return null;let t=null;return a.find((({days:n})=>(t=n.find((t=>(0,u.isSameDay)(t,e))),t))),t}),[a]),C=(0,s.useCallback)((()=>a[0].days[0]),[a]),_=(0,s.useCallback)((()=>{const e=a[a.length-1].days;return e[e.length-1]}),[a]),F=(0,s.useCallback)((e=>y||(0,u.isDayDisabled)({day:e,minDate:p,maxDate:d,disableWeekends:g})),[p,d,g,y]),{itemsRefs:E,setItemRef:S,currentlyFocused:k,setCurrentlyFocused:N,bindings:M}=f({isDisabledDate:F,findDate:b,getFirstDate:C,getLastDate:_,setPrev:i,setNext:l,dateToFocus:n,verticalOffset:7,dateLevel:"day"}),x=(0,u.getDateInTabOrder)({selectedDate:t,dateToFocus:n,currentlyFocused:k,firstEnabledDate:(0,u.getFirstEnabledDay)(a,F),getFirstDate:C,getLastDate:_,isDisabledDate:F});return(0,s.useEffect)((()=>{w.current=x&&E.current.get(x)||null}),[x,w]),s.createElement(s.Fragment,null,s.createElement("div",{className:o["sub-header"],"aria-hidden":!0},c.WEEKDAYS_MIN.map((e=>s.createElement("span",{key:e},e)))),s.createElement("div",{className:o["view-month"],tabIndex:-1,...M},s.createElement("div",{className:o.weeks},a.map((({week:e,days:n})=>s.createElement("div",{className:o.week,key:e},n.map((e=>s.createElement(h,{key:e.toDateString(),
day:e,isDisabled:F(e),isSelected:(0,u.isSameDay)(e,t),onClick:r,highlightedFrom:v,highlightedTo:D,reference:S(e),tabIndex:(0,u.isSameDay)(e,x)?0:-1,onFocus:(0,u.isSameDay)(e,x)?()=>N(e):void 0,showFocusRing:m})))))))))}function v(e){const{months:t,selectedDate:n,maxDate:a,minDate:i,showFocusRing:l,dateToFocus:d,isDisabled:h,focusableDateRef:p,onSelect:g,setPrevYear:m,setNextYear:v}=e,D=(0,s.useCallback)((e=>h||!(0,u.isInRange)(e,i,a,"month")),[i,a,h]),y=(0,s.useCallback)((e=>{if(!e)return null;let n=null;return t.find((({date:t})=>(n=(0,u.isSameMonth)(e,t)?t:null,n))),n}),[t]),w=(0,s.useCallback)((()=>t[0].date),[t]),b=(0,s.useCallback)((()=>t[t.length-1].date),[t]),{itemsRefs:C,setItemRef:_,currentlyFocused:F,setCurrentlyFocused:E,bindings:S}=f({isDisabledDate:D,findDate:y,getFirstDate:w,getLastDate:b,setPrev:m,setNext:v,verticalOffset:3,dateToFocus:d,dateLevel:"month"}),k=(0,u.getDateInTabOrder)({selectedDate:n,dateToFocus:d,currentlyFocused:F,firstEnabledDate:(0,u.getFirstEnabledMonth)(t,D),getFirstDate:w,getLastDate:b,isDisabledDate:D});return(0,s.useEffect)((()=>{p.current=k&&C.current.get(k)||null}),[k,p]),s.createElement(s.Fragment,null,s.createElement("div",{className:o["sub-header"],"aria-hidden":!0},s.createElement("span",null,c.SUB_HEADER_YEAR)),s.createElement("div",{className:o["view-year"],...S},t.map((({title:e,ariaLabel:t,date:a})=>{const i=(0,u.isSameMonth)(a,n),c=D(a),d=i?"quiet-primary":"ghost";return s.createElement(r.LightButton,{key:a.toDateString(),size:"small",variant:d,disabled:c,isSelected:i,className:!l&&o["hide-focus-ring"],onClick:()=>g(a),reference:_(a),tabIndex:(0,u.isSameMonth)(a,k)?0:-1,onFocus:(0,u.isSameMonth)(a,k)?()=>E(a):void 0,"aria-label":`${t} ${a.getFullYear()}`,"aria-selected":i},e)}))))}function D(e){const{years:t,selectedDate:n,dateToFocus:i,maxDate:l,minDate:d,showFocusRing:h,isDisabled:p,focusableDateRef:g,onSelect:m,setPrevDecades:v,setNextDecades:D}=e,y=(0,s.useCallback)((e=>p||!(0,u.isInRange)(e,d,l,"year")),[d,l,p]),w=(0,s.useCallback)((e=>e&&t.find((t=>(0,u.isSameYear)(e,t)))||null),[t]),b=(0,s.useCallback)((()=>t[0]),[t]),C=(0,s.useCallback)((()=>t[t.length-1]),[t]),{itemsRefs:_,setItemRef:F,currentlyFocused:E,setCurrentlyFocused:S,bindings:k}=f({isDisabledDate:y,findDate:w,getFirstDate:b,getLastDate:C,setPrev:v,setNext:D,dateToFocus:i,verticalOffset:4,dateLevel:"year"}),N=(0,u.getDateInTabOrder)({selectedDate:n,dateToFocus:i,currentlyFocused:E,firstEnabledDate:(0,u.getFirstEnabledYear)(t,y),getFirstDate:b,getLastDate:C,isDisabledDate:y});return(0,s.useEffect)((()=>{g.current=N&&_.current.get(N)||null}),[N,g]),s.createElement(s.Fragment,null,s.createElement("div",{className:o["sub-header"],"aria-hidden":!0},s.createElement("span",null,c.SUB_HEADER_DECADES)),s.createElement("div",{className:o["view-decades"],...k},t.map((e=>{const t=e.getFullYear(),i=(0,u.isSameYear)(e,n),l=y(e),c=i?"quiet-primary":"ghost";return s.createElement(r.LightButton,{key:e.toDateString(),size:"small",variant:c,disabled:l,isSelected:i,
className:a(o["decade-button"],!h&&o["hide-focus-ring"]),onClick:()=>m(e),reference:F(e),tabIndex:(0,u.isSameYear)(e,N)?0:-1,onFocus:(0,u.isSameYear)(e,N)?()=>S(e):void 0,"aria-selected":i},t)}))))}class y{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(){var e;this._messagesQueue=[],clearTimeout(null===(e=this._renderedMessage)||void 0===e?void 0:e.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){var t;return(null===(t=this._renderedMessage)||void 0===t?void 0:t.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(){var e;const t=null===(e=this._renderedMessage)||void 0===e?void 0:e.renderedTo;t&&(t.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((()=>{var n;if((null===(n=this._renderedMessage)||void 0===n?void 0:n.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 w extends y{}const b=new class{constructor(){this.isInited=!1,this._politeQueue=new w("polite"),this._assertiveQueue=new w("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)}};function C({viewType:e,decadesStartYear:t,viewDate:n,setPrev:a,setNext:r,switchViewType:i}){const[o,l]=(0,s.useState)(null),u=(0,s.useCallback)((e=>{o&&o.destroy(),l(b.sayPolitely(e))}),[o,l]);return{onPrevClick:(0,s.useCallback)((()=>{u((0,c.getPrevLiveRegionConfirmation)(e,e===c.CalendarViewType.Decades?t:n)),a(null)}),[a,u]),onNextClick:(0,s.useCallback)((()=>{u((0,c.getNextLiveRegionConfirmation)(e,e===c.CalendarViewType.Decades?t:n)),r(null)}),[r,u]),onSwitchViewType:(0,s.useCallback)((s=>{u((0,c.getViewTypeLiveRegionConfirmation)(e,e===c.CalendarViewType.Year?t:n)),i(s)}),[i,u])}}function _(e){const{selectedDate:t,maxDate:n,minDate:r,className:i,disableWeekends:d,highlightedFrom:h,highlightedTo:p,popupStyle:f=!0,showFocusRing:y=!1,autoFocus:w=!1,isDisabled:b=!1,withFocusTrap:_=!1,endSlot:F,onSelect:E,onMonthSwitch:S,onYearSwitch:k,onDecadesSwitch:N,onViewTypeChange:M,focusTriggerElement:x}=e,[T,R]=(0,s.useState)(y),I=(0,s.useCallback)((()=>R(!0)),[R]);(0,s.useEffect)((()=>{y&&R(!0)}),[y]);const P=(0,s.useCallback)((e=>{x&&38===(0,g.hashFromEvent)(e)&&(e.preventDefault(),e.stopPropagation(),R(!1),x())}),[x]),{viewDate:Y,viewType:V,dateToFocus:L,weeks:z,months:A,years:H,isNextDisabled:O,isPrevDisabled:K,setPrev:$,setNext:B,switchViewType:j,onClickDay:W,onClickMonth:Q,onClickYear:U}=function({selectedDate:e,autoFocus:t,showFocusRing:n,minDate:a,maxDate:r,onSelect:i,onMonthSwitch:o,onYearSwitch:l,onDecadesSwitch:d,onViewTypeChange:h}){const[p,g]=(0,s.useState)(e),[f,m]=(0,s.useState)(c.CalendarViewType.Month),[v,D]=(0,s.useState)(t?e:null),y=(0,s.useMemo)((()=>(0,u.getDecadesStart)(p)),[p]),w=(0,s.useCallback)((e=>{const t=new Date(p),n=(0,c.getNextMonth)(p),s=new Date(n.getFullYear(),n.getMonth()+e,0).getDate(),a=p.getDate()>s?s:p.getDate();t.setMonth(t.getMonth()+e,a),g(t),o&&o(t)}),[p,o]),b=(0,s.useCallback)((e=>{const t=new Date(p);t.setFullYear(t.getFullYear()+e),g(t),l&&l(t)}),[p,l]),C=(0,s.useCallback)((e=>{const t=new Date(y);t.setFullYear(t.getFullYear()+e),g(t),d&&d(t)}),[y,p,d]),_=(0,s.useCallback)(((e,t)=>{switch(t&&D(t),f){case c.CalendarViewType.Month:return w(1*e);case c.CalendarViewType.Year:return b(1*e);case c.CalendarViewType.Decades:return C(e*c.DECADES_YEARS_AMOUNT)}}),[f,w,b,C]),F=(0,s.useCallback)((e=>_(-1,e)),[_]),E=(0,s.useCallback)((e=>_(1,e)),[_]),S=(0,s.useCallback)((()=>{const e=Object.values(c.CalendarViewType);let t=e.indexOf(f)+1;t>=e.length&&(t=0),m(e[t]),h&&h(e[t])}),[f]),k=(0,s.useCallback)((e=>{g(new Date(e)),i&&i(new Date(e))}),[i]),N=(0,s.useCallback)((e=>{const t=new Date(p);t.setMonth(e.getMonth()),(0,u.isSameMonth)(t,e)||t.setMonth(e.getMonth(),1),g(t);const n=new Date(v||p);n.setMonth(e.getMonth()),(0,u.isSameMonth)(n,e)||n.setMonth(e.getMonth(),1),D(n),m(c.CalendarViewType.Month)}),[p,i,S]),M=(0,s.useCallback)((e=>{const t=new Date(p);t.setFullYear(e.getFullYear()),g(t);const n=new Date(v||p);n.setFullYear(e.getFullYear()),D(n),m(c.CalendarViewType.Year)}),[p,i,S]),x=(0,s.useMemo)((()=>(0,u.getWeeks)(p)),[p]),T=(0,
s.useMemo)((()=>(0,u.getMonths)(p)),[p]),R=(0,s.useMemo)((()=>(0,u.getDecades)(y)),[y]),I=(0,s.useMemo)((()=>{switch(f){case c.CalendarViewType.Month:{const e=x[x.length-1].days,t=new Date(e[e.length-1]);return t.setDate(t.getDate()+1),!(0,u.isInRange)(t,a,r)}case c.CalendarViewType.Year:{const e=new Date(T[T.length-1].date);return e.setMonth(e.getMonth()+1),!(0,u.isInRange)(e,a,r,"month")}case c.CalendarViewType.Decades:{const e=new Date(R[R.length-1]);return e.setFullYear(e.getFullYear()+1),!(0,u.isInRange)(e,a,r,"year")}}}),[f,a,r,x,T,R]),P=(0,s.useMemo)((()=>{switch(f){case c.CalendarViewType.Month:{const e=new Date(x[0].days[0]);return e.setDate(e.getDate()-1),!(0,u.isInRange)(e,a,r)}case c.CalendarViewType.Year:{const e=new Date(T[0].date);return e.setMonth(e.getMonth()-1),!(0,u.isInRange)(e,a,r,"month")}case c.CalendarViewType.Decades:{const e=new Date(R[0]);return e.setFullYear(e.getFullYear()-1),!(0,u.isInRange)(e,a,r,"year")}}}),[f,a,r,x,T,R]);return(0,s.useEffect)((()=>{!v&&n&&t&&D(e),n||D(null)}),[t,e,v,n]),{viewDate:p,viewType:f,dateToFocus:v,weeks:x,months:T,years:R,isNextDisabled:I,isPrevDisabled:P,setPrev:F,setNext:E,switchViewType:S,onClickDay:k,onClickMonth:N,onClickYear:M}}({selectedDate:t,minDate:r,maxDate:n,autoFocus:w,showFocusRing:T,onMonthSwitch:S,onYearSwitch:k,onDecadesSwitch:N,onViewTypeChange:M,onSelect:E}),{focusableDateRef:Z,prevRef:J,middleRef:q,onPrevKeyDown:X,onMiddleKeyDown:G,forwardFocusToStart:ee}=function({withFocusTrap:e,isPrevDisabled:t}){const n=(0,s.useRef)(null),a=(0,s.useCallback)((t=>{var s;e&&g.Modifiers.Shift+9===(0,g.hashFromEvent)(t)&&(t.preventDefault(),null===(s=n.current)||void 0===s||s.focus())}),[e]),r=(0,s.useCallback)((e=>{t||a(e)}),[t,a]),i=(0,s.useCallback)((e=>{t&&a(e)}),[t,a]),o=(0,s.useRef)(null),l=(0,s.useRef)(null),u=(0,s.useCallback)((e=>{var n,s;e.preventDefault(),e.stopPropagation(),t?null===(s=l.current)||void 0===s||s.focus():null===(n=o.current)||void 0===n||n.focus()}),[t]);return{focusableDateRef:n,prevRef:o,middleRef:l,onPrevKeyDown:r,onMiddleKeyDown:i,forwardFocusToStart:u}}({withFocusTrap:_,isPrevDisabled:K}),te=(0,s.useMemo)((()=>H[0]),[H]),{onPrevClick:ne,onNextClick:se,onSwitchViewType:ae}=C({viewType:V,decadesStartYear:te,viewDate:Y,setPrev:$,setNext:B,switchViewType:j});return s.createElement("div",{className:a(o.calendar,f&&o.popupStyle,i),tabIndex:-1,onKeyDown:I},s.createElement(l,{prevAriaLabel:(0,c.getPrevAriaLabel)(V,V===c.CalendarViewType.Decades?te:Y),nextAriaLabel:(0,c.getNextAriaLabel)(V,V===c.CalendarViewType.Decades?te:Y),currentAriaLabel:(0,c.getCurrentAriaLabel)(V,V===c.CalendarViewType.Year?te:Y),currentVisibleTitle:(0,c.getCurrentVisibleTitle)(V,V===c.CalendarViewType.Decades?te:Y),onPrevClick:ne,onNextClick:se,onPrevKeyDown:X,onMiddleKeyDown:G,onHeaderKeyDown:P,onCurrentClick:ae,isNextDisabled:b||O,isPrevDisabled:b||K,isViewModeDisabled:b,prevRef:J,middleRef:q}),V===c.CalendarViewType.Month&&s.createElement(m,{weeks:z,selectedDate:t,dateToFocus:L,maxDate:n,minDate:r,onClickDay:W,disableWeekends:d,highlightedFrom:h,
highlightedTo:p,setPrevMonth:$,setNextMonth:B,showFocusRing:T,isDisabled:b,focusableDateRef:Z}),V===c.CalendarViewType.Year&&s.createElement(v,{months:A,selectedDate:t,dateToFocus:L,maxDate:n,minDate:r,onSelect:Q,setPrevYear:$,setNextYear:B,showFocusRing:T,isDisabled:b,focusableDateRef:Z}),V===c.CalendarViewType.Decades&&s.createElement(D,{years:H,selectedDate:t,dateToFocus:L,maxDate:n,minDate:r,onSelect:U,setPrevDecades:$,setNextDecades:B,showFocusRing:T,isDisabled:b,focusableDateRef:Z}),s.createElement("div",{className:o["slot-wrapper"]},F),_&&s.createElement("div",{tabIndex:0,onFocus:ee}))}},614793:(e,t,n)=>{"use strict";n.d(t,{DatePicker:()=>E});var s=n(609838),a=n(50959),r=n(497754),i=n(804395),o=n(972535),l=n(906355),u=n(626458),c=n(650151),d=n(72571),h=n(481476),p=n(361988),g=n(102691),f=n(738036),m=n(813113),v=n(180185),D=n(220111);class y extends a.PureComponent{constructor(e){super(e),this._input=null,this._inputContainer=null,this._handleFocus=e=>{var t,n;this.props.showOnFocus&&this.props.onShowPicker(),null===(n=(t=this.props).onFocus)||void 0===n||n.call(t,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(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=>{var t;27===(0,v.hashFromEvent)(e)&&(null===(t=this._input)||void 0===t||t.focus(),this.props.onHidePicker())},this.state={value:e.value,valueFromProps:e.value}}render(){const{position:e="fixed",className:t,size:n,disabled:s,readonly:i,errors:o,icon:l,InputComponent:u=h.FormInput}=this.props;return a.createElement("div",{className:D.pickerInput,ref:this._handleContainerRef},a.createElement(u,{value:this.state.value,onBlur:this.props.onBlur,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onChange:this._onChange,onFocus:this._handleFocus,onClick:this.props.onShowPicker,reference:this._handleInputRef,className:t,size:n,disabled:s,errors:o,messagesPosition:p.MessagesPosition.Attached,hasErrors:this.props.showErrorMessages&&o&&o.length>0,name:this.props.name,readonly:i,
endSlot:o&&o.length?void 0:a.createElement(g.EndSlot,null,a.createElement(d.Icon,{icon:l,className:r(D.icon,s&&D.disabled),onClick:s||i?void 0:this.props.onShowPicker})),"data-name":this.props.name}),this.props.showPicker&&!i?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.value!==t.valueFromProps?{value:e.value,valueFromProps:e.value}: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.state.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:i=h.FormInput}=this.props,o=!this.props.readonly&&!n,l=this.props.showErrorMessages&&s&&s.length>0;return a.createElement("div",{className:r(D.pickerInput,t)},a.createElement(i,{value:this.state.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:o?void 0:this.props.name,reference:this._handleInputRef,highlight:this.state.isFocused,intent:!l&&this.state.isFocused?"primary":void 0}),o&&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(508550),C=n(34735),_=n(273388),F=n(201401);class E extends a.PureComponent{constructor(e){super(e),this._pickerInputContainerRef=a.createRef(),this._pickerInpuRef=a.createRef(),this._dateFormatter=new l.DateFormatter,this._onPickerInputKeyDown=e=>{const t=(0,v.hashFromEvent)(e);if([v.Modifiers.Shift+9,9].includes(t))this._hideCalendar();else{if(40===t)return e.preventDefault(),this._showCalendar(),void this.setState({autofocusCalendar:!0});13===t&&this.props.onEnter&&this.props.onEnter(e),this._hideCalendar()}},this._returnFocusToInput=()=>{var e;this.setState({autofocusCalendar:!1}),
null===(e=this._pickerInpuRef.current)||void 0===e||e.focus()},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=>{if(/^[0-9]{4}(-[0-9]{2}){2}/.test(e)){const t=new Date(e.concat("T00:00"));return!(0,b.isInvalidDateObj)(t)&&(!!(this.props.noRangeValidation||o.mobiletouch&&i.isIOS)||(0,b.isInRange)(t,this.props.minDate,this.props.maxDate))}return!1},this._onBlur=e=>{var t;if(!this.props.revertInvalidData||(null===(t=this._pickerInputContainerRef.current)||void 0===t?void 0:t.contains(e.relatedTarget)))return;const{value:n}=e.target;if(!this._isValid(n)){const t=new Date(this.state.date);this.setState({pickerInputKey:e.timeStamp,date:t,isInvalid:!1}),this.props.onPick(t)}},this._onType=e=>{const t=this._isValid(e)?new Date(e.concat("T00:00")):null;t?this.setState({date:t,isInvalid:!1}):this.setState({isInvalid:!0}),this.props.onPick(t)},this._onSelect=e=>{this.setState({date:e,showCalendar:!1,isInvalid:!1}),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(505122))),e},this.state={pickerInputKey:0,date:e.initial,showCalendar:!1,isInvalid:!this._isValid(this._dateFormatter.formatLocal(e.initial)),autofocusCalendar:!1,initial:e.initial}}render(){const e=this.props.endSlotComponent,t=(0,_.mergeRefs)([this._pickerInpuRef,this.props.inputReference]);return o.mobiletouch?a.createElement(w,{value:this._dateFormatter.formatLocal(this.state.date),type:"date",onChange:this._onType,icon:F,disabled:this.props.disabled,size:this.props.size,min:this.props.minDate&&this._dateFormatter.formatLocal(this.props.minDate),max:this.props.maxDate&&this._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,ref:this._pickerInputContainerRef},a.createElement(y,{key:this.state.pickerInputKey,value:this._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:F,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},a.createElement(u.Calendar,{selectedDate:this.state.date,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){return t.initial!==e.initial?{...t,date:e.initial,initial:e.initial}:null}_getFontSizeClassName(e){return e?"large"===e?C.InputClasses.FontSizeLarge:C.InputClasses.FontSizeMedium:void 0}}E.defaultProps={position:"fixed",withCalendar:!0}},350324:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_INPUT_DATE_THEME:()=>p,DateInput:()=>g});var s=n(50959),a=n(609838),r=n(72571),i=n(102691),o=n(481476),l=n(497754),u=n.n(l),c=n(230247);function d(e){const{className:t,text:n}=e;return s.createElement("span",{className:u()(c.tooltip,t)},n)}var h=n(598475);const p=n(153209);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(o.FormInput,{...f,className:g.date,hasErrors:t,errors:[],endSlot:!t&&s.createElement(i.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(732457)),className:g.tooltip}))}},508550:(e,t,n)=>{"use strict";n.d(t,{addLocalTime:()=>w,getCloneDateWithOffset:()=>M,getDateInTabOrder:()=>x,getDecades:()=>F,getDecadesStart:()=>b,getFirstEnabledDay:()=>S,getFirstEnabledMonth:()=>k,getFirstEnabledYear:()=>N,getMonths:()=>_,getWeeks:()=>C,isDayDisabled:()=>E,isInRange:()=>m,isInvalidDateObj:()=>v,isSameDay:()=>c,isSameMonth:()=>d,isSameYear:()=>h,resetToDayEnd:()=>i,resetToDayStart:()=>r,subtractLocalTime:()=>y,twoDigitsFormat:()=>a});var s=n(325314);function a(e){return("0"+e).slice(-2)}function r(e){const t=new Date(e);return t.setMilliseconds(0),t.setSeconds(0),t.setMinutes(0),t.setHours(0),t}function i(e){const t=new Date(e);return t.setMilliseconds(999),t.setSeconds(59),t.setMinutes(59),t.setHours(23),t}function o(e,t=!1){const n=r(e),s=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()-s),n}function l(e){const t=r(e);return t.setDate(1),t}function u(e){const t=l(e);return t.setMonth(1),t}function c(e,t){return!!t&&Number(r(e))===Number(r(t))}function d(e,t){return!!t&&Number(l(e))===Number(l(t))}function h(e,t){return!!t&&Number(u(e))===Number(u(t))}function p(e){const t=new Date(e.getFullYear(),0,1),n=(Number(e)-Number(t))/864e5;return Math.ceil((n+t.getDay()+1)/7)}function g(e){const t=new Date(e);return t.setDate(t.getDate()+7),t}const f={day:r,month:l,year:u};function m(e,t,n,s="day"){const a=f[s],r=!t||Number(a(t))-Number(a(e))<=0;return(!n||Number(a(n))-Number(a(e))>=0)&&r}function v(e){return Number.isNaN(Number(e))}function D(e){return new Date(e).getTimezoneOffset()/60}function y(e){const t=new Date(e)
;return t.setHours(t.getHours()+D(t)),t}function w(e){const t=new Date(e);return t.setHours(t.getHours()-D(t)),t}function b(e){const t=e.getFullYear()%10*-1,n=new Date(e);return n.setFullYear(e.getFullYear()+t),n}function C(e){const t=[];let n=o(l(e),!0);for(let s=0;s<6;s++){const s=[];for(let t=0;t<7;t++){const a=new Date(n);a.setDate(a.getDate()+t),d(a,e)&&s.push(a)}s.length&&t.push({week:p(n),days:s}),n=new Date(g(n))}return t}function _(e){return s.MONTHS_SHORT.map(((t,n)=>{const a=l(e);return a.setMonth(n),{title:t,ariaLabel:s.MONTHS[n],date:a}}))}function F(e){const t=[];for(let n=0;n<s.DECADES_YEARS_AMOUNT;n++){const s=new Date(e);s.setFullYear(e.getFullYear()+n),t.push(s)}return t}function E({day:e,minDate:t,maxDate:n,disableWeekends:s=!1}){if(!m(e,t,n))return!0;const a=[6,0].includes(e.getDay());return!!s&&a}function S(e,t){return function n(s=0,a=0){if(!e[s]||!e[s].days[a])return;const r=e[s].days,i=r[a];return t(i)?a+1<r.length?n(s,a+1):n(s+1,0):i}()}function k(e,t){return function n(s=0){if(!e[s])return;const a=e[s].date;return t(a)?n(s+1):a}()}function N(e,t){return function n(s=0){if(!e[s])return;const a=e[s];return t(a)?n(s+1):a}()}function M({dateFrom:e,offset:t,level:n="day",maxIterations:s=6,isDisabledDate:a=(()=>!1)}){return function e(r,i=0){const o=new Date(r);switch(n){case"day":o.setDate(o.getDate()+t);break;case"month":o.setMonth(o.getMonth()+t);break;case"year":o.setFullYear(o.getFullYear()+t)}const l=a(o);return i>s||!l?l?null:o:e(o,i+1)}(e)}function x({selectedDate:e,dateToFocus:t,currentlyFocused:n,firstEnabledDate:s,getFirstDate:a,getLastDate:r,isDisabledDate:i}){const o=m(e,a(),r(),"day")&&!i(e)?e:null,l=t&&m(t,a(),r(),"day")&&!i(t)?t:null;return(n&&m(n,a(),r(),"day")&&!i(n)?n:null)||o||l||s}},904925:(e,t,n)=>{"use strict";n.d(t,{PopupMenuDisclosureView:()=>c});var s=n(50959),a=n(624216),r=n(650151);const i={x:0,y:0};function o(e,t,n){return(0,s.useCallback)((()=>function(e,t,{x:n=i.x,y:s=i.y}=i){const a=(0,r.ensureNotNull)(e).getBoundingClientRect(),o={x:a.left+n,y:a.top+a.height+s,indentFromWindow:{top:4,bottom:4,left:4,right:4}};return t&&(o.overrideWidth=a.width),o}(e.current,t,n)),[e,t])}var l=n(586240);const u=parseInt(l["size-header-height"]);function c(e){const{button:t,popupChildren:n,buttonRef:r,listboxId:i,listboxClassName:l,listboxTabIndex:c,matchButtonAndListboxWidths:d,isOpened:h,scrollWrapReference:p,listboxReference:g,onClose:f,onOpen:m,onListboxFocus:v,onListboxBlur:D,onListboxKeyDown:y,listboxAria:w,repositionOnScroll:b=!0,closeOnHeaderOverlap:C=!1,popupPositionCorrection:_={x:0,y:0},popupPosition:F}=e,E=o(r,d,_),S=C?u:0;return s.createElement(s.Fragment,null,t,s.createElement(a.PopupMenu,{...w,id:i,className:l,tabIndex:c,isOpened:h,position:F||E,repositionOnScroll:b,onClose:f,onOpen:m,doNotCloseOn:r.current,reference:g,scrollWrapReference:p,onFocus:v,onBlur:D,onKeyDown:y,closeOnScrollOutsideOffset:S},n))}},953517:(e,t,n)=>{"use strict";n.d(t,{useKeyboardActionHandler:()=>s.useKeyboardActionHandler,useKeyboardClose:()=>s.useKeyboardClose,
useKeyboardEventHandler:()=>s.useKeyboardEventHandler,useKeyboardOpen:()=>s.useKeyboardOpen,useKeyboardToggle:()=>s.useKeyboardToggle});var s=n(865968)},44807:(e,t,n)=>{"use strict";n.d(t,{TimeInput:()=>Y});var s=n(601227),a=n(50959),r=n(497754),i=n.n(r),o=n(650151),l=n(269842),u=n(102691),c=n(654936),d=n(72571),h=n(543832),p=n(595096);function g(e){return a.createElement(d.Icon,{className:h.icon,icon:p})}var f=n(383836),m=n(678634);var v=n(908783),D=n(44681);const y={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}};function w(e,t,n){const s=[],a=n;let r=0,i=0;const o=e.length,l=a.length;let u=-1,c=0;const d=[],h=o-1,p=[];let g;for(;r<o&&i<l;){const n=e.charAt(r),o=a.charAt(i),l=y[n];l?(o.match(l.pattern)?(s.push(o),l.recursive&&(-1===u?u=r:r===h&&r!==u&&(r=u-1),h===u&&(r-=1)),r+=1):o===g?(c--,g=void 0):l.optional?(r+=1,i-=1):l.fallback?(s.push(l.fallback),r+=1,i-=1):p.push({p:i,v:o,e:l.pattern}),i+=1):(t||s.push(n),o===n?(d.push(i),i+=1):(g=n,d.push(i+c),c++),r+=1)}const f=e.charAt(h);o!==l+1||y[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 b(e,t,n){const s=function(e){let t=!0;for(let n=0;n<e.length;n++){const s=y[e.charAt(n)];if(s&&s.recursive){t=!1;break}}return t?e.length:void 0}(e),[r,i]=w(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)(i),f=(0,a.useRef)(l);return(0,a.useEffect)((()=>{const[n,s]=w(e,!1,t);u(n),m(s)}),[t,e]),(0,a.useLayoutEffect)((()=>{const e=(0,o.ensureNotNull)(n.current);h&&(e.setSelectionRange(c,c),p(!1)),d(C(e))}),[h]),[t,f,{onChange:function(){const t=(0,o.ensureNotNull)(n.current),s=t.value,[a,r]=w(e,!1,s);u(a),f.current=a;const i=m(r),h=function(e,t,n,s,a,r){if(e!==t){const i=t.length,o=e.length;let l=0,u=0,c=0,d=0,h=0;for(h=s;h<i&&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>o)s=10*i;else if(n>=s&&n!==o){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,C(t),r,i);d(h),p(!0)},onSelect:function(){const e=(0,o.ensureNotNull)(n.current);d(C(e))},maxLength:s}];function m(e){const t=g.current;return g.current=e,t}}function C(e){return e.selectionStart||0}function _(e){const{value:t,mask:n,onChange:s,...r}=e,i=(0,a.useRef)(null),[o,l,u]=b(n,t,i);return(0,a.useLayoutEffect)((()=>{void 0!==e.reference&&(e.reference.current=i.current)}),[e.reference]),a.createElement(c.InputControl,{...r,maxLength:u.maxLength,value:o,autoComplete:"off",reference:function(e){i.current=e},onChange:function(){u.onChange(),s(l.current)},onSelect:u.onSelect})}var F=n(180185),E=n(624216),S=n(192063),k=n(680974);const N=(()=>{const e=[];for(let t=0;t<24;++t)for(let n=0;n<60;n+=15){const[s,a]=[I(t.toString()),I(n.toString())],r=`${s}:${a}`,i=T(r)?r:R(r);e.push(i)}return e})();function M(e){let t=!1;const n=(0,a.useRef)(null),s=(0,a.useRef)(null),r=(0,a.useRef)(null),l=(0,a.useRef)(null),[c,d]=(0,
f.useFocus)(),[h,p]=(0,a.useState)(e.value),m=x(h),y=T(m)?m:R(m),[w,b]=(0,a.useState)(y),C=c||H().some((e=>null!==e&&e.contains(document.activeElement)));(0,a.useLayoutEffect)((()=>p(e.value)),[e.value]),(0,a.useLayoutEffect)((()=>b(y)),[h,C]),(0,a.useEffect)((()=>O(w===y?"auto":"smooth")),[w]);const M=(0,k.lowerbound)(N,y,((e,t)=>e<t));let I=N;N[M]!==y&&(I=[...N],I.splice(M,0,y));const P=(0,v.useOutsideEvent)({mouseDown:!0,touchStart:!0,handler:function(e){null!==s.current&&C&&e.target instanceof Node&&null!==r.current&&!r.current.contains(e.target)&&s.current.blur()}});return a.createElement("div",{className:i()(e.className),onKeyDown:function(e){if(e.defaultPrevented)return;const t=(0,F.hashFromEvent)(e.nativeEvent);if(38===t){e.preventDefault();const t=(I.indexOf(w)+I.length-1)%I.length;b(I[t])}if(40===t){e.preventDefault();const t=(I.indexOf(w)+I.length+1)%I.length;b(I[t])}},onFocus:function(e){z(e)||d.onFocus(e)},onBlur:function(e){z(e)||d.onBlur(e)},ref:P},a.createElement(_,{disabled:e.disabled,name:e.name,endSlot:a.createElement(u.EndSlot,{icon:!0},a.createElement(g,null)),reference:s,containerReference:n,mask:"09:00",value:h,onFocus:function(t){var n;setTimeout(K,0),null===(n=e.onFocus)||void 0===n||n.call(e,t)},onBlur:function(e){z(e)||Y(h)},onChange:function(t){p(t),e.onInput&&e.onInput(t)},onKeyDown:function(e){if(e.defaultPrevented)return;const t=(0,F.hashFromEvent)(e.nativeEvent);13===t&&(e.preventDefault(),Y(w),(0,o.ensureNotNull)(s.current).blur());27===t&&(e.preventDefault(),(0,o.ensureNotNull)(s.current).blur())}}),a.createElement(E.PopupMenu,{onOpen:function(){O()},onClose:function(){},position:function(){const e=(0,o.ensureNotNull)(n.current).getBoundingClientRect(),t=window.innerHeight-e.bottom,s=e.top;let a=231,r=e.bottom;if(a>s&&a>t){const n=(0,D.clamp)(a,0,s),i=(0,D.clamp)(a,0,t);a=Math.max(n,i),r=n>i?e.top-n:e.bottom}else a>t&&(r=e.top-a);return{x:e.left,y:r,overrideWidth:e.width,overrideHeight:a}},closeOnClickOutside:!1,isOpened:C,tabIndex:-1,reference:r},I.map((e=>a.createElement(S.PopupMenuItem,{key:e,label:e,isActive:e===y,isHovered:e===w,reference:e===w?V:void 0,onClick:L,onClickArg:e})))));function Y(n){const s=x(n),a=T(s)?s:R(s);p(a),t||(t=!0,e.onChange(a))}function V(e){l.current=e}function L(e){Y((0,o.ensureDefined)(e)),(0,o.ensureNotNull)(r.current).blur()}function z(e){return c&&(null!==A(document.activeElement)||null!==A(e.relatedTarget))}function A(e){return e instanceof Node&&H().find((t=>null!==t&&t.contains(e)))||null}function H(){return[r.current,s.current]}function O(e="auto"){if(null!==l.current){const t=(0,o.ensureNotNull)(r.current).getBoundingClientRect(),n=l.current.getBoundingClientRect();(t.top>n.top||t.bottom<n.bottom)&&l.current.scrollIntoView({behavior:e})}}function K(){const e=s.current;if(null!==e){const t=e.value||"";e.setSelectionRange(0,t.length)}}}function x(e){const[t="",n=""]=e.split(":"),[s,a]=[I(t),P(n)];return`${s}:${a}`}function T(e){return/^(0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/g.test(e)}function R(e){const[t,n]=e.split(":"),[s,a]=[(0,
D.clamp)(parseInt(t),0,23),(0,D.clamp)(parseInt(n),0,59)],[r,i]=[I(s.toString()),P(a.toString())];return`${r}:${i}`}function I(e){return e.slice(0,2).padStart(2,"0")}function P(e){return e.slice(0,2).padEnd(2,"0")}const Y=s.CheckMobile.any()?function(e){const{onChange:t,onFocus:n,value:s,className:r,...d}=e,h=(0,a.useRef)(null),[p,v]=(0,f.useFocus)(),D=(0,l.createSafeMulticastEventHandler)(v.onBlur,(function(){h.current&&s&&(h.current.defaultValue=s)}));return(0,a.useLayoutEffect)((()=>{h.current&&s&&(h.current.defaultValue=s)}),[]),(0,a.useLayoutEffect)((()=>{h.current&&s&&(h.current.value=s)}),[s]),a.createElement("div",{className:i()(m.wrap,r)},a.createElement(c.InputControl,{...d,type:"text",endSlot:a.createElement(u.EndSlot,{icon:!0},a.createElement(g,null)),value:s,highlight:p,intent:p?"primary":void 0,onFocus:function(e){(0,o.ensureNotNull)(h.current).focus(),n&&n(e)},onChange:function(){}}),a.createElement("input",{...v,disabled:e.disabled,className:m.input,type:"time",onBlur:D,onChange:function(e){const{value:n}=e.currentTarget;t&&n&&t(n)},ref:h}))}:M},317140: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>'},598475: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>'},201401:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4 0c-.6 0-1 .4-1 1v1H1c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h14c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1h-2V1c0-.6-.4-1-1-1h-1c-.6 0-1 .4-1 1v1H6V1c0-.6-.4-1-1-1H4zM2 5h12v9H2V5zm5 2v2h2V7H7zm3 0v2h2V7h-2zm-6 3v2h2v-2H4zm3 0v2h2v-2H7zm3 0v2h2v-2h-2z"/></svg>'},595096:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17"><path fill="currentColor" d="M1 8.5a7.5 7.5 0 1 1 15 0 7.5 7.5 0 0 1-15 0zM8.5 0a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM9 9V3H8v5H5v1h4z"/></svg>'}}]);