/*!
* 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<arguments.length;d++)a.each(arguments[d],c);return b}function g(a){return/(Time|Duration)$/.test(a)}function h(c,d){function e(a){var c=b.localeData||b.langData;return c.call(b,a)||c.call(b,"en")}function g(a){cb?l()&&(p(),n(a)):h()}function h(){db=Z.theme?"ui":"fc",c.addClass("fc"),c.addClass(Z.isRTL?"fc-rtl":"fc-ltr"),c.addClass(Z.theme?"ui-widget":"fc-unthemed"),cb=a("<div class='fc-view-container'/>").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("<div class='fc-view fc-"+c+"-view' />").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("<div class='fc-toolbar'/>").append(f("left")).append(f("right")).append(f("center")).append('<div class="fc-clear"/>'):void 0}function e(){o.remove()}function f(d){var e=a('<div class="fc-'+d+'"/>'),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("<h2> </h2>")),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?"<span class='ui-icon ui-icon-"+i+"'></span>":j&&!c.theme?"<span class='fc-icon fc-icon-"+j+"'></span>":F(k||e),o=["fc-"+e+"-button",n+"-button",n+"-state-default"],q=a('<button type="button" class="'+o.join(" ")+'">'+m+"</button>").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("<div/>"),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()<M.clone().stripZone()||b.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<d.length;e++)f=d[e],g=h?f:u(f,b),g&&X.push.apply(X,w(g));V--,V||Q(X)}})}function g(b,d){var e,f,h=Jb.sourceFetchers;for(e=0;e<h.length;e++){if(f=h[e].call(L,b,M.clone(),N.clone(),c.timezone,d),f===!0)return;if("object"==typeof f)return void g(f,d)}var i=b.events;if(i)a.isFunction(i)?(s(),i.call(L,M.clone(),N.clone(),c.timezone,function(a){d(a),t()})):a.isArray(i)?d(i):d();else{var j=b.url;if(j){var k,l=b.success,m=b.error,n=b.complete;k=a.isFunction(b.data)?b.data():b.data;var o=a.extend({},k||{}),p=E(b.startParam,c.startParam),q=E(b.endParam,c.endParam),r=E(b.timezoneParam,c.timezoneParam);p&&(o[p]=M.format()),q&&(o[q]=N.format()),c.timezone&&"local"!=c.timezone&&(o[r]=c.timezone),s(),a.ajax(a.extend({},Lb,b,{data:o,success:function(b){b=b||[];var c=D(l,this,arguments);a.isArray(c)&&(b=c),d(b)},error:function(){D(m,this,arguments),d()},complete:function(){D(n,this,arguments),t()}}))}else d()}}function h(a){var b=i(a);b&&(T.push(b),V++,f(b,U))}function i(b){var c,d,e=Jb.sourceNormalizers;if(a.isFunction(b)||a.isArray(b)?c={events:b}:"string"==typeof b?c={url:b}:"object"==typeof b&&(c=a.extend({},b)),c){for(c.className?"string"==typeof c.className&&(c.className=c.className.split(/\s+/)):c.className=[],a.isArray(c.events)&&(c.origArray=c.events,c.events=a.map(c.events,function(a){return u(a,c)})),d=0;d<e.length;d++)e[d].call(L,c);return c}}function j(b){T=a.grep(T,function(a){return!l(a,b)}),X=a.grep(X,function(a){return!l(a.source,b)}),Q(X)}function l(a,b){return a&&b&&m(a)==m(b)}function m(a){return("object"==typeof a?a.origArray||a.googleCalendarId||a.url||a.events:null)||a}function n(a){a.start=L.moment(a.start),a.end&&(a.end=L.moment(a.end)),x(a),o(a),Q(X)}function o(a){var b,c,d,e;for(b=0;b<X.length;b++)if(c=X[b],c._id==a._id&&c!==a)for(d=0;d<Y.length;d++)e=Y[d],void 0!==a[e]&&(c[e]=a[e])}function p(a,b){var c,d,e,f=u(a);if(f){for(c=w(f),d=0;d<c.length;d++)e=c[d],e.source||(b&&(S.events.push(e),e.source=S),X.push(e));return Q(X),c}return[]}function q(b){var c,d;for(null==b?b=function(){return!0}:a.isFunction(b)||(c=b+"",b=function(a){return a._id==c}),X=a.grep(X,b,!0),d=0;d<T.length;d++)a.isArray(T[d].events)&&(T[d].events=a.grep(T[d].events,b,!0));Q(X)}function r(b){return a.isFunction(b)?a.grep(X,b):null!=b?(b+="",a.grep(X,function(a){return a._id==b})):X}function s(){W++||O("loading",null,!0,P())}function t(){--W||O("loading",null,!1,P())}function u(d,e){var f,g,h,i,j={};if(c.eventDataTransform&&(d=c.eventDataTransform(d)),e&&e.eventDataTransform&&(d=e.eventDataTransform(d)),a.extend(j,d),e&&(j.source=e),j._id=d._id||(void 0===d.id?"_fc"+Mb++:d.id+""),j.className=d.className?"string"==typeof d.className?d.className.split(/\s+/):d.className:[],f=d.start||d.date,g=d.end,B(f)&&(f=b.duration(f)),B(g)&&(g=b.duration(g)),d.dow||b.isDuration(f)||b.isDuration(g))j.start=f?b.duration(f):null,j.end=g?b.duration(g):null,j._recurring=!0;else{if(f&&(f=L.moment(f),!f.isValid()))return!1;g&&(g=L.moment(g),g.isValid()||(g=null)),h=d.allDay,void 0===h&&(i=E(e?e.allDayDefault:void 0,c.allDayDefault),h=void 0!==i?i:!(f.hasTime()||g&&g.hasTime())),v(f,g,h,j)}return j}function v(a,b,d,e){d?(a.hasTime()&&a.stripTime(),b&&b.hasTime()&&b.stripTime()):(a.hasTime()||(a=L.rezoneDate(a)),b&&!b.hasTime()&&(b=L.rezoneDate(b))),b&&a>=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<f.length;g++)e[f[g]]=!0;for(h=c.clone().stripTime();h.isBefore(d);)(!e||e[h.day()])&&(i=b.start,j=b.end,k=h.clone(),l=null,i&&(k=k.time(i)),j&&(l=h.clone().time(j)),m=a.extend({},b),v(k,l,!i&&!j,m),n.push(m)),h.add(1,"days")}else n.push(b);return n}function x(a,b,c){var d,e,f,g,h=a._allDay,i=a._start,j=a._end,k=!1;return b||c||(b=a.start,c=a.end),d=a.allDay!=h?a.allDay:!(b||c).hasTime(),d&&(b&&(b=b.clone().stripTime()),c&&(c=c.clone().stripTime())),b&&(e=d?z(b,i.clone().stripTime()):z(b,i)),d!=h?k=!0:c&&(f=z(c||L.getDefaultEventEnd(d,b||i),b||i).subtract(z(j||L.getDefaultEventEnd(h,i),i))),g=y(r(a._id),k,d,e,f),{dateDelta:e,durationDelta:f,undo:g}}function y(b,d,e,f,g){var h=L.getIsAmbigTimezone(),i=[];return a.each(b,function(a,b){var j=b._allDay,l=b._start,m=b._end,n=null!=e?e:j,o=l.clone(),p=!d&&m?m.clone():null;n?(o.stripTime(),p&&p.stripTime()):(o.hasTime()||(o=L.rezoneDate(o)),p&&!p.hasTime()&&(p=L.rezoneDate(p))),p||!c.forceEventDuration&&!+g||(p=L.getDefaultEventEnd(n,o)),o.add(f),p&&p.add(f).add(g),h&&(+f||+g)&&(o.stripZone(),p&&p.stripZone()),b.allDay=n,b.start=o,b.end=p,k(b),i.push(function(){b.allDay=j,b.start=l,b.end=m,k(b)})}),function(){for(var a=0;a<i.length;a++)i[a]()}}function A(){var b,d=c.businessHours,e={className:"fc-nonbusiness",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},f=L.getView();return d&&(b="object"==typeof d?a.extend({},e,d):e),b?w(u(b),f.start,f.end):[]}function C(a,b,d){var e=a.source||{},f=E(a.constraint,e.constraint,c.eventConstraint),g=E(a.overlap,e.overlap,c.eventOverlap);return H(b,d,f,g,a)}function F(a,b){return H(a,b,c.selectConstraint,c.selectOverlap)}function G(a,b,c){var d;return c&&(d=w(u(c))[0])?C(d,a,b):F(a,b)}function H(a,b,c,d,e){var f,g,h,i,j;if(a=a.clone().stripZone(),b=b.clone().stripZone(),null!=c){for(f=I(c),g=!1,h=0;h<f.length;h++)if(J(f[h],a,b)){g=!0;break}if(!g)return!1}for(h=0;h<X.length;h++)if(i=X[h],(!e||e._id!==i._id)&&K(i,a,b)){if(d===!1)return!1;if("function"==typeof d&&!d(i,e))return!1;if(e){if(j=E(i.overlap,(i.source||{}).overlap),j===!1)return!1;if("function"==typeof j&&!j(e,i))return!1}}return!0}function I(a){return"businessHours"===a?A():"object"==typeof a?w(u(a)):r(a)}function J(a,b,c){var d=a.start.clone().stripZone(),e=L.getEventEnd(a).stripZone();return b>=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<b.length;e++)f=b[e].apply(c,d)||f;return f}}function E(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]}function F(a){return(a+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"<br />")}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;c<a.length;c++)d.push(Jb.moment.parseZone(a[c])),e=e||d[c]._ambigTime,f=f||d[c]._ambigZone;for(c=0;c<d.length;c++)e&&!b?d[c].stripTime():f&&d[c].stripZone();return d}function M(a,b){a._ambigTime?b._ambigTime=!0:b._ambigTime&&(b._ambigTime=!1),a._ambigZone?b._ambigZone=!0:b._ambigZone&&(b._ambigZone=!1)}function N(a,b){a.year(b[0]||0).month(b[1]||0).date(b[2]||0).hours(b[3]||0).minutes(b[4]||0).seconds(b[5]||0).milliseconds(b[6]||0)}function O(a,b){return Ub.format.call(a,b)}function P(a,b){return Q(a,V(b))}function Q(a,b){var c,d="";for(c=0;c<b.length;c++)d+=R(a,b[c]);return d}function R(a,b){var c,d;return"string"==typeof b?b:(c=b.token)?Vb[c]?Vb[c](a):O(a,c):b.maybe&&(d=Q(a,b.maybe),d.match(/[1-9]/))?d:""}function S(a,b,c,d,e){var f;return a=Jb.moment.parseZone(a),b=Jb.moment.parseZone(b),f=(a.localeData||a.lang).call(a),c=f.longDateFormat(c)||c,d=d||" - ",T(a,b,V(c),d,e)}function T(a,b,c,d,e){var f,g,h,i,j="",k="",l="",m="",n="";for(g=0;g<c.length&&(f=U(a,b,c[g]),f!==!1);g++)j+=f;for(h=c.length-1;h>g&&(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.length;b++)c=a[b],(d[c._id]||(d[c._id]=[])).push(c);return d}function hb(a,b){return a.eventStartMS-b.eventStartMS}function ib(a,b){return a.eventStartMS-b.eventStartMS||b.eventDurationMS-a.eventDurationMS||b.event.allDay-a.event.allDay||(a.event.title||"").localeCompare(b.event.title)}function jb(a){cb.call(this,a)}function kb(a,b){var c,d;for(c=0;c<b.length;c++)if(d=b[c],d.leftCol<=a.rightCol&&d.rightCol>=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;d<c.length;d++)qb(c[d]);for(d=0;d<c.length;d++)rb(c[d],0,0)}}function ob(a){var b,c,d,e=[];for(b=0;b<a.length;b++){for(c=a[b],d=0;d<e.length&&sb(c,e[d]).length;d++);c.level=d,(e[d]||(e[d]=[])).push(c)}return e}function pb(a){var b,c,d,e,f;for(b=0;b<a.length;b++)for(c=a[b],d=0;d<c.length;d++)for(e=c[d],e.forwardSegs=[],f=b+1;f<a.length;f++)sb(e,a[f],e.forwardSegs)}function qb(a){var b,c,d=a.forwardSegs,e=0;if(void 0===a.forwardPressure){for(b=0;b<d.length;b++)c=d[b],qb(c),e=Math.max(e,1+c.forwardPressure);a.forwardPressure=e}}function rb(a,b,c){var d,e=a.forwardSegs;if(void 0===a.forwardCoord)for(e.length?(e.sort(ub),rb(e[0],b+1,c),a.forwardCoord=e[0].backwardCoord):a.forwardCoord=1,a.backwardCoord=a.forwardCoord-(a.forwardCoord-c)/(b+1),d=0;d<e.length;d++)rb(e[d],0,a.forwardCoord)}function sb(a,b,c){c=c||[];for(var d=0;d<b.length;d++)tb(a,b[d])&&c.push(b[d]);return c}function tb(a,b){return a.bottom>b.top&&a.top<b.bottom}function ub(a,b){return b.forwardPressure-a.forwardPressure||(a.backwardCoord||0)-(b.backwardCoord||0)||ib(a,b)}function vb(c){function d(b){var c=B[b];return a.isPlainObject(c)&&!g(b)?y(c,z.name):c}function e(a,b){return c.trigger.apply(c,[a,b||z].concat(Array.prototype.slice.call(arguments,2),[z]))}function f(a){var b=a.source||{};return E(a.startEditable,b.startEditable,d("eventStartEditable"),a.editable,b.editable,d("editable"))}function h(a){var b=a.source||{};return E(a.durationEditable,b.durationEditable,d("eventDurationEditable"),a.editable,b.editable,d("editable"))}function i(a,b,d,f){var g=c.mutateEvent(b,d,null);e("eventDrop",a,b,g.dateDelta,function(){g.undo(),A()},f,{}),A()}function j(a,b,d,f){var g=c.mutateEvent(b,null,d);e("eventResize",a,b,g.durationDelta,function(){g.undo(),A()},f,{}),A()}function k(a){return b.isMoment(a)&&(a=a.day()),G[a]}function l(){return D}function m(a,b,c){var d=a.clone();for(b=b||1;G[(d.day()+(c?b:0)+7)%7];)d.add(b,"days");return d}function n(){var a=o.apply(null,arguments),b=p(a),c=q(b);return c}function o(a,b){var c=z.colCnt,d=K?-1:1,e=K?c-1:0;"object"==typeof a&&(b=a.col,a=a.row);var f=a*c+(b*d+e);return f}function p(a){var b=z.start.day();return a+=H[b],7*Math.floor(a/D)+J[(a%D+D)%D]-b}function q(a){return z.start.clone().add(a,"days")}function r(a){var b=s(a),c=t(b),d=u(c);return d}function s(a){return a.clone().stripTime().diff(z.start,"days")}function t(a){var b=z.start.day();return a+=b,Math.floor(a/7)*D+H[(a%7+7)%7]-H[b]}function u(a){var b=z.colCnt,c=K?-1:1,d=K?b-1:0,e=Math.floor(a/b),f=(a%b+b)%b*c+d;return{row:e,col:f}}function v(a,b){for(var c=z.rowCnt,d=z.colCnt,e=[],f=w(a,b),g=s(f.start),h=s(f.end),i=t(g),j=t(h)-1,k=0;c>k;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]<c[2]},Tb.isSame=function(a,b){var c;return this._fullCalendar?b?(c=L([this,a],!0),Ub.isSame.call(c[0],c[1],b)):(a=Jb.moment.parseZone(a),Ub.isSame.call(this,a)&&Boolean(this._ambigTime)===Boolean(a._ambigTime)&&Boolean(this._ambigZone)===Boolean(a._ambigZone)):Ub.isSame.apply(this,arguments)},a.each(["isBefore","isAfter"],function(a,b){Tb[b]=function(a,c){var d;return this._fullCalendar?(d=L([this,a]),Ub[b].call(d[0],d[1],c)):Ub[b].apply(this,arguments)}}),Ob="_d"in b()&&"updateOffset"in b,Pb=Ob?function(a,c){a._d.setTime(Date.UTC.apply(Date,c)),b.updateOffset(a,!1)}:N,Qb=Ob?function(a,c){a._d.setTime(+new Date(c[0]||0,c[1]||0,c[2]||0,c[3]||0,c[4]||0,c[5]||0,c[6]||0)),b.updateOffset(a,!1)}:N;var Vb={t:function(a){return O(a,"a").charAt(0)},T:function(a){return O(a,"A").charAt(0)}};Jb.formatRange=S;var Wb={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"},Xb={};X.prototype={isHidden:!0,options:null,el:null,documentMousedownProxy:null,margin:10,show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var b=this,c=this.options;this.el=a('<div class="fc-popover"/>').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.length;c++)if(b>=e[c][0]&&b<e[c][1]){g=c;break}for(c=0;c<f.length;c++)if(a>=f[c][0]&&a<f[c][1]){h=c;break}g>=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.maxX&&b>=this.minY&&b<this.maxY:!0}},Z.prototype={coordMaps:null,build:function(){var a,b=this.coordMaps;for(a=0;a<b.length;a++)b[a].build()},getCell:function(a,b){var c,d=this.coordMaps,e=null;for(c=0;c<d.length&&!e;c++)e=d[c].getCell(a,b);return e}},$.prototype={coordMap:null,options:null,isListening:!1,isDragging:!1,origCell:null,origDate:null,cell:null,date:null,mouseX0:null,mouseY0:null,mousemoveProxy:null,mouseupProxy:null,scrollEl:null,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollHandlerProxy:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,mousedown:function(a){w(a)&&(a.preventDefault(),this.startListening(a),this.options.distance||this.startDrag(a))},startListening:function(b){var c,d;this.isListening||(b&&this.options.scroll&&(c=u(a(b.target)),c.is(window)||c.is(document)||(this.scrollEl=c,this.scrollHandlerProxy=J(a.proxy(this,"scrollHandler"),100),this.scrollEl.on("scroll",this.scrollHandlerProxy))),this.computeCoords(),b&&(d=this.getCell(b),this.origCell=d,this.origDate=d?d.date:null,this.mouseX0=b.pageX,this.mouseY0=b.pageY),a(document).on("mousemove",this.mousemoveProxy=a.proxy(this,"mousemove")).on("mouseup",this.mouseupProxy=a.proxy(this,"mouseup")).on("selectstart",this.preventDefault),this.isListening=!0,this.trigger("listenStart",b))},computeCoords:function(){this.coordMap.build(),this.computeScrollBounds()},mousemove:function(a){var b,c;this.isDragging||(b=this.options.distance||1,c=Math.pow(a.pageX-this.mouseX0,2)+Math.pow(a.pageY-this.mouseY0,2),c>=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:"<td/>",rowHtml:function(a,b){var c,d,e=this.view,f=this.getHtmlRenderer("cell",a),g="";for(b=b||0,c=0;c<e.colCnt;c++)d=e.cellToDate(b,c),g+=f(b,c,d);return g=this.bookendCells(g,a,b),"<tr>"+g+"</tr>"},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<c.length;d++)g+=this.fillSegHtml(b,c[d]);a(g).each(function(b,d){var g=c[b],i=a(d);f&&(i=f.call(e,g,i)),i&&(i=a(i),i.is(e.fillSegTag)&&(g.el=i,h.push(g)))})}return h},fillSegTag:"div",fillSegHtml:function(a,b){var c=this[a+"SegClasses"],d=this[a+"SegStyles"],e=c?c.call(this,b):[],f=d?d.call(this,b):"";return"<"+this.fillSegTag+(e.length?' class="'+e.join(" ")+'"':"")+(f?' style="'+f+'"':"")+" />"},headHtml:function(){return'<div class="fc-row '+this.view.widgetHeaderClass+'"><table><thead>'+this.rowHtml("head")+"</thead></table></div>"},headCellHtml:function(a,b,c){var d=this.view,e=d.calendar,f=d.opt("columnFormat");return'<th class="fc-day-header '+d.widgetHeaderClass+" fc-"+Nb[c.day()]+'">'+F(e.formatDate(c,f))+"</th>"},bgCellHtml:function(a,b,c){var d=this.view,e=this.getDayClasses(c);return e.unshift("fc-day",d.widgetContentClass),'<td class="'+e.join(" ")+'" data-date="'+c.format()+'"></td>'},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<d.length;b++)c=d[b],db(c.event)?e.push(c):f.push(c);e=this.renderBgSegs(e)||e,f=this.renderFgSegs(f)||f,this.segs=e.concat(f)},destroyEvents:function(){this.triggerSegMouseout(),this.destroyFgSegs(),this.destroyBgSegs(),this.segs=null},getSegs:function(){return this.segs||[]},renderFgSegs:function(){},destroyFgSegs:function(){},renderFgSegEls:function(b,c){var d,e=this.view,f="",g=[];if(b.length){for(d=0;d<b.length;d++)f+=this.fgSegHtml(b[d],c);a(f).each(function(c,d){var f=b[c],h=e.resolveEventEl(f.event,a(d));h&&(h.data("fc-seg",f),f.el=h,g.push(f))})}return g},fgSegHtml:function(){},renderBgSegs:function(a){return this.renderFill("bgEvent",a)},destroyBgSegs:function(){this.destroyFill("bgEvent")},bgEventSegEl:function(a,b){return this.view.resolveEventEl(a.event,b)},bgEventSegClasses:function(a){var b=a.event,c=b.source||{};return["fc-bgevent"].concat(b.className,c.className||[])},bgEventSegStyles:function(a){var b=this.view,c=a.event,d=c.source||{},e=c.color,f=d.color,g=b.opt("eventColor"),h=c.backgroundColor||e||d.backgroundColor||f||b.opt("eventBackgroundColor")||g;return h?"background-color:"+h:""},businessHoursSegClasses:function(){return["fc-nonbusiness","fc-bgevent"]},bindSegHandlers:function(){var b=this,c=this.view;a.each({mouseenter:function(a,c){b.triggerSegMouseover(a,c)},mouseleave:function(a,c){b.triggerSegMouseout(a,c)},click:function(a,b){return c.trigger("eventClick",this,a.event,b)},mousedown:function(d,e){a(e.target).is(".fc-resizer")&&c.isEventResizable(d.event)?b.segResizeMousedown(d,e):c.isEventDraggable(d.event)&&b.segDragMousedown(d,e)}},function(c,d){b.el.on(c,".fc-event-container > *",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;c<d.length;c++)e.push.apply(e,this.eventRangeToSegs(d[c],b));return e},eventsToRanges:function(b){var c=this,d=gb(b),e=[];return a.each(d,function(a,b){b.length&&e.push.apply(e,eb(b[0])?c.eventsToInverseRanges(b):c.eventsToNormalRanges(b))}),e},eventsToNormalRanges:function(a){var b,c,d,e,f=this.view.calendar,g=[];for(b=0;b<a.length;b++)c=a[b],d=c.start.clone().stripZone(),e=f.getEventEnd(c).stripZone(),g.push({event:c,start:d,end:e,eventStartMS:+d,eventDurationMS:e-d});return g},eventsToInverseRanges:function(a){var b,c,d=this.view,e=d.start.clone().stripZone(),f=d.end.clone().stripZone(),g=this.eventsToNormalRanges(a),h=[],i=a[0],j=e;for(g.sort(hb),b=0;b<g.length;b++)c=g[b],c.start>j&&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<c.length;d++)e=c[d],e.event=a.event,e.eventStartMS=a.eventStartMS,e.eventDurationMS=a.eventDurationMS;return c}}),jb.prototype=C(cb.prototype),a.extend(jb.prototype,{numbersVisible:!1,cellDuration:b.duration({days:1}),bottomCoordPadding:0,rowEls:null,dayEls:null,helperEls:null,render:function(b){var c,d=this.view,e="";for(c=0;c<d.rowCnt;c++)e+=this.dayRowHtml(c,b);this.el.html(e),this.rowEls=this.el.find(".fc-row"),this.dayEls=this.el.find(".fc-day"),this.dayEls.each(function(b,c){var e=d.cellToDate(Math.floor(b/d.colCnt),b%d.colCnt);d.trigger("dayRender",null,e,a(c))}),cb.prototype.render.call(this)},destroy:function(){this.destroySegPopover()},dayRowHtml:function(a,b){var c=this.view,d=["fc-row","fc-week",c.widgetContentClass];return b&&d.push("fc-rigid"),'<div class="'+d.join(" ")+'"><div class="fc-bg"><table>'+this.rowHtml("day",a)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.rowHtml("number",a)+"</thead>":"")+"</table></div></div>"},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('<div class="fc-helper-skeleton"><table/></div>');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<c.length;d++)e=c[d],f=this.renderFillRow(b,e),this.rowEls.eq(e.row).append(f),g.push(f[0]);return this.elsByFill[b]=a(g),c},renderFillRow:function(b,c){var d,e,f=this.view.colCnt,g=c.leftCol,h=c.rightCol+1;return d=a('<div class="fc-'+b.toLowerCase()+'-skeleton"><table><tr/></table></div>'),e=d.find("tr"),g>0&&e.append('<td colspan="'+g+'"/>'),e.append(c.el.attr("colspan",h-g)),f>h&&e.append('<td colspan="'+(f-h)+'"/>'),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<b.length;c++)d.push(this.renderSegRow(c,b[c]));return d},fgSegHtml:function(a,b){var c,d=this.view,e=d.opt("isRTL"),f=a.event,g=d.isEventDraggable(f),h=!b&&f.allDay&&a.isEnd&&d.isEventResizable(f),i=this.getSegClasses(a,g,h),j=this.getEventSkinCss(f),k="";return i.unshift("fc-day-grid-event"),!f.allDay&&a.isStart&&(k='<span class="fc-time">'+F(d.getEventTimeText(f))+"</span>"),c='<span class="fc-title">'+(F(f.title||"")||" ")+"</span>",'<a class="'+i.join(" ")+'"'+(f.url?' href="'+F(f.url)+'"':"")+(j?' style="'+j+'"':"")+'><div class="fc-content">'+(e?c+" "+k:k+" "+c)+"</div>"+(h?'<div class="fc-resizer"/>':"")+"</a>"},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("<td/>"),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("<tbody/>"),q=[],r=[],s=[];for(e=0;o>e;e++){if(f=n[e],g=0,h=a("<tr/>"),q.push([]),r.push([]),s.push([]),f)for(i=0;i<f.length;i++){for(j=f[i],d(j.leftCol),k=a('<td class="fc-event-container"/>').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;b<a.length;b++){for(c=a[b],d=0;d<e.length&&kb(c,e[d]);d++);c.level=d,(e[d]||(e[d]=[])).push(c)}for(d=0;d<e.length;d++)e[d].sort(lb);return e},groupSegRows:function(a){var b,c=this.view,d=[];for(b=0;b<c.rowCnt;b++)d.push([]);for(b=0;b<a.length;b++)d[a[b].row].push(a[b]);return d}}),a.extend(jb.prototype,{segPopover:null,popoverSegs:null,destroySegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(a){var b,c,d=this.rowStructs||[];for(b=0;b<d.length;b++)this.unlimitRow(b),c=a?"number"==typeof a?a:this.computeRowLevelLimit(b):!1,c!==!1&&this.limitRow(b,c)},computeRowLevelLimit:function(a){var b,c,d=this.rowEls.eq(a),e=d.height(),f=this.rowStructs[a].tbodyEl.children();for(b=0;b<f.length;b++)if(c=f.eq(b).removeClass("fc-limited"),c.position().top+c.outerHeight()>e)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("<div/>").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<w.segLevels.length){for(f=w.segLevels[c-1],g=w.cellMatrix,h=w.tbodyEl.children().slice(c).addClass("fc-limited").get(),i=0;i<f.length;i++){for(j=f[i],d(j.leftCol),m=[],l=0;y<=j.rightCol;)e={row:b,col:y},k=this.getCellSegs(e,c),m.push(k),l+=k.length,y++;if(l){for(n=g[c-1][j.leftCol],o=n.attr("rowspan")||1,p=[],q=0;q<m.length;q++)r=a('<td class="fc-more-cell"/>').attr("rowspan",o),k=m[q],e={row:b,col:j.leftCol+q},t=this.renderMoreLink(e,[j].concat(k)),s=a("<div/>").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('<a class="fc-more"/>').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('<div class="fc-header '+e.widgetHeaderClass+'"><span class="fc-close '+(f?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"></span><span class="fc-title">'+F(g)+'</span><div class="fc-clear"/></div><div class="fc-body '+e.widgetContentClass+'"><div class="fc-event-container"></div></div>'),i=h.find(".fc-event-container");for(c=this.renderFgSegEls(c,!0),this.popoverSegs=c,d=0;d<c.length;d++)c[d].cellDate=b,i.append(c[d].el);return h},resliceDaySegs:function(b,c){var d=a.map(b,function(a){return a.event}),e=c.clone().stripTime(),f=e.clone().add(1,"days");return this.eventsToSegs(d,function(a,b){var c=x(a,b,e,f);return c?[c]:[]})},getMoreLinkText:function(a){var b=this.view,c=b.opt("eventLimitText");return"function"==typeof c?c(a):"+"+a+" "+c},getCellSegs:function(a,b){for(var c,d=this.rowStructs[a.row].segMatrix,e=b||0,f=[];e<d.length;)c=d[e][a.col],c&&f.push(c),e++;return f}}),mb.prototype=C(cb.prototype),a.extend(mb.prototype,{slotDuration:null,snapDuration:null,minTime:null,maxTime:null,dayEls:null,slatEls:null,slatTops:null,helperEl:null,businessHourSegs:null,render:function(){this.processOptions(),this.el.html(this.renderHtml()),this.dayEls=this.el.find(".fc-day"),this.slatEls=this.el.find(".fc-slats tr"),this.computeSlatTops(),this.renderBusinessHours(),cb.prototype.render.call(this)},renderBusinessHours:function(){var a=this.view.calendar.getBusinessHoursEvents();this.businessHourSegs=this.renderFill("businessHours",this.eventsToSegs(a),"bgevent")},renderHtml:function(){return'<div class="fc-bg"><table>'+this.rowHtml("slotBg")+'</table></div><div class="fc-slats"><table>'+this.slatRowHtml()+"</table></div>"},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<this.maxTime;)a=e.start.clone().time(j),c=a.minutes(),d='<td class="fc-axis fc-time '+e.widgetContentClass+'" '+e.axisStyleAttr()+">"+(i&&c?"":"<span>"+F(f.formatDate(a,e.opt("axisFormat")))+"</span>")+"</td>",h+="<tr "+(c?'class="fc-minor"':"")+">"+(g?"":d)+'<td class="'+e.widgetContentClass+'"/>'+(g?d:"")+"</tr>",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<h.colCnt;d++)e=h.cellToDate(0,d),f=e.clone().time(this.minTime),g=e.clone().time(this.maxTime),c=x(a,b,f,g),c&&(c.col=d,i.push(c));return i},resize:function(){this.computeSlatTops(),this.updateSegVerticals()},buildCoords:function(c,d){var e,f,g=this.view.colCnt,h=this.el.offset().top,i=b.duration(+this.minTime),j=null;for(this.dayEls.slice(0,g).each(function(b,c){e=a(c),f=e.offset().left,j&&(j[1]=f),j=[f],d[b]=j}),j[1]=f+e.outerWidth(),j=null;i<this.maxTime;)f=h+this.computeTimeTop(i),j&&(j[1]=f),j=[f],c.push(j),i.add(this.snapDuration);j[1]=h+this.computeTimeTop(i)},getCellDate:function(a){var b=this.view,c=b.calendar;return c.rezoneDate(b.cellToDate(0,a.col).time(this.minTime+this.snapDuration*a.row))},getCellDayEl:function(a){return this.dayEls.eq(a.col)},computeDateTop:function(a,c){return this.computeTimeTop(b.duration(a.clone().stripZone()-c.clone().stripTime()))},computeTimeTop:function(a){var b,c,d,e,f=(a-this.minTime)/this.slotDuration;return f=Math.max(0,f),f=Math.min(this.slatEls.length,f),b=Math.floor(f),c=f-b,d=this.slatTops[b],c?(e=this.slatTops[b+1],d+(e-d)*c):d},computeSlatTops:function(){var b,c=[];this.slatEls.each(function(d,e){b=a(e).position().top,c.push(b)}),c.push(b+this.slatEls.last().outerHeight()),this.slatTops=c},renderDrag:function(a,b,c){var d;return c?(this.renderRangeHelper(a,b,c),d=this.view.opt("dragOpacity"),void 0!==d&&this.helperEl.css("opacity",d),!0):void this.renderHighlight(a,b||this.view.calendar.getDefaultEventEnd(!1,a))},destroyDrag:function(){this.destroyHelper(),this.destroyHighlight()},renderResize:function(a,b,c){this.renderRangeHelper(a,b,c)},destroyResize:function(){this.destroyHelper()},renderHelper:function(b,c){var d,e,f,g,h=this.eventsToSegs([b]);for(h=this.renderFgSegEls(h),d=this.renderSegTable(h),e=0;e<h.length;e++)f=h[e],c&&c.col===f.col&&(g=c.el,f.el.css({left:g.css("left"),right:g.css("right"),"margin-left":g.css("margin-left"),"margin-right":g.css("margin-right")}));this.helperEl=a('<div class="fc-helper-skeleton"/>').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('<div class="fc-'+d+'-skeleton"><table><tr/></table></div>'),g=f.find("tr"),h=0;h<e.length;h++)if(i=e[h],j=a("<td/>").appendTo(g),i.length)for(k=a('<div class="fc-'+d+'-container"/>').appendTo(j),l=o.cellToDate(0,h),m=0;m<i.length;m++)n=i[m],k.append(n.el.css({top:this.computeDateTop(n.start,l),bottom:-this.computeDateTop(n.end,l)}));this.bookendCells(g,b),this.el.append(f),this.elsByFill[b]=f}return c}}),a.extend(mb.prototype,{eventSkeletonEl:null,renderFgSegs:function(b){return b=this.renderFgSegEls(b),this.el.append(this.eventSkeletonEl=a('<div class="fc-content-skeleton"/>').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("<table><tr/></table>"),j=i.find("tr");for(c=this.groupSegCols(b),this.computeSegVerticals(b),f=0;f<c.length;f++){for(g=c[f],nb(g),h=a('<div class="fc-event-container"/>'),d=0;d<g.length;d++)e=g[d],e.el.css(this.generateSegPositionCss(e)),e.bottom-e.top<30&&e.el.addClass("fc-short"),h.append(e.el);j.append(a("<td/>").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<b.length;a++)b[a].el.css(this.generateSegVerticalCss(b[a]))},computeSegVerticals:function(a){var b,c;for(b=0;b<a.length;b++)c=a[b],c.top=this.computeDateTop(c.start,c.start),c.bottom=this.computeDateTop(c.end,c.start)},fgSegHtml:function(a,b){var c,d,e,f=this.view,g=a.event,h=f.isEventDraggable(g),i=!b&&a.isEnd&&f.isEventResizable(g),j=this.getSegClasses(a,h,i),k=this.getEventSkinCss(g);return j.unshift("fc-time-grid-event"),f.isMultiDayEvent(g)?(a.isStart||a.isEnd)&&(c=f.getEventTimeText(a.start,a.end),d=f.getEventTimeText(a.start,a.end,"LT"),e=f.getEventTimeText(a.start,null)):(c=f.getEventTimeText(g),d=f.getEventTimeText(g,"LT"),e=f.getEventTimeText(g.start,null)),'<a class="'+j.join(" ")+'"'+(g.url?' href="'+F(g.url)+'"':"")+(k?' style="'+k+'"':"")+'><div class="fc-content">'+(c?'<div class="fc-time" data-start="'+F(e)+'" data-full="'+F(d)+'"><span>'+F(c)+"</span></div>":"")+(g.title?'<div class="fc-title">'+F(g.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(i?'<div class="fc-resizer"/>':"")+"</a>"},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<c.colCnt;b++)d.push([]);for(b=0;b<a.length;b++)d[a[b].col].push(a[b]);return d}}),vb.prototype={calendar:null,coordMap:null,el:null,start:null,end:null,intervalStart:null,intervalEnd:null,rowCnt:null,colCnt:null,isSelected:!1,scrollerEl:null,scrollTop:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,documentMousedownProxy:null,documentDragStartProxy:null,init:function(){var b=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=b+"-widget-header",this.widgetContentClass=b+"-widget-content",this.highlightStateClass=b+"-state-highlight",this.documentMousedownProxy=a.proxy(this,"documentMousedown"),this.documentDragStartProxy=a.proxy(this,"documentDragStart")},render:function(){this.updateSize(),this.trigger("viewRender",this,this,this.el),a(document).on("mousedown",this.documentMousedownProxy).on("dragstart",this.documentDragStartProxy)},destroy:function(){this.unselect(),this.trigger("viewDestroy",this,this,this.el),this.destroyEvents(),this.el.empty(),a(document).off("mousedown",this.documentMousedownProxy).off("dragstart",this.documentDragStartProxy)},incrementDate:function(){},updateSize:function(a){a&&this.recordScroll(),this.updateHeight(),this.updateWidth()},updateWidth:function(){},updateHeight:function(){var a=this.calendar;this.setHeight(a.getSuggestedViewHeight(),a.isHeightAuto())},setHeight:function(){},computeScrollerHeight:function(a){var b,c=this.el.add(this.scrollerEl);return c.css({position:"relative",left:-1}),b=this.el.outerHeight()-this.scrollerEl.height(),c.css({position:"",left:""}),a-b},recordScroll:function(){this.scrollerEl&&(this.scrollTop=this.scrollerEl.scrollTop())},restoreScroll:function(){null!==this.scrollTop&&this.scrollerEl.scrollTop(this.scrollTop)},renderEvents:function(){this.segEach(function(a){this.trigger("eventAfterRender",a.event,a.event,a.el)}),this.trigger("eventAfterAllRender")},destroyEvents:function(){this.segEach(function(a){this.trigger("eventDestroy",a.event,a.event,a.el)})},resolveEventEl:function(b,c){var d=this.trigger("eventRender",b,b,c);return d===!1?c=null:d&&d!==!0&&(c=a(d)),c},showEvent:function(a){this.segEach(function(a){a.el.css("visibility","")},a)},hideEvent:function(a){this.segEach(function(a){a.el.css("visibility","hidden")},a)},segEach:function(a,b){var c,d=this.getSegs();for(c=0;c<d.length;c++)b&&d[c].event._id!==b._id||a.call(this,d[c])},getSegs:function(){},renderDrag:function(){},destroyDrag:function(){},documentDragStart:function(b){var c,d,e,f,g,h=this,i=this.calendar,j=null,k=null,l=null;this.opt("droppable")&&(c=a(b.target),d=this.opt("dropAccept"),(a.isFunction(d)?d.call(c[0],c):c.is(d))&&(e=wb(c),f=e.eventProps,g=new $(this.coordMap,{cellOver:function(b,c){j=c,k=e.duration?j.clone().add(e.duration):null,l=k||i.getDefaultEventEnd(!j.hasTime(),j),f&&a.extend(f,{start:j,end:k}),i.isExternalDragAllowedInRange(j,l,f)?h.renderDrag(j,l):(j=null,n())},cellOut:function(){j=null,h.destroyDrag(),o()}}),a(document).one("dragstop",function(a,b){var d;h.destroyDrag(),o(),j&&(e.startTime&&!j.hasTime()&&j.time(e.startTime),h.trigger("drop",c[0],j,a,b),f&&(d=i.renderEvent(f,e.stick),h.trigger("eventReceive",null,d[0])))}),g.startDrag(b)))},select:function(a,b,c){this.unselect(c),this.renderSelection(a,b),this.reportSelection(a,b,c)},renderSelection:function(){},reportSelection:function(a,b,c){this.isSelected=!0,this.trigger("select",null,a,b,c)},unselect:function(a){this.isSelected&&(this.isSelected=!1,this.destroySelection(),this.trigger("unselect",null,a))},destroySelection:function(){},documentMousedown:function(b){var c;this.isSelected&&this.opt("unselectAuto")&&w(b)&&(c=this.opt("unselectCancel"),c&&a(b.target).closest(c).length||this.unselect(b))}},Jb.dataAttrPrefix="",xb.prototype=C(vb.prototype),a.extend(xb.prototype,{dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headRowEl:null,render:function(a,b,c){this.rowCnt=a,this.colCnt=b,this.dayNumbersVisible=c,this.weekNumbersVisible=this.opt("weekNumbers"),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderHtml()),this.headRowEl=this.el.find("thead .fc-row"),this.scrollerEl=this.el.find(".fc-day-grid-container"),this.dayGrid.coordMap.containerEl=this.scrollerEl,this.dayGrid.el=this.el.find(".fc-day-grid"),this.dayGrid.render(this.hasRigidRows()),vb.prototype.render.call(this)},destroy:function(){this.dayGrid.destroy(),vb.prototype.destroy.call(this)},renderHtml:function(){return'<table><thead><tr><td class="'+this.widgetHeaderClass+'">'+this.dayGrid.headHtml()+'</td></tr></thead><tbody><tr><td class="'+this.widgetContentClass+'"><div class="fc-day-grid-container"><div class="fc-day-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){return this.weekNumbersVisible?'<th class="fc-week-number '+this.widgetHeaderClass+'" '+this.weekNumberStyleAttr()+"><span>"+F(this.opt("weekNumberTitle"))+"</span></th>":void 0},numberIntroHtml:function(a){return this.weekNumbersVisible?'<td class="fc-week-number" '+this.weekNumberStyleAttr()+"><span>"+this.calendar.calculateWeekNumber(this.cellToDate(a,0))+"</span></td>":void 0},dayIntroHtml:function(){return this.weekNumbersVisible?'<td class="fc-week-number '+this.widgetContentClass+'" '+this.weekNumberStyleAttr()+"></td>":void 0},introHtml:function(){return this.weekNumbersVisible?'<td class="fc-week-number" '+this.weekNumberStyleAttr()+"></td>":void 0},numberCellHtml:function(a,b,c){var d;return this.dayNumbersVisible?(d=this.dayGrid.getDayClasses(c),d.unshift("fc-day-number"),'<td class="'+d.join(" ")+'" data-date="'+c.format()+'">'+c.date()+"</td>"):"<td/>"},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('<hr class="'+this.widgetHeaderClass+'"/>').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'<table><thead><tr><td class="'+this.widgetHeaderClass+'">'+this.timeGrid.headHtml()+'</td></tr></thead><tbody><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="'+this.widgetHeaderClass+'"/>':"")+'<div class="fc-time-grid-container"><div class="fc-time-grid"/></div></td></tr></tbody></table>'},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,'<th class="fc-axis fc-week-number '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+"><span>"+F(d)+"</span></th>"):'<th class="fc-axis '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+"></th>"},dayIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+"><span>"+(this.opt("allDayHtml")||F(this.opt("allDayText")))+"</span></td>"},slotBgIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+"></td>"},introHtml:function(){return'<td class="fc-axis" '+this.axisStyleAttr()+"></td>"},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;c<a.length;c++)a[c].allDay?d.push(a[c]):e.push(a[c]);b=this.timeGrid.renderEvents(e),this.dayGrid&&(f=this.dayGrid.renderEvents(d)),this.updateHeight(),vb.prototype.renderEvents.call(this,a)},getSegs:function(){return this.timeGrid.getSegs().concat(this.dayGrid?this.dayGrid.getSegs():[])},destroyEvents:function(){vb.prototype.destroyEvents.call(this),this.recordScroll(),this.timeGrid.destroyEvents(),this.dayGrid&&this.dayGrid.destroyEvents()},renderDrag:function(a,b,c){return a.hasTime()?this.timeGrid.renderDrag(a,b,c):this.dayGrid?this.dayGrid.renderDrag(a,b,c):void 0},destroyDrag:function(){this.timeGrid.destroyDrag(),this.dayGrid&&this.dayGrid.destroyDrag()},renderSelection:function(a,b){a.hasTime()||b.hasTime()?this.timeGrid.renderSelection(a,b):this.dayGrid&&this.dayGrid.renderSelection(a,b)},destroySelection:function(){this.timeGrid.destroySelection(),this.dayGrid&&this.dayGrid.destroySelection()}}),Kb.agendaWeek=Eb,Eb.prototype=C(Db.prototype),a.extend(Eb.prototype,{name:"agendaWeek",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")," ? "),Db.prototype.render.call(this,this.getCellsPerWeek())}}),Kb.agendaDay=Fb,Fb.prototype=C(Db.prototype),a.extend(Fb.prototype,{name:"agendaDay",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")),Db.prototype.render.call(this,1)}})});
|