@progress/kendo-react-scheduler 14.5.0-develop.1 → 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-date-math"),require("@progress/kendo-react-common"),require("@progress/kendo-data-query"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-recurrence")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-date-math","@progress/kendo-react-common","@progress/kendo-data-query","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-svg-icons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dropdowns","@progress/kendo-recurrence"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScheduler={},e.React,e.PropTypes,e.KendoDateMath,e.KendoReactCommon,e.KendoDataQuery,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactDateinputs,e.KendoReactPopup,e.KendoSvgIcons,e.ReactDOM,e.KendoReactForm,e.KendoReactDialogs,e.KendoReactLabels,e.KendoReactInputs,e.KendoReactDropdowns,e.KendoRecurrence)}(this,function(e,t,r,a,n,l,o,s,c,i,d,u,m,p,g,E,h,y){"use strict";function v(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var f=v(t),D=v(u);const k=(e,t=0,r=0,a=[])=>{if(e.length<=t)return[a];const n=[];return e[t].data.map(l=>{n.push(...k(e,t+1,r+1,[...a,{...l,field:e[t].field,valueField:e[t].valueField,colorField:e[t].colorField,multiple:e[t].multiple}]))}),n};function S(e,t){const r=[];if(!t||!t.length)return r;if(e&&e.resources&&e.resources.length){const a=e.resources;for(let e=0;e<a.length;e++){const n=t.find(t=>t.name===a[e]);r.push(n)}}return r}const C=(e,t=e.length-1)=>{const r=Math.max(0,t),a=[];e&&e.length||(e=[{}]);const n=(e[r].data||[]).map(t=>({...t,text:t[e[r].textField]}))||[],l=n.length;let o=1;for(let t=0;t<=r;t++)o*=(e[t].data||[]).length||1;for(let e=0;e<o;e++)n[e%l]&&a.push(n[e%l]);return a},b=e=>{if(!e)return{top:0,left:0,width:0,height:0,right:0};return{top:e.offsetTop,left:e.offsetLeft,right:e.offsetParent?e.offsetParent.offsetWidth-(e.offsetLeft+e.offsetWidth):0,width:e.offsetWidth,height:e.offsetHeight}},I=(e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"paddingLeft":"paddingTop"]||"0")+parseFloat(window.getComputedStyle(e)[t?"paddingRight":"paddingBottom"]||"0"),w=(e,t,r=!1)=>{e&&(void 0!==t.top&&(e.style.top=`${t.top}px`),void 0!==t.left&&(e.style.left=`${t.left}px`),void 0!==t.width&&(e.style.width=`${t.width}px`),void 0!==t.height&&!r&&(e.style.height="number"==typeof t.height?`${t.height}px`:t.height),r&&(e.style.minHeight=void 0!==t.height&&t.height>0?`${t.height}px`:""))},T=e=>e[0],R=e=>e[e.length-1],x=e=>{const t=new Set;return e.forEach(e=>{t.add(e.field)}),t.size===e.length};const A=(e,t,r,a=0)=>{if(a===r)return null;let n=null;const l=document.elementFromPoint(e,t);if(!l)return n;if("true"===l.getAttribute("data-slot"))return l;const o=l.style.pointerEvents;return l.style.pointerEvents="none",n=A(e,t,r,a+1),l.style.pointerEvents=o,n},_=(e,t)=>n.getter(t)(e),M=(e,t,r)=>{if(t)return n.setter(t)(e,r)},N=e=>null!=e;function z(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const L=(e,t,r)=>{const a=O(e,t)?_(e,t.id):_(e,t.recurrenceId);return r.find(e=>_(e,t.id)===a)},O=(e,t)=>{const r=_(e,t.id),a=_(e,t.recurrenceId),n=_(e,t.recurrenceRule);return!(!r||!n||null!=a)},F=(e,t)=>Math.max(e.getTime(),t.getTime()),P=(e,t)=>Math.min(e.getTime(),t.getTime()),H=(e,t,r,a,n=!1)=>n?F(t,a)-P(e,r)<=t.getTime()-e.getTime()+(a.getTime()-r.getTime()):F(t,a)-P(e,r)<t.getTime()-e.getTime()+(a.getTime()-r.getTime()),W={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions"},K=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),V=(e,t,r)=>t<r?t<=e&&e<=r:e<=r||t<=e,G=e=>{let t=0;const r=e.slice();return r.sort((e,t)=>e-t).forEach((e,a)=>{r[a]===a&&(t=a+1)}),t},B=(e,t,r=!1)=>{e.forEach(e=>{e.order=null}),t.forEach(e=>e.items.splice(0,e.items.length));const a=[...e].sort((e,t)=>e.start.getTime()-t.start.getTime());t.forEach(e=>{const t=[];a.forEach(a=>{if((r||a.isAllDay===e.isAllDay)&&a.range.index===e.range.index&&(void 0===a.range.isAllDay||void 0===e.range.isAllDay||a.range.isAllDay===e.range.isAllDay)&&a.group.index===e.group.index&&H(a.start,a.end,e.start,e.end)){if(null!==a.order&&void 0!==a.order)t.includes(a.order)||(t.push(a.order),t.sort((e,t)=>e-t));else{const e=G(t);a.order=e,t.push(e),t.sort((e,t)=>e-t)}e.items.push(a)}})})},$=(e,t,r=!1)=>{e.forEach(e=>e.slots.splice(0,e.slots.length)),e.forEach(e=>{t.forEach(t=>{(r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&(void 0===e.range.isAllDay||void 0===t.range.isAllDay||e.range.isAllDay===t.range.isAllDay)&&e.group.index===t.group.index&&H(e.start,e.end,t.start,t.end)&&e.slots.push(t)})})},U=(...e)=>{},Z=(e,t,r=!1,a=!1)=>{const n=e.current;if(!n||!t)return null;const o=t.filter(e=>null!==e.current&&null!==e.current.element),s=l.orderBy(o,[{field:"current.props.group.index",dir:"asc"},{field:"current.props.range.index",dir:"asc"},r?{field:""}:{field:"current.props.isAllDay",dir:"desc"},{field:"current.props.start",dir:"asc"}]),c=s.findIndex(e=>null!==e.current&&!(e.current.props.uid!==n.props.uid||void 0!==e.current.props.occurrenceId&&e.current.props.occurrenceId!==n.props.occurrenceId||e.current.props.group.index!==n.props.group.index||e.current.props.range.index!==n.props.range.index||!r&&e.current.props.isAllDay!==n.props.isAllDay));return s[c+(a?-1:1)]},q=(e,t)=>(e.order||0)-(t.order||0),Y=6e4,j=[{}],X=new Date(1900,0,1),Q=new Date(2099,11,31);a.ZonedDate.fromLocalDate(X),a.ZonedDate.fromLocalDate(Q);var J=(e=>(e[e.create=0]="create",e[e.update=1]="update",e[e.remove=2]="remove",e))(J||{});const ee=f.createContext({current:null}),te=()=>f.useContext(ee);ee.displayName="SchedulerElementContext";const re=f.createContext({}),ae=()=>f.useContext(re);re.displayName="SchedulerPropsContext";const ne=f.createContext([]),le=()=>f.useContext(ne);ne.displayName="SchedulerViewsContext";const oe=f.createContext(W),se=()=>f.useContext(oe);oe.displayName="SchedulerFieldsContext";const ce=f.createContext({dateFormat:"{0:D}",shortDateFormat:"{0:d}"});ce.displayName="SchedulerDateFormatContext";const ie=f.createContext([{index:0,resources:[]}]),de=()=>f.useContext(ie);ie.displayName="SchedulerGroupsContext";const ue=f.createContext({start:new Date,end:new Date,zonedStart:a.ZonedDate.fromLocalDate(new Date),zonedEnd:a.ZonedDate.fromLocalDate(new Date)}),me=()=>f.useContext(ue);ue.displayName="SchedulerDateRangeContext";const pe=f.createContext(null),ge=()=>f.useContext(pe);pe.displayName="SchedulerOrientationContext";const Ee=f.createContext([new Date,U]),he=()=>f.useContext(Ee);Ee.displayName="SchedulerDateContext";const ye=f.createContext([[],U]),ve=()=>f.useContext(ye);ye.displayName="SchedulerDataContext";const fe=f.createContext(["day",U]),De=()=>f.useContext(fe);fe.displayName="SchedulerActiveViewContext";const ke=f.createContext([null,()=>{}]);ke.displayName="SchedulerItemSelectionContext";const Se=({children:e,element:t,props:r,views:a,fields:n,groups:l,dateRange:o,dateFormat:s,orientation:c,date:i,data:d,activeView:u,selection:m})=>f.createElement(ee.Provider,{value:t},f.createElement(re.Provider,{value:r},f.createElement(ne.Provider,{value:a},f.createElement(oe.Provider,{value:n},f.createElement(ce.Provider,{value:s},f.createElement(ie.Provider,{value:l},f.createElement(ue.Provider,{value:o},f.createElement(pe.Provider,{value:c},f.createElement(Ee.Provider,{value:i},f.createElement(ye.Provider,{value:d},f.createElement(fe.Provider,{value:u},f.createElement(ke.Provider,{value:m},e)))))))))))),Ce=(e,t,r)=>{const[a,n]=f.useState(t||e),l=f.useCallback((e,t)=>{n(e),r&&r.call(void 0,{...t,value:e})},[r,n]);return[void 0!==t?t:a,l]},be=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>o.current);const c=f.useMemo(()=>n.classNames("k-scheduler-toolbar",r),[r]);return f.createElement(s.Toolbar,{id:e.id,ref:e=>{e&&(l.current=e.element)},className:c,...a},e.children)});be.displayName="KendoReactSchedulerHeader";const Ie=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames(r),...a},e.children)});Ie.displayName="KendoReactSchedulerSchedulerNavigation";const we=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-views",r),...a},e.children)});we.displayName="KendoReactSchedulerViewSelector";const Te=f.forwardRef((e,t)=>{const{className:r,style:a,...l}=e,o=f.useRef(null),c=f.useRef(null);f.useImperativeHandle(o,()=>({element:c.current,props:e})),f.useImperativeHandle(t,()=>o.current);const i=f.useMemo(()=>n.classNames("k-scheduler-footer",e.className),[e.className]);return f.createElement(s.Toolbar,{ref:e=>{e&&(c.current=e.element)},className:i,style:{boxShadow:"none",...a},...l},e.children)});Te.displayName="KendoReactSchedulerFooter";const Re="scheduler.allEvents",xe="scheduler.allDay",Ae="scheduler.today",_e="scheduler.timelineViewTitle",Me="scheduler.weekViewTitle",Ne="scheduler.workWeekViewTitle",ze="scheduler.agendaViewTitle",Le="scheduler.dayViewTitle",Oe="scheduler.monthViewTitle",Fe="scheduler.deleteTitle",Pe="scheduler.previousTitle",He="scheduler.nextTitle",We="scheduler.showFullDay",Ke="scheduler.showWorkDay",Ve="scheduler.editOccurrence",Ge="scheduler.editSeries",Be="scheduler.editRecurringConfirmation",$e="scheduler.editRecurringDialogTitle",Ue="scheduler.editSave",Ze="scheduler.editCancel",qe="scheduler.editorTitle",Ye="scheduler.editorEventTitle",je="scheduler.editorEventStart",Xe="scheduler.editorEventStartTimeZone",Qe="scheduler.editorEventEnd",Je="scheduler.editorEventEndTimeZone",et="scheduler.editorEventAllDay",tt="scheduler.editorEventDescription",rt="scheduler.editorEventSeparateTimeZones",at="scheduler.editorEventTimeZone",nt="scheduler.recurrenceEditorRepeat",lt="scheduler.recurrenceEditorDailyInterval",ot="scheduler.recurrenceEditorDailyRepeatEvery",st="scheduler.recurrenceEditorWeeklyInterval",ct="scheduler.recurrenceEditorWeeklyRepeatEvery",it="scheduler.recurrenceEditorWeeklyRepeatOn",dt="scheduler.recurrenceEditorMonthlyDay",ut="scheduler.recurrenceEditorMonthlyInterval",mt="scheduler.recurrenceEditorMonthlyRepeatEvery",pt="scheduler.recurrenceEditorMonthlyRepeatOn",gt="scheduler.recurrenceEditorYearlyOf",Et="scheduler.recurrenceEditorYearlyRepeatEvery",ht="scheduler.recurrenceEditorYearlyRepeatOn",yt="scheduler.recurrenceEditorYearlyInterval",vt="scheduler.recurrenceEditorFrequenciesDaily",ft="scheduler.recurrenceEditorFrequenciesMonthly",Dt="scheduler.recurrenceEditorFrequenciesNever",kt="scheduler.recurrenceEditorFrequenciesWeekly",St="scheduler.recurrenceEditorFrequenciesYearly",Ct="scheduler.recurrenceEditorOffsetPositionsFirst",bt="scheduler.recurrenceEditorOffsetPositionsSecond",It="scheduler.recurrenceEditorOffsetPositionsThird",wt="scheduler.recurrenceEditorOffsetPositionsFourth",Tt="scheduler.recurrenceEditorOffsetPositionsLast",Rt="scheduler.recurrenceEditorWeekdaysDay",xt="scheduler.recurrenceEditorWeekdaysWeekday",At="scheduler.recurrenceEditorWeekdaysWeekendday",_t="scheduler.recurrenceEditorEndAfter",Mt="scheduler.recurrenceEditorEndOccurrence",Nt="scheduler.recurrenceEditorEndLabel",zt="scheduler.recurrenceEditorEndNever",Lt="scheduler.recurrenceEditorEndOn",Ot="scheduler.editorDelete",Ft="scheduler.deleteConfirmation",Pt="scheduler.deleteRecurringConfirmation",Ht="scheduler.deleteOccurrence",Wt="scheduler.deleteSeries",Kt="scheduler.deleteDialogTitle",Vt="scheduler.deleteRecurringDialogTitle",Gt="scheduler.dateTitle",Bt="scheduler.timeTitle",$t="scheduler.eventTitle",Ut="scheduler.editorValidationRequired",Zt="scheduler.editorValidationStart",qt="scheduler.editorValidationEnd",Yt="scheduler.noEvents",jt="scheduler.moreEvents",Xt={[Ut]:"Field is required.",[Zt]:"Start time must be before End time.",[qt]:"End time must be after Start time.",[Re]:"All events",[xe]:"all day",[Ae]:"Today",[Le]:"Day",[Oe]:"Month",[Me]:"Week",[Ne]:"Work Week",[_e]:"Timeline",[ze]:"Agenda",[Fe]:"Delete",[Pe]:"Previous",[He]:"Next",[We]:"Show full day",[Ke]:"Show business hours",[Ve]:"Edit current occurrence",[Ge]:"Edit the series",[Be]:"Do you want to edit only this event occurrence or the whole series?",[$e]:"Edit Recurring Item",[Ue]:"Save",[Ze]:"Cancel",[Ot]:"Delete",[qe]:"Event",[Ye]:"Title",[je]:"Start",[Xe]:"Start Time Zone",[Qe]:"End",[Je]:"End Time Zone",[et]:"All Day Event",[tt]:"Description",[rt]:"End in different Time Zone",[at]:"Specify Time Zone",[nt]:"Repeat",[lt]:"day(s)",[ot]:"Repeat every",[st]:"week(s)",[ct]:"Repeat every",[it]:"Repeat on",[dt]:"Day",[ut]:"month(s)",[mt]:"Repeat every",[pt]:"Repeat on",[gt]:"of",[Et]:"Repeat every",[ht]:"Repeat on",[yt]:"year(s)",[vt]:"Daily",[ft]:"Monthly",[Dt]:"Never",[kt]:"Weekly",[St]:"Yearly",[Ct]:"First",[bt]:"Second",[It]:"Third",[wt]:"Fourth",[Tt]:"Last",[Rt]:"Day",[xt]:"Weekday",[At]:"Weekend Day",[_t]:"After",[Mt]:"occurrence(s)",[Nt]:"End",[zt]:"Never",[Lt]:"On",[Ft]:"Are you sure you want to delete this event?",[Pt]:"Do you want to delete only this event occurrence or the whole series?",[Ht]:"Delete current occurrence",[Wt]:"Delete the series",[Kt]:"Delete Event",[Vt]:"Delete Recurring Item",[Gt]:"Date",[Bt]:"Time",[$t]:"Event",[Yt]:"no events",[jt]:"More events"},Qt=f.forwardRef((e,t)=>{var r;const l=f.useRef(null),u=f.useRef(null);f.useImperativeHandle(t,()=>l.current);const{timezone:m}=ae(),p=a.ZonedDate.fromLocalDate(e.value,m),g=a.getDate(p),E=te(),h=n.useWindow(E),[y,v]=f.useState("desktop"),[D,k]=f.useState(!1),[S,C]=f.useState(!1),b=o.useInternationalization(),{dateFormat:I,shortDateFormat:w}=f.useContext(ce),T=me(),[R]=he(),x=T.end.getTime()-T.start.getTime()>27*a.MS_PER_DAY,A=b.format(I,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),_=b.format(w,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),M=f.useCallback(()=>{k(!D)},[D]),N=f.useCallback(()=>{C(!0)},[]),L=f.useCallback(()=>{k(!1),C(!1)},[]),O=f.useCallback(t=>{if(e.onChange){const r=a.ZonedDate.fromUTCDate(z(t.value),m);e.onChange.call(void 0,{...t,value:r})}k(!1)},[e.onChange,m]),F=f.useCallback(()=>{h().matchMedia&&v(h().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")},[h]);f.useEffect(()=>{F();const e=h().ResizeObserver,t=e&&new e(F);return t&&t.observe(E.current),()=>{e&&t.disconnect()}},[F,E,h]),f.useEffect(()=>{D&&S&&u.current&&u.current.focus()},[S,D]);const{onFocus:P,onBlur:H}=n.useAsyncFocusBlur({onFocus:N,onBlur:L});return f.createElement(f.Fragment,null,f.createElement(s.Button,{ref:l,onFocus:P,onBlur:H,fillMode:"flat",className:"k-nav-current",icon:"calendar",svgIcon:d.calendarIcon,"aria-live":"polite",tabIndex:-1,onClick:M},"desktop"===y?A:_),f.createElement(i.Popup,{anchor:null==(r=l.current)?void 0:r.element,show:D},f.createElement(c.Calendar,{ref:u,onFocus:P,onBlur:H,onChange:O,value:g})))});Qt.displayName="KendoReactSchedulerNavigationDatePicker";const Jt=e=>{const[t,r]=De(),a=o.useLocalization(),n=f.useMemo(()=>"function"==typeof e.view.title?e.view.title.call(void 0,a):e.view.title,[e.view.title,a]),l=f.useCallback(()=>{e.view.name&&r(e.view.name)},[r,e.view.name]);return f.createElement(s.Button,{className:"k-toolbar-button",role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===t,onClick:l},n)},er=f.forwardRef(()=>{const e=f.useRef(null),[t,r]=f.useState("desktop"),a=le(),l=n.useWindow(e),[c,i]=De(),u=a.find(e=>e.props.name===c),m=o.useLocalization(),p=f.useCallback(e=>{i&&(e.syntheticEvent.preventDefault(),i(e.item.name))},[i]),g=()=>{l().matchMedia&&r(l().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")};return f.useEffect(()=>{g();const t=l().ResizeObserver,r=t&&new t(g);return r&&r.observe(e.current),()=>{r&&r.disconnect()}},[]),f.createElement("div",{className:n.classNames("k-toolbar-button-group k-button-group k-button-group-solid",{"k-scheduler-views":"desktop"===t,"k-scheduler-tools":"mobile"===t}),role:"group",ref:e},u&&"mobile"===t&&f.createElement(s.DropDownButton,{className:"k-views-dropdown",onItemClick:p,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:a.map(e=>({...e.props,selected:e.props.name===c,title:"function"==typeof e.props.title?e.props.title.call(void 0,m):e.props.title})),text:f.createElement(f.Fragment,null,"function"==typeof u.props.title?u.props.title.call(void 0,m):u.props.title,f.createElement(n.IconWrap,{name:"caret-alt-down",icon:d.caretAltDownIcon}))}),"desktop"===t&&f.createElement(f.Fragment,null,a.map(e=>f.createElement(Jt,{key:e.props.name,view:e.props}))))});er.displayName="KendoReactSchedulerViewSelectorList";const tr=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-navigation",r),...a},e.children)}),rr=f.createContext({});rr.displayName="SchedulerViewPropsContext";const ar=f.createContext([]),nr=()=>f.useContext(ar);ar.displayName="SchedulerViewRangesContext";const lr=f.createContext([[],U]),or=()=>f.useContext(lr);lr.displayName="SchedulerViewSlotsContext";const sr=f.createContext([[],U]),cr=()=>f.useContext(sr);sr.displayName="SchedulerViewItemsContext";const ir=f.createContext([[],U]);ir.displayName="SchedulerViewSelectedSlotsContext";const dr=f.createContext([[],U]),ur=()=>f.useContext(dr);dr.displayName="SchedulerViewSelectedItemsContext";const mr=f.createContext([[],U]);mr.displayName="SchedulerViewFocusedItemsContext";const pr=f.createContext([[],U]),gr=()=>f.useContext(pr);pr.displayName="SchedulerViewFocusedSlotsContext";const Er=({children:e,props:t,ranges:r,slots:a,items:n,selectedSlots:l,selectedItems:o,focusedItems:s,focusedSlots:c})=>f.createElement(rr.Provider,{value:t},f.createElement(ar.Provider,{value:r},f.createElement(lr.Provider,{value:a},f.createElement(sr.Provider,{value:n},f.createElement(ir.Provider,{value:l},f.createElement(dr.Provider,{value:o},f.createElement(mr.Provider,{value:s},f.createElement(pr.Provider,{value:c},e))))))));var hr=(e=>(e.select="ITEMS_SELECT_SELECT",e.selectNext="ITEMS_SELECT_SELECT_NEXT",e.selectPrev="ITEMS_SELECT_SELECT_PREV",e.reset="ITEMS_SELECT_RESET",e.add="ITEMS_SELECT_ADD",e.remove="ITEMS_SELECT_REMOVE",e))(hr||{});var yr=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(yr||{});const vr=(e,t)=>{const{element:r}=e;n.useIsomorphicLayoutEffect(()=>{if(!r||!r.current)return;const t=[],a=[],n=[],l=r.current.querySelectorAll(e.selector);l.forEach(r=>{const l=r.getBoundingClientRect().width,o=e.explicitDepth&&void 0!==e.attribute?r.getAttribute(e.attribute):0,s=I(r,!0),c=((e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"borderLeftWidth":"borderTopWidth"]||"0")+parseFloat(window.getComputedStyle(e)[t?"borderRightWidth":"borderBottomWidth"]||"0"))(r,!0);null!==o&&((!n[o]||c>n[o])&&(n[o]=c),(!a[o]||s>a[o])&&(a[o]=s),(!t[o]||l>t[o])&&(t[o]=l))}),l.forEach(r=>{const l=e.explicitDepth?r.getAttribute(e.attribute):0;null!==l&&(r.style.minWidth=t[l]-a[l]-n[l]+"px")})},t)};var fr=(e=>(e.up="SLOT_FOCUS_UP",e.down="SLOT_FOCUS_DOWN",e.left="SLOT_FOCUS_LEFT",e.right="SLOT_FOCUS_RIGHT",e))(fr||{});const Dr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row-1&&t.current.props.col===e.current.props.col),kr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col-1),Sr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col+1),Cr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row+1&&t.current.props.col===e.current.props.col);var br=(e=>(e.next="ITEMS_FOCUS_NEXT",e.prev="ITEMS_FOCUS_PREV",e))(br||{});const Ir=f.forwardRef((e,t)=>{const r=f.useRef(null);f.useImperativeHandle(t,()=>r.current);const[a,l]=n.useCollection([]),[o,s]=n.useCollection([]),[c,i]=(e=>[[],(t,r)=>{switch(t.type){case"ITEMS_FOCUS_NEXT":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!1);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"ITEMS_FOCUS_PREV":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!0);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(a),[d,u]=(e=>[[],(t,r)=>{switch(t.type){case"SLOT_FOCUS_UP":{if(!t.slot.current||!e)return;const a=Dr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!t.slot||!e)return;const a=Cr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!t.slot||!e)return;const a=kr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!t.slot||!e)return;const a=Sr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(o),[m,p]=(e=>{const[t,r]=f.useState([]),a=f.useCallback((a,n)=>{switch(a.type){case"ITEMS_SELECT_SELECT":if(!a.item)return;r([a.item]);break;case"ITEMS_SELECT_SELECT_NEXT":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!1);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_SELECT_PREV":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!0);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_RESET":r([]);break;case"ITEMS_SELECT_ADD":if(!a.item)return;t.some(e=>e===a.item)||r([...t,a.item]);break;case"ITEMS_SELECT_REMOVE":if(!a.item)return;r([...t.filter(e=>e!==a.item)])}},[e,t]);return[t,a]})(a),[g,E]=(()=>{const[e,t]=f.useState([]),r=f.useCallback(r=>{switch(r.type){case"SLOTS_SELECT_SELECT":if(!r.slot)return;t([r.slot]);break;case"SLOTS_SELECT_RESET":t([]);break;case"SLOTS_SELECT_ADD":if(!r.slot)return;e.some(e=>e===r.slot)||t([...e,r.slot])}},[e]);return[e,r]})(),h=f.useCallback((e,t)=>{E({type:yr.reset}),p(e,t)},[p,E]),y=f.useCallback((e,t)=>{p({type:hr.reset},t),E(e)},[p,E]),v=f.useMemo(()=>n.classNames("k-scheduler-layout k-scheduler-layout-flex",e.className),[e.className]);return vr({element:r,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),vr({element:r,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1}),f.createElement(Er,{props:e.props,ranges:e.ranges,items:[a,l],slots:[o,s],selectedItems:[m,h],selectedSlots:[g,y],focusedItems:[c,i],focusedSlots:[d,u]},f.createElement("div",{ref:r,style:e.style,className:v,role:"presentation"},e.children))});Ir.displayName="KendoReactSchedulerBaseView";const wr=f.createContext({resource:{},groupIndex:0}),Tr=e=>{const{nested:t,children:r,rowContentProps:a}=e,n=e.rowContent||Ar,l=e.childRowContent||n,o=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group k-group-horizontal"},t?Rr({resources:o,children:r,nested:t,groupIndex:0,rowContent:n,rowContentProps:a,childRowContent:l}):xr({resources:o,children:r,rowContentProps:a,childRowContent:l}))},Rr=e=>{const{resources:t,rowContent:r,nested:a,children:n,groupIndex:l,rowContentProps:o,childRowContent:s}=e;if(l===t.length)return xr({resources:t,children:n,rowContentProps:o,childRowContent:s});const c=C(t,l),i=r;return f.createElement(f.Fragment,null,a?f.createElement("div",{className:"k-scheduler-row"},f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text)))):f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text))),Rr({resources:t,children:n,nested:a,rowContent:r,childRowContent:s,groupIndex:l+1}))},xr=e=>{const{resources:t,childRowContent:r,children:a,rowContentProps:n}=e,l=C(t,t.length-1),o=r,s=t.length>0;return f.createElement("div",{className:"k-scheduler-row"},f.createElement(o,{resources:t,...n},(l.length?l:j).map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},f.createElement(wr.Provider,{value:{resource:e,groupIndex:s?t:0}},a)))))};Tr.displayName="KendoReactSchedulerHorizontalResourceIterator";const Ar=e=>e.children,_r=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-side-cell","data-range-index":e.rangeIndex}),e.children),Mr=e=>{const{nested:t,wrapGroup:r,children:a}=e,n=e.cellContent||Hr,l=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group"},t?r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},Lr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},zr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!1))):zr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!0):r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},Nr({resources:l})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},a)):Or({resources:l,children:a,cellContent:n,groupIndex:0}))},Nr=e=>f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-row"},e.resources.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t})))),zr=(e,t=!0)=>{const{resources:r,children:a,cellContent:n,groupIndex:l,depth:o}=e,s=r.length>0;if(o===r.length||!s)return f.createElement(wr.Provider,{value:{resource:r[o],groupIndex:s?l:0}},a);const c=r[o].data.length;return r[o].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},t&&f.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":o},e[r[o].textField]),f.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":o,"data-resource-index":c*l+s},zr({resources:r,children:a,cellContent:n,groupIndex:c*l+s,depth:o+1},t))))},Lr=e=>{const{resources:t,children:r,cellContent:a,groupIndex:n,depth:l}=e,o=t.length?t[l].data.length:0;return t[l]?t[l].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":l,"data-resource-index":o*n+s},e[t[l].textField]),l+1!==t.length&&f.createElement("div",{className:"k-scheduler-cell k-resource-content"},Lr({resources:t,children:r,cellContent:a,groupIndex:o*n+s,depth:l+1})))):null},Or=e=>{const{resources:t,children:r,groupIndex:a,cellContent:n}=e;return f.createElement("div",{className:"k-scheduler-row"},Pr(t),n,Fr(r,t,a))},Fr=(e,t,r)=>{const a=t.length>0;return f.createElement("div",{className:"k-scheduler-cell k-group-content"},f.createElement(wr.Provider,{value:{resource:t[r],groupIndex:a?r:void 0}},e))},Pr=e=>e.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t}));Mr.displayName="KendoReactSchedulerVerticalResourceIterator";const Hr=null,Wr=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day"},t.toLanguageString(xe,Xt[xe])),e.children)},Kr=f.forwardRef((e,t)=>{const{as:r=Vr.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==Vr.as?void 0:l,...a,className:i},c.formatDate(e.date,e.format?e.format:Vr.format))}),Vr={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"t"};Kr.displayName="KendoReactSchedulerTimeHeaderCell";const Gr=e=>{const{slot:t,children:r}=e;return f.createElement(f.Fragment,null,e.isMaster?f.createElement(Kr,{as:e.timeHeaderCell,date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd,className:n.classNames("k-side-cell",{"k-major-cell":!e.isLast})}):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell"}),r)},Br=e=>{const{onChange:t,data:r,validationMessage:a,visited:n,touched:o,modified:s,...c}=e,[i,d]=f.useState(r),u=f.useCallback(e=>t(e),[t]),m=f.useCallback(e=>{const t=l.filterBy(r||[],e.filter);d(t)},[]);return f.createElement(h.ComboBox,{style:{width:"100%"},data:i,filterable:!0,onFilterChange:m,onChange:u,...c})},$r=e=>{const{value:t,data:r,onChange:a,...n}=e,l=f.useCallback(e=>{a&&a.call(void 0,e.currentTarget.dataset.value)},[a]);return f.createElement(s.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...n},r.map(e=>f.createElement(s.Button,{type:"button",key:e.value,selected:e.value===t,onClick:l,"data-value":e.value,togglable:!0},e.text)))},Ur=e=>e.charAt(0).toUpperCase()+e.slice(1),Zr=["first","second","third","fourth","last"],qr=["never","daily","weekly","monthly","yearly"],Yr=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],jr=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],Xr=[{day:0,offset:0},{day:6,offset:0}],Qr=e=>{switch(e){case"day":return Yr;case"weekday":return jr;case"weekend":return Xr}},Jr=e=>{const{value:t,data:r,onChange:a,...n}={...ea,...e},l=r=>{const a=Number(r.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some(e=>e===a)?t.filter(e=>e!==a):[...t,a])};return f.createElement(s.ButtonGroup,{width:"auto",...n},(e.data||ea.data).map(e=>f.createElement(s.Button,{type:"button",key:e.value,"data-key":e.value,selected:t.some(t=>t===e.value),togglable:!0,onClick:l},Ur(e.text))))},ea={data:[],value:[]},ta=e=>{const t=o.useInternationalization(),r=o.useLocalization(),{timezone:n}=ae(),[l,s]=f.useState(1),[i,d]=f.useState(a.ZonedDate.fromUTCDate(e.start)),u=f.useCallback((e,t)=>{const a=t?e:"scheduler.recurrenceEditor"+e;return r.toLanguageString(a,Xt[a])},[r]),p=f.useMemo(()=>{var t;return(e=>y.parseRule({recurrenceRule:e})||{})(null!=(t=e.value)?t:aa.value)},[e.value]),v=f.useMemo(()=>(e=>qr.map(t=>({value:t,text:e("Frequencies"+Ur(t))})))(u),[u]),D=f.useMemo(()=>(e=>N(e)&&!(e=>(e=>null==e)(e)||e.trim&&0===e.trim().length)(e.freq)?e.freq:"never")(p),[p]),k=f.useMemo(()=>((e,t)=>{const r=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map((e,t)=>({text:e,value:t})),n=a.slice(r).concat(a.slice(0,r));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(n)})(t,u),[t,u]),S=f.useMemo(()=>((e,t,r)=>{var a;let n;if(N(t.byWeekDay))switch(t.byWeekDay.length){case 7:n="day";break;case 5:n="weekday";break;case 2:n="weekend";break;case 1:n=t.byWeekDay[0].day;break;default:n=r.getDay()}else n=r.getDay();return null!=(a=e.find(e=>n===e.value))?a:e[0]})(k,p,e.start),[k,p,e.start]),C=f.useMemo(()=>(e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map((e,t)=>({text:e,value:t+1})))(t),[t]),b=f.useMemo(()=>((e,t)=>e.find(e=>(t.byMonth?t.byMonth[0]:null)===e.value)||e[0])(C,p),[C,p]),I=f.useMemo(()=>(e=>{const t=[1,2,3,4,-1];return Zr.map((r,a)=>({text:e("OffsetPositions"+Ur(r)),value:t[a]}))})(u),[u]),w=f.useMemo(()=>((e,t)=>e.find(e=>e.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0])(I,p),[I,p]),T=f.useMemo(()=>(e=>N(e.count)?"count":N(e.until)?"until":"never")(p),[p]),R=f.useMemo(()=>((e,t)=>N(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate())(p,e.start),[p,e.start]),x=f.useMemo(()=>(e=>N(e.until)?a.toLocalDate(e.until):null)(p),[p.until]),A=f.useMemo(()=>(e=>{const t=e.firstDay(),r=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map((e,t)=>({text:e,value:t}));return r.slice(t).concat(r.slice(0,t))})(t),[t]),_=f.useMemo(()=>(e=>N(e.byWeekDay)?"weekday":N(e.byMonthDay)?"monthday":void 0)(p),[p.byWeekDay,p.byMonthDay]),M=f.useCallback(r=>{"never"===r.freq?e.onChange({value:null}):(void 0===r.weekStart&&(r.weekStart=t.firstDay()),e.onChange({value:y.serializeRule(r,e.timezone)}))},[e.onChange,e.timezone]),z=f.useCallback(t=>{const r={};r.freq=t,r.interval=1,"weekly"===t&&(r.byWeekDay=[{day:a.ZonedDate.fromLocalDate(e.start,n).getDay(),offset:0}]),("monthly"===t||"yearly"===t)&&(r.byMonthDay=[e.start.getDate()]),"yearly"===t&&(r.byMonth=[e.start.getMonth()+1]),M(r)},[M,e.start,n]),L=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{interval:t}))},[M,p]),O=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{count:t})),null!==t&&s(t)},[M,p]),F=f.useCallback(t=>{const r=t.value;if(!r)return;const n=a.ZonedDate.fromLocalDate(r,e.timezone);M(Object.assign({},p,{until:n})),d(n)},[M,p,e.timezone]),P=f.useCallback(e=>{M(Object.assign({},p,{byWeekDay:A.filter(t=>e.some(e=>e===t.value)).map(e=>({offset:0,day:e.value}))}))},[M,p,A]),H=f.useCallback(e=>{const t=Object.assign({},p),r=e.target.value;"string"==typeof r.value?(t.byWeekDay=Qr(r.value),t.bySetPosition=[w.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:r.value,offset:w.value}]),M(t)},[w.value,M,p]),W=f.useCallback(e=>{M(Object.assign({},p,{byMonthDay:[e.value]}))},[M,p]),K=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{byMonth:[t.value]}))},[M,p]),V=f.useCallback(e=>{const t=e.value,r=Object.assign({},p);switch(t){case"never":r.until=void 0,r.count=void 0;break;case"count":r.until=void 0,r.count=l;break;case"until":r.until=i,r.count=void 0}M(r)},[M,p,e.timezone]),G=f.useCallback(e=>{const t=Object.assign({},p);"monthday"===e.value?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[R]):"weekday"===e.value&&(t.byMonthDay=void 0,"string"==typeof S.value?(t.bySetPosition=[w.value],t.byWeekDay=Qr(S.value)):t.byWeekDay=[{day:S.value,offset:w.value}]),M(t)},[M,p,R,S]),B=f.useCallback(e=>{const t=Object.assign({},p),r=e.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[r.value];break;case 1:t.byWeekDay[0].offset=r.value}M(t)},[M,p]);return f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},r.toLanguageString(nt,Xt[nt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement($r,{value:D,data:v,onChange:z}))),"never"!==D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ur(D)+"RepeatEvery")),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.NumericTextBox,{min:1,step:1,defaultValue:1,value:p.interval,onChange:L,id:"interval-editor",className:"k-recur-interval"})," ",f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ur(D)+"Interval")))),"weekly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(it,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Jr,{data:A,value:(p.byWeekDay||[]).map(({day:e})=>e),onChange:P}))),"monthly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},u(pt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,onChange:G,item:ra,className:"k-reset",data:[{value:"monthday",label:u(dt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:"monthday"!==_,value:p&&p.byMonthDay&&p.byMonthDay[0],onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(h.DropDownList,{key:"weekday-value",disabled:"weekday"!==_,value:S,data:k,onChange:H,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),"yearly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,null,u(ht,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,item:ra,onChange:G,className:"k-reset",data:[{value:"monthday",label:" ",children:[f.createElement(h.DropDownList,{key:"monthday-month",disabled:"monthday"!==_,value:b,data:C,textField:"text",dataItemKey:"value",onChange:K,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:"monthday"!==_,value:R,onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-1"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:S,data:k,onChange:H,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-2"}," "),f.createElement("span",{key:"yearly-weekday-of-label"},u(gt,!0)),f.createElement(f.Fragment,{key:"yearly-separator-3"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:b,data:C,onChange:K,style:{width:"auto"}})]}]}))),"never"!==D&&f.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(Nt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{item:ra,value:T,onChange:V,data:[{value:"never",label:u(zt,!0)},{value:"count",label:u(_t,!0),children:[f.createElement(f.Fragment,{key:"separator-1"}," "),f.createElement(E.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:"count"===T?p.count:l,onChange:O,disabled:"count"!==T}),f.createElement(f.Fragment,{key:"separator-2"}," "),f.createElement(g.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},u(Mt,!0))]},{value:"until",label:u(Lt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(c.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:"until"!==T,min:e.start,value:"until"===T?x:a.toLocalDate(i),onChange:F,width:"auto"})]}]})))))},ra=e=>f.createElement("li",{...e},e.children),aa={value:""};ta.displayName="KendoReactSchedulerRepeatEditor";const na=e=>{const{as:t=sa.as,value:r,onChange:a,...n}=e,{timezone:l}=ae(),o=f.useMemo(()=>la(r,l),[r,l]);return f.createElement(t,{...n,value:o,onChange:e=>{a&&a({value:oa(e.target.value,l)})}})},la=(e,t)=>{if(e){if(!t)return e;const r=a.toLocalDate(a.ZonedDate.fromLocalDate(e,t).toUTCDate());return r.setUTCFullYear(e.getFullYear()),r}return e},oa=(e,t)=>{if(e){if(!t)return e;const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),a.ZonedDate.fromUTCDate(r,t).toLocalDate()}return e},sa={as:c.DateTimePicker},ca=f.forwardRef((e,t)=>{const r=f.useRef(null),l=f.useRef(null),s=a.timezoneNames(),i=o.useLocalization(),d=se(),{resources:u,timezone:p}=ae();f.useImperativeHandle(l,()=>{var t;return{element:null!=(t=r.current)&&t.element?r.current.element:r.current,props:e}}),f.useImperativeHandle(t,()=>l.current);const{as:E=ia.as,...h}=e,{titleLabel:y=ia.titleLabel,titleError:v=ia.titleError,titleEditor:D=ia.titleEditor,startLabel:k=ia.startLabel,startError:S=ia.startError,startEditor:C=ia.startEditor,startTimezoneLabel:b=ia.startTimezoneLabel,startTimezoneError:I=ia.startTimezoneError,startTimezoneEditor:w=ia.startTimezoneEditor,startTimezoneCheckedLabel:T=ia.startTimezoneCheckedLabel,startTimezoneCheckedEditor:R=ia.startTimezoneCheckedEditor,endLabel:x=ia.endLabel,endError:A=ia.endError,endEditor:_=ia.endEditor,endTimezoneLabel:M=ia.endTimezoneLabel,endTimezoneError:N=ia.endTimezoneError,endTimezoneEditor:z=ia.endTimezoneEditor,endTimezoneCheckedLabel:L=ia.endTimezoneCheckedLabel,endTimezoneCheckedEditor:O=ia.endTimezoneCheckedEditor,allDayLabel:F=ia.allDayLabel,allDayEditor:P=ia.allDayEditor,recurrenceEditor:H=ia.recurrenceEditor,descriptionLabel:W=ia.descriptionLabel,descriptionEditor:K=ia.descriptionEditor,descriptionError:V=ia.descriptionError,resourceLabel:G=ia.resourceLabel,resourceEditor:B=ia.resourceEditor}=e,$=e.valueGetter(d.start)||new Date,U=e.valueGetter(d.startTimezone)||p||"",Z=e.valueGetter(d.endTimezone)||p||"",q=f.useMemo(()=>i.toLanguageString(Ut,Xt[Ut]),[i]),[Y,j]=f.useState(!!e.valueGetter(d.startTimezone)),[X,Q]=f.useState(!!e.valueGetter(d.endTimezone)),J=f.useCallback(t=>{t.value||(e.onChange(d.startTimezone,{value:null}),e.onChange(d.endTimezone,{value:null}),Q(t.value)),j(t.value)},[e.onChange,d.startTimezone,d.endTimezone]),ee=f.useCallback(t=>{t.value||e.onChange(d.endTimezone,{value:null}),Q(t.value)},[e.onChange]),te=f.useCallback(e=>e?void 0:q,[q]),re=f.useCallback((e,t)=>Y?te(t(d.startTimezone)):void 0,[te,Y,d.startTimezone]),ne=f.useCallback((e,t)=>Y&&X?te(t(d.endTimezone))||te(t(d.startTimezone)):void 0,[te,Y,X,d.startTimezone,d.endTimezone]),le=f.useMemo(()=>n.classNames("k-scheduler-edit-form",e.className),[e.className]);return f.createElement(E,{ref:E===ia.as?r:void 0,...h,className:le},f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.title,component:y,editorId:"k-scheduler-editor-title",className:"k-form-label"},i.toLanguageString(Ye,Xt[Ye])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-title",name:d.title,field:d.title,component:D}),e.errors[d.title]&&f.createElement(m.Field,{name:d.title,component:v},e.errors[d.title]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:k,editorId:"k-scheduler-editor-start",className:"k-form-label"},i.toLanguageString(je,Xt[je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-start",name:d.start,width:"auto",component:C,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.start]&&f.createElement(m.Field,{name:d.start,component:S},e.errors[d.start]))),f.createElement(m.FieldWrapper,null,f.createElement(T,{className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(R,{id:"k-scheduler-editor-set-start-timezone",onChange:J,value:Y}),f.createElement(T,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},i.toLanguageString(at,Xt[at])))),Y&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:b,className:"k-form-label"},i.toLanguageString(Xe,Xt[Xe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:w,value:U,validator:re,data:s,name:d.startTimezone}),e.errors[d.startTimezone]&&f.createElement(m.Field,{name:d.startTimezone,component:I},e.errors[d.startTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.end,component:x,editorId:"k-scheduler-editor-end",className:"k-form-label"},i.toLanguageString(Qe,Xt[Qe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-end",name:d.end,width:"auto",component:_,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.end]&&f.createElement(m.Field,{name:d.end,component:A},e.errors[d.end]))),Y&&f.createElement(m.FieldWrapper,null,f.createElement("div",{className:"k-form-field-wrap"},f.createElement(O,{id:"k-scheduler-editor-set-end-timezone",onChange:ee,value:X})),f.createElement(L,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},i.toLanguageString(rt,Xt[rt]))),X&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.endTimezone,component:M,className:"k-form-label"},i.toLanguageString(Je,Xt[Je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{value:Z,data:s,validator:ne,component:z,name:d.endTimezone}),e.errors[d.endTimezone]&&f.createElement(m.Field,{name:d.endTimezone,component:N},e.errors[d.endTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.isAllDay,component:g.Label,className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-is-allday-checkbox",name:d.isAllDay,component:P}),f.createElement(m.Field,{name:d.isAllDay,field:d.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:F},i.toLanguageString(et,Xt[et])))),f.createElement("div",{className:"k-recurrence-editor"},f.createElement(m.Field,{component:H,field:d.recurrenceRule,name:d.recurrenceRule,start:$})),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.description,component:W,className:"k-form-label"},i.toLanguageString(tt,Xt[tt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:K,name:d.description,rows:1,id:"k-event-description"}),e.errors[d.description]&&f.createElement(m.Field,{name:d.description,component:V},e.errors[d.description]))),(u||[]).map(e=>f.createElement(m.FieldWrapper,{key:e.field},f.createElement(m.Field,{name:e.field,component:G,className:"k-form-label"}),f.createElement(g.Label,{className:"k-form-label"},e.name),f.createElement(m.Field,{name:e.field,component:B,resource:e,multiple:e.multiple,data:e.data,textField:e.textField,valueField:e.valueField,colorField:e.colorField})))))}),ia={as:f.forwardRef((e,t)=>f.createElement(m.FormElement,{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:e.className,horizontal:e.horizontal,children:e.children})),titleLabel:g.Label,titleError:g.Error,titleEditor:E.Input,startLabel:g.Label,startError:g.Error,startEditor:na,startTimezoneLabel:g.Label,startTimezoneError:g.Error,startTimezoneEditor:Br,startTimezoneCheckedLabel:g.Label,startTimezoneCheckedEditor:E.Checkbox,endLabel:g.Label,endError:g.Error,endEditor:na,endTimezoneLabel:g.Label,endTimezoneError:g.Error,endTimezoneEditor:Br,endTimezoneCheckedLabel:g.Label,endTimezoneCheckedEditor:E.Checkbox,allDayLabel:g.Label,allDayEditor:E.Checkbox,recurrenceEditor:ta,descriptionLabel:g.Label,descriptionEditor:E.TextArea,descriptionError:g.Error,resourceLabel:g.Label,resourceEditor:e=>{const t=e.multiple?h.MultiSelect:h.DropDownList,r=f.useCallback(t=>{const r=t.target.props.dataItemKey,a=e.multiple?(t.target.value||[]).map(e=>e[r]):t.target.value[r];e.onChange.call(void 0,{value:a})},[e.multiple,e.onChange]),a=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r.dataItem[e.colorField],marginRight:N(r.dataItem[e.valueField])?"8px":"4px"}}," "),f.createElement("span",{key:2},"  ",t.props.children));return f.cloneElement(t,{...t.props},a)},[e.colorField,e.valueField]),n=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&r&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r[e.colorField],marginRight:r[e.valueField]?"8px":"4px"}}," "),t.props.children);return f.cloneElement(t,{},a)},[e.colorField,e.valueField]),l=Array.isArray(e.value)?e.data.filter(t=>e.value.some(r=>t[e.valueField]===r)):e.data.find(t=>t[e.valueField]===e.value);return f.createElement(t,{value:l,onChange:r,data:e.data,textField:e.textField,dataItemKey:e.valueField,valid:e.valid,validationMessage:e.validationMessage,itemRender:a,valueRender:n})}};ca.displayName="KendoReactSchedulerFormEditor";const da=f.forwardRef((e,t)=>{const{onCancel:r,onClose:a,onSubmit:l,editor:c,dialog:i=ua.dialog,validator:u=ua.validator,...g}=e,E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e})),f.useImperativeHandle(t,()=>E.current);const h=o.useLocalization(),y=se(),v=f.useMemo(()=>h.toLanguageString(Ut,Xt[Ut]),[h]),k=f.useMemo(()=>h.toLanguageString(qt,Xt[qt]),[h]),S=f.useMemo(()=>h.toLanguageString(Ue,Xt[Ue]),[h]),C=f.useMemo(()=>h.toLanguageString(Ze,Xt[Ze]),[h]),b=f.useMemo(()=>h.toLanguageString(qe,Xt[qe]),[h]),I=f.useMemo(()=>h.toLanguageString(Zt,Xt[Zt]),[h]),w=f.useCallback(e=>{r&&r.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[r]),T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[a]),R=f.useCallback((e,t)=>{l&&l.call(void 0,{value:e,syntheticEvent:t,target:E.current})},[l]),x=f.useCallback((e,t)=>e&&t(y.end)&&e.getTime()>t(y.end).getTime()?I:void 0,[y,I]),A=f.useCallback((e,t)=>e&&t(y.start)&&e.getTime()<t(y.start).getTime()?k:void 0,[y,k]),_=f.useCallback(e=>e?void 0:v,[v]),M=f.useCallback((e,t)=>{const r={};r[y.start]=[_(t(y.start)),x(t(y.start),t)].filter(Boolean).reduce((e,t)=>e||t,""),r[y.end]=[_(t(y.start)),A(t(y.start),t)].filter(Boolean).reduce((e,t)=>e||t,"");const a=u(e,t);return{...r,...a}},[A,y.end,y.start,_,x,u]);return n.canUseDOM?D.createPortal(f.createElement(m.Form,{initialValues:e.dataItem,onSubmit:R,validator:M,render:e=>f.createElement(i,{title:b,minWidth:400,onClose:T,className:"k-scheduler-edit-dialog"},f.createElement(ca,{...e,as:c}),f.createElement(p.DialogActionsBar,{layout:"start"},f.createElement(s.Button,{themeColor:"primary",disabled:!e.allowSubmit,onClick:e.onSubmit,icon:"save",svgIcon:d.saveIcon},S),f.createElement(s.Button,{onClick:w,icon:"cancel",svgIcon:d.cancelIcon},C))),...g}),document&&document.body):null}),ua={dialog:p.Dialog,validator:()=>({})};da.displayName="KendoReactSchedulerForm";const ma=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onClick:l,onMouseEnter:o,onMouseLeave:s,onMouseOut:c,onMouseOver:i,onDoubleClick:d,onKeyDown:u,onKeyPress:m,onKeyUp:p}=e,{slot:g,element:E}=((e,t)=>{const{_ref:r}=e,a=f.useRef(null),l=f.useRef(null),[,o]=or();return f.useImperativeHandle(a,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>a.current),f.useImperativeHandle(r,()=>a.current),f.useLayoutEffect(()=>(o({type:n.COLLECTION_ACTION.add,item:a}),()=>{o({type:n.COLLECTION_ACTION.remove,item:a})})),{slot:a,element:l}})(e,t),h=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,y=f.useMemo(()=>{var t,r;const a=null!=(t=e.isWorkHour)?t:pa.isWorkHour,l=null!=(r=e.isWorkDay)?r:pa.isWorkDay;return n.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!a||!l,"k-selected":e.selected})},[e.className,e.selected,e.isWorkHour,e.isWorkDay]),v=f.useMemo(()=>({userSelect:"none",...e.style}),[e.style]),D=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:g.current})},[r,g]),k=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:g.current})},[a,g]),S=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:g.current})},[l,g]),C=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:g.current})},[i,g]),b=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:g.current})},[c,g]),I=f.useCallback(e=>{o&&o.call(void 0,{syntheticEvent:e,target:g.current})},[o,g]),w=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:g.current})},[s,g]),T=f.useCallback(e=>{d&&d.call(void 0,{syntheticEvent:e,target:g.current})},[d,g]),R=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:g.current})},[u,g]),x=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:g.current})},[m,g]),A=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:g.current})},[p,g]);return f.createElement("div",{ref:E,id:e.id,style:v,className:y,tabIndex:h,"aria-selected":e.selected||void 0,onFocus:D,onBlur:k,onClick:S,onMouseEnter:I,onMouseLeave:w,onMouseOver:C,onMouseOut:b,onDoubleClick:T,onKeyDown:R,onKeyPress:x,onKeyUp:A,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)}),pa={isWorkHour:!0,isWorkDay:!0};ma.displayName="KendoReactSchedulerSlot";const ga=f.forwardRef((e,t)=>{var r;const{slot:a,_ref:l,...o}=e,s=a||Ea.slot,c=f.useRef(null),i=f.useRef(null);return f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(l,()=>i.current),f.useImperativeHandle(t,()=>c.current),((e,t)=>{const r=f.useRef(void 0),a=f.useRef(0),l=te(),o=f.useCallback(()=>{if(!t||!e.current)return;const r=e.current.element,n=e.current.props;if(!r)return;const l=I(r),o=new Map,s=n.items.filter(e=>e._ref.current);s.forEach(e=>{var t,r,a,n;if(!e._ref.current)return;const{height:l}=b(e._ref.current.element),s=null!=(a=null!=(r=e.order)?r:null==(t=e._ref.current)?void 0:t._order)?a:-1;(null!=(n=o.get(s))?n:0)<l&&o.set(s,l)});const c=Array.from(o.values()).reduce((e,t)=>e+t,0),i=1*s.length*2+c-(l||0)+("object"==typeof t&&t.offsetTop?t.offsetTop:0)+("object"==typeof t&&t.offsetBottom?t.offsetBottom:0);s.length?i>a.current-l&&w(r,{height:i},!0):r&&(r.style.minHeight="")},[t,e]),s=f.useCallback(()=>{void 0!==r.current&&window.cancelAnimationFrame(r.current),r.current=window.requestAnimationFrame(()=>{o()})},[o]);n.useIsomorphicLayoutEffect(()=>{if(!e.current)return;const t=e.current.element;t&&(a.current=t.clientHeight)},[]),f.useEffect(o,[e,e.current&&e.current.props,t]),f.useEffect(()=>{if(!e.current)return;const t=e.current.props.items.filter(e=>e._ref.current).map(e=>{if(!e._ref.current||!e._ref.current.element||!l.current)return;const t=window.ResizeObserver,r=t&&new t(s);return r&&r.observe(e._ref.current.element),()=>{r&&r.disconnect()}});return()=>{t.forEach(e=>e&&e())}},[s,l,e])})(i,null!=(r=e.expandable)?r:Ea.expandable),f.createElement(s,{...o,_ref:i})}),Ea={slot:ma,expandable:!1};ga.displayName="KendoReactSchedulerViewSlot";const ha=f.createContext([null]);ha.displayName="SchedulerEditSlotPropsContext";const ya=f.createContext([null]);ya.displayName="SchedulerEditSlotFormItemContext";const va=({props:e,form:t,children:r})=>f.createElement(ha.Provider,{value:e},f.createElement(ya.Provider,{value:t},r)),fa=e=>{const t=f.useContext(re),r=void 0!==e?e:t.editable||!1,a=!0===r||void 0!==r&&!1!==r&&!0===r.edit,n=!0===r||void 0!==r&&!1!==r&&!0===r.resize,l=!0===r||void 0!==r&&!1!==r&&!0===r.remove,o=!0===r||void 0!==r&&!1!==r&&!0===r.drag;return{add:!0===r||void 0!==r&&!1!==r&&!0===r.add,edit:a,drag:o,remove:l,resize:n,select:!0===r||void 0!==r&&!1!==r&&!0===r.select}},Da=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewSlot:l,form:o,formItem:s,onFormItemChange:c,...i}=e,[d,u]=f.useState(e.tabIndex),m=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(p,()=>({props:e})),f.useImperativeHandle(t,()=>p.current),f.useImperativeHandle(r,()=>m.current);const g=fa(e.editable),E=se(),[h]=or(),[y]=cr(),[v,D]=f.useContext(ir),[,k]=gr(),S=o||ka.form,C=l||ka.viewSlot,[b,I]=Ce(null,s,e.onFormItemChange),w=v.some(t=>!(!t.current||t.current.props.start.getTime()!==e.start.getTime()||t.current.props.end.getTime()!==e.end.getTime()||t.current.props.index!==e.index||t.current.props.group.index!==e.group.index||t.current.props.range.index!==e.range.index||t.current.props.isAllDay!==e.isAllDay)),T=f.useCallback(()=>{const t={};if(M(t,E.start,new Date(e.start.getTime())),M(t,E.end,new Date(e.end.getTime())),M(t,E.isAllDay,e.isAllDay),e.group.resources.length)for(let r=0;r<e.group.resources.length;r++){const a=e.group.resources[r];if(x(e.group.resources)){const n=_(e.group.resources[r],a.valueField);M(t,a.field,a.multiple?[n]:n)}else M(t,a.field,a.multiple?[]:void 0)}return t},[E.start,E.end,E.isAllDay,e.start,e.end,e.isAllDay,e.group.resources]),R=f.useCallback(t=>{g.select&&D({type:yr.select,slot:m},t.syntheticEvent),e.onFocus&&e.onFocus.call(void 0,t)},[D,g.select,e.onFocus]),A=f.useCallback(t=>{if(g.add){const e=T();I(e,t)}e.onDoubleClick&&e.onDoubleClick.call(void 0,t)},[T,g.add,e.onDoubleClick,I]),N=f.useCallback(e=>{let t;switch(e.syntheticEvent.keyCode){case n.Keys.left:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.left,slot:m},e.syntheticEvent);break;case n.Keys.right:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.right,slot:m},e.syntheticEvent);break;case n.Keys.up:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.up,slot:m},e.syntheticEvent);break;case n.Keys.down:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.down,slot:m},e.syntheticEvent);break;case n.Keys.enter:{if(!h||!g.add)return;const e=T();I(e);break}case n.Keys.tab:t=(e=>{const t=e.props.items.find(e=>0===e.order)||e.props.items[0];return t&&t._ref.current})(e.target)}t&&(e.syntheticEvent.preventDefault(),t.element&&t.element.focus())},[T,k,g.add,I,h]),z=f.useCallback(e=>{a&&a.call(void 0,{type:J.create,series:!1,dataItem:e.value},e),I(null,e.syntheticEvent)},[a,I]),L=f.useCallback(e=>{I(null,e.syntheticEvent)},[I]),O=f.useCallback(e=>{I(null,e)},[I]),F=f.useCallback((e,t)=>{I&&I(e,t)},[I]);return f.useEffect(()=>{const t=h.length&&h[0].current===m.current;u(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===v.length&&t&&0===y.length?0:void 0)},[y,e.tabIndex,v.length,h]),f.createElement(va,{props:e,form:[b,F]},f.createElement(C,{...i,_ref:m,selected:w,tabIndex:d,onFocus:R,onDoubleClick:A,onKeyDown:N}),b&&f.createElement(S,{dataItem:b,onSubmit:z,onClose:O,onCancel:L}))}),ka={viewSlot:ga,form:da};Da.displayName="KendoReactSchedulerEditSlot";const Sa=f.forwardRef((e,t)=>{const{isRemove:r,onClose:a,onSeriesClick:l,onOccurrenceClick:c}=e,i=f.useRef(null);f.useImperativeHandle(i,()=>({props:e})),f.useImperativeHandle(t,()=>i.current);const d=o.useLocalization(),u=e=>d.toLanguageString(e,Xt[e]),m=u(Ve),g=u(Ge),E=u(Be),h=u($e),y=u(Ht),v=u(Wt),k=u(Vt),S=u(Pt),C=r?k:h,b=r?S:E,I=r?y:m,w=r?v:g,T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[a]),R=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[l]),x=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[c]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:C,onClose:T},b,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:x},I),f.createElement(s.Button,{onClick:R},w))),document&&document.body):null});Sa.displayName="KendoReactSchedulerSchedulerOccurrenceDialog";const Ca=f.forwardRef((e,t)=>{const{onClose:r,onCancel:a,onConfirm:l}=e,c=f.useRef(null);f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(t,()=>c.current);const i=o.useLocalization(),d=i.toLanguageString(Ze,Xt[Ze]),u=i.toLanguageString(Ot,Xt[Ot]),m=i.toLanguageString(Ft,Xt[Ft]),g=i.toLanguageString(Kt,Xt[Kt]),E=f.useCallback(({syntheticEvent:e})=>{if(!r)return;const t={syntheticEvent:e,value:null,target:c.current};r.call(void 0,t)},[r]),h=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,value:null})},[a]),y=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null})},[l]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:g,onClose:E},m,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:h},d),f.createElement(s.Button,{onClick:y},u))),document&&document.body):null});Ca.displayName="KendoReactSchedulerRemoveDialog";const ba=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onMouseDown:l,onClick:s,onMouseUp:c,onMouseOut:i,onMouseOver:u,onMouseEnter:m,onMouseLeave:p,onDoubleClick:g,onRemoveClick:E,onKeyUp:h,onKeyDown:y,onKeyPress:v,onPress:D,onDrag:k,onRelease:S,onResizePress:C,onResizeEndDrag:b,onResizeRelease:I,onResizeStartDrag:w}=e,{item:T,element:R}=((e,t)=>{const{_ref:r,itemRef:a,_maxSiblingsPerSlot:l,_siblings:o,_order:s}=e,c=f.useRef(null),i=f.useRef(null),[,d]=cr();return f.useImperativeHandle(c,()=>({element:i.current,props:e,get _maxSiblingsPerSlot(){return null==l?void 0:l.current},set _maxSiblingsPerSlot(e){var t;null!=e&&void 0!==l&&void 0!==l.current&&(l.current=e,null==(t=null==o?void 0:o.current)||t.forEach(t=>{var r;!t||t._maxSiblingsPerSlot===e||e<(null!=(r=t._maxSiblingsPerSlot)?r:0)||(t._maxSiblingsPerSlot=e)}))},get _order(){return null==s?void 0:s.current},set _order(e){void 0!==e&&void 0!==s&&void 0!==s.current&&(s.current=e)}})),f.useImperativeHandle(t,()=>c.current),f.useImperativeHandle(r,()=>c.current),f.useImperativeHandle(a,()=>c.current),n.useIsomorphicLayoutEffect(()=>(d({type:n.COLLECTION_ACTION.add,item:c}),()=>{d({type:n.COLLECTION_ACTION.remove,item:c})})),{item:c,element:i}})(e,t),x=n.useDir(R),A=f.useRef(null),_=f.useRef(null),M=f.useRef(null),N=f.useRef(null),z=fa(e.editable),L=o.useInternationalization(),O=o.useLocalization(),F=O.toLanguageString(Fe,Xt[Fe]),P=O.toLanguageString(xe,Xt[xe]),H=e.group.resources.find(e=>!(!e.colorField||""===e[e.colorField]||void 0===e[e.colorField])),W=H&&H.colorField&&H[H.colorField],K=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,V=f.useMemo(()=>n.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&z.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,z.select]),G=f.useMemo(()=>`${e.title}, ${function(e,t,r,a,n="all day"){const l={skeleton:"yMMMMEEEEdhm"},o={skeleton:"yMMMMEEEEd"},s=t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate();if(a){const a=0===r.getHours()&&0===r.getMinutes()&&0===r.getSeconds()&&r.getTime()-t.getTime()===864e5;return s||a?`${e.formatDate(t,o)} (${n})`:`${e.formatDate(t,o)} to ${e.formatDate(r,o)} (${n})`}return s?`${e.formatDate(t,l)}–${e.formatDate(r,"t")}`:`${e.formatDate(t,l)}-${e.formatDate(r,l)}`}(L,e.zonedStart,e.zonedEnd,e.isAllDay,P)}`,[L,e.isAllDay,e.title,e.zonedEnd,e.zonedStart,P]),B=f.useMemo(()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:W,backgroundColor:e.resizeHint?void 0:W,touchAction:"none",...e.style}),[W,e.style,e.resizeHint]),$=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:T.current})},[r,T]),U=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:T.current})},[a,T]),Z=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:T.current})},[l,T]),q=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:T.current})},[s,T]),Y=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:T.current})},[c,T]),j=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:T.current})},[u,T]),X=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:T.current})},[i,T]),Q=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:T.current})},[m,T]),J=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:T.current})},[p,T]),ee=f.useCallback(e=>{g&&g.call(void 0,{syntheticEvent:e,target:T.current})},[g,T]),te=f.useCallback(e=>{E&&E.call(void 0,{syntheticEvent:e,target:T.current})},[E,T]),re=f.useCallback(e=>{y&&y.call(void 0,{syntheticEvent:e,target:T.current})},[y,T]),ae=f.useCallback(e=>{v&&v.call(void 0,{syntheticEvent:e,target:T.current})},[v,T]),ne=f.useCallback(e=>{h&&h.call(void 0,{syntheticEvent:e,target:T.current})},[h,T]),le=f.useCallback(e=>{D&&D.call(void 0,{dragEvent:e,target:T.current})},[D,T]),oe=f.useCallback(e=>{k&&k.call(void 0,{dragEvent:e,target:T.current})},[k,T]),se=f.useCallback(e=>{S&&S.call(void 0,{dragEvent:e,target:T.current})},[S,T]),ce=f.useCallback(e=>{C&&C.call(void 0,{dragEvent:e,target:T.current})},[C,T]),ie=f.useCallback(e=>{w&&w.call(void 0,{dragEvent:e,target:T.current})},[w,T]),de=f.useCallback(e=>{b&&b.call(void 0,{dragEvent:e,target:T.current})},[b,T]),ue=f.useCallback(e=>{I&&I.call(void 0,{dragEvent:e,target:T.current})},[I,T]);return n.useDraggable(R,{onPress:le,onDrag:oe,onRelease:se}),n.useDraggable(A,{onPress:ce,onDrag:de,onRelease:ue}),n.useDraggable(_,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(M,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(N,{onPress:ce,onDrag:de,onRelease:ue}),f.createElement("div",{ref:R,id:e.id,style:B,tabIndex:K,className:V,role:"button","aria-label":G,onFocus:$,onBlur:U,onMouseUp:Y,onMouseDown:Z,onClick:q,onMouseOver:j,onMouseOut:X,onMouseEnter:Q,onMouseLeave:J,onDoubleClick:ee,onKeyDown:re,onKeyPress:ae,onKeyUp:ne,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},z.remove&&f.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:F,"aria-label":F,onClick:te},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})),e.head&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-left":"caret-alt-right",icon:"rtl"===x?d.caretAltLeftIcon:d.caretAltRightIcon})),z.resize&&e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-n",ref:M}),f.createElement("span",{className:"k-resize-handle k-resize-s",ref:N})),z.resize&&!e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-w",ref:_}),f.createElement("span",{className:"k-resize-handle k-resize-e",ref:A})),e.resizeHint&&f.createElement(f.Fragment,null,f.createElement("div",{className:"k-marquee-color",style:{borderColor:W,backgroundColor:W}}),f.createElement("div",{className:"k-marquee-text"},!e.tail&&f.createElement("div",{className:"k-label-top"},L.formatDate(e.zonedStart,e.format)),!e.head&&f.createElement("div",{className:"k-label-bottom"},L.formatDate(e.zonedEnd,e.format)))))});ba.displayName="KendoReactSchedulerItem";const Ia=f.forwardRef((e,t)=>{const r=f.useMemo(()=>n.classNames("k-event-template",e.className),[e.className]);return f.createElement("div",{ref:t,...e,className:r})}),wa=(e,t)=>{const{element:r}=e;f.useEffect(()=>{if(!r||!e.syncHeight)return;const t=[[]];Array.from(r.querySelectorAll(e.selector)).filter(t=>!t.classList.contains((e=>e.slice(1,e.length))(e.applyTo))).forEach(r=>{const a=r.clientHeight,n=r.getAttribute(e.horizontalAttribute),l=r.getAttribute(e.verticalAttribute);null===n||null===l||(t[n]||(t[n]=[]),(!t[n][l]||a>t[n][l])&&(t[n][l]=a-1))}),Array.from(r.querySelectorAll(e.applyTo)).forEach(r=>{const a=r.getAttribute(e.horizontalAttribute),n=r.getAttribute(e.verticalAttribute);if(null===a||null===n)return;const l=I(r),o=Math.round(t[a][n]-l);w(r,{height:o},!0)})},t)},Ta=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null),p=fa(e.editable);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const g=r||Ra.item,E=o.useInternationalization(),[h]=cr(),[y]=or(),v=te(),[D,k]=f.useState(!0),[S,C]=f.useState(!1),I=f.useRef(e.order),R=f.useRef(0),x=n.useDir(v),A=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${E.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[E,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),_=(e,t)=>{let r=1;return e.forEach(e=>{const a=t.filter(t=>M(e.current.props,t.props));a.length>r&&(r=a.length)}),r},M=(t,r)=>H(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),N=()=>{var t,r,a,n;const l=(y||[]).filter(t=>t.current&&M(t.current.props,e)),o=i.current&&i.current.element,s=T(l);if(0===l.length)return void k(!1);if(!s.current||!o)return;const c=b(s.current.element),d=[],u=[],m=[];(h||[]).forEach(e=>{e.current&&(e.current.props.dragHint?u.push(e.current):e.current.props.resizeHint?m.push(e.current):d.push(e.current))});const g=e.dragHint||e.resizeHint?((e,t,r,a=!1)=>{let n;return r.forEach(r=>{const l=[];t.sort((e,t)=>e.props.start.getTime()-t.props.start.getTime()).forEach(t=>{if((a||t.props.isAllDay===r.current.props.isAllDay)&&t.props.range.index===r.current.props.range.index&&t.props.group.index===r.current.props.group.index&&H(t.props.start,t.props.end,r.current.props.start,r.current.props.end)){const r=G(l);t===e&&void 0===n&&(n=r),l.splice(r,0,r)}})}),n})(i.current,e.dragHint?u:m,l,e.ignoreIsAllDay):null!=(t=e.order)?t:0;if(e.vertical||e.dragHint||e.resizeHint||null===e.order||void 0===e.order)I.current=g;else{const t=d.filter(e=>e.props.isAllDay);I.current=((e,t)=>{var r;const a=t.filter(e=>null!==e.props.order&&void 0!==e.props.order).map(e=>{let t=e.props.start,r=e.props.end;return e.props.isAllDay&&(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(r.getFullYear(),r.getMonth(),r.getDate())),{order:e.props.order,start:t,end:r}}),n=Array.from(new Set(a.map(e=>e.order))).sort((e,t)=>e-t),l=new Map;for(const e of a)l.has(e.order)||l.set(e.order,[]),l.get(e.order).push({start:e.start,end:e.end});const o=[],s=new Map;for(const e of n){const t=l.get(e);let r=-1;for(let e=0;e<o.length;e++)if(t.every(t=>o[e].every(e=>!H(e.start,e.end,t.start,t.end,!0)))){r=e;break}-1===r&&(r=o.length,o.push([])),o[r].push(...t),s.set(e,r)}return null!=(r=s.get(e))?r:e})(e.order,t)}let E=e.dragHint||e.resizeHint?_(l,e.dragHint?u:m):_(l,d);const v=((e,t)=>e.map(e=>t.filter(t=>M(e.current.props,t.props))))(l,d);let f=0;const D=!e.vertical&&null!==I.current;if(v.forEach(t=>{let r=0;t.forEach(t=>{if(H(t.props.start,t.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&t._maxSiblingsPerSlot&&t._maxSiblingsPerSlot>E&&t.element!==o&&(E=t._maxSiblingsPerSlot),!D){const e=b(t.element);null!==t.props.order&&void 0!==t.props.order&&t.props.order<I.current&&(r=e.top+e.height-c.top-1*I.current+1)}}),r>f&&(f=r)}),D){const t=null==(r=e.style)?void 0:r.height,a="number"==typeof t?t:25;f=I.current*(a+1)}if(0===l.length)return void k(!1);const S=p.add?20:0;c.width=e.vertical?c.width/E-1-S/E:c.width*l.length-1,e.vertical?c.height=c.height*l.length-1:(e.resizeHint||e.dragHint)&&E<=1||(c.height=null!=(n=null==(a=e.style)?void 0:a.height)?n:25),c.left=e.vertical?c.left+I.current*c.width+1*I.current:c.left,c.top=e.vertical?c.top:c.top+f+1*I.current,R.current=E,w(o,c),C(!0),k(!0)},z=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{N()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[N]);f.useEffect(N);const L=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return wa({element:L,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!v.current)return;const e=window.ResizeObserver,t=e&&new e(z);return t&&t.observe(v.current),()=>{t&&t.disconnect()}},[z,v]),f.createElement(g,{...s,_ref:i,_maxSiblingsPerSlot:R,_order:I,itemRef:i,style:{visibility:S?void 0:"hidden",display:D?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-right":"caret-alt-left",icon:"rtl"===x?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon})),!e.resizeHint&&f.createElement("div",{title:A},!e.isAllDay&&f.createElement(Ia,{className:"k-event-time"},A),f.createElement(Ia,null,e.title)))}),Ra={item:ba};Ta.displayName="KendoReactSchedulerViewItem";const xa=(e,{dateRange:t,fields:r,timezone:a})=>e.map(Aa(r)).reduce(_a(t,a,r),[]).filter(e=>!O(e.dataItem,r)),Aa=e=>t=>({uid:n.getter(e.id||"id")(t),start:n.getter(e.start||"start")(t),startTimezone:n.getter(e.startTimezone||"startTimezone")(t),originalStart:n.getter(e.originalStart||"originalStart")(t),end:n.getter(e.end||"end")(t),endTimezone:n.getter(e.endTimezone||"endTimezone")(t),isAllDay:n.getter(e.isAllDay||"isAllDay")(t),title:n.getter(e.title||"title")(t),description:n.getter(e.description||"description")(t),occurrenceId:n.getter("occurrenceId")(t),recurrenceRule:n.getter(e.recurrenceRule||"recurrenceRule")(t),recurrenceExceptions:n.getter(e.recurrenceExceptions||"recurrenceExceptions")(t),recurrenceId:n.getter(e.recurrenceId||"recurrenceId")(t),dataItem:n.clone(t)}),_a=(e,t,r)=>(a,n)=>[...a,...n.recurrenceRule&&(null===n.recurrenceId||void 0===n.recurrenceId)&&O(n.dataItem,r)?[...Ma(n,{dateRange:e,timezone:t,fields:r})]:[n]],Ma=(e,{dateRange:t,timezone:r,fields:l})=>{const o=e.recurrenceRule,s=y.parseRule({recurrenceRule:o});if(!s)return[];s.start||(s.start=a.ZonedDate.fromLocalDate(e.start,r)),s.end||(s.end=a.ZonedDate.fromLocalDate(e.end,r));const c=e.recurrenceExceptions;c&&(s.exceptionDates=c.map(e=>a.ZonedDate.fromLocalDate(e,r)));const i=t.zonedStart,d=t.zonedEnd,u=y.expand(s,{rangeStart:i,rangeEnd:d});return u.events.length?u.events.map((t,r)=>{const a=n.clone(e),o=n.clone(e.dataItem);return a.recurrenceId=a.uid,M(o,l.recurrenceId,e.uid),a.originalStart=t.start.toLocalDate(),M(o,l.originalStart,t.start.toLocalDate()),a.start=t.start.toLocalDate(),M(o,l.start,t.start.toLocalDate()),a.end=t.end.toLocalDate(),M(o,l.end,t.end.toLocalDate()),a.occurrenceId=String(r),M(o,"occurrenceId",String(r)),a.dataItem=o,a}):[]},Na=(e,{timezone:t},{groups:r,ranges:n})=>{const o=[];return l.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach(e=>{r.forEach(l=>{const s=1===r.length?za(e,l):l;Oa(e,s)&&n.forEach(r=>{if(Fa(e,r)){const n=f.createRef(),l=f.createRef(),c=r.end<e.end,i=e.start<r.start,d=a.ZonedDate.fromLocalDate(e.start,t),u=a.ZonedDate.fromLocalDate(e.end,t),m={...e,_ref:l,itemRef:n,head:c,tail:i,order:null,zonedStart:d,zonedEnd:u,group:s,range:r,slots:[],isRecurring:!!e.recurrenceRule,isException:!e.recurrenceRule&&null!==e.recurrenceId&&void 0!==e.recurrenceId,isAllDay:!!e.isAllDay};o.push(m)}})})}),o},za=(e,t)=>({index:0,resources:t.resources.filter(t=>La(e,t))}),La=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some(e=>t[t.valueField]===e):e.dataItem[t.field]===t[t.valueField],Oa=(e,t)=>!t.resources.some(t=>t.multiple?!e.dataItem[t.field].some(e=>t[t.valueField]===e):e.dataItem[t.field]!==t[t.valueField]),Fa=(e,t)=>H(t.start,t.end,e.start,e.end)&&(void 0===t.isAllDay||!!e.isAllDay==!!t.isAllDay),Pa=e=>{const t=nr(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=or(),s=e.viewItem||Ha.viewItem,c=f.useMemo(()=>xa([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l,n,r]),i=f.useMemo(()=>Na(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>f.createElement(s,{key:r,...t,item:e.item,dragHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})))},Ha={viewItem:Ta,item:ba};Pa.displayName="KendoReactSchedulerDrag";const Wa=e=>{const t=nr(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=or(),s=e.viewItem||Ka.viewItem,c=f.useMemo(()=>xa([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l.start.getTime(),l.end.getTime(),n,r]),i=f.useMemo(()=>Na(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>{var a;return f.createElement(s,{key:r,...t,format:e.format,item:null!=(a=e.item)?a:Ka.item,resizeHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})}))},Ka={viewItem:Ta,item:ba};Wa.displayName="KendoReactSchedulerResize";const Va=f.createContext([null]);Va.displayName="SchedulerEditItemPropsContext";const Ga=f.createContext([null,n.noop,n.noop]);Ga.displayName="SchedulerEditItemFormItemContext";const Ba=f.createContext([null,n.noop,n.noop]);Ba.displayName="SchedulerEditItemDragItemContext";const $a=f.createContext([null,n.noop,n.noop]);$a.displayName="SchedulerEditItemResizeItemContext";const Ua=f.createContext([null,n.noop,n.noop]);Ua.displayName="SchedulerEditItemRemoveItemContext";const Za=f.createContext([!1,n.noop,n.noop]);Za.displayName="SchedulerEditItemShowRemoveDialogContext";const qa=f.createContext([!1,n.noop,n.noop]);qa.displayName="SchedulerEditItemShowOccurrenceDialogContext";const Ya=({props:e,form:t,drag:r,resize:a,remove:n,showRemoveDialog:l,showOccurrenceDialog:o,children:s})=>f.createElement(Va.Provider,{value:e},f.createElement(Ga.Provider,{value:t},f.createElement(Ba.Provider,{value:r},f.createElement($a.Provider,{value:a},f.createElement(Ua.Provider,{value:n},f.createElement(Za.Provider,{value:l},f.createElement(qa.Provider,{value:o},s)))))));var ja=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(ja||{});var Xa=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(Xa||{});var Qa=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(Qa||{});var Ja=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(Ja||{});var en=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(en||{});var tn=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(tn||{});var rn=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(rn||{});const an=f.forwardRef((e,t)=>{const{_ref:r,itemRef:a,onDataAction:l,ignoreIsAllDay:o,viewItem:s,series:c,onSeriesChange:i,form:d,formItem:u,onFormItemChange:m,drag:p,dragItem:g,onDragItemChange:E,resize:h,resizeItem:y,onResizeItemChange:v,removeDialog:D,removeItem:k,onRemoveItemChange:S,occurrenceDialog:C,showOccurrenceDialog:b,onShowOccurrenceDialogChange:I,showRemoveDialog:w,onShowRemoveDialogChange:T,onFocus:R,onFocusAction:x,onMouseDown:N,onMouseDownAction:z,onMouseUp:O,onMouseUpAction:F,onClick:P,onClickAction:H,onDoubleClick:W,onDoubleClickAction:K,onRemoveClick:V,onRemoveClickAction:G,onPress:B,onPressAction:$,onDrag:U,onDragAction:Z,onRelease:q,onReleaseAction:Y,onResizePress:j,onResizePressAction:X,onResizeStartDrag:Q,onResizeStartDragAction:ee,onResizeEndDrag:te,onResizeEndDragAction:re,onResizeRelease:ae,onResizeReleaseAction:ne,onOccurrenceClick:le,onOccurrenceClickAction:oe,onSeriesClick:ce,onSeriesClickAction:ie,onKeyDown:ue,onKeyDownAction:me,onKeyUp:pe,onKeyUpAction:ge,onRemoveConfirm:Ee,onRemoveConfirmAction:he,onFormSubmit:ye,onFormSubmitAction:fe,onCancel:De,onCancelAction:Se}={...nn,...e},[be,Ie]=f.useState(e.tabIndex),we=f.useRef(null),Te=f.useRef(null),Re=n.useId();f.useImperativeHandle(we,()=>({props:e,element:Te.current&&Te.current.element})),f.useImperativeHandle(t,()=>we.current),f.useImperativeHandle(r,()=>Te.current),f.useImperativeHandle(a,()=>Te.current);const xe=s||nn.viewItem,Ae=p||nn.drag,_e=h||nn.resize,Me=d||nn.form,Ne=C||nn.occurrenceDialog,ze=D||nn.removeDialog,Le=fa(e.editable),[Oe,Fe]=ur(),[Pe,,He]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SERIES_RESET":return null;case"SERIES_SET":return t.payload;case"SERIES_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(null,c,i),[We,Ke,Ve]=((e,t)=>{const[r,a]=Ce(...t),l=se(),[o]=ve();return[r,a,(t,s)=>{let c;switch(t.type){case"FORM_ITEM_SET":c=t.payload;break;case"FORM_ITEM_RESET":c=null;break;case"FORM_ITEM_SET_MASTER":c=n.clone(L(t.payload,l,o));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&r&&(e.onDataAction.call(void 0,{type:J.update,series:e.series,dataItem:t.payload}),c=null);break;default:c=r}a(c,s)}]})({series:Pe,onDataAction:l},[null,u,m]),[Ge,Be,$e]=((e,t)=>{const r=f.useRef(0),a=f.useRef(0),l=f.useRef(0),o=f.useRef(null),[s,c]=Ce(...t),[i]=ur(),d=se(),u=de();return[s,c,t=>{switch(t.type){case"DRAG_ITEM_SET":c(t.payload);break;case"DRAG_ITEM_RESET":c(null);break;case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const r=A(t.payload.x,t.payload.y,7);if(!r||r===o.current)return;const s=n.clone(e.dataItem),u=r.getAttribute("data-slot-start"),m="true"===r.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const p=new Date(_(s,d.start)),g=Number(u)-p.getTime(),E=i.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g),a=new Date(e.current.props.end.getTime()+g);return M(t,d.start,r),M(t,d.end,a),t}).filter(Boolean);o.current=r,c([...E]);break}case"DRAG_ITEM_START":{const o=t.payload.x,s=t.payload.y;a.current=o,l.current=s;const c=A(o,s,7);if(!c)return;const i=n.clone(e.dataItem),u=c.getAttribute("data-slot-start"),m=_(i,d.start);if(null===u)return;r.current=Number(u)-new Date(m).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const s=A(t.payload.x,t.payload.y,7);if(!s||s===o.current)return;const i=n.clone(e.dataItem),m=s.getAttribute("data-slot-start"),p=s.getAttribute("data-slot-group"),g="true"===s.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&g!==e.isAllDay)return;const E=new Date(_(i,d.start)),h=new Date(_(i,d.end)).getTime()-E.getTime(),y=new Date(Number(m)-Number(r.current)),v=new Date(Number(m)-Number(r.current)+h),f=u.find(e=>e.index===Number(p));M(i,d.start,y),M(i,d.end,v),f&&u.length>1&&f.resources.forEach(e=>{e.multiple||M(i,e.field,e[e.valueField])}),o.current=s,i&&c(i);break}case"DRAG_ITEM_COMPLETE":c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:s});break;case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(s)?s.slice():n.clone(s);c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(s))t=s.map(e=>{const t=n.clone(e);return M(t,d.start,_(e,d.start)),M(t,d.end,_(e,d.end)),t});else{const e=n.clone(s);M(e,d.start,_(s,d.start)),M(e,d.end,_(s,d.end)),t=e}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}default:c(s)}}]})({dataItem:e.dataItem,ignoreIsAllDay:e.ignoreIsAllDay,isAllDay:e.isAllDay,onDataAction:l},[null,g,E]),[Ue,Ze,qe]=((e,t)=>{const r=f.useRef(null),[a,l]=Ce(...t),[o]=ur(),s=se();return[a,l,(t,c)=>{let i=a;switch(t.type){case"RESIZE_ITEM_SET":i=t.payload;break;case"RESIZE_ITEM_RESET":default:i=null;break;case"RESIZE_ITEM_START":{if(c.stopPropagation(),!i)return;const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const d=o.getAttribute("data-slot-start"),u=new Date(Number(d)),m=n.clone(e.dataItem);if(u>=_(m,s.end))return;M(m,s.start,u),r.current=o,i=m;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.start)),g=new Date(Number(m)).getTime()-p.getTime();let E=!1;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g);if(!(r>=_(t,s.end)))return M(t,s.start,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_START_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-start"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d>=u.end)return;M(u,s.start,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-end"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d<=u.start)return;M(u,s.end,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.end)),g=new Date(Number(m)).getTime()-p.getTime();let E;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.end.getTime()+g);if(!(r<=_(t,s.start)))return M(t,s.end,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_COMPLETE":case"RESIZE_ITEM_COMPLETE_OCCURRENCE":i=null,e.onDataAction&&a&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:a});break;case"RESIZE_ITEM_COMPLETE_SERIES":{let t;if(i=null,Array.isArray(a))t=a.map(e=>{const t=n.clone(e);return M(t,s.start,_(e,s.start)),M(t,s.end,_(e,s.end)),t});else{const e=n.clone(a);M(e,s.start,_(a,s.start)),M(e,s.end,_(a,s.end)),t=e}e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}}l(i)}]})({dataItem:e.dataItem,onDataAction:l},[null,y,v]),[Ye,je,Xe]=((e,t)=>{const[r,a]=Ce(...t);return[r,a,t=>{let n;switch(t.type){case"REMOVE_ITEM_SET":n=t.payload;break;case"REMOVE_ITEM_RESET":n=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&r&&e.onDataAction.call(void 0,{type:J.remove,series:e.series,dataItem:r}),n=null;break;default:n=r}a(n)}]})({series:Pe,onDataAction:l},[null,k,S]),[Qe,Je,et]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_REMOVE_DIALOG_RESET":case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_SET":return t.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,w,T),[tt,rt,at]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_OCCURRENCE_DIALOG_RESET":case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return t.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,b,I),[nt]=cr(),[,lt]=f.useContext(mr),[,ot]=gr(),st=!!(Te.current&&Oe&&Oe.some(e=>e.current===Te.current)),ct=f.useMemo(()=>({selected:st,series:Pe,formItem:We,dragItem:Ge,resizeItem:Ue,removeItem:Ye,showRemoveDialog:Qe,showOccurrenceDialog:tt}),[Ge,We,Ye,Ue,st,Pe,tt,Qe]),it=f.useMemo(()=>({[rn.set]:He,[rn.toggle]:He,[rn.reset]:He,[hr.select]:Fe,[hr.add]:Fe,[hr.remove]:Fe,[hr.reset]:Fe,[hr.selectNext]:Fe,[hr.selectPrev]:Fe,[ja.set]:Ve,[ja.setMaster]:Ve,[ja.reset]:Ve,[ja.complete]:Ve,[Qa.set]:Xe,[Qa.reset]:Xe,[Qa.complete]:Xe,[Xa.close]:at,[Xa.open]:at,[Xa.set]:at,[Xa.toggle]:at,[Xa.reset]:at,[Ja.close]:et,[Ja.open]:et,[Ja.set]:et,[Ja.toggle]:et,[Ja.reset]:et,[en.start]:$e,[en.drag]:$e,[en.complete]:$e,[en.completeOccurrence]:$e,[en.completeSeries]:$e,[en.set]:$e,[en.reset]:$e,[en.dragSelected]:$e,[tn.start]:qe,[tn.startDrag]:qe,[tn.startDragSelected]:qe,[tn.endDrag]:qe,[tn.endDragSelected]:qe,[tn.complete]:qe,[tn.completeOccurrence]:qe,[tn.completeSeries]:qe,[tn.set]:qe,[tn.reset]:qe,[br.next]:lt,[br.prev]:lt,[fr.left]:ot,[fr.right]:ot,[fr.up]:ot,[fr.down]:ot,null:()=>{}}),[$e,Ve,Fe,Xe,qe,He,at,et,lt,ot]),dt=f.useCallback(t=>{if(x){const r=x(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}R&&R.call(void 0,t)},[it,R,x,e,ct]),ut=f.useCallback(t=>{if(z){const r=z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}N&&N.call(void 0,t)},[it,N,z,e,ct]),mt=f.useCallback(t=>{if(F){const r=F(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}O&&O.call(void 0,t)},[it,O,F,e,ct]),[,pt]=f.useContext(ke),gt=f.useCallback(t=>{if(H){pt(Te.current);const r=H(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}P&&P.call(void 0,t)},[it,P,H,e,ct]),Et=f.useCallback(t=>{if(K){const r=K(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}W&&W.call(void 0,t)},[K,W,e,it,ct]),ht=f.useCallback(t=>{if(G){const r=G(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}V&&V.call(void 0,t)},[G,V,e,it,ct]),yt=f.useCallback(t=>{if($){const r=$(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}B&&B.call(void 0,t)},[$,B,e,it,ct]),vt=f.useCallback(t=>{if(Z){const r=Z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}U&&U.call(void 0,t)},[Z,U,e,it,ct]),ft=f.useCallback(t=>{if(Y){const r=Y(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}q&&q.call(void 0,t)},[Y,q,e,it,ct]),Dt=f.useCallback(t=>{if(X){const r=X(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}j&&j.call(void 0,t)},[X,j,e,ct,it]),kt=f.useCallback(t=>{if(ee){const r=ee(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Q&&Q.call(void 0,t)},[Q,ee,e,it,ct]),St=f.useCallback(t=>{if(re){const r=re(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}te&&te.call(void 0,t)},[te,re,e,it,ct]),Ct=f.useCallback(t=>{if(ne){const r=ne(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}ae&&ae.call(void 0,t)},[ne,ae,e,it,ct]),bt=f.useCallback(t=>{if(fe){const r=fe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ye&&ye.call(void 0,t)},[fe,ye,e,ct,it]),It=f.useCallback(t=>{if(Se){const r=Se(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}De&&De.call(void 0,t)},[Se,De,e,ct,it]),wt=f.useCallback(t=>{if(oe){const r=oe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}le&&le.call(void 0,t)},[oe,le,e,ct,it]),Tt=f.useCallback(t=>{if(ie){const r=ie(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ce&&ce.call(void 0,t)},[ie,ce,e,ct,it]),Rt=f.useCallback(t=>{if(me){const r=me(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}ue&&ue.call(void 0,t)},[me,ue,e,ct,it]),xt=f.useCallback(t=>{if(ge){const r=ge(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}pe&&pe.call(void 0,t)},[ge,pe,e,ct,it]),At=f.useCallback(t=>{if(he){const r=he(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}Ee&&Ee.call(void 0,t)},[he,Ee,e,ct,it]);return f.useEffect(()=>{const t=nt.length&&nt[0].current===Te.current;Ie(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===Oe.length&&t?0:void 0)},[nt,e.tabIndex,Oe.length]),f.createElement(Ya,{props:e,form:[We,Ke,Ve],drag:[Ge,Be,$e],resize:[Ue,Ze,qe],remove:[Ye,je,Xe],showRemoveDialog:[Qe,Je,et],showOccurrenceDialog:[tt,rt,at]},f.createElement(xe,{...e,_ref:Te,itemRef:Te,selected:st,tabIndex:be,id:Re,onKeyDown:Rt,onKeyUp:xt,onFocus:dt,onMouseUp:mt,onMouseDown:ut,onClick:gt,onDoubleClick:Et,onRemoveClick:ht,onPress:yt,onDrag:vt,onRelease:ft,onResizePress:Dt,onResizeEndDrag:St,onResizeStartDrag:kt,onResizeRelease:Ct}),Ge&&Le.drag&&(Array.isArray(Ge)?Ge.map((t,r)=>f.createElement(Ae,{key:r,ignoreIsAllDay:o,dataItem:t,vertical:e.vertical,viewItem:xe,item:e.item})):f.createElement(Ae,{ignoreIsAllDay:o,dataItem:Ge,vertical:e.vertical,viewItem:xe,item:e.item})),Ue&&Le.resize&&(Array.isArray(Ue)?Ue.map((t,r)=>f.createElement(_e,{key:r,format:e.format,ignoreIsAllDay:o,dataItem:t,viewItem:e.viewItem,item:e.item,vertical:e.vertical})):f.createElement(_e,{format:e.format,ignoreIsAllDay:o,dataItem:Ue,viewItem:e.viewItem,item:e.item,vertical:e.vertical})),We&&!tt&&Le.edit&&f.createElement(Me,{dataItem:We,onSubmit:bt,onClose:It,onCancel:It}),tt&&f.createElement(Ne,{dataItem:We||Ge||Ue||Ye,isRemove:null!==Ye,onClose:It,onOccurrenceClick:wt,onSeriesClick:Tt}),Qe&&Ye&&Le.remove&&f.createElement(ze,{dataItem:Ye,onClose:It,onCancel:It,onConfirm:At}))}),nn={viewItem:Ta,drag:Pa,resize:Wa,form:da,occurrenceDialog:Sa,removeDialog:Ca,onClickAction:(e,t,r)=>[{type:e.syntheticEvent.metaKey||e.syntheticEvent.ctrlKey?!r.selected||r.dragItem||r.resizeItem?hr.add:hr.remove:hr.select}],onDoubleClickAction:(e,t)=>t.editable?[{type:ja.set,payload:t.dataItem},t.isRecurring&&{type:Xa.open}].filter(Boolean):[],onRemoveClickAction:(e,t)=>t.editable?[{type:Qa.set,payload:t.dataItem},t.isRecurring?{type:Xa.open}:{type:Ja.open}]:[],onPressAction:(e,t)=>t.editable?{type:en.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?en.dragSelected:en.drag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onReleaseAction:(e,t,r)=>t.editable&&r.dragItem?t.isRecurring&&!t.isException&&null===r.series?{type:Xa.open}:{type:t.isRecurring?r.series?en.completeSeries:en.completeOccurrence:en.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizePressAction:(e,t)=>t.editable?{type:tn.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeStartDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?tn.startDragSelected:tn.startDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeEndDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?tn.endDragSelected:tn.endDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeReleaseAction:(e,t,r)=>t.editable&&r.resizeItem?t.isRecurring&&!t.isException&&null===r.series?{type:Xa.open}:{type:t.isRecurring?r.series?tn.completeSeries:tn.completeOccurrence:tn.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onOccurrenceClickAction:(e,t,r)=>r.dragItem?[{type:en.completeOccurrence},{type:Xa.close}]:r.resizeItem?[{type:tn.completeOccurrence},{type:Xa.close}]:r.formItem?[{type:rn.set,payload:!1},{type:ja.set,payload:t.dataItem},{type:Xa.close}]:r.removeItem?[{type:rn.set,payload:!1},{type:Qa.set,payload:t.dataItem},{type:Ja.open},{type:Xa.close}]:[],onSeriesClickAction:(e,t,r)=>r.dragItem?[{type:en.completeSeries},{type:Xa.close}]:r.resizeItem?[{type:tn.completeSeries},{type:Xa.close}]:r.formItem?[{type:rn.set,payload:!0},{type:ja.setMaster,payload:t.dataItem},{type:Xa.close}]:r.removeItem?[{type:rn.set,payload:!0},{type:Qa.set,payload:t.dataItem},{type:Ja.open},{type:Xa.close}]:[],onKeyDownAction:(e,t)=>{switch(e.syntheticEvent.keyCode){case n.Keys.enter:return[{type:ja.set,payload:t.dataItem},t.isRecurring&&{type:Xa.open}];case n.Keys.tab:return[{type:e.syntheticEvent.shiftKey?br.prev:br.next,ignoreIsAllDay:t.ignoreIsAllDay},{type:e.syntheticEvent.shiftKey?hr.selectPrev:hr.selectNext,ignoreIsAllDay:t.ignoreIsAllDay}];case n.Keys.up:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:fr.up,slot:t.slots[0]._ref}];case n.Keys.right:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:fr.right,slot:t.slots[0]._ref}];case n.Keys.down:return[!(!t.slots.length||!t.slots[t.slots.length-1]._ref.current)&&{type:fr.down,slot:t.slots[t.slots.length-1]._ref}];case n.Keys.left:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:fr.left,slot:t.slots[0]._ref}];default:return}},onFormSubmitAction:e=>[{type:ja.complete,payload:e.value}],onRemoveConfirmAction:()=>[{type:Qa.complete},{type:Xa.close}],onCancelAction:()=>[{type:rn.reset},{type:Qa.reset},{type:ja.reset},{type:en.reset},{type:tn.reset},{type:Ja.reset},{type:Xa.reset}]};an.displayName="KendoReactSchedulerEditItem";const ln=e=>{const[t,r]=f.useState(!1),l=te(),o=ae(),s=f.useRef(void 0),c=f.useRef(null),i=f.useRef(null),d=e.updateInterval||on.updateInterval,[,u]=f.useState(!1),m=n.useDir(i,!0===o.rtl?"rtl":void 0),[p]=or(),g=f.useCallback(()=>{if(!p)return;const t=p.filter(t=>t.current&&(void 0===e.groupIndex||null===e.groupIndex||t.current.props.group.index===e.groupIndex)&&(e.vertical?H(new Date,new Date,t.current.props.start,t.current.props.end,!0):K(new Date,t.current.props.start,t.current.props.end))&&!t.current.props.isAllDay);if(t&&t.length&&c.current&&i.current){const n=T(t);if(!n.current)return;const l=e.vertical?(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.height}}),t})(t):(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.width}}),t})(t),o=b(n.current.element),s=b(c.current),d=(e.vertical?o.width:o.height)/(n.current.props.end.getTime()-n.current.props.start.getTime()),u=(Date.now()-((e,t)=>{const r=a.cloneDate(e);return r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r})(new Date,n.current.props.start).getTime())*d,p="rtl"===m,g=e.vertical?o.top:o.top+u-s.height/2,E=p?"right":"left",h=e.vertical?o[E]+u-s.width/2:o[E];e.vertical?c.current.style[E]=`${h}px`:c.current.style.top=`${g}px`,i.current.style[E]=`${h}px`,i.current.style.top=`${g}px`,i.current.style[e.vertical?"height":"width"]=l-1+"px",r(!0)}else r(!1)},[p,e.groupIndex,e.vertical,m]),E=f.useCallback(()=>{g(),u(e=>!e)},[g]);f.useEffect(()=>{if(!l.current||!window)return;clearInterval(s.current),s.current=window.setInterval(E,d);const e=window.ResizeObserver,t=e&&new e(E);return t&&t.observe(l.current),()=>{clearInterval(s.current),t&&t.disconnect()}},[g,E,l,d]),f.useEffect(g);const h=f.createElement("div",{ref:c,className:n.classNames("k-current-time",{"k-current-time-arrow-right":!e.vertical&&"rtl"!==m,"k-current-time-arrow-left":!e.vertical&&"rtl"===m,"k-current-time-arrow-down":e.vertical}),style:{transform:e.vertical?"rtl"===m?"translateX(50%)":"translateX(-50%)":"translateY(-50%)",visibility:t?void 0:"hidden"}});return f.createElement(f.Fragment,null,e.attachArrow&&e.attachArrow.current?D.createPortal(h,e.attachArrow.current):h,f.createElement("div",{className:"k-current-time",ref:i,style:{transform:e.vertical?"translateX(-50%)":"translateY(-50%)",[e.vertical?"width":"height"]:"1px",visibility:t?void 0:"hidden"}}))},on={updateInterval:6e4},sn=f.forwardRef((e,t)=>{const{as:r=cn.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==cn.as?void 0:l,...a,className:i},f.createElement("span",{className:"k-link k-nav-day"},c.formatDate(e.date,e.format?e.format:cn.format)))}),cn={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"d"};sn.displayName="KendoReactSchedulerDateHeaderCell";const dn=(e,{step:t,timezone:r})=>{const n=[],l=a.ZonedDate.fromLocalDate(e.start,r),o=a.ZonedDate.fromLocalDate(e.end,r);for(let e=l.clone(),r=0;e.getTime()<o.getTime();r++,e=e.addTime(t)){const a=e.clone(),l=a.clone().addTime(t),o=new Date(a.getTime()),s={index:r,end:new Date(l.getTime()),start:o,zonedStart:a,zonedEnd:l};n.push(s)}return n},un=(e,{step:t},{groups:r,ranges:n})=>{const l=[];return r.forEach(e=>{n.forEach(r=>{const n=r.zonedStart,o=r.zonedEnd,s=o.timezoneOffset-n.timezoneOffset;for(let c=n.clone(),i=0,d=s<0?s*Y*-1:0;c.getTime()<o.getTime();){const n=f.createRef(),o=c.clone(),s=c.addTime(t),u=(s.timezoneOffset-o.timezoneOffset)*Y,m=t<=Math.abs(u);d&&m&&(d-=t,c=c.addTime(-t));const p=new Date(o.getTime()),g={_ref:n,index:i,end:new Date(s.getTime()),start:p,zonedStart:o,zonedEnd:s,range:r,group:e,items:[],isAllDay:a.MS_PER_DAY<=t};l.push(g),c=c.addTime(t),i++}})}),l},mn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),pn=e=>{var t,r,l,s,c,i,d,u,m,p,g;const{group:E,timezone:h,resources:y}=ae(),v=o.useInternationalization(),D=e.editItem||an,k=e.editSlot||Da,S=e.showWorkHours,C=null!=(t=e.numberOfDays)?t:gn.numberOfDays,b=null!=(r=e.slotDivisions)?r:gn.slotDivisions,I=null!=(l=e.slotDuration)?l:gn.slotDuration,w=null!=(s=e.workWeekStart)?s:gn.workWeekStart,x=null!=(c=e.workWeekEnd)?c:gn.workWeekEnd,A=!1!==e.currentTimeMarker&&gn.currentTimeMarker,_=v.parseDate(null!=(d=null!=(i=e.workDayStart)?i:e.isWorkDayStart)?d:gn.isWorkDayStart),M=v.parseDate(null!=(m=null!=(u=e.workDayEnd)?u:e.isWorkDayEnd)?m:gn.isWorkDayEnd),N=v.parseDate(null!=(p=e.startTime)?p:gn.startTime),z=v.parseDate(null!=(g=e.endTime)?g:gn.endTime),[L]=ve(),O=de(),F=ge(),P=se(),W=me(),G=f.useMemo(()=>S?_:N,[S,_,N]),U=f.useMemo(()=>S?M:z,[S,M,z]),Z=f.useMemo(()=>dn(W,{step:a.MS_PER_DAY*C,timezone:h}).map(e=>({...e,isAllDay:!0})),[W.start.getTime(),W.end.getTime(),C]),q=f.useMemo(()=>dn(W,{step:a.MS_PER_DAY,timezone:h}).map(e=>({...e,isAllDay:!1})),[W.start.getTime(),W.end.getTime(),h]),j=f.useMemo(()=>un(0,{step:a.MS_PER_DAY},{groups:O,ranges:Z}),[W.start.getTime(),W.end.getTime(),h,Z,O]),X=f.useMemo(()=>un(0,{step:I*Y/b},{groups:O,ranges:q}).filter(e=>U.getTime()===G.getTime()||K(e.zonedStart,G,U)),[W.start.getTime(),W.end.getTime(),I,b,G.getTime(),U.getTime(),O,q]),Q=f.useMemo(()=>xa(L,{dateRange:W,fields:P,timezone:h}),[L,W.start.getTime(),W.end.getTime(),P,h]),J=f.useMemo(()=>Q.filter(e=>e.isAllDay),[Q]),ee=f.useMemo(()=>Q.filter(e=>!e.isAllDay),[Q]),te=f.useMemo(()=>Na(J,{timezone:h},{groups:O,ranges:Z}),[Q,h,O,Z]),re=f.useMemo(()=>Na(ee,{timezone:h},{groups:O,ranges:q}).filter(e=>G.getTime()===U.getTime()||K(e.zonedStart,G,U)||K(e.zonedEnd,G,U)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),G,U)),[Q,h,O,q,G.getTime(),U.getTime()]);f.useMemo(()=>$(te,j,!1),[te,j]),f.useMemo(()=>B(te,j,!1),[te,j]),f.useMemo(()=>$(re,X,!1),[re,X]),f.useMemo(()=>B(re,X,!1),[re,X]);const ne=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},q.map((t,r)=>f.createElement(sn,{as:e.dateHeaderCell,key:r,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),h),start:t.start,end:t.end,format:{skeleton:"MEd"}})))),le=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{key:t,className:"k-scheduler-row"},Z.map((r,a)=>j.filter(e=>e.group.index===t&&e.range.index===a).map((r,a,n)=>f.createElement(k,{...r,onDataAction:e.onDataAction,form:e.form,slot:e.slot,viewSlot:e.viewSlot,key:`${r.start.getTime()}:${r.group.index}`,row:0,col:"horizontal"===F?n.length*(t||0)+a:a,isWorkDay:0<=r.zonedStart.getDay()+(C-w)&&(r.zonedStart.getDay()+(C-w))%C<=x+(C-w),expandable:!0}))))),oe=f.useMemo(()=>n.classNames("week"===e.name?"k-scheduler-weekview":"k-scheduler-dayview",e.className),[e.name,e.className]),ce=f.useCallback((t,r,a)=>q.map((n,l)=>X.filter(e=>e.index===t.index&&e.range.index===l&&e.group.index===a).map(t=>f.createElement(k,{key:`${t.start.getTime()}:${t.group.index}`,...t,onDataAction:e.onDataAction,slot:e.slot,viewSlot:e.viewSlot,form:e.form,row:r+1,col:q.length*(a||0)+l,isWorkHour:K(t.zonedStart,_,M),isWorkDay:V(t.zonedEnd.getDay(),w,x),editable:e.editable}))),[q,k,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,X,M,_,x,w]),ie=f.useCallback((t,r,a)=>j.filter(e=>e.group.index===r&&e.range.index===a).map((a,n)=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,...a,onDataAction:e.onDataAction,key:`${a.start.getTime()}:${a.group.index}`,className:"k-scheduler-alldays-slot",row:t*(r||0)+1*(r||0),col:n,expandable:!0})),[k,j,e.form,e.onDataAction,e.slot,e.viewSlot]),ue=f.useCallback((t,r,a,n)=>q.map((l,o)=>X.filter(e=>e.index===t.index&&e.group.index===a&&e.range.index===o).map(t=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,onDataAction:e.onDataAction,...t,key:`${t.start.getTime()}:${t.group.index}`,row:r.length*(a||0)+n+1*(a||0)+1,col:o,editable:e.editable,isWorkHour:K(t.zonedStart,_,M),isWorkDay:0<=t.zonedStart.getDay()+(C-w)&&(t.zonedStart.getDay()+(C-w))%C<=x+(C-w)}))),[k,C,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,q,X,M,_,x,w]);return f.createElement(Ir,{id:e.id,props:e,style:e.style,className:oe,ranges:[...Z,...q],slots:[...j,...X]},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===F?f.createElement(f.Fragment,null,f.createElement(Tr,{nested:!0,group:E,resources:y,rowContent:_r,childRowContent:_r},ne),f.createElement(Tr,{group:E,resources:y,rowContent:Wr,childRowContent:Wr},le),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,vertical:!1}))):f.createElement(Mr,{group:E,resources:y,cellContent:mn},ne)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===F?f.createElement(f.Fragment,null,X.filter(e=>0===e.group.index&&0===e.range.index).map((t,r)=>f.createElement(f.Fragment,{key:t.index},f.createElement(Tr,{nested:!1,group:E,resources:y,rowContent:Gr,rowContentProps:{timeHeaderCell:e.timeHeaderCell,isMaster:r%b===0,isLast:(r+1)%b===0,slot:t}},f.createElement(wr.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:n.classNames("k-scheduler-row",{"k-middle-row":(r+1)%b!==0})},ce(t,r,e)))))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(ln,null)):f.createElement(f.Fragment,null,f.createElement(Mr,{nested:!0,group:E,resources:y},f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"k-scheduler-row"},f.createElement(Wr,{groupIndex:t},Z.map((e,r)=>{const a=X.filter(e=>e.group.index===t&&0===e.range.index).length;return ie(a,t,r)}))),X.filter(e=>e.group.index===t&&0===e.range.index).map((r,a,n)=>f.createElement("div",{className:"k-scheduler-row",key:r.index},f.createElement(Gr,{slot:r,isMaster:a%b===0,isLast:(a+1)%b===0,timeHeaderCell:e.timeHeaderCell},ue(r,n,t,a)))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(ln,{groupIndex:t})))),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!1}))),re.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!0}))))},gn={name:"multi-day",title:"Multi Day",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"23:59",isWorkDayStart:"08:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,showCurrentTime:!0,defaultShowWorkHours:!0};pn.propTypes={currentTimeMarker:r.bool,name:r.string,numberOfDays:r.number,startTime:r.string,endTime:r.string,workDayStart:r.string,workDayEnd:r.string,workWeekStart:r.number,workWeekEnd:r.any,slotDivisions:r.number,slotDuration:r.number,showWorkHours:r.bool,selectedDateFormat:r.string,selectedShortDateFormat:r.string},pn.displayName="KendoReactSchedulerMultiDayView";const En=e=>f.createElement(pn,{...e}),hn={...gn,name:"day",title:e=>e.toLanguageString(Le,Xt[Le]),numberOfDays:1,slotDuration:60,slotDivisions:2,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};En.displayName="KendoReactSchedulerDayView";const yn=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1607496606,version:"14.5.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"}),vn=f.forwardRef((e,t)=>{const{_ref:r,onRemoveClick:a}=e,l=f.useRef(null),s=f.useRef(null);f.useImperativeHandle(l,()=>({props:e,element:s.current})),f.useImperativeHandle(t,()=>l.current),f.useImperativeHandle(r,()=>l.current);const c=fa(e.editable),i=o.useLocalization().toLanguageString(Fe,Xt[Fe]),u=e.group.resources.find(e=>!(!e.colorField||void 0===e[e.colorField])),m=u&&u.colorField&&u[u.colorField],p=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:l.current})},[a,l]),g=f.useMemo(()=>n.classNames("k-task",e.className),[e.className]);return f.createElement("div",{id:e.id,ref:s,style:e.style,className:g,tabIndex:e.tabIndex||void 0},m&&f.createElement("span",{className:"k-scheduler-mark",style:{color:m,backgroundColor:m}}),e.isRecurring&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),e.title,c.remove&&f.createElement("a",{className:"k-link k-event-delete",title:i,"aria-label":i,onClick:p},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})))});vn.displayName="KendoReactSchedulerTask";const fn=f.forwardRef((e,t)=>{const{task:r,_ref:a,...n}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({props:e,element:l.current&&l.current.element})),f.useImperativeHandle(a,()=>l.current),f.useImperativeHandle(t,()=>o.current);const s=r||Dn.task;return f.createElement(s,{...n,_ref:l})}),Dn={task:vn};fn.displayName="KendoReactSchedulerViewTask";const kn=f.createContext([null]),Sn=f.createContext([!1]),Cn=f.createContext([!1]),bn=e=>f.createElement(kn.Provider,{value:e.remove},f.createElement(Sn.Provider,{value:e.showRemoveDialog},f.createElement(Cn.Provider,{value:e.showOccurrenceDialog},e.children))),In=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewTask:n,removeDialog:l,removeItem:o,onRemoveItemChange:s,occurrenceDialog:c,showOccurrenceDialog:i,onShowOccurrenceDialogChange:d,showRemoveDialog:u,onShowRemoveDialogChange:m,...p}=e,g=f.useRef(null);f.useImperativeHandle(g,()=>({props:e,element:g.current&&g.current.element})),f.useImperativeHandle(r,()=>g.current),f.useImperativeHandle(t,()=>g.current);const E=n||wn.viewTask,h=c||wn.occurrenceDialog,y=l||wn.removeDialog,v=fa(e.editable),D=se(),[k,S]=ve(),[C,b]=f.useState(null),[I,w]=Ce(null,o,s),[T,R]=Ce(!1,u,m),[x,A]=Ce(!1,i,d),_=f.useCallback(t=>{v.remove&&(w(e.dataItem,t),e.isRecurring?A(!0,t):R(!0,t))},[w,e.dataItem,e.isRecurring,A,R]),M=f.useCallback(e=>{b(null),w(null,e),R(!1,e),A(!1,e)},[b,w,R,A]),N=f.useCallback(e=>{a&&I&&a.call(void 0,{type:J.remove,series:C,dataItem:I}),w(null,e),R(!1,e)},[I,S,R]),z=f.useCallback((e,t)=>{w&&w(e,t)},[w]),O=f.useCallback((e,t)=>{R&&R(e,t)},[R]),F=f.useCallback((e,t)=>{A&&A(e,t)},[A]),P=f.useCallback(t=>{I&&(b(!1),w(e.dataItem,t),R(!0,t)),A(!1,t)},[b,e.dataItem,I,w,R]),H=f.useCallback(e=>{if(I){b(!0);const t=L(I,D,k);w(t,e),R(!0,e)}A(!1,e)},[D,I,b,w,R,A]);return f.createElement(bn,{remove:[I,z],showRemoveDialog:[T,O],showOccurrenceDialog:[x,F]},f.createElement(E,{_ref:g,...p,onRemoveClick:_}),x&&f.createElement(h,{dataItem:I,isRemove:null!==I,onClose:M,onOccurrenceClick:P,onSeriesClick:H}),T&&f.createElement(y,{dataItem:I,onClose:M,onCancel:M,onConfirm:N}))}),wn={viewTask:fn,occurrenceDialog:Sa,removeDialog:Ca};In.displayName="KendoReactSchedulerEditTask";const Tn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editTask||In,c=e.editSlot||Da,i=f.useRef(null),u=n.useDir(i),m=o.useInternationalization(),p=o.useLocalization(),[g]=ve(),E=de(),h=se(),y=me(),v=f.useMemo(()=>dn(y,{step:a.MS_PER_DAY,timezone:r}),[y.start.getTime(),y.end.getTime(),r]),D=f.useMemo(()=>un(0,{step:a.MS_PER_DAY},{groups:E,ranges:v}),[y.start.getTime(),y.end.getTime(),r,E,v]),k=f.useMemo(()=>xa(g,{dateRange:y,fields:h,timezone:r}),[g,y.start.getTime(),y.end.getTime(),h,r]),S=f.useMemo(()=>Na(k,{timezone:r},{groups:E,ranges:v}),[k,r,E,v]),C=f.useMemo(()=>n.classNames("k-scheduler-agendaview",e.className),[e.className]);return vr({element:i,selector:".k-scheduler-datecolumn",explicitDepth:!1}),vr({element:i,selector:".k-scheduler-timecolumn",explicitDepth:!1}),f.useMemo(()=>$(S,D,!0),[S,D]),f.useMemo(()=>B(S,D,!0),[S,D]),f.createElement(Ir,{ref:i,id:e.id,style:e.style,className:C,props:e,slots:S,ranges:v},f.createElement("div",{className:"k-scheduler-head"},f.createElement(Mr,{resources:l,group:t},f.createElement(wr.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:"k-scheduler-row",key:e},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},p.toLanguageString(Gt,Xt[Gt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},p.toLanguageString(Bt,Xt[Bt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},p.toLanguageString($t,Xt[$t])))))),f.createElement("div",{className:"k-scheduler-body"},f.createElement(Mr,{resources:l,group:t,nested:!0},f.createElement(wr.Consumer,null,({groupIndex:t})=>D.filter(e=>e.group.index===(t||0)).map((r,a,l)=>f.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${t}:${a}`},f.createElement(c,{...r,editable:e.editable,row:l.length*(t||0)+a,col:0,slot:e.slot,viewSlot:e.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},f.createElement("div",null,f.createElement("strong",{className:"k-scheduler-agendaday"},m.formatDate(r.zonedStart,"dd")),f.createElement("em",{className:"k-scheduler-agendaweek"},m.formatDate(r.zonedStart,"EEEE")),f.createElement("span",{className:"k-scheduler-agendadate"},m.formatDate(r.zonedStart,"y")))),f.createElement("div",{className:"k-scheduler-cell k-group-content"},r.items.length?r.items.map((t,r)=>f.createElement("div",{className:"k-scheduler-row",key:r},f.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},f.createElement("div",null,t.tail&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-right":"caret-alt-left",icon:"rtl"===u?d.caretAltRightIcon:d.caretAltLeftIcon}),t.isAllDay?p.toLanguageString(xe,Xt[xe]):Rn(m,t),t.head&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-left":"caret-alt-right",icon:"rtl"===u?d.caretAltLeftIcon:d.caretAltRightIcon}))),f.createElement("div",{className:"k-scheduler-cell"},f.createElement(s,{key:`${a}:${r}`,...t,onDataAction:e.onDataAction,task:e.task,viewTask:e.viewTask,editable:e.editable})))):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},p.toLanguageString(Yt,Xt[Yt])))))))))},Rn=(e,t)=>{let r="{0:t}-{1:t}";return t.head?r="{0:t}":t.tail&&(r="{1:t}"),e.format(r,t.zonedStart,t.zonedEnd)},xn={name:"agenda",title:e=>e.toLanguageString(ze,Xt[ze]),dateRange:({intl:e,date:t,numberOfDays:r=1,timezone:n})=>{const l=a.ZonedDate.fromLocalDate(t,n),o=(e=>a.getDate(e))(7===r?a.firstDayInWeek(l,e.firstDay()):l),s=((e,t)=>a.getDate(a.addDays(e,t||1)))(o,r),c=a.ZonedDate.fromUTCDate(z(o),n),i=a.ZonedDate.fromUTCDate(z(s),n);return{start:new Date(c.getTime()),end:new Date(i.getTime()),zonedStart:c,zonedEnd:i}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:1440,slotDivision:1,numberOfDays:7},An={title:r.any};Tn.propTypes=An,Tn.displayName="KendoReactSchedulerAgendaView";const _n=f.forwardRef((e,t)=>{const r=f.useRef(null),a=f.useRef(null),n=o.useLocalization();f.useImperativeHandle(r,()=>({element:a.current&&a.current.element,...e})),f.useImperativeHandle(t,()=>r.current);const l=f.useCallback(t=>{!e.onClick||!r.current||e.onClick.call(void 0,{target:r.current,syntheticEvent:t})},[r,e.slot,e.onClick]),c=n.toLanguageString(jt,Xt[jt]);return f.createElement(s.Button,{ref:a,tabIndex:-1,className:"k-more-events",onClick:l,"aria-label":c,icon:"more-horizontal",svgIcon:d.moreHorizontalIcon})});_n.displayName="KendoReactSchedulerShowMoreItemsButton";const Mn={skeleton:"dd"},Nn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editItem||an,c=e.editSlot||Da,[i]=ve(),[d,u]=he(),[,m]=De(),p=le(),g=de(),E=ge(),h=me(),y=o.useInternationalization(),v=se(),D=e.itemsPerSlot||zn.itemsPerSlot,k=f.useMemo(()=>dn(h,{step:7*a.MS_PER_DAY,timezone:r}),[h.start.getTime(),h.end.getTime(),r]),S=f.useMemo(()=>un(0,{step:a.MS_PER_DAY},{groups:g,ranges:k}),[h.start.getTime(),h.end.getTime(),g,k]),C=f.useMemo(()=>xa(i,{dateRange:h,fields:v,timezone:r}),[i,h.start.getTime(),h.end.getTime(),v,r]),b=f.useMemo(()=>Na(C,{timezone:r},{groups:g,ranges:k}),[C,r,g,k]),I=f.useCallback(e=>{const t=p.find(e=>"day"===e.props.name);!m||!t||!t.props.name||!e.target.slot||(m(t.props.name,e),u(e.target.slot.start,e))},[m,p]);f.useMemo(()=>$(b,S,!0),[b,S]),f.useMemo(()=>B(b,S,!0),[b,S]);const w=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},S.filter(e=>e.group.index===t&&0===e.range.index).map((t,n)=>f.createElement(sn,{as:e.dateHeaderCell,key:n,"data-dayslot-index":n,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),r),start:t.start,end:t.end,format:{skeleton:"EEEE"}})))),T=f.createElement(wr.Consumer,null,({groupIndex:t})=>k.map((r,a)=>f.createElement("div",{className:"k-scheduler-row",key:a},S.filter(e=>e.group.index===t&&e.range.index===a).map((r,l,o)=>f.createElement(c,{slot:e.slot,viewSlot:e.viewSlot,key:l,form:e.form,...r,expandable:{offsetTop:30,offsetBottom:D<r.items.length?15:0},onDataAction:e.onDataAction,col:"horizontal"===E?o.length*(t||0)+l:l,row:"horizontal"===E?a:k.length*(t||0)+a,editable:e.editable,className:n.classNames({"k-other-month":r.start.getMonth()<d.getMonth()||r.start.getMonth()>d.getMonth()})},f.createElement("span",{className:"k-link k-nav-day"},y.formatDate(new Date(r.end.getTime()-(r.end.getTime()-r.start.getTime())/2),Mn)),D<r.items.length&&f.createElement(_n,{slot:r,onClick:I}))))));return f.createElement(Ir,{props:e,slots:S,ranges:k,className:n.classNames("k-scheduler-monthview",e.className)},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===E?f.createElement(Tr,{nested:!0,resources:l,group:t},w):f.createElement(Mr,{resources:l,group:t},w)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===E?f.createElement(Tr,{resources:l,group:t},T):f.createElement(Mr,{nested:!0,resources:l,group:t},T),b.filter(e=>null===e.order||e.order<D).sort(q).map(t=>f.createElement(s,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0}))))},zn={name:"month",dateRange:({intl:e,date:t,timezone:r})=>{const n=a.firstDayInWeek(a.firstDayOfMonth(a.getDate(t)),e.firstDay()),l=a.addDays(a.firstDayInWeek(a.lastDayOfMonth(a.getDate(t)),e.firstDay()),7),o=a.ZonedDate.fromUTCDate(z(n),r),s=a.ZonedDate.fromUTCDate(z(l),r);return{start:new Date(o.getTime()),end:new Date(s.getTime()),zonedStart:o,zonedEnd:s}},slotDuration:1440,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(Oe,Xt[Oe]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},Ln={itemsPerSlot:r.number};Nn.propTypes=Ln,Nn.displayName="KendoReactSchedulerMonthView";const On=e=>f.createElement(pn,{...e,step:7,numberOfDays:7}),Fn={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(t,r),l=(e=>a.getDate(e))(a.firstDayInWeek(n,e.firstDay())),o=((e,t)=>a.getDate(a.addDays(e,t)))(l,7),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},title:e=>e.toLanguageString(Me,Xt[Me]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};On.displayName="KendoReactSchedulerWeekView";const Pn=e=>{const t=me(),r=Math.round((t.end.getTime()-t.start.getTime())/a.MS_PER_DAY);return f.createElement(pn,{...e,step:7,numberOfDays:r})},Hn={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r,...n})=>{const l=a.ZonedDate.fromLocalDate(t,r),o=void 0!==n.workWeekStart?n.workWeekStart:a.Day.Monday,s=void 0!==n.workWeekEnd?n.workWeekEnd:a.Day.Friday,c=s<o?7+s-o+1:s-o+1,i=a.getDate(((e,t=a.Day.Sunday)=>{let r=e.clone();for(;r.getDay()!==t;)r=r.addDays(-1);return r})(l,o)),d=a.addDays(i,c),u=a.ZonedDate.fromUTCDate(z(i),r),m=a.ZonedDate.fromUTCDate(z(d),r);return{start:new Date(u.getTime()),end:new Date(m.getTime()),zonedStart:u,zonedEnd:m}},title:e=>e.toLanguageString(Ne,Xt[Ne]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Pn.displayName="KendoReactSchedulerWorkWeekView";const Wn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Kn=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},Wn),e.children),Vn=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(Re,Xt[Re]))),e.children)},Gn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=f.useRef(null),c=f.useRef(null),i=e.editItem||an,d=e.editSlot||Da,u=f.useRef(null),[m]=ve(),p=ge(),g=de(),E=me(),h=se(),y=o.useInternationalization(),v=e.showWorkHours,D=e.slotDivisions||Bn.slotDivisions,k=e.slotDuration||Bn.slotDuration,S=e.workWeekStart||Bn.workWeekStart,C=e.workWeekEnd||Bn.workWeekEnd,b=y.parseDate(e.workDayStart||e.isWorkDayStart||Bn.isWorkDayStart),I=y.parseDate(e.workDayEnd||e.isWorkDayEnd||Bn.isWorkDayEnd),w=y.parseDate(e.startTime||Bn.startTime),x=y.parseDate(e.endTime||Bn.endTime),A=f.useMemo(()=>v?b:w,[v,b,w]),_=f.useMemo(()=>v?I:x,[v,I,x]),M=f.useMemo(()=>dn(E,{step:a.MS_PER_DAY,timezone:r}),[E.start.getTime(),E.end.getTime(),r]),N=f.useMemo(()=>un(0,{step:k/D*a.MS_PER_MINUTE},{groups:g,ranges:M}).filter(e=>K(e.zonedStart,A,_)||A.getTime()===_.getTime()),[g,M,E.start.getTime(),E.end.getTime(),r,k,D,A.getTime(),_.getTime()]),L=f.useMemo(()=>xa(m,{dateRange:E,fields:h,timezone:r}),[m,E.start.getTime(),E.end.getTime(),h,r]),O=f.useMemo(()=>Na(L,{timezone:r},{groups:g,ranges:M}).filter(e=>A.getTime()===_.getTime()||K(e.zonedStart,A,_)||K(e.zonedEnd,A,_)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),A,_)),[L,r,g,M,A.getTime(),_.getTime()]);f.useMemo(()=>$(O,N,!0),[O,N]),f.useMemo(()=>B(O,N,!0),[O,N]);const F=("horizontal"===p?N.length:N.length/g.length)*((e.columnWidth||Bn.columnWidth)+1),P=f.createElement(wr.Consumer,null,()=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-row"},M.map((t,r)=>f.createElement(sn,{as:e.dateHeaderCell,key:r,date:t.zonedStart,start:t.start,end:t.end,format:"m"}))),f.createElement("div",{className:"k-scheduler-row",ref:s},M.map((t,r)=>N.filter(e=>0===e.group.index&&e.range.index===r).map(t=>t.zonedStart.getMinutes()%k===0?f.createElement(Kr,{key:t.index,as:e.timeHeaderCell,format:"t",date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd}):null))))),W=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row"},M.map((n,l)=>N.filter(e=>e.group.index===t&&e.range.index===l).map((n,o,s)=>{const c=a.ZonedDate.fromUTCDate(z(n.zonedStart),r),i=V(c.getDay(),S,C);return f.createElement(d,{key:`${n.start.getTime()}:${n.group.index}`,slot:e.slot,viewSlot:e.viewSlot,...n,form:e.form,onDataAction:e.onDataAction,isWorkHour:K(n.zonedStart,b,I),isWorkDay:i,col:"horizontal"===p?l*s.length+o+s.length*M.length*(t||0):l*s.length+o,row:"horizontal"===p?0:t||0,expandable:!0,editable:e.editable})})))),G=f.useMemo(()=>n.classNames("k-scheduler-timelineview",e.className),[e.className]);vr({element:u,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0});const U=u.current?u.current.closest(".k-scheduler-layout"):null;return wa({element:U,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:O&&!O.length}),f.createElement(Ir,{ref:u,id:e.id,style:{...e.style},className:G,props:e,slots:N,ranges:M},f.createElement("div",{className:"k-scheduler-head",style:{width:F}},"horizontal"===p?f.createElement(Tr,{nested:!0,group:t,resources:l,rowContent:Kn},P):f.createElement(Mr,{wrapGroup:!0,group:t,resources:l},P)),f.createElement("div",{className:"k-scheduler-body",style:{width:F},ref:c},"horizontal"===p?f.createElement(Tr,{group:t,resources:l,rowContent:Vn},W,f.createElement(wr.Consumer,null,({groupIndex:t})=>e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(ln,{groupIndex:t,attachArrow:s,vertical:!0}))):f.createElement(Mr,{nested:!0,wrapGroup:!0,group:t,resources:l},W),"vertical"===p&&e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(ln,{attachArrow:s,vertical:!0}),O.sort(q).map((t,r)=>f.createElement(i,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1,isLast:r===O.length-1}))))},Bn={name:"multi-day-timeline",title:"Multi Day Timeline",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100},$n=e=>f.createElement(Gn,{...e}),Un={...Bn,name:"timeline",title:e=>e.toLanguageString(_e,Xt[_e]),slotDuration:60,slotDivisions:2,numberOfDays:1,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};$n.displayName="KendoReactSchedulerTimelineView";const Zn=new Map;Zn.set(Tn,xn),Zn.set(En,hn),Zn.set(Nn,zn),Zn.set(On,Fn),Zn.set(Pn,Hn),Zn.set($n,Un);const qn=f.forwardRef((e,t)=>{var r,l,c;const i=!n.validatePackage(yn,{component:"Scheduler"}),u=n.getLicenseMessage(yn),{timezone:m,onDataChange:p}=e,g=f.useRef(null),E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e,element:g.current})),f.useImperativeHandle(t,()=>E.current);const h=n.useRtl(g),y=o.useInternationalization(),v=o.useLocalization(),{fields:D}=f.useMemo(()=>(e=>({fields:{...W,...e}}))(e.modelFields),[e.modelFields]),[C,b]=Ce(e.defaultDate||Yn.defaultDate,e.date,e.onDateChange),I=f.Children.toArray(e.children||[]).map(e=>{var t;return f.isValidElement(e)?f.cloneElement(e,{...Zn.get(e.type),...null!=(t=e.props)?t:{}}):e}),w=f.cloneElement(f.createElement(En,null),Zn.get(En)),[T,R]=Ce(e.defaultView||I[0]&&I[0].props.name||"day",e.view,e.onViewChange),[x,A]=Ce(!0),N=I.find(e=>e.props.name===T)||I[0]||w,z=(null!=(r=e.data)?r:Yn.data)||Yn.data,O=((e,t)=>{const r=S(e,t),a=k(r);return 1===a.length?[{index:0,resources:(t||[]).reduce((e,t)=>[...e,...t.data.map(e=>({...e,field:t.field,valueField:t.valueField,colorField:t.colorField,multiple:t.multiple}))],[])}]:a.map((e,t)=>({index:t,resources:e}))})(e.group,e.resources),F=e.group&&e.group.orientation?e.group.orientation:"horizontal",P=N.props.selectedDateFormat||"{0:D}",H=N.props.selectedShortDateFormat||"{0:d}",K=N.props.slotDuration,V=void 0!==N.props.dateRange?"function"==typeof N.props.dateRange?N.props.dateRange.call(void 0,{intl:y,date:C,timezone:m,numberOfDays:N.props.numberOfDays,workWeekStart:N.props.workWeekStart||y.firstDay(),workWeekEnd:N.props.workWeekEnd||(y.firstDay()+N.props.numberOfDays)%6}):N.props.dateRange:{start:Yn.defaultDate,end:Yn.defaultDate},G=f.useCallback(({created:e=[],updated:t=[],deleted:r=[]})=>{if(p){const a={created:e,updated:t,deleted:r};p.call(void 0,a)}},[p]),B=f.useCallback(e=>{const t=[e.dataItem];G({created:t})},[G]),$=f.useCallback(e=>{const t=[],r=[];if(e.series)if(Array.isArray(e.dataItem))e.dataItem.forEach(t=>{const a=n.clone(L(e.dataItem,D,z)),l=n.clone(t);M(l,D.originalStart,_(a,D.originalStart)),M(l,D.recurrenceId,_(a,D.recurrenceId)),M(l,D.recurrenceExceptions,_(a,D.recurrenceExceptions)),r.push(l)});else{const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(Array.isArray(e.dataItem))e.dataItem.forEach(e=>{const a=null!==_(e,D.recurrenceRule)&&void 0!==_(e,D.recurrenceRule);if(null!==_(e,D.recurrenceId)&&void 0!==_(e,D.recurrenceId)&&a){const a=n.clone(L(e,D,z)),l=_(e,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e,D.recurrenceRule,null),r.push(a),t.push(e)}else r.push(e)});else{const a=null!==_(e.dataItem,D.recurrenceRule)&&void 0!==_(e.dataItem,D.recurrenceRule);if(null!==_(e.dataItem,D.recurrenceId)&&void 0!==_(e.dataItem,D.recurrenceId)&&a){const a=n.clone(L(e.dataItem,D,z)),l=_(e.dataItem,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e.dataItem,D.recurrenceRule,null),r.push(a),t.push(e.dataItem)}else r.push(e.dataItem)}G({updated:r,created:t})},[G,D,z]),U=f.useCallback(e=>{const t=[],r=[];if(e.series){const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceRule,_(t,D.recurrenceRule)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(null===_(e.dataItem,D.recurrenceRule)||void 0===_(e.dataItem,D.recurrenceRule))r.push(e.dataItem);else{const r=n.clone(L(e.dataItem,D,z)),a=_(e.dataItem,D.originalStart),l=_(r,D.recurrenceExceptions)||[];M(r,D.recurrenceExceptions,[...l,a]),M(e.dataItem,D.recurrenceRule,null),t.push(r)}G({updated:t,deleted:r})},[G,D,z]),Z=f.useCallback(e=>{switch(e.type){case J.create:B(e);break;case J.update:$(e);break;case J.remove:U(e)}},[B,U,$]),q=f.useCallback((e,t)=>{R(e,{...t,target:E.current})},[R,E]),Y=f.useCallback((e,t)=>{b(e,{...t,target:E.current})},[b,E]),j=f.useCallback(e=>{e.value&&b(e.value,{...e,target:E.current,nativeEvent:e.nativeEvent})},[b,E]),X=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,Math.round(n/27)):a.addDays(C,n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),Q=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,-Math.round(n/27)):a.addDays(C,-n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),ee=f.useCallback(e=>{e.preventDefault();const t=a.ZonedDate.fromLocalDate(new Date,m);b(new Date(t.getTime()),e)},[b,m]),te=f.useCallback(()=>{A(!x)},[A,x]),re=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)")},[g]),ae=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="")},[g]),ne=f.useMemo(()=>{var t;return{...e.style,height:null!=(t=e.height)?t:Yn.height}},[e.height,e.style]),le=f.useMemo(()=>n.classNames({"k-rtl":void 0!==e.rtl?e.rtl:"rtl"===h},"k-scheduler",e.className),[e.className,e.rtl,h]),oe=v.toLanguageString(Ae,Xt[Ae]),se=v.toLanguageString(Pe,Xt[Pe]),ce=v.toLanguageString(He,Xt[He]),ie=N.props.header||e.header||Yn.header,de=N.props.footer||e.footer||Yn.footer,ue=Ie,[me,pe]=f.useState(null);return f.createElement(Se,{element:g,props:e,views:I,fields:D,groups:O,dateRange:V,orientation:F,dateFormat:{dateFormat:P,shortDateFormat:H},date:[C,Y],activeView:[T,q],selection:[me,pe],data:[z,Z]},f.createElement("div",{ref:g,id:e.id,style:ne,className:le,tabIndex:null!=(l=e.tabIndex)?l:Yn.tabIndex,dir:h,role:e.role||"application","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":me&&me.props.id||void 0,onFocus:re,onBlur:ae},f.createElement(ie,null,f.createElement(ue,null,f.createElement(s.ButtonGroup,{className:"k-scheduler-navigation"},f.createElement(s.Button,{role:"button",tabIndex:-1,title:oe,"aria-label":oe,onClick:ee},oe),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-right":"caret-alt-left",svgIcon:"rtl"===h?d.caretAltRightIcon:d.caretAltLeftIcon,title:se,"aria-label":se,onClick:Q}),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-left":"caret-alt-right",svgIcon:"rtl"===h?d.caretAltLeftIcon:d.caretAltRightIcon,title:ce,"aria-label":ce,onClick:X}))),f.createElement(Qt,{value:C,onChange:j}),f.createElement(s.ToolbarSpacer,null),f.createElement(er,null)),N&&f.createElement(N.type,{editable:null!=(c=e.editable)?c:Yn.editable,key:N.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,form:e.form,onDataAction:Z,showWorkHours:x,...N.props}),f.createElement(de,null,K&&K<1440&&f.createElement(tr,null,f.createElement(s.Button,{tabIndex:-1,onClick:te,icon:"clock",svgIcon:d.clockIcon},v.toLanguageString(x?We:Ke,Xt[x?We:Ke])))),i&&f.createElement(n.WatermarkOverlay,{message:u})))}),Yn={data:[],height:600,tabIndex:-1,editable:!1,defaultDate:new Date,header:be,footer:Te,navigation:Ie,viewSelector:we};qn.propTypes={data:r.array,editable:r.oneOfType([r.bool,r.shape({add:r.bool,drag:r.bool,edit:r.bool,remove:r.bool,resize:r.bool})]),view:r.string,defaultView:r.string,date:r.any,defaultDate:r.any,rtl:r.bool,height:r.oneOfType([r.number,r.string]),children:r.any,timezone:r.string,group:r.any,resources:r.any,modelFields:r.shape({id:r.string,start:r.string,startTimezone:r.string,end:r.string,endTimezone:r.string,isAllDay:r.string,title:r.string,description:r.string,recurrenceRule:r.string,recurrenceId:r.string,recurrenceException:r.string})},qn.displayName="KendoReactScheduler";const jn=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const p=r||Xn.item,g=o.useInternationalization(),[E]=cr(),[h]=or(),y=te(),[v,D]=f.useState(!0),[k,S]=f.useState(!1),C=f.useRef(0),I=f.useRef(null),x=f.useRef([]),A=n.useDir(y),_=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${g.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[g,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),M=()=>{var t,r,a,n,l;const o=h.filter(t=>t.current&&((t,r)=>t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay))(t.current.props,e)).sort((e,t)=>e.current.props.start.getTime()-t.current.props.start.getTime()),s=o.filter(t=>H(t.current.props.start,t.current.props.end,e.start,e.end)),c=i.current&&i.current.element;if(!c||!s.length)return;const d=T(o),u=R(o),m=T(s),p=R(s);if(!(m.current&&i.current&&p.current&&d.current&&u.current))return;if(!H(m.current.props.start,p.current.props.end,e.start,e.end))return void D(!1);const g=[],y=[],v=[],f=b(m.current.element),k=(e.vertical?f.height:f.width)/(m.current.props.end.getTime()-m.current.props.start.getTime()),A=(e.vertical?25:8)/k,_=(Math.min(e.start.getTime(),p.current.props.end.getTime()-A)-m.current.props.start.getTime())*k,M=Math.floor(Math.min(e.end.getTime(),p.current.props.end.getTime())-Math.max(e.start.getTime(),m.current.props.start.getTime()))*k;(E||[]).forEach(e=>{e.current&&(e.current.props.dragHint?y.push(e.current):e.current.props.resizeHint?v.push(e.current):g.push(e.current))}),x.current=((t,r,a)=>{const[n,l]=r,o=new Date(Math.min(l.props.end.getTime()-a,Math.max(e.start.getTime(),n.props.start.getTime()))),s=new Date(Math.max(o.getTime()+a,Math.min(e.end.getTime(),l.props.end.getTime())));return t.filter(t=>{const r=Math.max(Math.min(l.props.end.getTime()-a,t.props.start.getTime()),n.props.start.getTime()),c=Math.min(Math.max(r+a,t.props.end.getTime()),l.props.end.getTime());return t.props.id!==e.id&&t.props.group.index===e.group.index&&t.props.range.index===e.range.index&&(e.ignoreIsAllDay||t.props.isAllDay===e.isAllDay)&&H(new Date(r),new Date(c),o,s)&&H(n.props.start,l.props.end,t.props.start,t.props.end)})})(g,[d.current,u.current],A),I.current=e.resizeHint||e.dragHint?0:((e,t)=>{const r=new Set;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r.add(e._order)}),G(Array.from(r))})(i.current,x.current);let N=1;e.resizeHint||e.dragHint||(N=((e,t)=>{let r=0;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r<e._order&&(r=e._order)}),r+1})(i.current,x.current),x.current.forEach(e=>{e._maxSiblingsPerSlot&&N<e._maxSiblingsPerSlot&&(N=e._maxSiblingsPerSlot)}),x.current.forEach(e=>{void 0!==e._maxSiblingsPerSlot&&null!==e._maxSiblingsPerSlot&&e._maxSiblingsPerSlot<N&&(e._maxSiblingsPerSlot=N)}));let z=0;const L=f;x.current.forEach(e=>{let t=0;void 0!==e._order&&null!==e._order&&e._order<I.current&&(t=b(e.element).top+b(e.element).height-L.top-1*I.current+1),t>z&&(z=t)});L.width=e.vertical?L.width/N-1-20/N:M-1,e.vertical?L.height=M-1:(e.resizeHint||e.dragHint)&&N<=1||(L.height=null!=(r=null==(t=e.style)?void 0:t.height)?r:25),L.left=e.vertical?L.left+(null!=(a=I.current)?a:0)+1*(null!=(n=I.current)?n:0)*L.width:L.left+(_<0?0:_),L.top=e.vertical?L.top+(_<0?0:_):L.top+z+1*(null!=(l=I.current)?l:0),C.current=N,w(c,L),S(!0),D(!0)},N=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{M()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[M]);f.useEffect(M);const z=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return wa({element:z,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!y.current)return;const e=window.ResizeObserver,t=e&&new e(N);return t&&t.observe(y.current),()=>{t&&t.disconnect()}},[N,y]),f.createElement(p,{...s,_ref:i,_order:I,_maxSiblingsPerSlot:C,_siblings:x,itemRef:i,style:{visibility:k?void 0:"hidden",display:v?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===A?"caret-alt-right":"caret-alt-left",icon:"rtl"===A?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"reload",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"non-recurrence",icon:d.nonRecurrenceIcon})),!e.resizeHint&&f.createElement("div",{title:_},!e.isAllDay&&f.createElement(Ia,{className:"k-event-time"},_),f.createElement(Ia,null,e.title)))}),Xn={item:ba};jn.displayName="KendoReactSchedulerProportionalViewItem",e.AgendaView=Tn,e.DATA_ACTION=J,e.DRAG_ITEM_ACTION=en,e.DateHeaderCell=sn,e.DayView=En,e.ITEMS_FOCUS_ACTION=br,e.ITEMS_SELECT_ACTION=hr,e.MonthView=Nn,e.REMOVE_ITEM_ACTION=Qa,e.RESIZE_ITEM_ACTION=tn,e.SERIES_ACTION=rn,e.SHOW_OCCURRENCE_DIALOG_ACTION=Xa,e.SHOW_REMOVE_DIALOG_ACTION=Ja,e.SLOTS_FOCUS_ACTION=fr,e.SLOTS_SELECT_ACTION=yr,e.Scheduler=qn,e.SchedulerActiveViewContext=fe,e.SchedulerDataContext=ye,e.SchedulerDateContext=Ee,e.SchedulerDateRangeContext=ue,e.SchedulerDrag=Pa,e.SchedulerEditItem=an,e.SchedulerEditItemDragItemContext=Ba,e.SchedulerEditItemFormItemContext=Ga,e.SchedulerEditItemPropsContext=Va,e.SchedulerEditItemRemoveItemContext=Ua,e.SchedulerEditItemResizeItemContext=$a,e.SchedulerEditItemShowOccurrenceDialogContext=qa,e.SchedulerEditItemShowRemoveDialogContext=Za,e.SchedulerEditSlot=Da,e.SchedulerEditSlotFormItemContext=ya,e.SchedulerEditSlotPropsContext=ha,e.SchedulerEditTask=In,e.SchedulerFieldsContext=oe,e.SchedulerFooter=Te,e.SchedulerForm=da,e.SchedulerFormEditor=ca,e.SchedulerGroupsContext=ie,e.SchedulerHeader=be,e.SchedulerItem=ba,e.SchedulerItemContent=Ia,e.SchedulerOccurrenceDialog=Sa,e.SchedulerOrientationContext=pe,e.SchedulerProportionalViewItem=jn,e.SchedulerPropsContext=re,e.SchedulerRemoveDialog=Ca,e.SchedulerResize=Wa,e.SchedulerSlot=ma,e.SchedulerTask=vn,e.SchedulerViewItem=Ta,e.SchedulerViewSlot=ga,e.SchedulerViewTask=fn,e.SchedulerViewsContext=ne,e.TimeHeaderCell=Kr,e.TimelineView=$n,e.WeekView=On,e.WorkWeekView=Pn,e.agendaViewDefaultProps=xn,e.dateHeaderCellDefaultProps=cn,e.dayViewDefaultProps=hn,e.monthViewDefaultProps=zn,e.schedulerDefaultProps=Yn,e.schedulerDragDefaultProps=Ha,e.schedulerEditItemDefaultProps=nn,e.schedulerEditSlotDefaultProps=ka,e.schedulerEditTaskDefaultProps=wn,e.schedulerFormDefaultProps=ua,e.schedulerFormEditorDefaultProps=ia,e.schedulerProportionalViewItemDefaultProps=Xn,e.schedulerResizeDefaultProps=Ka,e.schedulerSlotDefaultProps=pa,e.schedulerViewItemDefaultProps=Ra,e.schedulerViewSlotDefaultProps=Ea,e.schedulerViewTaskDefaultProps=Dn,e.timeHeaderCellDefaultProps=Vr,e.timeLineViewDefaultProps=Un,e.useSchedulerActiveViewContext=De,e.useSchedulerDataContext=ve,e.useSchedulerDateContext=he,e.useSchedulerDateRangeContext=me,e.useSchedulerEditItemDragItemContext=()=>f.useContext(Ba),e.useSchedulerEditItemFormItemContext=()=>f.useContext(Ga),e.useSchedulerEditItemPropsContext=()=>f.useContext(Va),e.useSchedulerEditItemRemoveItemContext=()=>f.useContext(Ua),e.useSchedulerEditItemResizeItemContext=()=>f.useContext($a),e.useSchedulerEditItemShowOccurrenceDialogContext=()=>f.useContext(qa),e.useSchedulerEditItemShowRemoveDialogContext=()=>f.useContext(Za),e.useSchedulerEditSlotFormItemContext=()=>f.useContext(ya),e.useSchedulerEditSlotPropsContext=()=>f.useContext(ha),e.useSchedulerFieldsContext=se,e.useSchedulerGroupsContext=de,e.useSchedulerOrientationContext=ge,e.useSchedulerPropsContext=ae,e.useSchedulerViewsContext=le,e.weekViewDefaultProps=Fn,e.workWeekDefaultProps=Hn});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-date-math"),require("@progress/kendo-react-common"),require("@progress/kendo-data-query"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-dateinputs"),require("@progress/kendo-react-popup"),require("@progress/kendo-svg-icons"),require("react-dom"),require("@progress/kendo-react-form"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-recurrence")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-date-math","@progress/kendo-react-common","@progress/kendo-data-query","@progress/kendo-react-intl","@progress/kendo-react-buttons","@progress/kendo-react-dateinputs","@progress/kendo-react-popup","@progress/kendo-svg-icons","react-dom","@progress/kendo-react-form","@progress/kendo-react-dialogs","@progress/kendo-react-labels","@progress/kendo-react-inputs","@progress/kendo-react-dropdowns","@progress/kendo-recurrence"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactScheduler={},e.React,e.PropTypes,e.KendoDateMath,e.KendoReactCommon,e.KendoDataQuery,e.KendoReactIntl,e.KendoReactButtons,e.KendoReactDateinputs,e.KendoReactPopup,e.KendoSvgIcons,e.ReactDOM,e.KendoReactForm,e.KendoReactDialogs,e.KendoReactLabels,e.KendoReactInputs,e.KendoReactDropdowns,e.KendoRecurrence)}(this,function(e,t,r,a,n,l,o,s,c,i,d,u,m,p,g,E,h,y){"use strict";function v(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var f=v(t),D=v(u);const k=(e,t=0,r=0,a=[])=>{if(e.length<=t)return[a];const n=[];return e[t].data.map(l=>{n.push(...k(e,t+1,r+1,[...a,{...l,field:e[t].field,valueField:e[t].valueField,colorField:e[t].colorField,multiple:e[t].multiple}]))}),n};function S(e,t){const r=[];if(!t||!t.length)return r;if(e&&e.resources&&e.resources.length){const a=e.resources;for(let e=0;e<a.length;e++){const n=t.find(t=>t.name===a[e]);r.push(n)}}return r}const C=(e,t=e.length-1)=>{const r=Math.max(0,t),a=[];e&&e.length||(e=[{}]);const n=(e[r].data||[]).map(t=>({...t,text:t[e[r].textField]}))||[],l=n.length;let o=1;for(let t=0;t<=r;t++)o*=(e[t].data||[]).length||1;for(let e=0;e<o;e++)n[e%l]&&a.push(n[e%l]);return a},b=e=>{if(!e)return{top:0,left:0,width:0,height:0,right:0};return{top:e.offsetTop,left:e.offsetLeft,right:e.offsetParent?e.offsetParent.offsetWidth-(e.offsetLeft+e.offsetWidth):0,width:e.offsetWidth,height:e.offsetHeight}},I=(e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"paddingLeft":"paddingTop"]||"0")+parseFloat(window.getComputedStyle(e)[t?"paddingRight":"paddingBottom"]||"0"),w=(e,t,r=!1)=>{e&&(void 0!==t.top&&(e.style.top=`${t.top}px`),void 0!==t.left&&(e.style.left=`${t.left}px`),void 0!==t.width&&(e.style.width=`${t.width}px`),void 0!==t.height&&!r&&(e.style.height="number"==typeof t.height?`${t.height}px`:t.height),r&&(e.style.minHeight=void 0!==t.height&&t.height>0?`${t.height}px`:""))},T=e=>e[0],R=e=>e[e.length-1],x=e=>{const t=new Set;return e.forEach(e=>{t.add(e.field)}),t.size===e.length};const A=(e,t,r,a=0)=>{if(a===r)return null;let n=null;const l=document.elementFromPoint(e,t);if(!l)return n;if("true"===l.getAttribute("data-slot"))return l;const o=l.style.pointerEvents;return l.style.pointerEvents="none",n=A(e,t,r,a+1),l.style.pointerEvents=o,n},_=(e,t)=>n.getter(t)(e),M=(e,t,r)=>{if(t)return n.setter(t)(e,r)},N=e=>null!=e;function z(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const L=(e,t,r)=>{const a=O(e,t)?_(e,t.id):_(e,t.recurrenceId);return r.find(e=>_(e,t.id)===a)},O=(e,t)=>{const r=_(e,t.id),a=_(e,t.recurrenceId),n=_(e,t.recurrenceRule);return!(!r||!n||null!=a)},F=(e,t)=>Math.max(e.getTime(),t.getTime()),P=(e,t)=>Math.min(e.getTime(),t.getTime()),H=(e,t,r,a,n=!1)=>n?F(t,a)-P(e,r)<=t.getTime()-e.getTime()+(a.getTime()-r.getTime()):F(t,a)-P(e,r)<t.getTime()-e.getTime()+(a.getTime()-r.getTime()),W={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions"},K=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),V=(e,t,r)=>t<r?t<=e&&e<=r:e<=r||t<=e,G=e=>{let t=0;const r=e.slice();return r.sort((e,t)=>e-t).forEach((e,a)=>{r[a]===a&&(t=a+1)}),t},B=(e,t,r=!1)=>{e.forEach(e=>{e.order=null}),t.forEach(e=>e.items.splice(0,e.items.length));const a=[...e].sort((e,t)=>e.start.getTime()-t.start.getTime());t.forEach(e=>{const t=[];a.forEach(a=>{if((r||a.isAllDay===e.isAllDay)&&a.range.index===e.range.index&&(void 0===a.range.isAllDay||void 0===e.range.isAllDay||a.range.isAllDay===e.range.isAllDay)&&a.group.index===e.group.index&&H(a.start,a.end,e.start,e.end)){if(null!==a.order&&void 0!==a.order)t.includes(a.order)||(t.push(a.order),t.sort((e,t)=>e-t));else{const e=G(t);a.order=e,t.push(e),t.sort((e,t)=>e-t)}e.items.push(a)}})})},$=(e,t,r=!1)=>{e.forEach(e=>e.slots.splice(0,e.slots.length)),e.forEach(e=>{t.forEach(t=>{(r||e.isAllDay===t.isAllDay)&&e.range.index===t.range.index&&(void 0===e.range.isAllDay||void 0===t.range.isAllDay||e.range.isAllDay===t.range.isAllDay)&&e.group.index===t.group.index&&H(e.start,e.end,t.start,t.end)&&e.slots.push(t)})})},U=(...e)=>{},Z=(e,t,r=!1,a=!1)=>{const n=e.current;if(!n||!t)return null;const o=t.filter(e=>null!==e.current&&null!==e.current.element),s=l.orderBy(o,[{field:"current.props.group.index",dir:"asc"},{field:"current.props.range.index",dir:"asc"},r?{field:""}:{field:"current.props.isAllDay",dir:"desc"},{field:"current.props.start",dir:"asc"}]),c=s.findIndex(e=>null!==e.current&&!(e.current.props.uid!==n.props.uid||void 0!==e.current.props.occurrenceId&&e.current.props.occurrenceId!==n.props.occurrenceId||e.current.props.group.index!==n.props.group.index||e.current.props.range.index!==n.props.range.index||!r&&e.current.props.isAllDay!==n.props.isAllDay));return s[c+(a?-1:1)]},q=(e,t)=>(e.order||0)-(t.order||0),Y=6e4,j=[{}],X=new Date(1900,0,1),Q=new Date(2099,11,31);a.ZonedDate.fromLocalDate(X),a.ZonedDate.fromLocalDate(Q);var J=(e=>(e[e.create=0]="create",e[e.update=1]="update",e[e.remove=2]="remove",e))(J||{});const ee=f.createContext({current:null}),te=()=>f.useContext(ee);ee.displayName="SchedulerElementContext";const re=f.createContext({}),ae=()=>f.useContext(re);re.displayName="SchedulerPropsContext";const ne=f.createContext([]),le=()=>f.useContext(ne);ne.displayName="SchedulerViewsContext";const oe=f.createContext(W),se=()=>f.useContext(oe);oe.displayName="SchedulerFieldsContext";const ce=f.createContext({dateFormat:"{0:D}",shortDateFormat:"{0:d}"});ce.displayName="SchedulerDateFormatContext";const ie=f.createContext([{index:0,resources:[]}]),de=()=>f.useContext(ie);ie.displayName="SchedulerGroupsContext";const ue=f.createContext({start:new Date,end:new Date,zonedStart:a.ZonedDate.fromLocalDate(new Date),zonedEnd:a.ZonedDate.fromLocalDate(new Date)}),me=()=>f.useContext(ue);ue.displayName="SchedulerDateRangeContext";const pe=f.createContext(null),ge=()=>f.useContext(pe);pe.displayName="SchedulerOrientationContext";const Ee=f.createContext([new Date,U]),he=()=>f.useContext(Ee);Ee.displayName="SchedulerDateContext";const ye=f.createContext([[],U]),ve=()=>f.useContext(ye);ye.displayName="SchedulerDataContext";const fe=f.createContext(["day",U]),De=()=>f.useContext(fe);fe.displayName="SchedulerActiveViewContext";const ke=f.createContext([null,()=>{}]);ke.displayName="SchedulerItemSelectionContext";const Se=({children:e,element:t,props:r,views:a,fields:n,groups:l,dateRange:o,dateFormat:s,orientation:c,date:i,data:d,activeView:u,selection:m})=>f.createElement(ee.Provider,{value:t},f.createElement(re.Provider,{value:r},f.createElement(ne.Provider,{value:a},f.createElement(oe.Provider,{value:n},f.createElement(ce.Provider,{value:s},f.createElement(ie.Provider,{value:l},f.createElement(ue.Provider,{value:o},f.createElement(pe.Provider,{value:c},f.createElement(Ee.Provider,{value:i},f.createElement(ye.Provider,{value:d},f.createElement(fe.Provider,{value:u},f.createElement(ke.Provider,{value:m},e)))))))))))),Ce=(e,t,r)=>{const[a,n]=f.useState(t||e),l=f.useCallback((e,t)=>{n(e),r&&r.call(void 0,{...t,value:e})},[r,n]);return[void 0!==t?t:a,l]},be=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>o.current);const c=f.useMemo(()=>n.classNames("k-scheduler-toolbar",r),[r]);return f.createElement(s.Toolbar,{id:e.id,ref:e=>{e&&(l.current=e.element)},className:c,...a},e.children)});be.displayName="KendoReactSchedulerHeader";const Ie=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames(r),...a},e.children)});Ie.displayName="KendoReactSchedulerSchedulerNavigation";const we=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-views",r),...a},e.children)});we.displayName="KendoReactSchedulerViewSelector";const Te=f.forwardRef((e,t)=>{const{className:r,style:a,...l}=e,o=f.useRef(null),c=f.useRef(null);f.useImperativeHandle(o,()=>({element:c.current,props:e})),f.useImperativeHandle(t,()=>o.current);const i=f.useMemo(()=>n.classNames("k-scheduler-footer",e.className),[e.className]);return f.createElement(s.Toolbar,{ref:e=>{e&&(c.current=e.element)},className:i,style:{boxShadow:"none",...a},...l},e.children)});Te.displayName="KendoReactSchedulerFooter";const Re="scheduler.allEvents",xe="scheduler.allDay",Ae="scheduler.today",_e="scheduler.timelineViewTitle",Me="scheduler.weekViewTitle",Ne="scheduler.workWeekViewTitle",ze="scheduler.agendaViewTitle",Le="scheduler.dayViewTitle",Oe="scheduler.monthViewTitle",Fe="scheduler.deleteTitle",Pe="scheduler.previousTitle",He="scheduler.nextTitle",We="scheduler.showFullDay",Ke="scheduler.showWorkDay",Ve="scheduler.editOccurrence",Ge="scheduler.editSeries",Be="scheduler.editRecurringConfirmation",$e="scheduler.editRecurringDialogTitle",Ue="scheduler.editSave",Ze="scheduler.editCancel",qe="scheduler.editorTitle",Ye="scheduler.editorEventTitle",je="scheduler.editorEventStart",Xe="scheduler.editorEventStartTimeZone",Qe="scheduler.editorEventEnd",Je="scheduler.editorEventEndTimeZone",et="scheduler.editorEventAllDay",tt="scheduler.editorEventDescription",rt="scheduler.editorEventSeparateTimeZones",at="scheduler.editorEventTimeZone",nt="scheduler.recurrenceEditorRepeat",lt="scheduler.recurrenceEditorDailyInterval",ot="scheduler.recurrenceEditorDailyRepeatEvery",st="scheduler.recurrenceEditorWeeklyInterval",ct="scheduler.recurrenceEditorWeeklyRepeatEvery",it="scheduler.recurrenceEditorWeeklyRepeatOn",dt="scheduler.recurrenceEditorMonthlyDay",ut="scheduler.recurrenceEditorMonthlyInterval",mt="scheduler.recurrenceEditorMonthlyRepeatEvery",pt="scheduler.recurrenceEditorMonthlyRepeatOn",gt="scheduler.recurrenceEditorYearlyOf",Et="scheduler.recurrenceEditorYearlyRepeatEvery",ht="scheduler.recurrenceEditorYearlyRepeatOn",yt="scheduler.recurrenceEditorYearlyInterval",vt="scheduler.recurrenceEditorFrequenciesDaily",ft="scheduler.recurrenceEditorFrequenciesMonthly",Dt="scheduler.recurrenceEditorFrequenciesNever",kt="scheduler.recurrenceEditorFrequenciesWeekly",St="scheduler.recurrenceEditorFrequenciesYearly",Ct="scheduler.recurrenceEditorOffsetPositionsFirst",bt="scheduler.recurrenceEditorOffsetPositionsSecond",It="scheduler.recurrenceEditorOffsetPositionsThird",wt="scheduler.recurrenceEditorOffsetPositionsFourth",Tt="scheduler.recurrenceEditorOffsetPositionsLast",Rt="scheduler.recurrenceEditorWeekdaysDay",xt="scheduler.recurrenceEditorWeekdaysWeekday",At="scheduler.recurrenceEditorWeekdaysWeekendday",_t="scheduler.recurrenceEditorEndAfter",Mt="scheduler.recurrenceEditorEndOccurrence",Nt="scheduler.recurrenceEditorEndLabel",zt="scheduler.recurrenceEditorEndNever",Lt="scheduler.recurrenceEditorEndOn",Ot="scheduler.editorDelete",Ft="scheduler.deleteConfirmation",Pt="scheduler.deleteRecurringConfirmation",Ht="scheduler.deleteOccurrence",Wt="scheduler.deleteSeries",Kt="scheduler.deleteDialogTitle",Vt="scheduler.deleteRecurringDialogTitle",Gt="scheduler.dateTitle",Bt="scheduler.timeTitle",$t="scheduler.eventTitle",Ut="scheduler.editorValidationRequired",Zt="scheduler.editorValidationStart",qt="scheduler.editorValidationEnd",Yt="scheduler.noEvents",jt="scheduler.moreEvents",Xt={[Ut]:"Field is required.",[Zt]:"Start time must be before End time.",[qt]:"End time must be after Start time.",[Re]:"All events",[xe]:"all day",[Ae]:"Today",[Le]:"Day",[Oe]:"Month",[Me]:"Week",[Ne]:"Work Week",[_e]:"Timeline",[ze]:"Agenda",[Fe]:"Delete",[Pe]:"Previous",[He]:"Next",[We]:"Show full day",[Ke]:"Show business hours",[Ve]:"Edit current occurrence",[Ge]:"Edit the series",[Be]:"Do you want to edit only this event occurrence or the whole series?",[$e]:"Edit Recurring Item",[Ue]:"Save",[Ze]:"Cancel",[Ot]:"Delete",[qe]:"Event",[Ye]:"Title",[je]:"Start",[Xe]:"Start Time Zone",[Qe]:"End",[Je]:"End Time Zone",[et]:"All Day Event",[tt]:"Description",[rt]:"End in different Time Zone",[at]:"Specify Time Zone",[nt]:"Repeat",[lt]:"day(s)",[ot]:"Repeat every",[st]:"week(s)",[ct]:"Repeat every",[it]:"Repeat on",[dt]:"Day",[ut]:"month(s)",[mt]:"Repeat every",[pt]:"Repeat on",[gt]:"of",[Et]:"Repeat every",[ht]:"Repeat on",[yt]:"year(s)",[vt]:"Daily",[ft]:"Monthly",[Dt]:"Never",[kt]:"Weekly",[St]:"Yearly",[Ct]:"First",[bt]:"Second",[It]:"Third",[wt]:"Fourth",[Tt]:"Last",[Rt]:"Day",[xt]:"Weekday",[At]:"Weekend Day",[_t]:"After",[Mt]:"occurrence(s)",[Nt]:"End",[zt]:"Never",[Lt]:"On",[Ft]:"Are you sure you want to delete this event?",[Pt]:"Do you want to delete only this event occurrence or the whole series?",[Ht]:"Delete current occurrence",[Wt]:"Delete the series",[Kt]:"Delete Event",[Vt]:"Delete Recurring Item",[Gt]:"Date",[Bt]:"Time",[$t]:"Event",[Yt]:"no events",[jt]:"More events"},Qt=f.forwardRef((e,t)=>{var r;const l=f.useRef(null),u=f.useRef(null);f.useImperativeHandle(t,()=>l.current);const{timezone:m}=ae(),p=a.ZonedDate.fromLocalDate(e.value,m),g=a.getDate(p),E=te(),h=n.useWindow(E),[y,v]=f.useState("desktop"),[D,k]=f.useState(!1),[S,C]=f.useState(!1),b=o.useInternationalization(),{dateFormat:I,shortDateFormat:w}=f.useContext(ce),T=me(),[R]=he(),x=T.end.getTime()-T.start.getTime()>27*a.MS_PER_DAY,A=b.format(I,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),_=b.format(w,x?R:T.zonedStart,x?R:T.zonedEnd.addDays(-1)),M=f.useCallback(()=>{k(!D)},[D]),N=f.useCallback(()=>{C(!0)},[]),L=f.useCallback(()=>{k(!1),C(!1)},[]),O=f.useCallback(t=>{if(e.onChange){const r=a.ZonedDate.fromUTCDate(z(t.value),m);e.onChange.call(void 0,{...t,value:r})}k(!1)},[e.onChange,m]),F=f.useCallback(()=>{h().matchMedia&&v(h().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")},[h]);f.useEffect(()=>{F();const e=h().ResizeObserver,t=e&&new e(F);return t&&t.observe(E.current),()=>{e&&t.disconnect()}},[F,E,h]),f.useEffect(()=>{D&&S&&u.current&&u.current.focus()},[S,D]);const{onFocus:P,onBlur:H}=n.useAsyncFocusBlur({onFocus:N,onBlur:L});return f.createElement(f.Fragment,null,f.createElement(s.Button,{ref:l,onFocus:P,onBlur:H,fillMode:"flat",className:"k-nav-current",icon:"calendar",svgIcon:d.calendarIcon,"aria-live":"polite",tabIndex:-1,onClick:M},"desktop"===y?A:_),f.createElement(i.Popup,{anchor:null==(r=l.current)?void 0:r.element,show:D},f.createElement(c.Calendar,{ref:u,onFocus:P,onBlur:H,onChange:O,value:g})))});Qt.displayName="KendoReactSchedulerNavigationDatePicker";const Jt=e=>{const[t,r]=De(),a=o.useLocalization(),n=f.useMemo(()=>"function"==typeof e.view.title?e.view.title.call(void 0,a):e.view.title,[e.view.title,a]),l=f.useCallback(()=>{e.view.name&&r(e.view.name)},[r,e.view.name]);return f.createElement(s.Button,{className:"k-toolbar-button",role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===t,onClick:l},n)},er=f.forwardRef(()=>{const e=f.useRef(null),[t,r]=f.useState("desktop"),a=le(),l=n.useWindow(e),[c,i]=De(),u=a.find(e=>e.props.name===c),m=o.useLocalization(),p=f.useCallback(e=>{i&&(e.syntheticEvent.preventDefault(),i(e.item.name))},[i]),g=()=>{l().matchMedia&&r(l().matchMedia("(min-width: 1024px)").matches?"desktop":"mobile")};return f.useEffect(()=>{g();const t=l().ResizeObserver,r=t&&new t(g);return r&&r.observe(e.current),()=>{r&&r.disconnect()}},[]),f.createElement("div",{className:n.classNames("k-toolbar-button-group k-button-group k-button-group-solid",{"k-scheduler-views":"desktop"===t,"k-scheduler-tools":"mobile"===t}),role:"group",ref:e},u&&"mobile"===t&&f.createElement(s.DropDownButton,{className:"k-views-dropdown",onItemClick:p,popupSettings:{popupClass:"k-scheduler-toolbar"},textField:"title",items:a.map(e=>({...e.props,selected:e.props.name===c,title:"function"==typeof e.props.title?e.props.title.call(void 0,m):e.props.title})),text:f.createElement(f.Fragment,null,"function"==typeof u.props.title?u.props.title.call(void 0,m):u.props.title,f.createElement(n.IconWrap,{name:"caret-alt-down",icon:d.caretAltDownIcon}))}),"desktop"===t&&f.createElement(f.Fragment,null,a.map(e=>f.createElement(Jt,{key:e.props.name,view:e.props}))))});er.displayName="KendoReactSchedulerViewSelectorList";const tr=f.forwardRef((e,t)=>{const{className:r,...a}=e,l=f.useRef(null);return f.useImperativeHandle(t,()=>({element:l.current,props:e})),f.createElement(s.ToolbarItem,{ref:e=>{e&&(l.current=e.element)},className:n.classNames("k-scheduler-navigation",r),...a},e.children)}),rr=f.createContext({});rr.displayName="SchedulerViewPropsContext";const ar=f.createContext([]),nr=()=>f.useContext(ar);ar.displayName="SchedulerViewRangesContext";const lr=f.createContext([[],U]),or=()=>f.useContext(lr);lr.displayName="SchedulerViewSlotsContext";const sr=f.createContext([[],U]),cr=()=>f.useContext(sr);sr.displayName="SchedulerViewItemsContext";const ir=f.createContext([[],U]);ir.displayName="SchedulerViewSelectedSlotsContext";const dr=f.createContext([[],U]),ur=()=>f.useContext(dr);dr.displayName="SchedulerViewSelectedItemsContext";const mr=f.createContext([[],U]);mr.displayName="SchedulerViewFocusedItemsContext";const pr=f.createContext([[],U]),gr=()=>f.useContext(pr);pr.displayName="SchedulerViewFocusedSlotsContext";const Er=({children:e,props:t,ranges:r,slots:a,items:n,selectedSlots:l,selectedItems:o,focusedItems:s,focusedSlots:c})=>f.createElement(rr.Provider,{value:t},f.createElement(ar.Provider,{value:r},f.createElement(lr.Provider,{value:a},f.createElement(sr.Provider,{value:n},f.createElement(ir.Provider,{value:l},f.createElement(dr.Provider,{value:o},f.createElement(mr.Provider,{value:s},f.createElement(pr.Provider,{value:c},e))))))));var hr=(e=>(e.select="ITEMS_SELECT_SELECT",e.selectNext="ITEMS_SELECT_SELECT_NEXT",e.selectPrev="ITEMS_SELECT_SELECT_PREV",e.reset="ITEMS_SELECT_RESET",e.add="ITEMS_SELECT_ADD",e.remove="ITEMS_SELECT_REMOVE",e))(hr||{});var yr=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(yr||{});const vr=(e,t)=>{const{element:r}=e;n.useIsomorphicLayoutEffect(()=>{if(!r||!r.current)return;const t=[],a=[],n=[],l=r.current.querySelectorAll(e.selector);l.forEach(r=>{const l=r.getBoundingClientRect().width,o=e.explicitDepth&&void 0!==e.attribute?r.getAttribute(e.attribute):0,s=I(r,!0),c=((e,t=!1)=>parseFloat(window.getComputedStyle(e)[t?"borderLeftWidth":"borderTopWidth"]||"0")+parseFloat(window.getComputedStyle(e)[t?"borderRightWidth":"borderBottomWidth"]||"0"))(r,!0);null!==o&&((!n[o]||c>n[o])&&(n[o]=c),(!a[o]||s>a[o])&&(a[o]=s),(!t[o]||l>t[o])&&(t[o]=l))}),l.forEach(r=>{const l=e.explicitDepth?r.getAttribute(e.attribute):0;null!==l&&(r.style.minWidth=t[l]-a[l]-n[l]+"px")})},t)};var fr=(e=>(e.up="SLOT_FOCUS_UP",e.down="SLOT_FOCUS_DOWN",e.left="SLOT_FOCUS_LEFT",e.right="SLOT_FOCUS_RIGHT",e))(fr||{});const Dr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row-1&&t.current.props.col===e.current.props.col),kr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col-1),Sr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row&&t.current.props.col===e.current.props.col+1),Cr=(e,t)=>t.find(t=>null!==t.current&&null!==e.current&&t.current.props.row===e.current.props.row+1&&t.current.props.col===e.current.props.col);var br=(e=>(e.next="ITEMS_FOCUS_NEXT",e.prev="ITEMS_FOCUS_PREV",e))(br||{});const Ir=f.forwardRef((e,t)=>{const r=f.useRef(null);f.useImperativeHandle(t,()=>r.current);const[a,l]=n.useCollection([]),[o,s]=n.useCollection([]),[c,i]=(e=>[[],(t,r)=>{switch(t.type){case"ITEMS_FOCUS_NEXT":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!1);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"ITEMS_FOCUS_PREV":{if(!t.item||!t.item.current||!e)return;const a=Z(t.item,e,t.ignoreIsAllDay,!0);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(a),[d,u]=(e=>[[],(t,r)=>{switch(t.type){case"SLOT_FOCUS_UP":{if(!t.slot.current||!e)return;const a=Dr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!t.slot||!e)return;const a=Cr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!t.slot||!e)return;const a=kr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!t.slot||!e)return;const a=Sr(t.slot,e);a&&a.current&&a.current.element&&(r.preventDefault(),a.current.element.focus());break}}}])(o),[m,p]=(e=>{const[t,r]=f.useState([]),a=f.useCallback((a,n)=>{switch(a.type){case"ITEMS_SELECT_SELECT":if(!a.item)return;r([a.item]);break;case"ITEMS_SELECT_SELECT_NEXT":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!1);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_SELECT_PREV":{if(!a.item||!a.item.current||!e)return;const t=Z(a.item,e,a.ignoreIsAllDay,!0);t&&(n.preventDefault(),r([t]));break}case"ITEMS_SELECT_RESET":r([]);break;case"ITEMS_SELECT_ADD":if(!a.item)return;t.some(e=>e===a.item)||r([...t,a.item]);break;case"ITEMS_SELECT_REMOVE":if(!a.item)return;r([...t.filter(e=>e!==a.item)])}},[e,t]);return[t,a]})(a),[g,E]=(()=>{const[e,t]=f.useState([]),r=f.useCallback(r=>{switch(r.type){case"SLOTS_SELECT_SELECT":if(!r.slot)return;t([r.slot]);break;case"SLOTS_SELECT_RESET":t([]);break;case"SLOTS_SELECT_ADD":if(!r.slot)return;e.some(e=>e===r.slot)||t([...e,r.slot])}},[e]);return[e,r]})(),h=f.useCallback((e,t)=>{E({type:yr.reset}),p(e,t)},[p,E]),y=f.useCallback((e,t)=>{p({type:hr.reset},t),E(e)},[p,E]),v=f.useMemo(()=>n.classNames("k-scheduler-layout k-scheduler-layout-flex",e.className),[e.className]);return vr({element:r,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),vr({element:r,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1}),f.createElement(Er,{props:e.props,ranges:e.ranges,items:[a,l],slots:[o,s],selectedItems:[m,h],selectedSlots:[g,y],focusedItems:[c,i],focusedSlots:[d,u]},f.createElement("div",{ref:r,style:e.style,className:v,role:"presentation"},e.children))});Ir.displayName="KendoReactSchedulerBaseView";const wr=f.createContext({resource:{},groupIndex:0}),Tr=e=>{const{nested:t,children:r,rowContentProps:a}=e,n=e.rowContent||Ar,l=e.childRowContent||n,o=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group k-group-horizontal"},t?Rr({resources:o,children:r,nested:t,groupIndex:0,rowContent:n,rowContentProps:a,childRowContent:l}):xr({resources:o,children:r,rowContentProps:a,childRowContent:l}))},Rr=e=>{const{resources:t,rowContent:r,nested:a,children:n,groupIndex:l,rowContentProps:o,childRowContent:s}=e;if(l===t.length)return xr({resources:t,children:n,rowContentProps:o,childRowContent:s});const c=C(t,l),i=r;return f.createElement(f.Fragment,null,a?f.createElement("div",{className:"k-scheduler-row"},f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text)))):f.createElement(i,{resources:t,groupIndex:l,...o},c.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-heading-cell"},e.text))),Rr({resources:t,children:n,nested:a,rowContent:r,childRowContent:s,groupIndex:l+1}))},xr=e=>{const{resources:t,childRowContent:r,children:a,rowContentProps:n}=e,l=C(t,t.length-1),o=r,s=t.length>0;return f.createElement("div",{className:"k-scheduler-row"},f.createElement(o,{resources:t,...n},(l.length?l:j).map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell"},f.createElement(wr.Provider,{value:{resource:e,groupIndex:s?t:0}},a)))))};Tr.displayName="KendoReactSchedulerHorizontalResourceIterator";const Ar=e=>e.children,_r=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-side-cell","data-range-index":e.rangeIndex}),e.children),Mr=e=>{const{nested:t,wrapGroup:r,children:a}=e,n=e.cellContent||Hr,l=S(e.group,e.resources);return f.createElement("div",{className:"k-scheduler-group"},t?r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},Lr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},zr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!1))):zr({resources:l,children:a,cellContent:n,depth:0,groupIndex:0},!0):r?f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-sticky-cell"},Nr({resources:l})),f.createElement("div",{className:"k-scheduler-cell k-group-content"},a)):Or({resources:l,children:a,cellContent:n,groupIndex:0}))},Nr=e=>f.createElement("div",{className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-row"},e.resources.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-resource-cell k-heading-cell","data-depth-index":t})))),zr=(e,t=!0)=>{const{resources:r,children:a,cellContent:n,groupIndex:l,depth:o}=e,s=r.length>0;if(o===r.length||!s)return f.createElement(wr.Provider,{value:{resource:r[o],groupIndex:s?l:0}},a);const c=r[o].data.length;return r[o].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},t&&f.createElement("div",{className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":o},e[r[o].textField]),f.createElement("div",{className:"k-scheduler-cell k-group-content k-resource-row","data-depth-index":o,"data-resource-index":c*l+s},zr({resources:r,children:a,cellContent:n,groupIndex:c*l+s,depth:o+1},t))))},Lr=e=>{const{resources:t,children:r,cellContent:a,groupIndex:n,depth:l}=e,o=t.length?t[l].data.length:0;return t[l]?t[l].data.map((e,s)=>f.createElement("div",{key:s,className:"k-scheduler-row"},f.createElement("div",{className:"k-scheduler-cell k-resource-cell k-resource-row k-heading-cell","data-depth-index":l,"data-resource-index":o*n+s},e[t[l].textField]),l+1!==t.length&&f.createElement("div",{className:"k-scheduler-cell k-resource-content"},Lr({resources:t,children:r,cellContent:a,groupIndex:o*n+s,depth:l+1})))):null},Or=e=>{const{resources:t,children:r,groupIndex:a,cellContent:n}=e;return f.createElement("div",{className:"k-scheduler-row"},Pr(t),n,Fr(r,t,a))},Fr=(e,t,r)=>{const a=t.length>0;return f.createElement("div",{className:"k-scheduler-cell k-group-content"},f.createElement(wr.Provider,{value:{resource:t[r],groupIndex:a?r:void 0}},e))},Pr=e=>e.map((e,t)=>f.createElement("div",{key:t,className:"k-scheduler-cell k-group-cell k-heading-cell","data-depth-index":t}));Mr.displayName="KendoReactSchedulerVerticalResourceIterator";const Hr=null,Wr=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day"},t.toLanguageString(xe,Xt[xe])),e.children)},Kr=f.forwardRef((e,t)=>{const{as:r=Vr.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==Vr.as?void 0:l,...a,className:i},c.formatDate(e.date,e.format?e.format:Vr.format))}),Vr={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"t"};Kr.displayName="KendoReactSchedulerTimeHeaderCell";const Gr=e=>{const{slot:t,children:r}=e;return f.createElement(f.Fragment,null,e.isMaster?f.createElement(Kr,{as:e.timeHeaderCell,date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd,className:n.classNames("k-side-cell",{"k-major-cell":!e.isLast})}):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell"}),r)},Br=e=>{const{onChange:t,data:r,validationMessage:a,visited:n,touched:o,modified:s,...c}=e,[i,d]=f.useState(r),u=f.useCallback(e=>t(e),[t]),m=f.useCallback(e=>{const t=l.filterBy(r||[],e.filter);d(t)},[]);return f.createElement(h.ComboBox,{style:{width:"100%"},data:i,filterable:!0,onFilterChange:m,onChange:u,...c})},$r=e=>{const{value:t,data:r,onChange:a,...n}=e,l=f.useCallback(e=>{a&&a.call(void 0,e.currentTarget.dataset.value)},[a]);return f.createElement(s.ButtonGroup,{className:"k-scheduler-recurrence-repeat",width:"100%",...n},r.map(e=>f.createElement(s.Button,{type:"button",key:e.value,selected:e.value===t,onClick:l,"data-value":e.value,togglable:!0},e.text)))},Ur=e=>e.charAt(0).toUpperCase()+e.slice(1),Zr=["first","second","third","fourth","last"],qr=["never","daily","weekly","monthly","yearly"],Yr=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],jr=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],Xr=[{day:0,offset:0},{day:6,offset:0}],Qr=e=>{switch(e){case"day":return Yr;case"weekday":return jr;case"weekend":return Xr}},Jr=e=>{const{value:t,data:r,onChange:a,...n}={...ea,...e},l=r=>{const a=Number(r.currentTarget.dataset.key);e.onChange&&e.onChange.call(void 0,t.some(e=>e===a)?t.filter(e=>e!==a):[...t,a])};return f.createElement(s.ButtonGroup,{width:"auto",...n},(e.data||ea.data).map(e=>f.createElement(s.Button,{type:"button",key:e.value,"data-key":e.value,selected:t.some(t=>t===e.value),togglable:!0,onClick:l},Ur(e.text))))},ea={data:[],value:[]},ta=e=>{const t=o.useInternationalization(),r=o.useLocalization(),{timezone:n}=ae(),[l,s]=f.useState(1),[i,d]=f.useState(a.ZonedDate.fromUTCDate(e.start)),u=f.useCallback((e,t)=>{const a=t?e:"scheduler.recurrenceEditor"+e;return r.toLanguageString(a,Xt[a])},[r]),p=f.useMemo(()=>{var t;return(e=>y.parseRule({recurrenceRule:e})||{})(null!=(t=e.value)?t:aa.value)},[e.value]),v=f.useMemo(()=>(e=>qr.map(t=>({value:t,text:e("Frequencies"+Ur(t))})))(u),[u]),D=f.useMemo(()=>(e=>N(e)&&!(e=>(e=>null==e)(e)||e.trim&&0===e.trim().length)(e.freq)?e.freq:"never")(p),[p]),k=f.useMemo(()=>((e,t)=>{const r=e.firstDay(),a=e.dateFormatNames({type:"days",nameType:"wide"}).map((e,t)=>({text:e,value:t})),n=a.slice(r).concat(a.slice(0,r));return[{text:t("WeekdaysDay"),value:"day"},{text:t("WeekdaysWeekday"),value:"weekday"},{text:t("WeekdaysWeekendday"),value:"weekend"}].concat(n)})(t,u),[t,u]),S=f.useMemo(()=>((e,t,r)=>{var a;let n;if(N(t.byWeekDay))switch(t.byWeekDay.length){case 7:n="day";break;case 5:n="weekday";break;case 2:n="weekend";break;case 1:n=t.byWeekDay[0].day;break;default:n=r.getDay()}else n=r.getDay();return null!=(a=e.find(e=>n===e.value))?a:e[0]})(k,p,e.start),[k,p,e.start]),C=f.useMemo(()=>(e=>e.dateFormatNames({type:"months",nameType:"wide",standAlone:!0}).map((e,t)=>({text:e,value:t+1})))(t),[t]),b=f.useMemo(()=>((e,t)=>e.find(e=>(t.byMonth?t.byMonth[0]:null)===e.value)||e[0])(C,p),[C,p]),I=f.useMemo(()=>(e=>{const t=[1,2,3,4,-1];return Zr.map((r,a)=>({text:e("OffsetPositions"+Ur(r)),value:t[a]}))})(u),[u]),w=f.useMemo(()=>((e,t)=>e.find(e=>e.value===(t.bySetPosition?t.bySetPosition[0]:t.byWeekDay&&t.byWeekDay[0]?t.byWeekDay[0].offset:1))||e[0])(I,p),[I,p]),T=f.useMemo(()=>(e=>N(e.count)?"count":N(e.until)?"until":"never")(p),[p]),R=f.useMemo(()=>((e,t)=>N(e.byMonthDay)&&e.byMonthDay.length>0?e.byMonthDay[0]:t.getDate())(p,e.start),[p,e.start]),x=f.useMemo(()=>(e=>N(e.until)?a.toLocalDate(e.until):null)(p),[p.until]),A=f.useMemo(()=>(e=>{const t=e.firstDay(),r=e.dateFormatNames({type:"days",nameType:"abbreviated"}).map((e,t)=>({text:e,value:t}));return r.slice(t).concat(r.slice(0,t))})(t),[t]),_=f.useMemo(()=>(e=>N(e.byWeekDay)?"weekday":N(e.byMonthDay)?"monthday":void 0)(p),[p.byWeekDay,p.byMonthDay]),M=f.useCallback(r=>{"never"===r.freq?e.onChange({value:null}):(void 0===r.weekStart&&(r.weekStart=t.firstDay()),e.onChange({value:y.serializeRule(r,e.timezone)}))},[e.onChange,e.timezone]),z=f.useCallback(t=>{const r={};r.freq=t,r.interval=1,"weekly"===t&&(r.byWeekDay=[{day:a.ZonedDate.fromLocalDate(e.start,n).getDay(),offset:0}]),("monthly"===t||"yearly"===t)&&(r.byMonthDay=[e.start.getDate()]),"yearly"===t&&(r.byMonth=[e.start.getMonth()+1]),M(r)},[M,e.start,n]),L=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{interval:t}))},[M,p]),O=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{count:t})),null!==t&&s(t)},[M,p]),F=f.useCallback(t=>{const r=t.value;if(!r)return;const n=a.ZonedDate.fromLocalDate(r,e.timezone);M(Object.assign({},p,{until:n})),d(n)},[M,p,e.timezone]),P=f.useCallback(e=>{M(Object.assign({},p,{byWeekDay:A.filter(t=>e.some(e=>e===t.value)).map(e=>({offset:0,day:e.value}))}))},[M,p,A]),H=f.useCallback(e=>{const t=Object.assign({},p),r=e.target.value;"string"==typeof r.value?(t.byWeekDay=Qr(r.value),t.bySetPosition=[w.value]):(t.bySetPosition=void 0,t.byWeekDay=[{day:r.value,offset:w.value}]),M(t)},[w.value,M,p]),W=f.useCallback(e=>{M(Object.assign({},p,{byMonthDay:[e.value]}))},[M,p]),K=f.useCallback(e=>{const t=e.value;M(Object.assign({},p,{byMonth:[t.value]}))},[M,p]),V=f.useCallback(e=>{const t=e.value,r=Object.assign({},p);switch(t){case"never":r.until=void 0,r.count=void 0;break;case"count":r.until=void 0,r.count=l;break;case"until":r.until=i,r.count=void 0}M(r)},[M,p,e.timezone]),G=f.useCallback(e=>{const t=Object.assign({},p);"monthday"===e.value?(t.byWeekDay=void 0,t.bySetPosition=void 0,t.byMonthDay=[R]):"weekday"===e.value&&(t.byMonthDay=void 0,"string"==typeof S.value?(t.bySetPosition=[w.value],t.byWeekDay=Qr(S.value)):t.byWeekDay=[{day:S.value,offset:w.value}]),M(t)},[M,p,R,S]),B=f.useCallback(e=>{const t=Object.assign({},p),r=e.value;if(t.byWeekDay)switch(t.byWeekDay.length){case 7:case 5:case 2:t.bySetPosition=[r.value];break;case 1:t.byWeekDay[0].offset=r.value}M(t)},[M,p]);return f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},r.toLanguageString(nt,Xt[nt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement($r,{value:D,data:v,onChange:z}))),"never"!==D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ur(D)+"RepeatEvery")),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.NumericTextBox,{min:1,step:1,defaultValue:1,value:p.interval,onChange:L,id:"interval-editor",className:"k-recur-interval"})," ",f.createElement(g.Label,{editorId:"interval-editor",className:"k-form-label"},u(Ur(D)+"Interval")))),"weekly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(it,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(Jr,{data:A,value:(p.byWeekDay||[]).map(({day:e})=>e),onChange:P}))),"monthly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{key:"recurrence-repeat-on-monthly-label",className:"k-form-label"},u(pt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,onChange:G,item:ra,className:"k-reset",data:[{value:"monthday",label:u(dt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"weekday-day",min:1,max:31,disabled:"monthday"!==_,value:p&&p.byMonthDay&&p.byMonthDay[0],onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(h.DropDownList,{key:"weekday-value",disabled:"weekday"!==_,value:S,data:k,onChange:H,textField:"text",dataItemKey:"value",style:{width:"auto"}})]}]}))),"yearly"===D&&f.createElement(m.FieldWrapper,null,f.createElement(g.Label,null,u(ht,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{value:_,item:ra,onChange:G,className:"k-reset",data:[{value:"monthday",label:" ",children:[f.createElement(h.DropDownList,{key:"monthday-month",disabled:"monthday"!==_,value:b,data:C,textField:"text",dataItemKey:"value",onChange:K,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(E.NumericTextBox,{key:"monthday-day",min:1,max:31,disabled:"monthday"!==_,value:R,onChange:W,width:"auto"})]},{value:"weekday",label:" ",children:[f.createElement(h.DropDownList,{key:"yearly-weekday-offset",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,data:I,value:w,onChange:B,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-1"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-day",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:S,data:k,onChange:H,style:{width:"auto"}}),f.createElement(f.Fragment,{key:"yearly-separator-2"}," "),f.createElement("span",{key:"yearly-weekday-of-label"},u(gt,!0)),f.createElement(f.Fragment,{key:"yearly-separator-3"}," "),f.createElement(h.DropDownList,{key:"yearly-weekday-month",textField:"text",dataItemKey:"value",disabled:"weekday"!==_,value:b,data:C,onChange:K,style:{width:"auto"}})]}]}))),"never"!==D&&f.createElement("div",{className:"k-scheduler-recurrence-end-rule-editor"},f.createElement(m.FieldWrapper,null,f.createElement(g.Label,{className:"k-form-label"},u(Nt,!0)),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(E.RadioGroup,{item:ra,value:T,onChange:V,data:[{value:"never",label:u(zt,!0)},{value:"count",label:u(_t,!0),children:[f.createElement(f.Fragment,{key:"separator-1"}," "),f.createElement(E.NumericTextBox,{key:"endrule-after-editor",id:"k-endrule-after",className:"k-recur-count",min:1,width:"auto",value:"count"===T?p.count:l,onChange:O,disabled:"count"!==T}),f.createElement(f.Fragment,{key:"separator-2"}," "),f.createElement(g.Label,{key:"endrule-after-label",className:"k-radio-label",editorId:"k-endrule-after"},u(Mt,!0))]},{value:"until",label:u(Lt,!0),children:[f.createElement(f.Fragment,{key:"separator"}," "),f.createElement(c.DatePicker,{key:"k-endrule-until-editor",id:"k-endrule-until",disabled:"until"!==T,min:e.start,value:"until"===T?x:a.toLocalDate(i),onChange:F,width:"auto"})]}]})))))},ra=e=>f.createElement("li",{...e},e.children),aa={value:""};ta.displayName="KendoReactSchedulerRepeatEditor";const na=e=>{const{as:t=sa.as,value:r,onChange:a,...n}=e,{timezone:l}=ae(),o=f.useMemo(()=>la(r,l),[r,l]);return f.createElement(t,{...n,value:o,onChange:e=>{a&&a({value:oa(e.target.value,l)})}})},la=(e,t)=>{if(e){if(!t)return e;const r=a.toLocalDate(a.ZonedDate.fromLocalDate(e,t).toUTCDate());return r.setUTCFullYear(e.getFullYear()),r}return e},oa=(e,t)=>{if(e){if(!t)return e;const r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),a.ZonedDate.fromUTCDate(r,t).toLocalDate()}return e},sa={as:c.DateTimePicker},ca=f.forwardRef((e,t)=>{const r=f.useRef(null),l=f.useRef(null),s=a.timezoneNames(),i=o.useLocalization(),d=se(),{resources:u,timezone:p}=ae();f.useImperativeHandle(l,()=>{var t;return{element:null!=(t=r.current)&&t.element?r.current.element:r.current,props:e}}),f.useImperativeHandle(t,()=>l.current);const{as:E=ia.as,...h}=e,{titleLabel:y=ia.titleLabel,titleError:v=ia.titleError,titleEditor:D=ia.titleEditor,startLabel:k=ia.startLabel,startError:S=ia.startError,startEditor:C=ia.startEditor,startTimezoneLabel:b=ia.startTimezoneLabel,startTimezoneError:I=ia.startTimezoneError,startTimezoneEditor:w=ia.startTimezoneEditor,startTimezoneCheckedLabel:T=ia.startTimezoneCheckedLabel,startTimezoneCheckedEditor:R=ia.startTimezoneCheckedEditor,endLabel:x=ia.endLabel,endError:A=ia.endError,endEditor:_=ia.endEditor,endTimezoneLabel:M=ia.endTimezoneLabel,endTimezoneError:N=ia.endTimezoneError,endTimezoneEditor:z=ia.endTimezoneEditor,endTimezoneCheckedLabel:L=ia.endTimezoneCheckedLabel,endTimezoneCheckedEditor:O=ia.endTimezoneCheckedEditor,allDayLabel:F=ia.allDayLabel,allDayEditor:P=ia.allDayEditor,recurrenceEditor:H=ia.recurrenceEditor,descriptionLabel:W=ia.descriptionLabel,descriptionEditor:K=ia.descriptionEditor,descriptionError:V=ia.descriptionError,resourceLabel:G=ia.resourceLabel,resourceEditor:B=ia.resourceEditor}=e,$=e.valueGetter(d.start)||new Date,U=e.valueGetter(d.startTimezone)||p||"",Z=e.valueGetter(d.endTimezone)||p||"",q=f.useMemo(()=>i.toLanguageString(Ut,Xt[Ut]),[i]),[Y,j]=f.useState(!!e.valueGetter(d.startTimezone)),[X,Q]=f.useState(!!e.valueGetter(d.endTimezone)),J=f.useCallback(t=>{t.value||(e.onChange(d.startTimezone,{value:null}),e.onChange(d.endTimezone,{value:null}),Q(t.value)),j(t.value)},[e.onChange,d.startTimezone,d.endTimezone]),ee=f.useCallback(t=>{t.value||e.onChange(d.endTimezone,{value:null}),Q(t.value)},[e.onChange]),te=f.useCallback(e=>e?void 0:q,[q]),re=f.useCallback((e,t)=>Y?te(t(d.startTimezone)):void 0,[te,Y,d.startTimezone]),ne=f.useCallback((e,t)=>Y&&X?te(t(d.endTimezone))||te(t(d.startTimezone)):void 0,[te,Y,X,d.startTimezone,d.endTimezone]),le=f.useMemo(()=>n.classNames("k-scheduler-edit-form",e.className),[e.className]);return f.createElement(E,{ref:E===ia.as?r:void 0,...h,className:le},f.createElement(f.Fragment,null,f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.title,component:y,editorId:"k-scheduler-editor-title",className:"k-form-label"},i.toLanguageString(Ye,Xt[Ye])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-title",name:d.title,field:d.title,component:D}),e.errors[d.title]&&f.createElement(m.Field,{name:d.title,component:v},e.errors[d.title]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:k,editorId:"k-scheduler-editor-start",className:"k-form-label"},i.toLanguageString(je,Xt[je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-start",name:d.start,width:"auto",component:C,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.start]&&f.createElement(m.Field,{name:d.start,component:S},e.errors[d.start]))),f.createElement(m.FieldWrapper,null,f.createElement(T,{className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(R,{id:"k-scheduler-editor-set-start-timezone",onChange:J,value:Y}),f.createElement(T,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},i.toLanguageString(at,Xt[at])))),Y&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.start,component:b,className:"k-form-label"},i.toLanguageString(Xe,Xt[Xe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:w,value:U,validator:re,data:s,name:d.startTimezone}),e.errors[d.startTimezone]&&f.createElement(m.Field,{name:d.startTimezone,component:I},e.errors[d.startTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.end,component:x,editorId:"k-scheduler-editor-end",className:"k-form-label"},i.toLanguageString(Qe,Xt[Qe])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-scheduler-editor-end",name:d.end,width:"auto",component:_,as:e.valueGetter(d.isAllDay)?c.DatePicker:c.DateTimePicker,timezone:p}),e.errors[d.end]&&f.createElement(m.Field,{name:d.end,component:A},e.errors[d.end]))),Y&&f.createElement(m.FieldWrapper,null,f.createElement("div",{className:"k-form-field-wrap"},f.createElement(O,{id:"k-scheduler-editor-set-end-timezone",onChange:ee,value:X})),f.createElement(L,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},i.toLanguageString(rt,Xt[rt]))),X&&f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.endTimezone,component:M,className:"k-form-label"},i.toLanguageString(Je,Xt[Je])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{value:Z,data:s,validator:ne,component:z,name:d.endTimezone}),e.errors[d.endTimezone]&&f.createElement(m.Field,{name:d.endTimezone,component:N},e.errors[d.endTimezone]))),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.isAllDay,component:g.Label,className:"k-form-label"}),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{id:"k-is-allday-checkbox",name:d.isAllDay,component:P}),f.createElement(m.Field,{name:d.isAllDay,field:d.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:F},i.toLanguageString(et,Xt[et])))),f.createElement("div",{className:"k-recurrence-editor"},f.createElement(m.Field,{component:H,field:d.recurrenceRule,name:d.recurrenceRule,start:$})),f.createElement(m.FieldWrapper,null,f.createElement(m.Field,{name:d.description,component:W,className:"k-form-label"},i.toLanguageString(tt,Xt[tt])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(m.Field,{component:K,name:d.description,rows:1,id:"k-event-description"}),e.errors[d.description]&&f.createElement(m.Field,{name:d.description,component:V},e.errors[d.description]))),(u||[]).map(e=>f.createElement(m.FieldWrapper,{key:e.field},f.createElement(m.Field,{name:e.field,component:G,className:"k-form-label"}),f.createElement(g.Label,{className:"k-form-label"},e.name),f.createElement(m.Field,{name:e.field,component:B,resource:e,multiple:e.multiple,data:e.data,textField:e.textField,valueField:e.valueField,colorField:e.colorField})))))}),ia={as:f.forwardRef((e,t)=>f.createElement(m.FormElement,{ref:t,id:e.id,style:e.style,tabIndex:e.tabIndex,className:e.className,horizontal:e.horizontal,children:e.children})),titleLabel:g.Label,titleError:g.Error,titleEditor:E.Input,startLabel:g.Label,startError:g.Error,startEditor:na,startTimezoneLabel:g.Label,startTimezoneError:g.Error,startTimezoneEditor:Br,startTimezoneCheckedLabel:g.Label,startTimezoneCheckedEditor:E.Checkbox,endLabel:g.Label,endError:g.Error,endEditor:na,endTimezoneLabel:g.Label,endTimezoneError:g.Error,endTimezoneEditor:Br,endTimezoneCheckedLabel:g.Label,endTimezoneCheckedEditor:E.Checkbox,allDayLabel:g.Label,allDayEditor:E.Checkbox,recurrenceEditor:ta,descriptionLabel:g.Label,descriptionEditor:E.TextArea,descriptionError:g.Error,resourceLabel:g.Label,resourceEditor:e=>{const t=e.multiple?h.MultiSelect:h.DropDownList,r=f.useCallback(t=>{const r=t.target.props.dataItemKey,a=e.multiple?(t.target.value||[]).map(e=>e[r]):t.target.value[r];e.onChange.call(void 0,{value:a})},[e.multiple,e.onChange]),a=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r.dataItem[e.colorField],marginRight:N(r.dataItem[e.valueField])?"8px":"4px"}}," "),f.createElement("span",{key:2},"  ",t.props.children));return f.cloneElement(t,{...t.props},a)},[e.colorField,e.valueField]),n=f.useCallback((t,r)=>{const a=f.createElement(f.Fragment,null,e.colorField&&r&&f.createElement("span",{key:1,className:"k-scheduler-mark",style:{backgroundColor:r[e.colorField],marginRight:r[e.valueField]?"8px":"4px"}}," "),t.props.children);return f.cloneElement(t,{},a)},[e.colorField,e.valueField]),l=Array.isArray(e.value)?e.data.filter(t=>e.value.some(r=>t[e.valueField]===r)):e.data.find(t=>t[e.valueField]===e.value);return f.createElement(t,{value:l,onChange:r,data:e.data,textField:e.textField,dataItemKey:e.valueField,valid:e.valid,validationMessage:e.validationMessage,itemRender:a,valueRender:n})}};ca.displayName="KendoReactSchedulerFormEditor";const da=f.forwardRef((e,t)=>{const{onCancel:r,onClose:a,onSubmit:l,editor:c,dialog:i=ua.dialog,validator:u=ua.validator,...g}=e,E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e})),f.useImperativeHandle(t,()=>E.current);const h=o.useLocalization(),y=se(),v=f.useMemo(()=>h.toLanguageString(Ut,Xt[Ut]),[h]),k=f.useMemo(()=>h.toLanguageString(qt,Xt[qt]),[h]),S=f.useMemo(()=>h.toLanguageString(Ue,Xt[Ue]),[h]),C=f.useMemo(()=>h.toLanguageString(Ze,Xt[Ze]),[h]),b=f.useMemo(()=>h.toLanguageString(qe,Xt[qe]),[h]),I=f.useMemo(()=>h.toLanguageString(Zt,Xt[Zt]),[h]),w=f.useCallback(e=>{r&&r.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[r]),T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{value:null,syntheticEvent:e,target:E.current})},[a]),R=f.useCallback((e,t)=>{l&&l.call(void 0,{value:e,syntheticEvent:t,target:E.current})},[l]),x=f.useCallback((e,t)=>e&&t(y.end)&&e.getTime()>t(y.end).getTime()?I:void 0,[y,I]),A=f.useCallback((e,t)=>e&&t(y.start)&&e.getTime()<t(y.start).getTime()?k:void 0,[y,k]),_=f.useCallback(e=>e?void 0:v,[v]),M=f.useCallback((e,t)=>{const r={};r[y.start]=[_(t(y.start)),x(t(y.start),t)].filter(Boolean).reduce((e,t)=>e||t,""),r[y.end]=[_(t(y.start)),A(t(y.start),t)].filter(Boolean).reduce((e,t)=>e||t,"");const a=u(e,t);return{...r,...a}},[A,y.end,y.start,_,x,u]);return n.canUseDOM?D.createPortal(f.createElement(m.Form,{initialValues:e.dataItem,onSubmit:R,validator:M,render:e=>f.createElement(i,{title:b,minWidth:400,onClose:T,className:"k-scheduler-edit-dialog"},f.createElement(ca,{...e,as:c}),f.createElement(p.DialogActionsBar,{layout:"start"},f.createElement(s.Button,{themeColor:"primary",disabled:!e.allowSubmit,onClick:e.onSubmit,icon:"save",svgIcon:d.saveIcon},S),f.createElement(s.Button,{onClick:w,icon:"cancel",svgIcon:d.cancelIcon},C))),...g}),document&&document.body):null}),ua={dialog:p.Dialog,validator:()=>({})};da.displayName="KendoReactSchedulerForm";const ma=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onClick:l,onMouseEnter:o,onMouseLeave:s,onMouseOut:c,onMouseOver:i,onDoubleClick:d,onKeyDown:u,onKeyPress:m,onKeyUp:p}=e,{slot:g,element:E}=((e,t)=>{const{_ref:r}=e,a=f.useRef(null),l=f.useRef(null),[,o]=or();return f.useImperativeHandle(a,()=>({element:l.current,props:e})),f.useImperativeHandle(t,()=>a.current),f.useImperativeHandle(r,()=>a.current),f.useLayoutEffect(()=>(o({type:n.COLLECTION_ACTION.add,item:a}),()=>{o({type:n.COLLECTION_ACTION.remove,item:a})})),{slot:a,element:l}})(e,t),h=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,y=f.useMemo(()=>{var t,r;const a=null!=(t=e.isWorkHour)?t:pa.isWorkHour,l=null!=(r=e.isWorkDay)?r:pa.isWorkDay;return n.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!a||!l,"k-selected":e.selected})},[e.className,e.selected,e.isWorkHour,e.isWorkDay]),v=f.useMemo(()=>({userSelect:"none",...e.style}),[e.style]),D=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:g.current})},[r,g]),k=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:g.current})},[a,g]),S=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:g.current})},[l,g]),C=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:g.current})},[i,g]),b=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:g.current})},[c,g]),I=f.useCallback(e=>{o&&o.call(void 0,{syntheticEvent:e,target:g.current})},[o,g]),w=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:g.current})},[s,g]),T=f.useCallback(e=>{d&&d.call(void 0,{syntheticEvent:e,target:g.current})},[d,g]),R=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:g.current})},[u,g]),x=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:g.current})},[m,g]),A=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:g.current})},[p,g]);return f.createElement("div",{ref:E,id:e.id,style:v,className:y,tabIndex:h,"aria-selected":e.selected||void 0,onFocus:D,onBlur:k,onClick:S,onMouseEnter:I,onMouseLeave:w,onMouseOver:C,onMouseOut:b,onDoubleClick:T,onKeyDown:R,onKeyPress:x,onKeyUp:A,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)}),pa={isWorkHour:!0,isWorkDay:!0};ma.displayName="KendoReactSchedulerSlot";const ga=f.forwardRef((e,t)=>{var r;const{slot:a,_ref:l,...o}=e,s=a||Ea.slot,c=f.useRef(null),i=f.useRef(null);return f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(l,()=>i.current),f.useImperativeHandle(t,()=>c.current),((e,t)=>{const r=f.useRef(void 0),a=f.useRef(0),l=te(),o=f.useCallback(()=>{if(!t||!e.current)return;const r=e.current.element,n=e.current.props;if(!r)return;const l=I(r),o=new Map,s=n.items.filter(e=>e._ref.current);s.forEach(e=>{var t,r,a,n;if(!e._ref.current)return;const{height:l}=b(e._ref.current.element),s=null!=(a=null!=(r=e.order)?r:null==(t=e._ref.current)?void 0:t._order)?a:-1;(null!=(n=o.get(s))?n:0)<l&&o.set(s,l)});const c=Array.from(o.values()).reduce((e,t)=>e+t,0),i=1*s.length*2+c-(l||0)+("object"==typeof t&&t.offsetTop?t.offsetTop:0)+("object"==typeof t&&t.offsetBottom?t.offsetBottom:0);s.length?i>a.current-l&&w(r,{height:i},!0):r&&(r.style.minHeight="")},[t,e]),s=f.useCallback(()=>{void 0!==r.current&&window.cancelAnimationFrame(r.current),r.current=window.requestAnimationFrame(()=>{o()})},[o]);n.useIsomorphicLayoutEffect(()=>{if(!e.current)return;const t=e.current.element;t&&(a.current=t.clientHeight)},[]),f.useEffect(o,[e,e.current&&e.current.props,t]),f.useEffect(()=>{if(!e.current)return;const t=e.current.props.items.filter(e=>e._ref.current).map(e=>{if(!e._ref.current||!e._ref.current.element||!l.current)return;const t=window.ResizeObserver,r=t&&new t(s);return r&&r.observe(e._ref.current.element),()=>{r&&r.disconnect()}});return()=>{t.forEach(e=>e&&e())}},[s,l,e])})(i,null!=(r=e.expandable)?r:Ea.expandable),f.createElement(s,{...o,_ref:i})}),Ea={slot:ma,expandable:!1};ga.displayName="KendoReactSchedulerViewSlot";const ha=f.createContext([null]);ha.displayName="SchedulerEditSlotPropsContext";const ya=f.createContext([null]);ya.displayName="SchedulerEditSlotFormItemContext";const va=({props:e,form:t,children:r})=>f.createElement(ha.Provider,{value:e},f.createElement(ya.Provider,{value:t},r)),fa=e=>{const t=f.useContext(re),r=void 0!==e?e:t.editable||!1,a=!0===r||void 0!==r&&!1!==r&&!0===r.edit,n=!0===r||void 0!==r&&!1!==r&&!0===r.resize,l=!0===r||void 0!==r&&!1!==r&&!0===r.remove,o=!0===r||void 0!==r&&!1!==r&&!0===r.drag;return{add:!0===r||void 0!==r&&!1!==r&&!0===r.add,edit:a,drag:o,remove:l,resize:n,select:!0===r||void 0!==r&&!1!==r&&!0===r.select}},Da=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewSlot:l,form:o,formItem:s,onFormItemChange:c,...i}=e,[d,u]=f.useState(e.tabIndex),m=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(p,()=>({props:e})),f.useImperativeHandle(t,()=>p.current),f.useImperativeHandle(r,()=>m.current);const g=fa(e.editable),E=se(),[h]=or(),[y]=cr(),[v,D]=f.useContext(ir),[,k]=gr(),S=o||ka.form,C=l||ka.viewSlot,[b,I]=Ce(null,s,e.onFormItemChange),w=v.some(t=>!(!t.current||t.current.props.start.getTime()!==e.start.getTime()||t.current.props.end.getTime()!==e.end.getTime()||t.current.props.index!==e.index||t.current.props.group.index!==e.group.index||t.current.props.range.index!==e.range.index||t.current.props.isAllDay!==e.isAllDay)),T=f.useCallback(()=>{const t={};if(M(t,E.start,new Date(e.start.getTime())),M(t,E.end,new Date(e.end.getTime())),M(t,E.isAllDay,e.isAllDay),e.group.resources.length)for(let r=0;r<e.group.resources.length;r++){const a=e.group.resources[r];if(x(e.group.resources)){const n=_(e.group.resources[r],a.valueField);M(t,a.field,a.multiple?[n]:n)}else M(t,a.field,a.multiple?[]:void 0)}return t},[E.start,E.end,E.isAllDay,e.start,e.end,e.isAllDay,e.group.resources]),R=f.useCallback(t=>{g.select&&D({type:yr.select,slot:m},t.syntheticEvent),e.onFocus&&e.onFocus.call(void 0,t)},[D,g.select,e.onFocus]),A=f.useCallback(t=>{if(g.add){const e=T();I(e,t)}e.onDoubleClick&&e.onDoubleClick.call(void 0,t)},[T,g.add,e.onDoubleClick,I]),N=f.useCallback(e=>{let t;switch(e.syntheticEvent.keyCode){case n.Keys.left:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.left,slot:m},e.syntheticEvent);break;case n.Keys.right:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.right,slot:m},e.syntheticEvent);break;case n.Keys.up:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.up,slot:m},e.syntheticEvent);break;case n.Keys.down:if(!h)return;e.syntheticEvent.preventDefault(),k({type:fr.down,slot:m},e.syntheticEvent);break;case n.Keys.enter:{if(!h||!g.add)return;const e=T();I(e);break}case n.Keys.tab:t=(e=>{const t=e.props.items.find(e=>0===e.order)||e.props.items[0];return t&&t._ref.current})(e.target)}t&&(e.syntheticEvent.preventDefault(),t.element&&t.element.focus())},[T,k,g.add,I,h]),z=f.useCallback(e=>{a&&a.call(void 0,{type:J.create,series:!1,dataItem:e.value},e),I(null,e.syntheticEvent)},[a,I]),L=f.useCallback(e=>{I(null,e.syntheticEvent)},[I]),O=f.useCallback(e=>{I(null,e)},[I]),F=f.useCallback((e,t)=>{I&&I(e,t)},[I]);return f.useEffect(()=>{const t=h.length&&h[0].current===m.current;u(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===v.length&&t&&0===y.length?0:void 0)},[y,e.tabIndex,v.length,h]),f.createElement(va,{props:e,form:[b,F]},f.createElement(C,{...i,_ref:m,selected:w,tabIndex:d,onFocus:R,onDoubleClick:A,onKeyDown:N}),b&&f.createElement(S,{dataItem:b,onSubmit:z,onClose:O,onCancel:L}))}),ka={viewSlot:ga,form:da};Da.displayName="KendoReactSchedulerEditSlot";const Sa=f.forwardRef((e,t)=>{const{isRemove:r,onClose:a,onSeriesClick:l,onOccurrenceClick:c}=e,i=f.useRef(null);f.useImperativeHandle(i,()=>({props:e})),f.useImperativeHandle(t,()=>i.current);const d=o.useLocalization(),u=e=>d.toLanguageString(e,Xt[e]),m=u(Ve),g=u(Ge),E=u(Be),h=u($e),y=u(Ht),v=u(Wt),k=u(Vt),S=u(Pt),C=r?k:h,b=r?S:E,I=r?y:m,w=r?v:g,T=f.useCallback(({syntheticEvent:e})=>{a&&a.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[a]),R=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[l]),x=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,value:null,target:i.current})},[c]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:C,onClose:T},b,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:x},I),f.createElement(s.Button,{onClick:R},w))),document&&document.body):null});Sa.displayName="KendoReactSchedulerSchedulerOccurrenceDialog";const Ca=f.forwardRef((e,t)=>{const{onClose:r,onCancel:a,onConfirm:l}=e,c=f.useRef(null);f.useImperativeHandle(c,()=>({props:e})),f.useImperativeHandle(t,()=>c.current);const i=o.useLocalization(),d=i.toLanguageString(Ze,Xt[Ze]),u=i.toLanguageString(Ot,Xt[Ot]),m=i.toLanguageString(Ft,Xt[Ft]),g=i.toLanguageString(Kt,Xt[Kt]),E=f.useCallback(({syntheticEvent:e})=>{if(!r)return;const t={syntheticEvent:e,value:null,target:c.current};r.call(void 0,t)},[r]),h=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,value:null})},[a]),y=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,value:null})},[l]);return n.canUseDOM?D.createPortal(f.createElement(p.Dialog,{title:g,onClose:E},m,f.createElement(p.DialogActionsBar,null,f.createElement(s.Button,{onClick:h},d),f.createElement(s.Button,{onClick:y},u))),document&&document.body):null});Ca.displayName="KendoReactSchedulerRemoveDialog";const ba=f.forwardRef((e,t)=>{const{onFocus:r,onBlur:a,onMouseDown:l,onClick:s,onMouseUp:c,onMouseOut:i,onMouseOver:u,onMouseEnter:m,onMouseLeave:p,onDoubleClick:g,onRemoveClick:E,onKeyUp:h,onKeyDown:y,onKeyPress:v,onPress:D,onDrag:k,onRelease:S,onResizePress:C,onResizeEndDrag:b,onResizeRelease:I,onResizeStartDrag:w}=e,{item:T,element:R}=((e,t)=>{const{_ref:r,itemRef:a,_maxSiblingsPerSlot:l,_siblings:o,_order:s}=e,c=f.useRef(null),i=f.useRef(null),[,d]=cr();return f.useImperativeHandle(c,()=>({element:i.current,props:e,get _maxSiblingsPerSlot(){return null==l?void 0:l.current},set _maxSiblingsPerSlot(e){var t;null!=e&&void 0!==l&&void 0!==l.current&&(l.current=e,null==(t=null==o?void 0:o.current)||t.forEach(t=>{var r;!t||t._maxSiblingsPerSlot===e||e<(null!=(r=t._maxSiblingsPerSlot)?r:0)||(t._maxSiblingsPerSlot=e)}))},get _order(){return null==s?void 0:s.current},set _order(e){void 0!==e&&void 0!==s&&void 0!==s.current&&(s.current=e)}})),f.useImperativeHandle(t,()=>c.current),f.useImperativeHandle(r,()=>c.current),f.useImperativeHandle(a,()=>c.current),n.useIsomorphicLayoutEffect(()=>(d({type:n.COLLECTION_ACTION.add,item:c}),()=>{d({type:n.COLLECTION_ACTION.remove,item:c})})),{item:c,element:i}})(e,t),x=n.useDir(R),A=f.useRef(null),_=f.useRef(null),M=f.useRef(null),N=f.useRef(null),z=fa(e.editable),L=o.useInternationalization(),O=o.useLocalization(),F=O.toLanguageString(Fe,Xt[Fe]),P=O.toLanguageString(xe,Xt[xe]),H=e.group.resources.find(e=>!(!e.colorField||""===e[e.colorField]||void 0===e[e.colorField])),W=H&&H.colorField&&H[H.colorField],K=void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:e.selected?0:-1,V=f.useMemo(()=>n.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&z.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,z.select]),G=f.useMemo(()=>`${e.title}, ${function(e,t,r,a,n="all day"){const l={skeleton:"yMMMMEEEEdhm"},o={skeleton:"yMMMMEEEEd"},s=t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate();if(a){const a=0===r.getHours()&&0===r.getMinutes()&&0===r.getSeconds()&&r.getTime()-t.getTime()===864e5;return s||a?`${e.formatDate(t,o)} (${n})`:`${e.formatDate(t,o)} to ${e.formatDate(r,o)} (${n})`}return s?`${e.formatDate(t,l)}–${e.formatDate(r,"t")}`:`${e.formatDate(t,l)}-${e.formatDate(r,l)}`}(L,e.zonedStart,e.zonedEnd,e.isAllDay,P)}`,[L,e.isAllDay,e.title,e.zonedEnd,e.zonedStart,P]),B=f.useMemo(()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:W,backgroundColor:e.resizeHint?void 0:W,touchAction:"none",...e.style}),[W,e.style,e.resizeHint]),$=f.useCallback(e=>{r&&r.call(void 0,{syntheticEvent:e,target:T.current})},[r,T]),U=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:T.current})},[a,T]),Z=f.useCallback(e=>{l&&l.call(void 0,{syntheticEvent:e,target:T.current})},[l,T]),q=f.useCallback(e=>{s&&s.call(void 0,{syntheticEvent:e,target:T.current})},[s,T]),Y=f.useCallback(e=>{c&&c.call(void 0,{syntheticEvent:e,target:T.current})},[c,T]),j=f.useCallback(e=>{u&&u.call(void 0,{syntheticEvent:e,target:T.current})},[u,T]),X=f.useCallback(e=>{i&&i.call(void 0,{syntheticEvent:e,target:T.current})},[i,T]),Q=f.useCallback(e=>{m&&m.call(void 0,{syntheticEvent:e,target:T.current})},[m,T]),J=f.useCallback(e=>{p&&p.call(void 0,{syntheticEvent:e,target:T.current})},[p,T]),ee=f.useCallback(e=>{g&&g.call(void 0,{syntheticEvent:e,target:T.current})},[g,T]),te=f.useCallback(e=>{E&&E.call(void 0,{syntheticEvent:e,target:T.current})},[E,T]),re=f.useCallback(e=>{y&&y.call(void 0,{syntheticEvent:e,target:T.current})},[y,T]),ae=f.useCallback(e=>{v&&v.call(void 0,{syntheticEvent:e,target:T.current})},[v,T]),ne=f.useCallback(e=>{h&&h.call(void 0,{syntheticEvent:e,target:T.current})},[h,T]),le=f.useCallback(e=>{D&&D.call(void 0,{dragEvent:e,target:T.current})},[D,T]),oe=f.useCallback(e=>{k&&k.call(void 0,{dragEvent:e,target:T.current})},[k,T]),se=f.useCallback(e=>{S&&S.call(void 0,{dragEvent:e,target:T.current})},[S,T]),ce=f.useCallback(e=>{C&&C.call(void 0,{dragEvent:e,target:T.current})},[C,T]),ie=f.useCallback(e=>{w&&w.call(void 0,{dragEvent:e,target:T.current})},[w,T]),de=f.useCallback(e=>{b&&b.call(void 0,{dragEvent:e,target:T.current})},[b,T]),ue=f.useCallback(e=>{I&&I.call(void 0,{dragEvent:e,target:T.current})},[I,T]);return n.useDraggable(R,{onPress:le,onDrag:oe,onRelease:se}),n.useDraggable(A,{onPress:ce,onDrag:de,onRelease:ue}),n.useDraggable(_,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(M,{onPress:ce,onDrag:ie,onRelease:ue}),n.useDraggable(N,{onPress:ce,onDrag:de,onRelease:ue}),f.createElement("div",{ref:R,id:e.id,style:B,tabIndex:K,className:V,role:"button","aria-label":G,onFocus:$,onBlur:U,onMouseUp:Y,onMouseDown:Z,onClick:q,onMouseOver:j,onMouseOut:X,onMouseEnter:Q,onMouseLeave:J,onDoubleClick:ee,onKeyDown:re,onKeyPress:ae,onKeyUp:ne,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},z.remove&&f.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:F,"aria-label":F,onClick:te},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})),e.head&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-left":"caret-alt-right",icon:"rtl"===x?d.caretAltLeftIcon:d.caretAltRightIcon})),z.resize&&e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-n",ref:M}),f.createElement("span",{className:"k-resize-handle k-resize-s",ref:N})),z.resize&&!e.vertical&&f.createElement(f.Fragment,null,f.createElement("span",{className:"k-resize-handle k-resize-w",ref:_}),f.createElement("span",{className:"k-resize-handle k-resize-e",ref:A})),e.resizeHint&&f.createElement(f.Fragment,null,f.createElement("div",{className:"k-marquee-color",style:{borderColor:W,backgroundColor:W}}),f.createElement("div",{className:"k-marquee-text"},!e.tail&&f.createElement("div",{className:"k-label-top"},L.formatDate(e.zonedStart,e.format)),!e.head&&f.createElement("div",{className:"k-label-bottom"},L.formatDate(e.zonedEnd,e.format)))))});ba.displayName="KendoReactSchedulerItem";const Ia=f.forwardRef((e,t)=>{const r=f.useMemo(()=>n.classNames("k-event-template",e.className),[e.className]);return f.createElement("div",{ref:t,...e,className:r})}),wa=(e,t)=>{const{element:r}=e;f.useEffect(()=>{if(!r||!e.syncHeight)return;const t=[[]];Array.from(r.querySelectorAll(e.selector)).filter(t=>!t.classList.contains((e=>e.slice(1,e.length))(e.applyTo))).forEach(r=>{const a=r.clientHeight,n=r.getAttribute(e.horizontalAttribute),l=r.getAttribute(e.verticalAttribute);null===n||null===l||(t[n]||(t[n]=[]),(!t[n][l]||a>t[n][l])&&(t[n][l]=a-1))}),Array.from(r.querySelectorAll(e.applyTo)).forEach(r=>{const a=r.getAttribute(e.horizontalAttribute),n=r.getAttribute(e.verticalAttribute);if(null===a||null===n)return;const l=I(r),o=Math.round(t[a][n]-l);w(r,{height:o},!0)})},t)},Ta=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null),p=fa(e.editable);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const g=r||Ra.item,E=o.useInternationalization(),[h]=cr(),[y]=or(),v=te(),[D,k]=f.useState(!0),[S,C]=f.useState(!1),I=f.useRef(e.order),R=f.useRef(0),x=n.useDir(v),A=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${E.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[E,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),_=(e,t)=>{let r=1;return e.forEach(e=>{const a=t.filter(t=>M(e.current.props,t.props));a.length>r&&(r=a.length)}),r},M=(t,r)=>H(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),N=()=>{var t,r,a,n;const l=(y||[]).filter(t=>t.current&&M(t.current.props,e)),o=i.current&&i.current.element,s=T(l);if(0===l.length)return void k(!1);if(!s.current||!o)return;const c=b(s.current.element),d=[],u=[],m=[];(h||[]).forEach(e=>{e.current&&(e.current.props.dragHint?u.push(e.current):e.current.props.resizeHint?m.push(e.current):d.push(e.current))});const g=e.dragHint||e.resizeHint?((e,t,r,a=!1)=>{let n;return r.forEach(r=>{const l=[];t.sort((e,t)=>e.props.start.getTime()-t.props.start.getTime()).forEach(t=>{if((a||t.props.isAllDay===r.current.props.isAllDay)&&t.props.range.index===r.current.props.range.index&&t.props.group.index===r.current.props.group.index&&H(t.props.start,t.props.end,r.current.props.start,r.current.props.end)){const r=G(l);t===e&&void 0===n&&(n=r),l.splice(r,0,r)}})}),n})(i.current,e.dragHint?u:m,l,e.ignoreIsAllDay):null!=(t=e.order)?t:0;if(e.vertical||e.dragHint||e.resizeHint||null===e.order||void 0===e.order)I.current=g;else{const t=d.filter(e=>e.props.isAllDay);I.current=((e,t)=>{var r;const a=t.filter(e=>null!==e.props.order&&void 0!==e.props.order).map(e=>{let t=e.props.start,r=e.props.end;return e.props.isAllDay&&(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(r.getFullYear(),r.getMonth(),r.getDate())),{order:e.props.order,start:t,end:r}}),n=Array.from(new Set(a.map(e=>e.order))).sort((e,t)=>e-t),l=new Map;for(const e of a)l.has(e.order)||l.set(e.order,[]),l.get(e.order).push({start:e.start,end:e.end});const o=[],s=new Map;for(const e of n){const t=l.get(e);let r=-1;for(let e=0;e<o.length;e++)if(t.every(t=>o[e].every(e=>!H(e.start,e.end,t.start,t.end,!0)))){r=e;break}-1===r&&(r=o.length,o.push([])),o[r].push(...t),s.set(e,r)}return null!=(r=s.get(e))?r:e})(e.order,t)}let E=e.dragHint||e.resizeHint?_(l,e.dragHint?u:m):_(l,d);const v=((e,t)=>e.map(e=>t.filter(t=>M(e.current.props,t.props))))(l,d);let f=0;const D=!e.vertical&&null!==I.current;if(v.forEach(t=>{let r=0;t.forEach(t=>{if(H(t.props.start,t.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&t._maxSiblingsPerSlot&&t._maxSiblingsPerSlot>E&&t.element!==o&&(E=t._maxSiblingsPerSlot),!D){const e=b(t.element);null!==t.props.order&&void 0!==t.props.order&&t.props.order<I.current&&(r=e.top+e.height-c.top-1*I.current+1)}}),r>f&&(f=r)}),D){const t=null==(r=e.style)?void 0:r.height,a="number"==typeof t?t:25;f=I.current*(a+1)}if(0===l.length)return void k(!1);const S=p.add?20:0;c.width=e.vertical?c.width/E-1-S/E:c.width*l.length-1,e.vertical?c.height=c.height*l.length-1:(e.resizeHint||e.dragHint)&&E<=1||(c.height=null!=(n=null==(a=e.style)?void 0:a.height)?n:25),c.left=e.vertical?c.left+I.current*c.width+1*I.current:c.left,c.top=e.vertical?c.top:c.top+f+1*I.current,R.current=E,w(o,c),C(!0),k(!0)},z=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{N()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[N]);f.useEffect(N);const L=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return wa({element:L,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!v.current)return;const e=window.ResizeObserver,t=e&&new e(z);return t&&t.observe(v.current),()=>{t&&t.disconnect()}},[z,v]),f.createElement(g,{...s,_ref:i,_maxSiblingsPerSlot:R,_order:I,itemRef:i,style:{visibility:S?void 0:"hidden",display:D?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===x?"caret-alt-right":"caret-alt-left",icon:"rtl"===x?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon})),!e.resizeHint&&f.createElement("div",{title:A},!e.isAllDay&&f.createElement(Ia,{className:"k-event-time"},A),f.createElement(Ia,null,e.title)))}),Ra={item:ba};Ta.displayName="KendoReactSchedulerViewItem";const xa=(e,{dateRange:t,fields:r,timezone:a})=>e.map(Aa(r)).reduce(_a(t,a,r),[]).filter(e=>!O(e.dataItem,r)),Aa=e=>t=>({uid:n.getter(e.id||"id")(t),start:n.getter(e.start||"start")(t),startTimezone:n.getter(e.startTimezone||"startTimezone")(t),originalStart:n.getter(e.originalStart||"originalStart")(t),end:n.getter(e.end||"end")(t),endTimezone:n.getter(e.endTimezone||"endTimezone")(t),isAllDay:n.getter(e.isAllDay||"isAllDay")(t),title:n.getter(e.title||"title")(t),description:n.getter(e.description||"description")(t),occurrenceId:n.getter("occurrenceId")(t),recurrenceRule:n.getter(e.recurrenceRule||"recurrenceRule")(t),recurrenceExceptions:n.getter(e.recurrenceExceptions||"recurrenceExceptions")(t),recurrenceId:n.getter(e.recurrenceId||"recurrenceId")(t),dataItem:n.clone(t)}),_a=(e,t,r)=>(a,n)=>[...a,...n.recurrenceRule&&(null===n.recurrenceId||void 0===n.recurrenceId)&&O(n.dataItem,r)?[...Ma(n,{dateRange:e,timezone:t,fields:r})]:[n]],Ma=(e,{dateRange:t,timezone:r,fields:l})=>{const o=e.recurrenceRule,s=y.parseRule({recurrenceRule:o});if(!s)return[];s.start||(s.start=a.ZonedDate.fromLocalDate(e.start,r)),s.end||(s.end=a.ZonedDate.fromLocalDate(e.end,r));const c=e.recurrenceExceptions;c&&(s.exceptionDates=c.map(e=>a.ZonedDate.fromLocalDate(e,r)));const i=t.zonedStart,d=t.zonedEnd,u=y.expand(s,{rangeStart:i,rangeEnd:d});return u.events.length?u.events.map((t,r)=>{const a=n.clone(e),o=n.clone(e.dataItem);return a.recurrenceId=a.uid,M(o,l.recurrenceId,e.uid),a.originalStart=t.start.toLocalDate(),M(o,l.originalStart,t.start.toLocalDate()),a.start=t.start.toLocalDate(),M(o,l.start,t.start.toLocalDate()),a.end=t.end.toLocalDate(),M(o,l.end,t.end.toLocalDate()),a.occurrenceId=String(r),M(o,"occurrenceId",String(r)),a.dataItem=o,a}):[]},Na=(e,{timezone:t},{groups:r,ranges:n})=>{const o=[];return l.orderBy(e,[{field:"start",dir:"asc"},{field:"end",dir:"desc"},{field:"isAllDay",dir:"desc"},{field:"title",dir:"asc"},{field:"uid",dir:"asc"}]).forEach(e=>{r.forEach(l=>{const s=1===r.length?za(e,l):l;Oa(e,s)&&n.forEach(r=>{if(Fa(e,r)){const n=f.createRef(),l=f.createRef(),c=r.end<e.end,i=e.start<r.start,d=a.ZonedDate.fromLocalDate(e.start,t),u=a.ZonedDate.fromLocalDate(e.end,t),m={...e,_ref:l,itemRef:n,head:c,tail:i,order:null,zonedStart:d,zonedEnd:u,group:s,range:r,slots:[],isRecurring:!!e.recurrenceRule,isException:!e.recurrenceRule&&null!==e.recurrenceId&&void 0!==e.recurrenceId,isAllDay:!!e.isAllDay};o.push(m)}})})}),o},za=(e,t)=>({index:0,resources:t.resources.filter(t=>La(e,t))}),La=(e,t)=>t.multiple?(e.dataItem[t.field]||[]).some(e=>t[t.valueField]===e):e.dataItem[t.field]===t[t.valueField],Oa=(e,t)=>!t.resources.some(t=>t.multiple?!e.dataItem[t.field].some(e=>t[t.valueField]===e):e.dataItem[t.field]!==t[t.valueField]),Fa=(e,t)=>H(t.start,t.end,e.start,e.end)&&(void 0===t.isAllDay||!!e.isAllDay==!!t.isAllDay),Pa=e=>{const t=nr(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=or(),s=e.viewItem||Ha.viewItem,c=f.useMemo(()=>xa([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l,n,r]),i=f.useMemo(()=>Na(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>f.createElement(s,{key:r,...t,item:e.item,dragHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})))},Ha={viewItem:Ta,item:ba};Pa.displayName="KendoReactSchedulerDrag";const Wa=e=>{const t=nr(),{timezone:r}=ae(),a=de(),n=se(),l=me(),[o]=or(),s=e.viewItem||Ka.viewItem,c=f.useMemo(()=>xa([e.dataItem],{dateRange:l,fields:n,timezone:r}),[e.dataItem,l.start.getTime(),l.end.getTime(),n,r]),i=f.useMemo(()=>Na(c,{timezone:r},{groups:a,ranges:t}),[c,r,a,t]),d=(o||[]).map(e=>e.current.props);return $(i,d),f.createElement(f.Fragment,null,i.map((t,r)=>{var a;return f.createElement(s,{key:r,...t,format:e.format,item:null!=(a=e.item)?a:Ka.item,resizeHint:!0,vertical:e.vertical,ignoreIsAllDay:e.ignoreIsAllDay})}))},Ka={viewItem:Ta,item:ba};Wa.displayName="KendoReactSchedulerResize";const Va=f.createContext([null]);Va.displayName="SchedulerEditItemPropsContext";const Ga=f.createContext([null,n.noop,n.noop]);Ga.displayName="SchedulerEditItemFormItemContext";const Ba=f.createContext([null,n.noop,n.noop]);Ba.displayName="SchedulerEditItemDragItemContext";const $a=f.createContext([null,n.noop,n.noop]);$a.displayName="SchedulerEditItemResizeItemContext";const Ua=f.createContext([null,n.noop,n.noop]);Ua.displayName="SchedulerEditItemRemoveItemContext";const Za=f.createContext([!1,n.noop,n.noop]);Za.displayName="SchedulerEditItemShowRemoveDialogContext";const qa=f.createContext([!1,n.noop,n.noop]);qa.displayName="SchedulerEditItemShowOccurrenceDialogContext";const Ya=({props:e,form:t,drag:r,resize:a,remove:n,showRemoveDialog:l,showOccurrenceDialog:o,children:s})=>f.createElement(Va.Provider,{value:e},f.createElement(Ga.Provider,{value:t},f.createElement(Ba.Provider,{value:r},f.createElement($a.Provider,{value:a},f.createElement(Ua.Provider,{value:n},f.createElement(Za.Provider,{value:l},f.createElement(qa.Provider,{value:o},s)))))));var ja=(e=>(e.set="FORM_ITEM_SET",e.setMaster="FORM_ITEM_SET_MASTER",e.reset="FORM_ITEM_RESET",e.complete="FORM_ITEM_COMPLETE",e))(ja||{});var Xa=(e=>(e.set="SHOW_OCCURRENCE_DIALOG_SET",e.open="SHOW_OCCURRENCE_DIALOG_OPEN",e.close="SHOW_OCCURRENCE_DIALOG_CLOSE",e.reset="SHOW_OCCURRENCE_DIALOG_RESET",e.toggle="SHOW_OCCURRENCE_DIALOG_TOGGLE",e))(Xa||{});var Qa=(e=>(e.set="REMOVE_ITEM_SET",e.reset="REMOVE_ITEM_RESET",e.complete="REMOVE_ITEM_COMPLETE",e))(Qa||{});var Ja=(e=>(e.set="SHOW_REMOVE_DIALOG_SET",e.open="SHOW_REMOVE_DIALOG_OPEN",e.close="SHOW_REMOVE_DIALOG_CLOSE",e.reset="SHOW_REMOVE_DIALOG_RESET",e.toggle="SHOW_REMOVE_DIALOG_TOGGLE",e))(Ja||{});var en=(e=>(e.set="DRAG_ITEM_SET",e.start="DRAG_ITEM_START",e.drag="DRAG_ITEM_DRAG",e.complete="DRAG_ITEM_COMPLETE",e.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="DRAG_ITEM_COMPLETE_SERIES",e.reset="DRAG_ITEM_RESET",e.dragSelected="DRAG_ITEM_DRAG_SELECTED",e))(en||{});var tn=(e=>(e.set="RESIZE_ITEM_SET",e.start="RESIZE_ITEM_START",e.startDrag="RESIZE_ITEM_START_DRAG",e.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",e.endDrag="RESIZE_ITEM_END_DRAG",e.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",e.complete="RESIZE_ITEM_COMPLETE",e.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",e.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",e.reset="RESIZE_ITEM_RESET",e))(tn||{});var rn=(e=>(e.reset="SERIES_RESET",e.set="SERIES_SET",e.toggle="SERIES_TOGGLE",e))(rn||{});const an=f.forwardRef((e,t)=>{const{_ref:r,itemRef:a,onDataAction:l,ignoreIsAllDay:o,viewItem:s,series:c,onSeriesChange:i,form:d,formItem:u,onFormItemChange:m,drag:p,dragItem:g,onDragItemChange:E,resize:h,resizeItem:y,onResizeItemChange:v,removeDialog:D,removeItem:k,onRemoveItemChange:S,occurrenceDialog:C,showOccurrenceDialog:b,onShowOccurrenceDialogChange:I,showRemoveDialog:w,onShowRemoveDialogChange:T,onFocus:R,onFocusAction:x,onMouseDown:N,onMouseDownAction:z,onMouseUp:O,onMouseUpAction:F,onClick:P,onClickAction:H,onDoubleClick:W,onDoubleClickAction:K,onRemoveClick:V,onRemoveClickAction:G,onPress:B,onPressAction:$,onDrag:U,onDragAction:Z,onRelease:q,onReleaseAction:Y,onResizePress:j,onResizePressAction:X,onResizeStartDrag:Q,onResizeStartDragAction:ee,onResizeEndDrag:te,onResizeEndDragAction:re,onResizeRelease:ae,onResizeReleaseAction:ne,onOccurrenceClick:le,onOccurrenceClickAction:oe,onSeriesClick:ce,onSeriesClickAction:ie,onKeyDown:ue,onKeyDownAction:me,onKeyUp:pe,onKeyUpAction:ge,onRemoveConfirm:Ee,onRemoveConfirmAction:he,onFormSubmit:ye,onFormSubmitAction:fe,onCancel:De,onCancelAction:Se}={...nn,...e},[be,Ie]=f.useState(e.tabIndex),we=f.useRef(null),Te=f.useRef(null),Re=n.useId();f.useImperativeHandle(we,()=>({props:e,element:Te.current&&Te.current.element})),f.useImperativeHandle(t,()=>we.current),f.useImperativeHandle(r,()=>Te.current),f.useImperativeHandle(a,()=>Te.current);const xe=s||nn.viewItem,Ae=p||nn.drag,_e=h||nn.resize,Me=d||nn.form,Ne=C||nn.occurrenceDialog,ze=D||nn.removeDialog,Le=fa(e.editable),[Oe,Fe]=ur(),[Pe,,He]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SERIES_RESET":return null;case"SERIES_SET":return t.payload;case"SERIES_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(null,c,i),[We,Ke,Ve]=((e,t)=>{const[r,a]=Ce(...t),l=se(),[o]=ve();return[r,a,(t,s)=>{let c;switch(t.type){case"FORM_ITEM_SET":c=t.payload;break;case"FORM_ITEM_RESET":c=null;break;case"FORM_ITEM_SET_MASTER":c=n.clone(L(t.payload,l,o));break;case"FORM_ITEM_COMPLETE":e.onDataAction&&r&&(e.onDataAction.call(void 0,{type:J.update,series:e.series,dataItem:t.payload}),c=null);break;default:c=r}a(c,s)}]})({series:Pe,onDataAction:l},[null,u,m]),[Ge,Be,$e]=((e,t)=>{const r=f.useRef(0),a=f.useRef(0),l=f.useRef(0),o=f.useRef(null),[s,c]=Ce(...t),[i]=ur(),d=se(),u=de();return[s,c,t=>{switch(t.type){case"DRAG_ITEM_SET":c(t.payload);break;case"DRAG_ITEM_RESET":c(null);break;case"DRAG_ITEM_DRAG_SELECTED":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const r=A(t.payload.x,t.payload.y,7);if(!r||r===o.current)return;const s=n.clone(e.dataItem),u=r.getAttribute("data-slot-start"),m="true"===r.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&m!==e.isAllDay)return;const p=new Date(_(s,d.start)),g=Number(u)-p.getTime(),E=i.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g),a=new Date(e.current.props.end.getTime()+g);return M(t,d.start,r),M(t,d.end,a),t}).filter(Boolean);o.current=r,c([...E]);break}case"DRAG_ITEM_START":{const o=t.payload.x,s=t.payload.y;a.current=o,l.current=s;const c=A(o,s,7);if(!c)return;const i=n.clone(e.dataItem),u=c.getAttribute("data-slot-start"),m=_(i,d.start);if(null===u)return;r.current=Number(u)-new Date(m).getTime();break}case"DRAG_ITEM_DRAG":{if(Math.abs(a.current-t.payload.x)<10&&Math.abs(l.current-t.payload.y)<10)return;const s=A(t.payload.x,t.payload.y,7);if(!s||s===o.current)return;const i=n.clone(e.dataItem),m=s.getAttribute("data-slot-start"),p=s.getAttribute("data-slot-group"),g="true"===s.getAttribute("data-slot-allday");if(!e.ignoreIsAllDay&&g!==e.isAllDay)return;const E=new Date(_(i,d.start)),h=new Date(_(i,d.end)).getTime()-E.getTime(),y=new Date(Number(m)-Number(r.current)),v=new Date(Number(m)-Number(r.current)+h),f=u.find(e=>e.index===Number(p));M(i,d.start,y),M(i,d.end,v),f&&u.length>1&&f.resources.forEach(e=>{e.multiple||M(i,e.field,e[e.valueField])}),o.current=s,i&&c(i);break}case"DRAG_ITEM_COMPLETE":c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:s});break;case"DRAG_ITEM_COMPLETE_OCCURRENCE":{const t=Array.isArray(s)?s.slice():n.clone(s);c(null),e.onDataAction&&s&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:t});break}case"DRAG_ITEM_COMPLETE_SERIES":{let t;if(Array.isArray(s))t=s.map(e=>{const t=n.clone(e);return M(t,d.start,_(e,d.start)),M(t,d.end,_(e,d.end)),t});else{const e=n.clone(s);M(e,d.start,_(s,d.start)),M(e,d.end,_(s,d.end)),t=e}c(null),e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}default:c(s)}}]})({dataItem:e.dataItem,ignoreIsAllDay:e.ignoreIsAllDay,isAllDay:e.isAllDay,onDataAction:l},[null,g,E]),[Ue,Ze,qe]=((e,t)=>{const r=f.useRef(null),[a,l]=Ce(...t),[o]=ur(),s=se();return[a,l,(t,c)=>{let i=a;switch(t.type){case"RESIZE_ITEM_SET":i=t.payload;break;case"RESIZE_ITEM_RESET":default:i=null;break;case"RESIZE_ITEM_START":{if(c.stopPropagation(),!i)return;const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const d=o.getAttribute("data-slot-start"),u=new Date(Number(d)),m=n.clone(e.dataItem);if(u>=_(m,s.end))return;M(m,s.start,u),r.current=o,i=m;break}case"RESIZE_ITEM_START_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.start)),g=new Date(Number(m)).getTime()-p.getTime();let E=!1;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.start.getTime()+g);if(!(r>=_(t,s.end)))return M(t,s.start,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_START_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-start"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d>=u.end)return;M(u,s.start,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG":{const a=t.payload.x,l=t.payload.y,o=A(a,l,7);if(!o||o===r.current)return;const c=o.getAttribute("data-slot-end"),d=new Date(Number(c)),u=n.clone(e.dataItem);if(d<=u.start)return;M(u,s.end,d),r.current=o,i=u;break}case"RESIZE_ITEM_END_DRAG_SELECTED":{c.stopPropagation();const a=t.payload.x,l=t.payload.y,d=n.clone(e.dataItem),u=A(a,l,7);if(!u||u===r.current)return;const m=u.getAttribute("data-slot-start"),p=new Date(_(d,s.end)),g=new Date(Number(m)).getTime()-p.getTime();let E;const h=o.map(e=>{if(!e.current)return null;const t=n.clone(e.current.props.dataItem),r=new Date(e.current.props.end.getTime()+g);if(!(r<=_(t,s.start)))return M(t,s.end,r),t;E=!0}).filter(Boolean);E||(i=[...h]);break}case"RESIZE_ITEM_COMPLETE":case"RESIZE_ITEM_COMPLETE_OCCURRENCE":i=null,e.onDataAction&&a&&e.onDataAction.call(void 0,{type:J.update,series:!1,dataItem:a});break;case"RESIZE_ITEM_COMPLETE_SERIES":{let t;if(i=null,Array.isArray(a))t=a.map(e=>{const t=n.clone(e);return M(t,s.start,_(e,s.start)),M(t,s.end,_(e,s.end)),t});else{const e=n.clone(a);M(e,s.start,_(a,s.start)),M(e,s.end,_(a,s.end)),t=e}e.onDataAction&&t&&e.onDataAction.call(void 0,{type:J.update,series:!0,dataItem:t});break}}l(i)}]})({dataItem:e.dataItem,onDataAction:l},[null,y,v]),[Ye,je,Xe]=((e,t)=>{const[r,a]=Ce(...t);return[r,a,t=>{let n;switch(t.type){case"REMOVE_ITEM_SET":n=t.payload;break;case"REMOVE_ITEM_RESET":n=null;break;case"REMOVE_ITEM_COMPLETE":e.onDataAction&&r&&e.onDataAction.call(void 0,{type:J.remove,series:e.series,dataItem:r}),n=null;break;default:n=r}a(n)}]})({series:Pe,onDataAction:l},[null,k,S]),[Qe,Je,et]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_REMOVE_DIALOG_RESET":case"SHOW_REMOVE_DIALOG_CLOSE":return!1;case"SHOW_REMOVE_DIALOG_SET":return t.payload;case"SHOW_REMOVE_DIALOG_OPEN":return!0;case"SHOW_REMOVE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,w,T),[tt,rt,at]=((e,t,r)=>{const[a,n]=Ce(e,t,r);return[a,n,e=>{const t=((e,t)=>{switch(t.type){case"SHOW_OCCURRENCE_DIALOG_RESET":case"SHOW_OCCURRENCE_DIALOG_CLOSE":return!1;case"SHOW_OCCURRENCE_DIALOG_SET":return t.payload;case"SHOW_OCCURRENCE_DIALOG_OPEN":return!0;case"SHOW_OCCURRENCE_DIALOG_TOGGLE":return!e;default:return e}})(a,e);n(t)}]})(!1,b,I),[nt]=cr(),[,lt]=f.useContext(mr),[,ot]=gr(),st=!!(Te.current&&Oe&&Oe.some(e=>e.current===Te.current)),ct=f.useMemo(()=>({selected:st,series:Pe,formItem:We,dragItem:Ge,resizeItem:Ue,removeItem:Ye,showRemoveDialog:Qe,showOccurrenceDialog:tt}),[Ge,We,Ye,Ue,st,Pe,tt,Qe]),it=f.useMemo(()=>({[rn.set]:He,[rn.toggle]:He,[rn.reset]:He,[hr.select]:Fe,[hr.add]:Fe,[hr.remove]:Fe,[hr.reset]:Fe,[hr.selectNext]:Fe,[hr.selectPrev]:Fe,[ja.set]:Ve,[ja.setMaster]:Ve,[ja.reset]:Ve,[ja.complete]:Ve,[Qa.set]:Xe,[Qa.reset]:Xe,[Qa.complete]:Xe,[Xa.close]:at,[Xa.open]:at,[Xa.set]:at,[Xa.toggle]:at,[Xa.reset]:at,[Ja.close]:et,[Ja.open]:et,[Ja.set]:et,[Ja.toggle]:et,[Ja.reset]:et,[en.start]:$e,[en.drag]:$e,[en.complete]:$e,[en.completeOccurrence]:$e,[en.completeSeries]:$e,[en.set]:$e,[en.reset]:$e,[en.dragSelected]:$e,[tn.start]:qe,[tn.startDrag]:qe,[tn.startDragSelected]:qe,[tn.endDrag]:qe,[tn.endDragSelected]:qe,[tn.complete]:qe,[tn.completeOccurrence]:qe,[tn.completeSeries]:qe,[tn.set]:qe,[tn.reset]:qe,[br.next]:lt,[br.prev]:lt,[fr.left]:ot,[fr.right]:ot,[fr.up]:ot,[fr.down]:ot,null:()=>{}}),[$e,Ve,Fe,Xe,qe,He,at,et,lt,ot]),dt=f.useCallback(t=>{if(x){const r=x(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}R&&R.call(void 0,t)},[it,R,x,e,ct]),ut=f.useCallback(t=>{if(z){const r=z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}N&&N.call(void 0,t)},[it,N,z,e,ct]),mt=f.useCallback(t=>{if(F){const r=F(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}O&&O.call(void 0,t)},[it,O,F,e,ct]),[,pt]=f.useContext(ke),gt=f.useCallback(t=>{if(H){pt(Te.current);const r=H(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}P&&P.call(void 0,t)},[it,P,H,e,ct]),Et=f.useCallback(t=>{if(K){const r=K(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}W&&W.call(void 0,t)},[K,W,e,it,ct]),ht=f.useCallback(t=>{if(G){const r=G(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te}))}V&&V.call(void 0,t)},[G,V,e,it,ct]),yt=f.useCallback(t=>{if($){const r=$(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}B&&B.call(void 0,t)},[$,B,e,it,ct]),vt=f.useCallback(t=>{if(Z){const r=Z(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}U&&U.call(void 0,t)},[Z,U,e,it,ct]),ft=f.useCallback(t=>{if(Y){const r=Y(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}q&&q.call(void 0,t)},[Y,q,e,it,ct]),Dt=f.useCallback(t=>{if(X){const r=X(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}j&&j.call(void 0,t)},[X,j,e,ct,it]),kt=f.useCallback(t=>{if(ee){const r=ee(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}Q&&Q.call(void 0,t)},[Q,ee,e,it,ct]),St=f.useCallback(t=>{if(re){const r=re(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}te&&te.call(void 0,t)},[te,re,e,it,ct]),Ct=f.useCallback(t=>{if(ne){const r=ne(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.dragEvent.originalEvent)):it[r.type]({...r,item:Te},t.dragEvent.originalEvent))}ae&&ae.call(void 0,t)},[ne,ae,e,it,ct]),bt=f.useCallback(t=>{if(fe){const r=fe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ye&&ye.call(void 0,t)},[fe,ye,e,ct,it]),It=f.useCallback(t=>{if(Se){const r=Se(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}De&&De.call(void 0,t)},[Se,De,e,ct,it]),wt=f.useCallback(t=>{if(oe){const r=oe(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}le&&le.call(void 0,t)},[oe,le,e,ct,it]),Tt=f.useCallback(t=>{if(ie){const r=ie(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t)):it[r.type]({...r,item:Te},t))}ce&&ce.call(void 0,t)},[ie,ce,e,ct,it]),Rt=f.useCallback(t=>{if(me){const r=me(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}ue&&ue.call(void 0,t)},[me,ue,e,ct,it]),xt=f.useCallback(t=>{if(ge){const r=ge(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}pe&&pe.call(void 0,t)},[ge,pe,e,ct,it]),At=f.useCallback(t=>{if(he){const r=he(t,e,ct);r&&(Array.isArray(r)?r.filter(Boolean).map(e=>e&&it[e.type]({...e,item:Te},t.syntheticEvent)):it[r.type]({...r,item:Te},t.syntheticEvent))}Ee&&Ee.call(void 0,t)},[he,Ee,e,ct,it]);return f.useEffect(()=>{const t=nt.length&&nt[0].current===Te.current;Ie(void 0!==e.tabIndex?null===e.tabIndex?void 0:e.tabIndex:0===Oe.length&&t?0:void 0)},[nt,e.tabIndex,Oe.length]),f.createElement(Ya,{props:e,form:[We,Ke,Ve],drag:[Ge,Be,$e],resize:[Ue,Ze,qe],remove:[Ye,je,Xe],showRemoveDialog:[Qe,Je,et],showOccurrenceDialog:[tt,rt,at]},f.createElement(xe,{...e,_ref:Te,itemRef:Te,selected:st,tabIndex:be,id:Re,onKeyDown:Rt,onKeyUp:xt,onFocus:dt,onMouseUp:mt,onMouseDown:ut,onClick:gt,onDoubleClick:Et,onRemoveClick:ht,onPress:yt,onDrag:vt,onRelease:ft,onResizePress:Dt,onResizeEndDrag:St,onResizeStartDrag:kt,onResizeRelease:Ct}),Ge&&Le.drag&&(Array.isArray(Ge)?Ge.map((t,r)=>f.createElement(Ae,{key:r,ignoreIsAllDay:o,dataItem:t,vertical:e.vertical,viewItem:xe,item:e.item})):f.createElement(Ae,{ignoreIsAllDay:o,dataItem:Ge,vertical:e.vertical,viewItem:xe,item:e.item})),Ue&&Le.resize&&(Array.isArray(Ue)?Ue.map((t,r)=>f.createElement(_e,{key:r,format:e.format,ignoreIsAllDay:o,dataItem:t,viewItem:e.viewItem,item:e.item,vertical:e.vertical})):f.createElement(_e,{format:e.format,ignoreIsAllDay:o,dataItem:Ue,viewItem:e.viewItem,item:e.item,vertical:e.vertical})),We&&!tt&&Le.edit&&f.createElement(Me,{dataItem:We,onSubmit:bt,onClose:It,onCancel:It}),tt&&f.createElement(Ne,{dataItem:We||Ge||Ue||Ye,isRemove:null!==Ye,onClose:It,onOccurrenceClick:wt,onSeriesClick:Tt}),Qe&&Ye&&Le.remove&&f.createElement(ze,{dataItem:Ye,onClose:It,onCancel:It,onConfirm:At}))}),nn={viewItem:Ta,drag:Pa,resize:Wa,form:da,occurrenceDialog:Sa,removeDialog:Ca,onClickAction:(e,t,r)=>[{type:e.syntheticEvent.metaKey||e.syntheticEvent.ctrlKey?!r.selected||r.dragItem||r.resizeItem?hr.add:hr.remove:hr.select}],onDoubleClickAction:(e,t)=>t.editable?[{type:ja.set,payload:t.dataItem},t.isRecurring&&{type:Xa.open}].filter(Boolean):[],onRemoveClickAction:(e,t)=>t.editable?[{type:Qa.set,payload:t.dataItem},t.isRecurring?{type:Xa.open}:{type:Ja.open}]:[],onPressAction:(e,t)=>t.editable?{type:en.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?en.dragSelected:en.drag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onReleaseAction:(e,t,r)=>t.editable&&r.dragItem?t.isRecurring&&!t.isException&&null===r.series?{type:Xa.open}:{type:t.isRecurring?r.series?en.completeSeries:en.completeOccurrence:en.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizePressAction:(e,t)=>t.editable?{type:tn.start,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeStartDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?tn.startDragSelected:tn.startDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeEndDragAction:(e,t)=>t.editable?{type:e.dragEvent.originalEvent.metaKey||e.dragEvent.originalEvent.ctrlKey?tn.endDragSelected:tn.endDrag,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onResizeReleaseAction:(e,t,r)=>t.editable&&r.resizeItem?t.isRecurring&&!t.isException&&null===r.series?{type:Xa.open}:{type:t.isRecurring?r.series?tn.completeSeries:tn.completeOccurrence:tn.complete,payload:{x:e.dragEvent.clientX,y:e.dragEvent.clientY}}:[],onOccurrenceClickAction:(e,t,r)=>r.dragItem?[{type:en.completeOccurrence},{type:Xa.close}]:r.resizeItem?[{type:tn.completeOccurrence},{type:Xa.close}]:r.formItem?[{type:rn.set,payload:!1},{type:ja.set,payload:t.dataItem},{type:Xa.close}]:r.removeItem?[{type:rn.set,payload:!1},{type:Qa.set,payload:t.dataItem},{type:Ja.open},{type:Xa.close}]:[],onSeriesClickAction:(e,t,r)=>r.dragItem?[{type:en.completeSeries},{type:Xa.close}]:r.resizeItem?[{type:tn.completeSeries},{type:Xa.close}]:r.formItem?[{type:rn.set,payload:!0},{type:ja.setMaster,payload:t.dataItem},{type:Xa.close}]:r.removeItem?[{type:rn.set,payload:!0},{type:Qa.set,payload:t.dataItem},{type:Ja.open},{type:Xa.close}]:[],onKeyDownAction:(e,t)=>{switch(e.syntheticEvent.keyCode){case n.Keys.enter:return[{type:ja.set,payload:t.dataItem},t.isRecurring&&{type:Xa.open}];case n.Keys.tab:return[{type:e.syntheticEvent.shiftKey?br.prev:br.next,ignoreIsAllDay:t.ignoreIsAllDay},{type:e.syntheticEvent.shiftKey?hr.selectPrev:hr.selectNext,ignoreIsAllDay:t.ignoreIsAllDay}];case n.Keys.up:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:fr.up,slot:t.slots[0]._ref}];case n.Keys.right:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:fr.right,slot:t.slots[0]._ref}];case n.Keys.down:return[!(!t.slots.length||!t.slots[t.slots.length-1]._ref.current)&&{type:fr.down,slot:t.slots[t.slots.length-1]._ref}];case n.Keys.left:return[!(!t.slots.length||!t.slots[0]._ref.current)&&{type:fr.left,slot:t.slots[0]._ref}];default:return}},onFormSubmitAction:e=>[{type:ja.complete,payload:e.value}],onRemoveConfirmAction:()=>[{type:Qa.complete},{type:Xa.close}],onCancelAction:()=>[{type:rn.reset},{type:Qa.reset},{type:ja.reset},{type:en.reset},{type:tn.reset},{type:Ja.reset},{type:Xa.reset}]};an.displayName="KendoReactSchedulerEditItem";const ln=e=>{const[t,r]=f.useState(!1),l=te(),o=ae(),s=f.useRef(void 0),c=f.useRef(null),i=f.useRef(null),d=e.updateInterval||on.updateInterval,[,u]=f.useState(!1),m=n.useDir(i,!0===o.rtl?"rtl":void 0),[p]=or(),g=f.useCallback(()=>{if(!p)return;const t=p.filter(t=>t.current&&(void 0===e.groupIndex||null===e.groupIndex||t.current.props.group.index===e.groupIndex)&&(e.vertical?H(new Date,new Date,t.current.props.start,t.current.props.end,!0):K(new Date,t.current.props.start,t.current.props.end))&&!t.current.props.isAllDay);if(t&&t.length&&c.current&&i.current){const n=T(t);if(!n.current)return;const l=e.vertical?(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.height}}),t})(t):(e=>{let t=0;return e.forEach(e=>{if(e.current){const r=b(e.current.element);t+=r.width}}),t})(t),o=b(n.current.element),s=b(c.current),d=(e.vertical?o.width:o.height)/(n.current.props.end.getTime()-n.current.props.start.getTime()),u=(Date.now()-((e,t)=>{const r=a.cloneDate(e);return r.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),r})(new Date,n.current.props.start).getTime())*d,p="rtl"===m,g=e.vertical?o.top:o.top+u-s.height/2,E=p?"right":"left",h=e.vertical?o[E]+u-s.width/2:o[E];e.vertical?c.current.style[E]=`${h}px`:c.current.style.top=`${g}px`,i.current.style[E]=`${h}px`,i.current.style.top=`${g}px`,i.current.style[e.vertical?"height":"width"]=l-1+"px",r(!0)}else r(!1)},[p,e.groupIndex,e.vertical,m]),E=f.useCallback(()=>{g(),u(e=>!e)},[g]);f.useEffect(()=>{if(!l.current||!window)return;clearInterval(s.current),s.current=window.setInterval(E,d);const e=window.ResizeObserver,t=e&&new e(E);return t&&t.observe(l.current),()=>{clearInterval(s.current),t&&t.disconnect()}},[g,E,l,d]),f.useEffect(g);const h=f.createElement("div",{ref:c,className:n.classNames("k-current-time",{"k-current-time-arrow-right":!e.vertical&&"rtl"!==m,"k-current-time-arrow-left":!e.vertical&&"rtl"===m,"k-current-time-arrow-down":e.vertical}),style:{transform:e.vertical?"rtl"===m?"translateX(50%)":"translateX(-50%)":"translateY(-50%)",visibility:t?void 0:"hidden"}});return f.createElement(f.Fragment,null,e.attachArrow&&e.attachArrow.current?D.createPortal(h,e.attachArrow.current):h,f.createElement("div",{className:"k-current-time",ref:i,style:{transform:e.vertical?"translateX(-50%)":"translateY(-50%)",[e.vertical?"width":"height"]:"1px",visibility:t?void 0:"hidden"}}))},on={updateInterval:6e4},sn=f.forwardRef((e,t)=>{const{as:r=cn.as,...a}=e,l=f.useRef(null),s=f.useRef(null),c=o.useInternationalization(),i=f.useMemo(()=>n.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);return f.useImperativeHandle(s,()=>({element:l.current&&l.current.element?l.current.element:l.current,props:e})),f.useImperativeHandle(t,()=>s.current),f.createElement(r,{ref:r!==cn.as?void 0:l,...a,className:i},f.createElement("span",{className:"k-link k-nav-day"},c.formatDate(e.date,e.format?e.format:cn.format)))}),cn={as:f.forwardRef(({as:e,format:t,start:r,end:a,...n},l)=>f.createElement("div",{...n,ref:l})),format:"d"};sn.displayName="KendoReactSchedulerDateHeaderCell";const dn=(e,{step:t,timezone:r})=>{const n=[],l=a.ZonedDate.fromLocalDate(e.start,r),o=a.ZonedDate.fromLocalDate(e.end,r);for(let e=l.clone(),r=0;e.getTime()<o.getTime();r++,e=e.addTime(t)){const a=e.clone(),l=a.clone().addTime(t),o=new Date(a.getTime()),s={index:r,end:new Date(l.getTime()),start:o,zonedStart:a,zonedEnd:l};n.push(s)}return n},un=(e,{step:t},{groups:r,ranges:n})=>{const l=[];return r.forEach(e=>{n.forEach(r=>{const n=r.zonedStart,o=r.zonedEnd,s=o.timezoneOffset-n.timezoneOffset;for(let c=n.clone(),i=0,d=s<0?s*Y*-1:0;c.getTime()<o.getTime();){const n=f.createRef(),o=c.clone(),s=c.addTime(t),u=(s.timezoneOffset-o.timezoneOffset)*Y,m=t<=Math.abs(u);d&&m&&(d-=t,c=c.addTime(-t));const p=new Date(o.getTime()),g={_ref:n,index:i,end:new Date(s.getTime()),start:p,zonedStart:o,zonedEnd:s,range:r,group:e,items:[],isAllDay:a.MS_PER_DAY<=t};l.push(g),c=c.addTime(t),i++}})}),l},mn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),pn=e=>{var t,r,l,s,c,i,d,u,m,p,g;const{group:E,timezone:h,resources:y}=ae(),v=o.useInternationalization(),D=e.editItem||an,k=e.editSlot||Da,S=e.showWorkHours,C=null!=(t=e.numberOfDays)?t:gn.numberOfDays,b=null!=(r=e.slotDivisions)?r:gn.slotDivisions,I=null!=(l=e.slotDuration)?l:gn.slotDuration,w=null!=(s=e.workWeekStart)?s:gn.workWeekStart,x=null!=(c=e.workWeekEnd)?c:gn.workWeekEnd,A=!1!==e.currentTimeMarker&&gn.currentTimeMarker,_=v.parseDate(null!=(d=null!=(i=e.workDayStart)?i:e.isWorkDayStart)?d:gn.isWorkDayStart),M=v.parseDate(null!=(m=null!=(u=e.workDayEnd)?u:e.isWorkDayEnd)?m:gn.isWorkDayEnd),N=v.parseDate(null!=(p=e.startTime)?p:gn.startTime),z=v.parseDate(null!=(g=e.endTime)?g:gn.endTime),[L]=ve(),O=de(),F=ge(),P=se(),W=me(),G=f.useMemo(()=>S?_:N,[S,_,N]),U=f.useMemo(()=>S?M:z,[S,M,z]),Z=f.useMemo(()=>dn(W,{step:a.MS_PER_DAY*C,timezone:h}).map(e=>({...e,isAllDay:!0})),[W.start.getTime(),W.end.getTime(),C]),q=f.useMemo(()=>dn(W,{step:a.MS_PER_DAY,timezone:h}).map(e=>({...e,isAllDay:!1})),[W.start.getTime(),W.end.getTime(),h]),j=f.useMemo(()=>un(0,{step:a.MS_PER_DAY},{groups:O,ranges:Z}),[W.start.getTime(),W.end.getTime(),h,Z,O]),X=f.useMemo(()=>un(0,{step:I*Y/b},{groups:O,ranges:q}).filter(e=>U.getTime()===G.getTime()||K(e.zonedStart,G,U)),[W.start.getTime(),W.end.getTime(),I,b,G.getTime(),U.getTime(),O,q]),Q=f.useMemo(()=>xa(L,{dateRange:W,fields:P,timezone:h}),[L,W.start.getTime(),W.end.getTime(),P,h]),J=f.useMemo(()=>Q.filter(e=>e.isAllDay),[Q]),ee=f.useMemo(()=>Q.filter(e=>!e.isAllDay),[Q]),te=f.useMemo(()=>Na(J,{timezone:h},{groups:O,ranges:Z}),[Q,h,O,Z]),re=f.useMemo(()=>Na(ee,{timezone:h},{groups:O,ranges:q}).filter(e=>G.getTime()===U.getTime()||K(e.zonedStart,G,U)||K(e.zonedEnd,G,U)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),G,U)),[Q,h,O,q,G.getTime(),U.getTime()]);f.useMemo(()=>$(te,j,!1),[te,j]),f.useMemo(()=>B(te,j,!1),[te,j]),f.useMemo(()=>$(re,X,!1),[re,X]),f.useMemo(()=>B(re,X,!1),[re,X]);const ne=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},q.map((t,r)=>f.createElement(sn,{as:e.dateHeaderCell,key:r,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),h),start:t.start,end:t.end,format:{skeleton:"MEd"}})))),le=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{key:t,className:"k-scheduler-row"},Z.map((r,a)=>j.filter(e=>e.group.index===t&&e.range.index===a).map((r,a,n)=>f.createElement(k,{...r,onDataAction:e.onDataAction,form:e.form,slot:e.slot,viewSlot:e.viewSlot,key:`${r.start.getTime()}:${r.group.index}`,row:0,col:"horizontal"===F?n.length*(t||0)+a:a,isWorkDay:0<=r.zonedStart.getDay()+(C-w)&&(r.zonedStart.getDay()+(C-w))%C<=x+(C-w),expandable:!0}))))),oe=f.useMemo(()=>n.classNames("week"===e.name?"k-scheduler-weekview":"k-scheduler-dayview",e.className),[e.name,e.className]),ce=f.useCallback((t,r,a)=>q.map((n,l)=>X.filter(e=>e.index===t.index&&e.range.index===l&&e.group.index===a).map(t=>f.createElement(k,{key:`${t.start.getTime()}:${t.group.index}`,...t,onDataAction:e.onDataAction,slot:e.slot,viewSlot:e.viewSlot,form:e.form,row:r+1,col:q.length*(a||0)+l,isWorkHour:K(t.zonedStart,_,M),isWorkDay:V(t.zonedEnd.getDay(),w,x),editable:e.editable}))),[q,k,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,X,M,_,x,w]),ie=f.useCallback((t,r,a)=>j.filter(e=>e.group.index===r&&e.range.index===a).map((a,n)=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,...a,onDataAction:e.onDataAction,key:`${a.start.getTime()}:${a.group.index}`,className:"k-scheduler-alldays-slot",row:t*(r||0)+1*(r||0),col:n,expandable:!0})),[k,j,e.form,e.onDataAction,e.slot,e.viewSlot]),ue=f.useCallback((t,r,a,n)=>q.map((l,o)=>X.filter(e=>e.index===t.index&&e.group.index===a&&e.range.index===o).map(t=>f.createElement(k,{slot:e.slot,viewSlot:e.viewSlot,form:e.form,onDataAction:e.onDataAction,...t,key:`${t.start.getTime()}:${t.group.index}`,row:r.length*(a||0)+n+1*(a||0)+1,col:o,editable:e.editable,isWorkHour:K(t.zonedStart,_,M),isWorkDay:0<=t.zonedStart.getDay()+(C-w)&&(t.zonedStart.getDay()+(C-w))%C<=x+(C-w)}))),[k,C,e.editable,e.form,e.onDataAction,e.slot,e.viewSlot,q,X,M,_,x,w]);return f.createElement(Ir,{id:e.id,props:e,style:e.style,className:oe,ranges:[...Z,...q],slots:[...j,...X]},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===F?f.createElement(f.Fragment,null,f.createElement(Tr,{nested:!0,group:E,resources:y,rowContent:_r,childRowContent:_r},ne),f.createElement(Tr,{group:E,resources:y,rowContent:Wr,childRowContent:Wr},le),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,vertical:!1}))):f.createElement(Mr,{group:E,resources:y,cellContent:mn},ne)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===F?f.createElement(f.Fragment,null,X.filter(e=>0===e.group.index&&0===e.range.index).map((t,r)=>f.createElement(f.Fragment,{key:t.index},f.createElement(Tr,{nested:!1,group:E,resources:y,rowContent:Gr,rowContentProps:{timeHeaderCell:e.timeHeaderCell,isMaster:r%b===0,isLast:(r+1)%b===0,slot:t}},f.createElement(wr.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:n.classNames("k-scheduler-row",{"k-middle-row":(r+1)%b!==0})},ce(t,r,e)))))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(ln,null)):f.createElement(f.Fragment,null,f.createElement(Mr,{nested:!0,group:E,resources:y},f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"k-scheduler-row"},f.createElement(Wr,{groupIndex:t},Z.map((e,r)=>{const a=X.filter(e=>e.group.index===t&&0===e.range.index).length;return ie(a,t,r)}))),X.filter(e=>e.group.index===t&&0===e.range.index).map((r,a,n)=>f.createElement("div",{className:"k-scheduler-row",key:r.index},f.createElement(Gr,{slot:r,isMaster:a%b===0,isLast:(a+1)%b===0,timeHeaderCell:e.timeHeaderCell},ue(r,n,t,a)))),!1!==A&&H(T(q).start,R(q).end,new Date,new Date,!0)&&f.createElement(ln,{groupIndex:t})))),te.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!1}))),re.map(t=>f.createElement(D,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",onDataAction:e.onDataAction,viewItem:e.viewItem,item:e.item,form:e.form,editable:e.editable,vertical:!0}))))},gn={name:"multi-day",title:"Multi Day",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"23:59",isWorkDayStart:"08:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,showCurrentTime:!0,defaultShowWorkHours:!0};pn.propTypes={currentTimeMarker:r.bool,name:r.string,numberOfDays:r.number,startTime:r.string,endTime:r.string,workDayStart:r.string,workDayEnd:r.string,workWeekStart:r.number,workWeekEnd:r.any,slotDivisions:r.number,slotDuration:r.number,showWorkHours:r.bool,selectedDateFormat:r.string,selectedShortDateFormat:r.string},pn.displayName="KendoReactSchedulerMultiDayView";const En=e=>f.createElement(pn,{...e}),hn={...gn,name:"day",title:e=>e.toLanguageString(Le,Xt[Le]),numberOfDays:1,slotDuration:60,slotDivisions:2,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};En.displayName="KendoReactSchedulerDayView";const yn=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:1607496606,version:"14.5.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"}),vn=f.forwardRef((e,t)=>{const{_ref:r,onRemoveClick:a}=e,l=f.useRef(null),s=f.useRef(null);f.useImperativeHandle(l,()=>({props:e,element:s.current})),f.useImperativeHandle(t,()=>l.current),f.useImperativeHandle(r,()=>l.current);const c=fa(e.editable),i=o.useLocalization().toLanguageString(Fe,Xt[Fe]),u=e.group.resources.find(e=>!(!e.colorField||void 0===e[e.colorField])),m=u&&u.colorField&&u[u.colorField],p=f.useCallback(e=>{a&&a.call(void 0,{syntheticEvent:e,target:l.current})},[a,l]),g=f.useMemo(()=>n.classNames("k-task",e.className),[e.className]);return f.createElement("div",{id:e.id,ref:s,style:e.style,className:g,tabIndex:e.tabIndex||void 0},m&&f.createElement("span",{className:"k-scheduler-mark",style:{color:m,backgroundColor:m}}),e.isRecurring&&f.createElement(n.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&f.createElement(n.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),e.title,c.remove&&f.createElement("a",{className:"k-link k-event-delete",title:i,"aria-label":i,onClick:p},f.createElement(n.IconWrap,{name:"x",icon:d.xIcon})))});vn.displayName="KendoReactSchedulerTask";const fn=f.forwardRef((e,t)=>{const{task:r,_ref:a,...n}=e,l=f.useRef(null),o=f.useRef(null);f.useImperativeHandle(o,()=>({props:e,element:l.current&&l.current.element})),f.useImperativeHandle(a,()=>l.current),f.useImperativeHandle(t,()=>o.current);const s=r||Dn.task;return f.createElement(s,{...n,_ref:l})}),Dn={task:vn};fn.displayName="KendoReactSchedulerViewTask";const kn=f.createContext([null]),Sn=f.createContext([!1]),Cn=f.createContext([!1]),bn=e=>f.createElement(kn.Provider,{value:e.remove},f.createElement(Sn.Provider,{value:e.showRemoveDialog},f.createElement(Cn.Provider,{value:e.showOccurrenceDialog},e.children))),In=f.forwardRef((e,t)=>{const{_ref:r,onDataAction:a,viewTask:n,removeDialog:l,removeItem:o,onRemoveItemChange:s,occurrenceDialog:c,showOccurrenceDialog:i,onShowOccurrenceDialogChange:d,showRemoveDialog:u,onShowRemoveDialogChange:m,...p}=e,g=f.useRef(null);f.useImperativeHandle(g,()=>({props:e,element:g.current&&g.current.element})),f.useImperativeHandle(r,()=>g.current),f.useImperativeHandle(t,()=>g.current);const E=n||wn.viewTask,h=c||wn.occurrenceDialog,y=l||wn.removeDialog,v=fa(e.editable),D=se(),[k,S]=ve(),[C,b]=f.useState(null),[I,w]=Ce(null,o,s),[T,R]=Ce(!1,u,m),[x,A]=Ce(!1,i,d),_=f.useCallback(t=>{v.remove&&(w(e.dataItem,t),e.isRecurring?A(!0,t):R(!0,t))},[w,e.dataItem,e.isRecurring,A,R]),M=f.useCallback(e=>{b(null),w(null,e),R(!1,e),A(!1,e)},[b,w,R,A]),N=f.useCallback(e=>{a&&I&&a.call(void 0,{type:J.remove,series:C,dataItem:I}),w(null,e),R(!1,e)},[I,S,R]),z=f.useCallback((e,t)=>{w&&w(e,t)},[w]),O=f.useCallback((e,t)=>{R&&R(e,t)},[R]),F=f.useCallback((e,t)=>{A&&A(e,t)},[A]),P=f.useCallback(t=>{I&&(b(!1),w(e.dataItem,t),R(!0,t)),A(!1,t)},[b,e.dataItem,I,w,R]),H=f.useCallback(e=>{if(I){b(!0);const t=L(I,D,k);w(t,e),R(!0,e)}A(!1,e)},[D,I,b,w,R,A]);return f.createElement(bn,{remove:[I,z],showRemoveDialog:[T,O],showOccurrenceDialog:[x,F]},f.createElement(E,{_ref:g,...p,onRemoveClick:_}),x&&f.createElement(h,{dataItem:I,isRemove:null!==I,onClose:M,onOccurrenceClick:P,onSeriesClick:H}),T&&f.createElement(y,{dataItem:I,onClose:M,onCancel:M,onConfirm:N}))}),wn={viewTask:fn,occurrenceDialog:Sa,removeDialog:Ca};In.displayName="KendoReactSchedulerEditTask";const Tn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editTask||In,c=e.editSlot||Da,i=f.useRef(null),u=n.useDir(i),m=o.useInternationalization(),p=o.useLocalization(),[g]=ve(),E=de(),h=se(),y=me(),v=f.useMemo(()=>dn(y,{step:a.MS_PER_DAY,timezone:r}),[y.start.getTime(),y.end.getTime(),r]),D=f.useMemo(()=>un(0,{step:a.MS_PER_DAY},{groups:E,ranges:v}),[y.start.getTime(),y.end.getTime(),r,E,v]),k=f.useMemo(()=>xa(g,{dateRange:y,fields:h,timezone:r}),[g,y.start.getTime(),y.end.getTime(),h,r]),S=f.useMemo(()=>Na(k,{timezone:r},{groups:E,ranges:v}),[k,r,E,v]),C=f.useMemo(()=>n.classNames("k-scheduler-agendaview",e.className),[e.className]);return vr({element:i,selector:".k-scheduler-datecolumn",explicitDepth:!1}),vr({element:i,selector:".k-scheduler-timecolumn",explicitDepth:!1}),f.useMemo(()=>$(S,D,!0),[S,D]),f.useMemo(()=>B(S,D,!0),[S,D]),f.createElement(Ir,{ref:i,id:e.id,style:e.style,className:C,props:e,slots:S,ranges:v},f.createElement("div",{className:"k-scheduler-head"},f.createElement(Mr,{resources:l,group:t},f.createElement(wr.Consumer,null,({groupIndex:e})=>f.createElement("div",{className:"k-scheduler-row",key:e},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},p.toLanguageString(Gt,Xt[Gt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},p.toLanguageString(Bt,Xt[Bt])),f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},p.toLanguageString($t,Xt[$t])))))),f.createElement("div",{className:"k-scheduler-body"},f.createElement(Mr,{resources:l,group:t,nested:!0},f.createElement(wr.Consumer,null,({groupIndex:t})=>D.filter(e=>e.group.index===(t||0)).map((r,a,l)=>f.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${t}:${a}`},f.createElement(c,{...r,editable:e.editable,row:l.length*(t||0)+a,col:0,slot:e.slot,viewSlot:e.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},f.createElement("div",null,f.createElement("strong",{className:"k-scheduler-agendaday"},m.formatDate(r.zonedStart,"dd")),f.createElement("em",{className:"k-scheduler-agendaweek"},m.formatDate(r.zonedStart,"EEEE")),f.createElement("span",{className:"k-scheduler-agendadate"},m.formatDate(r.zonedStart,"y")))),f.createElement("div",{className:"k-scheduler-cell k-group-content"},r.items.length?r.items.map((t,r)=>f.createElement("div",{className:"k-scheduler-row",key:r},f.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},f.createElement("div",null,t.tail&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-right":"caret-alt-left",icon:"rtl"===u?d.caretAltRightIcon:d.caretAltLeftIcon}),t.isAllDay?p.toLanguageString(xe,Xt[xe]):Rn(m,t),t.head&&f.createElement(n.IconWrap,{name:"rtl"===u?"caret-alt-left":"caret-alt-right",icon:"rtl"===u?d.caretAltLeftIcon:d.caretAltRightIcon}))),f.createElement("div",{className:"k-scheduler-cell"},f.createElement(s,{key:`${a}:${r}`,...t,onDataAction:e.onDataAction,task:e.task,viewTask:e.viewTask,editable:e.editable})))):f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},p.toLanguageString(Yt,Xt[Yt])))))))))},Rn=(e,t)=>{let r="{0:t}-{1:t}";return t.head?r="{0:t}":t.tail&&(r="{1:t}"),e.format(r,t.zonedStart,t.zonedEnd)},xn={name:"agenda",title:e=>e.toLanguageString(ze,Xt[ze]),dateRange:({intl:e,date:t,numberOfDays:r=1,timezone:n})=>{const l=a.ZonedDate.fromLocalDate(t,n),o=(e=>a.getDate(e))(7===r?a.firstDayInWeek(l,e.firstDay()):l),s=((e,t)=>a.getDate(a.addDays(e,t||1)))(o,r),c=a.ZonedDate.fromUTCDate(z(o),n),i=a.ZonedDate.fromUTCDate(z(s),n);return{start:new Date(c.getTime()),end:new Date(i.getTime()),zonedStart:c,zonedEnd:i}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:1440,slotDivision:1,numberOfDays:7},An={title:r.any};Tn.propTypes=An,Tn.displayName="KendoReactSchedulerAgendaView";const _n=f.forwardRef((e,t)=>{const r=f.useRef(null),a=f.useRef(null),n=o.useLocalization();f.useImperativeHandle(r,()=>({element:a.current&&a.current.element,...e})),f.useImperativeHandle(t,()=>r.current);const l=f.useCallback(t=>{!e.onClick||!r.current||e.onClick.call(void 0,{target:r.current,syntheticEvent:t})},[r,e.slot,e.onClick]),c=n.toLanguageString(jt,Xt[jt]);return f.createElement(s.Button,{ref:a,tabIndex:-1,className:"k-more-events",onClick:l,"aria-label":c,icon:"more-horizontal",svgIcon:d.moreHorizontalIcon})});_n.displayName="KendoReactSchedulerShowMoreItemsButton";const Mn={skeleton:"dd"},Nn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=e.editItem||an,c=e.editSlot||Da,[i]=ve(),[d,u]=he(),[,m]=De(),p=le(),g=de(),E=ge(),h=me(),y=o.useInternationalization(),v=se(),D=e.itemsPerSlot||zn.itemsPerSlot,k=f.useMemo(()=>dn(h,{step:7*a.MS_PER_DAY,timezone:r}),[h.start.getTime(),h.end.getTime(),r]),S=f.useMemo(()=>un(0,{step:a.MS_PER_DAY},{groups:g,ranges:k}),[h.start.getTime(),h.end.getTime(),g,k]),C=f.useMemo(()=>xa(i,{dateRange:h,fields:v,timezone:r}),[i,h.start.getTime(),h.end.getTime(),v,r]),b=f.useMemo(()=>Na(C,{timezone:r},{groups:g,ranges:k}),[C,r,g,k]),I=f.useCallback(e=>{const t=p.find(e=>"day"===e.props.name);!m||!t||!t.props.name||!e.target.slot||(m(t.props.name,e),u(e.target.slot.start,e))},[m,p]);f.useMemo(()=>$(b,S,!0),[b,S]),f.useMemo(()=>B(b,S,!0),[b,S]);const w=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row",key:t},S.filter(e=>e.group.index===t&&0===e.range.index).map((t,n)=>f.createElement(sn,{as:e.dateHeaderCell,key:n,"data-dayslot-index":n,date:a.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),r),start:t.start,end:t.end,format:{skeleton:"EEEE"}})))),T=f.createElement(wr.Consumer,null,({groupIndex:t})=>k.map((r,a)=>f.createElement("div",{className:"k-scheduler-row",key:a},S.filter(e=>e.group.index===t&&e.range.index===a).map((r,l,o)=>f.createElement(c,{slot:e.slot,viewSlot:e.viewSlot,key:l,form:e.form,...r,expandable:{offsetTop:30,offsetBottom:D<r.items.length?15:0},onDataAction:e.onDataAction,col:"horizontal"===E?o.length*(t||0)+l:l,row:"horizontal"===E?a:k.length*(t||0)+a,editable:e.editable,className:n.classNames({"k-other-month":r.start.getMonth()<d.getMonth()||r.start.getMonth()>d.getMonth()})},f.createElement("span",{className:"k-link k-nav-day"},y.formatDate(new Date(r.end.getTime()-(r.end.getTime()-r.start.getTime())/2),Mn)),D<r.items.length&&f.createElement(_n,{slot:r,onClick:I}))))));return f.createElement(Ir,{props:e,slots:S,ranges:k,className:n.classNames("k-scheduler-monthview",e.className)},f.createElement("div",{className:"k-scheduler-head"},"horizontal"===E?f.createElement(Tr,{nested:!0,resources:l,group:t},w):f.createElement(Mr,{resources:l,group:t},w)),f.createElement("div",{className:"k-scheduler-body"},"horizontal"===E?f.createElement(Tr,{resources:l,group:t},T):f.createElement(Mr,{nested:!0,resources:l,group:t},T),b.filter(e=>null===e.order||e.order<D).sort(q).map(t=>f.createElement(s,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0}))))},zn={name:"month",dateRange:({intl:e,date:t,timezone:r})=>{const n=a.firstDayInWeek(a.firstDayOfMonth(a.getDate(t)),e.firstDay()),l=a.addDays(a.firstDayInWeek(a.lastDayOfMonth(a.getDate(t)),e.firstDay()),7),o=a.ZonedDate.fromUTCDate(z(n),r),s=a.ZonedDate.fromUTCDate(z(l),r);return{start:new Date(o.getTime()),end:new Date(s.getTime()),zonedStart:o,zonedEnd:s}},slotDuration:1440,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(Oe,Xt[Oe]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},Ln={itemsPerSlot:r.number};Nn.propTypes=Ln,Nn.displayName="KendoReactSchedulerMonthView";const On=e=>f.createElement(pn,{...e,step:7,numberOfDays:7}),Fn={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(t,r),l=(e=>a.getDate(e))(a.firstDayInWeek(n,e.firstDay())),o=((e,t)=>a.getDate(a.addDays(e,t)))(l,7),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},title:e=>e.toLanguageString(Me,Xt[Me]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};On.displayName="KendoReactSchedulerWeekView";const Pn=e=>{const t=me(),r=Math.round((t.end.getTime()-t.start.getTime())/a.MS_PER_DAY);return f.createElement(pn,{...e,step:7,numberOfDays:r})},Hn={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:({intl:e,date:t,timezone:r,...n})=>{const l=a.ZonedDate.fromLocalDate(t,r),o=void 0!==n.workWeekStart?n.workWeekStart:a.Day.Monday,s=void 0!==n.workWeekEnd?n.workWeekEnd:a.Day.Friday,c=s<o?7+s-o+1:s-o+1,i=a.getDate(((e,t=a.Day.Sunday)=>{let r=e.clone();for(;r.getDay()!==t;)r=r.addDays(-1);return r})(l,o)),d=a.addDays(i,c),u=a.ZonedDate.fromUTCDate(z(i),r),m=a.ZonedDate.fromUTCDate(z(d),r);return{start:new Date(u.getTime()),end:new Date(m.getTime()),zonedStart:u,zonedEnd:m}},title:e=>e.toLanguageString(Ne,Xt[Ne]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};Pn.displayName="KendoReactSchedulerWorkWeekView";const Wn=f.createElement("div",{className:"k-scheduler-cell k-side-cell"}),Kn=e=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},Wn),e.children),Vn=e=>{const t=o.useLocalization();return f.createElement(f.Fragment,null,f.createElement("div",{className:"k-sticky-cell"},f.createElement("div",{className:"k-scheduler-cell k-heading-cell k-side-cell k-scheduler-times-all-day","data-range-index":0},t.toLanguageString(Re,Xt[Re]))),e.children)},Gn=e=>{const{group:t,timezone:r,resources:l}=ae(),s=f.useRef(null),c=f.useRef(null),i=e.editItem||an,d=e.editSlot||Da,u=f.useRef(null),[m]=ve(),p=ge(),g=de(),E=me(),h=se(),y=o.useInternationalization(),v=e.showWorkHours,D=e.slotDivisions||Bn.slotDivisions,k=e.slotDuration||Bn.slotDuration,S=e.workWeekStart||Bn.workWeekStart,C=e.workWeekEnd||Bn.workWeekEnd,b=y.parseDate(e.workDayStart||e.isWorkDayStart||Bn.isWorkDayStart),I=y.parseDate(e.workDayEnd||e.isWorkDayEnd||Bn.isWorkDayEnd),w=y.parseDate(e.startTime||Bn.startTime),x=y.parseDate(e.endTime||Bn.endTime),A=f.useMemo(()=>v?b:w,[v,b,w]),_=f.useMemo(()=>v?I:x,[v,I,x]),M=f.useMemo(()=>dn(E,{step:a.MS_PER_DAY,timezone:r}),[E.start.getTime(),E.end.getTime(),r]),N=f.useMemo(()=>un(0,{step:k/D*a.MS_PER_MINUTE},{groups:g,ranges:M}).filter(e=>K(e.zonedStart,A,_)||A.getTime()===_.getTime()),[g,M,E.start.getTime(),E.end.getTime(),r,k,D,A.getTime(),_.getTime()]),L=f.useMemo(()=>xa(m,{dateRange:E,fields:h,timezone:r}),[m,E.start.getTime(),E.end.getTime(),h,r]),O=f.useMemo(()=>Na(L,{timezone:r},{groups:g,ranges:M}).filter(e=>A.getTime()===_.getTime()||K(e.zonedStart,A,_)||K(e.zonedEnd,A,_)||K(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),A,_)),[L,r,g,M,A.getTime(),_.getTime()]);f.useMemo(()=>$(O,N,!0),[O,N]),f.useMemo(()=>B(O,N,!0),[O,N]);const F=("horizontal"===p?N.length:N.length/g.length)*((e.columnWidth||Bn.columnWidth)+1),P=f.createElement(wr.Consumer,null,()=>f.createElement(f.Fragment,null,f.createElement("div",{className:"k-scheduler-row"},M.map((t,r)=>f.createElement(sn,{as:e.dateHeaderCell,key:r,date:t.zonedStart,start:t.start,end:t.end,format:"m"}))),f.createElement("div",{className:"k-scheduler-row",ref:s},M.map((t,r)=>N.filter(e=>0===e.group.index&&e.range.index===r).map(t=>t.zonedStart.getMinutes()%k===0?f.createElement(Kr,{key:t.index,as:e.timeHeaderCell,format:"t",date:t.zonedStart,start:t.zonedStart,end:t.zonedEnd}):null))))),W=f.createElement(wr.Consumer,null,({groupIndex:t})=>f.createElement("div",{className:"k-scheduler-row"},M.map((n,l)=>N.filter(e=>e.group.index===t&&e.range.index===l).map((n,o,s)=>{const c=a.ZonedDate.fromUTCDate(z(n.zonedStart),r),i=V(c.getDay(),S,C);return f.createElement(d,{key:`${n.start.getTime()}:${n.group.index}`,slot:e.slot,viewSlot:e.viewSlot,...n,form:e.form,onDataAction:e.onDataAction,isWorkHour:K(n.zonedStart,b,I),isWorkDay:i,col:"horizontal"===p?l*s.length+o+s.length*M.length*(t||0):l*s.length+o,row:"horizontal"===p?0:t||0,expandable:!0,editable:e.editable})})))),G=f.useMemo(()=>n.classNames("k-scheduler-timelineview",e.className),[e.className]);vr({element:u,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0});const U=u.current?u.current.closest(".k-scheduler-layout"):null;return wa({element:U,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:O&&!O.length}),f.createElement(Ir,{ref:u,id:e.id,style:{...e.style},className:G,props:e,slots:N,ranges:M},f.createElement("div",{className:"k-scheduler-head",style:{width:F}},"horizontal"===p?f.createElement(Tr,{nested:!0,group:t,resources:l,rowContent:Kn},P):f.createElement(Mr,{wrapGroup:!0,group:t,resources:l},P)),f.createElement("div",{className:"k-scheduler-body",style:{width:F},ref:c},"horizontal"===p?f.createElement(Tr,{group:t,resources:l,rowContent:Vn},W,f.createElement(wr.Consumer,null,({groupIndex:t})=>e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(ln,{groupIndex:t,attachArrow:s,vertical:!0}))):f.createElement(Mr,{nested:!0,wrapGroup:!0,group:t,resources:l},W),"vertical"===p&&e.currentTimeMarker&&H(T(M).start,R(M).end,new Date,new Date,!0)&&f.createElement(ln,{attachArrow:s,vertical:!0}),O.sort(q).map((t,r)=>f.createElement(i,{key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,format:"t",form:e.form,onDataAction:e.onDataAction,item:e.item,viewItem:e.viewItem,editable:e.editable,ignoreIsAllDay:!0,vertical:!1,isLast:r===O.length-1}))))},Bn={name:"multi-day-timeline",title:"Multi Day Timeline",currentTimeMarker:!0,dateRange:({date:e,numberOfDays:t=1,timezone:r})=>{const n=a.ZonedDate.fromLocalDate(e,r),l=a.getDate(n),o=a.addDays(l,t),s=a.ZonedDate.fromUTCDate(z(l),r),c=a.ZonedDate.fromUTCDate(z(o),r);return{start:new Date(s.getTime()),end:new Date(c.getTime()),zonedStart:s,zonedEnd:c}},selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",numberOfDays:1,startTime:"00:00",endTime:"00:00",isWorkDayStart:"8:00",isWorkDayEnd:"17:00",workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,slotDivisions:2,slotDuration:60,defaultShowWorkHours:!0,columnWidth:100},$n=e=>f.createElement(Gn,{...e}),Un={...Bn,name:"timeline",title:e=>e.toLanguageString(_e,Xt[_e]),slotDuration:60,slotDivisions:2,numberOfDays:1,selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}"};$n.displayName="KendoReactSchedulerTimelineView";const Zn=new Map;Zn.set(Tn,xn),Zn.set(En,hn),Zn.set(Nn,zn),Zn.set(On,Fn),Zn.set(Pn,Hn),Zn.set($n,Un);const qn=f.forwardRef((e,t)=>{var r,l,c;const i=!n.validatePackage(yn,{component:"Scheduler"}),u=n.getLicenseMessage(yn),{timezone:m,onDataChange:p}=e,g=f.useRef(null),E=f.useRef(null);f.useImperativeHandle(E,()=>({props:e,element:g.current})),f.useImperativeHandle(t,()=>E.current);const h=n.useRtl(g),y=o.useInternationalization(),v=o.useLocalization(),{fields:D}=f.useMemo(()=>(e=>({fields:{...W,...e}}))(e.modelFields),[e.modelFields]),[C,b]=Ce(e.defaultDate||Yn.defaultDate,e.date,e.onDateChange),I=f.Children.toArray(e.children||[]).map(e=>{var t;return f.isValidElement(e)?f.cloneElement(e,{...Zn.get(e.type),...null!=(t=e.props)?t:{}}):e}),w=f.cloneElement(f.createElement(En,null),Zn.get(En)),[T,R]=Ce(e.defaultView||I[0]&&I[0].props.name||"day",e.view,e.onViewChange),[x,A]=Ce(!0),N=I.find(e=>e.props.name===T)||I[0]||w,z=(null!=(r=e.data)?r:Yn.data)||Yn.data,O=((e,t)=>{const r=S(e,t),a=k(r);return 1===a.length?[{index:0,resources:(t||[]).reduce((e,t)=>[...e,...t.data.map(e=>({...e,field:t.field,valueField:t.valueField,colorField:t.colorField,multiple:t.multiple}))],[])}]:a.map((e,t)=>({index:t,resources:e}))})(e.group,e.resources),F=e.group&&e.group.orientation?e.group.orientation:"horizontal",P=N.props.selectedDateFormat||"{0:D}",H=N.props.selectedShortDateFormat||"{0:d}",K=N.props.slotDuration,V=void 0!==N.props.dateRange?"function"==typeof N.props.dateRange?N.props.dateRange.call(void 0,{intl:y,date:C,timezone:m,numberOfDays:N.props.numberOfDays,workWeekStart:N.props.workWeekStart||y.firstDay(),workWeekEnd:N.props.workWeekEnd||(y.firstDay()+N.props.numberOfDays)%6}):N.props.dateRange:{start:Yn.defaultDate,end:Yn.defaultDate},G=f.useCallback(({created:e=[],updated:t=[],deleted:r=[]})=>{if(p){const a={created:e,updated:t,deleted:r};p.call(void 0,a)}},[p]),B=f.useCallback(e=>{const t=[e.dataItem];G({created:t})},[G]),$=f.useCallback(e=>{const t=[],r=[];if(e.series)if(Array.isArray(e.dataItem))e.dataItem.forEach(t=>{const a=n.clone(L(e.dataItem,D,z)),l=n.clone(t);M(l,D.originalStart,_(a,D.originalStart)),M(l,D.recurrenceId,_(a,D.recurrenceId)),M(l,D.recurrenceExceptions,_(a,D.recurrenceExceptions)),r.push(l)});else{const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(Array.isArray(e.dataItem))e.dataItem.forEach(e=>{const a=null!==_(e,D.recurrenceRule)&&void 0!==_(e,D.recurrenceRule);if(null!==_(e,D.recurrenceId)&&void 0!==_(e,D.recurrenceId)&&a){const a=n.clone(L(e,D,z)),l=_(e,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e,D.recurrenceRule,null),r.push(a),t.push(e)}else r.push(e)});else{const a=null!==_(e.dataItem,D.recurrenceRule)&&void 0!==_(e.dataItem,D.recurrenceRule);if(null!==_(e.dataItem,D.recurrenceId)&&void 0!==_(e.dataItem,D.recurrenceId)&&a){const a=n.clone(L(e.dataItem,D,z)),l=_(e.dataItem,D.originalStart),o=_(a,D.recurrenceExceptions)||[];M(a,D.recurrenceExceptions,[...o,l]),M(e.dataItem,D.recurrenceRule,null),r.push(a),t.push(e.dataItem)}else r.push(e.dataItem)}G({updated:r,created:t})},[G,D,z]),U=f.useCallback(e=>{const t=[],r=[];if(e.series){const t=n.clone(L(e.dataItem,D,z)),a=n.clone(e.dataItem);M(a,D.originalStart,_(t,D.originalStart)),M(a,D.recurrenceId,_(t,D.recurrenceId)),M(a,D.recurrenceRule,_(t,D.recurrenceRule)),M(a,D.recurrenceExceptions,_(t,D.recurrenceExceptions)),r.push(a)}else if(null===_(e.dataItem,D.recurrenceRule)||void 0===_(e.dataItem,D.recurrenceRule))r.push(e.dataItem);else{const r=n.clone(L(e.dataItem,D,z)),a=_(e.dataItem,D.originalStart),l=_(r,D.recurrenceExceptions)||[];M(r,D.recurrenceExceptions,[...l,a]),M(e.dataItem,D.recurrenceRule,null),t.push(r)}G({updated:t,deleted:r})},[G,D,z]),Z=f.useCallback(e=>{switch(e.type){case J.create:B(e);break;case J.update:$(e);break;case J.remove:U(e)}},[B,U,$]),q=f.useCallback((e,t)=>{R(e,{...t,target:E.current})},[R,E]),Y=f.useCallback((e,t)=>{b(e,{...t,target:E.current})},[b,E]),j=f.useCallback(e=>{e.value&&b(e.value,{...e,target:E.current,nativeEvent:e.nativeEvent})},[b,E]),X=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,Math.round(n/27)):a.addDays(C,n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),Q=f.useCallback(e=>{var t,r;e.preventDefault();const n=null!=(r=null!=(t=N.props.step)?t:N.props.numberOfDays)?r:1,l=n>27?a.addMonths(C,-Math.round(n/27)):a.addDays(C,-n);b(l,e)},[C,b,N.props.numberOfDays,N.props.step]),ee=f.useCallback(e=>{e.preventDefault();const t=a.ZonedDate.fromLocalDate(new Date,m);b(new Date(t.getTime()),e)},[b,m]),te=f.useCallback(()=>{A(!x)},[A,x]),re=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)")},[g]),ae=f.useCallback(()=>{g.current&&(g.current.style.boxShadow="")},[g]),ne=f.useMemo(()=>{var t;return{...e.style,height:null!=(t=e.height)?t:Yn.height}},[e.height,e.style]),le=f.useMemo(()=>n.classNames({"k-rtl":void 0!==e.rtl?e.rtl:"rtl"===h},"k-scheduler",e.className),[e.className,e.rtl,h]),oe=v.toLanguageString(Ae,Xt[Ae]),se=v.toLanguageString(Pe,Xt[Pe]),ce=v.toLanguageString(He,Xt[He]),ie=N.props.header||e.header||Yn.header,de=N.props.footer||e.footer||Yn.footer,ue=Ie,[me,pe]=f.useState(null);return f.createElement(Se,{element:g,props:e,views:I,fields:D,groups:O,dateRange:V,orientation:F,dateFormat:{dateFormat:P,shortDateFormat:H},date:[C,Y],activeView:[T,q],selection:[me,pe],data:[z,Z]},f.createElement("div",{ref:g,id:e.id,style:ne,className:le,tabIndex:null!=(l=e.tabIndex)?l:Yn.tabIndex,dir:h,role:e.role||"application","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":me&&me.props.id||void 0,onFocus:re,onBlur:ae},f.createElement(ie,null,f.createElement(ue,null,f.createElement(s.ButtonGroup,{className:"k-scheduler-navigation"},f.createElement(s.Button,{role:"button",tabIndex:-1,title:oe,"aria-label":oe,onClick:ee},oe),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-right":"caret-alt-left",svgIcon:"rtl"===h?d.caretAltRightIcon:d.caretAltLeftIcon,title:se,"aria-label":se,onClick:Q}),f.createElement(s.Button,{role:"button",tabIndex:-1,icon:"rtl"===h?"caret-alt-left":"caret-alt-right",svgIcon:"rtl"===h?d.caretAltLeftIcon:d.caretAltRightIcon,title:ce,"aria-label":ce,onClick:X}))),f.createElement(Qt,{value:C,onChange:j}),f.createElement(s.ToolbarSpacer,null),f.createElement(er,null)),N&&f.createElement(N.type,{editable:null!=(c=e.editable)?c:Yn.editable,key:N.props.name,item:e.item,viewItem:e.viewItem,editItem:e.editItem,task:e.task,viewTask:e.viewTask,editTask:e.viewTask,slot:e.slot,viewSlot:e.viewSlot,editSlot:e.editSlot,form:e.form,onDataAction:Z,showWorkHours:x,...N.props}),f.createElement(de,null,K&&K<1440&&f.createElement(tr,null,f.createElement(s.Button,{tabIndex:-1,onClick:te,icon:"clock",svgIcon:d.clockIcon},v.toLanguageString(x?We:Ke,Xt[x?We:Ke])))),i&&f.createElement(n.WatermarkOverlay,{message:u})))}),Yn={data:[],height:600,tabIndex:-1,editable:!1,defaultDate:new Date,header:be,footer:Te,navigation:Ie,viewSelector:we};qn.propTypes={data:r.array,editable:r.oneOfType([r.bool,r.shape({add:r.bool,drag:r.bool,edit:r.bool,remove:r.bool,resize:r.bool})]),view:r.string,defaultView:r.string,date:r.any,defaultDate:r.any,rtl:r.bool,height:r.oneOfType([r.number,r.string]),children:r.any,timezone:r.string,group:r.any,resources:r.any,modelFields:r.shape({id:r.string,start:r.string,startTimezone:r.string,end:r.string,endTimezone:r.string,isAllDay:r.string,title:r.string,description:r.string,recurrenceRule:r.string,recurrenceId:r.string,recurrenceException:r.string})},qn.displayName="KendoReactScheduler";const jn=f.forwardRef((e,t)=>{const{item:r,_ref:a,itemRef:l,...s}=e,c=f.useRef(void 0),i=f.useRef(null),u=f.useRef(null),m=f.useRef(null);f.useImperativeHandle(u,()=>({props:e,element:i.current&&i.current.element})),f.useImperativeHandle(t,()=>u.current),f.useImperativeHandle(a,()=>i.current),f.useImperativeHandle(l,()=>i.current);const p=r||Xn.item,g=o.useInternationalization(),[E]=cr(),[h]=or(),y=te(),[v,D]=f.useState(!0),[k,S]=f.useState(!1),C=f.useRef(0),I=f.useRef(null),x=f.useRef([]),A=n.useDir(y),_=f.useMemo(()=>{var t,r;return e.isAllDay?null!=(t=e.title)?t:"":`(${g.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${null!=(r=e.title)?r:""}`},[g,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),M=()=>{var t,r,a,n,l;const o=h.filter(t=>t.current&&((t,r)=>t.group.index===r.group.index&&t.range.index===r.range.index&&(void 0===t.range.isAllDay||void 0===r.range.isAllDay||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay))(t.current.props,e)).sort((e,t)=>e.current.props.start.getTime()-t.current.props.start.getTime()),s=o.filter(t=>H(t.current.props.start,t.current.props.end,e.start,e.end)),c=i.current&&i.current.element;if(!c||!s.length)return;const d=T(o),u=R(o),m=T(s),p=R(s);if(!(m.current&&i.current&&p.current&&d.current&&u.current))return;if(!H(m.current.props.start,p.current.props.end,e.start,e.end))return void D(!1);const g=[],y=[],v=[],f=b(m.current.element),k=(e.vertical?f.height:f.width)/(m.current.props.end.getTime()-m.current.props.start.getTime()),A=(e.vertical?25:8)/k,_=(Math.min(e.start.getTime(),p.current.props.end.getTime()-A)-m.current.props.start.getTime())*k,M=Math.floor(Math.min(e.end.getTime(),p.current.props.end.getTime())-Math.max(e.start.getTime(),m.current.props.start.getTime()))*k;(E||[]).forEach(e=>{e.current&&(e.current.props.dragHint?y.push(e.current):e.current.props.resizeHint?v.push(e.current):g.push(e.current))}),x.current=((t,r,a)=>{const[n,l]=r,o=new Date(Math.min(l.props.end.getTime()-a,Math.max(e.start.getTime(),n.props.start.getTime()))),s=new Date(Math.max(o.getTime()+a,Math.min(e.end.getTime(),l.props.end.getTime())));return t.filter(t=>{const r=Math.max(Math.min(l.props.end.getTime()-a,t.props.start.getTime()),n.props.start.getTime()),c=Math.min(Math.max(r+a,t.props.end.getTime()),l.props.end.getTime());return t.props.id!==e.id&&t.props.group.index===e.group.index&&t.props.range.index===e.range.index&&(e.ignoreIsAllDay||t.props.isAllDay===e.isAllDay)&&H(new Date(r),new Date(c),o,s)&&H(n.props.start,l.props.end,t.props.start,t.props.end)})})(g,[d.current,u.current],A),I.current=e.resizeHint||e.dragHint?0:((e,t)=>{const r=new Set;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r.add(e._order)}),G(Array.from(r))})(i.current,x.current);let N=1;e.resizeHint||e.dragHint||(N=((e,t)=>{let r=0;return t.forEach(e=>{void 0!==e._order&&null!==e._order&&r<e._order&&(r=e._order)}),r+1})(i.current,x.current),x.current.forEach(e=>{e._maxSiblingsPerSlot&&N<e._maxSiblingsPerSlot&&(N=e._maxSiblingsPerSlot)}),x.current.forEach(e=>{void 0!==e._maxSiblingsPerSlot&&null!==e._maxSiblingsPerSlot&&e._maxSiblingsPerSlot<N&&(e._maxSiblingsPerSlot=N)}));let z=0;const L=f;x.current.forEach(e=>{let t=0;void 0!==e._order&&null!==e._order&&e._order<I.current&&(t=b(e.element).top+b(e.element).height-L.top-1*I.current+1),t>z&&(z=t)});L.width=e.vertical?L.width/N-1-20/N:M-1,e.vertical?L.height=M-1:(e.resizeHint||e.dragHint)&&N<=1||(L.height=null!=(r=null==(t=e.style)?void 0:t.height)?r:25),L.left=e.vertical?L.left+(null!=(a=I.current)?a:0)+1*(null!=(n=I.current)?n:0)*L.width:L.left+(_<0?0:_),L.top=e.vertical?L.top+(_<0?0:_):L.top+z+1*(null!=(l=I.current)?l:0),C.current=N,w(c,L),S(!0),D(!0)},N=f.useCallback(e=>{const t=e&&e[0],r=m.current;void 0!==c.current&&window.cancelAnimationFrame(c.current),r&&t&&(r.width!==t.contentRect.width||r.height!==t.contentRect.height)&&(c.current=window.requestAnimationFrame(()=>{M()})),m.current={width:t.contentRect.width,height:t.contentRect.height}},[M]);f.useEffect(M);const z=i.current&&i.current.element?i.current.element.closest(".k-scheduler-layout"):null;return wa({element:z,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),f.useEffect(()=>{if(!y.current)return;const e=window.ResizeObserver,t=e&&new e(N);return t&&t.observe(y.current),()=>{t&&t.disconnect()}},[N,y]),f.createElement(p,{...s,_ref:i,_order:I,_maxSiblingsPerSlot:C,_siblings:x,itemRef:i,style:{visibility:k?void 0:"hidden",display:v?void 0:"none",...e.style}},!e.resizeHint&&f.createElement("span",{className:"k-event-actions"},e.tail&&f.createElement(n.IconWrap,{name:"rtl"===A?"caret-alt-right":"caret-alt-left",icon:"rtl"===A?d.caretAltRightIcon:d.caretAltLeftIcon}),e.isRecurring&&!e.isException&&f.createElement(n.IconWrap,{name:"reload",icon:d.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&f.createElement(n.IconWrap,{name:"non-recurrence",icon:d.nonRecurrenceIcon})),!e.resizeHint&&f.createElement("div",{title:_},!e.isAllDay&&f.createElement(Ia,{className:"k-event-time"},_),f.createElement(Ia,null,e.title)))}),Xn={item:ba};jn.displayName="KendoReactSchedulerProportionalViewItem",e.AgendaView=Tn,e.DATA_ACTION=J,e.DRAG_ITEM_ACTION=en,e.DateHeaderCell=sn,e.DayView=En,e.ITEMS_FOCUS_ACTION=br,e.ITEMS_SELECT_ACTION=hr,e.MonthView=Nn,e.REMOVE_ITEM_ACTION=Qa,e.RESIZE_ITEM_ACTION=tn,e.SERIES_ACTION=rn,e.SHOW_OCCURRENCE_DIALOG_ACTION=Xa,e.SHOW_REMOVE_DIALOG_ACTION=Ja,e.SLOTS_FOCUS_ACTION=fr,e.SLOTS_SELECT_ACTION=yr,e.Scheduler=qn,e.SchedulerActiveViewContext=fe,e.SchedulerDataContext=ye,e.SchedulerDateContext=Ee,e.SchedulerDateRangeContext=ue,e.SchedulerDrag=Pa,e.SchedulerEditItem=an,e.SchedulerEditItemDragItemContext=Ba,e.SchedulerEditItemFormItemContext=Ga,e.SchedulerEditItemPropsContext=Va,e.SchedulerEditItemRemoveItemContext=Ua,e.SchedulerEditItemResizeItemContext=$a,e.SchedulerEditItemShowOccurrenceDialogContext=qa,e.SchedulerEditItemShowRemoveDialogContext=Za,e.SchedulerEditSlot=Da,e.SchedulerEditSlotFormItemContext=ya,e.SchedulerEditSlotPropsContext=ha,e.SchedulerEditTask=In,e.SchedulerFieldsContext=oe,e.SchedulerFooter=Te,e.SchedulerForm=da,e.SchedulerFormEditor=ca,e.SchedulerGroupsContext=ie,e.SchedulerHeader=be,e.SchedulerItem=ba,e.SchedulerItemContent=Ia,e.SchedulerOccurrenceDialog=Sa,e.SchedulerOrientationContext=pe,e.SchedulerProportionalViewItem=jn,e.SchedulerPropsContext=re,e.SchedulerRemoveDialog=Ca,e.SchedulerResize=Wa,e.SchedulerSlot=ma,e.SchedulerTask=vn,e.SchedulerViewItem=Ta,e.SchedulerViewSlot=ga,e.SchedulerViewTask=fn,e.SchedulerViewsContext=ne,e.TimeHeaderCell=Kr,e.TimelineView=$n,e.WeekView=On,e.WorkWeekView=Pn,e.agendaViewDefaultProps=xn,e.dateHeaderCellDefaultProps=cn,e.dayViewDefaultProps=hn,e.monthViewDefaultProps=zn,e.schedulerDefaultProps=Yn,e.schedulerDragDefaultProps=Ha,e.schedulerEditItemDefaultProps=nn,e.schedulerEditSlotDefaultProps=ka,e.schedulerEditTaskDefaultProps=wn,e.schedulerFormDefaultProps=ua,e.schedulerFormEditorDefaultProps=ia,e.schedulerProportionalViewItemDefaultProps=Xn,e.schedulerResizeDefaultProps=Ka,e.schedulerSlotDefaultProps=pa,e.schedulerViewItemDefaultProps=Ra,e.schedulerViewSlotDefaultProps=Ea,e.schedulerViewTaskDefaultProps=Dn,e.timeHeaderCellDefaultProps=Vr,e.timeLineViewDefaultProps=Un,e.useSchedulerActiveViewContext=De,e.useSchedulerDataContext=ve,e.useSchedulerDateContext=he,e.useSchedulerDateRangeContext=me,e.useSchedulerEditItemDragItemContext=()=>f.useContext(Ba),e.useSchedulerEditItemFormItemContext=()=>f.useContext(Ga),e.useSchedulerEditItemPropsContext=()=>f.useContext(Va),e.useSchedulerEditItemRemoveItemContext=()=>f.useContext(Ua),e.useSchedulerEditItemResizeItemContext=()=>f.useContext($a),e.useSchedulerEditItemShowOccurrenceDialogContext=()=>f.useContext(qa),e.useSchedulerEditItemShowRemoveDialogContext=()=>f.useContext(Za),e.useSchedulerEditSlotFormItemContext=()=>f.useContext(ya),e.useSchedulerEditSlotPropsContext=()=>f.useContext(ha),e.useSchedulerFieldsContext=se,e.useSchedulerGroupsContext=de,e.useSchedulerOrientationContext=ge,e.useSchedulerPropsContext=ae,e.useSchedulerViewsContext=le,e.weekViewDefaultProps=Fn,e.workWeekDefaultProps=Hn});
@@ -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-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777910297,version:"14.5.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777968329,version:"14.5.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
@@ -6,7 +6,7 @@ export const packageMetadata = Object.freeze({
6
6
  productName: 'KendoReact',
7
7
  productCode: 'KENDOUIREACT',
8
8
  productCodes: ['KENDOUIREACT'],
9
- publishDate: 1777910297,
10
- version: '14.5.0-develop.1',
9
+ publishDate: 1777968329,
10
+ version: '14.5.0-develop.3',
11
11
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui'
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-scheduler",
3
- "version": "14.5.0-develop.1",
3
+ "version": "14.5.0-develop.3",
4
4
  "description": "React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -29,15 +29,15 @@
29
29
  "@progress/kendo-date-math": "^1.4.1",
30
30
  "@progress/kendo-drawing": "^1.21.2",
31
31
  "@progress/kendo-licensing": "^1.7.2",
32
- "@progress/kendo-react-buttons": "14.5.0-develop.1",
33
- "@progress/kendo-react-common": "14.5.0-develop.1",
34
- "@progress/kendo-react-dateinputs": "14.5.0-develop.1",
35
- "@progress/kendo-react-dialogs": "14.5.0-develop.1",
36
- "@progress/kendo-react-dropdowns": "14.5.0-develop.1",
37
- "@progress/kendo-react-form": "14.5.0-develop.1",
38
- "@progress/kendo-react-inputs": "14.5.0-develop.1",
39
- "@progress/kendo-react-intl": "14.5.0-develop.1",
40
- "@progress/kendo-react-popup": "14.5.0-develop.1",
32
+ "@progress/kendo-react-buttons": "14.5.0-develop.3",
33
+ "@progress/kendo-react-common": "14.5.0-develop.3",
34
+ "@progress/kendo-react-dateinputs": "14.5.0-develop.3",
35
+ "@progress/kendo-react-dialogs": "14.5.0-develop.3",
36
+ "@progress/kendo-react-dropdowns": "14.5.0-develop.3",
37
+ "@progress/kendo-react-form": "14.5.0-develop.3",
38
+ "@progress/kendo-react-inputs": "14.5.0-develop.3",
39
+ "@progress/kendo-react-intl": "14.5.0-develop.3",
40
+ "@progress/kendo-react-popup": "14.5.0-develop.3",
41
41
  "@progress/kendo-svg-icons": "^4.0.0",
42
42
  "react": "^18.0.0 || ^19.0.0",
43
43
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -67,7 +67,7 @@
67
67
  "package": {
68
68
  "productName": "KendoReact",
69
69
  "productCode": "KENDOUIREACT",
70
- "publishDate": 1777910297,
70
+ "publishDate": 1777968329,
71
71
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
72
72
  }
73
73
  },