/*! * FullCalendar v2.2.3 * Docs & License: http://arshaw.com/fullcalendar/ * (c) 2013 Adam Shaw */ !function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):a(jQuery,moment)}(function(a,b){function c(a,b){return b.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")}function d(a,b){var c=b.longDateFormat("L");return c=c.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),a.isRTL?c+=" ddd":c="ddd "+c,c}function e(a){f(Gb,a)}function f(b){function c(c,d){a.isPlainObject(d)&&a.isPlainObject(b[c])&&!g(c)?b[c]=f({},b[c],d):void 0!==d&&(b[c]=d)}for(var d=1;d").prependTo(c),ab=new i(X,Z),bb=ab.render(),bb&&c.prepend(bb),m(Z.defaultView),Z.handleWindowResize&&(gb=J(r,Z.windowResizeDelay),a(window).resize(gb))}function k(){eb&&eb.destroy(),ab.destroy(),cb.remove(),c.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),a(window).unbind("resize",gb)}function l(){return c.is(":visible")}function m(a){n(0,a)}function n(b,c){lb++,eb&&c&&eb.name!==c&&(ab.deactivateButton(eb.name),Q(),eb.start&&eb.destroy(),eb.el.remove(),eb=null),!eb&&c&&(eb=new Kb[c](X),eb.el=a("
").appendTo(cb),ab.activateButton(c)),eb&&(b&&(hb=eb.incrementDate(hb,b)),eb.start&&!b&&hb.isWithin(eb.intervalStart,eb.intervalEnd)||l()&&(Q(),eb.start&&eb.destroy(),eb.render(hb),R(),z(),A(),v())),R(),lb--}function o(a){return l()?(a&&q(),lb++,eb.updateSize(!0),lb--,!0):void 0}function p(){l()&&q()}function q(){fb="number"==typeof Z.contentHeight?Z.contentHeight:"number"==typeof Z.height?Z.height-(bb?bb.outerHeight(!0):0):Math.round(cb.width()/Math.max(Z.aspectRatio,.5))}function r(a){!lb&&a.target===window&&eb.start&&o(!0)&&eb.trigger("windowResize",kb)}function s(){u(),w()}function t(){l()&&(Q(),eb.destroyEvents(),eb.renderEvents(mb),R())}function u(){Q(),eb.destroyEvents(),R()}function v(){!Z.lazyFetching||ib(eb.start,eb.end)?w():t()}function w(){jb(eb.start,eb.end)}function x(a){mb=a,t()}function y(){t()}function z(){ab.updateTitle(eb.title)}function A(){var a=X.getNow();a.isWithin(eb.intervalStart,eb.intervalEnd)?ab.disableButton("today"):ab.enableButton("today")}function B(a,b){a=X.moment(a),b=b?X.moment(b):a.clone().add(a.hasTime()?X.defaultTimedEventDuration:X.defaultAllDayEventDuration),eb.select(a,b)}function D(){eb&&eb.unselect()}function E(){n(-1)}function F(){n(1)}function G(){hb.add(-1,"years"),n()}function I(){hb.add(1,"years"),n()}function K(){hb=X.getNow(),n()}function L(a){hb=X.moment(a),n()}function M(a){hb.add(b.duration(a)),n()}function N(a,b){var c,d;b&&void 0!==Kb[b]||(b=b||"day",c=ab.getViewsWithButtons().join(" "),d=c.match(new RegExp("\\w+"+H(b))),d||(d=c.match(/\w+Day/)),b=d?d[0]:"agendaDay"),hb=a,m(b)}function O(){return hb.clone()}function Q(){cb.css({width:"100%",height:cb.height(),overflow:"hidden"})}function R(){cb.css({width:"",height:"",overflow:""})}function T(){return X}function U(){return eb}function V(a,b){return void 0===b?Z[a]:void(("height"==a||"contentHeight"==a||"aspectRatio"==a)&&(Z[a]=b,o(!0)))}function W(a,b){return Z[a]?Z[a].apply(b||kb,Array.prototype.slice.call(arguments,2)):void 0}var X=this;d=d||{};var Y,Z=f({},Gb,d);Y=Z.lang in Hb?Hb[Z.lang]:Hb[Gb.lang],Y&&(Z=f({},Gb,Y,d)),Z.isRTL&&(Z=f({},Gb,Ib,Y||{},d)),X.options=Z,X.render=g,X.destroy=k,X.refetchEvents=s,X.reportEvents=x,X.reportEventChange=y,X.rerenderEvents=t,X.changeView=m,X.select=B,X.unselect=D,X.prev=E,X.next=F,X.prevYear=G,X.nextYear=I,X.today=K,X.gotoDate=L,X.incrementDate=M,X.zoomTo=N,X.getDate=O,X.getCalendar=T,X.getView=U,X.option=V,X.trigger=W;var $=C(e(Z.lang));if(Z.monthNames&&($._months=Z.monthNames),Z.monthNamesShort&&($._monthsShort=Z.monthNamesShort),Z.dayNames&&($._weekdays=Z.dayNames),Z.dayNamesShort&&($._weekdaysShort=Z.dayNamesShort),null!=Z.firstDay){var _=C($._week);_.dow=Z.firstDay,$._week=_}X.defaultAllDayEventDuration=b.duration(Z.defaultAllDayEventDuration),X.defaultTimedEventDuration=b.duration(Z.defaultTimedEventDuration),X.moment=function(){var a;return"local"===Z.timezone?(a=Jb.moment.apply(null,arguments),a.hasTime()&&a.local()):a="UTC"===Z.timezone?Jb.moment.utc.apply(null,arguments):Jb.moment.parseZone.apply(null,arguments),"_locale"in a?a._locale=$:a._lang=$,a},X.getIsAmbigTimezone=function(){return"local"!==Z.timezone&&"UTC"!==Z.timezone},X.rezoneDate=function(a){return X.moment(a.toArray())},X.getNow=function(){var a=Z.now;return"function"==typeof a&&(a=a()),X.moment(a)},X.calculateWeekNumber=function(a){var b=Z.weekNumberCalculation;return"function"==typeof b?b(a):"local"===b?a.week():"ISO"===b.toUpperCase()?a.isoWeek():void 0},X.getEventEnd=function(a){return a.end?a.end.clone():X.getDefaultEventEnd(a.allDay,a.start)},X.getDefaultEventEnd=function(a,b){var c=b.clone();return a?c.stripTime().add(X.defaultAllDayEventDuration):c.add(X.defaultTimedEventDuration),X.getIsAmbigTimezone()&&c.stripZone(),c},X.formatRange=function(a,b,c){return"function"==typeof c&&(c=c.call(X,Z,$)),S(a,b,c,null,Z.isRTL)},X.formatDate=function(a,b){return"function"==typeof b&&(b=b.call(X,Z,$)),P(a,b)},j.call(X,Z);var ab,bb,cb,db,eb,fb,gb,hb,ib=X.isFetchNeeded,jb=X.fetchEvents,kb=c[0],lb=0,mb=[];hb=null!=Z.defaultDate?X.moment(Z.defaultDate):X.getNow(),X.getSuggestedViewHeight=function(){return void 0===fb&&p(),fb},X.isHeightAuto=function(){return"auto"===Z.contentHeight||"auto"===Z.height}}function i(b,c){function d(){var b=c.header;return n=c.theme?"ui":"fc",b?o=a("
").append(f("left")).append(f("right")).append(f("center")).append('
'):void 0}function e(){o.remove()}function f(d){var e=a('
'),f=c.header[d];return f&&a.each(f.split(" "),function(){var d,f=a(),g=!0;a.each(this.split(","),function(d,e){var h,i,j,k,l,m,o,q;"title"==e?(f=f.add(a("

 

")),g=!1):(b[e]?h=function(){b[e]()}:Kb[e]&&(h=function(){b.changeView(e)},p.push(e)),h&&(i=y(c.themeButtonIcons,e),j=y(c.buttonIcons,e),k=y(c.defaultButtonText,e),l=y(c.buttonText,e),m=l?F(l):i&&c.theme?"":j&&!c.theme?"":F(k||e),o=["fc-"+e+"-button",n+"-button",n+"-state-default"],q=a('").click(function(){q.hasClass(n+"-state-disabled")||(h(),(q.hasClass(n+"-state-active")||q.hasClass(n+"-state-disabled"))&&q.removeClass(n+"-state-hover"))}).mousedown(function(){q.not("."+n+"-state-active").not("."+n+"-state-disabled").addClass(n+"-state-down")}).mouseup(function(){q.removeClass(n+"-state-down")}).hover(function(){q.not("."+n+"-state-active").not("."+n+"-state-disabled").addClass(n+"-state-hover")},function(){q.removeClass(n+"-state-hover").removeClass(n+"-state-down")}),f=f.add(q)))}),g&&f.first().addClass(n+"-corner-left").end().last().addClass(n+"-corner-right").end(),f.length>1?(d=a("
"),g&&d.addClass("fc-button-group"),d.append(f),e.append(d)):e.append(f)}),e}function g(a){o.find("h2").text(a)}function h(a){o.find(".fc-"+a+"-button").addClass(n+"-state-active")}function i(a){o.find(".fc-"+a+"-button").removeClass(n+"-state-active")}function j(a){o.find(".fc-"+a+"-button").attr("disabled","disabled").addClass(n+"-state-disabled")}function k(a){o.find(".fc-"+a+"-button").removeAttr("disabled").removeClass(n+"-state-disabled")}function l(){return p}var m=this;m.render=d,m.destroy=e,m.updateTitle=g,m.activateButton=h,m.deactivateButton=i,m.disableButton=j,m.enableButton=k,m.getViewsWithButtons=l;var n,o=a(),p=[]}function j(c){function d(a,b){return!M||a.clone().stripZone()N.clone().stripZone()}function e(a,b){M=a,N=b,X=[];var c=++U,d=T.length;V=d;for(var e=0;d>e;e++)f(T[e],c)}function f(b,c){g(b,function(d){var e,f,g,h=a.isArray(b.events);if(c==U){if(d)for(e=0;e=b&&(b=null),e.allDay=d,e.start=a,e.end=b||null,c.forceEventDuration&&!e.end&&(e.end=R(e)),k(e)}function w(b,c,d){var e,f,g,h,i,j,k,l,m,n=[];if(c=c||M,d=d||N,b)if(b._recurring){if(f=b.dow)for(e={},g=0;g=d&&e>=c}function K(a,b,c){var d=a.start.clone().stripZone(),e=L.getEventEnd(a).stripZone();return e>b&&c>d}var L=this;L.isFetchNeeded=d,L.fetchEvents=e,L.addEventSource=h,L.removeEventSource=j,L.updateEvent=n,L.renderEvent=p,L.removeEvents=q,L.clientEvents=r,L.mutateEvent=x;var M,N,O=L.trigger,P=L.getView,Q=L.reportEvents,R=L.getEventEnd,S={events:[]},T=[S],U=0,V=0,W=0,X=[];a.each((c.events?[c.events]:[]).concat(c.eventSources||[]),function(a,b){var c=i(b);c&&T.push(c)});var Y=["title","url","allDay","className","editable","color","backgroundColor","borderColor","textColor"];L.getBusinessHoursEvents=A,L.isEventAllowedInRange=C,L.isSelectionAllowedInRange=F,L.isExternalDragAllowedInRange=G}function k(a){a._allDay=a.allDay,a._start=a.start.clone(),a._end=a.end?a.end.clone():null}function l(a,b){b.left&&a.css({"border-left-width":1,"margin-left":b.left-1}),b.right&&a.css({"border-right-width":1,"margin-right":b.right-1})}function m(a){a.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function n(){a("body").addClass("fc-not-allowed")}function o(){a("body").removeClass("fc-not-allowed")}function p(b,c,d){var e=Math.floor(c/b.length),f=Math.floor(c-e*(b.length-1)),g=[],h=[],i=[],j=0;q(b),b.each(function(c,d){var k=c===b.length-1?f:e,l=a(d).outerHeight(!0);k>l?(g.push(d),h.push(l),i.push(a(d).height())):j+=l}),d&&(c-=j,e=Math.floor(c/g.length),f=Math.floor(c-e*(g.length-1))),a(g).each(function(b,c){var d=b===g.length-1?f:e,j=h[b],k=i[b],l=d-(j-k);d>j&&a(c).height(l)})}function q(a){a.height("")}function r(b){var c=0;return b.find("> *").each(function(b,d){var e=a(d).outerWidth();e>c&&(c=e)}),c++,b.width(c),c}function s(a,b){return a.height(b).addClass("fc-scroller"),a[0].scrollHeight-1>a[0].clientHeight?!0:(t(a),!1)}function t(a){a.height("").removeClass("fc-scroller")}function u(b){var c=b.css("position"),d=b.parents().filter(function(){var b=a(this);return/(auto|scroll)/.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&d.length?d:a(b[0].ownerDocument||document)}function v(a){var b=a.offset().left,c=b+a.width(),d=a.children(),e=d.offset().left,f=e+d.outerWidth();return{left:e-b,right:c-f}}function w(a){return 1==a.which&&!a.ctrlKey}function x(a,b,c,d){var e,f,g,h;return b>c&&d>a?(a>=c?(e=a.clone(),g=!0):(e=c.clone(),g=!1),d>=b?(f=b.clone(),h=!0):(f=d.clone(),h=!1),{start:e,end:f,isStart:g,isEnd:h}):void 0}function y(a,b){if(a=a||{},void 0!==a[b])return a[b];for(var c,d=b.split(/(?=[A-Z])/),e=d.length-1;e>=0;e--)if(c=a[d[e].toLowerCase()],void 0!==c)return c;return a["default"]}function z(a,c){return b.duration({days:a.clone().stripTime().diff(c.clone().stripTime(),"days"),ms:a.time()-c.time()})}function A(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function B(a){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(a)}function C(a){var b=function(){};return b.prototype=a,new b}function D(b,c,d){if(a.isFunction(b)&&(b=[b]),b){var e,f;for(e=0;e/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function G(a){return a.replace(/&.*?;/g,"")}function H(a){return a.charAt(0).toUpperCase()+a.slice(1)}function I(a,b){return a-b}function J(a,b){var c,d,e,f,g=function(){var h=+new Date-f;b>h&&h>0?c=setTimeout(g,b-h):(c=null,a.apply(e,d),c||(e=d=null))};return function(){e=this,d=arguments,f=+new Date,c||(c=setTimeout(g,b))}}function K(c,d,e){var f,g,h,i,j=c[0],k=1==c.length&&"string"==typeof j;return b.isMoment(j)?(i=b.apply(null,c),M(j,i)):A(j)||void 0===j?i=b.apply(null,c):(f=!1,g=!1,k?Rb.test(j)?(j+="-01",c=[j],f=!0,g=!0):(h=Sb.exec(j))&&(f=!h[5],g=!0):a.isArray(j)&&(g=!0),i=d?b.utc.apply(b,c):b.apply(null,c),f?(i._ambigTime=!0,i._ambigZone=!0):e&&(g?i._ambigZone=!0:k&&i.zone(j))),i._fullCalendar=!0,i}function L(a,b){var c,d=[],e=!1,f=!1;for(c=0;cg&&(f=U(a,b,c[h]),f!==!1);h--)k=f+k;for(i=g;h>=i;i++)l+=R(a,c[i]),m+=R(b,c[i]);return(l||m)&&(n=e?m+d+l:l+d+m),j+n+k}function U(a,b,c){var d,e;return"string"==typeof c?c:(d=c.token)&&(e=Wb[d.charAt(0)],e&&a.isSame(b,e))?O(a,d):!1}function V(a){return a in Xb?Xb[a]:Xb[a]=W(a)}function W(a){for(var b,c=[],d=/\[([^\]]*)\]|\(([^\)]*)\)|(LT|(\w)\4*o?)|([^\w\[\(]+)/g;b=d.exec(a);)b[1]?c.push(b[1]):b[2]?c.push({maybe:W(b[2])}):b[3]?c.push({token:b[3]}):b[5]&&c.push(b[5]);return c}function X(a){this.options=a||{}}function Y(a){this.grid=a}function Z(a){this.coordMaps=a}function $(a,b){this.coordMap=a,this.options=b||{}}function _(a,b){return a||b?a&&b?a.grid===b.grid&&a.row===b.row&&a.col===b.col:!1:!0}function ab(b,c){this.options=c=c||{},this.sourceEl=b,this.parentEl=c.parentEl?a(c.parentEl):b.parent()}function bb(a){this.view=a}function cb(a){bb.call(this,a),this.coordMap=new Y(this),this.elsByFill={}}function db(a){var b=fb(a);return"background"===b||"inverse-background"===b}function eb(a){return"inverse-background"===fb(a)}function fb(a){return E((a.source||{}).rendering,a.rendering)}function gb(a){var b,c,d={};for(b=0;b=a.leftCol)return!0;return!1}function lb(a,b){return a.leftCol-b.leftCol}function mb(a){cb.call(this,a)}function nb(a){var b,c,d;if(a.sort(ib),b=ob(a),pb(b),c=b[0]){for(d=0;db.top&&a.topk;k++){var l=k*d,m=l+d-1,n=Math.max(i,l),o=Math.min(j,m);if(o>=n){var q=u(n),r=u(o),v=[q.col,r.col].sort(I),x=p(n)==g,y=p(o)+1==h;e.push({row:k,leftCol:v[0],rightCol:v[1],isStart:x,isEnd:y})}}return e}function w(a,b){var c,d,e=a.clone().stripTime();return b&&(c=b.clone().stripTime(),d=+b.time(),d&&d>=C&&c.add(1,"days")),(!b||e>=c)&&(c=e.clone().add(1,"days")),{start:e,end:c}}function x(a){var b=w(a.start,a.end);return b.end.diff(b.start,"days")>1}var z=this;z.calendar=c,z.opt=d,z.trigger=e,z.isEventDraggable=f,z.isEventResizable=h,z.eventDrop=i,z.eventResize=j;var A=c.reportEventChange,B=c.options,C=b.duration(B.nextDayThreshold);z.init(),z.getEventTimeText=function(a,b){var e,f;return"object"==typeof a&&"object"==typeof b?(e=a,f=b,b=arguments[2]):(e=a.start,f=a.end),b=b||d("timeFormat"),f&&d("displayEventEnd")?c.formatRange(e,f,b):c.formatDate(e,b)},z.isHiddenDay=k,z.skipHiddenDays=m,z.getCellsPerWeek=l,z.dateToCell=r,z.dateToDayOffset=s,z.dayOffsetToCellOffset=t,z.cellOffsetToCell=u,z.cellToDate=n,z.cellToCellOffset=o,z.cellOffsetToDayOffset=p,z.dayOffsetToDate=q,z.rangeToSegments=v,z.isMultiDayEvent=x;var D,F=d("hiddenDays")||[],G=[],H=[],J=[],K=d("isRTL");!function(){d("weekends")===!1&&F.push(0,6);for(var b=0,c=0;7>b;b++)H[b]=c,G[b]=-1!=a.inArray(b,F),G[b]||(J[c]=b,c++);if(D=c,!D)throw"invalid hiddenDays"}()}function wb(c){var d,e,f,g,h=Jb.dataAttrPrefix;return h&&(h+="-"),d=c.data(h+"event")||null,d&&(d="object"==typeof d?a.extend({},d):{},e=d.start,null==e&&(e=d.time),f=d.duration,g=d.stick,delete d.start,delete d.time,delete d.duration,delete d.stick),null==e&&(e=c.data(h+"start")),null==e&&(e=c.data(h+"time")),null==f&&(f=c.data(h+"duration")),null==g&&(g=c.data(h+"stick")),e=null!=e?b.duration(e):null,f=null!=f?b.duration(f):null,g=Boolean(g),{eventProps:d,startTime:e,duration:f,stick:g}}function xb(a){vb.call(this,a),this.dayGrid=new jb(this),this.coordMap=this.dayGrid.coordMap}function yb(a){xb.call(this,a)}function zb(a){xb.call(this,a)}function Ab(a){xb.call(this,a)}function Bb(a,b){return b.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")}function Cb(a,b){return b.longDateFormat("LT").replace(/\s*a$/i,"")}function Db(a){vb.call(this,a),this.timeGrid=new mb(this),this.opt("allDaySlot")?(this.dayGrid=new jb(this),this.coordMap=new Z([this.dayGrid.coordMap,this.timeGrid.coordMap])):this.coordMap=this.timeGrid.coordMap}function Eb(a){Db.call(this,a)}function Fb(a){Db.call(this,a)}var Gb={lang:"en",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,titleFormat:{month:"MMMM YYYY",week:"ll",day:"LL"},columnFormat:{month:"ddd",week:d,day:"dddd"},timeFormat:{"default":c},displayEventEnd:{month:!1,basicWeek:!1,"default":!0},isRTL:!1,defaultButtonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:200},Hb={en:{columnFormat:{week:"ddd M/D"},dayPopoverFormat:"dddd, MMMM D"}},Ib={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}},Jb=a.fullCalendar={version:"2.2.3"},Kb=Jb.views={};a.fn.fullCalendar=function(b){var c=Array.prototype.slice.call(arguments,1),d=this;return this.each(function(e,f){var g,i=a(f),j=i.data("fullCalendar");"string"==typeof b?j&&a.isFunction(j[b])&&(g=j[b].apply(j,c),e||(d=g),"destroy"===b&&i.removeData("fullCalendar")):j||(j=new h(i,b),i.data("fullCalendar",j),j.render())}),d},Jb.langs=Hb,Jb.datepickerLang=function(b,c,d){var e=Hb[b];e||(e=Hb[b]={}),f(e,{isRTL:d.isRTL,weekNumberTitle:d.weekHeader,titleFormat:{month:d.showMonthAfterYear?"YYYY["+d.yearSuffix+"] MMMM":"MMMM YYYY["+d.yearSuffix+"]"},defaultButtonText:{prev:G(d.prevText),next:G(d.nextText),today:G(d.currentText)}}),a.datepicker&&(a.datepicker.regional[c]=a.datepicker.regional[b]=d,a.datepicker.regional.en=a.datepicker.regional[""],a.datepicker.setDefaults(d))},Jb.lang=function(a,b){var c;b&&(c=Hb[a],c||(c=Hb[a]={}),f(c,b||{})),Gb.lang=a},Jb.sourceNormalizers=[],Jb.sourceFetchers=[];var Lb={dataType:"json",cache:!1},Mb=1,Nb=["sun","mon","tue","wed","thu","fri","sat"];Jb.applyAll=D;var Ob,Pb,Qb,Rb=/^\s*\d{4}-\d\d$/,Sb=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,Tb=b.fn,Ub=a.extend({},Tb);Jb.moment=function(){return K(arguments)},Jb.moment.utc=function(){var a=K(arguments,!0);return a.hasTime()&&a.utc(),a},Jb.moment.parseZone=function(){return K(arguments,!0,!0)},Tb.clone=function(){var a=Ub.clone.apply(this,arguments);return M(this,a),this._fullCalendar&&(a._fullCalendar=!0),a},Tb.time=function(a){if(!this._fullCalendar)return Ub.time.apply(this,arguments);if(null==a)return b.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,b.isDuration(a)||b.isMoment(a)||(a=b.duration(a));var c=0;return b.isDuration(a)&&(c=24*Math.floor(a.asDays())),this.hours(c+a.hours()).minutes(a.minutes()).seconds(a.seconds()).milliseconds(a.milliseconds())},Tb.stripTime=function(){var a=this.toArray();return this.utc(),Pb(this,a.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0,this},Tb.hasTime=function(){return!this._ambigTime},Tb.stripZone=function(){var a=this.toArray(),b=this._ambigTime;return this.utc(),Pb(this,a),b&&(this._ambigTime=!0),this._ambigZone=!0,this},Tb.hasZone=function(){return!this._ambigZone},Tb.zone=function(a){return null!=a&&(this._ambigTime=!1,this._ambigZone=!1),Ub.zone.apply(this,arguments)},Tb.local=function(){var a=this.toArray(),b=this._ambigZone;return Ub.local.apply(this,arguments),b&&Qb(this,a),this},Tb.format=function(){return this._fullCalendar&&arguments[0]?P(this,arguments[0]):this._ambigTime?O(this,"YYYY-MM-DD"):this._ambigZone?O(this,"YYYY-MM-DD[T]HH:mm:ss"):Ub.format.apply(this,arguments)},Tb.toISOString=function(){return this._ambigTime?O(this,"YYYY-MM-DD"):this._ambigZone?O(this,"YYYY-MM-DD[T]HH:mm:ss"):Ub.toISOString.apply(this,arguments)},Tb.isWithin=function(a,b){var c=L([this,a,b]);return c[0]>=c[1]&&c[0]').addClass(c.className||"").css({top:0,left:0}).append(c.content).appendTo(c.parentEl),this.el.on("click",".fc-close",function(){b.hide()}),c.autoHide&&a(document).on("mousedown",this.documentMousedownProxy=a.proxy(this,"documentMousedown"))},documentMousedown:function(b){this.el&&!a(b.target).closest(this.el).length&&this.hide()},destroy:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),a(document).off("mousedown",this.documentMousedownProxy) },position:function(){var b,c,d,e,f,g=this.options,h=this.el.offsetParent().offset(),i=this.el.outerWidth(),j=this.el.outerHeight(),k=a(window),l=u(this.el);e=g.top||0,f=void 0!==g.left?g.left:void 0!==g.right?g.right-i:0,l.is(window)||l.is(document)?(l=k,b=0,c=0):(d=l.offset(),b=d.top,c=d.left),b+=k.scrollTop(),c+=k.scrollLeft(),g.viewportConstrain!==!1&&(e=Math.min(e,b+l.outerHeight()-j-this.margin),e=Math.max(e,b+this.margin),f=Math.min(f,c+l.outerWidth()-i-this.margin),f=Math.max(f,c+this.margin)),this.el.css({top:e-h.top,left:f-h.left})},trigger:function(a){this.options[a]&&this.options[a].apply(this,Array.prototype.slice.call(arguments,1))}},Y.prototype={grid:null,rows:null,cols:null,containerEl:null,minX:null,maxX:null,minY:null,maxY:null,build:function(){this.grid.buildCoords(this.rows=[],this.cols=[]),this.computeBounds()},getCell:function(a,b){var c,d=null,e=this.rows,f=this.cols,g=-1,h=-1;if(this.inBounds(a,b)){for(c=0;c=e[c][0]&&b=f[c][0]&&a=0&&h>=0&&(d={row:g,col:h},d.grid=this.grid,d.date=this.grid.getCellDate(d))}return d},computeBounds:function(){var a;this.containerEl&&(a=this.containerEl.offset(),this.minX=a.left,this.maxX=a.left+this.containerEl.outerWidth(),this.minY=a.top,this.maxY=a.top+this.containerEl.outerHeight())},inBounds:function(a,b){return this.containerEl?a>=this.minX&&a=this.minY&&b=b*b&&this.startDrag(a)),this.isDragging&&this.drag(a)},startDrag:function(a){var b;this.isListening||this.startListening(),this.isDragging||(this.isDragging=!0,this.trigger("dragStart",a),b=this.getCell(a),b&&this.cellOver(b,!0))},drag:function(a){var b;this.isDragging&&(b=this.getCell(a),_(b,this.cell)||(this.cell&&this.cellOut(),b&&this.cellOver(b)),this.dragScroll(a))},cellOver:function(a){this.cell=a,this.date=a.date,this.trigger("cellOver",a,a.date)},cellOut:function(){this.cell&&(this.trigger("cellOut",this.cell),this.cell=null,this.date=null)},mouseup:function(a){this.stopDrag(a),this.stopListening(a)},stopDrag:function(a){this.isDragging&&(this.stopScrolling(),this.trigger("dragStop",a),this.isDragging=!1)},stopListening:function(b){this.isListening&&(this.scrollEl&&(this.scrollEl.off("scroll",this.scrollHandlerProxy),this.scrollHandlerProxy=null),a(document).off("mousemove",this.mousemoveProxy).off("mouseup",this.mouseupProxy).off("selectstart",this.preventDefault),this.mousemoveProxy=null,this.mouseupProxy=null,this.isListening=!1,this.trigger("listenStop",b),this.origCell=this.cell=null,this.origDate=this.date=null)},getCell:function(a){return this.coordMap.getCell(a.pageX,a.pageY)},trigger:function(a){this.options[a]&&this.options[a].apply(this,Array.prototype.slice.call(arguments,1))},preventDefault:function(a){a.preventDefault()},computeScrollBounds:function(){var a,b=this.scrollEl;b&&(a=b.offset(),this.scrollBounds={top:a.top,left:a.left,bottom:a.top+b.outerHeight(),right:a.left+b.outerWidth()})},dragScroll:function(a){var b,c,d,e,f=this.scrollSensitivity,g=this.scrollBounds,h=0,i=0;g&&(b=(f-(a.pageY-g.top))/f,c=(f-(g.bottom-a.pageY))/f,d=(f-(a.pageX-g.left))/f,e=(f-(g.right-a.pageX))/f,b>=0&&1>=b?h=b*this.scrollSpeed*-1:c>=0&&1>=c&&(h=c*this.scrollSpeed),d>=0&&1>=d?i=d*this.scrollSpeed*-1:e>=0&&1>=e&&(i=e*this.scrollSpeed)),this.setScrollVel(h,i)},setScrollVel:function(b,c){this.scrollTopVel=b,this.scrollLeftVel=c,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(a.proxy(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var a=this.scrollEl;this.scrollTopVel<0?a.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&a.scrollTop()+a[0].clientHeight>=a[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?a.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&a.scrollLeft()+a[0].clientWidth>=a[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var a=this.scrollEl,b=this.scrollIntervalMs/1e3;this.scrollTopVel&&a.scrollTop(a.scrollTop()+this.scrollTopVel*b),this.scrollLeftVel&&a.scrollLeft(a.scrollLeft()+this.scrollLeftVel*b),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.stopScrolling()},stopScrolling:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.computeCoords())},scrollHandler:function(){this.scrollIntervalId||this.computeCoords()}},ab.prototype={options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,mouseY0:null,mouseX0:null,topDelta:null,leftDelta:null,mousemoveProxy:null,isFollowing:!1,isHidden:!1,isAnimating:!1,start:function(b){this.isFollowing||(this.isFollowing=!0,this.mouseY0=b.pageY,this.mouseX0=b.pageX,this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),a(document).on("mousemove",this.mousemoveProxy=a.proxy(this,"mousemove")))},stop:function(b,c){function d(){this.isAnimating=!1,e.destroyEl(),this.top0=this.left0=null,c&&c()}var e=this,f=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,a(document).off("mousemove",this.mousemoveProxy),b&&f&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:f,complete:d})):d())},getEl:function(){var a=this.el;return a||(this.sourceEl.width(),a=this.el=this.sourceEl.clone().css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}).appendTo(this.parentEl)),a},destroyEl:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var a,b;this.getEl(),null===this.top0&&(this.sourceEl.width(),a=this.sourceEl.offset(),b=this.el.offsetParent().offset(),this.top0=a.top-b.top,this.left0=a.left-b.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},mousemove:function(a){this.topDelta=a.pageY-this.mouseY0,this.leftDelta=a.pageX-this.mouseX0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}},bb.prototype={view:null,cellHtml:"",rowHtml:function(a,b){var c,d,e=this.view,f=this.getHtmlRenderer("cell",a),g="";for(b=b||0,c=0;c"+g+""},bookendCells:function(a,b,c){var d=this.view,e=this.getHtmlRenderer("intro",b)(c||0),f=this.getHtmlRenderer("outro",b)(c||0),g=d.opt("isRTL"),h=g?f:e,i=g?e:f;return"string"==typeof a?h+a+i:a.prepend(h).append(i)},getHtmlRenderer:function(a,b){var c,d,e,f,g=this.view;return c=a+"Html",b&&(d=b+H(a)+"Html"),d&&(f=g[d])?e=g:d&&(f=this[d])?e=this:(f=g[c])?e=g:(f=this[c])&&(e=this),"function"==typeof f?function(){return f.apply(e,arguments)||""}:function(){return f||""}}},cb.prototype=C(bb.prototype),a.extend(cb.prototype,{el:null,coordMap:null,cellDuration:null,elsByFill:null,render:function(){this.bindHandlers()},destroy:function(){},buildCoords:function(){},getCellDate:function(){},getCellDayEl:function(){},rangeToSegs:function(){},bindHandlers:function(){var b=this;this.el.on("mousedown",function(c){a(c.target).is(".fc-event-container *, .fc-more")||a(c.target).closest(".fc-popover").length||b.dayMousedown(c)}),this.bindSegHandlers()},dayMousedown:function(a){var b,c,d,e=this,f=this.view,g=f.calendar,h=f.opt("selectable"),i=null,j=new $(this.coordMap,{scroll:f.opt("dragScroll"),dragStart:function(){f.unselect()},cellOver:function(a,f){j.origDate&&(d=e.getCellDayEl(a),i=[f,j.origDate].sort(I),b=i[0],c=i[1].clone().add(e.cellDuration),h&&(g.isSelectionAllowedInRange(b,c)?e.renderSelection(b,c):(i=null,n())))},cellOut:function(){i=null,e.destroySelection(),o()},listenStop:function(a){i&&(i[0].isSame(i[1])&&f.trigger("dayClick",d[0],b,a),h&&f.reportSelection(b,c,a)),o()}});j.mousedown(a)},renderDrag:function(){},destroyDrag:function(){},renderResize:function(){},destroyResize:function(){},renderRangeHelper:function(a,b,c){var d,e=this.view;!b&&e.opt("forceEventDuration")&&(b=e.calendar.getDefaultEventEnd(!a.hasTime(),a)),d=c?C(c.event):{},d.start=a,d.end=b,d.allDay=!(a.hasTime()||b&&b.hasTime()),d.className=(d.className||[]).concat("fc-helper"),c||(d.editable=!1),this.renderHelper(d,c)},renderHelper:function(){},destroyHelper:function(){},renderSelection:function(a,b){this.renderHighlight(a,b)},destroySelection:function(){this.destroyHighlight()},renderHighlight:function(a,b){this.renderFill("highlight",this.rangeToSegs(a,b))},destroyHighlight:function(){this.destroyFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderFill:function(){},destroyFill:function(a){var b=this.elsByFill[a];b&&(b.remove(),delete this.elsByFill[a])},renderFillSegEls:function(b,c){var d,e=this,f=this[b+"SegEl"],g="",h=[];if(c.length){for(d=0;d"},headHtml:function(){return'
'+this.rowHtml("head")+"
"},headCellHtml:function(a,b,c){var d=this.view,e=d.calendar,f=d.opt("columnFormat");return''+F(e.formatDate(c,f))+""},bgCellHtml:function(a,b,c){var d=this.view,e=this.getDayClasses(c);return e.unshift("fc-day",d.widgetContentClass),''},getDayClasses:function(a){var b=this.view,c=b.calendar.getNow().stripTime(),d=["fc-"+Nb[a.day()]];return"month"===b.name&&a.month()!=b.intervalStart.month()&&d.push("fc-other-month"),a.isSame(c,"day")?d.push("fc-today",b.highlightStateClass):d.push(c>a?"fc-past":"fc-future"),d}}),a.extend(cb.prototype,{mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,segs:null,renderEvents:function(a){var b,c,d=this.eventsToSegs(a),e=[],f=[];for(b=0;b *",function(c){var e=a(this).data("fc-seg");return!e||b.isDraggingSeg||b.isResizingSeg?void 0:d.call(this,e,c)})})},triggerSegMouseover:function(a,b){this.mousedOverSeg||(this.mousedOverSeg=a,this.view.trigger("eventMouseover",a.el[0],a.event,b))},triggerSegMouseout:function(a,b){b=b||{},this.mousedOverSeg&&(a=a||this.mousedOverSeg,this.mousedOverSeg=null,this.view.trigger("eventMouseout",a.el[0],a.event,b))},segDragMousedown:function(a,b){var c,d,e=this,f=this.view,g=f.calendar,h=a.el,i=a.event,j=new ab(a.el,{parentEl:f.el,opacity:f.opt("dragOpacity"),revertDuration:f.opt("dragRevertDuration"),zIndex:2}),k=new $(f.coordMap,{distance:5,scroll:f.opt("dragScroll"),listenStart:function(a){j.hide(),j.start(a)},dragStart:function(b){e.triggerSegMouseout(a,b),e.isDraggingSeg=!0,f.hideEvent(i),f.trigger("eventDragStart",h[0],i,b,{})},cellOver:function(b,h){var l=a.cellDate||k.origDate,m=e.computeDraggedEventDates(a,l,h);c=m.start,d=m.end,g.isEventAllowedInRange(i,c,m.visibleEnd)?f.renderDrag(c,d,a)?j.hide():j.show():(c=null,j.show(),n())},cellOut:function(){c=null,f.destroyDrag(),j.show(),o()},dragStop:function(a){var b=c&&!c.isSame(i.start);j.stop(!b,function(){e.isDraggingSeg=!1,f.destroyDrag(),f.showEvent(i),f.trigger("eventDragStop",h[0],i,a,{}),b&&f.eventDrop(h[0],i,c,a)}),o()},listenStop:function(){j.stop()}});k.mousedown(b)},computeDraggedEventDates:function(a,b,c){var d,e,f,g,h,i=this.view,j=a.event,k=j.start,l=i.calendar.getEventEnd(j);return c.hasTime()===b.hasTime()?(d=z(c,b),e=k.clone().add(d),f=null===j.end?null:l.clone().add(d),g=j.allDay):(e=c,f=null,g=!c.hasTime()),h=f||i.calendar.getDefaultEventEnd(g,e),{start:e,end:f,visibleEnd:h}},segResizeMousedown:function(a,b){function c(){e.destroyResize(),f.showEvent(i)}var d,e=this,f=this.view,g=f.calendar,h=a.el,i=a.event,j=i.start,k=f.calendar.getEventEnd(i),l=null;d=new $(this.coordMap,{distance:5,scroll:f.opt("dragScroll"),dragStart:function(b){e.triggerSegMouseout(a,b),e.isResizingSeg=!0,f.trigger("eventResizeStart",h[0],i,b,{})},cellOver:function(b,d){d.isBefore(j)&&(d=j),l=d.clone().add(e.cellDuration),g.isEventAllowedInRange(i,j,l)?l.isSame(k)?(l=null,c()):(e.renderResize(j,l,a),f.hideEvent(i)):(l=null,c(),n())},cellOut:function(){l=null,c(),o()},dragStop:function(a){e.isResizingSeg=!1,c(),o(),f.trigger("eventResizeStop",h[0],i,a,{}),l&&f.eventResize(h[0],i,l,a)}}),d.mousedown(b)},getSegClasses:function(a,b,c){var d=a.event,e=["fc-event",a.isStart?"fc-start":"fc-not-start",a.isEnd?"fc-end":"fc-not-end"].concat(d.className,d.source?d.source.className:[]);return b&&e.push("fc-draggable"),c&&e.push("fc-resizable"),e},getEventSkinCss:function(a){var b=this.view,c=a.source||{},d=a.color,e=c.color,f=b.opt("eventColor"),g=a.backgroundColor||d||c.backgroundColor||e||b.opt("eventBackgroundColor")||f,h=a.borderColor||d||c.borderColor||e||b.opt("eventBorderColor")||f,i=a.textColor||c.textColor||b.opt("eventTextColor"),j=[];return g&&j.push("background-color:"+g),h&&j.push("border-color:"+h),i&&j.push("color:"+i),j.join(";")},eventsToSegs:function(a,b){var c,d=this.eventsToRanges(a),e=[];for(c=0;cj&&h.push({event:i,start:j,end:c.start}),j=c.end;return f>j&&h.push({event:i,start:j,end:f}),h},eventRangeToSegs:function(a,b){var c,d,e;for(c=b?b(a.start,a.end):this.rangeToSegs(a.start,a.end),d=0;d
'+this.rowHtml("day",a)+'
'+(this.numbersVisible?""+this.rowHtml("number",a)+"":"")+"
"},dayCellHtml:function(a,b,c){return this.bgCellHtml(a,b,c)},buildCoords:function(b,c){var d,e,f,g=this.view.colCnt;this.dayEls.slice(0,g).each(function(b,g){d=a(g),e=d.offset().left,b&&(f[1]=e),f=[e],c[b]=f}),f[1]=e+d.outerWidth(),this.rowEls.each(function(c,g){d=a(g),e=d.offset().top,c&&(f[1]=e),f=[e],b[c]=f}),f[1]=e+d.outerHeight()+this.bottomCoordPadding},getCellDate:function(a){return this.view.cellToDate(a)},getCellDayEl:function(a){return this.dayEls.eq(a.row*this.view.colCnt+a.col)},rangeToSegs:function(a,b){return this.view.rangeToSegments(a,b)},renderDrag:function(a,b,c){var d;return this.renderHighlight(a,b||this.view.calendar.getDefaultEventEnd(!0,a)),c&&!c.el.closest(this.el).length?(this.renderRangeHelper(a,b,c),d=this.view.opt("dragOpacity"),void 0!==d&&this.helperEls.css("opacity",d),!0):void 0},destroyDrag:function(){this.destroyHighlight(),this.destroyHelper()},renderResize:function(a,b,c){this.renderHighlight(a,b),this.renderRangeHelper(a,b,c)},destroyResize:function(){this.destroyHighlight(),this.destroyHelper()},renderHelper:function(b,c){var d,e=[],f=this.eventsToSegs([b]);f=this.renderFgSegEls(f),d=this.renderSegRows(f),this.rowEls.each(function(b,f){var g,h=a(f),i=a('
');g=c&&c.row===b?c.el.position().top:h.find(".fc-content-skeleton tbody").position().top,i.css("top",g).find("table").append(d[b].tbodyEl),h.append(i),e.push(i[0])}),this.helperEls=a(e)},destroyHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(b,c){var d,e,f,g=[];for(c=this.renderFillSegEls(b,c),d=0;d
'),e=d.find("tr"),g>0&&e.append(''),e.append(c.el.attr("colspan",h-g)),f>h&&e.append(''),this.bookendCells(e,b),d}}),a.extend(jb.prototype,{rowStructs:null,destroyEvents:function(){this.destroySegPopover(),cb.prototype.destroyEvents.apply(this,arguments)},getSegs:function(){return cb.prototype.getSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(b){var c=a.grep(b,function(a){return a.event.allDay});return cb.prototype.renderBgSegs.call(this,c)},renderFgSegs:function(b){var c;return b=this.renderFgSegEls(b),c=this.rowStructs=this.renderSegRows(b),this.rowEls.each(function(b,d){a(d).find(".fc-content-skeleton > table").append(c[b].tbodyEl)}),b},destroyFgSegs:function(){for(var a,b=this.rowStructs||[];a=b.pop();)a.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(a){var b,c,d=[];for(b=this.groupSegRows(a),c=0;c"),c=''+(F(f.title||"")||" ")+"",'
'+(e?c+" "+k:k+" "+c)+"
"+(h?'
':"")+""},renderSegRow:function(b,c){function d(b){for(;b>g;)k=(s[e-1]||[])[g],k?k.attr("rowspan",parseInt(k.attr("rowspan")||1,10)+1):(k=a(""),h.append(k)),r[e][g]=k,s[e][g]=k,g++}var e,f,g,h,i,j,k,l=this.view,m=l.colCnt,n=this.buildSegLevels(c),o=Math.max(1,n.length),p=a(""),q=[],r=[],s=[];for(e=0;o>e;e++){if(f=n[e],g=0,h=a(""),q.push([]),r.push([]),s.push([]),f)for(i=0;i').append(j.el),j.leftCol!=j.rightCol?k.attr("colspan",j.rightCol-j.leftCol+1):s[e][g]=k;g<=j.rightCol;)r[e][g]=k,q[e][g]=j,g++;h.append(k)}d(m),this.bookendCells(h,"eventSkeleton"),p.append(h)}return{row:b,tbodyEl:p,cellMatrix:r,segMatrix:q,segLevels:n,segs:c}},buildSegLevels:function(a){var b,c,d,e=[];for(a.sort(ib),b=0;be)return b;return!1},limitRow:function(b,c){function d(d){for(;d>y;)e={row:b,col:y},k=u.getCellSegs(e,c),k.length&&(n=g[c-1][y],t=u.renderMoreLink(e,k),s=a("
").append(t),n.append(s),x.push(s[0])),y++}var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=this,v=this.view,w=this.rowStructs[b],x=[],y=0;if(c&&c').attr("rowspan",o),k=m[q],e={row:b,col:j.leftCol+q},t=this.renderMoreLink(e,[j].concat(k)),s=a("
").append(t),r.append(s),p.push(r[0]),x.push(r[0]);n.addClass("fc-limited").after(a(p)),h.push(n[0])}}d(v.colCnt),w.moreEls=a(x),w.limitedEls=a(h)}},unlimitRow:function(a){var b=this.rowStructs[a];b.moreEls&&(b.moreEls.remove(),b.moreEls=null),b.limitedEls&&(b.limitedEls.removeClass("fc-limited"),b.limitedEls=null)},renderMoreLink:function(b,c){var d=this,e=this.view;return a('').text(this.getMoreLinkText(c.length)).on("click",function(f){var g=e.opt("eventLimitClick"),h=e.cellToDate(b),i=a(this),j=d.getCellDayEl(b),k=d.getCellSegs(b),l=d.resliceDaySegs(k,h),m=d.resliceDaySegs(c,h);"function"==typeof g&&(g=e.trigger("eventLimitClick",null,{date:h,dayEl:j,moreEl:i,segs:l,hiddenSegs:m},f)),"popover"===g?d.showSegPopover(h,b,i,l):"string"==typeof g&&e.calendar.zoomTo(h,g)})},showSegPopover:function(a,b,c,d){var e,f,g=this,h=this.view,i=c.parent();e=1==h.rowCnt?this.view.el:this.rowEls.eq(b.row),f={className:"fc-more-popover",content:this.renderSegPopoverContent(a,d),parentEl:this.el,top:e.offset().top,autoHide:!0,viewportConstrain:h.opt("popoverViewportConstrain"),hide:function(){g.segPopover.destroy(),g.segPopover=null,g.popoverSegs=null}},h.opt("isRTL")?f.right=i.offset().left+i.outerWidth()+1:f.left=i.offset().left-1,this.segPopover=new X(f),this.segPopover.show()},renderSegPopoverContent:function(b,c){var d,e=this.view,f=e.opt("theme"),g=b.format(e.opt("dayPopoverFormat")),h=a('
'+F(g)+'
'),i=h.find(".fc-event-container");for(c=this.renderFgSegEls(c,!0),this.popoverSegs=c,d=0;d'+this.rowHtml("slotBg")+'
'+this.slatRowHtml()+"
"},slotBgCellHtml:function(a,b,c){return this.bgCellHtml(a,b,c)},slatRowHtml:function(){for(var a,c,d,e=this.view,f=e.calendar,g=e.opt("isRTL"),h="",i=this.slotDuration.asMinutes()%15===0,j=b.duration(+this.minTime);j"+(i&&c?"":""+F(f.formatDate(a,e.opt("axisFormat")))+"")+"",h+=""+(g?"":d)+''+(g?d:"")+"",j.add(this.slotDuration);return h},processOptions:function(){var a=this.view,c=a.opt("slotDuration"),d=a.opt("snapDuration");c=b.duration(c),d=d?b.duration(d):c,this.slotDuration=c,this.snapDuration=d,this.cellDuration=d,this.minTime=b.duration(a.opt("minTime")),this.maxTime=b.duration(a.opt("maxTime"))},rangeToSegs:function(a,b){var c,d,e,f,g,h=this.view,i=[];for(a=a.clone().stripZone(),b=b.clone().stripZone(),d=0;d').append(d).appendTo(this.el)},destroyHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(a,b){this.view.opt("selectHelper")?this.renderRangeHelper(a,b):this.renderHighlight(a,b)},destroySelection:function(){this.destroyHelper(),this.destroyHighlight()},renderFill:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=this.view;if(c.length){for(c=this.renderFillSegEls(b,c),e=this.groupSegCols(c),d=d||b.toLowerCase(),f=a('
'),g=f.find("tr"),h=0;h").appendTo(g),i.length)for(k=a('
').appendTo(j),l=o.cellToDate(0,h),m=0;m').append(this.renderSegTable(b))),b},destroyFgSegs:function(){this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null)},renderSegTable:function(b){var c,d,e,f,g,h,i=a("
"),j=i.find("tr");for(c=this.groupSegCols(b),this.computeSegVerticals(b),f=0;f'),d=0;d").append(h))}return this.bookendCells(j,"eventSkeleton"),i},updateSegVerticals:function(){var a,b=(this.segs||[]).concat(this.businessHourSegs||[]); for(this.computeSegVerticals(b),a=0;a
'+(c?'
'+F(c)+"
":"")+(g.title?'
'+F(g.title)+"
":"")+'
'+(i?'
':"")+""},generateSegPositionCss:function(a){var b,c,d=this.view,e=d.opt("isRTL"),f=d.opt("slotEventOverlap"),g=a.backwardCoord,h=a.forwardCoord,i=this.generateSegVerticalCss(a);return f&&(h=Math.min(1,g+2*(h-g))),e?(b=1-h,c=g):(b=g,c=1-h),i.zIndex=a.level+1,i.left=100*b+"%",i.right=100*c+"%",f&&a.forwardPressure&&(i[e?"marginLeft":"marginRight"]=20),i},generateSegVerticalCss:function(a){return{top:a.top,bottom:-a.bottom}},groupSegCols:function(a){var b,c=this.view,d=[];for(b=0;b'+this.dayGrid.headHtml()+'
'},headIntroHtml:function(){return this.weekNumbersVisible?'"+F(this.opt("weekNumberTitle"))+"":void 0},numberIntroHtml:function(a){return this.weekNumbersVisible?'"+this.calendar.calculateWeekNumber(this.cellToDate(a,0))+"":void 0},dayIntroHtml:function(){return this.weekNumbersVisible?'":void 0},introHtml:function(){return this.weekNumbersVisible?'":void 0},numberCellHtml:function(a,b,c){var d;return this.dayNumbersVisible?(d=this.dayGrid.getDayClasses(c),d.unshift("fc-day-number"),''+c.date()+""):""},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var a=this.opt("eventLimit");return a&&"number"!=typeof a},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=r(this.el.find(".fc-week-number")))},setHeight:function(a,b){var c,d=this.opt("eventLimit");t(this.scrollerEl),m(this.headRowEl),this.dayGrid.destroySegPopover(),d&&"number"==typeof d&&this.dayGrid.limitRows(d),c=this.computeScrollerHeight(a),this.setGridHeight(c,b),d&&"number"!=typeof d&&this.dayGrid.limitRows(d),!b&&s(this.scrollerEl,c)&&(l(this.headRowEl,v(this.scrollerEl)),c=this.computeScrollerHeight(a),this.scrollerEl.height(c),this.restoreScroll())},setGridHeight:function(a,b){b?q(this.dayGrid.rowEls):p(this.dayGrid.rowEls,a,!0)},renderEvents:function(a){this.dayGrid.renderEvents(a),this.updateHeight(),vb.prototype.renderEvents.call(this,a)},getSegs:function(){return this.dayGrid.getSegs()},destroyEvents:function(){vb.prototype.destroyEvents.call(this),this.recordScroll(),this.dayGrid.destroyEvents()},renderDrag:function(a,b,c){return this.dayGrid.renderDrag(a,b,c)},destroyDrag:function(){this.dayGrid.destroyDrag()},renderSelection:function(a,b){this.dayGrid.renderSelection(a,b)},destroySelection:function(){this.dayGrid.destroySelection()}}),e({fixedWeekCount:!0}),Kb.month=yb,yb.prototype=C(xb.prototype),a.extend(yb.prototype,{name:"month",incrementDate:function(a,b){return a.clone().stripTime().add(b,"months").startOf("month")},render:function(a){var b;this.intervalStart=a.clone().stripTime().startOf("month"),this.intervalEnd=this.intervalStart.clone().add(1,"months"),this.start=this.intervalStart.clone(),this.start=this.skipHiddenDays(this.start),this.start.startOf("week"),this.start=this.skipHiddenDays(this.start),this.end=this.intervalEnd.clone(),this.end=this.skipHiddenDays(this.end,-1,!0),this.end.add((7-this.end.weekday())%7,"days"),this.end=this.skipHiddenDays(this.end,-1,!0),b=Math.ceil(this.end.diff(this.start,"weeks",!0)),this.isFixedWeeks()&&(this.end.add(6-b,"weeks"),b=6),this.title=this.calendar.formatDate(this.intervalStart,this.opt("titleFormat")),xb.prototype.render.call(this,b,this.getCellsPerWeek(),!0)},setGridHeight:function(a,b){b=b||"variable"===this.opt("weekMode"),b&&(a*=this.rowCnt/6),p(this.dayGrid.rowEls,a,!b)},isFixedWeeks:function(){var a=this.opt("weekMode");return a?"fixed"===a:this.opt("fixedWeekCount")}}),Kb.basicWeek=zb,zb.prototype=C(xb.prototype),a.extend(zb.prototype,{name:"basicWeek",incrementDate:function(a,b){return a.clone().stripTime().add(b,"weeks").startOf("week")},render:function(a){this.intervalStart=a.clone().stripTime().startOf("week"),this.intervalEnd=this.intervalStart.clone().add(1,"weeks"),this.start=this.skipHiddenDays(this.intervalStart),this.end=this.skipHiddenDays(this.intervalEnd,-1,!0),this.title=this.calendar.formatRange(this.start,this.end.clone().subtract(1),this.opt("titleFormat")," — "),xb.prototype.render.call(this,1,this.getCellsPerWeek(),!1)}}),Kb.basicDay=Ab,Ab.prototype=C(xb.prototype),a.extend(Ab.prototype,{name:"basicDay",incrementDate:function(a,b){var c=a.clone().stripTime().add(b,"days");return c=this.skipHiddenDays(c,0>b?-1:1)},render:function(a){this.start=this.intervalStart=a.clone().stripTime(),this.end=this.intervalEnd=this.start.clone().add(1,"days"),this.title=this.calendar.formatDate(this.start,this.opt("titleFormat")),xb.prototype.render.call(this,1,1,!1)}}),e({allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",axisFormat:Bb,timeFormat:{agenda:Cb},minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0});var Yb=5;Db.prototype=C(vb.prototype),a.extend(Db.prototype,{timeGrid:null,dayGrid:null,axisWidth:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,render:function(b){this.rowCnt=1,this.colCnt=b,this.el.addClass("fc-agenda-view").html(this.renderHtml()),this.scrollerEl=this.el.find(".fc-time-grid-container"),this.timeGrid.coordMap.containerEl=this.scrollerEl,this.timeGrid.el=this.el.find(".fc-time-grid"),this.timeGrid.render(),this.bottomRuleEl=a('
').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.el=this.el.find(".fc-day-grid"),this.dayGrid.render(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)"),vb.prototype.render.call(this),this.resetScroll()},destroy:function(){this.timeGrid.destroy(),this.dayGrid&&this.dayGrid.destroy(),vb.prototype.destroy.call(this)},renderHtml:function(){return'
'+this.timeGrid.headHtml()+'
'+(this.dayGrid?'

':"")+'
'},headIntroHtml:function(){var a,b,c,d;return this.opt("weekNumbers")?(a=this.cellToDate(0,0),b=this.calendar.calculateWeekNumber(a),c=this.opt("weekNumberTitle"),d=this.opt("isRTL")?b+c:c+b,'"+F(d)+""):'"},dayIntroHtml:function(){return'"+(this.opt("allDayHtml")||F(this.opt("allDayText")))+""},slotBgIntroHtml:function(){return'"},introHtml:function(){return'"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},updateSize:function(a){a&&this.timeGrid.resize(),vb.prototype.updateSize.call(this,a)},updateWidth:function(){this.axisWidth=r(this.el.find(".fc-axis"))},setHeight:function(a,b){var c,d;null===this.bottomRuleHeight&&(this.bottomRuleHeight=this.bottomRuleEl.outerHeight()),this.bottomRuleEl.hide(),this.scrollerEl.css("overflow",""),t(this.scrollerEl),m(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.destroySegPopover(),c=this.opt("eventLimit"),c&&"number"!=typeof c&&(c=Yb),c&&this.dayGrid.limitRows(c)),b||(d=this.computeScrollerHeight(a),s(this.scrollerEl,d)?(l(this.noScrollRowEls,v(this.scrollerEl)),d=this.computeScrollerHeight(a),this.scrollerEl.height(d),this.restoreScroll()):(this.scrollerEl.height(d).css("overflow","hidden"),this.bottomRuleEl.show()))},resetScroll:function(){function a(){c.scrollerEl.scrollTop(e)}var c=this,d=b.duration(this.opt("scrollTime")),e=this.timeGrid.computeTimeTop(d);e=Math.ceil(e),e&&e++,a(),setTimeout(a,0)},renderEvents:function(a){var b,c,d=[],e=[],f=[];for(c=0;cb?-1:1)},render:function(a){this.start=this.intervalStart=a.clone().stripTime(),this.end=this.intervalEnd=this.start.clone().add(1,"days"),this.title=this.calendar.formatDate(this.start,this.opt("titleFormat")),Db.prototype.render.call(this,1)}})});