/*! SmartAdmin - v1.5.0 - 2014-11-06 */!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(Bb,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),fb=new i(ab,cb),gb=fb.render(),gb&&c.prepend(gb),o(cb.defaultView),cb.handleWindowResize&&a(window).resize(v),n()||h()}function h(){setTimeout(function(){!jb.start&&n()&&q()},0)}function k(){jb&&(Z("viewDestroy",jb,jb,jb.element),jb.triggerEventDestroy()),a(window).unbind("resize",v),cb.droppable&&a(document).off("dragstart",$).off("dragstop",_),jb.selectionManagerDestroy&&jb.selectionManagerDestroy(),fb.destroy(),hb.remove(),c.removeClass("fc fc-ltr fc-rtl ui-widget")}function m(){return c.is(":visible")}function n(){return a("body").is(":visible")}function o(a){jb&&a==jb.name||p(a)}function p(b){sb++,jb&&(Z("viewDestroy",jb,jb,jb.element),J(),jb.triggerEventDestroy(),U(),jb.element.remove(),fb.deactivateButton(jb.name)),fb.activateButton(b),jb=new Fb[b](a("
").appendTo(hb),ab),q(),V(),sb--}function q(a){jb.start&&!a&&mb.isWithin(jb.intervalStart,jb.intervalEnd)||m()&&r(a)}function r(a){sb++,jb.start&&(Z("viewDestroy",jb,jb,jb.element),J(),B()),U(),a&&(mb=jb.incrementDate(mb,a)),jb.render(mb.clone()),u(),V(),(jb.afterRender||A)(),G(),H(),Z("viewRender",jb,jb,jb.element),sb--,C()}function s(){m()&&(J(),B(),t(),u(),z())}function t(){lb=cb.contentHeight?cb.contentHeight:cb.height?cb.height-(gb?gb.height():0)-w(hb):Math.round(hb.width()/Math.max(cb.aspectRatio,.5))}function u(){void 0===lb&&t(),sb++,jb.setHeight(lb),jb.setWidth(hb.width()),sb--,kb=c.outerWidth()}function v(a){if(!sb&&a.target===window)if(jb.start){var b=++rb;setTimeout(function(){b==rb&&!sb&&m()&&kb!=(kb=c.outerWidth())&&(sb++,s(),jb.trigger("windowResize",qb),sb--)},cb.windowResizeDelay)}else h()}function x(){B(),D()}function y(a){B(),z(a)}function z(a){m()&&(jb.renderEvents(tb,a),jb.trigger("eventAfterAllRender"))}function B(){jb.triggerEventDestroy(),jb.clearEvents(),jb.clearEventData()}function C(){!cb.lazyFetching||ob(jb.start,jb.end)?D():z()}function D(){pb(jb.start,jb.end)}function E(a){tb=a,z()}function F(a){y(a)}function G(){fb.updateTitle(jb.title)}function H(){var a=ab.getNow();a.isWithin(jb.intervalStart,jb.intervalEnd)?fb.disableButton("today"):fb.enableButton("today")}function I(a,b){jb.select(a,b)}function J(){jb&&jb.unselect()}function K(){q(-1)}function L(){q(1)}function M(){mb.add("years",-1),q()}function N(){mb.add("years",1),q()}function O(){mb=ab.getNow(),q()}function Q(a){mb=ab.moment(a),q()}function R(a){mb.add(b.duration(a)),q()}function T(){return mb.clone()}function U(){hb.css({"width":"100%","height":hb.height(),"overflow":"hidden"})}function V(){hb.css({"width":"","height":"","overflow":""})}function W(){return ab}function X(){return jb}function Y(a,b){return void 0===b?cb[a]:void(("height"==a||"contentHeight"==a||"aspectRatio"==a)&&(cb[a]=b,s()))}function Z(a,b){return cb[a]?cb[a].apply(b||qb,Array.prototype.slice.call(arguments,2)):void 0}function $(b,c){var d=b.target,e=a(d);if(!e.parents(".fc").length){var f=cb.dropAccept;(a.isFunction(f)?f.call(d,e):e.is(f))&&(nb=d,jb.dragStart(nb,b,c))}}function _(a,b){nb&&(jb.dragStop(nb,a,b),nb=null)}var ab=this;d=d||{};var bb,cb=f({},Bb,d);bb=cb.lang in Cb?Cb[cb.lang]:Cb[Bb.lang],bb&&(cb=f({},Bb,bb,d)),cb.isRTL&&(cb=f({},Bb,Db,bb||{},d)),ab.options=cb,ab.render=e,ab.destroy=k,ab.refetchEvents=x,ab.reportEvents=E,ab.reportEventChange=F,ab.rerenderEvents=y,ab.changeView=o,ab.select=I,ab.unselect=J,ab.prev=K,ab.next=L,ab.prevYear=M,ab.nextYear=N,ab.today=O,ab.gotoDate=Q,ab.incrementDate=R,ab.getDate=T,ab.getCalendar=W,ab.getView=X,ab.option=Y,ab.trigger=Z;var db=l(b.langData(cb.lang));if(cb.monthNames&&(db._months=cb.monthNames),cb.monthNamesShort&&(db._monthsShort=cb.monthNamesShort),cb.dayNames&&(db._weekdays=cb.dayNames),cb.dayNamesShort&&(db._weekdaysShort=cb.dayNamesShort),null!=cb.firstDay){var eb=l(db._week);eb.dow=cb.firstDay,db._week=eb}ab.defaultAllDayEventDuration=b.duration(cb.defaultAllDayEventDuration),ab.defaultTimedEventDuration=b.duration(cb.defaultTimedEventDuration),ab.moment=function(){var a;return"local"===cb.timezone?(a=Eb.moment.apply(null,arguments),a.hasTime()&&a.local()):a="UTC"===cb.timezone?Eb.moment.utc.apply(null,arguments):Eb.moment.parseZone.apply(null,arguments),a._lang=db,a},ab.getIsAmbigTimezone=function(){return"local"!==cb.timezone&&"UTC"!==cb.timezone},ab.rezoneDate=function(a){return ab.moment(a.toArray())},ab.getNow=function(){var a=cb.now;return"function"==typeof a&&(a=a()),ab.moment(a)},ab.calculateWeekNumber=function(a){var b=cb.weekNumberCalculation;return"function"==typeof b?b(a):"local"===b?a.week():"ISO"===b.toUpperCase()?a.isoWeek():void 0},ab.getEventEnd=function(a){return a.end?a.end.clone():ab.getDefaultEventEnd(a.allDay,a.start)},ab.getDefaultEventEnd=function(a,b){var c=b.clone();return a?c.stripTime().add(ab.defaultAllDayEventDuration):c.add(ab.defaultTimedEventDuration),ab.getIsAmbigTimezone()&&c.stripZone(),c},ab.formatRange=function(a,b,c){return"function"==typeof c&&(c=c.call(ab,cb,db)),S(a,b,c,null,cb.isRTL)},ab.formatDate=function(a,b){return"function"==typeof b&&(b=b.call(ab,cb,db)),P(a,b)},j.call(ab,cb);var fb,gb,hb,ib,jb,kb,lb,mb,nb,ob=ab.isFetchNeeded,pb=ab.fetchEvents,qb=c[0],rb=0,sb=0,tb=[];mb=null!=cb.defaultDate?ab.moment(cb.defaultDate):ab.getNow(),cb.droppable&&a(document).on("dragstart",$).on("dragstop",_)}function i(b,c){function d(){m=c.theme?"ui":"fc";var b=c.header;return b?n=a("").append(a("").append(f("left")).append(f("center")).append(f("right"))):void 0}function e(){n.remove()}function f(d){var e=a("",fb&&(d+=""),a=0;Y>a;a++)b=lb(0,a),d+="";return d+=""}function k(){var a,b,c,d=db+"-widget-content",e="";for(e+="",a=0;X>a;a++){for(e+="",fb&&(c=lb(a,0),e+=""),b=0;Y>b;b++)c=lb(a,b),e+=l(c);e+=""}return e+=""}function l(a){var b=I.intervalStart.month(),d=c.getNow().stripTime(),e="",f=db+"-widget-content",g=["fc-day","fc-"+Ib[a.day()],f];return a.month()!=b&&g.push("fc-other-month"),a.isSame(d,"day")?g.push("fc-today",db+"-state-highlight"):g.push(d>a?"fc-past":"fc-future"),e+=""}function m(b){U=b;var c,d,e,f=Math.max(U-K.height(),0);"variable"==gb("weekMode")?c=d=Math.floor(f/(1==X?2:6)):(c=Math.floor(f/X),d=f-c*(X-1)),P.each(function(b,f){X>b&&(e=a(f),e.find("> div").css("min-height",(b==X-1?d:c)-w(e)))})}function n(a){T=a,bb.clear(),cb.clear(),W=0,fb&&(W=K.find("th.fc-week-number").outerWidth()),V=Math.floor((T-W)/Y),q(L.slice(0,-1),V)}function o(a){a.click(p).mousedown(kb)}function p(b){if(!gb("selectable")){var d=c.moment(a(this).data("date"));hb("dayClick",this,d,b)}}function r(a,b,c){c&&$.build();for(var d=nb(a,b),e=0;ec&&(d=a(g),e=d.offset().top,c&&(f[1]=e),f=[e],b[c]=f)}),f[1]=e+d.outerHeight()}),ab=new yb($),bb=new Ab(function(a){return Q.eq(a)}),cb=new Ab(function(a){return R.eq(a)})}function _(){function a(a,b){c.renderDayEvents(a,b)}function b(){c.getDaySegmentContainer().empty()}var c=this;c.renderEvents=a,c.clearEvents=b,rb.call(c)}function ab(a,b){function c(a,b){return a.clone().stripTime().add("weeks",b).startOf("week")}function d(a){e.intervalStart=a.clone().stripTime().startOf("week"),e.intervalEnd=e.intervalStart.clone().add("weeks",1),e.start=e.skipHiddenDays(e.intervalStart),e.end=e.skipHiddenDays(e.intervalEnd,-1,!0),e.title=b.formatRange(e.start,e.end.clone().subtract(1),e.opt("titleFormat")," \u2014 "),e.renderAgenda(e.getCellsPerWeek())}var e=this;e.incrementDate=c,e.render=d,eb.call(e,a,b,"agendaWeek")}function bb(a,b){function c(a,b){var c=a.clone().stripTime().add("days",b);return c=e.skipHiddenDays(c,0>b?-1:1)}function d(a){e.start=e.intervalStart=a.clone().stripTime(),e.end=e.intervalEnd=e.start.clone().add("days",1),e.title=b.formatDate(e.start,e.opt("titleFormat")),e.renderAgenda(1)}var e=this;e.incrementDate=c,e.render=d,eb.call(e,a,b,"agendaDay")}function cb(a,b){return b.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")}function db(a,b){return b.longDateFormat("LT").replace(/\s*a$/i,"")}function eb(c,d,e){function f(a){Bb=a,g(),U?i():h()}function g(){Hb=Nb("theme")?"ui":"fc",Jb=Nb("isRTL"),Mb=Nb("columnFormat"),Kb=b.duration(Nb("minTime")),Lb=b.duration(Nb("maxTime")),rb=b.duration(Nb("slotDuration")),tb=Nb("snapDuration"),tb=tb?b.duration(tb):rb}function h(){var d,e,f,g,h=Hb+"-widget-header",j=Hb+"-widget-content",k=rb.asMinutes()%15===0;for(i(),bb=a("
").appendTo(c),Nb("allDaySlot")?(cb=a("
").appendTo(bb),d="
"),f=c.header[d];return f&&a.each(f.split(" "),function(d){d>0&&e.append("");var f;a.each(this.split(","),function(d,g){if("title"==g)e.append("

 

"),f&&f.addClass(m+"-corner-right"),f=null;else{var h;if(b[g]?h=b[g]:Fb[g]&&(h=function(){o.removeClass(m+"-state-hover"),b.changeView(g)}),h){var i,j=D(c.themeButtonIcons,g),k=D(c.buttonIcons,g),l=D(c.defaultButtonText,g),n=D(c.buttonText,g);i=n?E(n):j&&c.theme?"":k&&!c.theme?"":E(l||g);var o=a(""+i+"").click(function(){o.hasClass(m+"-state-disabled")||h()}).mousedown(function(){o.not("."+m+"-state-active").not("."+m+"-state-disabled").addClass(m+"-state-down")}).mouseup(function(){o.removeClass(m+"-state-down")}).hover(function(){o.not("."+m+"-state-active").not("."+m+"-state-disabled").addClass(m+"-state-hover")},function(){o.removeClass(m+"-state-hover").removeClass(m+"-state-down")}).appendTo(e);G(o),f||o.addClass(m+"-corner-left"),f=o}}}),f&&f.addClass(m+"-corner-right")}),e}function g(a){n.find("h2").html(a)}function h(a){n.find("span.fc-button-"+a).addClass(m+"-state-active")}function i(a){n.find("span.fc-button-"+a).removeClass(m+"-state-active")}function j(a){n.find("span.fc-button-"+a).addClass(m+"-state-disabled")}function k(a){n.find("span.fc-button-"+a).removeClass(m+"-state-disabled")}var l=this;l.render=d,l.destroy=e,l.updateTitle=g,l.activateButton=h,l.deactivateButton=i,l.disableButton=j,l.enableButton=k;var m,n=a([])}function j(b){function c(a,b){return!y||a.clone().stripZone()z.clone().stripZone()}function d(a,b){y=a,z=b,L=[];var c=++G,d=F.length;H=d;for(var f=0;d>f;f++)e(F[f],c)}function e(b,c){f(b,function(d){var e,f,g=a.isArray(b.events);if(c==G){if(d)for(e=0;e=0;e--)if(c=a[d[e].toLowerCase()],void 0!==c)return c;return a["default"]}function E(a){return(a+"").replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function F(a){return a.replace(/&.*?;/g,"")}function G(a){a.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function H(a){a.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function I(a,b){var c=a.source||{},d=a.color,e=c.color,f=b("eventColor"),g=a.backgroundColor||d||c.backgroundColor||e||b("eventBackgroundColor")||f,h=a.borderColor||d||c.borderColor||e||b("eventBorderColor")||f,i=a.textColor||c.textColor||b("eventTextColor"),j=[];return g&&j.push("background-color:"+g),h&&j.push("border-color:"+h),i&&j.push("color:"+i),j.join(";")}function J(b,c,d){if(a.isFunction(b)&&(b=[b]),b){var e,f;for(e=0;eg&&(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=Mb[d.charAt(0)],e&&a.isSame(b,e))?O(a,d):!1}function V(a){return a in Nb?Nb[a]:Nb[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,b){function c(a,b){return a.clone().stripTime().add("months",b).startOf("month")}function d(a){e.intervalStart=a.clone().stripTime().startOf("month"),e.intervalEnd=e.intervalStart.clone().add("months",1),e.start=e.intervalStart.clone(),e.start=e.skipHiddenDays(e.start),e.start.startOf("week"),e.start=e.skipHiddenDays(e.start),e.end=e.intervalEnd.clone(),e.end=e.skipHiddenDays(e.end,-1,!0),e.end.add("days",(7-e.end.weekday())%7),e.end=e.skipHiddenDays(e.end,-1,!0);var c=Math.ceil(e.end.diff(e.start,"weeks",!0));"fixed"==e.opt("weekMode")&&(e.end.add("weeks",6-c),c=6),e.title=b.formatDate(e.intervalStart,e.opt("titleFormat")),e.renderBasic(c,e.getCellsPerWeek(),!0)}var e=this;e.incrementDate=c,e.render=d,$.call(e,a,b,"month")}function Y(a,b){function c(a,b){return a.clone().stripTime().add("weeks",b).startOf("week")}function d(a){e.intervalStart=a.clone().stripTime().startOf("week"),e.intervalEnd=e.intervalStart.clone().add("weeks",1),e.start=e.skipHiddenDays(e.intervalStart),e.end=e.skipHiddenDays(e.intervalEnd,-1,!0),e.title=b.formatRange(e.start,e.end.clone().subtract(1),e.opt("titleFormat")," \u2014 "),e.renderBasic(1,e.getCellsPerWeek(),!1)}var e=this;e.incrementDate=c,e.render=d,$.call(e,a,b,"basicWeek")}function Z(a,b){function c(a,b){var c=a.clone().stripTime().add("days",b);return c=e.skipHiddenDays(c,0>b?-1:1)}function d(a){e.start=e.intervalStart=a.clone().stripTime(),e.end=e.intervalEnd=e.start.clone().add("days",1),e.title=b.formatDate(e.start,e.opt("titleFormat")),e.renderBasic(1,1,!1)}var e=this;e.incrementDate=c,e.render=d,$.call(e,a,b,"basicDay")}function $(b,c,d){function e(a,b,c){X=a,Y=b,Z=c,f(),M||g(),h()}function f(){db=gb("theme")?"ui":"fc",eb=gb("columnFormat"),fb=gb("weekNumbers")}function g(){S=a("
").appendTo(b)}function h(){var c=i();J&&J.remove(),J=a(c).appendTo(b),K=J.find("thead"),L=K.find(".fc-day-header"),M=J.find("tbody"),N=M.find("tr"),O=M.find(".fc-day"),P=N.find("td:first-child"),Q=N.eq(0).find(".fc-day > div"),R=N.eq(0).find(".fc-day-content > div"),H(K.add(K.find("tr"))),H(N),N.eq(0).addClass("fc-first"),N.filter(":last").addClass("fc-last"),O.each(function(b,c){var d=lb(Math.floor(b/Y),b%Y);hb("dayRender",I,d,a(c))}),o(O)}function i(){var a=""+j()+k()+"
";return a}function j(){var a,b,c=db+"-widget-header",d="";for(d+="
"+E(gb("weekNumberTitle"))+""+E(ob(b,eb))+"
"+E(pb(c))+"
",Z&&(e+="
"+a.date()+"
"),e+="
 
"+(Nb("allDayHTML")||E(Nb("allDayText")))+"
 
",db=a(d).appendTo(bb),eb=db.find("tr"),s(eb.find("td")),bb.append("
")):cb=a([]),gb=a("
").appendTo(bb),hb=a("
").appendTo(gb),ib=a("
").appendTo(hb),d="",e=b.duration(+Kb),Cb=0;Lb>e;)f=T.start.clone().time(e),g=f.minutes(),d+="",e.add(rb),Cb++;d+="
"+(k&&g?" ":E(Yb(f,Nb("axisFormat"))))+"
 
",jb=a(d).appendTo(hb),t(jb.find("td"))}function i(){var b=j();U&&U.remove(),U=a(b).appendTo(c),V=U.find("thead"),W=V.find("th").slice(1,-1),X=U.find("tbody"),Y=X.find("td").slice(0,-1),Z=Y.find("> div"),$=Y.find(".fc-day-content > div"),_=Y.eq(0),ab=Z.eq(0),H(V.add(V.find("tr"))),H(X.add(X.find("tr")))}function j(){var a=""+k()+l()+"
";return a}function k(){var a,b,c,d=Hb+"-widget-header",e="";for(e+="",Nb("weekNumbers")?(a=Vb(0,0),b=Zb(a),Jb?b+=Nb("weekNumberTitle"):b=Nb("weekNumberTitle")+b,e+=""+E(b)+""):e+=" ",c=0;Bb>c;c++)a=Vb(0,c),e+=""+E(Yb(a,Mb))+"";return e+=" "}function l(){var a,b,c,e,f,g=Hb+"-widget-header",h=Hb+"-widget-content",i=d.getNow().stripTime(),j="";for(j+=" ",c="",b=0;Bb>b;b++)a=Vb(0,b),f=["fc-col"+b,"fc-"+Ib[a.day()],h],a.isSame(i,"day")?f.push(Hb+"-state-highlight","fc-today"):f.push(i>a?"fc-past":"fc-future"),e="
 
",c+=e;return j+=c,j+=" "}function m(a){void 0===a&&(a=mb),mb=a,$b={};var b=X.position().top,c=gb.position().top,d=Math.min(a-b,jb.height()+c+1);ab.height(d-w(_)),bb.css("top",b),gb.height(d-c-1);var e=jb.find("tr:first").height()+1,f=jb.find("tr:eq(1)").height();sb=(e+f)/2,ub=rb/tb,zb=sb/ub}function n(b){lb=b,Fb.clear(),Gb.clear();var c=V.find("th:first");db&&(c=c.add(db.find("th:first"))),c=c.add(jb.find("th:first")),nb=0,q(c.width("").each(function(b,c){nb=Math.max(nb,a(c).outerWidth())}),nb);var d=U.find(".fc-agenda-gutter");db&&(d=d.add(db.find("th.fc-agenda-gutter")));var e=gb[0].clientWidth;pb=gb.width()-e,pb?(q(d,pb),d.show().prev().removeClass("fc-last")):d.hide().prev().addClass("fc-last"),ob=Math.floor((e-nb)/Bb),q(W.slice(0,-1),ob)}function o(){function a(){gb.scrollTop(c)}var c=K(b.duration(Nb("scrollTime")))+1;a(),setTimeout(a,0)}function p(){o()}function s(a){a.click(u).mousedown(Tb)}function t(a){a.click(u).mousedown(P)}function u(a){if(!Nb("selectable")){var b=Math.min(Bb-1,Math.floor((a.pageX-U.offset().left-nb)/ob)),c=Vb(0,b),e=this.parentNode.className.match(/fc-slot(\d+)/);if(e){var f=parseInt(e[1],10);c.add(Kb+f*rb),c=d.rezoneDate(c),Ob("dayClick",Y[b],c,a)}else Ob("dayClick",Y[b],c,a)}}function v(a,b,c){c&&Db.build();for(var d=Xb(a,b),e=0;ec;c++){var d=Vb(0,c),e=d.clone().add("days",1),f=a>d?a:d,g=b>e?e:b;if(g>f){var h=Db.rect(0,c,0,c,hb),i=J(f,d),j=J(g,d);h.top=i,h.height=j-i,t(Pb(h,hb))}}}function z(a){return Fb.left(a)}function A(a){return Gb.left(a)}function C(a){return Fb.right(a)}function D(a){return Gb.right(a)}function F(a){return Nb("allDaySlot")&&!a.row}function I(a){var c=Vb(0,a.col),e=a.row;return Nb("allDaySlot")&&e--,e>=0&&(c.time(b.duration(Kb+e*tb)),c=d.rezoneDate(c)),c}function J(a,c){return K(b.duration(a.clone().stripZone()-c.clone().stripTime()))}function K(a){if(Kb>a)return 0;if(a>=Lb)return jb.height();var b=(a-Kb)/rb,c=Math.floor(b),d=b-c,e=$b[c];void 0===e&&(e=$b[c]=jb.find("tr").eq(c).find("td div")[0].offsetTop);var f=e-1+d*sb;return f=Math.max(f,0)}function L(a){return a.hasTime()?a.clone().add(rb):a.clone().add("days",1)}function M(a,b){a.hasTime()||b.hasTime()?N(a,b):Nb("allDaySlot")&&v(a,b,!0)}function N(b,c){var d=Nb("selectHelper");if(Db.build(),d){var e=Wb(b).col;if(e>=0&&Bb>e){var f=Db.rect(0,e,0,e,hb),g=J(b,b),h=J(c,b);if(h>g){if(f.top=g,f.height=h-g,f.left+=2,f.width-=5,a.isFunction(d)){var i=d(b,c);i&&(f.position="absolute",kb=a(i).css(f).appendTo(hb))}else f.isStart=!0,f.isEnd=!0,kb=a(Ub({"title":"","start":b,"end":c,"className":["fc-select-helper"],"editable":!1},f)),kb.css("opacity",Nb("dragOpacity"));kb&&(t(kb),hb.append(kb),q(kb,f.width,!0),r(kb,f.height,!0))}}}else y(b,c)}function O(){Qb(),kb&&(kb.remove(),kb=null)}function P(b){if(1==b.which&&Nb("selectable")){Sb(b);var c;Eb.start(function(a,b){if(O(),a&&a.col==b.col&&!F(a)){var d=I(b),e=I(a);c=[d,d.clone().add(tb),e,e.clone().add(tb)].sort(B),N(c[0],c[3])}else c=null},b),a(document).one("mouseup",function(a){Eb.stop(),c&&(+c[0]==+c[1]&&Q(c[0],a),Rb(c[0],c[3],a))})}}function Q(a,b){Ob("dayClick",Y[Wb(a).col],a,b)}function R(a,b){Eb.start(function(a){if(Qb(),a){var b=I(a),c=b.clone();b.hasTime()?(c.add(d.defaultTimedEventDuration),y(b,c)):(c.add(d.defaultAllDayEventDuration),v(b,c))}},b)}function S(a,b,c){var d=Eb.stop();Qb(),d&&Ob("drop",a,I(d),b,c)}var T=this;T.renderAgenda=f,T.setWidth=n,T.setHeight=m,T.afterRender=p,T.computeDateTop=J,T.getIsCellAllDay=F,T.allDayRow=function(){return eb},T.getCoordinateGrid=function(){return Db},T.getHoverListener=function(){return Eb},T.colLeft=z,T.colRight=C,T.colContentLeft=A,T.colContentRight=D,T.getDaySegmentContainer=function(){return cb},T.getSlotSegmentContainer=function(){return ib},T.getSlotContainer=function(){return hb},T.getRowCnt=function(){return 1},T.getColCnt=function(){return Bb},T.getColWidth=function(){return ob},T.getSnapHeight=function(){return zb},T.getSnapDuration=function(){return tb},T.getSlotHeight=function(){return sb},T.getSlotDuration=function(){return rb},T.getMinTime=function(){return Kb},T.getMaxTime=function(){return Lb},T.defaultSelectionEnd=L,T.renderDayOverlay=v,T.renderSelection=M,T.clearSelection=O,T.reportDayClick=Q,T.dragStart=R,T.dragStop=S,qb.call(T,c,d,e),wb.call(T),vb.call(T),fb.call(T);var U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,rb,sb,tb,ub,zb,Bb,Cb,Db,Eb,Fb,Gb,Hb,Jb,Kb,Lb,Mb,Nb=T.opt,Ob=T.trigger,Pb=T.renderOverlay,Qb=T.clearOverlays,Rb=T.reportSelection,Sb=T.unselect,Tb=T.daySelectionMousedown,Ub=T.slotSegHtml,Vb=T.cellToDate,Wb=T.dateToCell,Xb=T.rangeToSegments,Yb=d.formatDate,Zb=d.calculateWeekNumber,$b={}; G(c.addClass("fc-agenda")),Db=new xb(function(b,c){function d(a){return Math.max(i,Math.min(j,a))}var e,f,g;W.each(function(b,d){e=a(d),f=e.offset().left,b&&(g[1]=f),g=[f],c[b]=g}),g[1]=f+e.outerWidth(),Nb("allDaySlot")&&(e=eb,f=e.offset().top,b[0]=[f,f+e.outerHeight()]);for(var h=hb.offset().top,i=gb.offset().top,j=i+gb.outerHeight(),k=0;Cb*ub>k;k++)b.push([d(h+zb*k),d(h+zb*(k+1))])}),Eb=new yb(Db),Fb=new Ab(function(a){return Z.eq(a)}),Gb=new Ab(function(a){return $.eq(a)})}function fb(){function c(a,b){var c,d=a.length,f=[],h=[];for(c=0;d>c;c++)a[c].allDay?f.push(a[c]):h.push(a[c]);n("allDaySlot")&&(V(f,b),v()),g(e(h),b)}function d(){x().empty(),y().empty()}function e(a){var b,c,d,e,g,h=G(),i=W(),j=X(),k=[];for(c=0;h>c;c++)for(b=F(0,c),g=f(a,b.clone().time(i),b.clone().time(j)),g=gb(g),d=0;dd;d++)e=a[d],f=e.start.clone().stripZone(),g=$(e).stripZone(),g>b&&c>f&&(b>f?(h=b.clone(),j=!1):(h=f,j=!0),g>c?(i=c.clone(),k=!1):(i=g,k=!0),l.push({"event":e,"start":h,"end":i,"isStart":j,"isEnd":k}));return l.sort(pb)}function g(b,c){var d,e,f,g,j,k,l,m,q,r,t,u,v,x,z,B,E=b.length,F="",G=y(),H=n("isRTL");for(d=0;E>d;d++)e=b[d],f=e.event,g=A(e.start,e.start),j=A(e.end,e.start),k=C(e.col),l=D(e.col),m=l-k,l-=.025*m,m=l-k,q=m*(e.forwardCoord-e.backwardCoord),n("slotEventOverlap")&&(q=Math.max(2*(q-10),q)),H?(t=l-e.backwardCoord*m,r=t-q):(r=k+e.backwardCoord*m,t=r+q),r=Math.max(r,k),t=Math.min(t,l),q=t-r,e.top=g,e.left=r,e.outerWidth=q,e.outerHeight=j-g,F+=h(f,e);for(G[0].innerHTML=F,u=G.children(),d=0;E>d;d++)e=b[d],f=e.event,v=a(u[d]),x=o("eventRender",f,f,v),x===!1?v.remove():(x&&x!==!0&&(v.remove(),v=a(x).css({"position":"absolute","top":e.top,"left":e.left}).appendTo(G)),e.element=v,f._id===c?i(f,v,e):v[0]._fci=d,O(f,v));for(p(G,b,i),d=0;E>d;d++)e=b[d],(v=e.element)&&(e.vsides=w(v,!0),e.hsides=s(v,!0),z=v.find(".fc-event-title"),z.length&&(e.contentTop=z[0].offsetTop));for(d=0;E>d;d++)e=b[d],(v=e.element)&&(v[0].style.width=Math.max(0,e.outerWidth-e.hsides)+"px",B=Math.max(0,e.outerHeight-e.vsides),v[0].style.height=B+"px",f=e.event,void 0!==e.contentTop&&B-e.contentTop<10&&(v.find("div.fc-event-time").text(Z(f.start,n("timeFormat"))+" - "+f.title),v.find("div.fc-event-title").remove()),o("eventAfterRender",f,f,v))}function h(a,b){var c="<",d=a.url,e=I(a,n),f=["fc-event","fc-event-vert"];return q(a)&&f.push("fc-event-draggable"),b.isStart&&f.push("fc-event-start"),b.isEnd&&f.push("fc-event-end"),f=f.concat(a.className),a.source&&(f=f.concat(a.source.className||[])),c+=d?"a href='"+E(a.url)+"'":"div",c+=" class='"+f.join(" ")+"' style='position:absolute;top:"+b.top+"px;left:"+b.left+"px;"+e+"'>
"+E(m.getEventTimeText(a))+"
"+E(a.title||"")+"
",b.isEnd&&t(a)&&(c+="
=
"),c+=""}function i(a,b,c){var d=b.find("div.fc-event-time");q(a)&&k(a,b,d),c.isEnd&&t(a)&&l(a,b,d),u(a,b)}function j(a,c,d){function e(){j||(c.width(f).height("").draggable("option","grid",null),j=!0)}var f,g,h,i=d.isStart,j=!0,k=z(),l=H(),m=W(),p=M(),q=L(),s=K(),t=J();c.draggable({"opacity":n("dragOpacity","month"),"revertDuration":n("dragRevertDuration"),"start":function(b,d){o("eventDragStart",c[0],a,b,d),Q(a,c),f=c.width(),k.start(function(b,d){if(U(),b){g=!1;var f=F(0,d.col),k=F(0,b.col);h=k.diff(f,"days"),b.row?i?j&&(c.width(l-10),r(c,Y.defaultTimedEventDuration/p*q),c.draggable("option","grid",[l,1]),j=!1):g=!0:(T(a.start.clone().add("days",h),$(a).add("days",h)),e()),g=g||j&&!h}else e(),g=!0;c.draggable("option","revert",g)},b,"drag")},"stop":function(d,f){if(k.stop(),U(),o("eventDragStop",c[0],a,d,f),g)e(),c.css("filter",""),P(a,c);else{var i,l,n=a.start.clone().add("days",h);j||(l=Math.round((c.offset().top-N().offset().top)/t),i=b.duration(m+l*s),n=Y.rezoneDate(n.clone().time(i))),R(c[0],a,n,d,f)}}})}function k(a,b,c){function d(){U(),h&&(j?(c.hide(),b.draggable("option","grid",null),T(t,u)):(e(),c.css("display",""),b.draggable("option","grid",[x,y])))}function e(){t&&c.text(m.getEventTimeText(t,a.end?u:null))}var f,g,h,i,j,k,l,p,q,r,s,t,u,v=m.getCoordinateGrid(),w=G(),x=H(),y=J(),z=K();b.draggable({"scroll":!1,"grid":[x,y],"axis":1==w?"y":!1,"opacity":n("dragOpacity"),"revertDuration":n("dragRevertDuration"),"start":function(c,d){o("eventDragStart",b[0],a,c,d),Q(a,b),v.build(),f=b.position(),g=v.cell(c.pageX,c.pageY),h=i=!0,j=k=B(g),l=p=0,q=0,r=s=0,t=null,u=null},"drag":function(c,e){var m=v.cell(c.pageX,c.pageY);if(h=!!m){if(j=B(m),l=Math.round((e.position.left-f.left)/x),l!=p){var n=F(0,g.col),o=g.col+l;o=Math.max(0,o),o=Math.min(w-1,o);var A=F(0,o);q=A.diff(n,"days")}j||(r=Math.round((e.position.top-f.top)/y))}(h!=i||j!=k||l!=p||r!=s)&&(j?(t=a.start.clone().stripTime().add("days",q),u=t.clone().add(Y.defaultAllDayEventDuration)):(t=a.start.clone().add(r*z).add("days",q),u=$(a).add(r*z).add("days",q)),d(),i=h,k=j,p=l,s=r),b.draggable("option","revert",!h)},"stop":function(c,e){U(),o("eventDragStop",b[0],a,c,e),h&&(j||q||r)?R(b[0],a,t,c,e):(h=!0,j=!1,l=0,q=0,r=0,d(),b.css("filter",""),b.css(f),P(a,b))}})}function l(a,b,c){var d,e,f,g=J(),h=K();b.resizable({"handles":{"s":".ui-resizable-handle"},"grid":g,"start":function(c,f){d=e=0,Q(a,b),o("eventResizeStart",b[0],a,c,f)},"resize":function(i,j){if(d=Math.round((Math.max(g,b.height())-j.originalSize.height)/g),d!=e){f=$(a).add(h*d);var k;k=d?m.getEventTimeText(a.start,f):m.getEventTimeText(a),c.text(k),e=d}},"stop":function(c,e){o("eventResizeStop",b[0],a,c,e),d?S(b[0],a,f,c,e):P(a,b)}})}var m=this;m.renderEvents=c,m.clearEvents=d,m.slotSegHtml=h,rb.call(m);var n=m.opt,o=m.trigger,q=m.isEventDraggable,t=m.isEventResizable,u=m.eventElementHandlers,v=m.setHeight,x=m.getDaySegmentContainer,y=m.getSlotSegmentContainer,z=m.getHoverListener,A=m.computeDateTop,B=m.getIsCellAllDay,C=m.colContentLeft,D=m.colContentRight,F=m.cellToDate,G=m.getColCnt,H=m.getColWidth,J=m.getSnapHeight,K=m.getSnapDuration,L=m.getSlotHeight,M=m.getSlotDuration,N=m.getSlotContainer,O=m.reportEventElement,P=m.showEvents,Q=m.hideEvents,R=m.eventDrop,S=m.eventResize,T=m.renderDayOverlay,U=m.clearOverlays,V=m.renderDayEvents,W=m.getMinTime,X=m.getMaxTime,Y=m.calendar,Z=Y.formatDate,$=Y.getEventEnd;m.draggableDayEvent=j}function gb(a){var b,c=hb(a),d=c[0];if(ib(c),d){for(b=0;bb.start&&a.startd;d++)b&&e[d][0]==b[0]||e[d][c]()}function r(a,b,c,e,f){var g=d.mutateEvent(b,c,null);h("eventDrop",a,b,g.dateDelta,function(){g.undo(),H(b._id)},e,f),H(b._id)}function s(a,b,c,e,f){var g=d.mutateEvent(b,null,c);h("eventResize",a,b,g.durationDelta,function(){g.undo(),H(b._id)},e,f),H(b._id)}function t(a){return b.isMoment(a)&&(a=a.day()),P[a]}function u(){return N}function v(a,b,c){var d=a.clone();for(b=b||1;P[(d.day()+(c?b:0)+7)%7];)d.add("days",b);return d}function w(){var a=x.apply(null,arguments),b=y(a),c=z(b);return c}function x(a,b){var c=G.getColCnt(),d=S?-1:1,e=S?c-1:0;"object"==typeof a&&(b=a.col,a=a.row);var f=a*c+(b*d+e);return f}function y(a){var b=G.start.day();return a+=Q[b],7*Math.floor(a/N)+R[(a%N+N)%N]-b}function z(a){return G.start.clone().add("days",a)}function A(a){var b=B(a),c=C(b),d=E(c);return d}function B(a){return a.clone().stripTime().diff(G.start,"days")}function C(a){var b=G.start.day();return a+=b,Math.floor(a/7)*N+Q[(a%7+7)%7]-Q[b]}function E(a){var b=G.getColCnt(),c=S?-1:1,d=S?b-1:0,e=Math.floor(a/b),f=(a%b+b)%b*c+d;return{"row":e,"col":f}}function F(a,b){var c=G.getRowCnt(),d=G.getColCnt(),e=[],f=B(a),g=B(b),h=+b.time();h&&h>=M&&g++,g=Math.max(g,f+1);for(var i=C(f),j=C(g)-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 p=E(n),q=E(o),r=[p.col,q.col].sort(),s=y(n)==f,t=y(o)+1==g;e.push({"row":k,"leftCol":r[0],"rightCol":r[1],"isStart":s,"isEnd":t})}}return e}var G=this;G.element=c,G.calendar=d,G.name=e,G.opt=f,G.trigger=h,G.isEventDraggable=i,G.isEventResizable=j,G.clearEventData=k,G.reportEventElement=l,G.triggerEventDestroy=m,G.eventElementHandlers=n,G.showEvents=o,G.hideEvents=p,G.eventDrop=r,G.eventResize=s;var H=d.reportEventChange,I={},J=[],L=d.options,M=b.duration(L.nextDayThreshold);G.getEventTimeText=function(a){var b,c;return 2===arguments.length?(b=arguments[0],c=arguments[1]):(b=a.start,c=a.end),c&&f("displayEventEnd")?d.formatRange(b,c,f("timeFormat")):d.formatDate(b,f("timeFormat"))},G.isHiddenDay=t,G.skipHiddenDays=v,G.getCellsPerWeek=u,G.dateToCell=A,G.dateToDayOffset=B,G.dayOffsetToCellOffset=C,G.cellOffsetToCell=E,G.cellToDate=w,G.cellToCellOffset=x,G.cellOffsetToDayOffset=y,G.dayOffsetToDate=z,G.rangeToSegments=F;var N,O=f("hiddenDays")||[],P=[],Q=[],R=[],S=f("isRTL");!function(){f("weekends")===!1&&O.push(0,6);for(var b=0,c=0;7>b;b++)Q[b]=c,P[b]=-1!=a.inArray(b,O),P[b]||(R[c]=b,c++);if(N=c,!N)throw"invalid hiddenDays"}()}function rb(){function b(a,b){var c=d(a,!1,!0);tb(c,function(a,b){B(a.event,b)}),r(c,b),tb(c,function(a,b){y("eventAfterRender",a.event,a.event,b)})}function c(a,b,c){var e=d([a],!0,!1),f=[];return tb(e,function(a,d){a.row===b&&d.css("top",c),f.push(d[0])}),f}function d(b,c,d){var f,i,l=S(),m=c?a("
"):l,n=e(b);return g(n),f=h(n),m[0].innerHTML=f,i=m.children(),c&&l.append(i),j(n,i),tb(n,function(a,b){a.hsides=s(b,!0)}),tb(n,function(a,b){b.width(Math.max(0,a.outerWidth-a.hsides))}),tb(n,function(a,b){a.outerHeight=b.outerHeight(!0)}),k(n,d),n}function e(a){for(var b=[],c=0;c
",!d.allDay&&a.isStart&&(b+=""+E(w.getEventTimeText(d))+""),b+=""+E(d.title||"")+"
",d.allDay&&a.isEnd&&A(d)&&(b+="
   
"),b+=""}function j(b,c){for(var d=0;dg;g++){var h=f[g],i=[];for(b=0;d>b;b++)i.push(0);for(var j=0;jd;d++)f[d]=n(f[d]||[]);return f}function n(a){for(var b=[],c=o(a),d=0;da;a++)c[a]=N(a).find("div.fc-day-content > div");return c}function r(a,b){var c=S();tb(a,function(a,c,d){var e=a.event;e._id===b?t(e,c,a):c[0]._fci=d}),p(c,a,t)}function t(a,b,c){z(a)&&w.draggableDayEvent(a,b,c),a.allDay&&c.isEnd&&A(a)&&w.resizableDayEvent(a,b,c),D(a,b)}function u(a,b){var c,d,e=W();b.draggable({"delay":50,"opacity":x("dragOpacity"),"revertDuration":x("dragRevertDuration"),"start":function(f,g){y("eventDragStart",b[0],a,f,g),H(a,b),e.start(function(e,f,g,h){if(b.draggable("option","revert",!e||!g&&!h),U(),e){var i=Y(f),j=Y(e);c=j.diff(i,"days"),d=a.start.clone().add("days",c),T(d,cb(a).add("days",c))}else c=0},f,"drag")},"stop":function(f,g){e.stop(),U(),y("eventDragStop",b[0],a,f,g),c?J(b[0],a,d,f,g):(b.css("filter",""),F(a,b))}})}function v(b,d,e){var f=x("isRTL"),g=f?"w":"e",h=d.find(".ui-resizable-"+g),i=!1;G(d),d.mousedown(function(a){a.preventDefault()}).click(function(a){i&&(a.preventDefault(),a.stopImmediatePropagation())}),h.mousedown(function(f){function h(c){y("eventResizeStop",d[0],b,c,{}),a("body").css("cursor",""),m.stop(),U(),j&&K(d[0],b,k,c,{}),setTimeout(function(){i=!1},0)}if(1==f.which){i=!0;var j,k,l,m=W(),n=d.css("top"),o=a.extend({},b),p=ab(_(b.start));V(),a("body").css("cursor",g+"-resize").one("mouseup",h),y("eventResizeStart",d[0],b,f,{}),m.start(function(d,f){if(d){var h=Z(f),i=Z(d);if(i=Math.max(i,p),j=$(i)-$(h),k=cb(b).add("days",j),j){o.end=k;var m=l;l=c(o,e.row,n),l=a(l),l.find("*").css("cursor",g+"-resize"),m&&m.remove(),H(b)}else l&&(F(b),l.remove(),l=null);U(),T(b.start,k)}},f)}})}var w=this;w.renderDayEvents=b,w.draggableDayEvent=u,w.resizableDayEvent=v;var x=w.opt,y=w.trigger,z=w.isEventDraggable,A=w.isEventResizable,B=w.reportEventElement,D=w.eventElementHandlers,F=w.showEvents,H=w.hideEvents,J=w.eventDrop,K=w.eventResize,L=w.getRowCnt,M=w.getColCnt,N=w.allDayRow,O=w.colLeft,P=w.colRight,Q=w.colContentLeft,R=w.colContentRight,S=w.getDaySegmentContainer,T=w.renderDayOverlay,U=w.clearOverlays,V=w.clearSelection,W=w.getHoverListener,X=w.rangeToSegments,Y=w.cellToDate,Z=w.cellToCellOffset,$=w.cellOffsetToDayOffset,_=w.dateToDayOffset,ab=w.dayOffsetToCellOffset,bb=w.calendar,cb=bb.getEventEnd}function sb(a,b){for(var c=0;c=a.leftCol)return!0}return!1}function tb(a,b){for(var c=0;c")),d[0].parentNode!=c[0]&&d.appendTo(c),e.push(d.css(b).show()),d}function c(){for(var a;a=e.shift();)f.push(a.hide().unbind())}var d=this;d.renderOverlay=b,d.clearOverlays=c;var e=[],f=[]}function xb(a){var b,c,d=this;d.build=function(){b=[],c=[],a(b,c)},d.cell=function(a,d){var e,f=b.length,g=c.length,h=-1,i=-1;for(e=0;f>e;e++)if(d>=b[e][0]&&de;e++)if(a>=c[e][0]&&a=0&&i>=0?{"row":h,"col":i}:null},d.rect=function(a,d,e,f,g){var h=g.offset();return{"top":b[a][0]-h.top,"left":c[d][0]-h.left,"width":c[f][1]-c[d][0],"height":b[e][1]-b[a][0]}}}function yb(b){function c(a){zb(a);var c=b.cell(a.pageX,a.pageY);(Boolean(c)!==Boolean(g)||c&&(c.row!=g.row||c.col!=g.col))&&(c?(f||(f=c),e(c,f,c.row-f.row,c.col-f.col)):e(c,f),g=c)}var d,e,f,g,h=this;h.start=function(h,i,j){e=h,f=g=null,b.build(),c(i),d=j||"mousemove",a(document).bind(d,c)},h.stop=function(){return a(document).unbind(d,c),g}}function zb(a){void 0===a.pageX&&(a.pageX=a.originalEvent.pageX,a.pageY=a.originalEvent.pageY)}function Ab(a){function b(b){return d[b]=d[b]||a(b)}var c=this,d={},e={},f={};c.left=function(a){return e[a]=void 0===e[a]?b(a).position().left:e[a]},c.right=function(a){return f[a]=void 0===f[a]?c.left(a)+b(a).width():f[a]},c.clear=function(){d={},e={},f={}}}var Bb={"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"},"unselectAuto":!0,"dropAccept":"*","handleWindowResize":!0,"windowResizeDelay":200},Cb={"en":{"columnFormat":{"week":"ddd M/D"}}},Db={"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"}},Eb=a.fullCalendar={"version":"2.0.2"},Fb=Eb.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},Eb.langs=Cb,Eb.datepickerLang=function(b,c,d){var e=Cb[b];e||(e=Cb[b]={}),f(e,{"isRTL":d.isRTL,"weekNumberTitle":d.weekHeader,"titleFormat":{"month":d.showMonthAfterYear?"YYYY["+d.yearSuffix+"] MMMM":"MMMM YYYY["+d.yearSuffix+"]"},"defaultButtonText":{"prev":F(d.prevText),"next":F(d.nextText),"today":F(d.currentText)}}),a.datepicker&&(a.datepicker.regional[c]=a.datepicker.regional[b]=d,a.datepicker.regional.en=a.datepicker.regional[""],a.datepicker.setDefaults(d))},Eb.lang=function(a,b){var c;b&&(c=Cb[a],c||(c=Cb[a]={}),f(c,b||{})),Bb.lang=a},Eb.sourceNormalizers=[],Eb.sourceFetchers=[];var Gb={"dataType":"json","cache":!1},Hb=1;Eb.applyAll=J;var Ib=["sun","mon","tue","wed","thu","fri","sat"],Jb=/^\s*\d{4}-\d\d$/,Kb=/^\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+)?)?)?)?)?$/;Eb.moment=function(){return L(arguments)},Eb.moment.utc=function(){var a=L(arguments,!0);return a.hasTime()&&a.utc(),a},Eb.moment.parseZone=function(){return L(arguments,!0,!0)},M.prototype=l(b.fn),M.prototype.clone=function(){return L([this])},M.prototype.time=function(a){if(null==a)return b.duration({"hours":this.hours(),"minutes":this.minutes(),"seconds":this.seconds(),"milliseconds":this.milliseconds()});delete this._ambigTime,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())},M.prototype.stripTime=function(){var a=this.toArray();return b.fn.utc.call(this),this.year(a[0]).month(a[1]).date(a[2]).hours(0).minutes(0).seconds(0).milliseconds(0),this._ambigTime=!0,this._ambigZone=!0,this},M.prototype.hasTime=function(){return!this._ambigTime},M.prototype.stripZone=function(){var a=this.toArray(),c=this._ambigTime;return b.fn.utc.call(this),this.year(a[0]).month(a[1]).date(a[2]).hours(a[3]).minutes(a[4]).seconds(a[5]).milliseconds(a[6]),c&&(this._ambigTime=!0),this._ambigZone=!0,this},M.prototype.hasZone=function(){return!this._ambigZone},M.prototype.zone=function(a){return null!=a&&(delete this._ambigTime,delete this._ambigZone),b.fn.zone.apply(this,arguments)},M.prototype.local=function(){var a=this.toArray(),c=this._ambigZone;return delete this._ambigTime,delete this._ambigZone,b.fn.local.apply(this,arguments),c&&this.year(a[0]).month(a[1]).date(a[2]).hours(a[3]).minutes(a[4]).seconds(a[5]).milliseconds(a[6]),this},M.prototype.utc=function(){return delete this._ambigTime,delete this._ambigZone,b.fn.utc.apply(this,arguments)},M.prototype.format=function(){return arguments[0]?P(this,arguments[0]):this._ambigTime?O(this,"YYYY-MM-DD"):this._ambigZone?O(this,"YYYY-MM-DD[T]HH:mm:ss"):O(this)},M.prototype.toISOString=function(){return this._ambigTime?O(this,"YYYY-MM-DD"):this._ambigZone?O(this,"YYYY-MM-DD[T]HH:mm:ss"):b.fn.toISOString.apply(this,arguments)},M.prototype.isWithin=function(a,b){var c=N([this,a,b]);return c[0]>=c[1]&&c[0]