react-big-schedule 4.5.1 → 5.0.1

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.
Files changed (60) hide show
  1. package/README.md +9 -0
  2. package/dist/12.bundle.js +3 -0
  3. package/dist/12.bundle.js.LICENSE.txt +1 -0
  4. package/dist/12.bundle.js.map +1 -0
  5. package/dist/24.bundle.js +2 -0
  6. package/dist/24.bundle.js.map +1 -0
  7. package/dist/358.bundle.js +2 -0
  8. package/dist/358.bundle.js.map +1 -0
  9. package/dist/440.bundle.js +2 -0
  10. package/dist/440.bundle.js.map +1 -0
  11. package/dist/453.bundle.js +2 -0
  12. package/dist/453.bundle.js.map +1 -0
  13. package/dist/474.bundle.js +3 -0
  14. package/dist/474.bundle.js.LICENSE.txt +32 -0
  15. package/dist/474.bundle.js.map +1 -0
  16. package/dist/540.bundle.js +2 -0
  17. package/dist/540.bundle.js.map +1 -0
  18. package/dist/568.bundle.js +2 -0
  19. package/dist/568.bundle.js.map +1 -0
  20. package/dist/602.bundle.js +2 -0
  21. package/dist/602.bundle.js.map +1 -0
  22. package/dist/687.bundle.js +3 -0
  23. package/dist/687.bundle.js.LICENSE.txt +3 -0
  24. package/dist/687.bundle.js.map +1 -0
  25. package/dist/689.bundle.js +2 -0
  26. package/dist/689.bundle.js.map +1 -0
  27. package/dist/assets/logo.png +0 -0
  28. package/dist/banner.png +0 -0
  29. package/dist/bundle.js +3 -0
  30. package/dist/bundle.js.LICENSE.txt +70 -0
  31. package/dist/bundle.js.map +1 -0
  32. package/dist/index.html +13 -0
  33. package/package.json +5 -5
  34. package/dist/components/AddMore.js +0 -48
  35. package/dist/components/AddMorePopover.js +0 -108
  36. package/dist/components/AgendaEventItem.js +0 -84
  37. package/dist/components/AgendaResourceEvents.js +0 -87
  38. package/dist/components/AgendaView.js +0 -51
  39. package/dist/components/BodyView.js +0 -59
  40. package/dist/components/DnDContext.js +0 -162
  41. package/dist/components/DnDSource.js +0 -115
  42. package/dist/components/EventItem.js +0 -700
  43. package/dist/components/EventItemPopover.js +0 -132
  44. package/dist/components/HeaderView.js +0 -110
  45. package/dist/components/ResourceEvents.js +0 -411
  46. package/dist/components/ResourceView.js +0 -112
  47. package/dist/components/SchedulerData.js +0 -1238
  48. package/dist/components/SchedulerHeader.js +0 -160
  49. package/dist/components/SelectedArea.js +0 -32
  50. package/dist/components/Summary.js +0 -59
  51. package/dist/components/WrapperFun.js +0 -19
  52. package/dist/components/index.js +0 -586
  53. package/dist/config/default.js +0 -36
  54. package/dist/config/scheduler.js +0 -108
  55. package/dist/css/style.css +0 -266
  56. package/dist/helper/behaviors.js +0 -102
  57. package/dist/helper/utility.js +0 -21
  58. package/dist/index.d.ts +0 -378
  59. package/dist/index.js +0 -78
  60. package/dist/sample-data/sample1.js +0 -337
package/README.md CHANGED
@@ -570,6 +570,15 @@ The max height of Scheduler. If the desired height is bigger than the max height
570
570
  frozen and vertical scroll bar will appear, but this won't happen when the max height is set to `0`. Refer
571
571
  to [this example](https://stephenchou1017.github.io/scheduler/#/freezefirstrow).
572
572
 
573
+ **If you are using `responsiveByParent`, you can omit this setting or set it to `0` to ensure the Scheduler height conforms to the parent container.**
574
+ When conforming to the parent container, the Scheduler will fill the available space and scroll bars will appear as needed.
575
+
576
+ #### underneathHeight
577
+
578
+ When using `responsiveByParent`, this property allows you to reserve space beneath the Scheduler (for example, for a footer or other fixed elements). The Scheduler's height will be reduced by this amount, ensuring it does not overlap with content below. Set this to the pixel height you want to reserve at the bottom of the parent container.
579
+
580
+ **Example:** If your parent container is 600px tall and `underneathHeight` is 50, the Scheduler will use up to 550px of height.
581
+
573
582
  #### tableHeaderHeight
574
583
 
575
584
  Height of Scheduler table header.
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 12.bundle.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkreact_big_schedule=self.webpackChunkreact_big_schedule||[]).push([[12],{4519:(e,t,r)=>{r.d(t,{Gr:()=>B,Op:()=>u,S4:()=>z,_F:()=>jt,ij:()=>Ze,qi:()=>c,Js:()=>yt});var n=r(5556),o=r.n(n),a=r(6540),i="YYYY-MM-DD",s="YYYY-MM-DD HH:mm:ss",c={Day:0,Week:1,Month:2,Quarter:3,Year:4,Custom:5,Custom1:6,Custom2:7},l="event";const u={resources:[{id:"r0",name:"Resource0",title:"Resource 0",groupOnly:!0},{id:"r1",name:"Resource1",title:"Resource 1",parentId:"r0"},{id:"r2",name:"Resource2",parentId:"r3"},{id:"r3",name:"Resource3",parentId:"r1"},{id:"r4",name:"Resource4"},{id:"r5",name:"Resource5"},{id:"r6",name:"Resource6"},{id:"r7",name:"Resource7"}],events:[{id:1,start:"2022-12-18 09:30:00",end:"2022-12-19 23:30:00",resourceId:"r1",title:"I am finished",bgColor:"#D9D9D9",showPopover:!1},{id:2,start:"2022-12-18 12:30:00",end:"2022-12-26 23:30:00",resourceId:"r2",title:"I am not resizable",resizable:!1},{id:3,start:"2022-12-19 12:30:00",end:"2022-12-20 23:30:00",resourceId:"r3",title:"I am not movable",movable:!1},{id:4,start:"2022-12-19 14:30:00",end:"2022-12-20 23:30:00",resourceId:"r4",title:"I am not start-resizable",startResizable:!1},{id:5,start:"2022-12-19 15:30:00",end:"2022-12-20 23:30:00",resourceId:"r5",title:"I am not end-resizable",endResizable:!1},{id:6,start:"2022-12-19 15:35:00",end:"2022-12-19 23:30:00",resourceId:"r6",title:"I am normal"},{id:7,start:"2022-12-19 15:40:00",end:"2022-12-20 23:30:00",resourceId:"r7",title:"I am exceptional",bgColor:"#FA9E95"},{id:8,start:"2022-12-19 15:50:00",end:"2022-12-19 23:30:00",resourceId:"r1",title:"I am locked",movable:!1,resizable:!1,bgColor:"red"},{id:9,start:"2022-12-19 16:30:00",end:"2022-12-27 23:30:00",resourceId:"r1",title:"R1 has many tasks 1"},{id:10,start:"2022-12-19 17:30:00",end:"2022-12-19 23:30:00",resourceId:"r1",title:"R1 has recurring tasks every week on Tuesday, Friday",rrule:"FREQ=WEEKLY;DTSTART=20221219T013000Z;BYDAY=TU,FR",bgColor:"#f759ab"},{id:11,start:"2022-12-19 18:30:00",end:"2022-12-20 23:30:00",resourceId:"r1",title:"R1 has many tasks 3"},{id:12,start:"2022-12-20 18:30:00",end:"2022-12-20 23:30:00",resourceId:"r1",title:"R1 has many tasks 4"},{id:13,start:"2022-12-21 18:30:00",end:"2022-12-24 23:30:00",resourceId:"r1",title:"R1 has many tasks 5"},{id:14,start:"2022-12-23 18:30:00",end:"2022-12-27 23:30:00",resourceId:"r1",title:"R1 has many tasks 6"}],eventsForTaskView:[{id:1,start:"2022-12-18 09:30:00",end:"2022-12-18 23:30:00",resourceId:"r1",title:"I am finished",bgColor:"#D9D9D9",groupId:1,groupName:"Task1"},{id:2,start:"2022-12-18 12:30:00",end:"2022-12-26 23:30:00",resourceId:"r2",title:"I am not resizable",resizable:!1,groupId:2,groupName:"Task2"},{id:3,start:"2022-12-19 12:30:00",end:"2022-12-20 23:30:00",resourceId:"r3",title:"I am not movable",movable:!1,groupId:3,groupName:"Task3"},{id:7,start:"2022-12-19 15:40:00",end:"2022-12-20 23:30:00",resourceId:"r7",title:"I am exceptional",bgColor:"#FA9E95",groupId:4,groupName:"Task4"},{id:4,start:"2022-12-20 14:30:00",end:"2022-12-21 23:30:00",resourceId:"r4",title:"I am not start-resizable",startResizable:!1,groupId:1,groupName:"Task1"},{id:5,start:"2022-12-21 15:30:00",end:"2022-12-22 23:30:00",resourceId:"r5",title:"I am not end-resizable",endResizable:!1,groupId:3,groupName:"Task3"},{id:9,start:"2022-12-21 16:30:00",end:"2022-12-21 23:30:00",resourceId:"r1",title:"R1 has many tasks",groupId:4,groupName:"Task4"},{id:6,start:"2022-12-22 15:35:00",end:"2022-12-23 23:30:00",resourceId:"r6",title:"I am normal",groupId:1,groupName:"Task1"},{id:8,start:"2022-12-25 15:50:00",end:"2022-12-26 23:30:00",resourceId:"r1",title:"I am locked",movable:!1,resizable:!1,bgColor:"red",groupId:1,groupName:"Task1"},{id:10,start:"2022-12-26 18:30:00",end:"2022-12-26 23:30:00",resourceId:"r2",title:"R2 has many tasks",groupId:4,groupName:"Task4"},{id:11,start:"2022-12-27 18:30:00",end:"2022-12-27 23:30:00",resourceId:"r4",title:"R4 has many tasks",groupId:4,groupName:"Task4"},{id:12,start:"2022-12-28 18:30:00",end:"2022-12-28 23:30:00",resourceId:"r6",title:"R6 has many tasks",groupId:3,groupName:"Task3"}],eventsForCustomEventStyle:[{id:1,start:"2022-12-18 09:30:00",end:"2022-12-19 23:30:00",resourceId:"r1",title:"I am finished",bgColor:"#D9D9D9",type:1},{id:2,start:"2022-12-18 12:30:00",end:"2022-12-26 23:30:00",resourceId:"r2",title:"I am not resizable",resizable:!1,type:2},{id:3,start:"2022-12-19 12:30:00",end:"2022-12-20 23:30:00",resourceId:"r3",title:"I am not movable",movable:!1,type:3},{id:4,start:"2022-12-19 14:30:00",end:"2022-12-20 23:30:00",resourceId:"r4",title:"I am not start-resizable",startResizable:!1,type:1},{id:5,start:"2022-12-19 15:30:00",end:"2022-12-20 23:30:00",resourceId:"r5",title:"I am not end-resizable",endResizable:!1,type:2},{id:6,start:"2022-12-19 15:35:00",end:"2022-12-19 23:30:00",resourceId:"r6",title:"I am normal",type:3},{id:7,start:"2022-12-19 15:40:00",end:"2022-12-20 23:30:00",resourceId:"r7",title:"I am exceptional",bgColor:"#FA9E95",type:1},{id:8,start:"2022-12-19 15:50:00",end:"2022-12-19 23:30:00",resourceId:"r1",title:"I am locked",movable:!1,resizable:!1,bgColor:"red",type:2},{id:9,start:"2022-12-19 16:30:00",end:"2022-12-27 23:30:00",resourceId:"r1",title:"R1 has many tasks 1",type:3},{id:10,start:"2022-12-20 18:30:00",end:"2022-12-20 23:30:00",resourceId:"r1",title:"R1 has many tasks 2",type:1},{id:11,start:"2022-12-21 18:30:00",end:"2022-12-22 23:30:00",resourceId:"r1",title:"R1 has many tasks 3",type:2},{id:12,start:"2022-12-23 18:30:00",end:"2022-12-27 23:30:00",resourceId:"r1",title:"R1 has many tasks 4",type:3}]};var d=r(3340),h=r(2953),f=r(5886),v=r(9027);function m(e){var t=e.schedulerData,r=e.eventItem,n=e.title,o=e.startTime,i=e.endTime,s=e.statusColor,c=e.subtitleGetter,l=e.viewEventClick,u=e.viewEventText,f=e.viewEvent2Click,v=e.viewEvent2Text,m=e.eventItemPopoverTemplateResolver,p=t.localeDayjs,g=t.config,y=p(new Date(o)),b=p(new Date(i));if(m)return m(t,r,n,y,b,s);var E=c?c(t,r):null,D=u&&l&&(void 0===r.clickable1||r.clickable1),w=v&&f&&(void 0===r.clickable2||r.clickable2),S=function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return a.createElement("button",{className:"header2-text txt-btn-dis",type:"button",style:{color:"#108EE9",cursor:"pointer",marginLeft:"".concat(o,"px")},onClick:function(){return n(t,r)}},e)};return a.createElement("div",{style:{width:g.eventItemPopoverWidth}},a.createElement(d.A,{type:"flex",align:"middle"},g.eventItemPopoverShowColor&&a.createElement(h.A,{span:2},a.createElement("div",{className:"status-dot",style:{backgroundColor:s}})),a.createElement(h.A,{span:22,className:"overflow-text"},a.createElement("span",{className:"header2-text",title:n},n))),E&&a.createElement(d.A,{type:"flex",align:"middle"},a.createElement(h.A,{span:2},a.createElement("div",null)),a.createElement(h.A,{span:22,className:"overflow-text"},a.createElement("span",{className:"header2-text",title:E},E))),a.createElement(d.A,{type:"flex",align:"middle"},a.createElement(h.A,{span:2},a.createElement("div",null)),a.createElement(h.A,{span:22},a.createElement("span",{className:"header1-text"},y.format("HH:mm")),g.eventItemPopoverDateFormat&&a.createElement("span",{className:"help-text",style:{marginLeft:"8px"}},y.format(g.eventItemPopoverDateFormat)),a.createElement("span",{className:"header2-text",style:{marginLeft:"8px"}},"-"),a.createElement("span",{className:"header1-text",style:{marginLeft:"8px"}},b.format("HH:mm")),g.eventItemPopoverDateFormat&&a.createElement("span",{className:"help-text",style:{marginLeft:"8px"}},b.format(g.eventItemPopoverDateFormat)))),(D||w)&&a.createElement(d.A,{type:"flex",align:"middle"},a.createElement(h.A,{span:2},a.createElement("div",null)),a.createElement(h.A,{span:22},D&&S(u,l),w&&S(v,f,16))))}m.propTypes={schedulerData:o().object.isRequired,eventItem:o().object.isRequired,title:o().string.isRequired,startTime:o().string.isRequired,endTime:o().string.isRequired,statusColor:o().string.isRequired,subtitleGetter:o().func,viewEventClick:o().func,viewEventText:o().string,viewEvent2Click:o().func,viewEvent2Text:o().string,eventItemPopoverTemplateResolver:o().func};const p=m;function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(null,arguments)}function b(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var c=n&&n.prototype instanceof s?n:s,l=Object.create(c.prototype);return E(l,"_invoke",function(r,n,o){var a,s,c,l=0,u=o||[],d=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,r){return a=t,s=0,c=e,h.n=r,i}};function f(r,n){for(s=r,c=n,t=0;!d&&l&&!o&&t<u.length;t++){var o,a=u[t],f=h.p,v=a[2];r>3?(o=v===n)&&(c=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=f&&((o=r<2&&f<a[1])?(s=0,h.v=n,h.n=a[1]):f<v&&(o=r<3||a[0]>n||n>v)&&(a[4]=r,a[5]=n,h.n=v,s=0))}if(o||r>1)return i;throw d=!0,n}return function(o,u,v){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,v),s=u,c=v;(t=s<2?e:c)||!d;){a||(s?s<3?(s>1&&(h.n=-1),f(s,c)):h.n=c:h.v=c);try{if(l=2,a){if(s||(o="next"),t=a[o]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);a=e}else if((t=(d=h.n<0)?c:r.call(n,h))!==i)break}catch(t){a=e,s=1,c=t}finally{l=1}}return{value:t,done:d}}}(r,o,a),!0),l}var i={};function s(){}function c(){}function l(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(E(t={},n,(function(){return this})),t),d=l.prototype=s.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=l,E(d,"constructor",l),E(l,"constructor",c),c.displayName="GeneratorFunction",E(l,o,"GeneratorFunction"),E(d),E(d,o,"Generator"),E(d,n,(function(){return this})),E(d,"toString",(function(){return"[object Generator]"})),(b=function(){return{w:a,m:h}})()}function E(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}E=function(e,t,r,n){if(t)o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var a=function(t,r){E(e,t,(function(e){return this._invoke(t,r,e)}))};a("next",0),a("throw",1),a("return",2)}},E(e,t,r,n)}function D(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){D(a,n,o,i,s,"next",e)}function s(e){D(a,n,o,i,s,"throw",e)}i(void 0)}))}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e,t,r){return(t=R(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e){var t=function(e){if("object"!=g(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(t)?t:t+""}var j=function(e){var t=e.count,r=e.cellUnit,n=e.config,o=e.dragType,a=e.eventItem,i=e.localeDayjs,c=e.value,l=0,u=0,d=c;return new Promise((function(e){if(0!==t&&1!==r&&!1===n.displayWeekend)for(;;){u=t>0?u+1:u-1;var c=i(new Date(a[o])).add(u,"days"),h=c.day();if(0!==h&&6!==h&&(l=t>0?l+1:l-1)===t){d=c.format(s);break}}e(d)}))},O=function(e){var t=e.eventItem,r=e.isInPopover;return!(!0!==e.schedulerData.config.startResizable||!1!==r||void 0!==t.resizable&&!1===t.resizable||void 0!==t.startResizable&&!1===t.startResizable)},P=function(e){var t=e.eventItem,r=e.isInPopover;return!(!0!==e.schedulerData.config.endResizable||!1!==r||void 0!==t.resizable&&!1===t.resizable||void 0!==t.endResizable&&!1===t.endResizable)},x=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(r=function(e,t,r){return t=T(t),function(e,t){if(t&&("object"==g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}(this,t,[e]),"resizerHelper",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"addEventListener",n="start"===e?r.startResizer:r.endResizer,o="start"===e?r.doStartDrag:r.doEndDrag,a="start"===e?r.stopStartDrag:r.stopEndDrag,i="start"===e?r.cancelStartDrag:r.cancelEndDrag;r.supportTouch?(n[t]("touchmove",o,!1),n[t]("touchend",a,!1),n[t]("touchcancel",i,!1)):(document.documentElement[t]("mousemove",o,!1),document.documentElement[t]("mouseup",a,!1))})),C(r,"initDragHelper",(function(e,t){var n=r.props,o=n.schedulerData,a=n.eventItem,i=o._getEventSlotId(a),s=o.getSlotById(i);if(!(s&&s.groupOnly||o._isResizing())){e.stopPropagation();var c=0;if(r.supportTouch){if(0===e.changedTouches.length)return;c=e.changedTouches[0].pageX}else{if(void 0!==e.buttons&&1!==e.buttons)return;c=e.clientX}r.setState(C({},"start"===t?"startX":"endX",c)),o._startResizing(),r.resizerHelper(t,"addEventListener"),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1}}})),C(r,"initStartDrag",(function(e){r.initDragHelper(e,"start")})),C(r,"doStartDrag",(function(e){e.stopPropagation();var t=0;if(r.supportTouch){if(0===e.changedTouches.length)return;t=e.changedTouches[0].pageX}else t=e.clientX;var n=r.props,o=n.left,a=n.width,i=n.leftIndex,s=n.rightIndex,c=n.schedulerData.getContentCellWidth(),l=i>0?5:6,u=c-l,d=s*c-l,h=r.state.startX,f=o+t-h,v=a+h-t;v<u?(v=u,f=(s-1)*c+(s-1>0?2:3)):v>d&&(v=d,f=3),r.setState({left:f,width:v})})),C(r,"stopStartDrag",function(){var e=w(b().m((function e(t){var n,o,a,i,c,u,d,h,f,v,m,p,g,y,E,D,w,S,I,T,k,C,R,O,P,x,H,M,W,A,_,N;return b().w((function(e){for(;;)switch(e.n){case 0:if(t.stopPropagation(),r.resizerHelper("start","removeEventListener"),document.onselectstart=null,document.ondragstart=null,n=r.props,o=n.width,a=n.left,i=n.top,c=n.leftIndex,u=n.rightIndex,d=n.schedulerData,h=n.eventItem,f=n.updateEventStart,v=n.conflictOccurred,d._stopResizing(),r.state.width!==o){e.n=1;break}return e.a(2);case 1:if(m=0,!r.supportTouch){e.n=3;break}if(0!==t.changedTouches.length){e.n=2;break}return r.setState({left:a,top:i,width:o}),e.a(2);case 2:p=t.changedTouches[0],m=p.pageX,e.n=4;break;case 3:m=t.clientX;case 4:return g=d.cellUnit,y=d.events,E=d.config,D=d.localeDayjs,w=d.getContentCellWidth(),I=w-(S=c>0?5:6),T=u*w-S,k=r.state.startX,C=o+k-m,O=1,(R=m-k)<0?O=-1:0===R&&(O=0),P=(O>0?Math.floor(Math.abs(R)/w):Math.ceil(Math.abs(R)/w))*O,C<I?P=u-c-1:C>T&&(P=-c),x=D(new Date(h.start)).add(1===g?P*E.minuteStep:P,1===g?"minutes":"days").format(s),e.n=5,j({count:P,cellUnit:g,config:E,eventItem:h,localeDayjs:D,dragType:"start",value:x});case 5:x=e.v,H=!1,M=d._getEventSlotId(h),(A=d.getSlotById(M))&&(W=A.name),E.checkConflict&&(_=D(new Date(x)),N=D(new Date(h.end)),y.forEach((function(e){if(d._getEventSlotId(e)===M&&e.id!==h.id){var t=D(new Date(e.start)),r=D(new Date(e.end));(_>=t&&_<r||N>t&&N<=r||t>=_&&t<N||r>_&&r<=N)&&(H=!0)}}))),H?(r.setState({left:a,top:i,width:o}),void 0!==v?v(d,"StartResize",h,l,M,W,x,h.end):console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"),r.subscribeResizeEvent(r.props)):void 0!==f&&f(d,h,x);case 6:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}}()),C(r,"cancelStartDrag",(function(e){e.stopPropagation(),r.startResizer.removeEventListener("touchmove",r.doStartDrag,!1),r.startResizer.removeEventListener("touchend",r.stopStartDrag,!1),r.startResizer.removeEventListener("touchcancel",r.cancelStartDrag,!1),document.onselectstart=null,document.ondragstart=null;var t=r.props,n=t.schedulerData,o=t.left,a=t.top,i=t.width;n._stopResizing(),r.setState({left:o,top:a,width:i})})),C(r,"initEndDrag",(function(e){r.initDragHelper(e,"end")})),C(r,"doEndDrag",(function(e){e.stopPropagation();var t=0;if(r.supportTouch){if(0===e.changedTouches.length)return;t=e.changedTouches[0].pageX}else t=e.clientX;var n=r.props,o=n.width,a=n.leftIndex,i=n.schedulerData,s=i.headers,c=i.getContentCellWidth(),l=a>0?5:6,u=c-l,d=(s.length-a)*c-l,h=o+t-r.state.endX;h<u?h=u:h>d&&(h=d),r.setState({width:h})})),C(r,"stopEndDrag",function(){var e=w(b().m((function e(t){var n,o,a,i,c,u,d,h,f,v,m,p,g,y,E,D,w,S,I,T,k,C,R,O,P,x,H,M,W,A,_,N;return b().w((function(e){for(;;)switch(e.n){case 0:if(t.stopPropagation(),r.resizerHelper("end","removeEventListener"),document.onselectstart=null,document.ondragstart=null,n=r.props,o=n.left,a=n.top,i=n.width,c=n.leftIndex,u=n.rightIndex,d=n.schedulerData,h=n.eventItem,f=n.updateEventEnd,v=n.conflictOccurred,d._stopResizing(),r.state.width!==i){e.n=1;break}return e.a(2);case 1:if(m=0,!r.supportTouch){e.n=3;break}if(0!==t.changedTouches.length){e.n=2;break}return r.setState({left:o,top:a,width:i}),e.a(2);case 2:p=t.changedTouches[0],m=p.pageX,e.n=4;break;case 3:m=t.clientX;case 4:return g=d.headers,y=d.cellUnit,E=d.events,D=d.config,w=d.localeDayjs,S=d.getContentCellWidth(),T=S-(I=c>0?5:6),k=(g.length-c)*S-I,C=r.state.endX,P=1,(O=(R=i+m-C)-i)<0?P=-1:0===O&&(P=0),x=(P<0?Math.floor(Math.abs(O)/S):Math.ceil(Math.abs(O)/S))*P,R<T?x=c-u+1:R>k&&(x=g.length-u),H=w(new Date(h.end)).add(1===y?x*D.minuteStep:x,1===y?"minutes":"days").format(s),e.n=5,j({dragType:"end",cellUnit:y,config:D,count:x,value:H,eventItem:h,localeDayjs:w});case 5:H=e.v,M=!1,W=d._getEventSlotId(h),A=d.getSlotById(W),D.checkConflict&&(_=w(new Date(h.start)),N=w(new Date(H)),E.forEach((function(e){if(d._getEventSlotId(e)===W&&e.id!==h.id){var t=w(new Date(e.start)),r=w(new Date(e.end));(_>=t&&_<r||N>t&&N<=r||t>=_&&t<N||r>_&&r<=N)&&(M=!0)}}))),M?(r.setState({left:o,top:a,width:i}),void 0!==v?v(d,"EndResize",h,l,W,A?A.name:null,h.start,H):console.error("Conflict occurred, set conflictOccurred func in Scheduler to handle it"),r.subscribeResizeEvent(r.props)):void 0!==f&&f(d,h,H);case 6:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}}()),C(r,"cancelEndDrag",(function(e){e.stopPropagation(),r.endResizer.removeEventListener("touchmove",r.doEndDrag,!1),r.endResizer.removeEventListener("touchend",r.stopEndDrag,!1),r.endResizer.removeEventListener("touchcancel",r.cancelEndDrag,!1),document.onselectstart=null,document.ondragstart=null;var t=r.props,n=t.schedulerData,o=t.left,a=t.top,i=t.width;n._stopResizing(),r.setState({left:o,top:a,width:i})})),C(r,"handleMouseMove",(function(e){var t=r.eventItemRef.current.getBoundingClientRect();r.setState({contentMousePosX:e.clientX,eventItemLeftRect:t.left,eventItemRightRect:t.right})})),C(r,"subscribeResizeEvent",(function(e){void 0!==r.startResizer&&null!==r.startResizer&&(r.supportTouch||(r.startResizer.removeEventListener("mousedown",r.initStartDrag,!1),O(e)&&r.startResizer.addEventListener("mousedown",r.initStartDrag,!1))),void 0!==r.endResizer&&null!==r.endResizer&&(r.supportTouch||(r.endResizer.removeEventListener("mousedown",r.initEndDrag,!1),P(e)&&r.endResizer.addEventListener("mousedown",r.initEndDrag,!1)))}));var n=e.left,o=e.top,i=e.width;return r.state={left:n,top:o,width:i,contentMousePosX:0,eventItemLeftRect:0,eventItemRightRect:0},r.startResizer=void 0,r.endResizer=void 0,r.supportTouch=!1,r.eventItemRef=a.createRef(),r._isMounted=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),r=t,(n=[{key:"componentDidMount",value:function(){this._isMounted=!0,this.supportTouch="ontouchstart"in window,this.subscribeResizeEvent(this.props)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=this.props,r=t.left,n=t.top,o=t.width;this.setState({left:r,top:n,width:o}),this.subscribeResizeEvent(this.props)}}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.eventItem,o=r.isStart,i=r.isEnd,s=r.isInPopover,c=r.eventItemClick,l=r.schedulerData,u=r.isDragging,d=r.connectDragSource,h=r.connectDragPreview,f=r.eventItemTemplateResolver,m=l.config,g=l.localeDayjs,b=this.state,E=b.left,D=b.width,w=b.top,S=m.eventItemPopoverPlacement,I=/(top|bottom)(Right|Left)MousePosition/.test(S);e=o?i?"round-all":"round-head":i?"round-tail":"round-none";var T=m.defaultEventBgColor;n.bgColor&&(T=n.bgColor);var k=l.behaviors.getEventTextFunc(l,n),C=a.createElement(p,y({},this.props,{eventItem:n,title:n.title,startTime:n.start,endTime:n.end,statusColor:T})),R=g(new Date(n.start)),j=s?"".concat(R.format("HH:mm")," ").concat(k):k,x=a.createElement("div",null);O(this.props)&&(x=a.createElement("div",{className:"event-resizer event-start-resizer",ref:function(e){return t.startResizer=e}}));var H=a.createElement("div",null);P(this.props)&&(H=a.createElement("div",{className:"event-resizer event-end-resizer",ref:function(e){return t.endResizer=e}}));var M=a.createElement("div",{className:"".concat(e," event-item"),key:n.id,style:{height:m.eventItemHeight,backgroundColor:T}},a.createElement("span",{style:{marginLeft:"10px",lineHeight:"".concat(m.eventItemHeight,"px")}},j));void 0!==f&&(M=f(l,n,T,o,i,"event-item",m.eventItemHeight,void 0));var W=a.createElement("a",{className:"timeline-event",ref:this.eventItemRef,onMouseMove:I?this.handleMouseMove:void 0,style:{left:E,width:D,top:w},onClick:function(){c&&c(l,n)}},M,x,H),A=function(){var e=0,r="";if(I){var n=S.includes("Left"),o=t.state.contentMousePosX,a=m.eventItemPopoverWidth,i=t.state.eventItemLeftRect,s=t.state.eventItemRightRect,c=n?i:s,l=n?1:-1;r=S.replace("MousePosition",""),n&&t._isMounted?o+a+10>window.innerWidth&&(r="".concat(S.replace(/(Right|Left).*/,""),"Right"),c=s,l=-1):o-a-10<0&&(r="".concat(S.replace(/(Right|Left).*/,""),"Left"),c=i,l=1),e=o-c-20*l}return{popoverOffsetX:e,mousePositionPlacement:r}}(),_=A.popoverOffsetX,N=A.mousePositionPlacement,L=m.dragAndDropEnabled?h(d(W)):W;return u||!l._isResizing()&&!1!==m.eventItemPopoverEnabled&&!1!==n.showPopover?a.createElement(v.A,{motion:I?"":void 0,align:I?{offset:[_,S.includes("top")?-10:10],overflow:{}}:void 0,placement:I?N:S,content:C,trigger:m.eventItemPopoverTrigger,overlayClassName:"scheduler-event-item-popover"},L):a.createElement("div",null,L)}}])&&S(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(a.Component);const H=x;x.propTypes={schedulerData:n.PropTypes.object.isRequired,eventItem:n.PropTypes.object.isRequired,isStart:n.PropTypes.bool.isRequired,isEnd:n.PropTypes.bool.isRequired,left:n.PropTypes.number.isRequired,width:n.PropTypes.number.isRequired,top:n.PropTypes.number.isRequired,isInPopover:n.PropTypes.bool.isRequired,leftIndex:n.PropTypes.number.isRequired,rightIndex:n.PropTypes.number.isRequired,isDragging:n.PropTypes.bool,connectDragSource:n.PropTypes.func,connectDragPreview:n.PropTypes.func,updateEventStart:n.PropTypes.func,updateEventEnd:n.PropTypes.func,moveEvent:n.PropTypes.func,subtitleGetter:n.PropTypes.func,eventItemClick:n.PropTypes.func,viewEventClick:n.PropTypes.func,viewEventText:n.PropTypes.string,viewEvent2Click:n.PropTypes.func,viewEvent2Text:n.PropTypes.string,conflictOccurred:n.PropTypes.func,eventItemTemplateResolver:n.PropTypes.func},x.defaultProps={isDragging:void 0,connectDragSource:void 0,connectDragPreview:void 0,updateEventStart:void 0,updateEventEnd:void 0,moveEvent:void 0,subtitleGetter:void 0,eventItemClick:void 0,viewEventClick:void 0,viewEventText:void 0,viewEvent2Click:void 0,viewEvent2Text:void 0,conflictOccurred:void 0,eventItemTemplateResolver:void 0};var M=r(3415);function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function _(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t,r){return(t=L(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L(e){var t=function(e){if("object"!=W(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==W(t)?t:t+""}var z=_((function e(t,r,n){var o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),N(this,"getDragSpec",(function(){return{beginDrag:function(e){return o.resolveDragObjFunc(e)},endDrag:function(e,t){if(t.didDrop()){var r=e.moveEvent,n=e.newEvent,o=e.schedulerData,a=o.events,i=o.config,u=o.viewType,d=o.localeDayjs,h=t.getItem(),f=t.getItemType(),v=t.getDropResult(),m=v.slotId,p=v.slotName,g=v.start,y=v.end,b=v.initialStart,E="New",D=f===l;if(D){var w=h;if(i.relativeMove)g=d(w.start).add(d(g).diff(d(new Date(b))),"ms").format(s);else if(u!==c.Day){var S=d(g);g=d(w.start).year(S.year()).month(S.month()).date(S.date()).format(s)}if(y=d(g).add(d(w.end).diff(d(w.start)),"ms").format(s),!1===i.crossResourceMove){m=o._getEventSlotId(h),p=void 0;var I=o.getSlotById(m);I&&(p=I.name)}E="Move"}var T=!1;if(i.checkConflict){var k=d(g),C=d(y);a.forEach((function(e){if(o._getEventSlotId(e)===m&&(!D||e.id!==h.id)){var t=d(e.start),r=d(e.end);(k>=t&&k<r||C>t&&C<=r||t>=k&&t<C||r>k&&r<=C)&&(T=!0)}}))}if(T){var R=e.conflictOccurred;void 0!==R?R(o,E,h,f,m,p,g,y):console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it")}else D?void 0!==r&&r(o,h,m,p,g,y):void 0!==n&&n(o,m,p,g,y,f,h)}},canDrag:function(e){var t=e.schedulerData,r=e.resourceEvents,n=o.resolveDragObjFunc(e);return!t._isResizing()&&t.config.movable&&(void 0===r||!r.groupOnly)&&(void 0===n.movable||!1!==n.movable)}}})),N(this,"getDragCollect",(function(e,t){return{connectDragSource:e.dragSource(),isDragging:t.isDragging(),connectDragPreview:e.dragPreview()}})),N(this,"getDragSource",(function(){return o.dragSource})),this.resolveDragObjFunc=t,this.DecoratedComponent=r,this.dndType=a,this.dragSource=n?(0,M.I)(this.dndType,this.getDragSpec(),this.getDragCollect)(this.DecoratedComponent):this.DecoratedComponent}));function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F.apply(null,arguments)}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function q(e){var t,r,n=e.schedulerData,o=e.headerItem,i=e.left,s=e.top,c=e.height,l=e.closeAction,u=n.config,v=n.localeDayjs,m=o.time,p=o.start,g=o.end,y=o.events,b=(t=(0,a.useState)(new z((function(e){return e.eventItem}),H,n.config.dragAndDropEnabled)),r=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],E=v(new Date(m)).format(u.addMorePopoverHeaderFormat),D=v(new Date(p)),w=v(g),S=b.getDragSource(),I=y.map((function(t,r){if(void 0!==t){var n=v(t.eventItem.start),o=v(t.eventItem.end),i=n>=D,s=o<w,c=12+(r+1)*u.eventItemLineHeight;return a.createElement(S,F({},e,{key:t.eventItem.id,eventItem:t.eventItem,leftIndex:0,isInPopover:!0,isStart:i,isEnd:s,rightIndex:1,left:10,width:138,top:c}))}return null}));return a.createElement("div",{className:"add-more-popover-overlay",style:{left:i,top:s,height:c,width:"170px"}},a.createElement(d.A,{justify:"space-between",align:"middle"},a.createElement(h.A,{span:22},a.createElement("span",{className:"base-text"},E)),a.createElement(h.A,{span:2},a.createElement("button",{type:"button",onClick:function(){return l(void 0)}},a.createElement(f.A,null)))),null==I?void 0:I.filter(Boolean))}q.propTypes={schedulerData:o().object.isRequired,headerItem:o().object.isRequired,left:o().number.isRequired,top:o().number.isRequired,height:o().number.isRequired,closeAction:o().func.isRequired,subtitleGetter:o().func,moveEvent:o().func,eventItemClick:o().func,viewEventClick:o().func,viewEventText:o().string,viewEvent2Click:o().func,viewEvent2Text:o().string,eventItemTemplateResolver:o().func};const B=q;function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G.apply(null,arguments)}function U(e){var t=e.eventItem,r=e.isStart,n=e.isEnd,o=e.eventItemClick,i=e.schedulerData,s=e.eventItemTemplateResolver,c=i.config,l=i.behaviors,u="round-none";r&&n?u="round-all":r?u="round-head":n&&(u="round-tail");var d=t.bgColor||c.defaultEventBgColor,h=l.getEventTextFunc(i,t),f={height:c.eventItemHeight,maxWidth:c.agendaMaxEventWidth,backgroundColor:d},m=a.createElement("div",{className:"".concat(u," event-item"),key:t.id,style:f},a.createElement("span",{style:{marginLeft:"10px",lineHeight:"".concat(c.eventItemHeight,"px")}},h));s&&(m=s(i,t,d,r,n,"event-item",c.eventItemHeight,c.agendaMaxEventWidth));var g=a.createElement("button",{type:"button",className:"day-event txt-btn-dis",onClick:function(){return null==o?void 0:o(i,t)}},m),y=a.createElement(p,G({},e,{title:t.title,startTime:t.start,endTime:t.end,statusColor:d}));return c.eventItemPopoverEnabled?a.createElement(v.A,{placement:"bottomLeft",content:y,trigger:"hover",overlayClassName:"scheduler-agenda-event-popover"},g):a.createElement("span",null,g)}U.propTypes={schedulerData:o().object.isRequired,eventItem:o().object.isRequired,isStart:o().bool.isRequired,isEnd:o().bool.isRequired,subtitleGetter:o().func,eventItemClick:o().func,viewEventClick:o().func,viewEventText:o().string,viewEvent2Click:o().func,viewEvent2Text:o().string,eventItemTemplateResolver:o().func};const X=U;function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V.apply(null,arguments)}function Q(e){var t=e.schedulerData,r=e.resourceEvents,n=e.slotClickedFunc,o=e.slotItemTemplateResolver,i=t.startDate,s=t.endDate,c=t.config,l=t.localeDayjs,u=t.getResourceTableWidth()-2,d=r.headerItems.flatMap((function(t){var r=l(new Date(i)),n=l(s).add(1,"days"),o=l(new Date(t.start)),c=l(new Date(t.end));return r===o&&n===c?t.events.map((function(t){var r=l(new Date(i)),n=l(s).add(1,"days"),o=l(t.eventItem.start)>=r,c=l(t.eventItem.end)<n;return a.createElement(X,V({},e,{key:t.eventItem.id,eventItem:t.eventItem,isStart:o,isEnd:c}))})):[]})),h=n?a.createElement("button",{className:"txt-btn-dis",type:"button",onClick:function(){return n(t,r)}},r.slotName):a.createElement("span",null,r.slotName),f=a.createElement("div",{style:{width:u},title:r.slotTitle||r.slotName,className:"overflow-text header2-text"},h);if(o){var v=o(t,r,n,u,"overflow-text header2-text");v&&(f=v)}return a.createElement("tr",{style:{minHeight:c.eventItemLineHeight+2}},a.createElement("td",{"data-resource-id":r.slotId},f),a.createElement("td",null,a.createElement("div",{className:"day-event-container"},d)))}Q.propTypes={schedulerData:o().object.isRequired,resourceEvents:o().object.isRequired,subtitleGetter:o().func,eventItemClick:o().func,viewEventClick:o().func,viewEventText:o().string,viewEvent2Click:o().func,viewEvent2Text:o().string,slotClickedFunc:o().func,slotItemTemplateResolver:o().func};const $=Q;function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(null,arguments)}function K(e){var t=e.schedulerData,r=t.config,n=t.renderData,o=t.getResourceTableWidth(),i=t.getTableHeaderHeight(),s=t.isEventPerspective?r.taskName:r.resourceName,c=r.agendaViewHeader,l=n.map((function(t){return a.createElement($,J({},e,{resourceEvents:t,key:t.slotId}))}));return a.createElement("tr",null,a.createElement("td",null,a.createElement("table",{className:"scheduler-table"},a.createElement("thead",null,a.createElement("tr",{style:{height:i}},a.createElement("th",{style:{width:o},className:"header3-text"},s),a.createElement("th",{className:"header3-text"},c))),a.createElement("tbody",null,l))))}K.propTypes={schedulerData:o().object.isRequired,subtitleGetter:o().func,eventItemClick:o().func,viewEventClick:o().func,viewEventText:o().string,viewEvent2Click:o().func,viewEvent2Text:o().string,slotClickedFunc:o().func};const Z=K;function ee(e){var t=e.schedulerData,r=t.renderData,n=t.headers,o=t.config,i=t.behaviors,s=t.getContentCellWidth(),c=r.filter((function(e){return e.render})).map((function(e){var r=e.slotId,c=e.groupOnly,l=e.rowHeight,u=n.map((function(e,l){var u="".concat(r,"_").concat(e.time),d=l===n.length-1?{}:{width:s};if(e.nonWorkingTime&&(d.backgroundColor=o.nonWorkingTimeBodyBgColor),c&&(d.backgroundColor=o.groupOnlySlotColor),i.getNonAgendaViewBodyCellBgColorFunc){var h=i.getNonAgendaViewBodyCellBgColorFunc(t,r,e);h&&(d.backgroundColor=h)}return a.createElement("td",{key:u,style:d},a.createElement("div",null))}));return a.createElement("tr",{key:r,style:{height:l}},u)}));return a.createElement("tbody",null,c)}ee.propTypes={schedulerData:o().object.isRequired};const te=ee;var re=r(5425);function ne(e){for(var t=0,r=0,n=e;n;)t+=n.offsetLeft-n.scrollLeft,r+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{x:t,y:r}}function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,le(n.key),n)}}function se(e,t,r){return t&&ie(e.prototype,t),r&&ie(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ce(e,t,r){return(t=le(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function le(e){var t=function(e){if("object"!=oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}var ue=se((function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ce(this,"extractInitialTimes",(function(e,t,r,n,o,a){var i=e.getInitialClientOffset(),c=Math.floor((i.x-t.x)/r),l=n.headerItems[c].start,u=n.headerItems[c].end;return 1!==o&&(u=a(new Date(l)).hour(23).minute(59).second(59).format(s)),{initialStart:l,initialEnd:u}})),ce(this,"getDropSpec",(function(){return{drop:function(e,t,r){var o=e.schedulerData,a=e.resourceEvents,i=o.cellUnit,c=o.localeDayjs,u=t.getItemType(),d=ne(r.eventContainer),h=o.getContentCellWidth(),f=null,v=null;if(u===l){var m=n.extractInitialTimes(t,d,h,a,i,c);f=m.initialStart,v=m.initialEnd}var p=t.getClientOffset(),g=Math.floor((p.x-d.x)/h),y=a.headerItems[g].start,b=a.headerItems[g].end;return 1!==i&&(b=c(new Date(a.headerItems[g].start)).hour(23).minute(59).second(59).format(s)),{slotId:a.slotId,slotName:a.slotName,start:y,end:b,initialStart:f,initialEnd:v}},hover:function(e,t,r){var o=e.schedulerData,a=e.resourceEvents,i=e.movingEvent,u=o.cellUnit,d=o.config,h=o.viewType,f=o.localeDayjs;n.config=d;var v=t.getItem(),m=t.getItemType(),p=ne(r.eventContainer),g=o.getContentCellWidth(),y=null;m===l&&(y=n.extractInitialTimes(t,p,g,a,u,f).initialStart);var b=t.getClientOffset(),E=Math.floor((b.x-p.x)/g);if(a.headerItems[E]){var D=a.headerItems[E].start,w=a.headerItems[E].end;1!==u&&(w=f(new Date(a.headerItems[E].start)).hour(23).minute(59).second(59).format(s));var S=a.slotId,I=a.slotName,T="New";if(m===l){var k=v;if(d.relativeMove)D=f(k.start).add(f(D).diff(f(new Date(y))),"ms").format(s);else if(h!==c.Day){var C=f(D);D=f(k.start).year(C.year()).month(C.month()).date(C.date()).format(s)}if(w=f(D).add(f(k.end).diff(f(k.start)),"ms").format(s),!1===d.crossResourceMove){S=o._getEventSlotId(v),I=void 0;var R=o.getSlotById(S);R&&(I=R.name)}T="Move"}i&&i(o,S,I,D,w,T,m,v)}},canDrop:function(e,t){var r=e.schedulerData,n=e.resourceEvents,o=t.getItem();return!r._isResizing()&&r.config.movable&&!n.groupOnly&&(void 0===o.movable||!1!==o.movable)}}})),ce(this,"getDropCollect",(function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}})),ce(this,"getDropTarget",(function(e){return e?(0,re.T)(function(e){if(Array.isArray(e))return ae(e)}(t=n.sourceMap.keys())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return ae(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ae(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n.getDropSpec(),n.getDropCollect)(n.DecoratedComponent):n.DecoratedComponent;var t})),ce(this,"getDndSource",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;return n.sourceMap.get(e)})),this.sourceMap=new Map,t.forEach((function(e){n.sourceMap.set(e.dndType,e)})),this.DecoratedComponent=r}));function de(e){var t=e.schedulerData,r=e.number,n=e.left,o=e.width,i=e.top,s=e.clickAction,c=e.headerItem,l=t.config,u="+".concat(r," more");return a.createElement("button",{type:"button",className:"timeline-event",style:{left:n,width:o,top:i},onClick:function(){return s(c)}},a.createElement("div",{style:{height:l.eventItemHeight,color:"#999",textAlign:"center"}},u))}de.propTypes={schedulerData:o().object.isRequired,number:o().number.isRequired,left:o().number.isRequired,width:o().number.isRequired,top:o().number.isRequired,clickAction:o().func.isRequired,headerItem:o().object.isRequired};const he=de;function fe(e){var t={left:e.left,width:e.width,top:0,bottom:0,backgroundColor:e.schedulerData.config.selectedAreaColor};return a.createElement("div",{className:"selected-area",style:t})}fe.propTypes={schedulerData:o().object.isRequired,left:o().number.isRequired,width:o().number.isRequired};const ve=fe;function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e,t,r){return(t=function(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e){var t=e.schedulerData,r=e.summary,n=e.left,o=e.width,i=e.top,s=t.config,c=void 0!==r.color?r.color:s.summaryColor,l="center";1===s.summaryPos||4===s.summaryPos?l="right":2!==s.summaryPos&&5!==s.summaryPos||(l="left");var u=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(r),!0).forEach((function(t){ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({height:s.eventItemHeight,color:c,textAlign:l,marginLeft:"6px",marginRight:"6px"},void 0!==r.fontSize?{fontSize:r.fontSize}:{});return a.createElement("div",{className:"timeline-event header2-text",style:{left:n,width:o,top:i,cursor:"default"}},a.createElement("div",{style:u},r.text))}ye.propTypes={schedulerData:o().object.isRequired,summary:o().object.isRequired,left:o().number.isRequired,width:o().number.isRequired,top:o().number.isRequired};const be=ye;function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},De.apply(null,arguments)}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Se(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,je(n.key),n)}}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Te=function(){return!!e})()}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}function Re(e,t,r){return(t=je(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function je(e){var t=function(e){if("object"!=Ee(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(t)?t:t+""}var Oe=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Re(r=function(e,t,r){return t=ke(t),function(e,t){if(t&&("object"==Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Te()?Reflect.construct(t,r||[],ke(e).constructor):t.apply(e,r))}(this,t,[e]),"supportTouchHelper",(function(){var e="add"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add")?r.eventContainer.addEventListener:r.eventContainer.removeEventListener;r.supportTouch||e("mousedown",r.initDrag,!1)})),Re(r,"initDrag",(function(e){if(!r.state.isSelecting&&(e.srcElement||e.target)===r.eventContainer&&(e.stopPropagation(),!r.props.resourceEvents.groupOnly)){var t=we(r.dragHelper(e,"init"),2),n=t[0];if(!t[1]){var o=r.props.schedulerData.getContentCellWidth(),a=n-ne(r.eventContainer).x,i=Math.floor(a/o),s=i*o,c=Math.ceil(a/o),l=(c-i)*o;r.setState({startX:a,left:s,leftIndex:i,width:l,rightIndex:c,isSelecting:!0}),r.supportTouch?(document.documentElement.addEventListener("touchmove",r.doDrag,!1),document.documentElement.addEventListener("touchend",r.stopDrag,!1),document.documentElement.addEventListener("touchcancel",r.cancelDrag,!1)):(document.documentElement.addEventListener("mousemove",r.doDrag,!1),document.documentElement.addEventListener("mouseup",r.stopDrag,!1)),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1}}}})),Re(r,"doDrag",(function(e){e.stopPropagation();var t=we(r.dragHelper(e,"do"),2),n=t[0];if(!t[1]){var o=r.state.startX,a=r.props.schedulerData,i=a.headers,s=a.getContentCellWidth(),c=n-ne(r.eventContainer).x,l=Math.floor(Math.min(o,c)/s),u=(l=l<0?0:l)*s,d=Math.ceil(Math.max(o,c)/s),h=((d=d>i.length?i.length:d)-l)*s;r.setState({leftIndex:l,left:u,rightIndex:d,width:h,isSelecting:!0})}})),Re(r,"dragHelper",(function(e,t){var n=0;if(r.supportTouch){if(0===e.changedTouches.length)return[n,!0];n=e.changedTouches[0].pageX}else if("init"===t){if(void 0!==e.buttons&&1!==e.buttons)return[n,!0];n=e.clientX}else n=e.clientX;return[n,!1]})),Re(r,"stopDrag",(function(e){e.stopPropagation();var t=r.props,n=t.schedulerData,o=t.newEvent,a=t.resourceEvents,i=n.headers,c=n.events,u=n.config,d=n.cellUnit,h=n.localeDayjs,f=r.state,v=f.leftIndex,m=f.rightIndex;r.supportTouch?(document.documentElement.removeEventListener("touchmove",r.doDrag,!1),document.documentElement.removeEventListener("touchend",r.stopDrag,!1),document.documentElement.removeEventListener("touchcancel",r.cancelDrag,!1)):(document.documentElement.removeEventListener("mousemove",r.doDrag,!1),document.documentElement.removeEventListener("mouseup",r.stopDrag,!1)),document.onselectstart=null,document.ondragstart=null;var p=i[v].time,g=a.headerItems[m-1].end;1!==d&&(g=h(new Date(a.headerItems[m-1].start)).hour(23).minute(59).second(59).format(s));var y=a.slotId,b=a.slotName;r.setState({startX:0,leftIndex:0,left:0,rightIndex:0,width:0,isSelecting:!1});var E=!1;if(u.checkConflict){var D=h(new Date(p)),w=h(g);c.forEach((function(e){if(n._getEventSlotId(e)===y){var t=h(e.start),r=h(e.end);(D>=t&&D<r||w>t&&w<=r||t>=D&&t<w||r>D&&r<=w)&&(E=!0)}}))}if(E){var S=r.props.conflictOccurred;void 0!==S?S(n,"New",{id:void 0,start:p,end:g,slotId:y,slotName:b,title:void 0},l,y,b,p,g):console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it")}else void 0!==o&&o(n,y,b,p,g)})),Re(r,"cancelDrag",(function(e){e.stopPropagation(),r.state.isSelecting&&(document.documentElement.removeEventListener("touchmove",r.doDrag,!1),document.documentElement.removeEventListener("touchend",r.stopDrag,!1),document.documentElement.removeEventListener("touchcancel",r.cancelDrag,!1),document.onselectstart=null,document.ondragstart=null,r.setState({startX:0,leftIndex:0,left:0,rightIndex:0,width:0,isSelecting:!1}))})),Re(r,"onAddMoreClick",(function(e){var t=r.props,n=t.onSetAddMoreState,o=t.resourceEvents,a=t.schedulerData;if(n){var i=a.config,s=a.getContentCellWidth(),c=o.headerItems.indexOf(e);if(-1!==c){var l=c*(s-1),u=ne(r.eventContainer);n({headerItem:e,left:l+=u.x,top:u.y,height:(e.count+1)*i.eventItemLineHeight+20})}}})),Re(r,"eventContainerRef",(function(e){r.eventContainer=e})),r.state={isSelecting:!1,left:0,width:0},r.supportTouch=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(t,e),r=t,(n=[{key:"componentDidMount",value:function(){var e=this.props.schedulerData.config;this.supportTouch="ontouchstart"in window,!0===e.creatable&&this.supportTouchHelper()}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t=this.props.schedulerData;this.supportTouchHelper("remove"),t.config.creatable&&this.supportTouchHelper()}}},{key:"render",value:function(){var e=this,t=this.props,r=t.resourceEvents,n=t.schedulerData,o=t.connectDropTarget,i=t.dndSource,s=n.cellUnit,c=n.startDate,l=n.endDate,u=n.config,d=n.localeDayjs,h=this.state,f=h.isSelecting,v=h.left,m=h.width,p=n.getContentCellWidth(),g=n.getCellMaxEvents(),y=n.getContentTableWidth(),b=i.getDragSource(),E=f?a.createElement(ve,De({},this.props,{left:v,width:m})):a.createElement("div",null),D=[];r.headerItems.forEach((function(t,o){if(t.count>0||void 0!==t.summary){var i=1===u.summaryPos||0===u.summaryPos||2===u.summaryPos,h=r.hasSummary&&i?1+u.eventItemLineHeight:1,f=0===t.addMore?g:t.addMoreIndex;if(t.events.forEach((function(t,r){if(r<f&&void 0!==t&&t.render){var n=d(new Date(c)),i=d(l);1===s&&(n=d(new Date(c)).add(u.dayStartFrom,"hours"),i=d(l).add(u.dayStopTo+1,"hours"));var v=d(t.eventItem.start)>=n,m=d(t.eventItem.end)<=i,g=o*p+(o>0?2:3),y=t.span*p-(o>0?5:6)>0?t.span*p-(o>0?5:6):0,E=h+r*u.eventItemLineHeight,w=a.createElement(b,De({},e.props,{key:t.eventItem.id,eventItem:t.eventItem,isStart:v,isEnd:m,isInPopover:!1,left:g,width:y,top:E,leftIndex:o,rightIndex:o+t.span}));D.push(w)}})),t.addMore>0){var v=o*p+(o>0?2:3),m=p-(o>0?5:6),y=h+t.addMoreIndex*u.eventItemLineHeight,E=a.createElement(he,De({},e.props,{key:t.time,headerItem:t,number:t.addMore,left:v,width:m,top:y,clickAction:e.onAddMoreClick}));D.push(E)}if(void 0!==t.summary){var w=i?1:r.rowHeight-u.eventItemLineHeight+1,S=o*p+(o>0?2:3),I=p-(o>0?5:6),T="".concat(r.slotId,"_").concat(t.time),k=a.createElement(be,{key:T,schedulerData:n,summary:t.summary,left:S,width:I,top:w});D.push(k)}}}));var w=a.createElement("div",{ref:this.eventContainerRef,className:"event-container",style:{height:r.rowHeight}},E,D);return a.createElement("tr",null,a.createElement("td",{style:{width:y}},u.dragAndDropEnabled?o(w):w))}}])&&Ie(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(a.Component);Re(Oe,"propTypes",{resourceEvents:n.PropTypes.object.isRequired,schedulerData:n.PropTypes.object.isRequired,dndSource:n.PropTypes.object.isRequired,onSetAddMoreState:n.PropTypes.func,updateEventStart:n.PropTypes.func,updateEventEnd:n.PropTypes.func,moveEvent:n.PropTypes.func,movingEvent:n.PropTypes.func,conflictOccurred:n.PropTypes.func,subtitleGetter:n.PropTypes.func,eventItemClick:n.PropTypes.func,viewEventClick:n.PropTypes.func,viewEventText:n.PropTypes.string,viewEvent2Click:n.PropTypes.func,viewEvent2Text:n.PropTypes.string,newEvent:n.PropTypes.func,eventItemTemplateResolver:n.PropTypes.func});const Pe=Oe;var xe=r(5765),He=r(5140);function Me(e){var t=e.schedulerData,r=e.contentScrollbarHeight,n=e.slotClickedFunc,o=e.slotItemTemplateResolver,i=e.toggleExpandFunc,s=t.renderData,c=t.getResourceTableWidth()-2,l=r,u=s.filter((function(e){return e.render})),d=u.map((function(e){for(var r=[],s=0;s<e.indent;s+=1)r.push(a.createElement("span",{key:"es".concat(s),className:"expander-space"}));return function(e,r){var s=a.createElement("span",{key:"es".concat(e.indent),className:"expander-space"}),l={key:"es".concat(e.indent),onClick:function(){return function(e){i&&i(t,e.slotId)}(e)}};e.hasChildren&&(s=e.expanded?a.createElement(xe.A,l):a.createElement(He.A,l)),r.push(s);var u=n?a.createElement("span",{className:"slot-cell"},r,a.createElement("button",{type:"button",style:{cursor:"pointer"},className:"slot-text txt-btn-dis",onClick:function(){return n(t,e)}},e.slotName)):a.createElement("span",{className:"slot-cell"},r,a.createElement("button",{type:"button",className:"slot-text txt-btn-dis",style:{cursor:void 0===n?void 0:"pointer"}},e.slotName)),d=a.createElement("div",{title:e.slotTitle||e.slotName,className:"overflow-text header2-text",style:{textAlign:"left"}},u);if(o){var h=o(t,e,n,c,"overflow-text header2-text");h&&(d=h)}var f={height:e.rowHeight,backgroundColor:e.groupOnly?t.config.groupOnlySlotColor:void 0};return a.createElement("tr",{key:e.slotId},a.createElement("td",{"data-resource-id":e.slotId,style:f},d))}(e,r)}));return a.createElement("div",{style:{paddingBottom:l}},a.createElement("table",{className:"resource-table"},a.createElement("tbody",null,d)))}Me.propTypes={schedulerData:o().object.isRequired,contentScrollbarHeight:o().number.isRequired,slotClickedFunc:o().func,slotItemTemplateResolver:o().func,toggleExpandFunc:o().func};const We=Me;var Ae=r(4353),_e=r.n(Ae),Ne=r(1816),Le=r.n(Ne),ze=r(3826),Fe=r.n(ze),Ye=r(6986),qe=r.n(Ye),Be=r(1786);const Ge={schedulerWidth:"100%",besidesWidth:20,underneathHeight:20,schedulerMaxHeight:0,tableHeaderHeight:40,schedulerContentHeight:"500px",responsiveByParent:!1,agendaResourceTableWidth:160,agendaMaxEventWidth:100,dayResourceTableWidth:160,weekResourceTableWidth:"16%",monthResourceTableWidth:160,quarterResourceTableWidth:160,yearResourceTableWidth:160,customResourceTableWidth:160,dayCellWidth:30,weekCellWidth:"12%",monthCellWidth:80,quarterCellWidth:80,yearCellWidth:80,customCellWidth:80,dayMaxEvents:99,weekMaxEvents:99,monthMaxEvents:99,quarterMaxEvents:99,yearMaxEvents:99,customMaxEvents:99,eventItemPopoverTrigger:"hover",eventItemPopoverPlacement:"bottomLeft",eventItemPopoverWidth:300,eventItemHeight:22,eventItemLineHeight:24,nonAgendaSlotMinHeight:0,dayStartFrom:0,dayStopTo:23,defaultEventBgColor:"#80C5F6",selectedAreaColor:"#7EC2F3",nonWorkingTimeHeadColor:"#999999",nonWorkingTimeHeadBgColor:"#fff0f6",nonWorkingTimeBodyBgColor:"#fff0f6",summaryColor:"#666",summaryPos:1,groupOnlySlotColor:"#F8F8F8",startResizable:!0,endResizable:!0,movable:!0,creatable:!0,crossResourceMove:!0,checkConflict:!1,scrollToSpecialDayjsEnabled:!0,eventItemPopoverEnabled:!0,eventItemPopoverShowColor:!0,calendarPopoverEnabled:!0,recurringEventsEnabled:!0,viewChangeSpinEnabled:!0,dateChangeSpinEnabled:!0,headerEnabled:!0,resourceViewEnabled:!0,displayWeekend:!0,relativeMove:!0,defaultExpanded:!0,dragAndDropEnabled:!0,schedulerHeaderEventsFuncsTimeoutMs:100,resourceName:"Resource Name",taskName:"Task Name",agendaViewHeader:"Agenda",addMorePopoverHeaderFormat:"MMM D, YYYY dddd",eventItemPopoverDateFormat:"MMM D",nonAgendaDayCellHeaderFormat:"ha",nonAgendaWeekCellHeaderFormat:"ww/YYYY",nonAgendaMonthCellHeaderFormat:"MMM YYYY",nonAgendaYearCellHeaderFormat:"YYYY",nonAgendaOtherCellHeaderFormat:"ddd M/D",minuteStep:30,views:[{viewName:"Day",viewType:c.Day,showAgenda:!1,isEventPerspective:!1},{viewName:"Week",viewType:c.Week,showAgenda:!1,isEventPerspective:!1},{viewName:"Month",viewType:c.Month,showAgenda:!1,isEventPerspective:!1},{viewName:"Quarter",viewType:c.Quarter,showAgenda:!1,isEventPerspective:!1},{viewName:"Year",viewType:c.Year,showAgenda:!1,isEventPerspective:!1}]},Ue={getSummaryFunc:void 0,getCustomDateFunc:void 0,getNonAgendaViewBodyCellBgColorFunc:void 0,getScrollSpecialDayjsFunc:function(e){return(0,e.localeDayjs)(new Date)},getDateLabelFunc:function(e,t,r,n){var o=e.localeDayjs,a=o(new Date(r)),i=o(n),s="";return t===c.Week||a!==i&&(t===c.Custom||t===c.Custom1||t===c.Custom2)?(s="".concat(a.format("MMM D"),"-").concat(i.format("D, YYYY")),a.month()!==i.month()&&(s="".concat(a.format("MMM D"),"-").concat(i.format("MMM D, YYYY"))),a.year()!==i.year()&&(s="".concat(a.format("MMM D, YYYY"),"-").concat(i.format("MMM D, YYYY")))):s=t===c.Month?a.format("MMMM YYYY"):t===c.Quarter?"".concat(a.format("MMM D"),"-").concat(i.format("MMM D, YYYY")):t===c.Year?a.format("YYYY"):a.format("MMM D, YYYY"),s},getEventTextFunc:function(e,t){var r;return e.isEventPerspective&&(null===(r=e.resources.find((function(e){return e.id===t.resourceId})))||void 0===r?void 0:r.name)||t.title},isNonWorkingTimeFunc:function(e,t){var r=e.localeDayjs;if(1===e.cellUnit){var n=r(new Date(t)).hour();return n<9||n>18}var o=r(new Date(t)).day();return 0===o||6===o}};function Xe(e){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(e)}function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){$e(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $e(e,t,r){return(t=Ke(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Je(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ke(n.key),n)}}function Ke(e){var t=function(e){if("object"!=Xe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xe(t)?t:t+""}var Ze=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e()(),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.Week,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resources=[],this.events=[],this.eventGroups=[],this.eventGroupsAutoGenerated=!0,this.viewType=r,this.cellUnit=r===c.Day?1:0,this.showAgenda=n,this.isEventPerspective=o,this.resizing=!1,this.scrollToSpecialDayjs=!1,this.documentWidth=0,this.documentHeight=0,this.schedulerHeaderHeight=0,this._shouldReloadViewType=!1,this.calendarPopoverLocale=void 0,_e().extend(Le()),_e().extend(qe()),_e().extend(Fe()),this.localeDayjs=_e(),this.config=void 0===a?Ge:Qe(Qe({},Ge),a),this._validateMinuteStep(this.config.minuteStep),this.behaviors=void 0===i?Ue:Qe(Qe({},Ue),i),this._resolveDate(0,t),this._createHeaders(),this._createRenderData()},t=[{key:"setSchedulerLocale",value:function(e){e&&(this.localeDayjs.locale(e),this._shouldReloadViewType=!0,this.setViewType(this.viewType,this.showAgenda,this.isEventPerspective))}},{key:"setCalendarPopoverLocale",value:function(e){e&&(this.calendarPopoverLocale=e)}},{key:"setResources",value:function(e){this._validateResource(e),this.resources=Array.from(new Set(e)),this._createRenderData(),this.setScrollToSpecialDayjs(!0)}},{key:"setEventGroupsAutoGenerated",value:function(e){this.eventGroupsAutoGenerated=e}},{key:"setEventGroups",value:function(e){this._validateEventGroups(e),this.eventGroups=Array.from(new Set(e)),this.eventGroupsAutoGenerated=!1,this._createRenderData(),this.setScrollToSpecialDayjs(!0)}},{key:"setMinuteStep",value:function(e){this.config.minuteStep!==e&&(this._validateMinuteStep(e),this.config.minuteStep=e,this._createHeaders(),this._createRenderData())}},{key:"setBesidesWidth",value:function(e){e>=0&&(this.config.besidesWidth=e)}},{key:"setUnderneathHeight",value:function(e){e>=0&&(this.config.underneathHeight=e)}},{key:"getMinuteStepsInHour",value:function(){return 60/this.config.minuteStep}},{key:"addResource",value:function(e){0===this.resources.filter((function(t){return t.id===e.id})).length&&(this.resources.push(e),this._createRenderData())}},{key:"addEventGroup",value:function(e){0===this.eventGroups.filter((function(t){return t.id===e.id})).length&&(this.eventGroups.push(e),this._createRenderData())}},{key:"removeEventGroupById",value:function(e){var t=-1;this.eventGroups.forEach((function(r,n){r.id===e&&(t=n)})),-1!==t&&this.eventGroups.splice(t,1)}},{key:"containsEventGroupId",value:function(e){var t=-1;return this.eventGroups.forEach((function(r,n){r.id===e&&(t=n)})),-1!==t}},{key:"setEvents",value:function(e){this._validateEvents(e),this.events=Array.from(e),this.eventGroupsAutoGenerated&&this._generateEventGroups(),this.config.recurringEventsEnabled&&this._handleRecurringEvents(),this._createRenderData()}},{key:"setScrollToSpecialDayjs",value:function(e){this.config.scrollToSpecialDayjsEnabled&&(this.scrollToSpecialDayjs=e)}},{key:"prev",value:function(){this._resolveDate(-1),this.events=[],this._createHeaders(),this._createRenderData()}},{key:"next",value:function(){this._resolveDate(1),this.events=[],this._createHeaders(),this._createRenderData()}},{key:"setDate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_e()(new Date);this._resolveDate(0,e),this.events=[],this._createHeaders(),this._createRenderData()}},{key:"setViewType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.Week,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.showAgenda=t,this.isEventPerspective=r,this.cellUnit=0,this.viewType!==e||this._shouldReloadViewType){var n=this.startDate;if(e===c.Custom||e===c.Custom1||e===c.Custom2)this.viewType=e,this._resolveDate(0,n);else{if(this.viewType<e)e===c.Week?(this.startDate=this.localeDayjs(new Date(n)).startOf("week"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("week")):e===c.Month?(this.startDate=this.localeDayjs(new Date(n)).startOf("month"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("month")):e===c.Quarter?(this.startDate=this.localeDayjs(new Date(n)).startOf("quarter"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("quarter")):e===c.Year&&(this.startDate=this.localeDayjs(new Date(n)).startOf("year"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("year"));else{var o=this.localeDayjs(new Date(this.startDate)),a=this.localeDayjs(new Date(this.endDate)).add(1,"days");if(void 0!==this.selectDate){var i=this.localeDayjs(new Date(this.selectDate));i>=o&&i<a&&(n=this.selectDate)}var s=this.localeDayjs();s>=o&&s<a&&(n=s.startOf("day")),e===c.Day?(this.startDate=n,this.endDate=this.startDate,this.cellUnit=1):e===c.Week?(this.startDate=this.localeDayjs(new Date(n)).startOf("week"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("week")):e===c.Month?(this.startDate=this.localeDayjs(new Date(n)).startOf("month"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("month")):e===c.Quarter&&(this.startDate=this.localeDayjs(new Date(n)).startOf("quarter"),this.endDate=this.localeDayjs(new Date(this.startDate)).endOf("quarter"))}this.viewType=e}this._shouldReloadViewType=!1,this.events=[],this._createHeaders(),this._createRenderData(),this.setScrollToSpecialDayjs(!0)}}},{key:"setSchedulerMaxHeight",value:function(e){this.config.schedulerMaxHeight=e}},{key:"isSchedulerResponsive",value:function(){return!!this.config.schedulerWidth.endsWith&&this.config.schedulerWidth.endsWith("%")}},{key:"toggleExpandStatus",value:function(e){var t=!1,r=-1,n=!1,o=new Map;this.renderData.forEach((function(a){if(!1===t)a.slotId===e&&a.hasChildren&&(t=!0,n=!a.expanded,a.expanded=n,r=a.indent,o.set(a.indent,{expanded:a.expanded,render:a.render}));else if(a.indent>r){var i=o.get(a.indent-1);a.render=i.expanded&&i.render,a.hasChildren&&o.set(a.indent,{expanded:a.expanded,render:a.render})}else t=!1}))}},{key:"isResourceViewResponsive",value:function(){var e=this.getResourceTableConfigWidth();return!!e.endsWith&&e.endsWith("%")}},{key:"isContentViewResponsive",value:function(){var e=this.getContentCellConfigWidth();return!!e.endsWith&&e.endsWith("%")}},{key:"getSchedulerWidth",value:function(){var e=this.documentWidth-this.config.besidesWidth>0?this.documentWidth-this.config.besidesWidth:0;return this.isSchedulerResponsive()?parseInt(e*Number(this.config.schedulerWidth.slice(0,-1))/100,10):this.config.schedulerWidth}},{key:"getSchedulerHeight",value:function(){var e=this.schedulerHeaderHeight||0,t=this.documentHeight-e-this.config.tableHeaderHeight-(this.config.underneathHeight||0),r=t>0?t:0;return this.isSchedulerResponsive()&&this.config.schedulerHeight&&this.config.schedulerHeight.endsWith&&this.config.schedulerHeight.endsWith("%")?parseInt(r*Number(this.config.schedulerHeight.slice(0,-1))/100,10):this.config.setSchedulerMaxHeight||r}},{key:"getResourceTableWidth",value:function(){var e=this.getResourceTableConfigWidth(),t=this.getSchedulerWidth(),r=this.isResourceViewResponsive()?parseInt(t*Number(e.slice(0,-1))/100,10):e;return this.isSchedulerResponsive()&&this.getContentTableWidth()+r<t&&(r=t-this.getContentTableWidth()),r}},{key:"getContentCellWidth",value:function(){var e=this.getContentCellConfigWidth(),t=this.getSchedulerWidth();return this.isContentViewResponsive()?parseInt(t*Number(e.slice(0,-1))/100,10):e}},{key:"getContentTableWidth",value:function(){return this.headers.length*this.getContentCellWidth()}},{key:"getScrollToSpecialDayjs",value:function(){return!!this.config.scrollToSpecialDayjsEnabled&&this.scrollToSpecialDayjs}},{key:"getSlots",value:function(){return this.isEventPerspective?this.eventGroups:this.resources}},{key:"getSlotById",value:function(e){var t;return this.getSlots().forEach((function(r){r.id===e&&(t=r)})),t}},{key:"getResourceById",value:function(e){var t;return this.resources.forEach((function(r){r.id===e&&(t=r)})),t}},{key:"getTableHeaderHeight",value:function(){return this.config.tableHeaderHeight}},{key:"getSchedulerContentDesiredHeight",value:function(){var e=0;return this.renderData.forEach((function(t){t.render&&(e+=t.rowHeight)})),e}},{key:"getCellMaxEvents",value:function(){var e=$e($e($e($e($e({},c.Week,"weekMaxEvents"),c.Day,"dayMaxEvents"),c.Month,"monthMaxEvents"),c.Year,"yearMaxEvents"),c.Quarter,"quarterMaxEvents")[this.viewType]||"customMaxEvents";return this.config[e]}},{key:"getCalendarPopoverLocale",value:function(){return this.calendarPopoverLocale}},{key:"getSelectedDate",value:function(){return this.selectDate.format(i)}},{key:"getViewStartDate",value:function(){return this.startDate}},{key:"getViewEndDate",value:function(){return this.endDate}},{key:"getViewDates",value:function(){return{startDate:this.startDate,endDate:this.endDate}}},{key:"getDateLabel",value:function(){var e=this.localeDayjs(new Date(this.startDate)),t=this.localeDayjs(new Date(this.endDate)),r=e.format("LL");return e!==t&&(r="".concat(e.format("LL"),"-").concat(t.format("LL"))),this.behaviors.getDateLabelFunc&&(r=this.behaviors.getDateLabelFunc(this,this.viewType,this.startDate,this.endDate)),r}},{key:"addEvent",value:function(e){this._attachEvent(e),this.eventGroupsAutoGenerated&&this._generateEventGroups(),this._createRenderData()}},{key:"updateEventStart",value:function(e,t){this._detachEvent(e),e.start=t,this._attachEvent(e),this._createRenderData()}},{key:"updateEventEnd",value:function(e,t){e.end=t,this._createRenderData()}},{key:"swapEvent",value:function(e,t){if(this.isEventPerspective){var r=[t.groupId,e.groupId];e.groupId=r[0],t.groupId=r[1];var n=[t.groupName,e.groupName];e.groupName=n[0],t.groupName=n[1]}else{var o=[t.resourceId,e.resourceId];e.resourceId=o[0],t.resourceId=o[1]}var a=[t.start,e.start];e.start=a[0],t.start=a[1];var i=[t.end,e.end];e.end=i[0],t.end=i[1],this._detachEvent(e),this._detachEvent(t),this._attachEvent(e),this._attachEvent(t),this._createRenderData()}},{key:"swapEvent2",value:function(e,t){var r=Qe({},e),n=Qe({},t);this._detachEvent(e),this._detachEvent(t),this.isEventPerspective?(r.groupId=t.groupId,r.groupName=t.groupName,n.groupId=e.groupId,n.groupName=e.groupName):(r.resourceId=t.resourceId,n.resourceId=e.resourceId),r.end=t.end,r.start=t.start,n.end=e.end,n.start=e.start,this._attachEvent(r),this._attachEvent(n),this._createRenderData()}},{key:"moveEvent",value:function(e,t,r,n,o){this._detachEvent(e),this.isEventPerspective?(e.groupId=t,e.groupName=r):e.resourceId=t,e.end=o,e.start=n,this._attachEvent(e),this._createRenderData()}},{key:"isEventInTimeWindow",value:function(e,t,r,n){return e<n&&t>r}},{key:"removeEvent",value:function(e){var t=this.events.indexOf(e);-1!==t&&(this.events.splice(t,1),this._createRenderData())}},{key:"removeEventById",value:function(e){var t=-1;this.events.forEach((function(r,n){r.id===e&&(t=n)})),-1!==t&&(this.events.splice(t,1),this._createRenderData())}},{key:"getResourceTableConfigWidth",value:function(){if(this.showAgenda)return this.config.agendaResourceTableWidth;var e=$e($e($e($e($e({},c.Week,"weekResourceTableWidth"),c.Day,"dayResourceTableWidth"),c.Month,"monthResourceTableWidth"),c.Year,"yearResourceTableWidth"),c.Quarter,"quarterResourceTableWidth")[this.viewType]||"customResourceTableWidth";return this.config[e]}},{key:"getContentCellConfigWidth",value:function(){var e=$e($e($e($e($e({},c.Week,"weekCellWidth"),c.Day,"dayCellWidth"),c.Month,"monthCellWidth"),c.Year,"yearCellWidth"),c.Quarter,"quarterCellWidth")[this.viewType]||"customCellWidth";return this.config[e]}},{key:"_setDocumentWidth",value:function(e){e>=0&&(this.documentWidth=e)}},{key:"_setDocumentHeight",value:function(e){e>=0&&(this.documentHeight=e)}},{key:"_setSchedulerHeaderHeight",value:function(e){e>=0&&(this.schedulerHeaderHeight=e)}},{key:"_detachEvent",value:function(e){var t=this.events.indexOf(e);-1!==t&&this.events.splice(t,1)}},{key:"_attachEvent",value:function(e){var t=this,r=0,n=this.localeDayjs(new Date(e.start));this.events.forEach((function(e,o){var a=t.localeDayjs(new Date(e.start));n>=a&&(r=o+1)})),this.events.splice(r,0,e)}},{key:"_handleRecurringEvents",value:function(){var e=this,t=this.events.filter((function(e){return!!e.rrule}));t.forEach((function(t){e._detachEvent(t)})),t.forEach((function(t){var r,n=e.startDate,o=e.endDate.add(1,"days"),a=e.localeDayjs(new Date(t.start)),i=e.localeDayjs(new Date(t.end)),c=(0,Be.YI)(t.rrule),l=c.origOptions.until||o.toDate();if(c.origOptions.dtstart&&(r=e.localeDayjs(new Date(c.origOptions.dtstart))),o<l&&(c.origOptions.until=o.toDate()),c=(0,Be.YI)(c.toString()),t.exdates||t.exrule){var u=new Be.Dz;u.rrule(c),t.exrule&&u.exrule((0,Be.YI)(t.exrule)),t.exdates&&t.exdates.forEach((function(t){u.exdate(e.localeDayjs(t).toDate())})),c=u}c.between(new Date(n),new Date(o)).forEach((function(u,d){var h=Qe(Qe({},t),{},{recurringEventId:t.id,recurringEventStart:t.start,recurringEventEnd:t.end,id:"".concat(t.id,"-").concat(d),start:c.origOptions.tzid?e.localeDayjs.utc(u).utcOffset(e.localeDayjs(new Date).utcOffset(),!0).format(s):e.localeDayjs(new Date(u)).format(s),end:c.origOptions.tzid?e.localeDayjs.utc(u).utcOffset(e.localeDayjs(new Date).utcOffset(),!0).add(i.diff(a),"ms").add(e.localeDayjs(new Date(l)).utcOffset()-e.localeDayjs(new Date(t.start)).utcOffset(),"m").format(s):e.localeDayjs(new Date(u)).add(i.diff(a),"ms").format(s)}),f=e.localeDayjs(h.start),v=e.localeDayjs(h.end);e.isEventInTimeWindow(f,v,n,o)&&(!r||f>=r)&&e._attachEvent(h)}))}))}},{key:"_resolveDate",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;void 0!==r&&(this.selectDate=this.localeDayjs(r));var n=function(n){t.startDate=void 0!==r?t.selectDate.startOf(n):t.startDate.add(e,"".concat(n,"s")),t.endDate=t.startDate.endOf(n)};switch(this.viewType){case c.Week:n("week");break;case c.Day:this.startDate=void 0!==r?this.selectDate:this.startDate.add(e,"days"),this.endDate=this.startDate;break;case c.Month:n("month");break;case c.Quarter:n("quarter");break;case c.Year:n("year");break;case c.Custom:case c.Custom1:case c.Custom2:if(void 0===this.behaviors.getCustomDateFunc)throw new Error("This is a custom view type, set behaviors.getCustomDateFunc func to resolve the time window (startDate and endDate) yourself");var o=this.behaviors.getCustomDateFunc(this,e,r);this.startDate=this.localeDayjs(o.startDate),this.endDate=this.localeDayjs(o.endDate),o.cellUnit&&(this.cellUnit=o.cellUnit)}}},{key:"_createHeaders",value:function(){var e=[],t=this.localeDayjs(new Date(this.startDate)),r=this.localeDayjs(new Date(this.endDate)),n=t;if(this.showAgenda)e.push({time:n.format(s),nonWorkingTime:!1});else if(1===this.cellUnit){0===t.hour()&&(t=t.add(this.config.dayStartFrom,"hours")),0===r.hour()&&(r=r.add(this.config.dayStopTo,"hours")),n=t;for(var o=-1;n>=t&&n<=r;)if(n.hour()!==o){o=n.hour();for(var a=this.getMinuteStepsInHour(),c=0;c<a;c+=1){var l=n.hour();if(l>=this.config.dayStartFrom&&l<=this.config.dayStopTo){var u=n.format(s),d=this.behaviors.isNonWorkingTimeFunc(this,u);e.push({time:u,nonWorkingTime:d})}n=n.add(this.config.minuteStep,"minutes")}}else n=n.add(1,"hours")}else if(0===this.cellUnit)for(;n>=t&&n<=r;){var h=n.format(s),f=n.day();if(this.config.displayWeekend||0!==f&&6!==f){var v=this.behaviors.isNonWorkingTimeFunc(this,h);e.push({time:h,nonWorkingTime:v})}n=n.add(1,"days")}else if(2===this.cellUnit)for(;n>=t&&n<=r;){var m=n.format(i);e.push({time:m}),n=n.add(1,"weeks").startOf("week")}else if(3===this.cellUnit)for(;n>=t&&n<=r;){var p=n.format(i);e.push({time:p}),n=n.add(1,"months").startOf("month")}else if(4===this.cellUnit)for(;n>=t&&n<=r;){var g=n.format(i);e.push({time:g}),n=n.add(1,"years").startOf("year")}this.headers=e}},{key:"_createInitHeaderEvents",value:function(e){var t,r=this.localeDayjs(new Date(e.time)),n=r.format(s);if(this.showAgenda){var o=$e($e($e($e($e({},c.Day,"days"),c.Week,"weeks"),c.Month,"months"),c.Year,"years"),c.Quarter,"quarters")[this.viewType]||"days";t="days"===o?this.localeDayjs(new Date(this.endDate)).add(1,"days").format(s):r.add(1,o).format(s)}else{var a=$e($e($e($e({},1,"minutes"),2,"weeks"),3,"months"),4,"years")[this.cellUnit]||"days";t=r.add("minutes"===a?this.config.minuteStep:1,a).format(4===this.cellUnit||3===this.cellUnit||2===this.cellUnit?i:s)}return{time:e.time,nonWorkingTime:e.nonWorkingTime,start:n,end:t,count:0,addMore:0,addMoreIndex:0,events:Array(3)}}},{key:"_createHeaderEvent",value:function(e,t,r){return{render:e,span:t,eventItem:r}}},{key:"_getEventSlotId",value:function(e){return this.isEventPerspective?this._getEventGroupId(e):e.resourceId}},{key:"_getEventGroupId",value:function(e){return e.groupId?e.groupId.toString():e.id.toString()}},{key:"_getEventGroupName",value:function(e){return e.groupName?e.groupName:e.title}},{key:"_generateEventGroups",value:function(){var e=this,t=[],r=new Set;this.events.forEach((function(n){var o=e._getEventGroupId(n),a=e._getEventGroupName(n);r.has(o)||(t.push({id:o,name:a,state:n}),r.add(o))})),this.eventGroups=t}},{key:"_createInitRenderData",value:function(e,t,r,n){var o=this,a=e?t:r,i=[],s=new Map;a.forEach((function(e){var t,r=n.map((function(e){return o._createInitHeaderEvents(e)})),a={slotId:e.id,slotName:e.name,slotTitle:e.title,parentId:e.parentId,groupOnly:e.groupOnly,hasSummary:!1,rowMaxCount:0,rowHeight:0!==o.config.nonAgendaSlotMinHeight?o.config.nonAgendaSlotMinHeight:o.config.eventItemLineHeight+2,headerItems:r,indent:0,hasChildren:!1,expanded:!0,render:!0},c=e.id;s.has(c)?(t=s.get(c)).data=a:(t={data:a,children:[]},s.set(c,t));var l,u=e.parentId;u&&u!==c?(s.has(u)?l=s.get(u):(l={data:void 0,children:[]},s.set(u,l)),l.children.push(t)):i.push(t)}));var c,l=[];for(c=i.length-1;c>=0;c-=1)l.push(i[c]);for(var u,d=[];l.length>0;)for((u=l.pop()).data.indent>0&&(u.data.render=this.config.defaultExpanded),u.children.length>0&&(u.data.hasChildren=!0,u.data.expanded=this.config.defaultExpanded),d.push(u.data),c=u.children.length-1;c>=0;c-=1)u.children[c].data.indent=u.data.indent+1,l.push(u.children[c]);return d}},{key:"_getSpan",value:function(e,t,r){if(this.showAgenda)return 1;var n=function(e,t,r){if(("days"===r||"day"===r)&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth())return 1;var n;switch(r){case"days":case"day":n=864e5;break;case"minutes":case"minute":n=6e4;break;default:return 0}var o=e.getTime(),a=(t.getTime()-o)/n;return a<0?0:a},o=new Date(e),a=new Date(t),i=0,s=new Date(this.startDate),l=new Date(this.endDate);if(s.setHours(0,0,0,0),l.setHours(23,59,59),this.viewType===c.Day){if(r.length>0){var u=new Date(r[0].time);u.getDate()>o.getDate()&&u.getDate()<a.getDate()?i=1440/this.config.minuteStep:u.getDate()>o.getDate()&&u.getDate()===a.getDate()?i=Math.ceil(n(u,a,"minutes")/this.config.minuteStep):u.getDate()===o.getDate()&&u.getDate()<a.getDate()?(u.setHours(23,59,59),i=Math.ceil(n(o,u,"minutes")/this.config.minuteStep)):(u.getDate()===o.getDate()&&u.getDate()===a.getDate()||a.getDate()===o.getDate())&&(i=Math.ceil(n(o,a,"minutes")/this.config.minuteStep))}}else if(this.viewType===c.Week||this.viewType===c.Month||this.viewType===c.Quarter||this.viewType===c.Year){var d=s<o?o:s,h=l>a?a:l;i=Math.ceil(n(d,h,"days"))}else{0===this.cellUnit&&(a.setHours(23,59,59),o.setHours(0,0,0,0));var f=0===this.cellUnit?"days":"minutes",v=0===this.cellUnit?1:this.config.minuteStep;i=s>=o&&a<=l?Math.ceil(n(s,a,f)/v):s>o&&a>l?Math.ceil(n(s,l,f)/v):s<=o&&a>=l?Math.ceil(n(o,l,f)/v):Math.ceil(n(o,a,f)/v)}return i}},{key:"_validateResource",value:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Resources should be Array object");e.forEach((function(e,t){if(void 0===e)throw console.error("Resource undefined: ".concat(t)),new Error("Resource undefined: ".concat(t));if(void 0===e.id||void 0===e.name)throw console.error("Resource property missed",t,e),new Error("Resource property undefined: ".concat(t))}))}},{key:"_validateEventGroups",value:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Event groups should be Array object");e.forEach((function(e,t){if(void 0===e)throw console.error("Event group undefined: ".concat(t)),new Error("Event group undefined: ".concat(t));if(void 0===e.id||void 0===e.name)throw console.error("Event group property missed",t,e),new Error("Event group property undefined: ".concat(t))}))}},{key:"_validateEvents",value:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("Events should be Array object");e.forEach((function(e,t){if(void 0===e)throw console.error("Event undefined: ".concat(t)),new Error("Event undefined: ".concat(t));if(void 0===e.id||void 0===e.resourceId||void 0===e.title||void 0===e.start||void 0===e.end)throw console.error("Event property missed",t,e),new Error("Event property undefined: ".concat(t))}))}},{key:"_validateMinuteStep",value:function(e){if(60%e!=0)throw console.error("Minute step is not set properly - 60 minutes must be divisible without remainder by this number"),new Error("Minute step is not set properly - 60 minutes must be divisible without remainder by this number")}},{key:"_compare",value:function(e,t){var r=this.localeDayjs(e.start),n=this.localeDayjs(t.start);if(r!==n)return r<n?-1:1;var o=this.localeDayjs(e.end),a=this.localeDayjs(t.end);return o!==a?o<a?-1:1:e.id<t.id?-1:1}},{key:"_createRenderData",value:function(){var e=this,t=this._createInitRenderData(this.isEventPerspective,this.eventGroups,this.resources,this.headers),r=this.getCellMaxEvents();this.events.forEach((function(n){var o=t.filter((function(t){return t.slotId===e._getEventSlotId(n)}));if(o.length>0){var a=o[0],i=e._getSpan(n.start,n.end,e.headers),s=new Date(n.start),c=new Date(n.end),l=-1;a.headerItems.forEach((function(t,o){var u=new Date(t.start);if(new Date(t.end)>s&&u<c){if(t.count+=1,t.count>a.rowMaxCount){a.rowMaxCount=t.count;var d=(r<=30&&a.rowMaxCount>r?r:a.rowMaxCount)*e.config.eventItemLineHeight+(e.config.creatable&&!1===e.config.checkConflict?20:2);d>a.rowHeight&&(a.rowHeight=d)}if(-1===l){for(var h=0;void 0!==t.events[h];)h+=1;l=h}var f=u<=s||0===o;if(!1===f){var v=a.headerItems[o-1],m=new Date(v.start);(new Date(v.end)<=s||m>=c)&&(f=!0)}t.events[l]=e._createHeaderEvent(f,i,n)}}))}})),(r<=30||void 0!==this.behaviors.getSummaryFunc)&&t.forEach((function(t){var n=!1;if(t.headerItems.forEach((function(o){if(r<=30){for(var a=0,i=0,s=0;s<r-1;)void 0!==o.events[s]&&(a+=1,i=s+1),s+=1;void 0!==o.events[s]?a+1<o.count&&(o.addMore=o.count-a,o.addMoreIndex=i):a<o.count&&(o.addMore=o.count-a,o.addMoreIndex=i)}if(void 0!==e.behaviors.getSummaryFunc){var c=[];o.events.forEach((function(e){e&&e.eventItem&&c.push(e.eventItem)})),o.summary=e.behaviors.getSummaryFunc(e,c,t.slotId,t.slotName,o.start,o.end),o.summary&&void 0!==o.summary.text&&(n=!0)}})),t.hasSummary=n,n){var o=((r<=30&&t.rowMaxCount>r?r:t.rowMaxCount)+1)*e.config.eventItemLineHeight+(e.config.creatable&&!1===e.config.checkConflict?20:2);o>t.rowHeight&&(t.rowHeight=o)}})),this.renderData=t}},{key:"_startResizing",value:function(){this.resizing=!0}},{key:"_stopResizing",value:function(){this.resizing=!1}},{key:"_isResizing",value:function(){return this.resizing}}],t&&Je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),et=r(6557),tt=r(4588),rt=r(1643),nt=r(5604),ot=r(2702),at=r(4716);function it(e){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(e)}function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){lt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function lt(e,t,r){return(t=function(e){var t=function(e){if("object"!=it(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=it(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==it(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ut(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ht=rt.Ay.Button,ft=rt.Ay.Group,vt=a.forwardRef((function(e,t){var r,n=e.onViewChange,o=e.goNext,s=e.goBack,c=e.onSelectDate,l=e.schedulerData,u=e.leftCustomHeader,f=e.rightCustomHeader,m=e.style,p=ut((0,a.useState)(!1),2),g=p[0],y=p[1],b=ut((0,a.useState)(!1),2),E=b[0],D=b[1],w=ut((0,a.useState)(!1),2),S=w[0],I=w[1],T=l.viewType,k=l.showAgenda,C=l.isEventPerspective,R=l.config,j=l.getDateLabel(),O=l.getSelectedDate(),P=null===(r=l.getCalendarPopoverLocale())||void 0===r||null===(r=r.default)||void 0===r?void 0:r.Calendar,x="".concat(T).concat(k?1:0).concat(C?1:0),H=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t?R.viewChangeSpinEnabled&&y(!0):R.dateChangeSpinEnabled&&D(!0);var n=function(){void 0!==r?e(r):e(),t?R.viewChangeSpinEnabled&&y(!1):R.dateChangeSpinEnabled&&D(!1)};R.viewChangeSpinEnabled||R.dateChangeSpinEnabled?setTimeout(n,R.schedulerHeaderEventsFuncsTimeoutMs):n()},M=a.createElement("div",{className:"popover-calendar"},a.createElement(nt.A,{locale:P,defaultValue:_e()(O),fullscreen:!1,onSelect:function(e){I(!1),H(c,!1,e.format(i))}})),W=R.views.map((function(e){return a.createElement(ht,{key:"".concat(e.viewType).concat(e.showAgenda?1:0).concat(e.isEventPerspective?1:0),value:"".concat(e.viewType).concat(e.showAgenda?1:0).concat(e.isEventPerspective?1:0)},a.createElement("span",{style:{margin:"0px 8px"}},e.viewName))}));return a.createElement(d.A,{ref:t,gutter:[10,10],type:"flex",align:"middle",justify:"space-between",style:ct({},m)},u,a.createElement(h.A,null,a.createElement("div",{className:"header2-text"},a.createElement(ot.A,null,a.createElement("div",null,a.createElement(et.A,{style:{marginRight:"8px"},className:"icon-nav",onClick:function(){return H(s,!1)}}),R.calendarPopoverEnabled?a.createElement(v.A,{content:M,placement:"bottomLeft",trigger:"click",open:S,onOpenChange:I,overlayClassName:"scheduler-header-popover"},a.createElement("span",{className:"header2-text-label",style:{cursor:"pointer"}},j)):a.createElement("span",{className:"header2-text-label"},j),a.createElement(tt.A,{style:{marginLeft:"8px"},className:"icon-nav",onClick:function(){return H(o,!1)}})),a.createElement(at.A,{spinning:E})))),a.createElement(h.A,null,a.createElement(ot.A,null,a.createElement(at.A,{spinning:g}),a.createElement(ft,{buttonStyle:"solid",defaultValue:x,size:"default",onChange:function(e){return H(n,!0,e)}},W))),f)}));vt.propTypes={onViewChange:o().func.isRequired,goNext:o().func.isRequired,goBack:o().func.isRequired,onSelectDate:o().func.isRequired,schedulerData:o().object.isRequired,leftCustomHeader:o().object,rightCustomHeader:o().object,style:o().object};const mt=vt;var pt=r(891),gt=r(8909);function yt(e){return function(t){return a.createElement(pt.Q,{backend:gt.t2},a.createElement(e,t))}}function bt(e){var t,r=e.schedulerData,n=e.nonAgendaCellHeaderTemplateResolver,o=r.headers,i=r.cellUnit,s=r.config,c=r.localeDayjs,l=r.getTableHeaderHeight(),u=r.getContentCellWidth(),d=r.getMinuteStepsInHour(),h=[];return 1===i?o.forEach((function(e,i){if(i%d===0){var l=c(new Date(e.time));t=e.nonWorkingTime?{width:u*d,color:s.nonWorkingTimeHeadColor,backgroundColor:s.nonWorkingTimeHeadBgColor}:{width:u*d},i===o.length-d&&(t=e.nonWorkingTime?{color:s.nonWorkingTimeHeadColor,backgroundColor:s.nonWorkingTimeHeadBgColor}:{});var f,v=s.nonAgendaDayCellHeaderFormat.split("|").map((function(e){return l.format(e)}));if("function"==typeof n)f=n(r,e,v,t);else{var m=v.map((function(e,t){return a.createElement("div",{key:t},e)}));f=a.createElement("th",{key:"header-".concat(e.time),className:"header3-text",style:t},a.createElement("div",null,m))}h.push(f)}})):h=o.map((function(e,l){var d=c(new Date(e.time));t=e.nonWorkingTime?{width:u,color:s.nonWorkingTimeHeadColor,backgroundColor:s.nonWorkingTimeHeadBgColor}:{width:u},l===o.length-1&&(t=e.nonWorkingTime?{color:s.nonWorkingTimeHeadColor,backgroundColor:s.nonWorkingTimeHeadBgColor}:{});var h=(2===i?s.nonAgendaWeekCellHeaderFormat:3===i?s.nonAgendaMonthCellHeaderFormat:4===i?s.nonAgendaYearCellHeaderFormat:s.nonAgendaOtherCellHeaderFormat).split("|").map((function(e){return d.format(e)}));if("function"==typeof n)return n(r,e,h,t);var f=h.map((function(e,t){return a.createElement("div",{key:t},e)}));return a.createElement("th",{key:"header-".concat(e.time),className:"header3-text",style:t},a.createElement("div",null,f))})),a.createElement("thead",null,a.createElement("tr",{style:{height:l}},h))}bt.propTypes={schedulerData:o().object.isRequired,nonAgendaCellHeaderTemplateResolver:o().func};const Et=bt;function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wt.apply(null,arguments)}function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?St(Object(r),!0).forEach((function(t){Tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tt(e,t,r){return(t=function(e){var t=function(e){if("object"!=Dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kt(e){return function(e){if(Array.isArray(e))return Rt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ct(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e,t){if(e){if("string"==typeof e)return Rt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rt(e,t):void 0}}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function jt(e){var t,r,n,o=e.schedulerData,i=e.dndSources,s=e.parentRef,l=e.prevClick,u=e.nextClick,d=e.onViewChange,h=e.onSelectDate,f=e.leftCustomHeader,v=e.rightCustomHeader,m=(r=(0,a.useState)({dndContext:(t=[],t.push(new z((function(e){return e.eventItem}),H,o.config.dragAndDropEnabled)),void 0!==i&&i.length>0&&(t=[].concat(kt(t),kt(i))),new ue(t,Pe)),contentScrollbarHeight:17,contentScrollbarWidth:17,resourceScrollbarHeight:17,resourceScrollbarWidth:17,documentWidth:0,documentHeight:0,headerHeight:0}),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(r,n)||Ct(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],g=m[1],y=(0,a.useRef)(-1),b=(0,a.useRef)(0),E=(0,a.useRef)(0),D=(0,a.useRef)(null),w=(0,a.useRef)(null),S=(0,a.useRef)(null),I=(0,a.useRef)(null),T=(0,a.useRef)(null),k=(0,a.useRef)(null),C=(0,a.useRef)(null),R=(0,a.useCallback)((function(){o._setDocumentWidth(document.documentElement.clientWidth),o._setDocumentHeight(document.documentElement.clientHeight),g((function(e){return It(It({},e),{},{documentWidth:document.documentElement.clientWidth,documentHeight:document.documentElement.clientHeight})}))}),[o]);(0,a.useEffect)((function(){if(o.isSchedulerResponsive()&&!o.config.responsiveByParent||void 0===s)return o._setDocumentWidth(document.documentElement.clientWidth),o._setDocumentHeight(document.documentElement.clientHeight),window.addEventListener("resize",R),function(){window.removeEventListener("resize",R)}}),[o,s,R]),(0,a.useEffect)((function(){if(void 0!==s&&o.config.responsiveByParent&&s.current)return o._setDocumentWidth(s.current.offsetWidth),k.current=new ResizeObserver((function(){if(s.current){var e=s.current.offsetWidth,t=s.current.offsetHeight;o._setDocumentWidth(e),o._setDocumentHeight(t),g((function(r){return It(It({},r),{},{documentWidth:e,documentHeight:t})}))}})),k.current.observe(s.current),function(){k.current&&s.current&&k.current.unobserve(s.current)}}),[s,o]),(0,a.useEffect)((function(){if(void 0!==w&&o.config.responsiveByParent&&w.current)return o._setDocumentWidth(w.current.offsetWidth),o._setDocumentHeight(w.current.offsetHeight),C.current=new ResizeObserver((function(e){e.forEach((function(e){var t=e.target,r=t.getBoundingClientRect(),n=window.getComputedStyle(t),a=parseFloat(n.marginTop)||0,i=parseFloat(n.marginBottom)||0,s=r.height+a+i;o._setSchedulerHeaderHeight(s),g((function(e){return It(It({},e),{},{headerHeight:s})}))}))})),C.current.observe(w.current),function(){C.current&&w.current&&C.current.unobserve(w.current)}}),[w,o]);var j=(0,a.useCallback)((function(){var e=17,t=17,r=17,n=17;I.current&&(e=I.current.offsetHeight-I.current.clientHeight,t=I.current.offsetWidth-I.current.clientWidth),S.current&&(r=S.current.offsetHeight-S.current.clientHeight,n=S.current.offsetWidth-S.current.clientWidth);var o=!1,a={};e!==p.contentScrollbarHeight&&(a=It(It({},a),{},{contentScrollbarHeight:e}),o=!0),t!==p.contentScrollbarWidth&&(a=It(It({},a),{},{contentScrollbarWidth:t}),o=!0),r!==p.resourceScrollbarHeight&&(a=It(It({},a),{},{resourceScrollbarHeight:r}),o=!0),n!==p.resourceScrollbarWidth&&(a=It(It({},a),{},{resourceScrollbarWidth:n}),o=!0),o&&g((function(e){return It(It({},e),a)}))}),[p.contentScrollbarHeight,p.contentScrollbarWidth,p.resourceScrollbarHeight,p.resourceScrollbarWidth]);(0,a.useEffect)((function(){j();var e=o.localeDayjs,t=o.behaviors;if(o.getScrollToSpecialDayjs()&&t.getScrollSpecialDayjsFunc&&I.current&&I.current.scrollWidth>I.current.clientWidth){var r=e(new Date(o.startDate)).startOf("day"),n=e(new Date(o.endDate)).endOf("day"),a=t.getScrollSpecialDayjsFunc(o,r,n);if(a>=r&&a<=n){var i=0;o.headers.forEach((function(t){var r=e(new Date(t.time));a>=r&&(i+=1)})),I.current.scrollLeft=(i-1)*o.getContentCellWidth(),o.setScrollToSpecialDayjs(!1)}}}),[o,j]);var O=(0,a.useCallback)((function(){y.current=2}),[]),P=(0,a.useCallback)((function(){y.current=-1}),[]),x=(0,a.useCallback)((function(){2!==y.current&&-1!==y.current||I.current.scrollLeft===D.current.scrollLeft||(I.current.scrollLeft=D.current.scrollLeft)}),[]),M=(0,a.useCallback)((function(){y.current=1}),[]),W=(0,a.useCallback)((function(){y.current=-1}),[]),A=(0,a.useCallback)((function(){S.current&&(1!==y.current&&-1!==y.current||I.current.scrollTop===S.current.scrollTop||(I.current.scrollTop=S.current.scrollTop))}),[]),_=(0,a.useCallback)((function(){y.current=0}),[]),N=(0,a.useCallback)((function(){y.current=-1}),[]),L=(0,a.useCallback)((function(){S.current&&(0!==y.current&&-1!==y.current||(D.current.scrollLeft!==I.current.scrollLeft&&(D.current.scrollLeft=I.current.scrollLeft),S.current.scrollTop!==I.current.scrollTop&&(S.current.scrollTop=I.current.scrollTop)));var t=e.onScrollLeft,r=e.onScrollRight,n=e.onScrollTop,a=e.onScrollBottom;I.current.scrollLeft!==b.current?(0===I.current.scrollLeft&&void 0!==t&&t(o,I.current,I.current.scrollWidth-I.current.clientWidth),Math.round(I.current.scrollLeft)===I.current.scrollWidth-I.current.clientWidth&&void 0!==r&&r(o,I.current,I.current.scrollWidth-I.current.clientWidth)):I.current.scrollTop!==E.current&&(0===I.current.scrollTop&&void 0!==n&&n(o,I.current,I.current.scrollHeight-I.current.clientHeight),Math.round(I.current.scrollTop)===I.current.scrollHeight-I.current.clientHeight&&void 0!==a&&a(o,I.current,I.current.scrollHeight-I.current.clientHeight)),b.current=I.current.scrollLeft,E.current=I.current.scrollTop}),[e,o]),F=(0,a.useCallback)((function(e){var t=parseInt(e.target.value.charAt(0),10),r="1"===e.target.value.charAt(1),n="1"===e.target.value.charAt(2);d(o,{viewType:t,showAgenda:r,isEventPerspective:n})}),[d,o]),Y=(0,a.useCallback)((function(){u(o)}),[u,o]),q=(0,a.useCallback)((function(){l(o)}),[l,o]),B=(0,a.useCallback)((function(e){h(o,e)}),[h,o]),G=o.viewType,U=o.renderData,X=o.showAgenda,V=o.config,Q=o.getSchedulerWidth(),$=p.contentScrollbarHeight,J=p.contentScrollbarWidth,K=p.resourceScrollbarHeight,ee=p.resourceScrollbarWidth,re=a.createElement("tr",null);if(X)re=a.createElement(Z,e);else{var ne=o.getResourceTableWidth(),oe=Q-(V.resourceViewEnabled?ne:0),ae=o.getContentTableWidth()-1,ie=p.dndContext.getDropTarget(V.dragAndDropEnabled),se=p.dndContext.getDndSource(),ce=U.filter((function(e){return e.render})).map((function(t){return a.createElement(ie,wt({},e,{key:t.slotId,resourceEvents:t,dndSource:se}))})),le=V.schedulerContentHeight,de=0===K?$:0,he=0===$?K:0,fe={overflowX:G===c.Week?"hidden":"auto",overflowY:"auto",margin:"0px",position:"relative",height:le,paddingBottom:he},ve={height:le,overflowX:"auto",overflowY:"auto",width:ne+ee-2,margin:"0px -".concat(J,"px 0px 0px")};if(V.schedulerMaxHeight>0)fe=It(It({},fe),{},{maxHeight:V.schedulerMaxHeight-V.tableHeaderHeight}),ve=It(It({},ve),{},{maxHeight:V.schedulerMaxHeight-V.tableHeaderHeight});else if(V.responsiveByParent&&o.documentHeight>0){var me=o.getSchedulerHeight();fe=It(It({},fe),{},{height:me}),ve=It(It({},ve),{},{height:me})}var pe=o.isEventPerspective?V.taskName:V.resourceName;re=a.createElement("tr",null,a.createElement("td",{style:{display:V.resourceViewEnabled?void 0:"none",width:ne,verticalAlign:"top"}},a.createElement("div",{className:"resource-view"},a.createElement("div",{style:{overflow:"hidden",borderBottom:"1px solid #e9e9e9",height:V.tableHeaderHeight}},a.createElement("div",{style:{overflowX:"scroll",overflowY:"hidden",margin:"0px 0px -".concat($,"px")}},a.createElement("table",{className:"resource-table"},a.createElement("thead",null,a.createElement("tr",{style:{height:V.tableHeaderHeight}},a.createElement("th",{className:"header3-text"},pe)))))),a.createElement("div",{style:ve,ref:S,onMouseOver:M,onFocus:M,onMouseOut:W,onBlur:W,onScroll:A},a.createElement(We,wt({},e,{contentScrollbarHeight:de}))))),a.createElement("td",null,a.createElement("div",{className:"scheduler-view",style:{width:oe,verticalAlign:"top"}},a.createElement("div",{style:{overflow:"hidden",borderBottom:"1px solid #e9e9e9",height:V.tableHeaderHeight}},a.createElement("div",{style:{overflowX:"scroll",overflowY:"hidden",margin:"0px 0px -".concat($,"px")},ref:D,onMouseOver:O,onFocus:O,onMouseOut:P,onBlur:P,onScroll:x,"aria-label":"Scheduler Header"},a.createElement("div",{style:{paddingRight:"".concat(J,"px"),width:ae+J}},a.createElement("table",{className:"scheduler-bg-table"},a.createElement(Et,e))))),a.createElement("div",{style:fe,ref:I,onMouseOver:_,onFocus:_,onMouseOut:N,onBlur:N,onScroll:L},a.createElement("div",{style:{width:ae}},a.createElement("div",{className:"scheduler-content"},a.createElement("table",{className:"scheduler-content-table"},a.createElement("tbody",null,ce))),a.createElement("div",{className:"scheduler-bg"},a.createElement("table",{className:"scheduler-bg-table",style:{width:ae},ref:T},a.createElement(te,e))))))))}var ge=a.createElement(mt,{ref:w,style:{display:V.headerEnabled?void 0:"none",marginBottom:V.headerEnabled?"24px":void 0},onViewChange:F,schedulerData:o,onSelectDate:B,goNext:Y,goBack:q,rightCustomHeader:v,leftCustomHeader:f});return a.createElement("table",{id:"RBS-Scheduler-root",className:"react-big-schedule",style:{width:"".concat(Q,"px")}},a.createElement("thead",null,a.createElement("tr",null,a.createElement("td",{colSpan:"2"},ge))),a.createElement("tbody",null,re))}jt.propTypes={parentRef:o().object,schedulerData:o().object.isRequired,prevClick:o().func.isRequired,nextClick:o().func.isRequired,onViewChange:o().func.isRequired,onSelectDate:o().func.isRequired,onSetAddMoreState:o().func,updateEventStart:o().func,updateEventEnd:o().func,moveEvent:o().func,movingEvent:o().func,leftCustomHeader:o().object,rightCustomHeader:o().object,newEvent:o().func,subtitleGetter:o().func,eventItemClick:o().func,viewEventClick:o().func,viewEventText:o().string,viewEvent2Click:o().func,viewEvent2Text:o().string,conflictOccurred:o().func,eventItemTemplateResolver:o().func,dndSources:o().array,slotClickedFunc:o().func,toggleExpandFunc:o().func,slotItemTemplateResolver:o().func,nonAgendaCellHeaderTemplateResolver:o().func,onScrollLeft:o().func,onScrollRight:o().func,onScrollTop:o().func,onScrollBottom:o().func}},5700:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(6540),o=r(4794),a=r(3340);const i=function(e){var t=e.value;return n.createElement(a.A,{align:"middle",justify:"center"},n.createElement(o.N_,{to:t,target:"_blank"},"</> Source Code"))}}}]);
3
+ //# sourceMappingURL=12.bundle.js.map
@@ -0,0 +1 @@
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */