@progress/kendo-react-dateinputs 14.5.0-develop.2 → 14.5.0-develop.3

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.
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-date-math"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-labels"),require("@progress/kendo-dateinputs-common"),require("@progress/kendo-intl"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-date-math","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-svg-icons","@progress/kendo-react-labels","@progress/kendo-dateinputs-common","@progress/kendo-intl","@progress/kendo-react-popup","@progress/kendo-react-layout"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactDateinputs={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoDateMath,e.KendoReactIntl,e.KendoReactButtons,e.KendoSvgIcons,e.KendoReactLabels,e.KendoDateinputsCommon,e.KendoIntl,e.KendoReactPopup,e.KendoReactLayout)}(this,function(e,t,i,n,s,a,r,o,l,u,c,d,h){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var p=m(t);const g=e=>Math.max(e,0);let v=class{constructor(e){this.offset=e}},f=class{constructor(e){this.skip=e}},w=class{constructor(e,t){this.onScrollAction=e,this.onPageAction=t,this.direction="vertical",this.firstLoaded=0,this.lastLoaded=0,this.lastScrollTop=0,this.take=0,this.total=0,this.rowHeightService=null,this.bottomOffset=0,this.topOffset=0}create(e,t,i,n,s=0,a=0,r="vertical"){this.rowHeightService=e,this.firstLoaded=t,this.lastLoaded=t+i,this.take=i,this.total=n,this.lastScrollTop=0,this.topOffset=s,this.bottomOffset=a,this.direction=r;const o=this.rowsForHeight(s),l=g(t-o);this.onScrollAction(new v(this.rowOffset(l))),this.onPageAction(new f(l))}onScroll({scrollLeft:e,scrollTop:t,offsetHeight:i,offsetWidth:n}){const s="vertical"===this.direction?t:e,a="vertical"===this.direction?i:n;if(this.lastScrollTop===s||!this.rowHeightService)return;const r=this.lastScrollTop>=s;this.lastScrollTop=s;const o=this.rowHeightService.index(g(s-this.topOffset)),l=this.rowHeightService.index(g(s+a-this.bottomOffset));if(!r&&l>=this.lastLoaded&&this.lastLoaded<this.total&&(this.firstLoaded=o,this.onScrollAction(new v(this.rowOffset(o))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new f(this.firstLoaded))),r&&o<=this.firstLoaded){const e=Math.floor(.3*this.take);this.firstLoaded=g(o-e),this.onScrollAction(new v(this.rowOffset(this.firstLoaded))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new f(this.firstLoaded))}}rowOffset(e){return this.rowHeightService?this.rowHeightService.offset(e)+this.topOffset:0}rowsForHeight(e){return this.rowHeightService?Math.ceil(e/this.rowHeightService.height(0)):0}};const b={1:e=>t=>t+e,0:e=>t=>t-e},y={1:e=>t=>Math.min(t,e),0:e=>t=>Math.max(t,e)},D={1:e=>t=>t<e,0:e=>t=>t>e},S={direction:"vertical",scrollOffsetSize:0,maxScrollDifference:100,scrollDuration:100},C=p.forwardRef((e,t)=>{const{direction:i=S.direction,scrollOffsetSize:s=S.scrollOffsetSize,maxScrollDifference:a=S.maxScrollDifference,scrollDuration:r=S.scrollDuration,bottomOffset:o,className:l,tabIndex:u,role:c,children:d,unstyled:h,total:m,take:g,skip:v,topOffset:f,itemHeight:C,itemWidth:k,onMount:x,onScroll:I,onScrollAction:M}=e,E=e=>q.current?q.current[e]:0,T=()=>E("vertical"===i?"offsetHeight":"offsetWidth"),O=()=>E("vertical"===i?"scrollHeight":"scrollWidth"),N=()=>E("vertical"===i?"scrollTop":"scrollLeft"),R=(e,t)=>{const i=N();if(Number.parseInt(`${e}`,10)===Number.parseInt(`${i}`,10))return{start:e,end:e};const n=O()-T(),s=0===t?1:-1,r=((e,t,i)=>Math.min(Math.abs(t-e),i))(i,e,a||0),o=Math.min(e,n);return{start:Math.min(Math.max(o+s*r,0),n),end:o}},V=e=>Y.current?Y.current.index(e):0,P=e=>Y.current?Y.current.offset(e):0,F=()=>V(Math.ceil(N())),L=e=>{if(!Y.current)return!1;const t=N(),i=t+T(),n=Y.current.offset(e),s=n+Y.current.height(e);return n>=t&&s<=i},B=e=>!!Y.current&&N()!==Y.current.offset(e),A=e=>{const t="vertical"===i?"scrollTop":"scrollLeft";if(!q.current)return;const n=q.current[t];j.current&&"scrollTop"===t&&(!Number.isInteger(n)||!Number.isInteger(e))&&Math.abs(n-e)<10||(q.current[t]=e)},H=e=>{$.current=!1,Y.current&&A(Y.current.offset(e))},_=e=>{if(!Y.current||!globalThis)return;globalThis.cancelAnimationFrame(U.current);const t=Y.current.offset(e),i=(e=>e<N()?0:1)(t),{start:n,end:s}=R(t,i);if(n===s)return;const a=((e,t)=>{const i=r||S.scrollDuration;return Math.abs(t-e)/(i/17)})(n,s),o=b[i](a),l=y[i](s),u=D[i](o(s)),c=e=>{$.current=!0;const t=o(e);A(l(t)),u(t)?U.current=globalThis.requestAnimationFrame(()=>{c(t)}):$.current=!1};U.current=globalThis.requestAnimationFrame(()=>{c(n)})},z=()=>{Y.current&&A(Y.current.totalHeight()+o)},K=p.useRef(null),q=p.useRef(null),W=p.useRef(new w(e=>{Z.current=e},e=>{J.current=e})),Y=p.useRef(null),U=p.useRef(0),$=p.useRef(!1),j=p.useRef(Number.parseFloat(p.version)>17),Z=p.useRef(void 0),J=p.useRef(void 0),G=p.useRef(0),X=p.useRef(0),Q=p.useRef(null);p.useImperativeHandle(K,()=>({element:q.current,containerScrollSize:O(),containerScrollPosition:N(),activeIndex:F,scrollTo:A,scrollToIndex:H,animateToIndex:_,scrollToBottom:z,isIndexVisible:L,isListScrolled:B,itemIndex:V,itemOffset:P})),p.useImperativeHandle(t,()=>K.current),p.useEffect(()=>{x&&K.current&&x(K.current)},[]);const ee=null==h?void 0:h.uCalendar;(G.current!==m||Q.current!==i||X.current!==g)&&((()=>{const e="vertical"===i?C:k;void 0!==e&&(Y.current=new n.RowHeightService(m,e),W.current.create(Y.current,v,g,m,f,s,i))})(),G.current=m,Q.current=i,X.current=g);const te=`${(Y.current?Y.current.totalHeight():0)+o}`,ie="vertical"===i?{height:`${te}px`}:{width:`${te}px`},ne=n.classNames(n.uCalendar.scrollableSelector({c:ee}),n.uCalendar.scrollable({c:ee,horizontal:"horizontal"===i}),l),se=n.classNames(n.uCalendar.scrollablePlaceholder({c:ee,horizontal:"horizontal"===i}));return p.createElement("div",{ref:q,onScroll:e=>{if(!q.current||!Y.current)return;const t=e.target;W.current.onScroll({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,offsetHeight:t.offsetHeight,offsetWidth:t.offsetWidth});const i={index:Y.current.index(N()-f),target:t,scrollAction:Z.current,pageAction:J.current,animationInProgress:$.current};I&&I(e),M&&M(i),Z.current=void 0,J.current=void 0},className:ne,tabIndex:u,role:c},d,p.createElement("div",{style:ie,className:se}))});C.propTypes={bottomOffset:i.number.isRequired,className:i.string,direction:i.oneOf(["horizontal","vertical"]),itemHeight:i.number,itemWidth:i.number,maxScrollDifference:i.number,onScroll:i.func,onScrollAction:i.func,scrollDuration:i.number,scrollOffsetSize:i.number,skip:i.number.isRequired,tabIndex:i.number,take:i.number.isRequired,topOffset:i.number.isRequired,total:i.number.isRequired,role:i.string},C.displayName="KendoReactVirtualization";const k=C,x=p.memo(e=>{const{className:t,formattedValue:i,isWeekend:s,isFocused:a,isInRange:r,isSelected:o,isRangeStart:l,isRangeMid:u,isRangeEnd:c,isRangeSplitStart:d,isRangeSplitEnd:h,isToday:m,isDisabled:g,view:v,value:f,isOtherMonth:w,showOtherMonthDays:b,allowReverse:y,unstyled:D,activeRangeEnd:S,children:C,onClick:k,onMouseEnter:x,onMouseLeave:I,...M}=e,E="end"===S&&c,T="start"===S&&l,O=D&&D.uCalendar,N=n.classNames(n.uCalendar.td({c:O,rangeStart:!w&&!y&&l,rangeEnd:!w&&!y&&c,rangeMid:!w&&u,rangeSplitEnd:!w&&h,rangeSplitStart:!w&&d,active:T||E,focused:a,selected:!w&&(o||l||c),today:!w&&m,weekend:s,disabled:g,isOtherMonth:w,isEmpty:!b&&w}),t);return!b&&w?p.createElement("td",{role:"gridcell",className:N}):p.createElement("td",{...M,className:N,onClick:e=>{k&&k(f,e)},onMouseEnter:()=>{x&&x(f)},onMouseLeave:()=>{I&&I(f)}},p.createElement("span",{className:n.classNames(n.uCalendar.link({c:O}))},C))},(e,t)=>{const{value:i,...n}=e,{value:s,...a}=t;return(!(i&&s)||i.getTime()===s.getTime())&&((e,t)=>{const i=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(i.length!==n.length)return!1;for(let n=0;n<i.length;n++){const s=i[n];if(e[s]!==t[s])return!1}return!0})(n,a)}),I=e=>{const{className:t,firstDate:i,weekDays:s,...a}=e,r=n.useUnstyled(),o=r&&r.uCalendar;return p.createElement("td",{className:n.classNames(n.uCalendar.td({c:o,isWeek:!0}),t),...a,onClick:t=>{const{onClick:n}=e;n&&t&&n.call(void 0,i,s||[],t)}},e.children)};var M=(e=>(e[e.month=0]="month",e[e.year=1]="year",e[e.decade=2]="decade",e[e.century=3]="century",e))(M||{});const E={start:null,end:null};function T(e){const t=(t,i,n,...s)=>null===i[n]?null:(t?e.isRequired:e)(i,n,...s),i=t.bind(null,!1);return i.isRequired=t.bind(null,!0),i}const O=(e,t,i)=>void 0===t||void 0===i||t<=e&&e<=i?e:e<t?t:i,N=new Date(1980,0,1),R=new Date(1900,0,1),V=new Date(2099,11,31),P=new Date(1980,0,1),F=new Date(1980,0,1,23,59,59),L=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i},B=()=>s.getDate(new Date),A=(e,t,i)=>!e||!(t&&t>e||i&&i<e),H=(e,t,i)=>null===e||!(t&&s.getDate(t)>s.getDate(e)||i&&s.getDate(i)<s.getDate(e)),_=(e,t)=>{const{start:i,end:n}=t||E;return!(!i||!n)&&(i<e&&e<n)},z=(e,t,i=1)=>{const n=[];for(let s=e;s<t;s+=i)n.push(s);return n},K=(e,t,i)=>t.getTime()<=e.getTime()&&e.getTime()<=i.getTime(),q=(e,t,i)=>e&&(t&&e<t?s.cloneDate(t):i&&e>i?s.cloneDate(i):e),W=e=>(t,i="",n={})=>{const s=document.createElement(e);return s.className=i,Object.keys(n).forEach(e=>{s.style[e]=n[e]}),"string"==typeof t?s.innerHTML=t||"":(t||[]).forEach(e=>e&&s.appendChild(e)),s};function Y(e,t,i={}){let n,s,a,r,o;i.maxWait;const l=window,u=!t&&0!==t&&"function"==typeof l.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function c(e,t){return u?(l.cancelAnimationFrame(r),l.requestAnimationFrame(e)):setTimeout(e,t)}function d(e){const i=e-o;return void 0===o||i>=t||i<0||false}function h(){const e=Date.now();if(d(e))return m();r=c(h,function(e){return t-(e-o)}(e))}function m(t){return r=void 0,n?function(){const t=n,i=s;return n=s=void 0,a=e.apply(i,t),a}():(n=s=void 0,a)}function p(...e){const i=Date.now(),l=d(i);return n=e,s=this,o=i,l&&void 0===r?(r=c(h,t),a):(void 0===r&&(r=c(h,t)),a)}return t=+t||0,p.cancel=function(){void 0!==r&&function(e){if(u)return l.cancelAnimationFrame(e);clearTimeout(e)}(r),n=o=s=r=void 0},p.flush=function(){return void 0===r?a:m()},p.pending=function(){return void 0!==r},p}let U=class{constructor(e){this.intl=e}getWeekNames(e=!1,t){const i=((e,t)=>e.slice(t).concat(e.slice(0,t)))(this.intl.dateFormatNames({nameType:null!=t?t:"short",type:"days"}),this.intl.firstDay());return e?[""].concat(i):i}};const $=(e,t)=>{const i=t;return p.createElement("td",{key:e,role:"gridcell",className:n.classNames(n.uCalendar.td({c:i,isEmpty:!0}))}," ")},j={direction:"vertical",selectedDate:B(),showWeekNumbers:!1},Z=e=>{const{activeRangeEnd:t,activeView:i,bus:r,cellUID:o,direction:l=j.direction,focusedDate:u,weekCell:c,max:d,weekDaysFormat:h,min:m,cell:g,onCellEnter:v,onCellLeave:f,onChange:w,onWeekSelect:b,selectedDate:y=j.selectedDate,selectionRange:D,service:S,showWeekNumbers:C=j.showWeekNumbers,showOtherMonthDays:k,viewDate:E,allowReverse:T,unstyled:O}=e,N="horizontal"===l,R=i===M.month,V=!(!C||i!==M.month),P=(e,t)=>{if(w&&t){const i={value:s.cloneDate(e),target:null,nativeEvent:null==t?void 0:t.nativeEvent,syntheticEvent:t};w(i)}},F=(e,t,i)=>{const n=t.findIndex(t=>(null==t?void 0:t.value)===e);b&&i&&b(e,n,i)},A=e=>{v&&v(s.cloneDate(e))},H=e=>{f&&f(s.cloneDate(e))},_=a.useInternationalization(),z=new U(_),K=O&&O.uCalendar,q=e=>{const t=(e=>{if(!V)return null;let t=0,i=e[t];for(;!i&&t<e.length;)i=e[++t];return i})(e);return t?t.value:null},W=(e,t)=>{if(!q(e))return $(`week-cell-${t}`);const i=q(e),n=(e=>V?s.weekInYear(e,_.firstDay()):null)(i),a=`kendo-react-calendar-week-cell-${n}`,r={value:n,firstDate:i,weekDays:e,unstyled:O,onClick:F};return c?p.createElement(c,{...r,key:a},n):p.createElement(I,{...r,key:a},n)},Y=z.getWeekNames(V,h),Z=S.rowLength(V),J=S.title(E),G=B(),X=L(E,G),Q=S.data({cellUID:o,min:m,max:d,focusedDate:u,isActiveView:!r.canMoveDown(i),selectedDate:y,selectionRange:D,viewDate:X});return p.createElement(p.Fragment,null,R&&N&&p.createElement("thead",{className:n.classNames(n.uCalendar.thead({c:K}))},p.createElement("tr",{role:"row",className:n.classNames(n.uCalendar.tr({c:K}))},Y.map(e=>p.createElement("th",{key:e,className:n.classNames(n.uCalendar.th({c:K}))},e)))),p.createElement("tbody",{className:n.classNames(n.uCalendar.tbody({c:K}))},!N&&p.createElement("tr",{className:n.classNames(n.uCalendar.tr({c:K}))},p.createElement("th",{scope:"col",colSpan:Z,className:n.classNames(n.uCalendar.caption({c:K}))},J)),Q.map((e,s)=>{var a,r;const o=null!=(r=null==(a=e.find(e=>null!=e))?void 0:a.value.getTime())?r:s;return p.createElement("tr",{role:"row",className:n.classNames(n.uCalendar.tr({c:K})),key:o},V&&W(e,s),(e=>e.map((e,n)=>{if(!e)return $(n);const s={"aria-selected":e.isSelected},a=`kendo-react-calendar-cell-${e.value.getTime()}`,r={...s,...e,isDisabled:!e.isInRange,view:i,showOtherMonthDays:k,allowReverse:T,activeRangeEnd:t,unstyled:O,onClick:P,onMouseEnter:A,onMouseLeave:H};return g?p.createElement(g,{...r,key:a},e.formattedValue):p.createElement(x,{...r,key:a},e.formattedValue)}))(e))})))},J=e=>{const{view:t,...i}=e;return p.createElement(r.Button,{type:"button",fillMode:"flat",themeColor:"primary",...i},e.children)},G={rangeLength:1,min:R,max:V},X=e=>{const{activeView:t,bus:i,currentDate:s,max:a=G.max,min:r=G.min,rangeLength:o=G.rangeLength,service:l,headerTitle:u,header:c,commands:d,verticalView:h,unstyled:m}=e,g=m&&m.uCalendar,v=i.canMoveUp(t),f=(()=>{if(!s)return"";const e=o-1,t=l.title(s),i=l.addToDate(s,e);return e<1||!l.isInRange(i,r,a)?t:`${t} - ${l.title(i)}`})(),w=n.classNames(n.uCalendar.title({c:g})),b={children:f,value:f,view:t,className:w,onClick:e=>{i.canMoveUp(t)&&i.moveUp(t,e)},disabled:!v},y={headerTitleProps:b,commands:d},D=u?p.createElement(u,{...b},f):p.createElement(J,{...b},f),S=c?p.createElement(c,{...y}):p.createElement(p.Fragment,null,D,p.createElement("span",{className:n.classNames(n.uCalendar.spacer({c:g}))}),p.createElement("span",{className:n.classNames(n.uCalendar.nav({c:g}))},d));return p.createElement("div",{className:n.classNames(n.uCalendar.header({c:g,vertical:h}))},S)},Q="multiviewcalendar.prevView",ee="multiviewcalendar.nextView",te="dateinput.increment",ie="dateinput.decrement",ne="dateinput.clear",se="calendar.today",ae="datepicker.toggleCalendar",re="daterangepicker.swapStartEnd",oe="daterangepicker.start",le="daterangepicker.end",ue="daterangepicker.separator",ce="datetimepicker.toggleDateTimeSelector",de="timepicker.now",he="timepicker.selectNow",me="timepicker.cancel",pe="timepicker.set",ge="timepicker.toggleTimeSelector",ve="timepicker.toggleClock",fe="datetimepicker.date",we="datetimepicker.time",be="datetimepicker.cancel",ye="datetimepicker.set",De="daterangepicker.cancel",Se="daterangepicker.set",Ce={[se]:"Today",[de]:"NOW",[pe]:"Set",[me]:"Cancel",[fe]:"Date",[we]:"Time",[be]:"Cancel",[ye]:"Set",[De]:"Cancel",[Se]:"Set",[oe]:"Start",[le]:"End",[ue]:" ",[he]:"Select Now",[ge]:"Toggle TimeSelector",[ve]:"Toggle Clock",[te]:"Increase value",[ie]:"Decrease value",[ne]:"clear",[ae]:"Toggle calendar",[Q]:"Navigate to previous view",[ee]:"Navigate to next view",[re]:"Swap start and end values",[ce]:"Toggle date-time selector"},ke={min:R,max:V},xe=e=>{const{min:t=ke.min,max:i=ke.max,onClick:o,disabled:l,tabIndex:u,unstyled:c}=e,d=a.useLocalization(),h=c&&c.uCalendar,m=d.toLanguageString(se,Ce[se]),g=n.classNames(n.uCalendar.today({c:h,disabled:l}));return p.createElement(r.Button,{className:g,onClick:e=>{if(A(B(),s.getDate(t),s.getDate(i))&&o){const n={syntheticEvent:e,nativeEvent:e.nativeEvent,value:q(B(),t,i),target:null,isTodayClick:!0};o(n)}},tabIndex:u,fillMode:"flat",themeColor:"base",role:"link"},m)},Ie={take:5,showWeekNumbers:!1,weekDaysFormat:"short",smoothScroll:!0},Me=p.forwardRef((e,t)=>{const{take:i=Ie.take,showWeekNumbers:r=Ie.showWeekNumbers,weekDaysFormat:o=Ie.weekDaysFormat,smoothScroll:l=Ie.smoothScroll,activeView:u,bus:c,cellUID:d,dom:h,focusedDate:m,max:g,min:v,cell:f,onScroll:w,onChange:b,service:y,value:D,weekCell:S,showOtherMonthDays:C,headerTitle:x,header:I,shouldScroll:E,tabIndex:T,unstyled:O}=e,N=!(!r||u!==M.month),R=A(B(),s.getDate(v),s.getDate(g)),V=()=>{if(!_.current)return;const e=_.current.querySelector("td.k-focus"),t=_.current.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),Y.current=!0},P=()=>{if(!_.current)return;const e=_.current.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),Y.current=!1},F=(e,t=!1)=>{if(b){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:s.cloneDate(e.value),target:H.current,isTodayClick:t};b(i)}},L=p.useRef(null),H=p.useRef(null);p.useImperativeHandle(H,()=>({get element(){return _.current},get virtualization(){return L.current},focusActiveDate:V,blurActiveDate:P})),p.useImperativeHandle(t,()=>H.current);const _=p.useRef(null),z=p.useRef(null),K=p.useRef(u),W=p.useRef(m),Y=p.useRef(!1),$=p.useRef(!0),j=p.useRef(!1),J=p.useRef(void 0),[G,Q]=p.useState(()=>{const e=y.skip(m,v);return{skip:e,index:e}});p.useEffect(()=>{if(j.current=!1,void 0!==J.current&&L.current){const e=!(!l||!$.current);L.current[e?"animateToIndex":"scrollToIndex"](J.current)}Y.current&&V(),K.current=u,J.current=void 0});const ee=a.useInternationalization(),te=new U(ee).getWeekNames(N,o),ie=O&&O.uCalendar;let ne=0,se=0,ae=1;h&&(ne=(u===M.month?h.scrollableContentHeight:h.scrollableYearContentHeight)-h.viewHeight(u),se=-1*h.headerHeight,ae=h.viewHeight(u)||1);const re=K.current!==u,oe=q(m,v,g),le=re?y.skip(oe,v):G.skip,ue=y.total(v,g),ce=Math.min(ue-le,i),de=y.addToDate(v,le),he=y.addToDate(v,G.index),me=Array.from({length:y.rowLength(N)},(e,t)=>t),pe=u!==K.current;$.current=!pe,(pe||!s.isEqualDate(W.current,oe)||j.current||!E||E())&&(J.current=y.skip(oe,v)),W.current=oe;const ge=n.classNames(n.uCalendar.view({c:ie,month:u===M.month,year:u===M.year,decade:u===M.decade,century:u===M.century})),ve=p.createElement("table",{className:n.classNames(n.uCalendar.table({c:ie})),ref:z,role:"grid",tabIndex:null!=T?T:0,"aria-activedescendant":d+m.getTime()},p.createElement("colgroup",null,me.map(e=>p.createElement("col",{key:e}))),y.datesList(de,ce).map(e=>p.createElement(Z,{key:e.getTime(),activeView:u,viewDate:e,min:v,max:g,cellUID:d,focusedDate:m,cell:f,selectedDate:D,showWeekNumbers:N,onChange:F,bus:c,service:y,weekCell:S,showOtherMonthDays:C,unstyled:O}))),fe=u===M.month?p.createElement("table",{key:"calendar-view-list-weekdays",className:n.classNames(n.uCalendar.table({c:ie,weekdays:!0})),role:"grid",tabIndex:T},p.createElement("colgroup",null,me.map(e=>p.createElement("col",{key:e}))),p.createElement("thead",{className:n.classNames(n.uCalendar.thead({c:ie}))},p.createElement("tr",{className:n.classNames(n.uCalendar.tr({c:ie}))},te.map(e=>p.createElement("th",{key:e,className:n.classNames(n.uCalendar.th({c:ie}))},e))))):null,we=p.createElement(p.Fragment,null,p.createElement(X,{key:"calendar-view-list-header",currentDate:he,min:v,max:g,activeView:u,bus:c,service:y,headerTitle:x,header:I,unstyled:O,commands:p.createElement(xe,{min:v,max:g,onClick:e=>{j.current=!0,F(e,!0)},disabled:!R,tabIndex:T,unstyled:O})}),fe,p.createElement(k,{key:"calendar-view-list-content",skip:le,take:i,total:ue,itemHeight:ae,topOffset:se,bottomOffset:ne,scrollOffsetSize:se,maxScrollDifference:ae,onScroll:w,onScrollAction:({index:e,scrollAction:t,pageAction:i})=>{const n=i?i.skip:void 0;if(Q(t=>{const i=void 0!==n?n:t.skip;return t.index!==e||t.skip!==i?{index:e,skip:i}:t}),z.current&&t){const e=`translateY(${t.offset}px)`;z.current.style.transform=e}},onMount:e=>!L.current&&(e=>{if(L.current=e,L.current&&z.current){const e=-1*h.headerHeight;z.current.style.transform=`translateY(${e}px)`;const t=q(m,v,g),i=y.skip(t,v);L.current.scrollToIndex(i)}})(e),tabIndex:T,unstyled:O},ve));return p.createElement("div",{ref:_,className:ge},h.didCalculate?we:null)});Me.displayName="KendoReactViewList";const Ee=Me,Te=e=>{const{className:t,isRangeStart:i,value:s,text:a,view:r,...o}=e,l=n.useUnstyled(),u=l&&l.uCalendar;return p.createElement("li",{...o,onClick:t=>{var i;null==(i=e.onClick)||i.call(e,s,t)},className:n.classNames(n.uCalendar.li({c:u}),t)},p.createElement("span",{className:n.classNames(n.uCalendar.navigationMarker({c:u,isRangeStart:i}))},e.children))},Oe={take:30},Ne=p.forwardRef((e,t)=>{const{take:i=Oe.take,activeView:a,dom:r,focusedDate:o,max:l,min:u,onScroll:c,onChange:d,service:h,navigationItem:m,tabIndex:g,unstyled:v}=e,f=(e,t)=>{if(d&&t){const i={value:s.cloneDate(e),target:b.current,nativeEvent:null==t?void 0:t.nativeEvent,syntheticEvent:t};d(i)}},w=p.useRef(null),b=p.useRef(null);p.useImperativeHandle(b,()=>({get virtualization(){return w.current}})),p.useImperativeHandle(t,()=>b.current);const y=p.useRef(null),D=p.useRef(a),S=p.useRef(o),C=p.useRef(void 0),[x,I]=p.useState(()=>{const e=h.skip(o,u),t=h.total(u,l);return{skip:e-Math.min(t-e,i)>0?e:0}});p.useEffect(()=>{void 0!==C.current&&w.current&&w.current.scrollToIndex(C.current),D.current=a,S.current=o,C.current=void 0});const M=r.calendarHeight,E=r.navigationItemHeight||1,T=r.monthViewHeight,O=(M-E)/2,N=M-E,R=v&&v.uCalendar,V=D.current!==a,P=q(o,u,l),F=V?h.skip(P,u):x.skip,L=h.total(u,l),B=Math.min(L-F,i),A=h.addToDate(u,F),H=h.datesList(A,B);(a!==D.current||!s.isEqual(P,S.current))&&(C.current=h.skip(P,u));const _=p.createElement(k,{skip:F,take:i,total:L,itemHeight:E,topOffset:O,bottomOffset:N,onScroll:c,maxScrollDifference:T,onScrollAction:({scrollAction:e,pageAction:t})=>{const i=t?t.skip:void 0;if(void 0!==i&&I(e=>e.skip!==i?{skip:i}:e),y.current&&e){const t=`translateY(${e.offset}px)`;y.current.style.transform=t}},onMount:e=>!w.current&&(e=>{if(w.current=e,w.current&&y.current){const e=(r.calendarHeight-(r.navigationItemHeight||1))/2;y.current.style.transform=`translateY(${e}px)`;const t=q(o,u,l),i=h.skip(t,u);w.current.scrollToIndex(i)}})(e),tabIndex:g,unstyled:v},p.createElement("ul",{ref:y,className:n.classNames(n.uCalendar.ul({c:R}))},H.map(e=>(e=>{const t=h.navigationTitle(e),i=h.isRangeStart(e),n=`kendo-react-calendar-nav-item-${e.getTime()}`,s={text:t,value:e,isRangeStart:i,view:a,onClick:f};return m?p.createElement(m,{...s,key:n},t):p.createElement(Te,{...s,key:n},t)})(e))));return p.createElement("div",{className:n.classNames(n.uCalendar.navigation({c:R}))},p.createElement("span",{className:n.classNames(n.uCalendar.navigationHighlight({c:R}))}),r.didCalculate?_:null)});Ne.displayName="KendoReactNavigation";const Re=Ne;var Ve=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down",e[e.PrevView=4]="PrevView",e[e.NextView=5]="NextView",e[e.FirstInView=6]="FirstInView",e[e.LastInView=7]="LastInView",e[e.LowerView=8]="LowerView",e[e.UpperView=9]="UpperView",e))(Ve||{});const Pe=[[]],Fe={[Ve.Left]:e=>s.addDecades(e,-1),[Ve.Up]:e=>s.addDecades(e,-5),[Ve.Right]:e=>s.addDecades(e,1),[Ve.Down]:e=>s.addDecades(e,5),[Ve.PrevView]:e=>s.addCenturies(e,-1),[Ve.NextView]:e=>s.addCenturies(e,1),[Ve.FirstInView]:e=>s.firstDecadeOfCentury(e),[Ve.LastInView]:e=>s.lastDecadeOfCentury(e)};let Le=class{addToDate(e,t){return s.addCenturies(e,t)}datesList(e,t){return z(0,t).map(t=>s.addCenturies(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return Pe;const c=z(0,4),d=s.firstDecadeOfCentury(u),h=s.lastDecadeOfCentury(u),m=B();return z(0,3).map(e=>{const u=s.addDecades(d,4*e);return c.map(e=>{const c=this.normalize(s.addDecades(u,e),r,a),p=this.isEqual(c,l.start),g=this.isEqual(c,l.end),v=!p&&!g&&_(c,l),f=n&&(Array.isArray(o)?this.isSelectedFromArray(c,o,r,a):A(o,r,a)&&this.isEqual(c,o));return K(c,d,h)?{formattedValue:this.value(c),id:`${t}${c.getTime()}`,isFocused:this.isEqual(c,i),isSelected:f,isWeekend:!1,isInRange:A(c,r,a),isRangeStart:p,isRangeMid:v,isRangeEnd:g,isRangeSplitEnd:v&&this.isEqual(c,h),isRangeSplitStart:v&&this.isEqual(c,d),isToday:this.isEqual(c,m),title:this.cellTitle(c),value:c}:null})})}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isEqual(e,t){return!(!e||!t)&&s.firstYearOfDecade(e).getFullYear()===s.firstYearOfDecade(t).getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+99}isInRange(e,t,i){const n=s.firstYearOfDecade(e).getFullYear(),a=!t||s.firstYearOfDecade(t).getFullYear()<=n,r=!i||n<=s.firstYearOfDecade(i).getFullYear();return a&&r}isInSameView(e,t){return 0===s.durationInCenturies(e,t)}isRangeStart(e){return e.getFullYear()%1e3==0}move(e,t){const i=Fe[t];return i?i(e):e}cellTitle(e){return s.firstYearOfDecade(e).getFullYear().toString()}navigationTitle(e){return e?s.firstDecadeOfCentury(e).getFullYear().toString():""}title(e){return e?`${s.firstDecadeOfCentury(e).getFullYear()} - ${s.lastDecadeOfCentury(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInCenturies(t,e)}total(e,t){return s.durationInCenturies(e,t)+1}value(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInCenturies(e,t)<i?s.addCenturies(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}};const Be=[[]],Ae={[Ve.Left]:e=>s.addYears(e,-1),[Ve.Up]:e=>s.addYears(e,-5),[Ve.Right]:e=>s.addYears(e,1),[Ve.Down]:e=>s.addYears(e,5),[Ve.PrevView]:e=>s.addDecades(e,-1),[Ve.NextView]:e=>s.addDecades(e,1),[Ve.FirstInView]:e=>s.firstYearOfDecade(e),[Ve.LastInView]:e=>s.lastYearOfDecade(e)};class He{addToDate(e,t){return s.addDecades(e,t)}datesList(e,t){return z(0,t).map(t=>s.addDecades(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return Be;const c=z(0,4),d=s.firstYearOfDecade(u),h=s.lastYearOfDecade(u),m=B();return z(0,3).map(e=>{const u=s.addYears(d,4*e);return c.map(e=>{const c=this.normalize(s.addYears(u,e),r,a),p=this.isEqual(c,l.start),g=this.isEqual(c,l.end),v=!p&&!g&&_(c,l),f=n&&(Array.isArray(o)?this.isSelectedFromArray(c,o,r,a):A(o,r,a)&&this.isEqual(c,o));return K(c,d,h)?{formattedValue:this.value(c),id:`${t}${c.getTime()}`,isFocused:this.isEqual(c,i),isSelected:f,isWeekend:!1,isInRange:A(c,r,a),isRangeStart:p,isRangeMid:v,isRangeEnd:g,isRangeSplitEnd:v&&this.isEqual(c,h),isRangeSplitStart:v&&this.isEqual(c,d),isToday:this.isEqual(c,m),title:this.cellTitle(c),value:c}:null})})}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isEqual(e,t){return!(!e||!t)&&e.getFullYear()===t.getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+9}isInRange(e,t,i){const n=e.getFullYear(),s=!t||t.getFullYear()<=n,a=!i||n<=i.getFullYear();return s&&a}isRangeStart(e){return e.getFullYear()%100==0}isInSameView(e,t){return 0===s.durationInDecades(e,t)}move(e,t){const i=Ae[t];return i?i(e):e}cellTitle(e){return e.getFullYear().toString()}navigationTitle(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}title(e){return e?`${s.firstYearOfDecade(e).getFullYear()} - ${s.lastYearOfDecade(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInDecades(t,e)}total(e,t){return s.durationInDecades(e,t)+1}value(e){return e?e.getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInDecades(e,t)<i?s.addDecades(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}}const _e=[[]],ze={[Ve.Left]:e=>s.addDays(e,-1),[Ve.Up]:e=>s.addWeeks(e,-1),[Ve.Right]:e=>s.addDays(e,1),[Ve.Down]:e=>s.addWeeks(e,1),[Ve.PrevView]:e=>s.addMonths(e,-1),[Ve.NextView]:e=>s.addMonths(e,1),[Ve.FirstInView]:e=>s.firstDayOfMonth(e),[Ve.LastInView]:e=>s.lastDayOfMonth(e)};class Ke{constructor(e){this.intl=e}addToDate(e,t){return s.addMonths(e,t)}datesList(e,t){return z(0,t).map(t=>s.addMonths(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return _e;const c=s.firstDayOfMonth(u),d=s.lastDayOfMonth(u),h=s.dayOfWeek(c,this.intl.firstDay(),-1),m=z(0,7),p=B();return z(0,6).map(e=>{const u=s.addDays(h,7*e);return m.map(e=>{const h=this.normalize(s.addDays(u,e),r,a),m=h<c||h>d,g=this.isEqual(h,l.start),v=this.isEqual(h,l.end),f=!g&&!v&&_(h,l),w=n&&(Array.isArray(o)?this.isSelectedFromArray(h,o,r,a):A(o,r,a)&&this.isEqual(h,o)),b=this.isEqual(h,i)&&!m;return{formattedValue:this.value(h),id:`${t}${h.getTime()}`,isFocused:b,isSelected:w,isInRange:A(h,r,a),isWeekend:this.isWeekend(h),isRangeStart:g,isRangeMid:f,isRangeEnd:v,isRangeSplitStart:f&&this.isEqual(h,c),isRangeSplitEnd:f&&this.isEqual(h,d),isToday:this.isEqual(h,p),title:this.cellTitle(h),value:h,isOtherMonth:m}})})}isEqual(e,t){return!(!e||!t)&&s.getDate(e).getTime()===s.getDate(t).getTime()}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isInArray(e,t){return!!t.length&&s.firstDayOfMonth(t[0])<=e&&e<=s.lastDayOfMonth(t[t.length-1])}isInRange(e,t,i){const n=s.getDate(e),a=!t||s.getDate(t)<=n,r=!i||n<=s.getDate(i);return a&&r}isInSameView(e,t){return 0===s.durationInMonths(e,t)}isRangeStart(e){return!e.getMonth()}move(e,t){const i=ze[t];return i?i(e):e}cellTitle(e){return this.intl.formatDate(e,"D")}navigationTitle(e){return e?this.isRangeStart(e)?e.getFullYear().toString():this.abbrMonthNames()[e.getMonth()]:""}title(e){return`${this.wideMonthNames()[e.getMonth()]} ${e.getFullYear()}`}rowLength(e){return 7+(e?1:0)}skip(e,t){return s.durationInMonths(t,e)}total(e,t){return s.durationInMonths(e,t)+1}value(e){return e?e.getDate().toString():""}viewDate(e,t,i=1){return s.durationInMonths(e,t)<i?s.addMonths(e,-1):e}isWeekend(e){const t=e.getDay();return 6===t||0===t}abbrMonthNames(){return this.intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.getDate(t):e>i&&this.isEqual(e,i)?s.getDate(i):e}wideMonthNames(){return this.intl.dateFormatNames({nameType:"wide",type:"months",standAlone:!0})}}const qe=[[]],We={[Ve.Left]:e=>s.addMonths(e,-1),[Ve.Up]:e=>s.addMonths(e,(e=>e>4?-5:e<2?-2:-7)(e.getMonth())),[Ve.Right]:e=>s.addMonths(e,1),[Ve.Down]:e=>s.addMonths(e,(e=>e<7?5:e<10?7:2)(e.getMonth())),[Ve.PrevView]:e=>s.addYears(e,-1),[Ve.NextView]:e=>s.addYears(e,1),[Ve.FirstInView]:e=>s.firstMonthOfYear(e),[Ve.LastInView]:e=>s.lastMonthOfYear(e)};let Ye=class{constructor(e){this._intl=e}addToDate(e,t){return s.addYears(e,t)}datesList(e,t){return z(0,t).map(t=>s.addYears(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return qe;const c=this.abbrMonthNames(),d=s.firstMonthOfYear(u),h=s.lastMonthOfYear(u),m=d.getFullYear(),p=z(0,4),g=B();return z(0,3).map(e=>{const u=s.addMonths(d,4*e);return p.map(e=>{const p=this.normalize(s.addMonths(u,e),r,a);if(m<p.getFullYear())return null;const v=this.isEqual(p,l.start),f=this.isEqual(p,l.end),w=!v&&!f&&_(p,l),b=n&&(Array.isArray(o)?this.isSelectedFromArray(p,o,r,a):A(o,r,a)&&this.isEqual(p,o));return{formattedValue:c[p.getMonth()],id:`${t}${p.getTime()}`,isFocused:this.isEqual(p,i),isSelected:b,isInRange:A(p,r,a),isWeekend:!1,isRangeStart:v,isRangeMid:w,isRangeEnd:f,isRangeSplitEnd:w&&this.isEqual(p,h),isRangeSplitStart:w&&this.isEqual(p,d),isToday:this.isEqual(p,g),title:this.cellTitle(p),value:p}})})}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isEqual(e,t){return!(!e||!t)&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()}isInRange(e,t,i){const n=s.createDate(e.getFullYear(),e.getMonth(),1),a=!t||s.createDate(t.getFullYear(),t.getMonth(),1)<=n,r=!i||n<=s.createDate(i.getFullYear(),i.getMonth(),1);return a&&r}isInSameView(e,t){return 0===s.durationInYears(e,t)}isRangeStart(e){return e.getFullYear()%10==0}move(e,t){const i=We[t];return i?i(e):e}cellTitle(e){return`${e.getFullYear()} ${this.value(e)}`}navigationTitle(e){return this.title(e)}title(e){return e?e.getFullYear().toString():""}rowLength(e){return 4}skip(e,t){return s.durationInYears(t,e)}total(e,t){return s.durationInYears(e,t)+1}value(e){return e?this.abbrMonthNames()[e.getMonth()]:""}viewDate(e,t,i=1){return s.durationInYears(e,t)<i?s.addYears(e,-1):e}abbrMonthNames(){return this._intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}};const Ue={[M.month]:Ke,[M.year]:Ye,[M.decade]:He,[M.century]:Le};let $e=class{constructor(e){this.bottom=M.month,this.top=M.century,this.onViewChanged=e}configure(e,t){this.bottom=e,this.top=t}service(e,t){return new Ue[`${e}`](t)}moveDown(e,t){this.move(e,-1,t)}moveUp(e,t){this.move(e,1,t)}moveToBottom(e){e!==this.bottom&&this.onViewChanged({view:this.bottom})}canMoveDown(e){return this.bottom<e}canMoveUp(e){return e<this.top}clamp(e){return e<this.bottom?this.bottom:e>this.top?this.top:e}move(e,t,i){const n=this.clamp(((e,t)=>{const i=M[M[e+t]];return void 0!==i?i:e})(e,t));n!==e&&this.onViewChanged({view:n},i)}},je=class{constructor(){this.calendarHeight=0,this.headerHeight=0,this.monthViewHeight=0,this.yearViewHeight=0,this.decadeViewHeight=0,this.centuryViewHeight=0,this.navigationItemHeight=0,this.scrollableContentHeight=0,this.scrollableYearContentHeight=0,this.calendarWidth=0,this.monthViewWidth=0,this.yearViewWidth=0,this.decadeViewWidth=0,this.centuryViewWidth=0,this.scrollableContentWidth=0,this.didCalculate=!1,this.hostContainer=null}ensureHeights(){void 0===this.calendarHeight&&this.calculateHeights()}calculateHeights(e,t){if(!n.canUseDOM)return;const i=W("div"),s=W("ul"),a=W("li"),r=W("td"),o=W("th"),l=W("tr"),u=W("tbody"),c=W("thead"),d=W("table"),h=t&&t.uCalendar,m=t&&t.uButton,p=n.strippedClassNames(n.uButton.wrapper({c:m,fillMode:"flat",size:"medium",rounded:"medium",themeColor:"primary"}),n.uCalendar.title({c:h})),g=()=>i(`\n <span class="${p}">\n <span class="${n.strippedClassNames(n.uButton.text({c:m}))}">March 2017</span>\n </span>\n <span class="${n.strippedClassNames(n.uCalendar.spacer({c:h}))}"></span>\n <span class="${n.strippedClassNames(n.uCalendar.nav({c:h}))}"><button class="${n.strippedClassNames(n.uCalendar.today({c:h}))}">TODAY</button></span>\n `,n.strippedClassNames(n.uCalendar.header({c:h,vertical:!0}))),v=(e,t)=>new Array(e).fill("1").map(t),f=e=>i(e,n.strippedClassNames(n.uCalendar.scrollableSelector({c:h}),n.uCalendar.scrollable({c:h,horizontal:!0}))),w=(()=>{let e;return()=>n.canUseDOM?(e||(e=i([f([s([a("<span>FEB</span>")])])],n.strippedClassNames(n.uCalendar.navigation({c:h})),{left:"0px",position:"absolute"})),e):null})(),b=({cells:e,rows:t},s,a)=>{let m;return()=>n.canUseDOM?(m||(m=((e,t,s)=>i(s?[g(),d([c([l([o("MO",n.strippedClassNames(n.uCalendar.th({c:h})))],n.strippedClassNames(n.uCalendar.tr({c:h})))],n.strippedClassNames(n.uCalendar.thead({c:h})))],n.strippedClassNames(n.uCalendar.table({c:h,weekdays:!0}))),f([e,e])]:[g(),f([e,e])],t,{left:"-10000px",position:"absolute"}))(((e,t=1)=>d([u([l([r("1",n.strippedClassNames(n.uCalendar.td({c:h,isWeek:!0})))])].concat(v(e,()=>l(v(t,e=>r(`<span class="${n.strippedClassNames(n.uCalendar.link({c:h}))}">${e}</span>`,n.strippedClassNames(n.uCalendar.td({c:h})))),n.strippedClassNames(n.uCalendar.tr({c:h}))))),n.strippedClassNames(n.uCalendar.tbody({c:h})))],n.strippedClassNames(n.uCalendar.table({c:h}))))(t,e),s,a)),m):null},y=e=>e.querySelector(`.${n.strippedClassNames(n.uCalendar.scrollableSelector({c:h}))}`),D=e=>{const t=y(e);return t.className=`${t.className} scrollable-horizontal`,e},S=b({cells:7,rows:6},n.strippedClassNames(n.uCalendar.view({c:h,month:!0})),!0),C=b({cells:5,rows:3},n.strippedClassNames(n.uCalendar.view({c:h,year:!0})),!1),k=b({cells:5,rows:2},n.strippedClassNames(n.uCalendar.view({c:h,decade:!0})),!1),x=e=>parseFloat(window.getComputedStyle(e).height)||e.offsetHeight,I=e=>{const t=window.getComputedStyle(e);return parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)||e.offsetWidth},M=e=>e.querySelector("tbody");this.didCalculate=!0,e&&(this.hostContainer=e),this.batch(S(),e=>{const t=M(e);this.calendarHeight=x(e),this.monthViewHeight=x(t),this.headerHeight=x(t.children[0]),this.scrollableContentHeight=x(y(e))}),this.batch(D(S()),e=>{const t=M(e);this.calendarWidth=I(e),this.monthViewWidth=I(t),this.scrollableContentWidth=I(y(e))}),this.batch(C(),e=>{this.yearViewHeight=x(M(e)),this.scrollableYearContentHeight=x(y(e))}),this.batch(D(C()),e=>{this.yearViewWidth=I(M(e))}),this.batch(k(),e=>{this.decadeViewHeight=x(M(e)),this.centuryViewHeight=this.decadeViewHeight}),this.batch(D(k()),e=>{this.decadeViewWidth=I(M(e)),this.centuryViewWidth=this.decadeViewWidth}),this.batch(w(),e=>{this.navigationItemHeight=x(e.querySelector("li"))})}viewHeight(e){return this.viewDimension(e,"height")}viewWidth(e){return this.viewDimension(e,"width")}viewDimension(e,t){const i="height"===t?"ViewHeight":"ViewWidth";switch(e){case M.month:return this[`month${i}`];case M.year:return this[`year${i}`];case M.decade:return this[`decade${i}`];case M.century:return this[`century${i}`];default:return 1}}batch(e,t){const i=this.hostContainer||document.body,n=i.appendChild(e);t(n),i.removeChild(n)}};const Ze={33:Ve.PrevView,34:Ve.NextView,35:Ve.LastInView,36:Ve.FirstInView,37:Ve.Left,38:Ve.Up,39:Ve.Right,40:Ve.Down,"meta+38":Ve.UpperView,"meta+40":Ve.LowerView};let Je=class{constructor(e){this.bus=e}action(e){const t=`${e.ctrlKey||e.metaKey?"meta+":""}${e.keyCode}`;return Ze[t]}move(e,t,i,n,s){return n?t===Ve.UpperView&&this.bus.canMoveUp(i)?(this.bus.moveUp(i,s),e):t===Ve.LowerView&&this.bus.canMoveDown(i)?(this.bus.moveDown(i,s),e):n.move(e,t):e}};class Ge{constructor(e){this.dom=e,this.divideByMagnitude=null,this.powerByMagnitude=null,this.navigator=null,this.view=null,this.monthScrolled=!1,this.navScrolled=!1}configure(e){const t=Math.max(this.dom.viewHeight(e)/this.dom.navigationItemHeight,1);this.divideByMagnitude=(e=>t=>Math.floor(t/e))(t),this.powerByMagnitude=(e=>t=>t*e)(t)}sync(e,t,i){if(e&&t){if(this.navigator=e,this.view=t,i.target===this.navigator.element){if(this.monthScrolled)return void(this.monthScrolled=!1);this.navScrolled=!0,this.scrollSiblingOf(this.navigator.element)}if(i.target===this.view.element){if(this.navScrolled)return void(this.navScrolled=!1);this.monthScrolled=!0,this.scrollSiblingOf(this.view.element)}}}scrollSiblingOf(e){const t=this.siblingComponent(e),i=this.calculateScroll(t,e.scrollTop);t.scrollTo(i)}siblingComponent(e){return this.navigator.element===e?this.view:this.navigator}calculateScroll(e,t){const i=e===this.navigator?this.divideByMagnitude:this.powerByMagnitude;return i?i(t):0}}const Xe=e=>e?e.virtualization:null,Qe=(e,t,i=et.min,n=et.max)=>void 0!==t?null!==t&&A(s.getDate(t),i,n)?t:null:null!==e&&A(s.getDate(e),i,n)?e:null,et={disabled:!1,min:R,max:V,weekDaysFormat:"short",navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",bottomView:"month",showOtherMonthDays:!1},tt=n.createPropsContext(),it=p.forwardRef((e,t)=>{const i=n.usePropsContext(tt,e),r=n.useUnstyled(),o=n.useId(i.id),l=a.useInternationalization(),{disabled:u=et.disabled,min:c=et.min,max:d=et.max,weekDaysFormat:h=et.weekDaysFormat,navigation:m=et.navigation,defaultActiveView:g=et.defaultActiveView,defaultValue:v=et.defaultValue,topView:f=et.topView,bottomView:w=et.bottomView,showOtherMonthDays:b=et.showOtherMonthDays,_ref:y,unstyled:D,className:S,weekNumber:C,mobileMode:k,focusedDate:x,value:I,onChange:E,onFocus:T,onBlur:N,cell:R,weekCell:V,headerTitle:P,header:F,tabIndex:L,navigationItem:A,ariaLabelledBy:H,ariaDescribedBy:_}=i,z=D||r,K=s.getDate(c),W=s.getDate(d),Y=M[w],U=M[f],$=o+"-cell-uid",j=i.id||o+"-id",Z=e=>{se.current&&se.current.sync(Xe(Q.current),Xe(ee.current),e)},J=e=>{const t=s.cloneDate(e.value),i=s.cloneDate(e.value),n=ie.current.canMoveDown(ue.activeView);if(!u){if(n){if(!e.isTodayClick)return ie.current.moveDown(ue.activeView,e.syntheticEvent),void de({focusedDate:i});ie.current.moveToBottom(ue.activeView)}if(de({value:t,focusedDate:i}),ae.current=t,E){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:t,target:G.current};E(i)}ae.current=void 0}},G=p.useRef(null);p.useImperativeHandle(G,()=>({get element(){return X.current},get value(){return me},get props(){return i},focus:()=>{var e;return null==(e=X.current)?void 0:e.focus()}})),p.useImperativeHandle(t,()=>G.current);const X=p.useRef(null),Q=p.useRef(null),ee=p.useRef(null),te=p.useRef(new je),ie=p.useRef(new $e(({view:e})=>{se.current&&se.current.configure(e),de({activeView:e})})),ne=p.useRef(new Je(ie.current)),se=p.useRef(null),ae=p.useRef(void 0),re=p.useRef(!1),oe=p.useRef(null),le=p.useRef(!1),[ue,ce]=p.useState(()=>{const e=Qe(v,I,K,W);return{value:e,activeView:O(M[g],Y,U),focusedDate:q(x||e||B(),K,W)}}),de=e=>{ce(t=>({...t,...e}))},[,he]=p.useReducer(e=>e+1,0);let me;p.useEffect(()=>{Promise.resolve().then(()=>{n.setScrollbarWidth(),X.current&&(te.current.calculateHeights(X.current,z),se.current=new Ge(te.current),se.current.configure(ue.activeView),he())})},[]),p.useEffect(()=>{n.setScrollbarWidth(),se.current&&se.current.configure(ve),ee.current&&(re.current?ee.current.focusActiveDate:ee.current.blurActiveDate)(),le.current=!1,re.current&&(oe.current=me)}),me=void 0!==ae.current?ae.current:void 0!==I?I:ue.value;const pe=z&&z.uCalendar,ge=null!==me&&null!==oe.current?!s.isEqualDate(me,oe.current):me!==oe.current,ve=O(ue.activeView,Y,U),fe=Qe(me,me,K,W),we=fe?s.getDate(fe):null,be=s.getDate(q(ge&&null!==fe?fe:ue.focusedDate,K,W));ie.current.configure(Y,U);const ye=ie.current.service(ve,l),{smoothScroll:De=Number.parseFloat(p.version)<18}=i,Se=n.classNames(n.uCalendar.wrapper({c:pe,disabled:u,weekNumber:C,mobileMode:k}),S);p.useEffect(()=>{y&&y({element:X.current})});const Ce=[m&&p.createElement(Re,{key:0,ref:Q,activeView:ue.activeView,focusedDate:be,min:K,max:W,onScroll:Z,onChange:e=>{if(u)return;le.current=!0;const t=s.cloneDate(e.value);de({focusedDate:t})},service:ye,dom:te.current,navigationItem:A,tabIndex:L,unstyled:z}),p.createElement(Ee,{key:1,ref:ee,activeView:ue.activeView,focusedDate:be,min:K,max:W,bus:ie.current,shouldScroll:()=>le.current,onScroll:Z,service:ye,cell:R,weekCell:V,dom:te.current,smoothScroll:De,showWeekNumbers:C,onChange:J,value:we,cellUID:$,headerTitle:P,header:F,tabIndex:L,weekDaysFormat:h,showOtherMonthDays:b,unstyled:z})];return p.createElement("div",{ref:X,className:Se,id:j,"aria-labelledby":H,"aria-describedby":_,"aria-disabled":u,tabIndex:u?void 0:L||0,onFocus:e=>{re.current=!0,ee.current&&(ee.current.focusActiveDate(),T&&T(e))},onBlur:e=>{re.current=!1,ee.current&&(ee.current.blurActiveDate(),N&&N(e))},onKeyDown:e=>{const{keyCode:t,ctrlKey:i,metaKey:a}=e;if(be&&ye){if(84===t&&de({focusedDate:B()}),(i||a)&&(t===n.Keys.left||t===n.Keys.right)){if(u)return;le.current=!0;const e=s.cloneDate(be);31===e.getDate()&&e.setDate(30);const i=t===n.Keys.left?e.getMonth()-1:e.getMonth()+1,a=new Date(e.setMonth(i));de({focusedDate:s.cloneDate(a)})}if(t===n.Keys.enter){if(null!==me&&s.isEqualDate(be,me)){const e=q(be,K,W);Xe(ee.current).scrollToIndex(ye.skip(e,K))}const t={syntheticEvent:e,nativeEvent:e.nativeEvent,value:be,target:ee.current};J(t)}else{const t=q(ne.current.move(be,ne.current.action(e),ue.activeView,ye,e),K,W);if(s.isEqualDate(be,t))return;de({focusedDate:t})}e.preventDefault()}},onMouseDown:e=>{e.preventDefault()},onClick:e=>{X.current&&X.current.focus({preventScroll:!0})}},Ce)});it.propTypes={className:i.string,defaultActiveView:i.oneOf(["month","year","decade","century"]),defaultValue:i.instanceOf(Date),disabled:i.bool,focusedDate:i.instanceOf(Date),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,weekDaysFormat:i.oneOf(["short","abbreviated","narrow"]),max:i.instanceOf(Date),min:i.instanceOf(Date),navigation:i.bool,smoothScroll:i.bool,onBlur:i.func,onChange:i.func,onFocus:i.func,tabIndex:i.number,value:i.instanceOf(Date),weekNumber:i.bool,topView:(e,t,i)=>{const n=e[t],s=e.bottomView;return n&&s&&M[n]<M[s]?new Error(`Invalid prop + ${t} suplied to ${i}.\n ${t} can not be smaller than bottomView.\n `):null},bottomView:(e,t,i)=>{const n=e[t],s=e.topView;return n&&s&&M[n]>M[s]?new Error(`Invalid prop + ${t} suplied to ${i}.\n ${t} can not be bigger than topView.\n `):null}},it.displayName="KendoReactCalendar";const nt=it,st=it,at="dayperiod",rt="hour",ot="minute",lt="second",ut=e=>(t,i)=>{const n=s.cloneDate(t);return n[e](i),n},ct=[{type:rt,getter:e=>e.getHours()},{type:ot,getter:e=>e.getMinutes()},{type:lt,getter:e=>e.getSeconds()},{type:"millisecond",getter:e=>e.getMilliseconds()}],dt=(e=>t=>e.map((e=>t=>e[t.type]?(e=>(t,i)=>e(i))(t.getter):(e=>(t,i)=>e(t))(t.getter))((e=>e.reduce((e,t)=>(e[t.type]=t.type,e),{}))(t))))(ct),ht=(e=>(t,i)=>e.map(e=>{const n=Math.floor(t[e.type]);return n?((e,t,i,n)=>s=>{const a=e(s),r=e(i);return"hour"===n?a-(a-r)%t:s.getTime()<=i.getTime()&&0!==a&&a<=r?Math.ceil(a/t)*t:a-a%t})(e.getter,n,i,e.type):e.getter}))(ct),mt=e=>t=>{const i=s.cloneDate(t);return i.setHours(...e.map(e=>e(i))),i},pt=ut("setHours"),gt=ut("setMinutes"),vt=ut("setSeconds"),ft=()=>new Date,wt=(e,t,i=1)=>{const n=[];for(let s=e;s<t;s+=i)n.push(s);return n},bt=(e,t,i)=>({candidateValue:L(N,e),maxValue:s.addDays(L(N,i),t.getHours()<i.getHours()?0:1),minValue:L(N,t)}),yt=(e,t,i)=>{if(!e||!t||!i)return!0;const{candidateValue:n,minValue:s,maxValue:a}=bt(e,t,i);return s<=n&&n<=a},Dt=(e,t,i)=>{if(null===e)return!0;const{candidateValue:n,minValue:s,maxValue:a}=bt(e,t,i);return s<=n&&n<=a},St=(e,t)=>{if(null===e||null===t)return!1;const i=L(N,e),n=L(N,t);return i.getTime()<n.getHours()},Ct=(e,t)=>{if(null===e||null===t)return!1;const i=L(N,e);return L(N,t).getTime()<i.getHours()},kt=e=>{const t=a.useLocalization(),i=n.useUnstyled(),s=i&&i.uDateInput,r=t.toLanguageString(ne,Ce[ne]);return p.createElement("span",{className:n.classNames(n.uDateInput.clearButton({c:s})),role:"button",onClick:t=>{t.stopPropagation();const{onClick:i}=e;i&&i.call(void 0,t)},tabIndex:e.tabindex||-1,title:r,key:"clearbutton"},p.createElement(n.IconWrap,{name:"x",icon:o.xIcon}))};let xt=class{constructor(e){this.service=e,this.cldr={},this.locale=e.locale,this.format=e.format,this.toString=e.toString,this.formatDate=e.formatDate,this.parseDate=e.parseDate,this.parseNumber=e.parseNumber,this.formatNumber=e.formatNumber,this.splitDateFormat=e.splitDateFormat,this.numberSymbols=e.numberSymbols,this.firstDay=e.firstDay,this.dateFieldName=e.dateFieldName,this.dateFormatNames=(e,t)=>this.service.dateFormatNames(t),this.weekendRange=e=>{};const t=c.localeInfo(this.locale);this.cldr[t.name]=t}};const It=p.forwardRef((e,t)=>{var i;const c=n.useId(e.id),d=a.useInternationalization(),h=a.useLocalization(),m=n.useUnstyled(),g=n.usePropsContext(Et,e).unstyled||m,{format:v=Mt.format,defaultValue:f=Mt.defaultValue,size:w=Mt.size,rounded:b=Mt.rounded,fillMode:y=Mt.fillMode,formatPlaceholder:D=Mt.formatPlaceholder,spinners:S=Mt.spinners,disabled:C=Mt.disabled,min:k=Mt.min,max:x=Mt.max,minTime:I=Mt.minTime,maxTime:M=Mt.maxTime,validityStyles:E=Mt.validityStyles,validationMessage:T=Mt.validationMessage,placeholder:O=Mt.placeholder,enableMouseWheel:N=Mt.enableMouseWheel,autoCorrectParts:R=Mt.autoCorrectParts,autoSwitchParts:V=Mt.autoSwitchParts,allowCaretMode:P=Mt.allowCaretMode,twoDigitYearMax:F=Mt.twoDigitYearMax,ariaHasPopup:L=Mt.ariaHasPopup,autoFocus:B=Mt.autoFocus}=n.usePropsContext(Et,e),A=e=>{pe(t=>({...t,...e}))},H=()=>me.value?me.value:void 0!==ce.current?ce.current:oe.current&&oe.current.value,_=()=>{const e=oe.current&&oe.current.currentText||"",t=H();return null==O||me.focused||t?e:O},z=()=>void 0!==e.required&&e.required,K=()=>{const t=H()||e.value,i=k,n=x,s=((e,t,i)=>null===e||!(t&&t>e||i&&i<e))(t,i,n)&&yt(t,I,M),a=void 0!==T,r=(!z()||null!=t)&&s,o=void 0!==e.valid?e.valid:r;return{customError:a,rangeOverflow:t&&n.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<i.getTime()||!1,valid:o,valueMissing:null===t}},q=()=>{ae.current&&ae.current.focus()},W=()=>new xt(d),Y=()=>{const t=H();return{format:v,steps:e.steps,formatPlaceholder:D,placeholder:O,selectPreviousSegmentOnBackspace:!0,value:void 0!==e.value?e.value:t,intlService:W(),autoFill:void 0!==e.autoFill&&e.autoFill,enableMouseWheel:N,autoCorrectParts:R,autoSwitchParts:V,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:F,allowCaretMode:P}},U=e=>{re.current&&re.current.classList.add("k-focus"),A({focused:!0}),B&&Q(!0)},$=e=>{re.current&&re.current.classList.remove("k-focus"),A({focused:!1})},j=e=>"string"==typeof e?e:{inputFormat:e,displayFormat:e},Z=t=>{ce.current=H(),void 0===e.value&&A({value:void 0!==t.value?t.value:null}),ge(),de.current=t,ce.current=void 0},J=t=>{e.onChange&&e.onChange(t)},G=e=>{n.getActiveElement(document)===ae.current&&e.preventDefault()},X=()=>{ae.current&&ae.current.setCustomValidity&&ae.current.setCustomValidity(K().valid?"":T||Mt.validationMessage)},Q=p.useCallback(e=>{var t;if(ae.current&&B&&e){const e=(null==oe?void 0:oe.current).currentText,i=e[(null==oe?void 0:oe.current).currentText.search(/[^a-zA-Z]/)],n=e.split(i)[0].length;re.current&&re.current.classList.add("k-focus"),null==(t=null==oe?void 0:oe.current)||t.selectNearestSegment(n)}},[B]),ee=e=>{!ae.current||!oe.current||Z(e)},ne=t=>{const i=H();de.current&&e.onChange&&!s.isEqual(de.current.oldValue,i)&&e.onChange.call(void 0,{syntheticEvent:t,nativeEvent:de.current.event,value:de.current.value,target:se.current}),de.current=null},se=p.useRef(null),ae=p.useRef(null),re=p.useRef(null);p.useImperativeHandle(se,()=>({props:e,get options(){return Y()},get text(){return _()},get element(){return ae.current},get name(){return e.name},get value(){return H()},get validity(){return K()},focus:q,updateOnPaste:ee})),p.useImperativeHandle(t,()=>se.current);const oe=p.useRef(null),le=p.useRef(null),ue=p.useRef(!1),ce=p.useRef(null),de=p.useRef(null),he=p.useRef(e),[me,pe]=p.useState({value:void 0===e.value?f:null,focused:!1}),[,ge]=p.useReducer(e=>e+1,0);p.useLayoutEffect(()=>{ue.current||(oe.current=new u.DateInput(ae.current,{...Y(),format:j(Y().format),events:{focus:U,blur:$,valueChange:Z,click:J}}),le.current=oe.current.dateObject,ue.current=!0)},[]),p.useEffect(()=>(X(),ue.current||re.current&&re.current.addEventListener("wheel",G,{passive:!1}),B&&(A({focused:!0}),Q(!0)),()=>{re.current&&re.current.removeEventListener("wheel",G)}),[]),p.useEffect(()=>{X(),oe.current&&(le.current=oe.current.dateObject,(((e,t)=>typeof e!=typeof t||("string"==typeof e&&"string"==typeof t?e!==t:"object"==typeof e&&"object"==typeof t&&JSON.stringify(e)!==JSON.stringify(t)))(he.current.format,v)||he.current.readonly!==e.readonly||JSON.stringify(he.current.steps)!==JSON.stringify(e.steps)||W().locale!==oe.current.options.intlService.locale)&&oe.current.setOptions(Y(),!0),he.current.value!==e.value&&(null!==le.current.getValue()||null!==e.value)&&le.current.setValue(e.value),void 0!==e.ariaExpanded&&e.ariaExpanded&&(oe.current.options.placeholder=null),void 0!==e.ariaExpanded&&!e.ariaExpanded&&(oe.current.options.placeholder=O),oe.current.refreshElementValue(),he.current={format:v,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const ve=e.id||c+"-accessibility-id",fe=g&&g.uDateInput,we=_(),be=!E||K().valid;p.useImperativeHandle(e._ref,()=>se.current);const ye=p.createElement("span",{ref:e=>{re.current=e},style:e.label?void 0:{width:e.width},dir:e.dir,className:n.classNames(n.uDateInput.wrapper({c:fe,size:w,fillMode:y,rounded:b,disabled:C,required:z(),invalid:!be}),e.className)},p.createElement("input",{ref:e=>{ae.current=e},role:e.ariaRole||"textbox",readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:C,title:void 0!==e.title?e.title:we,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:B,className:n.classNames(n.uDateInput.inputInner({c:fe})),id:ve,value:we,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":L,"aria-disabled":C,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!be,onKeyDown:ne,onChange:ne,onWheel:ne,onInput:ne,onClick:ne,name:e.name,...e.inputAttributes}),e.children,e.clearButton&&e.value&&p.createElement(kt,{onClick:J,key:"clearbutton"}),S&&p.createElement("span",{className:n.classNames(n.uDateInput.inputSpinner({c:fe})),onMouseDown:e=>{e.preventDefault();const t=n.getActiveElement(document);ae.current&&t!==ae.current&&ae.current.focus({preventScroll:!0})}},p.createElement(r.Button,{tabIndex:-1,type:"button",className:n.classNames(n.uDateInput.spinnerIncrease({c:fe})),icon:"caret-alt-up",svgIcon:o.caretAltUpIcon,"aria-label":h.toLanguageString(te,Ce[te]),title:h.toLanguageString(te,Ce[te]),onClick:e=>{var t;null==(t=oe.current)||t.modifyDateSegmentValue(1),ne(e)}}),p.createElement(r.Button,{tabIndex:-1,type:"button",className:n.classNames(n.uDateInput.spinnerDecrease({c:fe})),icon:"caret-alt-down",svgIcon:o.caretAltDownIcon,"aria-label":h.toLanguageString(ie,Ce[ie]),title:h.toLanguageString(ie,Ce[ie]),onClick:e=>{var t;null==(t=oe.current)||t.modifyDateSegmentValue(-1),ne(e)}})));return e.label?p.createElement(l.FloatingLabel,{label:e.label,editorId:ve,editorValue:null==(i=ae.current)?void 0:i.value,editorValid:be,editorDisabled:C,children:ye,style:{width:e.width}}):ye});It.propTypes={value:i.instanceOf(Date),format:i.oneOfType([T(i.string),i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),formatPlaceholder:i.oneOfType([T(i.oneOf(["wide","narrow","short","formatPattern"])),i.shape({year:T(i.string),month:T(i.string),day:T(i.string),hour:T(i.string),minute:T(i.string),second:T(i.string)})]),width:i.oneOfType([i.string,i.number]),tabIndex:i.number,title:i.string,steps:i.shape({year:T(i.number),month:T(i.number),day:T(i.number),hour:T(i.number),minute:T(i.number),second:T(i.number)}),min:i.instanceOf(Date),max:i.instanceOf(Date),disabled:i.bool,spinners:i.bool,name:i.string,dir:i.string,label:i.node,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,ariaLabel:i.string,ariaRole:i.string,ariaHasPopup:i.oneOfType([i.bool,i.oneOf(["grid","dialog"])]),ariaExpanded:i.oneOfType([i.bool]),onChange:i.func,validationMessage:i.string,required:i.bool,valid:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),autoFocus:i.bool,inputAttributes:i.object};const Mt={format:"d",defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:"wide",spinners:!1,disabled:!1,max:s.cloneDate(V),min:s.cloneDate(R),minTime:s.cloneDate(P),maxTime:s.cloneDate(F),validityStyles:!0,validationMessage:"Please enter a valid value!",placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},Et=n.createPropsContext();It.displayName="KendoReactDateInput";const Tt=r.Button,Ot=e=>{const{dateInput:t,...i}=e,n=(e=>{const[t,i]=p.useState(!1);return p.useEffect(()=>{var t;e.current&&i(!!(null!=(t=e.current.element)&&t.value||e.current.text))}),{editorValue:t}})(t);return p.createElement(l.FloatingLabel,{...i,...n})},Nt=e=>{const{footer:t,windowWidth:i=0,mobileFilter:s,children:a,navigatable:l,navigatableElements:u,expand:c,animation:d,title:m,subTitle:g,onClose:v}=e,f=n.useAdaptiveModeContext(),w={navigatable:l||!1,navigatableElements:u||[],expand:c,animation:!1!==d,suffixActions:p.createElement(r.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:o.checkIcon,onClick:v}),filter:s,onClose:v,animationStyles:f&&i<=f.small?{top:0,width:"100%",height:"100%"}:void 0,title:m,subTitle:g,className:"k-adaptive-actionsheet",position:f&&i<=f.small?"fullscreen":void 0};return p.createElement(h.ActionSheet,{...w},a,t&&p.createElement(h.ActionSheetFooter,{className:"k-actions k-actions-stretched"},p.createElement(r.Button,{size:"large",tabIndex:0,"aria-label":t.cancelText,"aria-disabled":"false",type:"button",onClick:t.onCancel},t.cancelText),p.createElement(r.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":t.applyText,"aria-disabled":"false",type:"button",onClick:t.onApply},t.applyText)))},Rt=p.forwardRef((e,t)=>{const i=n.useId(e.id),r=a.useLocalization(),l=n.useAdaptiveModeContext(),{defaultShow:u=Vt.defaultShow,defaultValue:c=Vt.defaultValue,dateInput:d=Vt.dateInput,calendar:m=Vt.calendar,toggleButton:g=Vt.toggleButton,popup:v=Vt.popup,disabled:f=Vt.disabled,format:w=Vt.format,max:b=Vt.max,min:y=Vt.min,popupSettings:D=Vt.popupSettings,tabIndex:S=Vt.tabIndex,weekNumber:C=Vt.weekNumber,validityStyles:k=Vt.validityStyles,size:x=Vt.size,rounded:I=Vt.rounded,fillMode:M=Vt.fillMode,autoFocus:E=Vt.autoFocus,show:T,autoSwitchParts:O,autoSwitchKeys:N,twoDigitYearMax:R,ariaLabel:V,adaptive:P,adaptiveTitle:F=e.label||void 0,adaptiveSubtitle:B,formatPlaceholder:A,inputAttributes:_,validationMessage:z,visited:K,value:q,touched:W,modified:Y,_adaptiveMode:U=l,valid:$,focusedDate:j,id:Z,ariaLabelledBy:J,ariaDescribedBy:G,placeholder:X,onChange:Q,onOpen:ee,onClose:te,...ie}=n.usePropsContext(Pt,e),ne=()=>{if(n.canUseDOM)return ke.current&&ke.current.ownerDocument||window.document},se=()=>!!(Ve.windowWidth&&l&&Ve.windowWidth<=(null==l?void 0:l.medium)&&e.adaptive),re=()=>{const e=void 0!==Me.current?Me.current:void 0!==q?q:Ve.value;return null!==e?s.cloneDate(e):null},oe=()=>void 0!==Ee.current?Ee.current:void 0!==T?T:Ve.show,le=()=>void 0!==e.required&&e.required,ue=()=>{const e=re()||q||null,t=y,i=b,n=H(e,t,i),s=void 0!==z,a=(!le()||null!=e)&&n,r=void 0!==$?$:a;return{customError:s,rangeOverflow:e&&i.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<t.getTime()||!1,valid:r,valueMissing:null===e}},ce=()=>{xe.current&&xe.current.focus()},de=e=>{Ie.current=e},he=e=>{oe()!==e&&(Ae({show:e}),e&&ee&&ee({target:Se.current}),!e&&te&&te({target:Se.current}))},me=e=>{null!=D&&D.onMouseDownOutside&&D.onMouseDownOutside(e)},pe=(e,t)=>{Ae({value:s.cloneDate(e||void 0)}),Me.current=e,Ee.current=!1,se()||(Oe.current=!0),Q&&Q({syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:re(),show:oe(),target:Se.current}),Me.current=void 0,Ee.current=void 0,he(!1)},ge=e=>{const t=(e=>{const t=re();return t&&e?L(e,t):e})(e.value);pe(t,e)},ve=()=>{const{popupClass:e,...t}=D,i=oe(),a=re(),r=a&&s.getDate(a),o=n.classNames(e),l={popupClass:"k-datepicker-popup",show:i,anchor:ke.current,className:o,id:He,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...t,onMouseDownOutside:me},u={disabled:f,value:r,min:y,max:b,weekNumber:C,focusedDate:j,className:se()?"k-calendar-lg":"",navigation:!se(),onChange:ge},c=m||Vt.calendar,d=v||Vt.popup;return se()?p.createElement(c,{_ref:de,...u}):p.createElement(d,{...l},p.createElement(c,{_ref:de,...u}))},fe=()=>{Ae({focused:!1}),he(!1)},we=()=>{he(!oe())},be=()=>{f||(Oe.current=!0,he(!oe()))},ye=e=>{e.preventDefault()},De=e=>{const{altKey:t,keyCode:i}=e;if(i===n.Keys.esc&&oe())return Oe.current=!0,void he(!1);t&&(i===n.Keys.up||i===n.Keys.down)&&(e.preventDefault(),e.stopPropagation(),Oe.current=i===n.Keys.up,he(i===n.Keys.down))},Se=p.useRef(null),ke=p.useRef(null),xe=p.useRef(null),Ie=p.useRef(null);p.useImperativeHandle(Se,()=>({props:e,get element(){return ke.current},get calendar(){return Ie.current},get dateInput(){return xe.current},get name(){return e.name},get show(){return oe()},get validity(){return ue()},get value(){return re()},get mobileMode(){return se()},togglePopup:we,focus:ce})),p.useImperativeHandle(t,()=>Se.current);const Me=p.useRef(void 0),Ee=p.useRef(void 0),Te=p.useRef(null),Oe=p.useRef(!1),Ne=p.useRef(!1),Re=p.useRef(null),[Ve,Pe]=p.useState({value:c,show:u,focused:!1}),[,Fe]=p.useReducer(e=>e,!0),Le=e.name||i||void 0,Be=p.useCallback(e=>{if(f)return;let t=null;if(null!=e)if(e instanceof Date)t=e;else if("string"==typeof e||"number"==typeof e){const i=new Date(e);isNaN(i.getTime())||(t=i)}if(t&&H(t,y,b)){const e={target:ke.current,currentTarget:ke.current};pe(t,{syntheticEvent:e})}},[f,y,b]);n.useKendoPaste(ke,{fieldName:Le,onValueChange:Be,enabled:!!Le});const Ae=e=>{Pe(t=>({...t,...e}))};p.useEffect(()=>{Ie.current&&Ie.current.element&&oe()&&!Ne.current&&Ie.current.element.focus({preventScroll:!0}),se()&&oe()&&!Ne.current&&setTimeout(()=>{Ie.current&&Ie.current.element&&Ie.current.element.focus({preventScroll:!0})},300),xe.current&&xe.current.element&&!oe()&&Oe.current&&xe.current.element.focus({preventScroll:!0}),Ne.current=oe(),Oe.current=!1}),p.useEffect(()=>{var e;return Re.current=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(e=>(e=>{for(const t of e)Ae({windowWidth:t.target.clientWidth})})(e)),oe()&&Fe(),null!=(e=ne())&&e.body&&Re.current&&Re.current.observe(ne().body),()=>{var e;clearTimeout(Te.current),null!=(e=ne())&&e.body&&Re.current&&Re.current.disconnect()}},[]);const He=i+"-popup-id",_e=ve(),ze=d||Vt.dateInput,Ke=re(),qe=g||Vt.toggleButton,We=(()=>{const{windowWidth:e=0}=Ve,t={expand:oe(),onClose:fe,title:F,subTitle:B,windowWidth:e};return p.createElement(Nt,{...t},p.createElement(h.ActionSheetContent,null,ve()))})(),Ye=!k||ue().valid,Ue=r.toLanguageString(ae,Ce[ae]),$e={disabled:f,format:w,formatPlaceholder:A,id:Z,ariaLabelledBy:J,ariaDescribedBy:G,ariaLabel:V,max:b,min:y,name:e.name,onChange:e=>{pe(e.value,e)},required:e.required,_ref:xe,tabIndex:oe()?-1:S,title:e.title,valid:ue().valid,validationMessage:z,validityStyles:k,value:Ke,label:void 0,placeholder:Ve.focused?null:X,ariaExpanded:oe(),autoFill:e.autoFill,twoDigitYearMax:R,enableMouseWheel:e.enableMouseWheel,autoCorrectParts:e.autoCorrectParts,autoSwitchParts:O,autoSwitchKeys:N,allowCaretMode:e.allowCaretMode,inputAttributes:_},je=p.createElement(n.AsyncFocusBlur,{onFocus:()=>{Ae({focused:!0})},onBlur:se()?void 0:fe,onSyncBlur:e.onBlur,onSyncFocus:e.onFocus},t=>p.createElement(p.Fragment,null,p.createElement("span",{...e.label?{}:ie,ref:ke,className:n.classNames("k-input","k-datepicker",{[`k-input-${n.kendoThemeMaps.sizeMap[x]||x}`]:x,[`k-rounded-${n.kendoThemeMaps.roundedMap[I]||I}`]:I,[`k-input-${M}`]:M,"k-invalid":!Ye,"k-required":le(),"k-disabled":f},e.className),onKeyDown:De,style:{width:e.width},onFocus:se()?be:t.onFocus,onBlur:t.onBlur,onClick:se()?be:void 0},p.createElement(ze,{_ref:xe,ariaRole:"combobox",ariaExpanded:oe(),ariaControls:oe()?He:void 0,autoFocus:E,...$e}),p.createElement(qe,{type:"button",icon:"calendar",svgIcon:o.calendarIcon,title:Ue,className:"k-input-button",onClick:se()?void 0:be,"aria-label":Ue,fillMode:M,onMouseDown:ye}),!se()&&_e),se()&&We));return e.label?p.createElement(Ot,{dateInput:xe,label:e.label,editorId:i,editorValid:Ye,editorDisabled:f,children:je,style:{width:e.width},...ie}):je});Rt.propTypes={className:i.string,defaultShow:i.bool,defaultValue:i.instanceOf(Date),disabled:i.bool,focusedDate:i.instanceOf(Date),format:i.oneOfType([i.string,i.shape({skeleton:T(i.string),pattern:T(i.string),date:T(i.oneOf(["short","medium","long","full"])),time:T(i.oneOf(["short","medium","long","full"])),datetime:T(i.oneOf(["short","medium","long","full"])),era:T(i.oneOf(["narrow","short","long"])),year:T(i.oneOf(["numeric","2-digit"])),month:T(i.oneOf(["numeric","2-digit","narrow","short","long"])),day:T(i.oneOf(["numeric","2-digit"])),weekday:T(i.oneOf(["narrow","short","long"])),hour:T(i.oneOf(["numeric","2-digit"])),hour12:T(i.bool),minute:T(i.oneOf(["numeric","2-digit"])),second:T(i.oneOf(["numeric","2-digit"])),timeZoneName:T(i.oneOf(["short","long"]))})]),formatPlaceholder:i.oneOfType([T(i.oneOf(["wide","narrow","short","formatPattern"])),i.shape({year:T(i.string),month:T(i.string),day:T(i.string),hour:T(i.string),minute:T(i.string),second:T(i.string)})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,ariaLabel:i.string,min:i.instanceOf(Date),max:i.instanceOf(Date),name:i.string,popupSettings:i.shape({animate:T(i.bool),appendTo:T(i.any),popupClass:T(i.string)}),show:i.bool,tabIndex:i.number,title:i.string,value:i.instanceOf(Date),weekNumber:i.bool,width:i.oneOfType([i.number,i.string]),validationMessage:i.string,required:i.bool,valid:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),adaptive:i.bool,adaptiveTitle:i.string,adaptiveSubtitle:i.string,autoFocus:i.bool,inputAttributes:i.object};const Vt={defaultShow:!1,defaultValue:null,dateInput:It,calendar:st,toggleButton:Tt,popup:d.Popup,disabled:!1,format:"d",max:V,min:R,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1},Pt=n.createPropsContext();Rt.displayName="KendoReactDatePicker";const Ft=Object.freeze({name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1617189075,version:"14.5.0-develop.2",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"}),Lt=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t),i},Bt=e=>null!==e&&e<12,At=(e,t,i)=>!t&&!i||e>=t&&e<=i,Ht=(e,t,i)=>!t&&!i||e>=t||e<=i;let _t=class{constructor(e){this.intl=e,this.min=null,this.max=null,this.part=null}apply(e,t){const i=e.getHours(),n=Bt(i),s=Bt(t.getHours());if(n&&s||!n&&!s)return e;const[a,r=24]=this.normalizedRange(),o=i+(s?-12:12);return Lt(e,Math.min(Math.max(a,o),r||24))}configure(e){const{min:t=this.min,max:i=this.max,part:n=this.part}=e;this.min=t,this.max=i,this.part=n}data(e){const t=this.part&&this.part.names;if(!t||!this.min)return[];const i=[],[n,s]=this.normalizedRange(),a=this.intl.dateFormatNames(t);return Bt(n)&&i.push({text:a.am,value:Lt(this.min,n)}),(e=>null!==e&&(!e||e>11))(s)&&i.push({text:a.pm,value:Lt(this.min,Math.max(12,s))}),this.min.getHours()!==n?i.reverse():i}isRangeChanged(e,t){return!1}limitRange(e,t,i){return[e,t]}total(){const[e,t]=this.normalizedRange();return(e||t)&&(e>11||t<12)?1:2}selectedIndex(e){if(!this.valueInList(e)||!this.min)return-1;const t=Math.floor(e.getHours()/12);return this.min.getHours()===this.normalizedRange()[0]?t:0===t?1:0}valueInList(e){return!(!this.min||!this.max)&&(this.min.getHours()!==this.normalizedRange()[0]?Ht:At)(e.getHours(),this.min.getHours(),this.max.getHours())}normalizedRange(){const e=this.min.getHours(),t=this.max.getHours();return[Math.min(e,t),Math.max(e,t)]}};class zt{constructor(){this.itemHeight=0,this.timeListHeight=0,this.didCalculate=!1}ensureHeights(){void 0===this.timeListHeight&&this.calculateHeights()}calculateHeights(e,t){if(!n.canUseDOM)return;const i=t&&t.uTime,s=W("div"),a=W("span"),r=W("ul"),o=W("li"),l=s([a("minute",n.strippedClassNames(n.uTime.title({c:i}))),s([s([r([o("<span>02</span>",n.strippedClassNames(n.uTime.li({c:i})))],n.strippedClassNames(n.uTime.ul({c:i})))],n.strippedClassNames(n.uTime.containerSelector({c:i}),n.uTime.container({c:i,content:!0,scrollable:!0})))],n.strippedClassNames(n.uTime.list({c:i})))],n.strippedClassNames(n.uTime.listWrapper({c:i})),{left:"-10000px",position:"absolute"}),u=`.${n.strippedClassNames(n.uTime.containerSelector({c:i}))}`,c=e&&e.querySelector(u)||document.body,d=c.appendChild(l);this.timeListHeight=d.querySelector(u).offsetHeight,this.itemHeight=d.querySelector("li").offsetHeight,c.removeChild(d),this.didCalculate=!0}}const Kt=(e=>t=>t%e)(24),qt=(e,t)=>Kt(24+e-t),Wt=e=>(t,i)=>i&&s.getDate(t).getTime()!==s.getDate(i).getTime()?pt(t,e):t,Yt=Wt(0),Ut=Wt(23);let $t=class{constructor(e){this.intl=e,this.boundRange=!1,this.insertUndividedMax=!1,this.min=null,this.max=null,this.step=0,this.toListItem=null}apply(e,t){return pt(e,t.getHours())}configure(e){const{boundRange:t=this.boundRange,insertUndividedMax:i=this.insertUndividedMax,min:n=this.min,max:s=this.max,part:a,step:r=this.step}=e;this.boundRange=t,this.insertUndividedMax=i,this.toListItem=e=>{const t=pt(N,e);return{text:this.intl.formatDate(t,a.pattern),value:t}},this.min=n,this.max=s,this.step=r}data(e){const[t]=this.range(e),i=((e,t)=>i=>Kt(e+i*t))(t,this.step),n=wt(0,this.countFromMin(e)).map(e=>this.toListItem&&this.toListItem(i(e)));return this.addLast(n),e&&this.addMissing(n,e),n}isRangeChanged(e,t){return!(!this.min||!this.max)&&(!s.isEqual(this.min,e)||!s.isEqual(this.max,t))}limitRange(e,t,i){return this.boundRange?[Yt(e,i),Ut(t,i)]:[e,t]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastHour(e)===e.getHours()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&this.toListItem&&e.push(this.toListItem(this.lastHour(t))),e}addMissing(e,t){if(this.valueInList(t))return e;if(this.toListItem){const i=this.toListItem(t.getHours());e.splice(this.selectedIndex(t),0,i)}return e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(qt(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return null!==this.max&&this.isMissing(pt(this.max,this.lastHour(e)))}divideByStep(e){return qt(e.getHours(),this.min.getHours())/this.step}lastHour(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getHours(),i.getHours()]}};const jt=(e=>t=>t%e)(60),Zt=(e,t)=>jt(60+e-t),Jt=e=>(t,i)=>i&&t.getHours()!==i.getHours()?gt(t,e):t,Gt=Jt(0),Xt=Jt(59);let Qt=class{constructor(e){this.intl=e,this.toListItem=null,this.min=null,this.max=null,this.step=0,this.insertUndividedMax=!1}apply(e,t){return gt(e,t.getMinutes())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:n=this.max,part:s,step:a=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=gt(N,e);return{text:this.intl.formatDate(t,s.pattern),value:t}},this.min=i,this.max=n,this.step=a}data(e){const[t]=this.range(e),i=((e,t)=>i=>jt(e+i*t))(t,this.step),n=wt(0,this.countFromMin(e)).map(e=>this.toListItem&&this.toListItem(i(e)));return this.addLast(n),e&&this.addMissing(n,e),n}isRangeChanged(e,t){return!(null===this.min||null===this.max||s.isEqual(this.min,e)&&s.isEqual(this.max,t))}limitRange(e,t,i){return[Gt(e,i),Xt(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastMinute(e)===e.getMinutes()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&this.toListItem&&e.push(this.toListItem(this.lastMinute(t))),e}addMissing(e,t){if(this.valueInList(t))return e;if(this.toListItem){const i=this.toListItem(t.getMinutes());e.splice(this.selectedIndex(t),0,i)}return e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(Zt(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return null!==this.max&&this.isMissing(gt(this.max,this.lastMinute(e)))}divideByStep(e){return Zt(e.getMinutes(),this.min.getMinutes())/this.step}lastMinute(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getMinutes(),i.getMinutes()]}};const ei=(e=>t=>t%e)(60),ti=(e,t)=>ei(60+e-t),ii=e=>(t,i)=>!i||t.getMinutes()===i.getMinutes()&&t.getHours()===i.getHours()?t:vt(t,e),ni=ii(0),si=ii(59);class ai{constructor(e){this.intl=e,this.toListItem=null,this.min=null,this.max=null,this.step=0,this.insertUndividedMax=!1}apply(e,t){return vt(e,t.getSeconds())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:n=this.max,part:s,step:a=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=vt(N,e);return{text:this.intl.formatDate(t,s.pattern),value:t}},this.min=i,this.max=n,this.step=a}data(e){const[t]=this.range(e),i=((e,t)=>i=>ei(e+i*t))(t,this.step),n=wt(0,this.countFromMin(e)).map(e=>this.toListItem&&this.toListItem(i(e)));return this.addLast(n),e&&this.addMissing(n,e),n}isRangeChanged(e,t){return!(null===this.min||null===this.max||s.isEqual(this.min,e)&&s.isEqual(this.max,t))}limitRange(e,t,i){return[ni(e,i),si(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastSecond(e)===e.getSeconds()||!this.isMissing(e))}divideByStep(e){return ti(e.getSeconds(),this.min.getSeconds())/this.step}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&this.toListItem&&e.push(this.toListItem(this.lastSecond(t))),e}addMissing(e,t){if(this.valueInList(t))return e;if(this.toListItem){const i=this.toListItem(t.getSeconds());e.splice(this.selectedIndex(t),0,i)}return e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(ti(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return null!==this.max&&this.isMissing(vt(this.max,this.lastSecond(e)))}lastSecond(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getSeconds(),i.getSeconds()]}}const ri={[n.Keys.end]:(e,t)=>e[e.length-1],[n.Keys.home]:(e,t)=>e[0],[n.Keys.up]:(e,t)=>e[t-1],[n.Keys.down]:(e,t)=>e[t+1]},oi={[at]:_t,[rt]:$t,[ot]:Qt,[lt]:ai},li=class e extends p.Component{constructor(t){super(t),this.intl=null,this._element=null,this.service=null,this.virtualization=null,this.topOffset=0,this.bottomOffset=0,this.itemHeight=0,this.listHeight=0,this.topThreshold=0,this.bottomThreshold=0,this.animateToIndex=!1,this.focus=e=>{Promise.resolve().then(()=>{this.element&&this.element.focus(e)})},this.itemOffset=e=>{if(!this.virtualization||!this.service)return-1;const t=this.service.selectedIndex(this.props.value),i=this.virtualization.activeIndex(),n=this.virtualization.itemOffset(i),s=Math.abs(Math.ceil(e)-n);if(t===i&&s<2)return n;const a=t>i;return a&&s>=this.bottomThreshold||!a&&s>this.topThreshold?this.virtualization.itemOffset(i+1):n},this.calculateHeights=()=>{this.dom.didCalculate&&(this.itemHeight=this.dom.itemHeight,this.listHeight=this.dom.timeListHeight,this.topOffset=(this.listHeight-this.itemHeight)/2,this.bottomOffset=this.listHeight-this.itemHeight,this.props.mobileMode&&(this.topOffset+=9,this.bottomOffset+=18),this.topThreshold=.05*this.itemHeight,this.bottomThreshold=.95*this.itemHeight)},this.configureServices=({min:e,max:t,value:i}=this.props)=>{if(this.service){const[n,s]=this.service.limitRange(e||this.min,t||this.max,i||this.props.value);this.service.configure(this.serviceSettings({min:n,max:s}))}},this.serviceSettings=t=>{const i={boundRange:this.props.boundRange||e.defaultProps.boundRange,insertUndividedMax:!1,min:s.cloneDate(this.min),max:s.cloneDate(this.max),part:this.props.part,step:this.step},n=Object.assign({},i,t);return n.boundRange="hour"!==n.part.type||this.props.boundRange||e.defaultProps.boundRange,n},this.handleScrollAction=({target:e,animationInProgress:t})=>{if(this.virtualization&&this.service&&e&&!t){this.animateToIndex=!1;const t=this.virtualization.itemIndex(this.itemOffset(e.scrollTop)),i=this.service.data(this.props.value)[t];this.handleChange(i)}},this.handleFocus=e=>{const{onFocus:t}=this.props;t&&t.call(void 0,e)},this.handleBlur=e=>{const{onBlur:t}=this.props;t&&t.call(void 0,e)},this.handleMouseOver=()=>{if(!this._element)return;const e=n.getActiveElement(document);document&&e!==this._element&&this.props.show&&this._element.focus({preventScroll:!0})},this.handleKeyDown=e=>{if(!this.service)return;const{keyCode:t}=e;(t===n.Keys.down||t===n.Keys.up||t===n.Keys.end||t===n.Keys.home)&&e.preventDefault();const i=(ri[e.keyCode]||n.noop)(this.service.data(this.props.value),this.service.selectedIndex(this.props.value));i&&this.handleChange(i)},this.handleChange=Y(e=>{if(!this.service)return;const t=this.service.apply(this.props.value,e.value);if(this.props.value.getTime()===t.getTime())return;const{onChange:i}=this.props;i&&i.call(void 0,t)},100),this.dom=new zt}get element(){return this._element}get animate(){return!(!this.props.smoothScroll||!this.animateToIndex)}get min(){return this.props.min||e.defaultProps.min}get max(){return this.props.max||e.defaultProps.max}get step(){return void 0!==this.props.step&&0!==this.props.step?Math.floor(this.props.step):e.defaultProps.step}componentDidMount(){Promise.resolve().then(()=>{const{unstyled:e}=this.props;this._element&&(this.dom.calculateHeights(this._element,e),this.lastMeasuredHeight=this._element.clientHeight,this.forceUpdate())})}componentDidUpdate(e){if(!this.virtualization||!this.service)return;if(this._element){const t=this._element.clientHeight,i=void 0!==this.lastMeasuredHeight&&Math.abs(t-this.lastMeasuredHeight)>1,n=this.props.mobileMode!==e.mobileMode;if(i||n){const{unstyled:e}=this.props;return this.dom.calculateHeights(this._element,e),this.calculateHeights(),this.lastMeasuredHeight=t,this.animateToIndex=!1,void this.forceUpdate()}null!=this.lastMeasuredHeight||(this.lastMeasuredHeight=t)}const t=this.service.selectedIndex(this.props.value);if(this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](t),this.animateToIndex=!0,!this.topOffset&&this._element){const{unstyled:e}=this.props;this.dom.calculateHeights(this._element,e)}}render(){const{part:e,value:t,unstyled:i}=this.props;if(!e.type||!oi[e.type])return;const s=i&&i.uTime;this.calculateHeights(),this.intl=a.provideIntlService(this),this.service=new oi[e.type](this.intl),this.configureServices();const r=this.service.data(t),o="translateY("+this.topOffset+"px)",l=this.service.total(t),u=p.createElement(p.Fragment,null,p.createElement("ul",{style:{transform:o,msTransform:o},className:n.classNames(n.uTime.ul({c:s}))},r.map((e,t)=>p.createElement("li",{key:t,className:n.classNames(n.uTime.li({c:s})),onClick:()=>{this.handleChange(e)}},p.createElement("span",null,e.text)))),p.createElement("div",{className:n.classNames(n.uTime.scrollablePlaceholder({c:s}))}));return p.createElement("div",{className:n.classNames(n.uTime.list({c:s})),id:String(this.props.id||""),tabIndex:this.props.disabled?-1:0,ref:e=>{this._element=e},onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseOver:this.handleMouseOver},this.dom.didCalculate?p.createElement(k,{bottomOffset:this.bottomOffset,children:u,className:n.classNames(n.uTime.containerSelector({c:s}),n.uTime.container({c:s})),itemHeight:this.itemHeight,maxScrollDifference:this.listHeight,onScrollAction:this.handleScrollAction,ref:e=>{this.virtualization=e},role:"presentation",skip:0,tabIndex:-1,take:l,topOffset:this.topOffset,total:l,unstyled:i}):p.createElement("div",{className:n.classNames(n.uTime.containerSelector({c:s}),n.uTime.container({c:s,content:!0,scrollable:!0}))},u))}};li.propTypes={id:i.number,max:i.instanceOf(Date),min:i.instanceOf(Date),part:function(e,t,i){const n=e[t];if(!n||!oi[n.type])throw new Error(`\n Invalid prop '${t}' supplied to ${i}.\n Supported part types are hour|minute|second|dayperiod.\n `);return null},step:function(e,t,i){const n=e[t];if(void 0!==n&&n<=0)throw new Error(`\n Invalid prop '${t}' supplied to ${i}.\n ${t} cannot be less than 1.\n `);return null},value:i.instanceOf(Date),smoothScroll:i.bool,show:i.bool},li.defaultProps={boundRange:!1,max:F,min:N,step:1,smoothScroll:!0};let ui=li;a.registerForIntl(ui);const ci=new RegExp(`${rt}|${ot}|${lt}|${at}|literal`),di=class e extends p.Component{constructor(t){super(t),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&&-1===this.state.activeListIndex&&!this.hasActiveButton()&&i&&i.element&&i.focus(e)})},this.timeFormatReducer=(e,t)=>e+t.pattern,this.timeFormatFilter=(e,t,i)=>{const n=t>=1&&i[t-1];return n&&n&&"literal"===e.type?ci.test(n.type||""):ci.test(e.type||"")},this.focusList=e=>{this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(t=>1===e?t.next:t.prev).map(e=>e&&e.element&&e.element.focus({preventScroll:!0}))},this.listReducer=(e,t,i,n)=>e.length||t.props.id!==this.state.activeListIndex?e:[{next:n[i+1]||t,prev:n[i-1]||t}],this.showNowButton=()=>!this.hasSteps()&&this.props.nowButton&&yt(ft(),this.min,this.max),this.handleKeyDown=e=>{const{keyCode:t}=e;switch(t){case n.Keys.left:return e.preventDefault(),void this.focusList(0);case n.Keys.right:return e.preventDefault(),void this.focusList(1);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=mt(ht(this.props.steps,this.props.min||e.defaultProps.min)),this.state={activeListIndex:-1},this.hasActiveButton=this.hasActiveButton.bind(this)}get element(){return this._element}get value(){return((e,t,i)=>{if(!e||!t||!i)return e;const{candidateValue:n,minValue:s,maxValue:a}=bt(e,t,i);return n<s?L(e,t):n>a?L(e,i):e})(this.snapTime(s.cloneDate(this.props.value||N)),this.min,this.max)}get intl(){return a.provideIntlService(this)}get min(){return this.snapTime(this.props.min||e.defaultProps.min)}get max(){return this.snapTime(this.props.max||e.defaultProps.max)}get steps(){return this.props.steps||e.defaultProps.steps}get boundRange(){return void 0!==this.props.boundRange?this.props.boundRange:e.defaultProps.boundRange}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidMount(){const{onMount:e}=this.props;e&&e.call(void 0,this.value)}render(){const{format:t,smoothScroll:i,onNowClick:s,className:o,disabled:l,mobileMode:u,show:c,onNowKeyDown:d,unstyled:h}=this.props,m=h&&h.uTime;this.snapTime=mt(ht(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(t||e.defaultProps.format).filter(this.timeFormatFilter);const g=n.classNames(n.uTime.part({c:m,mobileMode:u,disabled:l}),o);this.timeLists=[];const v=a.provideLocalizationService(this),f=v.toLanguageString(he,Ce[he]);return p.createElement("div",{className:g},p.createElement("div",{className:n.classNames(n.uTime.header({c:m}))},p.createElement("span",{className:n.classNames(n.uTime.title({c:m}))},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&p.createElement(r.Button,{type:"button",ref:e=>{this._nowButton=e},className:n.classNames(n.uTime.now({c:m})),fillMode:"flat",themeColor:"base",title:f,onKeyDown:d,"aria-label":f,onClick:s,tabIndex:l?-1:0},v.toLanguageString(de,Ce[de]))),p.createElement("div",{className:n.classNames(n.uTime.listContainer({c:m})),onKeyDown:this.handleKeyDown},p.createElement("span",{className:n.classNames(n.uTime.highlight({c:m}))}),this.dateFormatParts.map((e,t)=>"literal"!==e.type?p.createElement("div",{key:t,className:n.classNames(n.uTime.listWrapper({c:m,focused:t===this.state.activeListIndex})),role:"presentation",tabIndex:-1},p.createElement("span",{className:n.classNames(n.uTime.title({c:m})),onMouseDown:e=>{e.preventDefault()}},this.intl.dateFieldName(e)),p.createElement(ui,{min:this.min,max:this.max,boundRange:this.boundRange,part:e,step:e.type?this.steps[e.type]:1,smoothScroll:i,ref:e=>{e&&this.timeLists.push(e)},id:t,onFocus:()=>{this.handleListFocus(t)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.value,disabled:l,show:c,mobileMode:u,unstyled:h})):p.createElement("div",{key:t,className:n.classNames(n.uTime.separator({c:m}))},e.pattern))))}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}hasActiveButton(){const e=n.getActiveElement(document);return this._nowButton&&e===this._nowButton.element}hasSteps(){const e=Object.keys(this.steps);return e.length!==e.reduce((e,t)=>e+this.steps[t],0)}};di.propTypes={cancelButton:i.bool,disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),max:i.instanceOf(Date),min:i.instanceOf(Date),nowButton:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,value:i.instanceOf(Date),show:i.bool},di.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:P,max:F,steps:{},boundRange:!1};let hi=di;a.registerForIntl(hi),a.registerForLocalization(hi);const mi=class e extends p.Component{constructor(t){super(t),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;t!==n.Keys.enter||this.hasActiveButton()||this.handleAccept(e)},this.revertToNowButton=e=>{const{keyCode:t,shiftKey:i}=e;!i&&t===n.Keys.tab&&(e.preventDefault(),!1!==this.props.nowButton?this.timePart&&this.timePart.focus({preventScroll:!0},!0):this.timePart&&this.timePart.focus({preventScroll:!0}))},this.handleNowKeyDown=e=>{var t;const{keyCode:i,shiftKey:s}=e;s&&i===n.Keys.tab?(e.preventDefault(),this._acceptButton&&(null==(t=this._acceptButton.element)||t.focus({preventScroll:!0}))):i===n.Keys.enter&&(e.stopPropagation(),this.handleNowClick(e))},this.handleAccept=e=>{const t=this.mergeValue(s.cloneDate(this.value||ft()),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(s.cloneDate(this.value||ft()),ft());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||e.defaultProps.format),this.mergeValue=(e=>(t,i)=>(t.setHours(...e.map(e=>e(t,i))),t))(dt(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.state={current:this.props.value||N,value:this.props.value||e.defaultProps.value}}get element(){return this._element}get value(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value;return null!==e?s.cloneDate(e):null}get intl(){return a.provideIntlService(this)}get current(){return null!==this.state.current?s.cloneDate(this.state.current):null}componentWillUnmount(){clearTimeout(this.nextTickId)}render(){const{format:e,cancelButton:t,disabled:i,tabIndex:s,className:o,smoothScroll:l,min:u,max:c,boundRange:d,nowButton:h,steps:m,show:g,mobileMode:v,unstyled:f}=this.props,w=f&&f.uTimePicker,b=f&&f.uTime,y=a.provideLocalizationService(this),D=y.toLanguageString(me,Ce[me]),S=y.toLanguageString(pe,Ce[pe]);return p.createElement("div",{ref:e=>{this._element=e},tabIndex:i?void 0:s||0,className:n.classNames(n.uTimePicker.timeSelector({c:w,mobileMode:v,disabled:i}),o),onKeyDown:this.handleKeyDown},p.createElement(hi,{ref:e=>{this.timePart=e},value:this.current,onChange:this.handleChange,onNowClick:this.handleNowClick,format:e,smoothScroll:l,min:u,max:c,boundRange:d,disabled:i,nowButton:h,steps:m,show:g,mobileMode:v,onNowKeyDown:this.handleNowKeyDown,unstyled:f}),this.props.footer&&p.createElement("div",{className:n.classNames(n.uTime.footer({c:b}))},t&&p.createElement(r.Button,{type:"button",ref:e=>{this._cancelButton=e},className:n.classNames(n.uTime.cancel({c:b})),onClick:this.handleReject,title:D,"aria-label":D},D),p.createElement(r.Button,{type:"button",ref:e=>{this._acceptButton=e},className:n.classNames(n.uTime.accept({c:b})),themeColor:"primary",onClick:this.handleAccept,onKeyDown:this.revertToNowButton,title:S,"aria-label":S},S)))}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}hasActiveButton(){if(!this._acceptButton||!this._acceptButton.element)return!1;const e=n.getActiveElement(document);return this._acceptButton&&e===this._acceptButton.element||this._cancelButton&&e===this._cancelButton.element}};mi.propTypes={cancelButton:i.bool,className:i.string,disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),max:i.instanceOf(Date),min:i.instanceOf(Date),nowButton:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,value:i.instanceOf(Date),show:i.bool},mi.defaultProps={value:null,disabled:!1,cancelButton:!0,format:"t",min:P,max:F,boundRange:!1,footer:!0};let pi=mi;a.registerForIntl(pi),a.registerForLocalization(pi);const gi=class e extends p.Component{constructor(t){super(t),this._element=null,this._dateInput=p.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.showLicenseWatermark=!1,this.handleKendoPasteValue=e=>{if(e instanceof Date&&!isNaN(e.getTime()))return void this.applyKendoPasteTime(e);const t=null!=e?String(e):"";if(!t)return;const i=new Date(t);isNaN(i.getTime())||this.applyKendoPasteTime(i)},this.applyKendoPasteTime=e=>{const t=this.normalizeTime(e);if(!Dt(t,this.min,this.max))return;const i=new Event("change",{bubbles:!0}),n={target:this._element,currentTarget:this._element,nativeEvent:i};this.handleValueChange({syntheticEvent:n,nativeEvent:i,value:t})},this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:e,cancelButton:t,nowButton:i,disabled:n,format:s,steps:a,unstyled:r}=this.props;return p.createElement(pi,{ref:this.setTimeSelectorRef,mobileMode:this.mobileMode,show:this.show,cancelButton:t,disabled:n,nowButton:i,format:s,min:this.min,max:this.max,steps:a,smoothScroll:e,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject,unstyled:r})},this.renderPopup=()=>{const{popupClass:e,...t}=this.popupSettings,{unstyled:i}=this.props,s=i&&i.uTimePicker,a=n.classNames(e),r={popupClass:n.uTimePicker.popup({c:s}),show:this.show,animate:null!==this.element,anchor:this.element,className:a,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...t};return this.props.popup?p.createElement(this.props.popup,{...r},this.renderTimeSelector()):p.createElement(d.Popup,{...r},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(ve,Ce[me]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(pe,Ce[pe]),onApply:e=>this.handleValueChange(e)}};return p.createElement(Nt,{...t},p.createElement(h.ActionSheetContent,null,this.renderTimeSelector()))},this.setTimeSelectorRef=e=>{this._timeSelector=e},this.nextValue=(e,t)=>void 0!==e.value?e.value:t.value,this.nextShow=(e,t)=>void 0!==e.show?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:s.cloneDate(e.value||this.state.candidate)}),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:t}=this.props,i=this.state.candidate||this.value;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.handleClick=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===n.Keys.esc)return this.shouldFocusDateInput=!0,void this.setShow(!1);t&&(i===n.Keys.up||i===n.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===n.Keys.up,this.setShow(i===n.Keys.down))},this.showLicenseWatermark=!n.validatePackage(Ft,{component:"TimePicker"}),this.licenseMessage=n.getLicenseMessage(Ft),this.state={value:this.props.defaultValue||e.defaultProps.defaultValue,show:this.props.defaultShow||e.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(n.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 e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value;return null!==e?s.cloneDate(e):null}get show(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.props.show?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const e=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),i=this.normalizeTime(this.max),n=Dt(e,t,i),s=void 0!==this.props.validationMessage,a=(!this.required||null!==this.value)&&n,r=void 0!==this.props.valid?this.props.valid:a;return{customError:s,rangeOverflow:Ct(e,i),rangeUnderflow:St(e,t),valid:r,valueMissing:null===this.value}}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required&&this.props.required}get popupSettings(){return this.props.popupSettings||e.defaultProps.popupSettings}get min(){return void 0!==this.props.min?this.props.min:e.defaultProps.min}get max(){return void 0!==this.props.max?this.props.max:e.defaultProps.max}get dateInputComp(){return this.props.dateInput||e.defaultProps.dateInput}get localizationService(){return a.provideLocalizationService(this)}componentDidMount(){var e;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body);const t=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._element,{fieldName:t,onValueChange:e=>{this.handleKendoPasteValue(e)}})}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow&&this._timeSelector.focusActiveList(),this.mobileMode&&this.show&&!this.prevShow&&setTimeout(()=>{this._timeSelector&&this._timeSelector.focusActiveList()},300),this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var e,t;null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect(),null==(t=this.KendoPasteSubscription)||t.unsubscribe()}render(){const{size:t=e.defaultProps.size,rounded:i=e.defaultProps.rounded,fillMode:s=e.defaultProps.fillMode,disabled:a,tabIndex:l,title:u,id:c,className:d,format:h,formatPlaceholder:m,width:g,name:v,steps:f,validationMessage:w,required:b,validityStyles:y,ariaLabelledBy:D,ariaDescribedBy:S,unstyled:C,enableMouseWheel:k,autoCorrectParts:x,autoSwitchParts:I,autoSwitchKeys:M,allowCaretMode:E,inputAttributes:T}=this.props,O=C&&C.uTimePicker,N=!this.validityStyles||this.validity.valid,R={disabled:a,format:h,formatPlaceholder:m,id:c,ariaLabelledBy:D,ariaDescribedBy:S,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:v,onChange:this.handleInputValueChange,required:b,steps:f,tabIndex:this.show?-1:l,title:u,valid:this.validity.valid,validationMessage:w,validityStyles:y,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,enableMouseWheel:k,autoCorrectParts:x,autoSwitchParts:I,autoSwitchKeys:M,allowCaretMode:E,inputAttributes:T},V=this.localizationService.toLanguageString(ve,Ce[ve]),P=this.localizationService.toLanguageString(ge,Ce[ge]),F=p.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:e,onBlur:l})=>p.createElement(p.Fragment,null,p.createElement("span",{ref:e=>{this._element=e},className:n.classNames(n.uTimePicker.wrapper({c:O,size:t,rounded:i,fillMode:s,invalid:!N,required:this.required,disabled:a}),d),onKeyDown:this.handleKeyDown,style:{width:g},onFocus:this.mobileMode?this.handleClick:e,onBlur:l,onClick:this.mobileMode?this.handleClick:void 0},p.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0,...R}),p.createElement(r.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:o.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:P,className:n.classNames(n.uTimePicker.inputButton({c:O})),fillMode:s,"aria-label":V}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&p.createElement(n.WatermarkOverlay,{message:this.licenseMessage})));return this.props.label?p.createElement(Ot,{dateInput:this._dateInput,label:this.props.label,editorId:c,editorValid:N,editorDisabled:this.props.disabled,children:F,style:{width:this.props.width}}):F}normalizeTime(e){return L(N,e)}setShow(e){const{onOpen:t,onClose:i}=this.props;this.show!==e&&(this.setState({show:e}),e&&t&&t.call(void 0,{target:this}),!e&&i&&i.call(void 0,{target:this}))}mergeTime(e){return this.value&&e?L(this.value,e):e}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};gi.displayName="TimePicker",gi.propTypes={className:i.string,cancelButton:i.bool,nowButton:i.bool,defaultShow:i.bool,defaultValue:i.instanceOf(Date),disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),formatPlaceholder:i.oneOfType([i.oneOf(["wide","narrow","short","formatPattern"]),i.shape({year:i.string,month:i.string,day:i.string,hour:i.string,minute:i.string,second:i.string})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,min:i.instanceOf(Date),max:i.instanceOf(Date),name:i.string,popupSettings:i.shape({animate:i.bool,appendTo:i.any,popupClass:i.string}),show:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,title:i.string,value:i.instanceOf(Date),width:i.oneOfType([i.number,i.string]),validationMessage:i.string,required:i.bool,validate:i.bool,valid:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),inputAttributes:i.object},gi.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:F,min:P,popupSettings:{},tabIndex:0,steps:{},validityStyles:!0,dateInput:It,size:void 0,rounded:void 0,fillMode:void 0};let vi=gi;const fi=n.createPropsContext(),wi=n.withIdHOC(n.withPropsContext(fi,n.withUnstyledHOC(n.withAdaptiveModeContext(vi))));wi.displayName="KendoReactTimePicker",a.registerForLocalization(vi);const bi={showWeekNumbers:!1,views:2,take:2,allowReverse:!0,weekDaysFormat:"short",min:R,max:V},yi=p.forwardRef((e,t)=>{const{showWeekNumbers:i=bi.showWeekNumbers,allowReverse:a=bi.allowReverse,weekDaysFormat:r=bi.weekDaysFormat,min:o=bi.min,max:l=bi.max,activeView:u,bus:c,cellUID:d,focusedDate:h,onChange:m,onWeekSelect:g,selectionRange:v,service:f,value:w,onCellEnter:b,cell:y,weekCell:D,showOtherMonthDays:S,dates:C,verticalView:k}=e,x=!(!i||u!==M.month),I=()=>{if(!R.current)return;const e=R.current.querySelector("td.k-focus"),t=R.current.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),V.current=!0},E=()=>{if(!R.current)return;const e=R.current.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),V.current=!1},T=(e,t,i)=>{g&&i&&g(e,t,i)},O=(e,t=!1)=>{if(m){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:s.cloneDate(e.value),target:N.current,isTodayClick:t};m(i)}},N=p.useRef(null);p.useImperativeHandle(N,()=>({element:R.current,focusActiveDate:I,blurActiveDate:E})),p.useImperativeHandle(t,()=>N.current);const R=p.useRef(null),V=p.useRef(!1);p.useEffect(()=>{V.current&&I()});const P=a?(e=>{if(null===e.start||null===e.end)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}})(v):v,F=n.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":k,"k-hstack":!k,"k-calendar-monthview":u===M.month,"k-calendar-yearview":u===M.year,"k-calendar-decadeview":u===M.decade,"k-calendar-centuryview":u===M.century});return p.createElement("div",{ref:R,className:F},C.map(e=>p.createElement("table",{className:"k-calendar-table",key:e.getTime(),role:"grid"},p.createElement(Z,{bus:c,weekDaysFormat:r,service:f,key:e.getTime(),direction:"horizontal",activeView:u,cellUID:d,viewDate:e,min:o,max:l,focusedDate:h,selectionRange:P,selectedDate:w,showWeekNumbers:x,onChange:O,onWeekSelect:T,onCellEnter:b,cell:y,weekCell:D,showOtherMonthDays:S,allowReverse:a}))))});yi.displayName="KendoReactHorizontalViewList";const Di=yi;Di.defaultProps=bi;const Si=(e,t=Ii.min,i=Ii.max)=>e instanceof Date&&!Array.isArray(e)&&A(s.getDate(e),t,i)?s.getDate(e):null,Ci=(e,t=Ii.min,i=Ii.max)=>Array.isArray(e)?e.filter(e=>A(e,t,i)).map(e=>s.getDate(e)):null,ki=e=>"object"!=typeof e||e instanceof Date||null===e||Array.isArray(e)?E:e,xi=(e,t,i)=>e||t&&t[0]||i&&i.start,Ii={disabled:!1,min:R,max:V,defaultActiveView:"month",defaultValue:null,topView:"century",weekDaysFormat:"short",tabIndex:0,bottomView:"month",views:2,allowReverse:!1,showOtherMonthDays:!1},Mi=n.createPropsContext(),Ei=p.forwardRef((e,t)=>{var i;const l=p.useMemo(()=>!n.validatePackage(Ft,{component:"MultiViewCalendar"}),[]),u=p.useMemo(()=>n.getLicenseMessage(Ft),[]),c=n.usePropsContext(Mi,e),d=n.useId(c.id),{disabled:h=Ii.disabled,min:m=Ii.min,max:g=Ii.max,defaultActiveView:v=Ii.defaultActiveView,defaultValue:f=Ii.defaultValue,topView:w=Ii.topView,bottomView:b=Ii.bottomView,weekDaysFormat:y=Ii.weekDaysFormat,tabIndex:D=Ii.tabIndex,views:S=Ii.views,allowReverse:C=Ii.allowReverse,showOtherMonthDays:k=Ii.showOtherMonthDays,_ref:x,className:I,weekNumber:E,mobileMode:T,focusedDate:N,value:R,onChange:V,onFocus:P,onBlur:F,cell:L,weekCell:H,headerTitle:_,mode:z,activeRangeEnd:K,ariaLabelledBy:W,ariaDescribedBy:Y,dir:U}=c,$=s.getDate(m),j=s.getDate(g),Z=M[b],J=M[w],G="rtl"===U,te=d+"-cell-uid",ie=d+"-wrapper-id",ne=e=>{if(!ke.current)return!1;const t=s.cloneDate(He),i=ke.current.move(t,e);return $<=i&&i<=j||ke.current.isInSameView(i,$)||ke.current.isInSameView(i,j)},se=(e,t)=>!!t&&s.firstDayOfMonth(t)<=e&&e<=s.lastDayOfMonth(t),ae=(e,t)=>{we.current=!1;const i=re(e,t);Ee({navigateDate:i,focusedDate:i})},re=(e,t)=>oe(ke.current.move(t,e)),oe=e=>q(e,$,j),le=()=>{const e=Ve.PrevView,t=s.cloneDate(He);if(Ie.activeView>0&&t.getFullYear()>Se.current[0].getFullYear())ae(e,re(e,t));else{const i=se(t,Se.current[1])?re(e,t):t;ae(e,i)}},ue=()=>{ae(Ve.NextView,s.cloneDate(He))},ce=e=>{const t=s.cloneDate(e.value),i=pe.current.canMoveDown(Ie.activeView);if(h)return;if(i){if(!e.isTodayClick)return pe.current.moveDown(Ie.activeView,e.syntheticEvent),void Ee({focusedDate:t,navigateDate:t});pe.current.moveToBottom(Ie.activeView)}let n;we.current=!0;const a=Ci(Pe,$,j),r=Si(Pe,$,j),o=ki(Pe),l=void 0!==K?K:be.current;switch(z){case"single":default:n=s.cloneDate(e.value);break;case"multiple":if(Array.isArray(a)){const t=a.slice();let i=-1;t.forEach((t,n)=>{s.isEqualDate(t,e.value)&&(i=n)}),-1!==i?t.splice(i,1):t.push(s.cloneDate(e.value)),n=t.slice()}else n=r?[s.cloneDate(r),s.cloneDate(e.value)]:[s.cloneDate(e.value)];break;case"range":n=null!==o.start&&null!==o.end&&"start"===l?(e=>({start:e,end:null}))(e.value):((e,t)=>{const{end:i,start:n}=t,s=void 0!==K?K:be.current,a=null!==t.start&&e.getTime()<=t.start.getTime(),r=ki(Pe),o=Si(Pe,$,j);return!C&&a?{start:e,end:r.start}:"end"!==s?{start:e,end:i}:{start:n||o,end:e}})(e.value,o),be.current="end"!==l?"end":"start"}if(ve.current=n,e.isTodayClick&&Ee({navigateDate:t}),Ee({value:n,focusedDate:t}),ve.current=n,V){const t={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:n,target:de.current};V(t)}ve.current=void 0},de=p.useRef(null);p.useImperativeHandle(de,()=>({get element(){return he.current},get focusedDate(){return s.cloneDate(He)},get value(){return Pe},get props(){return c},focus:()=>{var e;return null==(e=he.current)?void 0:e.focus()}})),p.useImperativeHandle(t,()=>de.current);const he=p.useRef(null),me=p.useRef(null),pe=p.useRef(new $e(({view:e})=>{we.current=!1,Me(t=>({...t,activeView:e,navigateDate:t.focusedDate}))})),ge=p.useRef(new Je(pe.current)),ve=p.useRef(void 0),fe=p.useRef(!1),we=p.useRef(!1),be=p.useRef("start"),ye=p.useRef(O(M[v],Z,J)),De=p.useRef(S),Se=p.useRef([]),ke=p.useRef(null),[Ie,Me]=p.useState(()=>{const e=void 0!==R?R:f,t=Si(e,$,j),i=Ci(e,$,j),n=ki(e),s=xi(t,i,n),a=O(M[v],Z,J),r=q(N||s||B(),$,j);return be.current=((e,t)=>null===e.start&&null===t?"start":null===e.end?"end":"start")(n,t),ye.current=a,De.current=S,{value:e,activeView:a,focusedDate:r,navigateDate:r}}),Ee=e=>{Me(t=>({...t,...e}))};p.useEffect(()=>{we.current=!0},[]),p.useEffect(()=>{me.current&&(fe.current?me.current.focusActiveDate:me.current.blurActiveDate)();const e=Si(Pe,$,j),t=Si(Pe,$,j);we.current=!!(t&&e&&t.getTime()&&e.getTime()),ye.current=Ie.activeView,De.current=S}),p.useEffect(()=>{x&&x({element:he.current})});const Te=a.useInternationalization(),Oe=a.useLocalization();pe.current.configure(Z,J);const Ne=O(Ie.activeView,Z,J),Re=pe.current.service(Ne,Te);let Pe;ke.current=Re,Pe=void 0!==ve.current?ve.current:void 0!==R?R:Ie.value;const Fe=Si(Pe,$,j),Le=Ci(Pe,$,j),Be=ki(Pe),Ae=xi(Fe,Le,Be),He=q(we.current&&null!==Ae?Ae:Ie.focusedDate,$,j),_e=A(B(),s.getDate($),s.getDate(j)),ze=n.classNames("k-calendar k-calendar-range",{"k-disabled":h},I),Ke=((e,t)=>({start:e.start,end:null===e.end&&null!==e.start&&fe.current?t:e.end}))(Be,He),qe=Oe.toLanguageString(Q,Ce[Q]),We=Oe.toLanguageString(ee,Ce[ee]),Ye=!ne(Ve.PrevView),Ue=!ne(Ve.NextView),je={"aria-disabled":Ye},Ze={"aria-disabled":Ue},Ge=ye.current!==Ne,Xe=Se.current.length>0&&se(Ie.navigateDate,Se.current[0]),Qe=De.current!==S;(!Xe||Ge||Qe)&&(Se.current=Re.datesList(Ie.navigateDate,S));const et=s.cloneDate(null!=(i=Se.current)&&i[0]?Se.current[0]:B());return p.createElement("div",{ref:he,className:ze,id:c.id||ie,"aria-labelledby":W,"aria-describedby":Y,tabIndex:h?void 0:D,onFocus:e=>{fe.current=!0,me.current&&(me.current.focusActiveDate(),P&&P(e))},onBlur:e=>{fe.current=!1,me.current&&(me.current.blurActiveDate(),F&&F(e))},onMouseDown:e=>{e.preventDefault()},onClick:e=>{he.current&&he.current.focus({preventScroll:!0})},onKeyDown:e=>{const{keyCode:t,ctrlKey:i,metaKey:a}=e;if(84===t){const e=B();we.current=!1,Ee({focusedDate:e,navigateDate:e})}if((i||a)&&(t===n.Keys.left&&le(),t===n.Keys.right&&ue()),t===n.Keys.enter){const t={syntheticEvent:e,nativeEvent:e.nativeEvent,value:s.cloneDate(He),target:de.current};ce(t)}else{const t=q(ge.current.move(He,ge.current.action(e),Ie.activeView,ke.current,e),$,j);if(s.isEqualDate(He,t))return;Se.current&&ke.current&&!ke.current.isInArray(t,Se.current)&&Ee({navigateDate:t}),we.current=!1,Ee({focusedDate:t})}e.preventDefault()},"aria-disabled":h,dir:U},p.createElement(X,{key:`.kendo.calendar.header.${et.getTime()}`,activeView:Ne,currentDate:et,min:$,max:j,rangeLength:S,bus:pe.current,service:Re,headerTitle:_,verticalView:T,commands:p.createElement(p.Fragment,null,p.createElement(r.Button,{type:"button",className:"k-calendar-nav-prev",icon:G?"chevron-right":"chevron-left",svgIcon:G?o.chevronRightIcon:o.chevronLeftIcon,fillMode:"flat",title:qe,disabled:Ye,onClick:le,...je}),p.createElement(xe,{min:$,max:j,onClick:e=>{_e&&ce(e)},disabled:!_e}),p.createElement(r.Button,{type:"button",className:"k-calendar-nav-next",icon:G?"chevron-left":"chevron-right",svgIcon:G?o.chevronLeftIcon:o.chevronRightIcon,fillMode:"flat",title:We,disabled:Ue,onClick:ue,...Ze}))}),p.createElement(Di,{ref:me,dates:Se.current,activeView:Ne,focusedDate:s.cloneDate(He),weekDaysFormat:y,min:$,max:j,bus:pe.current,service:Re,selectionRange:Ke,value:Le||Fe,cellUID:te,views:S,onChange:ce,onWeekSelect:(e,t,i)=>{if("single"===z)return;const n=0===t?e:s.addDays(e,-t),a=6===t?e:s.addDays(e,6-t);let r=null;if("multiple"===z){r=[];for(let e=0;e<=6;e++)r.push(s.addDays(n,e));Ee({value:r,focusedDate:e})}if("range"===z&&(r={start:n,end:a},Ee({value:r,focusedDate:e})),V){const e={syntheticEvent:i,nativeEvent:i.nativeEvent,value:r,target:de.current};V(e)}},showWeekNumbers:E,onCellEnter:e=>{"range"===z&&(we.current=!1,Ee({focusedDate:e}))},cell:L,weekCell:H,headerTitle:_,verticalView:T,showOtherMonthDays:k,allowReverse:C}),l&&p.createElement(n.WatermarkOverlay,{message:u}))});Ei.propTypes={activeRangeEnd:i.oneOf(["start","end"]),allowReverse:i.bool,bottomView:i.oneOf(["month","year","decade","century"]),className:i.string,defaultActiveView:i.oneOf(["month","year","decade","century"]),defaultValue:i.oneOfType([T(i.instanceOf(Date)),i.arrayOf(i.instanceOf(Date)),i.shape({start:T(i.instanceOf(Date)),end:T(i.instanceOf(Date))})]),disabled:i.bool,focusedDate:i.instanceOf(Date),id:i.string,weekDaysFormat:i.oneOf(["narrow","short","abbreviated"]),ariaLabelledBy:i.string,ariaDescribedBy:i.string,max:i.instanceOf(Date),min:i.instanceOf(Date),mode:i.oneOf(["single","multiple","range"]),onBlur:i.func,onChange:i.func,onFocus:i.func,tabIndex:i.number,topView:i.oneOf(["month","year","decade","century"]),value:i.oneOfType([T(i.instanceOf(Date)),i.arrayOf(i.instanceOf(Date)),i.shape({start:T(i.instanceOf(Date).isRequired),end:T(i.instanceOf(Date).isRequired)})]),views:(e,t,i)=>{const n=e[t];return void 0!==n&&n<1?new Error(`Invalid prop '${t}' supplied to'${i}'. The '${t}' property cannot be less than 1'`):null},weekNumber:i.bool,showOtherMonthDays:i.bool,dir:i.string},Ei.displayName="KendoReactMultiViewCalendar";const Ti=Ei,Oi=Ei,Ni=class e extends p.Component{constructor(t){super(t),this._element=null,this._calendar=null,this._startDateInput=p.createRef(),this._endDateInput=p.createRef(),this.shouldFocusDateInput=!1,this.shouldFocusCalendar=!1,this.showLicenseWatermark=!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)=>(void 0!==e.value?e.value:t.value)||E,this.calculateShow=(e,t)=>void 0!==e.show?e.show:t.show,this.renderCalendar=()=>{const e=this.value||E,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?p.createElement(this.props.calendar,{...t}):p.createElement(Oi,{...t,ref:this.setCalendarRef})},this.renderPopup=()=>{const e={popupClass:n.classNames("k-calendar-container","k-daterangepicker-popup"),animate:null!==this._element,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?p.createElement(this.props.popup,{...e},this.renderCalendar()):p.createElement(d.Popup,{...e},this.renderCalendar())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:e=>this.handleCancel(e),title:this.props.adaptiveTitle,subTitle:this.props.adaptiveSubtitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(De,Ce[De]),onCancel:this.handleCancel,applyText:this.localizationService.toLanguageString(Se,Ce[Se]),onApply:this.handleBlur}};return p.createElement(Nt,{...t},p.createElement(h.ActionSheetContent,null,p.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:E})});const{onCancel:t}=this.props;t&&t.call(void 0,e)},this.handleEndChange=e=>{const t={start:this.value.start,end:s.cloneDate(e.value||void 0)};this.handleChange(t,e)},this.handleStartChange=e=>{const t={start:s.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||E;const t=Array.isArray(e.value)?e.value[0]:e.value;return{start:null!==this.value.end?t:this.value.start,end:null!==this.value.start?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===n.Keys.esc?(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):i&&t===n.Keys.down?(e.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0),this.focusCalendarElement()):i&&t===n.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 e={syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:this.value,show:this.show,target:this};i.call(void 0,e)}this.valueDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(Ft,{component:"DateRangePicker"}),this.licenseMessage=n.getLicenseMessage(Ft),this.state={show:this.props.show||this.props.defaultShow||e.defaultProps.defaultShow,value:this.props.value||this.props.defaultValue||e.defaultProps.defaultValue,currentValue:E},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(void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value)||E}get show(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.props.show?this.props.show:this.state.show}get min(){return void 0!==this.props.min?this.props.min:e.defaultProps.min}get max(){return void 0!==this.props.max?this.props.max:e.defaultProps.max}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get localizationService(){return a.provideLocalizationService(this)}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}componentDidMount(){var e;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this.shouldFocusCalendar&&this.focusCalendarElement(),this.mobileMode&&this.show&&setTimeout(()=>{this.focusCalendarElement()},300),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1}componentWillUnmount(){var e;clearTimeout(this.nextTickId),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{autoFocus:e}=this.props,t=this.value||E,i=this.mobileMode&&this.show?this.state.currentValue:t,s=(this.props.startDateInputSettings||{}).id||this._startInputId,l=(this.props.endDateInputSettings||{}).id||this._endInputId,u=n.classNames("k-daterangepicker",{"k-disabled":this.props.disabled},this.props.className),c=this.localizationService.toLanguageString(oe,Ce[oe]),d=this.localizationService.toLanguageString(le,Ce[le]),h=this.localizationService.toLanguageString(ue,Ce[ue]),m={disableSelection:this.mobileMode&&!0,label:c,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,clearButton:this.props.clearButton,...this.props.startDateInputSettings,value:i.start,onChange:this.handleStartChange,inputAttributes:this.props.inputAttributes},g={disableSelection:this.mobileMode&&!0,label:d,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,clearButton:this.props.clearButton,...this.props.endDateInputSettings,value:i.end,onChange:this.handleEndChange,inputAttributes:this.props.inputAttributes},v=p.createElement(r.Button,{type:"button",className:"k-select",fillMode:"flat",title:a.provideLocalizationService(this).toLanguageString(re,Ce[re]),onMouseDown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":s+" "+l,"aria-label":a.provideLocalizationService(this).toLanguageString(re,Ce[re])},p.createElement(n.IconWrap,{style:{transform:"rotate(90deg)"},name:"arrows-swap",icon:o.arrowsSwapIcon}));return p.createElement(p.Fragment,null,p.createElement("span",{ref:e=>{this._element=e},className:u,style:this.props.style,id:this.props.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.tabIndex,onFocus:this.mobileMode?this.handleClick:this.handleFocus,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onBlur:this.mobileMode?void 0:this.handleBlur,dir:this.props.dir},this.props.startDateInput?p.createElement(this.props.startDateInput,{...m}):p.createElement(It,{...m,autoFocus:e,ref:this._startDateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0}),(this.props.allowReverse||this.props.calendarSettings&&this.props.calendarSettings.allowReverse)&&this.props.swapButton?v:h,this.props.endDateInput?p.createElement(this.props.endDateInput,{...g}):p.createElement(It,{...g,ref:this._endDateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&p.createElement(n.WatermarkOverlay,{message:this.licenseMessage}))}focusDateInputElement(){if(!(document&&this.startDateInput&&this.startDateInput.element&&this.endDateInput&&this.endDateInput.element))return;const e=n.getActiveElement(document);null!==this.value.start&&null===this.value.end||e===this.endDateInput.element?e!==this.startDateInput.element&&this.endDateInput.element.focus({preventScroll:!0}):this.startDateInput.element.focus({preventScroll:!0})}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}setShow(e){const{onOpen:t,onClose:i}=this.props;this.show!==e&&(this.setState({show:e}),e&&t&&t.call(void 0,{target:this}),!e&&i&&i.call(void 0,{target:this}))}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};Ni.displayName="DateRangePicker",Ni.propTypes={allowReverse:i.bool,calendarSettings:i.any,className:i.string,defaultShow:i.bool,defaultValue:i.shape({start:T(i.instanceOf(Date).isRequired),end:T(i.instanceOf(Date).isRequired)}),disabled:i.bool,endDateInputSettings:i.shape(It.propTypes),focusedDate:i.instanceOf(Date),format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,max:i.instanceOf(Date),min:i.instanceOf(Date),onBlur:i.func,onChange:i.func,onFocus:i.func,popupSettings:i.any,show:i.bool,startDateInputSettings:i.any,style:i.any,swapButton:i.any,tabIndex:i.number,dir:i.string,value:i.shape({start:T(i.instanceOf(Date)),end:T(i.instanceOf(Date))}),autoFocus:i.bool,inputAttributes:i.object},Ni.defaultProps={allowReverse:!1,defaultShow:!1,defaultValue:E,disabled:!1,format:"d",max:V,min:R,swapButton:!1,autoFocus:!1};let Ri=Ni;const Vi=n.createPropsContext(),Pi=n.withIdHOC(n.withPropsContext(Vi,n.withAdaptiveModeContext(Ri)));Pi.displayName="KendoReactDateRangePicker",a.registerForLocalization(Ri);const Fi=class extends p.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=e=>{Promise.resolve().then(()=>{"time"===this.state.tab&&this._timePart&&this._timePart.focus(e);const t=this.calendarElement();"date"===this.state.tab&&t&&t.focus(e)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-calendar"),this.move=e=>{if("right"===e&&"time"===this.state.tab||"left"===e&&"date"===this.state.tab)return;const t="left"===e?"date":"time";this.shouldFocusPart=!0,this.setState({tab:t})},this.dateTimeFooter=()=>{const{cancelButton:e,unstyled:t}=this.props,i=t&&t.uDateTimePicker,s=this.localizationService.toLanguageString(be,Ce[be]),a=this.localizationService.toLanguageString(ye,Ce[ye]);return p.createElement("div",{className:n.classNames(n.uDateTimePicker.timeFooter({c:i}))},p.createElement(r.Button,{type:"button",themeColor:"primary",ref:e=>{this._acceptButton=e},className:n.classNames(n.uTime.accept({c:i})),disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:a,"aria-label":a},a),e&&p.createElement(r.Button,{type:"button",ref:e=>{this._cancelButton=e},className:n.classNames(n.uTime.cancel({c:i})),onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:s,"aria-label":s},s))},this.handleReject=e=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||N});const t=this.mergeDate(this.props.value,this.props.value||N);if(this.props.onReject){const i={nativeEvent:e.nativeEvent,syntheticEvent:e,target:this,value:t};this.props.onReject.call(void 0,i)}},this.handleAccept=(e,t)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const i=this.mergeDate(this.state.dateValue,t||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:this})},this.handleNowClick=e=>{this.setState({timeValue:ft()}),this.handleAccept(e,ft())},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:t,altKey:i}=e;if(!this.props.disabled)switch(t){case n.Keys.enter:return void(!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e));case n.Keys.left:if(!i)return;return void this.move("left");case n.Keys.right:if(!i)return;return void this.move("right");default:return}},this.handleCancelKeyDown=e=>{var t;const{keyCode:i}=e;i===n.Keys.tab&&null!=(t=this._dateButtonRef)&&t.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=e=>{var t;const{keyCode:i}=e;i===n.Keys.tab&&!this.props.cancelButton&&null!=(t=this._dateButtonRef)&&t.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=e=>{var t,i,s;const{keyCode:a,shiftKey:r}=e;r&&a===n.Keys.tab&&(e.stopPropagation(),null!=(t=this._cancelButton)&&t.element?this._cancelButton.element.focus():null==(s=null==(i=this._acceptButton)?void 0:i.element)||s.focus()),a===n.Keys.enter&&(e.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=e=>{const{keyCode:t}=e;t===n.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||N}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return null!==this.state.dateValue}get localizationService(){return a.provideLocalizationService(this)}componentDidUpdate(e,t){var i,n;this.shouldFocusPart&&this.focus({preventScroll:!0}),((null==(i=e.value)?void 0:i.getTime())!==(null==(n=this.props.value)?void 0:n.getTime())||this.state.tab!==t.tab&&this.props.value)&&this.setState(t=>({dateValue:e.value&&this.props.value&&s.isEqualDate(e.value,this.props.value)?t.dateValue:this.props.value,timeValue:this.props.value||N})),this.shouldFocusPart=!1}render(){const{disabled:e,min:t,max:i,weekNumber:s,focusedDate:a,format:o,mobileMode:l,footerActions:u,unstyled:c}=this.props,d=c&&c.uDateTimePicker,h=n.classNames(n.uDateTimePicker.wrap({c:d,date:"date"===this.state.tab,time:"time"===this.state.tab,disabled:e})),m=this.localizationService.toLanguageString(fe,Ce[fe]),g=this.localizationService.toLanguageString(we,Ce[we]),v={min:t,max:i,weekNumber:s,focusedDate:a,disabled:e||"date"!==this.state.tab,value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:e||"date"!==this.state.tab?-1:void 0,mobileMode:l};return p.createElement("div",{onKeyDown:this.handleKeyDown,className:h,tabIndex:-1},p.createElement("div",{className:n.classNames(n.uDateTimePicker.buttonGroup({c:d}))},p.createElement(r.ButtonGroup,{width:"100%",unstyled:c},p.createElement(r.Button,{ref:e=>{this._dateButtonRef=e},type:"button",selected:"date"===this.state.tab,togglable:!0,size:l?"large":void 0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},m),p.createElement(r.Button,{type:"button",selected:"time"===this.state.tab,togglable:!0,size:l?"large":void 0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},g))),p.createElement("div",{className:n.classNames(n.uDateTimePicker.selector({c:d}))},p.createElement("div",{className:n.classNames(n.uDateTimePicker.calendarWrap({c:d})),ref:e=>{this._calendarWrap=e}},this.props.calendar?p.createElement(this.props.calendar,{key:this.state.tab,...v}):p.createElement(st,{key:this.state.tab,ref:e=>{this._calendar=e},...v})),p.createElement("div",{className:n.classNames(n.uDateTimePicker.timeWrap({c:d}))},p.createElement("div",{className:n.classNames(n.uDateTimePicker.timeSelector({c:d,mobileMode:l}))},p.createElement(hi,{key:1,onNowClick:this.handleNowClick,disabled:e||"time"!==this.state.tab,ref:e=>{this._timePart=e},min:this.minTime||P,max:this.maxTime||F,steps:this.props.steps,value:this.state.timeValue,format:o,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:l,unstyled:c})))),u&&this.dateTimeFooter())}get minTime(){return void 0!==this.props.minTime?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return void 0!==this.props.maxTime?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(e,t){return s.isEqualDate(e,t||B())?e:null}hasActiveButton(){if(!this._acceptButton)return!1;const e=n.getActiveElement(document);return this._acceptButton&&e===this._acceptButton.element||this._cancelButton&&e===this._cancelButton.element}mergeTime(e,t){return e&&t?L(t,e):t}mergeDate(e,t){return e?L(e||B(),t):t}};Fi.defaultProps={footerActions:!0};let Li=Fi;a.registerForLocalization(Li);const Bi=class e extends p.Component{constructor(t){super(t),this._element=null,this._dateInput=p.createRef(),this._dateTimeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.handleSmartPasteValue=e=>{if(e instanceof Date&&!isNaN(e.getTime()))return void this.applyKendoPasteDate(e);const t=null!=e?String(e):"";if(!t)return;const i=new Date(t);isNaN(i.getTime())||this.applyKendoPasteDate(i)},this.applyKendoPasteDate=e=>{if(!H(e,this.min,this.max))return;const t=new Event("change",{bubbles:!0}),i={target:this._element,currentTarget:this._element,nativeEvent:t};this.handleValueChange({syntheticEvent:i,nativeEvent:t,value:e})},this.focus=()=>{const e=this.dateInputElement();e&&e.focus()},this.renderPicker=()=>{const{disabled:e,minTime:t,maxTime:i,format:n,calendar:s,cancelButton:a,weekNumber:r,focusedDate:o,unstyled:l}=this.props;return p.createElement(Li,{ref:e=>{this._dateTimeSelector=e},cancelButton:a,steps:this.props.steps,value:this.value,onChange:this.handleValueChange,onReject:this.handleReject,disabled:e,weekNumber:r,min:this.min,max:this.max,minTime:t,maxTime:i,focusedDate:o,format:n,calendar:s,mobileMode:this.mobileMode,footerActions:!this.mobileMode,unstyled:l})},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t=a.provideLocalizationService(this).toLanguageString(be,Ce[be]),i=a.provideLocalizationService(this).toLanguageString(ye,Ce[ye]),n={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,windowWidth:e,footer:{cancelText:t,onCancel:e=>{var t;return null==(t=this._dateTimeSelector)?void 0:t.handleReject(e)},applyText:i,onApply:e=>{var t;return null==(t=this._dateTimeSelector)?void 0:t.handleAccept(e)}}};return p.createElement(Nt,{...n},p.createElement(h.ActionSheetContent,null,this.renderPicker()))},this.handleReject=()=>{this.shouldFocusDateInput=!0,this.setShow(!1)},this.handleValueChange=e=>{this.setState({value:s.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.handleClick=()=>{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===n.Keys.esc)return this.shouldFocusDateInput=!0,void this.setShow(!1);t&&(i===n.Keys.up||i===n.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===n.Keys.up,this.setShow(i===n.Keys.down))},this.dateInputElement=()=>this.dateInput&&this.dateInput.element||this.element&&this.element.querySelector(".k-dateinput > input.k-input-inner"),this.state={value:this.props.defaultValue||e.defaultProps.defaultValue,show:this.props.defaultShow||e.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get value(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value;return null!==e?s.cloneDate(e):null}get show(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.props.show?this.props.show:this.state.show}get name(){return this.props.name}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get min(){return void 0!==this.props.min?this.props.min:e.defaultProps.min}get max(){return void 0!==this.props.max?this.props.max:e.defaultProps.max}get validity(){const e=H(this.value,this.min,this.max)&&yt(this.value,this.props.minTime||P,this.props.maxTime||F),t=void 0!==this.props.validationMessage,i=(!this.required||null!==this.value)&&e,n=void 0!==this.props.valid?this.props.valid:i;return{customError:t,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:n,valueMissing:null===this.value}}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required&&this.props.required}get dateInputComp(){return this.props.dateInput||e.defaultProps.dateInput}componentDidMount(){var e;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body);const t=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._element,{fieldName:t,onValueChange:e=>{this.handleSmartPasteValue(e)}})}componentDidUpdate(){const e=this.dateInputElement();this._dateTimeSelector&&this.show&&!this.prevShow&&this._dateTimeSelector.focus({preventScroll:!0}),this.mobileMode&&this.show&&!this.prevShow&&setTimeout(()=>{this._dateTimeSelector&&this._dateTimeSelector.focus({preventScroll:!0})},300),e&&!this.show&&this.shouldFocusDateInput&&e.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var e,t;clearTimeout(this.nextTickId),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect(),null==(t=this.KendoPasteSubscription)||t.unsubscribe()}render(){const{size:t=e.defaultProps.size,rounded:i=e.defaultProps.rounded,fillMode:s=e.defaultProps.fillMode,autoFocus:l=e.defaultProps.autoFocus,inputAttributes:u,disabled:c,tabIndex:h,title:m,id:g,format:v,formatPlaceholder:f,min:w,max:b,className:y,width:D,name:S,validationMessage:C,required:k,validityStyles:x,minTime:I,maxTime:M,ariaLabelledBy:E,ariaDescribedBy:T,popup:O=d.Popup,unstyled:N,autoFill:R,twoDigitYearMax:V,enableMouseWheel:P,autoCorrectParts:F,autoSwitchParts:L,autoSwitchKeys:B,allowCaretMode:A}=this.props,H=N&&N.uDateTimePicker,_=!this.validityStyles||this.validity.valid,z={id:g,ariaLabelledBy:E,ariaDescribedBy:T,format:v,formatPlaceholder:f,disabled:c,title:m,validityStyles:x,validationMessage:C,required:k,min:w,max:b,minTime:I,maxTime:M,name:S,tabIndex:this.show?-1:h,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,unstyled:N,autoFill:R,twoDigitYearMax:V,enableMouseWheel:P,autoCorrectParts:F,autoSwitchParts:L,autoSwitchKeys:B,allowCaretMode:A},K=p.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.handleBlur,onSyncFocus:this.props.onFocus,onSyncBlur:this.props.onBlur},({onFocus:e,onBlur:d})=>p.createElement(p.Fragment,null,p.createElement("div",{ref:e=>{this._element=e},className:n.classNames(n.uDateTimePicker.wrapper({c:H,size:t,fillMode:s,rounded:i,disabled:c,required:this.required,invalid:!_}),y),onKeyDown:this.handleKeyDown,style:{width:D},onFocus:this.mobileMode?this.handleClick:e,onBlur:d,onClick:this.mobileMode?this.handleClick:void 0},p.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0,ariaHasPopup:"dialog",autoFocus:l,inputAttributes:u,...z}),p.createElement(r.Button,{tabIndex:-1,type:"button",icon:"calendar",svgIcon:o.calendarIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:a.provideLocalizationService(this).toLanguageString(ce,Ce[ce]),className:n.classNames(n.uDateTimePicker.inputButton({c:H})),fillMode:s,"aria-label":a.provideLocalizationService(this).toLanguageString(ce,Ce[ce])}),p.createElement(O,{show:this.show,animate:null!==this.element,anchor:this.element,popupClass:n.classNames(n.uDateTimePicker.popup({c:H})),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?p.createElement(Ot,{dateInput:this._dateInput,label:this.props.label,editorId:g,editorValid:_,editorDisabled:this.props.disabled,children:K,style:{width:this.props.width}}):K}setShow(e){const{onOpen:t,onClose:i}=this.props;this.show!==e&&(this.setState({show:e}),e&&t&&t.call(void 0,{target:this}),!e&&i&&i.call(void 0,{target:this}))}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};Bi.displayName="DateTimePicker",Bi.propTypes={className:i.string,defaultShow:i.bool,defaultValue:i.instanceOf(Date),disabled:i.bool,focusedDate:i.instanceOf(Date),format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),formatPlaceholder:i.oneOfType([i.oneOf(["wide","narrow","short","formatPattern"]),i.shape({year:i.string,month:i.string,day:i.string,hour:i.string,minute:i.string,second:i.string})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,min:i.instanceOf(Date),max:i.instanceOf(Date),name:i.string,popupSettings:i.shape({animate:i.bool,appendTo:i.any,popupClass:i.string}),show:i.bool,tabIndex:i.number,title:i.string,value:i.instanceOf(Date),weekNumber:i.bool,width:i.oneOfType([i.number,i.string]),validationMessage:i.string,required:i.bool,validate:i.bool,valid:i.bool,cancelButton:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),autoFocus:i.bool,inputAttributes:i.object},Bi.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"g",max:V,min:R,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,cancelButton:!0,dateInput:It,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1};let Ai=Bi;const Hi=n.createPropsContext(),_i=n.withIdHOC(n.withPropsContext(Hi,n.withUnstyledHOC(n.withAdaptiveModeContext(Ai))));_i.displayName="KendoReactDateTimePicker",a.registerForLocalization(Ai),e.Action=Ve,e.BusViewService=$e,e.Calendar=st,e.CalendarCell=x,e.CalendarHeaderTitle=J,e.CalendarNavigationItem=Te,e.CalendarPropsContext=tt,e.CalendarViewEnum=M,e.CalendarWeekCell=I,e.CalendarWithoutContext=nt,e.CenturyViewService=Le,e.DOMService=je,e.DateInput=It,e.DateInputPropsContext=Et,e.DatePicker=Rt,e.DatePickerPropsContext=Pt,e.DateRangePicker=Pi,e.DateRangePickerPropsContext=Vi,e.DateRangePickerWithoutContext=Ri,e.DateTimePicker=_i,e.DateTimePickerPropsContext=Hi,e.DateTimePickerWithoutContext=Ai,e.DayPeriodService=_t,e.DecadeViewService=He,e.EMPTY_SELECTIONRANGE=E,e.Header=X,e.HorizontalViewList=Di,e.HoursService=$t,e.MAX_DATE=V,e.MAX_TIME=F,e.MIN_DATE=R,e.MIN_TIME=P,e.MinutesService=Qt,e.MonthViewService=Ke,e.MultiViewCalendar=Oi,e.MultiViewCalendarPropsContext=Mi,e.MultiViewCalendarWithoutContext=Ti,e.NavigationService=Je,e.ScrollSyncService=Ge,e.SecondsService=ai,e.TimeList=ui,e.TimePart=hi,e.TimePicker=wi,e.TimePickerPropsContext=fi,e.TimePickerWithoutContext=vi,e.TimeSelector=pi,e.TodayCommand=xe,e.ToggleButton=Tt,e.ViewList=Ee,e.Virtualization=k,e.WeekNamesService=U,e.YearViewService=Ye,e.dateInputDefaultProps=Mt,e.dateInputsMessages=Ce,e.datePickerDefaultProps=Vt,e.decreaseValue=ie,e.end=le,e.getNow=ft,e.getToday=B,e.increaseValue=te,e.separator=ue,e.start=oe,e.swapStartEnd=re,e.today=se,e.toggleCalendar=ae,e.toggleDateTimeSelector=ce});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-date-math"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-labels"),require("@progress/kendo-dateinputs-common"),require("@progress/kendo-intl"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-layout")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-date-math","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-svg-icons","@progress/kendo-react-labels","@progress/kendo-dateinputs-common","@progress/kendo-intl","@progress/kendo-react-popup","@progress/kendo-react-layout"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactDateinputs={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoDateMath,e.KendoReactIntl,e.KendoReactButtons,e.KendoSvgIcons,e.KendoReactLabels,e.KendoDateinputsCommon,e.KendoIntl,e.KendoReactPopup,e.KendoReactLayout)}(this,function(e,t,i,n,s,a,r,o,l,u,c,d,h){"use strict";function m(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}}),t.default=e,Object.freeze(t)}var p=m(t);const g=e=>Math.max(e,0);let v=class{constructor(e){this.offset=e}},f=class{constructor(e){this.skip=e}},w=class{constructor(e,t){this.onScrollAction=e,this.onPageAction=t,this.direction="vertical",this.firstLoaded=0,this.lastLoaded=0,this.lastScrollTop=0,this.take=0,this.total=0,this.rowHeightService=null,this.bottomOffset=0,this.topOffset=0}create(e,t,i,n,s=0,a=0,r="vertical"){this.rowHeightService=e,this.firstLoaded=t,this.lastLoaded=t+i,this.take=i,this.total=n,this.lastScrollTop=0,this.topOffset=s,this.bottomOffset=a,this.direction=r;const o=this.rowsForHeight(s),l=g(t-o);this.onScrollAction(new v(this.rowOffset(l))),this.onPageAction(new f(l))}onScroll({scrollLeft:e,scrollTop:t,offsetHeight:i,offsetWidth:n}){const s="vertical"===this.direction?t:e,a="vertical"===this.direction?i:n;if(this.lastScrollTop===s||!this.rowHeightService)return;const r=this.lastScrollTop>=s;this.lastScrollTop=s;const o=this.rowHeightService.index(g(s-this.topOffset)),l=this.rowHeightService.index(g(s+a-this.bottomOffset));if(!r&&l>=this.lastLoaded&&this.lastLoaded<this.total&&(this.firstLoaded=o,this.onScrollAction(new v(this.rowOffset(o))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new f(this.firstLoaded))),r&&o<=this.firstLoaded){const e=Math.floor(.3*this.take);this.firstLoaded=g(o-e),this.onScrollAction(new v(this.rowOffset(this.firstLoaded))),this.lastLoaded=Math.min(this.firstLoaded+this.take,this.total),this.onPageAction(new f(this.firstLoaded))}}rowOffset(e){return this.rowHeightService?this.rowHeightService.offset(e)+this.topOffset:0}rowsForHeight(e){return this.rowHeightService?Math.ceil(e/this.rowHeightService.height(0)):0}};const b={1:e=>t=>t+e,0:e=>t=>t-e},y={1:e=>t=>Math.min(t,e),0:e=>t=>Math.max(t,e)},D={1:e=>t=>t<e,0:e=>t=>t>e},S={direction:"vertical",scrollOffsetSize:0,maxScrollDifference:100,scrollDuration:100},C=p.forwardRef((e,t)=>{const{direction:i=S.direction,scrollOffsetSize:s=S.scrollOffsetSize,maxScrollDifference:a=S.maxScrollDifference,scrollDuration:r=S.scrollDuration,bottomOffset:o,className:l,tabIndex:u,role:c,children:d,unstyled:h,total:m,take:g,skip:v,topOffset:f,itemHeight:C,itemWidth:k,onMount:x,onScroll:I,onScrollAction:M}=e,E=e=>q.current?q.current[e]:0,T=()=>E("vertical"===i?"offsetHeight":"offsetWidth"),O=()=>E("vertical"===i?"scrollHeight":"scrollWidth"),N=()=>E("vertical"===i?"scrollTop":"scrollLeft"),R=(e,t)=>{const i=N();if(Number.parseInt(`${e}`,10)===Number.parseInt(`${i}`,10))return{start:e,end:e};const n=O()-T(),s=0===t?1:-1,r=((e,t,i)=>Math.min(Math.abs(t-e),i))(i,e,a||0),o=Math.min(e,n);return{start:Math.min(Math.max(o+s*r,0),n),end:o}},V=e=>Y.current?Y.current.index(e):0,P=e=>Y.current?Y.current.offset(e):0,F=()=>V(Math.ceil(N())),L=e=>{if(!Y.current)return!1;const t=N(),i=t+T(),n=Y.current.offset(e),s=n+Y.current.height(e);return n>=t&&s<=i},B=e=>!!Y.current&&N()!==Y.current.offset(e),A=e=>{const t="vertical"===i?"scrollTop":"scrollLeft";if(!q.current)return;const n=q.current[t];j.current&&"scrollTop"===t&&(!Number.isInteger(n)||!Number.isInteger(e))&&Math.abs(n-e)<10||(q.current[t]=e)},H=e=>{$.current=!1,Y.current&&A(Y.current.offset(e))},_=e=>{if(!Y.current||!globalThis)return;globalThis.cancelAnimationFrame(U.current);const t=Y.current.offset(e),i=(e=>e<N()?0:1)(t),{start:n,end:s}=R(t,i);if(n===s)return;const a=((e,t)=>{const i=r||S.scrollDuration;return Math.abs(t-e)/(i/17)})(n,s),o=b[i](a),l=y[i](s),u=D[i](o(s)),c=e=>{$.current=!0;const t=o(e);A(l(t)),u(t)?U.current=globalThis.requestAnimationFrame(()=>{c(t)}):$.current=!1};U.current=globalThis.requestAnimationFrame(()=>{c(n)})},z=()=>{Y.current&&A(Y.current.totalHeight()+o)},K=p.useRef(null),q=p.useRef(null),W=p.useRef(new w(e=>{Z.current=e},e=>{J.current=e})),Y=p.useRef(null),U=p.useRef(0),$=p.useRef(!1),j=p.useRef(Number.parseFloat(p.version)>17),Z=p.useRef(void 0),J=p.useRef(void 0),G=p.useRef(0),X=p.useRef(0),Q=p.useRef(null);p.useImperativeHandle(K,()=>({element:q.current,containerScrollSize:O(),containerScrollPosition:N(),activeIndex:F,scrollTo:A,scrollToIndex:H,animateToIndex:_,scrollToBottom:z,isIndexVisible:L,isListScrolled:B,itemIndex:V,itemOffset:P})),p.useImperativeHandle(t,()=>K.current),p.useEffect(()=>{x&&K.current&&x(K.current)},[]);const ee=null==h?void 0:h.uCalendar;(G.current!==m||Q.current!==i||X.current!==g)&&((()=>{const e="vertical"===i?C:k;void 0!==e&&(Y.current=new n.RowHeightService(m,e),W.current.create(Y.current,v,g,m,f,s,i))})(),G.current=m,Q.current=i,X.current=g);const te=`${(Y.current?Y.current.totalHeight():0)+o}`,ie="vertical"===i?{height:`${te}px`}:{width:`${te}px`},ne=n.classNames(n.uCalendar.scrollableSelector({c:ee}),n.uCalendar.scrollable({c:ee,horizontal:"horizontal"===i}),l),se=n.classNames(n.uCalendar.scrollablePlaceholder({c:ee,horizontal:"horizontal"===i}));return p.createElement("div",{ref:q,onScroll:e=>{if(!q.current||!Y.current)return;const t=e.target;W.current.onScroll({scrollLeft:t.scrollLeft,scrollTop:t.scrollTop,offsetHeight:t.offsetHeight,offsetWidth:t.offsetWidth});const i={index:Y.current.index(N()-f),target:t,scrollAction:Z.current,pageAction:J.current,animationInProgress:$.current};I&&I(e),M&&M(i),Z.current=void 0,J.current=void 0},className:ne,tabIndex:u,role:c},d,p.createElement("div",{style:ie,className:se}))});C.propTypes={bottomOffset:i.number.isRequired,className:i.string,direction:i.oneOf(["horizontal","vertical"]),itemHeight:i.number,itemWidth:i.number,maxScrollDifference:i.number,onScroll:i.func,onScrollAction:i.func,scrollDuration:i.number,scrollOffsetSize:i.number,skip:i.number.isRequired,tabIndex:i.number,take:i.number.isRequired,topOffset:i.number.isRequired,total:i.number.isRequired,role:i.string},C.displayName="KendoReactVirtualization";const k=C,x=p.memo(e=>{const{className:t,formattedValue:i,isWeekend:s,isFocused:a,isInRange:r,isSelected:o,isRangeStart:l,isRangeMid:u,isRangeEnd:c,isRangeSplitStart:d,isRangeSplitEnd:h,isToday:m,isDisabled:g,view:v,value:f,isOtherMonth:w,showOtherMonthDays:b,allowReverse:y,unstyled:D,activeRangeEnd:S,children:C,onClick:k,onMouseEnter:x,onMouseLeave:I,...M}=e,E="end"===S&&c,T="start"===S&&l,O=D&&D.uCalendar,N=n.classNames(n.uCalendar.td({c:O,rangeStart:!w&&!y&&l,rangeEnd:!w&&!y&&c,rangeMid:!w&&u,rangeSplitEnd:!w&&h,rangeSplitStart:!w&&d,active:T||E,focused:a,selected:!w&&(o||l||c),today:!w&&m,weekend:s,disabled:g,isOtherMonth:w,isEmpty:!b&&w}),t);return!b&&w?p.createElement("td",{role:"gridcell",className:N}):p.createElement("td",{...M,className:N,onClick:e=>{k&&k(f,e)},onMouseEnter:()=>{x&&x(f)},onMouseLeave:()=>{I&&I(f)}},p.createElement("span",{className:n.classNames(n.uCalendar.link({c:O}))},C))},(e,t)=>{const{value:i,...n}=e,{value:s,...a}=t;return(!(i&&s)||i.getTime()===s.getTime())&&((e,t)=>{const i=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(i.length!==n.length)return!1;for(let n=0;n<i.length;n++){const s=i[n];if(e[s]!==t[s])return!1}return!0})(n,a)}),I=e=>{const{className:t,firstDate:i,weekDays:s,...a}=e,r=n.useUnstyled(),o=r&&r.uCalendar;return p.createElement("td",{className:n.classNames(n.uCalendar.td({c:o,isWeek:!0}),t),...a,onClick:t=>{const{onClick:n}=e;n&&t&&n.call(void 0,i,s||[],t)}},e.children)};var M=(e=>(e[e.month=0]="month",e[e.year=1]="year",e[e.decade=2]="decade",e[e.century=3]="century",e))(M||{});const E={start:null,end:null};function T(e){const t=(t,i,n,...s)=>null===i[n]?null:(t?e.isRequired:e)(i,n,...s),i=t.bind(null,!1);return i.isRequired=t.bind(null,!0),i}const O=(e,t,i)=>void 0===t||void 0===i||t<=e&&e<=i?e:e<t?t:i,N=new Date(1980,0,1),R=new Date(1900,0,1),V=new Date(2099,11,31),P=new Date(1980,0,1),F=new Date(1980,0,1,23,59,59),L=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i},B=()=>s.getDate(new Date),A=(e,t,i)=>!e||!(t&&t>e||i&&i<e),H=(e,t,i)=>null===e||!(t&&s.getDate(t)>s.getDate(e)||i&&s.getDate(i)<s.getDate(e)),_=(e,t)=>{const{start:i,end:n}=t||E;return!(!i||!n)&&(i<e&&e<n)},z=(e,t,i=1)=>{const n=[];for(let s=e;s<t;s+=i)n.push(s);return n},K=(e,t,i)=>t.getTime()<=e.getTime()&&e.getTime()<=i.getTime(),q=(e,t,i)=>e&&(t&&e<t?s.cloneDate(t):i&&e>i?s.cloneDate(i):e),W=e=>(t,i="",n={})=>{const s=document.createElement(e);return s.className=i,Object.keys(n).forEach(e=>{s.style[e]=n[e]}),"string"==typeof t?s.innerHTML=t||"":(t||[]).forEach(e=>e&&s.appendChild(e)),s};function Y(e,t,i={}){let n,s,a,r,o;i.maxWait;const l=window,u=!t&&0!==t&&"function"==typeof l.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function c(e,t){return u?(l.cancelAnimationFrame(r),l.requestAnimationFrame(e)):setTimeout(e,t)}function d(e){const i=e-o;return void 0===o||i>=t||i<0||false}function h(){const e=Date.now();if(d(e))return m();r=c(h,function(e){return t-(e-o)}(e))}function m(t){return r=void 0,n?function(){const t=n,i=s;return n=s=void 0,a=e.apply(i,t),a}():(n=s=void 0,a)}function p(...e){const i=Date.now(),l=d(i);return n=e,s=this,o=i,l&&void 0===r?(r=c(h,t),a):(void 0===r&&(r=c(h,t)),a)}return t=+t||0,p.cancel=function(){void 0!==r&&function(e){if(u)return l.cancelAnimationFrame(e);clearTimeout(e)}(r),n=o=s=r=void 0},p.flush=function(){return void 0===r?a:m()},p.pending=function(){return void 0!==r},p}let U=class{constructor(e){this.intl=e}getWeekNames(e=!1,t){const i=((e,t)=>e.slice(t).concat(e.slice(0,t)))(this.intl.dateFormatNames({nameType:null!=t?t:"short",type:"days"}),this.intl.firstDay());return e?[""].concat(i):i}};const $=(e,t)=>{const i=t;return p.createElement("td",{key:e,role:"gridcell",className:n.classNames(n.uCalendar.td({c:i,isEmpty:!0}))}," ")},j={direction:"vertical",selectedDate:B(),showWeekNumbers:!1},Z=e=>{const{activeRangeEnd:t,activeView:i,bus:r,cellUID:o,direction:l=j.direction,focusedDate:u,weekCell:c,max:d,weekDaysFormat:h,min:m,cell:g,onCellEnter:v,onCellLeave:f,onChange:w,onWeekSelect:b,selectedDate:y=j.selectedDate,selectionRange:D,service:S,showWeekNumbers:C=j.showWeekNumbers,showOtherMonthDays:k,viewDate:E,allowReverse:T,unstyled:O}=e,N="horizontal"===l,R=i===M.month,V=!(!C||i!==M.month),P=(e,t)=>{if(w&&t){const i={value:s.cloneDate(e),target:null,nativeEvent:null==t?void 0:t.nativeEvent,syntheticEvent:t};w(i)}},F=(e,t,i)=>{const n=t.findIndex(t=>(null==t?void 0:t.value)===e);b&&i&&b(e,n,i)},A=e=>{v&&v(s.cloneDate(e))},H=e=>{f&&f(s.cloneDate(e))},_=a.useInternationalization(),z=new U(_),K=O&&O.uCalendar,q=e=>{const t=(e=>{if(!V)return null;let t=0,i=e[t];for(;!i&&t<e.length;)i=e[++t];return i})(e);return t?t.value:null},W=(e,t)=>{if(!q(e))return $(`week-cell-${t}`);const i=q(e),n=(e=>V?s.weekInYear(e,_.firstDay()):null)(i),a=`kendo-react-calendar-week-cell-${n}`,r={value:n,firstDate:i,weekDays:e,unstyled:O,onClick:F};return c?p.createElement(c,{...r,key:a},n):p.createElement(I,{...r,key:a},n)},Y=z.getWeekNames(V,h),Z=S.rowLength(V),J=S.title(E),G=B(),X=L(E,G),Q=S.data({cellUID:o,min:m,max:d,focusedDate:u,isActiveView:!r.canMoveDown(i),selectedDate:y,selectionRange:D,viewDate:X});return p.createElement(p.Fragment,null,R&&N&&p.createElement("thead",{className:n.classNames(n.uCalendar.thead({c:K}))},p.createElement("tr",{role:"row",className:n.classNames(n.uCalendar.tr({c:K}))},Y.map(e=>p.createElement("th",{key:e,className:n.classNames(n.uCalendar.th({c:K}))},e)))),p.createElement("tbody",{className:n.classNames(n.uCalendar.tbody({c:K}))},!N&&p.createElement("tr",{className:n.classNames(n.uCalendar.tr({c:K}))},p.createElement("th",{scope:"col",colSpan:Z,className:n.classNames(n.uCalendar.caption({c:K}))},J)),Q.map((e,s)=>{var a,r;const o=null!=(r=null==(a=e.find(e=>null!=e))?void 0:a.value.getTime())?r:s;return p.createElement("tr",{role:"row",className:n.classNames(n.uCalendar.tr({c:K})),key:o},V&&W(e,s),(e=>e.map((e,n)=>{if(!e)return $(n);const s={"aria-selected":e.isSelected},a=`kendo-react-calendar-cell-${e.value.getTime()}`,r={...s,...e,isDisabled:!e.isInRange,view:i,showOtherMonthDays:k,allowReverse:T,activeRangeEnd:t,unstyled:O,onClick:P,onMouseEnter:A,onMouseLeave:H};return g?p.createElement(g,{...r,key:a},e.formattedValue):p.createElement(x,{...r,key:a},e.formattedValue)}))(e))})))},J=e=>{const{view:t,...i}=e;return p.createElement(r.Button,{type:"button",fillMode:"flat",themeColor:"primary",...i},e.children)},G={rangeLength:1,min:R,max:V},X=e=>{const{activeView:t,bus:i,currentDate:s,max:a=G.max,min:r=G.min,rangeLength:o=G.rangeLength,service:l,headerTitle:u,header:c,commands:d,verticalView:h,unstyled:m}=e,g=m&&m.uCalendar,v=i.canMoveUp(t),f=(()=>{if(!s)return"";const e=o-1,t=l.title(s),i=l.addToDate(s,e);return e<1||!l.isInRange(i,r,a)?t:`${t} - ${l.title(i)}`})(),w=n.classNames(n.uCalendar.title({c:g})),b={children:f,value:f,view:t,className:w,onClick:e=>{i.canMoveUp(t)&&i.moveUp(t,e)},disabled:!v},y={headerTitleProps:b,commands:d},D=u?p.createElement(u,{...b},f):p.createElement(J,{...b},f),S=c?p.createElement(c,{...y}):p.createElement(p.Fragment,null,D,p.createElement("span",{className:n.classNames(n.uCalendar.spacer({c:g}))}),p.createElement("span",{className:n.classNames(n.uCalendar.nav({c:g}))},d));return p.createElement("div",{className:n.classNames(n.uCalendar.header({c:g,vertical:h}))},S)},Q="multiviewcalendar.prevView",ee="multiviewcalendar.nextView",te="dateinput.increment",ie="dateinput.decrement",ne="dateinput.clear",se="calendar.today",ae="datepicker.toggleCalendar",re="daterangepicker.swapStartEnd",oe="daterangepicker.start",le="daterangepicker.end",ue="daterangepicker.separator",ce="datetimepicker.toggleDateTimeSelector",de="timepicker.now",he="timepicker.selectNow",me="timepicker.cancel",pe="timepicker.set",ge="timepicker.toggleTimeSelector",ve="timepicker.toggleClock",fe="datetimepicker.date",we="datetimepicker.time",be="datetimepicker.cancel",ye="datetimepicker.set",De="daterangepicker.cancel",Se="daterangepicker.set",Ce={[se]:"Today",[de]:"NOW",[pe]:"Set",[me]:"Cancel",[fe]:"Date",[we]:"Time",[be]:"Cancel",[ye]:"Set",[De]:"Cancel",[Se]:"Set",[oe]:"Start",[le]:"End",[ue]:" ",[he]:"Select Now",[ge]:"Toggle TimeSelector",[ve]:"Toggle Clock",[te]:"Increase value",[ie]:"Decrease value",[ne]:"clear",[ae]:"Toggle calendar",[Q]:"Navigate to previous view",[ee]:"Navigate to next view",[re]:"Swap start and end values",[ce]:"Toggle date-time selector"},ke={min:R,max:V},xe=e=>{const{min:t=ke.min,max:i=ke.max,onClick:o,disabled:l,tabIndex:u,unstyled:c}=e,d=a.useLocalization(),h=c&&c.uCalendar,m=d.toLanguageString(se,Ce[se]),g=n.classNames(n.uCalendar.today({c:h,disabled:l}));return p.createElement(r.Button,{className:g,onClick:e=>{if(A(B(),s.getDate(t),s.getDate(i))&&o){const n={syntheticEvent:e,nativeEvent:e.nativeEvent,value:q(B(),t,i),target:null,isTodayClick:!0};o(n)}},tabIndex:u,fillMode:"flat",themeColor:"base",role:"link"},m)},Ie={take:5,showWeekNumbers:!1,weekDaysFormat:"short",smoothScroll:!0},Me=p.forwardRef((e,t)=>{const{take:i=Ie.take,showWeekNumbers:r=Ie.showWeekNumbers,weekDaysFormat:o=Ie.weekDaysFormat,smoothScroll:l=Ie.smoothScroll,activeView:u,bus:c,cellUID:d,dom:h,focusedDate:m,max:g,min:v,cell:f,onScroll:w,onChange:b,service:y,value:D,weekCell:S,showOtherMonthDays:C,headerTitle:x,header:I,shouldScroll:E,tabIndex:T,unstyled:O}=e,N=!(!r||u!==M.month),R=A(B(),s.getDate(v),s.getDate(g)),V=()=>{if(!_.current)return;const e=_.current.querySelector("td.k-focus"),t=_.current.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),Y.current=!0},P=()=>{if(!_.current)return;const e=_.current.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),Y.current=!1},F=(e,t=!1)=>{if(b){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:s.cloneDate(e.value),target:H.current,isTodayClick:t};b(i)}},L=p.useRef(null),H=p.useRef(null);p.useImperativeHandle(H,()=>({get element(){return _.current},get virtualization(){return L.current},focusActiveDate:V,blurActiveDate:P})),p.useImperativeHandle(t,()=>H.current);const _=p.useRef(null),z=p.useRef(null),K=p.useRef(u),W=p.useRef(m),Y=p.useRef(!1),$=p.useRef(!0),j=p.useRef(!1),J=p.useRef(void 0),[G,Q]=p.useState(()=>{const e=y.skip(m,v);return{skip:e,index:e}});p.useEffect(()=>{if(j.current=!1,void 0!==J.current&&L.current){const e=!(!l||!$.current);L.current[e?"animateToIndex":"scrollToIndex"](J.current)}Y.current&&V(),K.current=u,J.current=void 0});const ee=a.useInternationalization(),te=new U(ee).getWeekNames(N,o),ie=O&&O.uCalendar;let ne=0,se=0,ae=1;h&&(ne=(u===M.month?h.scrollableContentHeight:h.scrollableYearContentHeight)-h.viewHeight(u),se=-1*h.headerHeight,ae=h.viewHeight(u)||1);const re=K.current!==u,oe=q(m,v,g),le=re?y.skip(oe,v):G.skip,ue=y.total(v,g),ce=Math.min(ue-le,i),de=y.addToDate(v,le),he=y.addToDate(v,G.index),me=Array.from({length:y.rowLength(N)},(e,t)=>t),pe=u!==K.current;$.current=!pe,(pe||!s.isEqualDate(W.current,oe)||j.current||!E||E())&&(J.current=y.skip(oe,v)),W.current=oe;const ge=n.classNames(n.uCalendar.view({c:ie,month:u===M.month,year:u===M.year,decade:u===M.decade,century:u===M.century})),ve=p.createElement("table",{className:n.classNames(n.uCalendar.table({c:ie})),ref:z,role:"grid",tabIndex:null!=T?T:0,"aria-activedescendant":d+m.getTime()},p.createElement("colgroup",null,me.map(e=>p.createElement("col",{key:e}))),y.datesList(de,ce).map(e=>p.createElement(Z,{key:e.getTime(),activeView:u,viewDate:e,min:v,max:g,cellUID:d,focusedDate:m,cell:f,selectedDate:D,showWeekNumbers:N,onChange:F,bus:c,service:y,weekCell:S,showOtherMonthDays:C,unstyled:O}))),fe=u===M.month?p.createElement("table",{key:"calendar-view-list-weekdays",className:n.classNames(n.uCalendar.table({c:ie,weekdays:!0})),role:"grid",tabIndex:T},p.createElement("colgroup",null,me.map(e=>p.createElement("col",{key:e}))),p.createElement("thead",{className:n.classNames(n.uCalendar.thead({c:ie}))},p.createElement("tr",{className:n.classNames(n.uCalendar.tr({c:ie}))},te.map(e=>p.createElement("th",{key:e,className:n.classNames(n.uCalendar.th({c:ie}))},e))))):null,we=p.createElement(p.Fragment,null,p.createElement(X,{key:"calendar-view-list-header",currentDate:he,min:v,max:g,activeView:u,bus:c,service:y,headerTitle:x,header:I,unstyled:O,commands:p.createElement(xe,{min:v,max:g,onClick:e=>{j.current=!0,F(e,!0)},disabled:!R,tabIndex:T,unstyled:O})}),fe,p.createElement(k,{key:"calendar-view-list-content",skip:le,take:i,total:ue,itemHeight:ae,topOffset:se,bottomOffset:ne,scrollOffsetSize:se,maxScrollDifference:ae,onScroll:w,onScrollAction:({index:e,scrollAction:t,pageAction:i})=>{const n=i?i.skip:void 0;if(Q(t=>{const i=void 0!==n?n:t.skip;return t.index!==e||t.skip!==i?{index:e,skip:i}:t}),z.current&&t){const e=`translateY(${t.offset}px)`;z.current.style.transform=e}},onMount:e=>!L.current&&(e=>{if(L.current=e,L.current&&z.current){const e=-1*h.headerHeight;z.current.style.transform=`translateY(${e}px)`;const t=q(m,v,g),i=y.skip(t,v);L.current.scrollToIndex(i)}})(e),tabIndex:T,unstyled:O},ve));return p.createElement("div",{ref:_,className:ge},h.didCalculate?we:null)});Me.displayName="KendoReactViewList";const Ee=Me,Te=e=>{const{className:t,isRangeStart:i,value:s,text:a,view:r,...o}=e,l=n.useUnstyled(),u=l&&l.uCalendar;return p.createElement("li",{...o,onClick:t=>{var i;null==(i=e.onClick)||i.call(e,s,t)},className:n.classNames(n.uCalendar.li({c:u}),t)},p.createElement("span",{className:n.classNames(n.uCalendar.navigationMarker({c:u,isRangeStart:i}))},e.children))},Oe={take:30},Ne=p.forwardRef((e,t)=>{const{take:i=Oe.take,activeView:a,dom:r,focusedDate:o,max:l,min:u,onScroll:c,onChange:d,service:h,navigationItem:m,tabIndex:g,unstyled:v}=e,f=(e,t)=>{if(d&&t){const i={value:s.cloneDate(e),target:b.current,nativeEvent:null==t?void 0:t.nativeEvent,syntheticEvent:t};d(i)}},w=p.useRef(null),b=p.useRef(null);p.useImperativeHandle(b,()=>({get virtualization(){return w.current}})),p.useImperativeHandle(t,()=>b.current);const y=p.useRef(null),D=p.useRef(a),S=p.useRef(o),C=p.useRef(void 0),[x,I]=p.useState(()=>{const e=h.skip(o,u),t=h.total(u,l);return{skip:e-Math.min(t-e,i)>0?e:0}});p.useEffect(()=>{void 0!==C.current&&w.current&&w.current.scrollToIndex(C.current),D.current=a,S.current=o,C.current=void 0});const M=r.calendarHeight,E=r.navigationItemHeight||1,T=r.monthViewHeight,O=(M-E)/2,N=M-E,R=v&&v.uCalendar,V=D.current!==a,P=q(o,u,l),F=V?h.skip(P,u):x.skip,L=h.total(u,l),B=Math.min(L-F,i),A=h.addToDate(u,F),H=h.datesList(A,B);(a!==D.current||!s.isEqual(P,S.current))&&(C.current=h.skip(P,u));const _=p.createElement(k,{skip:F,take:i,total:L,itemHeight:E,topOffset:O,bottomOffset:N,onScroll:c,maxScrollDifference:T,onScrollAction:({scrollAction:e,pageAction:t})=>{const i=t?t.skip:void 0;if(void 0!==i&&I(e=>e.skip!==i?{skip:i}:e),y.current&&e){const t=`translateY(${e.offset}px)`;y.current.style.transform=t}},onMount:e=>!w.current&&(e=>{if(w.current=e,w.current&&y.current){const e=(r.calendarHeight-(r.navigationItemHeight||1))/2;y.current.style.transform=`translateY(${e}px)`;const t=q(o,u,l),i=h.skip(t,u);w.current.scrollToIndex(i)}})(e),tabIndex:g,unstyled:v},p.createElement("ul",{ref:y,className:n.classNames(n.uCalendar.ul({c:R}))},H.map(e=>(e=>{const t=h.navigationTitle(e),i=h.isRangeStart(e),n=`kendo-react-calendar-nav-item-${e.getTime()}`,s={text:t,value:e,isRangeStart:i,view:a,onClick:f};return m?p.createElement(m,{...s,key:n},t):p.createElement(Te,{...s,key:n},t)})(e))));return p.createElement("div",{className:n.classNames(n.uCalendar.navigation({c:R}))},p.createElement("span",{className:n.classNames(n.uCalendar.navigationHighlight({c:R}))}),r.didCalculate?_:null)});Ne.displayName="KendoReactNavigation";const Re=Ne;var Ve=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Up=2]="Up",e[e.Down=3]="Down",e[e.PrevView=4]="PrevView",e[e.NextView=5]="NextView",e[e.FirstInView=6]="FirstInView",e[e.LastInView=7]="LastInView",e[e.LowerView=8]="LowerView",e[e.UpperView=9]="UpperView",e))(Ve||{});const Pe=[[]],Fe={[Ve.Left]:e=>s.addDecades(e,-1),[Ve.Up]:e=>s.addDecades(e,-5),[Ve.Right]:e=>s.addDecades(e,1),[Ve.Down]:e=>s.addDecades(e,5),[Ve.PrevView]:e=>s.addCenturies(e,-1),[Ve.NextView]:e=>s.addCenturies(e,1),[Ve.FirstInView]:e=>s.firstDecadeOfCentury(e),[Ve.LastInView]:e=>s.lastDecadeOfCentury(e)};let Le=class{addToDate(e,t){return s.addCenturies(e,t)}datesList(e,t){return z(0,t).map(t=>s.addCenturies(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return Pe;const c=z(0,4),d=s.firstDecadeOfCentury(u),h=s.lastDecadeOfCentury(u),m=B();return z(0,3).map(e=>{const u=s.addDecades(d,4*e);return c.map(e=>{const c=this.normalize(s.addDecades(u,e),r,a),p=this.isEqual(c,l.start),g=this.isEqual(c,l.end),v=!p&&!g&&_(c,l),f=n&&(Array.isArray(o)?this.isSelectedFromArray(c,o,r,a):A(o,r,a)&&this.isEqual(c,o));return K(c,d,h)?{formattedValue:this.value(c),id:`${t}${c.getTime()}`,isFocused:this.isEqual(c,i),isSelected:f,isWeekend:!1,isInRange:A(c,r,a),isRangeStart:p,isRangeMid:v,isRangeEnd:g,isRangeSplitEnd:v&&this.isEqual(c,h),isRangeSplitStart:v&&this.isEqual(c,d),isToday:this.isEqual(c,m),title:this.cellTitle(c),value:c}:null})})}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isEqual(e,t){return!(!e||!t)&&s.firstYearOfDecade(e).getFullYear()===s.firstYearOfDecade(t).getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+99}isInRange(e,t,i){const n=s.firstYearOfDecade(e).getFullYear(),a=!t||s.firstYearOfDecade(t).getFullYear()<=n,r=!i||n<=s.firstYearOfDecade(i).getFullYear();return a&&r}isInSameView(e,t){return 0===s.durationInCenturies(e,t)}isRangeStart(e){return e.getFullYear()%1e3==0}move(e,t){const i=Fe[t];return i?i(e):e}cellTitle(e){return s.firstYearOfDecade(e).getFullYear().toString()}navigationTitle(e){return e?s.firstDecadeOfCentury(e).getFullYear().toString():""}title(e){return e?`${s.firstDecadeOfCentury(e).getFullYear()} - ${s.lastDecadeOfCentury(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInCenturies(t,e)}total(e,t){return s.durationInCenturies(e,t)+1}value(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInCenturies(e,t)<i?s.addCenturies(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}};const Be=[[]],Ae={[Ve.Left]:e=>s.addYears(e,-1),[Ve.Up]:e=>s.addYears(e,-5),[Ve.Right]:e=>s.addYears(e,1),[Ve.Down]:e=>s.addYears(e,5),[Ve.PrevView]:e=>s.addDecades(e,-1),[Ve.NextView]:e=>s.addDecades(e,1),[Ve.FirstInView]:e=>s.firstYearOfDecade(e),[Ve.LastInView]:e=>s.lastYearOfDecade(e)};class He{addToDate(e,t){return s.addDecades(e,t)}datesList(e,t){return z(0,t).map(t=>s.addDecades(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return Be;const c=z(0,4),d=s.firstYearOfDecade(u),h=s.lastYearOfDecade(u),m=B();return z(0,3).map(e=>{const u=s.addYears(d,4*e);return c.map(e=>{const c=this.normalize(s.addYears(u,e),r,a),p=this.isEqual(c,l.start),g=this.isEqual(c,l.end),v=!p&&!g&&_(c,l),f=n&&(Array.isArray(o)?this.isSelectedFromArray(c,o,r,a):A(o,r,a)&&this.isEqual(c,o));return K(c,d,h)?{formattedValue:this.value(c),id:`${t}${c.getTime()}`,isFocused:this.isEqual(c,i),isSelected:f,isWeekend:!1,isInRange:A(c,r,a),isRangeStart:p,isRangeMid:v,isRangeEnd:g,isRangeSplitEnd:v&&this.isEqual(c,h),isRangeSplitStart:v&&this.isEqual(c,d),isToday:this.isEqual(c,m),title:this.cellTitle(c),value:c}:null})})}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isEqual(e,t){return!(!e||!t)&&e.getFullYear()===t.getFullYear()}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()+9}isInRange(e,t,i){const n=e.getFullYear(),s=!t||t.getFullYear()<=n,a=!i||n<=i.getFullYear();return s&&a}isRangeStart(e){return e.getFullYear()%100==0}isInSameView(e,t){return 0===s.durationInDecades(e,t)}move(e,t){const i=Ae[t];return i?i(e):e}cellTitle(e){return e.getFullYear().toString()}navigationTitle(e){return e?s.firstYearOfDecade(e).getFullYear().toString():""}title(e){return e?`${s.firstYearOfDecade(e).getFullYear()} - ${s.lastYearOfDecade(e).getFullYear()}`:""}rowLength(e){return 4}skip(e,t){return s.durationInDecades(t,e)}total(e,t){return s.durationInDecades(e,t)+1}value(e){return e?e.getFullYear().toString():""}viewDate(e,t,i=1){return s.durationInDecades(e,t)<i?s.addDecades(e,-1):e}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}}const _e=[[]],ze={[Ve.Left]:e=>s.addDays(e,-1),[Ve.Up]:e=>s.addWeeks(e,-1),[Ve.Right]:e=>s.addDays(e,1),[Ve.Down]:e=>s.addWeeks(e,1),[Ve.PrevView]:e=>s.addMonths(e,-1),[Ve.NextView]:e=>s.addMonths(e,1),[Ve.FirstInView]:e=>s.firstDayOfMonth(e),[Ve.LastInView]:e=>s.lastDayOfMonth(e)};class Ke{constructor(e){this.intl=e}addToDate(e,t){return s.addMonths(e,t)}datesList(e,t){return z(0,t).map(t=>s.addMonths(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return _e;const c=s.firstDayOfMonth(u),d=s.lastDayOfMonth(u),h=s.dayOfWeek(c,this.intl.firstDay(),-1),m=z(0,7),p=B();return z(0,6).map(e=>{const u=s.addDays(h,7*e);return m.map(e=>{const h=this.normalize(s.addDays(u,e),r,a),m=h<c||h>d,g=this.isEqual(h,l.start),v=this.isEqual(h,l.end),f=!g&&!v&&_(h,l),w=n&&(Array.isArray(o)?this.isSelectedFromArray(h,o,r,a):A(o,r,a)&&this.isEqual(h,o)),b=this.isEqual(h,i)&&!m;return{formattedValue:this.value(h),id:`${t}${h.getTime()}`,isFocused:b,isSelected:w,isInRange:A(h,r,a),isWeekend:this.isWeekend(h),isRangeStart:g,isRangeMid:f,isRangeEnd:v,isRangeSplitStart:f&&this.isEqual(h,c),isRangeSplitEnd:f&&this.isEqual(h,d),isToday:this.isEqual(h,p),title:this.cellTitle(h),value:h,isOtherMonth:m}})})}isEqual(e,t){return!(!e||!t)&&s.getDate(e).getTime()===s.getDate(t).getTime()}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isInArray(e,t){return!!t.length&&s.firstDayOfMonth(t[0])<=e&&e<=s.lastDayOfMonth(t[t.length-1])}isInRange(e,t,i){const n=s.getDate(e),a=!t||s.getDate(t)<=n,r=!i||n<=s.getDate(i);return a&&r}isInSameView(e,t){return 0===s.durationInMonths(e,t)}isRangeStart(e){return!e.getMonth()}move(e,t){const i=ze[t];return i?i(e):e}cellTitle(e){return this.intl.formatDate(e,"D")}navigationTitle(e){return e?this.isRangeStart(e)?e.getFullYear().toString():this.abbrMonthNames()[e.getMonth()]:""}title(e){return`${this.wideMonthNames()[e.getMonth()]} ${e.getFullYear()}`}rowLength(e){return 7+(e?1:0)}skip(e,t){return s.durationInMonths(t,e)}total(e,t){return s.durationInMonths(e,t)+1}value(e){return e?e.getDate().toString():""}viewDate(e,t,i=1){return s.durationInMonths(e,t)<i?s.addMonths(e,-1):e}isWeekend(e){const t=e.getDay();return 6===t||0===t}abbrMonthNames(){return this.intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.getDate(t):e>i&&this.isEqual(e,i)?s.getDate(i):e}wideMonthNames(){return this.intl.dateFormatNames({nameType:"wide",type:"months",standAlone:!0})}}const qe=[[]],We={[Ve.Left]:e=>s.addMonths(e,-1),[Ve.Up]:e=>s.addMonths(e,(e=>e>4?-5:e<2?-2:-7)(e.getMonth())),[Ve.Right]:e=>s.addMonths(e,1),[Ve.Down]:e=>s.addMonths(e,(e=>e<7?5:e<10?7:2)(e.getMonth())),[Ve.PrevView]:e=>s.addYears(e,-1),[Ve.NextView]:e=>s.addYears(e,1),[Ve.FirstInView]:e=>s.firstMonthOfYear(e),[Ve.LastInView]:e=>s.lastMonthOfYear(e)};let Ye=class{constructor(e){this._intl=e}addToDate(e,t){return s.addYears(e,t)}datesList(e,t){return z(0,t).map(t=>s.addYears(e,t))}data(e){const{cellUID:t,focusedDate:i,isActiveView:n,max:a,min:r,selectedDate:o,selectionRange:l=E,viewDate:u}=e;if(!u)return qe;const c=this.abbrMonthNames(),d=s.firstMonthOfYear(u),h=s.lastMonthOfYear(u),m=d.getFullYear(),p=z(0,4),g=B();return z(0,3).map(e=>{const u=s.addMonths(d,4*e);return p.map(e=>{const p=this.normalize(s.addMonths(u,e),r,a);if(m<p.getFullYear())return null;const v=this.isEqual(p,l.start),f=this.isEqual(p,l.end),w=!v&&!f&&_(p,l),b=n&&(Array.isArray(o)?this.isSelectedFromArray(p,o,r,a):A(o,r,a)&&this.isEqual(p,o));return{formattedValue:c[p.getMonth()],id:`${t}${p.getTime()}`,isFocused:this.isEqual(p,i),isSelected:b,isInRange:A(p,r,a),isWeekend:!1,isRangeStart:v,isRangeMid:w,isRangeEnd:f,isRangeSplitEnd:w&&this.isEqual(p,h),isRangeSplitStart:w&&this.isEqual(p,d),isToday:this.isEqual(p,g),title:this.cellTitle(p),value:p}})})}isSelectedFromArray(e,t,i,n){let s=!1;return t.forEach(t=>{A(e,i,n)&&this.isEqual(e,t)&&(s=!0)}),s}isEqual(e,t){return!(!e||!t)&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}isInArray(e,t){if(!t.length)return!1;const i=e.getFullYear();return t[0].getFullYear()<=i&&i<=t[t.length-1].getFullYear()}isInRange(e,t,i){const n=s.createDate(e.getFullYear(),e.getMonth(),1),a=!t||s.createDate(t.getFullYear(),t.getMonth(),1)<=n,r=!i||n<=s.createDate(i.getFullYear(),i.getMonth(),1);return a&&r}isInSameView(e,t){return 0===s.durationInYears(e,t)}isRangeStart(e){return e.getFullYear()%10==0}move(e,t){const i=We[t];return i?i(e):e}cellTitle(e){return`${e.getFullYear()} ${this.value(e)}`}navigationTitle(e){return this.title(e)}title(e){return e?e.getFullYear().toString():""}rowLength(e){return 4}skip(e,t){return s.durationInYears(t,e)}total(e,t){return s.durationInYears(e,t)+1}value(e){return e?this.abbrMonthNames()[e.getMonth()]:""}viewDate(e,t,i=1){return s.durationInYears(e,t)<i?s.addYears(e,-1):e}abbrMonthNames(){return this._intl.dateFormatNames({nameType:"abbreviated",type:"months"})}normalize(e,t,i){return e<t&&this.isEqual(e,t)?s.cloneDate(t):e>i&&this.isEqual(e,i)?s.cloneDate(i):e}};const Ue={[M.month]:Ke,[M.year]:Ye,[M.decade]:He,[M.century]:Le};let $e=class{constructor(e){this.bottom=M.month,this.top=M.century,this.onViewChanged=e}configure(e,t){this.bottom=e,this.top=t}service(e,t){return new Ue[`${e}`](t)}moveDown(e,t){this.move(e,-1,t)}moveUp(e,t){this.move(e,1,t)}moveToBottom(e){e!==this.bottom&&this.onViewChanged({view:this.bottom})}canMoveDown(e){return this.bottom<e}canMoveUp(e){return e<this.top}clamp(e){return e<this.bottom?this.bottom:e>this.top?this.top:e}move(e,t,i){const n=this.clamp(((e,t)=>{const i=M[M[e+t]];return void 0!==i?i:e})(e,t));n!==e&&this.onViewChanged({view:n},i)}},je=class{constructor(){this.calendarHeight=0,this.headerHeight=0,this.monthViewHeight=0,this.yearViewHeight=0,this.decadeViewHeight=0,this.centuryViewHeight=0,this.navigationItemHeight=0,this.scrollableContentHeight=0,this.scrollableYearContentHeight=0,this.calendarWidth=0,this.monthViewWidth=0,this.yearViewWidth=0,this.decadeViewWidth=0,this.centuryViewWidth=0,this.scrollableContentWidth=0,this.didCalculate=!1,this.hostContainer=null}ensureHeights(){void 0===this.calendarHeight&&this.calculateHeights()}calculateHeights(e,t){if(!n.canUseDOM)return;const i=W("div"),s=W("ul"),a=W("li"),r=W("td"),o=W("th"),l=W("tr"),u=W("tbody"),c=W("thead"),d=W("table"),h=t&&t.uCalendar,m=t&&t.uButton,p=n.strippedClassNames(n.uButton.wrapper({c:m,fillMode:"flat",size:"medium",rounded:"medium",themeColor:"primary"}),n.uCalendar.title({c:h})),g=()=>i(`\n <span class="${p}">\n <span class="${n.strippedClassNames(n.uButton.text({c:m}))}">March 2017</span>\n </span>\n <span class="${n.strippedClassNames(n.uCalendar.spacer({c:h}))}"></span>\n <span class="${n.strippedClassNames(n.uCalendar.nav({c:h}))}"><button class="${n.strippedClassNames(n.uCalendar.today({c:h}))}">TODAY</button></span>\n `,n.strippedClassNames(n.uCalendar.header({c:h,vertical:!0}))),v=(e,t)=>new Array(e).fill("1").map(t),f=e=>i(e,n.strippedClassNames(n.uCalendar.scrollableSelector({c:h}),n.uCalendar.scrollable({c:h,horizontal:!0}))),w=(()=>{let e;return()=>n.canUseDOM?(e||(e=i([f([s([a("<span>FEB</span>")])])],n.strippedClassNames(n.uCalendar.navigation({c:h})),{left:"0px",position:"absolute"})),e):null})(),b=({cells:e,rows:t},s,a)=>{let m;return()=>n.canUseDOM?(m||(m=((e,t,s)=>i(s?[g(),d([c([l([o("MO",n.strippedClassNames(n.uCalendar.th({c:h})))],n.strippedClassNames(n.uCalendar.tr({c:h})))],n.strippedClassNames(n.uCalendar.thead({c:h})))],n.strippedClassNames(n.uCalendar.table({c:h,weekdays:!0}))),f([e,e])]:[g(),f([e,e])],t,{left:"-10000px",position:"absolute"}))(((e,t=1)=>d([u([l([r("1",n.strippedClassNames(n.uCalendar.td({c:h,isWeek:!0})))])].concat(v(e,()=>l(v(t,e=>r(`<span class="${n.strippedClassNames(n.uCalendar.link({c:h}))}">${e}</span>`,n.strippedClassNames(n.uCalendar.td({c:h})))),n.strippedClassNames(n.uCalendar.tr({c:h}))))),n.strippedClassNames(n.uCalendar.tbody({c:h})))],n.strippedClassNames(n.uCalendar.table({c:h}))))(t,e),s,a)),m):null},y=e=>e.querySelector(`.${n.strippedClassNames(n.uCalendar.scrollableSelector({c:h}))}`),D=e=>{const t=y(e);return t.className=`${t.className} scrollable-horizontal`,e},S=b({cells:7,rows:6},n.strippedClassNames(n.uCalendar.view({c:h,month:!0})),!0),C=b({cells:5,rows:3},n.strippedClassNames(n.uCalendar.view({c:h,year:!0})),!1),k=b({cells:5,rows:2},n.strippedClassNames(n.uCalendar.view({c:h,decade:!0})),!1),x=e=>parseFloat(window.getComputedStyle(e).height)||e.offsetHeight,I=e=>{const t=window.getComputedStyle(e);return parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)||e.offsetWidth},M=e=>e.querySelector("tbody");this.didCalculate=!0,e&&(this.hostContainer=e),this.batch(S(),e=>{const t=M(e);this.calendarHeight=x(e),this.monthViewHeight=x(t),this.headerHeight=x(t.children[0]),this.scrollableContentHeight=x(y(e))}),this.batch(D(S()),e=>{const t=M(e);this.calendarWidth=I(e),this.monthViewWidth=I(t),this.scrollableContentWidth=I(y(e))}),this.batch(C(),e=>{this.yearViewHeight=x(M(e)),this.scrollableYearContentHeight=x(y(e))}),this.batch(D(C()),e=>{this.yearViewWidth=I(M(e))}),this.batch(k(),e=>{this.decadeViewHeight=x(M(e)),this.centuryViewHeight=this.decadeViewHeight}),this.batch(D(k()),e=>{this.decadeViewWidth=I(M(e)),this.centuryViewWidth=this.decadeViewWidth}),this.batch(w(),e=>{this.navigationItemHeight=x(e.querySelector("li"))})}viewHeight(e){return this.viewDimension(e,"height")}viewWidth(e){return this.viewDimension(e,"width")}viewDimension(e,t){const i="height"===t?"ViewHeight":"ViewWidth";switch(e){case M.month:return this[`month${i}`];case M.year:return this[`year${i}`];case M.decade:return this[`decade${i}`];case M.century:return this[`century${i}`];default:return 1}}batch(e,t){const i=this.hostContainer||document.body,n=i.appendChild(e);t(n),i.removeChild(n)}};const Ze={33:Ve.PrevView,34:Ve.NextView,35:Ve.LastInView,36:Ve.FirstInView,37:Ve.Left,38:Ve.Up,39:Ve.Right,40:Ve.Down,"meta+38":Ve.UpperView,"meta+40":Ve.LowerView};let Je=class{constructor(e){this.bus=e}action(e){const t=`${e.ctrlKey||e.metaKey?"meta+":""}${e.keyCode}`;return Ze[t]}move(e,t,i,n,s){return n?t===Ve.UpperView&&this.bus.canMoveUp(i)?(this.bus.moveUp(i,s),e):t===Ve.LowerView&&this.bus.canMoveDown(i)?(this.bus.moveDown(i,s),e):n.move(e,t):e}};class Ge{constructor(e){this.dom=e,this.divideByMagnitude=null,this.powerByMagnitude=null,this.navigator=null,this.view=null,this.monthScrolled=!1,this.navScrolled=!1}configure(e){const t=Math.max(this.dom.viewHeight(e)/this.dom.navigationItemHeight,1);this.divideByMagnitude=(e=>t=>Math.floor(t/e))(t),this.powerByMagnitude=(e=>t=>t*e)(t)}sync(e,t,i){if(e&&t){if(this.navigator=e,this.view=t,i.target===this.navigator.element){if(this.monthScrolled)return void(this.monthScrolled=!1);this.navScrolled=!0,this.scrollSiblingOf(this.navigator.element)}if(i.target===this.view.element){if(this.navScrolled)return void(this.navScrolled=!1);this.monthScrolled=!0,this.scrollSiblingOf(this.view.element)}}}scrollSiblingOf(e){const t=this.siblingComponent(e),i=this.calculateScroll(t,e.scrollTop);t.scrollTo(i)}siblingComponent(e){return this.navigator.element===e?this.view:this.navigator}calculateScroll(e,t){const i=e===this.navigator?this.divideByMagnitude:this.powerByMagnitude;return i?i(t):0}}const Xe=e=>e?e.virtualization:null,Qe=(e,t,i=et.min,n=et.max)=>void 0!==t?null!==t&&A(s.getDate(t),i,n)?t:null:null!==e&&A(s.getDate(e),i,n)?e:null,et={disabled:!1,min:R,max:V,weekDaysFormat:"short",navigation:!0,defaultActiveView:"month",defaultValue:null,topView:"century",bottomView:"month",showOtherMonthDays:!1},tt=n.createPropsContext(),it=p.forwardRef((e,t)=>{const i=n.usePropsContext(tt,e),r=n.useUnstyled(),o=n.useId(i.id),l=a.useInternationalization(),{disabled:u=et.disabled,min:c=et.min,max:d=et.max,weekDaysFormat:h=et.weekDaysFormat,navigation:m=et.navigation,defaultActiveView:g=et.defaultActiveView,defaultValue:v=et.defaultValue,topView:f=et.topView,bottomView:w=et.bottomView,showOtherMonthDays:b=et.showOtherMonthDays,_ref:y,unstyled:D,className:S,weekNumber:C,mobileMode:k,focusedDate:x,value:I,onChange:E,onFocus:T,onBlur:N,cell:R,weekCell:V,headerTitle:P,header:F,tabIndex:L,navigationItem:A,ariaLabelledBy:H,ariaDescribedBy:_}=i,z=D||r,K=s.getDate(c),W=s.getDate(d),Y=M[w],U=M[f],$=o+"-cell-uid",j=i.id||o+"-id",Z=e=>{se.current&&se.current.sync(Xe(Q.current),Xe(ee.current),e)},J=e=>{const t=s.cloneDate(e.value),i=s.cloneDate(e.value),n=ie.current.canMoveDown(ue.activeView);if(!u){if(n){if(!e.isTodayClick)return ie.current.moveDown(ue.activeView,e.syntheticEvent),void de({focusedDate:i});ie.current.moveToBottom(ue.activeView)}if(de({value:t,focusedDate:i}),ae.current=t,E){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:t,target:G.current};E(i)}ae.current=void 0}},G=p.useRef(null);p.useImperativeHandle(G,()=>({get element(){return X.current},get value(){return me},get props(){return i},focus:()=>{var e;return null==(e=X.current)?void 0:e.focus()}})),p.useImperativeHandle(t,()=>G.current);const X=p.useRef(null),Q=p.useRef(null),ee=p.useRef(null),te=p.useRef(new je),ie=p.useRef(new $e(({view:e})=>{se.current&&se.current.configure(e),de({activeView:e})})),ne=p.useRef(new Je(ie.current)),se=p.useRef(null),ae=p.useRef(void 0),re=p.useRef(!1),oe=p.useRef(null),le=p.useRef(!1),[ue,ce]=p.useState(()=>{const e=Qe(v,I,K,W);return{value:e,activeView:O(M[g],Y,U),focusedDate:q(x||e||B(),K,W)}}),de=e=>{ce(t=>({...t,...e}))},[,he]=p.useReducer(e=>e+1,0);let me;p.useEffect(()=>{Promise.resolve().then(()=>{n.setScrollbarWidth(),X.current&&(te.current.calculateHeights(X.current,z),se.current=new Ge(te.current),se.current.configure(ue.activeView),he())})},[]),p.useEffect(()=>{n.setScrollbarWidth(),se.current&&se.current.configure(ve),ee.current&&(re.current?ee.current.focusActiveDate:ee.current.blurActiveDate)(),le.current=!1,re.current&&(oe.current=me)}),me=void 0!==ae.current?ae.current:void 0!==I?I:ue.value;const pe=z&&z.uCalendar,ge=null!==me&&null!==oe.current?!s.isEqualDate(me,oe.current):me!==oe.current,ve=O(ue.activeView,Y,U),fe=Qe(me,me,K,W),we=fe?s.getDate(fe):null,be=s.getDate(q(ge&&null!==fe?fe:ue.focusedDate,K,W));ie.current.configure(Y,U);const ye=ie.current.service(ve,l),{smoothScroll:De=Number.parseFloat(p.version)<18}=i,Se=n.classNames(n.uCalendar.wrapper({c:pe,disabled:u,weekNumber:C,mobileMode:k}),S);p.useEffect(()=>{y&&y({element:X.current})});const Ce=[m&&p.createElement(Re,{key:0,ref:Q,activeView:ue.activeView,focusedDate:be,min:K,max:W,onScroll:Z,onChange:e=>{if(u)return;le.current=!0;const t=s.cloneDate(e.value);de({focusedDate:t})},service:ye,dom:te.current,navigationItem:A,tabIndex:L,unstyled:z}),p.createElement(Ee,{key:1,ref:ee,activeView:ue.activeView,focusedDate:be,min:K,max:W,bus:ie.current,shouldScroll:()=>le.current,onScroll:Z,service:ye,cell:R,weekCell:V,dom:te.current,smoothScroll:De,showWeekNumbers:C,onChange:J,value:we,cellUID:$,headerTitle:P,header:F,tabIndex:L,weekDaysFormat:h,showOtherMonthDays:b,unstyled:z})];return p.createElement("div",{ref:X,className:Se,id:j,"aria-labelledby":H,"aria-describedby":_,"aria-disabled":u,tabIndex:u?void 0:L||0,onFocus:e=>{re.current=!0,ee.current&&(ee.current.focusActiveDate(),T&&T(e))},onBlur:e=>{re.current=!1,ee.current&&(ee.current.blurActiveDate(),N&&N(e))},onKeyDown:e=>{const{keyCode:t,ctrlKey:i,metaKey:a}=e;if(be&&ye){if(84===t&&de({focusedDate:B()}),(i||a)&&(t===n.Keys.left||t===n.Keys.right)){if(u)return;le.current=!0;const e=s.cloneDate(be);31===e.getDate()&&e.setDate(30);const i=t===n.Keys.left?e.getMonth()-1:e.getMonth()+1,a=new Date(e.setMonth(i));de({focusedDate:s.cloneDate(a)})}if(t===n.Keys.enter){if(null!==me&&s.isEqualDate(be,me)){const e=q(be,K,W);Xe(ee.current).scrollToIndex(ye.skip(e,K))}const t={syntheticEvent:e,nativeEvent:e.nativeEvent,value:be,target:ee.current};J(t)}else{const t=q(ne.current.move(be,ne.current.action(e),ue.activeView,ye,e),K,W);if(s.isEqualDate(be,t))return;de({focusedDate:t})}e.preventDefault()}},onMouseDown:e=>{e.preventDefault()},onClick:e=>{X.current&&X.current.focus({preventScroll:!0})}},Ce)});it.propTypes={className:i.string,defaultActiveView:i.oneOf(["month","year","decade","century"]),defaultValue:i.instanceOf(Date),disabled:i.bool,focusedDate:i.instanceOf(Date),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,weekDaysFormat:i.oneOf(["short","abbreviated","narrow"]),max:i.instanceOf(Date),min:i.instanceOf(Date),navigation:i.bool,smoothScroll:i.bool,onBlur:i.func,onChange:i.func,onFocus:i.func,tabIndex:i.number,value:i.instanceOf(Date),weekNumber:i.bool,topView:(e,t,i)=>{const n=e[t],s=e.bottomView;return n&&s&&M[n]<M[s]?new Error(`Invalid prop + ${t} suplied to ${i}.\n ${t} can not be smaller than bottomView.\n `):null},bottomView:(e,t,i)=>{const n=e[t],s=e.topView;return n&&s&&M[n]>M[s]?new Error(`Invalid prop + ${t} suplied to ${i}.\n ${t} can not be bigger than topView.\n `):null}},it.displayName="KendoReactCalendar";const nt=it,st=it,at="dayperiod",rt="hour",ot="minute",lt="second",ut=e=>(t,i)=>{const n=s.cloneDate(t);return n[e](i),n},ct=[{type:rt,getter:e=>e.getHours()},{type:ot,getter:e=>e.getMinutes()},{type:lt,getter:e=>e.getSeconds()},{type:"millisecond",getter:e=>e.getMilliseconds()}],dt=(e=>t=>e.map((e=>t=>e[t.type]?(e=>(t,i)=>e(i))(t.getter):(e=>(t,i)=>e(t))(t.getter))((e=>e.reduce((e,t)=>(e[t.type]=t.type,e),{}))(t))))(ct),ht=(e=>(t,i)=>e.map(e=>{const n=Math.floor(t[e.type]);return n?((e,t,i,n)=>s=>{const a=e(s),r=e(i);return"hour"===n?a-(a-r)%t:s.getTime()<=i.getTime()&&0!==a&&a<=r?Math.ceil(a/t)*t:a-a%t})(e.getter,n,i,e.type):e.getter}))(ct),mt=e=>t=>{const i=s.cloneDate(t);return i.setHours(...e.map(e=>e(i))),i},pt=ut("setHours"),gt=ut("setMinutes"),vt=ut("setSeconds"),ft=()=>new Date,wt=(e,t,i=1)=>{const n=[];for(let s=e;s<t;s+=i)n.push(s);return n},bt=(e,t,i)=>({candidateValue:L(N,e),maxValue:s.addDays(L(N,i),t.getHours()<i.getHours()?0:1),minValue:L(N,t)}),yt=(e,t,i)=>{if(!e||!t||!i)return!0;const{candidateValue:n,minValue:s,maxValue:a}=bt(e,t,i);return s<=n&&n<=a},Dt=(e,t,i)=>{if(null===e)return!0;const{candidateValue:n,minValue:s,maxValue:a}=bt(e,t,i);return s<=n&&n<=a},St=(e,t)=>{if(null===e||null===t)return!1;const i=L(N,e),n=L(N,t);return i.getTime()<n.getHours()},Ct=(e,t)=>{if(null===e||null===t)return!1;const i=L(N,e);return L(N,t).getTime()<i.getHours()},kt=e=>{const t=a.useLocalization(),i=n.useUnstyled(),s=i&&i.uDateInput,r=t.toLanguageString(ne,Ce[ne]);return p.createElement("span",{className:n.classNames(n.uDateInput.clearButton({c:s})),role:"button",onClick:t=>{t.stopPropagation();const{onClick:i}=e;i&&i.call(void 0,t)},tabIndex:e.tabindex||-1,title:r,key:"clearbutton"},p.createElement(n.IconWrap,{name:"x",icon:o.xIcon}))};let xt=class{constructor(e){this.service=e,this.cldr={},this.locale=e.locale,this.format=e.format,this.toString=e.toString,this.formatDate=e.formatDate,this.parseDate=e.parseDate,this.parseNumber=e.parseNumber,this.formatNumber=e.formatNumber,this.splitDateFormat=e.splitDateFormat,this.numberSymbols=e.numberSymbols,this.firstDay=e.firstDay,this.dateFieldName=e.dateFieldName,this.dateFormatNames=(e,t)=>this.service.dateFormatNames(t),this.weekendRange=e=>{};const t=c.localeInfo(this.locale);this.cldr[t.name]=t}};const It=p.forwardRef((e,t)=>{var i;const c=n.useId(e.id),d=a.useInternationalization(),h=a.useLocalization(),m=n.useUnstyled(),g=n.usePropsContext(Et,e).unstyled||m,{format:v=Mt.format,defaultValue:f=Mt.defaultValue,size:w=Mt.size,rounded:b=Mt.rounded,fillMode:y=Mt.fillMode,formatPlaceholder:D=Mt.formatPlaceholder,spinners:S=Mt.spinners,disabled:C=Mt.disabled,min:k=Mt.min,max:x=Mt.max,minTime:I=Mt.minTime,maxTime:M=Mt.maxTime,validityStyles:E=Mt.validityStyles,validationMessage:T=Mt.validationMessage,placeholder:O=Mt.placeholder,enableMouseWheel:N=Mt.enableMouseWheel,autoCorrectParts:R=Mt.autoCorrectParts,autoSwitchParts:V=Mt.autoSwitchParts,allowCaretMode:P=Mt.allowCaretMode,twoDigitYearMax:F=Mt.twoDigitYearMax,ariaHasPopup:L=Mt.ariaHasPopup,autoFocus:B=Mt.autoFocus}=n.usePropsContext(Et,e),A=e=>{pe(t=>({...t,...e}))},H=()=>me.value?me.value:void 0!==ce.current?ce.current:oe.current&&oe.current.value,_=()=>{const e=oe.current&&oe.current.currentText||"",t=H();return null==O||me.focused||t?e:O},z=()=>void 0!==e.required&&e.required,K=()=>{const t=H()||e.value,i=k,n=x,s=((e,t,i)=>null===e||!(t&&t>e||i&&i<e))(t,i,n)&&yt(t,I,M),a=void 0!==T,r=(!z()||null!=t)&&s,o=void 0!==e.valid?e.valid:r;return{customError:a,rangeOverflow:t&&n.getTime()<t.getTime()||!1,rangeUnderflow:t&&t.getTime()<i.getTime()||!1,valid:o,valueMissing:null===t}},q=()=>{ae.current&&ae.current.focus()},W=()=>new xt(d),Y=()=>{const t=H();return{format:v,steps:e.steps,formatPlaceholder:D,placeholder:O,selectPreviousSegmentOnBackspace:!0,value:void 0!==e.value?e.value:t,intlService:W(),autoFill:void 0!==e.autoFill&&e.autoFill,enableMouseWheel:N,autoCorrectParts:R,autoSwitchParts:V,autoSwitchKeys:e.autoSwitchKeys||[],twoDigitYearMax:F,allowCaretMode:P}},U=e=>{re.current&&re.current.classList.add("k-focus"),A({focused:!0}),B&&Q(!0)},$=e=>{re.current&&re.current.classList.remove("k-focus"),A({focused:!1})},j=e=>"string"==typeof e?e:{inputFormat:e,displayFormat:e},Z=t=>{ce.current=H(),void 0===e.value&&A({value:void 0!==t.value?t.value:null}),ge(),de.current=t,ce.current=void 0},J=t=>{e.onChange&&e.onChange(t)},G=e=>{n.getActiveElement(document)===ae.current&&e.preventDefault()},X=()=>{ae.current&&ae.current.setCustomValidity&&ae.current.setCustomValidity(K().valid?"":T||Mt.validationMessage)},Q=p.useCallback(e=>{var t;if(ae.current&&B&&e){const e=(null==oe?void 0:oe.current).currentText,i=e[(null==oe?void 0:oe.current).currentText.search(/[^a-zA-Z]/)],n=e.split(i)[0].length;re.current&&re.current.classList.add("k-focus"),null==(t=null==oe?void 0:oe.current)||t.selectNearestSegment(n)}},[B]),ee=e=>{!ae.current||!oe.current||Z(e)},ne=t=>{const i=H();de.current&&e.onChange&&!s.isEqual(de.current.oldValue,i)&&e.onChange.call(void 0,{syntheticEvent:t,nativeEvent:de.current.event,value:de.current.value,target:se.current}),de.current=null},se=p.useRef(null),ae=p.useRef(null),re=p.useRef(null);p.useImperativeHandle(se,()=>({props:e,get options(){return Y()},get text(){return _()},get element(){return ae.current},get name(){return e.name},get value(){return H()},get validity(){return K()},focus:q,updateOnPaste:ee})),p.useImperativeHandle(t,()=>se.current);const oe=p.useRef(null),le=p.useRef(null),ue=p.useRef(!1),ce=p.useRef(null),de=p.useRef(null),he=p.useRef(e),[me,pe]=p.useState({value:void 0===e.value?f:null,focused:!1}),[,ge]=p.useReducer(e=>e+1,0);p.useLayoutEffect(()=>{ue.current||(oe.current=new u.DateInput(ae.current,{...Y(),format:j(Y().format),events:{focus:U,blur:$,valueChange:Z,click:J}}),le.current=oe.current.dateObject,ue.current=!0)},[]),p.useEffect(()=>(X(),ue.current||re.current&&re.current.addEventListener("wheel",G,{passive:!1}),B&&(A({focused:!0}),Q(!0)),()=>{re.current&&re.current.removeEventListener("wheel",G)}),[]),p.useEffect(()=>{X(),oe.current&&(le.current=oe.current.dateObject,(((e,t)=>typeof e!=typeof t||("string"==typeof e&&"string"==typeof t?e!==t:"object"==typeof e&&"object"==typeof t&&JSON.stringify(e)!==JSON.stringify(t)))(he.current.format,v)||he.current.readonly!==e.readonly||JSON.stringify(he.current.steps)!==JSON.stringify(e.steps)||W().locale!==oe.current.options.intlService.locale)&&oe.current.setOptions(Y(),!0),he.current.value!==e.value&&(null!==le.current.getValue()||null!==e.value)&&le.current.setValue(e.value),void 0!==e.ariaExpanded&&e.ariaExpanded&&(oe.current.options.placeholder=null),void 0!==e.ariaExpanded&&!e.ariaExpanded&&(oe.current.options.placeholder=O),oe.current.refreshElementValue(),he.current={format:v,readonly:e.readonly,ariaExpanded:e.ariaExpanded,steps:e.steps,value:e.value})});const ve=e.id||c+"-accessibility-id",fe=g&&g.uDateInput,we=_(),be=!E||K().valid;p.useImperativeHandle(e._ref,()=>se.current);const ye=p.createElement("span",{ref:e=>{re.current=e},style:e.label?void 0:{width:e.width},dir:e.dir,className:n.classNames(n.uDateInput.wrapper({c:fe,size:w,fillMode:y,rounded:b,disabled:C,required:z(),invalid:!be}),e.className)},p.createElement("input",{ref:e=>{ae.current=e},role:e.ariaRole||"textbox",readOnly:e.readonly,tabIndex:e.tabIndex||0,disabled:C,title:void 0!==e.title?e.title:we,type:"text",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoFocus:B,className:n.classNames(n.uDateInput.inputInner({c:fe})),id:ve,value:we,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-haspopup":L,"aria-disabled":C,"aria-expanded":e.ariaExpanded,"aria-controls":e.ariaControls,"aria-required":e.required,"aria-invalid":!be,onKeyDown:ne,onChange:ne,onWheel:ne,onInput:ne,onClick:ne,name:e.name,...e.inputAttributes}),e.children,e.clearButton&&e.value&&p.createElement(kt,{onClick:J,key:"clearbutton"}),S&&p.createElement("span",{className:n.classNames(n.uDateInput.inputSpinner({c:fe})),onMouseDown:e=>{e.preventDefault();const t=n.getActiveElement(document);ae.current&&t!==ae.current&&ae.current.focus({preventScroll:!0})}},p.createElement(r.Button,{tabIndex:-1,type:"button",className:n.classNames(n.uDateInput.spinnerIncrease({c:fe})),icon:"caret-alt-up",svgIcon:o.caretAltUpIcon,"aria-label":h.toLanguageString(te,Ce[te]),title:h.toLanguageString(te,Ce[te]),onClick:e=>{var t;null==(t=oe.current)||t.modifyDateSegmentValue(1),ne(e)}}),p.createElement(r.Button,{tabIndex:-1,type:"button",className:n.classNames(n.uDateInput.spinnerDecrease({c:fe})),icon:"caret-alt-down",svgIcon:o.caretAltDownIcon,"aria-label":h.toLanguageString(ie,Ce[ie]),title:h.toLanguageString(ie,Ce[ie]),onClick:e=>{var t;null==(t=oe.current)||t.modifyDateSegmentValue(-1),ne(e)}})));return e.label?p.createElement(l.FloatingLabel,{label:e.label,editorId:ve,editorValue:null==(i=ae.current)?void 0:i.value,editorValid:be,editorDisabled:C,children:ye,style:{width:e.width}}):ye});It.propTypes={value:i.instanceOf(Date),format:i.oneOfType([T(i.string),i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),formatPlaceholder:i.oneOfType([T(i.oneOf(["wide","narrow","short","formatPattern"])),i.shape({year:T(i.string),month:T(i.string),day:T(i.string),hour:T(i.string),minute:T(i.string),second:T(i.string)})]),width:i.oneOfType([i.string,i.number]),tabIndex:i.number,title:i.string,steps:i.shape({year:T(i.number),month:T(i.number),day:T(i.number),hour:T(i.number),minute:T(i.number),second:T(i.number)}),min:i.instanceOf(Date),max:i.instanceOf(Date),disabled:i.bool,spinners:i.bool,name:i.string,dir:i.string,label:i.node,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,ariaLabel:i.string,ariaRole:i.string,ariaHasPopup:i.oneOfType([i.bool,i.oneOf(["grid","dialog"])]),ariaExpanded:i.oneOfType([i.bool]),onChange:i.func,validationMessage:i.string,required:i.bool,valid:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),autoFocus:i.bool,inputAttributes:i.object};const Mt={format:"d",defaultValue:null,size:void 0,rounded:void 0,fillMode:void 0,formatPlaceholder:"wide",spinners:!1,disabled:!1,max:s.cloneDate(V),min:s.cloneDate(R),minTime:s.cloneDate(P),maxTime:s.cloneDate(F),validityStyles:!0,validationMessage:"Please enter a valid value!",placeholder:null,enableMouseWheel:!0,autoCorrectParts:!0,autoSwitchParts:!0,allowCaretMode:!1,twoDigitYearMax:68,ariaHasPopup:"grid",autoFocus:!1},Et=n.createPropsContext();It.displayName="KendoReactDateInput";const Tt=r.Button,Ot=e=>{const{dateInput:t,...i}=e,n=(e=>{const[t,i]=p.useState(!1);return p.useEffect(()=>{var t;e.current&&i(!!(null!=(t=e.current.element)&&t.value||e.current.text))}),{editorValue:t}})(t);return p.createElement(l.FloatingLabel,{...i,...n})},Nt=e=>{const{footer:t,windowWidth:i=0,mobileFilter:s,children:a,navigatable:l,navigatableElements:u,expand:c,animation:d,title:m,subTitle:g,onClose:v}=e,f=n.useAdaptiveModeContext(),w={navigatable:l||!1,navigatableElements:u||[],expand:c,animation:!1!==d,suffixActions:p.createElement(r.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",size:"large",themeColor:"primary",svgIcon:o.checkIcon,onClick:v}),filter:s,onClose:v,animationStyles:f&&i<=f.small?{top:0,width:"100%",height:"100%"}:void 0,title:m,subTitle:g,className:"k-adaptive-actionsheet",position:f&&i<=f.small?"fullscreen":void 0};return p.createElement(h.ActionSheet,{...w},a,t&&p.createElement(h.ActionSheetFooter,{className:"k-actions k-actions-stretched"},p.createElement(r.Button,{size:"large",tabIndex:0,"aria-label":t.cancelText,"aria-disabled":"false",type:"button",onClick:t.onCancel},t.cancelText),p.createElement(r.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":t.applyText,"aria-disabled":"false",type:"button",onClick:t.onApply},t.applyText)))},Rt=p.forwardRef((e,t)=>{const i=n.useId(e.id),r=a.useLocalization(),l=n.useAdaptiveModeContext(),{defaultShow:u=Vt.defaultShow,defaultValue:c=Vt.defaultValue,dateInput:d=Vt.dateInput,calendar:m=Vt.calendar,toggleButton:g=Vt.toggleButton,popup:v=Vt.popup,disabled:f=Vt.disabled,format:w=Vt.format,max:b=Vt.max,min:y=Vt.min,popupSettings:D=Vt.popupSettings,tabIndex:S=Vt.tabIndex,weekNumber:C=Vt.weekNumber,validityStyles:k=Vt.validityStyles,size:x=Vt.size,rounded:I=Vt.rounded,fillMode:M=Vt.fillMode,autoFocus:E=Vt.autoFocus,show:T,autoSwitchParts:O,autoSwitchKeys:N,twoDigitYearMax:R,ariaLabel:V,adaptive:P,adaptiveTitle:F=e.label||void 0,adaptiveSubtitle:B,formatPlaceholder:A,inputAttributes:_,validationMessage:z,visited:K,value:q,touched:W,modified:Y,_adaptiveMode:U=l,valid:$,focusedDate:j,id:Z,ariaLabelledBy:J,ariaDescribedBy:G,placeholder:X,onChange:Q,onOpen:ee,onClose:te,...ie}=n.usePropsContext(Pt,e),ne=()=>{if(n.canUseDOM)return ke.current&&ke.current.ownerDocument||window.document},se=()=>!!(Ve.windowWidth&&l&&Ve.windowWidth<=(null==l?void 0:l.medium)&&e.adaptive),re=()=>{const e=void 0!==Me.current?Me.current:void 0!==q?q:Ve.value;return null!==e?s.cloneDate(e):null},oe=()=>void 0!==Ee.current?Ee.current:void 0!==T?T:Ve.show,le=()=>void 0!==e.required&&e.required,ue=()=>{const e=re()||q||null,t=y,i=b,n=H(e,t,i),s=void 0!==z,a=(!le()||null!=e)&&n,r=void 0!==$?$:a;return{customError:s,rangeOverflow:e&&i.getTime()<e.getTime()||!1,rangeUnderflow:e&&e.getTime()<t.getTime()||!1,valid:r,valueMissing:null===e}},ce=()=>{xe.current&&xe.current.focus()},de=e=>{Ie.current=e},he=e=>{oe()!==e&&(Ae({show:e}),e&&ee&&ee({target:Se.current}),!e&&te&&te({target:Se.current}))},me=e=>{null!=D&&D.onMouseDownOutside&&D.onMouseDownOutside(e)},pe=(e,t)=>{Ae({value:s.cloneDate(e||void 0)}),Me.current=e,Ee.current=!1,se()||(Oe.current=!0),Q&&Q({syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:re(),show:oe(),target:Se.current}),Me.current=void 0,Ee.current=void 0,he(!1)},ge=e=>{const t=(e=>{const t=re();return t&&e?L(e,t):e})(e.value);pe(t,e)},ve=()=>{const{popupClass:e,...t}=D,i=oe(),a=re(),r=a&&s.getDate(a),o=n.classNames(e),l={popupClass:"k-datepicker-popup",show:i,anchor:ke.current,className:o,id:He,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...t,onMouseDownOutside:me},u={disabled:f,value:r,min:y,max:b,weekNumber:C,focusedDate:j,className:se()?"k-calendar-lg":"",navigation:!se(),onChange:ge},c=m||Vt.calendar,d=v||Vt.popup;return se()?p.createElement(c,{_ref:de,...u}):p.createElement(d,{...l},p.createElement(c,{_ref:de,...u}))},fe=()=>{Ae({focused:!1}),he(!1)},we=()=>{he(!oe())},be=()=>{f||(Oe.current=!0,he(!oe()))},ye=e=>{e.preventDefault()},De=e=>{const{altKey:t,keyCode:i}=e;if(i===n.Keys.esc&&oe())return Oe.current=!0,void he(!1);t&&(i===n.Keys.up||i===n.Keys.down)&&(e.preventDefault(),e.stopPropagation(),Oe.current=i===n.Keys.up,he(i===n.Keys.down))},Se=p.useRef(null),ke=p.useRef(null),xe=p.useRef(null),Ie=p.useRef(null);p.useImperativeHandle(Se,()=>({props:e,get element(){return ke.current},get calendar(){return Ie.current},get dateInput(){return xe.current},get name(){return e.name},get show(){return oe()},get validity(){return ue()},get value(){return re()},get mobileMode(){return se()},togglePopup:we,focus:ce})),p.useImperativeHandle(t,()=>Se.current);const Me=p.useRef(void 0),Ee=p.useRef(void 0),Te=p.useRef(null),Oe=p.useRef(!1),Ne=p.useRef(!1),Re=p.useRef(null),[Ve,Pe]=p.useState({value:c,show:u,focused:!1}),[,Fe]=p.useReducer(e=>e,!0),Le=e.name||i||void 0,Be=p.useCallback(e=>{if(f)return;let t=null;if(null!=e)if(e instanceof Date)t=e;else if("string"==typeof e||"number"==typeof e){const i=new Date(e);isNaN(i.getTime())||(t=i)}if(t&&H(t,y,b)){const e={target:ke.current,currentTarget:ke.current};pe(t,{syntheticEvent:e})}},[f,y,b]);n.useKendoPaste(ke,{fieldName:Le,onValueChange:Be,enabled:!!Le});const Ae=e=>{Pe(t=>({...t,...e}))};p.useEffect(()=>{Ie.current&&Ie.current.element&&oe()&&!Ne.current&&Ie.current.element.focus({preventScroll:!0}),se()&&oe()&&!Ne.current&&setTimeout(()=>{Ie.current&&Ie.current.element&&Ie.current.element.focus({preventScroll:!0})},300),xe.current&&xe.current.element&&!oe()&&Oe.current&&xe.current.element.focus({preventScroll:!0}),Ne.current=oe(),Oe.current=!1}),p.useEffect(()=>{var e;return Re.current=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(e=>(e=>{for(const t of e)Ae({windowWidth:t.target.clientWidth})})(e)),oe()&&Fe(),null!=(e=ne())&&e.body&&Re.current&&Re.current.observe(ne().body),()=>{var e;clearTimeout(Te.current),null!=(e=ne())&&e.body&&Re.current&&Re.current.disconnect()}},[]);const He=i+"-popup-id",_e=ve(),ze=d||Vt.dateInput,Ke=re(),qe=g||Vt.toggleButton,We=(()=>{const{windowWidth:e=0}=Ve,t={expand:oe(),onClose:fe,title:F,subTitle:B,windowWidth:e};return p.createElement(Nt,{...t},p.createElement(h.ActionSheetContent,null,ve()))})(),Ye=!k||ue().valid,Ue=r.toLanguageString(ae,Ce[ae]),$e={disabled:f,format:w,formatPlaceholder:A,id:Z,ariaLabelledBy:J,ariaDescribedBy:G,ariaLabel:V,max:b,min:y,name:e.name,onChange:e=>{pe(e.value,e)},required:e.required,_ref:xe,tabIndex:oe()?-1:S,title:e.title,valid:ue().valid,validationMessage:z,validityStyles:k,value:Ke,label:void 0,placeholder:Ve.focused?null:X,ariaExpanded:oe(),autoFill:e.autoFill,twoDigitYearMax:R,enableMouseWheel:e.enableMouseWheel,autoCorrectParts:e.autoCorrectParts,autoSwitchParts:O,autoSwitchKeys:N,allowCaretMode:e.allowCaretMode,inputAttributes:_},je=p.createElement(n.AsyncFocusBlur,{onFocus:()=>{Ae({focused:!0})},onBlur:se()?void 0:fe,onSyncBlur:e.onBlur,onSyncFocus:e.onFocus},t=>p.createElement(p.Fragment,null,p.createElement("span",{...e.label?{}:ie,ref:ke,className:n.classNames("k-input","k-datepicker",{[`k-input-${n.kendoThemeMaps.sizeMap[x]||x}`]:x,[`k-rounded-${n.kendoThemeMaps.roundedMap[I]||I}`]:I,[`k-input-${M}`]:M,"k-invalid":!Ye,"k-required":le(),"k-disabled":f},e.className),onKeyDown:De,style:{width:e.width},onFocus:se()?be:t.onFocus,onBlur:t.onBlur,onClick:se()?be:void 0},p.createElement(ze,{_ref:xe,ariaRole:"combobox",ariaExpanded:oe(),ariaControls:oe()?He:void 0,autoFocus:E,...$e}),p.createElement(qe,{type:"button",icon:"calendar",svgIcon:o.calendarIcon,title:Ue,className:"k-input-button",onClick:se()?void 0:be,"aria-label":Ue,fillMode:M,onMouseDown:ye}),!se()&&_e),se()&&We));return e.label?p.createElement(Ot,{dateInput:xe,label:e.label,editorId:i,editorValid:Ye,editorDisabled:f,children:je,style:{width:e.width},...ie}):je});Rt.propTypes={className:i.string,defaultShow:i.bool,defaultValue:i.instanceOf(Date),disabled:i.bool,focusedDate:i.instanceOf(Date),format:i.oneOfType([i.string,i.shape({skeleton:T(i.string),pattern:T(i.string),date:T(i.oneOf(["short","medium","long","full"])),time:T(i.oneOf(["short","medium","long","full"])),datetime:T(i.oneOf(["short","medium","long","full"])),era:T(i.oneOf(["narrow","short","long"])),year:T(i.oneOf(["numeric","2-digit"])),month:T(i.oneOf(["numeric","2-digit","narrow","short","long"])),day:T(i.oneOf(["numeric","2-digit"])),weekday:T(i.oneOf(["narrow","short","long"])),hour:T(i.oneOf(["numeric","2-digit"])),hour12:T(i.bool),minute:T(i.oneOf(["numeric","2-digit"])),second:T(i.oneOf(["numeric","2-digit"])),timeZoneName:T(i.oneOf(["short","long"]))})]),formatPlaceholder:i.oneOfType([T(i.oneOf(["wide","narrow","short","formatPattern"])),i.shape({year:T(i.string),month:T(i.string),day:T(i.string),hour:T(i.string),minute:T(i.string),second:T(i.string)})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,ariaLabel:i.string,min:i.instanceOf(Date),max:i.instanceOf(Date),name:i.string,popupSettings:i.shape({animate:T(i.bool),appendTo:T(i.any),popupClass:T(i.string)}),show:i.bool,tabIndex:i.number,title:i.string,value:i.instanceOf(Date),weekNumber:i.bool,width:i.oneOfType([i.number,i.string]),validationMessage:i.string,required:i.bool,valid:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),adaptive:i.bool,adaptiveTitle:i.string,adaptiveSubtitle:i.string,autoFocus:i.bool,inputAttributes:i.object};const Vt={defaultShow:!1,defaultValue:null,dateInput:It,calendar:st,toggleButton:Tt,popup:d.Popup,disabled:!1,format:"d",max:V,min:R,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1},Pt=n.createPropsContext();Rt.displayName="KendoReactDatePicker";const Ft=Object.freeze({name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1617189075,version:"14.5.0-develop.3",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"}),Lt=(e,t)=>{const i=s.cloneDate(e);return i.setHours(t),i},Bt=e=>null!==e&&e<12,At=(e,t,i)=>!t&&!i||e>=t&&e<=i,Ht=(e,t,i)=>!t&&!i||e>=t||e<=i;let _t=class{constructor(e){this.intl=e,this.min=null,this.max=null,this.part=null}apply(e,t){const i=e.getHours(),n=Bt(i),s=Bt(t.getHours());if(n&&s||!n&&!s)return e;const[a,r=24]=this.normalizedRange(),o=i+(s?-12:12);return Lt(e,Math.min(Math.max(a,o),r||24))}configure(e){const{min:t=this.min,max:i=this.max,part:n=this.part}=e;this.min=t,this.max=i,this.part=n}data(e){const t=this.part&&this.part.names;if(!t||!this.min)return[];const i=[],[n,s]=this.normalizedRange(),a=this.intl.dateFormatNames(t);return Bt(n)&&i.push({text:a.am,value:Lt(this.min,n)}),(e=>null!==e&&(!e||e>11))(s)&&i.push({text:a.pm,value:Lt(this.min,Math.max(12,s))}),this.min.getHours()!==n?i.reverse():i}isRangeChanged(e,t){return!1}limitRange(e,t,i){return[e,t]}total(){const[e,t]=this.normalizedRange();return(e||t)&&(e>11||t<12)?1:2}selectedIndex(e){if(!this.valueInList(e)||!this.min)return-1;const t=Math.floor(e.getHours()/12);return this.min.getHours()===this.normalizedRange()[0]?t:0===t?1:0}valueInList(e){return!(!this.min||!this.max)&&(this.min.getHours()!==this.normalizedRange()[0]?Ht:At)(e.getHours(),this.min.getHours(),this.max.getHours())}normalizedRange(){const e=this.min.getHours(),t=this.max.getHours();return[Math.min(e,t),Math.max(e,t)]}};class zt{constructor(){this.itemHeight=0,this.timeListHeight=0,this.didCalculate=!1}ensureHeights(){void 0===this.timeListHeight&&this.calculateHeights()}calculateHeights(e,t){if(!n.canUseDOM)return;const i=t&&t.uTime,s=W("div"),a=W("span"),r=W("ul"),o=W("li"),l=s([a("minute",n.strippedClassNames(n.uTime.title({c:i}))),s([s([r([o("<span>02</span>",n.strippedClassNames(n.uTime.li({c:i})))],n.strippedClassNames(n.uTime.ul({c:i})))],n.strippedClassNames(n.uTime.containerSelector({c:i}),n.uTime.container({c:i,content:!0,scrollable:!0})))],n.strippedClassNames(n.uTime.list({c:i})))],n.strippedClassNames(n.uTime.listWrapper({c:i})),{left:"-10000px",position:"absolute"}),u=`.${n.strippedClassNames(n.uTime.containerSelector({c:i}))}`,c=e&&e.querySelector(u)||document.body,d=c.appendChild(l);this.timeListHeight=d.querySelector(u).offsetHeight,this.itemHeight=d.querySelector("li").offsetHeight,c.removeChild(d),this.didCalculate=!0}}const Kt=(e=>t=>t%e)(24),qt=(e,t)=>Kt(24+e-t),Wt=e=>(t,i)=>i&&s.getDate(t).getTime()!==s.getDate(i).getTime()?pt(t,e):t,Yt=Wt(0),Ut=Wt(23);let $t=class{constructor(e){this.intl=e,this.boundRange=!1,this.insertUndividedMax=!1,this.min=null,this.max=null,this.step=0,this.toListItem=null}apply(e,t){return pt(e,t.getHours())}configure(e){const{boundRange:t=this.boundRange,insertUndividedMax:i=this.insertUndividedMax,min:n=this.min,max:s=this.max,part:a,step:r=this.step}=e;this.boundRange=t,this.insertUndividedMax=i,this.toListItem=e=>{const t=pt(N,e);return{text:this.intl.formatDate(t,a.pattern),value:t}},this.min=n,this.max=s,this.step=r}data(e){const[t]=this.range(e),i=((e,t)=>i=>Kt(e+i*t))(t,this.step),n=wt(0,this.countFromMin(e)).map(e=>this.toListItem&&this.toListItem(i(e)));return this.addLast(n),e&&this.addMissing(n,e),n}isRangeChanged(e,t){return!(!this.min||!this.max)&&(!s.isEqual(this.min,e)||!s.isEqual(this.max,t))}limitRange(e,t,i){return this.boundRange?[Yt(e,i),Ut(t,i)]:[e,t]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastHour(e)===e.getHours()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&this.toListItem&&e.push(this.toListItem(this.lastHour(t))),e}addMissing(e,t){if(this.valueInList(t))return e;if(this.toListItem){const i=this.toListItem(t.getHours());e.splice(this.selectedIndex(t),0,i)}return e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(qt(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return null!==this.max&&this.isMissing(pt(this.max,this.lastHour(e)))}divideByStep(e){return qt(e.getHours(),this.min.getHours())/this.step}lastHour(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getHours(),i.getHours()]}};const jt=(e=>t=>t%e)(60),Zt=(e,t)=>jt(60+e-t),Jt=e=>(t,i)=>i&&t.getHours()!==i.getHours()?gt(t,e):t,Gt=Jt(0),Xt=Jt(59);let Qt=class{constructor(e){this.intl=e,this.toListItem=null,this.min=null,this.max=null,this.step=0,this.insertUndividedMax=!1}apply(e,t){return gt(e,t.getMinutes())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:n=this.max,part:s,step:a=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=gt(N,e);return{text:this.intl.formatDate(t,s.pattern),value:t}},this.min=i,this.max=n,this.step=a}data(e){const[t]=this.range(e),i=((e,t)=>i=>jt(e+i*t))(t,this.step),n=wt(0,this.countFromMin(e)).map(e=>this.toListItem&&this.toListItem(i(e)));return this.addLast(n),e&&this.addMissing(n,e),n}isRangeChanged(e,t){return!(null===this.min||null===this.max||s.isEqual(this.min,e)&&s.isEqual(this.max,t))}limitRange(e,t,i){return[Gt(e,i),Xt(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastMinute(e)===e.getMinutes()||!this.isMissing(e))}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&this.toListItem&&e.push(this.toListItem(this.lastMinute(t))),e}addMissing(e,t){if(this.valueInList(t))return e;if(this.toListItem){const i=this.toListItem(t.getMinutes());e.splice(this.selectedIndex(t),0,i)}return e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(Zt(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return null!==this.max&&this.isMissing(gt(this.max,this.lastMinute(e)))}divideByStep(e){return Zt(e.getMinutes(),this.min.getMinutes())/this.step}lastMinute(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getMinutes(),i.getMinutes()]}};const ei=(e=>t=>t%e)(60),ti=(e,t)=>ei(60+e-t),ii=e=>(t,i)=>!i||t.getMinutes()===i.getMinutes()&&t.getHours()===i.getHours()?t:vt(t,e),ni=ii(0),si=ii(59);class ai{constructor(e){this.intl=e,this.toListItem=null,this.min=null,this.max=null,this.step=0,this.insertUndividedMax=!1}apply(e,t){return vt(e,t.getSeconds())}configure(e){const{insertUndividedMax:t=this.insertUndividedMax,min:i=this.min,max:n=this.max,part:s,step:a=this.step}=e;this.insertUndividedMax=t,this.toListItem=e=>{const t=vt(N,e);return{text:this.intl.formatDate(t,s.pattern),value:t}},this.min=i,this.max=n,this.step=a}data(e){const[t]=this.range(e),i=((e,t)=>i=>ei(e+i*t))(t,this.step),n=wt(0,this.countFromMin(e)).map(e=>this.toListItem&&this.toListItem(i(e)));return this.addLast(n),e&&this.addMissing(n,e),n}isRangeChanged(e,t){return!(null===this.min||null===this.max||s.isEqual(this.min,e)&&s.isEqual(this.max,t))}limitRange(e,t,i){return[ni(e,i),si(t,i)]}total(e){const t=this.insertUndividedMax&&this.isLastMissing(e)?1:0,i=this.isMissing(e)?1:0;return this.countFromMin(e)+i+t}selectedIndex(e){return Math.ceil(this.divideByStep(e))}valueInList(e){return!e||(this.insertUndividedMax&&this.lastSecond(e)===e.getSeconds()||!this.isMissing(e))}divideByStep(e){return ti(e.getSeconds(),this.min.getSeconds())/this.step}addLast(e,t){return this.insertUndividedMax&&this.isLastMissing(t)&&this.toListItem&&e.push(this.toListItem(this.lastSecond(t))),e}addMissing(e,t){if(this.valueInList(t))return e;if(this.toListItem){const i=this.toListItem(t.getSeconds());e.splice(this.selectedIndex(t),0,i)}return e}countFromMin(e){const[t,i]=this.range(e);return Math.floor(ti(i,t)/this.step)+1}isMissing(e){return!!e&&this.selectedIndex(e)!==this.divideByStep(e)}isLastMissing(e){return null!==this.max&&this.isMissing(vt(this.max,this.lastSecond(e)))}lastSecond(e){return this.range(e)[1]}range(e){const[t,i]=this.limitRange(this.min,this.max,e);return[t.getSeconds(),i.getSeconds()]}}const ri={[n.Keys.end]:(e,t)=>e[e.length-1],[n.Keys.home]:(e,t)=>e[0],[n.Keys.up]:(e,t)=>e[t-1],[n.Keys.down]:(e,t)=>e[t+1]},oi={[at]:_t,[rt]:$t,[ot]:Qt,[lt]:ai},li=class e extends p.Component{constructor(t){super(t),this.intl=null,this._element=null,this.service=null,this.virtualization=null,this.topOffset=0,this.bottomOffset=0,this.itemHeight=0,this.listHeight=0,this.topThreshold=0,this.bottomThreshold=0,this.animateToIndex=!1,this.focus=e=>{Promise.resolve().then(()=>{this.element&&this.element.focus(e)})},this.itemOffset=e=>{if(!this.virtualization||!this.service)return-1;const t=this.service.selectedIndex(this.props.value),i=this.virtualization.activeIndex(),n=this.virtualization.itemOffset(i),s=Math.abs(Math.ceil(e)-n);if(t===i&&s<2)return n;const a=t>i;return a&&s>=this.bottomThreshold||!a&&s>this.topThreshold?this.virtualization.itemOffset(i+1):n},this.calculateHeights=()=>{this.dom.didCalculate&&(this.itemHeight=this.dom.itemHeight,this.listHeight=this.dom.timeListHeight,this.topOffset=(this.listHeight-this.itemHeight)/2,this.bottomOffset=this.listHeight-this.itemHeight,this.props.mobileMode&&(this.topOffset+=9,this.bottomOffset+=18),this.topThreshold=.05*this.itemHeight,this.bottomThreshold=.95*this.itemHeight)},this.configureServices=({min:e,max:t,value:i}=this.props)=>{if(this.service){const[n,s]=this.service.limitRange(e||this.min,t||this.max,i||this.props.value);this.service.configure(this.serviceSettings({min:n,max:s}))}},this.serviceSettings=t=>{const i={boundRange:this.props.boundRange||e.defaultProps.boundRange,insertUndividedMax:!1,min:s.cloneDate(this.min),max:s.cloneDate(this.max),part:this.props.part,step:this.step},n=Object.assign({},i,t);return n.boundRange="hour"!==n.part.type||this.props.boundRange||e.defaultProps.boundRange,n},this.handleScrollAction=({target:e,animationInProgress:t})=>{if(this.virtualization&&this.service&&e&&!t){this.animateToIndex=!1;const t=this.virtualization.itemIndex(this.itemOffset(e.scrollTop)),i=this.service.data(this.props.value)[t];this.handleChange(i)}},this.handleFocus=e=>{const{onFocus:t}=this.props;t&&t.call(void 0,e)},this.handleBlur=e=>{const{onBlur:t}=this.props;t&&t.call(void 0,e)},this.handleMouseOver=()=>{if(!this._element)return;const e=n.getActiveElement(document);document&&e!==this._element&&this.props.show&&this._element.focus({preventScroll:!0})},this.handleKeyDown=e=>{if(!this.service)return;const{keyCode:t}=e;(t===n.Keys.down||t===n.Keys.up||t===n.Keys.end||t===n.Keys.home)&&e.preventDefault();const i=(ri[e.keyCode]||n.noop)(this.service.data(this.props.value),this.service.selectedIndex(this.props.value));i&&this.handleChange(i)},this.handleChange=Y(e=>{if(!this.service)return;const t=this.service.apply(this.props.value,e.value);if(this.props.value.getTime()===t.getTime())return;const{onChange:i}=this.props;i&&i.call(void 0,t)},100),this.dom=new zt}get element(){return this._element}get animate(){return!(!this.props.smoothScroll||!this.animateToIndex)}get min(){return this.props.min||e.defaultProps.min}get max(){return this.props.max||e.defaultProps.max}get step(){return void 0!==this.props.step&&0!==this.props.step?Math.floor(this.props.step):e.defaultProps.step}componentDidMount(){Promise.resolve().then(()=>{const{unstyled:e}=this.props;this._element&&(this.dom.calculateHeights(this._element,e),this.lastMeasuredHeight=this._element.clientHeight,this.forceUpdate())})}componentDidUpdate(e){if(!this.virtualization||!this.service)return;if(this._element){const t=this._element.clientHeight,i=void 0!==this.lastMeasuredHeight&&Math.abs(t-this.lastMeasuredHeight)>1,n=this.props.mobileMode!==e.mobileMode;if(i||n){const{unstyled:e}=this.props;return this.dom.calculateHeights(this._element,e),this.calculateHeights(),this.lastMeasuredHeight=t,this.animateToIndex=!1,void this.forceUpdate()}null!=this.lastMeasuredHeight||(this.lastMeasuredHeight=t)}const t=this.service.selectedIndex(this.props.value);if(this.virtualization[this.animate?"animateToIndex":"scrollToIndex"](t),this.animateToIndex=!0,!this.topOffset&&this._element){const{unstyled:e}=this.props;this.dom.calculateHeights(this._element,e)}}render(){const{part:e,value:t,unstyled:i}=this.props;if(!e.type||!oi[e.type])return;const s=i&&i.uTime;this.calculateHeights(),this.intl=a.provideIntlService(this),this.service=new oi[e.type](this.intl),this.configureServices();const r=this.service.data(t),o="translateY("+this.topOffset+"px)",l=this.service.total(t),u=p.createElement(p.Fragment,null,p.createElement("ul",{style:{transform:o,msTransform:o},className:n.classNames(n.uTime.ul({c:s}))},r.map((e,t)=>p.createElement("li",{key:t,className:n.classNames(n.uTime.li({c:s})),onClick:()=>{this.handleChange(e)}},p.createElement("span",null,e.text)))),p.createElement("div",{className:n.classNames(n.uTime.scrollablePlaceholder({c:s}))}));return p.createElement("div",{className:n.classNames(n.uTime.list({c:s})),id:String(this.props.id||""),tabIndex:this.props.disabled?-1:0,ref:e=>{this._element=e},onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseOver:this.handleMouseOver},this.dom.didCalculate?p.createElement(k,{bottomOffset:this.bottomOffset,children:u,className:n.classNames(n.uTime.containerSelector({c:s}),n.uTime.container({c:s})),itemHeight:this.itemHeight,maxScrollDifference:this.listHeight,onScrollAction:this.handleScrollAction,ref:e=>{this.virtualization=e},role:"presentation",skip:0,tabIndex:-1,take:l,topOffset:this.topOffset,total:l,unstyled:i}):p.createElement("div",{className:n.classNames(n.uTime.containerSelector({c:s}),n.uTime.container({c:s,content:!0,scrollable:!0}))},u))}};li.propTypes={id:i.number,max:i.instanceOf(Date),min:i.instanceOf(Date),part:function(e,t,i){const n=e[t];if(!n||!oi[n.type])throw new Error(`\n Invalid prop '${t}' supplied to ${i}.\n Supported part types are hour|minute|second|dayperiod.\n `);return null},step:function(e,t,i){const n=e[t];if(void 0!==n&&n<=0)throw new Error(`\n Invalid prop '${t}' supplied to ${i}.\n ${t} cannot be less than 1.\n `);return null},value:i.instanceOf(Date),smoothScroll:i.bool,show:i.bool},li.defaultProps={boundRange:!1,max:F,min:N,step:1,smoothScroll:!0};let ui=li;a.registerForIntl(ui);const ci=new RegExp(`${rt}|${ot}|${lt}|${at}|literal`),di=class e extends p.Component{constructor(t){super(t),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&&-1===this.state.activeListIndex&&!this.hasActiveButton()&&i&&i.element&&i.focus(e)})},this.timeFormatReducer=(e,t)=>e+t.pattern,this.timeFormatFilter=(e,t,i)=>{const n=t>=1&&i[t-1];return n&&n&&"literal"===e.type?ci.test(n.type||""):ci.test(e.type||"")},this.focusList=e=>{this.timeLists.length&&this.timeLists.reduce(this.listReducer,[]).map(t=>1===e?t.next:t.prev).map(e=>e&&e.element&&e.element.focus({preventScroll:!0}))},this.listReducer=(e,t,i,n)=>e.length||t.props.id!==this.state.activeListIndex?e:[{next:n[i+1]||t,prev:n[i-1]||t}],this.showNowButton=()=>!this.hasSteps()&&this.props.nowButton&&yt(ft(),this.min,this.max),this.handleKeyDown=e=>{const{keyCode:t}=e;switch(t){case n.Keys.left:return e.preventDefault(),void this.focusList(0);case n.Keys.right:return e.preventDefault(),void this.focusList(1);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=mt(ht(this.props.steps,this.props.min||e.defaultProps.min)),this.state={activeListIndex:-1},this.hasActiveButton=this.hasActiveButton.bind(this)}get element(){return this._element}get value(){return((e,t,i)=>{if(!e||!t||!i)return e;const{candidateValue:n,minValue:s,maxValue:a}=bt(e,t,i);return n<s?L(e,t):n>a?L(e,i):e})(this.snapTime(s.cloneDate(this.props.value||N)),this.min,this.max)}get intl(){return a.provideIntlService(this)}get min(){return this.snapTime(this.props.min||e.defaultProps.min)}get max(){return this.snapTime(this.props.max||e.defaultProps.max)}get steps(){return this.props.steps||e.defaultProps.steps}get boundRange(){return void 0!==this.props.boundRange?this.props.boundRange:e.defaultProps.boundRange}componentWillUnmount(){clearTimeout(this.nextTickId)}componentDidMount(){const{onMount:e}=this.props;e&&e.call(void 0,this.value)}render(){const{format:t,smoothScroll:i,onNowClick:s,className:o,disabled:l,mobileMode:u,show:c,onNowKeyDown:d,unstyled:h}=this.props,m=h&&h.uTime;this.snapTime=mt(ht(this.steps,this.min)),this.dateFormatParts=this.intl.splitDateFormat(t||e.defaultProps.format).filter(this.timeFormatFilter);const g=n.classNames(n.uTime.part({c:m,mobileMode:u,disabled:l}),o);this.timeLists=[];const v=a.provideLocalizationService(this),f=v.toLanguageString(he,Ce[he]);return p.createElement("div",{className:g},p.createElement("div",{className:n.classNames(n.uTime.header({c:m}))},p.createElement("span",{className:n.classNames(n.uTime.title({c:m}))},this.intl.formatDate(this.value,this.dateFormatParts.reduce(this.timeFormatReducer,""))),this.showNowButton()&&p.createElement(r.Button,{type:"button",ref:e=>{this._nowButton=e},className:n.classNames(n.uTime.now({c:m})),fillMode:"flat",themeColor:"base",title:f,onKeyDown:d,"aria-label":f,onClick:s,tabIndex:l?-1:0},v.toLanguageString(de,Ce[de]))),p.createElement("div",{className:n.classNames(n.uTime.listContainer({c:m})),onKeyDown:this.handleKeyDown},p.createElement("span",{className:n.classNames(n.uTime.highlight({c:m}))}),this.dateFormatParts.map((e,t)=>"literal"!==e.type?p.createElement("div",{key:t,className:n.classNames(n.uTime.listWrapper({c:m,focused:t===this.state.activeListIndex})),role:"presentation",tabIndex:-1},p.createElement("span",{className:n.classNames(n.uTime.title({c:m})),onMouseDown:e=>{e.preventDefault()}},this.intl.dateFieldName(e)),p.createElement(ui,{min:this.min,max:this.max,boundRange:this.boundRange,part:e,step:e.type?this.steps[e.type]:1,smoothScroll:i,ref:e=>{e&&this.timeLists.push(e)},id:t,onFocus:()=>{this.handleListFocus(t)},onBlur:this.handleListBlur,onChange:this.handleChange,value:this.value,disabled:l,show:c,mobileMode:u,unstyled:h})):p.createElement("div",{key:t,className:n.classNames(n.uTime.separator({c:m}))},e.pattern))))}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}hasActiveButton(){const e=n.getActiveElement(document);return this._nowButton&&e===this._nowButton.element}hasSteps(){const e=Object.keys(this.steps);return e.length!==e.reduce((e,t)=>e+this.steps[t],0)}};di.propTypes={cancelButton:i.bool,disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),max:i.instanceOf(Date),min:i.instanceOf(Date),nowButton:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,value:i.instanceOf(Date),show:i.bool},di.defaultProps={value:null,disabled:!1,nowButton:!0,cancelButton:!0,format:"hh:mm a",min:P,max:F,steps:{},boundRange:!1};let hi=di;a.registerForIntl(hi),a.registerForLocalization(hi);const mi=class e extends p.Component{constructor(t){super(t),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;t!==n.Keys.enter||this.hasActiveButton()||this.handleAccept(e)},this.revertToNowButton=e=>{const{keyCode:t,shiftKey:i}=e;!i&&t===n.Keys.tab&&(e.preventDefault(),!1!==this.props.nowButton?this.timePart&&this.timePart.focus({preventScroll:!0},!0):this.timePart&&this.timePart.focus({preventScroll:!0}))},this.handleNowKeyDown=e=>{var t;const{keyCode:i,shiftKey:s}=e;s&&i===n.Keys.tab?(e.preventDefault(),this._acceptButton&&(null==(t=this._acceptButton.element)||t.focus({preventScroll:!0}))):i===n.Keys.enter&&(e.stopPropagation(),this.handleNowClick(e))},this.handleAccept=e=>{const t=this.mergeValue(s.cloneDate(this.value||ft()),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(s.cloneDate(this.value||ft()),ft());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||e.defaultProps.format),this.mergeValue=(e=>(t,i)=>(t.setHours(...e.map(e=>e(t,i))),t))(dt(this.dateFormatParts)),this.hasActiveButton=this.hasActiveButton.bind(this),this.state={current:this.props.value||N,value:this.props.value||e.defaultProps.value}}get element(){return this._element}get value(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value;return null!==e?s.cloneDate(e):null}get intl(){return a.provideIntlService(this)}get current(){return null!==this.state.current?s.cloneDate(this.state.current):null}componentWillUnmount(){clearTimeout(this.nextTickId)}render(){const{format:e,cancelButton:t,disabled:i,tabIndex:s,className:o,smoothScroll:l,min:u,max:c,boundRange:d,nowButton:h,steps:m,show:g,mobileMode:v,unstyled:f}=this.props,w=f&&f.uTimePicker,b=f&&f.uTime,y=a.provideLocalizationService(this),D=y.toLanguageString(me,Ce[me]),S=y.toLanguageString(pe,Ce[pe]);return p.createElement("div",{ref:e=>{this._element=e},tabIndex:i?void 0:s||0,className:n.classNames(n.uTimePicker.timeSelector({c:w,mobileMode:v,disabled:i}),o),onKeyDown:this.handleKeyDown},p.createElement(hi,{ref:e=>{this.timePart=e},value:this.current,onChange:this.handleChange,onNowClick:this.handleNowClick,format:e,smoothScroll:l,min:u,max:c,boundRange:d,disabled:i,nowButton:h,steps:m,show:g,mobileMode:v,onNowKeyDown:this.handleNowKeyDown,unstyled:f}),this.props.footer&&p.createElement("div",{className:n.classNames(n.uTime.footer({c:b}))},t&&p.createElement(r.Button,{type:"button",ref:e=>{this._cancelButton=e},className:n.classNames(n.uTime.cancel({c:b})),onClick:this.handleReject,title:D,"aria-label":D},D),p.createElement(r.Button,{type:"button",ref:e=>{this._acceptButton=e},className:n.classNames(n.uTime.accept({c:b})),themeColor:"primary",onClick:this.handleAccept,onKeyDown:this.revertToNowButton,title:S,"aria-label":S},S)))}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}hasActiveButton(){if(!this._acceptButton||!this._acceptButton.element)return!1;const e=n.getActiveElement(document);return this._acceptButton&&e===this._acceptButton.element||this._cancelButton&&e===this._cancelButton.element}};mi.propTypes={cancelButton:i.bool,className:i.string,disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),max:i.instanceOf(Date),min:i.instanceOf(Date),nowButton:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,value:i.instanceOf(Date),show:i.bool},mi.defaultProps={value:null,disabled:!1,cancelButton:!0,format:"t",min:P,max:F,boundRange:!1,footer:!0};let pi=mi;a.registerForIntl(pi),a.registerForLocalization(pi);const gi=class e extends p.Component{constructor(t){super(t),this._element=null,this._dateInput=p.createRef(),this._timeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.showLicenseWatermark=!1,this.handleKendoPasteValue=e=>{if(e instanceof Date&&!isNaN(e.getTime()))return void this.applyKendoPasteTime(e);const t=null!=e?String(e):"";if(!t)return;const i=new Date(t);isNaN(i.getTime())||this.applyKendoPasteTime(i)},this.applyKendoPasteTime=e=>{const t=this.normalizeTime(e);if(!Dt(t,this.min,this.max))return;const i=new Event("change",{bubbles:!0}),n={target:this._element,currentTarget:this._element,nativeEvent:i};this.handleValueChange({syntheticEvent:n,nativeEvent:i,value:t})},this.focus=()=>{this.dateInput&&this.dateInput.focus()},this.renderTimeSelector=()=>{const{smoothScroll:e,cancelButton:t,nowButton:i,disabled:n,format:s,steps:a,unstyled:r}=this.props;return p.createElement(pi,{ref:this.setTimeSelectorRef,mobileMode:this.mobileMode,show:this.show,cancelButton:t,disabled:n,nowButton:i,format:s,min:this.min,max:this.max,steps:a,smoothScroll:e,value:this.value,footer:!this.mobileMode,handleTimeChange:this.mobileMode&&this.handleTimeChange,onChange:this.handleValueChange,onReject:this.handleValueReject,unstyled:r})},this.renderPopup=()=>{const{popupClass:e,...t}=this.popupSettings,{unstyled:i}=this.props,s=i&&i.uTimePicker,a=n.classNames(e),r={popupClass:n.uTimePicker.popup({c:s}),show:this.show,animate:null!==this.element,anchor:this.element,className:a,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},...t};return this.props.popup?p.createElement(this.props.popup,{...r},this.renderTimeSelector()):p.createElement(d.Popup,{...r},this.renderTimeSelector())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(ve,Ce[me]),onCancel:this.handleValueReject,applyText:this.localizationService.toLanguageString(pe,Ce[pe]),onApply:e=>this.handleValueChange(e)}};return p.createElement(Nt,{...t},p.createElement(h.ActionSheetContent,null,this.renderTimeSelector()))},this.setTimeSelectorRef=e=>{this._timeSelector=e},this.nextValue=(e,t)=>void 0!==e.value?e.value:t.value,this.nextShow=(e,t)=>void 0!==e.show?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:s.cloneDate(e.value||this.state.candidate)}),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.mobileMode||(this.shouldFocusDateInput=!0);const{onChange:t}=this.props,i=this.state.candidate||this.value;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.handleClick=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===n.Keys.esc)return this.shouldFocusDateInput=!0,void this.setShow(!1);t&&(i===n.Keys.up||i===n.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===n.Keys.up,this.setShow(i===n.Keys.down))},this.showLicenseWatermark=!n.validatePackage(Ft,{component:"TimePicker"}),this.licenseMessage=n.getLicenseMessage(Ft),this.state={value:this.props.defaultValue||e.defaultProps.defaultValue,show:this.props.defaultShow||e.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(n.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 e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value;return null!==e?s.cloneDate(e):null}get show(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.props.show?this.props.show:this.state.show}get name(){return this.props.name}get validity(){const e=this.value&&this.normalizeTime(this.value),t=this.normalizeTime(this.min),i=this.normalizeTime(this.max),n=Dt(e,t,i),s=void 0!==this.props.validationMessage,a=(!this.required||null!==this.value)&&n,r=void 0!==this.props.valid?this.props.valid:a;return{customError:s,rangeOverflow:Ct(e,i),rangeUnderflow:St(e,t),valid:r,valueMissing:null===this.value}}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required&&this.props.required}get popupSettings(){return this.props.popupSettings||e.defaultProps.popupSettings}get min(){return void 0!==this.props.min?this.props.min:e.defaultProps.min}get max(){return void 0!==this.props.max?this.props.max:e.defaultProps.max}get dateInputComp(){return this.props.dateInput||e.defaultProps.dateInput}get localizationService(){return a.provideLocalizationService(this)}componentDidMount(){var e;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body);const t=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._element,{fieldName:t,onValueChange:e=>{this.handleKendoPasteValue(e)}})}componentDidUpdate(){this._timeSelector&&this.show&&!this.prevShow&&this._timeSelector.focusActiveList(),this.mobileMode&&this.show&&!this.prevShow&&setTimeout(()=>{this._timeSelector&&this._timeSelector.focusActiveList()},300),this.dateInput&&this.dateInput.element&&!this.show&&this.shouldFocusDateInput&&this.dateInput.element.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var e,t;null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect(),null==(t=this.KendoPasteSubscription)||t.unsubscribe()}render(){const{size:t=e.defaultProps.size,rounded:i=e.defaultProps.rounded,fillMode:s=e.defaultProps.fillMode,disabled:a,tabIndex:l,title:u,id:c,className:d,format:h,formatPlaceholder:m,width:g,name:v,steps:f,validationMessage:w,required:b,validityStyles:y,ariaLabelledBy:D,ariaDescribedBy:S,unstyled:C,enableMouseWheel:k,autoCorrectParts:x,autoSwitchParts:I,autoSwitchKeys:M,allowCaretMode:E,inputAttributes:T}=this.props,O=C&&C.uTimePicker,N=!this.validityStyles||this.validity.valid,R={disabled:a,format:h,formatPlaceholder:m,id:c,ariaLabelledBy:D,ariaDescribedBy:S,max:this.normalizeTime(this.max),min:this.normalizeTime(this.min),name:v,onChange:this.handleInputValueChange,required:b,steps:f,tabIndex:this.show?-1:l,title:u,valid:this.validity.valid,validationMessage:w,validityStyles:y,value:this.value&&this.normalizeTime(this.value),label:void 0,placeholder:this.state.focused?null:this.props.placeholder,ariaHasPopup:"dialog",ariaExpanded:this.show,enableMouseWheel:k,autoCorrectParts:x,autoSwitchParts:I,autoSwitchKeys:M,allowCaretMode:E,inputAttributes:T},V=this.localizationService.toLanguageString(ve,Ce[ve]),P=this.localizationService.toLanguageString(ge,Ce[ge]),F=p.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.mobileMode?void 0:this.handleBlur,onSyncBlur:this.props.onBlur,onSyncFocus:this.props.onFocus},({onFocus:e,onBlur:l})=>p.createElement(p.Fragment,null,p.createElement("span",{ref:e=>{this._element=e},className:n.classNames(n.uTimePicker.wrapper({c:O,size:t,rounded:i,fillMode:s,invalid:!N,required:this.required,disabled:a}),d),onKeyDown:this.handleKeyDown,style:{width:g},onFocus:this.mobileMode?this.handleClick:e,onBlur:l,onClick:this.mobileMode?this.handleClick:void 0},p.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0,...R}),p.createElement(r.Button,{tabIndex:-1,type:"button",icon:"clock",svgIcon:o.clockIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:P,className:n.classNames(n.uTimePicker.inputButton({c:O})),fillMode:s,"aria-label":V}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&p.createElement(n.WatermarkOverlay,{message:this.licenseMessage})));return this.props.label?p.createElement(Ot,{dateInput:this._dateInput,label:this.props.label,editorId:c,editorValid:N,editorDisabled:this.props.disabled,children:F,style:{width:this.props.width}}):F}normalizeTime(e){return L(N,e)}setShow(e){const{onOpen:t,onClose:i}=this.props;this.show!==e&&(this.setState({show:e}),e&&t&&t.call(void 0,{target:this}),!e&&i&&i.call(void 0,{target:this}))}mergeTime(e){return this.value&&e?L(this.value,e):e}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};gi.displayName="TimePicker",gi.propTypes={className:i.string,cancelButton:i.bool,nowButton:i.bool,defaultShow:i.bool,defaultValue:i.instanceOf(Date),disabled:i.bool,format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),formatPlaceholder:i.oneOfType([i.oneOf(["wide","narrow","short","formatPattern"]),i.shape({year:i.string,month:i.string,day:i.string,hour:i.string,minute:i.string,second:i.string})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,min:i.instanceOf(Date),max:i.instanceOf(Date),name:i.string,popupSettings:i.shape({animate:i.bool,appendTo:i.any,popupClass:i.string}),show:i.bool,steps:i.shape({hour:i.number,minute:i.number,second:i.number}),smoothScroll:i.bool,tabIndex:i.number,title:i.string,value:i.instanceOf(Date),width:i.oneOfType([i.number,i.string]),validationMessage:i.string,required:i.bool,validate:i.bool,valid:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),inputAttributes:i.object},gi.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"t",max:F,min:P,popupSettings:{},tabIndex:0,steps:{},validityStyles:!0,dateInput:It,size:void 0,rounded:void 0,fillMode:void 0};let vi=gi;const fi=n.createPropsContext(),wi=n.withIdHOC(n.withPropsContext(fi,n.withUnstyledHOC(n.withAdaptiveModeContext(vi))));wi.displayName="KendoReactTimePicker",a.registerForLocalization(vi);const bi={showWeekNumbers:!1,views:2,take:2,allowReverse:!0,weekDaysFormat:"short",min:R,max:V},yi=p.forwardRef((e,t)=>{const{showWeekNumbers:i=bi.showWeekNumbers,allowReverse:a=bi.allowReverse,weekDaysFormat:r=bi.weekDaysFormat,min:o=bi.min,max:l=bi.max,activeView:u,bus:c,cellUID:d,focusedDate:h,onChange:m,onWeekSelect:g,selectionRange:v,service:f,value:w,onCellEnter:b,cell:y,weekCell:D,showOtherMonthDays:S,dates:C,verticalView:k}=e,x=!(!i||u!==M.month),I=()=>{if(!R.current)return;const e=R.current.querySelector("td.k-focus"),t=R.current.querySelector(".k-state-pending-focus");e&&e[0]&&e[0].classList.remove("k-focus"),t&&t.classList.add("k-focus"),V.current=!0},E=()=>{if(!R.current)return;const e=R.current.querySelector("td.k-focus");e&&e.classList.remove("k-focus"),V.current=!1},T=(e,t,i)=>{g&&i&&g(e,t,i)},O=(e,t=!1)=>{if(m){const i={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:s.cloneDate(e.value),target:N.current,isTodayClick:t};m(i)}},N=p.useRef(null);p.useImperativeHandle(N,()=>({element:R.current,focusActiveDate:I,blurActiveDate:E})),p.useImperativeHandle(t,()=>N.current);const R=p.useRef(null),V=p.useRef(!1);p.useEffect(()=>{V.current&&I()});const P=a?(e=>{if(null===e.start||null===e.end)return e;const t=e.end<e.start;return{start:t?e.end:e.start,end:t?e.start:e.end}})(v):v,F=n.classNames("k-calendar-view k-align-items-start k-justify-content-center",{"k-vstack":k,"k-hstack":!k,"k-calendar-monthview":u===M.month,"k-calendar-yearview":u===M.year,"k-calendar-decadeview":u===M.decade,"k-calendar-centuryview":u===M.century});return p.createElement("div",{ref:R,className:F},C.map(e=>p.createElement("table",{className:"k-calendar-table",key:e.getTime(),role:"grid"},p.createElement(Z,{bus:c,weekDaysFormat:r,service:f,key:e.getTime(),direction:"horizontal",activeView:u,cellUID:d,viewDate:e,min:o,max:l,focusedDate:h,selectionRange:P,selectedDate:w,showWeekNumbers:x,onChange:O,onWeekSelect:T,onCellEnter:b,cell:y,weekCell:D,showOtherMonthDays:S,allowReverse:a}))))});yi.displayName="KendoReactHorizontalViewList";const Di=yi;Di.defaultProps=bi;const Si=(e,t=Ii.min,i=Ii.max)=>e instanceof Date&&!Array.isArray(e)&&A(s.getDate(e),t,i)?s.getDate(e):null,Ci=(e,t=Ii.min,i=Ii.max)=>Array.isArray(e)?e.filter(e=>A(e,t,i)).map(e=>s.getDate(e)):null,ki=e=>"object"!=typeof e||e instanceof Date||null===e||Array.isArray(e)?E:e,xi=(e,t,i)=>e||t&&t[0]||i&&i.start,Ii={disabled:!1,min:R,max:V,defaultActiveView:"month",defaultValue:null,topView:"century",weekDaysFormat:"short",tabIndex:0,bottomView:"month",views:2,allowReverse:!1,showOtherMonthDays:!1},Mi=n.createPropsContext(),Ei=p.forwardRef((e,t)=>{var i;const l=p.useMemo(()=>!n.validatePackage(Ft,{component:"MultiViewCalendar"}),[]),u=p.useMemo(()=>n.getLicenseMessage(Ft),[]),c=n.usePropsContext(Mi,e),d=n.useId(c.id),{disabled:h=Ii.disabled,min:m=Ii.min,max:g=Ii.max,defaultActiveView:v=Ii.defaultActiveView,defaultValue:f=Ii.defaultValue,topView:w=Ii.topView,bottomView:b=Ii.bottomView,weekDaysFormat:y=Ii.weekDaysFormat,tabIndex:D=Ii.tabIndex,views:S=Ii.views,allowReverse:C=Ii.allowReverse,showOtherMonthDays:k=Ii.showOtherMonthDays,_ref:x,className:I,weekNumber:E,mobileMode:T,focusedDate:N,value:R,onChange:V,onFocus:P,onBlur:F,cell:L,weekCell:H,headerTitle:_,mode:z,activeRangeEnd:K,ariaLabelledBy:W,ariaDescribedBy:Y,dir:U}=c,$=s.getDate(m),j=s.getDate(g),Z=M[b],J=M[w],G="rtl"===U,te=d+"-cell-uid",ie=d+"-wrapper-id",ne=e=>{if(!ke.current)return!1;const t=s.cloneDate(He),i=ke.current.move(t,e);return $<=i&&i<=j||ke.current.isInSameView(i,$)||ke.current.isInSameView(i,j)},se=(e,t)=>!!t&&s.firstDayOfMonth(t)<=e&&e<=s.lastDayOfMonth(t),ae=(e,t)=>{we.current=!1;const i=re(e,t);Ee({navigateDate:i,focusedDate:i})},re=(e,t)=>oe(ke.current.move(t,e)),oe=e=>q(e,$,j),le=()=>{const e=Ve.PrevView,t=s.cloneDate(He);if(Ie.activeView>0&&t.getFullYear()>Se.current[0].getFullYear())ae(e,re(e,t));else{const i=se(t,Se.current[1])?re(e,t):t;ae(e,i)}},ue=()=>{ae(Ve.NextView,s.cloneDate(He))},ce=e=>{const t=s.cloneDate(e.value),i=pe.current.canMoveDown(Ie.activeView);if(h)return;if(i){if(!e.isTodayClick)return pe.current.moveDown(Ie.activeView,e.syntheticEvent),void Ee({focusedDate:t,navigateDate:t});pe.current.moveToBottom(Ie.activeView)}let n;we.current=!0;const a=Ci(Pe,$,j),r=Si(Pe,$,j),o=ki(Pe),l=void 0!==K?K:be.current;switch(z){case"single":default:n=s.cloneDate(e.value);break;case"multiple":if(Array.isArray(a)){const t=a.slice();let i=-1;t.forEach((t,n)=>{s.isEqualDate(t,e.value)&&(i=n)}),-1!==i?t.splice(i,1):t.push(s.cloneDate(e.value)),n=t.slice()}else n=r?[s.cloneDate(r),s.cloneDate(e.value)]:[s.cloneDate(e.value)];break;case"range":n=null!==o.start&&null!==o.end&&"start"===l?(e=>({start:e,end:null}))(e.value):((e,t)=>{const{end:i,start:n}=t,s=void 0!==K?K:be.current,a=null!==t.start&&e.getTime()<=t.start.getTime(),r=ki(Pe),o=Si(Pe,$,j);return!C&&a?{start:e,end:r.start}:"end"!==s?{start:e,end:i}:{start:n||o,end:e}})(e.value,o),be.current="end"!==l?"end":"start"}if(ve.current=n,e.isTodayClick&&Ee({navigateDate:t}),Ee({value:n,focusedDate:t}),ve.current=n,V){const t={syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,value:n,target:de.current};V(t)}ve.current=void 0},de=p.useRef(null);p.useImperativeHandle(de,()=>({get element(){return he.current},get focusedDate(){return s.cloneDate(He)},get value(){return Pe},get props(){return c},focus:()=>{var e;return null==(e=he.current)?void 0:e.focus()}})),p.useImperativeHandle(t,()=>de.current);const he=p.useRef(null),me=p.useRef(null),pe=p.useRef(new $e(({view:e})=>{we.current=!1,Me(t=>({...t,activeView:e,navigateDate:t.focusedDate}))})),ge=p.useRef(new Je(pe.current)),ve=p.useRef(void 0),fe=p.useRef(!1),we=p.useRef(!1),be=p.useRef("start"),ye=p.useRef(O(M[v],Z,J)),De=p.useRef(S),Se=p.useRef([]),ke=p.useRef(null),[Ie,Me]=p.useState(()=>{const e=void 0!==R?R:f,t=Si(e,$,j),i=Ci(e,$,j),n=ki(e),s=xi(t,i,n),a=O(M[v],Z,J),r=q(N||s||B(),$,j);return be.current=((e,t)=>null===e.start&&null===t?"start":null===e.end?"end":"start")(n,t),ye.current=a,De.current=S,{value:e,activeView:a,focusedDate:r,navigateDate:r}}),Ee=e=>{Me(t=>({...t,...e}))};p.useEffect(()=>{we.current=!0},[]),p.useEffect(()=>{me.current&&(fe.current?me.current.focusActiveDate:me.current.blurActiveDate)();const e=Si(Pe,$,j),t=Si(Pe,$,j);we.current=!!(t&&e&&t.getTime()&&e.getTime()),ye.current=Ie.activeView,De.current=S}),p.useEffect(()=>{x&&x({element:he.current})});const Te=a.useInternationalization(),Oe=a.useLocalization();pe.current.configure(Z,J);const Ne=O(Ie.activeView,Z,J),Re=pe.current.service(Ne,Te);let Pe;ke.current=Re,Pe=void 0!==ve.current?ve.current:void 0!==R?R:Ie.value;const Fe=Si(Pe,$,j),Le=Ci(Pe,$,j),Be=ki(Pe),Ae=xi(Fe,Le,Be),He=q(we.current&&null!==Ae?Ae:Ie.focusedDate,$,j),_e=A(B(),s.getDate($),s.getDate(j)),ze=n.classNames("k-calendar k-calendar-range",{"k-disabled":h},I),Ke=((e,t)=>({start:e.start,end:null===e.end&&null!==e.start&&fe.current?t:e.end}))(Be,He),qe=Oe.toLanguageString(Q,Ce[Q]),We=Oe.toLanguageString(ee,Ce[ee]),Ye=!ne(Ve.PrevView),Ue=!ne(Ve.NextView),je={"aria-disabled":Ye},Ze={"aria-disabled":Ue},Ge=ye.current!==Ne,Xe=Se.current.length>0&&se(Ie.navigateDate,Se.current[0]),Qe=De.current!==S;(!Xe||Ge||Qe)&&(Se.current=Re.datesList(Ie.navigateDate,S));const et=s.cloneDate(null!=(i=Se.current)&&i[0]?Se.current[0]:B());return p.createElement("div",{ref:he,className:ze,id:c.id||ie,"aria-labelledby":W,"aria-describedby":Y,tabIndex:h?void 0:D,onFocus:e=>{fe.current=!0,me.current&&(me.current.focusActiveDate(),P&&P(e))},onBlur:e=>{fe.current=!1,me.current&&(me.current.blurActiveDate(),F&&F(e))},onMouseDown:e=>{e.preventDefault()},onClick:e=>{he.current&&he.current.focus({preventScroll:!0})},onKeyDown:e=>{const{keyCode:t,ctrlKey:i,metaKey:a}=e;if(84===t){const e=B();we.current=!1,Ee({focusedDate:e,navigateDate:e})}if((i||a)&&(t===n.Keys.left&&le(),t===n.Keys.right&&ue()),t===n.Keys.enter){const t={syntheticEvent:e,nativeEvent:e.nativeEvent,value:s.cloneDate(He),target:de.current};ce(t)}else{const t=q(ge.current.move(He,ge.current.action(e),Ie.activeView,ke.current,e),$,j);if(s.isEqualDate(He,t))return;Se.current&&ke.current&&!ke.current.isInArray(t,Se.current)&&Ee({navigateDate:t}),we.current=!1,Ee({focusedDate:t})}e.preventDefault()},"aria-disabled":h,dir:U},p.createElement(X,{key:`.kendo.calendar.header.${et.getTime()}`,activeView:Ne,currentDate:et,min:$,max:j,rangeLength:S,bus:pe.current,service:Re,headerTitle:_,verticalView:T,commands:p.createElement(p.Fragment,null,p.createElement(r.Button,{type:"button",className:"k-calendar-nav-prev",icon:G?"chevron-right":"chevron-left",svgIcon:G?o.chevronRightIcon:o.chevronLeftIcon,fillMode:"flat",title:qe,disabled:Ye,onClick:le,...je}),p.createElement(xe,{min:$,max:j,onClick:e=>{_e&&ce(e)},disabled:!_e}),p.createElement(r.Button,{type:"button",className:"k-calendar-nav-next",icon:G?"chevron-left":"chevron-right",svgIcon:G?o.chevronLeftIcon:o.chevronRightIcon,fillMode:"flat",title:We,disabled:Ue,onClick:ue,...Ze}))}),p.createElement(Di,{ref:me,dates:Se.current,activeView:Ne,focusedDate:s.cloneDate(He),weekDaysFormat:y,min:$,max:j,bus:pe.current,service:Re,selectionRange:Ke,value:Le||Fe,cellUID:te,views:S,onChange:ce,onWeekSelect:(e,t,i)=>{if("single"===z)return;const n=0===t?e:s.addDays(e,-t),a=6===t?e:s.addDays(e,6-t);let r=null;if("multiple"===z){r=[];for(let e=0;e<=6;e++)r.push(s.addDays(n,e));Ee({value:r,focusedDate:e})}if("range"===z&&(r={start:n,end:a},Ee({value:r,focusedDate:e})),V){const e={syntheticEvent:i,nativeEvent:i.nativeEvent,value:r,target:de.current};V(e)}},showWeekNumbers:E,onCellEnter:e=>{"range"===z&&(we.current=!1,Ee({focusedDate:e}))},cell:L,weekCell:H,headerTitle:_,verticalView:T,showOtherMonthDays:k,allowReverse:C}),l&&p.createElement(n.WatermarkOverlay,{message:u}))});Ei.propTypes={activeRangeEnd:i.oneOf(["start","end"]),allowReverse:i.bool,bottomView:i.oneOf(["month","year","decade","century"]),className:i.string,defaultActiveView:i.oneOf(["month","year","decade","century"]),defaultValue:i.oneOfType([T(i.instanceOf(Date)),i.arrayOf(i.instanceOf(Date)),i.shape({start:T(i.instanceOf(Date)),end:T(i.instanceOf(Date))})]),disabled:i.bool,focusedDate:i.instanceOf(Date),id:i.string,weekDaysFormat:i.oneOf(["narrow","short","abbreviated"]),ariaLabelledBy:i.string,ariaDescribedBy:i.string,max:i.instanceOf(Date),min:i.instanceOf(Date),mode:i.oneOf(["single","multiple","range"]),onBlur:i.func,onChange:i.func,onFocus:i.func,tabIndex:i.number,topView:i.oneOf(["month","year","decade","century"]),value:i.oneOfType([T(i.instanceOf(Date)),i.arrayOf(i.instanceOf(Date)),i.shape({start:T(i.instanceOf(Date).isRequired),end:T(i.instanceOf(Date).isRequired)})]),views:(e,t,i)=>{const n=e[t];return void 0!==n&&n<1?new Error(`Invalid prop '${t}' supplied to'${i}'. The '${t}' property cannot be less than 1'`):null},weekNumber:i.bool,showOtherMonthDays:i.bool,dir:i.string},Ei.displayName="KendoReactMultiViewCalendar";const Ti=Ei,Oi=Ei,Ni=class e extends p.Component{constructor(t){super(t),this._element=null,this._calendar=null,this._startDateInput=p.createRef(),this._endDateInput=p.createRef(),this.shouldFocusDateInput=!1,this.shouldFocusCalendar=!1,this.showLicenseWatermark=!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)=>(void 0!==e.value?e.value:t.value)||E,this.calculateShow=(e,t)=>void 0!==e.show?e.show:t.show,this.renderCalendar=()=>{const e=this.value||E,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?p.createElement(this.props.calendar,{...t}):p.createElement(Oi,{...t,ref:this.setCalendarRef})},this.renderPopup=()=>{const e={popupClass:n.classNames("k-calendar-container","k-daterangepicker-popup"),animate:null!==this._element,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?p.createElement(this.props.popup,{...e},this.renderCalendar()):p.createElement(d.Popup,{...e},this.renderCalendar())},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t={expand:this.show,onClose:e=>this.handleCancel(e),title:this.props.adaptiveTitle,subTitle:this.props.adaptiveSubtitle,windowWidth:e,footer:{cancelText:this.localizationService.toLanguageString(De,Ce[De]),onCancel:this.handleCancel,applyText:this.localizationService.toLanguageString(Se,Ce[Se]),onApply:this.handleBlur}};return p.createElement(Nt,{...t},p.createElement(h.ActionSheetContent,null,p.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:E})});const{onCancel:t}=this.props;t&&t.call(void 0,e)},this.handleEndChange=e=>{const t={start:this.value.start,end:s.cloneDate(e.value||void 0)};this.handleChange(t,e)},this.handleStartChange=e=>{const t={start:s.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||E;const t=Array.isArray(e.value)?e.value[0]:e.value;return{start:null!==this.value.end?t:this.value.start,end:null!==this.value.start?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===n.Keys.esc?(e.preventDefault(),this.shouldFocusDateInput=!0,this.setShow(!1)):i&&t===n.Keys.down?(e.preventDefault(),this.shouldFocusCalendar=!0,this.setShow(!0),this.focusCalendarElement()):i&&t===n.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 e={syntheticEvent:t.syntheticEvent,nativeEvent:t.nativeEvent,value:this.value,show:this.show,target:this};i.call(void 0,e)}this.valueDuringOnChange=void 0},this.showLicenseWatermark=!n.validatePackage(Ft,{component:"DateRangePicker"}),this.licenseMessage=n.getLicenseMessage(Ft),this.state={show:this.props.show||this.props.defaultShow||e.defaultProps.defaultShow,value:this.props.value||this.props.defaultValue||e.defaultProps.defaultValue,currentValue:E},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(void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value)||E}get show(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.props.show?this.props.show:this.state.show}get min(){return void 0!==this.props.min?this.props.min:e.defaultProps.min}get max(){return void 0!==this.props.max?this.props.max:e.defaultProps.max}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get localizationService(){return a.provideLocalizationService(this)}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}componentDidMount(){var e;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body)}componentDidUpdate(){this.shouldFocusCalendar&&this.focusCalendarElement(),this.mobileMode&&this.show&&setTimeout(()=>{this.focusCalendarElement()},300),this.shouldFocusDateInput&&this.focusDateInputElement(),this.shouldFocusCalendar=!1,this.shouldFocusDateInput=!1}componentWillUnmount(){var e;clearTimeout(this.nextTickId),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect()}render(){const{autoFocus:e}=this.props,t=this.value||E,i=this.mobileMode&&this.show?this.state.currentValue:t,s=(this.props.startDateInputSettings||{}).id||this._startInputId,l=(this.props.endDateInputSettings||{}).id||this._endInputId,u=n.classNames("k-daterangepicker",{"k-disabled":this.props.disabled},this.props.className),c=this.localizationService.toLanguageString(oe,Ce[oe]),d=this.localizationService.toLanguageString(le,Ce[le]),h=this.localizationService.toLanguageString(ue,Ce[ue]),m={disableSelection:this.mobileMode&&!0,label:c,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,clearButton:this.props.clearButton,...this.props.startDateInputSettings,value:i.start,onChange:this.handleStartChange,inputAttributes:this.props.inputAttributes},g={disableSelection:this.mobileMode&&!0,label:d,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,clearButton:this.props.clearButton,...this.props.endDateInputSettings,value:i.end,onChange:this.handleEndChange,inputAttributes:this.props.inputAttributes},v=p.createElement(r.Button,{type:"button",className:"k-select",fillMode:"flat",title:a.provideLocalizationService(this).toLanguageString(re,Ce[re]),onMouseDown:this.handleReverseMouseDown,onClick:this.handleReverseClick,"aria-controls":s+" "+l,"aria-label":a.provideLocalizationService(this).toLanguageString(re,Ce[re])},p.createElement(n.IconWrap,{style:{transform:"rotate(90deg)"},name:"arrows-swap",icon:o.arrowsSwapIcon}));return p.createElement(p.Fragment,null,p.createElement("span",{ref:e=>{this._element=e},className:u,style:this.props.style,id:this.props.id,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:this.props.tabIndex,onFocus:this.mobileMode?this.handleClick:this.handleFocus,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onBlur:this.mobileMode?void 0:this.handleBlur,dir:this.props.dir},this.props.startDateInput?p.createElement(this.props.startDateInput,{...m}):p.createElement(It,{...m,autoFocus:e,ref:this._startDateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0}),(this.props.allowReverse||this.props.calendarSettings&&this.props.calendarSettings.allowReverse)&&this.props.swapButton?v:h,this.props.endDateInput?p.createElement(this.props.endDateInput,{...g}):p.createElement(It,{...g,ref:this._endDateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0}),!this.mobileMode&&this.renderPopup()),this.mobileMode&&this.renderAdaptivePopup(),this.showLicenseWatermark&&p.createElement(n.WatermarkOverlay,{message:this.licenseMessage}))}focusDateInputElement(){if(!(document&&this.startDateInput&&this.startDateInput.element&&this.endDateInput&&this.endDateInput.element))return;const e=n.getActiveElement(document);null!==this.value.start&&null===this.value.end||e===this.endDateInput.element?e!==this.startDateInput.element&&this.endDateInput.element.focus({preventScroll:!0}):this.startDateInput.element.focus({preventScroll:!0})}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}setShow(e){const{onOpen:t,onClose:i}=this.props;this.show!==e&&(this.setState({show:e}),e&&t&&t.call(void 0,{target:this}),!e&&i&&i.call(void 0,{target:this}))}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};Ni.displayName="DateRangePicker",Ni.propTypes={allowReverse:i.bool,calendarSettings:i.any,className:i.string,defaultShow:i.bool,defaultValue:i.shape({start:T(i.instanceOf(Date).isRequired),end:T(i.instanceOf(Date).isRequired)}),disabled:i.bool,endDateInputSettings:i.shape(It.propTypes),focusedDate:i.instanceOf(Date),format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,max:i.instanceOf(Date),min:i.instanceOf(Date),onBlur:i.func,onChange:i.func,onFocus:i.func,popupSettings:i.any,show:i.bool,startDateInputSettings:i.any,style:i.any,swapButton:i.any,tabIndex:i.number,dir:i.string,value:i.shape({start:T(i.instanceOf(Date)),end:T(i.instanceOf(Date))}),autoFocus:i.bool,inputAttributes:i.object},Ni.defaultProps={allowReverse:!1,defaultShow:!1,defaultValue:E,disabled:!1,format:"d",max:V,min:R,swapButton:!1,autoFocus:!1};let Ri=Ni;const Vi=n.createPropsContext(),Pi=n.withIdHOC(n.withPropsContext(Vi,n.withAdaptiveModeContext(Ri)));Pi.displayName="KendoReactDateRangePicker",a.registerForLocalization(Ri);const Fi=class extends p.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=e=>{Promise.resolve().then(()=>{"time"===this.state.tab&&this._timePart&&this._timePart.focus(e);const t=this.calendarElement();"date"===this.state.tab&&t&&t.focus(e)})},this.calendarElement=()=>this._calendar&&this._calendar.element||this._calendarWrap&&this._calendarWrap.querySelector(".k-calendar"),this.move=e=>{if("right"===e&&"time"===this.state.tab||"left"===e&&"date"===this.state.tab)return;const t="left"===e?"date":"time";this.shouldFocusPart=!0,this.setState({tab:t})},this.dateTimeFooter=()=>{const{cancelButton:e,unstyled:t}=this.props,i=t&&t.uDateTimePicker,s=this.localizationService.toLanguageString(be,Ce[be]),a=this.localizationService.toLanguageString(ye,Ce[ye]);return p.createElement("div",{className:n.classNames(n.uDateTimePicker.timeFooter({c:i}))},p.createElement(r.Button,{type:"button",themeColor:"primary",ref:e=>{this._acceptButton=e},className:n.classNames(n.uTime.accept({c:i})),disabled:!this.hasDateValue,onClick:this.handleAccept,onKeyDown:this.handleSetKeyDown,title:a,"aria-label":a},a),e&&p.createElement(r.Button,{type:"button",ref:e=>{this._cancelButton=e},className:n.classNames(n.uTime.cancel({c:i})),onClick:this.handleReject,onKeyDown:this.handleCancelKeyDown,title:s,"aria-label":s},s))},this.handleReject=e=>{this.setState({dateValue:this.props.value,timeValue:this.props.value||N});const t=this.mergeDate(this.props.value,this.props.value||N);if(this.props.onReject){const i={nativeEvent:e.nativeEvent,syntheticEvent:e,target:this,value:t};this.props.onReject.call(void 0,i)}},this.handleAccept=(e,t)=>{if(!this.state.dateValue||!this.state.timeValue||!this.hasDateValue)return;const i=this.mergeDate(this.state.dateValue,t||this.state.timeValue);this.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:i,target:this})},this.handleNowClick=e=>{this.setState({timeValue:ft()}),this.handleAccept(e,ft())},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:t,altKey:i}=e;if(!this.props.disabled)switch(t){case n.Keys.enter:return void(!this.hasActiveButton()&&this.hasDateValue&&this.handleAccept(e));case n.Keys.left:if(!i)return;return void this.move("left");case n.Keys.right:if(!i)return;return void this.move("right");default:return}},this.handleCancelKeyDown=e=>{var t;const{keyCode:i}=e;i===n.Keys.tab&&null!=(t=this._dateButtonRef)&&t.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleSetKeyDown=e=>{var t;const{keyCode:i}=e;i===n.Keys.tab&&!this.props.cancelButton&&null!=(t=this._dateButtonRef)&&t.element&&(e.preventDefault(),this._dateButtonRef.element.focus())},this.handleDateKeyDown=e=>{var t,i,s;const{keyCode:a,shiftKey:r}=e;r&&a===n.Keys.tab&&(e.stopPropagation(),null!=(t=this._cancelButton)&&t.element?this._cancelButton.element.focus():null==(s=null==(i=this._acceptButton)?void 0:i.element)||s.focus()),a===n.Keys.enter&&(e.stopPropagation(),this.move("left"))},this.handleTimeKeyDown=e=>{const{keyCode:t}=e;t===n.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||N}}get calendar(){return this._calendar}get timePart(){return this._timePart}get hasDateValue(){return null!==this.state.dateValue}get localizationService(){return a.provideLocalizationService(this)}componentDidUpdate(e,t){var i,n;this.shouldFocusPart&&this.focus({preventScroll:!0}),((null==(i=e.value)?void 0:i.getTime())!==(null==(n=this.props.value)?void 0:n.getTime())||this.state.tab!==t.tab&&this.props.value)&&this.setState(t=>({dateValue:e.value&&this.props.value&&s.isEqualDate(e.value,this.props.value)?t.dateValue:this.props.value,timeValue:this.props.value||N})),this.shouldFocusPart=!1}render(){const{disabled:e,min:t,max:i,weekNumber:s,focusedDate:a,format:o,mobileMode:l,footerActions:u,unstyled:c}=this.props,d=c&&c.uDateTimePicker,h=n.classNames(n.uDateTimePicker.wrap({c:d,date:"date"===this.state.tab,time:"time"===this.state.tab,disabled:e})),m=this.localizationService.toLanguageString(fe,Ce[fe]),g=this.localizationService.toLanguageString(we,Ce[we]),v={min:t,max:i,weekNumber:s,focusedDate:a,disabled:e||"date"!==this.state.tab,value:this.state.dateValue,onChange:this.handleCalendarValueChange,navigation:!1,tabIndex:e||"date"!==this.state.tab?-1:void 0,mobileMode:l};return p.createElement("div",{onKeyDown:this.handleKeyDown,className:h,tabIndex:-1},p.createElement("div",{className:n.classNames(n.uDateTimePicker.buttonGroup({c:d}))},p.createElement(r.ButtonGroup,{width:"100%",unstyled:c},p.createElement(r.Button,{ref:e=>{this._dateButtonRef=e},type:"button",selected:"date"===this.state.tab,togglable:!0,size:l?"large":void 0,onClick:this.handleDateClick,onKeyDown:this.handleDateKeyDown},m),p.createElement(r.Button,{type:"button",selected:"time"===this.state.tab,togglable:!0,size:l?"large":void 0,onClick:this.handleTimeClick,onKeyDown:this.handleTimeKeyDown},g))),p.createElement("div",{className:n.classNames(n.uDateTimePicker.selector({c:d}))},p.createElement("div",{className:n.classNames(n.uDateTimePicker.calendarWrap({c:d})),ref:e=>{this._calendarWrap=e}},this.props.calendar?p.createElement(this.props.calendar,{key:this.state.tab,...v}):p.createElement(st,{key:this.state.tab,ref:e=>{this._calendar=e},...v})),p.createElement("div",{className:n.classNames(n.uDateTimePicker.timeWrap({c:d}))},p.createElement("div",{className:n.classNames(n.uDateTimePicker.timeSelector({c:d,mobileMode:l}))},p.createElement(hi,{key:1,onNowClick:this.handleNowClick,disabled:e||"time"!==this.state.tab,ref:e=>{this._timePart=e},min:this.minTime||P,max:this.maxTime||F,steps:this.props.steps,value:this.state.timeValue,format:o,onChange:this.handleTimeListContainerChange,onMount:this.handleTimePartMount,mobileMode:l,unstyled:c})))),u&&this.dateTimeFooter())}get minTime(){return void 0!==this.props.minTime?this.props.minTime:this.normalizeRange(this.props.min,this.state.dateValue)}get maxTime(){return void 0!==this.props.maxTime?this.props.maxTime:this.normalizeRange(this.props.max,this.state.dateValue)}normalizeRange(e,t){return s.isEqualDate(e,t||B())?e:null}hasActiveButton(){if(!this._acceptButton)return!1;const e=n.getActiveElement(document);return this._acceptButton&&e===this._acceptButton.element||this._cancelButton&&e===this._cancelButton.element}mergeTime(e,t){return e&&t?L(t,e):t}mergeDate(e,t){return e?L(e||B(),t):t}};Fi.defaultProps={footerActions:!0};let Li=Fi;a.registerForLocalization(Li);const Bi=class e extends p.Component{constructor(t){super(t),this._element=null,this._dateInput=p.createRef(),this._dateTimeSelector=null,this.shouldFocusDateInput=!1,this.prevShow=!1,this.handleSmartPasteValue=e=>{if(e instanceof Date&&!isNaN(e.getTime()))return void this.applyKendoPasteDate(e);const t=null!=e?String(e):"";if(!t)return;const i=new Date(t);isNaN(i.getTime())||this.applyKendoPasteDate(i)},this.applyKendoPasteDate=e=>{if(!H(e,this.min,this.max))return;const t=new Event("change",{bubbles:!0}),i={target:this._element,currentTarget:this._element,nativeEvent:t};this.handleValueChange({syntheticEvent:i,nativeEvent:t,value:e})},this.focus=()=>{const e=this.dateInputElement();e&&e.focus()},this.renderPicker=()=>{const{disabled:e,minTime:t,maxTime:i,format:n,calendar:s,cancelButton:a,weekNumber:r,focusedDate:o,unstyled:l}=this.props;return p.createElement(Li,{ref:e=>{this._dateTimeSelector=e},cancelButton:a,steps:this.props.steps,value:this.value,onChange:this.handleValueChange,onReject:this.handleReject,disabled:e,weekNumber:r,min:this.min,max:this.max,minTime:t,maxTime:i,focusedDate:o,format:n,calendar:s,mobileMode:this.mobileMode,footerActions:!this.mobileMode,unstyled:l})},this.renderAdaptivePopup=()=>{const{windowWidth:e=0}=this.state,t=a.provideLocalizationService(this).toLanguageString(be,Ce[be]),i=a.provideLocalizationService(this).toLanguageString(ye,Ce[ye]),n={expand:this.show,onClose:this.handleBlur,title:this.props.adaptiveTitle||this.props.label,subTitle:this.props.adaptiveSubtitle,windowWidth:e,footer:{cancelText:t,onCancel:e=>{var t;return null==(t=this._dateTimeSelector)?void 0:t.handleReject(e)},applyText:i,onApply:e=>{var t;return null==(t=this._dateTimeSelector)?void 0:t.handleAccept(e)}}};return p.createElement(Nt,{...n},p.createElement(h.ActionSheetContent,null,this.renderPicker()))},this.handleReject=()=>{this.shouldFocusDateInput=!0,this.setShow(!1)},this.handleValueChange=e=>{this.setState({value:s.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.handleClick=()=>{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===n.Keys.esc)return this.shouldFocusDateInput=!0,void this.setShow(!1);t&&(i===n.Keys.up||i===n.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=i===n.Keys.up,this.setShow(i===n.Keys.down))},this.dateInputElement=()=>this.dateInput&&this.dateInput.element||this.element&&this.element.querySelector(".k-dateinput > input.k-input-inner"),this.state={value:this.props.defaultValue||e.defaultProps.defaultValue,show:this.props.defaultShow||e.defaultProps.defaultShow,focused:!1}}get _popupId(){return this.props.id+"-popup-id"}get document(){if(n.canUseDOM)return this.element&&this.element.ownerDocument||document}get element(){return this._element}get dateInput(){return this._dateInput.current}get value(){const e=void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value;return null!==e?s.cloneDate(e):null}get show(){return void 0!==this.showDuringOnChange?this.showDuringOnChange:void 0!==this.props.show?this.props.show:this.state.show}get name(){return this.props.name}get mobileMode(){var e;return!!(this.state.windowWidth&&this.props._adaptiveMode&&this.state.windowWidth<=(null==(e=this.props._adaptiveMode)?void 0:e.medium)&&this.props.adaptive)}get min(){return void 0!==this.props.min?this.props.min:e.defaultProps.min}get max(){return void 0!==this.props.max?this.props.max:e.defaultProps.max}get validity(){const e=H(this.value,this.min,this.max)&&yt(this.value,this.props.minTime||P,this.props.maxTime||F),t=void 0!==this.props.validationMessage,i=(!this.required||null!==this.value)&&e,n=void 0!==this.props.valid?this.props.valid:i;return{customError:t,rangeOverflow:this.value&&this.max.getTime()<this.value.getTime()||!1,rangeUnderflow:this.value&&this.value.getTime()<this.min.getTime()||!1,valid:n,valueMissing:null===this.value}}get validityStyles(){return void 0!==this.props.validityStyles?this.props.validityStyles:e.defaultProps.validityStyles}get required(){return void 0!==this.props.required&&this.props.required}get dateInputComp(){return this.props.dateInput||e.defaultProps.dateInput}componentDidMount(){var e;this.observerResize=n.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(this.calculateMedia.bind(this)),this.show&&this.forceUpdate(),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.observe(this.document.body);const t=this.props.name||this.props.id;this.KendoPasteSubscription=n.subscribeToKendoPaste(this._element,{fieldName:t,onValueChange:e=>{this.handleSmartPasteValue(e)}})}componentDidUpdate(){const e=this.dateInputElement();this._dateTimeSelector&&this.show&&!this.prevShow&&this._dateTimeSelector.focus({preventScroll:!0}),this.mobileMode&&this.show&&!this.prevShow&&setTimeout(()=>{this._dateTimeSelector&&this._dateTimeSelector.focus({preventScroll:!0})},300),e&&!this.show&&this.shouldFocusDateInput&&e.focus({preventScroll:!0}),this.prevShow=this.show,this.shouldFocusDateInput=!1}componentWillUnmount(){var e,t;clearTimeout(this.nextTickId),null!=(e=this.document)&&e.body&&this.observerResize&&this.observerResize.disconnect(),null==(t=this.KendoPasteSubscription)||t.unsubscribe()}render(){const{size:t=e.defaultProps.size,rounded:i=e.defaultProps.rounded,fillMode:s=e.defaultProps.fillMode,autoFocus:l=e.defaultProps.autoFocus,inputAttributes:u,disabled:c,tabIndex:h,title:m,id:g,format:v,formatPlaceholder:f,min:w,max:b,className:y,width:D,name:S,validationMessage:C,required:k,validityStyles:x,minTime:I,maxTime:M,ariaLabelledBy:E,ariaDescribedBy:T,popup:O=d.Popup,unstyled:N,autoFill:R,twoDigitYearMax:V,enableMouseWheel:P,autoCorrectParts:F,autoSwitchParts:L,autoSwitchKeys:B,allowCaretMode:A}=this.props,H=N&&N.uDateTimePicker,_=!this.validityStyles||this.validity.valid,z={id:g,ariaLabelledBy:E,ariaDescribedBy:T,format:v,formatPlaceholder:f,disabled:c,title:m,validityStyles:x,validationMessage:C,required:k,min:w,max:b,minTime:I,maxTime:M,name:S,tabIndex:this.show?-1:h,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,unstyled:N,autoFill:R,twoDigitYearMax:V,enableMouseWheel:P,autoCorrectParts:F,autoSwitchParts:L,autoSwitchKeys:B,allowCaretMode:A},K=p.createElement(n.AsyncFocusBlur,{onFocus:this.handleFocus,onBlur:this.handleBlur,onSyncFocus:this.props.onFocus,onSyncBlur:this.props.onBlur},({onFocus:e,onBlur:d})=>p.createElement(p.Fragment,null,p.createElement("div",{ref:e=>{this._element=e},className:n.classNames(n.uDateTimePicker.wrapper({c:H,size:t,fillMode:s,rounded:i,disabled:c,required:this.required,invalid:!_}),y),onKeyDown:this.handleKeyDown,style:{width:D},onFocus:this.mobileMode?this.handleClick:e,onBlur:d,onClick:this.mobileMode?this.handleClick:void 0},p.createElement(this.dateInputComp,{_ref:this._dateInput,ariaRole:"combobox",ariaControls:this.show?this._popupId:void 0,ariaHasPopup:"dialog",autoFocus:l,inputAttributes:u,...z}),p.createElement(r.Button,{tabIndex:-1,type:"button",icon:"calendar",svgIcon:o.calendarIcon,onMouseDown:this.handleIconMouseDown,onClick:this.mobileMode?void 0:this.handleClick,title:a.provideLocalizationService(this).toLanguageString(ce,Ce[ce]),className:n.classNames(n.uDateTimePicker.inputButton({c:H})),fillMode:s,"aria-label":a.provideLocalizationService(this).toLanguageString(ce,Ce[ce])}),p.createElement(O,{show:this.show,animate:null!==this.element,anchor:this.element,popupClass:n.classNames(n.uDateTimePicker.popup({c:H})),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?p.createElement(Ot,{dateInput:this._dateInput,label:this.props.label,editorId:g,editorValid:_,editorDisabled:this.props.disabled,children:K,style:{width:this.props.width}}):K}setShow(e){const{onOpen:t,onClose:i}=this.props;this.show!==e&&(this.setState({show:e}),e&&t&&t.call(void 0,{target:this}),!e&&i&&i.call(void 0,{target:this}))}nextTick(e){clearTimeout(this.nextTickId),this.nextTickId=window.setTimeout(()=>e())}calculateMedia(e){for(const t of e)this.setState({windowWidth:t.target.clientWidth})}};Bi.displayName="DateTimePicker",Bi.propTypes={className:i.string,defaultShow:i.bool,defaultValue:i.instanceOf(Date),disabled:i.bool,focusedDate:i.instanceOf(Date),format:i.oneOfType([i.string,i.shape({skeleton:i.string,pattern:i.string,date:i.oneOf(["short","medium","long","full"]),time:i.oneOf(["short","medium","long","full"]),datetime:i.oneOf(["short","medium","long","full"]),era:i.oneOf(["narrow","short","long"]),year:i.oneOf(["numeric","2-digit"]),month:i.oneOf(["numeric","2-digit","narrow","short","long"]),day:i.oneOf(["numeric","2-digit"]),weekday:i.oneOf(["narrow","short","long"]),hour:i.oneOf(["numeric","2-digit"]),hour12:i.bool,minute:i.oneOf(["numeric","2-digit"]),second:i.oneOf(["numeric","2-digit"]),timeZoneName:i.oneOf(["short","long"])})]),formatPlaceholder:i.oneOfType([i.oneOf(["wide","narrow","short","formatPattern"]),i.shape({year:i.string,month:i.string,day:i.string,hour:i.string,minute:i.string,second:i.string})]),id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,min:i.instanceOf(Date),max:i.instanceOf(Date),name:i.string,popupSettings:i.shape({animate:i.bool,appendTo:i.any,popupClass:i.string}),show:i.bool,tabIndex:i.number,title:i.string,value:i.instanceOf(Date),weekNumber:i.bool,width:i.oneOfType([i.number,i.string]),validationMessage:i.string,required:i.bool,validate:i.bool,valid:i.bool,cancelButton:i.bool,size:i.oneOf(["small","medium","large"]),rounded:i.oneOf(["small","medium","large","full","none"]),fillMode:i.oneOf(["solid","flat","outline"]),autoFocus:i.bool,inputAttributes:i.object},Bi.defaultProps={defaultShow:!1,defaultValue:null,disabled:!1,format:"g",max:V,min:R,popupSettings:{},tabIndex:0,weekNumber:!1,validityStyles:!0,cancelButton:!0,dateInput:It,size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1};let Ai=Bi;const Hi=n.createPropsContext(),_i=n.withIdHOC(n.withPropsContext(Hi,n.withUnstyledHOC(n.withAdaptiveModeContext(Ai))));_i.displayName="KendoReactDateTimePicker",a.registerForLocalization(Ai),e.Action=Ve,e.BusViewService=$e,e.Calendar=st,e.CalendarCell=x,e.CalendarHeaderTitle=J,e.CalendarNavigationItem=Te,e.CalendarPropsContext=tt,e.CalendarViewEnum=M,e.CalendarWeekCell=I,e.CalendarWithoutContext=nt,e.CenturyViewService=Le,e.DOMService=je,e.DateInput=It,e.DateInputPropsContext=Et,e.DatePicker=Rt,e.DatePickerPropsContext=Pt,e.DateRangePicker=Pi,e.DateRangePickerPropsContext=Vi,e.DateRangePickerWithoutContext=Ri,e.DateTimePicker=_i,e.DateTimePickerPropsContext=Hi,e.DateTimePickerWithoutContext=Ai,e.DayPeriodService=_t,e.DecadeViewService=He,e.EMPTY_SELECTIONRANGE=E,e.Header=X,e.HorizontalViewList=Di,e.HoursService=$t,e.MAX_DATE=V,e.MAX_TIME=F,e.MIN_DATE=R,e.MIN_TIME=P,e.MinutesService=Qt,e.MonthViewService=Ke,e.MultiViewCalendar=Oi,e.MultiViewCalendarPropsContext=Mi,e.MultiViewCalendarWithoutContext=Ti,e.NavigationService=Je,e.ScrollSyncService=Ge,e.SecondsService=ai,e.TimeList=ui,e.TimePart=hi,e.TimePicker=wi,e.TimePickerPropsContext=fi,e.TimePickerWithoutContext=vi,e.TimeSelector=pi,e.TodayCommand=xe,e.ToggleButton=Tt,e.ViewList=Ee,e.Virtualization=k,e.WeekNamesService=U,e.YearViewService=Ye,e.dateInputDefaultProps=Mt,e.dateInputsMessages=Ce,e.datePickerDefaultProps=Vt,e.decreaseValue=ie,e.end=le,e.getNow=ft,e.getToday=B,e.increaseValue=te,e.separator=ue,e.start=oe,e.swapStartEnd=re,e.today=se,e.toggleCalendar=ae,e.toggleDateTimeSelector=ce});
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777917851,version:"14.5.0-develop.2",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"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-dateinputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777967982,version:"14.5.0-develop.3",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"});exports.packageMetadata=e;
@@ -6,8 +6,8 @@ export const packageMetadata = Object.freeze({
6
6
  productName: 'KendoReact',
7
7
  productCode: 'KENDOUIREACT',
8
8
  productCodes: ['KENDOUIREACT'],
9
- publishDate: 1777917851,
10
- version: '14.5.0-develop.2',
9
+ publishDate: 1777967982,
10
+ version: '14.5.0-develop.3',
11
11
  licensingDocsUrl:
12
12
  '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'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-dateinputs",
3
- "version": "14.5.0-develop.2",
3
+ "version": "14.5.0-develop.3",
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",
@@ -28,12 +28,12 @@
28
28
  "@progress/kendo-date-math": "^1.4.0",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
30
  "@progress/kendo-dateinputs-common": "^0.4.7",
31
- "@progress/kendo-react-buttons": "14.5.0-develop.2",
32
- "@progress/kendo-react-common": "14.5.0-develop.2",
33
- "@progress/kendo-react-intl": "14.5.0-develop.2",
34
- "@progress/kendo-react-labels": "14.5.0-develop.2",
35
- "@progress/kendo-react-layout": "14.5.0-develop.2",
36
- "@progress/kendo-react-popup": "14.5.0-develop.2",
31
+ "@progress/kendo-react-buttons": "14.5.0-develop.3",
32
+ "@progress/kendo-react-common": "14.5.0-develop.3",
33
+ "@progress/kendo-react-intl": "14.5.0-develop.3",
34
+ "@progress/kendo-react-labels": "14.5.0-develop.3",
35
+ "@progress/kendo-react-layout": "14.5.0-develop.3",
36
+ "@progress/kendo-react-popup": "14.5.0-develop.3",
37
37
  "@progress/kendo-svg-icons": "^4.0.0",
38
38
  "react": "^18.0.0 || ^19.0.0",
39
39
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -89,7 +89,7 @@
89
89
  "package": {
90
90
  "productName": "KendoReact",
91
91
  "productCode": "KENDOUIREACT",
92
- "publishDate": 1777917851,
92
+ "publishDate": 1777967982,
93
93
  "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"
94
94
  }
95
95
  },