0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):o(this);if(n.data&&n.ids){var a=l.createFrame(n.data);a.contextPath=l.appendContextPath(n.data.contextPath,n.name),n={data:a}}return i(t,n)}))},e.exports=t.default},function(e,t,n){"use strict";(function(l){t.__esModule=!0;var o,i=n(10),a=n(12),r=(o=a)&&o.__esModule?o:{default:o};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new r.default("Must pass iterator to #each");var n,o=t.fn,a=t.inverse,s=0,u="",c=void 0,d=void 0;function h(t,n,l){c&&(c.key=t,c.index=n,c.first=0===n,c.last=!!l,d&&(c.contextPath=d+t)),u+=o(e[t],{data:c,blockParams:i.blockParams([e[t],t],[d+t,null])})}if(t.data&&t.ids&&(d=i.appendContextPath(t.data.contextPath,t.ids[0])+"."),i.isFunction(e)&&(e=e.call(this)),t.data&&(c=i.createFrame(t.data)),e&&"object"==typeof e)if(i.isArray(e))for(var p=e.length;s=r.LAST_COMPATIBLE_COMPILER_REVISION&&t<=r.COMPILER_REVISION)return;if(ta.MILLISECONDS_PER_DAY?"allday":t.category},this.schedules=r.createScheduleCollection(),this.dateMatrix={},this.theme=new s(e.theme),this.calendars=[]}d.prototype._getContainDatesInSchedule=function(e){var t,n=e.getStarts(),l=e.getEnds(),o=a.start(n),i=0===a.compare(n,l)?l:a.convertStartDayToLastDay(l),r=a.end(i);return u.hasPrimaryTimezoneCustomSetting()&&(o=(t=function(e){var t=e.getStarts(),n=e.getEnds(),l=(a.start(t),0===a.compare(t,n)?n:a.convertStartDayToLastDay(n)),o=(a.end(l),u.getNativeOffsetMs()),i=t.toDate().getTimezoneOffset(),r=0,s=u.getPrimaryTimezoneName(),d=u.getPrimaryOffset(),h=u.getOffsetByTimezoneName(s,t.getTime());return u.isNativeOsUsingDSTTimezone()&&o!==i&&(r=6e4*i-o),u.isPrimaryUsingDSTTimezone()&&d!==h&&(r=6e4*(d-h)),{start:a.start(t.getUTCTime()+r),end:a.end(a.convertStartDayToLastDay(new c(n.getUTCTime()+r)))}}(e)).start,r=t.end),a.range(o,r,a.MILLISECONDS_PER_DAY)},d.prototype.createSchedule=function(e,t){var n,l={data:e};return this.invoke("beforeCreateSchedule",l)?(n=this.addSchedule(o.create(e)),t||this.fire("createdSchedule",n),n):null},d.prototype.createSchedules=function(e,t){var n=this;return l.map(e,(function(e){return n.createSchedule(e,t)}))},d.prototype.updateSchedule=function(e,t){var n=t.start||e.start,o=t.end||e.end;return["milestone","task","allday","time"].indexOf((t=t||{}).category)>-1&&e.set("category",t.category),"allday"===t.category&&(t.isAllDay=!0),l.isUndefined(t.isAllDay)||e.set("isAllDay",t.isAllDay),l.isUndefined(t.calendarId)||e.set("calendarId",t.calendarId),t.title&&e.set("title",t.title),t.body&&e.set("body",t.body),(t.start||t.end)&&(e.isAllDay?e.setAllDayPeriod(n,o):e.setTimePeriod(n,o)),t.color&&e.set("color",t.color),t.bgColor&&e.set("bgColor",t.bgColor),t.borderColor&&e.set("borderColor",t.borderColor),t.origin&&e.set("origin",t.origin),l.isUndefined(t.isPending)||e.set("isPending",t.isPending),l.isUndefined(t.isFocused)||e.set("isFocused",t.isFocused),l.isUndefined(t.isReadOnly)||e.set("isReadOnly",t.isReadOnly),t.location&&e.set("location",t.location),t.state&&e.set("state",t.state),t.raw&&e.set("raw",t.raw),t.attendees&&e.set("attendees",t.attendees),this._removeFromMatrix(e),this._addToMatrix(e),this.fire("updateSchedule"),e},d.prototype.deleteSchedule=function(e){return this._removeFromMatrix(e),this.schedules.remove(e),e},d.prototype._addToMatrix=function(e){var t=this.dateMatrix,n=this._getContainDatesInSchedule(e);l.forEach(n,(function(n){var o=a.format(n,"YYYYMMDD");(t[o]=t[o]||[]).push(l.stamp(e))}))},d.prototype._removeFromMatrix=function(e){var t=l.stamp(e);l.forEach(this.dateMatrix,(function(e){var n=l.inArray(t,e);~n&&e.splice(n,1)}),this)},d.prototype.addSchedule=function(e,t){return this.schedules.add(e),this._addToMatrix(e),t||this.fire("addedSchedule",e),e},d.prototype.splitScheduleByDateRange=function(e,t,n){var o=a.range(a.start(e),a.end(t),a.MILLISECONDS_PER_DAY),i=this.dateMatrix,s={};return l.forEachArray(o,(function(e){var t,o=a.format(e,"YYYYMMDD"),u=i[o];t=s[o]=r.createScheduleCollection(),u&&u.length&&l.forEachArray(u,(function(e){n.doWhenHas(e,(function(e){t.add(e)}))}))})),s},d.prototype.findByDateRange=function(e,t){var n,o,s,u=a.range(a.start(e),a.end(t),a.MILLISECONDS_PER_DAY),c=this.schedules.items,d=this.dateMatrix,h=a.format,p={};return l.forEachArray(u,(function(e){o=h(e,"YYYYMMDD"),n=d[o],s=p[o]=r.createScheduleCollection(),n&&n.length&&s.add.apply(s,l.map(n,(function(e){return i.create(c[e])})))})),p},d.prototype.clearSchedules=function(){this.dateMatrix={},this.schedules.clear(),this.fire("clearSchedules")},d.prototype.setTheme=function(e){return this.theme.setStyles(e)},d.prototype.setCalendars=function(e){this.calendars=e},l.CustomEvents.mixin(d),e.exports=d},function(e,t,n){"use strict";var l=n(0),o=l.isExisty,i=l.pick,a=l.isFunction,r={set:function(e,t){this[e]!==t&&(this[e]=t,this._changed||(this._changed={}),this._changed[e]=!0,this._dirty=!0)},isDirty:function(){return!!this._dirty},dirty:function(e){(e=!o(e)||e)||(this._changed={}),this._dirty=e},deleteProp:function(e){delete this[e],this._changed&&delete this._changed[e]},isPropChanged:function(e){return!!this._changed&&!0===this._changed[e]},mixin:function(e){var t=/(^_|mixin|wrap)/;l.forEachOwnProperties(r,(function(n,l){t.test(l)||(e[l]=r[l])}))},wrap:function(e,t,n){var s,u=r.wrap;l.isObject(t)?l.forEachOwnProperties(t,(function(t,n){u(e,n,t)})):(n=!o(n)||n,e._wrapper||(e._wrapper=function(e,t){return function(){var n=Array.prototype.slice.call(arguments),l=e.apply(this,n);return this._dirty=t,l}}),o(i(e,t))&&a(e[t])&&!o(i(e,t,"_wrapped"))&&(s=e[t],e[t]=e._wrapper(s,n),e[t]._wrapped=!0))}};e.exports=r},function(e,t,n){"use strict";var l,o=n(4).Date,i=n(0),a=/^\s*|\s*$/g,r=n(3);l={trim:function(e){return e.replace(a,"")},validators:{required:function(e,t){var n=!0;return i.forEach(t,(function(t){var o;return o=e[t],n=!i.isUndefined(o)&&""!==l.trim(o)})),n},dateRange:function(e,t){var n,l;return!i.isExisty(e)||2!==t.length||(n=new o(e[t[0]]),l=new o(e[t[1]]),!(!r.isValid(n)||!r.isValid(l))&&1!==r.compare(n,l))}},isValid:function(){var e,t=this,n=this.constructor.schema,o=l.validators,a=!0;return!n||(i.forEach(n,(function(n,l){return!(e=o[l])||(a=e(t,n))})),a)},parameterize:function(){var e={},t=i.isFunction;return i.forEach(this,(function(n,l){t(n)||(e[l]=n)})),e},mixin:function(e){i.forEach(l,(function(t,n){"mixin"!==n&&(e[n]=t)}))}},e.exports=l},function(e,t,n){"use strict";var l=n(0),o=n(59),i=n(60),a=n(5);function r(e){var t=e||o;this._map=new l.HashMap,this.setStyles(t)}r.prototype.getStyle=function(e){return this._map.get(e)},r.prototype.setStyle=function(e,t){var n={};return n[e]=t,0===this.setStyles(n).length},r.prototype.setStyles=function(e){var t=[];return l.forEach(e,(function(e,n){l.isUndefined(i[n])?t.push(n):(this._map.set(n,e),a.set(this,n,e))}),this),l.forEach(i,(function(e,t){this.getStyle(t)||(this._map.set(t,e),a.set(this,t,e))}),this),t},r.prototype.clear=function(){var e=this._map.keys(),t={};l.forEach(e,(function(e){var n=e.split(".")[0];t[n]||(t[n]=n)})),l.forEach(t,(function(e){delete this[e]}),this),this._map.removeAll()},e.exports=r},function(e,t,n){"use strict";e.exports={"common.border":"1px solid #e5e5e5","common.backgroundColor":"white","common.holiday.color":"#ff4040","common.saturday.color":"#333","common.dayname.color":"#333","common.today.color":"#333","common.creationGuide.backgroundColor":"rgba(81, 92, 230, 0.05)","common.creationGuide.border":"1px solid #515ce6","month.dayname.height":"31px","month.dayname.borderLeft":"none","month.dayname.paddingLeft":"10px","month.dayname.paddingRight":"0","month.dayname.backgroundColor":"inherit","month.dayname.fontSize":"12px","month.dayname.fontWeight":"normal","month.dayname.textAlign":"left","month.holidayExceptThisMonth.color":"rgba(255, 64, 64, 0.4)","month.dayExceptThisMonth.color":"rgba(51, 51, 51, 0.4)","month.weekend.backgroundColor":"inherit","month.day.fontSize":"14px","month.schedule.borderRadius":"2px","month.schedule.height":"24px","month.schedule.marginTop":"2px","month.schedule.marginLeft":"8px","month.schedule.marginRight":"8px","month.moreView.border":"1px solid #d5d5d5","month.moreView.boxShadow":"0 2px 6px 0 rgba(0, 0, 0, 0.1)","month.moreView.backgroundColor":"white","month.moreView.paddingBottom":"17px","month.moreViewTitle.height":"44px","month.moreViewTitle.marginBottom":"12px","month.moreViewTitle.borderBottom":"none","month.moreViewTitle.padding":"12px 17px 0 17px","month.moreViewList.padding":"0 17px","week.dayname.height":"42px","week.dayname.borderTop":"1px solid #e5e5e5","week.dayname.borderBottom":"1px solid #e5e5e5","week.dayname.borderLeft":"none","week.dayname.paddingLeft":"0","week.dayname.backgroundColor":"inherit","week.dayname.textAlign":"left","week.today.color":"inherit","week.pastDay.color":"#bbb","week.vpanelSplitter.border":"1px solid #e5e5e5","week.vpanelSplitter.height":"3px","week.daygrid.borderRight":"1px solid #e5e5e5","week.daygrid.backgroundColor":"inherit","week.daygridLeft.width":"72px","week.daygridLeft.backgroundColor":"inherit","week.daygridLeft.paddingRight":"8px","week.daygridLeft.borderRight":"1px solid #e5e5e5","week.today.backgroundColor":"rgba(81, 92, 230, 0.05)","week.weekend.backgroundColor":"inherit","week.timegridLeft.width":"72px","week.timegridLeft.backgroundColor":"inherit","week.timegridLeft.borderRight":"1px solid #e5e5e5","week.timegridLeft.fontSize":"11px","week.timegridOneHour.height":"52px","week.timegridHalfHour.height":"26px","week.timegridHalfHour.borderBottom":"none","week.timegridHorizontalLine.borderBottom":"1px solid #e5e5e5","week.timegrid.paddingRight":"8px","week.timegrid.borderRight":"1px solid #e5e5e5","week.timegridSchedule.borderRadius":"2px","week.timegridSchedule.paddingLeft":"2px","week.currentTime.color":"#515ce6","week.currentTime.fontSize":"11px","week.currentTime.fontWeight":"normal","week.currentTimeLinePast.border":"1px dashed #515ce6","week.currentTimeLineBullet.backgroundColor":"#515ce6","week.currentTimeLineToday.border":"1px solid #515ce6","week.currentTimeLineFuture.border":"none","week.creationGuide.color":"#515ce6","week.creationGuide.fontSize":"11px","week.creationGuide.fontWeight":"bold","week.dayGridSchedule.borderRadius":"2px","week.dayGridSchedule.height":"24px","week.dayGridSchedule.marginTop":"2px","week.dayGridSchedule.marginLeft":"8px","week.dayGridSchedule.marginRight":"8px"}},function(e,t,n){"use strict";e.exports={"common.border":"1px solid #e5e5e5","common.backgroundColor":"white","common.holiday.color":"#ff4040","common.saturday.color":"#333","common.dayname.color":"#333","common.today.color":"#333","common.creationGuide.backgroundColor":"rgba(81, 92, 230, 0.05)","common.creationGuide.border":"1px solid #515ce6","month.dayname.height":"31px","month.dayname.borderLeft":"1px solid #e5e5e5","month.dayname.paddingLeft":"10px","month.dayname.paddingRight":"10px","month.dayname.backgroundColor":"inherit","month.dayname.fontSize":"12px","month.dayname.fontWeight":"normal","month.dayname.textAlign":"left","month.holidayExceptThisMonth.color":"rgba(255, 64, 64, 0.4)","month.dayExceptThisMonth.color":"rgba(51, 51, 51, 0.4)","month.weekend.backgroundColor":"inherit","month.day.fontSize":"14px","month.schedule.borderRadius":"2px","month.schedule.height":"24px","month.schedule.marginTop":"2px","month.schedule.marginLeft":"8px","month.schedule.marginRight":"8px","month.moreView.border":"1px solid #d5d5d5","month.moreView.boxShadow":"0 2px 6px 0 rgba(0, 0, 0, 0.1)","month.moreView.backgroundColor":"white","month.moreView.paddingBottom":"17px","month.moreViewTitle.height":"44px","month.moreViewTitle.marginBottom":"12px","month.moreViewTitle.backgroundColor":"inherit","month.moreViewTitle.borderBottom":"none","month.moreViewTitle.padding":"12px 17px 0 17px","month.moreViewList.padding":"0 17px","week.dayname.height":"42px","week.dayname.borderTop":"1px solid #e5e5e5","week.dayname.borderBottom":"1px solid #e5e5e5","week.dayname.borderLeft":"inherit","week.dayname.paddingLeft":"0","week.dayname.backgroundColor":"inherit","week.dayname.textAlign":"left","week.today.color":"#333","week.pastDay.color":"#bbb","week.vpanelSplitter.border":"1px solid #e5e5e5","week.vpanelSplitter.height":"3px","week.daygrid.borderRight":"1px solid #e5e5e5","week.daygrid.backgroundColor":"inherit","week.daygridLeft.width":"72px","week.daygridLeft.backgroundColor":"inherit","week.daygridLeft.paddingRight":"8px","week.daygridLeft.borderRight":"1px solid #e5e5e5","week.today.backgroundColor":"rgba(81, 92, 230, 0.05)","week.weekend.backgroundColor":"inherit","week.timegridLeft.width":"72px","week.timegridLeft.backgroundColor":"inherit","week.timegridLeft.borderRight":"1px solid #e5e5e5","week.timegridLeft.fontSize":"11px","week.timegridLeftTimezoneLabel.height":"40px","week.timegridLeftAdditionalTimezone.backgroundColor":"white","week.timegridOneHour.height":"52px","week.timegridHalfHour.height":"26px","week.timegridHalfHour.borderBottom":"none","week.timegridHorizontalLine.borderBottom":"1px solid #e5e5e5","week.timegrid.paddingRight":"8px","week.timegrid.borderRight":"1px solid #e5e5e5","week.timegridSchedule.borderRadius":"2px","week.timegridSchedule.paddingLeft":"2px","week.currentTime.color":"#515ce6","week.currentTime.fontSize":"11px","week.currentTime.fontWeight":"normal","week.pastTime.color":"#bbb","week.pastTime.fontWeight":"normal","week.futureTime.color":"#333","week.futureTime.fontWeight":"normal","week.currentTimeLinePast.border":"1px dashed #515ce6","week.currentTimeLineBullet.backgroundColor":"#515ce6","week.currentTimeLineToday.border":"1px solid #515ce6","week.currentTimeLineFuture.border":"none","week.creationGuide.color":"#515ce6","week.creationGuide.fontSize":"11px","week.creationGuide.fontWeight":"bold","week.dayGridSchedule.borderRadius":"2px","week.dayGridSchedule.height":"24px","week.dayGridSchedule.marginTop":"2px","week.dayGridSchedule.marginLeft":"8px","week.dayGridSchedule.marginRight":"8px"}},function(e,t,n){"use strict";var l=n(0),o=l.forEachArray,i=Array.prototype.slice,a=n(3),r=n(4),s=r.Date,u=n(13),c=n(28),d={getCollisionGroup:function(e){var t,n=[],a=!1;return e.length?(n[0]=[l.stamp(e[0].valueOf())],o(e.slice(1),(function(r,s){a=!1,t=i.apply(e,[0,s+1]).reverse(),o(t,(function(e){return!r.collidesWith(e)||(a=!0,o(n.slice(0).reverse(),(function(t){return!~l.inArray(l.stamp(e.valueOf()),t)||(t.push(l.stamp(r.valueOf())),!1)})),!1)})),a||n.push([l.stamp(r.valueOf())])})),n):n},getLastRowInColumn:function(e,t){for(var n=e.length;n>0;)if(n-=1,!l.isUndefined(e[n][t]))return n;return!1},getMatrices:function(e,t){var n=[],i=d.getLastRowInColumn;return o(t,(function(t){var a=[[]];o(t,(function(t){for(var n,o,r=e.items[t],s=0,u=!1;!u;)!1===(o=i(a,s))?(a[0].push(r),u=!0):r.collidesWith(a[o][s])||(n=o+1,l.isUndefined(a[n])&&(a[n]=[]),a[n][s]=r,u=!0),s+=1})),n.push(a)})),n},getScheduleInDateRangeFilter:function(e,t){return function(n){var l,o=n.getStarts(),i=n.getEnds();return r.hasPrimaryTimezoneCustomSetting()&&(l=function(e,t){var n=r.getNativeOffsetMs(),l=e.toDate().getTimezoneOffset(),o=0,i=r.getPrimaryTimezoneName(),a=r.getPrimaryOffset(),u=r.getOffsetByTimezoneName(i,e.getTime());r.isNativeOsUsingDSTTimezone()&&n!==l&&(o=6e4*l-n);r.isPrimaryUsingDSTTimezone()&&a!==u&&(o=6e4*(a-u));return{start:new s(e.getUTCTime()+o),end:new s(t.getUTCTime()+o)}}(o,i),o=l.start,i=l.end),!(it)}},positionViewModels:function(e,t,n,i){var r;r=l.map(a.range(e,t,a.MILLISECONDS_PER_DAY),(function(e){return a.format(e,"YYYYMMDD")})),o(n,(function(e){o(e,(function(e){o(e,(function(e,t){var n,o,s,u;e&&(s=e.getStarts(),u=e.getEnds(),o=a.range(a.start(s),a.renderEnd(s,u),a.MILLISECONDS_PER_DAY).length,n=a.format(s,"YYYYMMDD"),e.top=t,e.left=l.inArray(n,r),e.width=o,i&&i(e))}))}))}))},limitRenderRange:function(e,t,n){function l(n){return n.getStarts()t&&(n.exceedRight=!0,n.renderEnds=new s(t)),n}return n.constructor===u?(n.each(l),null):l(n)},convertToViewModel:function(e){var t;return t=new u((function(e){return e.cid()})),e.each((function(e){t.add(c.create(e))})),t}};e.exports=d},function(e,t,n){"use strict";var l=n(0),o=n(13),i=n(15),a=n(3),r=n(4).Date,s=a.MILLISECONDS_SCHEDULE_MIN_DURATION,u={generateTimeArrayInRow:function(e){var t,n,o,i,r,u=[],c=[],d=Math.max.apply(null,l.map(e,(function(e){return e.length})));for(n=1;n=u&&lu&&o<=c||lu||o>c&<?e.filter((function(e){return e.top0?r.apply(null,o):0},_adjustTimeTopIndex:function(e){var t=this.Month,n=t._getAlldayMaxTopIndexAtYMD,a=e.find(t._onlyAlldayFilter),r=e.find(t._onlyTimeFilter).sort(o.compare.schedule.asc),s={};r.forEach((function(e){var t=i.format(e.getStarts(),"YYYYMMDD"),o=s[t];l.isUndefined(o)&&(o=s[t]=n(t,a)),s[t]=e.top=o+1}))},_stackTimeFromTop:function(e){var t=this.Month,n=e.find(t._onlyAlldayFilter),a=e.find(t._onlyTimeFilter).sort(o.compare.schedule.asc),s={},u=this.dateMatrix;a.forEach((function(e){var t,o,a=i.format(e.getStarts(),"YYYYMMDD"),c=s[a];if(l.isUndefined(c)&&(c=s[a]=[],l.forEach(u[a],(function(e){n.doWhenHas(e,(function(e){c.push(e.top)}))}))),l.inArray(e.top,c)>=0)for(t=r.apply(null,c)+1,o=1;o<=t&&(e.top=o,!(l.inArray(e.top,c)<0));o+=1);c.push(e.top)}))},_addMultiDatesInfo:function(e){e.each((function(e){var t=e.model,n=t.getStarts(),l=t.getEnds();e.hasMultiDates=i.hasMultiDates(n,l),!t.isAllDay&&e.hasMultiDates&&(e.renderStarts=i.start(n),e.renderEnds=i.renderEnd(n,l))}))},findByDateRange:function(e,t,n,l){var i,r,s,u,c,d=this.Core,h=this.Month,p=d.getScheduleInDateRangeFilter(e,t);return l=l||!1,n=n||[],p=a.and.apply(null,[p].concat(n)),i=this.schedules.find(p),r=d.convertToViewModel(i),h._addMultiDatesInfo(r),h._adjustRenderRange(e,t,r),s=r.sort(o.compare.schedule.asc),u=d.getCollisionGroup(s),c=d.getMatrices(r,u),d.positionViewModels(e,t,c,h._weightTopValue),l?h._adjustTimeTopIndex(r):h._stackTimeFromTop(r),c}};e.exports=s},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(1),a=n(5),r=n(29),s=n(11),u=n(14),c=n(66),d=n(67),h=n(69),p=n(73),m=n(32),f=n(33),g=n(83),y=n(84),S=n(86),_=n(34),C=n(88),v=n(90),E=n(91),w=n(93),P=n(96),k={click:y,creation:S,move:_,resize:C},b={click:v,creation:E,move:w,resize:P},R=[{name:"milestone",type:"daygrid",minHeight:20,maxHeight:80,showExpandableButton:!0,maxExpandableHeight:210,handlers:["click"],show:!0},{name:"task",type:"daygrid",minHeight:40,maxHeight:120,showExpandableButton:!0,maxExpandableHeight:210,handlers:["click","move"],show:!0},{name:"allday",type:"daygrid",minHeight:30,maxHeight:80,showExpandableButton:!0,maxExpandableHeight:210,handlers:["click","creation","move","resize"],show:!0},{name:"time",type:"timegrid",autoHeight:!0,handlers:["click","creation","move","resize"],show:!0}];e.exports=function(e,t,n,y,S){var _,C,v,E,w,P,I,D,F,x,X,M,O,T,H=[],L=[],B=y.taskView,A=y.scheduleView,z={milestone:l.isArray(B)?l.inArray("milestone",B)>=0:B,task:l.isArray(B)?l.inArray("task",B)>=0:B,allday:l.isArray(A)?l.inArray("allday",A)>=0:A,time:l.isArray(A)?l.inArray("time",A)>=0:A};return l.forEach(R,(function(e){var t=e.name;e=l.extend({},e),H.push(e),e.show=z[t],e.show&&(L.length&&L.push({isSplitter:!0}),L.push(l.extend({},e)))})),L.length&&((F=L[L.length-1]).autoHeight=!0,F.maxHeight=null,F.showExpandableButton=!1,l.forEach(H,(function(e){return e.name!==F.name||(e.showExpandableButton=!1,!1)}))),l.extend(y.week,{panels:H}),(_=new c(null,y.week,t,H,S)).handler={click:{},dayname:{},creation:{},move:{},resize:{}},C=i.appendHTMLElement("div",_.container,o.classname("dayname-layout")),v=new d(y,C,e.theme),_.handler.dayname.date=new g(n,v,e),_.addChild(v),(E=i.appendHTMLElement("div",_.container,o.classname("vlayout-area"))).style.height=i.getSize(_.container)[1]-v.container.offsetHeight+"px",w=new r({panels:L,panelHeights:y.week.panelHeights||[]},E,e.theme),_.vLayout=w,l.forEach(H,(function(t){var o,i=t.name,a=t.handlers;t.show&&("daygrid"===t.type?((o=new h(i,y,w.getPanelByName(t.name).container,e.theme)).on("afterRender",(function(e){w.getPanelByName(i).setHeight(null,e.height)})),_.addChild(o),l.forEach(a,(function(t){y.isReadOnly&&"click"!==t||(_.handler[t][i]=new k[t](n,o,e,y),o.addHandler(t,_.handler[t][i],w.getPanelByName(i)))}))):"timegrid"===t.type&&(o=new p(i,y,w.getPanelByName(i).container),_.addChild(o),l.forEach(a,(function(t){y.isReadOnly&&"click"!==t||(_.handler[t][i]=new b[t](n,o,e,y))})),o.on("clickTimezonesCollapsedBtn",(function(){var e=!_.state.timezonesCollapsed;_.setState({timezonesCollapsed:e}),s.requestAnimFrame((function(){_.invoke("clickTimezonesCollapseBtn",e)||_.render()}))}))))})),w.on("resize",(function(){s.requestAnimFrame((function(){_.render()}))})),y.useCreationPopup&&(P=new m(t,e.calendars,y.usageStatistics),I=function(e){l.extend(e,{useCreationPopup:!0}),e.isAllDay?_.handler.creation.allday.fire("beforeCreateSchedule",e):_.handler.creation.time.fire("beforeCreateSchedule",e)},P.on("beforeCreateSchedule",I)),D=function(e){P&&P.setCalendars(e)},e.on("setCalendars",D),y.useDetailPopup&&(x=new f(t,e.calendars),X=function(t){var n=t.schedule.calendarId;t.calendar=a.find(e.calendars,(function(e){return e.id===n})),y.isReadOnly&&(t.schedule=l.extend({},t.schedule,{isReadOnly:!0})),x.render(t)},M=function(e){e.isAllDay?_.handler.creation.allday.fire("beforeDeleteSchedule",e):_.handler.creation.time.fire("beforeDeleteSchedule",e)},T=function(e){e.isAllDay?_.handler.move.allday.fire("beforeUpdateSchedule",e):_.handler.move.time.fire("beforeUpdateSchedule",e)},l.forEach(_.handler.click,(function(e){e.on("clickSchedule",X)})),y.useCreationPopup?(O=function(t){var n=e.calendars;t.isEditMode=!0,P.setCalendars(n),P.render(t)},P.on("beforeUpdateSchedule",T),x.on("beforeUpdateSchedule",O)):x.on("beforeUpdateSchedule",T),x.on("beforeDeleteSchedule",M)),_.on("afterRender",(function(){w.refresh()})),_.controller=e.Week,_._beforeDestroy=function(){l.forEach(_.handler,(function(e){l.forEach(e,(function(e){e.off(),e.destroy()}))})),y.useCreationPopup&&(P.off("beforeCreateSchedule",I),P.destroy()),y.useDetailPopup&&(x.off("beforeDeleteSchedule",M),x.destroy()),_.off()},{view:_,refresh:function(){var e=_.getViewBound().height,t=i.getBCRect(v.container).height;w.container.style.height=e-t+"px",w.refresh()},scrollToNow:function(){_.children.each((function(e){e.scrollToNow&&e.scrollToNow()}))},openCreationPopup:function(e){P&&(e.isAllDay?_.handler.creation.allday.invokeCreationClick(u.create(e)):_.handler.creation.time.invokeCreationClick(u.create(e)))},showCreationPopup:function(t){P&&(P.setCalendars(e.calendars),P.render(t))}}}},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(5),a=n(1),r=n(9);function s(e,t,n){r.call(this,t),this.options=l.extend({index:0,name:"0",minHeight:0,maxHeight:null,height:null,isSplitter:!1,autoHeight:!1,className:""},e),this.index=this.options.index,this.name=this.options.name||String(this.index),this.isHeightForcedSet=!1,this.theme=n,this._initPanel(this.options,t)}l.inherit(s,r),s.prototype.isSplitter=function(){return this.options.isSplitter},s.prototype.setMaxHeight=function(e){this.options.autoHeight||(this.options.maxHeight=e)},s.prototype.setHeightForcedSet=function(e){this.isHeightForcedSet=e},s.prototype.getHeightForcedSet=function(){return this.isHeightForcedSet},s.prototype.setHeight=function(e,t,n){var l=this.options.maxHeight,o=this.options.minHeight,i=this.options.autoHeight;e=e||this.container,(n||!this.isHeightForcedSet||i)&&(n?this.isHeightForcedSet=!0:l&&(t=Math.min(t,l)),t=Math.max(o,t),e.style.height=t+"px")},s.prototype.getResizeInfoByGrowth=function(e){var t=this.getHeight(),n=t+e,l=Math.max(0,n,this.options.minHeight);return[l,t-l]},s.prototype.getHeight=function(){return a.getSize(this.container)[1]},s.prototype.addClass=function(e){a.addClass(this.container,e)},s.prototype.removeClass=function(e){a.removeClass(this.container,e)},s.prototype._initPanel=function(e,t){var n;if(a.setData(t,"panelIndex",e.index),e.isSplitter)return a.addClass(t,o.classname("splitter")),void this.applyTheme();e.className&&a.addClass(t,e.className),e.autoHeight?a.setData(t,"autoHeight",!0):(n=i.limit(e.height||0,[e.minHeight],[e.maxHeight||e.height]),e.height=n,this.setHeight(t,n))},s.prototype.applyTheme=function(){var e=this.container.style,t=this.theme;t&&(e.borderTop=t.week.vpanelSplitter.border||t.common.border,e.borderBottom=t.week.vpanelSplitter.border||t.common.border,e.height=t.week.vpanelSplitter.height)},e.exports=s},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(1),a=n(3),r=n(4).Date,s=n(9);function u(e,t,n,u,c){var d;n=i.appendHTMLElement("div",n),s.call(this,n),i.addClass(n,o.classname("week-container")),d=this._getRenderDateRange(new r),this.options=l.extend({scheduleFilter:[function(e){return Boolean(e.isVisible)}],renderStartDate:a.format(d.start,"YYYY-MM-DD"),renderEndDate:a.format(d.end,"YYYY-MM-DD"),narrowWeekend:!1,startDayOfWeek:0,workweek:!1,showTimezoneCollapseButton:!1,timezonesCollapsed:!1,hourStart:0,hourEnd:24},t),this.controller=e,this.panels=u,this.state={timezonesCollapsed:this.options.timezonesCollapsed},"day"===c&&function(e){e.workweek=!1}(this.options)}l.inherit(u,s),u.prototype.render=function(){var e,t,n,o,i,s,u=this,c=this.options,d=c.scheduleFilter,h=c.narrowWeekend,p=c.startDayOfWeek,m=c.workweek,f=this.controller.theme||{},g=this.state;e=new r(c.renderStartDate),t=new r(c.renderEndDate),s=a.range(a.start(e),a.end(t),a.MILLISECONDS_PER_DAY),c.workweek&&a.compare(e,t)&&(e=(s=l.filter(s,(function(e){return!a.isWeekend(e.getDay())})))[0],t=s[s.length-1]),n=this.controller.findByDateRange(a.start(e),a.end(t),this.panels,d,this.options),i=a.getGridLeftAndWidth(s.length,h,p,m),o={schedulesInDateRange:n,renderStartDate:e,renderEndDate:t,grids:i,range:s,theme:f,state:g},this.children.each((function(e){var t,n=l.pick(e.options,"viewName");e.render(o),n&&(t=o.schedulesInDateRange[n],l.isArray(t)?u._invokeAfterRenderSchedule(t):l.forEach(t,(function(e){u._invokeAfterRenderSchedule(e)})))})),this.fire("afterRender")},u.prototype._invokeAfterRenderSchedule=function(e){var t=this;l.forEachArray(e,(function(e){l.forEachArray(e,(function(e){l.forEachArray(e,(function(e){e&&t.fire("afterRenderSchedule",{schedule:e.model})}))}))}))},u.prototype.viewName="week",u.prototype._getRenderDateRange=function(e){var t=a.start(e),n=new r(Number(t)),l=new r(Number(t));return n.setDate(n.getDate()-3),l.setDate(l.getDate()+3),{start:n,end:l}},l.CustomEvents.mixin(u),e.exports=u},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(5),a=n(3),r=n(4).Date,s=n(1),u=n(9),c=n(68);function d(e,t,n){t=s.appendHTMLElement("div",t,o.classname("dayname-container")),this.options=l.extend({daynames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],timezones:e.timezones},e.week),this.theme=n,u.call(this,t),this.applyTheme()}l.inherit(d,u),d.prototype._getBaseViewModel=function(e,t,n){var o=this.options.daynames,i=this.theme,s=(new r).toLocalTime();return l.map(a.range(a.start(e),a.end(t),a.MILLISECONDS_PER_DAY),(function(e,t){var l=e.getDay(),r=a.isSameDate(e,s),u=e1&&(n=i.parseUnit(l.marginLeft),l.marginLeft=n[0]*o+n[1])),l},d.prototype.applyTheme=function(){var e=this._getStyles(this.theme),t=this.container.style;return t.borderTop=e.borderTop,t.borderBottom=e.borderBottom,t.height=e.height,t.backgroundColor=e.backgroundColor,t.textAlign=e.textAlign,t},e.exports=d},function(e,t,n){var l=n(7);e.exports=(l.default||l).template({1:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u="function",c=e.escapeExpression,d=e.lambda,h=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\n \n '+(null!=(i=(h(n,"weekDayname-tmpl")||t&&h(t,"weekDayname-tmpl")||s).call(r,t,{name:"weekDayname-tmpl",hash:{},data:o,loc:{start:{line:7,column:8},end:{line:7,column:35}}}))?i:"")+"\n \n
\n"},2:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return e.escapeExpression("function"==typeof(i=null!=(i=a(n,"CSS_PREFIX")||(null!=t?a(t,"CSS_PREFIX"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"CSS_PREFIX",hash:{},data:o,loc:{start:{line:3,column:49},end:{line:3,column:63}}}):i)+"today"},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.escapeExpression,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\n'+(null!=(i=u(n,"each").call(r,null!=t?u(t,"dayNames"):t,{name:"each",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:10,column:9}}}))?i:"")+"
\n"},useData:!0})},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(5),a=n(3),r=n(1),s=n(4).Date,u=n(9),c=n(70),d=n(72),h=n(11),p=Math.max,m=Math.min;function f(e,t,n,i){n=r.appendHTMLElement("div",n,o.classname("daygrid-layout")),u.call(this,n),e=e||"daygrid",this.options=l.extend({viewName:e,daynames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],renderStartDate:"",renderEndDate:"",containerBottomGutter:18,scheduleHeight:parseInt(i.week.dayGridSchedule.height,10),scheduleGutter:parseInt(i.week.dayGridSchedule.marginTop,10),scheduleContainerTop:1,timezones:t.timezones,isReadOnly:t.isReadOnly,getViewModelFunc:function(t){return t.schedulesInDateRange[e]},setViewModelFunc:function(t,n){t.schedulesInDateRange[e]=n}},t.week),this.handler={},this.vPanel=null,this.state.collapsed=!0}function g(e,t,n){return 0===e||6===e?n.weekendBackgroundColor:t?n.todayBackgroundColor:n.backgroundColor}function y(e,t){var n;return l.forEach(e,(function(e){e.name===t&&(n=e)})),n}l.inherit(f,u),f.prototype.getBaseViewModel=function(e){var t,n=this.options,o=n.daynames,i=e.range,r=e.grids,u=n.getViewModelFunc(e),c={},d=y(n.panels,n.viewName),h=this.getViewBound().height,f=this.state.collapsed,S=!!this.vPanel&&this.vPanel.getHeightForcedSet(),_=e.state.timezonesCollapsed,C=this._getStyles(e.theme,_),v=(new s).toLocalTime();return d.showExpandableButton&&(S||(h=f?p(h,d.maxHeight):m(h,d.maxExpandableHeight)),t=Math.floor(h/(n.scheduleHeight+n.scheduleGutter)),f&&(c=this.parent.controller.getExceedDate(t,u,e.range),u=this.parent.controller.excludeExceedSchedules(u,t),n.setViewModelFunc(e,u))),{viewName:n.viewName,range:i,grids:r,days:l.map(e.range,(function(t,n){var l=t.getDay(),i=a.format(t,"YYYYMMDD"),s=a.isSameDate(v,t);return{day:l,dayName:o[l],isToday:s,date:t.getDate(),renderDate:a.format(t,"YYYY-MM-DD"),hiddenSchedules:c[i]||0,width:r[n]?r[n].width:0,left:r[n]?r[n].left:0,backgroundColor:e.range.length>1?g(l,s,C):C.backgroundColor}})),exceedDate:c,showExpandableButton:d.showExpandableButton,collapsed:f,collapseBtnIndex:this.state.clickedExpandBtnIndex,styles:C}},f.prototype.render=function(e){var t,n=this.options,l=this.container,i=this.getBaseViewModel(e),a=this.options.scheduleContainerTop;l.innerHTML=d(i),this.children.clear(),t=new c(n,r.find(o.classname(".container"),l)),this.addChild(t),t.on("afterRender",(function(e){i.height=e.minHeight+a})),this.children.each((function(t){t.render(e)}),this),this.fire("afterRender",i)},f.prototype._beforeDestroy=function(){},f.prototype.addHandler=function(e,t,n){var l=this;this.handler[e]=t,this.vPanel=n,"click"===e&&(t.on("expand",(function(){l.setState({collapsed:!1})}),this),t.on("collapse",(function(){l.setState({collapsed:!0})}),this))},f.prototype._expand=function(){h.requestAnimFrame((function(){var e=this.vPanel,t=this.options,n=y(t.panels,t.viewName);e.setMaxHeight(n.maxExpandableHeight),e.setHeightForcedSet(!1),e.setHeight(null,n.maxExpandableHeight),this.parent&&this.parent.render()}),this)},f.prototype._collapse=function(){h.requestAnimFrame((function(){var e=this.vPanel,t=this.options,n=y(t.panels,t.viewName);e.setMaxHeight(n.maxHeight),e.setHeightForcedSet(!1),e.setHeight(null,n.minHeight),this.parent&&this.parent.render()}),this)},f.prototype.setState=function(e){var t=this.state.collapsed;u.prototype.setState.call(this,e),this.state.collapsed!==t&&(this.state.collapsed?this._collapse():this._expand())},f.prototype._getStyles=function(e,t){var n,l={},o=this.options.timezones.length,a=t;return e&&(l.borderRight=e.week.daygrid.borderRight||e.common.border,l.todayBackgroundColor=e.week.today.backgroundColor,l.weekendBackgroundColor=e.week.weekend.backgroundColor,l.backgroundColor=e.week.daygrid.backgroundColor,l.leftWidth=e.week.daygridLeft.width,l.leftBackgroundColor=e.week.daygridLeft.backgroundColor,l.leftPaddingRight=e.week.daygridLeft.paddingRight,l.leftBorderRight=e.week.daygridLeft.borderRight,!a&&o>1&&(n=i.parseUnit(l.leftWidth),l.leftWidth=n[0]*o+n[1])),l},e.exports=f},function(e,t,n){"use strict";var l=n(0),o=n(30),i=n(71),a=Math.max;function r(e,t){o.call(this,e,t),this.collapsed=!0}l.inherit(r,o),r.prototype.render=function(e){var t,n=this.container;t=this.getBaseViewModel(e),n.innerHTML=i(t),this.fire("afterRender",t)},r.prototype._getMaxScheduleInDay=function(e){return a.apply(null,l.map(e,(function(e){return Math.max.apply(null,l.map(e,(function(e){return e.length})))})))},r.prototype._getMinHeight=function(e){var t=this.options;return e*t.scheduleHeight+(e-1)*t.scheduleGutter},r.prototype.getBaseViewModel=function(e){var t,n=this.options,i=n.getViewModelFunc(e),a=this._getMaxScheduleInDay(i),r=this._getStyles(e.theme);return t=o.prototype.getBaseViewModel.call(this,e),t=l.extend({minHeight:this._getMinHeight(a),matrices:i,scheduleContainerTop:this.options.scheduleContainerTop,maxScheduleInDay:a,isReadOnly:n.isReadOnly,styles:r},t)},r.prototype._getStyles=function(e){var t={};return e&&(t.borderRadius=e.week.dayGridSchedule.borderRadius),t},e.exports=r},function(e,t,n){var l=n(7);e.exports=(l.default||l).template({1:function(e,t,n,l,o){var i;return null!=(i=(e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]})(n,"each").call(null!=t?t:e.nullContext||{},t,{name:"each",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:4},end:{line:27,column:15}}}))?i:""},2:function(e,t,n,l,o){var i;return"\n "+(null!=(i=(e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]})(n,"each").call(null!=t?t:e.nullContext||{},t,{name:"each",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:4},end:{line:26,column:15}}}))?i:"")},3:function(e,t,n,l,o){var i;return"\n "+(null!=(i=(e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]})(n,"if").call(null!=t?t:e.nullContext||{},t,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:4},end:{line:25,column:13}}}))?i:"")},4:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression,c=e.lambda,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\n \n
\n '+(null!=(i=(d(n,"schedule-tmpl")||t&&d(t,"schedule-tmpl")||s).call(r,null!=t?d(t,"model"):t,{name:"schedule-tmpl",hash:{},data:o,loc:{start:{line:21,column:87},end:{line:21,column:112}}}))?i:"")+"\n "+(null!=(i=d(n,"unless").call(r,(d(n,"or")||t&&d(t,"or")||s).call(r,(i=o&&d(o,"root"))&&d(i,"isReadOnly"),null!=(i=null!=t?d(t,"model"):t)?d(i,"isReadOnly"):i,{name:"or",hash:{},data:o,loc:{start:{line:22,column:22},end:{line:22,column:60}}}),{name:"unless",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o,loc:{start:{line:22,column:12},end:{line:22,column:193}}}))?i:"")+"\n
\n
\n"},5:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" "+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"CSS_PREFIX")||(null!=t?a(t,"CSS_PREFIX"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"CSS_PREFIX",hash:{},data:o,loc:{start:{line:8,column:31},end:{line:8,column:45}}}):i)+"weekday-exceed-left"},7:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" "+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"CSS_PREFIX")||(null!=t?a(t,"CSS_PREFIX"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"CSS_PREFIX",hash:{},data:o,loc:{start:{line:9,column:32},end:{line:9,column:46}}}):i)+"weekday-exceed-right"},9:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return e.escapeExpression("function"==typeof(i=null!=(i=a(n,"CSS_PREFIX")||(null!=t?a(t,"CSS_PREFIX"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"CSS_PREFIX",hash:{},data:o,loc:{start:{line:13,column:146},end:{line:13,column:160}}}):i)+"weekday-schedule-focused "},11:function(e,t,n,l,o){var i,a=e.lambda,r=e.escapeExpression,s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" color: #ffffff; background-color:"+r(a(null!=(i=null!=t?s(t,"model"):t)?s(i,"color"):i,t))+"; border-color:"+r(a(null!=(i=null!=t?s(t,"model"):t)?s(i,"color"):i,t))+";\n"},13:function(e,t,n,l,o){var i,a=e.lambda,r=e.escapeExpression,s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" color:"+r(a(null!=(i=null!=t?s(t,"model"):t)?s(i,"color"):i,t))+"; background-color:"+r(a(null!=(i=null!=t?s(t,"model"):t)?s(i,"bgColor"):i,t))+"; border-color:"+r(a(null!=(i=null!=t?s(t,"model"):t)?s(i,"borderColor"):i,t))+";\n"},15:function(e,t,n,l,o){var i,a,r=e.escapeExpression,s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return' '},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression,c=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\n'+(null!=(i=c(n,"each").call(r,null!=t?c(t,"matrices"):t,{name:"each",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:4},end:{line:28,column:15}}}))?i:"")+"
\n"},useData:!0})},function(e,t,n){var l=n(7);e.exports=(l.default||l).template({1:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression,c=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\n'},2:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" border-right: "+e.escapeExpression(e.lambda((i=(i=o&&a(o,"root"))&&a(i,"styles"))&&a(i,"borderRight"),t))+";\n"},4:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(n,"each").call(null!=t?t:e.nullContext||{},null!=t?a(t,"days"):t,{name:"each",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:8},end:{line:27,column:19}}}))?i:""},5:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(n,"if").call(null!=t?t:e.nullContext||{},(i=o&&a(o,"root"))&&a(i,"collapsed"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:18,column:12},end:{line:26,column:19}}}))?i:""},6:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(n,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"hiddenSchedules"):t,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:19,column:16},end:{line:21,column:23}}}))?i:""},7:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression,c=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return' '+(null!=(i=(c(n,"weekGridFooterExceed-tmpl")||t&&c(t,"weekGridFooterExceed-tmpl")||s).call(r,null!=t?c(t,"hiddenSchedules"):t,{name:"weekGridFooterExceed-tmpl",hash:{},data:o,loc:{start:{line:20,column:145},end:{line:20,column:192}}}))?i:"")+"\n"},9:function(e,t,n,l,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=(a(n,"fi")||t&&a(t,"fi")||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},o&&a(o,"key"),"===",(i=o&&a(o,"root"))&&a(i,"collapseBtnIndex"),{name:"fi",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:23,column:16},end:{line:25,column:23}}}))?i:""},10:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression,c=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return' '+(null!=(i="function"==typeof(a=null!=(a=c(n,"collapseBtnTitle-tmpl")||(null!=t?c(t,"collapseBtnTitle-tmpl"):t))?a:s)?a.call(r,{name:"collapseBtnTitle-tmpl",hash:{},data:o,loc:{start:{line:24,column:121},end:{line:24,column:148}}}):a)?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){var i,a,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u="function",c=e.escapeExpression,d=e.lambda,h=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\n '+(null!=(i=(h(n,"dayGridTitle-tmpl")||t&&h(t,"dayGridTitle-tmpl")||s).call(r,null!=t?h(t,"viewName"):t,{name:"dayGridTitle-tmpl",hash:{},data:o,loc:{start:{line:2,column:4},end:{line:2,column:36}}}))?i:"")+'\n
\n\n
\n
\n'+(null!=(i=h(n,"each").call(r,null!=t?h(t,"days"):t,{name:"each",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:8},end:{line:14,column:19}}}))?i:"")+(null!=(i=h(n,"if").call(r,(i=o&&h(o,"root"))&&h(i,"showExpandableButton"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:8},end:{line:28,column:15}}}))?i:"")+"
\n
\n
\n"},useData:!0})},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(5),a=n(1),r=n(6),s=n(3),u=n(4),c=n(11),d=n(9),h=n(74),p=n(76),m=n(77),f=n(78),g=n(79),y=u.Date;function S(e,t,n,o){var a,r,u=e.hourStart,c=e.hourEnd,d=new y(e.renderEndDate),h=parseInt(n/60,10),p=Math.abs(n%60),m=(new y).toLocalTime(),f=m.getMinutes(),g=l.range(0,24),S=null;return(h<0||-0===h)&&p>0&&(h-=1),i.shiftArray(g,h),i.takeArray(g,u,c),a=i.shiftHours(m.getHours(),h)%24,r=l.inArray(a,g),t&&(f<20?S=a:f>40&&(S=a+1),l.isNumber(S)&&(S%=24)),l.map(g,(function(e,n){var l,i;return t&&n<=r||d=0,f,n);u.setMinutes(u.getMinutes()+f),r=s.getDateDifference(u,p),l>0&&(m=n.additionalTimezoneBackgroundColor),c.push({timeSlots:g,displayLabel:t.displayLabel,timezoneOffset:t.timezoneOffset,tooltip:t.tooltip||"",width:h,left:d?0:(a.length-l-1)*h,isPrimary:0===l,backgroundColor:m||"",hidden:0!==l&&d,hourmarker:u,dateDifferenceSign:r<0?"-":"+",dateDifference:Math.abs(r)})})),c},C.prototype._getBaseViewModel=function(e){var t=e.grids,n=e.range,o=this.options,i=this._getHourmarkerViewModel((new y).toLocalTime(),t,n),a=l.pick(e,"state","timezonesCollapsed"),r=this._getStyles(e.theme,a);return l.extend(i,{timezones:this._getTimezoneViewModel(i.todaymarkerLeft,a,r),hoursLabels:S(o,i.todaymarkerLeft>=0,0,r),styles:r,showTimezoneCollapseButton:l.pick(o,"showTimezoneCollapseButton"),timezonesCollapsed:a})},C.prototype._renderChildren=function(e,t,n,i){var r,u,c,d,p=this,m=this.options,f=s.format((new y).toLocalTime(),"YYYYMMDD"),g=0;n.innerHTML="",this.children.clear(),d=a.getSize(n.parentElement)[1],l.forEach(e,(function(e,l){c=l===f,r={index:g,left:t[g]?t[g].left:0,width:t[g]?t[g].width:0,ymd:l,isToday:c,isPending:m.isPending,isFocused:m.isFocused,isReadOnly:m.isReadOnly,hourStart:m.hourStart,hourEnd:m.hourEnd},(u=new h(r,a.appendHTMLElement("div",n,o.classname("time-date")),i)).render(l,e,d),p.addChild(u),g+=1}))},C.prototype.render=function(e){var t=this.options,n=e.schedulesInDateRange[t.viewName],i=this.container,r=e.grids,s=this._getBaseViewModel(e),u=l.keys(n).length;this._cacheParentViewModel=e,this._cacheHoursLabels=s.hoursLabels,u&&(s.showHourMarker=s.todaymarkerLeft>=0,i.innerHTML=m(s),this.renderStickyContainer(s),this._renderChildren(n,r,a.find(o.classname(".timegrid-schedules-container"),i),e.theme),this._hourLabels=a.find("ul",i),this.hourmarkers=a.find(o.classname(".timegrid-hourmarker"),i,!0),this._scrolled||(this._scrolled=!0,this.scrollToNow()))},C.prototype.renderStickyContainer=function(e){var t=this.stickyContainer;t.innerHTML=f(e),t.style.display=e.timezones.length>1?"block":"none",t.style.width=e.styles.leftWidth,t.style.height=e.styles.displayTimezoneLabelHeight,t.style.borderBottom=e.styles.leftBorderRight},C.prototype.refreshHourmarker=function(){var e,t=this.hourmarkers,n=this._cacheParentViewModel,i=this._cacheHoursLabels,r=this.rAnimationFrameID;t&&n&&!r&&(e=this._getBaseViewModel(n),this.rAnimationFrameID=c.requestAnimFrame((function(){var r=!1;l.forEach(i,(function(t,n){return t.hidden===e.hoursLabels[n].hidden||(r=!0,!1)})),r?this.render(n):l.forEach(t,(function(t){var n=a.find(o.classname(".timegrid-todaymarker"),t),l=a.find(o.classname(".timegrid-hourmarker-time"),t),i=a.closest(t,o.classname(".timegrid-timezone")),r=i?a.getData(i,"timezoneIndex"):0;t.style.top=e.hourmarkerTop+"%",n&&(n.style.display=e.todaymarkerLeft>=0?"block":"none"),l&&(l.innerHTML=g(e.hourmarkerTimzones[r]))})),this.rAnimationFrameID=null}),this))},C.prototype.attachEvent=function(){clearInterval(this.intervalID),clearTimeout(this.timerID),this.intervalID=this.timerID=this.rAnimationFrameID=null,this.timerID=setTimeout(this.onTick.bind(this),1e3*(60-(new y).getSeconds())),r.on(this.stickyContainer,"click",this._onClickStickyContainer,this)},C.prototype.scrollToNow=function(){var e,t,n,l,o,i=this.container;this.hourmarkers&&this.hourmarkers.length&&(e=this.hourmarkers[0].offsetTop,t=this.getViewBound(),n=e,l=t.height/4,10,o=function(){n>e-l?(n-=10,i.scrollTop=n,c.requestAnimFrame(o)):i.scrollTop=e-l},c.requestAnimFrame(o))},C.prototype.onTick=function(){this.timerID&&(clearTimeout(this.timerID),this.timerID=null),this.intervalID||(this.intervalID=setInterval(this.onTick.bind(this),6e4)),this.refreshHourmarker()},C.prototype._getStyles=function(e,t){var n,l={},o=this.options.timezones.length,a=t;return e&&(l.borderBottom=e.week.timegridHorizontalLine.borderBottom||e.common.border,l.halfHourBorderBottom=e.week.timegridHalfHour.borderBottom||e.common.border,l.todayBackgroundColor=e.week.today.backgroundColor,l.weekendBackgroundColor=e.week.weekend.backgroundColor,l.backgroundColor=e.week.daygrid.backgroundColor,l.leftWidth=e.week.timegridLeft.width,l.leftBackgroundColor=e.week.timegridLeft.backgroundColor,l.leftBorderRight=e.week.timegridLeft.borderRight||e.common.border,l.leftFontSize=e.week.timegridLeft.fontSize,l.timezoneWidth=e.week.timegridLeft.width,l.additionalTimezoneBackgroundColor=e.week.timegridLeftAdditionalTimezone.backgroundColor||l.leftBackgroundColor,l.displayTimezoneLabelHeight=e.week.timegridLeftTimezoneLabel.height,l.displayTimezoneLabelBackgroundColor="inherit"===e.week.timegridLeft.backgroundColor?"white":e.week.timegridLeft.backgroundColor,l.oneHourHeight=e.week.timegridOneHour.height,l.halfHourHeight=e.week.timegridHalfHour.height,l.quaterHourHeight=parseInt(l.halfHourHeight,10)/2+"px",l.currentTimeColor=e.week.currentTime.color,l.currentTimeFontSize=e.week.currentTime.fontSize,l.currentTimeFontWeight=e.week.currentTime.fontWeight,l.pastTimeColor=e.week.pastTime.color,l.pastTimeFontWeight=e.week.pastTime.fontWeight,l.futureTimeColor=e.week.futureTime.color,l.futureTimeFontWeight=e.week.futureTime.fontWeight,l.currentTimeLeftBorderTop=e.week.currentTimeLinePast.border,l.currentTimeBulletBackgroundColor=e.week.currentTimeLineBullet.backgroundColor,l.currentTimeTodayBorderTop=e.week.currentTimeLineToday.border,l.currentTimeRightBorderTop=e.week.currentTimeLineFuture.border,!a&&o>1&&(n=i.parseUnit(l.leftWidth),l.leftWidth=n[0]*o+n[1])),l},C.prototype._onClickStickyContainer=function(e){var t=r.getEventTarget(e);a.closest(t,o.classname(".timegrid-timezone-close-btn"))&&this.fire("clickTimezonesCollapsedBtn")},e.exports=C},function(e,t,n){"use strict";var l=n(0),o=n(2),i=n(3),a=n(1),r=n(9),s=n(75),u=n(4),c=l.forEachArray,d=i.MILLISECONDS_SCHEDULE_MIN_DURATION;function h(e,t,n){r.call(this,t),this.options=l.extend({index:0,width:0,ymd:"",isToday:!1,pending:!1,hourStart:0,hourEnd:24,defaultMarginBottom:2,minHeight:18.5,isReadOnly:!1},e),this.timeTmpl=s,this.theme=n,t.style.width=e.width+"%",t.style.left=e.left+"%",this.options.isToday&&a.addClass(this.container,o.classname("today")),this.applyTheme()}l.inherit(h,r),h.prototype._parseDateGroup=function(e){var t=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10),l=parseInt(e.substr(6,2),10),o=i.start();return o.setFullYear(t,n-1,l),i.start(o)},h.prototype._getScheduleViewBoundX=function(e,t){var n=t.baseWidth*(e.extraSpace+1);return e.hasCollide||(n=null),{left:t.baseLeft[t.columnIndex],width:n}},h.prototype._getScheduleViewBoundY=function(e,t){var n,l,o,a,r,s=t.baseMS,c=t.baseHeight,h=!1,p=!1,m=i.millisecondsFrom("minutes",e.valueOf().goingDuration),f=i.millisecondsFrom("minutes",e.valueOf().comingDuration),g=e.duration(),y=function(e,t){var n=i.millisecondsFrom("minutes",e.valueOf().goingDuration),l=t.todayStart.toDate().getTimezoneOffset(),o=u.getNativeOffsetMs(),a=e.valueOf().start.toDate().getTimezoneOffset(),r=u.getPrimaryOffset(),s=u.getOffsetByTimezoneName(u.getPrimaryTimezoneName(),e.valueOf().start.getTime()),c=e.valueOf().start-n-t.todayStart;return u.hasPrimaryTimezoneCustomSetting()&&(u.isNativeOsUsingDSTTimezone()&&o!==l&&(c+=6e4*a-o),u.isPrimaryUsingDSTTimezone()&&r!==s&&(c+=6e4*(r-s))),c}(e,t);return n=c*y/s,l=c*((g=g>d?g:d)+m+f)/s,o=c*m/s,a=c*g/s,r=c*f/s,y<0&&(n=0,l+=c*y/s,h=!0),l+n>c&&(l=c-n,p=!0),{top:n,height:Math.max(l,this.options.minHeight)-this.options.defaultMarginBottom,modelDurationHeight:a,goingDurationHeight:o,comingDurationHeight:r,hasGoingDuration:m>0,hasComingDuration:f>0,croppedStart:h,croppedEnd:p}},h.prototype.getScheduleViewBound=function(e,t){var n=this._getScheduleViewBoundX(e,t),o=this._getScheduleViewBoundY(e,t),i=e.model,a=l.pick(i,"isReadOnly")||!1,r=i.isFocused?"#ffffff":i.borderColor;return r===i.bgColor&&(r=null),l.extend({isReadOnly:a,travelBorderColor:r},n,o)},h.prototype._getBaseViewModel=function(e,t,n){var o,a,r=this,s=this.options,u=s.hourStart,d=s.hourEnd,h=s.isReadOnly;n=n||this.getViewBound().height,(o=this._parseDateGroup(e)).setHours(u),a=i.millisecondsFrom("hour",d-u),c(t,(function(e){var t,i,s,u;for(t=Math.max.apply(null,l.map(e,(function(e){return e.length}))),i=100/t,s=[],u=0;u\n \n'+(null!=(i=h(n,"if").call(r,null!=t?h(t,"hasGoingDuration"):t,{name:"if",hash:{},fn:e.program(19,o,0),inverse:e.noop,data:o,loc:{start:{line:29,column:12},end:{line:37,column:19}}}))?i:"")+'
\n '+(null!=(i=(h(n,"time-tmpl")||t&&h(t,"time-tmpl")||s).call(r,null!=t?h(t,"model"):t,{name:"time-tmpl",hash:{},data:o,loc:{start:{line:45,column:20},end:{line:45,column:41}}}))?i:"")+"\n
\n"+(null!=(i=h(n,"if").call(r,null!=t?h(t,"hasComingDuration"):t,{name:"if",hash:{},fn:e.program(26,o,0),inverse:e.noop,data:o,loc:{start:{line:47,column:12},end:{line:54,column:19}}}))?i:"")+"
\n "+(null!=(i=h(n,"unless").call(r,(h(n,"or")||t&&h(t,"or")||s).call(r,null!=t?h(t,"croppedEnd"):t,(h(n,"or")||t&&h(t,"or")||s).call(r,(i=o&&h(o,"root"))&&h(i,"isReadOnly"),null!=(i=null!=t?h(t,"model"):t)?h(i,"isReadOnly"):i,{name:"or",hash:{},data:o,loc:{start:{line:56,column:37},end:{line:56,column:75}}}),{name:"or",hash:{},data:o,loc:{start:{line:56,column:22},end:{line:56,column:76}}}),{name:"unless",hash:{},fn:e.program(29,o,0),inverse:e.noop,data:o,loc:{start:{line:56,column:12},end:{line:56,column:207}}}))?i:"")+"\n