(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[53],{1059:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.composeEvents=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o3&&void 0!==arguments[3]?arguments[3]:u.defaultHeaderFormats);r=n>=150?a[t].long:n>=100?a[t].mediumLong:n>=50?a[t].medium:a[t].short;return i.format(r)}};var T=S;t.default=T},1066:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CustomHeader=void 0;var r=u(n(2)),o=u(n(80)),i=n(915),a=n(853),s=n(821);function u(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="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})(e)}function c(){return(c=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.style;return{style:Object.assign({},t||{},{position:"relative",width:n.props.canvasWidth,height:n.props.height})}})),v(p(n),"getIntervalProps",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.interval,r=e.style;if(!t)throw new Error("you should provide interval to the prop getter");var o=t.startTime,i=t.labelWidth,a=t.left;return{style:n.getIntervalStyle({style:r,startTime:o,labelWidth:i,canvasTimeStart:n.props.canvasTimeStart,unit:n.props.unit,left:a}),key:"label-".concat(o.valueOf())}})),v(p(n),"getIntervalStyle",(function(e){var t=e.left,n=e.labelWidth;return function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:n.props,t=n.container.getBoundingClientRect(),r=t.width,o=r-e.sidebarWidth-e.rightSidebarWidth,i=(0,d.getCanvasWidth)(o),a=(0,d.stackTimelineItems)(e.items,e.groups,i,n.state.canvasTimeStart,n.state.canvasTimeEnd,e.keys,e.lineHeight,e.itemHeightRatio,e.stackItems,n.state.draggingItem,n.state.resizingItem,n.state.dragTime,n.state.resizingEdge,n.state.resizeTime,n.state.newGroupOrder),s=a.dimensionItems,u=a.height,l=a.groupHeights,c=a.groupTops;n.setState({width:o,dimensionItems:s,height:u,groupHeights:l,groupTops:c}),n.scrollComponent.scrollLeft=o,n.scrollHeaderRef.scrollLeft=o})),E(T(n),"onScroll",(function(e){var t=n.state.width,r=n.state.canvasTimeStart,o=n.state.visibleTimeEnd-n.state.visibleTimeStart,i=r+o*e/t;n.state.visibleTimeStart===i&&n.state.visibleTimeEnd===i+o||n.props.onTimeChange(i,i+o,n.updateScrollCanvas)})),E(T(n),"updateScrollCanvas",(function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.props.items,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.props.groups;n.setState((0,d.calculateScrollCanvas)(e,t,r,o,i,n.props,n.state))})),E(T(n),"handleWheelZoom",(function(e,t,r){n.changeZoom(1+e*r/500,t/n.state.width)})),E(T(n),"changeZoom",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=n.props,o=r.minZoom,i=r.maxZoom,a=n.state.visibleTimeEnd-n.state.visibleTimeStart,s=Math.min(Math.max(Math.round(a*e),o),i),u=Math.round(n.state.visibleTimeStart+(a-s)*t);n.props.onTimeChange(u,u+s,n.updateScrollCanvas)})),E(T(n),"showPeriod",(function(e,t){var r=e.valueOf(),o=t.valueOf()-r;o<36e4||n.props.onTimeChange(r,r+o,n.updateScrollCanvas)})),E(T(n),"selectItem",(function(e,t,r){if(n.isItemSelected(e)||n.props.itemTouchSendsClick&&"touch"===t){if(e&&n.props.onItemClick){var o=n.timeFromItemEvent(r);n.props.onItemClick(e,r,o)}}else if(n.setState({selectedItem:e}),e&&n.props.onItemSelect){var i=n.timeFromItemEvent(r);n.props.onItemSelect(e,r,i)}else null===e&&n.props.onItemDeselect&&n.props.onItemDeselect(r)})),E(T(n),"doubleClickItem",(function(e,t){if(n.props.onItemDoubleClick){var r=n.timeFromItemEvent(t);n.props.onItemDoubleClick(e,t,r)}})),E(T(n),"contextMenuClickItem",(function(e,t){if(n.props.onItemContextMenu){var r=n.timeFromItemEvent(t);n.props.onItemContextMenu(e,t,r)}})),E(T(n),"getTimeFromRowClickEvent",(function(e){var t=n.props.dragSnap,r=n.state,o=r.width,i=r.canvasTimeStart,a=r.canvasTimeEnd,s=e.nativeEvent.offsetX,u=(0,d.calculateTimeForXPosition)(i,a,(0,d.getCanvasWidth)(o),s);return u=Math.floor(u/t)*t})),E(T(n),"timeFromItemEvent",(function(e){var t=n.state,r=t.width,o=t.visibleTimeStart,i=t.visibleTimeEnd,a=n.props.dragSnap,s=n.scrollComponent.getBoundingClientRect().left,u=(e.clientX-s)/r*(i-o),l=Math.round(o+u);return l=Math.floor(l/a)*a})),E(T(n),"dragItem",(function(e,t,r){var o=n.props.groups[r],i=n.props.keys;n.setState({draggingItem:e,dragTime:t,newGroupOrder:r,dragGroupTitle:o?(0,p._get)(o,i.groupLabelKey):""}),n.updatingItem({eventType:"move",itemId:e,time:t,newGroupOrder:r})})),E(T(n),"dropItem",(function(e,t,r){n.setState({draggingItem:null,dragTime:null,dragGroupTitle:null}),n.props.onItemMove&&n.props.onItemMove(e,t,r)})),E(T(n),"resizingItem",(function(e,t,r){n.setState({resizingItem:e,resizingEdge:r,resizeTime:t}),n.updatingItem({eventType:"resize",itemId:e,time:t,edge:r})})),E(T(n),"resizedItem",(function(e,t,r,o){n.setState({resizingItem:null,resizingEdge:null,resizeTime:null}),n.props.onItemResize&&0!==o&&n.props.onItemResize(e,t,r)})),E(T(n),"updatingItem",(function(e){var t=e.eventType,r=e.itemId,o=e.time,i=e.edge,a=e.newGroupOrder;n.props.onItemDrag&&n.props.onItemDrag({eventType:t,itemId:r,time:o,edge:i,newGroupOrder:a})})),E(T(n),"handleRowClick",(function(e,t){if(n.hasSelectedItem()&&n.selectItem(null),null!=n.props.onCanvasClick){var r=n.getTimeFromRowClickEvent(e),o=(0,p._get)(n.props.groups[t],n.props.keys.groupIdKey);n.props.onCanvasClick(o,r,e)}})),E(T(n),"handleRowDoubleClick",(function(e,t){if(null!=n.props.onCanvasDoubleClick){var r=n.getTimeFromRowClickEvent(e),o=(0,p._get)(n.props.groups[t],n.props.keys.groupIdKey);n.props.onCanvasDoubleClick(o,r,e)}})),E(T(n),"handleScrollContextMenu",(function(e,t){if(null!=n.props.onCanvasContextMenu){var r=n.getTimeFromRowClickEvent(e),o=(0,p._get)(n.props.groups[t],n.props.keys.groupIdKey);n.props.onCanvasContextMenu&&(e.preventDefault(),n.props.onCanvasContextMenu(o,r,e))}})),E(T(n),"handleHeaderRef",(function(e){n.scrollHeaderRef=e,n.props.headerRef(e)})),E(T(n),"isTimelineHeader",(function(e){return void 0!==e.type&&e.type.secretKey===g.default.secretKey})),E(T(n),"renderHeaders",(function(){var e;if(n.props.children&&(o.default.Children.map(n.props.children,(function(t){n.isTimelineHeader(t)&&(e=t)})),e))return e;return o.default.createElement(g.default,null,o.default.createElement(b.default,{unit:"primaryHeader"}),o.default.createElement(b.default,null))})),E(T(n),"getScrollElementRef",(function(e){n.props.scrollRef(e),n.scrollComponent=e})),n.getSelected=n.getSelected.bind(T(n)),n.hasSelectedItem=n.hasSelectedItem.bind(T(n)),n.isItemSelected=n.isItemSelected.bind(T(n));var r=null,i=null;if(n.props.defaultTimeStart&&n.props.defaultTimeEnd)r=n.props.defaultTimeStart.valueOf(),i=n.props.defaultTimeEnd.valueOf();else{if(!n.props.visibleTimeStart||!n.props.visibleTimeEnd)throw new Error('You must provide either "defaultTimeStart" and "defaultTimeEnd" or "visibleTimeStart" and "visibleTimeEnd" to initialize the Timeline');r=n.props.visibleTimeStart,i=n.props.visibleTimeEnd}var a=_((0,d.getCanvasBoundariesFromVisibleTime)(r,i),2),s=a[0],u=a[1];n.state={width:1e3,visibleTimeStart:r,visibleTimeEnd:i,canvasTimeStart:s,canvasTimeEnd:u,selectedItem:null,dragTime:null,dragGroupTitle:null,resizeTime:null,resizingItem:null,resizingEdge:null};var l=(0,d.getCanvasWidth)(n.state.width),c=(0,d.stackTimelineItems)(e.items,e.groups,l,n.state.canvasTimeStart,n.state.canvasTimeEnd,e.keys,e.lineHeight,e.itemHeightRatio,e.stackItems,n.state.draggingItem,n.state.resizingItem,n.state.dragTime,n.state.resizingEdge,n.state.resizeTime,n.state.newGroupOrder),f=c.dimensionItems,h=c.height,v=c.groupHeights,m=c.groupTops;return n.state.dimensionItems=f,n.state.height=h,n.state.groupHeights=v,n.state.groupTops=m,n}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}}),t&&x(e,t)}(t,e),j(t,[{key:"getChildContext",value:function(){var e=this;return{getTimelineContext:function(){return e.getTimelineContext()}}}}]),j(t,[{key:"componentDidMount",value:function(){this.resize(this.props),this.props.resizeDetector&&this.props.resizeDetector.addListener&&this.props.resizeDetector.addListener(this),f.default.addListener(this),this.lastTouchDistance=null}},{key:"componentWillUnmount",value:function(){this.props.resizeDetector&&this.props.resizeDetector.addListener&&this.props.resizeDetector.removeListener(this),f.default.removeListener(this)}},{key:"componentDidUpdate",value:function(e,t){var n=this.state.visibleTimeEnd-this.state.visibleTimeStart,r=t.visibleTimeEnd-t.visibleTimeStart;this.props.onZoom&&n!==r&&this.props.onZoom(this.getTimelineContext()),this.props.onBoundsChange&&this.state.canvasTimeStart!==t.canvasTimeStart&&this.props.onBoundsChange(this.state.canvasTimeStart,this.state.canvasTimeStart+3*n);var o=Math.round(this.state.width*(this.state.visibleTimeStart-this.state.canvasTimeStart)/n);Math.round(t.width*(t.visibleTimeStart-t.canvasTimeStart)/r)!==o&&(this.scrollComponent.scrollLeft=o,this.scrollHeaderRef.scrollLeft=o)}},{key:"columns",value:function(e,t,n,r,i,a){return o.default.createElement(s.default,{canvasTimeStart:e,canvasTimeEnd:t,canvasWidth:n,lineCount:(0,p._length)(this.props.groups),minUnit:r,timeSteps:i,height:a,verticalLineClassNamesForTime:this.props.verticalLineClassNamesForTime})}},{key:"rows",value:function(e,t,n){return o.default.createElement(u.default,{groups:n,canvasWidth:e,lineCount:(0,p._length)(this.props.groups),groupHeights:t,clickTolerance:this.props.clickTolerance,onRowClick:this.handleRowClick,onRowDoubleClick:this.handleRowDoubleClick,horizontalLineClassNamesForGroup:this.props.horizontalLineClassNamesForGroup,onRowContextClick:this.handleScrollContextMenu})}},{key:"items",value:function(e,t,n,r,a,s,u,l){return o.default.createElement(i.default,{canvasTimeStart:e,canvasTimeEnd:n,canvasWidth:r,dimensionItems:s,groupTops:l,items:this.props.items,groups:this.props.groups,keys:this.props.keys,selectedItem:this.state.selectedItem,dragSnap:this.props.dragSnap,minResizeWidth:this.props.minResizeWidth,canChangeGroup:this.props.canChangeGroup,canMove:this.props.canMove,canResize:this.props.canResize,useResizeHandle:this.props.useResizeHandle,canSelect:this.props.canSelect,moveResizeValidator:this.props.moveResizeValidator,itemSelect:this.selectItem,itemDrag:this.dragItem,itemDrop:this.dropItem,onItemDoubleClick:this.doubleClickItem,onItemContextMenu:this.contextMenuClickItem,itemResizing:this.resizingItem,itemResized:this.resizedItem,itemRenderer:this.props.itemRenderer,selected:this.props.selected,scrollRef:this.scrollComponent})}},{key:"sidebar",value:function(e,t){var n=this.props.sidebarWidth;return n&&o.default.createElement(a.default,{groups:this.props.groups,groupRenderer:this.props.groupRenderer,keys:this.props.keys,width:n,groupHeights:t,height:e})}},{key:"rightSidebar",value:function(e,t){var n=this.props.rightSidebarWidth;return n&&o.default.createElement(a.default,{groups:this.props.groups,keys:this.props.keys,groupRenderer:this.props.groupRenderer,isRightSidebar:!0,width:n,groupHeights:t,height:e})}},{key:"childrenWithProps",value:function(e,t,n,r,i,a,s,u,l,c,f){var d=this;if(!this.props.children)return null;var p=Array.isArray(this.props.children)?this.props.children.filter((function(e){return e})):[this.props.children],h={canvasTimeStart:e,canvasTimeEnd:t,canvasWidth:n,visibleTimeStart:u,visibleTimeEnd:l,dimensionItems:r,items:this.props.items,groups:this.props.groups,keys:this.props.keys,groupHeights:i,groupTops:a,selected:this.getSelected(),height:s,minUnit:c,timeSteps:f};return o.default.Children.map(p,(function(e){return d.isTimelineHeader(e)?null:o.default.cloneElement(e,h)}))}},{key:"getSelected",value:function(){return this.state.selectedItem&&!this.props.selected?[this.state.selectedItem]:this.props.selected||[]}},{key:"hasSelectedItem",value:function(){return Array.isArray(this.props.selected)?this.props.selected.length>0:!!this.state.selectedItem}},{key:"isItemSelected",value:function(e){return this.getSelected().some((function(t){return t===e}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,r=t.groups,i=t.sidebarWidth,a=t.rightSidebarWidth,s=t.timeSteps,u=t.traditionalZoom,f=this.state,p=f.draggingItem,h=f.resizingItem,g=f.width,b=f.visibleTimeStart,O=f.visibleTimeEnd,w=f.canvasTimeStart,_=f.canvasTimeEnd,S=this.state,T=S.dimensionItems,P=S.height,j=S.groupHeights,x=S.groupTops,E=O-b,M=(0,d.getCanvasWidth)(g),k=(0,d.getMinUnit)(E,g,s),R=!!p||!!h;if(R){var C=(0,d.stackTimelineItems)(n,r,M,this.state.canvasTimeStart,this.state.canvasTimeEnd,this.props.keys,this.props.lineHeight,this.props.itemHeightRatio,this.props.stackItems,this.state.draggingItem,this.state.resizingItem,this.state.dragTime,this.state.resizingEdge,this.state.resizeTime,this.state.newGroupOrder);T=C.dimensionItems,P=C.height,j=C.groupHeights,x=C.groupTops}var I={height:"".concat(P,"px")};return o.default.createElement(v.TimelineStateProvider,{visibleTimeStart:b,visibleTimeEnd:O,canvasTimeStart:w,canvasTimeEnd:_,canvasWidth:M,showPeriod:this.showPeriod,timelineUnit:k,timelineWidth:this.state.width},o.default.createElement(m.TimelineMarkersProvider,null,o.default.createElement(y.TimelineHeadersProvider,{registerScroll:this.handleHeaderRef,timeSteps:s,leftSidebarWidth:this.props.sidebarWidth,rightSidebarWidth:this.props.rightSidebarWidth},o.default.createElement("div",{style:this.props.style,ref:function(t){return e.container=t},className:"react-calendar-timeline ".concat(this.props.className)},this.renderHeaders(),o.default.createElement("div",{style:I,className:"rct-outer"},i>0?this.sidebar(P,j):null,o.default.createElement(l.default,{scrollRef:this.getScrollElementRef,width:g,height:P,onZoom:this.changeZoom,onWheelZoom:this.handleWheelZoom,traditionalZoom:u,onScroll:this.onScroll,isInteractingWithItem:R},o.default.createElement(c.default,null,this.columns(w,_,M,k,s,P),this.rows(M,j,r),this.items(w,E,_,M,k,T,j,x),this.childrenWithProps(w,_,M,T,j,x,P,b,O,k,s))),a>0?this.rightSidebar(P,j):null)))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.visibleTimeStart,r=e.visibleTimeEnd,o=e.items,i=e.groups,a={items:o,groups:i},s=o!==t.items||i!==t.groups;if(n&&r)Object.assign(a,(0,d.calculateScrollCanvas)(n,r,s,o,i,e,t));else if(s){var u=(0,d.getCanvasWidth)(t.width);Object.assign(a,(0,d.stackTimelineItems)(o,i,u,t.canvasTimeStart,t.canvasTimeEnd,e.keys,e.lineHeight,e.itemHeightRatio,e.stackItems,t.draggingItem,t.resizingItem,t.dragTime,t.resizingEdge,t.resizeTime,t.newGroupOrder))}return a}}]),t}(o.Component);t.default=M,E(M,"propTypes",{groups:r.default.oneOfType([r.default.array,r.default.object]).isRequired,items:r.default.oneOfType([r.default.array,r.default.object]).isRequired,sidebarWidth:r.default.number,rightSidebarWidth:r.default.number,dragSnap:r.default.number,minResizeWidth:r.default.number,stickyHeader:r.default.bool,lineHeight:r.default.number,itemHeightRatio:r.default.number,minZoom:r.default.number,maxZoom:r.default.number,clickTolerance:r.default.number,canChangeGroup:r.default.bool,canMove:r.default.bool,canResize:r.default.oneOf([!0,!1,"left","right","both"]),useResizeHandle:r.default.bool,canSelect:r.default.bool,stackItems:r.default.bool,traditionalZoom:r.default.bool,itemTouchSendsClick:r.default.bool,horizontalLineClassNamesForGroup:r.default.func,onItemMove:r.default.func,onItemResize:r.default.func,onItemClick:r.default.func,onItemSelect:r.default.func,onItemDeselect:r.default.func,onCanvasClick:r.default.func,onItemDoubleClick:r.default.func,onItemContextMenu:r.default.func,onCanvasDoubleClick:r.default.func,onCanvasContextMenu:r.default.func,onZoom:r.default.func,onItemDrag:r.default.func,moveResizeValidator:r.default.func,itemRenderer:r.default.func,groupRenderer:r.default.func,className:r.default.string,style:r.default.object,keys:r.default.shape({groupIdKey:r.default.string,groupTitleKey:r.default.string,groupLabelKey:r.default.string,groupRightTitleKey:r.default.string,itemIdKey:r.default.string,itemTitleKey:r.default.string,itemDivTitleKey:r.default.string,itemGroupKey:r.default.string,itemTimeStartKey:r.default.string,itemTimeEndKey:r.default.string}),headerRef:r.default.func,scrollRef:r.default.func,timeSteps:r.default.shape({second:r.default.number,minute:r.default.number,hour:r.default.number,day:r.default.number,month:r.default.number,year:r.default.number}),defaultTimeStart:r.default.object,defaultTimeEnd:r.default.object,visibleTimeStart:r.default.number,visibleTimeEnd:r.default.number,onTimeChange:r.default.func,onBoundsChange:r.default.func,selected:r.default.array,headerLabelFormats:r.default.shape({yearShort:r.default.string,yearLong:r.default.string,monthShort:r.default.string,monthMedium:r.default.string,monthMediumLong:r.default.string,monthLong:r.default.string,dayShort:r.default.string,dayLong:r.default.string,hourShort:r.default.string,hourMedium:r.default.string,hourMediumLong:r.default.string,hourLong:r.default.string}),subHeaderLabelFormats:r.default.shape({yearShort:r.default.string,yearLong:r.default.string,monthShort:r.default.string,monthMedium:r.default.string,monthLong:r.default.string,dayShort:r.default.string,dayMedium:r.default.string,dayMediumLong:r.default.string,dayLong:r.default.string,hourShort:r.default.string,hourLong:r.default.string,minuteShort:r.default.string,minuteLong:r.default.string}),resizeDetector:r.default.shape({addListener:r.default.func,removeListener:r.default.func}),verticalLineClassNamesForTime:r.default.func,children:r.default.node}),E(M,"defaultProps",{sidebarWidth:150,rightSidebarWidth:0,dragSnap:9e5,minResizeWidth:20,stickyHeader:!0,lineHeight:30,itemHeightRatio:.65,minZoom:36e5,maxZoom:15778368e4,clickTolerance:3,canChangeGroup:!0,canMove:!0,canResize:"right",useResizeHandle:!1,canSelect:!0,stackItems:!1,traditionalZoom:!1,horizontalLineClassNamesForGroup:null,onItemMove:null,onItemResize:null,onItemClick:null,onItemSelect:null,onItemDeselect:null,onItemDrag:null,onCanvasClick:null,onItemDoubleClick:null,onItemContextMenu:null,onZoom:null,verticalLineClassNamesForTime:null,moveResizeValidator:null,dayBackground:null,defaultTimeStart:null,defaultTimeEnd:null,itemTouchSendsClick:!1,style:{},className:"",keys:h.defaultKeys,timeSteps:h.defaultTimeSteps,headerRef:function(){},scrollRef:function(){},visibleTimeStart:null,visibleTimeEnd:null,onTimeChange:function(e,t,n){n(e,t)},onBoundsChange:null,children:null,headerLabelFormats:h.defaultHeaderLabelFormats,subHeaderLabelFormats:h.defaultSubHeaderLabelFormats,selected:null}),E(M,"childContextTypes",{getTimelineContext:r.default.func})},1405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(80)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),i=u(n(1406)),a=n(840),s=n(821);function u(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="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})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t="rct-item"+(n.props.item.className?" ".concat(n.props.item.className):"");return{key:n.itemId,ref:n.getItemRef,title:n.itemDivTitle,className:t+" ".concat(e.className?e.className:""),onMouseDown:(0,u.composeEvents)(n.onMouseDown,e.onMouseDown),onMouseUp:(0,u.composeEvents)(n.onMouseUp,e.onMouseUp),onTouchStart:(0,u.composeEvents)(n.onTouchStart,e.onTouchStart),onTouchEnd:(0,u.composeEvents)(n.onTouchEnd,e.onTouchEnd),onDoubleClick:(0,u.composeEvents)(n.handleDoubleClick,e.onDoubleClick),onContextMenu:(0,u.composeEvents)(n.handleContextMenu,e.onContextMenu),style:Object.assign({},n.getItemStyle(e))}})),b(y(n),"getResizeProps",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="rct-item-handler rct-item-handler-left rct-item-handler-resize-left";e.leftClassName&&(t+=" ".concat(e.leftClassName));var r="rct-item-handler rct-item-handler-right rct-item-handler-resize-right";return e.rightClassName&&(r+=" ".concat(e.rightClassName)),{left:{ref:n.getDragLeftRef,className:t,style:Object.assign({},d.leftResizeStyle,e.leftStyle)},right:{ref:n.getDragRightRef,className:r,style:Object.assign({},d.rightResizeStyle,e.rightStyle)}}})),n.cacheDataFromProps(e),n.state={interactMounted:!1,dragging:null,dragStart:null,preDragPosition:null,dragTime:null,dragGroupDelta:null,resizing:null,resizeEdge:null,resizeStart:null,resizeTime:null},n}var n,r,o;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}}),t&&g(e,t)}(t,e),n=t,(r=[{key:"shouldComponentUpdate",value:function(e,t){return t.dragging!==this.state.dragging||t.dragTime!==this.state.dragTime||t.dragGroupDelta!==this.state.dragGroupDelta||t.resizing!==this.state.resizing||t.resizeTime!==this.state.resizeTime||e.keys!==this.props.keys||!(0,s.deepObjectCompare)(e.itemProps,this.props.itemProps)||e.selected!==this.props.selected||e.item!==this.props.item||e.canvasTimeStart!==this.props.canvasTimeStart||e.canvasTimeEnd!==this.props.canvasTimeEnd||e.canvasWidth!==this.props.canvasWidth||(e.order?e.order.index:void 0)!==(this.props.order?this.props.order.index:void 0)||e.dragSnap!==this.props.dragSnap||e.minResizeWidth!==this.props.minResizeWidth||e.canChangeGroup!==this.props.canChangeGroup||e.canSelect!==this.props.canSelect||e.canMove!==this.props.canMove||e.canResizeLeft!==this.props.canResizeLeft||e.canResizeRight!==this.props.canResizeRight||e.dimensions!==this.props.dimensions}},{key:"cacheDataFromProps",value:function(e){this.itemId=(0,s._get)(e.item,e.keys.itemIdKey),this.itemTitle=(0,s._get)(e.item,e.keys.itemTitleKey),this.itemDivTitle=e.keys.itemDivTitleKey?(0,s._get)(e.item,e.keys.itemDivTitleKey):this.itemTitle,this.itemTimeStart=(0,s._get)(e.item,e.keys.itemTimeStartKey),this.itemTimeEnd=(0,s._get)(e.item,e.keys.itemTimeEndKey)}},{key:"getTimeRatio",value:function(){var e=this.props,t=e.canvasTimeStart,n=e.canvasTimeEnd,r=e.canvasWidth;return(0,c.coordinateToTimeRatio)(t,n,r)}},{key:"dragTimeSnap",value:function(e,t){var n=this.props.dragSnap;if(n){var r=t?60*(0,a.default)().utcOffset()*1e3:0;return Math.round(e/n)*n-r%n}return e}},{key:"resizeTimeSnap",value:function(e){var t=this.props.dragSnap;if(t){var n=this.itemTimeEnd%t;return Math.round((e-n)/t)*t+n}return e}},{key:"dragTime",value:function(e){var t=(0,a.default)(this.itemTimeStart);return this.state.dragging?this.dragTimeSnap(this.timeFor(e)+this.state.dragStart.offset,!0):t}},{key:"timeFor",value:function(e){var t=(0,c.coordinateToTimeRatio)(this.props.canvasTimeStart,this.props.canvasTimeEnd,this.props.canvasWidth),n=(0,f.getSumOffset)(this.props.scrollRef).offsetLeft,r=(0,f.getSumScroll)(this.props.scrollRef);return(e.pageX-n+r.scrollLeft)*t+this.props.canvasTimeStart}},{key:"dragGroupDelta",value:function(e){var t=this.props,n=t.groupTops,r=t.order;if(this.state.dragging){if(!this.props.canChangeGroup)return 0;for(var o=0,i=(0,f.getSumOffset)(this.props.scrollRef).offsetTop,a=(0,f.getSumScroll)(this.props.scrollRef),s=0,u=Object.keys(n);sc))break;o=parseInt(l,10)-r.index}return this.props.order.index+o<0?0-this.props.order.index:o}return 0}},{key:"resizeTimeDelta",value:function(e,t){var n=this.itemTimeEnd-this.itemTimeStart,r=this.dragTimeSnap((e.pageX-this.state.resizeStart)*this.getTimeRatio());return n+("left"===t?-r:r)<(this.props.dragSnap||1e3)?"left"===t?n-(this.props.dragSnap||1e3):(this.props.dragSnap||1e3)-n:r}},{key:"mountInteract",value:function(){var e=this,t=!this.props.useResizeHandle||".rct-item-handler-resize-left",n=!this.props.useResizeHandle||".rct-item-handler-resize-right";(0,i.default)(this.item).resizable({edges:{left:this.canResizeLeft()&&t,right:this.canResizeRight()&&n,top:!1,bottom:!1},enabled:this.props.selected&&(this.canResizeLeft()||this.canResizeRight())}).draggable({enabled:this.props.selected&&this.canMove()}).styleCursor(!1).on("dragstart",(function(t){if(!e.props.selected)return!1;var n=e.timeFor(t);e.setState({dragging:!0,dragStart:{x:t.pageX,y:t.pageY,offset:e.itemTimeStart-n},preDragPosition:{x:t.target.offsetLeft,y:t.target.offsetTop},dragTime:e.itemTimeStart,dragGroupDelta:0})})).on("dragmove",(function(t){if(e.state.dragging){var n=e.dragTime(t),r=e.dragGroupDelta(t);e.props.moveResizeValidator&&(n=e.props.moveResizeValidator("move",e.props.item,n)),e.props.onDrag&&e.props.onDrag(e.itemId,n,e.props.order.index+r),e.setState({dragTime:n,dragGroupDelta:r})}})).on("dragend",(function(t){if(e.state.dragging){if(e.props.onDrop){var n=e.dragTime(t);e.props.moveResizeValidator&&(n=e.props.moveResizeValidator("move",e.props.item,n)),e.props.onDrop(e.itemId,n,e.props.order.index+e.dragGroupDelta(t))}e.setState({dragging:!1,dragStart:null,preDragPosition:null,dragTime:null,dragGroupDelta:null})}})).on("resizestart",(function(t){if(!e.props.selected)return!1;e.setState({resizing:!0,resizeEdge:null,resizeStart:t.pageX,resizeTime:0})})).on("resizemove",(function(t){if(e.state.resizing){var n=e.state.resizeEdge;n||(n=0!==t.deltaRect.left?"left":"right",e.setState({resizeEdge:n}));var r=e.resizeTimeSnap(e.timeFor(t));e.props.moveResizeValidator&&(r=e.props.moveResizeValidator("resize",e.props.item,r,n)),e.props.onResizing&&e.props.onResizing(e.itemId,r,n),e.setState({resizeTime:r})}})).on("resizeend",(function(t){if(e.state.resizing){var n=e.state.resizeEdge,r=e.resizeTimeSnap(e.timeFor(t));e.props.moveResizeValidator&&(r=e.props.moveResizeValidator("resize",e.props.item,r,n)),e.props.onResized&&e.props.onResized(e.itemId,r,n,e.resizeTimeDelta(t,n)),e.setState({resizing:null,resizeStart:null,resizeEdge:null,resizeTime:null})}})).on("tap",(function(t){e.actualClick(t,"mouse"===t.pointerType?"click":"touch")})),this.setState({interactMounted:!0})}},{key:"canResizeLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(!e.canResizeLeft)return!1;var t=parseInt(e.dimensions.width,10);return t>=e.minResizeWidth}},{key:"canResizeRight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;if(!e.canResizeRight)return!1;var t=parseInt(e.dimensions.width,10);return t>=e.minResizeWidth}},{key:"canMove",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return!!e.canMove}},{key:"componentDidUpdate",value:function(e){this.cacheDataFromProps(this.props);var t=this.state.interactMounted,n=e.selected&&this.canMove(e),r=e.selected&&this.canResizeLeft(e),o=e.selected&&this.canResizeRight(e),a=this.props.selected&&this.canMove(this.props),s=this.props.selected&&this.canResizeLeft(this.props),u=this.props.selected&&this.canResizeRight(this.props);if(this.item){if(this.props.selected&&!t&&(this.mountInteract(),t=!0),t&&(r!==s||o!==u)){var l=!this.props.useResizeHandle||this.dragLeft,c=!this.props.useResizeHandle||this.dragRight;(0,i.default)(this.item).resizable({enabled:s||u,edges:{top:!1,bottom:!1,left:s&&l,right:u&&c}})}t&&n!==a&&(0,i.default)(this.item).draggable({enabled:a})}else t=!1;this.setState({interactMounted:t})}},{key:"actualClick",value:function(e,t){this.props.canSelect&&this.props.onSelect&&this.props.onSelect(this.itemId,t,e)}},{key:"getItemStyle",value:function(e){var t=this.props.dimensions,n={position:"absolute",boxSizing:"border-box",left:"".concat(t.left,"px"),top:"".concat(t.top,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),lineHeight:"".concat(t.height,"px")};return Object.assign({},d.overridableStyles,this.props.selected?d.selectedStyle:{},this.props.selected&this.canMove(this.props)?d.selectedAndCanMove:{},this.props.selected&this.canResizeLeft(this.props)?d.selectedAndCanResizeLeft:{},this.props.selected&this.canResizeLeft(this.props)&this.state.dragging?d.selectedAndCanResizeLeftAndDragLeft:{},this.props.selected&this.canResizeRight(this.props)?d.selectedAndCanResizeRight:{},this.props.selected&this.canResizeRight(this.props)&this.state.dragging?d.selectedAndCanResizeRightAndDragRight:{},e.style,n)}},{key:"render",value:function(){if("undefined"===typeof this.props.order||null===this.props.order)return null;var e=this.context.getTimelineContext(),t={dimensions:this.props.dimensions,useResizeHandle:this.props.useResizeHandle,title:this.itemTitle,canMove:this.canMove(this.props),canResizeLeft:this.canResizeLeft(this.props),canResizeRight:this.canResizeRight(this.props),selected:this.props.selected,dragging:this.state.dragging,dragStart:this.state.dragStart,dragTime:this.state.dragTime,dragGroupDelta:this.state.dragGroupDelta,resizing:this.state.resizing,resizeEdge:this.state.resizeEdge,resizeStart:this.state.resizeStart,resizeTime:this.state.resizeTime,width:this.props.dimensions.width};return this.props.itemRenderer({item:this.props.item,timelineContext:e,itemContext:t,getItemProps:this.getItemProps,getResizeProps:this.getResizeProps})}}])&&v(n.prototype,r),o&&v(n,o),t}(r.Component);t.default=O,b(O,"propTypes",{canvasTimeStart:o.default.number.isRequired,canvasTimeEnd:o.default.number.isRequired,canvasWidth:o.default.number.isRequired,order:o.default.object,dragSnap:o.default.number,minResizeWidth:o.default.number,selected:o.default.bool,canChangeGroup:o.default.bool.isRequired,canMove:o.default.bool.isRequired,canResizeLeft:o.default.bool.isRequired,canResizeRight:o.default.bool.isRequired,keys:o.default.object.isRequired,item:o.default.object.isRequired,onSelect:o.default.func,onDrag:o.default.func,onDrop:o.default.func,onResizing:o.default.func,onResized:o.default.func,onContextMenu:o.default.func,itemRenderer:o.default.func,itemProps:o.default.object,canSelect:o.default.bool,dimensions:o.default.object,groupTops:o.default.array,useResizeHandle:o.default.bool,moveResizeValidator:o.default.func,onItemDoubleClick:o.default.func,scrollRef:o.default.object}),b(O,"defaultProps",{selected:!1,itemRenderer:l.defaultItemRenderer}),b(O,"contextTypes",{getTimelineContext:o.default.func})},1407:function(e,t,n){e.exports=function(){var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e){return!(!e||!e.Window)&&e instanceof e.Window};var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.getWindow=function(t){return(0,e.default)(t)?t:(t.ownerDocument||t).defaultView||r.window},t.init=o,t.window=t.realWindow=void 0;var n=void 0;t.realWindow=n;var r=void 0;function o(e){t.realWindow=n=e;var o=e.document.createTextNode("");o.ownerDocument!==e.document&&"function"==typeof e.wrap&&e.wrap(o)===o&&(e=e.wrap(e)),t.window=r=e}t.window=r,"undefined"!=typeof window&&window&&o(window);var i={};function a(e){return(a="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})(e)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var s=function(e){return!!e&&"object"===a(e)},u=function(e){return"function"==typeof e},l={window:function(n){return n===t.window||(0,e.default)(n)},docFrag:function(e){return s(e)&&11===e.nodeType},object:s,func:u,number:function(e){return"number"==typeof e},bool:function(e){return"boolean"==typeof e},string:function(e){return"string"==typeof e},element:function(e){if(!e||"object"!==a(e))return!1;var n=t.getWindow(e)||t.window;return/object|function/.test("undefined"==typeof Element?"undefined":a(Element))?e instanceof Element||e instanceof n.Element:1===e.nodeType&&"string"==typeof e.nodeName},plainObject:function(e){return s(e)&&!!e.constructor&&/function Object\b/.test(e.constructor.toString())},array:function(e){return s(e)&&void 0!==e.length&&u(e.splice)}};i.default=l;var c={};function f(e){var t=e.interaction;if("drag"===t.prepared.name){var n=t.prepared.axis;"x"===n?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):"y"===n&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function d(e){var t=e.iEvent,n=e.interaction;if("drag"===n.prepared.name){var r=n.prepared.axis;if("x"===r||"y"===r){var o="x"===r?"y":"x";t.page[o]=n.coords.start.page[o],t.client[o]=n.coords.start.client[o],t.delta[o]=0}}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var p={id:"actions/drag",install:function(e){var t=e.actions,n=e.Interactable,r=e.defaults;n.prototype.draggable=p.draggable,t.map.drag=p,t.methodDict.drag="draggable",r.actions.drag=p.defaults},listeners:{"interactions:before-action-move":f,"interactions:action-resume":f,"interactions:action-move":d,"auto-start:check":function(e){var t=e.interaction,n=e.interactable,r=e.buttons,o=n.options.drag;if(o&&o.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||0!=(r&n.options.drag.mouseButtons)))return e.action={name:"drag",axis:"start"===o.lockAxis?o.startAxis:o.lockAxis},!1}},draggable:function(e){return i.default.object(e)?(this.options.drag.enabled=!1!==e.enabled,this.setPerAction("drag",e),this.setOnEvents("drag",e),/^(xy|x|y|start)$/.test(e.lockAxis)&&(this.options.drag.lockAxis=e.lockAxis),/^(xy|x|y)$/.test(e.startAxis)&&(this.options.drag.startAxis=e.startAxis),this):i.default.bool(e)?(this.options.drag.enabled=e,this):this.options.drag},beforeMove:f,move:d,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},h=p;c.default=h;var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var m={init:function(e){var t=e;m.document=t.document,m.DocumentFragment=t.DocumentFragment||y,m.SVGElement=t.SVGElement||y,m.SVGSVGElement=t.SVGSVGElement||y,m.SVGElementInstance=t.SVGElementInstance||y,m.Element=t.Element||y,m.HTMLElement=t.HTMLElement||m.Element,m.Event=t.Event,m.Touch=t.Touch||y,m.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function y(){}var g=m;v.default=g;var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var O={init:function(e){var t=v.default.Element,n=e.navigator||{};O.supportsTouch="ontouchstart"in e||i.default.func(e.DocumentTouch)&&v.default.document instanceof e.DocumentTouch,O.supportsPointerEvent=!1!==n.pointerEnabled&&!!v.default.PointerEvent,O.isIOS=/iP(hone|od|ad)/.test(n.platform),O.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),O.isIe9=/MSIE 9/.test(n.userAgent),O.isOperaMobile="Opera"===n.appName&&O.supportsTouch&&/Presto/.test(n.userAgent),O.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",O.pEventTypes=O.supportsPointerEvent?v.default.PointerEvent===e.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,O.wheelEvent=v.default.document&&"onmousewheel"in v.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},w=O;b.default=w;var _={};function S(e){var t=e.parentNode;if(i.default.docFrag(t)){for(;(t=t.host)&&i.default.docFrag(t););return t}return t}function T(e,n){return t.window!==t.realWindow&&(n=n.replace(/\/deep\//g," ")),e[b.default.prefixedMatchesSelector](n)}Object.defineProperty(_,"__esModule",{value:!0}),_.closest=function(e,t){for(;i.default.element(e);){if(T(e,t))return e;e=S(e)}return null},_.getActualElement=function(e){return e.correspondingUseElement||e},_.getElementClientRect=E,_.getElementRect=function(e){var n=E(e);if(!b.default.isIOS7&&n){var r=x(t.getWindow(e));n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n},_.getPath=function(e){for(var t=[];e;)t.push(e),e=S(e);return t},_.getScrollXY=x,_.indexOfDeepestElement=function(e){for(var n,r=[],o=0;o=(parseInt(t.getWindow(m).getComputedStyle(m).zIndex,10)||0)&&(n=o);else n=o}else n=o}var h,m;return n},_.matchesSelector=T,_.matchesUpTo=function(e,t,n){for(;i.default.element(e);){if(T(e,t))return!0;if((e=S(e))===n)return T(e,t)}return!1},_.nodeContains=function(e,t){if(e.contains)return e.contains(t);for(;t;){if(t===e)return!0;t=t.parentNode}return!1},_.parentNode=S,_.trySelector=function(e){return!!i.default.string(e)&&(v.default.document.querySelector(e),!0)};var P=function(e){return e.parentNode||e.host};function j(e,t){for(var n,r=[],o=e;(n=P(o))&&o!==t&&n!==o.ownerDocument;)r.unshift(o),o=n;return r}function x(e){return{x:(e=e||t.window).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop}}function E(e){var t=e instanceof v.default.SVGElement?e.getBoundingClientRect():e.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}var M={};Object.defineProperty(M,"__esModule",{value:!0}),M.default=function(e,t){for(var n in t)e[n]=t[n];return e};var k={};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?U(t):t[0];q(r,e.page),N(r,e.client),e.timeStamp=n},W.setZeroCoords=function(e){e.page.x=0,e.page.y=0,e.client.x=0,e.client.y=0},W.touchAngle=function(e,t){var n=t+"X",r=t+"Y",o=Y(e),i=o[1][n]-o[0][n],a=o[1][r]-o[0][r];return 180*Math.atan2(a,i)/Math.PI},W.touchBBox=function(e){if(!e.length)return null;var t=Y(e),n=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),o=Math.max(t[0].pageX,t[1].pageX),i=Math.max(t[0].pageY,t[1].pageY);return{x:n,y:r,left:n,top:r,right:o,bottom:i,width:o-n,height:i-r}},W.touchDistance=function(e,t){var n=t+"X",r=t+"Y",o=Y(e),i=o[0][n]-o[1][n],a=o[0][r]-o[1][r];return(0,A.default)(i,a)};var G={};function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(G,"__esModule",{value:!0}),G.BaseEvent=void 0;var X=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),K(this,"immediatePropagationStopped",!1),K(this,"propagationStopped",!1),this._interaction=t}var t,n;return t=e,(n=[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}])&&function(e,t){for(var n=0;ns.left&&f.xs.top&&f.y=s.left&&v<=s.right&&m>=s.top&&m<=s.bottom}return h&&i.default.number(l)&&(u=Math.max(0,Math.min(s.right,h.right)-Math.max(s.left,h.left))*Math.max(0,Math.min(s.bottom,h.bottom)-Math.max(s.top,h.top))/(h.width*h.height)>=l),e.options.drop.checker&&(u=e.options.drop.checker(t,n,u,e,a,r,o)),u}(this,e,t,n,r,o,a)},n.dynamicDrop=function(t){return i.default.bool(t)?(e.dynamicDrop=t,n):e.dynamicDrop},(0,M.default)(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",e.dynamicDrop=!1,o.actions.drop=de.defaults},listeners:{"interactions:before-action-start":function(e){var t=e.interaction;"drag"===t.prepared.name&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(e,t){var n=e.interaction,r=(e.event,e.iEvent);if("drag"===n.prepared.name){var o=n.dropState;o.activeDrops=null,o.events=null,o.activeDrops=se(t,n.element),o.events=le(n,0,r),o.events.activate&&(ae(o.activeDrops,o.events.activate),t.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":fe,"interactions:after-action-move":function(e,t){var n=e.interaction,r=e.iEvent;"drag"===n.prepared.name&&(ce(n,n.dropState.events),t.fire("actions/drop:move",{interaction:n,dragEvent:r}),n.dropState.events={})},"interactions:action-end":function(e,t){if("drag"===e.interaction.prepared.name){var n=e.interaction,r=e.iEvent;fe(e,t),ce(n,n.dropState.events),t.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(e){var t=e.interaction;if("drag"===t.prepared.name){var n=t.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:se,getDrop:ue,getDropEvents:le,fireDropEvents:ce,defaults:{enabled:!1,accept:null,overlap:"pointer"}},pe=de;ie.default=pe;var he={};function ve(e){var t=e.interaction,n=e.iEvent,r=e.phase;if("gesture"===t.prepared.name){var o=t.pointers.map((function(e){return e.pointer})),a="start"===r,s="end"===r,u=t.interactable.options.deltaSource;if(n.touches=[o[0],o[1]],a)n.distance=W.touchDistance(o,u),n.box=W.touchBBox(o),n.scale=1,n.ds=0,n.angle=W.touchAngle(o,u),n.da=0,t.gesture.startDistance=n.distance,t.gesture.startAngle=n.angle;else if(s){var l=t.prevEvent;n.distance=l.distance,n.box=l.box,n.scale=l.scale,n.ds=0,n.angle=l.angle,n.da=0}else n.distance=W.touchDistance(o,u),n.box=W.touchBBox(o),n.scale=n.distance/t.gesture.startDistance,n.angle=W.touchAngle(o,u),n.ds=n.scale-t.gesture.scale,n.da=n.angle-t.gesture.angle;t.gesture.distance=n.distance,t.gesture.angle=n.angle,i.default.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(t.gesture.scale=n.scale)}}Object.defineProperty(he,"__esModule",{value:!0}),he.default=void 0;var me={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(e){var t=e.actions,n=e.Interactable,r=e.defaults;n.prototype.gesturable=function(e){return i.default.object(e)?(this.options.gesture.enabled=!1!==e.enabled,this.setPerAction("gesture",e),this.setOnEvents("gesture",e),this):i.default.bool(e)?(this.options.gesture.enabled=e,this):this.options.gesture},t.map.gesture=me,t.methodDict.gesture="gesturable",r.actions.gesture=me.defaults},listeners:{"interactions:action-start":ve,"interactions:action-move":ve,"interactions:action-end":ve,"interactions:new":function(e){e.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(e){if(!(e.interaction.pointers.length<2)){var t=e.interactable.options.gesture;if(t&&t.enabled)return e.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},ye=me;he.default=ye;var ge={};function be(e,t,n,r,o,a,s){if(!t)return!1;if(!0===t){var u=i.default.number(a.width)?a.width:a.right-a.left,l=i.default.number(a.height)?a.height:a.bottom-a.top;if(s=Math.min(s,Math.abs(("left"===e||"right"===e?u:l)/2)),u<0&&("left"===e?e="right":"right"===e&&(e="left")),l<0&&("top"===e?e="bottom":"bottom"===e&&(e="top")),"left"===e){var c=u>=0?a.left:a.right;return n.x=0?a.top:a.bottom;return n.y(u>=0?a.right:a.left)-s;if("bottom"===e)return n.y>(l>=0?a.bottom:a.top)-s}return!!i.default.element(r)&&(i.default.element(t)?t===r:_.matchesUpTo(r,t,o))}function Oe(e){var t=e.iEvent,n=e.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var r=t;n.interactable.options.resize.square?("y"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,"x"===n.resizeAxes?r.delta.y=0:"y"===n.resizeAxes&&(r.delta.x=0))}}Object.defineProperty(ge,"__esModule",{value:!0}),ge.default=void 0;var we={id:"actions/resize",before:["actions/drag"],install:function(e){var t=e.actions,n=e.browser,r=e.Interactable,o=e.defaults;we.cursors=function(e){return e.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),we.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(t){return function(e,t,n){return i.default.object(t)?(e.options.resize.enabled=!1!==t.enabled,e.setPerAction("resize",t),e.setOnEvents("resize",t),i.default.string(t.axis)&&/^x$|^y$|^xy$/.test(t.axis)?e.options.resize.axis=t.axis:null===t.axis&&(e.options.resize.axis=n.defaults.actions.resize.axis),i.default.bool(t.preserveAspectRatio)?e.options.resize.preserveAspectRatio=t.preserveAspectRatio:i.default.bool(t.square)&&(e.options.resize.square=t.square),e):i.default.bool(t)?(e.options.resize.enabled=t,e):e.options.resize}(this,t,e)},t.map.resize=we,t.methodDict.resize="resizable",o.actions.resize=we.defaults},listeners:{"interactions:new":function(e){e.interaction.resizeAxes="xy"},"interactions:action-start":function(e){!function(e){var t=e.iEvent,n=e.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=t,o=n.rect;n._rects={start:(0,M.default)({},o),corrected:(0,M.default)({},o),previous:(0,M.default)({},o),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(e),Oe(e)},"interactions:action-move":function(e){!function(e){var t=e.iEvent,n=e.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=t,o=n.interactable.options.resize.invert,i="reposition"===o||"negate"===o,a=n.rect,s=n._rects,u=s.start,l=s.corrected,c=s.delta,f=s.previous;if((0,M.default)(f,l),i){if((0,M.default)(l,a),"reposition"===o){if(l.top>l.bottom){var d=l.top;l.top=l.bottom,l.bottom=d}if(l.left>l.right){var p=l.left;l.left=l.right,l.right=p}}}else l.top=Math.min(a.top,u.bottom),l.bottom=Math.max(a.bottom,u.top),l.left=Math.min(a.left,u.right),l.right=Math.max(a.right,u.left);for(var h in l.width=l.right-l.left,l.height=l.bottom-l.top,l)c[h]=l[h]-f[h];r.edges=n.prepared.edges,r.rect=l,r.deltaRect=c}}(e),Oe(e)},"interactions:action-end":function(e){var t=e.iEvent,n=e.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=t;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(e){var t=e.interaction,n=e.interactable,r=e.element,o=e.rect,a=e.buttons;if(o){var s=(0,M.default)({},t.coords.cur.page),u=n.options.resize;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||0!=(a&u.mouseButtons))){if(i.default.object(u.edges)){var l={left:!1,right:!1,top:!1,bottom:!1};for(var c in l)l[c]=be(c,u.edges[c],s,t._latestPointer.eventTarget,r,o,u.margin||we.defaultMargin);l.left=l.left&&!l.right,l.top=l.top&&!l.bottom,(l.left||l.right||l.top||l.bottom)&&(e.action={name:"resize",edges:l})}else{var f="y"!==u.axis&&s.x>o.right-we.defaultMargin,d="x"!==u.axis&&s.y>o.bottom-we.defaultMargin;(f||d)&&(e.action={name:"resize",axes:(f?"x":"")+(d?"y":"")})}return!e.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(e){var t=e.edges,n=e.axis,r=e.name,o=we.cursors,i=null;if(n)i=o[r+n];else if(t){for(var a="",s=["top","bottom","left","right"],u=0;u=1){var c={x:Re.x*l,y:Re.y*l};if(c.x||c.y){var f=Ie(a);i.default.window(a)?a.scrollBy(c.x,c.y):a&&(a.scrollLeft+=c.x,a.scrollTop+=c.y);var d=Ie(a),p={x:d.x-f.x,y:d.y-f.y};(p.x||p.y)&&t.fire({type:"autoscroll",target:n,interactable:t,delta:p,interaction:e,container:a})}Re.prevTime=s}Re.isScrolling&&(Pe.default.cancel(Re.i),Re.i=Pe.default.request(Re.scroll))},check:function(e,t){var n;return null==(n=e.options[t].autoScroll)?void 0:n.enabled},onInteractionMove:function(e){var t=e.interaction,n=e.pointer;if(t.interacting()&&Re.check(t.interactable,t.prepared.name))if(t.simulation)Re.x=Re.y=0;else{var r,o,a,s,u=t.interactable,l=t.element,c=t.prepared.name,f=u.options[c].autoScroll,d=Ce(f.container,u,l);if(i.default.window(d))s=n.clientXd.innerWidth-Re.margin,a=n.clientY>d.innerHeight-Re.margin;else{var p=_.getElementClientRect(d);s=n.clientXp.right-Re.margin,a=n.clientY>p.bottom-Re.margin}Re.x=o?1:s?-1:0,Re.y=a?1:r?-1:0,Re.isScrolling||(Re.margin=f.margin,Re.speed=f.speed,Re.start(t))}}};function Ce(e,n,r){return(i.default.string(e)?(0,k.getStringOptionResult)(e,n,r):e)||(0,t.getWindow)(r)}function Ie(e){return i.default.window(e)&&(e=window.document.body),{x:e.scrollLeft,y:e.scrollTop}}var De={id:"auto-scroll",install:function(e){var t=e.defaults,n=e.actions;e.autoScroll=Re,Re.now=function(){return e.now()},n.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Re.defaults},listeners:{"interactions:new":function(e){e.interaction.autoScroll=null},"interactions:destroy":function(e){e.interaction.autoScroll=null,Re.stop(),Re.interaction&&(Re.interaction=null)},"interactions:stop":Re.stop,"interactions:action-move":function(e){return Re.onInteractionMove(e)}}};ke.default=De;var ze={};Object.defineProperty(ze,"__esModule",{value:!0}),ze.copyAction=function(e,t){return e.name=t.name,e.axis=t.axis,e.edges=t.edges,e},ze.sign=void 0,ze.warnOnce=function(e,n){var r=!1;return function(){return r||(t.window.console.warn(n),r=!0),e.apply(this,arguments)}},ze.sign=function(e){return e>=0?1:-1};var Ae={};function Le(e){return i.default.bool(e)?(this.options.styleCursor=e,this):null===e?(delete this.options.styleCursor,this):this.options.styleCursor}function We(e){return i.default.func(e)?(this.options.actionChecker=e,this):null===e?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.default=void 0;var He={id:"auto-start/interactableMethods",install:function(e){var t=e.Interactable;t.prototype.getAction=function(t,n,r,o){var i=function(e,t,n,r,o){var i=e.getRect(r),a={action:null,interactable:e,interaction:n,element:r,rect:i,buttons:t.buttons||{0:1,1:4,3:8,4:16}[t.button]};return o.fire("auto-start:check",a),a.action}(this,n,r,o,e);return this.options.actionChecker?this.options.actionChecker(t,n,i,this,o,r):i},t.prototype.ignoreFrom=(0,ze.warnOnce)((function(e){return this._backCompatOption("ignoreFrom",e)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=(0,ze.warnOnce)((function(e){return this._backCompatOption("allowFrom",e)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=We,t.prototype.styleCursor=Le}};Ae.default=He;var Fe={};function qe(e,t,n,r,o){return t.testIgnoreAllow(t.options[e.name],n,r)&&t.options[e.name].enabled&&Ge(t,n,e,o)?e:null}function Ne(e,t,n,r,o,i,a){for(var s=0,u=r.length;s=s)return!1;if(d.interactable===e){if((l+=p===n.name?1:0)>=i)return!1;if(d.element===t&&(c++,p===n.name&&c>=a))return!1}}}return s>0}function Ke(e,t){return i.default.number(e)?(t.autoStart.maxInteractions=e,this):t.autoStart.maxInteractions}function Xe(e,t,n){var r=n.autoStart.cursorElement;r&&r!==e&&(r.style.cursor=""),e.ownerDocument.documentElement.style.cursor=t,e.style.cursor=t,n.autoStart.cursorElement=t?e:null}function Be(e,t){var n=e.interactable,r=e.element,o=e.prepared;if("mouse"===e.pointerType&&n&&n.options.styleCursor){var a="";if(o.name){var s=n.options[o.name].cursorChecker;a=i.default.func(s)?s(o,n,r,e._interacting):t.actions.map[o.name].getCursor(o)}Xe(e.element,a||"",t)}else t.autoStart.cursorElement&&Xe(t.autoStart.cursorElement,"",t)}Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.default=void 0;var Ve={id:"auto-start/base",before:["actions"],install:function(e){var t=e.interactStatic,n=e.defaults;e.usePlugin(Ae.default),n.base.actionChecker=null,n.base.styleCursor=!0,(0,M.default)(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(t){return Ke(t,e)},e.autoStart={maxInteractions:1/0,withinInteractionLimit:Ge,cursorElement:null}},listeners:{"interactions:down":function(e,t){var n=e.interaction,r=e.pointer,o=e.event,i=e.eventTarget;n.interacting()||Ue(n,Ye(n,r,o,i,t),t)},"interactions:move":function(e,t){!function(e,t){var n=e.interaction,r=e.pointer,o=e.event,i=e.eventTarget;"mouse"!==n.pointerType||n.pointerIsDown||n.interacting()||Ue(n,Ye(n,r,o,i,t),t)}(e,t),function(e,t){var n=e.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){t.fire("autoStart:before-start",e);var r=n.interactable,o=n.prepared.name;o&&r&&(r.options[o].manualStart||!Ge(r,n.element,n.prepared,t)?n.stop():(n.start(n.prepared,r,n.element),Be(n,t)))}}(e,t)},"interactions:stop":function(e,t){var n=e.interaction,r=n.interactable;r&&r.options.styleCursor&&Xe(n.element,"",t)}},maxInteractions:Ke,withinInteractionLimit:Ge,validateAction:qe};Fe.default=Ve;var Ze={};Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.default=void 0;var $e={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(e,t){var n=e.interaction,r=e.eventTarget,o=e.dx,a=e.dy;if("drag"===n.prepared.name){var s=Math.abs(o),u=Math.abs(a),l=n.interactable.options.drag,c=l.startAxis,f=s>u?"x":s0&&(t.autoStartHoldTimer=setTimeout((function(){t.start(t.prepared,t.interactable,t.element)}),n))},"interactions:move":function(e){var t=e.interaction,n=e.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!n&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(e){var t=e.interaction;Qe(t)>0&&(t.prepared.name=null)}},getHoldDuration:Qe};Je.default=et;var tt={};Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt={id:"auto-start",install:function(e){e.usePlugin(Fe.default),e.usePlugin(Je.default),e.usePlugin(Ze.default)}};tt.default=nt;var rt={};function ot(e){return/^(always|never|auto)$/.test(e)?(this.options.preventDefault=e,this):i.default.bool(e)?(this.options.preventDefault=e?"always":"never",this):this.options.preventDefault}function it(e){var t=e.interaction,n=e.event;t.interactable&&t.interactable.checkAndPreventDefault(n)}function at(e){var n=e.Interactable;n.prototype.preventDefault=ot,n.prototype.checkAndPreventDefault=function(n){return function(e,n,r){var o=e.options.preventDefault;if("never"!==o)if("always"!==o){if(n.events.supportsPassive&&/^touch(start|move)$/.test(r.type)){var a=(0,t.getWindow)(r.target).document,s=n.getDocOptions(a);if(!s||!s.events||!1!==s.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(r.type)||i.default.element(r.target)&&(0,_.matchesSelector)(r.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||r.preventDefault()}else r.preventDefault()}(this,e,n)},e.interactions.docEvents.push({type:"dragstart",listener:function(t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n150)return null;var t=180*Math.atan2(e.prevEvent.velocityY,e.prevEvent.velocityX)/Math.PI;t<0&&(t+=360);var n=112.5<=t&&t<247.5,r=202.5<=t&&t<337.5;return{up:r,down:!r&&22.5<=t&&t<157.5,left:n,right:!n&&(292.5<=t||t<67.5),angle:t,speed:e.prevEvent.speed,velocity:{x:e.prevEvent.velocityX,y:e.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}])&&function(e,t){for(var n=0;nthis.pointerMoveTolerance);var a=this.getPointerIndex(e),s={pointer:e,pointerIndex:a,pointerInfo:this.pointers[a],event:t,type:"move",eventTarget:n,dx:r,dy:o,duplicate:i,interaction:this};i||W.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",s),i||this.simulation||(this.interacting()&&(s.type=null,this.move(s)),this.pointerWasMoved&&W.copyCoords(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||W.setZeroCoords(this.coords.delta),(e=(0,M.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,t,n,r){var o=this.getPointerIndex(e);-1===o&&(o=this.updatePointer(e,t,n,!1));var i=/cancel$/i.test(t.type)?"cancel":"up";this._scopeFire("interactions:".concat(i),{pointer:e,pointerIndex:o,pointerInfo:this.pointers[o],event:t,eventTarget:n,type:i,curEventTarget:r,interaction:this}),this.simulation||this.end(t),this.removePointer(e,t)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var t;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(t=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,!0===t&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var t=W.getPointerId(e);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:B.findIndex(this.pointers,(function(e){return e.id===t}))}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,t,n,r){var o=W.getPointerId(e),i=this.getPointerIndex(e),a=this.pointers[i];return r=!1!==r&&(r||/(down|start)$/i.test(t.type)),a?a.pointer=e:(a=new Rt.PointerInfo(o,e,t,null,null),i=this.pointers.length,this.pointers.push(a)),W.setCoords(this.coords.cur,this.pointers.map((function(e){return e.pointer})),this._now()),W.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=n,W.pointerExtend(this.downPointer,e),this.interacting()||(W.copyCoords(this.coords.start,this.coords.cur),W.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=t,this.pointerWasMoved=!1)),this._updateLatestPointer(e,t,n),this._scopeFire("interactions:update-pointer",{pointer:e,event:t,eventTarget:n,down:r,pointerInfo:a,pointerIndex:i,interaction:this}),i}},{key:"removePointer",value:function(e,t){var n=this.getPointerIndex(e);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:e,event:t,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,t,n){this._latestPointer.pointer=e,this._latestPointer.event=t,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,t,n,r){return new St.InteractEvent(this,e,this.prepared.name,t,this.element,n,r)}},{key:"_fireEvent",value:function(e){var t;null==(t=this.interactable)||t.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var t=e.event,n=e.phase,r=e.preEnd,o=e.type,i=this.rect;if(i&&"move"===n&&(k.addEdges(this.edges,i,this.coords.delta[this.interactable.options.deltaSource]),i.width=i.right-i.left,i.height=i.bottom-i.top),!1===this._scopeFire("interactions:before-action-".concat(n),e))return!1;var a=e.iEvent=this._createPreparedEvent(t,n,r,o);return this._scopeFire("interactions:action-".concat(n),e),"start"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-".concat(n),e),!0}},{key:"_now",value:function(){return Date.now()}}])&&function(e,t){for(var n=0;nn.minSpeed&&o>n.endSpeed)this.startInertia();else{if(i.result=i.setAll(this.modifierArg),!i.result.changed)return!1;this.startSmoothEnd()}return t.modification.result.rect=null,t.offsetBy(this.targetOffset),t._doPhase({interaction:t,event:e,phase:"inertiastart"}),t.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),t.modification.result.rect=null,this.active=!0,t.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,t=this.interaction.coords.velocity.client,n=Jt(this.interaction),r=n.resistance,o=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(t.x-o)/r,y:(t.y-o)/r},this.te=o,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var i=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},i.result=i.setAll(a),i.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+i.result.delta.x,y:this.targetOffset.y+i.result.delta.y}),this.onNextFrame((function(){return e.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return e.smoothEndTick()}))}},{key:"onNextFrame",value:function(e){var t=this;this.timeout=Pe.default.request((function(){t.active&&e()}))}},{key:"inertiaTick",value:function(){var e,t,n,r,o,i=this,a=this.interaction,s=Jt(a).resistance,u=(a._now()-this.t0)/1e3;if(u=0;n--){var r=t[n],o=r.selector,a=r.context,s=r.listeners;o===this.target&&a===this._context&&t.splice(n,1);for(var u=s.length-1;u>=0;u--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[u][0],s[u][1])}else this._scopeEvents.remove(this.target,"all")}}])&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;a--){var p=f[a];if(p.selector===e&&p.context===t){for(var h=p.listeners,v=h.length-1;v>=0;v--){var m=yn(h[v],2),y=m[0],g=m[1],b=g.capture,O=g.passive;if(y===o&&b===s.capture&&O===s.passive){h.splice(v,1),h.length||(f.splice(a,1),u(t,n,l),u(t,n,c,!0)),d=!0;break}}if(d)break}}},delegateListener:l,delegateUseCapture:c,delegatedEvents:r,documents:o,targets:n,supportsOptions:!1,supportsPassive:!1};function s(e,t,r,o){var i=On(o),s=B.find(n,(function(t){return t.eventTarget===e}));s||(s={eventTarget:e,events:{}},n.push(s)),s.events[t]||(s.events[t]=[]),e.addEventListener&&!B.contains(s.events[t],r)&&(e.addEventListener(t,r,a.supportsOptions?i:i.capture),s.events[t].push(r))}function u(e,t,r,o){var i=On(o),s=B.findIndex(n,(function(t){return t.eventTarget===e})),l=n[s];if(l&&l.events)if("all"!==t){var c=!1,f=l.events[t];if(f){if("all"===r){for(var d=f.length-1;d>=0;d--)u(e,t,f[d],i);return}for(var p=0;p=2)continue;if(!o.interacting()&&t===o.pointerType)return o}return null}};function Tn(e,t){return e.pointers.some((function(e){return e.id===t}))}var Pn=Sn;_n.default=Pn;var jn={};function xn(e){return(xn="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})(e)}function En(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mn(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 Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;r--){var o=t.interactions.list[r];o.interactable===n&&(o.stop(),t.fire("interactions:destroy",{interaction:o}),o.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:Ln,doOnInteractions:zn,methodNames:Dn};jn.default=Wn;var Hn={};function Fn(e){return(Fn="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})(e)}function qn(){return(qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Nn(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(this,arguments)}function Nn(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gn(e)););return e}function Yn(e,t){return(Yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Un(e,t){if(t&&("object"===Fn(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)}function Gn(e){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xn(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);nMath.abs(u.y),s.coords,s.rect),(0,M.default)(r,s.coords)),s.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function mr(e,t,n){var r=e.startCoords,o=e.edgeSign;t?n.y=r.y+(n.x-r.x)*o.y:n.x=r.x+(n.y-r.y)*o.x}function yr(e,t,n,r){var o=e.startRect,i=e.startCoords,a=e.ratio,s=e.edgeSign;if(t){var u=r.width/a;n.y=i.y+(u-o.height)*s.y}else{var l=r.height*a;n.x=i.x+(l-o.width)*s.x}}fr.aspectRatio=vr;var gr=(0,bt.makeModifier)(vr,"aspectRatio");fr.default=gr;var br={};Object.defineProperty(br,"__esModule",{value:!0}),br.default=void 0;var Or=function(){};Or._defaults={};var wr=Or;br.default=wr;var _r={};Object.defineProperty(_r,"__esModule",{value:!0}),Object.defineProperty(_r,"default",{enumerable:!0,get:function(){return br.default}});var Sr={};function Tr(e,t,n){return i.default.func(e)?k.resolveRectLike(e,t.interactable,t.element,[n.x,n.y,t]):k.resolveRectLike(e,t.interactable,t.element)}Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.default=void 0,Sr.getRestrictionRect=Tr,Sr.restrict=void 0;var Pr={start:function(e){var t=e.rect,n=e.startOffset,r=e.state,o=e.interaction,i=e.pageCoords,a=r.options,s=a.elementRect,u=(0,M.default)({left:0,top:0,right:0,bottom:0},a.offset||{});if(t&&s){var l=Tr(a.restriction,o,i);if(l){var c=l.right-l.left-t.width,f=l.bottom-l.top-t.height;c<0&&(u.left+=c,u.right+=c),f<0&&(u.top+=f,u.bottom+=f)}u.left+=n.left-t.width*s.left,u.top+=n.top-t.height*s.top,u.right+=n.right-t.width*(1-s.right),u.bottom+=n.bottom-t.height*(1-s.bottom)}r.offset=u},set:function(e){var t=e.coords,n=e.interaction,r=e.state,o=r.options,i=r.offset,a=Tr(o.restriction,n,t);if(a){var s=k.xywhToTlbr(a);t.x=Math.max(Math.min(s.right-i.right,t.x),s.left+i.left),t.y=Math.max(Math.min(s.bottom-i.bottom,t.y),s.top+i.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};Sr.restrict=Pr;var jr=(0,bt.makeModifier)(Pr,"restrict");Sr.default=jr;var xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.restrictEdges=xr.default=void 0;var Er={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mr={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function kr(e,t){for(var n=["top","left","bottom","right"],r=0;re.length)&&(t=e.length);for(var n=0,r=Array(t);ns))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var c=-1,f=!0,d=2&n?new oe:void 0;for(i.set(e,t),i.set(t,e);++c-1},ne.prototype.set=function(e,t){var n=this.__data__,r=se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},re.prototype.clear=function(){this.size=0,this.__data__={hash:new te,map:new(Y||ne),string:new te}},re.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},re.prototype.get=function(e){return ve(this,e).get(e)},re.prototype.has=function(e){return ve(this,e).has(e)},re.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},oe.prototype.add=oe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},oe.prototype.has=function(e){return this.__data__.has(e)},ie.prototype.clear=function(){this.__data__=new ne,this.size=0},ie.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ie.prototype.get=function(e){return this.__data__.get(e)},ie.prototype.has=function(e){return this.__data__.has(e)},ie.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!Y||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this};var ye=H?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Me=g?function(e){return function(t){return e(t)}}(g):function(e){return Ee(e)&&je(e.length)&&!!l[ue(e)]};function ke(e){return null!=(t=e)&&je(t.length)&&!Pe(t)?ae(e):de(e);var t}n.exports=function(e,t){return ce(e,t)}}).call(this,n(101),n(749)(e))},1409:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultItemRenderer=void 0;var r=i(n(2)),o=i(n(80));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t=e.item,n=e.itemContext,o=e.getItemProps,i=(0,e.getResizeProps)(),a=i.left,s=i.right;return r.default.createElement("div",o(t.itemProps),n.useResizeHandle?r.default.createElement("div",a):"",r.default.createElement("div",{className:"rct-item-content",style:{maxHeight:"".concat(n.dimensions.height)}},n.title),n.useResizeHandle?r.default.createElement("div",s):"")};t.defaultItemRenderer=a,a.propTypes={item:o.default.any,itemContext:o.default.any,getItemProps:o.default.any,getResizeProps:o.default.any}},1410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rightResizeStyle=t.leftResizeStyle=t.selectedAndCanResizeRightAndDragRight=t.selectedAndCanResizeRight=t.selectedAndCanResizeLeftAndDragLeft=t.selectedAndCanResizeLeft=t.selectedAndCanMove=t.selectedStyle=t.overridableStyles=void 0;t.overridableStyles={fontSize:12,color:"white",cursor:"pointer",background:"#2196f3",border:"1px solid #1a6fb3",zIndex:80};t.selectedStyle={background:"#ffc107",border:"1px solid #ff9800",zIndex:82};t.selectedAndCanMove={cursor:"move"};t.selectedAndCanResizeLeft={borderLeftWidth:3};t.selectedAndCanResizeLeftAndDragLeft={cursor:"w-resize"};t.selectedAndCanResizeRight={borderRightWidth:3};t.selectedAndCanResizeRightAndDragRight={cursor:"e-resize"};t.leftResizeStyle={position:"absolute",width:24,maxWidth:"20%",minWidth:2,height:"100%",top:0,left:0,cursor:"pointer",zIndex:88};t.rightResizeStyle={position:"absolute",width:24,maxWidth:"20%",minWidth:2,height:"100%",top:0,right:0,cursor:"pointer",zIndex:88}},1411:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(80))&&r.__esModule?r:{default:r},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),a=n(840);function s(e){return(s="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})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;nn.props.clickTolerance&&(n.cancelClick=!0)})),p(f(n),"handleClick",(function(e){n.cancelClick||n.props.onClick(e),n.cancelClick=!1,n.originClickX=null})),n}var n,r,i;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}}),t&&d(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=o.default.Children.only(this.props.children);return o.default.cloneElement(e,{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick})}}])&&u(n.prototype,r),i&&u(n,i),t}(o.Component);p(h,"propTypes",{children:i.default.element.isRequired,onClick:i.default.func.isRequired,clickTolerance:i.default.number.isRequired});var v=h;t.default=v},1417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(2)),i=(r=n(80))&&r.__esModule?r:{default:r},a=n(1060);function s(e){return(s="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})(e)}function u(e,t){for(var n=0;nMath.abs(h),m=3*Math.abs(h)>Math.abs(p);0!==d&&v&&e.props.onScroll(e.scrollComponent.scrollLeft-d),m&&window.scrollTo(window.pageXOffset,e.singleTouchStart.screenY-h)}})),d(c(e),"handleTouchEnd",(function(){e.lastTouchDistance&&(e.lastTouchDistance=null),e.lastSingleTouch&&(e.lastSingleTouch=null,e.singleTouchStart=null)})),e.state={isDragging:!1},e}var n,r,i;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}}),t&&f(e,t)}(t,e),n=t,(r=[{key:"componentWillUnmount",value:function(){this.scrollComponent&&this.scrollComponent.removeEventListener("wheel",this.handleWheel)}},{key:"render",value:function(){var e=this.props,t=e.width,n=e.height,r=e.children,i=this.state.isDragging,a={width:"".concat(t,"px"),height:"".concat(n+20,"px"),cursor:i?"move":"default",position:"relative"};return o.default.createElement("div",{ref:this.refHandler,className:"rct-scroll",style:a,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onScroll:this.handleScroll},r)}}])&&u(n.prototype,r),i&&u(n,i),t}(o.Component);d(p,"propTypes",{children:i.default.element.isRequired,width:i.default.number.isRequired,height:i.default.number.isRequired,traditionalZoom:i.default.bool.isRequired,scrollRef:i.default.func.isRequired,isInteractingWithItem:i.default.bool.isRequired,onZoom:i.default.func.isRequired,onWheelZoom:i.default.func.isRequired,onScroll:i.default.func.isRequired});var h=p;t.default=h},1418:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(2)),o=u(n(80)),i=n(1061),a=u(n(1419)),s=n(853);function u(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return c({},n.props.getIntervalProps(c({interval:n.props.interval},e)),{onClick:(0,a.composeEvents)(n.onIntervalClick,e.onClick)})})),n}var n,o,s;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}}),t&&m(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=this.props,t=e.intervalText,n=e.interval,o=e.intervalRenderer,i=e.headerData,a=o;return a?r.default.createElement(a,{getIntervalProps:this.getIntervalProps,intervalContext:{interval:n,intervalText:t},data:i}):r.default.createElement("div",l({},this.getIntervalProps({}),{className:"rct-dateHeader ".concat(this.props.primaryHeader?"rct-dateHeader-primary":"")}),r.default.createElement("span",null,t))}}])&&d(n.prototype,o),s&&d(n,s),t}(r.default.PureComponent);y(g,"propTypes",{intervalRenderer:o.default.func,unit:o.default.string.isRequired,interval:o.default.object.isRequired,showPeriod:o.default.func.isRequired,intervalText:o.default.string.isRequired,primaryHeader:o.default.bool.isRequired,getIntervalProps:o.default.func.isRequired,headerData:o.default.object});var b=g;t.default=b},1427:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e.children||null};t.default=r},1428:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(2)),o=s(n(80)),i=n(875),a=n(914);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1){var s=a.get(n);a.set(n,s-s%r[n])}for(;a.valueOf()1?51:17;if(a=l+.5*c&&e<=l+1.5*c&&t>=l+1.5*c&&t<=l+2.5*c)||n){var d=u(P(e,t),2),p=d[0],h=d[1];f.canvasTimeStart=p,f.canvasTimeEnd=h;var v=a({},s,{},f),m=_(v.width);Object.assign(f,w(r,o,m,v.canvasTimeStart,v.canvasTimeEnd,i.keys,i.lineHeight,i.itemHeightRatio,i.stackItems,v.draggingItem,v.resizingItem,v.dragTime,v.resizingEdge,v.resizeTime,v.newGroupOrder))}return f},t.minCellWidth=void 0;var r,o=(r=n(597))&&r.__esModule?r:{default:r},i=n(840);function a(e){for(var t=1;t=t}))}t.minCellWidth=17;function v(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001,o=0;return e.collisionLeft+rt.collisionLeft&&e.top-o+rt.top}function m(e,t,n,r,o,i){var a=r,s=(e-t.dimensions.height)/2;if(t.dimensions.stack&&null===t.dimensions.top){t.dimensions.top=o+s,a=Math.max(a,e);do{for(var u=null,l=i-1;l>=0;l--){var c=n[l];if(null!==c.dimensions.top&&c.dimensions.stack&&v(t.dimensions,c.dimensions,e)){u=c;break}}null!=u&&(t.dimensions.top=u.dimensions.top+e,a=Math.max(a,t.dimensions.top+t.dimensions.height+s-o))}while(u)}return{groupHeight:a,verticalMargin:s,itemTop:t.dimensions.top}}function y(e,t,n,r){var o=(e-t.dimensions.height)/2;return null===t.dimensions.top&&(t.dimensions.top=r+o,n=Math.max(n,e)),{groupHeight:n,verticalMargin:0,itemTop:t.dimensions.top}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((function(e,t){return e+t}),0)}function b(e,t,n,r){var o=[],i=[],a=p(e,t);for(var s in a){var u=a[s],l=u.items,c=u.group,f=g(o),d=O(l,void 0!==c.stackItems?c.stackItems:r,n,f),h=d.groupHeight;d.verticalMargin;i.push(f),c.height?o.push(c.height):o.push(Math.max(h,n))}return{height:g(o),groupHeights:o,groupTops:i}}function O(e,t,n,r){for(var o=0,i=0,a=0;a1&&void 0!==arguments[1]?arguments[1]:3;return e*t}function S(e){var t=e.item,n=e.keys,r=e.canvasTimeStart,o=e.canvasTimeEnd,a=e.canvasWidth,s=e.groupOrders,u=e.lineHeight,l=e.itemHeightRatio,c=(0,i._get)(t,n.itemIdKey),d=f({itemTimeStart:(0,i._get)(t,n.itemTimeStartKey),itemTimeEnd:(0,i._get)(t,n.itemTimeEndKey),canvasTimeStart:r,canvasTimeEnd:o,canvasWidth:a});if(d)return d.top=null,d.order=s[(0,i._get)(t,n.itemGroupKey)],d.stack=!t.isOverlay,d.height=u*l,{id:c,dimensions:d}}function T(e){var t,n=e.item,r=e.keys,o=e.draggingItem,l=e.resizingItem,f=e.dragTime,d=e.resizingEdge,p=e.resizeTime,h=e.groups,v=e.newGroupOrder;if(!l&&!o)return n;var m=(0,i._get)(n,r.itemIdKey),y=m===o,g=m===l,b=u(c({itemTimeStart:(0,i._get)(n,r.itemTimeStartKey),itemTimeEnd:(0,i._get)(n,r.itemTimeEndKey),isDragging:y,isResizing:g,dragTime:f,resizingEdge:d,resizeTime:p}),2),O=b[0],w=b[1];return a({},n,(s(t={},r.itemTimeStartKey,O),s(t,r.itemTimeEndKey,w),s(t,r.itemGroupKey,y?(0,i._get)(h[v],r.groupIdKey):(0,i._get)(n,r.itemGroupKey)),t))}function P(e,t){var n=e-(t-e);return[n,n+3*(t-e)]}},840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._get=i,t._length=a,t.arraysEqual=function(e,t){return a(e)===a(t)&&e.every((function(e,n){return e===i(t,n)}))},t.deepObjectCompare=function(e,t){return(0,o.default)(e,t)},t.keyBy=function(e,t){var n={};return e.forEach((function(e){n[e[t]]=e})),n},t.noop=function(){};var r,o=(r=n(1408))&&r.__esModule?r:{default:r};function i(e,t){return"function"===typeof e.get?e.get(t):e[t]}function a(e){return"function"===typeof e.count?e.count():e.length}},853:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimelineStateConsumer=t.TimelineStateProvider=void 0;var r=s(n(2)),o=s(n(80)),i=s(n(913)),a=n(821);function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="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})(e)}function l(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.style,r=n.props.variant===a.RIGHT_VARIANT?n.props.rightSidebarWidth:n.props.leftSidebarWidth;return{style:l({},t,{width:r})}})),m(h(n),"getStateAndHelpers",(function(){return{getRootProps:n.getRootProps,data:n.props.headerData}})),n}var n,o,i;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}}),t&&v(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=this.getStateAndHelpers(),t=this.props.children;return r.default.createElement(t,e)}}])&&f(n.prototype,o),i&&f(n,i),t}(r.default.PureComponent);m(y,"propTypes",{children:o.default.func.isRequired,rightSidebarWidth:o.default.number,leftSidebarWidth:o.default.number.isRequired,variant:o.default.string,headerData:o.default.object});var g=function(e){var t=e.children,n=e.variant,o=e.headerData;return r.default.createElement(i.TimelineHeadersConsumer,null,(function(e){var i=e.leftSidebarWidth,a=e.rightSidebarWidth;return r.default.createElement(y,{leftSidebarWidth:i,rightSidebarWidth:a,children:t,variant:n,headerData:o})}))};g.propTypes={children:o.default.func.isRequired,variant:o.default.string,headerData:o.default.object},g.defaultProps={variant:a.LEFT_VARIANT,children:function(e){var t=e.getRootProps;return r.default.createElement("div",t())}},g.secretKey="SidebarHeader";var b=g;t.default=b}}]);