/*! FullCalendar Scheduler v1.4.0 Docs & License: http://fullcalendar.io/scheduler/ (c) 2016 Adam Shaw */ !function(t){"function"==typeof define&&define.amd?define(["jquery","moment","fullcalendar"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("moment"),require("fullcalendar")):t(jQuery,moment)}(function(t,e){var r,o,s,i,n,l,u,h,a,c,p,d,f,g,y,v,w,m,S,R,b,C,E,H,T,_,I,D,x,B,F,G,M,W,L,z,k,V,P,A,O,q,N,j,Y,U,X,$,K,Q,J,Z,tt,et,rt,ot,st,it,nt,lt,ut,ht,at,ct,pt,dt,ft,gt,yt,vt,wt,mt,St,Rt,bt,Ct,Et,Ht,Tt,_t,It,Dt,xt,Bt,Ft,Gt,Mt,Wt,Lt,zt,kt,Vt,Pt,At,Ot=function(t,e){function r(){this.constructor=t}for(var o in e)qt.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},qt={}.hasOwnProperty,Nt=[].indexOf||function(t){for(var e=0,r=this.length;e td").filter(function(t,e){return e.rowSpan<=1})},Lt=function(e,r,o){return e&&e.then&&"resolved"!==e.state()?"rejected"===e.state()?(o&&o(),t.Deferred().reject().promise()):e.then(r,o):r?t.when(r()):t.when()},c=function(e){function r(){r.__super__.constructor.apply(this,arguments),this.requestMovingEnd=ot(this.reportMovingEnd,500)}var o,s;return Ot(r,e),r.mixin(a),r.mixin(v),r.prototype.canvas=null,r.prototype.isScrolling=!1,r.prototype.isTouching=!1,r.prototype.isMoving=!1,r.prototype.isTouchScrollEnabled=!0,r.prototype.preventTouchScrollHandler=null,r.prototype.render=function(){return r.__super__.render.apply(this,arguments),this.canvas&&(this.canvas.render(),this.canvas.el.appendTo(this.scrollEl)),this.bindHandlers()},r.prototype.destroy=function(){return r.__super__.destroy.apply(this,arguments),this.unbindHandlers()},r.prototype.disableTouchScroll=function(){return this.isTouchScrollEnabled=!1,this.bindPreventTouchScroll()},r.prototype.enableTouchScroll=function(){if(this.isTouchScrollEnabled=!0,!this.isTouching)return this.unbindPreventTouchScroll()},r.prototype.bindPreventTouchScroll=function(){if(!this.preventTouchScrollHandler)return this.scrollEl.on("touchmove",this.preventTouchScrollHandler=d.preventDefault)},r.prototype.unbindPreventTouchScroll=function(){if(this.preventTouchScrollHandler)return this.scrollEl.off("touchmove",this.preventTouchScrollHandler),this.preventTouchScrollHandler=null},r.prototype.bindHandlers=function(){return this.listenTo(this.scrollEl,{scroll:this.reportScroll,touchstart:this.reportTouchStart,touchend:this.reportTouchEnd})},r.prototype.unbindHandlers=function(){return this.stopListeningTo(this.scrollEl)},r.prototype.reportScroll=function(){return this.isScrolling||this.reportScrollStart(),this.trigger("scroll"),this.isMoving=!0,this.requestMovingEnd()},r.prototype.reportScrollStart=function(){if(!this.isScrolling)return this.isScrolling=!0,this.trigger("scrollStart",this.isTouching)},r.prototype.requestMovingEnd=null,r.prototype.reportMovingEnd=function(){if(this.isMoving=!1,!this.isTouching)return this.reportScrollEnd()},r.prototype.reportScrollEnd=function(){if(this.isScrolling)return this.trigger("scrollEnd"),this.isScrolling=!1},r.prototype.reportTouchStart=function(){return this.isTouching=!0},r.prototype.reportTouchEnd=function(){if(this.isTouching&&(this.isTouching=!1,this.isTouchScrollEnabled&&this.unbindPreventTouchScroll(),!this.isMoving))return this.reportScrollEnd()},r.prototype.getScrollLeft=function(){var t,e,r;if(t=this.scrollEl.css("direction"),e=this.scrollEl[0],r=e.scrollLeft,"rtl"===t)switch(s){case"positive":r=r+e.clientWidth-e.scrollWidth;break;case"reverse":r=-r}return r},r.prototype.setScrollLeft=function(t){var e,r;if(e=this.scrollEl.css("direction"),r=this.scrollEl[0],"rtl"===e)switch(s){case"positive":t=t-r.clientWidth+r.scrollWidth;break;case"reverse":t=-t}return r.scrollLeft=t},r.prototype.getScrollFromLeft=function(){var t,e,r;if(t=this.scrollEl.css("direction"),e=this.scrollEl[0],r=e.scrollLeft,"rtl"===t)switch(s){case"negative":r=r-e.clientWidth+e.scrollWidth;break;case"reverse":r=-r-e.clientWidth+e.scrollWidth}return r},r.prototype.getNativeScrollLeft=function(){return this.scrollEl[0].scrollLeft},r.prototype.setNativeScrollLeft=function(t){return this.scrollEl[0].scrollLeft=t},s=null,o=function(){var e,r,o;return e=t('
A
').appendTo("body"),r=e[0],o=r.scrollLeft>0?"positive":(r.scrollLeft=1,e.scrollLeft>0?"reverse":"negative"),e.remove(),o},t(function(){return s=o()}),r}(d.Scroller),n=function(e){function r(){r.__super__.constructor.apply(this,arguments),"clipped-scroll"===this.overflowX&&(this.overflowX="scroll",this.isHScrollbarsClipped=!0),"clipped-scroll"===this.overflowY&&(this.overflowY="scroll",this.isVScrollbarsClipped=!0)}return Ot(r,e),r.prototype.isHScrollbarsClipped=!1,r.prototype.isVScrollbarsClipped=!1,r.prototype.renderEl=function(){var e;return e=r.__super__.renderEl.apply(this,arguments),t('
').append(e)},r.prototype.updateSize=function(){var t,e,r;return e=this.scrollEl,r=ft(e),t={marginLeft:0,marginRight:0,marginTop:0,marginBottom:0},this.isHScrollbarsClipped&&(t.marginTop=-r.top,t.marginBottom=-r.bottom),this.isVScrollbarsClipped&&(t.marginLeft=-r.left,t.marginRight=-r.right),e.css(t),e.toggleClass("fc-no-scrollbars",(this.isHScrollbarsClipped||"hidden"===this.overflowX)&&(this.isVScrollbarsClipped||"hidden"===this.overflowY)&&!(r.top||r.bottom||r.left||r.right))},r.prototype.getScrollbarWidths=function(){var t;return t=ft(this.scrollEl),this.isHScrollbarsClipped&&(t.top=0,t.bottom=0),this.isVScrollbarsClipped&&(t.left=0,t.right=0),t},r}(c),O=function(){function e(){this.gutters={}}return e.prototype.el=null,e.prototype.contentEl=null,e.prototype.bgEl=null,e.prototype.gutters=null,e.prototype.width=null,e.prototype.minWidth=null,e.prototype.render=function(){return this.el=t('
'),this.contentEl=this.el.find(".fc-content"),this.bgEl=this.el.find(".fc-bg")},e.prototype.setGutters=function(e){return e?t.extend(this.gutters,e):this.gutters={},this.updateSize()},e.prototype.setWidth=function(t){return this.width=t,this.updateSize()},e.prototype.setMinWidth=function(t){return this.minWidth=t,this.updateSize()},e.prototype.clearWidth=function(){return this.width=null,this.minWidth=null,this.updateSize()},e.prototype.updateSize=function(){var t;return t=this.gutters,this.el.toggleClass("fc-gutter-left",Boolean(t.left)).toggleClass("fc-gutter-right",Boolean(t.right)).toggleClass("fc-gutter-top",Boolean(t.top)).toggleClass("fc-gutter-bottom",Boolean(t.bottom)).css({paddingLeft:t.left||"",paddingRight:t.right||"",paddingTop:t.top||"",paddingBottom:t.bottom||"",width:null!=this.width?this.width+(t.left||0)+(t.right||0):"",minWidth:null!=this.minWidth?this.minWidth+(t.left||0)+(t.right||0):""}),this.bgEl.css({left:t.left||"",right:t.right||"",top:t.top||"",bottom:t.bottom||""})},e}(),A=function(){function t(t,e){var r,o,s,i;for(this.axis=t,this.scrollers=e,s=this.scrollers,r=0,o=s.length;r=i&&(r="center"===this.el.css("text-align"),o=!0),e.isVFollowing&&pt(t)-pt(n)>=i&&(s=!0),this.isHFollowing=o,this.isVFollowing=s,this.isCentered=r},t.prototype.updatePosition=function(){return this.computePosition(),this.assignPosition()},t.prototype.resetPosition=function(){return this.el.css({top:"",left:""})},t.prototype.computePosition=function(){var t,e,r,o,s,i,n,l;return n=this.follower.viewportRect,r=this.parentRect,t=this.containerRect,l=wt(n,r),o=null,e=!1,l&&(o=et(this.naturalRect),i=wt(o,r),(this.isCentered&&!zt(n,r)||i&&!zt(n,i))&&(e=!0,this.isHFollowing&&(this.isCentered?(s=dt(o),o.left=(l.left+l.right)/2-s/2,o.right=o.left+s):gt(o,n)||(e=!1),gt(o,t)&&(e=!1)),this.isVFollowing&&(At(o,n)||(e=!1),At(o,t)&&(e=!1)),zt(n,o)||(e=!1))),this.rect=o,this.doAbsolute=e},t.prototype.assignPosition=function(){var t,e;if(this.isEnabled)return this.rect?this.doAbsolute&&!this.follower.isForcedRelative?(this.absolutize(),this.absoluteEl.css({top:this.rect.top-this.follower.viewportRect.top+this.follower.scrollbarWidths.top,left:this.rect.left-this.follower.viewportRect.left+this.follower.scrollbarWidths.left,width:this.isBlock?this.naturalWidth:""})):(e=this.rect.top-this.naturalRect.top,t=this.rect.left-this.naturalRect.left,this.unabsolutize(),this.el.toggleClass("fc-following",Boolean(e||t)).css({top:e,left:t})):this.unabsolutize()},t.prototype.absolutize=function(){if(!this.isAbsolute)return this.absoluteEl||(this.absoluteEl=this.buildAbsoluteEl()),this.absoluteEl.appendTo(this.follower.scroller.el),this.el.css("visibility","hidden"),this.isAbsolute=!0},t.prototype.unabsolutize=function(){if(this.isAbsolute)return this.absoluteEl.detach(),this.el.css("visibility",""),this.isAbsolute=!1},t.prototype.buildAbsoluteEl=function(){return this.el.clone().addClass("fc-following").css({position:"absolute","z-index":1e3,"font-weight":this.el.css("font-weight"),"font-size":this.el.css("font-size"),"font-family":this.el.css("font-family"),color:this.el.css("color"),"padding-top":this.el.css("padding-top"),"padding-bottom":this.el.css("padding-bottom"),"padding-left":this.el.css("padding-left"),"padding-right":this.el.css("padding-right"),"pointer-events":"none"})},t}(),et=function(t){return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},dt=function(t){return t.right-t.left},pt=function(t){return t.bottom-t.top},zt=function(t,e){return kt(t,e)&&Vt(t,e)},kt=function(t,e){return e.left>=t.left&&e.right<=t.right},Vt=function(t,e){return e.top>=t.top&&e.bottom<=t.bottom},gt=function(t,e){return t.lefte.right&&(t.left=e.right-dt(t),t.right=e.right,!0)},At=function(t,e){return t.tope.bottom&&(t.top=e.bottom-pt(t),t.bottom=e.bottom,!0)},bt=function(t,e){return{left:Math.min(t.left,e.left),right:Math.max(t.right,e.right),top:Math.min(t.top,e.top),bottom:Math.max(t.bottom,e.bottom)}},s=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Ot(r,e),r.prototype.resourceManager=null,r.prototype.initialize=function(){return this.resourceManager=new D(this)},r.prototype.instantiateView=function(t){var e,r;return e=this.getViewSpec(t),r=e["class"],this.options.resources&&e.options.resources!==!1&&(e.queryResourceClass?r=e.queryResourceClass(e)||r:e.resourceClass&&(r=e.resourceClass)),new r(this,t,e.options,e.duration)},r.prototype.getResources=function(){return Array.prototype.slice.call(this.resourceManager.topLevelResources)},r.prototype.addResource=function(t,e){var r;null==e&&(e=!1),r=this.resourceManager.addResource(t),e&&this.view.scrollToResource&&r.done(function(t){return function(e){return t.view.scrollToResource(e)}}(this))},r.prototype.removeResource=function(t){return this.resourceManager.removeResource(t)},r.prototype.refetchResources=function(){this.resourceManager.fetchResources()},r.prototype.rerenderResources=function(){this.resourceManager.resetResources()},r.prototype.isSpanAllowed=function(t,e){var o,s;return!("object"==typeof e&&(o=this.getEventResourceIds(e),o.length&&!(t.resourceId&&(s=t.resourceId,Nt.call(o,s)>=0))))&&r.__super__.isSpanAllowed.apply(this,arguments)},r.prototype.getPeerEvents=function(t,e){var o,s,i,n,l,u,h,a,c,p,d,f,g,y;for(f=r.__super__.getPeerEvents.apply(this,arguments),p=t.resourceId?[t.resourceId]:e?this.getEventResourceIds(e):[],o=[],i=0,u=f.length;i1?this.datesAboveResources?this.renderHeadDateAndResourceHtml():this.renderHeadResourceAndDateHtml():this.renderHeadResourceHtml():d.DayTableMixin.renderHeadTrHtml.call(this)},renderHeadResourceHtml:function(){var t,e,r,o,s;for(s=[],r=this.flattenedResources,t=0,e=r.length;t1?' colspan="'+r+'"':"")+">"+yt(this.view.getResourceText(t))+""},renderHeadResourceDateCellHtml:function(t,e,r){return this.renderHeadDateCellHtml(t,r,'data-resource-id="'+e.id+'"')},processHeadResourceEls:function(e){return e.find(".fc-resource-cell").each(function(e){return function(r,o){var s;return s=e.datesAboveResources?e.getColResource(r):e.flattenedResources[e.isRTL?e.flattenedResources.length-1-r:r],e.view.trigger("resourceRender",s,s,t(o),t())}}(this))},renderBgCellsHtml:function(t){var e,r,o,s,i,n;if(this.resourceCnt){for(o=[],e=s=0,i=this.colCnt;s"+t.join("")+this[e]()+""):""+this[e]()+t.join("")+""},computePerResourceBusinessHourSegs:function(t){var e,r,o,s,i,n,l,u,h,a,c,p,d,f,g;if(this.flattenedResources){for(r=!1,p=this.flattenedResources,n=0,h=p.length;n '},e.prototype.renderTimeGridSkeleton=function(){return this.timeGrid.setElement(this.el.find("tbody .fc-time-area")),this.timeGrid.headEl=this.el.find("thead .fc-time-area"),this.timeGrid.renderSkeleton(),this.isScrolled=!1,this.timeGrid.bodyScroller.on("scroll",Mt(this,"handleBodyScroll"))},e.prototype.handleBodyScroll=function(t,e){if(t){if(!this.isScrolled)return this.isScrolled=!0,this.el.addClass("fc-scrolled")}else if(this.isScrolled)return this.isScrolled=!1,this.el.removeClass("fc-scrolled")},e.prototype.unrenderSkeleton=function(){return this.timeGrid.removeElement(),this.handleBodyScroll(0),e.__super__.unrenderSkeleton.apply(this,arguments)},e.prototype.renderDates=function(){return this.timeGrid.renderDates()},e.prototype.unrenderDates=function(){return this.timeGrid.unrenderDates()},e.prototype.renderBusinessHours=function(){return this.timeGrid.renderBusinessHours()},e.prototype.unrenderBusinessHours=function(){return this.timeGrid.unrenderBusinessHours()},e.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},e.prototype.renderNowIndicator=function(t){return this.timeGrid.renderNowIndicator(t)},e.prototype.unrenderNowIndicator=function(){return this.timeGrid.unrenderNowIndicator()},e.prototype.prepareHits=function(){return this.timeGrid.prepareHits()},e.prototype.releaseHits=function(){return this.timeGrid.releaseHits()},e.prototype.queryHit=function(t,e){return this.timeGrid.queryHit(t,e)},e.prototype.getHitSpan=function(t){return this.timeGrid.getHitSpan(t)},e.prototype.getHitEl=function(t){return this.timeGrid.getHitEl(t)},e.prototype.updateWidth=function(){return this.timeGrid.updateWidth()},e.prototype.setHeight=function(t,e){var r;return r=e?"auto":t-this.timeGrid.headHeight()-this.queryMiscHeight(),this.timeGrid.bodyScroller.setHeight(r)},e.prototype.queryMiscHeight=function(){return this.el.outerHeight()-this.timeGrid.headScroller.el.outerHeight()-this.timeGrid.bodyScroller.el.outerHeight()},e.prototype.computeInitialScroll=function(t){return this.timeGrid.computeInitialScroll(t)},e.prototype.queryScroll=function(){return this.timeGrid.queryScroll()},e.prototype.setScroll=function(t){return this.timeGrid.setScroll(t)},e.prototype.renderEvents=function(t){return this.timeGrid.renderEvents(t),this.updateWidth()},e.prototype.unrenderEvents=function(){return this.timeGrid.unrenderEvents(),this.updateWidth()},e.prototype.renderDrag=function(t,e){return this.timeGrid.renderDrag(t,e)},e.prototype.unrenderDrag=function(){return this.timeGrid.unrenderDrag()},e.prototype.getEventSegs=function(){return this.timeGrid.getEventSegs()},e.prototype.renderSelection=function(t){return this.timeGrid.renderSelection(t)},e.prototype.unrenderSelection=function(){return this.timeGrid.unrenderSelection()},e}(X),rt=d.cssToStr,N=function(r){function o(){var t;o.__super__.constructor.apply(this,arguments),this.initScaleProps(),this.minTime=e.duration(this.opt("minTime")||"00:00"),this.maxTime=e.duration(this.opt("maxTime")||"24:00"),this.timeWindowMs=this.maxTime-this.minTime,this.snapDuration=(t=this.opt("snapDuration"))?e.duration(t):this.slotDuration,this.minResizeDuration=this.snapDuration,this.snapsPerSlot=it(this.slotDuration,this.snapDuration),this.slotWidth=this.opt("slotWidth")}return Ot(o,r),o.prototype.slotDates=null,o.prototype.slotCnt=null,o.prototype.snapCnt=null,o.prototype.snapsPerSlot=null,o.prototype.snapDiffToIndex=null,o.prototype.snapIndexToDiff=null,o.prototype.headEl=null,o.prototype.slatContainerEl=null,o.prototype.slatEls=null,o.prototype.containerCoordCache=null,o.prototype.slatCoordCache=null,o.prototype.slatInnerCoordCache=null,o.prototype.headScroller=null,o.prototype.bodyScroller=null,o.prototype.joiner=null,o.prototype.follower=null,o.prototype.eventTitleFollower=null,o.prototype.minTime=null,o.prototype.maxTime=null,o.prototype.timeWindowMs=null,o.prototype.slotDuration=null,o.prototype.snapDuration=null,o.prototype.duration=null,o.prototype.labelInterval=null,o.prototype.headerFormats=null,o.prototype.isTimeScale=null,o.prototype.largeUnit=null,o.prototype.emphasizeWeeks=!1,o.prototype.titleFollower=null,o.prototype.segContainerEl=null,o.prototype.segContainerHeight=null,o.prototype.bgSegContainerEl=null,o.prototype.helperEls=null,o.prototype.innerEl=null,o.prototype.opt=function(t){return this.view.opt(t)},o.prototype.isValidDate=function(t){var e;return!this.view.isHiddenDay(t)&&(!this.isTimeScale||(e=t.time()-this.minTime,e=(e%864e5+864e5)%864e5,e').appendTo(this.bodyScroller.canvas.bgEl),this.segContainerEl=t('
').appendTo(this.bodyScroller.canvas.contentEl),this.bgSegContainerEl=this.bodyScroller.canvas.bgEl,this.containerCoordCache=new l({els:this.bodyScroller.canvas.el,isHorizontal:!0,isVertical:!0}),this.joiner=new A("horizontal",[this.headScroller,this.bodyScroller]),this.follower=new V(this.headScroller,this.view.calendar.isTouch),this.eventTitleFollower=new V(this.bodyScroller,this.view.calendar.isTouch),this.eventTitleFollower.minTravel=50,this.isRTL?this.eventTitleFollower.containOnNaturalRight=!0:this.eventTitleFollower.containOnNaturalLeft=!0,o.__super__.renderSkeleton.apply(this,arguments)},o.prototype.headColEls=null,o.prototype.slatColEls=null,o.prototype.renderDates=function(){var t,e,r,o,s;for(this.headScroller.canvas.contentEl.html(this.renderHeadHtml()),this.headColEls=this.headScroller.canvas.contentEl.find("col"),this.slatContainerEl.html(this.renderSlatHtml()),this.slatColEls=this.slatContainerEl.find("col"),this.slatEls=this.slatContainerEl.find("td"),this.slatCoordCache=new l({els:this.slatEls,isHorizontal:!0}),this.slatInnerCoordCache=new l({els:this.slatEls.find("> div"),isHorizontal:!0,offsetParent:this.bodyScroller.canvas.el}),s=this.slotDates,e=r=0,o=s.length;r1&&xthis.slotDuration,n="",n+="",f=0,m=M.length;f";for(n+="",n+="",l=E=0,S=e.length;E",H=0,R=B.length;H1?' colspan="'+t.colspan+'"':"")+'>
'+yt(t.text)+"
";n+=""}for(n+="
",F="",F+="",_=0,b=G.length;_";for(F+="",F+="",l=D=0,C=G.length;D
'},o.prototype.businessHourSegs=null,o.prototype.renderBusinessHours=function(){var t;if(!this.largeUnit)return t=this.businessHourSegs=this.buildBusinessHourSegs(!this.isTimeScale),this.renderFill("businessHours",t,"bgevent")},o.prototype.unrenderBusinessHours=function(){return this.unrenderFill("businessHours")},o.prototype.nowIndicatorEls=null,o.prototype.getNowIndicatorUnit=function(){if(this.isTimeScale)return J(this.slotDuration)},o.prototype.renderNowIndicator=function(e){var r,o,s;return s=[],e=this.normalizeGridDate(e),e>=this.start&&e
").css(o).appendTo(this.headScroller.canvas.el)[0]),s.push(t("
").css(o).appendTo(this.bodyScroller.canvas.el)[0])),this.nowIndicatorEls=t(s)},o.prototype.unrenderNowIndicator=function(){if(this.nowIndicatorEls)return this.nowIndicatorEls.remove(),this.nowIndicatorEls=null},o.prototype.explicitSlotWidth=null,o.prototype.defaultSlotWidth=null,o.prototype.updateWidth=function(){var t,e,r,o,s;if(s=Math.round(this.slotWidth||(this.slotWidth=this.computeSlotWidth())),r=s*this.slotDates.length,e="",o=s,t=this.bodyScroller.getClientWidth(),t>r&&(e=t,r="",o=Math.floor(t/this.slotDates.length)),this.headScroller.canvas.setWidth(r),this.headScroller.canvas.setMinWidth(e),this.bodyScroller.canvas.setWidth(r),this.bodyScroller.canvas.setMinWidth(e),this.headColEls.slice(0,-1).add(this.slatColEls.slice(0,-1)).width(o),this.headScroller.updateSize(),this.bodyScroller.updateSize(),this.joiner.update(),this.buildCoords(),this.updateSegPositions(),this.view.updateNowIndicator(),this.follower&&this.follower.update(),this.eventTitleFollower)return this.eventTitleFollower.update()},o.prototype.computeSlotWidth=function(){var e,r,o,s,i,n;return o=0,r=this.headEl.find("tr:last-child th span"),r.each(function(e,r){var s;return s=t(r).outerWidth(),o=Math.max(o,s)}),e=o+1,n=it(this.labelInterval,this.slotDuration),i=Math.ceil(e/n),s=this.headColEls.eq(0).css("min-width"),s&&(s=parseInt(s,10),s&&(i=Math.max(i,s))),i},o.prototype.buildCoords=function(){return this.containerCoordCache.build(),this.slatCoordCache.build(),this.slatInnerCoordCache.build()},o.prototype.computeDateSnapCoverage=function(t){var e,r,o;return r=nt(this.start,t,this.snapDuration),r<0?0:r>=this.snapDiffToIndex.length?this.snapCnt:(o=Math.floor(r),e=this.snapDiffToIndex[o],St(e)?e+=r-o:e=Math.ceil(e),e)},o.prototype.dateToCoord=function(t){var e,r,o,s,i;return i=this.computeDateSnapCoverage(t),o=i/this.snapsPerSlot,s=Math.floor(o),s=Math.min(s,this.slotCnt-1),r=o-s,e=this.slatInnerCoordCache,this.isRTL?e.getRightPosition(s)-e.getWidth(s)*r-this.containerCoordCache.getWidth(0):e.getLeftPosition(s)+e.getWidth(s)*r},o.prototype.rangeToCoords=function(t){return this.isRTL?{right:this.dateToCoord(t.start),left:this.dateToCoord(t.end)}:{left:this.dateToCoord(t.start),right:this.dateToCoord(t.end)}},o.prototype.headHeight=function(){var t;return t=this.headScroller.canvas.contentEl.find("table"),t.height.apply(t,arguments)},o.prototype.updateSegPositions=function(){var t,e,r,o,s;for(s=(this.segs||[]).concat(this.businessHourSegs||[]),e=0,r=s.length;e
'+(l?''+yt(l)+"":"")+''+(o.title?yt(o.title):" ")+'
'+(n?'
':"")+(i?'
':"")+""},o.prototype.updateSegFollowers=function(t){var e,r,o,s,i;if(this.eventTitleFollower){for(s=[],e=0,r=t.length;e').appendTo(o.innerEl),n.push(i[0]),f=0,d=S.length;f').appendTo(r.bgSegContainerEl),l=0,u=o.length;le.left},R=18,m=6,w=200,S=1e3,u={months:1},k=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}],N.prototype.initScaleProps=function(){var e,r,o;return this.labelInterval=this.queryDurationOption("slotLabelInterval"),this.slotDuration=this.queryDurationOption("slotDuration"),this.ensureGridDuration(),this.validateLabelAndSlot(),this.ensureLabelInterval(),this.ensureSlotDuration(),e=this.opt("slotLabelFormat"),o=t.type(e),this.headerFormats="array"===o?e:"string"===o?[e]:this.computeHeaderFormats(),this.isTimeScale=lt(this.slotDuration),this.largeUnit=this.isTimeScale?void 0:(r=J(this.slotDuration),/year|month|week/.test(r)?r:void 0),this.emphasizeWeeks=1===this.slotDuration.as("days")&&this.duration.as("weeks")>=2&&!this.opt("businessHours")},N.prototype.queryDurationOption=function(t){var r,o;if(o=this.opt(t),null!=o&&(r=e.duration(o),+r))return r},N.prototype.validateLabelAndSlot=function(){var t,e,r;if(this.labelInterval&&(t=it(this.duration,this.labelInterval),t>S&&(d.warn("slotLabelInterval results in too many cells"),this.labelInterval=null)),this.slotDuration&&(e=it(this.duration,this.slotDuration),e>S&&(d.warn("slotDuration results in too many cells"),this.slotDuration=null)),this.labelInterval&&this.slotDuration&&(r=it(this.labelInterval,this.slotDuration),!St(r)||r<1))return d.warn("slotLabelInterval must be a multiple of slotDuration"),this.slotDuration=null},N.prototype.ensureGridDuration=function(){var t,r,o,s,i;if(t=this.duration,!t){if(t=this.view.intervalDuration,!t)if(this.labelInterval||this.slotDuration)for(i=this.ensureLabelInterval(),o=k.length-1;o>=0&&(r=k[o],t=e.duration(r),s=it(t,i),!(s>=R));o+=-1);else t=e.duration(u);this.duration=t}return t},N.prototype.ensureLabelInterval=function(){var t,r,o,s,i,n,l,u,h;if(i=this.labelInterval,!i){if(this.duration||this.slotDuration||this.ensureGridDuration(),this.slotDuration){for(r=0,n=k.length;r=R));o++);this.labelInterval=i}return i},N.prototype.ensureSlotDuration=function(){var t,r,o,s,i,n,l,u;if(n=this.slotDuration,!n){for(o=this.ensureLabelInterval(),r=0,s=k.length;r1&&l<=m){n=u;break}n&&this.duration&&(i=it(this.duration,n),i>w&&(n=null)),n||(n=o),this.slotDuration=n}return n},N.prototype.computeHeaderFormats=function(){var t,e,r,o,s,i,n,l;switch(n=this.view,o=this.duration,s=this.labelInterval,i=J(s),l=this.opt("weekNumbers"),t=e=r=null,"week"!==i||l||(i="day"),i){case"year":t="YYYY";break;case"month":o.asYears()>1&&(t="YYYY"),e="MMM";break;case"week":o.asYears()>1&&(t="YYYY"),e=this.opt("shortWeekFormat");break;case"day":o.asYears()>1?t=this.opt("monthYearFormat"):o.asMonths()>1&&(t="MMMM"),l&&(e=this.opt("weekFormat")),r="dd D";break;case"hour":l&&(t=this.opt("weekFormat")),o.asDays()>1&&(e=this.opt("dayOfMonthFormat")),r=this.opt("smallTimeFormat");break;case"minute":s.asMinutes()/60>=m?(t=this.opt("hourFormat"),e="[:]mm"):t=this.opt("mediumTimeFormat");break;case"second":s.asSeconds()/60>=m?(t="LT",e="[:]ss"):t="LTS";break;case"millisecond":t="LTS",e="[.]SSS"}return[].concat(t||[],e||[],r||[])},d.views.timeline={"class":j,defaults:{eventResizableFromStart:!0}},d.views.timelineDay={type:"timeline",duration:{days:1}},d.views.timelineWeek={type:"timeline",duration:{weeks:1}},d.views.timelineMonth={type:"timeline",duration:{months:1}},d.views.timelineYear={type:"timeline",duration:{years:1}},M=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Ot(r,e),r.mixin(W),r.prototype.resourceGrid=null,r.prototype.tbodyHash=null,r.prototype.joiner=null,r.prototype.dividerEls=null,r.prototype.superHeaderText=null,r.prototype.isVGrouping=null,r.prototype.isHGrouping=null,r.prototype.groupSpecs=null,r.prototype.colSpecs=null,r.prototype.orderSpecs=null,r.prototype.rowHierarchy=null,r.prototype.resourceRowHash=null,r.prototype.nestingCnt=0,r.prototype.isNesting=null,r.prototype.dividerWidth=null,r.prototype.initialize=function(){return r.__super__.initialize.apply(this,arguments),this.processResourceOptions(),this.resourceGrid=new q(this),this.rowHierarchy=new z(this),this.resourceRowHash={}},r.prototype.instantiateGrid=function(){return new G(this)},r.prototype.processResourceOptions=function(){var t,e,r,o,s,i,n,l,u,h,a,c,p,d,f,g,y,v,w,m,S,R;for(t=this.opt("resourceColumns")||[],f=this.opt("resourceLabelText"),o="Resources",R=null,t.length?R=f:t.push({labelText:f||o,text:this.getResourceTextFunc()}),m=[],s=[],n=[],a=!1,h=!1,c=0,g=t.length;c
'; },r.prototype.renderResourceGridSkeleton=function(){return this.resourceGrid.el=this.el.find("tbody .fc-resource-area"),this.resourceGrid.headEl=this.el.find("thead .fc-resource-area"),this.resourceGrid.renderSkeleton()},r.prototype.initDividerMoving=function(){var t;return this.dividerEls=this.el.find(".fc-divider"),this.dividerWidth=null!=(t=this.opt("resourceAreaWidth"))?t:this.resourceGrid.tableWidth,null!=this.dividerWidth&&this.positionDivider(this.dividerWidth),this.dividerEls.on("mousedown",function(t){return function(e){return t.dividerMousedown(e)}}(this))},r.prototype.dividerMousedown=function(t){var e,r,o,s,i;return r=this.opt("isRTL"),s=30,o=this.el.width()-30,i=this.getNaturalDividerWidth(),e=new h({dragStart:function(t){return function(){return t.dividerEls.addClass("fc-active")}}(this),drag:function(t){return function(e,n){var l;return l=r?i-e:i+e,l=Math.max(l,s),l=Math.min(l,o),t.dividerWidth=l,t.positionDivider(l),t.updateWidth()}}(this),dragEnd:function(t){return function(){return t.dividerEls.removeClass("fc-active")}}(this)}),e.startInteraction(t)},r.prototype.getNaturalDividerWidth=function(){return this.el.find(".fc-resource-area").width()},r.prototype.positionDivider=function(t){return this.el.find(".fc-resource-area").width(t)},r.prototype.renderEvents=function(t){return this.timeGrid.renderEvents(t),this.syncRowHeights(),this.updateWidth()},r.prototype.unrenderEvents=function(){return this.timeGrid.unrenderEvents(),this.syncRowHeights(),this.updateWidth()},r.prototype.updateWidth=function(){if(r.__super__.updateWidth.apply(this,arguments),this.resourceGrid.updateWidth(),this.joiner.update(),this.cellFollower)return this.cellFollower.update()},r.prototype.updateHeight=function(t){if(r.__super__.updateHeight.apply(this,arguments),t)return this.syncRowHeights()},r.prototype.setHeight=function(t,e){var r,o;return o=this.syncHeadHeights(),r=e?"auto":t-o-this.queryMiscHeight(),this.timeGrid.bodyScroller.setHeight(r),this.resourceGrid.bodyScroller.setHeight(r)},r.prototype.queryMiscHeight=function(){return this.el.outerHeight()-Math.max(this.resourceGrid.headScroller.el.outerHeight(),this.timeGrid.headScroller.el.outerHeight())-Math.max(this.resourceGrid.bodyScroller.el.outerHeight(),this.timeGrid.bodyScroller.el.outerHeight())},r.prototype.syncHeadHeights=function(){var t;return this.resourceGrid.headHeight("auto"),this.timeGrid.headHeight("auto"),t=Math.max(this.resourceGrid.headHeight(),this.timeGrid.headHeight()),this.resourceGrid.headHeight(t),this.timeGrid.headHeight(t),t},r.prototype.scrollToResource=function(t){return this.timeGrid.scrollToResource(t)},r.prototype.setResources=function(t){var e,r,o;for(this.batchRows(),e=0,r=t.length;e0)return o;return null},r.prototype.compareResources=function(t,e){return Q(t,e,this.orderSpecs)},r.prototype.ensureResourceGroup=function(t,e,r){var o,s,i,n,l,u,h,a,c,p,d;if(i=(t.resource||{})[r.field],s=null,r.order)for(c=e.children,n=l=0,h=c.length;l0)break}else for(p=e.children,n=u=0,a=p.length;u1))return this.syncRowHeights(t,!0)},r.prototype.getVisibleRows=function(){var t,e,r,o,s;for(r=this.rowHierarchy.getRows(),o=[],t=0,e=r.length;t
').appendTo(this.bodyScroller.canvas.contentEl),this.tbodyEl=e.find("tbody")},r.prototype.renderFgSegs=function(t){var e,r,o,s,i,n,l;for(t=this.renderFgSegEls(t),n=this.view.pairSegsWithRows(t),l=[],o=0,s=n.length;ol)){u.resourceId=n.resource.id,u.bottom=e-l;break}return u},r.prototype.setScroll=function(t){var e,o,s,i;return t.resourceId&&(i=this.view.getResourceRow(t.resourceId),i&&(e=i.getTr("event"),e&&(s=this.bodyScroller.canvas.el.offset().top,o=e.offset().top+e.outerHeight(),t.top=o-t.bottom-s))),r.__super__.setScroll.call(this,t)},r.prototype.scrollToResource=function(t){var e,r,o,s;if(o=this.view.getResourceRow(t.id),o&&(e=o.getTr("event")))return r=this.bodyScroller.canvas.el.offset().top,s=e.offset().top-r,this.bodyScroller.scrollEl.scrollTop(s)},r}(N),r=30,q=function(){function e(t){var e;this.view=t,this.isRTL=this.view.opt("isRTL"),this.givenColWidths=this.colWidths=function(){var t,r,o,s;for(o=this.view.colSpecs,s=[],t=0,r=o.length;t"+this.colGroupHtml+""),this.tbodyEl=this.bodyScroller.canvas.contentEl.find("tbody"),this.el.append(this.bodyScroller.el),this.joiner=new A("horizontal",[this.headScroller,this.bodyScroller]),this.headTable=this.headEl.find("table"),this.headColEls=this.headEl.find("col"),this.headCellEls=this.headScroller.canvas.contentEl.find("tr:last-child th"),this.bodyColEls=this.el.find("col"),this.bodyTable=this.el.find("table"),this.colMinWidths=this.computeColMinWidths(),this.applyColWidths(),this.initColResizing()},e.prototype.renderHeadHtml=function(){var t,e,r,o,s,i,n,l,u,h,a;for(e=this.view.colSpecs,r="",t="",n=0,u=e.length;n':"";for(t+="",this.colGroupHtml=t,r+=t,r+="",this.view.superHeaderText&&(r+='"),r+="",i=!0,o=l=0,h=e.length;l
'+(a.isMain?'':"")+''+yt(a.labelText||"")+"
"+(s?"":'
')+"
";return r+="
",r+="
'+yt(this.view.superHeaderText)+"
"},e.prototype.givenColWidths=null,e.prototype.colWidths=null,e.prototype.colMinWidths=null,e.prototype.tableWidth=null,e.prototype.tableMinWidth=null,e.prototype.initColResizing=function(){return this.headEl.find("th .fc-col-resizer").each(function(e){return function(r,o){return o=t(o),o.on("mousedown",function(t){return e.colResizeMousedown(r,t,o)})}}(this))},e.prototype.colResizeMousedown=function(t,e,o){var s,i,n,l;return s=this.colWidths=this.queryColWidths(),s.pop(),s.push(null),l=s[t],n=Math.min(this.colMinWidths[t],r),i=new h({dragStart:function(t){return function(){return o.addClass("fc-active")}}(this),drag:function(e){return function(r,o){var i;return i=l+(e.isRTL?-r:r),i=Math.max(i,n),s[t]=i,e.applyColWidths()}}(this),dragEnd:function(t){return function(){return o.removeClass("fc-active")}}(this)}),i.startInteraction(e)},e.prototype.applyColWidths=function(){var t,e,r,o,s,i,n,l,u,h,a,c,p,d,f,g,y;for(r=this.colMinWidths,s=this.colWidths,t=!0,e=!1,y=0,h=0,p=s.length;h0?r[e-1]:null,e"),this.trHash[l]=i,n.push(i[0]),o="render"+K(l)+"Content",this[o]&&this[o](i),e?e.trHash[l].after(i):s.prepend(i)}return this.trs=t(n).on("click",".fc-expander",Mt(this,"toggleExpanded")),this.isRendered=!0},e.prototype.unrender=function(){var e,r,o,s;if(this.isRendered){e=this.trHash;for(o in e)r=e[o],s="unrender"+K(o)+"Content",this[s]&&this[s](r);return this.trHash={},this.trs.remove(),this.trs=t(),this.isRendered=!1,this.isShown=!1,this.hidden()}},e.prototype.recursivelyUnrender=function(){var t,e,r,o,s;for(this.unrender(),o=this.children,s=[],e=0,r=o.length;e div:not(.fc-cell-content):first"),e=Math.max(o.height(),e)}}(this)),e},e.prototype.setTrInnerHeight=function(e){return t.each(this.trHash,function(t){return function(t,r){return ct(r).find("> div:not(.fc-cell-content):first").height(e)}}(this))},e.prototype.shown=function(){if(this.hasOwnRow)return this.rowShown(this)},e.prototype.hidden=function(){if(this.hasOwnRow)return this.rowHidden(this)},e.prototype.rowShown=function(t){return(this.parent||this.view).rowShown(t)},e.prototype.rowHidden=function(t){return(this.parent||this.view).rowHidden(t)},e.prototype.added=function(){if(this.hasOwnRow)return this.rowAdded(this)},e.prototype.removed=function(){if(this.hasOwnRow)return this.rowRemoved(this)},e.prototype.rowAdded=function(t){return(this.parent||this.view).rowAdded(t)},e.prototype.rowRemoved=function(t){return(this.parent||this.view).rowRemoved(t)},e}(),L=function(e){function r(t,e,o){this.groupSpec=e,this.groupValue=o,r.__super__.constructor.apply(this,arguments)}return Ot(r,e),r.prototype.groupSpec=null,r.prototype.groupValue=null,r.prototype.rowRemoved=function(t){if(r.__super__.rowRemoved.apply(this,arguments),t!==this&&!this.children.length)return this.remove()},r.prototype.renderGroupContentEl=function(){var e,r;return e=t('
').append(this.renderGroupTextEl()),r=this.groupSpec.render,"function"==typeof r&&(e=r(e,this.groupValue)||e),e},r.prototype.renderGroupTextEl=function(){var e,r;return r=this.groupValue||"",e=this.groupSpec.text,"function"==typeof e&&(r=e(r)||r),t('').text(r)},r}(z),g=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Ot(r,e),r.prototype.hasOwnRow=!0,r.prototype.renderSpreadsheetContent=function(e){var r;return r=this.renderGroupContentEl(),r.prepend(''),t('').attr("colspan",this.view.colSpecs.length).append(t("
").append(r)).appendTo(e)},r.prototype.renderEventContent=function(t){return t.append('
')},r}(L),U=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return Ot(r,e),r.prototype.rowspan=0,r.prototype.leadingTr=null,r.prototype.groupTd=null,r.prototype.rowShown=function(t){return this.rowspan+=1,this.renderRowspan(),r.__super__.rowShown.apply(this,arguments)},r.prototype.rowHidden=function(t){return this.rowspan-=1,this.renderRowspan(),r.__super__.rowHidden.apply(this,arguments)},r.prototype.renderRowspan=function(){var e;return this.rowspan?(this.groupTd||(this.groupTd=t('').append(this.renderGroupContentEl())),this.groupTd.attr("rowspan",this.rowspan),e=this.getLeadingRow().getTr("spreadsheet"),e!==this.leadingTr?(e&&e.prepend(this.groupTd),this.leadingTr=e):void 0):(this.groupTd&&(this.groupTd.remove(),this.groupTd=null),this.leadingTr=null)},r}(L),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Ot(e,t),e.prototype.hasOwnRow=!0,e.prototype.segContainerEl=null,e.prototype.segContainerHeight=null,e.prototype.innerEl=null,e.prototype.bgSegContainerEl=null,e.prototype.isSegsRendered=!1,e.prototype.isBusinessHourSegsRendered=!1,e.prototype.businessHourSegs=null,e.prototype.bgSegs=null,e.prototype.fgSegs=null,e.prototype.renderEventContent=function(t){return t.html('
'),this.segContainerEl=t.find(".fc-event-container"),this.innerEl=this.bgSegContainerEl=t.find("td > div"),this.ensureSegsRendered()},e.prototype.ensureSegsRendered=function(){if(!this.isSegsRendered)return this.ensureBusinessHourSegsRendered(),this.bgSegs&&this.view.timeGrid.renderFillInContainer("bgEvent",this,this.bgSegs),this.fgSegs&&this.view.timeGrid.renderFgSegsInContainers([[this,this.fgSegs]]),this.isSegsRendered=!0},e.prototype.ensureBusinessHourSegsRendered=function(){if(this.businessHourSegs&&!this.isBusinessHourSegsRendered)return this.view.timeGrid.renderFillInContainer("businessHours",this,this.businessHourSegs,"bgevent"),this.isBusinessHourSegsRendered=!0},e.prototype.unrenderEventContent=function(){return this.clearBusinessHourSegs(),this.bgSegs=null,this.fgSegs=null,this.isSegsRendered=!1},e.prototype.clearBusinessHourSegs=function(){var t,e,r,o;if(this.businessHourSegs){for(r=this.businessHourSegs,t=0,e=r.length;t0?this.enableExpanding():this.disableExpanding(),this.view.trigger("resourceRender",this.resource,this.resource,this.getTr("spreadsheet").find("> td"),this.getTr("event").find("> td"))},r.prototype.renderEventContent=function(t){return r.__super__.renderEventContent.apply(this,arguments),t.attr("data-resource-id",this.resource.id)},r.prototype.renderSpreadsheetContent=function(e){var r,o,s,i,n,l,u,h,a;for(u=this.resource,l=this.view.colSpecs,i=0,n=l.length;i'+(r.isMain?this.renderGutterHtml():"")+''+(a?yt(a):" ")+"
"),"function"==typeof r.render&&(o=r.render(u,o,s)||o),h=t('').append(o),r.isMain&&h.wrapInner("
"),e.append(h));return e.attr("data-resource-id",u.id)},r.prototype.renderGutterHtml=function(){var t,e,r,o;for(t="",e=r=0,o=this.depth;r';return t+=''},r}(p),d.views.timeline.resourceClass=M,E=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Ot(e,t),e.mixin(W),e.prototype.timeGridClass=F,e.prototype.dayGridClass=T,e.prototype.renderHead=function(){return e.__super__.renderHead.apply(this,arguments),this.timeGrid.processHeadResourceEls(this.headContainerEl)},e.prototype.setResources=function(t){return this.timeGrid.setResources(t),this.dayGrid&&this.dayGrid.setResources(t),this.clearView(),this.displayView()},e.prototype.unsetResources=function(t){if(this.clearEvents(),this.timeGrid.unsetResources(),this.dayGrid&&this.dayGrid.unsetResources(),!t)return this.clearView(),this.displayView()},e}(d.AgendaView),d.views.agenda.queryResourceClass=function(t){var e;if(null!=(e=t.options.groupByResource||t.options.groupByDateAndResource)?e:1===t.duration.as("days"))return E},H=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Ot(e,t),e.mixin(W),e.prototype.dayGridClass=T,e.prototype.renderHead=function(){return e.__super__.renderHead.apply(this,arguments),this.dayGrid.processHeadResourceEls(this.headContainerEl)},e.prototype.setResources=function(t){return this.dayGrid.setResources(t),this.clearView(),this.displayView()},e.prototype.unsetResources=function(t){if(this.clearEvents(),this.dayGrid.unsetResources(),!t)return this.clearView(),this.displayView()},e}(d.BasicView),x=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Ot(e,t),e.mixin(W),e.prototype.dayGridClass=T,e.prototype.renderHead=function(){return e.__super__.renderHead.apply(this,arguments),this.dayGrid.processHeadResourceEls(this.headContainerEl)},e.prototype.setResources=function(t){return this.dayGrid.setResources(t),this.clearView(),this.displayView()},e.prototype.unsetResources=function(){return this.clearEvents(),this.dayGrid.unsetResources(),this.clearView(),this.displayView()},e}(d.MonthView),d.views.basic.queryResourceClass=function(t){var e;if(null!=(e=t.options.groupByResource||t.options.groupByDateAndResource)?e:1===t.duration.as("days"))return H},d.views.month.queryResourceClass=function(t){if(t.options.groupByResource||t.options.groupByDateAndResource)return x; },C="2016-09-04",Y={years:1,weeks:1},y="http://fullcalendar.io/scheduler/license/",b=["GPL-My-Project-Is-Open-Source","CC-Attribution-NonCommercial-NoDerivatives"],Gt=function(t,e){if(!mt(window.location.href)&&!Rt(t)&&!st(e))return Wt('Please use a valid license key. More Info',e)},Rt=function(r){var o,s,i,n;return t.inArray(r,b)!==-1||(s=(r||"").match(/^(\d+)\-fcs\-(\d+)$/),!!(s&&10===s[1].length&&(i=e.utc(1e3*parseInt(s[2])),n=e.utc(d.mockSchedulerReleaseDate||C),n.isValid()&&(o=n.clone().subtract(Y),i.isAfter(o)))))},mt=function(t){return Boolean(t.match(/\w+\:\/\/fullcalendar\.io\/|\/demos\/[\w-]+\.html$/))},Wt=function(e,r){return r.append(t('
').html(e))},void(st=function(t){return t.find(".fc-license-message").length>=1}))});