120 lines
336 KiB
JavaScript
Vendored
120 lines
336 KiB
JavaScript
Vendored
/*!
|
||
FullCalendar Core Package v4.4.1
|
||
Docs & License: https://fullcalendar.io/
|
||
(c) 2019 Adam Shaw
|
||
*/
|
||
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global=global||self).FullCalendar={})}(this,(function(exports){"use strict";var elementPropHash={className:!0,colSpan:!0,rowSpan:!0},containerTagHash={"<tr":"tbody","<td":"tr"};function createElement(tagName,attrs,content){var el=document.createElement(tagName);if(attrs)for(var attrName in attrs)"style"===attrName?applyStyle(el,attrs[attrName]):elementPropHash[attrName]?el[attrName]=attrs[attrName]:el.setAttribute(attrName,attrs[attrName]);return"string"==typeof content?el.innerHTML=content:null!=content&&appendToElement(el,content),el}function htmlToElement(html){html=html.trim();var container=document.createElement(computeContainerTag(html));return container.innerHTML=html,container.firstChild}function htmlToElements(html){return Array.prototype.slice.call(htmlToNodeList(html))}function htmlToNodeList(html){html=html.trim();var container=document.createElement(computeContainerTag(html));return container.innerHTML=html,container.childNodes}function computeContainerTag(html){return containerTagHash[html.substr(0,3)]||"div"}function appendToElement(el,content){for(var childNodes=normalizeContent(content),i=0;i<childNodes.length;i++)el.appendChild(childNodes[i])}function prependToElement(parent,content){for(var newEls=normalizeContent(content),afterEl=parent.firstChild||null,i=0;i<newEls.length;i++)parent.insertBefore(newEls[i],afterEl)}function insertAfterElement(refEl,content){for(var newEls=normalizeContent(content),afterEl=refEl.nextSibling||null,i=0;i<newEls.length;i++)refEl.parentNode.insertBefore(newEls[i],afterEl)}function normalizeContent(content){var els;return els="string"==typeof content?htmlToElements(content):content instanceof Node?[content]:Array.prototype.slice.call(content)}function removeElement(el){el.parentNode&&el.parentNode.removeChild(el)}var matchesMethod=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector,closestMethod=Element.prototype.closest||function(selector){var el=this;if(!document.documentElement.contains(el))return null;do{if(elementMatches(el,selector))return el;el=el.parentElement||el.parentNode}while(null!==el&&1===el.nodeType);return null};function elementClosest(el,selector){return closestMethod.call(el,selector)}function elementMatches(el,selector){return matchesMethod.call(el,selector)}function findElements(container,selector){for(var containers=container instanceof HTMLElement?[container]:container,allMatches=[],i=0;i<containers.length;i++)for(var matches=containers[i].querySelectorAll(selector),j=0;j<matches.length;j++)allMatches.push(matches[j]);return allMatches}function findChildren(parent,selector){for(var parents=parent instanceof HTMLElement?[parent]:parent,allMatches=[],i=0;i<parents.length;i++)for(var childNodes=parents[i].children,j=0;j<childNodes.length;j++){var childNode=childNodes[j];selector&&!elementMatches(childNode,selector)||allMatches.push(childNode)}return allMatches}function forceClassName(el,className,bool){bool?el.classList.add(className):el.classList.remove(className)}var PIXEL_PROP_RE=/(top|left|right|bottom|width|height)$/i;function applyStyle(el,props){for(var propName in props)applyStyleProp(el,propName,props[propName])}function applyStyleProp(el,name,val){null==val?el.style[name]="":"number"==typeof val&&PIXEL_PROP_RE.test(name)?el.style[name]=val+"px":el.style[name]=val}function pointInsideRect(point,rect){return point.left>=rect.left&&point.left<rect.right&&point.top>=rect.top&&point.top<rect.bottom}function intersectRects(rect1,rect2){var res={left:Math.max(rect1.left,rect2.left),right:Math.min(rect1.right,rect2.right),top:Math.max(rect1.top,rect2.top),bottom:Math.min(rect1.bottom,rect2.bottom)};return res.left<res.right&&res.top<res.bottom&&res}function translateRect(rect,deltaX,deltaY){return{left:rect.left+deltaX,right:rect.right+deltaX,top:rect.top+deltaY,bottom:rect.bottom+deltaY}}function constrainPoint(point,rect){return{left:Math.min(Math.max(point.left,rect.left),rect.right),top:Math.min(Math.max(point.top,rect.top),rect.bottom)}}function getRectCenter(rect){return{left:(rect.left+rect.right)/2,top:(rect.top+rect.bottom)/2}}function diffPoints(point1,point2){return{left:point1.left-point2.left,top:point1.top-point2.top}}var isRtlScrollbarOnLeft=null;function getIsRtlScrollbarOnLeft(){return null===isRtlScrollbarOnLeft&&(isRtlScrollbarOnLeft=computeIsRtlScrollbarOnLeft()),isRtlScrollbarOnLeft}function computeIsRtlScrollbarOnLeft(){var outerEl=createElement("div",{style:{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}},"<div></div>");document.body.appendChild(outerEl);var innerEl,res=outerEl.firstChild.getBoundingClientRect().left>outerEl.getBoundingClientRect().left;return removeElement(outerEl),res}function sanitizeScrollbarWidth(width){return width=Math.max(0,width),width=Math.round(width)}function computeEdges(el,getPadding){void 0===getPadding&&(getPadding=!1);var computedStyle=window.getComputedStyle(el),borderLeft=parseInt(computedStyle.borderLeftWidth,10)||0,borderRight=parseInt(computedStyle.borderRightWidth,10)||0,borderTop=parseInt(computedStyle.borderTopWidth,10)||0,borderBottom=parseInt(computedStyle.borderBottomWidth,10)||0,scrollbarLeftRight=sanitizeScrollbarWidth(el.offsetWidth-el.clientWidth-borderLeft-borderRight),scrollbarBottom,res={borderLeft:borderLeft,borderRight:borderRight,borderTop:borderTop,borderBottom:borderBottom,scrollbarBottom:sanitizeScrollbarWidth(el.offsetHeight-el.clientHeight-borderTop-borderBottom),scrollbarLeft:0,scrollbarRight:0};return getIsRtlScrollbarOnLeft()&&"rtl"===computedStyle.direction?res.scrollbarLeft=scrollbarLeftRight:res.scrollbarRight=scrollbarLeftRight,getPadding&&(res.paddingLeft=parseInt(computedStyle.paddingLeft,10)||0,res.paddingRight=parseInt(computedStyle.paddingRight,10)||0,res.paddingTop=parseInt(computedStyle.paddingTop,10)||0,res.paddingBottom=parseInt(computedStyle.paddingBottom,10)||0),res}function computeInnerRect(el,goWithinPadding){void 0===goWithinPadding&&(goWithinPadding=!1);var outerRect=computeRect(el),edges=computeEdges(el,goWithinPadding),res={left:outerRect.left+edges.borderLeft+edges.scrollbarLeft,right:outerRect.right-edges.borderRight-edges.scrollbarRight,top:outerRect.top+edges.borderTop,bottom:outerRect.bottom-edges.borderBottom-edges.scrollbarBottom};return goWithinPadding&&(res.left+=edges.paddingLeft,res.right-=edges.paddingRight,res.top+=edges.paddingTop,res.bottom-=edges.paddingBottom),res}function computeRect(el){var rect=el.getBoundingClientRect();return{left:rect.left+window.pageXOffset,top:rect.top+window.pageYOffset,right:rect.right+window.pageXOffset,bottom:rect.bottom+window.pageYOffset}}function computeViewportRect(){return{left:window.pageXOffset,right:window.pageXOffset+document.documentElement.clientWidth,top:window.pageYOffset,bottom:window.pageYOffset+document.documentElement.clientHeight}}function computeHeightAndMargins(el){return el.getBoundingClientRect().height+computeVMargins(el)}function computeVMargins(el){var computed=window.getComputedStyle(el);return parseInt(computed.marginTop,10)+parseInt(computed.marginBottom,10)}function getClippingParents(el){for(var parents=[];el instanceof HTMLElement;){var computedStyle=window.getComputedStyle(el);if("fixed"===computedStyle.position)break;/(auto|scroll)/.test(computedStyle.overflow+computedStyle.overflowY+computedStyle.overflowX)&&parents.push(el),el=el.parentNode}return parents}function computeClippingRect(el){return getClippingParents(el).map((function(el){return computeInnerRect(el)})).concat(computeViewportRect()).reduce((function(rect0,rect1){return intersectRects(rect0,rect1)||rect1}))}function preventDefault(ev){ev.preventDefault()}function listenBySelector(container,eventType,selector,handler){function realHandler(ev){var matchedChild=elementClosest(ev.target,selector);matchedChild&&handler.call(matchedChild,ev,matchedChild)}return container.addEventListener(eventType,realHandler),function(){container.removeEventListener(eventType,realHandler)}}function listenToHoverBySelector(container,selector,onMouseEnter,onMouseLeave){var currentMatchedChild;return listenBySelector(container,"mouseover",selector,(function(ev,matchedChild){if(matchedChild!==currentMatchedChild){currentMatchedChild=matchedChild,onMouseEnter(ev,matchedChild);var realOnMouseLeave_1=function(ev){currentMatchedChild=null,onMouseLeave(ev,matchedChild),matchedChild.removeEventListener("mouseleave",realOnMouseLeave_1)};matchedChild.addEventListener("mouseleave",realOnMouseLeave_1)}}))}var transitionEventNames=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function whenTransitionDone(el,callback){var realCallback=function(ev){callback(ev),transitionEventNames.forEach((function(eventName){el.removeEventListener(eventName,realCallback)}))};transitionEventNames.forEach((function(eventName){el.addEventListener(eventName,realCallback)}))}var DAY_IDS=["sun","mon","tue","wed","thu","fri","sat"];function addWeeks(m,n){var a=dateToUtcArray(m);return a[2]+=7*n,arrayToUtcDate(a)}function addDays(m,n){var a=dateToUtcArray(m);return a[2]+=n,arrayToUtcDate(a)}function addMs(m,n){var a=dateToUtcArray(m);return a[6]+=n,arrayToUtcDate(a)}function diffWeeks(m0,m1){return diffDays(m0,m1)/7}function diffDays(m0,m1){return(m1.valueOf()-m0.valueOf())/864e5}function diffHours(m0,m1){return(m1.valueOf()-m0.valueOf())/36e5}function diffMinutes(m0,m1){return(m1.valueOf()-m0.valueOf())/6e4}function diffSeconds(m0,m1){return(m1.valueOf()-m0.valueOf())/1e3}function diffDayAndTime(m0,m1){var m0day=startOfDay(m0),m1day=startOfDay(m1);return{years:0,months:0,days:Math.round(diffDays(m0day,m1day)),milliseconds:m1.valueOf()-m1day.valueOf()-(m0.valueOf()-m0day.valueOf())}}function diffWholeWeeks(m0,m1){var d=diffWholeDays(m0,m1);return null!==d&&d%7==0?d/7:null}function diffWholeDays(m0,m1){return timeAsMs(m0)===timeAsMs(m1)?Math.round(diffDays(m0,m1)):null}function startOfDay(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()])}function startOfHour(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate(),m.getUTCHours()])}function startOfMinute(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate(),m.getUTCHours(),m.getUTCMinutes()])}function startOfSecond(m){return arrayToUtcDate([m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate(),m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds()])}function weekOfYear(marker,dow,doy){var y=marker.getUTCFullYear(),w=weekOfGivenYear(marker,y,dow,doy);if(w<1)return weekOfGivenYear(marker,y-1,dow,doy);var nextW=weekOfGivenYear(marker,y+1,dow,doy);return nextW>=1?Math.min(w,nextW):w}function weekOfGivenYear(marker,year,dow,doy){var firstWeekStart=arrayToUtcDate([year,0,1+firstWeekOffset(year,dow,doy)]),dayStart=startOfDay(marker),days=Math.round(diffDays(firstWeekStart,dayStart));return Math.floor(days/7)+1}function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy,fwdlw;return-((7+arrayToUtcDate([year,0,fwd]).getUTCDay()-dow)%7)+fwd-1}function dateToLocalArray(date){return[date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds()]}function arrayToLocalDate(a){return new Date(a[0],a[1]||0,null==a[2]?1:a[2],a[3]||0,a[4]||0,a[5]||0)}function dateToUtcArray(date){return[date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDate(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds(),date.getUTCMilliseconds()]}function arrayToUtcDate(a){return 1===a.length&&(a=a.concat([0])),new Date(Date.UTC.apply(Date,a))}function isValidDate(m){return!isNaN(m.valueOf())}function timeAsMs(m){return 1e3*m.getUTCHours()*60*60+1e3*m.getUTCMinutes()*60+1e3*m.getUTCSeconds()+m.getUTCMilliseconds()}var INTERNAL_UNITS=["years","months","days","milliseconds"],PARSE_RE=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function createDuration(input,unit){var _a;return"string"==typeof input?parseString(input):"object"==typeof input&&input?normalizeObject(input):"number"==typeof input?normalizeObject(((_a={})[unit||"milliseconds"]=input,_a)):null}function parseString(s){var m=PARSE_RE.exec(s);if(m){var sign=m[1]?-1:1;return{years:0,months:0,days:sign*(m[2]?parseInt(m[2],10):0),milliseconds:sign*(60*(m[3]?parseInt(m[3],10):0)*60*1e3+60*(m[4]?parseInt(m[4],10):0)*1e3+1e3*(m[5]?parseInt(m[5],10):0)+(m[6]?parseInt(m[6],10):0))}}return null}function normalizeObject(obj){return{years:obj.years||obj.year||0,months:obj.months||obj.month||0,days:(obj.days||obj.day||0)+7*getWeeksFromInput(obj),milliseconds:60*(obj.hours||obj.hour||0)*60*1e3+60*(obj.minutes||obj.minute||0)*1e3+1e3*(obj.seconds||obj.second||0)+(obj.milliseconds||obj.millisecond||obj.ms||0)}}function getWeeksFromInput(obj){return obj.weeks||obj.week||0}function durationsEqual(d0,d1){return d0.years===d1.years&&d0.months===d1.months&&d0.days===d1.days&&d0.milliseconds===d1.milliseconds}function isSingleDay(dur){return 0===dur.years&&0===dur.months&&1===dur.days&&0===dur.milliseconds}function addDurations(d0,d1){return{years:d0.years+d1.years,months:d0.months+d1.months,days:d0.days+d1.days,milliseconds:d0.milliseconds+d1.milliseconds}}function subtractDurations(d1,d0){return{years:d1.years-d0.years,months:d1.months-d0.months,days:d1.days-d0.days,milliseconds:d1.milliseconds-d0.milliseconds}}function multiplyDuration(d,n){return{years:d.years*n,months:d.months*n,days:d.days*n,milliseconds:d.milliseconds*n}}function asRoughYears(dur){return asRoughDays(dur)/365}function asRoughMonths(dur){return asRoughDays(dur)/30}function asRoughDays(dur){return asRoughMs(dur)/864e5}function asRoughMinutes(dur){return asRoughMs(dur)/6e4}function asRoughSeconds(dur){return asRoughMs(dur)/1e3}function asRoughMs(dur){return 31536e6*dur.years+2592e6*dur.months+864e5*dur.days+dur.milliseconds}function wholeDivideDurations(numerator,denominator){for(var res=null,i=0;i<INTERNAL_UNITS.length;i++){var unit=INTERNAL_UNITS[i];if(denominator[unit]){var localRes=numerator[unit]/denominator[unit];if(!isInt(localRes)||null!==res&&res!==localRes)return null;res=localRes}else if(numerator[unit])return null}return res}function greatestDurationDenominator(dur,dontReturnWeeks){var ms=dur.milliseconds;if(ms){if(ms%1e3!=0)return{unit:"millisecond",value:ms};if(ms%6e4!=0)return{unit:"second",value:ms/1e3};if(ms%36e5!=0)return{unit:"minute",value:ms/6e4};if(ms)return{unit:"hour",value:ms/36e5}}return dur.days?dontReturnWeeks||dur.days%7!=0?{unit:"day",value:dur.days}:{unit:"week",value:dur.days/7}:dur.months?{unit:"month",value:dur.months}:dur.years?{unit:"year",value:dur.years}:{unit:"millisecond",value:0}}function compensateScroll(rowEl,scrollbarWidths){scrollbarWidths.left&&applyStyle(rowEl,{borderLeftWidth:1,marginLeft:scrollbarWidths.left-1}),scrollbarWidths.right&&applyStyle(rowEl,{borderRightWidth:1,marginRight:scrollbarWidths.right-1})}function uncompensateScroll(rowEl){applyStyle(rowEl,{marginLeft:"",marginRight:"",borderLeftWidth:"",borderRightWidth:""})}function disableCursor(){document.body.classList.add("fc-not-allowed")}function enableCursor(){document.body.classList.remove("fc-not-allowed")}function distributeHeight(els,availableHeight,shouldRedistribute){var minOffset1=Math.floor(availableHeight/els.length),minOffset2=Math.floor(availableHeight-minOffset1*(els.length-1)),flexEls=[],flexOffsets=[],flexHeights=[],usedHeight=0;undistributeHeight(els),els.forEach((function(el,i){var minOffset=i===els.length-1?minOffset2:minOffset1,naturalHeight=el.getBoundingClientRect().height,naturalOffset=naturalHeight+computeVMargins(el);naturalOffset<minOffset?(flexEls.push(el),flexOffsets.push(naturalOffset),flexHeights.push(naturalHeight)):usedHeight+=naturalOffset})),shouldRedistribute&&(availableHeight-=usedHeight,minOffset1=Math.floor(availableHeight/flexEls.length),minOffset2=Math.floor(availableHeight-minOffset1*(flexEls.length-1))),flexEls.forEach((function(el,i){var minOffset=i===flexEls.length-1?minOffset2:minOffset1,naturalOffset=flexOffsets[i],naturalHeight,newHeight=minOffset-(naturalOffset-flexHeights[i]);naturalOffset<minOffset&&(el.style.height=newHeight+"px")}))}function undistributeHeight(els){els.forEach((function(el){el.style.height=""}))}function matchCellWidths(els){var maxInnerWidth=0;return els.forEach((function(el){var innerEl=el.firstChild;if(innerEl instanceof HTMLElement){var innerWidth_1=innerEl.getBoundingClientRect().width;innerWidth_1>maxInnerWidth&&(maxInnerWidth=innerWidth_1)}})),maxInnerWidth++,els.forEach((function(el){el.style.width=maxInnerWidth+"px"})),maxInnerWidth}function subtractInnerElHeight(outerEl,innerEl){var reflowStyleProps={position:"relative",left:-1};applyStyle(outerEl,reflowStyleProps),applyStyle(innerEl,reflowStyleProps);var diff=outerEl.getBoundingClientRect().height-innerEl.getBoundingClientRect().height,resetStyleProps={position:"",left:""};return applyStyle(outerEl,resetStyleProps),applyStyle(innerEl,resetStyleProps),diff}function preventSelection(el){el.classList.add("fc-unselectable"),el.addEventListener("selectstart",preventDefault)}function allowSelection(el){el.classList.remove("fc-unselectable"),el.removeEventListener("selectstart",preventDefault)}function preventContextMenu(el){el.addEventListener("contextmenu",preventDefault)}function allowContextMenu(el){el.removeEventListener("contextmenu",preventDefault)}function parseFieldSpecs(input){var specs=[],tokens=[],i,token;for("string"==typeof input?tokens=input.split(/\s*,\s*/):"function"==typeof input?tokens=[input]:Array.isArray(input)&&(tokens=input),i=0;i<tokens.length;i++)"string"==typeof(token=tokens[i])?specs.push("-"===token.charAt(0)?{field:token.substring(1),order:-1}:{field:token,order:1}):"function"==typeof token&&specs.push({func:token});return specs}function compareByFieldSpecs(obj0,obj1,fieldSpecs){var i,cmp;for(i=0;i<fieldSpecs.length;i++)if(cmp=compareByFieldSpec(obj0,obj1,fieldSpecs[i]))return cmp;return 0}function compareByFieldSpec(obj0,obj1,fieldSpec){return fieldSpec.func?fieldSpec.func(obj0,obj1):flexibleCompare(obj0[fieldSpec.field],obj1[fieldSpec.field])*(fieldSpec.order||1)}function flexibleCompare(a,b){return a||b?null==b?-1:null==a?1:"string"==typeof a||"string"==typeof b?String(a).localeCompare(String(b)):a-b:0}function capitaliseFirstLetter(str){return str.charAt(0).toUpperCase()+str.slice(1)}function padStart(val,len){var s=String(val);return"000".substr(0,len-s.length)+s}function compareNumbers(a,b){return a-b}function isInt(n){return n%1==0}function applyAll(functions,thisObj,args){if("function"==typeof functions&&(functions=[functions]),functions){var i=void 0,ret=void 0;for(i=0;i<functions.length;i++)ret=functions[i].apply(thisObj,args)||ret;return ret}}function firstDefined(){for(var args=[],_i=0;_i<arguments.length;_i++)args[_i]=arguments[_i];for(var i=0;i<args.length;i++)if(void 0!==args[i])return args[i]}function debounce(func,wait){var timeout,args,context,timestamp,result,later=function(){var last=(new Date).valueOf()-timestamp;last<wait?timeout=setTimeout(later,wait-last):(timeout=null,result=func.apply(context,args),context=args=null)};return function(){return context=this,args=arguments,timestamp=(new Date).valueOf(),timeout||(timeout=setTimeout(later,wait)),result}}function refineProps(rawProps,processors,defaults,leftoverProps){void 0===defaults&&(defaults={});var refined={};for(var key in processors){var processor=processors[key];void 0!==rawProps[key]?refined[key]=processor===Function?"function"==typeof rawProps[key]?rawProps[key]:null:processor?processor(rawProps[key]):rawProps[key]:void 0!==defaults[key]?refined[key]=defaults[key]:processor===String?refined[key]="":processor&&processor!==Number&&processor!==Boolean&&processor!==Function?refined[key]=processor(null):refined[key]=null}if(leftoverProps)for(var key in rawProps)void 0===processors[key]&&(leftoverProps[key]=rawProps[key]);return refined}function computeAlignedDayRange(timedRange){var dayCnt=Math.floor(diffDays(timedRange.start,timedRange.end))||1,start=startOfDay(timedRange.start),end;return{start:start,end:addDays(start,dayCnt)}}function computeVisibleDayRange(timedRange,nextDayThreshold){void 0===nextDayThreshold&&(nextDayThreshold=createDuration(0));var startDay=null,endDay=null;if(timedRange.end){endDay=startOfDay(timedRange.end);var endTimeMS=timedRange.end.valueOf()-endDay.valueOf();endTimeMS&&endTimeMS>=asRoughMs(nextDayThreshold)&&(endDay=addDays(endDay,1))}return timedRange.start&&(startDay=startOfDay(timedRange.start),endDay&&endDay<=startDay&&(endDay=addDays(startDay,1))),{start:startDay,end:endDay}}function isMultiDayRange(range){var visibleRange=computeVisibleDayRange(range);return diffDays(visibleRange.start,visibleRange.end)>1}function diffDates(date0,date1,dateEnv,largeUnit){return"year"===largeUnit?createDuration(dateEnv.diffWholeYears(date0,date1),"year"):"month"===largeUnit?createDuration(dateEnv.diffWholeMonths(date0,date1),"month"):diffDayAndTime(date0,date1)}
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)};function parseRecurring(eventInput,allDayDefault,dateEnv,recurringTypes,leftovers){for(var i=0;i<recurringTypes.length;i++){var localLeftovers={},parsed=recurringTypes[i].parse(eventInput,localLeftovers,dateEnv);if(parsed){var allDay=localLeftovers.allDay;return delete localLeftovers.allDay,null==allDay&&null==(allDay=allDayDefault)&&null==(allDay=parsed.allDayGuess)&&(allDay=!1),__assign(leftovers,localLeftovers),{allDay:allDay,duration:parsed.duration,typeData:parsed.typeData,typeId:i}}}return null}function expandRecurringRanges(eventDef,duration,framingRange,dateEnv,recurringTypes){var typeDef,markers=recurringTypes[eventDef.recurringDef.typeId].expand(eventDef.recurringDef.typeData,{start:dateEnv.subtract(framingRange.start,duration),end:framingRange.end},dateEnv);return eventDef.allDay&&(markers=markers.map(startOfDay)),markers}var hasOwnProperty=Object.prototype.hasOwnProperty;function mergeProps(propObjs,complexProps){var dest={},i,name,complexObjs,j,val,props;if(complexProps)for(i=0;i<complexProps.length;i++){for(name=complexProps[i],complexObjs=[],j=propObjs.length-1;j>=0;j--)if("object"==typeof(val=propObjs[j][name])&&val)complexObjs.unshift(val);else if(void 0!==val){dest[name]=val;break}complexObjs.length&&(dest[name]=mergeProps(complexObjs))}for(i=propObjs.length-1;i>=0;i--)for(name in props=propObjs[i])name in dest||(dest[name]=props[name]);return dest}function filterHash(hash,func){var filtered={};for(var key in hash)func(hash[key],key)&&(filtered[key]=hash[key]);return filtered}function mapHash(hash,func){var newHash={};for(var key in hash)newHash[key]=func(hash[key],key);return newHash}function arrayToHash(a){for(var hash={},_i=0,a_1=a;_i<a_1.length;_i++){var item;hash[a_1[_i]]=!0}return hash}function hashValuesToArray(obj){var a=[];for(var key in obj)a.push(obj[key]);return a}function isPropsEqual(obj0,obj1){for(var key in obj0)if(hasOwnProperty.call(obj0,key)&&!(key in obj1))return!1;for(var key in obj1)if(hasOwnProperty.call(obj1,key)&&obj0[key]!==obj1[key])return!1;return!0}function parseEvents(rawEvents,sourceId,calendar,allowOpenRange){for(var eventStore={defs:{},instances:{}},_i=0,rawEvents_1=rawEvents;_i<rawEvents_1.length;_i++){var rawEvent,tuple=parseEvent(rawEvents_1[_i],sourceId,calendar,allowOpenRange);tuple&&eventTupleToStore(tuple,eventStore)}return eventStore}function eventTupleToStore(tuple,eventStore){return void 0===eventStore&&(eventStore={defs:{},instances:{}}),eventStore.defs[tuple.def.defId]=tuple.def,tuple.instance&&(eventStore.instances[tuple.instance.instanceId]=tuple.instance),eventStore}function expandRecurring(eventStore,framingRange,calendar){var dateEnv=calendar.dateEnv,defs=eventStore.defs,instances=eventStore.instances;for(var defId in instances=filterHash(instances,(function(instance){return!defs[instance.defId].recurringDef})),defs){var def=defs[defId];if(def.recurringDef){var duration=def.recurringDef.duration;duration||(duration=def.allDay?calendar.defaultAllDayEventDuration:calendar.defaultTimedEventDuration);for(var starts,_i=0,starts_1=expandRecurringRanges(def,duration,framingRange,calendar.dateEnv,calendar.pluginSystem.hooks.recurringTypes);_i<starts_1.length;_i++){var start=starts_1[_i],instance=createEventInstance(defId,{start:start,end:dateEnv.add(start,duration)});instances[instance.instanceId]=instance}}}return{defs:defs,instances:instances}}function getRelevantEvents(eventStore,instanceId){var instance=eventStore.instances[instanceId];if(instance){var def_1=eventStore.defs[instance.defId],newStore=filterEventStoreDefs(eventStore,(function(lookDef){return isEventDefsGrouped(def_1,lookDef)}));return newStore.defs[def_1.defId]=def_1,newStore.instances[instance.instanceId]=instance,newStore}return{defs:{},instances:{}}}function isEventDefsGrouped(def0,def1){return Boolean(def0.groupId&&def0.groupId===def1.groupId)}function transformRawEvents(rawEvents,eventSource,calendar){var calEachTransform=calendar.opt("eventDataTransform"),sourceEachTransform=eventSource?eventSource.eventDataTransform:null;return sourceEachTransform&&(rawEvents=transformEachRawEvent(rawEvents,sourceEachTransform)),calEachTransform&&(rawEvents=transformEachRawEvent(rawEvents,calEachTransform)),rawEvents}function transformEachRawEvent(rawEvents,func){var refinedEvents;if(func){refinedEvents=[];for(var _i=0,rawEvents_2=rawEvents;_i<rawEvents_2.length;_i++){var rawEvent=rawEvents_2[_i],refinedEvent=func(rawEvent);refinedEvent?refinedEvents.push(refinedEvent):null==refinedEvent&&refinedEvents.push(rawEvent)}}else refinedEvents=rawEvents;return refinedEvents}function createEmptyEventStore(){return{defs:{},instances:{}}}function mergeEventStores(store0,store1){return{defs:__assign({},store0.defs,store1.defs),instances:__assign({},store0.instances,store1.instances)}}function filterEventStoreDefs(eventStore,filterFunc){var defs=filterHash(eventStore.defs,filterFunc),instances=filterHash(eventStore.instances,(function(instance){return defs[instance.defId]}));return{defs:defs,instances:instances}}function parseRange(input,dateEnv){var start=null,end=null;return input.start&&(start=dateEnv.createMarker(input.start)),input.end&&(end=dateEnv.createMarker(input.end)),start||end?start&&end&&end<start?null:{start:start,end:end}:null}function invertRanges(ranges,constraintRange){var invertedRanges=[],start=constraintRange.start,i,dateRange;for(ranges.sort(compareRanges),i=0;i<ranges.length;i++)(dateRange=ranges[i]).start>start&&invertedRanges.push({start:start,end:dateRange.start}),dateRange.end>start&&(start=dateRange.end);return start<constraintRange.end&&invertedRanges.push({start:start,end:constraintRange.end}),invertedRanges}function compareRanges(range0,range1){return range0.start.valueOf()-range1.start.valueOf()}function intersectRanges(range0,range1){var start=range0.start,end=range0.end,newRange=null;return null!==range1.start&&(start=null===start?range1.start:new Date(Math.max(start.valueOf(),range1.start.valueOf()))),null!=range1.end&&(end=null===end?range1.end:new Date(Math.min(end.valueOf(),range1.end.valueOf()))),(null===start||null===end||start<end)&&(newRange={start:start,end:end}),newRange}function rangesEqual(range0,range1){return(null===range0.start?null:range0.start.valueOf())===(null===range1.start?null:range1.start.valueOf())&&(null===range0.end?null:range0.end.valueOf())===(null===range1.end?null:range1.end.valueOf())}function rangesIntersect(range0,range1){return(null===range0.end||null===range1.start||range0.end>range1.start)&&(null===range0.start||null===range1.end||range0.start<range1.end)}function rangeContainsRange(outerRange,innerRange){return(null===outerRange.start||null!==innerRange.start&&innerRange.start>=outerRange.start)&&(null===outerRange.end||null!==innerRange.end&&innerRange.end<=outerRange.end)}function rangeContainsMarker(range,date){return(null===range.start||date>=range.start)&&(null===range.end||date<range.end)}function constrainMarkerToRange(date,range){return null!=range.start&&date<range.start?range.start:null!=range.end&&date>=range.end?new Date(range.end.valueOf()-1):date}function removeExact(array,exactVal){for(var removeCnt=0,i=0;i<array.length;)array[i]===exactVal?(array.splice(i,1),removeCnt++):i++;return removeCnt}function isArraysEqual(a0,a1){var len=a0.length,i;if(len!==a1.length)return!1;for(i=0;i<len;i++)if(a0[i]!==a1[i])return!1;return!0}function memoize(workerFunc){var args,res;return function(){return args&&isArraysEqual(args,arguments)||(args=arguments,res=workerFunc.apply(this,arguments)),res}}function memoizeOutput(workerFunc,equalityFunc){var cachedRes=null;return function(){var newRes=workerFunc.apply(this,arguments);return(null===cachedRes||cachedRes!==newRes&&!equalityFunc(cachedRes,newRes))&&(cachedRes=newRes),cachedRes}}var EXTENDED_SETTINGS_AND_SEVERITIES={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},STANDARD_DATE_PROP_SEVERITIES={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},MERIDIEM_RE=/\s*([ap])\.?m\.?/i,COMMA_RE=/,/g,MULTI_SPACE_RE=/\s+/g,LTR_RE=/\u200e/g,UTC_RE=/UTC|GMT/,NativeFormatter=function(){function NativeFormatter(formatSettings){var standardDateProps={},extendedSettings={},severity=0;for(var name_1 in formatSettings)name_1 in EXTENDED_SETTINGS_AND_SEVERITIES?(extendedSettings[name_1]=formatSettings[name_1],severity=Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[name_1],severity)):(standardDateProps[name_1]=formatSettings[name_1],name_1 in STANDARD_DATE_PROP_SEVERITIES&&(severity=Math.max(STANDARD_DATE_PROP_SEVERITIES[name_1],severity)));this.standardDateProps=standardDateProps,this.extendedSettings=extendedSettings,this.severity=severity,this.buildFormattingFunc=memoize(buildFormattingFunc)}return NativeFormatter.prototype.format=function(date,context){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,context)(date)},NativeFormatter.prototype.formatRange=function(start,end,context){var _a=this,standardDateProps=_a.standardDateProps,extendedSettings=_a.extendedSettings,diffSeverity=computeMarkerDiffSeverity(start.marker,end.marker,context.calendarSystem);if(!diffSeverity)return this.format(start,context);var biggestUnitForPartial=diffSeverity;!(biggestUnitForPartial>1)||"numeric"!==standardDateProps.year&&"2-digit"!==standardDateProps.year||"numeric"!==standardDateProps.month&&"2-digit"!==standardDateProps.month||"numeric"!==standardDateProps.day&&"2-digit"!==standardDateProps.day||(biggestUnitForPartial=1);var full0=this.format(start,context),full1=this.format(end,context);if(full0===full1)return full0;var partialDateProps,partialFormattingFunc=buildFormattingFunc(computePartialFormattingOptions(standardDateProps,biggestUnitForPartial),extendedSettings,context),partial0=partialFormattingFunc(start),partial1=partialFormattingFunc(end),insertion=findCommonInsertion(full0,partial0,full1,partial1),separator=extendedSettings.separator||"";return insertion?insertion.before+partial0+separator+partial1+insertion.after:full0+separator+full1},NativeFormatter.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";default:return"day"}},NativeFormatter}();function buildFormattingFunc(standardDateProps,extendedSettings,context){var standardDatePropCnt=Object.keys(standardDateProps).length;return 1===standardDatePropCnt&&"short"===standardDateProps.timeZoneName?function(date){return formatTimeZoneOffset(date.timeZoneOffset)}:0===standardDatePropCnt&&extendedSettings.week?function(date){return formatWeekNumber(context.computeWeekNumber(date.marker),context.weekLabel,context.locale,extendedSettings.week)}:buildNativeFormattingFunc(standardDateProps,extendedSettings,context)}function buildNativeFormattingFunc(standardDateProps,extendedSettings,context){standardDateProps=__assign({},standardDateProps),extendedSettings=__assign({},extendedSettings),sanitizeSettings(standardDateProps,extendedSettings),standardDateProps.timeZone="UTC";var normalFormat=new Intl.DateTimeFormat(context.locale.codes,standardDateProps),zeroFormat;if(extendedSettings.omitZeroMinute){var zeroProps=__assign({},standardDateProps);delete zeroProps.minute,zeroFormat=new Intl.DateTimeFormat(context.locale.codes,zeroProps)}return function(date){var marker=date.marker,format,s;return postProcess((format=zeroFormat&&!marker.getUTCMinutes()?zeroFormat:normalFormat).format(marker),date,standardDateProps,extendedSettings,context)}}function sanitizeSettings(standardDateProps,extendedSettings){standardDateProps.timeZoneName&&(standardDateProps.hour||(standardDateProps.hour="2-digit"),standardDateProps.minute||(standardDateProps.minute="2-digit")),"long"===standardDateProps.timeZoneName&&(standardDateProps.timeZoneName="short"),extendedSettings.omitZeroMinute&&(standardDateProps.second||standardDateProps.millisecond)&&delete extendedSettings.omitZeroMinute}function postProcess(s,date,standardDateProps,extendedSettings,context){return s=s.replace(LTR_RE,""),"short"===standardDateProps.timeZoneName&&(s=injectTzoStr(s,"UTC"===context.timeZone||null==date.timeZoneOffset?"UTC":formatTimeZoneOffset(date.timeZoneOffset))),extendedSettings.omitCommas&&(s=s.replace(COMMA_RE,"").trim()),extendedSettings.omitZeroMinute&&(s=s.replace(":00","")),!1===extendedSettings.meridiem?s=s.replace(MERIDIEM_RE,"").trim():"narrow"===extendedSettings.meridiem?s=s.replace(MERIDIEM_RE,(function(m0,m1){return m1.toLocaleLowerCase()})):"short"===extendedSettings.meridiem?s=s.replace(MERIDIEM_RE,(function(m0,m1){return m1.toLocaleLowerCase()+"m"})):"lowercase"===extendedSettings.meridiem&&(s=s.replace(MERIDIEM_RE,(function(m0){return m0.toLocaleLowerCase()}))),s=(s=s.replace(MULTI_SPACE_RE," ")).trim()}function injectTzoStr(s,tzoStr){var replaced=!1;return s=s.replace(UTC_RE,(function(){return replaced=!0,tzoStr})),replaced||(s+=" "+tzoStr),s}function formatWeekNumber(num,weekLabel,locale,display){var parts=[];return"narrow"===display?parts.push(weekLabel):"short"===display&&parts.push(weekLabel," "),parts.push(locale.simpleNumberFormat.format(num)),locale.options.isRtl&&parts.reverse(),parts.join("")}function computeMarkerDiffSeverity(d0,d1,ca){return ca.getMarkerYear(d0)!==ca.getMarkerYear(d1)?5:ca.getMarkerMonth(d0)!==ca.getMarkerMonth(d1)?4:ca.getMarkerDay(d0)!==ca.getMarkerDay(d1)?2:timeAsMs(d0)!==timeAsMs(d1)?1:0}function computePartialFormattingOptions(options,biggestUnit){var partialOptions={};for(var name_2 in options)name_2 in STANDARD_DATE_PROP_SEVERITIES&&!(STANDARD_DATE_PROP_SEVERITIES[name_2]<=biggestUnit)||(partialOptions[name_2]=options[name_2]);return partialOptions}function findCommonInsertion(full0,partial0,full1,partial1){for(var i0=0;i0<full0.length;){var found0=full0.indexOf(partial0,i0);if(-1===found0)break;var before0=full0.substr(0,found0);i0=found0+partial0.length;for(var after0=full0.substr(i0),i1=0;i1<full1.length;){var found1=full1.indexOf(partial1,i1);if(-1===found1)break;var before1=full1.substr(0,found1);i1=found1+partial1.length;var after1=full1.substr(i1);if(before0===before1&&after0===after1)return{before:before0,after:after0}}}return null}var CmdFormatter=function(){function CmdFormatter(cmdStr,separator){this.cmdStr=cmdStr,this.separator=separator}return CmdFormatter.prototype.format=function(date,context){return context.cmdFormatter(this.cmdStr,createVerboseFormattingArg(date,null,context,this.separator))},CmdFormatter.prototype.formatRange=function(start,end,context){return context.cmdFormatter(this.cmdStr,createVerboseFormattingArg(start,end,context,this.separator))},CmdFormatter}(),FuncFormatter=function(){function FuncFormatter(func){this.func=func}return FuncFormatter.prototype.format=function(date,context){return this.func(createVerboseFormattingArg(date,null,context))},FuncFormatter.prototype.formatRange=function(start,end,context){return this.func(createVerboseFormattingArg(start,end,context))},FuncFormatter}();function createFormatter(input,defaultSeparator){return"object"==typeof input&&input?("string"==typeof defaultSeparator&&(input=__assign({separator:defaultSeparator},input)),new NativeFormatter(input)):"string"==typeof input?new CmdFormatter(input,defaultSeparator):"function"==typeof input?new FuncFormatter(input):void 0}function buildIsoString(marker,timeZoneOffset,stripZeroTime){void 0===stripZeroTime&&(stripZeroTime=!1);var s=marker.toISOString();return s=s.replace(".000",""),stripZeroTime&&(s=s.replace("T00:00:00Z","")),s.length>10&&(null==timeZoneOffset?s=s.replace("Z",""):0!==timeZoneOffset&&(s=s.replace("Z",formatTimeZoneOffset(timeZoneOffset,!0)))),s}function formatIsoTimeString(marker){return padStart(marker.getUTCHours(),2)+":"+padStart(marker.getUTCMinutes(),2)+":"+padStart(marker.getUTCSeconds(),2)}function formatTimeZoneOffset(minutes,doIso){void 0===doIso&&(doIso=!1);var sign=minutes<0?"-":"+",abs=Math.abs(minutes),hours=Math.floor(abs/60),mins=Math.round(abs%60);return doIso?sign+padStart(hours,2)+":"+padStart(mins,2):"GMT"+sign+hours+(mins?":"+padStart(mins,2):"")}function createVerboseFormattingArg(start,end,context,separator){var startInfo=expandZonedMarker(start,context.calendarSystem),endInfo;return{date:startInfo,start:startInfo,end:end?expandZonedMarker(end,context.calendarSystem):null,timeZone:context.timeZone,localeCodes:context.locale.codes,separator:separator}}function expandZonedMarker(dateInfo,calendarSystem){var a=calendarSystem.markerToArray(dateInfo.marker);return{marker:dateInfo.marker,timeZoneOffset:dateInfo.timeZoneOffset,array:a,year:a[0],month:a[1],day:a[2],hour:a[3],minute:a[4],second:a[5],millisecond:a[6]}}var EventSourceApi=function(){function EventSourceApi(calendar,internalEventSource){this.calendar=calendar,this.internalEventSource=internalEventSource}return EventSourceApi.prototype.remove=function(){this.calendar.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},EventSourceApi.prototype.refetch=function(){this.calendar.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(EventSourceApi.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(EventSourceApi.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!0,configurable:!0}),EventSourceApi}(),EventApi=function(){function EventApi(calendar,def,instance){this._calendar=calendar,this._def=def,this._instance=instance||null}return EventApi.prototype.setProp=function(name,val){var _a,_b;if(name in DATE_PROPS);else if(name in NON_DATE_PROPS)"function"==typeof NON_DATE_PROPS[name]&&(val=NON_DATE_PROPS[name](val)),this.mutate({standardProps:(_a={},_a[name]=val,_a)});else if(name in UNSCOPED_EVENT_UI_PROPS){var ui=void 0;"function"==typeof UNSCOPED_EVENT_UI_PROPS[name]&&(val=UNSCOPED_EVENT_UI_PROPS[name](val)),"color"===name?ui={backgroundColor:val,borderColor:val}:"editable"===name?ui={startEditable:val,durationEditable:val}:((_b={})[name]=val,ui=_b),this.mutate({standardProps:{ui:ui}})}},EventApi.prototype.setExtendedProp=function(name,val){var _a;this.mutate({extendedProps:(_a={},_a[name]=val,_a)})},EventApi.prototype.setStart=function(startInput,options){void 0===options&&(options={});var dateEnv=this._calendar.dateEnv,start=dateEnv.createMarker(startInput);if(start&&this._instance){var instanceRange,startDelta=diffDates(this._instance.range.start,start,dateEnv,options.granularity);options.maintainDuration?this.mutate({datesDelta:startDelta}):this.mutate({startDelta:startDelta})}},EventApi.prototype.setEnd=function(endInput,options){void 0===options&&(options={});var dateEnv=this._calendar.dateEnv,end;if((null==endInput||(end=dateEnv.createMarker(endInput)))&&this._instance)if(end){var endDelta=diffDates(this._instance.range.end,end,dateEnv,options.granularity);this.mutate({endDelta:endDelta})}else this.mutate({standardProps:{hasEnd:!1}})},EventApi.prototype.setDates=function(startInput,endInput,options){void 0===options&&(options={});var dateEnv=this._calendar.dateEnv,standardProps={allDay:options.allDay},start=dateEnv.createMarker(startInput),end;if(start&&(null==endInput||(end=dateEnv.createMarker(endInput)))&&this._instance){var instanceRange=this._instance.range;!0===options.allDay&&(instanceRange=computeAlignedDayRange(instanceRange));var startDelta=diffDates(instanceRange.start,start,dateEnv,options.granularity);if(end){var endDelta=diffDates(instanceRange.end,end,dateEnv,options.granularity);durationsEqual(startDelta,endDelta)?this.mutate({datesDelta:startDelta,standardProps:standardProps}):this.mutate({startDelta:startDelta,endDelta:endDelta,standardProps:standardProps})}else standardProps.hasEnd=!1,this.mutate({datesDelta:startDelta,standardProps:standardProps})}},EventApi.prototype.moveStart=function(deltaInput){var delta=createDuration(deltaInput);delta&&this.mutate({startDelta:delta})},EventApi.prototype.moveEnd=function(deltaInput){var delta=createDuration(deltaInput);delta&&this.mutate({endDelta:delta})},EventApi.prototype.moveDates=function(deltaInput){var delta=createDuration(deltaInput);delta&&this.mutate({datesDelta:delta})},EventApi.prototype.setAllDay=function(allDay,options){void 0===options&&(options={});var standardProps={allDay:allDay},maintainDuration=options.maintainDuration;null==maintainDuration&&(maintainDuration=this._calendar.opt("allDayMaintainDuration")),this._def.allDay!==allDay&&(standardProps.hasEnd=maintainDuration),this.mutate({standardProps:standardProps})},EventApi.prototype.formatRange=function(formatInput){var dateEnv=this._calendar.dateEnv,instance=this._instance,formatter=createFormatter(formatInput,this._calendar.opt("defaultRangeSeparator"));return this._def.hasEnd?dateEnv.formatRange(instance.range.start,instance.range.end,formatter,{forcedStartTzo:instance.forcedStartTzo,forcedEndTzo:instance.forcedEndTzo}):dateEnv.format(instance.range.start,formatter,{forcedTzo:instance.forcedStartTzo})},EventApi.prototype.mutate=function(mutation){var def=this._def,instance=this._instance;if(instance){this._calendar.dispatch({type:"MUTATE_EVENTS",instanceId:instance.instanceId,mutation:mutation,fromApi:!0});var eventStore=this._calendar.state.eventStore;this._def=eventStore.defs[def.defId],this._instance=eventStore.instances[instance.instanceId]}},EventApi.prototype.remove=function(){this._calendar.dispatch({type:"REMOVE_EVENT_DEF",defId:this._def.defId})},Object.defineProperty(EventApi.prototype,"source",{get:function(){var sourceId=this._def.sourceId;return sourceId?new EventSourceApi(this._calendar,this._calendar.state.eventSources[sourceId]):null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"start",{get:function(){return this._instance?this._calendar.dateEnv.toDate(this._instance.range.start):null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._calendar.dateEnv.toDate(this._instance.range.end):null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"id",{get:function(){return this._def.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"title",{get:function(){return this._def.title},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"url",{get:function(){return this._def.url},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"rendering",{get:function(){return this._def.rendering},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!0,configurable:!0}),Object.defineProperty(EventApi.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!0,configurable:!0}),EventApi}();function sliceEventStore(eventStore,eventUiBases,framingRange,nextDayThreshold){var inverseBgByGroupId={},inverseBgByDefId={},defByGroupId={},bgRanges=[],fgRanges=[],eventUis=compileEventUis(eventStore.defs,eventUiBases);for(var defId in eventStore.defs){var def;"inverse-background"===(def=eventStore.defs[defId]).rendering&&(def.groupId?(inverseBgByGroupId[def.groupId]=[],defByGroupId[def.groupId]||(defByGroupId[def.groupId]=def)):inverseBgByDefId[defId]=[])}for(var instanceId in eventStore.instances){var instance=eventStore.instances[instanceId],def,ui=eventUis[(def=eventStore.defs[instance.defId]).defId],origRange=instance.range,normalRange=!def.allDay&&nextDayThreshold?computeVisibleDayRange(origRange,nextDayThreshold):origRange,slicedRange=intersectRanges(normalRange,framingRange);slicedRange&&("inverse-background"===def.rendering?def.groupId?inverseBgByGroupId[def.groupId].push(slicedRange):inverseBgByDefId[instance.defId].push(slicedRange):("background"===def.rendering?bgRanges:fgRanges).push({def:def,ui:ui,instance:instance,range:slicedRange,isStart:normalRange.start&&normalRange.start.valueOf()===slicedRange.start.valueOf(),isEnd:normalRange.end&&normalRange.end.valueOf()===slicedRange.end.valueOf()}))}for(var groupId in inverseBgByGroupId)for(var ranges,invertedRanges,_i=0,invertedRanges_1=invertedRanges=invertRanges(ranges=inverseBgByGroupId[groupId],framingRange);_i<invertedRanges_1.length;_i++){var invertedRange=invertedRanges_1[_i],def,ui=eventUis[(def=defByGroupId[groupId]).defId];bgRanges.push({def:def,ui:ui,instance:null,range:invertedRange,isStart:!1,isEnd:!1})}for(var defId in inverseBgByDefId)for(var ranges,invertedRanges,_a=0,invertedRanges_2=invertedRanges=invertRanges(ranges=inverseBgByDefId[defId],framingRange);_a<invertedRanges_2.length;_a++){var invertedRange=invertedRanges_2[_a];bgRanges.push({def:eventStore.defs[defId],ui:eventUis[defId],instance:null,range:invertedRange,isStart:!1,isEnd:!1})}return{bg:bgRanges,fg:fgRanges}}function hasBgRendering(def){return"background"===def.rendering||"inverse-background"===def.rendering}function filterSegsViaEls(context,segs,isMirror){var calendar=context.calendar,view=context.view;calendar.hasPublicHandlers("eventRender")&&(segs=segs.filter((function(seg){var custom=calendar.publiclyTrigger("eventRender",[{event:new EventApi(calendar,seg.eventRange.def,seg.eventRange.instance),isMirror:isMirror,isStart:seg.isStart,isEnd:seg.isEnd,el:seg.el,view:view}]);return!1!==custom&&(custom&&!0!==custom&&(seg.el=custom),!0)})));for(var _i=0,segs_1=segs;_i<segs_1.length;_i++){var seg=segs_1[_i];setElSeg(seg.el,seg)}return segs}function setElSeg(el,seg){el.fcSeg=seg}function getElSeg(el){return el.fcSeg||null}function compileEventUis(eventDefs,eventUiBases){return mapHash(eventDefs,(function(eventDef){return compileEventUi(eventDef,eventUiBases)}))}function compileEventUi(eventDef,eventUiBases){var uis=[];return eventUiBases[""]&&uis.push(eventUiBases[""]),eventUiBases[eventDef.defId]&&uis.push(eventUiBases[eventDef.defId]),uis.push(eventDef.ui),combineEventUis(uis)}function triggerRenderedSegs(context,segs,isMirrors){var calendar=context.calendar,view=context.view;if(calendar.hasPublicHandlers("eventPositioned"))for(var _i=0,segs_2=segs;_i<segs_2.length;_i++){var seg=segs_2[_i];calendar.publiclyTriggerAfterSizing("eventPositioned",[{event:new EventApi(calendar,seg.eventRange.def,seg.eventRange.instance),isMirror:isMirrors,isStart:seg.isStart,isEnd:seg.isEnd,el:seg.el,view:view}])}calendar.state.eventSourceLoadingLevel||(calendar.afterSizingTriggers._eventsPositioned=[null])}function triggerWillRemoveSegs(context,segs,isMirrors){for(var calendar=context.calendar,view=context.view,_i=0,segs_3=segs;_i<segs_3.length;_i++){var seg=segs_3[_i];calendar.trigger("eventElRemove",seg.el)}if(calendar.hasPublicHandlers("eventDestroy"))for(var _a=0,segs_4=segs;_a<segs_4.length;_a++){var seg=segs_4[_a];calendar.publiclyTrigger("eventDestroy",[{event:new EventApi(calendar,seg.eventRange.def,seg.eventRange.instance),isMirror:isMirrors,el:seg.el,view:view}])}}function computeEventDraggable(context,eventDef,eventUi){for(var calendar=context.calendar,view=context.view,transformers=calendar.pluginSystem.hooks.isDraggableTransformers,val=eventUi.startEditable,_i=0,transformers_1=transformers;_i<transformers_1.length;_i++){var transformer;val=(0,transformers_1[_i])(val,eventDef,eventUi,view)}return val}function computeEventStartResizable(context,eventDef,eventUi){return eventUi.durationEditable&&context.options.eventResizableFromStart}function computeEventEndResizable(context,eventDef,eventUi){return eventUi.durationEditable}function applyMutationToEventStore(eventStore,eventConfigBase,mutation,calendar){var eventConfigs=compileEventUis(eventStore.defs,eventConfigBase),dest={defs:{},instances:{}};for(var defId in eventStore.defs){var def=eventStore.defs[defId];dest.defs[defId]=applyMutationToEventDef(def,eventConfigs[defId],mutation,calendar.pluginSystem.hooks.eventDefMutationAppliers,calendar)}for(var instanceId in eventStore.instances){var instance=eventStore.instances[instanceId],def=dest.defs[instance.defId];dest.instances[instanceId]=applyMutationToEventInstance(instance,def,eventConfigs[instance.defId],mutation,calendar)}return dest}function applyMutationToEventDef(eventDef,eventConfig,mutation,appliers,calendar){var standardProps=mutation.standardProps||{};null==standardProps.hasEnd&&eventConfig.durationEditable&&(mutation.startDelta||mutation.endDelta)&&(standardProps.hasEnd=!0);var copy=__assign({},eventDef,standardProps,{ui:__assign({},eventDef.ui,standardProps.ui)});mutation.extendedProps&&(copy.extendedProps=__assign({},copy.extendedProps,mutation.extendedProps));for(var _i=0,appliers_1=appliers;_i<appliers_1.length;_i++){var applier;(0,appliers_1[_i])(copy,mutation,calendar)}return!copy.hasEnd&&calendar.opt("forceEventDuration")&&(copy.hasEnd=!0),copy}function applyMutationToEventInstance(eventInstance,eventDef,eventConfig,mutation,calendar){var dateEnv=calendar.dateEnv,forceAllDay=mutation.standardProps&&!0===mutation.standardProps.allDay,clearEnd=mutation.standardProps&&!1===mutation.standardProps.hasEnd,copy=__assign({},eventInstance);return forceAllDay&&(copy.range=computeAlignedDayRange(copy.range)),mutation.datesDelta&&eventConfig.startEditable&&(copy.range={start:dateEnv.add(copy.range.start,mutation.datesDelta),end:dateEnv.add(copy.range.end,mutation.datesDelta)}),mutation.startDelta&&eventConfig.durationEditable&&(copy.range={start:dateEnv.add(copy.range.start,mutation.startDelta),end:copy.range.end}),mutation.endDelta&&eventConfig.durationEditable&&(copy.range={start:copy.range.start,end:dateEnv.add(copy.range.end,mutation.endDelta)}),clearEnd&&(copy.range={start:copy.range.start,end:calendar.getDefaultEventEnd(eventDef.allDay,copy.range.start)}),eventDef.allDay&&(copy.range={start:startOfDay(copy.range.start),end:startOfDay(copy.range.end)}),copy.range.end<copy.range.start&&(copy.range.end=calendar.getDefaultEventEnd(eventDef.allDay,copy.range.start)),copy}function reduceEventStore(eventStore,action,eventSources,dateProfile,calendar){switch(action.type){case"RECEIVE_EVENTS":return receiveRawEvents(eventStore,eventSources[action.sourceId],action.fetchId,action.fetchRange,action.rawEvents,calendar);case"ADD_EVENTS":return addEvent(eventStore,action.eventStore,dateProfile?dateProfile.activeRange:null,calendar);case"MERGE_EVENTS":return mergeEventStores(eventStore,action.eventStore);case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return dateProfile?expandRecurring(eventStore,dateProfile.activeRange,calendar):eventStore;case"CHANGE_TIMEZONE":return rezoneDates(eventStore,action.oldDateEnv,calendar.dateEnv);case"MUTATE_EVENTS":return applyMutationToRelated(eventStore,action.instanceId,action.mutation,action.fromApi,calendar);case"REMOVE_EVENT_INSTANCES":return excludeInstances(eventStore,action.instances);case"REMOVE_EVENT_DEF":return filterEventStoreDefs(eventStore,(function(eventDef){return eventDef.defId!==action.defId}));case"REMOVE_EVENT_SOURCE":return excludeEventsBySourceId(eventStore,action.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return filterEventStoreDefs(eventStore,(function(eventDef){return!eventDef.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};case"RESET_EVENTS":return{defs:eventStore.defs,instances:eventStore.instances};default:return eventStore}}function receiveRawEvents(eventStore,eventSource,fetchId,fetchRange,rawEvents,calendar){if(eventSource&&fetchId===eventSource.latestFetchId){var subset=parseEvents(transformRawEvents(rawEvents,eventSource,calendar),eventSource.sourceId,calendar);return fetchRange&&(subset=expandRecurring(subset,fetchRange,calendar)),mergeEventStores(excludeEventsBySourceId(eventStore,eventSource.sourceId),subset)}return eventStore}function addEvent(eventStore,subset,expandRange,calendar){return expandRange&&(subset=expandRecurring(subset,expandRange,calendar)),mergeEventStores(eventStore,subset)}function rezoneDates(eventStore,oldDateEnv,newDateEnv){var defs=eventStore.defs,instances=mapHash(eventStore.instances,(function(instance){var def=defs[instance.defId];return def.allDay||def.recurringDef?instance:__assign({},instance,{range:{start:newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start,instance.forcedStartTzo)),end:newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end,instance.forcedEndTzo))},forcedStartTzo:newDateEnv.canComputeOffset?null:instance.forcedStartTzo,forcedEndTzo:newDateEnv.canComputeOffset?null:instance.forcedEndTzo})}));return{defs:defs,instances:instances}}function applyMutationToRelated(eventStore,instanceId,mutation,fromApi,calendar){var relevant=getRelevantEvents(eventStore,instanceId),eventConfigBase;return mergeEventStores(eventStore,relevant=applyMutationToEventStore(relevant,fromApi?{"":{startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}:calendar.eventUiBases,mutation,calendar))}function excludeEventsBySourceId(eventStore,sourceId){return filterEventStoreDefs(eventStore,(function(eventDef){return eventDef.sourceId!==sourceId}))}function excludeInstances(eventStore,removals){return{defs:eventStore.defs,instances:filterHash(eventStore.instances,(function(instance){return!removals[instance.instanceId]}))}}function isInteractionValid(interaction,calendar){return isNewPropsValid({eventDrag:interaction},calendar)}function isDateSelectionValid(dateSelection,calendar){return isNewPropsValid({dateSelection:dateSelection},calendar)}function isNewPropsValid(newProps,calendar){var view=calendar.view,props=__assign({businessHours:view?view.props.businessHours:{defs:{},instances:{}},dateSelection:"",eventStore:calendar.state.eventStore,eventUiBases:calendar.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},newProps);return(calendar.pluginSystem.hooks.isPropsValid||isPropsValid)(props,calendar)}function isPropsValid(state,calendar,dateSpanMeta,filterConfig){return void 0===dateSpanMeta&&(dateSpanMeta={}),!(state.eventDrag&&!isInteractionPropsValid(state,calendar,dateSpanMeta,filterConfig))&&!(state.dateSelection&&!isDateSelectionPropsValid(state,calendar,dateSpanMeta,filterConfig))}function isInteractionPropsValid(state,calendar,dateSpanMeta,filterConfig){var interaction=state.eventDrag,subjectEventStore=interaction.mutatedEvents,subjectDefs=subjectEventStore.defs,subjectInstances=subjectEventStore.instances,subjectConfigs=compileEventUis(subjectDefs,interaction.isEvent?state.eventUiBases:{"":calendar.selectionConfig});filterConfig&&(subjectConfigs=mapHash(subjectConfigs,filterConfig));var otherEventStore=excludeInstances(state.eventStore,interaction.affectedEvents.instances),otherDefs=otherEventStore.defs,otherInstances=otherEventStore.instances,otherConfigs=compileEventUis(otherDefs,state.eventUiBases);for(var subjectInstanceId in subjectInstances){var subjectInstance=subjectInstances[subjectInstanceId],subjectRange=subjectInstance.range,subjectConfig=subjectConfigs[subjectInstance.defId],subjectDef=subjectDefs[subjectInstance.defId];if(!allConstraintsPass(subjectConfig.constraints,subjectRange,otherEventStore,state.businessHours,calendar))return!1;var overlapFunc=calendar.opt("eventOverlap");for(var otherInstanceId in"function"!=typeof overlapFunc&&(overlapFunc=null),otherInstances){var otherInstance=otherInstances[otherInstanceId];if(rangesIntersect(subjectRange,otherInstance.range)){var otherOverlap;if(!1===otherConfigs[otherInstance.defId].overlap&&interaction.isEvent)return!1;if(!1===subjectConfig.overlap)return!1;if(overlapFunc&&!overlapFunc(new EventApi(calendar,otherDefs[otherInstance.defId],otherInstance),new EventApi(calendar,subjectDef,subjectInstance)))return!1}}for(var calendarEventStore=calendar.state.eventStore,_i=0,_a=subjectConfig.allows;_i<_a.length;_i++){var subjectAllow=_a[_i],subjectDateSpan=__assign({},dateSpanMeta,{range:subjectInstance.range,allDay:subjectDef.allDay}),origDef=calendarEventStore.defs[subjectDef.defId],origInstance=calendarEventStore.instances[subjectInstanceId],eventApi=void 0;if(eventApi=origDef?new EventApi(calendar,origDef,origInstance):new EventApi(calendar,subjectDef),!subjectAllow(calendar.buildDateSpanApi(subjectDateSpan),eventApi))return!1}}return!0}function isDateSelectionPropsValid(state,calendar,dateSpanMeta,filterConfig){var relevantEventStore=state.eventStore,relevantDefs=relevantEventStore.defs,relevantInstances=relevantEventStore.instances,selection=state.dateSelection,selectionRange=selection.range,selectionConfig=calendar.selectionConfig;if(filterConfig&&(selectionConfig=filterConfig(selectionConfig)),!allConstraintsPass(selectionConfig.constraints,selectionRange,relevantEventStore,state.businessHours,calendar))return!1;var overlapFunc=calendar.opt("selectOverlap");for(var relevantInstanceId in"function"!=typeof overlapFunc&&(overlapFunc=null),relevantInstances){var relevantInstance=relevantInstances[relevantInstanceId];if(rangesIntersect(selectionRange,relevantInstance.range)){if(!1===selectionConfig.overlap)return!1;if(overlapFunc&&!overlapFunc(new EventApi(calendar,relevantDefs[relevantInstance.defId],relevantInstance)))return!1}}for(var _i=0,_a=selectionConfig.allows;_i<_a.length;_i++){var selectionAllow=_a[_i],fullDateSpan=__assign({},dateSpanMeta,selection);if(!selectionAllow(calendar.buildDateSpanApi(fullDateSpan),null))return!1}return!0}function allConstraintsPass(constraints,subjectRange,otherEventStore,businessHoursUnexpanded,calendar){for(var _i=0,constraints_1=constraints;_i<constraints_1.length;_i++){var constraint;if(!anyRangesContainRange(constraintToRanges(constraints_1[_i],subjectRange,otherEventStore,businessHoursUnexpanded,calendar),subjectRange))return!1}return!0}function constraintToRanges(constraint,subjectRange,otherEventStore,businessHoursUnexpanded,calendar){return"businessHours"===constraint?eventStoreToRanges(expandRecurring(businessHoursUnexpanded,subjectRange,calendar)):"string"==typeof constraint?eventStoreToRanges(filterEventStoreDefs(otherEventStore,(function(eventDef){return eventDef.groupId===constraint}))):"object"==typeof constraint&&constraint?eventStoreToRanges(expandRecurring(constraint,subjectRange,calendar)):[]}function eventStoreToRanges(eventStore){var instances=eventStore.instances,ranges=[];for(var instanceId in instances)ranges.push(instances[instanceId].range);return ranges}function anyRangesContainRange(outerRanges,innerRange){for(var _i=0,outerRanges_1=outerRanges;_i<outerRanges_1.length;_i++){var outerRange;if(rangeContainsRange(outerRanges_1[_i],innerRange))return!0}return!1}function normalizeConstraint(input,calendar){return Array.isArray(input)?parseEvents(input,"",calendar,!0):"object"==typeof input&&input?parseEvents([input],"",calendar,!0):null!=input?String(input):null}function htmlEscape(s){return(s+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")}function cssToStr(cssProps){var statements=[];for(var name_1 in cssProps){var val=cssProps[name_1];null!=val&&""!==val&&statements.push(name_1+":"+val)}return statements.join(";")}function attrsToStr(attrs){var parts=[];for(var name_2 in attrs){var val=attrs[name_2];null!=val&&parts.push(name_2+'="'+htmlEscape(val)+'"')}return parts.join(" ")}function parseClassName(raw){return Array.isArray(raw)?raw:"string"==typeof raw?raw.split(/\s+/):[]}var UNSCOPED_EVENT_UI_PROPS={editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:null,overlap:null,allow:null,className:parseClassName,classNames:parseClassName,color:String,backgroundColor:String,borderColor:String,textColor:String};function processUnscopedUiProps(rawProps,calendar,leftovers){var props=refineProps(rawProps,UNSCOPED_EVENT_UI_PROPS,{},leftovers),constraint=normalizeConstraint(props.constraint,calendar);return{startEditable:null!=props.startEditable?props.startEditable:props.editable,durationEditable:null!=props.durationEditable?props.durationEditable:props.editable,constraints:null!=constraint?[constraint]:[],overlap:props.overlap,allows:null!=props.allow?[props.allow]:[],backgroundColor:props.backgroundColor||props.color,borderColor:props.borderColor||props.color,textColor:props.textColor,classNames:props.classNames.concat(props.className)}}function processScopedUiProps(prefix,rawScoped,calendar,leftovers){var rawUnscoped={},wasFound={};for(var key in UNSCOPED_EVENT_UI_PROPS){var scopedKey=prefix+capitaliseFirstLetter(key);rawUnscoped[key]=rawScoped[scopedKey],wasFound[scopedKey]=!0}if("event"===prefix&&(rawUnscoped.editable=rawScoped.editable),leftovers)for(var key in rawScoped)wasFound[key]||(leftovers[key]=rawScoped[key]);return processUnscopedUiProps(rawUnscoped,calendar)}var EMPTY_EVENT_UI={startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function combineEventUis(uis){return uis.reduce(combineTwoEventUis,EMPTY_EVENT_UI)}function combineTwoEventUis(item0,item1){return{startEditable:null!=item1.startEditable?item1.startEditable:item0.startEditable,durationEditable:null!=item1.durationEditable?item1.durationEditable:item0.durationEditable,constraints:item0.constraints.concat(item1.constraints),overlap:"boolean"==typeof item1.overlap?item1.overlap:item0.overlap,allows:item0.allows.concat(item1.allows),backgroundColor:item1.backgroundColor||item0.backgroundColor,borderColor:item1.borderColor||item0.borderColor,textColor:item1.textColor||item0.textColor,classNames:item0.classNames.concat(item1.classNames)}}var NON_DATE_PROPS={id:String,groupId:String,title:String,url:String,rendering:String,extendedProps:null},DATE_PROPS={start:null,date:null,end:null,allDay:null},uid=0;function parseEvent(raw,sourceId,calendar,allowOpenRange){var allDayDefault=computeIsAllDayDefault(sourceId,calendar),leftovers0={},recurringRes=parseRecurring(raw,allDayDefault,calendar.dateEnv,calendar.pluginSystem.hooks.recurringTypes,leftovers0),def;if(recurringRes)return(def=parseEventDef(leftovers0,sourceId,recurringRes.allDay,Boolean(recurringRes.duration),calendar)).recurringDef={typeId:recurringRes.typeId,typeData:recurringRes.typeData,duration:recurringRes.duration},{def:def,instance:null};var leftovers1={},singleRes=parseSingle(raw,allDayDefault,calendar,leftovers1,allowOpenRange),def,instance;return singleRes?{def:def=parseEventDef(leftovers1,sourceId,singleRes.allDay,singleRes.hasEnd,calendar),instance:createEventInstance(def.defId,singleRes.range,singleRes.forcedStartTzo,singleRes.forcedEndTzo)}:null}function parseEventDef(raw,sourceId,allDay,hasEnd,calendar){var leftovers={},def=pluckNonDateProps(raw,calendar,leftovers);def.defId=String(uid++),def.sourceId=sourceId,def.allDay=allDay,def.hasEnd=hasEnd;for(var _i=0,_a=calendar.pluginSystem.hooks.eventDefParsers;_i<_a.length;_i++){var eventDefParser,newLeftovers={};(0,_a[_i])(def,leftovers,newLeftovers),leftovers=newLeftovers}return def.extendedProps=__assign(leftovers,def.extendedProps||{}),Object.freeze(def.ui.classNames),Object.freeze(def.extendedProps),def}function createEventInstance(defId,range,forcedStartTzo,forcedEndTzo){return{instanceId:String(uid++),defId:defId,range:range,forcedStartTzo:null==forcedStartTzo?null:forcedStartTzo,forcedEndTzo:null==forcedEndTzo?null:forcedEndTzo}}function parseSingle(raw,allDayDefault,calendar,leftovers,allowOpenRange){var props=pluckDateProps(raw,leftovers),allDay=props.allDay,startMeta,startMarker=null,hasEnd=!1,endMeta,endMarker=null;if(startMeta=calendar.dateEnv.createMarkerMeta(props.start))startMarker=startMeta.marker;else if(!allowOpenRange)return null;return null!=props.end&&(endMeta=calendar.dateEnv.createMarkerMeta(props.end)),null==allDay&&(allDay=null!=allDayDefault?allDayDefault:(!startMeta||startMeta.isTimeUnspecified)&&(!endMeta||endMeta.isTimeUnspecified)),allDay&&startMarker&&(startMarker=startOfDay(startMarker)),endMeta&&(endMarker=endMeta.marker,allDay&&(endMarker=startOfDay(endMarker)),startMarker&&endMarker<=startMarker&&(endMarker=null)),endMarker?hasEnd=!0:allowOpenRange||(hasEnd=calendar.opt("forceEventDuration")||!1,endMarker=calendar.dateEnv.add(startMarker,allDay?calendar.defaultAllDayEventDuration:calendar.defaultTimedEventDuration)),{allDay:allDay,hasEnd:hasEnd,range:{start:startMarker,end:endMarker},forcedStartTzo:startMeta?startMeta.forcedTzo:null,forcedEndTzo:endMeta?endMeta.forcedTzo:null}}function pluckDateProps(raw,leftovers){var props=refineProps(raw,DATE_PROPS,{},leftovers);return props.start=null!==props.start?props.start:props.date,delete props.date,props}function pluckNonDateProps(raw,calendar,leftovers){var preLeftovers={},props=refineProps(raw,NON_DATE_PROPS,{},preLeftovers),ui=processUnscopedUiProps(preLeftovers,calendar,leftovers);return props.publicId=props.id,delete props.id,props.ui=ui,props}function computeIsAllDayDefault(sourceId,calendar){var res=null,source;sourceId&&(res=calendar.state.eventSources[sourceId].allDayDefault);return null==res&&(res=calendar.opt("allDayDefault")),res}var DEF_DEFAULTS={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],rendering:"inverse-background",classNames:"fc-nonbusiness",groupId:"_businessHours"};function parseBusinessHours(input,calendar){return parseEvents(refineInputs(input),"",calendar)}function refineInputs(input){var rawDefs;return rawDefs=(rawDefs=!0===input?[{}]:Array.isArray(input)?input.filter((function(rawDef){return rawDef.daysOfWeek})):"object"==typeof input&&input?[input]:[]).map((function(rawDef){return __assign({},DEF_DEFAULTS,rawDef)}))}function memoizeRendering(renderFunc,unrenderFunc,dependencies){void 0===dependencies&&(dependencies=[]);var dependents=[],thisContext,prevArgs;function unrender(){if(prevArgs){for(var _i=0,dependents_1=dependents;_i<dependents_1.length;_i++){var dependent;dependents_1[_i].unrender()}unrenderFunc&&unrenderFunc.apply(thisContext,prevArgs),prevArgs=null}}function res(){prevArgs&&isArraysEqual(prevArgs,arguments)||(unrender(),thisContext=this,prevArgs=arguments,renderFunc.apply(this,arguments))}res.dependents=dependents,res.unrender=unrender;for(var _i=0,dependencies_1=dependencies;_i<dependencies_1.length;_i++){var dependency;dependencies_1[_i].dependents.push(res)}return res}var EMPTY_EVENT_STORE={defs:{},instances:{}},Splitter=function(){function Splitter(){this.getKeysForEventDefs=memoize(this._getKeysForEventDefs),this.splitDateSelection=memoize(this._splitDateSpan),this.splitEventStore=memoize(this._splitEventStore),this.splitIndividualUi=memoize(this._splitIndividualUi),this.splitEventDrag=memoize(this._splitInteraction),this.splitEventResize=memoize(this._splitInteraction),this.eventUiBuilders={}}return Splitter.prototype.splitProps=function(props){var _this=this,keyInfos=this.getKeyInfo(props),defKeys=this.getKeysForEventDefs(props.eventStore),dateSelections=this.splitDateSelection(props.dateSelection),individualUi=this.splitIndividualUi(props.eventUiBases,defKeys),eventStores=this.splitEventStore(props.eventStore,defKeys),eventDrags=this.splitEventDrag(props.eventDrag),eventResizes=this.splitEventResize(props.eventResize),splitProps={};for(var key in this.eventUiBuilders=mapHash(keyInfos,(function(info,key){return _this.eventUiBuilders[key]||memoize(buildEventUiForKey)})),keyInfos){var keyInfo=keyInfos[key],eventStore=eventStores[key]||EMPTY_EVENT_STORE,buildEventUi=this.eventUiBuilders[key];splitProps[key]={businessHours:keyInfo.businessHours||props.businessHours,dateSelection:dateSelections[key]||null,eventStore:eventStore,eventUiBases:buildEventUi(props.eventUiBases[""],keyInfo.ui,individualUi[key]),eventSelection:eventStore.instances[props.eventSelection]?props.eventSelection:"",eventDrag:eventDrags[key]||null,eventResize:eventResizes[key]||null}}return splitProps},Splitter.prototype._splitDateSpan=function(dateSpan){var dateSpans={};if(dateSpan)for(var keys,_i=0,keys_1=this.getKeysForDateSpan(dateSpan);_i<keys_1.length;_i++){var key;dateSpans[keys_1[_i]]=dateSpan}return dateSpans},Splitter.prototype._getKeysForEventDefs=function(eventStore){var _this=this;return mapHash(eventStore.defs,(function(eventDef){return _this.getKeysForEventDef(eventDef)}))},Splitter.prototype._splitEventStore=function(eventStore,defKeys){var defs=eventStore.defs,instances=eventStore.instances,splitStores={};for(var defId in defs)for(var _i=0,_a=defKeys[defId];_i<_a.length;_i++){var key;splitStores[key=_a[_i]]||(splitStores[key]={defs:{},instances:{}}),splitStores[key].defs[defId]=defs[defId]}for(var instanceId in instances)for(var instance=instances[instanceId],_b=0,_c=defKeys[instance.defId];_b<_c.length;_b++){var key;splitStores[key=_c[_b]]&&(splitStores[key].instances[instanceId]=instance)}return splitStores},Splitter.prototype._splitIndividualUi=function(eventUiBases,defKeys){var splitHashes={};for(var defId in eventUiBases)if(defId)for(var _i=0,_a=defKeys[defId];_i<_a.length;_i++){var key=_a[_i];splitHashes[key]||(splitHashes[key]={}),splitHashes[key][defId]=eventUiBases[defId]}return splitHashes},Splitter.prototype._splitInteraction=function(interaction){var splitStates={};if(interaction){var affectedStores_1=this._splitEventStore(interaction.affectedEvents,this._getKeysForEventDefs(interaction.affectedEvents)),mutatedKeysByDefId=this._getKeysForEventDefs(interaction.mutatedEvents),mutatedStores_1=this._splitEventStore(interaction.mutatedEvents,mutatedKeysByDefId),populate=function(key){splitStates[key]||(splitStates[key]={affectedEvents:affectedStores_1[key]||EMPTY_EVENT_STORE,mutatedEvents:mutatedStores_1[key]||EMPTY_EVENT_STORE,isEvent:interaction.isEvent,origSeg:interaction.origSeg})};for(var key in affectedStores_1)populate(key);for(var key in mutatedStores_1)populate(key)}return splitStates},Splitter}();function buildEventUiForKey(allUi,eventUiForKey,individualUi){var baseParts=[];allUi&&baseParts.push(allUi),eventUiForKey&&baseParts.push(eventUiForKey);var stuff={"":combineEventUis(baseParts)};return individualUi&&__assign(stuff,individualUi),stuff}function buildGotoAnchorHtml(allOptions,dateEnv,gotoOptions,attrs,innerHtml){var date,type,forceOff,finalOptions;return gotoOptions instanceof Date?date=gotoOptions:(date=gotoOptions.date,type=gotoOptions.type,forceOff=gotoOptions.forceOff),finalOptions={date:dateEnv.formatIso(date,{omitTime:!0}),type:type||"day"},"string"==typeof attrs&&(innerHtml=attrs,attrs=null),attrs=attrs?" "+attrsToStr(attrs):"",innerHtml=innerHtml||"",!forceOff&&allOptions.navLinks?"<a"+attrs+' data-goto="'+htmlEscape(JSON.stringify(finalOptions))+'">'+innerHtml+"</a>":"<span"+attrs+">"+innerHtml+"</span>"}function getAllDayHtml(allOptions){return allOptions.allDayHtml||htmlEscape(allOptions.allDayText)}function getDayClasses(date,dateProfile,context,noThemeHighlight){var calendar=context.calendar,options=context.options,theme=context.theme,dateEnv=context.dateEnv,classes=[],todayStart,todayEnd;return rangeContainsMarker(dateProfile.activeRange,date)?(classes.push("fc-"+DAY_IDS[date.getUTCDay()]),options.monthMode&&dateEnv.getMonth(date)!==dateEnv.getMonth(dateProfile.currentRange.start)&&classes.push("fc-other-month"),todayEnd=addDays(todayStart=startOfDay(calendar.getNow()),1),date<todayStart?classes.push("fc-past"):date>=todayEnd?classes.push("fc-future"):(classes.push("fc-today"),!0!==noThemeHighlight&&classes.push(theme.getClass("today")))):classes.push("fc-disabled-day"),classes}function unpromisify(func,success,failure){var isResolved=!1,wrappedSuccess=function(){isResolved||(isResolved=!0,success.apply(this,arguments))},wrappedFailure=function(){isResolved||(isResolved=!0,failure&&failure.apply(this,arguments))},res=func(wrappedSuccess,wrappedFailure);res&&"function"==typeof res.then&&res.then(wrappedSuccess,wrappedFailure)}var Mixin=function(){function Mixin(){}return Mixin.mixInto=function(destClass){this.mixIntoObj(destClass.prototype)},Mixin.mixIntoObj=function(destObj){var _this=this;Object.getOwnPropertyNames(this.prototype).forEach((function(name){destObj[name]||(destObj[name]=_this.prototype[name])}))},Mixin.mixOver=function(destClass){var _this=this;Object.getOwnPropertyNames(this.prototype).forEach((function(name){destClass.prototype[name]=_this.prototype[name]}))},Mixin}(),EmitterMixin=function(_super){function EmitterMixin(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EmitterMixin,_super),EmitterMixin.prototype.on=function(type,handler){return addToHash(this._handlers||(this._handlers={}),type,handler),this},EmitterMixin.prototype.one=function(type,handler){return addToHash(this._oneHandlers||(this._oneHandlers={}),type,handler),this},EmitterMixin.prototype.off=function(type,handler){return this._handlers&&removeFromHash(this._handlers,type,handler),this._oneHandlers&&removeFromHash(this._oneHandlers,type,handler),this},EmitterMixin.prototype.trigger=function(type){for(var args=[],_i=1;_i<arguments.length;_i++)args[_i-1]=arguments[_i];return this.triggerWith(type,this,args),this},EmitterMixin.prototype.triggerWith=function(type,context,args){return this._handlers&&applyAll(this._handlers[type],context,args),this._oneHandlers&&(applyAll(this._oneHandlers[type],context,args),delete this._oneHandlers[type]),this},EmitterMixin.prototype.hasHandlers=function(type){return this._handlers&&this._handlers[type]&&this._handlers[type].length||this._oneHandlers&&this._oneHandlers[type]&&this._oneHandlers[type].length},EmitterMixin}(Mixin);function addToHash(hash,type,handler){(hash[type]||(hash[type]=[])).push(handler)}function removeFromHash(hash,type,handler){handler?hash[type]&&(hash[type]=hash[type].filter((function(func){return func!==handler}))):delete hash[type]}var PositionCache=function(){function PositionCache(originEl,els,isHorizontal,isVertical){this.originEl=originEl,this.els=els,this.isHorizontal=isHorizontal,this.isVertical=isVertical}return PositionCache.prototype.build=function(){var originEl=this.originEl,originClientRect=this.originClientRect=originEl.getBoundingClientRect();this.isHorizontal&&this.buildElHorizontals(originClientRect.left),this.isVertical&&this.buildElVerticals(originClientRect.top)},PositionCache.prototype.buildElHorizontals=function(originClientLeft){for(var lefts=[],rights=[],_i=0,_a=this.els;_i<_a.length;_i++){var el,rect=_a[_i].getBoundingClientRect();lefts.push(rect.left-originClientLeft),rights.push(rect.right-originClientLeft)}this.lefts=lefts,this.rights=rights},PositionCache.prototype.buildElVerticals=function(originClientTop){for(var tops=[],bottoms=[],_i=0,_a=this.els;_i<_a.length;_i++){var el,rect=_a[_i].getBoundingClientRect();tops.push(rect.top-originClientTop),bottoms.push(rect.bottom-originClientTop)}this.tops=tops,this.bottoms=bottoms},PositionCache.prototype.leftToIndex=function(leftPosition){var lefts=this.lefts,rights=this.rights,len=lefts.length,i;for(i=0;i<len;i++)if(leftPosition>=lefts[i]&&leftPosition<rights[i])return i},PositionCache.prototype.topToIndex=function(topPosition){var tops=this.tops,bottoms=this.bottoms,len=tops.length,i;for(i=0;i<len;i++)if(topPosition>=tops[i]&&topPosition<bottoms[i])return i},PositionCache.prototype.getWidth=function(leftIndex){return this.rights[leftIndex]-this.lefts[leftIndex]},PositionCache.prototype.getHeight=function(topIndex){return this.bottoms[topIndex]-this.tops[topIndex]},PositionCache}(),ScrollController=function(){function ScrollController(){}return ScrollController.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},ScrollController.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},ScrollController.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},ScrollController.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},ScrollController.prototype.canScrollUp=function(){return this.getScrollTop()>0},ScrollController.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},ScrollController.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},ScrollController.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},ScrollController}(),ElementScrollController=function(_super){function ElementScrollController(el){var _this=_super.call(this)||this;return _this.el=el,_this}return __extends(ElementScrollController,_super),ElementScrollController.prototype.getScrollTop=function(){return this.el.scrollTop},ElementScrollController.prototype.getScrollLeft=function(){return this.el.scrollLeft},ElementScrollController.prototype.setScrollTop=function(top){this.el.scrollTop=top},ElementScrollController.prototype.setScrollLeft=function(left){this.el.scrollLeft=left},ElementScrollController.prototype.getScrollWidth=function(){return this.el.scrollWidth},ElementScrollController.prototype.getScrollHeight=function(){return this.el.scrollHeight},ElementScrollController.prototype.getClientHeight=function(){return this.el.clientHeight},ElementScrollController.prototype.getClientWidth=function(){return this.el.clientWidth},ElementScrollController}(ScrollController),WindowScrollController=function(_super){function WindowScrollController(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(WindowScrollController,_super),WindowScrollController.prototype.getScrollTop=function(){return window.pageYOffset},WindowScrollController.prototype.getScrollLeft=function(){return window.pageXOffset},WindowScrollController.prototype.setScrollTop=function(n){window.scroll(window.pageXOffset,n)},WindowScrollController.prototype.setScrollLeft=function(n){window.scroll(n,window.pageYOffset)},WindowScrollController.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},WindowScrollController.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},WindowScrollController.prototype.getClientHeight=function(){return document.documentElement.clientHeight},WindowScrollController.prototype.getClientWidth=function(){return document.documentElement.clientWidth},WindowScrollController}(ScrollController),ScrollComponent=function(_super){function ScrollComponent(overflowX,overflowY){var _this=_super.call(this,createElement("div",{className:"fc-scroller"}))||this;return _this.overflowX=overflowX,_this.overflowY=overflowY,_this.applyOverflow(),_this}return __extends(ScrollComponent,_super),ScrollComponent.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},ScrollComponent.prototype.destroy=function(){removeElement(this.el)},ScrollComponent.prototype.applyOverflow=function(){applyStyle(this.el,{overflowX:this.overflowX,overflowY:this.overflowY})},ScrollComponent.prototype.lockOverflow=function(scrollbarWidths){var overflowX=this.overflowX,overflowY=this.overflowY;scrollbarWidths=scrollbarWidths||this.getScrollbarWidths(),"auto"===overflowX&&(overflowX=scrollbarWidths.bottom||this.canScrollHorizontally()?"scroll":"hidden"),"auto"===overflowY&&(overflowY=scrollbarWidths.left||scrollbarWidths.right||this.canScrollVertically()?"scroll":"hidden"),applyStyle(this.el,{overflowX:overflowX,overflowY:overflowY})},ScrollComponent.prototype.setHeight=function(height){applyStyleProp(this.el,"height",height)},ScrollComponent.prototype.getScrollbarWidths=function(){var edges=computeEdges(this.el);return{left:edges.scrollbarLeft,right:edges.scrollbarRight,bottom:edges.scrollbarBottom}},ScrollComponent}(ElementScrollController),Theme=function(){function Theme(calendarOptions){this.calendarOptions=calendarOptions,this.processIconOverride()}return Theme.prototype.processIconOverride=function(){this.iconOverrideOption&&this.setIconOverride(this.calendarOptions[this.iconOverrideOption])},Theme.prototype.setIconOverride=function(iconOverrideHash){var iconClassesCopy,buttonName;if("object"==typeof iconOverrideHash&&iconOverrideHash){for(buttonName in iconClassesCopy=__assign({},this.iconClasses),iconOverrideHash)iconClassesCopy[buttonName]=this.applyIconOverridePrefix(iconOverrideHash[buttonName]);this.iconClasses=iconClassesCopy}else!1===iconOverrideHash&&(this.iconClasses={})},Theme.prototype.applyIconOverridePrefix=function(className){var prefix=this.iconOverridePrefix;return prefix&&0!==className.indexOf(prefix)&&(className=prefix+className),className},Theme.prototype.getClass=function(key){return this.classes[key]||""},Theme.prototype.getIconClass=function(buttonName){var className=this.iconClasses[buttonName];return className?this.baseIconClass+" "+className:""},Theme.prototype.getCustomButtonIconClass=function(customButtonProps){var className;return this.iconOverrideCustomButtonOption&&(className=customButtonProps[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(className):""},Theme}();Theme.prototype.classes={},Theme.prototype.iconClasses={},Theme.prototype.baseIconClass="",Theme.prototype.iconOverridePrefix="";var guid=0,ComponentContext=function(){function ComponentContext(calendar,theme,dateEnv,options,view){this.calendar=calendar,this.theme=theme,this.dateEnv=dateEnv,this.options=options,this.view=view,this.isRtl="rtl"===options.dir,this.eventOrderSpecs=parseFieldSpecs(options.eventOrder),this.nextDayThreshold=createDuration(options.nextDayThreshold)}return ComponentContext.prototype.extend=function(options,view){return new ComponentContext(this.calendar,this.theme,this.dateEnv,options||this.options,view||this.view)},ComponentContext}(),Component=function(){function Component(){this.everRendered=!1,this.uid=String(guid++)}return Component.addEqualityFuncs=function(newFuncs){this.prototype.equalityFuncs=__assign({},this.prototype.equalityFuncs,newFuncs)},Component.prototype.receiveProps=function(props,context){this.receiveContext(context);var _a=recycleProps(this.props||{},props,this.equalityFuncs),anyChanges=_a.anyChanges,comboProps=_a.comboProps;this.props=comboProps,anyChanges&&(this.everRendered&&this.beforeUpdate(),this.render(comboProps,context),this.everRendered&&this.afterUpdate()),this.everRendered=!0},Component.prototype.receiveContext=function(context){var oldContext=this.context;this.context=context,oldContext||this.firstContext(context)},Component.prototype.render=function(props,context){},Component.prototype.firstContext=function(context){},Component.prototype.beforeUpdate=function(){},Component.prototype.afterUpdate=function(){},Component.prototype.destroy=function(){},Component}();function recycleProps(oldProps,newProps,equalityFuncs){var comboProps={},anyChanges=!1;for(var key in newProps)key in oldProps&&(oldProps[key]===newProps[key]||equalityFuncs[key]&&equalityFuncs[key](oldProps[key],newProps[key]))?comboProps[key]=oldProps[key]:(comboProps[key]=newProps[key],anyChanges=!0);for(var key in oldProps)if(!(key in newProps)){anyChanges=!0;break}return{anyChanges:anyChanges,comboProps:comboProps}}Component.prototype.equalityFuncs={};var DateComponent=function(_super){function DateComponent(el){var _this=_super.call(this)||this;return _this.el=el,_this}return __extends(DateComponent,_super),DateComponent.prototype.destroy=function(){_super.prototype.destroy.call(this),removeElement(this.el)},DateComponent.prototype.buildPositionCaches=function(){},DateComponent.prototype.queryHit=function(positionLeft,positionTop,elWidth,elHeight){return null},DateComponent.prototype.isInteractionValid=function(interaction){var calendar=this.context.calendar,dateProfile=this.props.dateProfile,instances=interaction.mutatedEvents.instances;if(dateProfile)for(var instanceId in instances)if(!rangeContainsRange(dateProfile.validRange,instances[instanceId].range))return!1;return isInteractionValid(interaction,calendar)},DateComponent.prototype.isDateSelectionValid=function(selection){var calendar=this.context.calendar,dateProfile=this.props.dateProfile;return!(dateProfile&&!rangeContainsRange(dateProfile.validRange,selection.range))&&isDateSelectionValid(selection,calendar)},DateComponent.prototype.isValidSegDownEl=function(el){return!this.props.eventDrag&&!this.props.eventResize&&!elementClosest(el,".fc-mirror")&&(this.isPopover()||!this.isInPopover(el))},DateComponent.prototype.isValidDateDownEl=function(el){var segEl=elementClosest(el,this.fgSegSelector);return(!segEl||segEl.classList.contains("fc-mirror"))&&!elementClosest(el,".fc-more")&&!elementClosest(el,"a[data-goto]")&&!this.isInPopover(el)},DateComponent.prototype.isPopover=function(){return this.el.classList.contains("fc-popover")},DateComponent.prototype.isInPopover=function(el){return Boolean(elementClosest(el,".fc-popover"))},DateComponent}(Component);DateComponent.prototype.fgSegSelector=".fc-event-container > *",DateComponent.prototype.bgSegSelector=".fc-bgevent:not(.fc-nonbusiness)";var uid$1=0;function createPlugin(input){return{id:String(uid$1++),deps:input.deps||[],reducers:input.reducers||[],eventDefParsers:input.eventDefParsers||[],isDraggableTransformers:input.isDraggableTransformers||[],eventDragMutationMassagers:input.eventDragMutationMassagers||[],eventDefMutationAppliers:input.eventDefMutationAppliers||[],dateSelectionTransformers:input.dateSelectionTransformers||[],datePointTransforms:input.datePointTransforms||[],dateSpanTransforms:input.dateSpanTransforms||[],views:input.views||{},viewPropsTransformers:input.viewPropsTransformers||[],isPropsValid:input.isPropsValid||null,externalDefTransforms:input.externalDefTransforms||[],eventResizeJoinTransforms:input.eventResizeJoinTransforms||[],viewContainerModifiers:input.viewContainerModifiers||[],eventDropTransformers:input.eventDropTransformers||[],componentInteractions:input.componentInteractions||[],calendarInteractions:input.calendarInteractions||[],themeClasses:input.themeClasses||{},eventSourceDefs:input.eventSourceDefs||[],cmdFormatter:input.cmdFormatter,recurringTypes:input.recurringTypes||[],namedTimeZonedImpl:input.namedTimeZonedImpl,defaultView:input.defaultView||"",elementDraggingImpl:input.elementDraggingImpl,optionChangeHandlers:input.optionChangeHandlers||{}}}var PluginSystem=function(){function PluginSystem(){this.hooks={reducers:[],eventDefParsers:[],isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerModifiers:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,defaultView:"",elementDraggingImpl:null,optionChangeHandlers:{}},this.addedHash={}}return PluginSystem.prototype.add=function(plugin){if(!this.addedHash[plugin.id]){this.addedHash[plugin.id]=!0;for(var _i=0,_a=plugin.deps;_i<_a.length;_i++){var dep=_a[_i];this.add(dep)}this.hooks=combineHooks(this.hooks,plugin)}},PluginSystem}();function combineHooks(hooks0,hooks1){return{reducers:hooks0.reducers.concat(hooks1.reducers),eventDefParsers:hooks0.eventDefParsers.concat(hooks1.eventDefParsers),isDraggableTransformers:hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),eventDragMutationMassagers:hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),eventDefMutationAppliers:hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),dateSelectionTransformers:hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),datePointTransforms:hooks0.datePointTransforms.concat(hooks1.datePointTransforms),dateSpanTransforms:hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),views:__assign({},hooks0.views,hooks1.views),viewPropsTransformers:hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),isPropsValid:hooks1.isPropsValid||hooks0.isPropsValid,externalDefTransforms:hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),eventResizeJoinTransforms:hooks0.eventResizeJoinTransforms.concat(hooks1.eventResizeJoinTransforms),viewContainerModifiers:hooks0.viewContainerModifiers.concat(hooks1.viewContainerModifiers),eventDropTransformers:hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),calendarInteractions:hooks0.calendarInteractions.concat(hooks1.calendarInteractions),componentInteractions:hooks0.componentInteractions.concat(hooks1.componentInteractions),themeClasses:__assign({},hooks0.themeClasses,hooks1.themeClasses),eventSourceDefs:hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),cmdFormatter:hooks1.cmdFormatter||hooks0.cmdFormatter,recurringTypes:hooks0.recurringTypes.concat(hooks1.recurringTypes),namedTimeZonedImpl:hooks1.namedTimeZonedImpl||hooks0.namedTimeZonedImpl,defaultView:hooks0.defaultView||hooks1.defaultView,elementDraggingImpl:hooks0.elementDraggingImpl||hooks1.elementDraggingImpl,optionChangeHandlers:__assign({},hooks0.optionChangeHandlers,hooks1.optionChangeHandlers)}}var eventSourceDef,ArrayEventSourcePlugin=createPlugin({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(raw){return Array.isArray(raw)?raw:Array.isArray(raw.events)?raw.events:null},fetch:function(arg,success){success({rawEvents:arg.eventSource.meta})}}]}),eventSourceDef$1,FuncEventSourcePlugin=createPlugin({eventSourceDefs:[{parseMeta:function(raw){return"function"==typeof raw?raw:"function"==typeof raw.events?raw.events:null},fetch:function(arg,success,failure){var dateEnv=arg.calendar.dateEnv,func;unpromisify(arg.eventSource.meta.bind(null,{start:dateEnv.toDate(arg.range.start),end:dateEnv.toDate(arg.range.end),startStr:dateEnv.formatIso(arg.range.start),endStr:dateEnv.formatIso(arg.range.end),timeZone:dateEnv.timeZone}),(function(rawEvents){success({rawEvents:rawEvents})}),failure)}}]});function requestJson(method,url,params,successCallback,failureCallback){var body=null;"GET"===(method=method.toUpperCase())?url=injectQueryStringParams(url,params):body=encodeParams(params);var xhr=new XMLHttpRequest;xhr.open(method,url,!0),"GET"!==method&&xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xhr.onload=function(){if(xhr.status>=200&&xhr.status<400)try{var res=JSON.parse(xhr.responseText);successCallback(res,xhr)}catch(err){failureCallback("Failure parsing JSON",xhr)}else failureCallback("Request failed",xhr)},xhr.onerror=function(){failureCallback("Request failed",xhr)},xhr.send(body)}function injectQueryStringParams(url,params){return url+(-1===url.indexOf("?")?"?":"&")+encodeParams(params)}function encodeParams(params){var parts=[];for(var key in params)parts.push(encodeURIComponent(key)+"="+encodeURIComponent(params[key]));return parts.join("&")}var eventSourceDef$2,JsonFeedEventSourcePlugin=createPlugin({eventSourceDefs:[{parseMeta:function(raw){if("string"==typeof raw)raw={url:raw};else if(!raw||"object"!=typeof raw||!raw.url)return null;return{url:raw.url,method:(raw.method||"GET").toUpperCase(),extraParams:raw.extraParams,startParam:raw.startParam,endParam:raw.endParam,timeZoneParam:raw.timeZoneParam}},fetch:function(arg,success,failure){var meta=arg.eventSource.meta,requestParams=buildRequestParams(meta,arg.range,arg.calendar);requestJson(meta.method,meta.url,requestParams,(function(rawEvents,xhr){success({rawEvents:rawEvents,xhr:xhr})}),(function(errorMessage,xhr){failure({message:errorMessage,xhr:xhr})}))}}]});function buildRequestParams(meta,range,calendar){var dateEnv=calendar.dateEnv,startParam,endParam,timeZoneParam,customRequestParams,params={};return null==(startParam=meta.startParam)&&(startParam=calendar.opt("startParam")),null==(endParam=meta.endParam)&&(endParam=calendar.opt("endParam")),null==(timeZoneParam=meta.timeZoneParam)&&(timeZoneParam=calendar.opt("timeZoneParam")),customRequestParams="function"==typeof meta.extraParams?meta.extraParams():meta.extraParams||{},__assign(params,customRequestParams),params[startParam]=dateEnv.formatIso(range.start),params[endParam]=dateEnv.formatIso(range.end),"local"!==dateEnv.timeZone&&(params[timeZoneParam]=dateEnv.timeZone),params}var recurring,SimpleRecurrencePlugin=createPlugin({recurringTypes:[{parse:function(rawEvent,leftoverProps,dateEnv){var createMarker=dateEnv.createMarker.bind(dateEnv),processors,props=refineProps(rawEvent,{daysOfWeek:null,startTime:createDuration,endTime:createDuration,startRecur:createMarker,endRecur:createMarker},{},leftoverProps),anyValid=!1;for(var propName in props)if(null!=props[propName]){anyValid=!0;break}if(anyValid){var duration=null;return"duration"in leftoverProps&&(duration=createDuration(leftoverProps.duration),delete leftoverProps.duration),!duration&&props.startTime&&props.endTime&&(duration=subtractDurations(props.endTime,props.startTime)),{allDayGuess:Boolean(!props.startTime&&!props.endTime),duration:duration,typeData:props}}return null},expand:function(typeData,framingRange,dateEnv){var clippedFramingRange=intersectRanges(framingRange,{start:typeData.startRecur,end:typeData.endRecur});return clippedFramingRange?expandRanges(typeData.daysOfWeek,typeData.startTime,clippedFramingRange,dateEnv):[]}}]});function expandRanges(daysOfWeek,startTime,framingRange,dateEnv){for(var dowHash=daysOfWeek?arrayToHash(daysOfWeek):null,dayMarker=startOfDay(framingRange.start),endMarker=framingRange.end,instanceStarts=[];dayMarker<endMarker;){var instanceStart=void 0;dowHash&&!dowHash[dayMarker.getUTCDay()]||(instanceStart=startTime?dateEnv.add(dayMarker,startTime):dayMarker,instanceStarts.push(instanceStart)),dayMarker=addDays(dayMarker,1)}return instanceStarts}var DefaultOptionChangeHandlers=createPlugin({optionChangeHandlers:{events:function(events,calendar,deepEqual){handleEventSources([events],calendar,deepEqual)},eventSources:handleEventSources,plugins:handlePlugins}});function handleEventSources(inputs,calendar,deepEqual){for(var unfoundSources=hashValuesToArray(calendar.state.eventSources),newInputs=[],_i=0,inputs_1=inputs;_i<inputs_1.length;_i++){for(var input=inputs_1[_i],inputFound=!1,i=0;i<unfoundSources.length;i++)if(deepEqual(unfoundSources[i]._raw,input)){unfoundSources.splice(i,1),inputFound=!0;break}inputFound||newInputs.push(input)}for(var _a=0,unfoundSources_1=unfoundSources;_a<unfoundSources_1.length;_a++){var unfoundSource=unfoundSources_1[_a];calendar.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:unfoundSource.sourceId})}for(var _b=0,newInputs_1=newInputs;_b<newInputs_1.length;_b++){var newInput=newInputs_1[_b];calendar.addEventSource(newInput)}}function handlePlugins(inputs,calendar){calendar.addPluginInputs(inputs)}var config={},globalDefaults={defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",columnHeader:!0,defaultView:"",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",timeGridEventMinHeight:0,themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",eventLimit:!1,eventLimitClick:"popover",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5},rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"}},complexOptions=["header","footer","buttonText","buttonIcons"];function mergeOptions(optionObjs){return mergeProps(optionObjs,complexOptions)}var INTERNAL_PLUGINS=[ArrayEventSourcePlugin,FuncEventSourcePlugin,JsonFeedEventSourcePlugin,SimpleRecurrencePlugin,DefaultOptionChangeHandlers];function refinePluginDefs(pluginInputs){for(var plugins=[],_i=0,pluginInputs_1=pluginInputs;_i<pluginInputs_1.length;_i++){var pluginInput=pluginInputs_1[_i];if("string"==typeof pluginInput){var globalName="FullCalendar"+capitaliseFirstLetter(pluginInput);window[globalName]?plugins.push(window[globalName].default):console.warn("Plugin file not loaded for "+pluginInput)}else plugins.push(pluginInput)}return INTERNAL_PLUGINS.concat(plugins)}var RAW_EN_LOCALE={code:"en",week:{dow:0,doy:4},dir:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekLabel:"W",allDayText:"all-day",eventLimitText:"more",noEventsMessage:"No events to display"};function parseRawLocales(explicitRawLocales){for(var defaultCode=explicitRawLocales.length>0?explicitRawLocales[0].code:"en",globalArray=window.FullCalendarLocalesAll||[],globalObject=window.FullCalendarLocales||{},allRawLocales=globalArray.concat(hashValuesToArray(globalObject),explicitRawLocales),rawLocaleMap={en:RAW_EN_LOCALE},_i=0,allRawLocales_1=allRawLocales;_i<allRawLocales_1.length;_i++){var rawLocale=allRawLocales_1[_i];rawLocaleMap[rawLocale.code]=rawLocale}return{map:rawLocaleMap,defaultCode:defaultCode}}function buildLocale(inputSingular,available){return"object"!=typeof inputSingular||Array.isArray(inputSingular)?queryLocale(inputSingular,available):parseLocale(inputSingular.code,[inputSingular.code],inputSingular)}function queryLocale(codeArg,available){var codes=[].concat(codeArg||[]),raw;return parseLocale(codeArg,codes,queryRawLocale(codes,available)||RAW_EN_LOCALE)}function queryRawLocale(codes,available){for(var i=0;i<codes.length;i++)for(var parts=codes[i].toLocaleLowerCase().split("-"),j=parts.length;j>0;j--){var simpleId=parts.slice(0,j).join("-");if(available[simpleId])return available[simpleId]}return null}function parseLocale(codeArg,codes,raw){var merged=mergeProps([RAW_EN_LOCALE,raw],["buttonText"]);delete merged.code;var week=merged.week;return delete merged.week,{codeArg:codeArg,codes:codes,week:week,simpleNumberFormat:new Intl.NumberFormat(codeArg),options:merged}}var OptionsManager=function(){function OptionsManager(overrides){this.overrides=__assign({},overrides),this.dynamicOverrides={},this.compute()}return OptionsManager.prototype.mutate=function(updates,removals,isDynamic){if(Object.keys(updates).length||removals.length){var overrideHash=isDynamic?this.dynamicOverrides:this.overrides;__assign(overrideHash,updates);for(var _i=0,removals_1=removals;_i<removals_1.length;_i++){var propName;delete overrideHash[removals_1[_i]]}this.compute()}},OptionsManager.prototype.compute=function(){var locales=firstDefined(this.dynamicOverrides.locales,this.overrides.locales,globalDefaults.locales),locale=firstDefined(this.dynamicOverrides.locale,this.overrides.locale,globalDefaults.locale),available=parseRawLocales(locales),localeDefaults=buildLocale(locale||available.defaultCode,available.map).options,dir,dirDefaults="rtl"===firstDefined(this.dynamicOverrides.dir,this.overrides.dir,localeDefaults.dir)?rtlDefaults:{};this.dirDefaults=dirDefaults,this.localeDefaults=localeDefaults,this.computed=mergeOptions([globalDefaults,dirDefaults,localeDefaults,this.overrides,this.dynamicOverrides])},OptionsManager}(),calendarSystemClassMap={},GregorianCalendarSystem;function registerCalendarSystem(name,theClass){calendarSystemClassMap[name]=theClass}function createCalendarSystem(name){return new calendarSystemClassMap[name]}registerCalendarSystem("gregory",function(){function GregorianCalendarSystem(){}return GregorianCalendarSystem.prototype.getMarkerYear=function(d){return d.getUTCFullYear()},GregorianCalendarSystem.prototype.getMarkerMonth=function(d){return d.getUTCMonth()},GregorianCalendarSystem.prototype.getMarkerDay=function(d){return d.getUTCDate()},GregorianCalendarSystem.prototype.arrayToMarker=function(arr){return arrayToUtcDate(arr)},GregorianCalendarSystem.prototype.markerToArray=function(marker){return dateToUtcArray(marker)},GregorianCalendarSystem}());var ISO_RE=/^\s*(\d{4})(-(\d{2})(-(\d{2})([T ](\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function parse(str){var m=ISO_RE.exec(str);if(m){var marker=new Date(Date.UTC(Number(m[1]),m[3]?Number(m[3])-1:0,Number(m[5]||1),Number(m[7]||0),Number(m[8]||0),Number(m[10]||0),m[12]?1e3*Number("0."+m[12]):0));if(isValidDate(marker)){var timeZoneOffset=null;return m[13]&&(timeZoneOffset=("-"===m[15]?-1:1)*(60*Number(m[16]||0)+Number(m[18]||0))),{marker:marker,isTimeUnspecified:!m[6],timeZoneOffset:timeZoneOffset}}}return null}var DateEnv=function(){function DateEnv(settings){var timeZone=this.timeZone=settings.timeZone,isNamedTimeZone="local"!==timeZone&&"UTC"!==timeZone;settings.namedTimeZoneImpl&&isNamedTimeZone&&(this.namedTimeZoneImpl=new settings.namedTimeZoneImpl(timeZone)),this.canComputeOffset=Boolean(!isNamedTimeZone||this.namedTimeZoneImpl),this.calendarSystem=createCalendarSystem(settings.calendarSystem),this.locale=settings.locale,this.weekDow=settings.locale.week.dow,this.weekDoy=settings.locale.week.doy,"ISO"===settings.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof settings.firstDay&&(this.weekDow=settings.firstDay),"function"==typeof settings.weekNumberCalculation&&(this.weekNumberFunc=settings.weekNumberCalculation),this.weekLabel=null!=settings.weekLabel?settings.weekLabel:settings.locale.options.weekLabel,this.cmdFormatter=settings.cmdFormatter}return DateEnv.prototype.createMarker=function(input){var meta=this.createMarkerMeta(input);return null===meta?null:meta.marker},DateEnv.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):arrayToUtcDate(dateToLocalArray(new Date))},DateEnv.prototype.createMarkerMeta=function(input){if("string"==typeof input)return this.parse(input);var marker=null;return"number"==typeof input?marker=this.timestampToMarker(input):input instanceof Date?(input=input.valueOf(),isNaN(input)||(marker=this.timestampToMarker(input))):Array.isArray(input)&&(marker=arrayToUtcDate(input)),null!==marker&&isValidDate(marker)?{marker:marker,isTimeUnspecified:!1,forcedTzo:null}:null},DateEnv.prototype.parse=function(s){var parts=parse(s);if(null===parts)return null;var marker=parts.marker,forcedTzo=null;return null!==parts.timeZoneOffset&&(this.canComputeOffset?marker=this.timestampToMarker(marker.valueOf()-60*parts.timeZoneOffset*1e3):forcedTzo=parts.timeZoneOffset),{marker:marker,isTimeUnspecified:parts.isTimeUnspecified,forcedTzo:forcedTzo}},DateEnv.prototype.getYear=function(marker){return this.calendarSystem.getMarkerYear(marker)},DateEnv.prototype.getMonth=function(marker){return this.calendarSystem.getMarkerMonth(marker)},DateEnv.prototype.add=function(marker,dur){var a=this.calendarSystem.markerToArray(marker);return a[0]+=dur.years,a[1]+=dur.months,a[2]+=dur.days,a[6]+=dur.milliseconds,this.calendarSystem.arrayToMarker(a)},DateEnv.prototype.subtract=function(marker,dur){var a=this.calendarSystem.markerToArray(marker);return a[0]-=dur.years,a[1]-=dur.months,a[2]-=dur.days,a[6]-=dur.milliseconds,this.calendarSystem.arrayToMarker(a)},DateEnv.prototype.addYears=function(marker,n){var a=this.calendarSystem.markerToArray(marker);return a[0]+=n,this.calendarSystem.arrayToMarker(a)},DateEnv.prototype.addMonths=function(marker,n){var a=this.calendarSystem.markerToArray(marker);return a[1]+=n,this.calendarSystem.arrayToMarker(a)},DateEnv.prototype.diffWholeYears=function(m0,m1){var calendarSystem=this.calendarSystem;return timeAsMs(m0)===timeAsMs(m1)&&calendarSystem.getMarkerDay(m0)===calendarSystem.getMarkerDay(m1)&&calendarSystem.getMarkerMonth(m0)===calendarSystem.getMarkerMonth(m1)?calendarSystem.getMarkerYear(m1)-calendarSystem.getMarkerYear(m0):null},DateEnv.prototype.diffWholeMonths=function(m0,m1){var calendarSystem=this.calendarSystem;return timeAsMs(m0)===timeAsMs(m1)&&calendarSystem.getMarkerDay(m0)===calendarSystem.getMarkerDay(m1)?calendarSystem.getMarkerMonth(m1)-calendarSystem.getMarkerMonth(m0)+12*(calendarSystem.getMarkerYear(m1)-calendarSystem.getMarkerYear(m0)):null},DateEnv.prototype.greatestWholeUnit=function(m0,m1){var n=this.diffWholeYears(m0,m1);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(m0,m1))?{unit:"month",value:n}:null!==(n=diffWholeWeeks(m0,m1))?{unit:"week",value:n}:null!==(n=diffWholeDays(m0,m1))?{unit:"day",value:n}:isInt(n=diffHours(m0,m1))?{unit:"hour",value:n}:isInt(n=diffMinutes(m0,m1))?{unit:"minute",value:n}:isInt(n=diffSeconds(m0,m1))?{unit:"second",value:n}:{unit:"millisecond",value:m1.valueOf()-m0.valueOf()}},DateEnv.prototype.countDurationsBetween=function(m0,m1,d){var diff;return d.years&&null!==(diff=this.diffWholeYears(m0,m1))?diff/asRoughYears(d):d.months&&null!==(diff=this.diffWholeMonths(m0,m1))?diff/asRoughMonths(d):d.days&&null!==(diff=diffWholeDays(m0,m1))?diff/asRoughDays(d):(m1.valueOf()-m0.valueOf())/asRoughMs(d)},DateEnv.prototype.startOf=function(m,unit){return"year"===unit?this.startOfYear(m):"month"===unit?this.startOfMonth(m):"week"===unit?this.startOfWeek(m):"day"===unit?startOfDay(m):"hour"===unit?startOfHour(m):"minute"===unit?startOfMinute(m):"second"===unit?startOfSecond(m):void 0},DateEnv.prototype.startOfYear=function(m){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(m)])},DateEnv.prototype.startOfMonth=function(m){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(m),this.calendarSystem.getMarkerMonth(m)])},DateEnv.prototype.startOfWeek=function(m){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(m),this.calendarSystem.getMarkerMonth(m),m.getUTCDate()-(m.getUTCDay()-this.weekDow+7)%7])},DateEnv.prototype.computeWeekNumber=function(marker){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(marker)):weekOfYear(marker,this.weekDow,this.weekDoy)},DateEnv.prototype.format=function(marker,formatter,dateOptions){return void 0===dateOptions&&(dateOptions={}),formatter.format({marker:marker,timeZoneOffset:null!=dateOptions.forcedTzo?dateOptions.forcedTzo:this.offsetForMarker(marker)},this)},DateEnv.prototype.formatRange=function(start,end,formatter,dateOptions){return void 0===dateOptions&&(dateOptions={}),dateOptions.isEndExclusive&&(end=addMs(end,-1)),formatter.formatRange({marker:start,timeZoneOffset:null!=dateOptions.forcedStartTzo?dateOptions.forcedStartTzo:this.offsetForMarker(start)},{marker:end,timeZoneOffset:null!=dateOptions.forcedEndTzo?dateOptions.forcedEndTzo:this.offsetForMarker(end)},this)},DateEnv.prototype.formatIso=function(marker,extraOptions){void 0===extraOptions&&(extraOptions={});var timeZoneOffset=null;return extraOptions.omitTimeZoneOffset||(timeZoneOffset=null!=extraOptions.forcedTzo?extraOptions.forcedTzo:this.offsetForMarker(marker)),buildIsoString(marker,timeZoneOffset,extraOptions.omitTime)},DateEnv.prototype.timestampToMarker=function(ms){return"local"===this.timeZone?arrayToUtcDate(dateToLocalArray(new Date(ms))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms)):new Date(ms)},DateEnv.prototype.offsetForMarker=function(m){return"local"===this.timeZone?-arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)):null},DateEnv.prototype.toDate=function(m,forcedTzo){return"local"===this.timeZone?arrayToLocalDate(dateToUtcArray(m)):"UTC"===this.timeZone?new Date(m.valueOf()):this.namedTimeZoneImpl?new Date(m.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m))*60):new Date(m.valueOf()-(forcedTzo||0))},DateEnv}(),SIMPLE_SOURCE_PROPS={id:String,allDayDefault:Boolean,eventDataTransform:Function,success:Function,failure:Function},uid$2=0;function doesSourceNeedRange(eventSource,calendar){var defs;return!calendar.pluginSystem.hooks.eventSourceDefs[eventSource.sourceDefId].ignoreRange}function parseEventSource(raw,calendar){for(var defs=calendar.pluginSystem.hooks.eventSourceDefs,i=defs.length-1;i>=0;i--){var def,meta=defs[i].parseMeta(raw);if(meta){var res=parseEventSourceProps("object"==typeof raw?raw:{},meta,i,calendar);return res._raw=raw,res}}return null}function parseEventSourceProps(raw,meta,sourceDefId,calendar){var leftovers0={},props=refineProps(raw,SIMPLE_SOURCE_PROPS,{},leftovers0),leftovers1={},ui=processUnscopedUiProps(leftovers0,calendar,leftovers1);return props.isFetching=!1,props.latestFetchId="",props.fetchRange=null,props.publicId=String(raw.id||""),props.sourceId=String(uid$2++),props.sourceDefId=sourceDefId,props.meta=meta,props.ui=ui,props.extendedProps=leftovers1,props}function reduceEventSources(eventSources,action,dateProfile,calendar){switch(action.type){case"ADD_EVENT_SOURCES":return addSources(eventSources,action.sources,dateProfile?dateProfile.activeRange:null,calendar);case"REMOVE_EVENT_SOURCE":return removeSource(eventSources,action.sourceId);case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return dateProfile?fetchDirtySources(eventSources,dateProfile.activeRange,calendar):eventSources;case"FETCH_EVENT_SOURCES":case"CHANGE_TIMEZONE":return fetchSourcesByIds(eventSources,action.sourceIds?arrayToHash(action.sourceIds):excludeStaticSources(eventSources,calendar),dateProfile?dateProfile.activeRange:null,calendar);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return receiveResponse(eventSources,action.sourceId,action.fetchId,action.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return eventSources}}var uid$3=0;function addSources(eventSourceHash,sources,fetchRange,calendar){for(var hash={},_i=0,sources_1=sources;_i<sources_1.length;_i++){var source=sources_1[_i];hash[source.sourceId]=source}return fetchRange&&(hash=fetchDirtySources(hash,fetchRange,calendar)),__assign({},eventSourceHash,hash)}function removeSource(eventSourceHash,sourceId){return filterHash(eventSourceHash,(function(eventSource){return eventSource.sourceId!==sourceId}))}function fetchDirtySources(sourceHash,fetchRange,calendar){return fetchSourcesByIds(sourceHash,filterHash(sourceHash,(function(eventSource){return isSourceDirty(eventSource,fetchRange,calendar)})),fetchRange,calendar)}function isSourceDirty(eventSource,fetchRange,calendar){return doesSourceNeedRange(eventSource,calendar)?!calendar.opt("lazyFetching")||!eventSource.fetchRange||eventSource.isFetching||fetchRange.start<eventSource.fetchRange.start||fetchRange.end>eventSource.fetchRange.end:!eventSource.latestFetchId}function fetchSourcesByIds(prevSources,sourceIdHash,fetchRange,calendar){var nextSources={};for(var sourceId in prevSources){var source=prevSources[sourceId];sourceIdHash[sourceId]?nextSources[sourceId]=fetchSource(source,fetchRange,calendar):nextSources[sourceId]=source}return nextSources}function fetchSource(eventSource,fetchRange,calendar){var sourceDef=calendar.pluginSystem.hooks.eventSourceDefs[eventSource.sourceDefId],fetchId=String(uid$3++);return sourceDef.fetch({eventSource:eventSource,calendar:calendar,range:fetchRange},(function(res){var rawEvents=res.rawEvents,calSuccess=calendar.opt("eventSourceSuccess"),calSuccessRes,sourceSuccessRes;eventSource.success&&(sourceSuccessRes=eventSource.success(rawEvents,res.xhr)),calSuccess&&(calSuccessRes=calSuccess(rawEvents,res.xhr)),rawEvents=sourceSuccessRes||calSuccessRes||rawEvents,calendar.dispatch({type:"RECEIVE_EVENTS",sourceId:eventSource.sourceId,fetchId:fetchId,fetchRange:fetchRange,rawEvents:rawEvents})}),(function(error){var callFailure=calendar.opt("eventSourceFailure");console.warn(error.message,error),eventSource.failure&&eventSource.failure(error),callFailure&&callFailure(error),calendar.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:eventSource.sourceId,fetchId:fetchId,fetchRange:fetchRange,error:error})})),__assign({},eventSource,{isFetching:!0,latestFetchId:fetchId})}function receiveResponse(sourceHash,sourceId,fetchId,fetchRange){var _a,eventSource=sourceHash[sourceId];return eventSource&&fetchId===eventSource.latestFetchId?__assign({},sourceHash,((_a={})[sourceId]=__assign({},eventSource,{isFetching:!1,fetchRange:fetchRange}),_a)):sourceHash}function excludeStaticSources(eventSources,calendar){return filterHash(eventSources,(function(eventSource){return doesSourceNeedRange(eventSource,calendar)}))}var DateProfileGenerator=function(){function DateProfileGenerator(viewSpec,calendar){this.viewSpec=viewSpec,this.options=viewSpec.options,this.dateEnv=calendar.dateEnv,this.calendar=calendar,this.initHiddenDays()}return DateProfileGenerator.prototype.buildPrev=function(currentDateProfile,currentDate){var dateEnv=this.dateEnv,prevDate=dateEnv.subtract(dateEnv.startOf(currentDate,currentDateProfile.currentRangeUnit),currentDateProfile.dateIncrement);return this.build(prevDate,-1)},DateProfileGenerator.prototype.buildNext=function(currentDateProfile,currentDate){var dateEnv=this.dateEnv,nextDate=dateEnv.add(dateEnv.startOf(currentDate,currentDateProfile.currentRangeUnit),currentDateProfile.dateIncrement);return this.build(nextDate,1)},DateProfileGenerator.prototype.build=function(currentDate,direction,forceToValid){var validRange;void 0===forceToValid&&(forceToValid=!1);var minTime=null,maxTime=null,currentInfo,isRangeAllDay,renderRange,activeRange,isValid;return validRange=this.buildValidRange(),validRange=this.trimHiddenDays(validRange),forceToValid&&(currentDate=constrainMarkerToRange(currentDate,validRange)),currentInfo=this.buildCurrentRangeInfo(currentDate,direction),isRangeAllDay=/^(year|month|week|day)$/.test(currentInfo.unit),renderRange=this.buildRenderRange(this.trimHiddenDays(currentInfo.range),currentInfo.unit,isRangeAllDay),activeRange=renderRange=this.trimHiddenDays(renderRange),this.options.showNonCurrentDates||(activeRange=intersectRanges(activeRange,currentInfo.range)),minTime=createDuration(this.options.minTime),maxTime=createDuration(this.options.maxTime),activeRange=intersectRanges(activeRange=this.adjustActiveRange(activeRange,minTime,maxTime),validRange),isValid=rangesIntersect(currentInfo.range,validRange),{validRange:validRange,currentRange:currentInfo.range,currentRangeUnit:currentInfo.unit,isRangeAllDay:isRangeAllDay,activeRange:activeRange,renderRange:renderRange,minTime:minTime,maxTime:maxTime,isValid:isValid,dateIncrement:this.buildDateIncrement(currentInfo.duration)}},DateProfileGenerator.prototype.buildValidRange=function(){return this.getRangeOption("validRange",this.calendar.getNow())||{start:null,end:null}},DateProfileGenerator.prototype.buildCurrentRangeInfo=function(date,direction){var _a=this,viewSpec=_a.viewSpec,dateEnv=_a.dateEnv,duration=null,unit=null,range=null,dayCount;return viewSpec.duration?(duration=viewSpec.duration,unit=viewSpec.durationUnit,range=this.buildRangeFromDuration(date,direction,duration,unit)):(dayCount=this.options.dayCount)?(unit="day",range=this.buildRangeFromDayCount(date,direction,dayCount)):(range=this.buildCustomVisibleRange(date))?unit=dateEnv.greatestWholeUnit(range.start,range.end).unit:(unit=greatestDurationDenominator(duration=this.getFallbackDuration()).unit,range=this.buildRangeFromDuration(date,direction,duration,unit)),{duration:duration,unit:unit,range:range}},DateProfileGenerator.prototype.getFallbackDuration=function(){return createDuration({day:1})},DateProfileGenerator.prototype.adjustActiveRange=function(range,minTime,maxTime){var dateEnv=this.dateEnv,start=range.start,end=range.end;return this.viewSpec.class.prototype.usesMinMaxTime&&(asRoughDays(minTime)<0&&(start=startOfDay(start),start=dateEnv.add(start,minTime)),asRoughDays(maxTime)>1&&(end=addDays(end=startOfDay(end),-1),end=dateEnv.add(end,maxTime))),{start:start,end:end}},DateProfileGenerator.prototype.buildRangeFromDuration=function(date,direction,duration,unit){var dateEnv=this.dateEnv,alignment=this.options.dateAlignment,dateIncrementInput,dateIncrementDuration,start,end,res;function computeRes(){start=dateEnv.startOf(date,alignment),end=dateEnv.add(start,duration),res={start:start,end:end}}return alignment||((dateIncrementInput=this.options.dateIncrement)?(dateIncrementDuration=createDuration(dateIncrementInput),alignment=asRoughMs(dateIncrementDuration)<asRoughMs(duration)?greatestDurationDenominator(dateIncrementDuration,!getWeeksFromInput(dateIncrementInput)).unit:unit):alignment=unit),asRoughDays(duration)<=1&&this.isHiddenDay(start)&&(start=startOfDay(start=this.skipHiddenDays(start,direction))),computeRes(),this.trimHiddenDays(res)||(date=this.skipHiddenDays(date,direction),computeRes()),res},DateProfileGenerator.prototype.buildRangeFromDayCount=function(date,direction,dayCount){var dateEnv=this.dateEnv,customAlignment=this.options.dateAlignment,runningCount=0,start=date,end;customAlignment&&(start=dateEnv.startOf(start,customAlignment)),start=startOfDay(start),end=start=this.skipHiddenDays(start,direction);do{end=addDays(end,1),this.isHiddenDay(end)||runningCount++}while(runningCount<dayCount);return{start:start,end:end}},DateProfileGenerator.prototype.buildCustomVisibleRange=function(date){var dateEnv=this.dateEnv,visibleRange=this.getRangeOption("visibleRange",dateEnv.toDate(date));return!visibleRange||null!=visibleRange.start&&null!=visibleRange.end?visibleRange:null},DateProfileGenerator.prototype.buildRenderRange=function(currentRange,currentRangeUnit,isRangeAllDay){return currentRange},DateProfileGenerator.prototype.buildDateIncrement=function(fallback){var dateIncrementInput=this.options.dateIncrement,customAlignment;return dateIncrementInput?createDuration(dateIncrementInput):(customAlignment=this.options.dateAlignment)?createDuration(1,customAlignment):fallback||createDuration({days:1})},DateProfileGenerator.prototype.getRangeOption=function(name){for(var otherArgs=[],_i=1;_i<arguments.length;_i++)otherArgs[_i-1]=arguments[_i];var val=this.options[name];return"function"==typeof val&&(val=val.apply(null,otherArgs)),val&&(val=parseRange(val,this.dateEnv)),val&&(val=computeVisibleDayRange(val)),val},DateProfileGenerator.prototype.initHiddenDays=function(){var hiddenDays=this.options.hiddenDays||[],isHiddenDayHash=[],dayCnt=0,i;for(!1===this.options.weekends&&hiddenDays.push(0,6),i=0;i<7;i++)(isHiddenDayHash[i]=-1!==hiddenDays.indexOf(i))||dayCnt++;if(!dayCnt)throw new Error("invalid hiddenDays");this.isHiddenDayHash=isHiddenDayHash},DateProfileGenerator.prototype.trimHiddenDays=function(range){var start=range.start,end=range.end;return start&&(start=this.skipHiddenDays(start)),end&&(end=this.skipHiddenDays(end,-1,!0)),null==start||null==end||start<end?{start:start,end:end}:null},DateProfileGenerator.prototype.isHiddenDay=function(day){return day instanceof Date&&(day=day.getUTCDay()),this.isHiddenDayHash[day]},DateProfileGenerator.prototype.skipHiddenDays=function(date,inc,isExclusive){for(void 0===inc&&(inc=1),void 0===isExclusive&&(isExclusive=!1);this.isHiddenDayHash[(date.getUTCDay()+(isExclusive?inc:0)+7)%7];)date=addDays(date,inc);return date},DateProfileGenerator}();function isDateProfilesEqual(p0,p1){return rangesEqual(p0.validRange,p1.validRange)&&rangesEqual(p0.activeRange,p1.activeRange)&&rangesEqual(p0.renderRange,p1.renderRange)&&durationsEqual(p0.minTime,p1.minTime)&&durationsEqual(p0.maxTime,p1.maxTime)}function reduce(state,action,calendar){for(var viewType=reduceViewType(state.viewType,action),dateProfile=reduceDateProfile(state.dateProfile,action,state.currentDate,viewType,calendar),eventSources=reduceEventSources(state.eventSources,action,dateProfile,calendar),nextState=__assign({},state,{viewType:viewType,dateProfile:dateProfile,currentDate:reduceCurrentDate(state.currentDate,action,dateProfile),eventSources:eventSources,eventStore:reduceEventStore(state.eventStore,action,eventSources,dateProfile,calendar),dateSelection:reduceDateSelection(state.dateSelection,action,calendar),eventSelection:reduceSelectedEvent(state.eventSelection,action),eventDrag:reduceEventDrag(state.eventDrag,action,eventSources,calendar),eventResize:reduceEventResize(state.eventResize,action,eventSources,calendar),eventSourceLoadingLevel:computeLoadingLevel(eventSources),loadingLevel:computeLoadingLevel(eventSources)}),_i=0,_a=calendar.pluginSystem.hooks.reducers;_i<_a.length;_i++){var reducerFunc;nextState=(0,_a[_i])(nextState,action,calendar)}return nextState}function reduceViewType(currentViewType,action){switch(action.type){case"SET_VIEW_TYPE":return action.viewType;default:return currentViewType}}function reduceDateProfile(currentDateProfile,action,currentDate,viewType,calendar){var newDateProfile;switch(action.type){case"PREV":newDateProfile=calendar.dateProfileGenerators[viewType].buildPrev(currentDateProfile,currentDate);break;case"NEXT":newDateProfile=calendar.dateProfileGenerators[viewType].buildNext(currentDateProfile,currentDate);break;case"SET_DATE":currentDateProfile.activeRange&&rangeContainsMarker(currentDateProfile.currentRange,action.dateMarker)||(newDateProfile=calendar.dateProfileGenerators[viewType].build(action.dateMarker,void 0,!0));break;case"SET_VIEW_TYPE":var generator=calendar.dateProfileGenerators[viewType];if(!generator)throw new Error(viewType?'The FullCalendar view "'+viewType+'" does not exist. Make sure your plugins are loaded correctly.':"No available FullCalendar view plugins.");newDateProfile=generator.build(action.dateMarker||currentDate,void 0,!0)}return!newDateProfile||!newDateProfile.isValid||currentDateProfile&&isDateProfilesEqual(currentDateProfile,newDateProfile)?currentDateProfile:newDateProfile}function reduceCurrentDate(currentDate,action,dateProfile){switch(action.type){case"PREV":case"NEXT":return rangeContainsMarker(dateProfile.currentRange,currentDate)?currentDate:dateProfile.currentRange.start;case"SET_DATE":case"SET_VIEW_TYPE":var newDate=action.dateMarker||currentDate;return dateProfile.activeRange&&!rangeContainsMarker(dateProfile.activeRange,newDate)?dateProfile.currentRange.start:newDate;default:return currentDate}}function reduceDateSelection(currentSelection,action,calendar){switch(action.type){case"SELECT_DATES":return action.selection;case"UNSELECT_DATES":return null;default:return currentSelection}}function reduceSelectedEvent(currentInstanceId,action){switch(action.type){case"SELECT_EVENT":return action.eventInstanceId;case"UNSELECT_EVENT":return"";default:return currentInstanceId}}function reduceEventDrag(currentDrag,action,sources,calendar){switch(action.type){case"SET_EVENT_DRAG":var newDrag=action.state;return{affectedEvents:newDrag.affectedEvents,mutatedEvents:newDrag.mutatedEvents,isEvent:newDrag.isEvent,origSeg:newDrag.origSeg};case"UNSET_EVENT_DRAG":return null;default:return currentDrag}}function reduceEventResize(currentResize,action,sources,calendar){switch(action.type){case"SET_EVENT_RESIZE":var newResize=action.state;return{affectedEvents:newResize.affectedEvents,mutatedEvents:newResize.mutatedEvents,isEvent:newResize.isEvent,origSeg:newResize.origSeg};case"UNSET_EVENT_RESIZE":return null;default:return currentResize}}function computeLoadingLevel(eventSources){var cnt=0;for(var sourceId in eventSources)eventSources[sourceId].isFetching&&cnt++;return cnt}var STANDARD_PROPS={start:null,end:null,allDay:Boolean};function parseDateSpan(raw,dateEnv,defaultDuration){var span=parseOpenDateSpan(raw,dateEnv),range=span.range;if(!range.start)return null;if(!range.end){if(null==defaultDuration)return null;range.end=dateEnv.add(range.start,defaultDuration)}return span}function parseOpenDateSpan(raw,dateEnv){var leftovers={},standardProps=refineProps(raw,STANDARD_PROPS,{},leftovers),startMeta=standardProps.start?dateEnv.createMarkerMeta(standardProps.start):null,endMeta=standardProps.end?dateEnv.createMarkerMeta(standardProps.end):null,allDay=standardProps.allDay;return null==allDay&&(allDay=startMeta&&startMeta.isTimeUnspecified&&(!endMeta||endMeta.isTimeUnspecified)),leftovers.range={start:startMeta?startMeta.marker:null,end:endMeta?endMeta.marker:null},leftovers.allDay=allDay,leftovers}function isDateSpansEqual(span0,span1){return rangesEqual(span0.range,span1.range)&&span0.allDay===span1.allDay&&isSpanPropsEqual(span0,span1)}function isSpanPropsEqual(span0,span1){for(var propName in span1)if("range"!==propName&&"allDay"!==propName&&span0[propName]!==span1[propName])return!1;for(var propName in span0)if(!(propName in span1))return!1;return!0}function buildDateSpanApi(span,dateEnv){return{start:dateEnv.toDate(span.range.start),end:dateEnv.toDate(span.range.end),startStr:dateEnv.formatIso(span.range.start,{omitTime:span.allDay}),endStr:dateEnv.formatIso(span.range.end,{omitTime:span.allDay}),allDay:span.allDay}}function buildDatePointApi(span,dateEnv){return{date:dateEnv.toDate(span.range.start),dateStr:dateEnv.formatIso(span.range.start,{omitTime:span.allDay}),allDay:span.allDay}}function fabricateEventRange(dateSpan,eventUiBases,calendar){var def=parseEventDef({editable:!1},"",dateSpan.allDay,!0,calendar);return{def:def,ui:compileEventUi(def,eventUiBases),instance:createEventInstance(def.defId,dateSpan.range),range:dateSpan.range,isStart:!0,isEnd:!0}}function compileViewDefs(defaultConfigs,overrideConfigs){var hash={},viewType;for(viewType in defaultConfigs)ensureViewDef(viewType,hash,defaultConfigs,overrideConfigs);for(viewType in overrideConfigs)ensureViewDef(viewType,hash,defaultConfigs,overrideConfigs);return hash}function ensureViewDef(viewType,hash,defaultConfigs,overrideConfigs){if(hash[viewType])return hash[viewType];var viewDef=buildViewDef(viewType,hash,defaultConfigs,overrideConfigs);return viewDef&&(hash[viewType]=viewDef),viewDef}function buildViewDef(viewType,hash,defaultConfigs,overrideConfigs){var defaultConfig=defaultConfigs[viewType],overrideConfig=overrideConfigs[viewType],queryProp=function(name){return defaultConfig&&null!==defaultConfig[name]?defaultConfig[name]:overrideConfig&&null!==overrideConfig[name]?overrideConfig[name]:null},theClass=queryProp("class"),superType=queryProp("superType");!superType&&theClass&&(superType=findViewNameBySubclass(theClass,overrideConfigs)||findViewNameBySubclass(theClass,defaultConfigs));var superDef=null;if(superType){if(superType===viewType)throw new Error("Can't have a custom view type that references itself");superDef=ensureViewDef(superType,hash,defaultConfigs,overrideConfigs)}return!theClass&&superDef&&(theClass=superDef.class),theClass?{type:viewType,class:theClass,defaults:__assign({},superDef?superDef.defaults:{},defaultConfig?defaultConfig.options:{}),overrides:__assign({},superDef?superDef.overrides:{},overrideConfig?overrideConfig.options:{})}:null}function findViewNameBySubclass(viewSubclass,configs){var superProto=Object.getPrototypeOf(viewSubclass.prototype);for(var viewType in configs){var parsed=configs[viewType];if(parsed.class&&parsed.class.prototype===superProto)return viewType}return""}function parseViewConfigs(inputs){return mapHash(inputs,parseViewConfig)}var VIEW_DEF_PROPS={type:String,class:null};function parseViewConfig(input){"function"==typeof input&&(input={class:input});var options={},props=refineProps(input,VIEW_DEF_PROPS,{},options);return{superType:props.type,class:props.class,options:options}}function buildViewSpecs(defaultInputs,optionsManager){var defaultConfigs=parseViewConfigs(defaultInputs),overrideConfigs=parseViewConfigs(optionsManager.overrides.views),viewDefs;return mapHash(compileViewDefs(defaultConfigs,overrideConfigs),(function(viewDef){return buildViewSpec(viewDef,overrideConfigs,optionsManager)}))}function buildViewSpec(viewDef,overrideConfigs,optionsManager){var durationInput=viewDef.overrides.duration||viewDef.defaults.duration||optionsManager.dynamicOverrides.duration||optionsManager.overrides.duration,duration=null,durationUnit="",singleUnit="",singleUnitOverrides={};if(durationInput&&(duration=createDuration(durationInput))){var denom=greatestDurationDenominator(duration,!getWeeksFromInput(durationInput));durationUnit=denom.unit,1===denom.value&&(singleUnit=durationUnit,singleUnitOverrides=overrideConfigs[durationUnit]?overrideConfigs[durationUnit].options:{})}var queryButtonText=function(options){var buttonTextMap=options.buttonText||{},buttonTextKey=viewDef.defaults.buttonTextKey;return null!=buttonTextKey&&null!=buttonTextMap[buttonTextKey]?buttonTextMap[buttonTextKey]:null!=buttonTextMap[viewDef.type]?buttonTextMap[viewDef.type]:null!=buttonTextMap[singleUnit]?buttonTextMap[singleUnit]:void 0};return{type:viewDef.type,class:viewDef.class,duration:duration,durationUnit:durationUnit,singleUnit:singleUnit,options:__assign({},globalDefaults,viewDef.defaults,optionsManager.dirDefaults,optionsManager.localeDefaults,optionsManager.overrides,singleUnitOverrides,viewDef.overrides,optionsManager.dynamicOverrides),buttonTextOverride:queryButtonText(optionsManager.dynamicOverrides)||queryButtonText(optionsManager.overrides)||viewDef.overrides.buttonText,buttonTextDefault:queryButtonText(optionsManager.localeDefaults)||queryButtonText(optionsManager.dirDefaults)||viewDef.defaults.buttonText||queryButtonText(globalDefaults)||viewDef.type}}var Toolbar=function(_super){function Toolbar(extraClassName){var _this=_super.call(this)||this;return _this._renderLayout=memoizeRendering(_this.renderLayout,_this.unrenderLayout),_this._updateTitle=memoizeRendering(_this.updateTitle,null,[_this._renderLayout]),_this._updateActiveButton=memoizeRendering(_this.updateActiveButton,null,[_this._renderLayout]),_this._updateToday=memoizeRendering(_this.updateToday,null,[_this._renderLayout]),_this._updatePrev=memoizeRendering(_this.updatePrev,null,[_this._renderLayout]),_this._updateNext=memoizeRendering(_this.updateNext,null,[_this._renderLayout]),_this.el=createElement("div",{className:"fc-toolbar "+extraClassName}),_this}return __extends(Toolbar,_super),Toolbar.prototype.destroy=function(){_super.prototype.destroy.call(this),this._renderLayout.unrender(),removeElement(this.el)},Toolbar.prototype.render=function(props){this._renderLayout(props.layout),this._updateTitle(props.title),this._updateActiveButton(props.activeButton),this._updateToday(props.isTodayEnabled),this._updatePrev(props.isPrevEnabled),this._updateNext(props.isNextEnabled)},Toolbar.prototype.renderLayout=function(layout){var el=this.el;this.viewsWithButtons=[],appendToElement(el,this.renderSection("left",layout.left)),appendToElement(el,this.renderSection("center",layout.center)),appendToElement(el,this.renderSection("right",layout.right))},Toolbar.prototype.unrenderLayout=function(){this.el.innerHTML=""},Toolbar.prototype.renderSection=function(position,buttonStr){var _this=this,_a=this.context,theme=_a.theme,calendar=_a.calendar,optionsManager=calendar.optionsManager,viewSpecs=calendar.viewSpecs,sectionEl=createElement("div",{className:"fc-"+position}),calendarCustomButtons=optionsManager.computed.customButtons||{},calendarButtonTextOverrides=optionsManager.overrides.buttonText||{},calendarButtonText=optionsManager.computed.buttonText||{};return buttonStr&&buttonStr.split(" ").forEach((function(buttonGroupStr,i){var groupChildren=[],isOnlyButtons=!0,groupEl;if(buttonGroupStr.split(",").forEach((function(buttonName,j){var customButtonProps,viewSpec,buttonClick,buttonIcon,buttonText,buttonInnerHtml,buttonClasses,buttonEl,buttonAriaAttr;"title"===buttonName?(groupChildren.push(htmlToElement("<h2> </h2>")),isOnlyButtons=!1):((customButtonProps=calendarCustomButtons[buttonName])?(buttonClick=function(ev){customButtonProps.click&&customButtonProps.click.call(buttonEl,ev)},(buttonIcon=theme.getCustomButtonIconClass(customButtonProps))||(buttonIcon=theme.getIconClass(buttonName))||(buttonText=customButtonProps.text)):(viewSpec=viewSpecs[buttonName])?(_this.viewsWithButtons.push(buttonName),buttonClick=function(){calendar.changeView(buttonName)},(buttonText=viewSpec.buttonTextOverride)||(buttonIcon=theme.getIconClass(buttonName))||(buttonText=viewSpec.buttonTextDefault)):calendar[buttonName]&&(buttonClick=function(){calendar[buttonName]()},(buttonText=calendarButtonTextOverrides[buttonName])||(buttonIcon=theme.getIconClass(buttonName))||(buttonText=calendarButtonText[buttonName])),buttonClick&&(buttonClasses=["fc-"+buttonName+"-button",theme.getClass("button")],buttonText?(buttonInnerHtml=htmlEscape(buttonText),buttonAriaAttr=""):buttonIcon&&(buttonInnerHtml="<span class='"+buttonIcon+"'></span>",buttonAriaAttr=' aria-label="'+buttonName+'"'),(buttonEl=htmlToElement('<button type="button" class="'+buttonClasses.join(" ")+'"'+buttonAriaAttr+">"+buttonInnerHtml+"</button>")).addEventListener("click",buttonClick),groupChildren.push(buttonEl)))})),groupChildren.length>1){groupEl=document.createElement("div");var buttonGroupClassName=theme.getClass("buttonGroup");isOnlyButtons&&buttonGroupClassName&&groupEl.classList.add(buttonGroupClassName),appendToElement(groupEl,groupChildren),sectionEl.appendChild(groupEl)}else appendToElement(sectionEl,groupChildren)})),sectionEl},Toolbar.prototype.updateToday=function(isTodayEnabled){this.toggleButtonEnabled("today",isTodayEnabled)},Toolbar.prototype.updatePrev=function(isPrevEnabled){this.toggleButtonEnabled("prev",isPrevEnabled)},Toolbar.prototype.updateNext=function(isNextEnabled){this.toggleButtonEnabled("next",isNextEnabled)},Toolbar.prototype.updateTitle=function(text){findElements(this.el,"h2").forEach((function(titleEl){titleEl.innerText=text}))},Toolbar.prototype.updateActiveButton=function(buttonName){var theme,className=this.context.theme.getClass("buttonActive");findElements(this.el,"button").forEach((function(buttonEl){buttonName&&buttonEl.classList.contains("fc-"+buttonName+"-button")?buttonEl.classList.add(className):buttonEl.classList.remove(className)}))},Toolbar.prototype.toggleButtonEnabled=function(buttonName,bool){findElements(this.el,".fc-"+buttonName+"-button").forEach((function(buttonEl){buttonEl.disabled=!bool}))},Toolbar}(Component),CalendarComponent=function(_super){function CalendarComponent(el){var _this=_super.call(this)||this;return _this.elClassNames=[],_this.renderSkeleton=memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton),_this.renderToolbars=memoizeRendering(_this._renderToolbars,_this._unrenderToolbars,[_this.renderSkeleton]),_this.buildComponentContext=memoize(buildComponentContext),_this.buildViewPropTransformers=memoize(buildViewPropTransformers),_this.el=el,_this.computeTitle=memoize(computeTitle),_this.parseBusinessHours=memoize((function(input){return parseBusinessHours(input,_this.context.calendar)})),_this}return __extends(CalendarComponent,_super),CalendarComponent.prototype.render=function(props,context){this.freezeHeight();var title=this.computeTitle(props.dateProfile,props.viewSpec.options);this.renderSkeleton(context),this.renderToolbars(props.viewSpec,props.dateProfile,props.currentDate,title),this.renderView(props,title),this.updateSize(),this.thawHeight()},CalendarComponent.prototype.destroy=function(){this.header&&this.header.destroy(),this.footer&&this.footer.destroy(),this.renderSkeleton.unrender(),_super.prototype.destroy.call(this)},CalendarComponent.prototype._renderSkeleton=function(context){this.updateElClassNames(context),prependToElement(this.el,this.contentEl=createElement("div",{className:"fc-view-container"}));for(var calendar=context.calendar,_i=0,_a=calendar.pluginSystem.hooks.viewContainerModifiers;_i<_a.length;_i++){var modifyViewContainer;(0,_a[_i])(this.contentEl,calendar)}},CalendarComponent.prototype._unrenderSkeleton=function(){this.view&&(this.savedScroll=this.view.queryScroll(),this.view.destroy(),this.view=null),removeElement(this.contentEl),this.removeElClassNames()},CalendarComponent.prototype.removeElClassNames=function(){for(var classList=this.el.classList,_i=0,_a=this.elClassNames;_i<_a.length;_i++){var className=_a[_i];classList.remove(className)}this.elClassNames=[]},CalendarComponent.prototype.updateElClassNames=function(context){this.removeElClassNames();var theme=context.theme,options=context.options;this.elClassNames=["fc","fc-"+options.dir,theme.getClass("widget")];for(var classList=this.el.classList,_i=0,_a=this.elClassNames;_i<_a.length;_i++){var className=_a[_i];classList.add(className)}},CalendarComponent.prototype._renderToolbars=function(viewSpec,dateProfile,currentDate,title){var _a=this,context=_a.context,header=_a.header,footer=_a.footer,options=context.options,calendar=context.calendar,headerLayout=options.header,footerLayout=options.footer,dateProfileGenerator=this.props.dateProfileGenerator,now=calendar.getNow(),todayInfo=dateProfileGenerator.build(now),prevInfo=dateProfileGenerator.buildPrev(dateProfile,currentDate),nextInfo=dateProfileGenerator.buildNext(dateProfile,currentDate),toolbarProps={title:title,activeButton:viewSpec.type,isTodayEnabled:todayInfo.isValid&&!rangeContainsMarker(dateProfile.currentRange,now),isPrevEnabled:prevInfo.isValid,isNextEnabled:nextInfo.isValid};headerLayout?(header||(header=this.header=new Toolbar("fc-header-toolbar"),prependToElement(this.el,header.el)),header.receiveProps(__assign({layout:headerLayout},toolbarProps),context)):header&&(header.destroy(),header=this.header=null),footerLayout?(footer||(footer=this.footer=new Toolbar("fc-footer-toolbar"),appendToElement(this.el,footer.el)),footer.receiveProps(__assign({layout:footerLayout},toolbarProps),context)):footer&&(footer.destroy(),footer=this.footer=null)},CalendarComponent.prototype._unrenderToolbars=function(){this.header&&(this.header.destroy(),this.header=null),this.footer&&(this.footer.destroy(),this.footer=null)},CalendarComponent.prototype.renderView=function(props,title){var view=this.view,_a=this.context,calendar=_a.calendar,options=_a.options,viewSpec=props.viewSpec,dateProfileGenerator=props.dateProfileGenerator;view&&view.viewSpec===viewSpec||(view&&view.destroy(),view=this.view=new viewSpec.class(viewSpec,this.contentEl),this.savedScroll&&(view.addScroll(this.savedScroll,!0),this.savedScroll=null)),view.title=title;for(var viewProps={dateProfileGenerator:dateProfileGenerator,dateProfile:props.dateProfile,businessHours:this.parseBusinessHours(viewSpec.options.businessHours),eventStore:props.eventStore,eventUiBases:props.eventUiBases,dateSelection:props.dateSelection,eventSelection:props.eventSelection,eventDrag:props.eventDrag,eventResize:props.eventResize},transformers,_i=0,transformers_1=this.buildViewPropTransformers(calendar.pluginSystem.hooks.viewPropsTransformers);_i<transformers_1.length;_i++){var transformer=transformers_1[_i];__assign(viewProps,transformer.transform(viewProps,viewSpec,props,options))}view.receiveProps(viewProps,this.buildComponentContext(this.context,viewSpec,view))},CalendarComponent.prototype.updateSize=function(isResize){void 0===isResize&&(isResize=!1);var view=this.view;view&&((isResize||null==this.isHeightAuto)&&this.computeHeightVars(),view.updateSize(isResize,this.viewHeight,this.isHeightAuto),view.updateNowIndicator(),view.popScroll(isResize))},CalendarComponent.prototype.computeHeightVars=function(){var calendar=this.context.calendar,heightInput=calendar.opt("height"),contentHeightInput=calendar.opt("contentHeight");if(this.isHeightAuto="auto"===heightInput||"auto"===contentHeightInput,"number"==typeof contentHeightInput)this.viewHeight=contentHeightInput;else if("function"==typeof contentHeightInput)this.viewHeight=contentHeightInput();else if("number"==typeof heightInput)this.viewHeight=heightInput-this.queryToolbarsHeight();else if("function"==typeof heightInput)this.viewHeight=heightInput()-this.queryToolbarsHeight();else if("parent"===heightInput){var parentEl=this.el.parentNode;this.viewHeight=parentEl.getBoundingClientRect().height-this.queryToolbarsHeight()}else this.viewHeight=Math.round(this.contentEl.getBoundingClientRect().width/Math.max(calendar.opt("aspectRatio"),.5))},CalendarComponent.prototype.queryToolbarsHeight=function(){var height=0;return this.header&&(height+=computeHeightAndMargins(this.header.el)),this.footer&&(height+=computeHeightAndMargins(this.footer.el)),height},CalendarComponent.prototype.freezeHeight=function(){applyStyle(this.el,{height:this.el.getBoundingClientRect().height,overflow:"hidden"})},CalendarComponent.prototype.thawHeight=function(){applyStyle(this.el,{height:"",overflow:""})},CalendarComponent}(Component);function computeTitle(dateProfile,viewOptions){var range;return range=/^(year|month)$/.test(dateProfile.currentRangeUnit)?dateProfile.currentRange:dateProfile.activeRange,this.context.dateEnv.formatRange(range.start,range.end,createFormatter(viewOptions.titleFormat||computeTitleFormat(dateProfile),viewOptions.titleRangeSeparator),{isEndExclusive:dateProfile.isRangeAllDay})}function computeTitleFormat(dateProfile){var currentRangeUnit=dateProfile.currentRangeUnit;if("year"===currentRangeUnit)return{year:"numeric"};if("month"===currentRangeUnit)return{year:"numeric",month:"long"};var days=diffWholeDays(dateProfile.currentRange.start,dateProfile.currentRange.end);return null!==days&&days>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}function buildComponentContext(context,viewSpec,view){return context.extend(viewSpec.options,view)}function buildViewPropTransformers(theClasses){return theClasses.map((function(theClass){return new theClass}))}var Interaction=function(){function Interaction(settings){this.component=settings.component}return Interaction.prototype.destroy=function(){},Interaction}();function parseInteractionSettings(component,input){return{component:component,el:input.el,useEventCenter:null==input.useEventCenter||input.useEventCenter}}function interactionSettingsToStore(settings){var _a;return(_a={})[settings.component.uid]=settings,_a}var interactionSettingsStore={},EventClicking=function(_super){function EventClicking(settings){var _this=_super.call(this,settings)||this;_this.handleSegClick=function(ev,segEl){var component=_this.component,_a=component.context,calendar=_a.calendar,view=_a.view,seg=getElSeg(segEl);if(seg&&component.isValidSegDownEl(ev.target)){var hasUrlContainer=elementClosest(ev.target,".fc-has-url"),url=hasUrlContainer?hasUrlContainer.querySelector("a[href]").href:"";calendar.publiclyTrigger("eventClick",[{el:segEl,event:new EventApi(component.context.calendar,seg.eventRange.def,seg.eventRange.instance),jsEvent:ev,view:view}]),url&&!ev.defaultPrevented&&(window.location.href=url)}};var component=settings.component;return _this.destroy=listenBySelector(component.el,"click",component.fgSegSelector+","+component.bgSegSelector,_this.handleSegClick),_this}return __extends(EventClicking,_super),EventClicking}(Interaction),EventHovering=function(_super){function EventHovering(settings){var _this=_super.call(this,settings)||this;_this.handleEventElRemove=function(el){el===_this.currentSegEl&&_this.handleSegLeave(null,_this.currentSegEl)},_this.handleSegEnter=function(ev,segEl){getElSeg(segEl)&&(segEl.classList.add("fc-allow-mouse-resize"),_this.currentSegEl=segEl,_this.triggerEvent("eventMouseEnter",ev,segEl))},_this.handleSegLeave=function(ev,segEl){_this.currentSegEl&&(segEl.classList.remove("fc-allow-mouse-resize"),_this.currentSegEl=null,_this.triggerEvent("eventMouseLeave",ev,segEl))};var component=settings.component;return _this.removeHoverListeners=listenToHoverBySelector(component.el,component.fgSegSelector+","+component.bgSegSelector,_this.handleSegEnter,_this.handleSegLeave),component.context.calendar.on("eventElRemove",_this.handleEventElRemove),_this}return __extends(EventHovering,_super),EventHovering.prototype.destroy=function(){this.removeHoverListeners(),this.component.context.calendar.off("eventElRemove",this.handleEventElRemove)},EventHovering.prototype.triggerEvent=function(publicEvName,ev,segEl){var component=this.component,_a=component.context,calendar=_a.calendar,view=_a.view,seg=getElSeg(segEl);ev&&!component.isValidSegDownEl(ev.target)||calendar.publiclyTrigger(publicEvName,[{el:segEl,event:new EventApi(calendar,seg.eventRange.def,seg.eventRange.instance),jsEvent:ev,view:view}])},EventHovering}(Interaction),StandardTheme=function(_super){function StandardTheme(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(StandardTheme,_super),StandardTheme}(Theme);StandardTheme.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},StandardTheme.prototype.baseIconClass="fc-icon",StandardTheme.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},StandardTheme.prototype.iconOverrideOption="buttonIcons",StandardTheme.prototype.iconOverrideCustomButtonOption="icon",StandardTheme.prototype.iconOverridePrefix="fc-icon-";var Calendar=function(){function Calendar(el,overrides){var _this=this;this.buildComponentContext=memoize(buildComponentContext$1),this.parseRawLocales=memoize(parseRawLocales),this.buildLocale=memoize(buildLocale),this.buildDateEnv=memoize(buildDateEnv),this.buildTheme=memoize(buildTheme),this.buildEventUiSingleBase=memoize(this._buildEventUiSingleBase),this.buildSelectionConfig=memoize(this._buildSelectionConfig),this.buildEventUiBySource=memoizeOutput(buildEventUiBySource,isPropsEqual),this.buildEventUiBases=memoize(buildEventUiBases),this.interactionsStore={},this.actionQueue=[],this.isReducing=!1,this.needsRerender=!1,this.isRendering=!1,this.renderingPauseDepth=0,this.buildDelayedRerender=memoize(buildDelayedRerender),this.afterSizingTriggers={},this.isViewUpdated=!1,this.isDatesUpdated=!1,this.isEventsUpdated=!1,this.el=el,this.optionsManager=new OptionsManager(overrides||{}),this.pluginSystem=new PluginSystem,this.addPluginInputs(this.optionsManager.computed.plugins||[]),this.handleOptions(this.optionsManager.computed),this.publiclyTrigger("_init"),this.hydrate(),this.calendarInteractions=this.pluginSystem.hooks.calendarInteractions.map((function(calendarInteractionClass){return new calendarInteractionClass(_this)}))}return Calendar.prototype.addPluginInputs=function(pluginInputs){for(var pluginDefs,_i=0,pluginDefs_1=refinePluginDefs(pluginInputs);_i<pluginDefs_1.length;_i++){var pluginDef=pluginDefs_1[_i];this.pluginSystem.add(pluginDef)}},Object.defineProperty(Calendar.prototype,"view",{get:function(){return this.component?this.component.view:null},enumerable:!0,configurable:!0}),Calendar.prototype.render=function(){this.component?this.requestRerender():(this.component=new CalendarComponent(this.el),this.renderableEventStore={defs:{},instances:{}},this.bindHandlers(),this.executeRender())},Calendar.prototype.destroy=function(){if(this.component){this.unbindHandlers(),this.component.destroy(),this.component=null;for(var _i=0,_a=this.calendarInteractions;_i<_a.length;_i++){var interaction;_a[_i].destroy()}this.publiclyTrigger("_destroyed")}},Calendar.prototype.bindHandlers=function(){var _this=this;this.removeNavLinkListener=listenBySelector(this.el,"click","a[data-goto]",(function(ev,anchorEl){var gotoOptions=anchorEl.getAttribute("data-goto");gotoOptions=gotoOptions?JSON.parse(gotoOptions):{};var dateEnv=_this.dateEnv,dateMarker=dateEnv.createMarker(gotoOptions.date),viewType=gotoOptions.type,customAction=_this.viewOpt("navLink"+capitaliseFirstLetter(viewType)+"Click");"function"==typeof customAction?customAction(dateEnv.toDate(dateMarker),ev):("string"==typeof customAction&&(viewType=customAction),_this.zoomTo(dateMarker,viewType))})),this.opt("handleWindowResize")&&window.addEventListener("resize",this.windowResizeProxy=debounce(this.windowResize.bind(this),this.opt("windowResizeDelay")))},Calendar.prototype.unbindHandlers=function(){this.removeNavLinkListener(),this.windowResizeProxy&&(window.removeEventListener("resize",this.windowResizeProxy),this.windowResizeProxy=null)},Calendar.prototype.hydrate=function(){var _this=this;this.state=this.buildInitialState();var rawSources=this.opt("eventSources")||[],singleRawSource=this.opt("events"),sources=[];singleRawSource&&rawSources.unshift(singleRawSource);for(var _i=0,rawSources_1=rawSources;_i<rawSources_1.length;_i++){var rawSource,source=parseEventSource(rawSources_1[_i],this);source&&sources.push(source)}this.batchRendering((function(){_this.dispatch({type:"INIT"}),_this.dispatch({type:"ADD_EVENT_SOURCES",sources:sources}),_this.dispatch({type:"SET_VIEW_TYPE",viewType:_this.opt("defaultView")||_this.pluginSystem.hooks.defaultView})}))},Calendar.prototype.buildInitialState=function(){return{viewType:null,loadingLevel:0,eventSourceLoadingLevel:0,currentDate:this.getInitialDate(),dateProfile:null,eventSources:{},eventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null}},Calendar.prototype.dispatch=function(action){if(this.actionQueue.push(action),!this.isReducing){this.isReducing=!0;for(var oldState=this.state;this.actionQueue.length;)this.state=this.reduce(this.state,this.actionQueue.shift(),this);var newState=this.state;this.isReducing=!1,!oldState.loadingLevel&&newState.loadingLevel?this.publiclyTrigger("loading",[!0]):oldState.loadingLevel&&!newState.loadingLevel&&this.publiclyTrigger("loading",[!1]);var view=this.component&&this.component.view;oldState.eventStore!==newState.eventStore&&oldState.eventStore&&(this.isEventsUpdated=!0),oldState.dateProfile!==newState.dateProfile&&(oldState.dateProfile&&view&&this.publiclyTrigger("datesDestroy",[{view:view,el:view.el}]),this.isDatesUpdated=!0),oldState.viewType!==newState.viewType&&(oldState.viewType&&view&&this.publiclyTrigger("viewSkeletonDestroy",[{view:view,el:view.el}]),this.isViewUpdated=!0),this.requestRerender()}},Calendar.prototype.reduce=function(state,action,calendar){return reduce(state,action,calendar)},Calendar.prototype.requestRerender=function(){this.needsRerender=!0,this.delayedRerender()},Calendar.prototype.tryRerender=function(){this.component&&this.needsRerender&&!this.renderingPauseDepth&&!this.isRendering&&this.executeRender()},Calendar.prototype.batchRendering=function(func){this.renderingPauseDepth++,func(),this.renderingPauseDepth--,this.needsRerender&&this.requestRerender()},Calendar.prototype.executeRender=function(){this.needsRerender=!1,this.isRendering=!0,this.renderComponent(),this.isRendering=!1,this.needsRerender&&this.delayedRerender()},Calendar.prototype.renderComponent=function(){var _a=this,state=_a.state,component=_a.component,viewType=state.viewType,viewSpec=this.viewSpecs[viewType];if(!viewSpec)throw new Error('View type "'+viewType+'" is not valid');var renderableEventStore=this.renderableEventStore=state.eventSourceLoadingLevel&&!this.opt("progressiveEventRendering")?this.renderableEventStore:state.eventStore,eventUiSingleBase=this.buildEventUiSingleBase(viewSpec.options),eventUiBySource=this.buildEventUiBySource(state.eventSources),eventUiBases=this.eventUiBases=this.buildEventUiBases(renderableEventStore.defs,eventUiSingleBase,eventUiBySource);component.receiveProps(__assign({},state,{viewSpec:viewSpec,dateProfileGenerator:this.dateProfileGenerators[viewType],dateProfile:state.dateProfile,eventStore:renderableEventStore,eventUiBases:eventUiBases,dateSelection:state.dateSelection,eventSelection:state.eventSelection,eventDrag:state.eventDrag,eventResize:state.eventResize}),this.buildComponentContext(this.theme,this.dateEnv,this.optionsManager.computed)),this.isViewUpdated&&(this.isViewUpdated=!1,this.publiclyTrigger("viewSkeletonRender",[{view:component.view,el:component.view.el}])),this.isDatesUpdated&&(this.isDatesUpdated=!1,this.publiclyTrigger("datesRender",[{view:component.view,el:component.view.el}])),this.isEventsUpdated&&(this.isEventsUpdated=!1),this.releaseAfterSizingTriggers()},Calendar.prototype.setOption=function(name,val){var _a;this.mutateOptions(((_a={})[name]=val,_a),[],!0)},Calendar.prototype.getOption=function(name){return this.optionsManager.computed[name]},Calendar.prototype.opt=function(name){return this.optionsManager.computed[name]},Calendar.prototype.viewOpt=function(name){return this.viewOpts()[name]},Calendar.prototype.viewOpts=function(){return this.viewSpecs[this.state.viewType].options},Calendar.prototype.mutateOptions=function(updates,removals,isDynamic,deepEqual){var _this=this,changeHandlers=this.pluginSystem.hooks.optionChangeHandlers,normalUpdates={},specialUpdates={},oldDateEnv=this.dateEnv,isTimeZoneDirty=!1,isSizeDirty=!1,anyDifficultOptions=Boolean(removals.length);for(var name_1 in updates)changeHandlers[name_1]?specialUpdates[name_1]=updates[name_1]:normalUpdates[name_1]=updates[name_1];for(var name_2 in normalUpdates)/^(height|contentHeight|aspectRatio)$/.test(name_2)?isSizeDirty=!0:/^(defaultDate|defaultView)$/.test(name_2)||(anyDifficultOptions=!0,"timeZone"===name_2&&(isTimeZoneDirty=!0));this.optionsManager.mutate(normalUpdates,removals,isDynamic),anyDifficultOptions&&this.handleOptions(this.optionsManager.computed),this.batchRendering((function(){if(anyDifficultOptions?(isTimeZoneDirty&&_this.dispatch({type:"CHANGE_TIMEZONE",oldDateEnv:oldDateEnv}),_this.dispatch({type:"SET_VIEW_TYPE",viewType:_this.state.viewType})):isSizeDirty&&_this.updateSize(),deepEqual)for(var name_3 in specialUpdates)changeHandlers[name_3](specialUpdates[name_3],_this,deepEqual)}))},Calendar.prototype.handleOptions=function(options){var _this=this,pluginHooks=this.pluginSystem.hooks;this.defaultAllDayEventDuration=createDuration(options.defaultAllDayEventDuration),this.defaultTimedEventDuration=createDuration(options.defaultTimedEventDuration),this.delayedRerender=this.buildDelayedRerender(options.rerenderDelay),this.theme=this.buildTheme(options);var available=this.parseRawLocales(options.locales);this.availableRawLocales=available.map;var locale=this.buildLocale(options.locale||available.defaultCode,available.map);this.dateEnv=this.buildDateEnv(locale,options.timeZone,pluginHooks.namedTimeZonedImpl,options.firstDay,options.weekNumberCalculation,options.weekLabel,pluginHooks.cmdFormatter),this.selectionConfig=this.buildSelectionConfig(options),this.viewSpecs=buildViewSpecs(pluginHooks.views,this.optionsManager),this.dateProfileGenerators=mapHash(this.viewSpecs,(function(viewSpec){return new viewSpec.class.prototype.dateProfileGeneratorClass(viewSpec,_this)}))},Calendar.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.availableRawLocales)},Calendar.prototype._buildSelectionConfig=function(rawOpts){return processScopedUiProps("select",rawOpts,this)},Calendar.prototype._buildEventUiSingleBase=function(rawOpts){return rawOpts.editable&&(rawOpts=__assign({},rawOpts,{eventEditable:!0})),processScopedUiProps("event",rawOpts,this)},Calendar.prototype.hasPublicHandlers=function(name){return this.hasHandlers(name)||this.opt(name)},Calendar.prototype.publiclyTrigger=function(name,args){var optHandler=this.opt(name);if(this.triggerWith(name,this,args),optHandler)return optHandler.apply(this,args)},Calendar.prototype.publiclyTriggerAfterSizing=function(name,args){var afterSizingTriggers=this.afterSizingTriggers;(afterSizingTriggers[name]||(afterSizingTriggers[name]=[])).push(args)},Calendar.prototype.releaseAfterSizingTriggers=function(){var afterSizingTriggers=this.afterSizingTriggers;for(var name_4 in afterSizingTriggers)for(var _i=0,_a=afterSizingTriggers[name_4];_i<_a.length;_i++){var args=_a[_i];this.publiclyTrigger(name_4,args)}this.afterSizingTriggers={}},Calendar.prototype.isValidViewType=function(viewType){return Boolean(this.viewSpecs[viewType])},Calendar.prototype.changeView=function(viewType,dateOrRange){var dateMarker=null;dateOrRange&&(dateOrRange.start&&dateOrRange.end?(this.optionsManager.mutate({visibleRange:dateOrRange},[]),this.handleOptions(this.optionsManager.computed)):dateMarker=this.dateEnv.createMarker(dateOrRange)),this.unselect(),this.dispatch({type:"SET_VIEW_TYPE",viewType:viewType,dateMarker:dateMarker})},Calendar.prototype.zoomTo=function(dateMarker,viewType){var spec;viewType=viewType||"day",spec=this.viewSpecs[viewType]||this.getUnitViewSpec(viewType),this.unselect(),spec?this.dispatch({type:"SET_VIEW_TYPE",viewType:spec.type,dateMarker:dateMarker}):this.dispatch({type:"SET_DATE",dateMarker:dateMarker})},Calendar.prototype.getUnitViewSpec=function(unit){var component=this.component,viewTypes=[],i,spec;for(var viewType in component.header&&viewTypes.push.apply(viewTypes,component.header.viewsWithButtons),component.footer&&viewTypes.push.apply(viewTypes,component.footer.viewsWithButtons),this.viewSpecs)viewTypes.push(viewType);for(i=0;i<viewTypes.length;i++)if((spec=this.viewSpecs[viewTypes[i]])&&spec.singleUnit===unit)return spec},Calendar.prototype.getInitialDate=function(){var defaultDateInput=this.opt("defaultDate");return null!=defaultDateInput?this.dateEnv.createMarker(defaultDateInput):this.getNow()},Calendar.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},Calendar.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},Calendar.prototype.prevYear=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.addYears(this.state.currentDate,-1)})},Calendar.prototype.nextYear=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.addYears(this.state.currentDate,1)})},Calendar.prototype.today=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.getNow()})},Calendar.prototype.gotoDate=function(zonedDateInput){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.createMarker(zonedDateInput)})},Calendar.prototype.incrementDate=function(deltaInput){var delta=createDuration(deltaInput);delta&&(this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.add(this.state.currentDate,delta)}))},Calendar.prototype.getDate=function(){return this.dateEnv.toDate(this.state.currentDate)},Calendar.prototype.formatDate=function(d,formatter){var dateEnv=this.dateEnv;return dateEnv.format(dateEnv.createMarker(d),createFormatter(formatter))},Calendar.prototype.formatRange=function(d0,d1,settings){var dateEnv=this.dateEnv;return dateEnv.formatRange(dateEnv.createMarker(d0),dateEnv.createMarker(d1),createFormatter(settings,this.opt("defaultRangeSeparator")),settings)},Calendar.prototype.formatIso=function(d,omitTime){var dateEnv=this.dateEnv;return dateEnv.formatIso(dateEnv.createMarker(d),{omitTime:omitTime})},Calendar.prototype.windowResize=function(ev){!this.isHandlingWindowResize&&this.component&&ev.target===window&&(this.isHandlingWindowResize=!0,this.updateSize(),this.publiclyTrigger("windowResize",[this.view]),this.isHandlingWindowResize=!1)},Calendar.prototype.updateSize=function(){this.component&&this.component.updateSize(!0)},Calendar.prototype.registerInteractiveComponent=function(component,settingsInput){var settings=parseInteractionSettings(component,settingsInput),DEFAULT_INTERACTIONS,interactionClasses,interactions=[EventClicking,EventHovering].concat(this.pluginSystem.hooks.componentInteractions).map((function(interactionClass){return new interactionClass(settings)}));this.interactionsStore[component.uid]=interactions,interactionSettingsStore[component.uid]=settings},Calendar.prototype.unregisterInteractiveComponent=function(component){for(var _i=0,_a=this.interactionsStore[component.uid];_i<_a.length;_i++){var listener;_a[_i].destroy()}delete this.interactionsStore[component.uid],delete interactionSettingsStore[component.uid]},Calendar.prototype.select=function(dateOrObj,endDate){var selectionInput,selection=parseDateSpan(selectionInput=null==endDate?null!=dateOrObj.start?dateOrObj:{start:dateOrObj,end:null}:{start:dateOrObj,end:endDate},this.dateEnv,createDuration({days:1}));selection&&(this.dispatch({type:"SELECT_DATES",selection:selection}),this.triggerDateSelect(selection))},Calendar.prototype.unselect=function(pev){this.state.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),this.triggerDateUnselect(pev))},Calendar.prototype.triggerDateSelect=function(selection,pev){var arg=__assign({},this.buildDateSpanApi(selection),{jsEvent:pev?pev.origEvent:null,view:this.view});this.publiclyTrigger("select",[arg])},Calendar.prototype.triggerDateUnselect=function(pev){this.publiclyTrigger("unselect",[{jsEvent:pev?pev.origEvent:null,view:this.view}])},Calendar.prototype.triggerDateClick=function(dateSpan,dayEl,view,ev){var arg=__assign({},this.buildDatePointApi(dateSpan),{dayEl:dayEl,jsEvent:ev,view:view});this.publiclyTrigger("dateClick",[arg])},Calendar.prototype.buildDatePointApi=function(dateSpan){for(var props={},_i=0,_a=this.pluginSystem.hooks.datePointTransforms;_i<_a.length;_i++){var transform=_a[_i];__assign(props,transform(dateSpan,this))}return __assign(props,buildDatePointApi(dateSpan,this.dateEnv)),props},Calendar.prototype.buildDateSpanApi=function(dateSpan){for(var props={},_i=0,_a=this.pluginSystem.hooks.dateSpanTransforms;_i<_a.length;_i++){var transform=_a[_i];__assign(props,transform(dateSpan,this))}return __assign(props,buildDateSpanApi(dateSpan,this.dateEnv)),props},Calendar.prototype.getNow=function(){var now=this.opt("now");return"function"==typeof now&&(now=now()),null==now?this.dateEnv.createNowMarker():this.dateEnv.createMarker(now)},Calendar.prototype.getDefaultEventEnd=function(allDay,marker){var end=marker;return allDay?(end=startOfDay(end),end=this.dateEnv.add(end,this.defaultAllDayEventDuration)):end=this.dateEnv.add(end,this.defaultTimedEventDuration),end},Calendar.prototype.addEvent=function(eventInput,sourceInput){if(eventInput instanceof EventApi){var def=eventInput._def,instance=eventInput._instance;return this.state.eventStore.defs[def.defId]||this.dispatch({type:"ADD_EVENTS",eventStore:eventTupleToStore({def:def,instance:instance})}),eventInput}var sourceId;if(sourceInput instanceof EventSourceApi)sourceId=sourceInput.internalEventSource.sourceId;else if(null!=sourceInput){var sourceApi=this.getEventSourceById(sourceInput);if(!sourceApi)return console.warn('Could not find an event source with ID "'+sourceInput+'"'),null;sourceId=sourceApi.internalEventSource.sourceId}var tuple=parseEvent(eventInput,sourceId,this);return tuple?(this.dispatch({type:"ADD_EVENTS",eventStore:eventTupleToStore(tuple)}),new EventApi(this,tuple.def,tuple.def.recurringDef?null:tuple.instance)):null},Calendar.prototype.getEventById=function(id){var _a=this.state.eventStore,defs=_a.defs,instances=_a.instances;for(var defId in id=String(id),defs){var def=defs[defId];if(def.publicId===id){if(def.recurringDef)return new EventApi(this,def,null);for(var instanceId in instances){var instance=instances[instanceId];if(instance.defId===def.defId)return new EventApi(this,def,instance)}}}return null},Calendar.prototype.getEvents=function(){var _a=this.state.eventStore,defs=_a.defs,instances=_a.instances,eventApis=[];for(var id in instances){var instance=instances[id],def=defs[instance.defId];eventApis.push(new EventApi(this,def,instance))}return eventApis},Calendar.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},Calendar.prototype.rerenderEvents=function(){this.dispatch({type:"RESET_EVENTS"})},Calendar.prototype.getEventSources=function(){var sourceHash=this.state.eventSources,sourceApis=[];for(var internalId in sourceHash)sourceApis.push(new EventSourceApi(this,sourceHash[internalId]));return sourceApis},Calendar.prototype.getEventSourceById=function(id){var sourceHash=this.state.eventSources;for(var sourceId in id=String(id),sourceHash)if(sourceHash[sourceId].publicId===id)return new EventSourceApi(this,sourceHash[sourceId]);return null},Calendar.prototype.addEventSource=function(sourceInput){if(sourceInput instanceof EventSourceApi)return this.state.eventSources[sourceInput.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[sourceInput.internalEventSource]}),sourceInput;var eventSource=parseEventSource(sourceInput,this);return eventSource?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[eventSource]}),new EventSourceApi(this,eventSource)):null},Calendar.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},Calendar.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},Calendar.prototype.scrollToTime=function(timeInput){var duration=createDuration(timeInput);duration&&this.component.view.scrollToDuration(duration)},Calendar}();function buildComponentContext$1(theme,dateEnv,options){return new ComponentContext(this,theme,dateEnv,options,null)}function buildDateEnv(locale,timeZone,namedTimeZoneImpl,firstDay,weekNumberCalculation,weekLabel,cmdFormatter){return new DateEnv({calendarSystem:"gregory",timeZone:timeZone,namedTimeZoneImpl:namedTimeZoneImpl,locale:locale,weekNumberCalculation:weekNumberCalculation,firstDay:firstDay,weekLabel:weekLabel,cmdFormatter:cmdFormatter})}function buildTheme(calendarOptions){var themeClass;return new(this.pluginSystem.hooks.themeClasses[calendarOptions.themeSystem]||StandardTheme)(calendarOptions)}function buildDelayedRerender(wait){var func=this.tryRerender.bind(this);return null!=wait&&(func=debounce(func,wait)),func}function buildEventUiBySource(eventSources){return mapHash(eventSources,(function(eventSource){return eventSource.ui}))}function buildEventUiBases(eventDefs,eventUiSingleBase,eventUiBySource){var eventUiBases={"":eventUiSingleBase};for(var defId in eventDefs){var def=eventDefs[defId];def.sourceId&&eventUiBySource[def.sourceId]&&(eventUiBases[defId]=eventUiBySource[def.sourceId])}return eventUiBases}EmitterMixin.mixInto(Calendar);var View=function(_super){function View(viewSpec,parentEl){var _this=_super.call(this,createElement("div",{className:"fc-view fc-"+viewSpec.type+"-view"}))||this;return _this.renderDatesMem=memoizeRendering(_this.renderDatesWrap,_this.unrenderDatesWrap),_this.renderBusinessHoursMem=memoizeRendering(_this.renderBusinessHours,_this.unrenderBusinessHours,[_this.renderDatesMem]),_this.renderDateSelectionMem=memoizeRendering(_this.renderDateSelectionWrap,_this.unrenderDateSelectionWrap,[_this.renderDatesMem]),_this.renderEventsMem=memoizeRendering(_this.renderEvents,_this.unrenderEvents,[_this.renderDatesMem]),_this.renderEventSelectionMem=memoizeRendering(_this.renderEventSelectionWrap,_this.unrenderEventSelectionWrap,[_this.renderEventsMem]),_this.renderEventDragMem=memoizeRendering(_this.renderEventDragWrap,_this.unrenderEventDragWrap,[_this.renderDatesMem]),_this.renderEventResizeMem=memoizeRendering(_this.renderEventResizeWrap,_this.unrenderEventResizeWrap,[_this.renderDatesMem]),_this.viewSpec=viewSpec,_this.type=viewSpec.type,parentEl.appendChild(_this.el),_this.initialize(),_this}return __extends(View,_super),View.prototype.initialize=function(){},Object.defineProperty(View.prototype,"activeStart",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.activeRange.start)},enumerable:!0,configurable:!0}),Object.defineProperty(View.prototype,"activeEnd",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.activeRange.end)},enumerable:!0,configurable:!0}),Object.defineProperty(View.prototype,"currentStart",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.currentRange.start)},enumerable:!0,configurable:!0}),Object.defineProperty(View.prototype,"currentEnd",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.currentRange.end)},enumerable:!0,configurable:!0}),View.prototype.render=function(props,context){this.renderDatesMem(props.dateProfile),this.renderBusinessHoursMem(props.businessHours),this.renderDateSelectionMem(props.dateSelection),this.renderEventsMem(props.eventStore),this.renderEventSelectionMem(props.eventSelection),this.renderEventDragMem(props.eventDrag),this.renderEventResizeMem(props.eventResize)},View.prototype.beforeUpdate=function(){this.addScroll(this.queryScroll())},View.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderDatesMem.unrender()},View.prototype.updateSize=function(isResize,viewHeight,isAuto){var calendar=this.context.calendar;isResize&&this.addScroll(this.queryScroll()),(isResize||calendar.isViewUpdated||calendar.isDatesUpdated||calendar.isEventsUpdated)&&this.updateBaseSize(isResize,viewHeight,isAuto)},View.prototype.updateBaseSize=function(isResize,viewHeight,isAuto){},View.prototype.renderDatesWrap=function(dateProfile){this.renderDates(dateProfile),this.addScroll({duration:createDuration(this.context.options.scrollTime)})},View.prototype.unrenderDatesWrap=function(){this.stopNowIndicator(),this.unrenderDates()},View.prototype.renderDates=function(dateProfile){},View.prototype.unrenderDates=function(){},View.prototype.renderBusinessHours=function(businessHours){},View.prototype.unrenderBusinessHours=function(){},View.prototype.renderDateSelectionWrap=function(selection){selection&&this.renderDateSelection(selection)},View.prototype.unrenderDateSelectionWrap=function(selection){selection&&this.unrenderDateSelection(selection)},View.prototype.renderDateSelection=function(selection){},View.prototype.unrenderDateSelection=function(selection){},View.prototype.renderEvents=function(eventStore){},View.prototype.unrenderEvents=function(){},View.prototype.sliceEvents=function(eventStore,allDay){var props=this.props;return sliceEventStore(eventStore,props.eventUiBases,props.dateProfile.activeRange,allDay?this.context.nextDayThreshold:null).fg},View.prototype.renderEventSelectionWrap=function(instanceId){instanceId&&this.renderEventSelection(instanceId)},View.prototype.unrenderEventSelectionWrap=function(instanceId){instanceId&&this.unrenderEventSelection(instanceId)},View.prototype.renderEventSelection=function(instanceId){},View.prototype.unrenderEventSelection=function(instanceId){},View.prototype.renderEventDragWrap=function(state){state&&this.renderEventDrag(state)},View.prototype.unrenderEventDragWrap=function(state){state&&this.unrenderEventDrag(state)},View.prototype.renderEventDrag=function(state){},View.prototype.unrenderEventDrag=function(state){},View.prototype.renderEventResizeWrap=function(state){state&&this.renderEventResize(state)},View.prototype.unrenderEventResizeWrap=function(state){state&&this.unrenderEventResize(state)},View.prototype.renderEventResize=function(state){},View.prototype.unrenderEventResize=function(state){},View.prototype.startNowIndicator=function(dateProfile,dateProfileGenerator){var _this=this,_a=this.context,calendar=_a.calendar,dateEnv=_a.dateEnv,options,unit,update,delay;_a.options.nowIndicator&&!this.initialNowDate&&(unit=this.getNowIndicatorUnit(dateProfile,dateProfileGenerator))&&(update=this.updateNowIndicator.bind(this),this.initialNowDate=calendar.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),delay=dateEnv.add(dateEnv.startOf(this.initialNowDate,unit),createDuration(1,unit)).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout((function(){_this.nowIndicatorTimeoutID=null,update(),delay="second"===unit?1e3:6e4,_this.nowIndicatorIntervalID=setInterval(update,delay)}),delay))},View.prototype.updateNowIndicator=function(){this.props.dateProfile&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(addMs(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},View.prototype.stopNowIndicator=function(){this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},View.prototype.getNowIndicatorUnit=function(dateProfile,dateProfileGenerator){},View.prototype.renderNowIndicator=function(date){},View.prototype.unrenderNowIndicator=function(){},View.prototype.addScroll=function(scroll,isForced){isForced&&(scroll.isForced=isForced),__assign(this.queuedScroll||(this.queuedScroll={}),scroll)},View.prototype.popScroll=function(isResize){this.applyQueuedScroll(isResize),this.queuedScroll=null},View.prototype.applyQueuedScroll=function(isResize){this.queuedScroll&&this.applyScroll(this.queuedScroll,isResize)},View.prototype.queryScroll=function(){var scroll={};return this.props.dateProfile&&__assign(scroll,this.queryDateScroll()),scroll},View.prototype.applyScroll=function(scroll,isResize){var duration=scroll.duration,isForced=scroll.isForced;null==duration||isForced||(delete scroll.duration,this.props.dateProfile&&__assign(scroll,this.computeDateScroll(duration))),this.props.dateProfile&&this.applyDateScroll(scroll)},View.prototype.computeDateScroll=function(duration){return{}},View.prototype.queryDateScroll=function(){return{}},View.prototype.applyDateScroll=function(scroll){},View.prototype.scrollToDuration=function(duration){this.applyScroll({duration:duration},!1)},View}(DateComponent);EmitterMixin.mixInto(View),View.prototype.usesMinMaxTime=!1,View.prototype.dateProfileGeneratorClass=DateProfileGenerator;var FgEventRenderer=function(){function FgEventRenderer(){this.segs=[],this.isSizeDirty=!1}return FgEventRenderer.prototype.renderSegs=function(context,segs,mirrorInfo){this.context=context,this.rangeUpdated(),segs=this.renderSegEls(segs,mirrorInfo),this.segs=segs,this.attachSegs(segs,mirrorInfo),this.isSizeDirty=!0,triggerRenderedSegs(this.context,this.segs,Boolean(mirrorInfo))},FgEventRenderer.prototype.unrender=function(context,_segs,mirrorInfo){triggerWillRemoveSegs(this.context,this.segs,Boolean(mirrorInfo)),this.detachSegs(this.segs),this.segs=[]},FgEventRenderer.prototype.rangeUpdated=function(){var options=this.context.options,displayEventTime,displayEventEnd;this.eventTimeFormat=createFormatter(options.eventTimeFormat||this.computeEventTimeFormat(),options.defaultRangeSeparator),null==(displayEventTime=options.displayEventTime)&&(displayEventTime=this.computeDisplayEventTime()),null==(displayEventEnd=options.displayEventEnd)&&(displayEventEnd=this.computeDisplayEventEnd()),this.displayEventTime=displayEventTime,this.displayEventEnd=displayEventEnd},FgEventRenderer.prototype.renderSegEls=function(segs,mirrorInfo){var html="",i;if(segs.length){for(i=0;i<segs.length;i++)html+=this.renderSegHtml(segs[i],mirrorInfo);htmlToElements(html).forEach((function(el,i){var seg=segs[i];el&&(seg.el=el)})),segs=filterSegsViaEls(this.context,segs,Boolean(mirrorInfo))}return segs},FgEventRenderer.prototype.getSegClasses=function(seg,isDraggable,isResizable,mirrorInfo){var classes=["fc-event",seg.isStart?"fc-start":"fc-not-start",seg.isEnd?"fc-end":"fc-not-end"].concat(seg.eventRange.ui.classNames);return isDraggable&&classes.push("fc-draggable"),isResizable&&classes.push("fc-resizable"),mirrorInfo&&(classes.push("fc-mirror"),mirrorInfo.isDragging&&classes.push("fc-dragging"),mirrorInfo.isResizing&&classes.push("fc-resizing")),classes},FgEventRenderer.prototype.getTimeText=function(eventRange,formatter,displayEnd){var def=eventRange.def,instance=eventRange.instance;return this._getTimeText(instance.range.start,def.hasEnd?instance.range.end:null,def.allDay,formatter,displayEnd,instance.forcedStartTzo,instance.forcedEndTzo)},FgEventRenderer.prototype._getTimeText=function(start,end,allDay,formatter,displayEnd,forcedStartTzo,forcedEndTzo){var dateEnv=this.context.dateEnv;return null==formatter&&(formatter=this.eventTimeFormat),null==displayEnd&&(displayEnd=this.displayEventEnd),this.displayEventTime&&!allDay?displayEnd&&end?dateEnv.formatRange(start,end,formatter,{forcedStartTzo:forcedStartTzo,forcedEndTzo:forcedEndTzo}):dateEnv.format(start,formatter,{forcedTzo:forcedStartTzo}):""},FgEventRenderer.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0}},FgEventRenderer.prototype.computeDisplayEventTime=function(){return!0},FgEventRenderer.prototype.computeDisplayEventEnd=function(){return!0},FgEventRenderer.prototype.getSkinCss=function(ui){return{"background-color":ui.backgroundColor,"border-color":ui.borderColor,color:ui.textColor}},FgEventRenderer.prototype.sortEventSegs=function(segs){var specs=this.context.eventOrderSpecs,objs=segs.map(buildSegCompareObj);return objs.sort((function(obj0,obj1){return compareByFieldSpecs(obj0,obj1,specs)})),objs.map((function(c){return c._seg}))},FgEventRenderer.prototype.computeSizes=function(force){(force||this.isSizeDirty)&&this.computeSegSizes(this.segs)},FgEventRenderer.prototype.assignSizes=function(force){(force||this.isSizeDirty)&&(this.assignSegSizes(this.segs),this.isSizeDirty=!1)},FgEventRenderer.prototype.computeSegSizes=function(segs){},FgEventRenderer.prototype.assignSegSizes=function(segs){},FgEventRenderer.prototype.hideByHash=function(hash){if(hash)for(var _i=0,_a=this.segs;_i<_a.length;_i++){var seg=_a[_i];hash[seg.eventRange.instance.instanceId]&&(seg.el.style.visibility="hidden")}},FgEventRenderer.prototype.showByHash=function(hash){if(hash)for(var _i=0,_a=this.segs;_i<_a.length;_i++){var seg=_a[_i];hash[seg.eventRange.instance.instanceId]&&(seg.el.style.visibility="")}},FgEventRenderer.prototype.selectByInstanceId=function(instanceId){if(instanceId)for(var _i=0,_a=this.segs;_i<_a.length;_i++){var seg=_a[_i],eventInstance=seg.eventRange.instance;eventInstance&&eventInstance.instanceId===instanceId&&seg.el&&seg.el.classList.add("fc-selected")}},FgEventRenderer.prototype.unselectByInstanceId=function(instanceId){if(instanceId)for(var _i=0,_a=this.segs;_i<_a.length;_i++){var seg=_a[_i];seg.el&&seg.el.classList.remove("fc-selected")}},FgEventRenderer}();function buildSegCompareObj(seg){var eventDef=seg.eventRange.def,range=seg.eventRange.instance.range,start=range.start?range.start.valueOf():0,end=range.end?range.end.valueOf():0;return __assign({},eventDef.extendedProps,eventDef,{id:eventDef.publicId,start:start,end:end,duration:end-start,allDay:Number(eventDef.allDay),_seg:seg})}var FillRenderer=function(){function FillRenderer(){this.fillSegTag="div",this.dirtySizeFlags={},this.containerElsByType={},this.segsByType={}}return FillRenderer.prototype.getSegsByType=function(type){return this.segsByType[type]||[]},FillRenderer.prototype.renderSegs=function(type,context,segs){var _a;this.context=context;var renderedSegs=this.renderSegEls(type,segs),containerEls=this.attachSegs(type,renderedSegs);containerEls&&(_a=this.containerElsByType[type]||(this.containerElsByType[type]=[])).push.apply(_a,containerEls),this.segsByType[type]=renderedSegs,"bgEvent"===type&&triggerRenderedSegs(context,renderedSegs,!1),this.dirtySizeFlags[type]=!0},FillRenderer.prototype.unrender=function(type,context){var segs=this.segsByType[type];segs&&("bgEvent"===type&&triggerWillRemoveSegs(context,segs,!1),this.detachSegs(type,segs))},FillRenderer.prototype.renderSegEls=function(type,segs){var _this=this,html="",i;if(segs.length){for(i=0;i<segs.length;i++)html+=this.renderSegHtml(type,segs[i]);htmlToElements(html).forEach((function(el,i){var seg=segs[i];el&&(seg.el=el)})),"bgEvent"===type&&(segs=filterSegsViaEls(this.context,segs,!1)),segs=segs.filter((function(seg){return elementMatches(seg.el,_this.fillSegTag)}))}return segs},FillRenderer.prototype.renderSegHtml=function(type,seg){var css=null,classNames=[];return"highlight"!==type&&"businessHours"!==type&&(css={"background-color":seg.eventRange.ui.backgroundColor}),"highlight"!==type&&(classNames=classNames.concat(seg.eventRange.ui.classNames)),"businessHours"===type?classNames.push("fc-bgevent"):classNames.push("fc-"+type.toLowerCase()),"<"+this.fillSegTag+(classNames.length?' class="'+classNames.join(" ")+'"':"")+(css?' style="'+cssToStr(css)+'"':"")+"></"+this.fillSegTag+">"},FillRenderer.prototype.detachSegs=function(type,segs){var containerEls=this.containerElsByType[type];containerEls&&(containerEls.forEach(removeElement),delete this.containerElsByType[type])},FillRenderer.prototype.computeSizes=function(force){for(var type in this.segsByType)(force||this.dirtySizeFlags[type])&&this.computeSegSizes(this.segsByType[type])},FillRenderer.prototype.assignSizes=function(force){for(var type in this.segsByType)(force||this.dirtySizeFlags[type])&&this.assignSegSizes(this.segsByType[type]);this.dirtySizeFlags={}},FillRenderer.prototype.computeSegSizes=function(segs){},FillRenderer.prototype.assignSegSizes=function(segs){},FillRenderer}(),NamedTimeZoneImpl=function(){function NamedTimeZoneImpl(timeZoneName){this.timeZoneName=timeZoneName}return NamedTimeZoneImpl}(),ElementDragging=function(){function ElementDragging(el){this.emitter=new EmitterMixin}return ElementDragging.prototype.destroy=function(){},ElementDragging.prototype.setMirrorIsVisible=function(bool){},ElementDragging.prototype.setMirrorNeedsRevert=function(bool){},ElementDragging.prototype.setAutoScrollEnabled=function(bool){},ElementDragging}();function formatDate(dateInput,settings){void 0===settings&&(settings={});var dateEnv=buildDateEnv$1(settings),formatter=createFormatter(settings),dateMeta=dateEnv.createMarkerMeta(dateInput);return dateMeta?dateEnv.format(dateMeta.marker,formatter,{forcedTzo:dateMeta.forcedTzo}):""}function formatRange(startInput,endInput,settings){var dateEnv=buildDateEnv$1("object"==typeof settings&&settings?settings:{}),formatter=createFormatter(settings,globalDefaults.defaultRangeSeparator),startMeta=dateEnv.createMarkerMeta(startInput),endMeta=dateEnv.createMarkerMeta(endInput);return startMeta&&endMeta?dateEnv.formatRange(startMeta.marker,endMeta.marker,formatter,{forcedStartTzo:startMeta.forcedTzo,forcedEndTzo:endMeta.forcedTzo,isEndExclusive:settings.isEndExclusive}):""}function buildDateEnv$1(settings){var locale=buildLocale(settings.locale||"en",parseRawLocales([]).map);return settings=__assign({timeZone:globalDefaults.timeZone,calendarSystem:"gregory"},settings,{locale:locale}),new DateEnv(settings)}var DRAG_META_PROPS={startTime:createDuration,duration:createDuration,create:Boolean,sourceId:String},DRAG_META_DEFAULTS={create:!0};function parseDragMeta(raw){var leftoverProps={},refined=refineProps(raw,DRAG_META_PROPS,DRAG_META_DEFAULTS,leftoverProps);return refined.leftoverProps=leftoverProps,refined}function computeFallbackHeaderFormat(datesRepDistinctDays,dayCnt){return!datesRepDistinctDays||dayCnt>10?{weekday:"short"}:dayCnt>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"}}function renderDateCell(dateMarker,dateProfile,datesRepDistinctDays,colCnt,colHeadFormat,context,colspan,otherAttrs){var dateEnv=context.dateEnv,theme=context.theme,options=context.options,isDateValid=rangeContainsMarker(dateProfile.activeRange,dateMarker),classNames=["fc-day-header",theme.getClass("widgetHeader")],innerHtml;return innerHtml="function"==typeof options.columnHeaderHtml?options.columnHeaderHtml(dateEnv.toDate(dateMarker)):"function"==typeof options.columnHeaderText?htmlEscape(options.columnHeaderText(dateEnv.toDate(dateMarker))):htmlEscape(dateEnv.format(dateMarker,colHeadFormat)),datesRepDistinctDays?classNames=classNames.concat(getDayClasses(dateMarker,dateProfile,context,!0)):classNames.push("fc-"+DAY_IDS[dateMarker.getUTCDay()]),'<th class="'+classNames.join(" ")+'"'+(isDateValid&&datesRepDistinctDays?' data-date="'+dateEnv.formatIso(dateMarker,{omitTime:!0})+'"':"")+(colspan>1?' colspan="'+colspan+'"':"")+(otherAttrs?" "+otherAttrs:"")+">"+(isDateValid?buildGotoAnchorHtml(options,dateEnv,{date:dateMarker,forceOff:!datesRepDistinctDays||1===colCnt},innerHtml):innerHtml)+"</th>"}var DayHeader=function(_super){function DayHeader(parentEl){var _this=_super.call(this)||this;return _this.renderSkeleton=memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton),_this.parentEl=parentEl,_this}return __extends(DayHeader,_super),DayHeader.prototype.render=function(props,context){var dates=props.dates,datesRepDistinctDays=props.datesRepDistinctDays,parts=[];this.renderSkeleton(context),props.renderIntroHtml&&parts.push(props.renderIntroHtml());for(var colHeadFormat=createFormatter(context.options.columnHeaderFormat||computeFallbackHeaderFormat(datesRepDistinctDays,dates.length)),_i=0,dates_1=dates;_i<dates_1.length;_i++){var date=dates_1[_i];parts.push(renderDateCell(date,props.dateProfile,datesRepDistinctDays,dates.length,colHeadFormat,context))}context.isRtl&&parts.reverse(),this.thead.innerHTML="<tr>"+parts.join("")+"</tr>"},DayHeader.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender()},DayHeader.prototype._renderSkeleton=function(context){var theme=context.theme,parentEl=this.parentEl;parentEl.innerHTML="",parentEl.appendChild(this.el=htmlToElement('<div class="fc-row '+theme.getClass("headerRow")+'"><table class="'+theme.getClass("tableGrid")+'"><thead></thead></table></div>')),this.thead=this.el.querySelector("thead")},DayHeader.prototype._unrenderSkeleton=function(){removeElement(this.el)},DayHeader}(Component),DaySeries=function(){function DaySeries(range,dateProfileGenerator){for(var date=range.start,end=range.end,indices=[],dates=[],dayIndex=-1;date<end;)dateProfileGenerator.isHiddenDay(date)?indices.push(dayIndex+.5):(dayIndex++,indices.push(dayIndex),dates.push(date)),date=addDays(date,1);this.dates=dates,this.indices=indices,this.cnt=dates.length}return DaySeries.prototype.sliceRange=function(range){var firstIndex=this.getDateDayIndex(range.start),lastIndex=this.getDateDayIndex(addDays(range.end,-1)),clippedFirstIndex=Math.max(0,firstIndex),clippedLastIndex=Math.min(this.cnt-1,lastIndex);return(clippedFirstIndex=Math.ceil(clippedFirstIndex))<=(clippedLastIndex=Math.floor(clippedLastIndex))?{firstIndex:clippedFirstIndex,lastIndex:clippedLastIndex,isStart:firstIndex===clippedFirstIndex,isEnd:lastIndex===clippedLastIndex}:null},DaySeries.prototype.getDateDayIndex=function(date){var indices=this.indices,dayOffset=Math.floor(diffDays(this.dates[0],date));return dayOffset<0?indices[0]-1:dayOffset>=indices.length?indices[indices.length-1]+1:indices[dayOffset]},DaySeries}(),DayTable=function(){function DayTable(daySeries,breakOnWeeks){var dates=daySeries.dates,daysPerRow,firstDay,rowCnt;if(breakOnWeeks){for(firstDay=dates[0].getUTCDay(),daysPerRow=1;daysPerRow<dates.length&&dates[daysPerRow].getUTCDay()!==firstDay;daysPerRow++);rowCnt=Math.ceil(dates.length/daysPerRow)}else rowCnt=1,daysPerRow=dates.length;this.rowCnt=rowCnt,this.colCnt=daysPerRow,this.daySeries=daySeries,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return DayTable.prototype.buildCells=function(){for(var rows=[],row=0;row<this.rowCnt;row++){for(var cells=[],col=0;col<this.colCnt;col++)cells.push(this.buildCell(row,col));rows.push(cells)}return rows},DayTable.prototype.buildCell=function(row,col){return{date:this.daySeries.dates[row*this.colCnt+col]}},DayTable.prototype.buildHeaderDates=function(){for(var dates=[],col=0;col<this.colCnt;col++)dates.push(this.cells[0][col].date);return dates},DayTable.prototype.sliceRange=function(range){var colCnt=this.colCnt,seriesSeg=this.daySeries.sliceRange(range),segs=[];if(seriesSeg)for(var firstIndex=seriesSeg.firstIndex,lastIndex=seriesSeg.lastIndex,index=firstIndex;index<=lastIndex;){var row=Math.floor(index/colCnt),nextIndex=Math.min((row+1)*colCnt,lastIndex+1);segs.push({row:row,firstCol:index%colCnt,lastCol:(nextIndex-1)%colCnt,isStart:seriesSeg.isStart&&index===firstIndex,isEnd:seriesSeg.isEnd&&nextIndex-1===lastIndex}),index=nextIndex}return segs},DayTable}(),Slicer=function(){function Slicer(){this.sliceBusinessHours=memoize(this._sliceBusinessHours),this.sliceDateSelection=memoize(this._sliceDateSpan),this.sliceEventStore=memoize(this._sliceEventStore),this.sliceEventDrag=memoize(this._sliceInteraction),this.sliceEventResize=memoize(this._sliceInteraction)}return Slicer.prototype.sliceProps=function(props,dateProfile,nextDayThreshold,calendar,component){for(var extraArgs=[],_i=5;_i<arguments.length;_i++)extraArgs[_i-5]=arguments[_i];var eventUiBases=props.eventUiBases,eventSegs=this.sliceEventStore.apply(this,[props.eventStore,eventUiBases,dateProfile,nextDayThreshold,component].concat(extraArgs));return{dateSelectionSegs:this.sliceDateSelection.apply(this,[props.dateSelection,eventUiBases,component].concat(extraArgs)),businessHourSegs:this.sliceBusinessHours.apply(this,[props.businessHours,dateProfile,nextDayThreshold,calendar,component].concat(extraArgs)),fgEventSegs:eventSegs.fg,bgEventSegs:eventSegs.bg,eventDrag:this.sliceEventDrag.apply(this,[props.eventDrag,eventUiBases,dateProfile,nextDayThreshold,component].concat(extraArgs)),eventResize:this.sliceEventResize.apply(this,[props.eventResize,eventUiBases,dateProfile,nextDayThreshold,component].concat(extraArgs)),eventSelection:props.eventSelection}},Slicer.prototype.sliceNowDate=function(date,component){for(var extraArgs=[],_i=2;_i<arguments.length;_i++)extraArgs[_i-2]=arguments[_i];return this._sliceDateSpan.apply(this,[{range:{start:date,end:addMs(date,1)},allDay:!1},{},component].concat(extraArgs))},Slicer.prototype._sliceBusinessHours=function(businessHours,dateProfile,nextDayThreshold,calendar,component){for(var extraArgs=[],_i=5;_i<arguments.length;_i++)extraArgs[_i-5]=arguments[_i];return businessHours?this._sliceEventStore.apply(this,[expandRecurring(businessHours,computeActiveRange(dateProfile,Boolean(nextDayThreshold)),calendar),{},dateProfile,nextDayThreshold,component].concat(extraArgs)).bg:[]},Slicer.prototype._sliceEventStore=function(eventStore,eventUiBases,dateProfile,nextDayThreshold,component){for(var extraArgs=[],_i=5;_i<arguments.length;_i++)extraArgs[_i-5]=arguments[_i];if(eventStore){var rangeRes=sliceEventStore(eventStore,eventUiBases,computeActiveRange(dateProfile,Boolean(nextDayThreshold)),nextDayThreshold);return{bg:this.sliceEventRanges(rangeRes.bg,component,extraArgs),fg:this.sliceEventRanges(rangeRes.fg,component,extraArgs)}}return{bg:[],fg:[]}},Slicer.prototype._sliceInteraction=function(interaction,eventUiBases,dateProfile,nextDayThreshold,component){for(var extraArgs=[],_i=5;_i<arguments.length;_i++)extraArgs[_i-5]=arguments[_i];if(!interaction)return null;var rangeRes=sliceEventStore(interaction.mutatedEvents,eventUiBases,computeActiveRange(dateProfile,Boolean(nextDayThreshold)),nextDayThreshold);return{segs:this.sliceEventRanges(rangeRes.fg,component,extraArgs),affectedInstances:interaction.affectedEvents.instances,isEvent:interaction.isEvent,sourceSeg:interaction.origSeg}},Slicer.prototype._sliceDateSpan=function(dateSpan,eventUiBases,component){for(var extraArgs=[],_i=3;_i<arguments.length;_i++)extraArgs[_i-3]=arguments[_i];if(!dateSpan)return[];for(var eventRange=fabricateEventRange(dateSpan,eventUiBases,component.context.calendar),segs=this.sliceRange.apply(this,[dateSpan.range].concat(extraArgs)),_a=0,segs_1=segs;_a<segs_1.length;_a++){var seg=segs_1[_a];seg.component=component,seg.eventRange=eventRange}return segs},Slicer.prototype.sliceEventRanges=function(eventRanges,component,extraArgs){for(var segs=[],_i=0,eventRanges_1=eventRanges;_i<eventRanges_1.length;_i++){var eventRange=eventRanges_1[_i];segs.push.apply(segs,this.sliceEventRange(eventRange,component,extraArgs))}return segs},Slicer.prototype.sliceEventRange=function(eventRange,component,extraArgs){for(var segs=this.sliceRange.apply(this,[eventRange.range].concat(extraArgs)),_i=0,segs_2=segs;_i<segs_2.length;_i++){var seg=segs_2[_i];seg.component=component,seg.eventRange=eventRange,seg.isStart=eventRange.isStart&&seg.isStart,seg.isEnd=eventRange.isEnd&&seg.isEnd}return segs},Slicer}();function computeActiveRange(dateProfile,isComponentAllDay){var range=dateProfile.activeRange;return isComponentAllDay?range:{start:addMs(range.start,dateProfile.minTime.milliseconds),end:addMs(range.end,dateProfile.maxTime.milliseconds-864e5)}}var version="4.4.1";exports.Calendar=Calendar,exports.Component=Component,exports.ComponentContext=ComponentContext,exports.DateComponent=DateComponent,exports.DateEnv=DateEnv,exports.DateProfileGenerator=DateProfileGenerator,exports.DayHeader=DayHeader,exports.DaySeries=DaySeries,exports.DayTable=DayTable,exports.ElementDragging=ElementDragging,exports.ElementScrollController=ElementScrollController,exports.EmitterMixin=EmitterMixin,exports.EventApi=EventApi,exports.FgEventRenderer=FgEventRenderer,exports.FillRenderer=FillRenderer,exports.Interaction=Interaction,exports.Mixin=Mixin,exports.NamedTimeZoneImpl=NamedTimeZoneImpl,exports.PositionCache=PositionCache,exports.ScrollComponent=ScrollComponent,exports.ScrollController=ScrollController,exports.Slicer=Slicer,exports.Splitter=Splitter,exports.Theme=Theme,exports.View=View,exports.WindowScrollController=WindowScrollController,exports.addDays=addDays,exports.addDurations=addDurations,exports.addMs=addMs,exports.addWeeks=addWeeks,exports.allowContextMenu=allowContextMenu,exports.allowSelection=allowSelection,exports.appendToElement=appendToElement,exports.applyAll=applyAll,exports.applyMutationToEventStore=applyMutationToEventStore,exports.applyStyle=applyStyle,exports.applyStyleProp=applyStyleProp,exports.asRoughMinutes=asRoughMinutes,exports.asRoughMs=asRoughMs,exports.asRoughSeconds=asRoughSeconds,exports.buildGotoAnchorHtml=buildGotoAnchorHtml,exports.buildSegCompareObj=buildSegCompareObj,exports.capitaliseFirstLetter=capitaliseFirstLetter,exports.combineEventUis=combineEventUis,exports.compareByFieldSpec=compareByFieldSpec,exports.compareByFieldSpecs=compareByFieldSpecs,exports.compareNumbers=compareNumbers,exports.compensateScroll=compensateScroll,exports.computeClippingRect=computeClippingRect,exports.computeEdges=computeEdges,exports.computeEventDraggable=computeEventDraggable,exports.computeEventEndResizable=computeEventEndResizable,exports.computeEventStartResizable=computeEventStartResizable,exports.computeFallbackHeaderFormat=computeFallbackHeaderFormat,exports.computeHeightAndMargins=computeHeightAndMargins,exports.computeInnerRect=computeInnerRect,exports.computeRect=computeRect,exports.computeVisibleDayRange=computeVisibleDayRange,exports.config=config,exports.constrainPoint=constrainPoint,exports.createDuration=createDuration,exports.createElement=createElement,exports.createEmptyEventStore=createEmptyEventStore,exports.createEventInstance=createEventInstance,exports.createFormatter=createFormatter,exports.createPlugin=createPlugin,exports.cssToStr=cssToStr,exports.debounce=debounce,exports.diffDates=diffDates,exports.diffDayAndTime=diffDayAndTime,exports.diffDays=diffDays,exports.diffPoints=diffPoints,exports.diffWeeks=diffWeeks,exports.diffWholeDays=diffWholeDays,exports.diffWholeWeeks=diffWholeWeeks,exports.disableCursor=disableCursor,exports.distributeHeight=distributeHeight,exports.elementClosest=elementClosest,exports.elementMatches=elementMatches,exports.enableCursor=enableCursor,exports.eventTupleToStore=eventTupleToStore,exports.filterEventStoreDefs=filterEventStoreDefs,exports.filterHash=filterHash,exports.findChildren=findChildren,exports.findElements=findElements,exports.flexibleCompare=flexibleCompare,exports.forceClassName=forceClassName,exports.formatDate=formatDate,exports.formatIsoTimeString=formatIsoTimeString,exports.formatRange=formatRange,exports.getAllDayHtml=getAllDayHtml,exports.getClippingParents=getClippingParents,exports.getDayClasses=getDayClasses,exports.getElSeg=getElSeg,exports.getRectCenter=getRectCenter,exports.getRelevantEvents=getRelevantEvents,exports.globalDefaults=globalDefaults,exports.greatestDurationDenominator=greatestDurationDenominator,exports.hasBgRendering=hasBgRendering,exports.htmlEscape=htmlEscape,exports.htmlToElement=htmlToElement,exports.insertAfterElement=insertAfterElement,exports.interactionSettingsStore=interactionSettingsStore,exports.interactionSettingsToStore=interactionSettingsToStore,exports.intersectRanges=intersectRanges,exports.intersectRects=intersectRects,exports.isArraysEqual=isArraysEqual,exports.isDateSpansEqual=isDateSpansEqual,exports.isInt=isInt,exports.isInteractionValid=isInteractionValid,exports.isMultiDayRange=isMultiDayRange,exports.isPropsEqual=isPropsEqual,exports.isPropsValid=isPropsValid,exports.isSingleDay=isSingleDay,exports.isValidDate=isValidDate,exports.listenBySelector=listenBySelector,exports.mapHash=mapHash,exports.matchCellWidths=matchCellWidths,exports.memoize=memoize,exports.memoizeOutput=memoizeOutput,exports.memoizeRendering=memoizeRendering,exports.mergeEventStores=mergeEventStores,exports.multiplyDuration=multiplyDuration,exports.padStart=padStart,exports.parseBusinessHours=parseBusinessHours,exports.parseDragMeta=parseDragMeta,exports.parseEventDef=parseEventDef,exports.parseFieldSpecs=parseFieldSpecs,exports.parseMarker=parse,exports.pointInsideRect=pointInsideRect,exports.prependToElement=prependToElement,exports.preventContextMenu=preventContextMenu,exports.preventDefault=preventDefault,exports.preventSelection=preventSelection,exports.processScopedUiProps=processScopedUiProps,exports.rangeContainsMarker=rangeContainsMarker,exports.rangeContainsRange=rangeContainsRange,exports.rangesEqual=rangesEqual,exports.rangesIntersect=rangesIntersect,exports.refineProps=refineProps,exports.removeElement=removeElement,exports.removeExact=removeExact,exports.renderDateCell=renderDateCell,exports.requestJson=requestJson,exports.sliceEventStore=sliceEventStore,exports.startOfDay=startOfDay,exports.subtractInnerElHeight=subtractInnerElHeight,exports.translateRect=translateRect,exports.uncompensateScroll=uncompensateScroll,exports.undistributeHeight=undistributeHeight,exports.unpromisify=unpromisify,exports.version="4.4.1",exports.whenTransitionDone=whenTransitionDone,exports.wholeDivideDurations=wholeDivideDurations,Object.defineProperty(exports,"__esModule",{value:!0})})),
|
||
/*!
|
||
FullCalendar Day Grid Plugin v4.4.1
|
||
Docs & License: https://fullcalendar.io/
|
||
(c) 2019 Adam Shaw
|
||
*/
|
||
function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],factory):factory((global=global||self).FullCalendarDayGrid={},global.FullCalendar)}(this,(function(exports,core){"use strict";
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},DayGridDateProfileGenerator=function(_super){function DayGridDateProfileGenerator(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DayGridDateProfileGenerator,_super),DayGridDateProfileGenerator.prototype.buildRenderRange=function(currentRange,currentRangeUnit,isRangeAllDay){var dateEnv=this.dateEnv,renderRange=_super.prototype.buildRenderRange.call(this,currentRange,currentRangeUnit,isRangeAllDay),start=renderRange.start,end=renderRange.end,endOfWeek;if(/^(year|month)$/.test(currentRangeUnit)&&(start=dateEnv.startOfWeek(start),(endOfWeek=dateEnv.startOfWeek(end)).valueOf()!==end.valueOf()&&(end=core.addWeeks(endOfWeek,1))),this.options.monthMode&&this.options.fixedWeekCount){var rowCnt=Math.ceil(core.diffWeeks(start,end));end=core.addWeeks(end,6-rowCnt)}return{start:start,end:end}},DayGridDateProfileGenerator}(core.DateProfileGenerator),Popover=function(){function Popover(options){var _this=this;this.isHidden=!0,this.margin=10,this.documentMousedown=function(ev){_this.el&&!_this.el.contains(ev.target)&&_this.hide()},this.options=options}return Popover.prototype.show=function(){this.isHidden&&(this.el||this.render(),this.el.style.display="",this.position(),this.isHidden=!1,this.trigger("show"))},Popover.prototype.hide=function(){this.isHidden||(this.el.style.display="none",this.isHidden=!0,this.trigger("hide"))},Popover.prototype.render=function(){var _this=this,options=this.options,el=this.el=core.createElement("div",{className:"fc-popover "+(options.className||""),style:{top:"0",left:"0"}});"function"==typeof options.content&&options.content(el),options.parentEl.appendChild(el),core.listenBySelector(el,"click",".fc-close",(function(ev){_this.hide()})),options.autoHide&&document.addEventListener("mousedown",this.documentMousedown)},Popover.prototype.destroy=function(){this.hide(),this.el&&(core.removeElement(this.el),this.el=null),document.removeEventListener("mousedown",this.documentMousedown)},Popover.prototype.position=function(){var options=this.options,el=this.el,elDims=el.getBoundingClientRect(),origin=core.computeRect(el.offsetParent),clippingRect=core.computeClippingRect(options.parentEl),top,left;top=options.top||0,left=void 0!==options.left?options.left:void 0!==options.right?options.right-elDims.width:0,top=Math.min(top,clippingRect.bottom-elDims.height-this.margin),top=Math.max(top,clippingRect.top+this.margin),left=Math.min(left,clippingRect.right-elDims.width-this.margin),left=Math.max(left,clippingRect.left+this.margin),core.applyStyle(el,{top:top-origin.top,left:left-origin.left})},Popover.prototype.trigger=function(name){this.options[name]&&this.options[name].apply(this,Array.prototype.slice.call(arguments,1))},Popover}(),SimpleDayGridEventRenderer=function(_super){function SimpleDayGridEventRenderer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(SimpleDayGridEventRenderer,_super),SimpleDayGridEventRenderer.prototype.renderSegHtml=function(seg,mirrorInfo){var context=this.context,eventRange=seg.eventRange,eventDef=eventRange.def,eventUi=eventRange.ui,allDay=eventDef.allDay,isDraggable=core.computeEventDraggable(context,eventDef,eventUi),isResizableFromStart=allDay&&seg.isStart&&core.computeEventStartResizable(context,eventDef,eventUi),isResizableFromEnd=allDay&&seg.isEnd&&core.computeEventEndResizable(context,eventDef,eventUi),classes=this.getSegClasses(seg,isDraggable,isResizableFromStart||isResizableFromEnd,mirrorInfo),skinCss=core.cssToStr(this.getSkinCss(eventUi)),timeHtml="",timeText,titleHtml;return classes.unshift("fc-day-grid-event","fc-h-event"),seg.isStart&&(timeText=this.getTimeText(eventRange))&&(timeHtml='<span class="fc-time">'+core.htmlEscape(timeText)+"</span>"),titleHtml='<span class="fc-title">'+(core.htmlEscape(eventDef.title||"")||" ")+"</span>",'<a class="'+classes.join(" ")+'"'+(eventDef.url?' href="'+core.htmlEscape(eventDef.url)+'"':"")+(skinCss?' style="'+skinCss+'"':"")+'><div class="fc-content">'+("rtl"===context.options.dir?titleHtml+" "+timeHtml:timeHtml+" "+titleHtml)+"</div>"+(isResizableFromStart?'<div class="fc-resizer fc-start-resizer"></div>':"")+(isResizableFromEnd?'<div class="fc-resizer fc-end-resizer"></div>':"")+"</a>"},SimpleDayGridEventRenderer.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"}},SimpleDayGridEventRenderer.prototype.computeDisplayEventEnd=function(){return!1},SimpleDayGridEventRenderer}(core.FgEventRenderer),DayGridEventRenderer=function(_super){function DayGridEventRenderer(dayGrid){var _this=_super.call(this)||this;return _this.dayGrid=dayGrid,_this}return __extends(DayGridEventRenderer,_super),DayGridEventRenderer.prototype.attachSegs=function(segs,mirrorInfo){var rowStructs=this.rowStructs=this.renderSegRows(segs);this.dayGrid.rowEls.forEach((function(rowNode,i){rowNode.querySelector(".fc-content-skeleton > table").appendChild(rowStructs[i].tbodyEl)})),mirrorInfo||this.dayGrid.removeSegPopover()},DayGridEventRenderer.prototype.detachSegs=function(){for(var rowStructs=this.rowStructs||[],rowStruct;rowStruct=rowStructs.pop();)core.removeElement(rowStruct.tbodyEl);this.rowStructs=null},DayGridEventRenderer.prototype.renderSegRows=function(segs){var rowStructs=[],segRows,row;for(segRows=this.groupSegRows(segs),row=0;row<segRows.length;row++)rowStructs.push(this.renderSegRow(row,segRows[row]));return rowStructs},DayGridEventRenderer.prototype.renderSegRow=function(row,rowSegs){var isRtl=this.context.isRtl,dayGrid=this.dayGrid,colCnt=dayGrid.colCnt,segLevels=this.buildSegLevels(rowSegs),levelCnt=Math.max(1,segLevels.length),tbody=document.createElement("tbody"),segMatrix=[],cellMatrix=[],loneCellMatrix=[],i,levelSegs,col,tr,j,seg,td;function emptyCellsUntil(endCol){for(;col<endCol;)(td=(loneCellMatrix[i-1]||[])[col])?td.rowSpan=(td.rowSpan||1)+1:(td=document.createElement("td"),tr.appendChild(td)),cellMatrix[i][col]=td,loneCellMatrix[i][col]=td,col++}for(i=0;i<levelCnt;i++){if(levelSegs=segLevels[i],col=0,tr=document.createElement("tr"),segMatrix.push([]),cellMatrix.push([]),loneCellMatrix.push([]),levelSegs)for(j=0;j<levelSegs.length;j++){seg=levelSegs[j];var leftCol=isRtl?colCnt-1-seg.lastCol:seg.firstCol,rightCol=isRtl?colCnt-1-seg.firstCol:seg.lastCol;for(emptyCellsUntil(leftCol),td=core.createElement("td",{className:"fc-event-container"},seg.el),leftCol!==rightCol?td.colSpan=rightCol-leftCol+1:loneCellMatrix[i][col]=td;col<=rightCol;)cellMatrix[i][col]=td,segMatrix[i][col]=seg,col++;tr.appendChild(td)}emptyCellsUntil(colCnt);var introHtml=dayGrid.renderProps.renderIntroHtml();introHtml&&(isRtl?core.appendToElement(tr,introHtml):core.prependToElement(tr,introHtml)),tbody.appendChild(tr)}return{row:row,tbodyEl:tbody,cellMatrix:cellMatrix,segMatrix:segMatrix,segLevels:segLevels,segs:rowSegs}},DayGridEventRenderer.prototype.buildSegLevels=function(segs){var isRtl=this.context.isRtl,colCnt=this.dayGrid.colCnt,levels=[],i,seg,j;for(segs=this.sortEventSegs(segs),i=0;i<segs.length;i++){for(seg=segs[i],j=0;j<levels.length&&isDaySegCollision(seg,levels[j]);j++);seg.level=j,seg.leftCol=isRtl?colCnt-1-seg.lastCol:seg.firstCol,seg.rightCol=isRtl?colCnt-1-seg.firstCol:seg.lastCol,(levels[j]||(levels[j]=[])).push(seg)}for(j=0;j<levels.length;j++)levels[j].sort(compareDaySegCols);return levels},DayGridEventRenderer.prototype.groupSegRows=function(segs){var segRows=[],i;for(i=0;i<this.dayGrid.rowCnt;i++)segRows.push([]);for(i=0;i<segs.length;i++)segRows[segs[i].row].push(segs[i]);return segRows},DayGridEventRenderer.prototype.computeDisplayEventEnd=function(){return 1===this.dayGrid.colCnt},DayGridEventRenderer}(SimpleDayGridEventRenderer);function isDaySegCollision(seg,otherSegs){var i,otherSeg;for(i=0;i<otherSegs.length;i++)if((otherSeg=otherSegs[i]).firstCol<=seg.lastCol&&otherSeg.lastCol>=seg.firstCol)return!0;return!1}function compareDaySegCols(a,b){return a.leftCol-b.leftCol}var DayGridMirrorRenderer=function(_super){function DayGridMirrorRenderer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DayGridMirrorRenderer,_super),DayGridMirrorRenderer.prototype.attachSegs=function(segs,mirrorInfo){var sourceSeg=mirrorInfo.sourceSeg,rowStructs=this.rowStructs=this.renderSegRows(segs);this.dayGrid.rowEls.forEach((function(rowNode,row){var skeletonEl=core.htmlToElement('<div class="fc-mirror-skeleton"><table></table></div>'),skeletonTopEl,skeletonTop;sourceSeg&&sourceSeg.row===row?skeletonTopEl=sourceSeg.el:(skeletonTopEl=rowNode.querySelector(".fc-content-skeleton tbody"))||(skeletonTopEl=rowNode.querySelector(".fc-content-skeleton table")),skeletonTop=skeletonTopEl.getBoundingClientRect().top-rowNode.getBoundingClientRect().top,skeletonEl.style.top=skeletonTop+"px",skeletonEl.querySelector("table").appendChild(rowStructs[row].tbodyEl),rowNode.appendChild(skeletonEl)}))},DayGridMirrorRenderer}(DayGridEventRenderer),EMPTY_CELL_HTML='<td style="pointer-events:none"></td>',DayGridFillRenderer=function(_super){function DayGridFillRenderer(dayGrid){var _this=_super.call(this)||this;return _this.fillSegTag="td",_this.dayGrid=dayGrid,_this}return __extends(DayGridFillRenderer,_super),DayGridFillRenderer.prototype.renderSegs=function(type,context,segs){"bgEvent"===type&&(segs=segs.filter((function(seg){return seg.eventRange.def.allDay}))),_super.prototype.renderSegs.call(this,type,context,segs)},DayGridFillRenderer.prototype.attachSegs=function(type,segs){var els=[],i,seg,skeletonEl;for(i=0;i<segs.length;i++)seg=segs[i],skeletonEl=this.renderFillRow(type,seg),this.dayGrid.rowEls[seg.row].appendChild(skeletonEl),els.push(skeletonEl);return els},DayGridFillRenderer.prototype.renderFillRow=function(type,seg){var dayGrid=this.dayGrid,isRtl=this.context.isRtl,colCnt=dayGrid.colCnt,leftCol,rightCol,startCol=isRtl?colCnt-1-seg.lastCol:seg.firstCol,endCol=(isRtl?colCnt-1-seg.firstCol:seg.lastCol)+1,className,skeletonEl,trEl;className="businessHours"===type?"bgevent":type.toLowerCase(),trEl=(skeletonEl=core.htmlToElement('<div class="fc-'+className+'-skeleton"><table><tr></tr></table></div>')).getElementsByTagName("tr")[0],startCol>0&&core.appendToElement(trEl,new Array(startCol+1).join(EMPTY_CELL_HTML)),seg.el.colSpan=endCol-startCol,trEl.appendChild(seg.el),endCol<colCnt&&core.appendToElement(trEl,new Array(colCnt-endCol+1).join(EMPTY_CELL_HTML));var introHtml=dayGrid.renderProps.renderIntroHtml();return introHtml&&(isRtl?core.appendToElement(trEl,introHtml):core.prependToElement(trEl,introHtml)),skeletonEl},DayGridFillRenderer}(core.FillRenderer),DayTile=function(_super){function DayTile(el){var _this=_super.call(this,el)||this,eventRenderer=_this.eventRenderer=new DayTileEventRenderer(_this),renderFrame=_this.renderFrame=core.memoizeRendering(_this._renderFrame);return _this.renderFgEvents=core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer),eventRenderer.unrender.bind(eventRenderer),[renderFrame]),_this.renderEventSelection=core.memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer),eventRenderer.unselectByInstanceId.bind(eventRenderer),[_this.renderFgEvents]),_this.renderEventDrag=core.memoizeRendering(eventRenderer.hideByHash.bind(eventRenderer),eventRenderer.showByHash.bind(eventRenderer),[renderFrame]),_this.renderEventResize=core.memoizeRendering(eventRenderer.hideByHash.bind(eventRenderer),eventRenderer.showByHash.bind(eventRenderer),[renderFrame]),_this}return __extends(DayTile,_super),DayTile.prototype.firstContext=function(context){context.calendar.registerInteractiveComponent(this,{el:this.el,useEventCenter:!1})},DayTile.prototype.render=function(props,context){this.renderFrame(props.date),this.renderFgEvents(context,props.fgSegs),this.renderEventSelection(props.eventSelection),this.renderEventDrag(props.eventDragInstances),this.renderEventResize(props.eventResizeInstances)},DayTile.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderFrame.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},DayTile.prototype._renderFrame=function(date){var _a=this.context,theme=_a.theme,dateEnv=_a.dateEnv,options=_a.options,title=dateEnv.format(date,core.createFormatter(options.dayPopoverFormat));this.el.innerHTML='<div class="fc-header '+theme.getClass("popoverHeader")+'"><span class="fc-title">'+core.htmlEscape(title)+'</span><span class="fc-close '+theme.getIconClass("close")+'"></span></div><div class="fc-body '+theme.getClass("popoverContent")+'"><div class="fc-event-container"></div></div>',this.segContainerEl=this.el.querySelector(".fc-event-container")},DayTile.prototype.queryHit=function(positionLeft,positionTop,elWidth,elHeight){var date=this.props.date;if(positionLeft<elWidth&&positionTop<elHeight)return{component:this,dateSpan:{allDay:!0,range:{start:date,end:core.addDays(date,1)}},dayEl:this.el,rect:{left:0,top:0,right:elWidth,bottom:elHeight},layer:1}},DayTile}(core.DateComponent),DayTileEventRenderer=function(_super){function DayTileEventRenderer(dayTile){var _this=_super.call(this)||this;return _this.dayTile=dayTile,_this}return __extends(DayTileEventRenderer,_super),DayTileEventRenderer.prototype.attachSegs=function(segs){for(var _i=0,segs_1=segs;_i<segs_1.length;_i++){var seg=segs_1[_i];this.dayTile.segContainerEl.appendChild(seg.el)}},DayTileEventRenderer.prototype.detachSegs=function(segs){for(var _i=0,segs_2=segs;_i<segs_2.length;_i++){var seg=segs_2[_i];core.removeElement(seg.el)}},DayTileEventRenderer}(SimpleDayGridEventRenderer),DayBgRow=function(){function DayBgRow(context){this.context=context}return DayBgRow.prototype.renderHtml=function(props){var parts=[];props.renderIntroHtml&&parts.push(props.renderIntroHtml());for(var _i=0,_a=props.cells;_i<_a.length;_i++){var cell=_a[_i];parts.push(renderCellHtml(cell.date,props.dateProfile,this.context,cell.htmlAttrs))}return props.cells.length||parts.push('<td class="fc-day '+this.context.theme.getClass("widgetContent")+'"></td>'),"rtl"===this.context.options.dir&&parts.reverse(),"<tr>"+parts.join("")+"</tr>"},DayBgRow}();function renderCellHtml(date,dateProfile,context,otherAttrs){var dateEnv=context.dateEnv,theme=context.theme,isDateValid=core.rangeContainsMarker(dateProfile.activeRange,date),classes=core.getDayClasses(date,dateProfile,context);return classes.unshift("fc-day",theme.getClass("widgetContent")),'<td class="'+classes.join(" ")+'"'+(isDateValid?' data-date="'+dateEnv.formatIso(date,{omitTime:!0})+'"':"")+(otherAttrs?" "+otherAttrs:"")+"></td>"}var DAY_NUM_FORMAT=core.createFormatter({day:"numeric"}),WEEK_NUM_FORMAT=core.createFormatter({week:"numeric"}),DayGrid=function(_super){function DayGrid(el,renderProps){var _this=_super.call(this,el)||this;_this.bottomCoordPadding=0,_this.isCellSizesDirty=!1,_this.renderProps=renderProps;var eventRenderer=_this.eventRenderer=new DayGridEventRenderer(_this),fillRenderer=_this.fillRenderer=new DayGridFillRenderer(_this);_this.mirrorRenderer=new DayGridMirrorRenderer(_this);var renderCells=_this.renderCells=core.memoizeRendering(_this._renderCells,_this._unrenderCells);return _this.renderBusinessHours=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"businessHours"),fillRenderer.unrender.bind(fillRenderer,"businessHours"),[renderCells]),_this.renderDateSelection=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"highlight"),fillRenderer.unrender.bind(fillRenderer,"highlight"),[renderCells]),_this.renderBgEvents=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"bgEvent"),fillRenderer.unrender.bind(fillRenderer,"bgEvent"),[renderCells]),_this.renderFgEvents=core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer),eventRenderer.unrender.bind(eventRenderer),[renderCells]),_this.renderEventSelection=core.memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer),eventRenderer.unselectByInstanceId.bind(eventRenderer),[_this.renderFgEvents]),_this.renderEventDrag=core.memoizeRendering(_this._renderEventDrag,_this._unrenderEventDrag,[renderCells]),_this.renderEventResize=core.memoizeRendering(_this._renderEventResize,_this._unrenderEventResize,[renderCells]),_this}return __extends(DayGrid,_super),DayGrid.prototype.render=function(props,context){var cells=props.cells;this.rowCnt=cells.length,this.colCnt=cells[0].length,this.renderCells(cells,props.isRigid),this.renderBusinessHours(context,props.businessHourSegs),this.renderDateSelection(context,props.dateSelectionSegs),this.renderBgEvents(context,props.bgEventSegs),this.renderFgEvents(context,props.fgEventSegs),this.renderEventSelection(props.eventSelection),this.renderEventDrag(props.eventDrag),this.renderEventResize(props.eventResize),this.segPopoverTile&&this.updateSegPopoverTile()},DayGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderCells.unrender()},DayGrid.prototype.getCellRange=function(row,col){var start=this.props.cells[row][col].date,end;return{start:start,end:core.addDays(start,1)}},DayGrid.prototype.updateSegPopoverTile=function(date,segs){var ownProps=this.props;this.segPopoverTile.receiveProps({date:date||this.segPopoverTile.props.date,fgSegs:segs||this.segPopoverTile.props.fgSegs,eventSelection:ownProps.eventSelection,eventDragInstances:ownProps.eventDrag?ownProps.eventDrag.affectedInstances:null,eventResizeInstances:ownProps.eventResize?ownProps.eventResize.affectedInstances:null},this.context)},DayGrid.prototype._renderCells=function(cells,isRigid){var _a=this.context,calendar=_a.calendar,view=_a.view,isRtl=_a.isRtl,dateEnv=_a.dateEnv,_b=this,rowCnt=_b.rowCnt,colCnt=_b.colCnt,html="",row,col;for(row=0;row<rowCnt;row++)html+=this.renderDayRowHtml(row,isRigid);for(this.el.innerHTML=html,this.rowEls=core.findElements(this.el,".fc-row"),this.cellEls=core.findElements(this.el,".fc-day, .fc-disabled-day"),isRtl&&this.cellEls.reverse(),this.rowPositions=new core.PositionCache(this.el,this.rowEls,!1,!0),this.colPositions=new core.PositionCache(this.el,this.cellEls.slice(0,colCnt),!0,!1),row=0;row<rowCnt;row++)for(col=0;col<colCnt;col++)calendar.publiclyTrigger("dayRender",[{date:dateEnv.toDate(cells[row][col].date),el:this.getCellEl(row,col),view:view}]);this.isCellSizesDirty=!0},DayGrid.prototype._unrenderCells=function(){this.removeSegPopover()},DayGrid.prototype.renderDayRowHtml=function(row,isRigid){var theme=this.context.theme,classes=["fc-row","fc-week",theme.getClass("dayRow")];isRigid&&classes.push("fc-rigid");var bgRow=new DayBgRow(this.context);return'<div class="'+classes.join(" ")+'"><div class="fc-bg"><table class="'+theme.getClass("tableGrid")+'">'+bgRow.renderHtml({cells:this.props.cells[row],dateProfile:this.props.dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+'</table></div><div class="fc-content-skeleton"><table>'+(this.getIsNumbersVisible()?"<thead>"+this.renderNumberTrHtml(row)+"</thead>":"")+"</table></div></div>"},DayGrid.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.renderProps.cellWeekNumbersVisible||this.renderProps.colWeekNumbersVisible},DayGrid.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},DayGrid.prototype.renderNumberTrHtml=function(row){var isRtl=this.context.isRtl,intro=this.renderProps.renderNumberIntroHtml(row,this);return"<tr>"+(isRtl?"":intro)+this.renderNumberCellsHtml(row)+(isRtl?intro:"")+"</tr>"},DayGrid.prototype.renderNumberCellsHtml=function(row){var htmls=[],col,date;for(col=0;col<this.colCnt;col++)date=this.props.cells[row][col].date,htmls.push(this.renderNumberCellHtml(date));return this.context.isRtl&&htmls.reverse(),htmls.join("")},DayGrid.prototype.renderNumberCellHtml=function(date){var _a=this.context,dateEnv=_a.dateEnv,options=_a.options,html="",isDateValid=core.rangeContainsMarker(this.props.dateProfile.activeRange,date),isDayNumberVisible=this.getIsDayNumbersVisible()&&isDateValid,classes,weekCalcFirstDow;return isDayNumberVisible||this.renderProps.cellWeekNumbersVisible?((classes=core.getDayClasses(date,this.props.dateProfile,this.context)).unshift("fc-day-top"),this.renderProps.cellWeekNumbersVisible&&(weekCalcFirstDow=dateEnv.weekDow),html+='<td class="'+classes.join(" ")+'"'+(isDateValid?' data-date="'+dateEnv.formatIso(date,{omitTime:!0})+'"':"")+">",this.renderProps.cellWeekNumbersVisible&&date.getUTCDay()===weekCalcFirstDow&&(html+=core.buildGotoAnchorHtml(options,dateEnv,{date:date,type:"week"},{class:"fc-week-number"},dateEnv.format(date,WEEK_NUM_FORMAT))),isDayNumberVisible&&(html+=core.buildGotoAnchorHtml(options,dateEnv,date,{class:"fc-day-number"},dateEnv.format(date,DAY_NUM_FORMAT))),html+="</td>"):"<td></td>"},DayGrid.prototype.updateSize=function(isResize){var calendar=this.context.calendar,_a=this,fillRenderer=_a.fillRenderer,eventRenderer=_a.eventRenderer,mirrorRenderer=_a.mirrorRenderer;(isResize||this.isCellSizesDirty||calendar.isEventsUpdated)&&(this.buildPositionCaches(),this.isCellSizesDirty=!1),fillRenderer.computeSizes(isResize),eventRenderer.computeSizes(isResize),mirrorRenderer.computeSizes(isResize),fillRenderer.assignSizes(isResize),eventRenderer.assignSizes(isResize),mirrorRenderer.assignSizes(isResize)},DayGrid.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildRowPositions()},DayGrid.prototype.buildColPositions=function(){this.colPositions.build()},DayGrid.prototype.buildRowPositions=function(){this.rowPositions.build(),this.rowPositions.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},DayGrid.prototype.positionToHit=function(leftPosition,topPosition){var _a=this,colPositions=_a.colPositions,rowPositions=_a.rowPositions,col=colPositions.leftToIndex(leftPosition),row=rowPositions.topToIndex(topPosition);if(null!=row&&null!=col)return{row:row,col:col,dateSpan:{range:this.getCellRange(row,col),allDay:!0},dayEl:this.getCellEl(row,col),relativeRect:{left:colPositions.lefts[col],right:colPositions.rights[col],top:rowPositions.tops[row],bottom:rowPositions.bottoms[row]}}},DayGrid.prototype.getCellEl=function(row,col){return this.cellEls[row*this.colCnt+col]},DayGrid.prototype._renderEventDrag=function(state){state&&(this.eventRenderer.hideByHash(state.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,state.segs))},DayGrid.prototype._unrenderEventDrag=function(state){state&&(this.eventRenderer.showByHash(state.affectedInstances),this.fillRenderer.unrender("highlight",this.context))},DayGrid.prototype._renderEventResize=function(state){state&&(this.eventRenderer.hideByHash(state.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,state.segs),this.mirrorRenderer.renderSegs(this.context,state.segs,{isResizing:!0,sourceSeg:state.sourceSeg}))},DayGrid.prototype._unrenderEventResize=function(state){state&&(this.eventRenderer.showByHash(state.affectedInstances),this.fillRenderer.unrender("highlight",this.context),this.mirrorRenderer.unrender(this.context,state.segs,{isResizing:!0,sourceSeg:state.sourceSeg}))},DayGrid.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},DayGrid.prototype.limitRows=function(levelLimit){var rowStructs=this.eventRenderer.rowStructs||[],row,rowLevelLimit;for(row=0;row<rowStructs.length;row++)this.unlimitRow(row),!1!==(rowLevelLimit=!!levelLimit&&("number"==typeof levelLimit?levelLimit:this.computeRowLevelLimit(row)))&&this.limitRow(row,rowLevelLimit)},DayGrid.prototype.computeRowLevelLimit=function(row){var rowEl,rowBottom=this.rowEls[row].getBoundingClientRect().bottom,trEls=core.findChildren(this.eventRenderer.rowStructs[row].tbodyEl),i,trEl;for(i=0;i<trEls.length;i++)if((trEl=trEls[i]).classList.remove("fc-limited"),trEl.getBoundingClientRect().bottom>rowBottom)return i;return!1},DayGrid.prototype.limitRow=function(row,levelLimit){var _this=this,colCnt=this.colCnt,isRtl=this.context.isRtl,rowStruct=this.eventRenderer.rowStructs[row],moreNodes=[],col=0,levelSegs,cellMatrix,limitedNodes,i,seg,segsBelow,totalSegsBelow,colSegsBelow,td,rowSpan,segMoreNodes,j,moreTd,moreWrap,moreLink,emptyCellsUntil=function(endCol){for(;col<endCol;)(segsBelow=_this.getCellSegs(row,col,levelLimit)).length&&(td=cellMatrix[levelLimit-1][col],moreLink=_this.renderMoreLink(row,col,segsBelow),moreWrap=core.createElement("div",null,moreLink),td.appendChild(moreWrap),moreNodes.push(moreWrap)),col++};if(levelLimit&&levelLimit<rowStruct.segLevels.length){for(levelSegs=rowStruct.segLevels[levelLimit-1],cellMatrix=rowStruct.cellMatrix,(limitedNodes=core.findChildren(rowStruct.tbodyEl).slice(levelLimit)).forEach((function(node){node.classList.add("fc-limited")})),i=0;i<levelSegs.length;i++){seg=levelSegs[i];var leftCol=isRtl?colCnt-1-seg.lastCol:seg.firstCol,rightCol=isRtl?colCnt-1-seg.firstCol:seg.lastCol;for(emptyCellsUntil(leftCol),colSegsBelow=[],totalSegsBelow=0;col<=rightCol;)segsBelow=this.getCellSegs(row,col,levelLimit),colSegsBelow.push(segsBelow),totalSegsBelow+=segsBelow.length,col++;if(totalSegsBelow){for(rowSpan=(td=cellMatrix[levelLimit-1][leftCol]).rowSpan||1,segMoreNodes=[],j=0;j<colSegsBelow.length;j++)moreTd=core.createElement("td",{className:"fc-more-cell",rowSpan:rowSpan}),segsBelow=colSegsBelow[j],moreLink=this.renderMoreLink(row,leftCol+j,[seg].concat(segsBelow)),moreWrap=core.createElement("div",null,moreLink),moreTd.appendChild(moreWrap),segMoreNodes.push(moreTd),moreNodes.push(moreTd);td.classList.add("fc-limited"),core.insertAfterElement(td,segMoreNodes),limitedNodes.push(td)}}emptyCellsUntil(this.colCnt),rowStruct.moreEls=moreNodes,rowStruct.limitedEls=limitedNodes}},DayGrid.prototype.unlimitRow=function(row){var rowStruct=this.eventRenderer.rowStructs[row];rowStruct.moreEls&&(rowStruct.moreEls.forEach(core.removeElement),rowStruct.moreEls=null),rowStruct.limitedEls&&(rowStruct.limitedEls.forEach((function(limitedEl){limitedEl.classList.remove("fc-limited")})),rowStruct.limitedEls=null)},DayGrid.prototype.renderMoreLink=function(row,col,hiddenSegs){var _this=this,_a=this.context,calendar=_a.calendar,view=_a.view,dateEnv=_a.dateEnv,options=_a.options,isRtl=_a.isRtl,a=core.createElement("a",{className:"fc-more"});return a.innerText=this.getMoreLinkText(hiddenSegs.length),a.addEventListener("click",(function(ev){var clickOption=options.eventLimitClick,_col=isRtl?_this.colCnt-col-1:col,date=_this.props.cells[row][_col].date,moreEl=ev.currentTarget,dayEl=_this.getCellEl(row,col),allSegs=_this.getCellSegs(row,col),reslicedAllSegs=_this.resliceDaySegs(allSegs,date),reslicedHiddenSegs=_this.resliceDaySegs(hiddenSegs,date);"function"==typeof clickOption&&(clickOption=calendar.publiclyTrigger("eventLimitClick",[{date:dateEnv.toDate(date),allDay:!0,dayEl:dayEl,moreEl:moreEl,segs:reslicedAllSegs,hiddenSegs:reslicedHiddenSegs,jsEvent:ev,view:view}])),"popover"===clickOption?_this.showSegPopover(row,col,moreEl,reslicedAllSegs):"string"==typeof clickOption&&calendar.zoomTo(date,clickOption)})),a},DayGrid.prototype.showSegPopover=function(row,col,moreLink,segs){var _this=this,_a=this.context,calendar=_a.calendar,view=_a.view,theme=_a.theme,isRtl=_a.isRtl,_col=isRtl?this.colCnt-col-1:col,moreWrap=moreLink.parentNode,topEl,options;topEl=1===this.rowCnt?view.el:this.rowEls[row],options={className:"fc-more-popover "+theme.getClass("popover"),parentEl:view.el,top:core.computeRect(topEl).top,autoHide:!0,content:function(el){_this.segPopoverTile=new DayTile(el),_this.updateSegPopoverTile(_this.props.cells[row][_col].date,segs)},hide:function(){_this.segPopoverTile.destroy(),_this.segPopoverTile=null,_this.segPopover.destroy(),_this.segPopover=null}},isRtl?options.right=core.computeRect(moreWrap).right+1:options.left=core.computeRect(moreWrap).left-1,this.segPopover=new Popover(options),this.segPopover.show(),calendar.releaseAfterSizingTriggers()},DayGrid.prototype.resliceDaySegs=function(segs,dayDate){for(var dayStart=dayDate,dayEnd,dayRange={start:dayStart,end:core.addDays(dayStart,1)},newSegs=[],_i=0,segs_1=segs;_i<segs_1.length;_i++){var seg=segs_1[_i],eventRange=seg.eventRange,origRange=eventRange.range,slicedRange=core.intersectRanges(origRange,dayRange);slicedRange&&newSegs.push(__assign({},seg,{eventRange:{def:eventRange.def,ui:__assign({},eventRange.ui,{durationEditable:!1}),instance:eventRange.instance,range:slicedRange},isStart:seg.isStart&&slicedRange.start.valueOf()===origRange.start.valueOf(),isEnd:seg.isEnd&&slicedRange.end.valueOf()===origRange.end.valueOf()}))}return newSegs},DayGrid.prototype.getMoreLinkText=function(num){var opt=this.context.options.eventLimitText;return"function"==typeof opt?opt(num):"+"+num+" "+opt},DayGrid.prototype.getCellSegs=function(row,col,startLevel){for(var segMatrix=this.eventRenderer.rowStructs[row].segMatrix,level=startLevel||0,segs=[],seg;level<segMatrix.length;)(seg=segMatrix[level][col])&&segs.push(seg),level++;return segs},DayGrid}(core.DateComponent),WEEK_NUM_FORMAT$1=core.createFormatter({week:"numeric"}),AbstractDayGridView=function(_super){function AbstractDayGridView(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.processOptions=core.memoize(_this._processOptions),_this.renderSkeleton=core.memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton),_this.renderHeadIntroHtml=function(){var _a=_this.context,theme=_a.theme,options=_a.options;return _this.colWeekNumbersVisible?'<th class="fc-week-number '+theme.getClass("widgetHeader")+'" '+_this.weekNumberStyleAttr()+"><span>"+core.htmlEscape(options.weekLabel)+"</span></th>":""},_this.renderDayGridNumberIntroHtml=function(row,dayGrid){var _a=_this.context,options=_a.options,dateEnv=_a.dateEnv,weekStart=dayGrid.props.cells[row][0].date;return _this.colWeekNumbersVisible?'<td class="fc-week-number" '+_this.weekNumberStyleAttr()+">"+core.buildGotoAnchorHtml(options,dateEnv,{date:weekStart,type:"week",forceOff:1===dayGrid.colCnt},dateEnv.format(weekStart,WEEK_NUM_FORMAT$1))+"</td>":""},_this.renderDayGridBgIntroHtml=function(){var theme=_this.context.theme;return _this.colWeekNumbersVisible?'<td class="fc-week-number '+theme.getClass("widgetContent")+'" '+_this.weekNumberStyleAttr()+"></td>":""},_this.renderDayGridIntroHtml=function(){return _this.colWeekNumbersVisible?'<td class="fc-week-number" '+_this.weekNumberStyleAttr()+"></td>":""},_this}return __extends(AbstractDayGridView,_super),AbstractDayGridView.prototype._processOptions=function(options){options.weekNumbers?options.weekNumbersWithinDays?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0):(this.colWeekNumbersVisible=!1,this.cellWeekNumbersVisible=!1)},AbstractDayGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context),this.processOptions(context.options),this.renderSkeleton(context)},AbstractDayGridView.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender()},AbstractDayGridView.prototype._renderSkeleton=function(context){this.el.classList.add("fc-dayGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new core.ScrollComponent("hidden","auto");var dayGridContainerEl=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(dayGridContainerEl),dayGridContainerEl.classList.add("fc-day-grid-container");var dayGridEl=core.createElement("div",{className:"fc-day-grid"});dayGridContainerEl.appendChild(dayGridEl),this.dayGrid=new DayGrid(dayGridEl,{renderNumberIntroHtml:this.renderDayGridNumberIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:this.colWeekNumbersVisible,cellWeekNumbersVisible:this.cellWeekNumbersVisible})},AbstractDayGridView.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-dayGrid-view"),this.dayGrid.destroy(),this.scroller.destroy()},AbstractDayGridView.prototype.renderSkeletonHtml=function(){var _a=this.context,theme=_a.theme,options=_a.options;return'<table class="'+theme.getClass("tableGrid")+'">'+(options.columnHeader?'<thead class="fc-head"><tr><td class="fc-head-container '+theme.getClass("widgetHeader")+'"> </td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+theme.getClass("widgetContent")+'"></td></tr></tbody></table>'},AbstractDayGridView.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},AbstractDayGridView.prototype.hasRigidRows=function(){var eventLimit=this.context.options.eventLimit;return eventLimit&&"number"!=typeof eventLimit},AbstractDayGridView.prototype.updateSize=function(isResize,viewHeight,isAuto){_super.prototype.updateSize.call(this,isResize,viewHeight,isAuto),this.dayGrid.updateSize(isResize)},AbstractDayGridView.prototype.updateBaseSize=function(isResize,viewHeight,isAuto){var dayGrid=this.dayGrid,eventLimit=this.context.options.eventLimit,headRowEl=this.header?this.header.el:null,scrollerHeight,scrollbarWidths;dayGrid.rowEls?(this.colWeekNumbersVisible&&(this.weekNumberWidth=core.matchCellWidths(core.findElements(this.el,".fc-week-number"))),this.scroller.clear(),headRowEl&&core.uncompensateScroll(headRowEl),dayGrid.removeSegPopover(),eventLimit&&"number"==typeof eventLimit&&dayGrid.limitRows(eventLimit),scrollerHeight=this.computeScrollerHeight(viewHeight),this.setGridHeight(scrollerHeight,isAuto),eventLimit&&"number"!=typeof eventLimit&&dayGrid.limitRows(eventLimit),isAuto||(this.scroller.setHeight(scrollerHeight),((scrollbarWidths=this.scroller.getScrollbarWidths()).left||scrollbarWidths.right)&&(headRowEl&&core.compensateScroll(headRowEl,scrollbarWidths),scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight)),this.scroller.lockOverflow(scrollbarWidths))):isAuto||(scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight))},AbstractDayGridView.prototype.computeScrollerHeight=function(viewHeight){return viewHeight-core.subtractInnerElHeight(this.el,this.scroller.el)},AbstractDayGridView.prototype.setGridHeight=function(height,isAuto){this.context.options.monthMode?(isAuto&&(height*=this.dayGrid.rowCnt/6),core.distributeHeight(this.dayGrid.rowEls,height,!isAuto)):isAuto?core.undistributeHeight(this.dayGrid.rowEls):core.distributeHeight(this.dayGrid.rowEls,height,!0)},AbstractDayGridView.prototype.computeDateScroll=function(duration){return{top:0}},AbstractDayGridView.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},AbstractDayGridView.prototype.applyDateScroll=function(scroll){void 0!==scroll.top&&this.scroller.setScrollTop(scroll.top)},AbstractDayGridView}(core.View);AbstractDayGridView.prototype.dateProfileGeneratorClass=DayGridDateProfileGenerator;var SimpleDayGrid=function(_super){function SimpleDayGrid(dayGrid){var _this=_super.call(this,dayGrid.el)||this;return _this.slicer=new DayGridSlicer,_this.dayGrid=dayGrid,_this}return __extends(SimpleDayGrid,_super),SimpleDayGrid.prototype.firstContext=function(context){context.calendar.registerInteractiveComponent(this,{el:this.dayGrid.el})},SimpleDayGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},SimpleDayGrid.prototype.render=function(props,context){var dayGrid=this.dayGrid,dateProfile=props.dateProfile,dayTable=props.dayTable;dayGrid.receiveContext(context),dayGrid.receiveProps(__assign({},this.slicer.sliceProps(props,dateProfile,props.nextDayThreshold,context.calendar,dayGrid,dayTable),{dateProfile:dateProfile,cells:dayTable.cells,isRigid:props.isRigid}),context)},SimpleDayGrid.prototype.buildPositionCaches=function(){this.dayGrid.buildPositionCaches()},SimpleDayGrid.prototype.queryHit=function(positionLeft,positionTop){var rawHit=this.dayGrid.positionToHit(positionLeft,positionTop);if(rawHit)return{component:this.dayGrid,dateSpan:rawHit.dateSpan,dayEl:rawHit.dayEl,rect:{left:rawHit.relativeRect.left,right:rawHit.relativeRect.right,top:rawHit.relativeRect.top,bottom:rawHit.relativeRect.bottom},layer:0}},SimpleDayGrid}(core.DateComponent),DayGridSlicer=function(_super){function DayGridSlicer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DayGridSlicer,_super),DayGridSlicer.prototype.sliceRange=function(dateRange,dayTable){return dayTable.sliceRange(dateRange)},DayGridSlicer}(core.Slicer),DayGridView=function(_super){function DayGridView(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.buildDayTable=core.memoize(buildDayTable),_this}return __extends(DayGridView,_super),DayGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context);var dateProfile=this.props.dateProfile,dayTable=this.dayTable=this.buildDayTable(dateProfile,props.dateProfileGenerator);this.header&&this.header.receiveProps({dateProfile:dateProfile,dates:dayTable.headerDates,datesRepDistinctDays:1===dayTable.rowCnt,renderIntroHtml:this.renderHeadIntroHtml},context),this.simpleDayGrid.receiveProps({dateProfile:dateProfile,dayTable:dayTable,businessHours:props.businessHours,dateSelection:props.dateSelection,eventStore:props.eventStore,eventUiBases:props.eventUiBases,eventSelection:props.eventSelection,eventDrag:props.eventDrag,eventResize:props.eventResize,isRigid:this.hasRigidRows(),nextDayThreshold:this.context.nextDayThreshold},context)},DayGridView.prototype._renderSkeleton=function(context){_super.prototype._renderSkeleton.call(this,context),context.options.columnHeader&&(this.header=new core.DayHeader(this.el.querySelector(".fc-head-container"))),this.simpleDayGrid=new SimpleDayGrid(this.dayGrid)},DayGridView.prototype._unrenderSkeleton=function(){_super.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleDayGrid.destroy()},DayGridView}(AbstractDayGridView);function buildDayTable(dateProfile,dateProfileGenerator){var daySeries=new core.DaySeries(dateProfile.renderRange,dateProfileGenerator);return new core.DayTable(daySeries,/year|month|week/.test(dateProfile.currentRangeUnit))}var main=core.createPlugin({defaultView:"dayGridMonth",views:{dayGrid:DayGridView,dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});exports.AbstractDayGridView=AbstractDayGridView,exports.DayBgRow=DayBgRow,exports.DayGrid=DayGrid,exports.DayGridSlicer=DayGridSlicer,exports.DayGridView=DayGridView,exports.SimpleDayGrid=SimpleDayGrid,exports.buildBasicDayTable=buildDayTable,exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})),
|
||
/*!
|
||
FullCalendar Google Calendar Plugin v4.4.0
|
||
Docs & License: https://fullcalendar.io/
|
||
(c) 2019 Adam Shaw
|
||
*/
|
||
function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],factory):factory((global=global||self).FullCalendarGoogleCalendar={},global.FullCalendar)}(this,(function(exports,core){"use strict";
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
this file except in compliance with the License. You may obtain a copy of the
|
||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
||
See the Apache Version 2.0 License for specific language governing permissions
|
||
and limitations under the License.
|
||
***************************************************************************** */var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},API_BASE="https://www.googleapis.com/calendar/v3/calendars",STANDARD_PROPS={url:String,googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,data:null},eventSourceDef={parseMeta:function(raw){if("string"==typeof raw&&(raw={url:raw}),"object"==typeof raw){var standardProps=core.refineProps(raw,STANDARD_PROPS);if(!standardProps.googleCalendarId&&standardProps.url&&(standardProps.googleCalendarId=parseGoogleCalendarId(standardProps.url)),delete standardProps.url,standardProps.googleCalendarId)return standardProps}return null},fetch:function(arg,onSuccess,onFailure){var calendar=arg.calendar,meta=arg.eventSource.meta,apiKey=meta.googleCalendarApiKey||calendar.opt("googleCalendarApiKey");if(apiKey){var url=buildUrl(meta),requestParams_1=buildRequestParams(arg.range,apiKey,meta.data,calendar.dateEnv);core.requestJson("GET",url,requestParams_1,(function(body,xhr){body.error?onFailure({message:"Google Calendar API: "+body.error.message,errors:body.error.errors,xhr:xhr}):onSuccess({rawEvents:gcalItemsToRawEventDefs(body.items,requestParams_1.timeZone),xhr:xhr})}),(function(message,xhr){onFailure({message:message,xhr:xhr})}))}else onFailure({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}};function parseGoogleCalendarId(url){var match;return/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)?url:(match=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url))||(match=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))?decodeURIComponent(match[1]):void 0}function buildUrl(meta){var apiBase=meta.googleCalendarApiBase;return apiBase||(apiBase=API_BASE),apiBase+"/"+encodeURIComponent(meta.googleCalendarId)+"/events"}function buildRequestParams(range,apiKey,extraParams,dateEnv){var params,startStr,endStr;return dateEnv.canComputeOffset?(startStr=dateEnv.formatIso(range.start),endStr=dateEnv.formatIso(range.end)):(startStr=core.addDays(range.start,-1).toISOString(),endStr=core.addDays(range.end,1).toISOString()),params=__assign({},extraParams||{},{key:apiKey,timeMin:startStr,timeMax:endStr,singleEvents:!0,maxResults:9999}),"local"!==dateEnv.timeZone&&(params.timeZone=dateEnv.timeZone),params}function gcalItemsToRawEventDefs(items,gcalTimezone){return items.map((function(item){return gcalItemToRawEventDef(item,gcalTimezone)}))}function gcalItemToRawEventDef(item,gcalTimezone){var url=item.htmlLink||null;return url&&gcalTimezone&&(url=injectQsComponent(url,"ctz="+gcalTimezone)),{id:item.id,title:item.summary,start:item.start.dateTime||item.start.date,end:item.end.dateTime||item.end.date,url:url,location:item.location,description:item.description}}function injectQsComponent(url,component){return url.replace(/(\?.*?)?(#|$)/,(function(whole,qs,hash){return(qs?qs+"&":"?")+component+hash}))}var main=core.createPlugin({eventSourceDefs:[eventSourceDef]});exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})),
|
||
/*!
|
||
FullCalendar Interaction Plugin v4.4.0
|
||
Docs & License: https://fullcalendar.io/
|
||
(c) 2019 Adam Shaw
|
||
*/
|
||
function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],factory):factory((global=global||self).FullCalendarInteraction={},global.FullCalendar)}(this,(function(exports,core){"use strict";
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
this file except in compliance with the License. You may obtain a copy of the
|
||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
||
See the Apache Version 2.0 License for specific language governing permissions
|
||
and limitations under the License.
|
||
***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)};core.config.touchMouseIgnoreWait=500;var ignoreMouseDepth=0,listenerCnt=0,isWindowTouchMoveCancelled=!1,PointerDragging=function(){function PointerDragging(containerEl){var _this=this;this.subjectEl=null,this.downEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(ev){if(!_this.shouldIgnoreMouse()&&isPrimaryMouseButton(ev)&&_this.tryStart(ev)){var pev=_this.createEventFromMouse(ev,!0);_this.emitter.trigger("pointerdown",pev),_this.initScrollWatch(pev),_this.shouldIgnoreMove||document.addEventListener("mousemove",_this.handleMouseMove),document.addEventListener("mouseup",_this.handleMouseUp)}},this.handleMouseMove=function(ev){var pev=_this.createEventFromMouse(ev);_this.recordCoords(pev),_this.emitter.trigger("pointermove",pev)},this.handleMouseUp=function(ev){document.removeEventListener("mousemove",_this.handleMouseMove),document.removeEventListener("mouseup",_this.handleMouseUp),_this.emitter.trigger("pointerup",_this.createEventFromMouse(ev)),_this.cleanup()},this.handleTouchStart=function(ev){if(_this.tryStart(ev)){_this.isTouchDragging=!0;var pev=_this.createEventFromTouch(ev,!0);_this.emitter.trigger("pointerdown",pev),_this.initScrollWatch(pev);var target=ev.target;_this.shouldIgnoreMove||target.addEventListener("touchmove",_this.handleTouchMove),target.addEventListener("touchend",_this.handleTouchEnd),target.addEventListener("touchcancel",_this.handleTouchEnd),window.addEventListener("scroll",_this.handleTouchScroll,!0)}},this.handleTouchMove=function(ev){var pev=_this.createEventFromTouch(ev);_this.recordCoords(pev),_this.emitter.trigger("pointermove",pev)},this.handleTouchEnd=function(ev){if(_this.isDragging){var target=ev.target;target.removeEventListener("touchmove",_this.handleTouchMove),target.removeEventListener("touchend",_this.handleTouchEnd),target.removeEventListener("touchcancel",_this.handleTouchEnd),window.removeEventListener("scroll",_this.handleTouchScroll,!0),_this.emitter.trigger("pointerup",_this.createEventFromTouch(ev)),_this.cleanup(),_this.isTouchDragging=!1,startIgnoringMouse()}},this.handleTouchScroll=function(){_this.wasTouchScroll=!0},this.handleScroll=function(ev){if(!_this.shouldIgnoreMove){var pageX=window.pageXOffset-_this.prevScrollX+_this.prevPageX,pageY=window.pageYOffset-_this.prevScrollY+_this.prevPageY;_this.emitter.trigger("pointermove",{origEvent:ev,isTouch:_this.isTouchDragging,subjectEl:_this.subjectEl,pageX:pageX,pageY:pageY,deltaX:pageX-_this.origPageX,deltaY:pageY-_this.origPageY})}},this.containerEl=containerEl,this.emitter=new core.EmitterMixin,containerEl.addEventListener("mousedown",this.handleMouseDown),containerEl.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),listenerCreated()}return PointerDragging.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),listenerDestroyed()},PointerDragging.prototype.tryStart=function(ev){var subjectEl=this.querySubjectEl(ev),downEl=ev.target;return!(!subjectEl||this.handleSelector&&!core.elementClosest(downEl,this.handleSelector))&&(this.subjectEl=subjectEl,this.downEl=downEl,this.isDragging=!0,this.wasTouchScroll=!1,!0)},PointerDragging.prototype.cleanup=function(){isWindowTouchMoveCancelled=!1,this.isDragging=!1,this.subjectEl=null,this.downEl=null,this.destroyScrollWatch()},PointerDragging.prototype.querySubjectEl=function(ev){return this.selector?core.elementClosest(ev.target,this.selector):this.containerEl},PointerDragging.prototype.shouldIgnoreMouse=function(){return ignoreMouseDepth||this.isTouchDragging},PointerDragging.prototype.cancelTouchScroll=function(){this.isDragging&&(isWindowTouchMoveCancelled=!0)},PointerDragging.prototype.initScrollWatch=function(ev){this.shouldWatchScroll&&(this.recordCoords(ev),window.addEventListener("scroll",this.handleScroll,!0))},PointerDragging.prototype.recordCoords=function(ev){this.shouldWatchScroll&&(this.prevPageX=ev.pageX,this.prevPageY=ev.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},PointerDragging.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},PointerDragging.prototype.createEventFromMouse=function(ev,isFirst){var deltaX=0,deltaY=0;return isFirst?(this.origPageX=ev.pageX,this.origPageY=ev.pageY):(deltaX=ev.pageX-this.origPageX,deltaY=ev.pageY-this.origPageY),{origEvent:ev,isTouch:!1,subjectEl:this.subjectEl,pageX:ev.pageX,pageY:ev.pageY,deltaX:deltaX,deltaY:deltaY}},PointerDragging.prototype.createEventFromTouch=function(ev,isFirst){var touches=ev.touches,pageX,pageY,deltaX=0,deltaY=0;return touches&&touches.length?(pageX=touches[0].pageX,pageY=touches[0].pageY):(pageX=ev.pageX,pageY=ev.pageY),isFirst?(this.origPageX=pageX,this.origPageY=pageY):(deltaX=pageX-this.origPageX,deltaY=pageY-this.origPageY),{origEvent:ev,isTouch:!0,subjectEl:this.subjectEl,pageX:pageX,pageY:pageY,deltaX:deltaX,deltaY:deltaY}},PointerDragging}();function isPrimaryMouseButton(ev){return 0===ev.button&&!ev.ctrlKey}function startIgnoringMouse(){ignoreMouseDepth++,setTimeout((function(){ignoreMouseDepth--}),core.config.touchMouseIgnoreWait)}function listenerCreated(){listenerCnt++||window.addEventListener("touchmove",onWindowTouchMove,{passive:!1})}function listenerDestroyed(){--listenerCnt||window.removeEventListener("touchmove",onWindowTouchMove,{passive:!1})}function onWindowTouchMove(ev){isWindowTouchMoveCancelled&&ev.preventDefault()}var ElementMirror=function(){function ElementMirror(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return ElementMirror.prototype.start=function(sourceEl,pageX,pageY){this.sourceEl=sourceEl,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=pageX-window.pageXOffset,this.origScreenY=pageY-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},ElementMirror.prototype.handleMove=function(pageX,pageY){this.deltaX=pageX-window.pageXOffset-this.origScreenX,this.deltaY=pageY-window.pageYOffset-this.origScreenY,this.updateElPosition()},ElementMirror.prototype.setIsVisible=function(bool){bool?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=bool,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=bool)},ElementMirror.prototype.stop=function(needsRevertAnimation,callback){var _this=this,done=function(){_this.cleanup(),callback()};needsRevertAnimation&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(done,this.revertDuration):setTimeout(done,0)},ElementMirror.prototype.doRevertAnimation=function(callback,revertDuration){var mirrorEl=this.mirrorEl,finalSourceElRect=this.sourceEl.getBoundingClientRect();mirrorEl.style.transition="top "+revertDuration+"ms,left "+revertDuration+"ms",core.applyStyle(mirrorEl,{left:finalSourceElRect.left,top:finalSourceElRect.top}),core.whenTransitionDone(mirrorEl,(function(){mirrorEl.style.transition="",callback()}))},ElementMirror.prototype.cleanup=function(){this.mirrorEl&&(core.removeElement(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},ElementMirror.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&core.applyStyle(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},ElementMirror.prototype.getMirrorEl=function(){var sourceElRect=this.sourceElRect,mirrorEl=this.mirrorEl;return mirrorEl||((mirrorEl=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),mirrorEl.classList.add("fc-dragging"),core.applyStyle(mirrorEl,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:sourceElRect.right-sourceElRect.left,height:sourceElRect.bottom-sourceElRect.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(mirrorEl)),mirrorEl},ElementMirror}(),ScrollGeomCache=function(_super){function ScrollGeomCache(scrollController,doesListening){var _this=_super.call(this)||this;return _this.handleScroll=function(){_this.scrollTop=_this.scrollController.getScrollTop(),_this.scrollLeft=_this.scrollController.getScrollLeft(),_this.handleScrollChange()},_this.scrollController=scrollController,_this.doesListening=doesListening,_this.scrollTop=_this.origScrollTop=scrollController.getScrollTop(),_this.scrollLeft=_this.origScrollLeft=scrollController.getScrollLeft(),_this.scrollWidth=scrollController.getScrollWidth(),_this.scrollHeight=scrollController.getScrollHeight(),_this.clientWidth=scrollController.getClientWidth(),_this.clientHeight=scrollController.getClientHeight(),_this.clientRect=_this.computeClientRect(),_this.doesListening&&_this.getEventTarget().addEventListener("scroll",_this.handleScroll),_this}return __extends(ScrollGeomCache,_super),ScrollGeomCache.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},ScrollGeomCache.prototype.getScrollTop=function(){return this.scrollTop},ScrollGeomCache.prototype.getScrollLeft=function(){return this.scrollLeft},ScrollGeomCache.prototype.setScrollTop=function(top){this.scrollController.setScrollTop(top),this.doesListening||(this.scrollTop=Math.max(Math.min(top,this.getMaxScrollTop()),0),this.handleScrollChange())},ScrollGeomCache.prototype.setScrollLeft=function(top){this.scrollController.setScrollLeft(top),this.doesListening||(this.scrollLeft=Math.max(Math.min(top,this.getMaxScrollLeft()),0),this.handleScrollChange())},ScrollGeomCache.prototype.getClientWidth=function(){return this.clientWidth},ScrollGeomCache.prototype.getClientHeight=function(){return this.clientHeight},ScrollGeomCache.prototype.getScrollWidth=function(){return this.scrollWidth},ScrollGeomCache.prototype.getScrollHeight=function(){return this.scrollHeight},ScrollGeomCache.prototype.handleScrollChange=function(){},ScrollGeomCache}(core.ScrollController),ElementScrollGeomCache=function(_super){function ElementScrollGeomCache(el,doesListening){return _super.call(this,new core.ElementScrollController(el),doesListening)||this}return __extends(ElementScrollGeomCache,_super),ElementScrollGeomCache.prototype.getEventTarget=function(){return this.scrollController.el},ElementScrollGeomCache.prototype.computeClientRect=function(){return core.computeInnerRect(this.scrollController.el)},ElementScrollGeomCache}(ScrollGeomCache),WindowScrollGeomCache=function(_super){function WindowScrollGeomCache(doesListening){return _super.call(this,new core.WindowScrollController,doesListening)||this}return __extends(WindowScrollGeomCache,_super),WindowScrollGeomCache.prototype.getEventTarget=function(){return window},WindowScrollGeomCache.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},WindowScrollGeomCache.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},WindowScrollGeomCache}(ScrollGeomCache),getTime="function"==typeof performance?performance.now:Date.now,AutoScroller=function(){function AutoScroller(){var _this=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(_this.isAnimating){var edge=_this.computeBestEdge(_this.pointerScreenX+window.pageXOffset,_this.pointerScreenY+window.pageYOffset);if(edge){var now=getTime();_this.handleSide(edge,(now-_this.msSinceRequest)/1e3),_this.requestAnimation(now)}else _this.isAnimating=!1}}}return AutoScroller.prototype.start=function(pageX,pageY){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(pageX,pageY))},AutoScroller.prototype.handleMove=function(pageX,pageY){if(this.isEnabled){var pointerScreenX=pageX-window.pageXOffset,pointerScreenY=pageY-window.pageYOffset,yDelta=null===this.pointerScreenY?0:pointerScreenY-this.pointerScreenY,xDelta=null===this.pointerScreenX?0:pointerScreenX-this.pointerScreenX;yDelta<0?this.everMovedUp=!0:yDelta>0&&(this.everMovedDown=!0),xDelta<0?this.everMovedLeft=!0:xDelta>0&&(this.everMovedRight=!0),this.pointerScreenX=pointerScreenX,this.pointerScreenY=pointerScreenY,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(getTime()))}},AutoScroller.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var _i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache;_a[_i].destroy()}this.scrollCaches=null}},AutoScroller.prototype.requestAnimation=function(now){this.msSinceRequest=now,requestAnimationFrame(this.animate)},AutoScroller.prototype.handleSide=function(edge,seconds){var scrollCache=edge.scrollCache,edgeThreshold=this.edgeThreshold,invDistance=edgeThreshold-edge.distance,velocity=invDistance*invDistance/(edgeThreshold*edgeThreshold)*this.maxVelocity*seconds,sign=1;switch(edge.name){case"left":sign=-1;case"right":scrollCache.setScrollLeft(scrollCache.getScrollLeft()+velocity*sign);break;case"top":sign=-1;case"bottom":scrollCache.setScrollTop(scrollCache.getScrollTop()+velocity*sign)}},AutoScroller.prototype.computeBestEdge=function(left,top){for(var edgeThreshold=this.edgeThreshold,bestSide=null,_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i],rect=scrollCache.clientRect,leftDist=left-rect.left,rightDist=rect.right-left,topDist=top-rect.top,bottomDist=rect.bottom-top;leftDist>=0&&rightDist>=0&&topDist>=0&&bottomDist>=0&&(topDist<=edgeThreshold&&this.everMovedUp&&scrollCache.canScrollUp()&&(!bestSide||bestSide.distance>topDist)&&(bestSide={scrollCache:scrollCache,name:"top",distance:topDist}),bottomDist<=edgeThreshold&&this.everMovedDown&&scrollCache.canScrollDown()&&(!bestSide||bestSide.distance>bottomDist)&&(bestSide={scrollCache:scrollCache,name:"bottom",distance:bottomDist}),leftDist<=edgeThreshold&&this.everMovedLeft&&scrollCache.canScrollLeft()&&(!bestSide||bestSide.distance>leftDist)&&(bestSide={scrollCache:scrollCache,name:"left",distance:leftDist}),rightDist<=edgeThreshold&&this.everMovedRight&&scrollCache.canScrollRight()&&(!bestSide||bestSide.distance>rightDist)&&(bestSide={scrollCache:scrollCache,name:"right",distance:rightDist}))}return bestSide},AutoScroller.prototype.buildCaches=function(){return this.queryScrollEls().map((function(el){return el===window?new WindowScrollGeomCache(!1):new ElementScrollGeomCache(el,!1)}))},AutoScroller.prototype.queryScrollEls=function(){for(var els=[],_i=0,_a=this.scrollQuery;_i<_a.length;_i++){var query=_a[_i];"object"==typeof query?els.push(query):els.push.apply(els,Array.prototype.slice.call(document.querySelectorAll(query)))}return els},AutoScroller}(),FeaturefulElementDragging=function(_super){function FeaturefulElementDragging(containerEl){var _this=_super.call(this,containerEl)||this;_this.delay=null,_this.minDistance=0,_this.touchScrollAllowed=!0,_this.mirrorNeedsRevert=!1,_this.isInteracting=!1,_this.isDragging=!1,_this.isDelayEnded=!1,_this.isDistanceSurpassed=!1,_this.delayTimeoutId=null,_this.onPointerDown=function(ev){_this.isDragging||(_this.isInteracting=!0,_this.isDelayEnded=!1,_this.isDistanceSurpassed=!1,core.preventSelection(document.body),core.preventContextMenu(document.body),ev.isTouch||ev.origEvent.preventDefault(),_this.emitter.trigger("pointerdown",ev),_this.pointer.shouldIgnoreMove||(_this.mirror.setIsVisible(!1),_this.mirror.start(ev.subjectEl,ev.pageX,ev.pageY),_this.startDelay(ev),_this.minDistance||_this.handleDistanceSurpassed(ev)))},_this.onPointerMove=function(ev){if(_this.isInteracting){if(_this.emitter.trigger("pointermove",ev),!_this.isDistanceSurpassed){var minDistance=_this.minDistance,distanceSq=void 0,deltaX=ev.deltaX,deltaY=ev.deltaY;(distanceSq=deltaX*deltaX+deltaY*deltaY)>=minDistance*minDistance&&_this.handleDistanceSurpassed(ev)}_this.isDragging&&("scroll"!==ev.origEvent.type&&(_this.mirror.handleMove(ev.pageX,ev.pageY),_this.autoScroller.handleMove(ev.pageX,ev.pageY)),_this.emitter.trigger("dragmove",ev))}},_this.onPointerUp=function(ev){_this.isInteracting&&(_this.isInteracting=!1,core.allowSelection(document.body),core.allowContextMenu(document.body),_this.emitter.trigger("pointerup",ev),_this.isDragging&&(_this.autoScroller.stop(),_this.tryStopDrag(ev)),_this.delayTimeoutId&&(clearTimeout(_this.delayTimeoutId),_this.delayTimeoutId=null))};var pointer=_this.pointer=new PointerDragging(containerEl);return pointer.emitter.on("pointerdown",_this.onPointerDown),pointer.emitter.on("pointermove",_this.onPointerMove),pointer.emitter.on("pointerup",_this.onPointerUp),_this.mirror=new ElementMirror,_this.autoScroller=new AutoScroller,_this}return __extends(FeaturefulElementDragging,_super),FeaturefulElementDragging.prototype.destroy=function(){this.pointer.destroy()},FeaturefulElementDragging.prototype.startDelay=function(ev){var _this=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){_this.delayTimeoutId=null,_this.handleDelayEnd(ev)}),this.delay):this.handleDelayEnd(ev)},FeaturefulElementDragging.prototype.handleDelayEnd=function(ev){this.isDelayEnded=!0,this.tryStartDrag(ev)},FeaturefulElementDragging.prototype.handleDistanceSurpassed=function(ev){this.isDistanceSurpassed=!0,this.tryStartDrag(ev)},FeaturefulElementDragging.prototype.tryStartDrag=function(ev){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(ev.pageX,ev.pageY),this.emitter.trigger("dragstart",ev),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},FeaturefulElementDragging.prototype.tryStopDrag=function(ev){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,ev))},FeaturefulElementDragging.prototype.stopDrag=function(ev){this.isDragging=!1,this.emitter.trigger("dragend",ev)},FeaturefulElementDragging.prototype.setIgnoreMove=function(bool){this.pointer.shouldIgnoreMove=bool},FeaturefulElementDragging.prototype.setMirrorIsVisible=function(bool){this.mirror.setIsVisible(bool)},FeaturefulElementDragging.prototype.setMirrorNeedsRevert=function(bool){this.mirrorNeedsRevert=bool},FeaturefulElementDragging.prototype.setAutoScrollEnabled=function(bool){this.autoScroller.isEnabled=bool},FeaturefulElementDragging}(core.ElementDragging),OffsetTracker=function(){function OffsetTracker(el){this.origRect=core.computeRect(el),this.scrollCaches=core.getClippingParents(el).map((function(el){return new ElementScrollGeomCache(el,!0)}))}return OffsetTracker.prototype.destroy=function(){for(var _i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache;_a[_i].destroy()}},OffsetTracker.prototype.computeLeft=function(){for(var left=this.origRect.left,_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i];left+=scrollCache.origScrollLeft-scrollCache.getScrollLeft()}return left},OffsetTracker.prototype.computeTop=function(){for(var top=this.origRect.top,_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i];top+=scrollCache.origScrollTop-scrollCache.getScrollTop()}return top},OffsetTracker.prototype.isWithinClipping=function(pageX,pageY){for(var point={left:pageX,top:pageY},_i=0,_a=this.scrollCaches;_i<_a.length;_i++){var scrollCache=_a[_i];if(!isIgnoredClipping(scrollCache.getEventTarget())&&!core.pointInsideRect(point,scrollCache.clientRect))return!1}return!0},OffsetTracker}();function isIgnoredClipping(node){var tagName=node.tagName;return"HTML"===tagName||"BODY"===tagName}var HitDragging=function(){function HitDragging(dragging,droppableStore){var _this=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(ev){var dragging=_this.dragging;_this.initialHit=null,_this.movingHit=null,_this.finalHit=null,_this.prepareHits(),_this.processFirstCoord(ev),_this.initialHit||!_this.requireInitial?(dragging.setIgnoreMove(!1),_this.emitter.trigger("pointerdown",ev)):dragging.setIgnoreMove(!0)},this.handleDragStart=function(ev){_this.emitter.trigger("dragstart",ev),_this.handleMove(ev,!0)},this.handleDragMove=function(ev){_this.emitter.trigger("dragmove",ev),_this.handleMove(ev)},this.handlePointerUp=function(ev){_this.releaseHits(),_this.emitter.trigger("pointerup",ev)},this.handleDragEnd=function(ev){_this.movingHit&&_this.emitter.trigger("hitupdate",null,!0,ev),_this.finalHit=_this.movingHit,_this.movingHit=null,_this.emitter.trigger("dragend",ev)},this.droppableStore=droppableStore,dragging.emitter.on("pointerdown",this.handlePointerDown),dragging.emitter.on("dragstart",this.handleDragStart),dragging.emitter.on("dragmove",this.handleDragMove),dragging.emitter.on("pointerup",this.handlePointerUp),dragging.emitter.on("dragend",this.handleDragEnd),this.dragging=dragging,this.emitter=new core.EmitterMixin}return HitDragging.prototype.processFirstCoord=function(ev){var origPoint={left:ev.pageX,top:ev.pageY},adjustedPoint=origPoint,subjectEl=ev.subjectEl,subjectRect;subjectEl!==document&&(subjectRect=core.computeRect(subjectEl),adjustedPoint=core.constrainPoint(adjustedPoint,subjectRect));var initialHit=this.initialHit=this.queryHitForOffset(adjustedPoint.left,adjustedPoint.top);if(initialHit){if(this.useSubjectCenter&&subjectRect){var slicedSubjectRect=core.intersectRects(subjectRect,initialHit.rect);slicedSubjectRect&&(adjustedPoint=core.getRectCenter(slicedSubjectRect))}this.coordAdjust=core.diffPoints(adjustedPoint,origPoint)}else this.coordAdjust={left:0,top:0}},HitDragging.prototype.handleMove=function(ev,forceHandle){var hit=this.queryHitForOffset(ev.pageX+this.coordAdjust.left,ev.pageY+this.coordAdjust.top);!forceHandle&&isHitsEqual(this.movingHit,hit)||(this.movingHit=hit,this.emitter.trigger("hitupdate",hit,!1,ev))},HitDragging.prototype.prepareHits=function(){this.offsetTrackers=core.mapHash(this.droppableStore,(function(interactionSettings){return interactionSettings.component.buildPositionCaches(),new OffsetTracker(interactionSettings.el)}))},HitDragging.prototype.releaseHits=function(){var offsetTrackers=this.offsetTrackers;for(var id in offsetTrackers)offsetTrackers[id].destroy();this.offsetTrackers={}},HitDragging.prototype.queryHitForOffset=function(offsetLeft,offsetTop){var _a=this,droppableStore=_a.droppableStore,offsetTrackers=_a.offsetTrackers,bestHit=null;for(var id in droppableStore){var component=droppableStore[id].component,offsetTracker=offsetTrackers[id];if(offsetTracker.isWithinClipping(offsetLeft,offsetTop)){var originLeft=offsetTracker.computeLeft(),originTop=offsetTracker.computeTop(),positionLeft=offsetLeft-originLeft,positionTop=offsetTop-originTop,origRect=offsetTracker.origRect,width=origRect.right-origRect.left,height=origRect.bottom-origRect.top;if(positionLeft>=0&&positionLeft<width&&positionTop>=0&&positionTop<height){var hit=component.queryHit(positionLeft,positionTop,width,height);!hit||component.props.dateProfile&&!core.rangeContainsRange(component.props.dateProfile.activeRange,hit.dateSpan.range)||bestHit&&!(hit.layer>bestHit.layer)||(hit.rect.left+=originLeft,hit.rect.right+=originLeft,hit.rect.top+=originTop,hit.rect.bottom+=originTop,bestHit=hit)}}}return bestHit},HitDragging}();function isHitsEqual(hit0,hit1){return!hit0&&!hit1||Boolean(hit0)===Boolean(hit1)&&core.isDateSpansEqual(hit0.dateSpan,hit1.dateSpan)}var DateClicking=function(_super){function DateClicking(settings){var _this=_super.call(this,settings)||this;_this.handlePointerDown=function(ev){var dragging=_this.dragging;dragging.setIgnoreMove(!_this.component.isValidDateDownEl(dragging.pointer.downEl))},_this.handleDragEnd=function(ev){var component,_a=_this.component.context,calendar=_a.calendar,view=_a.view,pointer;if(!_this.dragging.pointer.wasTouchScroll){var _b=_this.hitDragging,initialHit=_b.initialHit,finalHit=_b.finalHit;initialHit&&finalHit&&isHitsEqual(initialHit,finalHit)&&calendar.triggerDateClick(initialHit.dateSpan,initialHit.dayEl,view,ev.origEvent)}};var component=settings.component;_this.dragging=new FeaturefulElementDragging(component.el),_this.dragging.autoScroller.isEnabled=!1;var hitDragging=_this.hitDragging=new HitDragging(_this.dragging,core.interactionSettingsToStore(settings));return hitDragging.emitter.on("pointerdown",_this.handlePointerDown),hitDragging.emitter.on("dragend",_this.handleDragEnd),_this}return __extends(DateClicking,_super),DateClicking.prototype.destroy=function(){this.dragging.destroy()},DateClicking}(core.Interaction),DateSelecting=function(_super){function DateSelecting(settings){var _this=_super.call(this,settings)||this;_this.dragSelection=null,_this.handlePointerDown=function(ev){var _a=_this,component=_a.component,dragging=_a.dragging,options,canSelect=component.context.options.selectable&&component.isValidDateDownEl(ev.origEvent.target);dragging.setIgnoreMove(!canSelect),dragging.delay=ev.isTouch?getComponentTouchDelay(component):null},_this.handleDragStart=function(ev){_this.component.context.calendar.unselect(ev)},_this.handleHitUpdate=function(hit,isFinal){var calendar=_this.component.context.calendar,dragSelection=null,isInvalid=!1;hit&&((dragSelection=joinHitsIntoSelection(_this.hitDragging.initialHit,hit,calendar.pluginSystem.hooks.dateSelectionTransformers))&&_this.component.isDateSelectionValid(dragSelection)||(isInvalid=!0,dragSelection=null)),dragSelection?calendar.dispatch({type:"SELECT_DATES",selection:dragSelection}):isFinal||calendar.dispatch({type:"UNSELECT_DATES"}),isInvalid?core.disableCursor():core.enableCursor(),isFinal||(_this.dragSelection=dragSelection)},_this.handlePointerUp=function(pev){_this.dragSelection&&(_this.component.context.calendar.triggerDateSelect(_this.dragSelection,pev),_this.dragSelection=null)};var component=settings.component,options=component.context.options,dragging=_this.dragging=new FeaturefulElementDragging(component.el);dragging.touchScrollAllowed=!1,dragging.minDistance=options.selectMinDistance||0,dragging.autoScroller.isEnabled=options.dragScroll;var hitDragging=_this.hitDragging=new HitDragging(_this.dragging,core.interactionSettingsToStore(settings));return hitDragging.emitter.on("pointerdown",_this.handlePointerDown),hitDragging.emitter.on("dragstart",_this.handleDragStart),hitDragging.emitter.on("hitupdate",_this.handleHitUpdate),hitDragging.emitter.on("pointerup",_this.handlePointerUp),_this}return __extends(DateSelecting,_super),DateSelecting.prototype.destroy=function(){this.dragging.destroy()},DateSelecting}(core.Interaction);function getComponentTouchDelay(component){var options=component.context.options,delay=options.selectLongPressDelay;return null==delay&&(delay=options.longPressDelay),delay}function joinHitsIntoSelection(hit0,hit1,dateSelectionTransformers){var dateSpan0=hit0.dateSpan,dateSpan1=hit1.dateSpan,ms=[dateSpan0.range.start,dateSpan0.range.end,dateSpan1.range.start,dateSpan1.range.end];ms.sort(core.compareNumbers);for(var props={},_i=0,dateSelectionTransformers_1=dateSelectionTransformers;_i<dateSelectionTransformers_1.length;_i++){var transformer,res=(0,dateSelectionTransformers_1[_i])(hit0,hit1);if(!1===res)return null;res&&__assign(props,res)}return props.range={start:ms[0],end:ms[3]},props.allDay=dateSpan0.allDay,props}var EventDragging=function(_super){function EventDragging(settings){var _this=_super.call(this,settings)||this;_this.subjectSeg=null,_this.isDragging=!1,_this.eventRange=null,_this.relevantEvents=null,_this.receivingCalendar=null,_this.validMutation=null,_this.mutatedRelevantEvents=null,_this.handlePointerDown=function(ev){var origTarget=ev.origEvent.target,_a=_this,component=_a.component,dragging=_a.dragging,mirror=dragging.mirror,options=component.context.options,initialCalendar=component.context.calendar,subjectSeg=_this.subjectSeg=core.getElSeg(ev.subjectEl),eventRange,eventInstanceId=(_this.eventRange=subjectSeg.eventRange).instance.instanceId;_this.relevantEvents=core.getRelevantEvents(initialCalendar.state.eventStore,eventInstanceId),dragging.minDistance=ev.isTouch?0:options.eventDragMinDistance,dragging.delay=ev.isTouch&&eventInstanceId!==component.props.eventSelection?getComponentTouchDelay$1(component):null,mirror.parentNode=initialCalendar.el,mirror.revertDuration=options.dragRevertDuration;var isValid=component.isValidSegDownEl(origTarget)&&!core.elementClosest(origTarget,".fc-resizer");dragging.setIgnoreMove(!isValid),_this.isDragging=isValid&&ev.subjectEl.classList.contains("fc-draggable")},_this.handleDragStart=function(ev){var context=_this.component.context,initialCalendar=context.calendar,eventRange=_this.eventRange,eventInstanceId=eventRange.instance.instanceId;ev.isTouch?eventInstanceId!==_this.component.props.eventSelection&&initialCalendar.dispatch({type:"SELECT_EVENT",eventInstanceId:eventInstanceId}):initialCalendar.dispatch({type:"UNSELECT_EVENT"}),_this.isDragging&&(initialCalendar.unselect(ev),initialCalendar.publiclyTrigger("eventDragStart",[{el:_this.subjectSeg.el,event:new core.EventApi(initialCalendar,eventRange.def,eventRange.instance),jsEvent:ev.origEvent,view:context.view}]))},_this.handleHitUpdate=function(hit,isFinal){if(_this.isDragging){var relevantEvents=_this.relevantEvents,initialHit=_this.hitDragging.initialHit,initialCalendar=_this.component.context.calendar,receivingCalendar=null,mutation=null,mutatedRelevantEvents=null,isInvalid=!1,interaction={affectedEvents:relevantEvents,mutatedEvents:core.createEmptyEventStore(),isEvent:!0,origSeg:_this.subjectSeg};if(hit){var receivingComponent=hit.component;receivingCalendar=receivingComponent.context.calendar;var receivingOptions=receivingComponent.context.options;initialCalendar===receivingCalendar||receivingOptions.editable&&receivingOptions.droppable?(mutation=computeEventMutation(initialHit,hit,receivingCalendar.pluginSystem.hooks.eventDragMutationMassagers))&&(mutatedRelevantEvents=core.applyMutationToEventStore(relevantEvents,receivingCalendar.eventUiBases,mutation,receivingCalendar),interaction.mutatedEvents=mutatedRelevantEvents,receivingComponent.isInteractionValid(interaction)||(isInvalid=!0,mutation=null,mutatedRelevantEvents=null,interaction.mutatedEvents=core.createEmptyEventStore())):receivingCalendar=null}_this.displayDrag(receivingCalendar,interaction),isInvalid?core.disableCursor():core.enableCursor(),isFinal||(initialCalendar===receivingCalendar&&isHitsEqual(initialHit,hit)&&(mutation=null),_this.dragging.setMirrorNeedsRevert(!mutation),_this.dragging.setMirrorIsVisible(!hit||!document.querySelector(".fc-mirror")),_this.receivingCalendar=receivingCalendar,_this.validMutation=mutation,_this.mutatedRelevantEvents=mutatedRelevantEvents)}},_this.handlePointerUp=function(){_this.isDragging||_this.cleanup()},_this.handleDragEnd=function(ev){if(_this.isDragging){var context=_this.component.context,initialCalendar_1=context.calendar,initialView=context.view,_a=_this,receivingCalendar=_a.receivingCalendar,validMutation=_a.validMutation,eventDef=_this.eventRange.def,eventInstance=_this.eventRange.instance,eventApi=new core.EventApi(initialCalendar_1,eventDef,eventInstance),relevantEvents_1=_this.relevantEvents,mutatedRelevantEvents=_this.mutatedRelevantEvents,finalHit=_this.hitDragging.finalHit;if(_this.clearDrag(),initialCalendar_1.publiclyTrigger("eventDragStop",[{el:_this.subjectSeg.el,event:eventApi,jsEvent:ev.origEvent,view:initialView}]),validMutation){if(receivingCalendar===initialCalendar_1){initialCalendar_1.dispatch({type:"MERGE_EVENTS",eventStore:mutatedRelevantEvents});for(var transformed={},_i=0,_b=initialCalendar_1.pluginSystem.hooks.eventDropTransformers;_i<_b.length;_i++){var transformer=_b[_i];__assign(transformed,transformer(validMutation,initialCalendar_1))}var eventDropArg=__assign({},transformed,{el:ev.subjectEl,delta:validMutation.datesDelta,oldEvent:eventApi,event:new core.EventApi(initialCalendar_1,mutatedRelevantEvents.defs[eventDef.defId],eventInstance?mutatedRelevantEvents.instances[eventInstance.instanceId]:null),revert:function(){initialCalendar_1.dispatch({type:"MERGE_EVENTS",eventStore:relevantEvents_1})},jsEvent:ev.origEvent,view:initialView});initialCalendar_1.publiclyTrigger("eventDrop",[eventDropArg])}else if(receivingCalendar){initialCalendar_1.publiclyTrigger("eventLeave",[{draggedEl:ev.subjectEl,event:eventApi,view:initialView}]),initialCalendar_1.dispatch({type:"REMOVE_EVENT_INSTANCES",instances:_this.mutatedRelevantEvents.instances}),receivingCalendar.dispatch({type:"MERGE_EVENTS",eventStore:_this.mutatedRelevantEvents}),ev.isTouch&&receivingCalendar.dispatch({type:"SELECT_EVENT",eventInstanceId:eventInstance.instanceId});var dropArg=__assign({},receivingCalendar.buildDatePointApi(finalHit.dateSpan),{draggedEl:ev.subjectEl,jsEvent:ev.origEvent,view:finalHit.component});receivingCalendar.publiclyTrigger("drop",[dropArg]),receivingCalendar.publiclyTrigger("eventReceive",[{draggedEl:ev.subjectEl,event:new core.EventApi(receivingCalendar,mutatedRelevantEvents.defs[eventDef.defId],mutatedRelevantEvents.instances[eventInstance.instanceId]),view:finalHit.component}])}}else initialCalendar_1.publiclyTrigger("_noEventDrop")}_this.cleanup()};var component=_this.component,options=component.context.options,dragging=_this.dragging=new FeaturefulElementDragging(component.el);dragging.pointer.selector=EventDragging.SELECTOR,dragging.touchScrollAllowed=!1,dragging.autoScroller.isEnabled=options.dragScroll;var hitDragging=_this.hitDragging=new HitDragging(_this.dragging,core.interactionSettingsStore);return hitDragging.useSubjectCenter=settings.useEventCenter,hitDragging.emitter.on("pointerdown",_this.handlePointerDown),hitDragging.emitter.on("dragstart",_this.handleDragStart),hitDragging.emitter.on("hitupdate",_this.handleHitUpdate),hitDragging.emitter.on("pointerup",_this.handlePointerUp),hitDragging.emitter.on("dragend",_this.handleDragEnd),_this}return __extends(EventDragging,_super),EventDragging.prototype.destroy=function(){this.dragging.destroy()},EventDragging.prototype.displayDrag=function(nextCalendar,state){var initialCalendar=this.component.context.calendar,prevCalendar=this.receivingCalendar;prevCalendar&&prevCalendar!==nextCalendar&&(prevCalendar===initialCalendar?prevCalendar.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:state.affectedEvents,mutatedEvents:core.createEmptyEventStore(),isEvent:!0,origSeg:state.origSeg}}):prevCalendar.dispatch({type:"UNSET_EVENT_DRAG"})),nextCalendar&&nextCalendar.dispatch({type:"SET_EVENT_DRAG",state:state})},EventDragging.prototype.clearDrag=function(){var initialCalendar=this.component.context.calendar,receivingCalendar=this.receivingCalendar;receivingCalendar&&receivingCalendar.dispatch({type:"UNSET_EVENT_DRAG"}),initialCalendar!==receivingCalendar&&initialCalendar.dispatch({type:"UNSET_EVENT_DRAG"})},EventDragging.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingCalendar=null,this.validMutation=null,this.mutatedRelevantEvents=null},EventDragging.SELECTOR=".fc-draggable, .fc-resizable",EventDragging}(core.Interaction);function computeEventMutation(hit0,hit1,massagers){var dateSpan0=hit0.dateSpan,dateSpan1=hit1.dateSpan,date0=dateSpan0.range.start,date1=dateSpan1.range.start,standardProps={};dateSpan0.allDay!==dateSpan1.allDay&&(standardProps.allDay=dateSpan1.allDay,standardProps.hasEnd=hit1.component.context.options.allDayMaintainDuration,dateSpan1.allDay&&(date0=core.startOfDay(date0)));var delta=core.diffDates(date0,date1,hit0.component.context.dateEnv,hit0.component===hit1.component?hit0.component.largeUnit:null);delta.milliseconds&&(standardProps.allDay=!1);for(var mutation={datesDelta:delta,standardProps:standardProps},_i=0,massagers_1=massagers;_i<massagers_1.length;_i++){var massager;(0,massagers_1[_i])(mutation,hit0,hit1)}return mutation}function getComponentTouchDelay$1(component){var options=component.context.options,delay=options.eventLongPressDelay;return null==delay&&(delay=options.longPressDelay),delay}var EventDragging$1=function(_super){function EventDragging(settings){var _this=_super.call(this,settings)||this;_this.draggingSeg=null,_this.eventRange=null,_this.relevantEvents=null,_this.validMutation=null,_this.mutatedRelevantEvents=null,_this.handlePointerDown=function(ev){var component=_this.component,seg=_this.querySeg(ev),eventRange=_this.eventRange=seg.eventRange;_this.dragging.minDistance=component.context.options.eventDragMinDistance,_this.dragging.setIgnoreMove(!_this.component.isValidSegDownEl(ev.origEvent.target)||ev.isTouch&&_this.component.props.eventSelection!==eventRange.instance.instanceId)},_this.handleDragStart=function(ev){var _a=_this.component.context,calendar=_a.calendar,view=_a.view,eventRange=_this.eventRange;_this.relevantEvents=core.getRelevantEvents(calendar.state.eventStore,_this.eventRange.instance.instanceId),_this.draggingSeg=_this.querySeg(ev),calendar.unselect(),calendar.publiclyTrigger("eventResizeStart",[{el:_this.draggingSeg.el,event:new core.EventApi(calendar,eventRange.def,eventRange.instance),jsEvent:ev.origEvent,view:view}])},_this.handleHitUpdate=function(hit,isFinal,ev){var calendar=_this.component.context.calendar,relevantEvents=_this.relevantEvents,initialHit=_this.hitDragging.initialHit,eventInstance=_this.eventRange.instance,mutation=null,mutatedRelevantEvents=null,isInvalid=!1,interaction={affectedEvents:relevantEvents,mutatedEvents:core.createEmptyEventStore(),isEvent:!0,origSeg:_this.draggingSeg};hit&&(mutation=computeMutation(initialHit,hit,ev.subjectEl.classList.contains("fc-start-resizer"),eventInstance.range,calendar.pluginSystem.hooks.eventResizeJoinTransforms)),mutation&&(mutatedRelevantEvents=core.applyMutationToEventStore(relevantEvents,calendar.eventUiBases,mutation,calendar),interaction.mutatedEvents=mutatedRelevantEvents,_this.component.isInteractionValid(interaction)||(isInvalid=!0,mutation=null,mutatedRelevantEvents=null,interaction.mutatedEvents=null)),mutatedRelevantEvents?calendar.dispatch({type:"SET_EVENT_RESIZE",state:interaction}):calendar.dispatch({type:"UNSET_EVENT_RESIZE"}),isInvalid?core.disableCursor():core.enableCursor(),isFinal||(mutation&&isHitsEqual(initialHit,hit)&&(mutation=null),_this.validMutation=mutation,_this.mutatedRelevantEvents=mutatedRelevantEvents)},_this.handleDragEnd=function(ev){var _a=_this.component.context,calendar=_a.calendar,view=_a.view,eventDef=_this.eventRange.def,eventInstance=_this.eventRange.instance,eventApi=new core.EventApi(calendar,eventDef,eventInstance),relevantEvents=_this.relevantEvents,mutatedRelevantEvents=_this.mutatedRelevantEvents;calendar.publiclyTrigger("eventResizeStop",[{el:_this.draggingSeg.el,event:eventApi,jsEvent:ev.origEvent,view:view}]),_this.validMutation?(calendar.dispatch({type:"MERGE_EVENTS",eventStore:mutatedRelevantEvents}),calendar.publiclyTrigger("eventResize",[{el:_this.draggingSeg.el,startDelta:_this.validMutation.startDelta||core.createDuration(0),endDelta:_this.validMutation.endDelta||core.createDuration(0),prevEvent:eventApi,event:new core.EventApi(calendar,mutatedRelevantEvents.defs[eventDef.defId],eventInstance?mutatedRelevantEvents.instances[eventInstance.instanceId]:null),revert:function(){calendar.dispatch({type:"MERGE_EVENTS",eventStore:relevantEvents})},jsEvent:ev.origEvent,view:view}])):calendar.publiclyTrigger("_noEventResize"),_this.draggingSeg=null,_this.relevantEvents=null,_this.validMutation=null};var component=settings.component,dragging=_this.dragging=new FeaturefulElementDragging(component.el);dragging.pointer.selector=".fc-resizer",dragging.touchScrollAllowed=!1,dragging.autoScroller.isEnabled=component.context.options.dragScroll;var hitDragging=_this.hitDragging=new HitDragging(_this.dragging,core.interactionSettingsToStore(settings));return hitDragging.emitter.on("pointerdown",_this.handlePointerDown),hitDragging.emitter.on("dragstart",_this.handleDragStart),hitDragging.emitter.on("hitupdate",_this.handleHitUpdate),hitDragging.emitter.on("dragend",_this.handleDragEnd),_this}return __extends(EventDragging,_super),EventDragging.prototype.destroy=function(){this.dragging.destroy()},EventDragging.prototype.querySeg=function(ev){return core.getElSeg(core.elementClosest(ev.subjectEl,this.component.fgSegSelector))},EventDragging}(core.Interaction);function computeMutation(hit0,hit1,isFromStart,instanceRange,transforms){for(var dateEnv=hit0.component.context.dateEnv,date0=hit0.dateSpan.range.start,date1=hit1.dateSpan.range.start,delta=core.diffDates(date0,date1,dateEnv,hit0.component.largeUnit),props={},_i=0,transforms_1=transforms;_i<transforms_1.length;_i++){var transform,res=(0,transforms_1[_i])(hit0,hit1);if(!1===res)return null;res&&__assign(props,res)}if(isFromStart){if(dateEnv.add(instanceRange.start,delta)<instanceRange.end)return props.startDelta=delta,props}else if(dateEnv.add(instanceRange.end,delta)>instanceRange.start)return props.endDelta=delta,props;return null}var UnselectAuto=function(){function UnselectAuto(calendar){var _this=this;this.isRecentPointerDateSelect=!1,this.onSelect=function(selectInfo){selectInfo.jsEvent&&(_this.isRecentPointerDateSelect=!0)},this.onDocumentPointerUp=function(pev){var _a=_this,calendar=_a.calendar,documentPointer=_a.documentPointer,state=calendar.state;if(!documentPointer.wasTouchScroll){if(state.dateSelection&&!_this.isRecentPointerDateSelect){var unselectAuto=calendar.viewOpt("unselectAuto"),unselectCancel=calendar.viewOpt("unselectCancel");!unselectAuto||unselectAuto&&core.elementClosest(documentPointer.downEl,unselectCancel)||calendar.unselect(pev)}state.eventSelection&&!core.elementClosest(documentPointer.downEl,EventDragging.SELECTOR)&&calendar.dispatch({type:"UNSELECT_EVENT"})}_this.isRecentPointerDateSelect=!1},this.calendar=calendar;var documentPointer=this.documentPointer=new PointerDragging(document);documentPointer.shouldIgnoreMove=!0,documentPointer.shouldWatchScroll=!1,documentPointer.emitter.on("pointerup",this.onDocumentPointerUp),calendar.on("select",this.onSelect)}return UnselectAuto.prototype.destroy=function(){this.calendar.off("select",this.onSelect),this.documentPointer.destroy()},UnselectAuto}(),ExternalElementDragging=function(){function ExternalElementDragging(dragging,suppliedDragMeta){var _this=this;this.receivingCalendar=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(ev){_this.dragMeta=_this.buildDragMeta(ev.subjectEl)},this.handleHitUpdate=function(hit,isFinal,ev){var dragging=_this.hitDragging.dragging,receivingCalendar=null,droppableEvent=null,isInvalid=!1,interaction={affectedEvents:core.createEmptyEventStore(),mutatedEvents:core.createEmptyEventStore(),isEvent:_this.dragMeta.create,origSeg:null};hit&&(receivingCalendar=hit.component.context.calendar,_this.canDropElOnCalendar(ev.subjectEl,receivingCalendar)&&(droppableEvent=computeEventForDateSpan(hit.dateSpan,_this.dragMeta,receivingCalendar),interaction.mutatedEvents=core.eventTupleToStore(droppableEvent),(isInvalid=!core.isInteractionValid(interaction,receivingCalendar))&&(interaction.mutatedEvents=core.createEmptyEventStore(),droppableEvent=null))),_this.displayDrag(receivingCalendar,interaction),dragging.setMirrorIsVisible(isFinal||!droppableEvent||!document.querySelector(".fc-mirror")),isInvalid?core.disableCursor():core.enableCursor(),isFinal||(dragging.setMirrorNeedsRevert(!droppableEvent),_this.receivingCalendar=receivingCalendar,_this.droppableEvent=droppableEvent)},this.handleDragEnd=function(pev){var _a=_this,receivingCalendar=_a.receivingCalendar,droppableEvent=_a.droppableEvent;if(_this.clearDrag(),receivingCalendar&&droppableEvent){var finalHit=_this.hitDragging.finalHit,finalView=finalHit.component.context.view,dragMeta=_this.dragMeta,arg=__assign({},receivingCalendar.buildDatePointApi(finalHit.dateSpan),{draggedEl:pev.subjectEl,jsEvent:pev.origEvent,view:finalView});receivingCalendar.publiclyTrigger("drop",[arg]),dragMeta.create&&(receivingCalendar.dispatch({type:"MERGE_EVENTS",eventStore:core.eventTupleToStore(droppableEvent)}),pev.isTouch&&receivingCalendar.dispatch({type:"SELECT_EVENT",eventInstanceId:droppableEvent.instance.instanceId}),receivingCalendar.publiclyTrigger("eventReceive",[{draggedEl:pev.subjectEl,event:new core.EventApi(receivingCalendar,droppableEvent.def,droppableEvent.instance),view:finalView}]))}_this.receivingCalendar=null,_this.droppableEvent=null};var hitDragging=this.hitDragging=new HitDragging(dragging,core.interactionSettingsStore);hitDragging.requireInitial=!1,hitDragging.emitter.on("dragstart",this.handleDragStart),hitDragging.emitter.on("hitupdate",this.handleHitUpdate),hitDragging.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=suppliedDragMeta}return ExternalElementDragging.prototype.buildDragMeta=function(subjectEl){return"object"==typeof this.suppliedDragMeta?core.parseDragMeta(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?core.parseDragMeta(this.suppliedDragMeta(subjectEl)):getDragMetaFromEl(subjectEl)},ExternalElementDragging.prototype.displayDrag=function(nextCalendar,state){var prevCalendar=this.receivingCalendar;prevCalendar&&prevCalendar!==nextCalendar&&prevCalendar.dispatch({type:"UNSET_EVENT_DRAG"}),nextCalendar&&nextCalendar.dispatch({type:"SET_EVENT_DRAG",state:state})},ExternalElementDragging.prototype.clearDrag=function(){this.receivingCalendar&&this.receivingCalendar.dispatch({type:"UNSET_EVENT_DRAG"})},ExternalElementDragging.prototype.canDropElOnCalendar=function(el,receivingCalendar){var dropAccept=receivingCalendar.opt("dropAccept");return"function"==typeof dropAccept?dropAccept(el):"string"!=typeof dropAccept||!dropAccept||Boolean(core.elementMatches(el,dropAccept))},ExternalElementDragging}();function computeEventForDateSpan(dateSpan,dragMeta,calendar){for(var defProps=__assign({},dragMeta.leftoverProps),_i=0,_a=calendar.pluginSystem.hooks.externalDefTransforms;_i<_a.length;_i++){var transform=_a[_i];__assign(defProps,transform(dateSpan,dragMeta))}var def=core.parseEventDef(defProps,dragMeta.sourceId,dateSpan.allDay,calendar.opt("forceEventDuration")||Boolean(dragMeta.duration),calendar),start=dateSpan.range.start;dateSpan.allDay&&dragMeta.startTime&&(start=calendar.dateEnv.add(start,dragMeta.startTime));var end=dragMeta.duration?calendar.dateEnv.add(start,dragMeta.duration):calendar.getDefaultEventEnd(dateSpan.allDay,start),instance;return{def:def,instance:core.createEventInstance(def.defId,{start:start,end:end})}}function getDragMetaFromEl(el){var str=getEmbeddedElData(el,"event"),obj=str?JSON.parse(str):{create:!1};return core.parseDragMeta(obj)}function getEmbeddedElData(el,name){var prefix=core.config.dataAttrPrefix,prefixedName=(prefix?prefix+"-":"")+name;return el.getAttribute("data-"+prefixedName)||""}core.config.dataAttrPrefix="";var ExternalDraggable=function(){function ExternalDraggable(el,settings){var _this=this;void 0===settings&&(settings={}),this.handlePointerDown=function(ev){var dragging=_this.dragging,_a=_this.settings,minDistance=_a.minDistance,longPressDelay=_a.longPressDelay;dragging.minDistance=null!=minDistance?minDistance:ev.isTouch?0:core.globalDefaults.eventDragMinDistance,dragging.delay=ev.isTouch?null!=longPressDelay?longPressDelay:core.globalDefaults.longPressDelay:0},this.handleDragStart=function(ev){ev.isTouch&&_this.dragging.delay&&ev.subjectEl.classList.contains("fc-event")&&_this.dragging.mirror.getMirrorEl().classList.add("fc-selected")},this.settings=settings;var dragging=this.dragging=new FeaturefulElementDragging(el);dragging.touchScrollAllowed=!1,null!=settings.itemSelector&&(dragging.pointer.selector=settings.itemSelector),null!=settings.appendTo&&(dragging.mirror.parentNode=settings.appendTo),dragging.emitter.on("pointerdown",this.handlePointerDown),dragging.emitter.on("dragstart",this.handleDragStart),new ExternalElementDragging(dragging,settings.eventData)}return ExternalDraggable.prototype.destroy=function(){this.dragging.destroy()},ExternalDraggable}(),InferredElementDragging=function(_super){function InferredElementDragging(containerEl){var _this=_super.call(this,containerEl)||this;_this.shouldIgnoreMove=!1,_this.mirrorSelector="",_this.currentMirrorEl=null,_this.handlePointerDown=function(ev){_this.emitter.trigger("pointerdown",ev),_this.shouldIgnoreMove||_this.emitter.trigger("dragstart",ev)},_this.handlePointerMove=function(ev){_this.shouldIgnoreMove||_this.emitter.trigger("dragmove",ev)},_this.handlePointerUp=function(ev){_this.emitter.trigger("pointerup",ev),_this.shouldIgnoreMove||_this.emitter.trigger("dragend",ev)};var pointer=_this.pointer=new PointerDragging(containerEl);return pointer.emitter.on("pointerdown",_this.handlePointerDown),pointer.emitter.on("pointermove",_this.handlePointerMove),pointer.emitter.on("pointerup",_this.handlePointerUp),_this}return __extends(InferredElementDragging,_super),InferredElementDragging.prototype.destroy=function(){this.pointer.destroy()},InferredElementDragging.prototype.setIgnoreMove=function(bool){this.shouldIgnoreMove=bool},InferredElementDragging.prototype.setMirrorIsVisible=function(bool){if(bool)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var mirrorEl=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;mirrorEl&&(this.currentMirrorEl=mirrorEl,mirrorEl.style.visibility="hidden")}},InferredElementDragging}(core.ElementDragging),ThirdPartyDraggable=function(){function ThirdPartyDraggable(containerOrSettings,settings){var containerEl=document;containerOrSettings===document||containerOrSettings instanceof Element?(containerEl=containerOrSettings,settings=settings||{}):settings=containerOrSettings||{};var dragging=this.dragging=new InferredElementDragging(containerEl);"string"==typeof settings.itemSelector?dragging.pointer.selector=settings.itemSelector:containerEl===document&&(dragging.pointer.selector="[data-event]"),"string"==typeof settings.mirrorSelector&&(dragging.mirrorSelector=settings.mirrorSelector),new ExternalElementDragging(dragging,settings.eventData)}return ThirdPartyDraggable.prototype.destroy=function(){this.dragging.destroy()},ThirdPartyDraggable}(),main=core.createPlugin({componentInteractions:[DateClicking,DateSelecting,EventDragging,EventDragging$1],calendarInteractions:[UnselectAuto],elementDraggingImpl:FeaturefulElementDragging});exports.Draggable=ExternalDraggable,exports.FeaturefulElementDragging=FeaturefulElementDragging,exports.PointerDragging=PointerDragging,exports.ThirdPartyDraggable=ThirdPartyDraggable,exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})),
|
||
/*!
|
||
FullCalendar List View Plugin v4.4.0
|
||
Docs & License: https://fullcalendar.io/
|
||
(c) 2019 Adam Shaw
|
||
*/
|
||
function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],factory):factory((global=global||self).FullCalendarList={},global.FullCalendar)}(this,(function(exports,core){"use strict";
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
this file except in compliance with the License. You may obtain a copy of the
|
||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
||
See the Apache Version 2.0 License for specific language governing permissions
|
||
and limitations under the License.
|
||
***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var ListEventRenderer=function(_super){function ListEventRenderer(listView){var _this=_super.call(this)||this;return _this.listView=listView,_this}return __extends(ListEventRenderer,_super),ListEventRenderer.prototype.attachSegs=function(segs){segs.length?this.listView.renderSegList(segs):this.listView.renderEmptyMessage()},ListEventRenderer.prototype.detachSegs=function(){},ListEventRenderer.prototype.renderSegHtml=function(seg){var _a=this.context,theme=_a.theme,options=_a.options,eventRange=seg.eventRange,eventDef=eventRange.def,eventInstance=eventRange.instance,eventUi=eventRange.ui,url=eventDef.url,classes=["fc-list-item"].concat(eventUi.classNames),bgColor=eventUi.backgroundColor,timeHtml;return timeHtml=eventDef.allDay?core.getAllDayHtml(options):core.isMultiDayRange(eventRange.range)?seg.isStart?core.htmlEscape(this._getTimeText(eventInstance.range.start,seg.end,!1)):seg.isEnd?core.htmlEscape(this._getTimeText(seg.start,eventInstance.range.end,!1)):core.getAllDayHtml(options):core.htmlEscape(this.getTimeText(eventRange)),url&&classes.push("fc-has-url"),'<tr class="'+classes.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+theme.getClass("widgetContent")+'">'+(timeHtml||"")+"</td>":"")+'<td class="fc-list-item-marker '+theme.getClass("widgetContent")+'"><span class="fc-event-dot"'+(bgColor?' style="background-color:'+bgColor+'"':"")+'></span></td><td class="fc-list-item-title '+theme.getClass("widgetContent")+'"><a'+(url?' href="'+core.htmlEscape(url)+'"':"")+">"+core.htmlEscape(eventDef.title||"")+"</a></td></tr>"},ListEventRenderer.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},ListEventRenderer}(core.FgEventRenderer),ListView=function(_super){function ListView(viewSpec,parentEl){var _this=_super.call(this,viewSpec,parentEl)||this;_this.computeDateVars=core.memoize(computeDateVars),_this.eventStoreToSegs=core.memoize(_this._eventStoreToSegs),_this.renderSkeleton=core.memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton);var eventRenderer=_this.eventRenderer=new ListEventRenderer(_this);return _this.renderContent=core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer),eventRenderer.unrender.bind(eventRenderer),[_this.renderSkeleton]),_this}return __extends(ListView,_super),ListView.prototype.firstContext=function(context){context.calendar.registerInteractiveComponent(this,{el:this.el})},ListView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context);var _a=this.computeDateVars(props.dateProfile),dayDates=_a.dayDates,dayRanges=_a.dayRanges;this.dayDates=dayDates,this.renderSkeleton(context),this.renderContent(context,this.eventStoreToSegs(props.eventStore,props.eventUiBases,dayRanges))},ListView.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender(),this.renderContent.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},ListView.prototype._renderSkeleton=function(context){var theme=context.theme;this.el.classList.add("fc-list-view");for(var listViewClassNames,_i=0,listViewClassNames_1=(theme.getClass("listView")||"").split(" ");_i<listViewClassNames_1.length;_i++){var listViewClassName=listViewClassNames_1[_i];listViewClassName&&this.el.classList.add(listViewClassName)}this.scroller=new core.ScrollComponent("hidden","auto"),this.el.appendChild(this.scroller.el),this.contentEl=this.scroller.el},ListView.prototype._unrenderSkeleton=function(){this.scroller.destroy()},ListView.prototype.updateSize=function(isResize,viewHeight,isAuto){_super.prototype.updateSize.call(this,isResize,viewHeight,isAuto),this.eventRenderer.computeSizes(isResize),this.eventRenderer.assignSizes(isResize),this.scroller.clear(),isAuto||this.scroller.setHeight(this.computeScrollerHeight(viewHeight))},ListView.prototype.computeScrollerHeight=function(viewHeight){return viewHeight-core.subtractInnerElHeight(this.el,this.scroller.el)},ListView.prototype._eventStoreToSegs=function(eventStore,eventUiBases,dayRanges){return this.eventRangesToSegs(core.sliceEventStore(eventStore,eventUiBases,this.props.dateProfile.activeRange,this.context.nextDayThreshold).fg,dayRanges)},ListView.prototype.eventRangesToSegs=function(eventRanges,dayRanges){for(var segs=[],_i=0,eventRanges_1=eventRanges;_i<eventRanges_1.length;_i++){var eventRange=eventRanges_1[_i];segs.push.apply(segs,this.eventRangeToSegs(eventRange,dayRanges))}return segs},ListView.prototype.eventRangeToSegs=function(eventRange,dayRanges){var _a=this.context,dateEnv=_a.dateEnv,nextDayThreshold=_a.nextDayThreshold,range=eventRange.range,allDay=eventRange.def.allDay,dayIndex,segRange,seg,segs=[];for(dayIndex=0;dayIndex<dayRanges.length;dayIndex++)if((segRange=core.intersectRanges(range,dayRanges[dayIndex]))&&(seg={component:this,eventRange:eventRange,start:segRange.start,end:segRange.end,isStart:eventRange.isStart&&segRange.start.valueOf()===range.start.valueOf(),isEnd:eventRange.isEnd&&segRange.end.valueOf()===range.end.valueOf(),dayIndex:dayIndex},segs.push(seg),!seg.isEnd&&!allDay&&dayIndex+1<dayRanges.length&&range.end<dateEnv.add(dayRanges[dayIndex+1].start,nextDayThreshold))){seg.end=range.end,seg.isEnd=!0;break}return segs},ListView.prototype.renderEmptyMessage=function(){this.contentEl.innerHTML='<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+core.htmlEscape(this.context.options.noEventsMessage)+"</div></div></div>"},ListView.prototype.renderSegList=function(allSegs){var theme=this.context.theme,segsByDay=this.groupSegsByDay(allSegs),dayIndex,daySegs,i,tableEl=core.htmlToElement('<table class="fc-list-table '+theme.getClass("tableList")+'"><tbody></tbody></table>'),tbodyEl=tableEl.querySelector("tbody");for(dayIndex=0;dayIndex<segsByDay.length;dayIndex++)if(daySegs=segsByDay[dayIndex])for(tbodyEl.appendChild(this.buildDayHeaderRow(this.dayDates[dayIndex])),daySegs=this.eventRenderer.sortEventSegs(daySegs),i=0;i<daySegs.length;i++)tbodyEl.appendChild(daySegs[i].el);this.contentEl.innerHTML="",this.contentEl.appendChild(tableEl)},ListView.prototype.groupSegsByDay=function(segs){var segsByDay=[],i,seg;for(i=0;i<segs.length;i++)(segsByDay[(seg=segs[i]).dayIndex]||(segsByDay[seg.dayIndex]=[])).push(seg);return segsByDay},ListView.prototype.buildDayHeaderRow=function(dayDate){var _a=this.context,theme=_a.theme,dateEnv=_a.dateEnv,options=_a.options,mainFormat=core.createFormatter(options.listDayFormat),altFormat=core.createFormatter(options.listDayAltFormat);return core.createElement("tr",{className:"fc-list-heading","data-date":dateEnv.formatIso(dayDate,{omitTime:!0})},'<td class="'+(theme.getClass("tableListHeading")||theme.getClass("widgetHeader"))+'" colspan="3">'+(mainFormat?core.buildGotoAnchorHtml(options,dateEnv,dayDate,{class:"fc-list-heading-main"},core.htmlEscape(dateEnv.format(dayDate,mainFormat))):"")+(altFormat?core.buildGotoAnchorHtml(options,dateEnv,dayDate,{class:"fc-list-heading-alt"},core.htmlEscape(dateEnv.format(dayDate,altFormat))):"")+"</td>")},ListView}(core.View);function computeDateVars(dateProfile){for(var dayStart=core.startOfDay(dateProfile.renderRange.start),viewEnd=dateProfile.renderRange.end,dayDates=[],dayRanges=[];dayStart<viewEnd;)dayDates.push(dayStart),dayRanges.push({start:dayStart,end:core.addDays(dayStart,1)}),dayStart=core.addDays(dayStart,1);return{dayDates:dayDates,dayRanges:dayRanges}}ListView.prototype.fgSegSelector=".fc-list-item";var main=core.createPlugin({views:{list:{class:ListView,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDayAltFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDayAltFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDayAltFormat:{weekday:"long"}}}});exports.ListView=ListView,exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})),
|
||
/*!
|
||
FullCalendar Time Grid Plugin v4.4.1
|
||
Docs & License: https://fullcalendar.io/
|
||
(c) 2019 Adam Shaw
|
||
*/
|
||
function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@fullcalendar/core"),require("@fullcalendar/daygrid")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core","@fullcalendar/daygrid"],factory):factory((global=global||self).FullCalendarTimeGrid={},global.FullCalendar,global.FullCalendarDayGrid)}(this,(function(exports,core,daygrid){"use strict";
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var extendStatics=function(d,b){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])})(d,b)};function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)},TimeGridEventRenderer=function(_super){function TimeGridEventRenderer(timeGrid){var _this=_super.call(this)||this;return _this.timeGrid=timeGrid,_this}return __extends(TimeGridEventRenderer,_super),TimeGridEventRenderer.prototype.renderSegs=function(context,segs,mirrorInfo){_super.prototype.renderSegs.call(this,context,segs,mirrorInfo),this.fullTimeFormat=core.createFormatter({hour:"numeric",minute:"2-digit",separator:this.context.options.defaultRangeSeparator})},TimeGridEventRenderer.prototype.attachSegs=function(segs,mirrorInfo){for(var segsByCol=this.timeGrid.groupSegsByCol(segs),col=0;col<segsByCol.length;col++)segsByCol[col]=this.sortEventSegs(segsByCol[col]);this.segsByCol=segsByCol,this.timeGrid.attachSegsByCol(segsByCol,this.timeGrid.fgContainerEls)},TimeGridEventRenderer.prototype.detachSegs=function(segs){segs.forEach((function(seg){core.removeElement(seg.el)})),this.segsByCol=null},TimeGridEventRenderer.prototype.computeSegSizes=function(allSegs){var _a=this,timeGrid=_a.timeGrid,segsByCol=_a.segsByCol,colCnt=timeGrid.colCnt;if(timeGrid.computeSegVerticals(allSegs),segsByCol)for(var col=0;col<colCnt;col++)this.computeSegHorizontals(segsByCol[col])},TimeGridEventRenderer.prototype.assignSegSizes=function(allSegs){var _a=this,timeGrid=_a.timeGrid,segsByCol=_a.segsByCol,colCnt=timeGrid.colCnt;if(timeGrid.assignSegVerticals(allSegs),segsByCol)for(var col=0;col<colCnt;col++)this.assignSegCss(segsByCol[col])},TimeGridEventRenderer.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:!1}},TimeGridEventRenderer.prototype.computeDisplayEventEnd=function(){return!0},TimeGridEventRenderer.prototype.renderSegHtml=function(seg,mirrorInfo){var eventRange=seg.eventRange,eventDef=eventRange.def,eventUi=eventRange.ui,allDay=eventDef.allDay,isDraggable=core.computeEventDraggable(this.context,eventDef,eventUi),isResizableFromStart=seg.isStart&&core.computeEventStartResizable(this.context,eventDef,eventUi),isResizableFromEnd=seg.isEnd&&core.computeEventEndResizable(this.context,eventDef,eventUi),classes=this.getSegClasses(seg,isDraggable,isResizableFromStart||isResizableFromEnd,mirrorInfo),skinCss=core.cssToStr(this.getSkinCss(eventUi)),timeText,fullTimeText,startTimeText;if(classes.unshift("fc-time-grid-event"),core.isMultiDayRange(eventRange.range)){if(seg.isStart||seg.isEnd){var unzonedStart=seg.start,unzonedEnd=seg.end;timeText=this._getTimeText(unzonedStart,unzonedEnd,allDay),fullTimeText=this._getTimeText(unzonedStart,unzonedEnd,allDay,this.fullTimeFormat),startTimeText=this._getTimeText(unzonedStart,unzonedEnd,allDay,null,!1)}}else timeText=this.getTimeText(eventRange),fullTimeText=this.getTimeText(eventRange,this.fullTimeFormat),startTimeText=this.getTimeText(eventRange,null,!1);return'<a class="'+classes.join(" ")+'"'+(eventDef.url?' href="'+core.htmlEscape(eventDef.url)+'"':"")+(skinCss?' style="'+skinCss+'"':"")+'><div class="fc-content">'+(timeText?'<div class="fc-time" data-start="'+core.htmlEscape(startTimeText)+'" data-full="'+core.htmlEscape(fullTimeText)+'"><span>'+core.htmlEscape(timeText)+"</span></div>":"")+(eventDef.title?'<div class="fc-title">'+core.htmlEscape(eventDef.title)+"</div>":"")+"</div>"+(isResizableFromEnd?'<div class="fc-resizer fc-end-resizer"></div>':"")+"</a>"},TimeGridEventRenderer.prototype.computeSegHorizontals=function(segs){var levels,level0,i;if(computeForwardSlotSegs(levels=buildSlotSegLevels(segs)),level0=levels[0]){for(i=0;i<level0.length;i++)computeSlotSegPressures(level0[i]);for(i=0;i<level0.length;i++)this.computeSegForwardBack(level0[i],0,0)}},TimeGridEventRenderer.prototype.computeSegForwardBack=function(seg,seriesBackwardPressure,seriesBackwardCoord){var forwardSegs=seg.forwardSegs,i;if(void 0===seg.forwardCoord)for(forwardSegs.length?(this.sortForwardSegs(forwardSegs),this.computeSegForwardBack(forwardSegs[0],seriesBackwardPressure+1,seriesBackwardCoord),seg.forwardCoord=forwardSegs[0].backwardCoord):seg.forwardCoord=1,seg.backwardCoord=seg.forwardCoord-(seg.forwardCoord-seriesBackwardCoord)/(seriesBackwardPressure+1),i=0;i<forwardSegs.length;i++)this.computeSegForwardBack(forwardSegs[i],0,seg.forwardCoord)},TimeGridEventRenderer.prototype.sortForwardSegs=function(forwardSegs){var objs=forwardSegs.map(buildTimeGridSegCompareObj),specs=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(this.context.eventOrderSpecs);return objs.sort((function(obj0,obj1){return core.compareByFieldSpecs(obj0,obj1,specs)})),objs.map((function(c){return c._seg}))},TimeGridEventRenderer.prototype.assignSegCss=function(segs){for(var _i=0,segs_1=segs;_i<segs_1.length;_i++){var seg=segs_1[_i];core.applyStyle(seg.el,this.generateSegCss(seg)),seg.level>0&&seg.el.classList.add("fc-time-grid-event-inset"),seg.eventRange.def.title&&seg.bottom-seg.top<30&&seg.el.classList.add("fc-short")}},TimeGridEventRenderer.prototype.generateSegCss=function(seg){var shouldOverlap=this.context.options.slotEventOverlap,backwardCoord=seg.backwardCoord,forwardCoord=seg.forwardCoord,props=this.timeGrid.generateSegVerticalCss(seg),isRtl=this.context.isRtl,left,right;return shouldOverlap&&(forwardCoord=Math.min(1,backwardCoord+2*(forwardCoord-backwardCoord))),isRtl?(left=1-forwardCoord,right=backwardCoord):(left=backwardCoord,right=1-forwardCoord),props.zIndex=seg.level+1,props.left=100*left+"%",props.right=100*right+"%",shouldOverlap&&seg.forwardPressure&&(props[isRtl?"marginLeft":"marginRight"]=20),props},TimeGridEventRenderer}(core.FgEventRenderer);function buildSlotSegLevels(segs){var levels=[],i,seg,j;for(i=0;i<segs.length;i++){for(seg=segs[i],j=0;j<levels.length&&computeSlotSegCollisions(seg,levels[j]).length;j++);seg.level=j,(levels[j]||(levels[j]=[])).push(seg)}return levels}function computeForwardSlotSegs(levels){var i,level,j,seg,k;for(i=0;i<levels.length;i++)for(level=levels[i],j=0;j<level.length;j++)for((seg=level[j]).forwardSegs=[],k=i+1;k<levels.length;k++)computeSlotSegCollisions(seg,levels[k],seg.forwardSegs)}function computeSlotSegPressures(seg){var forwardSegs=seg.forwardSegs,forwardPressure=0,i,forwardSeg;if(void 0===seg.forwardPressure){for(i=0;i<forwardSegs.length;i++)computeSlotSegPressures(forwardSeg=forwardSegs[i]),forwardPressure=Math.max(forwardPressure,1+forwardSeg.forwardPressure);seg.forwardPressure=forwardPressure}}function computeSlotSegCollisions(seg,otherSegs,results){void 0===results&&(results=[]);for(var i=0;i<otherSegs.length;i++)isSlotSegCollision(seg,otherSegs[i])&&results.push(otherSegs[i]);return results}function isSlotSegCollision(seg1,seg2){return seg1.bottom>seg2.top&&seg1.top<seg2.bottom}function buildTimeGridSegCompareObj(seg){var obj=core.buildSegCompareObj(seg);return obj.forwardPressure=seg.forwardPressure,obj.backwardCoord=seg.backwardCoord,obj}var TimeGridMirrorRenderer=function(_super){function TimeGridMirrorRenderer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(TimeGridMirrorRenderer,_super),TimeGridMirrorRenderer.prototype.attachSegs=function(segs,mirrorInfo){this.segsByCol=this.timeGrid.groupSegsByCol(segs),this.timeGrid.attachSegsByCol(this.segsByCol,this.timeGrid.mirrorContainerEls),this.sourceSeg=mirrorInfo.sourceSeg},TimeGridMirrorRenderer.prototype.generateSegCss=function(seg){var props=_super.prototype.generateSegCss.call(this,seg),sourceSeg=this.sourceSeg;if(sourceSeg&&sourceSeg.col===seg.col){var sourceSegProps=_super.prototype.generateSegCss.call(this,sourceSeg);props.left=sourceSegProps.left,props.right=sourceSegProps.right,props.marginLeft=sourceSegProps.marginLeft,props.marginRight=sourceSegProps.marginRight}return props},TimeGridMirrorRenderer}(TimeGridEventRenderer),TimeGridFillRenderer=function(_super){function TimeGridFillRenderer(timeGrid){var _this=_super.call(this)||this;return _this.timeGrid=timeGrid,_this}return __extends(TimeGridFillRenderer,_super),TimeGridFillRenderer.prototype.attachSegs=function(type,segs){var timeGrid=this.timeGrid,containerEls;return"bgEvent"===type?containerEls=timeGrid.bgContainerEls:"businessHours"===type?containerEls=timeGrid.businessContainerEls:"highlight"===type&&(containerEls=timeGrid.highlightContainerEls),timeGrid.attachSegsByCol(timeGrid.groupSegsByCol(segs),containerEls),segs.map((function(seg){return seg.el}))},TimeGridFillRenderer.prototype.computeSegSizes=function(segs){this.timeGrid.computeSegVerticals(segs)},TimeGridFillRenderer.prototype.assignSegSizes=function(segs){this.timeGrid.assignSegVerticals(segs)},TimeGridFillRenderer}(core.FillRenderer),AGENDA_STOCK_SUB_DURATIONS=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],TimeGrid=function(_super){function TimeGrid(el,renderProps){var _this=_super.call(this,el)||this;_this.isSlatSizesDirty=!1,_this.isColSizesDirty=!1,_this.processOptions=core.memoize(_this._processOptions),_this.renderSkeleton=core.memoizeRendering(_this._renderSkeleton),_this.renderSlats=core.memoizeRendering(_this._renderSlats,null,[_this.renderSkeleton]),_this.renderColumns=core.memoizeRendering(_this._renderColumns,_this._unrenderColumns,[_this.renderSkeleton]),_this.renderProps=renderProps;var renderColumns=_this.renderColumns,eventRenderer=_this.eventRenderer=new TimeGridEventRenderer(_this),fillRenderer=_this.fillRenderer=new TimeGridFillRenderer(_this);return _this.mirrorRenderer=new TimeGridMirrorRenderer(_this),_this.renderBusinessHours=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"businessHours"),fillRenderer.unrender.bind(fillRenderer,"businessHours"),[renderColumns]),_this.renderDateSelection=core.memoizeRendering(_this._renderDateSelection,_this._unrenderDateSelection,[renderColumns]),_this.renderFgEvents=core.memoizeRendering(eventRenderer.renderSegs.bind(eventRenderer),eventRenderer.unrender.bind(eventRenderer),[renderColumns]),_this.renderBgEvents=core.memoizeRendering(fillRenderer.renderSegs.bind(fillRenderer,"bgEvent"),fillRenderer.unrender.bind(fillRenderer,"bgEvent"),[renderColumns]),_this.renderEventSelection=core.memoizeRendering(eventRenderer.selectByInstanceId.bind(eventRenderer),eventRenderer.unselectByInstanceId.bind(eventRenderer),[_this.renderFgEvents]),_this.renderEventDrag=core.memoizeRendering(_this._renderEventDrag,_this._unrenderEventDrag,[renderColumns]),_this.renderEventResize=core.memoizeRendering(_this._renderEventResize,_this._unrenderEventResize,[renderColumns]),_this}return __extends(TimeGrid,_super),TimeGrid.prototype._processOptions=function(options){var slotDuration=options.slotDuration,snapDuration=options.snapDuration,snapsPerSlot,input;slotDuration=core.createDuration(slotDuration),snapDuration=snapDuration?core.createDuration(snapDuration):slotDuration,null===(snapsPerSlot=core.wholeDivideDurations(slotDuration,snapDuration))&&(snapDuration=slotDuration,snapsPerSlot=1),this.slotDuration=slotDuration,this.snapDuration=snapDuration,this.snapsPerSlot=snapsPerSlot,input=options.slotLabelFormat,Array.isArray(input)&&(input=input[input.length-1]),this.labelFormat=core.createFormatter(input||{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"}),input=options.slotLabelInterval,this.labelInterval=input?core.createDuration(input):this.computeLabelInterval(slotDuration)},TimeGrid.prototype.computeLabelInterval=function(slotDuration){var i,labelInterval,slotsPerLabel;for(i=AGENDA_STOCK_SUB_DURATIONS.length-1;i>=0;i--)if(labelInterval=core.createDuration(AGENDA_STOCK_SUB_DURATIONS[i]),null!==(slotsPerLabel=core.wholeDivideDurations(labelInterval,slotDuration))&&slotsPerLabel>1)return labelInterval;return slotDuration},TimeGrid.prototype.render=function(props,context){this.processOptions(context.options);var cells=props.cells;this.colCnt=cells.length,this.renderSkeleton(context.theme),this.renderSlats(props.dateProfile),this.renderColumns(props.cells,props.dateProfile),this.renderBusinessHours(context,props.businessHourSegs),this.renderDateSelection(props.dateSelectionSegs),this.renderFgEvents(context,props.fgEventSegs),this.renderBgEvents(context,props.bgEventSegs),this.renderEventSelection(props.eventSelection),this.renderEventDrag(props.eventDrag),this.renderEventResize(props.eventResize)},TimeGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSlats.unrender(),this.renderColumns.unrender(),this.renderSkeleton.unrender()},TimeGrid.prototype.updateSize=function(isResize){var _a=this,fillRenderer=_a.fillRenderer,eventRenderer=_a.eventRenderer,mirrorRenderer=_a.mirrorRenderer;(isResize||this.isSlatSizesDirty)&&(this.buildSlatPositions(),this.isSlatSizesDirty=!1),(isResize||this.isColSizesDirty)&&(this.buildColPositions(),this.isColSizesDirty=!1),fillRenderer.computeSizes(isResize),eventRenderer.computeSizes(isResize),mirrorRenderer.computeSizes(isResize),fillRenderer.assignSizes(isResize),eventRenderer.assignSizes(isResize),mirrorRenderer.assignSizes(isResize)},TimeGrid.prototype._renderSkeleton=function(theme){var el=this.el;el.innerHTML='<div class="fc-bg"></div><div class="fc-slats"></div><hr class="fc-divider '+theme.getClass("widgetHeader")+'" style="display:none" />',this.rootBgContainerEl=el.querySelector(".fc-bg"),this.slatContainerEl=el.querySelector(".fc-slats"),this.bottomRuleEl=el.querySelector(".fc-divider")},TimeGrid.prototype._renderSlats=function(dateProfile){var theme=this.context.theme;this.slatContainerEl.innerHTML='<table class="'+theme.getClass("tableGrid")+'">'+this.renderSlatRowHtml(dateProfile)+"</table>",this.slatEls=core.findElements(this.slatContainerEl,"tr"),this.slatPositions=new core.PositionCache(this.el,this.slatEls,!1,!0),this.isSlatSizesDirty=!0},TimeGrid.prototype.renderSlatRowHtml=function(dateProfile){for(var _a=this.context,dateEnv=_a.dateEnv,theme=_a.theme,isRtl=_a.isRtl,html="",dayStart=core.startOfDay(dateProfile.renderRange.start),slotTime=dateProfile.minTime,slotIterator=core.createDuration(0),slotDate,isLabeled,axisHtml;core.asRoughMs(slotTime)<core.asRoughMs(dateProfile.maxTime);)slotDate=dateEnv.add(dayStart,slotTime),isLabeled=null!==core.wholeDivideDurations(slotIterator,this.labelInterval),axisHtml='<td class="fc-axis fc-time '+theme.getClass("widgetContent")+'">'+(isLabeled?"<span>"+core.htmlEscape(dateEnv.format(slotDate,this.labelFormat))+"</span>":"")+"</td>",html+='<tr data-time="'+core.formatIsoTimeString(slotDate)+'"'+(isLabeled?"":' class="fc-minor"')+">"+(isRtl?"":axisHtml)+'<td class="'+theme.getClass("widgetContent")+'"></td>'+(isRtl?axisHtml:"")+"</tr>",slotTime=core.addDurations(slotTime,this.slotDuration),slotIterator=core.addDurations(slotIterator,this.slotDuration);return html},TimeGrid.prototype._renderColumns=function(cells,dateProfile){var _a=this.context,calendar=_a.calendar,view=_a.view,isRtl=_a.isRtl,theme=_a.theme,dateEnv=_a.dateEnv,bgRow=new daygrid.DayBgRow(this.context);this.rootBgContainerEl.innerHTML='<table class="'+theme.getClass("tableGrid")+'">'+bgRow.renderHtml({cells:cells,dateProfile:dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+"</table>",this.colEls=core.findElements(this.el,".fc-day, .fc-disabled-day");for(var col=0;col<this.colCnt;col++)calendar.publiclyTrigger("dayRender",[{date:dateEnv.toDate(cells[col].date),el:this.colEls[col],view:view}]);isRtl&&this.colEls.reverse(),this.colPositions=new core.PositionCache(this.el,this.colEls,!0,!1),this.renderContentSkeleton(),this.isColSizesDirty=!0},TimeGrid.prototype._unrenderColumns=function(){this.unrenderContentSkeleton()},TimeGrid.prototype.renderContentSkeleton=function(){var isRtl=this.context.isRtl,parts=[],skeletonEl;parts.push(this.renderProps.renderIntroHtml());for(var i=0;i<this.colCnt;i++)parts.push('<td><div class="fc-content-col"><div class="fc-event-container fc-mirror-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>');isRtl&&parts.reverse(),skeletonEl=this.contentSkeletonEl=core.htmlToElement('<div class="fc-content-skeleton"><table><tr>'+parts.join("")+"</tr></table></div>"),this.colContainerEls=core.findElements(skeletonEl,".fc-content-col"),this.mirrorContainerEls=core.findElements(skeletonEl,".fc-mirror-container"),this.fgContainerEls=core.findElements(skeletonEl,".fc-event-container:not(.fc-mirror-container)"),this.bgContainerEls=core.findElements(skeletonEl,".fc-bgevent-container"),this.highlightContainerEls=core.findElements(skeletonEl,".fc-highlight-container"),this.businessContainerEls=core.findElements(skeletonEl,".fc-business-container"),isRtl&&(this.colContainerEls.reverse(),this.mirrorContainerEls.reverse(),this.fgContainerEls.reverse(),this.bgContainerEls.reverse(),this.highlightContainerEls.reverse(),this.businessContainerEls.reverse()),this.el.appendChild(skeletonEl)},TimeGrid.prototype.unrenderContentSkeleton=function(){core.removeElement(this.contentSkeletonEl)},TimeGrid.prototype.groupSegsByCol=function(segs){var segsByCol=[],i;for(i=0;i<this.colCnt;i++)segsByCol.push([]);for(i=0;i<segs.length;i++)segsByCol[segs[i].col].push(segs[i]);return segsByCol},TimeGrid.prototype.attachSegsByCol=function(segsByCol,containerEls){var col,segs,i;for(col=0;col<this.colCnt;col++)for(segs=segsByCol[col],i=0;i<segs.length;i++)containerEls[col].appendChild(segs[i].el)},TimeGrid.prototype.getNowIndicatorUnit=function(){return"minute"},TimeGrid.prototype.renderNowIndicator=function(segs,date){if(this.colContainerEls){var top=this.computeDateTop(date),nodes=[],i;for(i=0;i<segs.length;i++){var lineEl=core.createElement("div",{className:"fc-now-indicator fc-now-indicator-line"});lineEl.style.top=top+"px",this.colContainerEls[segs[i].col].appendChild(lineEl),nodes.push(lineEl)}if(segs.length>0){var arrowEl=core.createElement("div",{className:"fc-now-indicator fc-now-indicator-arrow"});arrowEl.style.top=top+"px",this.contentSkeletonEl.appendChild(arrowEl),nodes.push(arrowEl)}this.nowIndicatorEls=nodes}},TimeGrid.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.forEach(core.removeElement),this.nowIndicatorEls=null)},TimeGrid.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.getBoundingClientRect().height},TimeGrid.prototype.computeDateTop=function(when,startOfDayDate){return startOfDayDate||(startOfDayDate=core.startOfDay(when)),this.computeTimeTop(core.createDuration(when.valueOf()-startOfDayDate.valueOf()))},TimeGrid.prototype.computeTimeTop=function(duration){var len=this.slatEls.length,dateProfile=this.props.dateProfile,slatCoverage=(duration.milliseconds-core.asRoughMs(dateProfile.minTime))/core.asRoughMs(this.slotDuration),slatIndex,slatRemainder;return slatCoverage=Math.max(0,slatCoverage),slatCoverage=Math.min(len,slatCoverage),slatIndex=Math.floor(slatCoverage),slatRemainder=slatCoverage-(slatIndex=Math.min(slatIndex,len-1)),this.slatPositions.tops[slatIndex]+this.slatPositions.getHeight(slatIndex)*slatRemainder},TimeGrid.prototype.computeSegVerticals=function(segs){var options,eventMinHeight=this.context.options.timeGridEventMinHeight,i,seg,dayDate;for(i=0;i<segs.length;i++)seg=segs[i],dayDate=this.props.cells[seg.col].date,seg.top=this.computeDateTop(seg.start,dayDate),seg.bottom=Math.max(seg.top+eventMinHeight,this.computeDateTop(seg.end,dayDate))},TimeGrid.prototype.assignSegVerticals=function(segs){var i,seg;for(i=0;i<segs.length;i++)seg=segs[i],core.applyStyle(seg.el,this.generateSegVerticalCss(seg))},TimeGrid.prototype.generateSegVerticalCss=function(seg){return{top:seg.top,bottom:-seg.bottom}},TimeGrid.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildSlatPositions()},TimeGrid.prototype.buildColPositions=function(){this.colPositions.build()},TimeGrid.prototype.buildSlatPositions=function(){this.slatPositions.build()},TimeGrid.prototype.positionToHit=function(positionLeft,positionTop){var dateEnv=this.context.dateEnv,_a=this,snapsPerSlot=_a.snapsPerSlot,slatPositions=_a.slatPositions,colPositions=_a.colPositions,colIndex=colPositions.leftToIndex(positionLeft),slatIndex=slatPositions.topToIndex(positionTop);if(null!=colIndex&&null!=slatIndex){var slatTop=slatPositions.tops[slatIndex],slatHeight=slatPositions.getHeight(slatIndex),partial=(positionTop-slatTop)/slatHeight,localSnapIndex,snapIndex=slatIndex*snapsPerSlot+Math.floor(partial*snapsPerSlot),dayDate=this.props.cells[colIndex].date,time=core.addDurations(this.props.dateProfile.minTime,core.multiplyDuration(this.snapDuration,snapIndex)),start=dateEnv.add(dayDate,time),end;return{col:colIndex,dateSpan:{range:{start:start,end:dateEnv.add(start,this.snapDuration)},allDay:!1},dayEl:this.colEls[colIndex],relativeRect:{left:colPositions.lefts[colIndex],right:colPositions.rights[colIndex],top:slatTop,bottom:slatTop+slatHeight}}}},TimeGrid.prototype._renderEventDrag=function(state){state&&(this.eventRenderer.hideByHash(state.affectedInstances),state.isEvent?this.mirrorRenderer.renderSegs(this.context,state.segs,{isDragging:!0,sourceSeg:state.sourceSeg}):this.fillRenderer.renderSegs("highlight",this.context,state.segs))},TimeGrid.prototype._unrenderEventDrag=function(state){state&&(this.eventRenderer.showByHash(state.affectedInstances),state.isEvent?this.mirrorRenderer.unrender(this.context,state.segs,{isDragging:!0,sourceSeg:state.sourceSeg}):this.fillRenderer.unrender("highlight",this.context))},TimeGrid.prototype._renderEventResize=function(state){state&&(this.eventRenderer.hideByHash(state.affectedInstances),this.mirrorRenderer.renderSegs(this.context,state.segs,{isResizing:!0,sourceSeg:state.sourceSeg}))},TimeGrid.prototype._unrenderEventResize=function(state){state&&(this.eventRenderer.showByHash(state.affectedInstances),this.mirrorRenderer.unrender(this.context,state.segs,{isResizing:!0,sourceSeg:state.sourceSeg}))},TimeGrid.prototype._renderDateSelection=function(segs){segs&&(this.context.options.selectMirror?this.mirrorRenderer.renderSegs(this.context,segs,{isSelecting:!0}):this.fillRenderer.renderSegs("highlight",this.context,segs))},TimeGrid.prototype._unrenderDateSelection=function(segs){segs&&(this.context.options.selectMirror?this.mirrorRenderer.unrender(this.context,segs,{isSelecting:!0}):this.fillRenderer.unrender("highlight",this.context))},TimeGrid}(core.DateComponent),AllDaySplitter=function(_super){function AllDaySplitter(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(AllDaySplitter,_super),AllDaySplitter.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},AllDaySplitter.prototype.getKeysForDateSpan=function(dateSpan){return dateSpan.allDay?["allDay"]:["timed"]},AllDaySplitter.prototype.getKeysForEventDef=function(eventDef){return eventDef.allDay?core.hasBgRendering(eventDef)?["timed","allDay"]:["allDay"]:["timed"]},AllDaySplitter}(core.Splitter),TIMEGRID_ALL_DAY_EVENT_LIMIT=5,WEEK_HEADER_FORMAT=core.createFormatter({week:"short"}),AbstractTimeGridView=function(_super){function AbstractTimeGridView(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.splitter=new AllDaySplitter,_this.renderSkeleton=core.memoizeRendering(_this._renderSkeleton,_this._unrenderSkeleton),_this.renderHeadIntroHtml=function(){var _a=_this.context,theme=_a.theme,dateEnv=_a.dateEnv,options=_a.options,range=_this.props.dateProfile.renderRange,dayCnt=core.diffDays(range.start,range.end),weekText;return options.weekNumbers?(weekText=dateEnv.format(range.start,WEEK_HEADER_FORMAT),'<th class="fc-axis fc-week-number '+theme.getClass("widgetHeader")+'" '+_this.axisStyleAttr()+">"+core.buildGotoAnchorHtml(options,dateEnv,{date:range.start,type:"week",forceOff:dayCnt>1},core.htmlEscape(weekText))+"</th>"):'<th class="fc-axis '+theme.getClass("widgetHeader")+'" '+_this.axisStyleAttr()+"></th>"},_this.renderTimeGridBgIntroHtml=function(){var theme;return'<td class="fc-axis '+_this.context.theme.getClass("widgetContent")+'" '+_this.axisStyleAttr()+"></td>"},_this.renderTimeGridIntroHtml=function(){return'<td class="fc-axis" '+_this.axisStyleAttr()+"></td>"},_this.renderDayGridBgIntroHtml=function(){var _a=_this.context,theme=_a.theme,options=_a.options;return'<td class="fc-axis '+theme.getClass("widgetContent")+'" '+_this.axisStyleAttr()+"><span>"+core.getAllDayHtml(options)+"</span></td>"},_this.renderDayGridIntroHtml=function(){return'<td class="fc-axis" '+_this.axisStyleAttr()+"></td>"},_this}return __extends(AbstractTimeGridView,_super),AbstractTimeGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context),this.renderSkeleton(context)},AbstractTimeGridView.prototype.destroy=function(){_super.prototype.destroy.call(this),this.renderSkeleton.unrender()},AbstractTimeGridView.prototype._renderSkeleton=function(context){this.el.classList.add("fc-timeGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new core.ScrollComponent("hidden","auto");var timeGridWrapEl=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(timeGridWrapEl),timeGridWrapEl.classList.add("fc-time-grid-container");var timeGridEl=core.createElement("div",{className:"fc-time-grid"});if(timeGridWrapEl.appendChild(timeGridEl),this.timeGrid=new TimeGrid(timeGridEl,{renderBgIntroHtml:this.renderTimeGridBgIntroHtml,renderIntroHtml:this.renderTimeGridIntroHtml}),context.options.allDaySlot){this.dayGrid=new daygrid.DayGrid(this.el.querySelector(".fc-day-grid"),{renderNumberIntroHtml:this.renderDayGridIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:!1,cellWeekNumbersVisible:!1});var dividerEl=this.el.querySelector(".fc-divider");this.dayGrid.bottomCoordPadding=dividerEl.getBoundingClientRect().height}},AbstractTimeGridView.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-timeGrid-view"),this.timeGrid.destroy(),this.dayGrid&&this.dayGrid.destroy(),this.scroller.destroy()},AbstractTimeGridView.prototype.renderSkeletonHtml=function(){var _a=this.context,theme=_a.theme,options=_a.options;return'<table class="'+theme.getClass("tableGrid")+'">'+(options.columnHeader?'<thead class="fc-head"><tr><td class="fc-head-container '+theme.getClass("widgetHeader")+'"> </td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+theme.getClass("widgetContent")+'">'+(options.allDaySlot?'<div class="fc-day-grid"></div><hr class="fc-divider '+theme.getClass("widgetHeader")+'" />':"")+"</td></tr></tbody></table>"},AbstractTimeGridView.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},AbstractTimeGridView.prototype.unrenderNowIndicator=function(){this.timeGrid.unrenderNowIndicator()},AbstractTimeGridView.prototype.updateSize=function(isResize,viewHeight,isAuto){_super.prototype.updateSize.call(this,isResize,viewHeight,isAuto),this.timeGrid.updateSize(isResize),this.dayGrid&&this.dayGrid.updateSize(isResize)},AbstractTimeGridView.prototype.updateBaseSize=function(isResize,viewHeight,isAuto){var _this=this,eventLimit,scrollerHeight,scrollbarWidths;if(this.axisWidth=core.matchCellWidths(core.findElements(this.el,".fc-axis")),this.timeGrid.colEls){var noScrollRowEls=core.findElements(this.el,".fc-row").filter((function(node){return!_this.scroller.el.contains(node)}));this.timeGrid.bottomRuleEl.style.display="none",this.scroller.clear(),noScrollRowEls.forEach(core.uncompensateScroll),this.dayGrid&&(this.dayGrid.removeSegPopover(),(eventLimit=this.context.options.eventLimit)&&"number"!=typeof eventLimit&&(eventLimit=5),eventLimit&&this.dayGrid.limitRows(eventLimit)),isAuto||(scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight),((scrollbarWidths=this.scroller.getScrollbarWidths()).left||scrollbarWidths.right)&&(noScrollRowEls.forEach((function(rowEl){core.compensateScroll(rowEl,scrollbarWidths)})),scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight)),this.scroller.lockOverflow(scrollbarWidths),this.timeGrid.getTotalSlatHeight()<scrollerHeight&&(this.timeGrid.bottomRuleEl.style.display=""))}else isAuto||(scrollerHeight=this.computeScrollerHeight(viewHeight),this.scroller.setHeight(scrollerHeight))},AbstractTimeGridView.prototype.computeScrollerHeight=function(viewHeight){return viewHeight-core.subtractInnerElHeight(this.el,this.scroller.el)},AbstractTimeGridView.prototype.computeDateScroll=function(duration){var top=this.timeGrid.computeTimeTop(duration);return(top=Math.ceil(top))&&top++,{top:top}},AbstractTimeGridView.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},AbstractTimeGridView.prototype.applyDateScroll=function(scroll){void 0!==scroll.top&&this.scroller.setScrollTop(scroll.top)},AbstractTimeGridView.prototype.axisStyleAttr=function(){return null!=this.axisWidth?'style="width:'+this.axisWidth+'px"':""},AbstractTimeGridView}(core.View);AbstractTimeGridView.prototype.usesMinMaxTime=!0;var SimpleTimeGrid=function(_super){function SimpleTimeGrid(timeGrid){var _this=_super.call(this,timeGrid.el)||this;return _this.buildDayRanges=core.memoize(buildDayRanges),_this.slicer=new TimeGridSlicer,_this.timeGrid=timeGrid,_this}return __extends(SimpleTimeGrid,_super),SimpleTimeGrid.prototype.firstContext=function(context){context.calendar.registerInteractiveComponent(this,{el:this.timeGrid.el})},SimpleTimeGrid.prototype.destroy=function(){_super.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},SimpleTimeGrid.prototype.render=function(props,context){var dateEnv=this.context.dateEnv,dateProfile=props.dateProfile,dayTable=props.dayTable,dayRanges=this.dayRanges=this.buildDayRanges(dayTable,dateProfile,dateEnv),timeGrid=this.timeGrid;timeGrid.receiveContext(context),timeGrid.receiveProps(__assign({},this.slicer.sliceProps(props,dateProfile,null,context.calendar,timeGrid,dayRanges),{dateProfile:dateProfile,cells:dayTable.cells[0]}),context)},SimpleTimeGrid.prototype.renderNowIndicator=function(date){this.timeGrid.renderNowIndicator(this.slicer.sliceNowDate(date,this.timeGrid,this.dayRanges),date)},SimpleTimeGrid.prototype.buildPositionCaches=function(){this.timeGrid.buildPositionCaches()},SimpleTimeGrid.prototype.queryHit=function(positionLeft,positionTop){var rawHit=this.timeGrid.positionToHit(positionLeft,positionTop);if(rawHit)return{component:this.timeGrid,dateSpan:rawHit.dateSpan,dayEl:rawHit.dayEl,rect:{left:rawHit.relativeRect.left,right:rawHit.relativeRect.right,top:rawHit.relativeRect.top,bottom:rawHit.relativeRect.bottom},layer:0}},SimpleTimeGrid}(core.DateComponent);function buildDayRanges(dayTable,dateProfile,dateEnv){for(var ranges=[],_i=0,_a=dayTable.headerDates;_i<_a.length;_i++){var date=_a[_i];ranges.push({start:dateEnv.add(date,dateProfile.minTime),end:dateEnv.add(date,dateProfile.maxTime)})}return ranges}var TimeGridSlicer=function(_super){function TimeGridSlicer(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(TimeGridSlicer,_super),TimeGridSlicer.prototype.sliceRange=function(range,dayRanges){for(var segs=[],col=0;col<dayRanges.length;col++){var segRange=core.intersectRanges(range,dayRanges[col]);segRange&&segs.push({start:segRange.start,end:segRange.end,isStart:segRange.start.valueOf()===range.start.valueOf(),isEnd:segRange.end.valueOf()===range.end.valueOf(),col:col})}return segs},TimeGridSlicer}(core.Slicer),TimeGridView=function(_super){function TimeGridView(){var _this=null!==_super&&_super.apply(this,arguments)||this;return _this.buildDayTable=core.memoize(buildDayTable),_this}return __extends(TimeGridView,_super),TimeGridView.prototype.render=function(props,context){_super.prototype.render.call(this,props,context);var _a=this.props,dateProfile=_a.dateProfile,dateProfileGenerator=_a.dateProfileGenerator,nextDayThreshold=context.nextDayThreshold,dayTable=this.buildDayTable(dateProfile,dateProfileGenerator),splitProps=this.splitter.splitProps(props);this.header&&this.header.receiveProps({dateProfile:dateProfile,dates:dayTable.headerDates,datesRepDistinctDays:!0,renderIntroHtml:this.renderHeadIntroHtml},context),this.simpleTimeGrid.receiveProps(__assign({},splitProps.timed,{dateProfile:dateProfile,dayTable:dayTable}),context),this.simpleDayGrid&&this.simpleDayGrid.receiveProps(__assign({},splitProps.allDay,{dateProfile:dateProfile,dayTable:dayTable,nextDayThreshold:nextDayThreshold,isRigid:!1}),context),this.startNowIndicator(dateProfile,dateProfileGenerator)},TimeGridView.prototype._renderSkeleton=function(context){_super.prototype._renderSkeleton.call(this,context),context.options.columnHeader&&(this.header=new core.DayHeader(this.el.querySelector(".fc-head-container"))),this.simpleTimeGrid=new SimpleTimeGrid(this.timeGrid),this.dayGrid&&(this.simpleDayGrid=new daygrid.SimpleDayGrid(this.dayGrid))},TimeGridView.prototype._unrenderSkeleton=function(){_super.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleTimeGrid.destroy(),this.simpleDayGrid&&this.simpleDayGrid.destroy()},TimeGridView.prototype.renderNowIndicator=function(date){this.simpleTimeGrid.renderNowIndicator(date)},TimeGridView}(AbstractTimeGridView);function buildDayTable(dateProfile,dateProfileGenerator){var daySeries=new core.DaySeries(dateProfile.renderRange,dateProfileGenerator);return new core.DayTable(daySeries,!1)}var main=core.createPlugin({defaultView:"timeGridWeek",views:{timeGrid:{class:TimeGridView,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});exports.AbstractTimeGridView=AbstractTimeGridView,exports.TimeGrid=TimeGrid,exports.TimeGridSlicer=TimeGridSlicer,exports.TimeGridView=TimeGridView,exports.buildDayRanges=buildDayRanges,exports.buildDayTable=buildDayTable,exports.default=main,Object.defineProperty(exports,"__esModule",{value:!0})})); |