@progress/kendo-react-dateinputs 7.0.3-develop.5 → 7.0.3-develop.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,4 +18,4 @@
18
18
  `);return null},step:function(i,t,e){const s=i[t];if(s!==void 0&&s<=0)throw new Error(`
19
19
  Invalid prop '${t}' supplied to ${e}.
20
20
  ${t} cannot be less than 1.
21
- `);return null},value:n.instanceOf(Date),smoothScroll:n.bool,show:n.bool},qt.defaultProps={boundRange:!1,max:nt,min:z,step:1,smoothScroll:!0},x.registerForIntl(qt);const Be=new RegExp(`${j.hour}|${j.minute}|${j.second}|${j.dayperiod}|literal`),dt=class extends o.Component{constructor(i){super(i),this._element=null,this._nowButton=null,this.dateFormatParts=[],this.timeLists=[],this.focus=(t,e)=>{Promise.resolve().then(()=>{e&&this._nowButton&&this._nowButton.element&&this._nowButton.element.focus();const s=this.timeLists[0];!e&&this.state.activeListIndex===-1&&!this.hasActiveButton()&&s&&s.element&&s.focus(t)})},this.timeFormatReducer=(t,e)=>t+e.pattern,this.timeFormatFilter=(t,e,s)=>{const a=e>=1&&s[e-1];return a&&a&&t.type==="literal"?Be.test(a.type||""):Be.test(t.type||"")},this.focusList=t=>{this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(e=>t===1?e.next:e.prev).map(e=>e&&e.element&&e.element.focus({preventScroll:!0}))},this.listReducer=(t,e,s,a)=>t.length||e.props.id!==this.state.activeListIndex?t:[{next:a[s+1]||e,prev:a[s-1]||e}],this.showNowButton=()=>!this.hasSteps()&&this.props.nowButton&&Ne(ut(),this.min,this.max),this.handleKeyDown=t=>{const{keyCode:e}=t;switch(e){case d.Keys.left:t.preventDefault(),this.focusList(0);return;case d.Keys.right:t.preventDefault(),this.focusList(1);return;default:return}},this.handleListBlur=()=>{this.nextTick(()=>{this.setState({activeListIndex:-1})})},this.handleListFocus=t=>{clearTimeout(this.nextTickId),this.setState({activeListIndex:t})},this.handleChange=t=>{const{onChange:e}=this.props;e&&e.call(void 0,t)},this.snapTime=mi(di(this.props.steps,this.props.min||dt.defaultProps.min)),this.state={activeListIndex:-1},this.hasActiveButton=this.hasActiveButton.bind(this)}get element(){return this._element}get value(){return Ys(this.snapTime(l.cloneDate(this.props.value||z)),this.min,this.max)}get intl(){return x.provideIntlService(this)}get min(){return this.snapTime(this.props.min||dt.defaultProps.min)}get max(){return this.snapTime(this.props.max||dt.defaultProps.max)}get steps(){return this.props.steps||dt.defaultProps.steps}get boundRange(){return this.props.boundRange!==void 0?this.props.boundRange:dt.defaultProps.boundRange}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidMount(){const{onMount:i}=this.props;i&&i.call(void 0,this.value)}render(){const{format:i,smoothScroll:t,onNowClick:e,className:s,disabled:a,mobileMode:r,show:h,onNowKeyDown:u}=this.props;this.snapTime=mi(di(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(i||dt.defaultProps.format).filter(this.timeFormatFilter);const c=d.classNames({"k-disabled":a,"k-time-part":r},s);this.timeLists=[];const m=x.provideLocalizationService(this),f=m.toLanguageString(ve,k[ve]);return o.createElement("div",{className:c},o.createElement("div",{className:"k-time-header"},o.createElement("span",{className:"k-title"},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&o.createElement(L.Button,{type:"button",ref:g=>{this._nowButton=g},className:"k-time-now",fillMode:"flat",themeColor:"primary",title:f,onKeyDown:u,"aria-label":f,onClick:e,tabIndex:a?-1:0},m.toLanguageString(ge,k[ge]))),o.createElement("div",{className:"k-time-list-container",onKeyDown:this.handleKeyDown},o.createElement("span",{className:"k-time-highlight"}),this.dateFormatParts.map((g,w)=>g.type!=="literal"?o.createElement("div",{key:w,className:d.classNames("k-time-list-wrapper",{"k-focus":w===this.state.activeListIndex}),role:"presentation",tabIndex:-1},o.createElement("span",{className:"k-title",onMouseDown:v=>{v.preventDefault()}},this.intl.dateFieldName(g)),o.createElement(qt,{min:this.min,max:this.max,boundRange:this.boundRange,part:g,step:g.type?this.steps[g.type]:1,smoothScroll:t,ref:v=>{v&&this.timeLists.push(v)},id:w,onFocus:()=>{this.handleListFocus(w)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.value,disabled:a,show:h,mobileMode:r})):o.createElement("div",{key:w,className:"k-time-separator"},g.pattern))))}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}hasActiveButton(){const i=d.getActiveElement(document);return this._nowButton&&i===this._nowButton.element}hasSteps(){const i=Object.keys(this.steps);return i.length!==i.reduce((t,e)=>t+this.steps[e],0)}};let mt=dt;mt.propTypes={cancelButton:n.bool,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool},mt.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:ct,max:nt,steps:{},boundRange:!1},x.registerForIntl(mt),x.registerForLocalization(mt);const ze=class extends o.Component{constructor(i){super(i),this._element=null,this._cancelButton=null,this._acceptButton=null,this.timePart=null,this.focusActiveList=()=>{this.timePart&&this.timePart.focus({preventScroll:!0})},this.handleKeyDown=t=>{const{keyCode:e}=t;switch(e){case d.Keys.enter:this.hasActiveButton()||this.handleAccept(t);return;default:return}},this.revertToNowButton=t=>{const{keyCode:e,shiftKey:s}=t;!s&&e===d.Keys.tab&&(t.preventDefault(),this.props.nowButton!==!1?this.timePart&&this.timePart.focus({preventScroll:!0},!0):this.timePart&&this.timePart.focus({preventScroll:!0}))},this.handleNowKeyDown=t=>{var a;const{keyCode:e,shiftKey:s}=t;s&&e===d.Keys.tab?(t.preventDefault(),this._acceptButton&&((a=this._acceptButton.element)==null||a.focus({preventScroll:!0}))):e===d.Keys.enter&&(t.stopPropagation(),this.handleNowClick(t))},this.handleAccept=t=>{const e=this.mergeValue(l.cloneDate(this.value||ut()),this.timePart?this.timePart.value:this.current);this.setState({value:e}),this.valueDuringOnChange=e;const{onChange:s}=this.props;s&&s.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleReject=t=>{this.setState({current:this.value});const{onReject:e}=this.props;e&&e.call(void 0,t)},this.handleNowClick=t=>{const e=this.mergeValue(l.cloneDate(this.value||ut()),ut());this.setState({current:e,value:e}),this.valueDuringOnChange=e;const{onChange:s}=this.props;s&&s.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleChange=t=>{this.setState({current:t});const{handleTimeChange:e}=this.props;e&&e.call(void 0,{time:t})},this.dateFormatParts=this.intl.splitDateFormat(this.props.format||ze.defaultProps.format),this.mergeValue=Us(Ks(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.state={current:this.props.value||z,value:this.props.value||ze.defaultProps.value}}get element(){return this._element}get value(){const i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?l.cloneDate(i):null}get intl(){return x.provideIntlService(this)}get current(){return this.state.current!==null?l.cloneDate(this.state.current):null}componentWillUnmount(){clearTimeout(this.nextTickId)}render(){const{format:i,cancelButton:t,disabled:e,tabIndex:s,className:a,smoothScroll:r,min:h,max:u,boundRange:c,nowButton:m,steps:f,show:g,mobileMode:w}=this.props,v=x.provideLocalizationService(this),E=v.toLanguageString(Qt,k[Qt]),V=v.toLanguageString(At,k[At]);return o.createElement("div",{ref:N=>{this._element=N},tabIndex:e?void 0:s||0,className:d.classNames("k-timeselector",a,{"k-disabled":e}),onKeyDown:this.handleKeyDown},o.createElement(mt,{ref:N=>{this.timePart=N},value:this.current,onChange:this.handleChange,onNowClick:this.handleNowClick,format:i,smoothScroll:r,min:h,max:u,boundRange:c,disabled:e,nowButton:m,steps:f,show:g,mobileMode:w,onNowKeyDown:this.handleNowKeyDown}),this.props.footer&&o.createElement("div",{className:"k-time-footer k-actions k-actions-stretched"},t&&o.createElement(L.Button,{type:"button",ref:N=>{this._cancelButton=N},className:"k-time-cancel",onClick:this.handleReject,title:E,"aria-label":E},E),o.createElement(L.Button,{type:"button",ref:N=>{this._acceptButton=N},className:"k-time-accept",themeColor:"primary",onClick:this.handleAccept,onKeyDown:this.revertToNowButton,title:V,"aria-label":V},V)))}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}hasActiveButton(){if(!this._acceptButton||!this._acceptButton.element)return!1;const i=d.getActiveElement(document);return this._acceptButton&&i===this._acceptButton.element||this._cancelButton&&i===this._cancelButton.element}};let Et=ze;Et.propTypes={cancelButton:n.bool,className:n.string,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool},Et.defaultProps={value:null,disabled:!1,cancelButton:!0,format:"t",min:ct,max:nt,boundRange:!1,footer:!0},x.registerForIntl(Et),x.registerForLocalization(Et);const G=class extends o.Component{constructor(i){super(i),this._element=null,this._dateInput=o.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:t,cancelButton:e,nowButton:s,disabled:a,format:r,steps:h}=this.props;return o.createElement(Et,{ref:this.setTimeSelectorRef,className:this.mobileMode?"k-reset k-timeselector-lg":"",mobileMode:this.mobileMode,show:this.show,cancelButton:e,disabled:a,nowButton:s,format:r,min:this.min,max:this.max,steps:h,smoothScroll:t,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject})},this.renderPopup=()=>{const{popupClass:t,...e}=this.popupSettings,s=d.classNames("k-group k-reset",t),a={popupClass:"k-timepicker-popup",show:this.show,animate:this.element!==null,anchor:this.element,className:s,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...e};return this.props.popup?o.createElement(this.props.popup,{...a},this.renderTimeSelector()):o.createElement(Wt.Popup,{...a},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,e={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(Pt,k[Qt]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(At,k[At]),onApply:s=>this.handleValueChange(s)}};return o.createElement(ne,{...e},o.createElement(ht.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderTimeSelector()))},this.setTimeSelectorRef=t=>{this._timeSelector=t},this.nextValue=(t,e)=>t.value!==void 0?t.value:e.value,this.nextShow=(t,e)=>t.show!==void 0?t.show:e.show,this.handleInputValueChange=t=>{const e=this.mergeTime(t.value);this.handleValueChange({...t,value:e})},this.handleTimeChange=t=>{this.setState({candidate:t.time})},this.handleValueChange=t=>{this.setState({value:l.cloneDate(t.value||this.state.candidate)}),this.valueDuringOnChange=t.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0;const{onChange:e}=this.props,s=this.value||this.state.candidate;e&&e.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:s,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleValueReject=t=>{this.setShow(!1)},this.handleIconClick=t=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:e,keyCode:s}=t;if(s===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}e&&(s===d.Keys.up||s===d.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=s===d.Keys.up,this.setShow(s===d.Keys.down))},d.validatePackage(ft),this.state={value:this.props.defaultValue||G.defaultProps.defaultValue,show:this.props.defaultShow||G.defaultProps.defaultShow,focused:!1,candidate:null},this.normalizeTime=this.normalizeTime.bind(this),this.setShow=this.setShow.bind(this),this.mergeTime=this.mergeTime.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get timeSelector(){return this._timeSelector}get value(){const i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?l.cloneDate(i):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const i=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),e=this.normalizeTime(this.max),s=$s(i,t,e),a=this.props.validationMessage!==void 0,r=(!this.required||this.value!==null)&&s,h=this.props.valid!==void 0?this.props.valid:r;return{customError:a,rangeOverflow:js(i,e),rangeUnderflow:Ts(i,t),valid:h,valueMissing:this.value===null}}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ae&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:G.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:G.defaultProps.required}get popupSettings(){return this.props.popupSettings||G.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:G.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:G.defaultProps.max}get dateInputComp(){return this.props.dateInput||G.defaultProps.dateInput}get localizationService(){return x.provideLocalizationService(this)}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow?this._timeSelector.focusActiveList():this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=G.defaultProps.size,rounded:t=G.defaultProps.rounded,fillMode:e=G.defaultProps.fillMode,disabled:s,tabIndex:a,title:r,id:h,className:u,format:c,formatPlaceholder:m,width:f,name:g,steps:w,validationMessage:v,required:E,validityStyles:V,ariaLabelledBy:N,ariaDescribedBy:S}=this.props,y=!this.validityStyles||this.validity.valid,b={disabled:s,format:c,formatPlaceholder:m,id:h,ariaLabelledBy:N,ariaDescribedBy:S,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:g,onChange:this.handleInputValueChange,required:E,steps:w,tabIndex:this.show?-1:a,title:r,valid:this.validity.valid,validationMessage:v,validityStyles:V,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,size:null,fillMode:null,rounded:null,readonly:this.mobileMode},K=this.localizationService.toLanguageString(Pt,k[Pt]),M=this.localizationService.toLanguageString(we,k[we]),F=o.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:U,onBlur:O})=>o.createElement(o.Fragment,null,o.createElement("div",{id:this.props.id,ref:_=>{this._element=_},className:d.classNames("k-input","k-timepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-rounded-${d.kendoThemeMaps.roundedMap[t]||t}`]:t,[`k-input-${e}`]:e,["k-invalid"]:!y,["k-required"]:this.required,["k-disabled"]:this.props.disabled},u),onKeyDown:this.handleKeyDown,style:{width:f},onFocus:U,onBlur:O,onClick:this.mobileMode?this.handleIconClick:void 0},o.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...b}),o.createElement(L.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:J.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleIconClick,title:M,className:"k-input-button",rounded:null,"aria-label":K}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?o.createElement(ye,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:y,editorDisabled:this.props.disabled,children:F,style:{width:this.props.width}}):F}normalizeTime(i){return R(z,i)}setShow(i){const{onOpen:t,onClose:e}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&e&&e.call(void 0,{target:this}))}mergeTime(i){return this.value&&i?R(this.value,i):i}calculateMedia(i){for(let t of i)this.setState({windowWidth:t.target.clientWidth})}};let Ot=G;Ot.displayName="TimePicker",Ot.propTypes={className:n.string,cancelButton:n.bool,nowButton:n.bool,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])},Ot.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:nt,min:ct,popupSettings:{},tabIndex:0,steps:{},required:!1,validityStyles:!0,dateInput:ot,size:"medium",rounded:"medium",fillMode:"solid"};const Ai=d.createPropsContext(),Hi=d.withIdHOC(d.withPropsContext(Ai,Ot));Hi.displayName="KendoReactTimePicker",x.registerForLocalization(Ot);const Bi=2,qe=class extends o.Component{constructor(i){super(i),this._element=null,this.isActive=!1,this.focusActiveDate=()=>{if(!this._element)return;const t=this._element.querySelector("td.k-focus"),e=this._element.querySelector(".k-state-pending-focus");t&&t[0]&&t[0].classList.remove("k-focus"),e&&e.classList.add("k-focus"),this.isActive=!0},this.blurActiveDate=()=>{if(!this._element)return;const t=this._element.querySelector("td.k-focus");t&&t.classList.remove("k-focus"),this.isActive=!1},this.rotateSelectionRange=t=>{if(t.start===null||t.end===null)return t;const e=t.end<t.start;return{start:e?t.end:t.start,end:e?t.start:t.end}},this.handleDateChange=(t,e=!1)=>{const{onChange:s}=this.props;if(s){const a={syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:l.cloneDate(t.value),target:this,isTodayClick:e};s.call(void 0,a)}}}get element(){return this._element}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===C.month)}get min(){return this.props.min!==void 0?this.props.min:qe.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:qe.defaultProps.max}componentDidUpdate(){this.isActive&&this.focusActiveDate()}render(){const i=this.props.allowReverse?this.rotateSelectionRange(this.props.selectionRange):this.props.selectionRange,t=d.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":this.props.verticalView,"k-hstack":!this.props.verticalView,"k-calendar-monthview":this.props.activeView===C.month,"k-calendar-yearview":this.props.activeView===C.year,"k-calendar-decadeview":this.props.activeView===C.decade,"k-calendar-centuryview":this.props.activeView===C.century});return o.createElement("div",{ref:e=>{this._element=e},className:t},this.props.dates.map(e=>o.createElement("table",{className:"k-calendar-table k-content",key:e.getTime(),role:"grid"},o.createElement(Lt,{bus:this.props.bus,service:this.props.service,key:e.getTime(),direction:"horizontal",activeView:this.props.activeView,cellUID:this.props.cellUID,viewDate:e,min:this.min,max:this.max,focusedDate:this.props.focusedDate,selectionRange:i,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onCellEnter:this.props.onCellEnter,cell:this.props.cell,weekCell:this.props.weekCell}))))}};let Vt=qe;Vt.defaultProps={showWeekNumbers:!1,views:Bi,take:Bi,allowReverse:!0,min:it,max:st};const Re=(i=Q.defaultProps.min,t=Q.defaultProps.max,e)=>e instanceof Date&&!Array.isArray(e)&&A(l.getDate(e),i,t)?l.getDate(e):null,zi=(i=Q.defaultProps.min,t=Q.defaultProps.max,e)=>Array.isArray(e)?e.filter(s=>A(s,i,t)).map(s=>l.getDate(s)):null,qi=i=>typeof i=="object"&&!(i instanceof Date)&&i!==null&&!Array.isArray(i)?i:q,Ri=(i,t,e)=>i||t&&t[0]||e&&e.start,pn=(i,t)=>i.start===null&&t===null?"start":i.end===null?"end":"start",kt=class extends o.Component{constructor(i){super(i),this.dates=[],this.selectedDate=null,this.selectedMultiple=null,this.selectedRange=q,this._focusedDate=new Date,this.cellUID=this.props.id+"-cell-uid",this.activeRangeEnd="start",this._element=null,this.intl=null,this.localization=null,this.service=null,this.calendarViewList=null,this.isActive=!1,this.calculateFocusFromValue=!0,this.focus=()=>{this._element&&this._element.focus()},this.clampRange=c=>({start:c,end:null}),this.rangeWithFocused=(c,m)=>({start:c.start,end:c.end===null&&c.start!==null&&this.isActive?m:c.end}),this.generateRange=(c,m)=>{const{end:f,start:g}=m,w=m.start!==null&&c.getTime()<=m.start.getTime();return!this.props.allowReverse&&w?{start:c,end:this.selectedRange.start}:this.activeRange!=="end"?{start:c,end:f}:{start:g||this.selectedDate,end:c}},this.canNavigate=c=>{if(!this.service)return!1;const m=this.service.move(this.focusedDate,c);return this.min<=m&&m<=this.max||this.service.isInSameView(m,this.min)||this.service.isInSameView(m,this.max)},this.navigate=(c,m)=>{this.calculateFocusFromValue=!1;const f=this.move(c,m);this.setState({navigateDate:f,focusedDate:f})},this.move=(c,m)=>this.clampDate(this.service.move(m,c)),this.clampDate=c=>Y(c,this.min,this.max),this.shouldAutoCorrect=(c,m)=>{const{end:f,start:g}=m;return this.activeRange!=="end"?f!==null&&c>f:g!==null&&c<g},this.handleCellEnter=c=>{this.props.mode==="range"&&(this.calculateFocusFromValue=!1,this.setState({focusedDate:c}))},this.handleMouseDown=c=>{c.preventDefault()},this.handleClick=c=>{this._element&&this._element.focus({preventScroll:!0})},this.handleFocus=c=>{if(this.isActive=!0,!this.calendarViewList)return;this.calendarViewList.focusActiveDate();const{onFocus:m}=this.props;m&&m.call(void 0,c)},this.handleBlur=c=>{if(this.isActive=!1,!this.calendarViewList)return;this.calendarViewList.blurActiveDate();const{onBlur:m}=this.props;m&&m.call(void 0,c)},this.handleTodayClick=c=>{this.todayIsInRange&&this.handleDateChange(c)},this.handlePrevButtonClick=()=>{const c=D.PrevView;if(this.state.activeView>0&&this.focusedDate.getFullYear()>this.dates[0].getFullYear())this.navigate(c,this.move(c,this.focusedDate));else{const m=this.isInMonth(this.focusedDate,this.dates[1])?this.move(c,this.focusedDate):this.focusedDate;this.navigate(c,m)}},this.handleNextButtonClick=()=>{this.navigate(D.NextView,this.focusedDate)},this.handleKeyDown=c=>{const{keyCode:f,ctrlKey:g,metaKey:w}=c;if(f===84){const v=B();this.calculateFocusFromValue=!1,this.setState({focusedDate:v,navigateDate:v})}if((g||w)&&(f===d.Keys.left&&this.handlePrevButtonClick(),f===d.Keys.right&&this.handleNextButtonClick()),f===d.Keys.enter){const v={syntheticEvent:c,nativeEvent:c.nativeEvent,value:this.focusedDate,target:this};this.handleDateChange(v)}else{const v=Y(this.navigation.move(this.focusedDate,this.navigation.action(c),this.state.activeView,this.service,c),this.min,this.max);if(l.isEqualDate(this.focusedDate,v))return;this.dates&&this.service&&!this.service.isInArray(v,this.dates)&&this.setState({navigateDate:v}),this.calculateFocusFromValue=!1,this.setState({focusedDate:v})}c.preventDefault()},this.handleViewChange=({view:c})=>{this.calculateFocusFromValue=!1,this.setState(m=>({activeView:c,navigateDate:m.focusedDate}))},this.handleDateChange=c=>{const m=l.cloneDate(c.value),f=this.bus.canMoveDown(this.state.activeView);if(this.props.disabled)return;if(f)if(c.isTodayClick)this.bus.moveToBottom(this.state.activeView);else{this.bus.moveDown(this.state.activeView,c.syntheticEvent),this.setState({focusedDate:m});return}this.calculateFocusFromValue=!0;let g;switch(this.props.mode){case"single":g=l.cloneDate(c.value);break;case"multiple":if(Array.isArray(this.selectedMultiple)){const v=this.selectedMultiple.slice();let E=-1;v.forEach((V,N)=>{l.isEqualDate(V,c.value)&&(E=N)}),E!==-1?v.splice(E,1):v.push(l.cloneDate(c.value)),g=v.slice()}else this.selectedDate?g=[l.cloneDate(this.selectedDate),l.cloneDate(c.value)]:g=[l.cloneDate(c.value)];break;case"range":{g=this.selectedRange.start!==null&&this.selectedRange.end!==null&&this.activeRange==="start"?this.clampRange(c.value):this.generateRange(c.value,this.selectedRange),this.activeRangeEnd=this.activeRange!=="end"?"end":"start";break}default:g=l.cloneDate(c.value);break}this.valueDuringOnChange=g,c.isTodayClick&&this.setState({navigateDate:m}),this.setState({value:g,focusedDate:m}),this.valueDuringOnChange=g;const{onChange:w}=this.props;if(w){const v={syntheticEvent:c.syntheticEvent,nativeEvent:c.nativeEvent,value:g,target:this};w.call(void 0,v)}this.valueDuringOnChange=void 0};const t=i.value!==void 0?i.value:i.defaultValue||kt.defaultProps.defaultValue,e=Re(this.min,this.max,t),s=zi(this.min,this.max,t),a=qi(t),r=Ri(e,s,a),h=Yt(C[i.defaultActiveView],this.bottomView,this.topView),u=Y(i.focusedDate||r||B(),this.min,this.max);this.state={value:t,activeView:h,focusedDate:u,navigateDate:u},this.activeRangeEnd=pn(a,e),this.bus=new de(this.handleViewChange),this.navigation=new me(this.bus),this.calculateFocusFromValue=!1,this.lastView=h,this.lastViewsCount=this.props.views||Vt.defaultProps.views}get wrapperID(){return this.props.id+"-wrapper-id"}get isRtl(){return this.props.dir==="rtl"}get element(){return this._element}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get focusedDate(){return l.cloneDate(this._focusedDate)}get min(){return l.getDate(this.props.min!==void 0?this.props.min:kt.defaultProps.min)}get max(){return l.getDate(this.props.max!==void 0?this.props.max:kt.defaultProps.max)}get bottomView(){return C[this.props.bottomView!==void 0?this.props.bottomView:kt.defaultProps.bottomView]}get topView(){return C[this.props.topView!==void 0?this.props.topView:kt.defaultProps.topView]}get activeRange(){return this.props.activeRangeEnd!==void 0?this.props.activeRangeEnd:this.activeRangeEnd}get todayIsInRange(){return A(B(),l.getDate(this.min),l.getDate(this.max))}componentDidMount(){this.calculateFocusFromValue=!0}componentDidUpdate(){this.calendarViewList&&(this.isActive?this.calendarViewList.focusActiveDate:this.calendarViewList.blurActiveDate)();const i=Re(this.min,this.max,this.value);this.calculateFocusFromValue=!!(this.selectedDate&&i&&this.selectedDate.getTime()&&i.getTime()),this.lastView=this.state.activeView,this.lastViewsCount=this.props.views||Vt.defaultProps.views}render(){this.props._ref&&this.props._ref(this),this.intl=x.provideIntlService(this),this.localization=x.provideLocalizationService(this),this.bus.configure(this.bottomView,this.topView);const i=Yt(this.state.activeView,this.bottomView,this.topView);this.service=this.bus.service(i,this.intl),this.selectedDate=Re(this.min,this.max,this.value),this.selectedMultiple=zi(this.min,this.max,this.value),this.selectedRange=qi(this.value);const t=Ri(this.selectedDate,this.selectedMultiple,this.selectedRange);this._focusedDate=Y(this.calculateFocusFromValue&&t!==null?t:this.state.focusedDate,this.min,this.max);const e=d.classNames("k-widget k-calendar k-calendar-range",{"k-disabled":this.props.disabled},this.props.className),s=this.rangeWithFocused(this.selectedRange,this.focusedDate),a=this.localization.toLanguageString(pe,k[pe]),r=this.localization.toLanguageString(fe,k[fe]),h=!this.canNavigate(D.PrevView),u=!this.canNavigate(D.NextView),c={"aria-disabled":h},m={"aria-disabled":u},f=this.lastView!==i,g=this.dates&&this.isInMonth(this.state.navigateDate,this.dates[0]),w=this.lastViewsCount!==this.props.views;(!g||f||w)&&(this.dates=this.service.datesList(this.state.navigateDate,this.props.views||Vt.defaultProps.views));const v=l.cloneDate(this.dates&&this.dates[0]?this.dates[0]:B());return o.createElement("div",{ref:E=>{this._element=E},className:e,id:this.props.id||this.wrapperID,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.disabled?void 0:this.props.tabIndex,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,onClick:this.handleClick,onKeyDown:this.handleKeyDown,"aria-disabled":this.props.disabled,dir:this.props.dir},o.createElement(vt,{key:`.kendo.calendar.header.${v.getTime()}`,activeView:i,currentDate:v,min:this.min,max:this.max,rangeLength:this.props.views,bus:this.bus,service:this.service,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode,commands:o.createElement(o.Fragment,null,o.createElement(L.Button,{type:"button",className:"k-calendar-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?J.chevronRightIcon:J.chevronLeftIcon,fillMode:"flat",title:a,disabled:h,onClick:this.handlePrevButtonClick,...c}),o.createElement(It,{min:this.min,max:this.max,onClick:this.handleTodayClick,disabled:!this.todayIsInRange}),o.createElement(L.Button,{type:"button",className:"k-calendar-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?J.chevronLeftIcon:J.chevronRightIcon,fillMode:"flat",title:r,disabled:u,onClick:this.handleNextButtonClick,...m}))}),o.createElement(Vt,{ref:E=>{this.calendarViewList=E},dates:this.dates,activeView:i,focusedDate:this.focusedDate,min:this.min,max:this.max,bus:this.bus,service:this.service,selectionRange:s,value:this.selectedMultiple||this.selectedDate,cellUID:this.cellUID,views:this.props.views,onChange:this.handleDateChange,showWeekNumbers:this.props.weekNumber,onCellEnter:this.handleCellEnter,cell:this.props.cell,weekCell:this.props.weekCell,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode}))}isInMonth(i,t){return!!t&&l.firstDayOfMonth(t)<=i&&i<=l.lastDayOfMonth(t)}};let Q=kt;Q.displayName="MultiViewCalendar",Q.propTypes={activeRangeEnd:n.oneOf(["start","end"]),allowReverse:n.bool,bottomView:n.oneOf(["month","year","decade","century"]),className:n.string,defaultActiveView:n.oneOf(["month","year","decade","century"]),defaultValue:n.oneOfType([et(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:et(n.instanceOf(Date)),end:et(n.instanceOf(Date))})]),disabled:n.bool,focusedDate:n.instanceOf(Date),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),mode:n.oneOf(["single","multiple","range"]),onBlur:n.func,onChange:n.func,onFocus:n.func,tabIndex:n.number,topView:n.oneOf(["month","year","decade","century"]),value:n.oneOfType([et(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:et(n.instanceOf(Date).isRequired),end:et(n.instanceOf(Date).isRequired)})]),views:(i,t,e)=>{const s=i[t];return s!==void 0&&s<1?new Error(`Invalid prop '${t}' supplied to'${e}'. The '${t}' property cannot be less than 1'`):null},weekNumber:n.bool,dir:n.string},Q.defaultProps={disabled:!1,min:it,max:st,navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",tabIndex:0,bottomView:"month",views:2,allowReverse:!1};const Wi=d.createPropsContext(),We=d.withIdHOC(d.withPropsContext(Wi,Q));We.displayName="KendoReactMultiViewCalendar",x.registerForIntl(Q),x.registerForLocalization(Q);const Rt=class extends o.Component{constructor(i){super(i),this._element=null,this._calendar=null,this._startDateInput=o.createRef(),this._endDateInput=o.createRef(),this.shouldFocusDateInput=!1,this.shouldFocusCalendar=!1,this.focus=()=>{this.startDateInput&&this.startDateInput.focus()},this.setCalendarRef=t=>{this._calendar=t},this.focusCalendarElement=()=>{this._calendar&&this._calendar.element&&this._calendar.element.focus({preventScroll:!0})},this.calculateValue=(t,e)=>(t.value!==void 0?t.value:e.value)||q,this.calculateShow=(t,e)=>t.show!==void 0?t.show:e.show,this.renderCalendar=()=>{const t=this.value||q,e={min:this.min,max:this.max,allowReverse:this.props.allowReverse,mode:"range",focusedDate:this.props.focusedDate,disabled:this.props.disabled,className:this.mobileMode?"k-calendar-lg":"",mobileMode:this.mobileMode,...this.props.calendarSettings,value:t,dir:this.props.dir,onChange:this.handleCalendarChange};return this.props.calendar?o.createElement(this.props.calendar,{...e}):o.createElement(We,{...e,ref:this.setCalendarRef})},this.renderPopup=()=>{const t={popupClass:"k-daterangepicker-popup",animate:this._element!==null,anchor:this._element,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...this.props.popupSettings,show:this.show};return this.props.popup?o.createElement(this.props.popup,{...t},this.renderCalendar()):o.createElement(Wt.Popup,{...t},this.renderCalendar())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,e={expand:this.show,onClose:s=>this.handleCancel(s),adaptiveTitle:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(De,k[De]),onCancel:this.handleCancel,applyText:this.localizationService.toLanguageString(Ie,k[Ie]),onApply:this.handleBlur}};return o.createElement(ne,{...e},o.createElement(ht.ActionSheetContent,{className:"!k-overflow-hidden"},o.createElement("div",{className:"k-scrollable-wrap"},this.renderCalendar())))},this.handleReverseClick=t=>{const e={start:this.value.end,end:this.value.start},s={syntheticEvent:t,nativeEvent:t.nativeEvent};this.handleChange(e,s)},this.handleReverseMouseDown=t=>{t.preventDefault()},this.handleFocus=t=>{clearTimeout(this.nextTickId),this.shouldFocusDateInput||this.mobileMode&&this.setState({currentValue:this.value});const{onFocus:e}=this.props;e&&e.call(void 0,t)},this.handleClick=()=>{this.shouldFocusDateInput||this.setShow(!0)},this.handleBlur=t=>{this.nextTick(()=>{this.setShow(!1)});const{onBlur:e}=this.props;e&&e.call(void 0,t)},this.handleCancel=t=>{this.nextTick(()=>{this.setShow(!1),this.setState({currentValue:q})});const{onCancel:e}=this.props;e&&e.call(void 0,t)},this.handleEndChange=t=>{const e={start:this.value.start,end:l.cloneDate(t.value||void 0)};this.handleChange(e,t)},this.handleStartChange=t=>{const e={start:l.cloneDate(t.value||void 0),end:this.value.end};this.handleChange(e,t)},this.extractRangeFromValue=t=>{if(!Array.isArray(t.value)&&!(t.value instanceof Date))return t.value||q;const e=Array.isArray(t.value)?t.value[0]:t.value;return{start:this.value.end!==null?e:this.value.start,end:this.value.start!==null?e:this.value.end}},this.handleCalendarChange=t=>{const e=this.extractRangeFromValue(t);this.handleChange(e,t)},this.handleKeyDown=t=>{const{keyCode:e,altKey:s}=t;e===d.Keys.esc?(t.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):s&&e===d.Keys.down?(t.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0),this.focusCalendarElement()):s&&e===d.Keys.up&&(t.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1))},this.handleChange=(t,e)=>{this.setState({value:t}),this.valueDuringOnChange=t;const{onChange:s}=this.props;if(s){const a={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:this.value,show:this.show,target:this};s.call(void 0,a)}this.valueDuringOnChange=void 0},d.validatePackage(ft),this.state={show:this.props.show||this.props.defaultShow||Rt.defaultProps.defaultShow,value:this.props.value||this.props.defaultValue||Rt.defaultProps.defaultValue,currentValue:q},this.nextTick=this.nextTick.bind(this),this.setShow=this.setShow.bind(this),this.focusCalendarElement=this.focusCalendarElement.bind(this),this.focusDateInputElement=this.focusDateInputElement.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get _startInputId(){return this.props.id+"-start-input-id"}get _endInputId(){return this.props.id+"-end-input-id"}get element(){return this._element}get startDateInput(){return this._startDateInput.current}get endDateInput(){return this._endDateInput.current}get calendar(){return this._calendar}get value(){return(this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value)||q}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get min(){return this.props.min!==void 0?this.props.min:Rt.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:Rt.defaultProps.max}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get localizationService(){return x.provideLocalizationService(this)}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ae&&this.props.adaptive)}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this.shouldFocusCalendar&&this.focusCalendarElement(),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;clearTimeout(this.nextTickId),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const i=this.value||q,t=this.mobileMode&&this.show?this.state.currentValue:i,e=(this.props.startDateInputSettings||{}).id||this._startInputId,s=(this.props.endDateInputSettings||{}).id||this._endInputId,a=d.classNames("k-daterangepicker",{"k-disabled":this.props.disabled},this.props.className),r=this.localizationService.toLanguageString(Gt,k[Gt]),h=this.localizationService.toLanguageString(Xt,k[Xt]),u=this.localizationService.toLanguageString(Jt,k[Jt]),c={disableSelection:this.mobileMode&&!0,label:r,format:this.props.format,min:this.min,max:this.max,id:this._startInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.startDateInputSettings,value:t.start,onChange:this.handleStartChange},m={disableSelection:this.mobileMode&&!0,label:h,format:this.props.format,min:this.min,max:this.max,id:this._endInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.endDateInputSettings,value:t.end,onChange:this.handleEndChange},f=o.createElement(L.Button,{type:"button",className:"k-select",fillMode:"flat",title:x.provideLocalizationService(this).toLanguageString(St,k[St]),onMouseDown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":e+" "+s,"aria-label":x.provideLocalizationService(this).toLanguageString(St,k[St])},o.createElement(d.IconWrap,{style:{transform:"rotate(90deg)"},name:"arrows-swap",icon:J.arrowsSwapIcon}));return o.createElement(o.Fragment,null,o.createElement("span",{ref:g=>{this._element=g},className:a,style:this.props.style,id:this.props.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.tabIndex,onFocus:this.handleFocus,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onBlur:this.mobileMode?void 0:this.handleBlur,dir:this.props.dir},this.props.startDateInput?o.createElement(this.props.startDateInput,{...c}):o.createElement(ot,{...c,ref:this._startDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),(this.props.allowReverse||this.props.calendarSettings&&this.props.calendarSettings.allowReverse)&&this.props.swapButton?f:u,this.props.endDateInput?o.createElement(this.props.endDateInput,{...m}):o.createElement(ot,{...m,ref:this._endDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup())}focusDateInputElement(){if(!document||!this.startDateInput||!this.startDateInput.element||!this.endDateInput||!this.endDateInput.element)return;const i=d.getActiveElement(document);(this.value.start===null||this.value.end!==null)&&i!==this.endDateInput.element?this.startDateInput.element.focus({preventScroll:!0}):i!==this.startDateInput.element&&this.endDateInput.element.focus({preventScroll:!0})}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}setShow(i){const{onOpen:t,onClose:e}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&e&&e.call(void 0,{target:this}))}calculateMedia(i){for(let t of i)this.setState({windowWidth:t.target.clientWidth})}};let Nt=Rt;Nt.displayName="DateRangePicker",Nt.propTypes={allowReverse:n.bool,calendarSettings:n.any,className:n.string,defaultShow:n.bool,defaultValue:n.shape({start:et(n.instanceOf(Date).isRequired),end:et(n.instanceOf(Date).isRequired)}),disabled:n.bool,endDateInputSettings:n.shape(lt.propTypes),focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),onBlur:n.func,onChange:n.func,onFocus:n.func,popupSettings:n.any,show:n.bool,startDateInputSettings:n.any,style:n.any,swapButton:n.any,tabIndex:n.number,dir:n.string,value:n.shape({start:et(n.instanceOf(Date).isRequired),end:et(n.instanceOf(Date).isRequired)})},Nt.defaultProps={allowReverse:!1,defaultShow:!1,defaultValue:q,disabled:!1,format:"d",max:st,min:it,swapButton:!1};const Ki=d.createPropsContext(),Ui=d.withIdHOC(d.withPropsContext(Ki,Nt));Ui.displayName="KendoReactDateRangePicker",x.registerForLocalization(Nt);class Ke extends o.Component{constructor(t){super(t),this._calendar=null,this._timePart=null,this._cancelButton=null,this._acceptButton=null,this._dateButtonRef=null,this._calendarWrap=null,this.shouldFocusPart=!1,this.focus=e=>{Promise.resolve().then(()=>{this.state.tab==="time"&&this._timePart&&this._timePart.focus(e);const s=this.calendarElement();this.state.tab==="date"&&s&&s.focus(e)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-widget.k-calendar"),this.move=e=>{if(e==="right"&&this.state.tab==="time"||e==="left"&&this.state.tab==="date")return;const s=e==="left"?"date":"time";this.shouldFocusPart=!0,this.setState({tab:s})},this.dateTimeFooter=()=>{const{cancelButton:e}=this.props,s=this.localizationService.toLanguageString(Ht,k[Ht]),a=this.localizationService.toLanguageString(Bt,k[Bt]);return o.createElement("div",{className:"k-datetime-footer k-actions k-actions-stretched"},e&&o.createElement(L.Button,{type:"button",ref:r=>{this._cancelButton=r},className:"k-time-cancel",onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:s,"aria-label":s},s),o.createElement(L.Button,{type:"button",themeColor:"primary",ref:r=>{this._acceptButton=r},className:"k-time-accept",disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:a,"aria-label":a},a))},this.handleReject=e=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||z});const s=this.mergeDate(this.props.value,this.props.value||z);if(this.props.onReject){const a={nativeEvent:e.nativeEvent,syntheticEvent:e,target:this,value:s};this.props.onReject.call(void 0,a)}},this.handleAccept=(e,s)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const a=this.mergeDate(this.state.dateValue,s||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:a,target:this})},this.handleNowClick=e=>{this.setState({timeValue:ut()}),this.handleAccept(e,ut())},this.handleCalendarValueChange=e=>{e.syntheticEvent.stopPropagation(),this.setState({dateValue:e.value,tab:"time"}),this.shouldFocusPart=!0},this.handleTimeListContainerChange=e=>{this.setState({timeValue:e})},this.handleDateClick=e=>{e.stopPropagation(),this.move("left")},this.handleTimeClick=e=>{e.stopPropagation(),this.move("right")},this.handleKeyDown=e=>{const{keyCode:s,altKey:a}=e;if(!this.props.disabled)switch(s){case d.Keys.enter:!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e);return;case d.Keys.left:if(!a)return;this.move("left");return;case d.Keys.right:if(!a)return;this.move("right");return;default:return}},this.handleCancelKeyDown=e=>{const{keyCode:s}=e;s===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&!this.hasDateValue&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=e=>{const{keyCode:s}=e;s===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=e=>{var r,h,u,c;const{keyCode:s,shiftKey:a}=e;a&&s===d.Keys.tab&&(e.stopPropagation(),this.hasDateValue?(c=(u=this._acceptButton)==null?void 0:u.element)==null||c.focus():(h=(r=this._cancelButton)==null?void 0:r.element)==null||h.focus()),s===d.Keys.enter&&(e.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=e=>{const{keyCode:s}=e;s===d.Keys.enter&&(e.stopPropagation(),this.move("right"))},this.handleTimePartMount=e=>{this.setState({timeValue:e})},this.state={tab:"date",dateValue:this.props.value,timeValue:this.props.value||z}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return this.state.dateValue!==null}get localizationService(){return x.provideLocalizationService(this)}componentDidUpdate(){this.shouldFocusPart&&this.focus({preventScroll:!0}),this.shouldFocusPart=!1}render(){const{disabled:t,min:e,max:s,weekNumber:a,focusedDate:r,format:h,mobileMode:u,footerActions:c}=this.props,m=d.classNames({"k-date-tab":this.state.tab==="date","k-time-tab":this.state.tab==="time","k-disabled":t},"k-datetime-wrap"),f=this.localizationService.toLanguageString(be,k[be]),g=this.localizationService.toLanguageString(Se,k[Se]),w={min:e,max:s,weekNumber:a,focusedDate:r,disabled:t||this.state.tab!=="date",value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:t||this.state.tab!=="date"?-1:void 0,mobileMode:u};return o.createElement("div",{onKeyDown:this.handleKeyDown,className:m,tabIndex:-1},o.createElement("div",{className:"k-datetime-buttongroup"},o.createElement(L.ButtonGroup,{width:"100%"},o.createElement(L.Button,{ref:v=>this._dateButtonRef=v,type:"button",selected:this.state.tab==="date",togglable:!0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},f),o.createElement(L.Button,{type:"button",selected:this.state.tab==="time",togglable:!0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},g))),o.createElement("div",{className:"k-datetime-selector"},o.createElement("div",{className:"k-datetime-calendar-wrap",ref:v=>this._calendarWrap=v},this.props.calendar?o.createElement(this.props.calendar,{...w}):o.createElement(te,{ref:v=>{this._calendar=v},...w})),o.createElement("div",{className:"k-datetime-time-wrap"},o.createElement("div",{className:u?"k-reset k-timeselector-lg k-timeselector":""},o.createElement(mt,{key:1,onNowClick:this.handleNowClick,disabled:t||this.state.tab!=="time",ref:v=>{this._timePart=v},min:this.minTime||ct,max:this.maxTime||nt,steps:this.props.steps,value:this.state.timeValue,format:h,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:u})))),c&&this.dateTimeFooter())}get minTime(){return this.props.minTime!==void 0?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return this.props.maxTime!==void 0?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(t,e){return l.isEqualDate(t,e||B())?t:null}hasActiveButton(){if(!this._acceptButton)return!1;const t=d.getActiveElement(document);return this._acceptButton&&t===this._acceptButton.element||this._cancelButton&&t===this._cancelButton.element}mergeTime(t,e){return t&&e?R(e,t):e}mergeDate(t,e){return t?R(t||B(),e):e}}Ke.defaultProps={footerActions:!0},x.registerForLocalization(Ke);const P=class extends o.Component{constructor(i){super(i),this._element=null,this._dateInput=o.createRef(),this._dateTimeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{const t=this.dateInputElement();t&&t.focus()},this.renderPicker=()=>{const{disabled:t,minTime:e,maxTime:s,format:a,calendar:r,cancelButton:h,weekNumber:u,focusedDate:c}=this.props;return o.createElement(Ke,{ref:m=>{this._dateTimeSelector=m},cancelButton:h,steps:this.props.steps,value:this.value,onChange:this.handleValueChange,onReject:this.handleReject,disabled:t,weekNumber:u,min:this.min,max:this.max,minTime:e,maxTime:s,focusedDate:c,format:a,calendar:r,mobileMode:this.mobileMode,footerActions:!this.mobileMode})},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,e=x.provideLocalizationService(this).toLanguageString(Ht,k[Ht]),s=x.provideLocalizationService(this).toLanguageString(Bt,k[Bt]),a={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:e,onCancel:r=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleReject(r)},applyText:s,onApply:r=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleAccept(r)}}};return o.createElement(ne,{...a},o.createElement(ht.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderPicker()))},this.handleReject=()=>{this.shouldFocusDateInput=!0,this.setShow(!1)},this.handleValueChange=t=>{this.setState({value:l.cloneDate(t.value||void 0)}),this.valueDuringOnChange=t.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:e}=this.props;e&&e.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:this.value,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleDateIconClick=()=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:e,keyCode:s}=t;if(s===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}e&&(s===d.Keys.up||s===d.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=s===d.Keys.up,this.setShow(s===d.Keys.down))},this.dateInputElement=()=>this.dateInput&&this.dateInput.element||this.element&&this.element.querySelector(".k-dateinput > input.k-input-inner"),d.validatePackage(ft),this.state={value:this.props.defaultValue||P.defaultProps.defaultValue,show:this.props.defaultShow||P.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get value(){const i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?l.cloneDate(i):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ae&&this.props.adaptive)}get min(){return this.props.min!==void 0?this.props.min:P.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:P.defaultProps.max}get validity(){const i=je(this.value,this.min,this.max)&&Ne(this.value,this.props.minTime||ct,this.props.maxTime||nt),t=this.props.validationMessage!==void 0,e=(!this.required||this.value!==null)&&i,s=this.props.valid!==void 0?this.props.valid:e;return{customError:t,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:s,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:P.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:P.defaultProps.required}get dateInputComp(){return this.props.dateInput||P.defaultProps.dateInput}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){const i=this.dateInputElement();this._dateTimeSelector&&this.show&&!this.prevShow&&this._dateTimeSelector.focus({preventScroll:!0}),i&&!this.show&&this.shouldFocusDateInput&&i.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;clearTimeout(this.nextTickId),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=P.defaultProps.size,rounded:t=P.defaultProps.rounded,fillMode:e=P.defaultProps.fillMode,disabled:s,tabIndex:a,title:r,id:h,format:u,formatPlaceholder:c,min:m,max:f,className:g,width:w,name:v,validationMessage:E,required:V,validityStyles:N,minTime:S,maxTime:y,ariaLabelledBy:b,ariaDescribedBy:K,popup:M=Wt.Popup}=this.props,F=!this.validityStyles||this.validity.valid,U={id:h,ariaLabelledBy:b,ariaDescribedBy:K,format:u,formatPlaceholder:c,disabled:s,title:r,validityStyles:N,validationMessage:E,required:V,min:m,max:f,minTime:S,maxTime:y,name:v,tabIndex:this.show?-1:a,valid:this.validity.valid,value:this.value,onChange:this.handleValueChange,steps:this.props.steps,label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaExpanded:this.show,size:null,fillMode:null,rounded:null},O=o.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.handleBlur,onSyncFocus:this.props.onFocus,onSyncBlur:this.props.onBlur},({onFocus:_,onBlur:tt})=>o.createElement(o.Fragment,null,o.createElement("div",{ref:X=>{this._element=X},className:d.classNames("k-input","k-datetimepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-rounded-${d.kendoThemeMaps.roundedMap[t]||t}`]:t,[`k-input-${e}`]:e,"k-invalid":!F,"k-required":this.required,"k-disabled":this.props.disabled},g),onKeyDown:this.handleKeyDown,style:{width:w},onFocus:this.mobileMode?void 0:_,onBlur:tt,onClick:this.mobileMode?this.handleDateIconClick:void 0},o.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode,...U}),o.createElement(L.Button,{tabIndex:-1,type:"button",icon:"calendar",svgIcon:J.calendarIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleDateIconClick,title:x.provideLocalizationService(this).toLanguageString(Dt,k[Dt]),className:"k-input-button",rounded:null,"aria-label":x.provideLocalizationService(this).toLanguageString(Dt,k[Dt])}),o.createElement(M,{show:this.show,animate:this.element!==null,anchor:this.element,popupClass:"k-datetime-container k-reset",id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"}},!this.mobileMode&&this.renderPicker())),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?o.createElement(ye,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:F,editorDisabled:this.props.disabled,children:O,style:{width:this.props.width}}):O}setShow(i){const{onOpen:t,onClose:e}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&e&&e.call(void 0,{target:this}))}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}calculateMedia(i){for(const t of i)this.setState({windowWidth:t.target.clientWidth})}};let yt=P;yt.displayName="DateTimePicker",yt.propTypes={className:n.string,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),weekNumber:n.bool,width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,cancelButton:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])},yt.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"g",max:st,min:it,popupSettings:{},tabIndex:0,weekNumber:!1,required:!1,validityStyles:!0,cancelButton:!0,dateInput:ot,size:"medium",rounded:"medium",fillMode:"solid"};const Yi=d.createPropsContext(),$i=d.withIdHOC(d.withPropsContext(Yi,yt));$i.displayName="KendoReactDateTimePicker",x.registerForLocalization(yt),p.Action=D,p.BusViewService=de,p.Calendar=te,p.CalendarCell=$e,p.CalendarHeaderTitle=ai,p.CalendarNavigationItem=li,p.CalendarPropsContext=ci,p.CalendarViewEnum=C,p.CalendarWeekCell=Te,p.CalendarWithoutContext=rt,p.CenturyViewService=Xe,p.DOMService=ti,p.DateInput=ot,p.DateInputPropsContext=pi,p.DateInputWithoutContext=lt,p.DatePicker=bi,p.DatePickerPropsContext=wi,p.DatePickerWithoutContext=xt,p.DateRangePicker=Ui,p.DateRangePickerPropsContext=Ki,p.DateRangePickerWithoutContext=Nt,p.DateTimePicker=$i,p.DateTimePickerPropsContext=Yi,p.DateTimePickerWithoutContext=yt,p.DayPeriodService=Si,p.DecadeViewService=Je,p.EMPTY_SELECTIONRANGE=q,p.Header=vt,p.HorizontalViewList=Vt,p.HoursService=Ci,p.MAX_DATE=st,p.MAX_TIME=nt,p.MIN_DATE=it,p.MIN_TIME=ct,p.MinutesService=ki,p.MonthViewService=Qe,p.MultiViewCalendar=We,p.MultiViewCalendarPropsContext=Wi,p.MultiViewCalendarWithoutContext=Q,p.NavigationService=me,p.PickerWrap=gi,p.ScrollSyncService=ei,p.SecondsService=_i,p.TimeList=qt,p.TimePart=mt,p.TimePicker=Hi,p.TimePickerPropsContext=Ai,p.TimePickerWithoutContext=Ot,p.TimeSelector=Et,p.TodayCommand=It,p.ToggleButton=fi,p.ViewList=zt,p.Virtualization=gt,p.WeekNamesService=ii,p.YearViewService=Pe,p.dateInputsMessages=k,p.decreaseValue=bt,p.end=Xt,p.getNow=ut,p.getToday=B,p.increaseValue=wt,p.separator=Jt,p.start=Gt,p.swapStartEnd=St,p.today=jt,p.toggleCalendar=Zt,p.toggleDateTimeSelector=Dt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
21
+ `);return null},value:n.instanceOf(Date),smoothScroll:n.bool,show:n.bool},qt.defaultProps={boundRange:!1,max:nt,min:z,step:1,smoothScroll:!0},x.registerForIntl(qt);const Be=new RegExp(`${j.hour}|${j.minute}|${j.second}|${j.dayperiod}|literal`),dt=class extends o.Component{constructor(i){super(i),this._element=null,this._nowButton=null,this.dateFormatParts=[],this.timeLists=[],this.focus=(t,e)=>{Promise.resolve().then(()=>{e&&this._nowButton&&this._nowButton.element&&this._nowButton.element.focus();const s=this.timeLists[0];!e&&this.state.activeListIndex===-1&&!this.hasActiveButton()&&s&&s.element&&s.focus(t)})},this.timeFormatReducer=(t,e)=>t+e.pattern,this.timeFormatFilter=(t,e,s)=>{const a=e>=1&&s[e-1];return a&&a&&t.type==="literal"?Be.test(a.type||""):Be.test(t.type||"")},this.focusList=t=>{this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(e=>t===1?e.next:e.prev).map(e=>e&&e.element&&e.element.focus({preventScroll:!0}))},this.listReducer=(t,e,s,a)=>t.length||e.props.id!==this.state.activeListIndex?t:[{next:a[s+1]||e,prev:a[s-1]||e}],this.showNowButton=()=>!this.hasSteps()&&this.props.nowButton&&Ne(ut(),this.min,this.max),this.handleKeyDown=t=>{const{keyCode:e}=t;switch(e){case d.Keys.left:t.preventDefault(),this.focusList(0);return;case d.Keys.right:t.preventDefault(),this.focusList(1);return;default:return}},this.handleListBlur=()=>{this.nextTick(()=>{this.setState({activeListIndex:-1})})},this.handleListFocus=t=>{clearTimeout(this.nextTickId),this.setState({activeListIndex:t})},this.handleChange=t=>{const{onChange:e}=this.props;e&&e.call(void 0,t)},this.snapTime=mi(di(this.props.steps,this.props.min||dt.defaultProps.min)),this.state={activeListIndex:-1},this.hasActiveButton=this.hasActiveButton.bind(this)}get element(){return this._element}get value(){return Ys(this.snapTime(l.cloneDate(this.props.value||z)),this.min,this.max)}get intl(){return x.provideIntlService(this)}get min(){return this.snapTime(this.props.min||dt.defaultProps.min)}get max(){return this.snapTime(this.props.max||dt.defaultProps.max)}get steps(){return this.props.steps||dt.defaultProps.steps}get boundRange(){return this.props.boundRange!==void 0?this.props.boundRange:dt.defaultProps.boundRange}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidMount(){const{onMount:i}=this.props;i&&i.call(void 0,this.value)}render(){const{format:i,smoothScroll:t,onNowClick:e,className:s,disabled:a,mobileMode:r,show:h,onNowKeyDown:u}=this.props;this.snapTime=mi(di(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(i||dt.defaultProps.format).filter(this.timeFormatFilter);const c=d.classNames({"k-disabled":a,"k-time-part":r},s);this.timeLists=[];const m=x.provideLocalizationService(this),f=m.toLanguageString(ve,k[ve]);return o.createElement("div",{className:c},o.createElement("div",{className:"k-time-header"},o.createElement("span",{className:"k-title"},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&o.createElement(L.Button,{type:"button",ref:g=>{this._nowButton=g},className:"k-time-now",fillMode:"flat",themeColor:"primary",title:f,onKeyDown:u,"aria-label":f,onClick:e,tabIndex:a?-1:0},m.toLanguageString(ge,k[ge]))),o.createElement("div",{className:"k-time-list-container",onKeyDown:this.handleKeyDown},o.createElement("span",{className:"k-time-highlight"}),this.dateFormatParts.map((g,w)=>g.type!=="literal"?o.createElement("div",{key:w,className:d.classNames("k-time-list-wrapper",{"k-focus":w===this.state.activeListIndex}),role:"presentation",tabIndex:-1},o.createElement("span",{className:"k-title",onMouseDown:v=>{v.preventDefault()}},this.intl.dateFieldName(g)),o.createElement(qt,{min:this.min,max:this.max,boundRange:this.boundRange,part:g,step:g.type?this.steps[g.type]:1,smoothScroll:t,ref:v=>{v&&this.timeLists.push(v)},id:w,onFocus:()=>{this.handleListFocus(w)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.value,disabled:a,show:h,mobileMode:r})):o.createElement("div",{key:w,className:"k-time-separator"},g.pattern))))}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}hasActiveButton(){const i=d.getActiveElement(document);return this._nowButton&&i===this._nowButton.element}hasSteps(){const i=Object.keys(this.steps);return i.length!==i.reduce((t,e)=>t+this.steps[e],0)}};let mt=dt;mt.propTypes={cancelButton:n.bool,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool},mt.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:ct,max:nt,steps:{},boundRange:!1},x.registerForIntl(mt),x.registerForLocalization(mt);const ze=class extends o.Component{constructor(i){super(i),this._element=null,this._cancelButton=null,this._acceptButton=null,this.timePart=null,this.focusActiveList=()=>{this.timePart&&this.timePart.focus({preventScroll:!0})},this.handleKeyDown=t=>{const{keyCode:e}=t;switch(e){case d.Keys.enter:this.hasActiveButton()||this.handleAccept(t);return;default:return}},this.revertToNowButton=t=>{const{keyCode:e,shiftKey:s}=t;!s&&e===d.Keys.tab&&(t.preventDefault(),this.props.nowButton!==!1?this.timePart&&this.timePart.focus({preventScroll:!0},!0):this.timePart&&this.timePart.focus({preventScroll:!0}))},this.handleNowKeyDown=t=>{var a;const{keyCode:e,shiftKey:s}=t;s&&e===d.Keys.tab?(t.preventDefault(),this._acceptButton&&((a=this._acceptButton.element)==null||a.focus({preventScroll:!0}))):e===d.Keys.enter&&(t.stopPropagation(),this.handleNowClick(t))},this.handleAccept=t=>{const e=this.mergeValue(l.cloneDate(this.value||ut()),this.timePart?this.timePart.value:this.current);this.setState({value:e}),this.valueDuringOnChange=e;const{onChange:s}=this.props;s&&s.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleReject=t=>{this.setState({current:this.value});const{onReject:e}=this.props;e&&e.call(void 0,t)},this.handleNowClick=t=>{const e=this.mergeValue(l.cloneDate(this.value||ut()),ut());this.setState({current:e,value:e}),this.valueDuringOnChange=e;const{onChange:s}=this.props;s&&s.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleChange=t=>{this.setState({current:t});const{handleTimeChange:e}=this.props;e&&e.call(void 0,{time:t})},this.dateFormatParts=this.intl.splitDateFormat(this.props.format||ze.defaultProps.format),this.mergeValue=Us(Ks(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.state={current:this.props.value||z,value:this.props.value||ze.defaultProps.value}}get element(){return this._element}get value(){const i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?l.cloneDate(i):null}get intl(){return x.provideIntlService(this)}get current(){return this.state.current!==null?l.cloneDate(this.state.current):null}componentWillUnmount(){clearTimeout(this.nextTickId)}render(){const{format:i,cancelButton:t,disabled:e,tabIndex:s,className:a,smoothScroll:r,min:h,max:u,boundRange:c,nowButton:m,steps:f,show:g,mobileMode:w}=this.props,v=x.provideLocalizationService(this),E=v.toLanguageString(Qt,k[Qt]),V=v.toLanguageString(At,k[At]);return o.createElement("div",{ref:N=>{this._element=N},tabIndex:e?void 0:s||0,className:d.classNames("k-timeselector",a,{"k-disabled":e}),onKeyDown:this.handleKeyDown},o.createElement(mt,{ref:N=>{this.timePart=N},value:this.current,onChange:this.handleChange,onNowClick:this.handleNowClick,format:i,smoothScroll:r,min:h,max:u,boundRange:c,disabled:e,nowButton:m,steps:f,show:g,mobileMode:w,onNowKeyDown:this.handleNowKeyDown}),this.props.footer&&o.createElement("div",{className:"k-time-footer k-actions k-actions-stretched"},t&&o.createElement(L.Button,{type:"button",ref:N=>{this._cancelButton=N},className:"k-time-cancel",onClick:this.handleReject,title:E,"aria-label":E},E),o.createElement(L.Button,{type:"button",ref:N=>{this._acceptButton=N},className:"k-time-accept",themeColor:"primary",onClick:this.handleAccept,onKeyDown:this.revertToNowButton,title:V,"aria-label":V},V)))}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}hasActiveButton(){if(!this._acceptButton||!this._acceptButton.element)return!1;const i=d.getActiveElement(document);return this._acceptButton&&i===this._acceptButton.element||this._cancelButton&&i===this._cancelButton.element}};let Et=ze;Et.propTypes={cancelButton:n.bool,className:n.string,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool},Et.defaultProps={value:null,disabled:!1,cancelButton:!0,format:"t",min:ct,max:nt,boundRange:!1,footer:!0},x.registerForIntl(Et),x.registerForLocalization(Et);const G=class extends o.Component{constructor(i){super(i),this._element=null,this._dateInput=o.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:t,cancelButton:e,nowButton:s,disabled:a,format:r,steps:h}=this.props;return o.createElement(Et,{ref:this.setTimeSelectorRef,className:this.mobileMode?"k-reset k-timeselector-lg":"",mobileMode:this.mobileMode,show:this.show,cancelButton:e,disabled:a,nowButton:s,format:r,min:this.min,max:this.max,steps:h,smoothScroll:t,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject})},this.renderPopup=()=>{const{popupClass:t,...e}=this.popupSettings,s=d.classNames("k-group k-reset",t),a={popupClass:"k-timepicker-popup",show:this.show,animate:this.element!==null,anchor:this.element,className:s,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...e};return this.props.popup?o.createElement(this.props.popup,{...a},this.renderTimeSelector()):o.createElement(Wt.Popup,{...a},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,e={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(Pt,k[Qt]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(At,k[At]),onApply:s=>this.handleValueChange(s)}};return o.createElement(ne,{...e},o.createElement(ht.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderTimeSelector()))},this.setTimeSelectorRef=t=>{this._timeSelector=t},this.nextValue=(t,e)=>t.value!==void 0?t.value:e.value,this.nextShow=(t,e)=>t.show!==void 0?t.show:e.show,this.handleInputValueChange=t=>{const e=this.mergeTime(t.value);this.handleValueChange({...t,value:e})},this.handleTimeChange=t=>{this.setState({candidate:t.time})},this.handleValueChange=t=>{this.setState({value:l.cloneDate(t.value||this.state.candidate)}),this.valueDuringOnChange=t.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0;const{onChange:e}=this.props,s=this.value||this.state.candidate;e&&e.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:s,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleValueReject=t=>{this.setShow(!1)},this.handleIconClick=t=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:e,keyCode:s}=t;if(s===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}e&&(s===d.Keys.up||s===d.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=s===d.Keys.up,this.setShow(s===d.Keys.down))},d.validatePackage(ft),this.state={value:this.props.defaultValue||G.defaultProps.defaultValue,show:this.props.defaultShow||G.defaultProps.defaultShow,focused:!1,candidate:null},this.normalizeTime=this.normalizeTime.bind(this),this.setShow=this.setShow.bind(this),this.mergeTime=this.mergeTime.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get timeSelector(){return this._timeSelector}get value(){const i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?l.cloneDate(i):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const i=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),e=this.normalizeTime(this.max),s=$s(i,t,e),a=this.props.validationMessage!==void 0,r=(!this.required||this.value!==null)&&s,h=this.props.valid!==void 0?this.props.valid:r;return{customError:a,rangeOverflow:js(i,e),rangeUnderflow:Ts(i,t),valid:h,valueMissing:this.value===null}}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ae&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:G.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:G.defaultProps.required}get popupSettings(){return this.props.popupSettings||G.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:G.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:G.defaultProps.max}get dateInputComp(){return this.props.dateInput||G.defaultProps.dateInput}get localizationService(){return x.provideLocalizationService(this)}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow?this._timeSelector.focusActiveList():this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=G.defaultProps.size,rounded:t=G.defaultProps.rounded,fillMode:e=G.defaultProps.fillMode,disabled:s,tabIndex:a,title:r,id:h,className:u,format:c,formatPlaceholder:m,width:f,name:g,steps:w,validationMessage:v,required:E,validityStyles:V,ariaLabelledBy:N,ariaDescribedBy:S}=this.props,y=!this.validityStyles||this.validity.valid,b={disabled:s,format:c,formatPlaceholder:m,id:h,ariaLabelledBy:N,ariaDescribedBy:S,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:g,onChange:this.handleInputValueChange,required:E,steps:w,tabIndex:this.show?-1:a,title:r,valid:this.validity.valid,validationMessage:v,validityStyles:V,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,size:null,fillMode:null,rounded:null,readonly:this.mobileMode},K=this.localizationService.toLanguageString(Pt,k[Pt]),M=this.localizationService.toLanguageString(we,k[we]),F=o.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:U,onBlur:O})=>o.createElement(o.Fragment,null,o.createElement("div",{id:this.props.id,ref:_=>{this._element=_},className:d.classNames("k-input","k-timepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-rounded-${d.kendoThemeMaps.roundedMap[t]||t}`]:t,[`k-input-${e}`]:e,["k-invalid"]:!y,["k-required"]:this.required,["k-disabled"]:this.props.disabled},u),onKeyDown:this.handleKeyDown,style:{width:f},onFocus:U,onBlur:O,onClick:this.mobileMode?this.handleIconClick:void 0},o.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...b}),o.createElement(L.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:J.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleIconClick,title:M,className:"k-input-button",rounded:null,"aria-label":K}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?o.createElement(ye,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:y,editorDisabled:this.props.disabled,children:F,style:{width:this.props.width}}):F}normalizeTime(i){return R(z,i)}setShow(i){const{onOpen:t,onClose:e}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&e&&e.call(void 0,{target:this}))}mergeTime(i){return this.value&&i?R(this.value,i):i}calculateMedia(i){for(let t of i)this.setState({windowWidth:t.target.clientWidth})}};let Ot=G;Ot.displayName="TimePicker",Ot.propTypes={className:n.string,cancelButton:n.bool,nowButton:n.bool,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])},Ot.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:nt,min:ct,popupSettings:{},tabIndex:0,steps:{},required:!1,validityStyles:!0,dateInput:ot,size:"medium",rounded:"medium",fillMode:"solid"};const Ai=d.createPropsContext(),Hi=d.withIdHOC(d.withPropsContext(Ai,Ot));Hi.displayName="KendoReactTimePicker",x.registerForLocalization(Ot);const Bi=2,qe=class extends o.Component{constructor(i){super(i),this._element=null,this.isActive=!1,this.focusActiveDate=()=>{if(!this._element)return;const t=this._element.querySelector("td.k-focus"),e=this._element.querySelector(".k-state-pending-focus");t&&t[0]&&t[0].classList.remove("k-focus"),e&&e.classList.add("k-focus"),this.isActive=!0},this.blurActiveDate=()=>{if(!this._element)return;const t=this._element.querySelector("td.k-focus");t&&t.classList.remove("k-focus"),this.isActive=!1},this.rotateSelectionRange=t=>{if(t.start===null||t.end===null)return t;const e=t.end<t.start;return{start:e?t.end:t.start,end:e?t.start:t.end}},this.handleDateChange=(t,e=!1)=>{const{onChange:s}=this.props;if(s){const a={syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:l.cloneDate(t.value),target:this,isTodayClick:e};s.call(void 0,a)}}}get element(){return this._element}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===C.month)}get min(){return this.props.min!==void 0?this.props.min:qe.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:qe.defaultProps.max}componentDidUpdate(){this.isActive&&this.focusActiveDate()}render(){const i=this.props.allowReverse?this.rotateSelectionRange(this.props.selectionRange):this.props.selectionRange,t=d.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":this.props.verticalView,"k-hstack":!this.props.verticalView,"k-calendar-monthview":this.props.activeView===C.month,"k-calendar-yearview":this.props.activeView===C.year,"k-calendar-decadeview":this.props.activeView===C.decade,"k-calendar-centuryview":this.props.activeView===C.century});return o.createElement("div",{ref:e=>{this._element=e},className:t},this.props.dates.map(e=>o.createElement("table",{className:"k-calendar-table k-content",key:e.getTime(),role:"grid"},o.createElement(Lt,{bus:this.props.bus,service:this.props.service,key:e.getTime(),direction:"horizontal",activeView:this.props.activeView,cellUID:this.props.cellUID,viewDate:e,min:this.min,max:this.max,focusedDate:this.props.focusedDate,selectionRange:i,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onCellEnter:this.props.onCellEnter,cell:this.props.cell,weekCell:this.props.weekCell}))))}};let Vt=qe;Vt.defaultProps={showWeekNumbers:!1,views:Bi,take:Bi,allowReverse:!0,min:it,max:st};const Re=(i=Q.defaultProps.min,t=Q.defaultProps.max,e)=>e instanceof Date&&!Array.isArray(e)&&A(l.getDate(e),i,t)?l.getDate(e):null,zi=(i=Q.defaultProps.min,t=Q.defaultProps.max,e)=>Array.isArray(e)?e.filter(s=>A(s,i,t)).map(s=>l.getDate(s)):null,qi=i=>typeof i=="object"&&!(i instanceof Date)&&i!==null&&!Array.isArray(i)?i:q,Ri=(i,t,e)=>i||t&&t[0]||e&&e.start,pn=(i,t)=>i.start===null&&t===null?"start":i.end===null?"end":"start",kt=class extends o.Component{constructor(i){super(i),this.dates=[],this.selectedDate=null,this.selectedMultiple=null,this.selectedRange=q,this._focusedDate=new Date,this.cellUID=this.props.id+"-cell-uid",this.activeRangeEnd="start",this._element=null,this.intl=null,this.localization=null,this.service=null,this.calendarViewList=null,this.isActive=!1,this.calculateFocusFromValue=!0,this.focus=()=>{this._element&&this._element.focus()},this.clampRange=c=>({start:c,end:null}),this.rangeWithFocused=(c,m)=>({start:c.start,end:c.end===null&&c.start!==null&&this.isActive?m:c.end}),this.generateRange=(c,m)=>{const{end:f,start:g}=m,w=m.start!==null&&c.getTime()<=m.start.getTime();return!this.props.allowReverse&&w?{start:c,end:this.selectedRange.start}:this.activeRange!=="end"?{start:c,end:f}:{start:g||this.selectedDate,end:c}},this.canNavigate=c=>{if(!this.service)return!1;const m=this.service.move(this.focusedDate,c);return this.min<=m&&m<=this.max||this.service.isInSameView(m,this.min)||this.service.isInSameView(m,this.max)},this.navigate=(c,m)=>{this.calculateFocusFromValue=!1;const f=this.move(c,m);this.setState({navigateDate:f,focusedDate:f})},this.move=(c,m)=>this.clampDate(this.service.move(m,c)),this.clampDate=c=>Y(c,this.min,this.max),this.shouldAutoCorrect=(c,m)=>{const{end:f,start:g}=m;return this.activeRange!=="end"?f!==null&&c>f:g!==null&&c<g},this.handleCellEnter=c=>{this.props.mode==="range"&&(this.calculateFocusFromValue=!1,this.setState({focusedDate:c}))},this.handleMouseDown=c=>{c.preventDefault()},this.handleClick=c=>{this._element&&this._element.focus({preventScroll:!0})},this.handleFocus=c=>{if(this.isActive=!0,!this.calendarViewList)return;this.calendarViewList.focusActiveDate();const{onFocus:m}=this.props;m&&m.call(void 0,c)},this.handleBlur=c=>{if(this.isActive=!1,!this.calendarViewList)return;this.calendarViewList.blurActiveDate();const{onBlur:m}=this.props;m&&m.call(void 0,c)},this.handleTodayClick=c=>{this.todayIsInRange&&this.handleDateChange(c)},this.handlePrevButtonClick=()=>{const c=D.PrevView;if(this.state.activeView>0&&this.focusedDate.getFullYear()>this.dates[0].getFullYear())this.navigate(c,this.move(c,this.focusedDate));else{const m=this.isInMonth(this.focusedDate,this.dates[1])?this.move(c,this.focusedDate):this.focusedDate;this.navigate(c,m)}},this.handleNextButtonClick=()=>{this.navigate(D.NextView,this.focusedDate)},this.handleKeyDown=c=>{const{keyCode:f,ctrlKey:g,metaKey:w}=c;if(f===84){const v=B();this.calculateFocusFromValue=!1,this.setState({focusedDate:v,navigateDate:v})}if((g||w)&&(f===d.Keys.left&&this.handlePrevButtonClick(),f===d.Keys.right&&this.handleNextButtonClick()),f===d.Keys.enter){const v={syntheticEvent:c,nativeEvent:c.nativeEvent,value:this.focusedDate,target:this};this.handleDateChange(v)}else{const v=Y(this.navigation.move(this.focusedDate,this.navigation.action(c),this.state.activeView,this.service,c),this.min,this.max);if(l.isEqualDate(this.focusedDate,v))return;this.dates&&this.service&&!this.service.isInArray(v,this.dates)&&this.setState({navigateDate:v}),this.calculateFocusFromValue=!1,this.setState({focusedDate:v})}c.preventDefault()},this.handleViewChange=({view:c})=>{this.calculateFocusFromValue=!1,this.setState(m=>({activeView:c,navigateDate:m.focusedDate}))},this.handleDateChange=c=>{const m=l.cloneDate(c.value),f=this.bus.canMoveDown(this.state.activeView);if(this.props.disabled)return;if(f)if(c.isTodayClick)this.bus.moveToBottom(this.state.activeView);else{this.bus.moveDown(this.state.activeView,c.syntheticEvent),this.setState({focusedDate:m,navigateDate:m});return}this.calculateFocusFromValue=!0;let g;switch(this.props.mode){case"single":g=l.cloneDate(c.value);break;case"multiple":if(Array.isArray(this.selectedMultiple)){const v=this.selectedMultiple.slice();let E=-1;v.forEach((V,N)=>{l.isEqualDate(V,c.value)&&(E=N)}),E!==-1?v.splice(E,1):v.push(l.cloneDate(c.value)),g=v.slice()}else this.selectedDate?g=[l.cloneDate(this.selectedDate),l.cloneDate(c.value)]:g=[l.cloneDate(c.value)];break;case"range":{g=this.selectedRange.start!==null&&this.selectedRange.end!==null&&this.activeRange==="start"?this.clampRange(c.value):this.generateRange(c.value,this.selectedRange),this.activeRangeEnd=this.activeRange!=="end"?"end":"start";break}default:g=l.cloneDate(c.value);break}this.valueDuringOnChange=g,c.isTodayClick&&this.setState({navigateDate:m}),this.setState({value:g,focusedDate:m}),this.valueDuringOnChange=g;const{onChange:w}=this.props;if(w){const v={syntheticEvent:c.syntheticEvent,nativeEvent:c.nativeEvent,value:g,target:this};w.call(void 0,v)}this.valueDuringOnChange=void 0};const t=i.value!==void 0?i.value:i.defaultValue||kt.defaultProps.defaultValue,e=Re(this.min,this.max,t),s=zi(this.min,this.max,t),a=qi(t),r=Ri(e,s,a),h=Yt(C[i.defaultActiveView],this.bottomView,this.topView),u=Y(i.focusedDate||r||B(),this.min,this.max);this.state={value:t,activeView:h,focusedDate:u,navigateDate:u},this.activeRangeEnd=pn(a,e),this.bus=new de(this.handleViewChange),this.navigation=new me(this.bus),this.calculateFocusFromValue=!1,this.lastView=h,this.lastViewsCount=this.props.views||Vt.defaultProps.views}get wrapperID(){return this.props.id+"-wrapper-id"}get isRtl(){return this.props.dir==="rtl"}get element(){return this._element}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get focusedDate(){return l.cloneDate(this._focusedDate)}get min(){return l.getDate(this.props.min!==void 0?this.props.min:kt.defaultProps.min)}get max(){return l.getDate(this.props.max!==void 0?this.props.max:kt.defaultProps.max)}get bottomView(){return C[this.props.bottomView!==void 0?this.props.bottomView:kt.defaultProps.bottomView]}get topView(){return C[this.props.topView!==void 0?this.props.topView:kt.defaultProps.topView]}get activeRange(){return this.props.activeRangeEnd!==void 0?this.props.activeRangeEnd:this.activeRangeEnd}get todayIsInRange(){return A(B(),l.getDate(this.min),l.getDate(this.max))}componentDidMount(){this.calculateFocusFromValue=!0}componentDidUpdate(){this.calendarViewList&&(this.isActive?this.calendarViewList.focusActiveDate:this.calendarViewList.blurActiveDate)();const i=Re(this.min,this.max,this.value);this.calculateFocusFromValue=!!(this.selectedDate&&i&&this.selectedDate.getTime()&&i.getTime()),this.lastView=this.state.activeView,this.lastViewsCount=this.props.views||Vt.defaultProps.views}render(){this.props._ref&&this.props._ref(this),this.intl=x.provideIntlService(this),this.localization=x.provideLocalizationService(this),this.bus.configure(this.bottomView,this.topView);const i=Yt(this.state.activeView,this.bottomView,this.topView);this.service=this.bus.service(i,this.intl),this.selectedDate=Re(this.min,this.max,this.value),this.selectedMultiple=zi(this.min,this.max,this.value),this.selectedRange=qi(this.value);const t=Ri(this.selectedDate,this.selectedMultiple,this.selectedRange);this._focusedDate=Y(this.calculateFocusFromValue&&t!==null?t:this.state.focusedDate,this.min,this.max);const e=d.classNames("k-widget k-calendar k-calendar-range",{"k-disabled":this.props.disabled},this.props.className),s=this.rangeWithFocused(this.selectedRange,this.focusedDate),a=this.localization.toLanguageString(pe,k[pe]),r=this.localization.toLanguageString(fe,k[fe]),h=!this.canNavigate(D.PrevView),u=!this.canNavigate(D.NextView),c={"aria-disabled":h},m={"aria-disabled":u},f=this.lastView!==i,g=this.dates&&this.isInMonth(this.state.navigateDate,this.dates[0]),w=this.lastViewsCount!==this.props.views;(!g||f||w)&&(this.dates=this.service.datesList(this.state.navigateDate,this.props.views||Vt.defaultProps.views));const v=l.cloneDate(this.dates&&this.dates[0]?this.dates[0]:B());return o.createElement("div",{ref:E=>{this._element=E},className:e,id:this.props.id||this.wrapperID,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.disabled?void 0:this.props.tabIndex,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,onClick:this.handleClick,onKeyDown:this.handleKeyDown,"aria-disabled":this.props.disabled,dir:this.props.dir},o.createElement(vt,{key:`.kendo.calendar.header.${v.getTime()}`,activeView:i,currentDate:v,min:this.min,max:this.max,rangeLength:this.props.views,bus:this.bus,service:this.service,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode,commands:o.createElement(o.Fragment,null,o.createElement(L.Button,{type:"button",className:"k-calendar-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?J.chevronRightIcon:J.chevronLeftIcon,fillMode:"flat",title:a,disabled:h,onClick:this.handlePrevButtonClick,...c}),o.createElement(It,{min:this.min,max:this.max,onClick:this.handleTodayClick,disabled:!this.todayIsInRange}),o.createElement(L.Button,{type:"button",className:"k-calendar-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?J.chevronLeftIcon:J.chevronRightIcon,fillMode:"flat",title:r,disabled:u,onClick:this.handleNextButtonClick,...m}))}),o.createElement(Vt,{ref:E=>{this.calendarViewList=E},dates:this.dates,activeView:i,focusedDate:this.focusedDate,min:this.min,max:this.max,bus:this.bus,service:this.service,selectionRange:s,value:this.selectedMultiple||this.selectedDate,cellUID:this.cellUID,views:this.props.views,onChange:this.handleDateChange,showWeekNumbers:this.props.weekNumber,onCellEnter:this.handleCellEnter,cell:this.props.cell,weekCell:this.props.weekCell,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode}))}isInMonth(i,t){return!!t&&l.firstDayOfMonth(t)<=i&&i<=l.lastDayOfMonth(t)}};let Q=kt;Q.displayName="MultiViewCalendar",Q.propTypes={activeRangeEnd:n.oneOf(["start","end"]),allowReverse:n.bool,bottomView:n.oneOf(["month","year","decade","century"]),className:n.string,defaultActiveView:n.oneOf(["month","year","decade","century"]),defaultValue:n.oneOfType([et(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:et(n.instanceOf(Date)),end:et(n.instanceOf(Date))})]),disabled:n.bool,focusedDate:n.instanceOf(Date),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),mode:n.oneOf(["single","multiple","range"]),onBlur:n.func,onChange:n.func,onFocus:n.func,tabIndex:n.number,topView:n.oneOf(["month","year","decade","century"]),value:n.oneOfType([et(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:et(n.instanceOf(Date).isRequired),end:et(n.instanceOf(Date).isRequired)})]),views:(i,t,e)=>{const s=i[t];return s!==void 0&&s<1?new Error(`Invalid prop '${t}' supplied to'${e}'. The '${t}' property cannot be less than 1'`):null},weekNumber:n.bool,dir:n.string},Q.defaultProps={disabled:!1,min:it,max:st,navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",tabIndex:0,bottomView:"month",views:2,allowReverse:!1};const Wi=d.createPropsContext(),We=d.withIdHOC(d.withPropsContext(Wi,Q));We.displayName="KendoReactMultiViewCalendar",x.registerForIntl(Q),x.registerForLocalization(Q);const Rt=class extends o.Component{constructor(i){super(i),this._element=null,this._calendar=null,this._startDateInput=o.createRef(),this._endDateInput=o.createRef(),this.shouldFocusDateInput=!1,this.shouldFocusCalendar=!1,this.focus=()=>{this.startDateInput&&this.startDateInput.focus()},this.setCalendarRef=t=>{this._calendar=t},this.focusCalendarElement=()=>{this._calendar&&this._calendar.element&&this._calendar.element.focus({preventScroll:!0})},this.calculateValue=(t,e)=>(t.value!==void 0?t.value:e.value)||q,this.calculateShow=(t,e)=>t.show!==void 0?t.show:e.show,this.renderCalendar=()=>{const t=this.value||q,e={min:this.min,max:this.max,allowReverse:this.props.allowReverse,mode:"range",focusedDate:this.props.focusedDate,disabled:this.props.disabled,className:this.mobileMode?"k-calendar-lg":"",mobileMode:this.mobileMode,...this.props.calendarSettings,value:t,dir:this.props.dir,onChange:this.handleCalendarChange};return this.props.calendar?o.createElement(this.props.calendar,{...e}):o.createElement(We,{...e,ref:this.setCalendarRef})},this.renderPopup=()=>{const t={popupClass:"k-daterangepicker-popup",animate:this._element!==null,anchor:this._element,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...this.props.popupSettings,show:this.show};return this.props.popup?o.createElement(this.props.popup,{...t},this.renderCalendar()):o.createElement(Wt.Popup,{...t},this.renderCalendar())},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,e={expand:this.show,onClose:s=>this.handleCancel(s),adaptiveTitle:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:this.localizationService.toLanguageString(De,k[De]),onCancel:this.handleCancel,applyText:this.localizationService.toLanguageString(Ie,k[Ie]),onApply:this.handleBlur}};return o.createElement(ne,{...e},o.createElement(ht.ActionSheetContent,{className:"!k-overflow-hidden"},o.createElement("div",{className:"k-scrollable-wrap"},this.renderCalendar())))},this.handleReverseClick=t=>{const e={start:this.value.end,end:this.value.start},s={syntheticEvent:t,nativeEvent:t.nativeEvent};this.handleChange(e,s)},this.handleReverseMouseDown=t=>{t.preventDefault()},this.handleFocus=t=>{clearTimeout(this.nextTickId),this.shouldFocusDateInput||this.mobileMode&&this.setState({currentValue:this.value});const{onFocus:e}=this.props;e&&e.call(void 0,t)},this.handleClick=()=>{this.shouldFocusDateInput||this.setShow(!0)},this.handleBlur=t=>{this.nextTick(()=>{this.setShow(!1)});const{onBlur:e}=this.props;e&&e.call(void 0,t)},this.handleCancel=t=>{this.nextTick(()=>{this.setShow(!1),this.setState({currentValue:q})});const{onCancel:e}=this.props;e&&e.call(void 0,t)},this.handleEndChange=t=>{const e={start:this.value.start,end:l.cloneDate(t.value||void 0)};this.handleChange(e,t)},this.handleStartChange=t=>{const e={start:l.cloneDate(t.value||void 0),end:this.value.end};this.handleChange(e,t)},this.extractRangeFromValue=t=>{if(!Array.isArray(t.value)&&!(t.value instanceof Date))return t.value||q;const e=Array.isArray(t.value)?t.value[0]:t.value;return{start:this.value.end!==null?e:this.value.start,end:this.value.start!==null?e:this.value.end}},this.handleCalendarChange=t=>{const e=this.extractRangeFromValue(t);this.handleChange(e,t)},this.handleKeyDown=t=>{const{keyCode:e,altKey:s}=t;e===d.Keys.esc?(t.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):s&&e===d.Keys.down?(t.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0),this.focusCalendarElement()):s&&e===d.Keys.up&&(t.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1))},this.handleChange=(t,e)=>{this.setState({value:t}),this.valueDuringOnChange=t;const{onChange:s}=this.props;if(s){const a={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:this.value,show:this.show,target:this};s.call(void 0,a)}this.valueDuringOnChange=void 0},d.validatePackage(ft),this.state={show:this.props.show||this.props.defaultShow||Rt.defaultProps.defaultShow,value:this.props.value||this.props.defaultValue||Rt.defaultProps.defaultValue,currentValue:q},this.nextTick=this.nextTick.bind(this),this.setShow=this.setShow.bind(this),this.focusCalendarElement=this.focusCalendarElement.bind(this),this.focusDateInputElement=this.focusDateInputElement.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get _startInputId(){return this.props.id+"-start-input-id"}get _endInputId(){return this.props.id+"-end-input-id"}get element(){return this._element}get startDateInput(){return this._startDateInput.current}get endDateInput(){return this._endDateInput.current}get calendar(){return this._calendar}get value(){return(this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value)||q}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get min(){return this.props.min!==void 0?this.props.min:Rt.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:Rt.defaultProps.max}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get localizationService(){return x.provideLocalizationService(this)}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ae&&this.props.adaptive)}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this.shouldFocusCalendar&&this.focusCalendarElement(),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;clearTimeout(this.nextTickId),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const i=this.value||q,t=this.mobileMode&&this.show?this.state.currentValue:i,e=(this.props.startDateInputSettings||{}).id||this._startInputId,s=(this.props.endDateInputSettings||{}).id||this._endInputId,a=d.classNames("k-daterangepicker",{"k-disabled":this.props.disabled},this.props.className),r=this.localizationService.toLanguageString(Gt,k[Gt]),h=this.localizationService.toLanguageString(Xt,k[Xt]),u=this.localizationService.toLanguageString(Jt,k[Jt]),c={disableSelection:this.mobileMode&&!0,label:r,format:this.props.format,min:this.min,max:this.max,id:this._startInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.startDateInputSettings,value:t.start,onChange:this.handleStartChange},m={disableSelection:this.mobileMode&&!0,label:h,format:this.props.format,min:this.min,max:this.max,id:this._endInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.endDateInputSettings,value:t.end,onChange:this.handleEndChange},f=o.createElement(L.Button,{type:"button",className:"k-select",fillMode:"flat",title:x.provideLocalizationService(this).toLanguageString(St,k[St]),onMouseDown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":e+" "+s,"aria-label":x.provideLocalizationService(this).toLanguageString(St,k[St])},o.createElement(d.IconWrap,{style:{transform:"rotate(90deg)"},name:"arrows-swap",icon:J.arrowsSwapIcon}));return o.createElement(o.Fragment,null,o.createElement("span",{ref:g=>{this._element=g},className:a,style:this.props.style,id:this.props.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.tabIndex,onFocus:this.handleFocus,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onBlur:this.mobileMode?void 0:this.handleBlur,dir:this.props.dir},this.props.startDateInput?o.createElement(this.props.startDateInput,{...c}):o.createElement(ot,{...c,ref:this._startDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),(this.props.allowReverse||this.props.calendarSettings&&this.props.calendarSettings.allowReverse)&&this.props.swapButton?f:u,this.props.endDateInput?o.createElement(this.props.endDateInput,{...m}):o.createElement(ot,{...m,ref:this._endDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup())}focusDateInputElement(){if(!document||!this.startDateInput||!this.startDateInput.element||!this.endDateInput||!this.endDateInput.element)return;const i=d.getActiveElement(document);(this.value.start===null||this.value.end!==null)&&i!==this.endDateInput.element?this.startDateInput.element.focus({preventScroll:!0}):i!==this.startDateInput.element&&this.endDateInput.element.focus({preventScroll:!0})}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}setShow(i){const{onOpen:t,onClose:e}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&e&&e.call(void 0,{target:this}))}calculateMedia(i){for(let t of i)this.setState({windowWidth:t.target.clientWidth})}};let Nt=Rt;Nt.displayName="DateRangePicker",Nt.propTypes={allowReverse:n.bool,calendarSettings:n.any,className:n.string,defaultShow:n.bool,defaultValue:n.shape({start:et(n.instanceOf(Date).isRequired),end:et(n.instanceOf(Date).isRequired)}),disabled:n.bool,endDateInputSettings:n.shape(lt.propTypes),focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),onBlur:n.func,onChange:n.func,onFocus:n.func,popupSettings:n.any,show:n.bool,startDateInputSettings:n.any,style:n.any,swapButton:n.any,tabIndex:n.number,dir:n.string,value:n.shape({start:et(n.instanceOf(Date).isRequired),end:et(n.instanceOf(Date).isRequired)})},Nt.defaultProps={allowReverse:!1,defaultShow:!1,defaultValue:q,disabled:!1,format:"d",max:st,min:it,swapButton:!1};const Ki=d.createPropsContext(),Ui=d.withIdHOC(d.withPropsContext(Ki,Nt));Ui.displayName="KendoReactDateRangePicker",x.registerForLocalization(Nt);class Ke extends o.Component{constructor(t){super(t),this._calendar=null,this._timePart=null,this._cancelButton=null,this._acceptButton=null,this._dateButtonRef=null,this._calendarWrap=null,this.shouldFocusPart=!1,this.focus=e=>{Promise.resolve().then(()=>{this.state.tab==="time"&&this._timePart&&this._timePart.focus(e);const s=this.calendarElement();this.state.tab==="date"&&s&&s.focus(e)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-widget.k-calendar"),this.move=e=>{if(e==="right"&&this.state.tab==="time"||e==="left"&&this.state.tab==="date")return;const s=e==="left"?"date":"time";this.shouldFocusPart=!0,this.setState({tab:s})},this.dateTimeFooter=()=>{const{cancelButton:e}=this.props,s=this.localizationService.toLanguageString(Ht,k[Ht]),a=this.localizationService.toLanguageString(Bt,k[Bt]);return o.createElement("div",{className:"k-datetime-footer k-actions k-actions-stretched"},e&&o.createElement(L.Button,{type:"button",ref:r=>{this._cancelButton=r},className:"k-time-cancel",onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:s,"aria-label":s},s),o.createElement(L.Button,{type:"button",themeColor:"primary",ref:r=>{this._acceptButton=r},className:"k-time-accept",disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:a,"aria-label":a},a))},this.handleReject=e=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||z});const s=this.mergeDate(this.props.value,this.props.value||z);if(this.props.onReject){const a={nativeEvent:e.nativeEvent,syntheticEvent:e,target:this,value:s};this.props.onReject.call(void 0,a)}},this.handleAccept=(e,s)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const a=this.mergeDate(this.state.dateValue,s||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:a,target:this})},this.handleNowClick=e=>{this.setState({timeValue:ut()}),this.handleAccept(e,ut())},this.handleCalendarValueChange=e=>{e.syntheticEvent.stopPropagation(),this.setState({dateValue:e.value,tab:"time"}),this.shouldFocusPart=!0},this.handleTimeListContainerChange=e=>{this.setState({timeValue:e})},this.handleDateClick=e=>{e.stopPropagation(),this.move("left")},this.handleTimeClick=e=>{e.stopPropagation(),this.move("right")},this.handleKeyDown=e=>{const{keyCode:s,altKey:a}=e;if(!this.props.disabled)switch(s){case d.Keys.enter:!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e);return;case d.Keys.left:if(!a)return;this.move("left");return;case d.Keys.right:if(!a)return;this.move("right");return;default:return}},this.handleCancelKeyDown=e=>{const{keyCode:s}=e;s===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&!this.hasDateValue&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=e=>{const{keyCode:s}=e;s===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=e=>{var r,h,u,c;const{keyCode:s,shiftKey:a}=e;a&&s===d.Keys.tab&&(e.stopPropagation(),this.hasDateValue?(c=(u=this._acceptButton)==null?void 0:u.element)==null||c.focus():(h=(r=this._cancelButton)==null?void 0:r.element)==null||h.focus()),s===d.Keys.enter&&(e.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=e=>{const{keyCode:s}=e;s===d.Keys.enter&&(e.stopPropagation(),this.move("right"))},this.handleTimePartMount=e=>{this.setState({timeValue:e})},this.state={tab:"date",dateValue:this.props.value,timeValue:this.props.value||z}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return this.state.dateValue!==null}get localizationService(){return x.provideLocalizationService(this)}componentDidUpdate(){this.shouldFocusPart&&this.focus({preventScroll:!0}),this.shouldFocusPart=!1}render(){const{disabled:t,min:e,max:s,weekNumber:a,focusedDate:r,format:h,mobileMode:u,footerActions:c}=this.props,m=d.classNames({"k-date-tab":this.state.tab==="date","k-time-tab":this.state.tab==="time","k-disabled":t},"k-datetime-wrap"),f=this.localizationService.toLanguageString(be,k[be]),g=this.localizationService.toLanguageString(Se,k[Se]),w={min:e,max:s,weekNumber:a,focusedDate:r,disabled:t||this.state.tab!=="date",value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:t||this.state.tab!=="date"?-1:void 0,mobileMode:u};return o.createElement("div",{onKeyDown:this.handleKeyDown,className:m,tabIndex:-1},o.createElement("div",{className:"k-datetime-buttongroup"},o.createElement(L.ButtonGroup,{width:"100%"},o.createElement(L.Button,{ref:v=>this._dateButtonRef=v,type:"button",selected:this.state.tab==="date",togglable:!0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},f),o.createElement(L.Button,{type:"button",selected:this.state.tab==="time",togglable:!0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},g))),o.createElement("div",{className:"k-datetime-selector"},o.createElement("div",{className:"k-datetime-calendar-wrap",ref:v=>this._calendarWrap=v},this.props.calendar?o.createElement(this.props.calendar,{...w}):o.createElement(te,{ref:v=>{this._calendar=v},...w})),o.createElement("div",{className:"k-datetime-time-wrap"},o.createElement("div",{className:u?"k-reset k-timeselector-lg k-timeselector":""},o.createElement(mt,{key:1,onNowClick:this.handleNowClick,disabled:t||this.state.tab!=="time",ref:v=>{this._timePart=v},min:this.minTime||ct,max:this.maxTime||nt,steps:this.props.steps,value:this.state.timeValue,format:h,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:u})))),c&&this.dateTimeFooter())}get minTime(){return this.props.minTime!==void 0?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return this.props.maxTime!==void 0?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(t,e){return l.isEqualDate(t,e||B())?t:null}hasActiveButton(){if(!this._acceptButton)return!1;const t=d.getActiveElement(document);return this._acceptButton&&t===this._acceptButton.element||this._cancelButton&&t===this._cancelButton.element}mergeTime(t,e){return t&&e?R(e,t):e}mergeDate(t,e){return t?R(t||B(),e):e}}Ke.defaultProps={footerActions:!0},x.registerForLocalization(Ke);const P=class extends o.Component{constructor(i){super(i),this._element=null,this._dateInput=o.createRef(),this._dateTimeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{const t=this.dateInputElement();t&&t.focus()},this.renderPicker=()=>{const{disabled:t,minTime:e,maxTime:s,format:a,calendar:r,cancelButton:h,weekNumber:u,focusedDate:c}=this.props;return o.createElement(Ke,{ref:m=>{this._dateTimeSelector=m},cancelButton:h,steps:this.props.steps,value:this.value,onChange:this.handleValueChange,onReject:this.handleReject,disabled:t,weekNumber:u,min:this.min,max:this.max,minTime:e,maxTime:s,focusedDate:c,format:a,calendar:r,mobileMode:this.mobileMode,footerActions:!this.mobileMode})},this.renderAdaptivePopup=()=>{const{windowWidth:t=0}=this.state,e=x.provideLocalizationService(this).toLanguageString(Ht,k[Ht]),s=x.provideLocalizationService(this).toLanguageString(Bt,k[Bt]),a={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:t,footer:{cancelText:e,onCancel:r=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleReject(r)},applyText:s,onApply:r=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleAccept(r)}}};return o.createElement(ne,{...a},o.createElement(ht.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderPicker()))},this.handleReject=()=>{this.shouldFocusDateInput=!0,this.setShow(!1)},this.handleValueChange=t=>{this.setState({value:l.cloneDate(t.value||void 0)}),this.valueDuringOnChange=t.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:e}=this.props;e&&e.call(void 0,{syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:this.value,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleDateIconClick=()=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=t=>{t.preventDefault()},this.handleKeyDown=t=>{const{altKey:e,keyCode:s}=t;if(s===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}e&&(s===d.Keys.up||s===d.Keys.down)&&(t.preventDefault(),t.stopPropagation(),this.shouldFocusDateInput=s===d.Keys.up,this.setShow(s===d.Keys.down))},this.dateInputElement=()=>this.dateInput&&this.dateInput.element||this.element&&this.element.querySelector(".k-dateinput > input.k-input-inner"),d.validatePackage(ft),this.state={value:this.props.defaultValue||P.defaultProps.defaultValue,show:this.props.defaultShow||P.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get value(){const i=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return i!==null?l.cloneDate(i):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=ae&&this.props.adaptive)}get min(){return this.props.min!==void 0?this.props.min:P.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:P.defaultProps.max}get validity(){const i=je(this.value,this.min,this.max)&&Ne(this.value,this.props.minTime||ct,this.props.maxTime||nt),t=this.props.validationMessage!==void 0,e=(!this.required||this.value!==null)&&i,s=this.props.valid!==void 0?this.props.valid:e;return{customError:t,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:s,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:P.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:P.defaultProps.required}get dateInputComp(){return this.props.dateInput||P.defaultProps.dateInput}componentDidMount(){var i;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){const i=this.dateInputElement();this._dateTimeSelector&&this.show&&!this.prevShow&&this._dateTimeSelector.focus({preventScroll:!0}),i&&!this.show&&this.shouldFocusDateInput&&i.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var i;clearTimeout(this.nextTickId),(i=this.document)!=null&&i.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:i=P.defaultProps.size,rounded:t=P.defaultProps.rounded,fillMode:e=P.defaultProps.fillMode,disabled:s,tabIndex:a,title:r,id:h,format:u,formatPlaceholder:c,min:m,max:f,className:g,width:w,name:v,validationMessage:E,required:V,validityStyles:N,minTime:S,maxTime:y,ariaLabelledBy:b,ariaDescribedBy:K,popup:M=Wt.Popup}=this.props,F=!this.validityStyles||this.validity.valid,U={id:h,ariaLabelledBy:b,ariaDescribedBy:K,format:u,formatPlaceholder:c,disabled:s,title:r,validityStyles:N,validationMessage:E,required:V,min:m,max:f,minTime:S,maxTime:y,name:v,tabIndex:this.show?-1:a,valid:this.validity.valid,value:this.value,onChange:this.handleValueChange,steps:this.props.steps,label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaExpanded:this.show,size:null,fillMode:null,rounded:null},O=o.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.handleBlur,onSyncFocus:this.props.onFocus,onSyncBlur:this.props.onBlur},({onFocus:_,onBlur:tt})=>o.createElement(o.Fragment,null,o.createElement("div",{ref:X=>{this._element=X},className:d.classNames("k-input","k-datetimepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-rounded-${d.kendoThemeMaps.roundedMap[t]||t}`]:t,[`k-input-${e}`]:e,"k-invalid":!F,"k-required":this.required,"k-disabled":this.props.disabled},g),onKeyDown:this.handleKeyDown,style:{width:w},onFocus:this.mobileMode?void 0:_,onBlur:tt,onClick:this.mobileMode?this.handleDateIconClick:void 0},o.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode,...U}),o.createElement(L.Button,{tabIndex:-1,type:"button",icon:"calendar",svgIcon:J.calendarIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleDateIconClick,title:x.provideLocalizationService(this).toLanguageString(Dt,k[Dt]),className:"k-input-button",rounded:null,"aria-label":x.provideLocalizationService(this).toLanguageString(Dt,k[Dt])}),o.createElement(M,{show:this.show,animate:this.element!==null,anchor:this.element,popupClass:"k-datetime-container k-reset",id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"}},!this.mobileMode&&this.renderPicker())),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?o.createElement(ye,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:F,editorDisabled:this.props.disabled,children:O,style:{width:this.props.width}}):O}setShow(i){const{onOpen:t,onClose:e}=this.props;this.show!==i&&(this.setState({show:i}),i&&t&&t.call(void 0,{target:this}),!i&&e&&e.call(void 0,{target:this}))}nextTick(i){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>i())}calculateMedia(i){for(const t of i)this.setState({windowWidth:t.target.clientWidth})}};let yt=P;yt.displayName="DateTimePicker",yt.propTypes={className:n.string,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),weekNumber:n.bool,width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,cancelButton:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])},yt.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"g",max:st,min:it,popupSettings:{},tabIndex:0,weekNumber:!1,required:!1,validityStyles:!0,cancelButton:!0,dateInput:ot,size:"medium",rounded:"medium",fillMode:"solid"};const Yi=d.createPropsContext(),$i=d.withIdHOC(d.withPropsContext(Yi,yt));$i.displayName="KendoReactDateTimePicker",x.registerForLocalization(yt),p.Action=D,p.BusViewService=de,p.Calendar=te,p.CalendarCell=$e,p.CalendarHeaderTitle=ai,p.CalendarNavigationItem=li,p.CalendarPropsContext=ci,p.CalendarViewEnum=C,p.CalendarWeekCell=Te,p.CalendarWithoutContext=rt,p.CenturyViewService=Xe,p.DOMService=ti,p.DateInput=ot,p.DateInputPropsContext=pi,p.DateInputWithoutContext=lt,p.DatePicker=bi,p.DatePickerPropsContext=wi,p.DatePickerWithoutContext=xt,p.DateRangePicker=Ui,p.DateRangePickerPropsContext=Ki,p.DateRangePickerWithoutContext=Nt,p.DateTimePicker=$i,p.DateTimePickerPropsContext=Yi,p.DateTimePickerWithoutContext=yt,p.DayPeriodService=Si,p.DecadeViewService=Je,p.EMPTY_SELECTIONRANGE=q,p.Header=vt,p.HorizontalViewList=Vt,p.HoursService=Ci,p.MAX_DATE=st,p.MAX_TIME=nt,p.MIN_DATE=it,p.MIN_TIME=ct,p.MinutesService=ki,p.MonthViewService=Qe,p.MultiViewCalendar=We,p.MultiViewCalendarPropsContext=Wi,p.MultiViewCalendarWithoutContext=Q,p.NavigationService=me,p.PickerWrap=gi,p.ScrollSyncService=ei,p.SecondsService=_i,p.TimeList=qt,p.TimePart=mt,p.TimePicker=Hi,p.TimePickerPropsContext=Ai,p.TimePickerWithoutContext=Ot,p.TimeSelector=Et,p.TodayCommand=It,p.ToggleButton=fi,p.ViewList=zt,p.Virtualization=gt,p.WeekNamesService=ii,p.YearViewService=Pe,p.dateInputsMessages=k,p.decreaseValue=bt,p.end=Xt,p.getNow=ut,p.getToday=B,p.increaseValue=wt,p.separator=Jt,p.start=Gt,p.swapStartEnd=St,p.today=jt,p.toggleCalendar=Zt,p.toggleDateTimeSelector=Dt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
package/index.js CHANGED
@@ -18,4 +18,4 @@
18
18
  `);return null},step:function(s,e,t){const i=s[e];if(i!==void 0&&i<=0)throw new Error(`
19
19
  Invalid prop '${e}' supplied to ${t}.
20
20
  ${e} cannot be less than 1.
21
- `);return null},value:n.instanceOf(Date),smoothScroll:n.bool,show:n.bool};Be.defaultProps={boundRange:!1,max:oe,min:L,step:1,smoothScroll:!0};k.registerForIntl(Be);const mt=new RegExp(`${j.hour}|${j.minute}|${j.second}|${j.dayperiod}|literal`),he=class extends l.Component{constructor(s){super(s),this._element=null,this._nowButton=null,this.dateFormatParts=[],this.timeLists=[],this.focus=(e,t)=>{Promise.resolve().then(()=>{t&&this._nowButton&&this._nowButton.element&&this._nowButton.element.focus();const i=this.timeLists[0];!t&&this.state.activeListIndex===-1&&!this.hasActiveButton()&&i&&i.element&&i.focus(e)})},this.timeFormatReducer=(e,t)=>e+t.pattern,this.timeFormatFilter=(e,t,i)=>{const a=t>=1&&i[t-1];return a&&a&&e.type==="literal"?mt.test(a.type||""):mt.test(e.type||"")},this.focusList=e=>{this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(t=>e===1?t.next:t.prev).map(t=>t&&t.element&&t.element.focus({preventScroll:!0}))},this.listReducer=(e,t,i,a)=>e.length||t.props.id!==this.state.activeListIndex?e:[{next:a[i+1]||t,prev:a[i-1]||t}],this.showNowButton=()=>!this.hasSteps()&&this.props.nowButton&&_t(ue(),this.min,this.max),this.handleKeyDown=e=>{const{keyCode:t}=e;switch(t){case d.Keys.left:e.preventDefault(),this.focusList(0);return;case d.Keys.right:e.preventDefault(),this.focusList(1);return;default:return}},this.handleListBlur=()=>{this.nextTick(()=>{this.setState({activeListIndex:-1})})},this.handleListFocus=e=>{clearTimeout(this.nextTickId),this.setState({activeListIndex:e})},this.handleChange=e=>{const{onChange:t}=this.props;t&&t.call(void 0,e)},this.snapTime=Ut(Kt(this.props.steps,this.props.min||he.defaultProps.min)),this.state={activeListIndex:-1},this.hasActiveButton=this.hasActiveButton.bind(this)}get element(){return this._element}get value(){return Ki(this.snapTime(r.cloneDate(this.props.value||L)),this.min,this.max)}get intl(){return k.provideIntlService(this)}get min(){return this.snapTime(this.props.min||he.defaultProps.min)}get max(){return this.snapTime(this.props.max||he.defaultProps.max)}get steps(){return this.props.steps||he.defaultProps.steps}get boundRange(){return this.props.boundRange!==void 0?this.props.boundRange:he.defaultProps.boundRange}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidMount(){const{onMount:s}=this.props;s&&s.call(void 0,this.value)}render(){const{format:s,smoothScroll:e,onNowClick:t,className:i,disabled:a,mobileMode:o,show:h,onNowKeyDown:u}=this.props;this.snapTime=Ut(Kt(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(s||he.defaultProps.format).filter(this.timeFormatFilter);const c=d.classNames({"k-disabled":a,"k-time-part":o},i);this.timeLists=[];const p=k.provideLocalizationService(this),m=p.toLanguageString(Dt,M[Dt]);return l.createElement("div",{className:c},l.createElement("div",{className:"k-time-header"},l.createElement("span",{className:"k-title"},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&l.createElement(N.Button,{type:"button",ref:f=>{this._nowButton=f},className:"k-time-now",fillMode:"flat",themeColor:"primary",title:m,onKeyDown:u,"aria-label":m,onClick:t,tabIndex:a?-1:0},p.toLanguageString(wt,M[wt]))),l.createElement("div",{className:"k-time-list-container",onKeyDown:this.handleKeyDown},l.createElement("span",{className:"k-time-highlight"}),this.dateFormatParts.map((f,v)=>f.type!=="literal"?l.createElement("div",{key:v,className:d.classNames("k-time-list-wrapper",{"k-focus":v===this.state.activeListIndex}),role:"presentation",tabIndex:-1},l.createElement("span",{className:"k-title",onMouseDown:g=>{g.preventDefault()}},this.intl.dateFieldName(f)),l.createElement(Be,{min:this.min,max:this.max,boundRange:this.boundRange,part:f,step:f.type?this.steps[f.type]:1,smoothScroll:e,ref:g=>{g&&this.timeLists.push(g)},id:v,onFocus:()=>{this.handleListFocus(v)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.value,disabled:a,show:h,mobileMode:o})):l.createElement("div",{key:v,className:"k-time-separator"},f.pattern))))}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}hasActiveButton(){const s=d.getActiveElement(document);return this._nowButton&&s===this._nowButton.element}hasSteps(){const s=Object.keys(this.steps);return s.length!==s.reduce((e,t)=>e+this.steps[t],0)}};let pe=he;pe.propTypes={cancelButton:n.bool,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool};pe.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:de,max:oe,steps:{},boundRange:!1};k.registerForIntl(pe);k.registerForLocalization(pe);const Mt=class extends l.Component{constructor(s){super(s),this._element=null,this._cancelButton=null,this._acceptButton=null,this.timePart=null,this.focusActiveList=()=>{this.timePart&&this.timePart.focus({preventScroll:!0})},this.handleKeyDown=e=>{const{keyCode:t}=e;switch(t){case d.Keys.enter:this.hasActiveButton()||this.handleAccept(e);return;default:return}},this.revertToNowButton=e=>{const{keyCode:t,shiftKey:i}=e;!i&&t===d.Keys.tab&&(e.preventDefault(),this.props.nowButton!==!1?this.timePart&&this.timePart.focus({preventScroll:!0},!0):this.timePart&&this.timePart.focus({preventScroll:!0}))},this.handleNowKeyDown=e=>{var a;const{keyCode:t,shiftKey:i}=e;i&&t===d.Keys.tab?(e.preventDefault(),this._acceptButton&&((a=this._acceptButton.element)==null||a.focus({preventScroll:!0}))):t===d.Keys.enter&&(e.stopPropagation(),this.handleNowClick(e))},this.handleAccept=e=>{const t=this.mergeValue(r.cloneDate(this.value||ue()),this.timePart?this.timePart.value:this.current);this.setState({value:t}),this.valueDuringOnChange=t;const{onChange:i}=this.props;i&&i.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleReject=e=>{this.setState({current:this.value});const{onReject:t}=this.props;t&&t.call(void 0,e)},this.handleNowClick=e=>{const t=this.mergeValue(r.cloneDate(this.value||ue()),ue());this.setState({current:t,value:t}),this.valueDuringOnChange=t;const{onChange:i}=this.props;i&&i.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleChange=e=>{this.setState({current:e});const{handleTimeChange:t}=this.props;t&&t.call(void 0,{time:e})},this.dateFormatParts=this.intl.splitDateFormat(this.props.format||Mt.defaultProps.format),this.mergeValue=Wi(qi(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.state={current:this.props.value||L,value:this.props.value||Mt.defaultProps.value}}get element(){return this._element}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?r.cloneDate(s):null}get intl(){return k.provideIntlService(this)}get current(){return this.state.current!==null?r.cloneDate(this.state.current):null}componentWillUnmount(){clearTimeout(this.nextTickId)}render(){const{format:s,cancelButton:e,disabled:t,tabIndex:i,className:a,smoothScroll:o,min:h,max:u,boundRange:c,nowButton:p,steps:m,show:f,mobileMode:v}=this.props,g=k.provideLocalizationService(this),C=g.toLanguageString(Je,M[Je]),I=g.toLanguageString(Ne,M[Ne]);return l.createElement("div",{ref:T=>{this._element=T},tabIndex:t?void 0:i||0,className:d.classNames("k-timeselector",a,{"k-disabled":t}),onKeyDown:this.handleKeyDown},l.createElement(pe,{ref:T=>{this.timePart=T},value:this.current,onChange:this.handleChange,onNowClick:this.handleNowClick,format:s,smoothScroll:o,min:h,max:u,boundRange:c,disabled:t,nowButton:p,steps:m,show:f,mobileMode:v,onNowKeyDown:this.handleNowKeyDown}),this.props.footer&&l.createElement("div",{className:"k-time-footer k-actions k-actions-stretched"},e&&l.createElement(N.Button,{type:"button",ref:T=>{this._cancelButton=T},className:"k-time-cancel",onClick:this.handleReject,title:C,"aria-label":C},C),l.createElement(N.Button,{type:"button",ref:T=>{this._acceptButton=T},className:"k-time-accept",themeColor:"primary",onClick:this.handleAccept,onKeyDown:this.revertToNowButton,title:I,"aria-label":I},I)))}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}hasActiveButton(){if(!this._acceptButton||!this._acceptButton.element)return!1;const s=d.getActiveElement(document);return this._acceptButton&&s===this._acceptButton.element||this._cancelButton&&s===this._cancelButton.element}};let Te=Mt;Te.propTypes={cancelButton:n.bool,className:n.string,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool};Te.defaultProps={value:null,disabled:!1,cancelButton:!0,format:"t",min:de,max:oe,boundRange:!1,footer:!0};k.registerForIntl(Te);k.registerForLocalization(Te);const $=class extends l.Component{constructor(s){super(s),this._element=null,this._dateInput=l.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:e,cancelButton:t,nowButton:i,disabled:a,format:o,steps:h}=this.props;return l.createElement(Te,{ref:this.setTimeSelectorRef,className:this.mobileMode?"k-reset k-timeselector-lg":"",mobileMode:this.mobileMode,show:this.show,cancelButton:t,disabled:a,nowButton:i,format:o,min:this.min,max:this.max,steps:h,smoothScroll:e,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject})},this.renderPopup=()=>{const{popupClass:e,...t}=this.popupSettings,i=d.classNames("k-group k-reset",e),a={popupClass:"k-timepicker-popup",show:this.show,animate:this.element!==null,anchor:this.element,className:i,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...t};return this.props.popup?l.createElement(this.props.popup,{...a},this.renderTimeSelector()):l.createElement(Qe.Popup,{...a},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(qe,M[Je]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(Ne,M[Ne]),onApply:i=>this.handleValueChange(i)}};return l.createElement(st,{...t},l.createElement(ce.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderTimeSelector()))},this.setTimeSelectorRef=e=>{this._timeSelector=e},this.nextValue=(e,t)=>e.value!==void 0?e.value:t.value,this.nextShow=(e,t)=>e.show!==void 0?e.show:t.show,this.handleInputValueChange=e=>{const t=this.mergeTime(e.value);this.handleValueChange({...e,value:t})},this.handleTimeChange=e=>{this.setState({candidate:e.time})},this.handleValueChange=e=>{this.setState({value:r.cloneDate(e.value||this.state.candidate)}),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0;const{onChange:t}=this.props,i=this.value||this.state.candidate;t&&t.call(void 0,{syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:i,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleValueReject=e=>{this.setShow(!1)},this.handleIconClick=e=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=e=>{e.preventDefault()},this.handleKeyDown=e=>{const{altKey:t,keyCode:i}=e;if(i===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}t&&(i===d.Keys.up||i===d.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===d.Keys.up,this.setShow(i===d.Keys.down))},d.validatePackage(Se),this.state={value:this.props.defaultValue||$.defaultProps.defaultValue,show:this.props.defaultShow||$.defaultProps.defaultShow,focused:!1,candidate:null},this.normalizeTime=this.normalizeTime.bind(this),this.setShow=this.setShow.bind(this),this.mergeTime=this.mergeTime.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get timeSelector(){return this._timeSelector}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?r.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const s=this.value&&this.normalizeTime(this.value),e=this.normalizeTime(this.min),t=this.normalizeTime(this.max),i=Ui(s,e,t),a=this.props.validationMessage!==void 0,o=(!this.required||this.value!==null)&&i,h=this.props.valid!==void 0?this.props.valid:o;return{customError:a,rangeOverflow:$i(s,t),rangeUnderflow:Yi(s,e),valid:h,valueMissing:this.value===null}}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=it&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:$.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:$.defaultProps.required}get popupSettings(){return this.props.popupSettings||$.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:$.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:$.defaultProps.max}get dateInputComp(){return this.props.dateInput||$.defaultProps.dateInput}get localizationService(){return k.provideLocalizationService(this)}componentDidMount(){var s;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow?this._timeSelector.focusActiveList():this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:s=$.defaultProps.size,rounded:e=$.defaultProps.rounded,fillMode:t=$.defaultProps.fillMode,disabled:i,tabIndex:a,title:o,id:h,className:u,format:c,formatPlaceholder:p,width:m,name:f,steps:v,validationMessage:g,required:C,validityStyles:I,ariaLabelledBy:T,ariaDescribedBy:D}=this.props,E=!this.validityStyles||this.validity.valid,w={disabled:i,format:c,formatPlaceholder:p,id:h,ariaLabelledBy:T,ariaDescribedBy:D,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:f,onChange:this.handleInputValueChange,required:C,steps:v,tabIndex:this.show?-1:a,title:o,valid:this.validity.valid,validationMessage:g,validityStyles:I,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,size:null,fillMode:null,rounded:null,readonly:this.mobileMode},A=this.localizationService.toLanguageString(qe,M[qe]),O=this.localizationService.toLanguageString(bt,M[bt]),P=l.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:H,onBlur:x})=>l.createElement(l.Fragment,null,l.createElement("div",{id:this.props.id,ref:V=>{this._element=V},className:d.classNames("k-input","k-timepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${d.kendoThemeMaps.roundedMap[e]||e}`]:e,[`k-input-${t}`]:t,["k-invalid"]:!E,["k-required"]:this.required,["k-disabled"]:this.props.disabled},u),onKeyDown:this.handleKeyDown,style:{width:m},onFocus:H,onBlur:x,onClick:this.mobileMode?this.handleIconClick:void 0},l.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...w}),l.createElement(N.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:J.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleIconClick,title:O,className:"k-input-button",rounded:null,"aria-label":A}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?l.createElement(Ft,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:E,editorDisabled:this.props.disabled,children:P,style:{width:this.props.width}}):P}normalizeTime(s){return q(L,s)}setShow(s){const{onOpen:e,onClose:t}=this.props;this.show!==s&&(this.setState({show:s}),s&&e&&e.call(void 0,{target:this}),!s&&t&&t.call(void 0,{target:this}))}mergeTime(s){return this.value&&s?q(this.value,s):s}calculateMedia(s){for(let e of s)this.setState({windowWidth:e.target.clientWidth})}};let Ee=$;Ee.displayName="TimePicker";Ee.propTypes={className:n.string,cancelButton:n.bool,nowButton:n.bool,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])};Ee.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:oe,min:de,popupSettings:{},tabIndex:0,steps:{},required:!1,validityStyles:!0,dateInput:ae,size:"medium",rounded:"medium",fillMode:"solid"};const Ls=d.createPropsContext(),Bs=d.withIdHOC(d.withPropsContext(Ls,Ee));Bs.displayName="KendoReactTimePicker";k.registerForLocalization(Ee);const Jt=2,Tt=class extends l.Component{constructor(s){super(s),this._element=null,this.isActive=!1,this.focusActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus"),t=this._element.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),this.isActive=!0},this.blurActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),this.isActive=!1},this.rotateSelectionRange=e=>{if(e.start===null||e.end===null)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}},this.handleDateChange=(e,t=!1)=>{const{onChange:i}=this.props;if(i){const a={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:r.cloneDate(e.value),target:this,isTodayClick:t};i.call(void 0,a)}}}get element(){return this._element}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===S.month)}get min(){return this.props.min!==void 0?this.props.min:Tt.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:Tt.defaultProps.max}componentDidUpdate(){this.isActive&&this.focusActiveDate()}render(){const s=this.props.allowReverse?this.rotateSelectionRange(this.props.selectionRange):this.props.selectionRange,e=d.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":this.props.verticalView,"k-hstack":!this.props.verticalView,"k-calendar-monthview":this.props.activeView===S.month,"k-calendar-yearview":this.props.activeView===S.year,"k-calendar-decadeview":this.props.activeView===S.decade,"k-calendar-centuryview":this.props.activeView===S.century});return l.createElement("div",{ref:t=>{this._element=t},className:e},this.props.dates.map(t=>l.createElement("table",{className:"k-calendar-table k-content",key:t.getTime(),role:"grid"},l.createElement(Fe,{bus:this.props.bus,service:this.props.service,key:t.getTime(),direction:"horizontal",activeView:this.props.activeView,cellUID:this.props.cellUID,viewDate:t,min:this.min,max:this.max,focusedDate:this.props.focusedDate,selectionRange:s,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onCellEnter:this.props.onCellEnter,cell:this.props.cell,weekCell:this.props.weekCell}))))}};let ke=Tt;ke.defaultProps={showWeekNumbers:!1,views:Jt,take:Jt,allowReverse:!0,min:te,max:se};const ft=(s=Q.defaultProps.min,e=Q.defaultProps.max,t)=>t instanceof Date&&!Array.isArray(t)&&_(r.getDate(t),s,e)?r.getDate(t):null,Qt=(s=Q.defaultProps.min,e=Q.defaultProps.max,t)=>Array.isArray(t)?t.filter(i=>_(i,s,e)).map(i=>r.getDate(i)):null,es=s=>typeof s=="object"&&!(s instanceof Date)&&s!==null&&!Array.isArray(s)?s:B,ts=(s,e,t)=>s||e&&e[0]||t&&t.start,vn=(s,e)=>s.start===null&&e===null?"start":s.end===null?"end":"start",ve=class extends l.Component{constructor(s){super(s),this.dates=[],this.selectedDate=null,this.selectedMultiple=null,this.selectedRange=B,this._focusedDate=new Date,this.cellUID=this.props.id+"-cell-uid",this.activeRangeEnd="start",this._element=null,this.intl=null,this.localization=null,this.service=null,this.calendarViewList=null,this.isActive=!1,this.calculateFocusFromValue=!0,this.focus=()=>{this._element&&this._element.focus()},this.clampRange=c=>({start:c,end:null}),this.rangeWithFocused=(c,p)=>({start:c.start,end:c.end===null&&c.start!==null&&this.isActive?p:c.end}),this.generateRange=(c,p)=>{const{end:m,start:f}=p,v=p.start!==null&&c.getTime()<=p.start.getTime();return!this.props.allowReverse&&v?{start:c,end:this.selectedRange.start}:this.activeRange!=="end"?{start:c,end:m}:{start:f||this.selectedDate,end:c}},this.canNavigate=c=>{if(!this.service)return!1;const p=this.service.move(this.focusedDate,c);return this.min<=p&&p<=this.max||this.service.isInSameView(p,this.min)||this.service.isInSameView(p,this.max)},this.navigate=(c,p)=>{this.calculateFocusFromValue=!1;const m=this.move(c,p);this.setState({navigateDate:m,focusedDate:m})},this.move=(c,p)=>this.clampDate(this.service.move(p,c)),this.clampDate=c=>K(c,this.min,this.max),this.shouldAutoCorrect=(c,p)=>{const{end:m,start:f}=p;return this.activeRange!=="end"?m!==null&&c>m:f!==null&&c<f},this.handleCellEnter=c=>{this.props.mode==="range"&&(this.calculateFocusFromValue=!1,this.setState({focusedDate:c}))},this.handleMouseDown=c=>{c.preventDefault()},this.handleClick=c=>{this._element&&this._element.focus({preventScroll:!0})},this.handleFocus=c=>{if(this.isActive=!0,!this.calendarViewList)return;this.calendarViewList.focusActiveDate();const{onFocus:p}=this.props;p&&p.call(void 0,c)},this.handleBlur=c=>{if(this.isActive=!1,!this.calendarViewList)return;this.calendarViewList.blurActiveDate();const{onBlur:p}=this.props;p&&p.call(void 0,c)},this.handleTodayClick=c=>{this.todayIsInRange&&this.handleDateChange(c)},this.handlePrevButtonClick=()=>{const c=b.PrevView;if(this.state.activeView>0&&this.focusedDate.getFullYear()>this.dates[0].getFullYear())this.navigate(c,this.move(c,this.focusedDate));else{const p=this.isInMonth(this.focusedDate,this.dates[1])?this.move(c,this.focusedDate):this.focusedDate;this.navigate(c,p)}},this.handleNextButtonClick=()=>{this.navigate(b.NextView,this.focusedDate)},this.handleKeyDown=c=>{const{keyCode:m,ctrlKey:f,metaKey:v}=c;if(m===84){const g=F();this.calculateFocusFromValue=!1,this.setState({focusedDate:g,navigateDate:g})}if((f||v)&&(m===d.Keys.left&&this.handlePrevButtonClick(),m===d.Keys.right&&this.handleNextButtonClick()),m===d.Keys.enter){const g={syntheticEvent:c,nativeEvent:c.nativeEvent,value:this.focusedDate,target:this};this.handleDateChange(g)}else{const g=K(this.navigation.move(this.focusedDate,this.navigation.action(c),this.state.activeView,this.service,c),this.min,this.max);if(r.isEqualDate(this.focusedDate,g))return;this.dates&&this.service&&!this.service.isInArray(g,this.dates)&&this.setState({navigateDate:g}),this.calculateFocusFromValue=!1,this.setState({focusedDate:g})}c.preventDefault()},this.handleViewChange=({view:c})=>{this.calculateFocusFromValue=!1,this.setState(p=>({activeView:c,navigateDate:p.focusedDate}))},this.handleDateChange=c=>{const p=r.cloneDate(c.value),m=this.bus.canMoveDown(this.state.activeView);if(this.props.disabled)return;if(m)if(c.isTodayClick)this.bus.moveToBottom(this.state.activeView);else{this.bus.moveDown(this.state.activeView,c.syntheticEvent),this.setState({focusedDate:p});return}this.calculateFocusFromValue=!0;let f;switch(this.props.mode){case"single":f=r.cloneDate(c.value);break;case"multiple":if(Array.isArray(this.selectedMultiple)){const g=this.selectedMultiple.slice();let C=-1;g.forEach((I,T)=>{r.isEqualDate(I,c.value)&&(C=T)}),C!==-1?g.splice(C,1):g.push(r.cloneDate(c.value)),f=g.slice()}else this.selectedDate?f=[r.cloneDate(this.selectedDate),r.cloneDate(c.value)]:f=[r.cloneDate(c.value)];break;case"range":{f=this.selectedRange.start!==null&&this.selectedRange.end!==null&&this.activeRange==="start"?this.clampRange(c.value):this.generateRange(c.value,this.selectedRange),this.activeRangeEnd=this.activeRange!=="end"?"end":"start";break}default:f=r.cloneDate(c.value);break}this.valueDuringOnChange=f,c.isTodayClick&&this.setState({navigateDate:p}),this.setState({value:f,focusedDate:p}),this.valueDuringOnChange=f;const{onChange:v}=this.props;if(v){const g={syntheticEvent:c.syntheticEvent,nativeEvent:c.nativeEvent,value:f,target:this};v.call(void 0,g)}this.valueDuringOnChange=void 0};const e=s.value!==void 0?s.value:s.defaultValue||ve.defaultProps.defaultValue,t=ft(this.min,this.max,e),i=Qt(this.min,this.max,e),a=es(e),o=ts(t,i,a),h=Ye(S[s.defaultActiveView],this.bottomView,this.topView),u=K(s.focusedDate||o||F(),this.min,this.max);this.state={value:e,activeView:h,focusedDate:u,navigateDate:u},this.activeRangeEnd=vn(a,t),this.bus=new Et(this.handleViewChange),this.navigation=new Ot(this.bus),this.calculateFocusFromValue=!1,this.lastView=h,this.lastViewsCount=this.props.views||ke.defaultProps.views}get wrapperID(){return this.props.id+"-wrapper-id"}get isRtl(){return this.props.dir==="rtl"}get element(){return this._element}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get focusedDate(){return r.cloneDate(this._focusedDate)}get min(){return r.getDate(this.props.min!==void 0?this.props.min:ve.defaultProps.min)}get max(){return r.getDate(this.props.max!==void 0?this.props.max:ve.defaultProps.max)}get bottomView(){return S[this.props.bottomView!==void 0?this.props.bottomView:ve.defaultProps.bottomView]}get topView(){return S[this.props.topView!==void 0?this.props.topView:ve.defaultProps.topView]}get activeRange(){return this.props.activeRangeEnd!==void 0?this.props.activeRangeEnd:this.activeRangeEnd}get todayIsInRange(){return _(F(),r.getDate(this.min),r.getDate(this.max))}componentDidMount(){this.calculateFocusFromValue=!0}componentDidUpdate(){this.calendarViewList&&(this.isActive?this.calendarViewList.focusActiveDate:this.calendarViewList.blurActiveDate)();const s=ft(this.min,this.max,this.value);this.calculateFocusFromValue=!!(this.selectedDate&&s&&this.selectedDate.getTime()&&s.getTime()),this.lastView=this.state.activeView,this.lastViewsCount=this.props.views||ke.defaultProps.views}render(){this.props._ref&&this.props._ref(this),this.intl=k.provideIntlService(this),this.localization=k.provideLocalizationService(this),this.bus.configure(this.bottomView,this.topView);const s=Ye(this.state.activeView,this.bottomView,this.topView);this.service=this.bus.service(s,this.intl),this.selectedDate=ft(this.min,this.max,this.value),this.selectedMultiple=Qt(this.min,this.max,this.value),this.selectedRange=es(this.value);const e=ts(this.selectedDate,this.selectedMultiple,this.selectedRange);this._focusedDate=K(this.calculateFocusFromValue&&e!==null?e:this.state.focusedDate,this.min,this.max);const t=d.classNames("k-widget k-calendar k-calendar-range",{"k-disabled":this.props.disabled},this.props.className),i=this.rangeWithFocused(this.selectedRange,this.focusedDate),a=this.localization.toLanguageString(gt,M[gt]),o=this.localization.toLanguageString(vt,M[vt]),h=!this.canNavigate(b.PrevView),u=!this.canNavigate(b.NextView),c={"aria-disabled":h},p={"aria-disabled":u},m=this.lastView!==s,f=this.dates&&this.isInMonth(this.state.navigateDate,this.dates[0]),v=this.lastViewsCount!==this.props.views;(!f||m||v)&&(this.dates=this.service.datesList(this.state.navigateDate,this.props.views||ke.defaultProps.views));const g=r.cloneDate(this.dates&&this.dates[0]?this.dates[0]:F());return l.createElement("div",{ref:C=>{this._element=C},className:t,id:this.props.id||this.wrapperID,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.disabled?void 0:this.props.tabIndex,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,onClick:this.handleClick,onKeyDown:this.handleKeyDown,"aria-disabled":this.props.disabled,dir:this.props.dir},l.createElement(xe,{key:`.kendo.calendar.header.${g.getTime()}`,activeView:s,currentDate:g,min:this.min,max:this.max,rangeLength:this.props.views,bus:this.bus,service:this.service,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode,commands:l.createElement(l.Fragment,null,l.createElement(N.Button,{type:"button",className:"k-calendar-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?J.chevronRightIcon:J.chevronLeftIcon,fillMode:"flat",title:a,disabled:h,onClick:this.handlePrevButtonClick,...c}),l.createElement(Ie,{min:this.min,max:this.max,onClick:this.handleTodayClick,disabled:!this.todayIsInRange}),l.createElement(N.Button,{type:"button",className:"k-calendar-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?J.chevronLeftIcon:J.chevronRightIcon,fillMode:"flat",title:o,disabled:u,onClick:this.handleNextButtonClick,...p}))}),l.createElement(ke,{ref:C=>{this.calendarViewList=C},dates:this.dates,activeView:s,focusedDate:this.focusedDate,min:this.min,max:this.max,bus:this.bus,service:this.service,selectionRange:i,value:this.selectedMultiple||this.selectedDate,cellUID:this.cellUID,views:this.props.views,onChange:this.handleDateChange,showWeekNumbers:this.props.weekNumber,onCellEnter:this.handleCellEnter,cell:this.props.cell,weekCell:this.props.weekCell,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode}))}isInMonth(s,e){return!!e&&r.firstDayOfMonth(e)<=s&&s<=r.lastDayOfMonth(e)}};let Q=ve;Q.displayName="MultiViewCalendar";Q.propTypes={activeRangeEnd:n.oneOf(["start","end"]),allowReverse:n.bool,bottomView:n.oneOf(["month","year","decade","century"]),className:n.string,defaultActiveView:n.oneOf(["month","year","decade","century"]),defaultValue:n.oneOfType([ee(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:ee(n.instanceOf(Date)),end:ee(n.instanceOf(Date))})]),disabled:n.bool,focusedDate:n.instanceOf(Date),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),mode:n.oneOf(["single","multiple","range"]),onBlur:n.func,onChange:n.func,onFocus:n.func,tabIndex:n.number,topView:n.oneOf(["month","year","decade","century"]),value:n.oneOfType([ee(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:ee(n.instanceOf(Date).isRequired),end:ee(n.instanceOf(Date).isRequired)})]),views:(s,e,t)=>{const i=s[e];return i!==void 0&&i<1?new Error(`Invalid prop '${e}' supplied to'${t}'. The '${e}' property cannot be less than 1'`):null},weekNumber:n.bool,dir:n.string};Q.defaultProps={disabled:!1,min:te,max:se,navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",tabIndex:0,bottomView:"month",views:2,allowReverse:!1};const As=d.createPropsContext(),Ht=d.withIdHOC(d.withPropsContext(As,Q));Ht.displayName="KendoReactMultiViewCalendar";k.registerForIntl(Q);k.registerForLocalization(Q);const Pe=class extends l.Component{constructor(s){super(s),this._element=null,this._calendar=null,this._startDateInput=l.createRef(),this._endDateInput=l.createRef(),this.shouldFocusDateInput=!1,this.shouldFocusCalendar=!1,this.focus=()=>{this.startDateInput&&this.startDateInput.focus()},this.setCalendarRef=e=>{this._calendar=e},this.focusCalendarElement=()=>{this._calendar&&this._calendar.element&&this._calendar.element.focus({preventScroll:!0})},this.calculateValue=(e,t)=>(e.value!==void 0?e.value:t.value)||B,this.calculateShow=(e,t)=>e.show!==void 0?e.show:t.show,this.renderCalendar=()=>{const e=this.value||B,t={min:this.min,max:this.max,allowReverse:this.props.allowReverse,mode:"range",focusedDate:this.props.focusedDate,disabled:this.props.disabled,className:this.mobileMode?"k-calendar-lg":"",mobileMode:this.mobileMode,...this.props.calendarSettings,value:e,dir:this.props.dir,onChange:this.handleCalendarChange};return this.props.calendar?l.createElement(this.props.calendar,{...t}):l.createElement(Ht,{...t,ref:this.setCalendarRef})},this.renderPopup=()=>{const e={popupClass:"k-daterangepicker-popup",animate:this._element!==null,anchor:this._element,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...this.props.popupSettings,show:this.show};return this.props.popup?l.createElement(this.props.popup,{...e},this.renderCalendar()):l.createElement(Qe.Popup,{...e},this.renderCalendar())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:i=>this.handleCancel(i),adaptiveTitle:this.props.adaptiveTitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(St,M[St]),onCancel:this.handleCancel,applyText:this.localizationService.toLanguageString(Ct,M[Ct]),onApply:this.handleBlur}};return l.createElement(st,{...t},l.createElement(ce.ActionSheetContent,{className:"!k-overflow-hidden"},l.createElement("div",{className:"k-scrollable-wrap"},this.renderCalendar())))},this.handleReverseClick=e=>{const t={start:this.value.end,end:this.value.start},i={syntheticEvent:e,nativeEvent:e.nativeEvent};this.handleChange(t,i)},this.handleReverseMouseDown=e=>{e.preventDefault()},this.handleFocus=e=>{clearTimeout(this.nextTickId),this.shouldFocusDateInput||this.mobileMode&&this.setState({currentValue:this.value});const{onFocus:t}=this.props;t&&t.call(void 0,e)},this.handleClick=()=>{this.shouldFocusDateInput||this.setShow(!0)},this.handleBlur=e=>{this.nextTick(()=>{this.setShow(!1)});const{onBlur:t}=this.props;t&&t.call(void 0,e)},this.handleCancel=e=>{this.nextTick(()=>{this.setShow(!1),this.setState({currentValue:B})});const{onCancel:t}=this.props;t&&t.call(void 0,e)},this.handleEndChange=e=>{const t={start:this.value.start,end:r.cloneDate(e.value||void 0)};this.handleChange(t,e)},this.handleStartChange=e=>{const t={start:r.cloneDate(e.value||void 0),end:this.value.end};this.handleChange(t,e)},this.extractRangeFromValue=e=>{if(!Array.isArray(e.value)&&!(e.value instanceof Date))return e.value||B;const t=Array.isArray(e.value)?e.value[0]:e.value;return{start:this.value.end!==null?t:this.value.start,end:this.value.start!==null?t:this.value.end}},this.handleCalendarChange=e=>{const t=this.extractRangeFromValue(e);this.handleChange(t,e)},this.handleKeyDown=e=>{const{keyCode:t,altKey:i}=e;t===d.Keys.esc?(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):i&&t===d.Keys.down?(e.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0),this.focusCalendarElement()):i&&t===d.Keys.up&&(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1))},this.handleChange=(e,t)=>{this.setState({value:e}),this.valueDuringOnChange=e;const{onChange:i}=this.props;if(i){const a={syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:this.value,show:this.show,target:this};i.call(void 0,a)}this.valueDuringOnChange=void 0},d.validatePackage(Se),this.state={show:this.props.show||this.props.defaultShow||Pe.defaultProps.defaultShow,value:this.props.value||this.props.defaultValue||Pe.defaultProps.defaultValue,currentValue:B},this.nextTick=this.nextTick.bind(this),this.setShow=this.setShow.bind(this),this.focusCalendarElement=this.focusCalendarElement.bind(this),this.focusDateInputElement=this.focusDateInputElement.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get _startInputId(){return this.props.id+"-start-input-id"}get _endInputId(){return this.props.id+"-end-input-id"}get element(){return this._element}get startDateInput(){return this._startDateInput.current}get endDateInput(){return this._endDateInput.current}get calendar(){return this._calendar}get value(){return(this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value)||B}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get min(){return this.props.min!==void 0?this.props.min:Pe.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:Pe.defaultProps.max}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get localizationService(){return k.provideLocalizationService(this)}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=it&&this.props.adaptive)}componentDidMount(){var s;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this.shouldFocusCalendar&&this.focusCalendarElement(),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;clearTimeout(this.nextTickId),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const s=this.value||B,e=this.mobileMode&&this.show?this.state.currentValue:s,t=(this.props.startDateInputSettings||{}).id||this._startInputId,i=(this.props.endDateInputSettings||{}).id||this._endInputId,a=d.classNames("k-daterangepicker",{"k-disabled":this.props.disabled},this.props.className),o=this.localizationService.toLanguageString(Ze,M[Ze]),h=this.localizationService.toLanguageString(Ge,M[Ge]),u=this.localizationService.toLanguageString(Xe,M[Xe]),c={disableSelection:this.mobileMode&&!0,label:o,format:this.props.format,min:this.min,max:this.max,id:this._startInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.startDateInputSettings,value:e.start,onChange:this.handleStartChange},p={disableSelection:this.mobileMode&&!0,label:h,format:this.props.format,min:this.min,max:this.max,id:this._endInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.endDateInputSettings,value:e.end,onChange:this.handleEndChange},m=l.createElement(N.Button,{type:"button",className:"k-select",fillMode:"flat",title:k.provideLocalizationService(this).toLanguageString(be,M[be]),onMouseDown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":t+" "+i,"aria-label":k.provideLocalizationService(this).toLanguageString(be,M[be])},l.createElement(d.IconWrap,{style:{transform:"rotate(90deg)"},name:"arrows-swap",icon:J.arrowsSwapIcon}));return l.createElement(l.Fragment,null,l.createElement("span",{ref:f=>{this._element=f},className:a,style:this.props.style,id:this.props.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.tabIndex,onFocus:this.handleFocus,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onBlur:this.mobileMode?void 0:this.handleBlur,dir:this.props.dir},this.props.startDateInput?l.createElement(this.props.startDateInput,{...c}):l.createElement(ae,{...c,ref:this._startDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),(this.props.allowReverse||this.props.calendarSettings&&this.props.calendarSettings.allowReverse)&&this.props.swapButton?m:u,this.props.endDateInput?l.createElement(this.props.endDateInput,{...p}):l.createElement(ae,{...p,ref:this._endDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup())}focusDateInputElement(){if(!document||!this.startDateInput||!this.startDateInput.element||!this.endDateInput||!this.endDateInput.element)return;const s=d.getActiveElement(document);(this.value.start===null||this.value.end!==null)&&s!==this.endDateInput.element?this.startDateInput.element.focus({preventScroll:!0}):s!==this.startDateInput.element&&this.endDateInput.element.focus({preventScroll:!0})}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}setShow(s){const{onOpen:e,onClose:t}=this.props;this.show!==s&&(this.setState({show:s}),s&&e&&e.call(void 0,{target:this}),!s&&t&&t.call(void 0,{target:this}))}calculateMedia(s){for(let e of s)this.setState({windowWidth:e.target.clientWidth})}};let Oe=Pe;Oe.displayName="DateRangePicker";Oe.propTypes={allowReverse:n.bool,calendarSettings:n.any,className:n.string,defaultShow:n.bool,defaultValue:n.shape({start:ee(n.instanceOf(Date).isRequired),end:ee(n.instanceOf(Date).isRequired)}),disabled:n.bool,endDateInputSettings:n.shape(re.propTypes),focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),onBlur:n.func,onChange:n.func,onFocus:n.func,popupSettings:n.any,show:n.bool,startDateInputSettings:n.any,style:n.any,swapButton:n.any,tabIndex:n.number,dir:n.string,value:n.shape({start:ee(n.instanceOf(Date).isRequired),end:ee(n.instanceOf(Date).isRequired)})};Oe.defaultProps={allowReverse:!1,defaultShow:!1,defaultValue:B,disabled:!1,format:"d",max:se,min:te,swapButton:!1};const Hs=d.createPropsContext(),zs=d.withIdHOC(d.withPropsContext(Hs,Oe));zs.displayName="KendoReactDateRangePicker";k.registerForLocalization(Oe);class zt extends l.Component{constructor(e){super(e),this._calendar=null,this._timePart=null,this._cancelButton=null,this._acceptButton=null,this._dateButtonRef=null,this._calendarWrap=null,this.shouldFocusPart=!1,this.focus=t=>{Promise.resolve().then(()=>{this.state.tab==="time"&&this._timePart&&this._timePart.focus(t);const i=this.calendarElement();this.state.tab==="date"&&i&&i.focus(t)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-widget.k-calendar"),this.move=t=>{if(t==="right"&&this.state.tab==="time"||t==="left"&&this.state.tab==="date")return;const i=t==="left"?"date":"time";this.shouldFocusPart=!0,this.setState({tab:i})},this.dateTimeFooter=()=>{const{cancelButton:t}=this.props,i=this.localizationService.toLanguageString(Re,M[Re]),a=this.localizationService.toLanguageString(_e,M[_e]);return l.createElement("div",{className:"k-datetime-footer k-actions k-actions-stretched"},t&&l.createElement(N.Button,{type:"button",ref:o=>{this._cancelButton=o},className:"k-time-cancel",onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:i,"aria-label":i},i),l.createElement(N.Button,{type:"button",themeColor:"primary",ref:o=>{this._acceptButton=o},className:"k-time-accept",disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:a,"aria-label":a},a))},this.handleReject=t=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||L});const i=this.mergeDate(this.props.value,this.props.value||L);if(this.props.onReject){const a={nativeEvent:t.nativeEvent,syntheticEvent:t,target:this,value:i};this.props.onReject.call(void 0,a)}},this.handleAccept=(t,i)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const a=this.mergeDate(this.state.dateValue,i||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:a,target:this})},this.handleNowClick=t=>{this.setState({timeValue:ue()}),this.handleAccept(t,ue())},this.handleCalendarValueChange=t=>{t.syntheticEvent.stopPropagation(),this.setState({dateValue:t.value,tab:"time"}),this.shouldFocusPart=!0},this.handleTimeListContainerChange=t=>{this.setState({timeValue:t})},this.handleDateClick=t=>{t.stopPropagation(),this.move("left")},this.handleTimeClick=t=>{t.stopPropagation(),this.move("right")},this.handleKeyDown=t=>{const{keyCode:i,altKey:a}=t;if(!this.props.disabled)switch(i){case d.Keys.enter:!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(t);return;case d.Keys.left:if(!a)return;this.move("left");return;case d.Keys.right:if(!a)return;this.move("right");return;default:return}},this.handleCancelKeyDown=t=>{const{keyCode:i}=t;i===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&!this.hasDateValue&&(t.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=t=>{const{keyCode:i}=t;i===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&(t.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=t=>{var o,h,u,c;const{keyCode:i,shiftKey:a}=t;a&&i===d.Keys.tab&&(t.stopPropagation(),this.hasDateValue?(c=(u=this._acceptButton)==null?void 0:u.element)==null||c.focus():(h=(o=this._cancelButton)==null?void 0:o.element)==null||h.focus()),i===d.Keys.enter&&(t.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=t=>{const{keyCode:i}=t;i===d.Keys.enter&&(t.stopPropagation(),this.move("right"))},this.handleTimePartMount=t=>{this.setState({timeValue:t})},this.state={tab:"date",dateValue:this.props.value,timeValue:this.props.value||L}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return this.state.dateValue!==null}get localizationService(){return k.provideLocalizationService(this)}componentDidUpdate(){this.shouldFocusPart&&this.focus({preventScroll:!0}),this.shouldFocusPart=!1}render(){const{disabled:e,min:t,max:i,weekNumber:a,focusedDate:o,format:h,mobileMode:u,footerActions:c}=this.props,p=d.classNames({"k-date-tab":this.state.tab==="date","k-time-tab":this.state.tab==="time","k-disabled":e},"k-datetime-wrap"),m=this.localizationService.toLanguageString(yt,M[yt]),f=this.localizationService.toLanguageString(kt,M[kt]),v={min:t,max:i,weekNumber:a,focusedDate:o,disabled:e||this.state.tab!=="date",value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:e||this.state.tab!=="date"?-1:void 0,mobileMode:u};return l.createElement("div",{onKeyDown:this.handleKeyDown,className:p,tabIndex:-1},l.createElement("div",{className:"k-datetime-buttongroup"},l.createElement(N.ButtonGroup,{width:"100%"},l.createElement(N.Button,{ref:g=>this._dateButtonRef=g,type:"button",selected:this.state.tab==="date",togglable:!0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},m),l.createElement(N.Button,{type:"button",selected:this.state.tab==="time",togglable:!0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},f))),l.createElement("div",{className:"k-datetime-selector"},l.createElement("div",{className:"k-datetime-calendar-wrap",ref:g=>this._calendarWrap=g},this.props.calendar?l.createElement(this.props.calendar,{...v}):l.createElement(tt,{ref:g=>{this._calendar=g},...v})),l.createElement("div",{className:"k-datetime-time-wrap"},l.createElement("div",{className:u?"k-reset k-timeselector-lg k-timeselector":""},l.createElement(pe,{key:1,onNowClick:this.handleNowClick,disabled:e||this.state.tab!=="time",ref:g=>{this._timePart=g},min:this.minTime||de,max:this.maxTime||oe,steps:this.props.steps,value:this.state.timeValue,format:h,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:u})))),c&&this.dateTimeFooter())}get minTime(){return this.props.minTime!==void 0?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return this.props.maxTime!==void 0?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(e,t){return r.isEqualDate(e,t||F())?e:null}hasActiveButton(){if(!this._acceptButton)return!1;const e=d.getActiveElement(document);return this._acceptButton&&e===this._acceptButton.element||this._cancelButton&&e===this._cancelButton.element}mergeTime(e,t){return e&&t?q(t,e):t}mergeDate(e,t){return e?q(e||F(),t):t}}zt.defaultProps={footerActions:!0};k.registerForLocalization(zt);const X=class extends l.Component{constructor(s){super(s),this._element=null,this._dateInput=l.createRef(),this._dateTimeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{const e=this.dateInputElement();e&&e.focus()},this.renderPicker=()=>{const{disabled:e,minTime:t,maxTime:i,format:a,calendar:o,cancelButton:h,weekNumber:u,focusedDate:c}=this.props;return l.createElement(zt,{ref:p=>{this._dateTimeSelector=p},cancelButton:h,steps:this.props.steps,value:this.value,onChange:this.handleValueChange,onReject:this.handleReject,disabled:e,weekNumber:u,min:this.min,max:this.max,minTime:t,maxTime:i,focusedDate:c,format:a,calendar:o,mobileMode:this.mobileMode,footerActions:!this.mobileMode})},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t=k.provideLocalizationService(this).toLanguageString(Re,M[Re]),i=k.provideLocalizationService(this).toLanguageString(_e,M[_e]),a={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:e,footer:{cancelText:t,onCancel:o=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleReject(o)},applyText:i,onApply:o=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleAccept(o)}}};return l.createElement(st,{...a},l.createElement(ce.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderPicker()))},this.handleReject=()=>{this.shouldFocusDateInput=!0,this.setShow(!1)},this.handleValueChange=e=>{this.setState({value:r.cloneDate(e.value||void 0)}),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:t}=this.props;t&&t.call(void 0,{syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:this.value,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleDateIconClick=()=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=e=>{e.preventDefault()},this.handleKeyDown=e=>{const{altKey:t,keyCode:i}=e;if(i===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}t&&(i===d.Keys.up||i===d.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===d.Keys.up,this.setShow(i===d.Keys.down))},this.dateInputElement=()=>this.dateInput&&this.dateInput.element||this.element&&this.element.querySelector(".k-dateinput > input.k-input-inner"),d.validatePackage(Se),this.state={value:this.props.defaultValue||X.defaultProps.defaultValue,show:this.props.defaultShow||X.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?r.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=it&&this.props.adaptive)}get min(){return this.props.min!==void 0?this.props.min:X.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:X.defaultProps.max}get validity(){const s=as(this.value,this.min,this.max)&&_t(this.value,this.props.minTime||de,this.props.maxTime||oe),e=this.props.validationMessage!==void 0,t=(!this.required||this.value!==null)&&s,i=this.props.valid!==void 0?this.props.valid:t;return{customError:e,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:i,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:X.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:X.defaultProps.required}get dateInputComp(){return this.props.dateInput||X.defaultProps.dateInput}componentDidMount(){var s;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){const s=this.dateInputElement();this._dateTimeSelector&&this.show&&!this.prevShow&&this._dateTimeSelector.focus({preventScroll:!0}),s&&!this.show&&this.shouldFocusDateInput&&s.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;clearTimeout(this.nextTickId),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:s=X.defaultProps.size,rounded:e=X.defaultProps.rounded,fillMode:t=X.defaultProps.fillMode,disabled:i,tabIndex:a,title:o,id:h,format:u,formatPlaceholder:c,min:p,max:m,className:f,width:v,name:g,validationMessage:C,required:I,validityStyles:T,minTime:D,maxTime:E,ariaLabelledBy:w,ariaDescribedBy:A,popup:O=Qe.Popup}=this.props,P=!this.validityStyles||this.validity.valid,H={id:h,ariaLabelledBy:w,ariaDescribedBy:A,format:u,formatPlaceholder:c,disabled:i,title:o,validityStyles:T,validationMessage:C,required:I,min:p,max:m,minTime:D,maxTime:E,name:g,tabIndex:this.show?-1:a,valid:this.validity.valid,value:this.value,onChange:this.handleValueChange,steps:this.props.steps,label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaExpanded:this.show,size:null,fillMode:null,rounded:null},x=l.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.handleBlur,onSyncFocus:this.props.onFocus,onSyncBlur:this.props.onBlur},({onFocus:V,onBlur:G})=>l.createElement(l.Fragment,null,l.createElement("div",{ref:U=>{this._element=U},className:d.classNames("k-input","k-datetimepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${d.kendoThemeMaps.roundedMap[e]||e}`]:e,[`k-input-${t}`]:t,"k-invalid":!P,"k-required":this.required,"k-disabled":this.props.disabled},f),onKeyDown:this.handleKeyDown,style:{width:v},onFocus:this.mobileMode?void 0:V,onBlur:G,onClick:this.mobileMode?this.handleDateIconClick:void 0},l.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode,...H}),l.createElement(N.Button,{tabIndex:-1,type:"button",icon:"calendar",svgIcon:J.calendarIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleDateIconClick,title:k.provideLocalizationService(this).toLanguageString(ye,M[ye]),className:"k-input-button",rounded:null,"aria-label":k.provideLocalizationService(this).toLanguageString(ye,M[ye])}),l.createElement(O,{show:this.show,animate:this.element!==null,anchor:this.element,popupClass:"k-datetime-container k-reset",id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"}},!this.mobileMode&&this.renderPicker())),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?l.createElement(Ft,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:P,editorDisabled:this.props.disabled,children:x,style:{width:this.props.width}}):x}setShow(s){const{onOpen:e,onClose:t}=this.props;this.show!==s&&(this.setState({show:s}),s&&e&&e.call(void 0,{target:this}),!s&&t&&t.call(void 0,{target:this}))}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}calculateMedia(s){for(const e of s)this.setState({windowWidth:e.target.clientWidth})}};let Ve=X;Ve.displayName="DateTimePicker";Ve.propTypes={className:n.string,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),weekNumber:n.bool,width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,cancelButton:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])};Ve.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"g",max:se,min:te,popupSettings:{},tabIndex:0,weekNumber:!1,required:!1,validityStyles:!0,cancelButton:!0,dateInput:ae,size:"medium",rounded:"medium",fillMode:"solid"};const qs=d.createPropsContext(),Ws=d.withIdHOC(d.withPropsContext(qs,Ve));Ws.displayName="KendoReactDateTimePicker";k.registerForLocalization(Ve);exports.Action=b;exports.BusViewService=Et;exports.Calendar=tt;exports.CalendarCell=is;exports.CalendarHeaderTitle=gs;exports.CalendarNavigationItem=ws;exports.CalendarPropsContext=bs;exports.CalendarViewEnum=S;exports.CalendarWeekCell=ns;exports.CalendarWithoutContext=ne;exports.CenturyViewService=ls;exports.DOMService=ds;exports.DateInput=ae;exports.DateInputPropsContext=ks;exports.DateInputWithoutContext=re;exports.DatePicker=Is;exports.DatePickerPropsContext=xs;exports.DatePickerWithoutContext=Me;exports.DateRangePicker=zs;exports.DateRangePickerPropsContext=Hs;exports.DateRangePickerWithoutContext=Oe;exports.DateTimePicker=Ws;exports.DateTimePickerPropsContext=qs;exports.DateTimePickerWithoutContext=Ve;exports.DayPeriodService=Ms;exports.DecadeViewService=hs;exports.EMPTY_SELECTIONRANGE=B;exports.Header=xe;exports.HorizontalViewList=ke;exports.HoursService=Os;exports.MAX_DATE=se;exports.MAX_TIME=oe;exports.MIN_DATE=te;exports.MIN_TIME=de;exports.MinutesService=Ns;exports.MonthViewService=cs;exports.MultiViewCalendar=Ht;exports.MultiViewCalendarPropsContext=As;exports.MultiViewCalendarWithoutContext=Q;exports.NavigationService=Ot;exports.PickerWrap=Cs;exports.ScrollSyncService=ps;exports.SecondsService=Fs;exports.TimeList=Be;exports.TimePart=pe;exports.TimePicker=Bs;exports.TimePickerPropsContext=Ls;exports.TimePickerWithoutContext=Ee;exports.TimeSelector=Te;exports.TodayCommand=Ie;exports.ToggleButton=Ss;exports.ViewList=Le;exports.Virtualization=Ce;exports.WeekNamesService=ms;exports.YearViewService=us;exports.dateInputsMessages=M;exports.decreaseValue=De;exports.end=Ge;exports.getNow=ue;exports.getToday=F;exports.increaseValue=we;exports.separator=Xe;exports.start=Ze;exports.swapStartEnd=be;exports.today=$e;exports.toggleCalendar=je;exports.toggleDateTimeSelector=ye;
21
+ `);return null},value:n.instanceOf(Date),smoothScroll:n.bool,show:n.bool};Be.defaultProps={boundRange:!1,max:oe,min:L,step:1,smoothScroll:!0};k.registerForIntl(Be);const mt=new RegExp(`${j.hour}|${j.minute}|${j.second}|${j.dayperiod}|literal`),he=class extends l.Component{constructor(s){super(s),this._element=null,this._nowButton=null,this.dateFormatParts=[],this.timeLists=[],this.focus=(e,t)=>{Promise.resolve().then(()=>{t&&this._nowButton&&this._nowButton.element&&this._nowButton.element.focus();const i=this.timeLists[0];!t&&this.state.activeListIndex===-1&&!this.hasActiveButton()&&i&&i.element&&i.focus(e)})},this.timeFormatReducer=(e,t)=>e+t.pattern,this.timeFormatFilter=(e,t,i)=>{const a=t>=1&&i[t-1];return a&&a&&e.type==="literal"?mt.test(a.type||""):mt.test(e.type||"")},this.focusList=e=>{this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(t=>e===1?t.next:t.prev).map(t=>t&&t.element&&t.element.focus({preventScroll:!0}))},this.listReducer=(e,t,i,a)=>e.length||t.props.id!==this.state.activeListIndex?e:[{next:a[i+1]||t,prev:a[i-1]||t}],this.showNowButton=()=>!this.hasSteps()&&this.props.nowButton&&_t(ue(),this.min,this.max),this.handleKeyDown=e=>{const{keyCode:t}=e;switch(t){case d.Keys.left:e.preventDefault(),this.focusList(0);return;case d.Keys.right:e.preventDefault(),this.focusList(1);return;default:return}},this.handleListBlur=()=>{this.nextTick(()=>{this.setState({activeListIndex:-1})})},this.handleListFocus=e=>{clearTimeout(this.nextTickId),this.setState({activeListIndex:e})},this.handleChange=e=>{const{onChange:t}=this.props;t&&t.call(void 0,e)},this.snapTime=Ut(Kt(this.props.steps,this.props.min||he.defaultProps.min)),this.state={activeListIndex:-1},this.hasActiveButton=this.hasActiveButton.bind(this)}get element(){return this._element}get value(){return Ki(this.snapTime(r.cloneDate(this.props.value||L)),this.min,this.max)}get intl(){return k.provideIntlService(this)}get min(){return this.snapTime(this.props.min||he.defaultProps.min)}get max(){return this.snapTime(this.props.max||he.defaultProps.max)}get steps(){return this.props.steps||he.defaultProps.steps}get boundRange(){return this.props.boundRange!==void 0?this.props.boundRange:he.defaultProps.boundRange}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidMount(){const{onMount:s}=this.props;s&&s.call(void 0,this.value)}render(){const{format:s,smoothScroll:e,onNowClick:t,className:i,disabled:a,mobileMode:o,show:h,onNowKeyDown:u}=this.props;this.snapTime=Ut(Kt(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(s||he.defaultProps.format).filter(this.timeFormatFilter);const c=d.classNames({"k-disabled":a,"k-time-part":o},i);this.timeLists=[];const p=k.provideLocalizationService(this),m=p.toLanguageString(Dt,M[Dt]);return l.createElement("div",{className:c},l.createElement("div",{className:"k-time-header"},l.createElement("span",{className:"k-title"},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&l.createElement(N.Button,{type:"button",ref:f=>{this._nowButton=f},className:"k-time-now",fillMode:"flat",themeColor:"primary",title:m,onKeyDown:u,"aria-label":m,onClick:t,tabIndex:a?-1:0},p.toLanguageString(wt,M[wt]))),l.createElement("div",{className:"k-time-list-container",onKeyDown:this.handleKeyDown},l.createElement("span",{className:"k-time-highlight"}),this.dateFormatParts.map((f,v)=>f.type!=="literal"?l.createElement("div",{key:v,className:d.classNames("k-time-list-wrapper",{"k-focus":v===this.state.activeListIndex}),role:"presentation",tabIndex:-1},l.createElement("span",{className:"k-title",onMouseDown:g=>{g.preventDefault()}},this.intl.dateFieldName(f)),l.createElement(Be,{min:this.min,max:this.max,boundRange:this.boundRange,part:f,step:f.type?this.steps[f.type]:1,smoothScroll:e,ref:g=>{g&&this.timeLists.push(g)},id:v,onFocus:()=>{this.handleListFocus(v)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.value,disabled:a,show:h,mobileMode:o})):l.createElement("div",{key:v,className:"k-time-separator"},f.pattern))))}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}hasActiveButton(){const s=d.getActiveElement(document);return this._nowButton&&s===this._nowButton.element}hasSteps(){const s=Object.keys(this.steps);return s.length!==s.reduce((e,t)=>e+this.steps[t],0)}};let pe=he;pe.propTypes={cancelButton:n.bool,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool};pe.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:de,max:oe,steps:{},boundRange:!1};k.registerForIntl(pe);k.registerForLocalization(pe);const Mt=class extends l.Component{constructor(s){super(s),this._element=null,this._cancelButton=null,this._acceptButton=null,this.timePart=null,this.focusActiveList=()=>{this.timePart&&this.timePart.focus({preventScroll:!0})},this.handleKeyDown=e=>{const{keyCode:t}=e;switch(t){case d.Keys.enter:this.hasActiveButton()||this.handleAccept(e);return;default:return}},this.revertToNowButton=e=>{const{keyCode:t,shiftKey:i}=e;!i&&t===d.Keys.tab&&(e.preventDefault(),this.props.nowButton!==!1?this.timePart&&this.timePart.focus({preventScroll:!0},!0):this.timePart&&this.timePart.focus({preventScroll:!0}))},this.handleNowKeyDown=e=>{var a;const{keyCode:t,shiftKey:i}=e;i&&t===d.Keys.tab?(e.preventDefault(),this._acceptButton&&((a=this._acceptButton.element)==null||a.focus({preventScroll:!0}))):t===d.Keys.enter&&(e.stopPropagation(),this.handleNowClick(e))},this.handleAccept=e=>{const t=this.mergeValue(r.cloneDate(this.value||ue()),this.timePart?this.timePart.value:this.current);this.setState({value:t}),this.valueDuringOnChange=t;const{onChange:i}=this.props;i&&i.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleReject=e=>{this.setState({current:this.value});const{onReject:t}=this.props;t&&t.call(void 0,e)},this.handleNowClick=e=>{const t=this.mergeValue(r.cloneDate(this.value||ue()),ue());this.setState({current:t,value:t}),this.valueDuringOnChange=t;const{onChange:i}=this.props;i&&i.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:this.value,target:this}),this.valueDuringOnChange=void 0},this.handleChange=e=>{this.setState({current:e});const{handleTimeChange:t}=this.props;t&&t.call(void 0,{time:e})},this.dateFormatParts=this.intl.splitDateFormat(this.props.format||Mt.defaultProps.format),this.mergeValue=Wi(qi(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.state={current:this.props.value||L,value:this.props.value||Mt.defaultProps.value}}get element(){return this._element}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?r.cloneDate(s):null}get intl(){return k.provideIntlService(this)}get current(){return this.state.current!==null?r.cloneDate(this.state.current):null}componentWillUnmount(){clearTimeout(this.nextTickId)}render(){const{format:s,cancelButton:e,disabled:t,tabIndex:i,className:a,smoothScroll:o,min:h,max:u,boundRange:c,nowButton:p,steps:m,show:f,mobileMode:v}=this.props,g=k.provideLocalizationService(this),C=g.toLanguageString(Je,M[Je]),I=g.toLanguageString(Ne,M[Ne]);return l.createElement("div",{ref:T=>{this._element=T},tabIndex:t?void 0:i||0,className:d.classNames("k-timeselector",a,{"k-disabled":t}),onKeyDown:this.handleKeyDown},l.createElement(pe,{ref:T=>{this.timePart=T},value:this.current,onChange:this.handleChange,onNowClick:this.handleNowClick,format:s,smoothScroll:o,min:h,max:u,boundRange:c,disabled:t,nowButton:p,steps:m,show:f,mobileMode:v,onNowKeyDown:this.handleNowKeyDown}),this.props.footer&&l.createElement("div",{className:"k-time-footer k-actions k-actions-stretched"},e&&l.createElement(N.Button,{type:"button",ref:T=>{this._cancelButton=T},className:"k-time-cancel",onClick:this.handleReject,title:C,"aria-label":C},C),l.createElement(N.Button,{type:"button",ref:T=>{this._acceptButton=T},className:"k-time-accept",themeColor:"primary",onClick:this.handleAccept,onKeyDown:this.revertToNowButton,title:I,"aria-label":I},I)))}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}hasActiveButton(){if(!this._acceptButton||!this._acceptButton.element)return!1;const s=d.getActiveElement(document);return this._acceptButton&&s===this._acceptButton.element||this._cancelButton&&s===this._cancelButton.element}};let Te=Mt;Te.propTypes={cancelButton:n.bool,className:n.string,disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),max:n.instanceOf(Date),min:n.instanceOf(Date),nowButton:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,value:n.instanceOf(Date),show:n.bool};Te.defaultProps={value:null,disabled:!1,cancelButton:!0,format:"t",min:de,max:oe,boundRange:!1,footer:!0};k.registerForIntl(Te);k.registerForLocalization(Te);const $=class extends l.Component{constructor(s){super(s),this._element=null,this._dateInput=l.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:e,cancelButton:t,nowButton:i,disabled:a,format:o,steps:h}=this.props;return l.createElement(Te,{ref:this.setTimeSelectorRef,className:this.mobileMode?"k-reset k-timeselector-lg":"",mobileMode:this.mobileMode,show:this.show,cancelButton:t,disabled:a,nowButton:i,format:o,min:this.min,max:this.max,steps:h,smoothScroll:e,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject})},this.renderPopup=()=>{const{popupClass:e,...t}=this.popupSettings,i=d.classNames("k-group k-reset",e),a={popupClass:"k-timepicker-popup",show:this.show,animate:this.element!==null,anchor:this.element,className:i,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...t};return this.props.popup?l.createElement(this.props.popup,{...a},this.renderTimeSelector()):l.createElement(Qe.Popup,{...a},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(qe,M[Je]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(Ne,M[Ne]),onApply:i=>this.handleValueChange(i)}};return l.createElement(st,{...t},l.createElement(ce.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderTimeSelector()))},this.setTimeSelectorRef=e=>{this._timeSelector=e},this.nextValue=(e,t)=>e.value!==void 0?e.value:t.value,this.nextShow=(e,t)=>e.show!==void 0?e.show:t.show,this.handleInputValueChange=e=>{const t=this.mergeTime(e.value);this.handleValueChange({...e,value:t})},this.handleTimeChange=e=>{this.setState({candidate:e.time})},this.handleValueChange=e=>{this.setState({value:r.cloneDate(e.value||this.state.candidate)}),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0;const{onChange:t}=this.props,i=this.value||this.state.candidate;t&&t.call(void 0,{syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:i,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleValueReject=e=>{this.setShow(!1)},this.handleIconClick=e=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=e=>{e.preventDefault()},this.handleKeyDown=e=>{const{altKey:t,keyCode:i}=e;if(i===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}t&&(i===d.Keys.up||i===d.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===d.Keys.up,this.setShow(i===d.Keys.down))},d.validatePackage(Se),this.state={value:this.props.defaultValue||$.defaultProps.defaultValue,show:this.props.defaultShow||$.defaultProps.defaultShow,focused:!1,candidate:null},this.normalizeTime=this.normalizeTime.bind(this),this.setShow=this.setShow.bind(this),this.mergeTime=this.mergeTime.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get timeSelector(){return this._timeSelector}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?r.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const s=this.value&&this.normalizeTime(this.value),e=this.normalizeTime(this.min),t=this.normalizeTime(this.max),i=Ui(s,e,t),a=this.props.validationMessage!==void 0,o=(!this.required||this.value!==null)&&i,h=this.props.valid!==void 0?this.props.valid:o;return{customError:a,rangeOverflow:$i(s,t),rangeUnderflow:Yi(s,e),valid:h,valueMissing:this.value===null}}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=it&&this.props.adaptive)}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:$.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:$.defaultProps.required}get popupSettings(){return this.props.popupSettings||$.defaultProps.popupSettings}get min(){return this.props.min!==void 0?this.props.min:$.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:$.defaultProps.max}get dateInputComp(){return this.props.dateInput||$.defaultProps.dateInput}get localizationService(){return k.provideLocalizationService(this)}componentDidMount(){var s;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow?this._timeSelector.focusActiveList():this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:s=$.defaultProps.size,rounded:e=$.defaultProps.rounded,fillMode:t=$.defaultProps.fillMode,disabled:i,tabIndex:a,title:o,id:h,className:u,format:c,formatPlaceholder:p,width:m,name:f,steps:v,validationMessage:g,required:C,validityStyles:I,ariaLabelledBy:T,ariaDescribedBy:D}=this.props,E=!this.validityStyles||this.validity.valid,w={disabled:i,format:c,formatPlaceholder:p,id:h,ariaLabelledBy:T,ariaDescribedBy:D,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:f,onChange:this.handleInputValueChange,required:C,steps:v,tabIndex:this.show?-1:a,title:o,valid:this.validity.valid,validationMessage:g,validityStyles:I,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,size:null,fillMode:null,rounded:null,readonly:this.mobileMode},A=this.localizationService.toLanguageString(qe,M[qe]),O=this.localizationService.toLanguageString(bt,M[bt]),P=l.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:H,onBlur:x})=>l.createElement(l.Fragment,null,l.createElement("div",{id:this.props.id,ref:V=>{this._element=V},className:d.classNames("k-input","k-timepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${d.kendoThemeMaps.roundedMap[e]||e}`]:e,[`k-input-${t}`]:t,["k-invalid"]:!E,["k-required"]:this.required,["k-disabled"]:this.props.disabled},u),onKeyDown:this.handleKeyDown,style:{width:m},onFocus:H,onBlur:x,onClick:this.mobileMode?this.handleIconClick:void 0},l.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,...w}),l.createElement(N.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:J.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleIconClick,title:O,className:"k-input-button",rounded:null,"aria-label":A}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?l.createElement(Ft,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:E,editorDisabled:this.props.disabled,children:P,style:{width:this.props.width}}):P}normalizeTime(s){return q(L,s)}setShow(s){const{onOpen:e,onClose:t}=this.props;this.show!==s&&(this.setState({show:s}),s&&e&&e.call(void 0,{target:this}),!s&&t&&t.call(void 0,{target:this}))}mergeTime(s){return this.value&&s?q(this.value,s):s}calculateMedia(s){for(let e of s)this.setState({windowWidth:e.target.clientWidth})}};let Ee=$;Ee.displayName="TimePicker";Ee.propTypes={className:n.string,cancelButton:n.bool,nowButton:n.bool,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,steps:n.shape({hour:n.number,minute:n.number,second:n.number}),smoothScroll:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])};Ee.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:oe,min:de,popupSettings:{},tabIndex:0,steps:{},required:!1,validityStyles:!0,dateInput:ae,size:"medium",rounded:"medium",fillMode:"solid"};const Ls=d.createPropsContext(),Bs=d.withIdHOC(d.withPropsContext(Ls,Ee));Bs.displayName="KendoReactTimePicker";k.registerForLocalization(Ee);const Jt=2,Tt=class extends l.Component{constructor(s){super(s),this._element=null,this.isActive=!1,this.focusActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus"),t=this._element.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),this.isActive=!0},this.blurActiveDate=()=>{if(!this._element)return;const e=this._element.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),this.isActive=!1},this.rotateSelectionRange=e=>{if(e.start===null||e.end===null)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}},this.handleDateChange=(e,t=!1)=>{const{onChange:i}=this.props;if(i){const a={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:r.cloneDate(e.value),target:this,isTodayClick:t};i.call(void 0,a)}}}get element(){return this._element}get weekNumber(){return!!(this.props.showWeekNumbers&&this.props.activeView===S.month)}get min(){return this.props.min!==void 0?this.props.min:Tt.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:Tt.defaultProps.max}componentDidUpdate(){this.isActive&&this.focusActiveDate()}render(){const s=this.props.allowReverse?this.rotateSelectionRange(this.props.selectionRange):this.props.selectionRange,e=d.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":this.props.verticalView,"k-hstack":!this.props.verticalView,"k-calendar-monthview":this.props.activeView===S.month,"k-calendar-yearview":this.props.activeView===S.year,"k-calendar-decadeview":this.props.activeView===S.decade,"k-calendar-centuryview":this.props.activeView===S.century});return l.createElement("div",{ref:t=>{this._element=t},className:e},this.props.dates.map(t=>l.createElement("table",{className:"k-calendar-table k-content",key:t.getTime(),role:"grid"},l.createElement(Fe,{bus:this.props.bus,service:this.props.service,key:t.getTime(),direction:"horizontal",activeView:this.props.activeView,cellUID:this.props.cellUID,viewDate:t,min:this.min,max:this.max,focusedDate:this.props.focusedDate,selectionRange:s,selectedDate:this.props.value,showWeekNumbers:this.weekNumber,onChange:this.handleDateChange,onCellEnter:this.props.onCellEnter,cell:this.props.cell,weekCell:this.props.weekCell}))))}};let ke=Tt;ke.defaultProps={showWeekNumbers:!1,views:Jt,take:Jt,allowReverse:!0,min:te,max:se};const ft=(s=Q.defaultProps.min,e=Q.defaultProps.max,t)=>t instanceof Date&&!Array.isArray(t)&&_(r.getDate(t),s,e)?r.getDate(t):null,Qt=(s=Q.defaultProps.min,e=Q.defaultProps.max,t)=>Array.isArray(t)?t.filter(i=>_(i,s,e)).map(i=>r.getDate(i)):null,es=s=>typeof s=="object"&&!(s instanceof Date)&&s!==null&&!Array.isArray(s)?s:B,ts=(s,e,t)=>s||e&&e[0]||t&&t.start,vn=(s,e)=>s.start===null&&e===null?"start":s.end===null?"end":"start",ve=class extends l.Component{constructor(s){super(s),this.dates=[],this.selectedDate=null,this.selectedMultiple=null,this.selectedRange=B,this._focusedDate=new Date,this.cellUID=this.props.id+"-cell-uid",this.activeRangeEnd="start",this._element=null,this.intl=null,this.localization=null,this.service=null,this.calendarViewList=null,this.isActive=!1,this.calculateFocusFromValue=!0,this.focus=()=>{this._element&&this._element.focus()},this.clampRange=c=>({start:c,end:null}),this.rangeWithFocused=(c,p)=>({start:c.start,end:c.end===null&&c.start!==null&&this.isActive?p:c.end}),this.generateRange=(c,p)=>{const{end:m,start:f}=p,v=p.start!==null&&c.getTime()<=p.start.getTime();return!this.props.allowReverse&&v?{start:c,end:this.selectedRange.start}:this.activeRange!=="end"?{start:c,end:m}:{start:f||this.selectedDate,end:c}},this.canNavigate=c=>{if(!this.service)return!1;const p=this.service.move(this.focusedDate,c);return this.min<=p&&p<=this.max||this.service.isInSameView(p,this.min)||this.service.isInSameView(p,this.max)},this.navigate=(c,p)=>{this.calculateFocusFromValue=!1;const m=this.move(c,p);this.setState({navigateDate:m,focusedDate:m})},this.move=(c,p)=>this.clampDate(this.service.move(p,c)),this.clampDate=c=>K(c,this.min,this.max),this.shouldAutoCorrect=(c,p)=>{const{end:m,start:f}=p;return this.activeRange!=="end"?m!==null&&c>m:f!==null&&c<f},this.handleCellEnter=c=>{this.props.mode==="range"&&(this.calculateFocusFromValue=!1,this.setState({focusedDate:c}))},this.handleMouseDown=c=>{c.preventDefault()},this.handleClick=c=>{this._element&&this._element.focus({preventScroll:!0})},this.handleFocus=c=>{if(this.isActive=!0,!this.calendarViewList)return;this.calendarViewList.focusActiveDate();const{onFocus:p}=this.props;p&&p.call(void 0,c)},this.handleBlur=c=>{if(this.isActive=!1,!this.calendarViewList)return;this.calendarViewList.blurActiveDate();const{onBlur:p}=this.props;p&&p.call(void 0,c)},this.handleTodayClick=c=>{this.todayIsInRange&&this.handleDateChange(c)},this.handlePrevButtonClick=()=>{const c=b.PrevView;if(this.state.activeView>0&&this.focusedDate.getFullYear()>this.dates[0].getFullYear())this.navigate(c,this.move(c,this.focusedDate));else{const p=this.isInMonth(this.focusedDate,this.dates[1])?this.move(c,this.focusedDate):this.focusedDate;this.navigate(c,p)}},this.handleNextButtonClick=()=>{this.navigate(b.NextView,this.focusedDate)},this.handleKeyDown=c=>{const{keyCode:m,ctrlKey:f,metaKey:v}=c;if(m===84){const g=F();this.calculateFocusFromValue=!1,this.setState({focusedDate:g,navigateDate:g})}if((f||v)&&(m===d.Keys.left&&this.handlePrevButtonClick(),m===d.Keys.right&&this.handleNextButtonClick()),m===d.Keys.enter){const g={syntheticEvent:c,nativeEvent:c.nativeEvent,value:this.focusedDate,target:this};this.handleDateChange(g)}else{const g=K(this.navigation.move(this.focusedDate,this.navigation.action(c),this.state.activeView,this.service,c),this.min,this.max);if(r.isEqualDate(this.focusedDate,g))return;this.dates&&this.service&&!this.service.isInArray(g,this.dates)&&this.setState({navigateDate:g}),this.calculateFocusFromValue=!1,this.setState({focusedDate:g})}c.preventDefault()},this.handleViewChange=({view:c})=>{this.calculateFocusFromValue=!1,this.setState(p=>({activeView:c,navigateDate:p.focusedDate}))},this.handleDateChange=c=>{const p=r.cloneDate(c.value),m=this.bus.canMoveDown(this.state.activeView);if(this.props.disabled)return;if(m)if(c.isTodayClick)this.bus.moveToBottom(this.state.activeView);else{this.bus.moveDown(this.state.activeView,c.syntheticEvent),this.setState({focusedDate:p,navigateDate:p});return}this.calculateFocusFromValue=!0;let f;switch(this.props.mode){case"single":f=r.cloneDate(c.value);break;case"multiple":if(Array.isArray(this.selectedMultiple)){const g=this.selectedMultiple.slice();let C=-1;g.forEach((I,T)=>{r.isEqualDate(I,c.value)&&(C=T)}),C!==-1?g.splice(C,1):g.push(r.cloneDate(c.value)),f=g.slice()}else this.selectedDate?f=[r.cloneDate(this.selectedDate),r.cloneDate(c.value)]:f=[r.cloneDate(c.value)];break;case"range":{f=this.selectedRange.start!==null&&this.selectedRange.end!==null&&this.activeRange==="start"?this.clampRange(c.value):this.generateRange(c.value,this.selectedRange),this.activeRangeEnd=this.activeRange!=="end"?"end":"start";break}default:f=r.cloneDate(c.value);break}this.valueDuringOnChange=f,c.isTodayClick&&this.setState({navigateDate:p}),this.setState({value:f,focusedDate:p}),this.valueDuringOnChange=f;const{onChange:v}=this.props;if(v){const g={syntheticEvent:c.syntheticEvent,nativeEvent:c.nativeEvent,value:f,target:this};v.call(void 0,g)}this.valueDuringOnChange=void 0};const e=s.value!==void 0?s.value:s.defaultValue||ve.defaultProps.defaultValue,t=ft(this.min,this.max,e),i=Qt(this.min,this.max,e),a=es(e),o=ts(t,i,a),h=Ye(S[s.defaultActiveView],this.bottomView,this.topView),u=K(s.focusedDate||o||F(),this.min,this.max);this.state={value:e,activeView:h,focusedDate:u,navigateDate:u},this.activeRangeEnd=vn(a,t),this.bus=new Et(this.handleViewChange),this.navigation=new Ot(this.bus),this.calculateFocusFromValue=!1,this.lastView=h,this.lastViewsCount=this.props.views||ke.defaultProps.views}get wrapperID(){return this.props.id+"-wrapper-id"}get isRtl(){return this.props.dir==="rtl"}get element(){return this._element}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value}get focusedDate(){return r.cloneDate(this._focusedDate)}get min(){return r.getDate(this.props.min!==void 0?this.props.min:ve.defaultProps.min)}get max(){return r.getDate(this.props.max!==void 0?this.props.max:ve.defaultProps.max)}get bottomView(){return S[this.props.bottomView!==void 0?this.props.bottomView:ve.defaultProps.bottomView]}get topView(){return S[this.props.topView!==void 0?this.props.topView:ve.defaultProps.topView]}get activeRange(){return this.props.activeRangeEnd!==void 0?this.props.activeRangeEnd:this.activeRangeEnd}get todayIsInRange(){return _(F(),r.getDate(this.min),r.getDate(this.max))}componentDidMount(){this.calculateFocusFromValue=!0}componentDidUpdate(){this.calendarViewList&&(this.isActive?this.calendarViewList.focusActiveDate:this.calendarViewList.blurActiveDate)();const s=ft(this.min,this.max,this.value);this.calculateFocusFromValue=!!(this.selectedDate&&s&&this.selectedDate.getTime()&&s.getTime()),this.lastView=this.state.activeView,this.lastViewsCount=this.props.views||ke.defaultProps.views}render(){this.props._ref&&this.props._ref(this),this.intl=k.provideIntlService(this),this.localization=k.provideLocalizationService(this),this.bus.configure(this.bottomView,this.topView);const s=Ye(this.state.activeView,this.bottomView,this.topView);this.service=this.bus.service(s,this.intl),this.selectedDate=ft(this.min,this.max,this.value),this.selectedMultiple=Qt(this.min,this.max,this.value),this.selectedRange=es(this.value);const e=ts(this.selectedDate,this.selectedMultiple,this.selectedRange);this._focusedDate=K(this.calculateFocusFromValue&&e!==null?e:this.state.focusedDate,this.min,this.max);const t=d.classNames("k-widget k-calendar k-calendar-range",{"k-disabled":this.props.disabled},this.props.className),i=this.rangeWithFocused(this.selectedRange,this.focusedDate),a=this.localization.toLanguageString(gt,M[gt]),o=this.localization.toLanguageString(vt,M[vt]),h=!this.canNavigate(b.PrevView),u=!this.canNavigate(b.NextView),c={"aria-disabled":h},p={"aria-disabled":u},m=this.lastView!==s,f=this.dates&&this.isInMonth(this.state.navigateDate,this.dates[0]),v=this.lastViewsCount!==this.props.views;(!f||m||v)&&(this.dates=this.service.datesList(this.state.navigateDate,this.props.views||ke.defaultProps.views));const g=r.cloneDate(this.dates&&this.dates[0]?this.dates[0]:F());return l.createElement("div",{ref:C=>{this._element=C},className:t,id:this.props.id||this.wrapperID,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.disabled?void 0:this.props.tabIndex,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,onClick:this.handleClick,onKeyDown:this.handleKeyDown,"aria-disabled":this.props.disabled,dir:this.props.dir},l.createElement(xe,{key:`.kendo.calendar.header.${g.getTime()}`,activeView:s,currentDate:g,min:this.min,max:this.max,rangeLength:this.props.views,bus:this.bus,service:this.service,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode,commands:l.createElement(l.Fragment,null,l.createElement(N.Button,{type:"button",className:"k-calendar-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?J.chevronRightIcon:J.chevronLeftIcon,fillMode:"flat",title:a,disabled:h,onClick:this.handlePrevButtonClick,...c}),l.createElement(Ie,{min:this.min,max:this.max,onClick:this.handleTodayClick,disabled:!this.todayIsInRange}),l.createElement(N.Button,{type:"button",className:"k-calendar-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?J.chevronLeftIcon:J.chevronRightIcon,fillMode:"flat",title:o,disabled:u,onClick:this.handleNextButtonClick,...p}))}),l.createElement(ke,{ref:C=>{this.calendarViewList=C},dates:this.dates,activeView:s,focusedDate:this.focusedDate,min:this.min,max:this.max,bus:this.bus,service:this.service,selectionRange:i,value:this.selectedMultiple||this.selectedDate,cellUID:this.cellUID,views:this.props.views,onChange:this.handleDateChange,showWeekNumbers:this.props.weekNumber,onCellEnter:this.handleCellEnter,cell:this.props.cell,weekCell:this.props.weekCell,headerTitle:this.props.headerTitle,verticalView:this.props.mobileMode}))}isInMonth(s,e){return!!e&&r.firstDayOfMonth(e)<=s&&s<=r.lastDayOfMonth(e)}};let Q=ve;Q.displayName="MultiViewCalendar";Q.propTypes={activeRangeEnd:n.oneOf(["start","end"]),allowReverse:n.bool,bottomView:n.oneOf(["month","year","decade","century"]),className:n.string,defaultActiveView:n.oneOf(["month","year","decade","century"]),defaultValue:n.oneOfType([ee(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:ee(n.instanceOf(Date)),end:ee(n.instanceOf(Date))})]),disabled:n.bool,focusedDate:n.instanceOf(Date),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),mode:n.oneOf(["single","multiple","range"]),onBlur:n.func,onChange:n.func,onFocus:n.func,tabIndex:n.number,topView:n.oneOf(["month","year","decade","century"]),value:n.oneOfType([ee(n.instanceOf(Date)),n.arrayOf(n.instanceOf(Date)),n.shape({start:ee(n.instanceOf(Date).isRequired),end:ee(n.instanceOf(Date).isRequired)})]),views:(s,e,t)=>{const i=s[e];return i!==void 0&&i<1?new Error(`Invalid prop '${e}' supplied to'${t}'. The '${e}' property cannot be less than 1'`):null},weekNumber:n.bool,dir:n.string};Q.defaultProps={disabled:!1,min:te,max:se,navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",tabIndex:0,bottomView:"month",views:2,allowReverse:!1};const As=d.createPropsContext(),Ht=d.withIdHOC(d.withPropsContext(As,Q));Ht.displayName="KendoReactMultiViewCalendar";k.registerForIntl(Q);k.registerForLocalization(Q);const Pe=class extends l.Component{constructor(s){super(s),this._element=null,this._calendar=null,this._startDateInput=l.createRef(),this._endDateInput=l.createRef(),this.shouldFocusDateInput=!1,this.shouldFocusCalendar=!1,this.focus=()=>{this.startDateInput&&this.startDateInput.focus()},this.setCalendarRef=e=>{this._calendar=e},this.focusCalendarElement=()=>{this._calendar&&this._calendar.element&&this._calendar.element.focus({preventScroll:!0})},this.calculateValue=(e,t)=>(e.value!==void 0?e.value:t.value)||B,this.calculateShow=(e,t)=>e.show!==void 0?e.show:t.show,this.renderCalendar=()=>{const e=this.value||B,t={min:this.min,max:this.max,allowReverse:this.props.allowReverse,mode:"range",focusedDate:this.props.focusedDate,disabled:this.props.disabled,className:this.mobileMode?"k-calendar-lg":"",mobileMode:this.mobileMode,...this.props.calendarSettings,value:e,dir:this.props.dir,onChange:this.handleCalendarChange};return this.props.calendar?l.createElement(this.props.calendar,{...t}):l.createElement(Ht,{...t,ref:this.setCalendarRef})},this.renderPopup=()=>{const e={popupClass:"k-daterangepicker-popup",animate:this._element!==null,anchor:this._element,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...this.props.popupSettings,show:this.show};return this.props.popup?l.createElement(this.props.popup,{...e},this.renderCalendar()):l.createElement(Qe.Popup,{...e},this.renderCalendar())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:i=>this.handleCancel(i),adaptiveTitle:this.props.adaptiveTitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(St,M[St]),onCancel:this.handleCancel,applyText:this.localizationService.toLanguageString(Ct,M[Ct]),onApply:this.handleBlur}};return l.createElement(st,{...t},l.createElement(ce.ActionSheetContent,{className:"!k-overflow-hidden"},l.createElement("div",{className:"k-scrollable-wrap"},this.renderCalendar())))},this.handleReverseClick=e=>{const t={start:this.value.end,end:this.value.start},i={syntheticEvent:e,nativeEvent:e.nativeEvent};this.handleChange(t,i)},this.handleReverseMouseDown=e=>{e.preventDefault()},this.handleFocus=e=>{clearTimeout(this.nextTickId),this.shouldFocusDateInput||this.mobileMode&&this.setState({currentValue:this.value});const{onFocus:t}=this.props;t&&t.call(void 0,e)},this.handleClick=()=>{this.shouldFocusDateInput||this.setShow(!0)},this.handleBlur=e=>{this.nextTick(()=>{this.setShow(!1)});const{onBlur:t}=this.props;t&&t.call(void 0,e)},this.handleCancel=e=>{this.nextTick(()=>{this.setShow(!1),this.setState({currentValue:B})});const{onCancel:t}=this.props;t&&t.call(void 0,e)},this.handleEndChange=e=>{const t={start:this.value.start,end:r.cloneDate(e.value||void 0)};this.handleChange(t,e)},this.handleStartChange=e=>{const t={start:r.cloneDate(e.value||void 0),end:this.value.end};this.handleChange(t,e)},this.extractRangeFromValue=e=>{if(!Array.isArray(e.value)&&!(e.value instanceof Date))return e.value||B;const t=Array.isArray(e.value)?e.value[0]:e.value;return{start:this.value.end!==null?t:this.value.start,end:this.value.start!==null?t:this.value.end}},this.handleCalendarChange=e=>{const t=this.extractRangeFromValue(e);this.handleChange(t,e)},this.handleKeyDown=e=>{const{keyCode:t,altKey:i}=e;t===d.Keys.esc?(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):i&&t===d.Keys.down?(e.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0),this.focusCalendarElement()):i&&t===d.Keys.up&&(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1))},this.handleChange=(e,t)=>{this.setState({value:e}),this.valueDuringOnChange=e;const{onChange:i}=this.props;if(i){const a={syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:this.value,show:this.show,target:this};i.call(void 0,a)}this.valueDuringOnChange=void 0},d.validatePackage(Se),this.state={show:this.props.show||this.props.defaultShow||Pe.defaultProps.defaultShow,value:this.props.value||this.props.defaultValue||Pe.defaultProps.defaultValue,currentValue:B},this.nextTick=this.nextTick.bind(this),this.setShow=this.setShow.bind(this),this.focusCalendarElement=this.focusCalendarElement.bind(this),this.focusDateInputElement=this.focusDateInputElement.bind(this)}get _popupId(){return this.props.id+"-popup-id"}get _startInputId(){return this.props.id+"-start-input-id"}get _endInputId(){return this.props.id+"-end-input-id"}get element(){return this._element}get startDateInput(){return this._startDateInput.current}get endDateInput(){return this._endDateInput.current}get calendar(){return this._calendar}get value(){return(this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value)||B}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get min(){return this.props.min!==void 0?this.props.min:Pe.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:Pe.defaultProps.max}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get localizationService(){return k.provideLocalizationService(this)}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=it&&this.props.adaptive)}componentDidMount(){var s;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this.shouldFocusCalendar&&this.focusCalendarElement(),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;clearTimeout(this.nextTickId),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const s=this.value||B,e=this.mobileMode&&this.show?this.state.currentValue:s,t=(this.props.startDateInputSettings||{}).id||this._startInputId,i=(this.props.endDateInputSettings||{}).id||this._endInputId,a=d.classNames("k-daterangepicker",{"k-disabled":this.props.disabled},this.props.className),o=this.localizationService.toLanguageString(Ze,M[Ze]),h=this.localizationService.toLanguageString(Ge,M[Ge]),u=this.localizationService.toLanguageString(Xe,M[Xe]),c={disableSelection:this.mobileMode&&!0,label:o,format:this.props.format,min:this.min,max:this.max,id:this._startInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.startDateInputSettings,value:e.start,onChange:this.handleStartChange},p={disableSelection:this.mobileMode&&!0,label:h,format:this.props.format,min:this.min,max:this.max,id:this._endInputId,disabled:this.props.disabled,valid:this.props.valid,tabIndex:this.props.tabIndex,ariaExpanded:this.show,...this.props.endDateInputSettings,value:e.end,onChange:this.handleEndChange},m=l.createElement(N.Button,{type:"button",className:"k-select",fillMode:"flat",title:k.provideLocalizationService(this).toLanguageString(be,M[be]),onMouseDown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":t+" "+i,"aria-label":k.provideLocalizationService(this).toLanguageString(be,M[be])},l.createElement(d.IconWrap,{style:{transform:"rotate(90deg)"},name:"arrows-swap",icon:J.arrowsSwapIcon}));return l.createElement(l.Fragment,null,l.createElement("span",{ref:f=>{this._element=f},className:a,style:this.props.style,id:this.props.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.tabIndex,onFocus:this.handleFocus,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onBlur:this.mobileMode?void 0:this.handleBlur,dir:this.props.dir},this.props.startDateInput?l.createElement(this.props.startDateInput,{...c}):l.createElement(ae,{...c,ref:this._startDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),(this.props.allowReverse||this.props.calendarSettings&&this.props.calendarSettings.allowReverse)&&this.props.swapButton?m:u,this.props.endDateInput?l.createElement(this.props.endDateInput,{...p}):l.createElement(ae,{...p,ref:this._endDateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup())}focusDateInputElement(){if(!document||!this.startDateInput||!this.startDateInput.element||!this.endDateInput||!this.endDateInput.element)return;const s=d.getActiveElement(document);(this.value.start===null||this.value.end!==null)&&s!==this.endDateInput.element?this.startDateInput.element.focus({preventScroll:!0}):s!==this.startDateInput.element&&this.endDateInput.element.focus({preventScroll:!0})}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}setShow(s){const{onOpen:e,onClose:t}=this.props;this.show!==s&&(this.setState({show:s}),s&&e&&e.call(void 0,{target:this}),!s&&t&&t.call(void 0,{target:this}))}calculateMedia(s){for(let e of s)this.setState({windowWidth:e.target.clientWidth})}};let Oe=Pe;Oe.displayName="DateRangePicker";Oe.propTypes={allowReverse:n.bool,calendarSettings:n.any,className:n.string,defaultShow:n.bool,defaultValue:n.shape({start:ee(n.instanceOf(Date).isRequired),end:ee(n.instanceOf(Date).isRequired)}),disabled:n.bool,endDateInputSettings:n.shape(re.propTypes),focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,max:n.instanceOf(Date),min:n.instanceOf(Date),onBlur:n.func,onChange:n.func,onFocus:n.func,popupSettings:n.any,show:n.bool,startDateInputSettings:n.any,style:n.any,swapButton:n.any,tabIndex:n.number,dir:n.string,value:n.shape({start:ee(n.instanceOf(Date).isRequired),end:ee(n.instanceOf(Date).isRequired)})};Oe.defaultProps={allowReverse:!1,defaultShow:!1,defaultValue:B,disabled:!1,format:"d",max:se,min:te,swapButton:!1};const Hs=d.createPropsContext(),zs=d.withIdHOC(d.withPropsContext(Hs,Oe));zs.displayName="KendoReactDateRangePicker";k.registerForLocalization(Oe);class zt extends l.Component{constructor(e){super(e),this._calendar=null,this._timePart=null,this._cancelButton=null,this._acceptButton=null,this._dateButtonRef=null,this._calendarWrap=null,this.shouldFocusPart=!1,this.focus=t=>{Promise.resolve().then(()=>{this.state.tab==="time"&&this._timePart&&this._timePart.focus(t);const i=this.calendarElement();this.state.tab==="date"&&i&&i.focus(t)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-widget.k-calendar"),this.move=t=>{if(t==="right"&&this.state.tab==="time"||t==="left"&&this.state.tab==="date")return;const i=t==="left"?"date":"time";this.shouldFocusPart=!0,this.setState({tab:i})},this.dateTimeFooter=()=>{const{cancelButton:t}=this.props,i=this.localizationService.toLanguageString(Re,M[Re]),a=this.localizationService.toLanguageString(_e,M[_e]);return l.createElement("div",{className:"k-datetime-footer k-actions k-actions-stretched"},t&&l.createElement(N.Button,{type:"button",ref:o=>{this._cancelButton=o},className:"k-time-cancel",onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:i,"aria-label":i},i),l.createElement(N.Button,{type:"button",themeColor:"primary",ref:o=>{this._acceptButton=o},className:"k-time-accept",disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:a,"aria-label":a},a))},this.handleReject=t=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||L});const i=this.mergeDate(this.props.value,this.props.value||L);if(this.props.onReject){const a={nativeEvent:t.nativeEvent,syntheticEvent:t,target:this,value:i};this.props.onReject.call(void 0,a)}},this.handleAccept=(t,i)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const a=this.mergeDate(this.state.dateValue,i||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,value:a,target:this})},this.handleNowClick=t=>{this.setState({timeValue:ue()}),this.handleAccept(t,ue())},this.handleCalendarValueChange=t=>{t.syntheticEvent.stopPropagation(),this.setState({dateValue:t.value,tab:"time"}),this.shouldFocusPart=!0},this.handleTimeListContainerChange=t=>{this.setState({timeValue:t})},this.handleDateClick=t=>{t.stopPropagation(),this.move("left")},this.handleTimeClick=t=>{t.stopPropagation(),this.move("right")},this.handleKeyDown=t=>{const{keyCode:i,altKey:a}=t;if(!this.props.disabled)switch(i){case d.Keys.enter:!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(t);return;case d.Keys.left:if(!a)return;this.move("left");return;case d.Keys.right:if(!a)return;this.move("right");return;default:return}},this.handleCancelKeyDown=t=>{const{keyCode:i}=t;i===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&!this.hasDateValue&&(t.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=t=>{const{keyCode:i}=t;i===d.Keys.tab&&this._dateButtonRef&&this._dateButtonRef.element&&(t.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=t=>{var o,h,u,c;const{keyCode:i,shiftKey:a}=t;a&&i===d.Keys.tab&&(t.stopPropagation(),this.hasDateValue?(c=(u=this._acceptButton)==null?void 0:u.element)==null||c.focus():(h=(o=this._cancelButton)==null?void 0:o.element)==null||h.focus()),i===d.Keys.enter&&(t.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=t=>{const{keyCode:i}=t;i===d.Keys.enter&&(t.stopPropagation(),this.move("right"))},this.handleTimePartMount=t=>{this.setState({timeValue:t})},this.state={tab:"date",dateValue:this.props.value,timeValue:this.props.value||L}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return this.state.dateValue!==null}get localizationService(){return k.provideLocalizationService(this)}componentDidUpdate(){this.shouldFocusPart&&this.focus({preventScroll:!0}),this.shouldFocusPart=!1}render(){const{disabled:e,min:t,max:i,weekNumber:a,focusedDate:o,format:h,mobileMode:u,footerActions:c}=this.props,p=d.classNames({"k-date-tab":this.state.tab==="date","k-time-tab":this.state.tab==="time","k-disabled":e},"k-datetime-wrap"),m=this.localizationService.toLanguageString(yt,M[yt]),f=this.localizationService.toLanguageString(kt,M[kt]),v={min:t,max:i,weekNumber:a,focusedDate:o,disabled:e||this.state.tab!=="date",value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:e||this.state.tab!=="date"?-1:void 0,mobileMode:u};return l.createElement("div",{onKeyDown:this.handleKeyDown,className:p,tabIndex:-1},l.createElement("div",{className:"k-datetime-buttongroup"},l.createElement(N.ButtonGroup,{width:"100%"},l.createElement(N.Button,{ref:g=>this._dateButtonRef=g,type:"button",selected:this.state.tab==="date",togglable:!0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},m),l.createElement(N.Button,{type:"button",selected:this.state.tab==="time",togglable:!0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},f))),l.createElement("div",{className:"k-datetime-selector"},l.createElement("div",{className:"k-datetime-calendar-wrap",ref:g=>this._calendarWrap=g},this.props.calendar?l.createElement(this.props.calendar,{...v}):l.createElement(tt,{ref:g=>{this._calendar=g},...v})),l.createElement("div",{className:"k-datetime-time-wrap"},l.createElement("div",{className:u?"k-reset k-timeselector-lg k-timeselector":""},l.createElement(pe,{key:1,onNowClick:this.handleNowClick,disabled:e||this.state.tab!=="time",ref:g=>{this._timePart=g},min:this.minTime||de,max:this.maxTime||oe,steps:this.props.steps,value:this.state.timeValue,format:h,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:u})))),c&&this.dateTimeFooter())}get minTime(){return this.props.minTime!==void 0?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return this.props.maxTime!==void 0?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(e,t){return r.isEqualDate(e,t||F())?e:null}hasActiveButton(){if(!this._acceptButton)return!1;const e=d.getActiveElement(document);return this._acceptButton&&e===this._acceptButton.element||this._cancelButton&&e===this._cancelButton.element}mergeTime(e,t){return e&&t?q(t,e):t}mergeDate(e,t){return e?q(e||F(),t):t}}zt.defaultProps={footerActions:!0};k.registerForLocalization(zt);const X=class extends l.Component{constructor(s){super(s),this._element=null,this._dateInput=l.createRef(),this._dateTimeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.focus=()=>{const e=this.dateInputElement();e&&e.focus()},this.renderPicker=()=>{const{disabled:e,minTime:t,maxTime:i,format:a,calendar:o,cancelButton:h,weekNumber:u,focusedDate:c}=this.props;return l.createElement(zt,{ref:p=>{this._dateTimeSelector=p},cancelButton:h,steps:this.props.steps,value:this.value,onChange:this.handleValueChange,onReject:this.handleReject,disabled:e,weekNumber:u,min:this.min,max:this.max,minTime:t,maxTime:i,focusedDate:c,format:a,calendar:o,mobileMode:this.mobileMode,footerActions:!this.mobileMode})},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t=k.provideLocalizationService(this).toLanguageString(Re,M[Re]),i=k.provideLocalizationService(this).toLanguageString(_e,M[_e]),a={expand:this.show,onClose:this.handleBlur,adaptiveTitle:this.props.adaptiveTitle,windowWidth:e,footer:{cancelText:t,onCancel:o=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleReject(o)},applyText:i,onApply:o=>{var h;return(h=this._dateTimeSelector)==null?void 0:h.handleAccept(o)}}};return l.createElement(st,{...a},l.createElement(ce.ActionSheetContent,{className:"!k-overflow-hidden"},this.renderPicker()))},this.handleReject=()=>{this.shouldFocusDateInput=!0,this.setShow(!1)},this.handleValueChange=e=>{this.setState({value:r.cloneDate(e.value||void 0)}),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:t}=this.props;t&&t.call(void 0,{syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:this.value,show:this.show,target:this}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},this.handleFocus=()=>{this.setState({focused:!0})},this.handleBlur=()=>{this.setState({focused:!1}),this.setShow(!1)},this.handleDateIconClick=()=>{this.props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.show))},this.handleIconMouseDown=e=>{e.preventDefault()},this.handleKeyDown=e=>{const{altKey:t,keyCode:i}=e;if(i===d.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}t&&(i===d.Keys.up||i===d.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===d.Keys.up,this.setShow(i===d.Keys.down))},this.dateInputElement=()=>this.dateInput&&this.dateInput.element||this.element&&this.element.querySelector(".k-dateinput > input.k-input-inner"),d.validatePackage(Se),this.state={value:this.props.defaultValue||X.defaultProps.defaultValue,show:this.props.defaultShow||X.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(d.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get value(){const s=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.value!==void 0?this.props.value:this.state.value;return s!==null?r.cloneDate(s):null}get show(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.props.show!==void 0?this.props.show:this.state.show}get name(){return this.props.name}get mobileMode(){return!!(this.state.windowWidth&&this.state.windowWidth<=it&&this.props.adaptive)}get min(){return this.props.min!==void 0?this.props.min:X.defaultProps.min}get max(){return this.props.max!==void 0?this.props.max:X.defaultProps.max}get validity(){const s=as(this.value,this.min,this.max)&&_t(this.value,this.props.minTime||de,this.props.maxTime||oe),e=this.props.validationMessage!==void 0,t=(!this.required||this.value!==null)&&s,i=this.props.valid!==void 0?this.props.valid:t;return{customError:e,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:i,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:X.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:X.defaultProps.required}get dateInputComp(){return this.props.dateInput||X.defaultProps.dateInput}componentDidMount(){var s;this.observerResize=d.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){const s=this.dateInputElement();this._dateTimeSelector&&this.show&&!this.prevShow&&this._dateTimeSelector.focus({preventScroll:!0}),s&&!this.show&&this.shouldFocusDateInput&&s.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var s;clearTimeout(this.nextTickId),(s=this.document)!=null&&s.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{size:s=X.defaultProps.size,rounded:e=X.defaultProps.rounded,fillMode:t=X.defaultProps.fillMode,disabled:i,tabIndex:a,title:o,id:h,format:u,formatPlaceholder:c,min:p,max:m,className:f,width:v,name:g,validationMessage:C,required:I,validityStyles:T,minTime:D,maxTime:E,ariaLabelledBy:w,ariaDescribedBy:A,popup:O=Qe.Popup}=this.props,P=!this.validityStyles||this.validity.valid,H={id:h,ariaLabelledBy:w,ariaDescribedBy:A,format:u,formatPlaceholder:c,disabled:i,title:o,validityStyles:T,validationMessage:C,required:I,min:p,max:m,minTime:D,maxTime:E,name:g,tabIndex:this.show?-1:a,valid:this.validity.valid,value:this.value,onChange:this.handleValueChange,steps:this.props.steps,label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaExpanded:this.show,size:null,fillMode:null,rounded:null},x=l.createElement(d.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.handleBlur,onSyncFocus:this.props.onFocus,onSyncBlur:this.props.onBlur},({onFocus:V,onBlur:G})=>l.createElement(l.Fragment,null,l.createElement("div",{ref:U=>{this._element=U},className:d.classNames("k-input","k-datetimepicker",{[`k-input-${d.kendoThemeMaps.sizeMap[s]||s}`]:s,[`k-rounded-${d.kendoThemeMaps.roundedMap[e]||e}`]:e,[`k-input-${t}`]:t,"k-invalid":!P,"k-required":this.required,"k-disabled":this.props.disabled},f),onKeyDown:this.handleKeyDown,style:{width:v},onFocus:this.mobileMode?void 0:V,onBlur:G,onClick:this.mobileMode?this.handleDateIconClick:void 0},l.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this._popupId,readonly:this.mobileMode,...H}),l.createElement(N.Button,{tabIndex:-1,type:"button",icon:"calendar",svgIcon:J.calendarIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleDateIconClick,title:k.provideLocalizationService(this).toLanguageString(ye,M[ye]),className:"k-input-button",rounded:null,"aria-label":k.provideLocalizationService(this).toLanguageString(ye,M[ye])}),l.createElement(O,{show:this.show,animate:this.element!==null,anchor:this.element,popupClass:"k-datetime-container k-reset",id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"}},!this.mobileMode&&this.renderPicker())),this.mobileMode&&this.renderAdaptivePopup()));return this.props.label?l.createElement(Ft,{dateInput:this._dateInput,label:this.props.label,editorId:h,editorValid:P,editorDisabled:this.props.disabled,children:x,style:{width:this.props.width}}):x}setShow(s){const{onOpen:e,onClose:t}=this.props;this.show!==s&&(this.setState({show:s}),s&&e&&e.call(void 0,{target:this}),!s&&t&&t.call(void 0,{target:this}))}nextTick(s){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>s())}calculateMedia(s){for(const e of s)this.setState({windowWidth:e.target.clientWidth})}};let Ve=X;Ve.displayName="DateTimePicker";Ve.propTypes={className:n.string,defaultShow:n.bool,defaultValue:n.instanceOf(Date),disabled:n.bool,focusedDate:n.instanceOf(Date),format:n.oneOfType([n.string,n.shape({skeleton:n.string,pattern:n.string,date:n.oneOf(["short","medium","long","full"]),time:n.oneOf(["short","medium","long","full"]),datetime:n.oneOf(["short","medium","long","full"]),era:n.oneOf(["narrow","short","long"]),year:n.oneOf(["numeric","2-digit"]),month:n.oneOf(["numeric","2-digit","narrow","short","long"]),day:n.oneOf(["numeric","2-digit"]),weekday:n.oneOf(["narrow","short","long"]),hour:n.oneOf(["numeric","2-digit"]),hour12:n.bool,minute:n.oneOf(["numeric","2-digit"]),second:n.oneOf(["numeric","2-digit"]),timeZoneName:n.oneOf(["short","long"])})]),formatPlaceholder:n.oneOfType([n.oneOf(["wide","narrow","short","formatPattern"]),n.shape({year:n.string,month:n.string,day:n.string,hour:n.string,minute:n.string,second:n.string})]),id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,min:n.instanceOf(Date),max:n.instanceOf(Date),name:n.string,popupSettings:n.shape({animate:n.bool,appendTo:n.any,popupClass:n.string}),show:n.bool,tabIndex:n.number,title:n.string,value:n.instanceOf(Date),weekNumber:n.bool,width:n.oneOfType([n.number,n.string]),validationMessage:n.string,required:n.bool,validate:n.bool,valid:n.bool,cancelButton:n.bool,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])};Ve.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"g",max:se,min:te,popupSettings:{},tabIndex:0,weekNumber:!1,required:!1,validityStyles:!0,cancelButton:!0,dateInput:ae,size:"medium",rounded:"medium",fillMode:"solid"};const qs=d.createPropsContext(),Ws=d.withIdHOC(d.withPropsContext(qs,Ve));Ws.displayName="KendoReactDateTimePicker";k.registerForLocalization(Ve);exports.Action=b;exports.BusViewService=Et;exports.Calendar=tt;exports.CalendarCell=is;exports.CalendarHeaderTitle=gs;exports.CalendarNavigationItem=ws;exports.CalendarPropsContext=bs;exports.CalendarViewEnum=S;exports.CalendarWeekCell=ns;exports.CalendarWithoutContext=ne;exports.CenturyViewService=ls;exports.DOMService=ds;exports.DateInput=ae;exports.DateInputPropsContext=ks;exports.DateInputWithoutContext=re;exports.DatePicker=Is;exports.DatePickerPropsContext=xs;exports.DatePickerWithoutContext=Me;exports.DateRangePicker=zs;exports.DateRangePickerPropsContext=Hs;exports.DateRangePickerWithoutContext=Oe;exports.DateTimePicker=Ws;exports.DateTimePickerPropsContext=qs;exports.DateTimePickerWithoutContext=Ve;exports.DayPeriodService=Ms;exports.DecadeViewService=hs;exports.EMPTY_SELECTIONRANGE=B;exports.Header=xe;exports.HorizontalViewList=ke;exports.HoursService=Os;exports.MAX_DATE=se;exports.MAX_TIME=oe;exports.MIN_DATE=te;exports.MIN_TIME=de;exports.MinutesService=Ns;exports.MonthViewService=cs;exports.MultiViewCalendar=Ht;exports.MultiViewCalendarPropsContext=As;exports.MultiViewCalendarWithoutContext=Q;exports.NavigationService=Ot;exports.PickerWrap=Cs;exports.ScrollSyncService=ps;exports.SecondsService=Fs;exports.TimeList=Be;exports.TimePart=pe;exports.TimePicker=Bs;exports.TimePickerPropsContext=Ls;exports.TimePickerWithoutContext=Ee;exports.TimeSelector=Te;exports.TodayCommand=Ie;exports.ToggleButton=Ss;exports.ViewList=Le;exports.Virtualization=Ce;exports.WeekNamesService=ms;exports.YearViewService=us;exports.dateInputsMessages=M;exports.decreaseValue=De;exports.end=Ge;exports.getNow=ue;exports.getToday=F;exports.increaseValue=we;exports.separator=Xe;exports.start=Ze;exports.swapStartEnd=be;exports.today=$e;exports.toggleCalendar=je;exports.toggleDateTimeSelector=ye;
package/index.mjs CHANGED
@@ -17,7 +17,7 @@ const Rt = {
17
17
  name: "@progress/kendo-react-dateinputs",
18
18
  productName: "KendoReact",
19
19
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
20
- publishDate: 1704295737,
20
+ publishDate: 1704376922,
21
21
  version: "",
22
22
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
23
23
  }, pi = (s, t, e) => [
@@ -5070,7 +5070,7 @@ const Le = (s = rt.defaultProps.min, t = rt.defaultProps.max, e) => e instanceof
5070
5070
  if (h.isTodayClick)
5071
5071
  this.bus.moveToBottom(this.state.activeView);
5072
5072
  else {
5073
- this.bus.moveDown(this.state.activeView, h.syntheticEvent), this.setState({ focusedDate: u });
5073
+ this.bus.moveDown(this.state.activeView, h.syntheticEvent), this.setState({ focusedDate: u, navigateDate: u });
5074
5074
  return;
5075
5075
  }
5076
5076
  this.calculateFocusFromValue = !0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dateinputs",
3
- "version": "7.0.3-develop.5",
3
+ "version": "7.0.3-develop.7",
4
4
  "description": "React DateInput is a perfect input component for handling quick and efficient date values. KendoReact Date Inputs package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -24,12 +24,12 @@
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-date-math": "^1.4.0",
26
26
  "@progress/kendo-licensing": "^1.3.4",
27
- "@progress/kendo-react-buttons": "7.0.3-develop.5",
28
- "@progress/kendo-react-common": "7.0.3-develop.5",
29
- "@progress/kendo-react-intl": "7.0.3-develop.5",
30
- "@progress/kendo-react-labels": "7.0.3-develop.5",
31
- "@progress/kendo-react-layout": "7.0.3-develop.5",
32
- "@progress/kendo-react-popup": "7.0.3-develop.5",
27
+ "@progress/kendo-react-buttons": "7.0.3-develop.7",
28
+ "@progress/kendo-react-common": "7.0.3-develop.7",
29
+ "@progress/kendo-react-intl": "7.0.3-develop.7",
30
+ "@progress/kendo-react-labels": "7.0.3-develop.7",
31
+ "@progress/kendo-react-layout": "7.0.3-develop.7",
32
+ "@progress/kendo-react-popup": "7.0.3-develop.7",
33
33
  "@progress/kendo-svg-icons": "^2.1.0",
34
34
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
35
35
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"