New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-simple-calendar

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-simple-calendar - npm Package Compare versions

Comparing version 1.8.2 to 2.0.0

src/CalendarView.vue

2

dist/calendar-math-mixin.js

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("CalendarMathMixin",[],n):"object"==typeof exports?exports.CalendarMathMixin=n():t.CalendarMathMixin=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=0)}([function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={methods:{today:function(){return this.dateOnly(new Date)},weeksOfMonth:function(t,n){var e=this,r=this.beginningOfCalendar(t,n),a=this.endOfCalendar(t,n),i=Math.floor((this.dayDiff(r,a)+1)/7);return Array(i).fill().map(function(t,n){return e.addDays(r,7*n)})},daysOfWeek:function(t){var n=this;return Array(7).fill().map(function(e,r){return n.addDays(t,r)})},addDays:function(t,n){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+n)},endOfMonth:function(t){return new Date(t.getFullYear(),t.getMonth()+1,0)},endOfPreviousMonth:function(t){return new Date(t.getFullYear(),t.getMonth(),0)},aYearBefore:function(t){return new Date(t.getFullYear()-1,t.getMonth())},aYearAfter:function(t){return new Date(t.getFullYear()+1,t.getMonth())},monthBefore:function(t){return new Date(t.getFullYear(),t.getMonth()-1)},monthAfter:function(t){return new Date(t.getFullYear(),t.getMonth()+1)},beginningOfWeek:function(t,n){return this.addDays(t,(n-t.getDay()-7)%-7)},endOfWeek:function(t,n){return this.addDays(this.beginningOfWeek(t,n),7)},beginningOfCalendar:function(t,n){return this.beginningOfWeek(this.beginningOfMonth(t),n)},endOfCalendar:function(t,n){return this.endOfWeek(this.endOfMonth(t),n)},beginningOfMonth:function(t){return new Date(t.getFullYear(),t.getMonth())},instanceOfMonth:function(t){return Math.ceil(t.getDate()/7)},paddedMonth:function(t){return("0"+String(t.getMonth()+1)).slice(-2)},paddedDay:function(t){return("0"+String(t.getDate())).slice(-2)},isoYearMonth:function(t){return t.getFullYear()+"-"+this.paddedMonth(t)},isoYearMonthDay:function(t){return this.isoYearMonth(t)+"-"+this.paddedDay(t)},isoMonthDay:function(t){return this.paddedMonth(t)+"-"+this.paddedDay(t)},dayDiff:function(t,n){var e=new Date(n),r=new Date(t);return e.setUTCHours(0,0,0,0),r.setUTCHours(0,0,0,0),(e-r)/864e5},isSameDate:function(t,n){return 0===this.dayDiff(t,n)},isSameMonth:function(t,n){return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()},isPastMonth:function(t){return this.beginningOfMonth(t)<this.beginningOfMonth(this.today())},isFutureMonth:function(t){return this.beginningOfMonth(t)>this.beginningOfMonth(this.today())},isInFuture:function(t){return this.dateOnly(t)>this.today()},isInPast:function(t){return this.dateOnly(t)<this.today()},isLastInstanceOfMonth:function(t){return t.getMonth()!==this.addDays(t,7).getMonth()},isLastDayOfMonth:function(t){return t.getMonth()!==this.addDays(t,1).getMonth()},dateOnly:function(t){var n=new Date(t);return n.setHours(0,0,0,0),n},languageCode:function(t){return t.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(t,n){if(!this.supportsIntl())return Array(12).fill("");var e=new Intl.DateTimeFormat(t,{month:n});return Array(12).fill().map(function(t,n){return e.format(new Date(2017,n,1))})},getFormattedWeekdayNames:function(t,n,e){if(!this.supportsIntl())return Array(7).fill("");var r=new Intl.DateTimeFormat(t,{weekday:n});return Array(7).fill().map(function(t,n){return r.format(new Date(2017,0,(n+1+e)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()}}}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("CalendarMathMixin",[],e):"object"==typeof exports?exports.CalendarMathMixin=e():t.CalendarMathMixin=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(t,e,n){switch(e){case"year":return new Date(t.getFullYear(),0);case"month":return new Date(t.getFullYear(),t.getMonth());case"week":return this.beginningOfWeek(t,n);default:return null}},daysOfWeek:function(t){var e=this;return Array(7).fill().map(function(n,r){return e.addDays(t,r)})},addDays:function(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e,t.getHours(),t.getMinutes(),t.getSeconds())},beginningOfWeek:function(t,e){return this.addDays(t,(e-t.getDay()-7)%-7)},endOfWeek:function(t,e){return this.addDays(this.beginningOfWeek(t,e),7)},beginningOfMonth:function(t){return new Date(t.getFullYear(),t.getMonth())},instanceOfMonth:function(t){return Math.ceil(t.getDate()/7)},incrementPeriod:function(t,e,n){return new Date(t.getFullYear()+("year"==e?n:0),t.getMonth()+("month"==e?n:0),t.getDate()+("week"==e?7*n:0))},paddedMonth:function(t){return("0"+String(t.getMonth()+1)).slice(-2)},paddedDay:function(t){return("0"+String(t.getDate())).slice(-2)},isoYearMonth:function(t){return t.getFullYear()+"-"+this.paddedMonth(t)},isoYearMonthDay:function(t){return this.isoYearMonth(t)+"-"+this.paddedDay(t)},isoMonthDay:function(t){return this.paddedMonth(t)+"-"+this.paddedDay(t)},formattedTime:function(t,e,n){if(0===t.getHours()&&0===t.getMinutes()&&0===t.getSeconds())return"";if(!this.supportsIntl()){var r=6e4*(new Date).getTimezoneOffset();return new Date(t-r).toISOString().slice(11,16)}return t.toLocaleTimeString(e,n)},dayDiff:function(t,e){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.setUTCHours(0,0,0,0),r.setUTCHours(0,0,0,0),(n-r)/864e5},isSameDate:function(t,e){return 0===this.dayDiff(t,e)},isSameDateTime:function(t,e){return t.getTime()===e.getTime()},isSameMonth:function(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()},isPastMonth:function(t){return this.beginningOfMonth(t)<this.beginningOfMonth(this.today())},isFutureMonth:function(t){return this.beginningOfMonth(t)>this.beginningOfMonth(this.today())},isInFuture:function(t){return this.dateOnly(t)>this.today()},isInPast:function(t){return this.dateOnly(t)<this.today()},isLastInstanceOfMonth:function(t){return t.getMonth()!==this.addDays(t,7).getMonth()},isLastDayOfMonth:function(t){return t.getMonth()!==this.addDays(t,1).getMonth()},fromIsoStringToLocalDate:function(t){var e=t.split(/\D/).map(function(t){return Number(t)});return e[1]--,new(Function.prototype.bind.apply(Date,[null].concat(r(e))))},toLocalDate:function(t){return"string"==typeof t?this.fromIsoStringToLocalDate(t):new Date(t)},dateOnly:function(t){var e=new Date(t);return e.setHours(0,0,0,0),e},languageCode:function(t){return t.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(t,e){if(!this.supportsIntl())return Array(12).fill("");var n=new Intl.DateTimeFormat(t,{month:e});return Array(12).fill().map(function(t,e){return n.format(new Date(2017,e,1))})},getFormattedWeekdayNames:function(t,e,n){if(!this.supportsIntl())return Array(7).fill("");var r=new Intl.DateTimeFormat(t,{weekday:e});return Array(7).fill().map(function(t,e){return r.format(new Date(2017,0,(e+1+n)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()}}}}])});

@@ -1,1 +0,1 @@

window.CalendarMonth=function(n){function t(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return n[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,a){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:a})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=1)}([function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e(9),r=function(n){return n&&n.__esModule?n:{default:n}}(a);t.default={name:"CalendarMonth",mixins:[r.default],props:{showDate:{type:Date,default:function(){}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},displayDate:function(){return this.showDate||this.today()},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},allowLastYearClick:function(){return!this.disablePast||this.aYearBefore(this.displayDate)>=this.today()},allowNextYearClick:function(){return!this.disableFuture||this.aYearAfter(this.displayDate)<=this.today()},allowLastMonthClick:function(){return!this.disablePast||this.beginningOfMonth(this.displayDate)>this.today()},allowNextMonthClick:function(){return!this.disableFuture||this.displayDate<this.beginningOfMonth(this.today())}},methods:{onClickDay:function(n){this.disablePast&&this.isInPast(n)||this.$emit("clickDay",n)},onClickEvent:function(n,t){this.$emit("clickEvent",n.details,t)},onClickPreviousYear:function(){this.$emit("setShowDate",this.aYearBefore(this.displayDate))},onClickPreviousMonth:function(){this.$emit("setShowDate",this.monthBefore(this.displayDate))},onClickNextMonth:function(){this.$emit("setShowDate",this.monthAfter(this.displayDate))},onClickNextYear:function(){this.$emit("setShowDate",this.aYearAfter(this.displayDate))},onClickCurrentMonth:function(){this.$emit("setShowDate",this.beginningOfMonth(this.today()))},onDragStart:function(n,t){return!!this.enableDragDrop&&(t.dataTransfer.setData("Text",n.details.id),this.$emit("dragEventStart",n.details.id,n),!0)},handleEvent:function(n,t,e){if(!this.enableDragDrop)return!1;var a=n.dataTransfer.getData("Text");return this.$emit(t,a,e),!0},onDragOver:function(n,t){this.handleEvent(t,"dragEventDragOverDate",n)},onDragEnter:function(n,t){this.handleEvent(t,"dragEventEnterDate",n)&&t.target.classList.add("draghover")},onDragLeave:function(n,t){this.handleEvent(t,"dragEventLeaveDate",n)&&t.target.classList.remove("draghover")},onDrop:function(n,t){this.handleEvent(t,"dropEventOnDate",n)&&t.target.classList.remove("draghover")},findAndSortEventsInWeek:function(n){var t=this;return this.events.filter(function(e){return t.dateOnly(e.startDate)<t.addDays(n,7)&&t.dateOnly(e.endDate||e.startDate)>=n},this).sort(function(n,t){return n.startDate<t.startDate?-1:t.startDate<n.startDate?1:n.endDate>t.endDate?-1:t.endDate>n.endDate?1:n.id<t.id?-1:1})},getWeekEvents:function(n){for(var t=this.findAndSortEventsInWeek(n),e=[],a=[[],[],[],[],[],[],[],[],[],[]],r=0;r<t.length;r++){for(var o={startDate:t[r].startDate,endDate:t[r].endDate||t[r].startDate,title:t[r].title||"Untitled",id:t[r].id||"e"+Math.random().toString(36).substr(2,10),url:t[r].url,classes:t[r].classes},i={details:o,slot:0},s=o.startDate<n,l=s?0:this.dayDiff(n,o.startDate),d=this.dayDiff(n,o.endDate)>6,c=Math.min(7-l,this.dayDiff(this.addDays(n,l),o.endDate)+1),u=0;u<7;u++)if(u===l){for(var f=0;f<10;f++)if(!a[u][f]){i.slot=f,a[u][f]=!0;break}}else u<l+c&&(a[u][i.slot]=!0);i.classes=["offset"+l,"span"+c,"slot"+(i.slot+1),{continued:s,toBeContinued:d,hasUrl:i.details.url}],o.classes&&(i.classes=i.classes.concat(o.classes)),e.push(i)}return e}}}},function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e(2),r=function(n){return n&&n.__esModule?n:{default:n}}(a);t.default={install:function(n){n.component("calendar-month",r.default)}}},function(n,t,e){"use strict";function a(n){l||e(3)}Object.defineProperty(t,"__esModule",{value:!0});var r=e(0),o=e.n(r);for(var i in r)"default"!==i&&function(n){e.d(t,n,function(){return r[n]})}(i);var s=e(10),l=!1,d=e(8),c=a,u=d(o.a,s.a,!1,c,null,null);u.options.__file="src/CalendarMonth.vue",t.default=u.exports},function(n,t,e){var a=e(4);"string"==typeof a&&(a=[[n.i,a,""]]),a.locals&&(n.exports=a.locals);e(6)("0e16e79a",a,!1)},function(n,t,e){t=n.exports=e(5)(void 0),t.push([n.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Position/Flex */\n\n/* Make the calendar flex vertically */\n.calendar-month {\n\theight: 100%;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n}\n/* Set flex-grow and flex-shrink to 0 for header and dayList so they remain static */\n.calendar-month .header,\n.calendar-month .dayList {\n\t-webkit-box-flex: 0;\n\t -ms-flex: 0 0 auto;\n\t flex: 0 0 auto;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\twidth: 100%;\n\t-ms-flex-wrap: wrap;\n\t flex-wrap: wrap;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: row;\n\t flex-direction: row;\n\t-webkit-box-pack: start;\n\t -ms-flex-pack: start;\n\t justify-content: flex-start;\n\t-webkit-box-align: stretch;\n\t -ms-flex-align: stretch;\n\t align-items: stretch;\n\t-ms-flex-line-pack: start;\n\t align-content: flex-start;\n}\n/* The calendar grid should take up the remaining vertical space */\n.calendar-month .month {\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 auto;\n\t flex: 1 1 auto;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n}\n/* Use flex basis of 0 on week row so all weeks will be same height regardless of content */\n.calendar-month .week {\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: row;\n\t flex-direction: row;\n\tmin-height: 2em;\n}\n.calendar-month .week .day,\n.calendar-month .dayList .day {\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n}\n.calendar-month .header {\n\t-webkit-box-pack: justify;\n\t -ms-flex-pack: justify;\n\t justify-content: space-between;\n}\n.calendar-month .header .thisMonth {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: row;\n\t flex-direction: row;\n}\n.calendar-month .month {\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n\toverflow: hidden;\n}\n.calendar-month .week {\n\tposition: relative;\n\twidth: 100%;\n}\n.calendar-month .day {\n\tposition: relative;\n\tbackground-color: #fff;\n}\n.calendar-month .day .content {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbottom: 0;\n\tright: 0;\n}\n.calendar-month .date {\n\tfloat: right;\n\tclear: both;\n}\n.calendar-month .event {\n\tposition: absolute;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n/* Internal Metrics */\n.calendar-month,\n.calendar-month div,\n.calendar-month button {\n\t-webkit-box-sizing: border-box;\n\t box-sizing: border-box;\n\tline-height: 1em;\n\tfont-size: 1em;\n}\n.calendar-month .header > div,\n.calendar-month .dayList div,\n.calendar-month .header .monthLabel,\n.calendar-month .date,\n.calendar-month .event {\n\tpadding: 0.2em;\n}\n.calendar-month .header button,\n.calendar-month .header .monthLabel {\n\tpadding: 0.4em 0.6em;\n}\n\n/* Borders */\n.calendar-month .month {\n\tborder-style: solid;\n\tborder-width: 0 0 1px 1px;\n}\n.calendar-month .header {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0.05em;\n}\n.calendar-month .dayList {\n\tborder-style: solid;\n\tborder-width: 0 0 0 1px;\n}\n.calendar-month .day {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0;\n}\n.calendar-month .header button,\n.calendar-month .event {\n\tborder-style: solid;\n\tborder-width: 0.05em;\n}\n\n/* Use z-index to ensure events too tall for the view are clipped vertically */\n.calendar-month .week1 {\n\tz-index: 2;\n}\n.calendar-month .week2 {\n\tz-index: 4;\n}\n.calendar-month .week3 {\n\tz-index: 6;\n}\n.calendar-month .week4 {\n\tz-index: 8;\n}\n.calendar-month .week5 {\n\tz-index: 10;\n}\n.calendar-month .week6 {\n\tz-index: 12;\n}\n.calendar-month .week1 .event {\n\tz-index: 3;\n}\n.calendar-month .week2 .event {\n\tz-index: 5;\n}\n.calendar-month .week2 .event {\n\tz-index: 5;\n}\n.calendar-month .week3 .event {\n\tz-index: 7;\n}\n.calendar-month .week4 .event {\n\tz-index: 9;\n}\n.calendar-month .week5 .event {\n\tz-index: 11;\n}\n.calendar-month .week6 .event {\n\tz-index: 13;\n}\n\n/* Positioning for event slots */\n.calendar-month .event.slot1 {\n\ttop: 1.4em;\n}\n.calendar-month .event.slot2 {\n\ttop: calc(2 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot3 {\n\ttop: calc(3 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot4 {\n\ttop: calc(4 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot5 {\n\ttop: calc(5 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot6 {\n\ttop: calc(6 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot7 {\n\ttop: calc(7 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot8 {\n\ttop: calc(8 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot9 {\n\ttop: calc(9 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot10 {\n\ttop: calc(10 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot0 {\n\tdisplay: none;\n} /* More than 10 slots not currently supported */\n.calendar-month .event.offset0 {\n\tleft: calc(0.05em);\n}\n.calendar-month .event.offset1 {\n\tleft: calc((100% / 7) + 0.05em);\n}\n.calendar-month .event.offset2 {\n\tleft: calc((200% / 7) + 0.05em);\n}\n.calendar-month .event.offset3 {\n\tleft: calc((300% / 7) + 0.05em);\n}\n.calendar-month .event.offset4 {\n\tleft: calc((400% / 7) + 0.05em);\n}\n.calendar-month .event.offset5 {\n\tleft: calc((500% / 7) + 0.05em);\n}\n.calendar-month .event.offset6 {\n\tleft: calc((600% / 7) + 0.05em);\n}\n\n/* Metrics for events spanning dates */\n.calendar-month .event.span1 {\n\twidth: calc((100% / 7) - 0.05em);\n}\n.calendar-month .event.span2 {\n\twidth: calc((200% / 7) - 0.05em);\n}\n.calendar-month .event.span3 {\n\twidth: calc((300% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span4 {\n\twidth: calc((400% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span5 {\n\twidth: calc((500% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span6 {\n\twidth: calc((600% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span7 {\n\twidth: calc((700% / 7) - 0.05em);\n\ttext-align: center;\n}\n\n/* Misc */\n.calendar-month .dayList .day {\n\ttext-align: center;\n}\n.calendar-month .event.hasUrl:hover {\n\ttext-decoration: underline;\n}\n.calendar-month .event.continued {\n\tborder-left-style: none;\n\tborder-top-left-radius: 0;\n\tborder-bottom-left-radius: 0;\n}\n",""])},function(n,t){function e(n,t){var e=n[1]||"",r=n[3];if(!r)return e;if(t&&"function"==typeof btoa){var o=a(r);return[e].concat(r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"})).concat([o]).join("\n")}return[e].join("\n")}function a(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var t=[];return t.toString=function(){return this.map(function(t){var a=e(t,n);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var a={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(a[o]=!0)}for(r=0;r<n.length;r++){var i=n[r];"number"==typeof i[0]&&a[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),t.push(i))}},t}},function(n,t,e){function a(n){for(var t=0;t<n.length;t++){var e=n[t],a=c[e.id];if(a){a.refs++;for(var r=0;r<a.parts.length;r++)a.parts[r](e.parts[r]);for(;r<e.parts.length;r++)a.parts.push(o(e.parts[r]));a.parts.length>e.parts.length&&(a.parts.length=e.parts.length)}else{for(var i=[],r=0;r<e.parts.length;r++)i.push(o(e.parts[r]));c[e.id]={id:e.id,refs:1,parts:i}}}}function r(){var n=document.createElement("style");return n.type="text/css",u.appendChild(n),n}function o(n){var t,e,a=document.querySelector('style[data-vue-ssr-id~="'+n.id+'"]');if(a){if(m)return p;a.parentNode.removeChild(a)}if(v){var o=h++;a=f||(f=r()),t=i.bind(null,a,o,!1),e=i.bind(null,a,o,!0)}else a=r(),t=s.bind(null,a),e=function(){a.parentNode.removeChild(a)};return t(n),function(a){if(a){if(a.css===n.css&&a.media===n.media&&a.sourceMap===n.sourceMap)return;t(n=a)}else e()}}function i(n,t,e,a){var r=e?"":a.css;if(n.styleSheet)n.styleSheet.cssText=g(t,r);else{var o=document.createTextNode(r),i=n.childNodes;i[t]&&n.removeChild(i[t]),i.length?n.insertBefore(o,i[t]):n.appendChild(o)}}function s(n,t){var e=t.css,a=t.media,r=t.sourceMap;if(a&&n.setAttribute("media",a),r&&(e+="\n/*# sourceURL="+r.sources[0]+" */",e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var d=e(7),c={},u=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,h=0,m=!1,p=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,t,e){m=e;var r=d(n,t);return a(r),function(t){for(var e=[],o=0;o<r.length;o++){var i=r[o],s=c[i.id];s.refs--,e.push(s)}t?(r=d(n,t),a(r)):r=[];for(var o=0;o<e.length;o++){var s=e[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var g=function(){var n=[];return function(t,e){return n[t]=e,n.filter(Boolean).join("\n")}}()},function(n,t){n.exports=function(n,t){for(var e=[],a={},r=0;r<t.length;r++){var o=t[r],i=o[0],s=o[1],l=o[2],d=o[3],c={id:n+":"+r,css:s,media:l,sourceMap:d};a[i]?a[i].parts.push(c):e.push(a[i]={id:i,parts:[c]})}return e}},function(n,t){n.exports=function(n,t,e,a,r,o){var i,s=n=n||{},l=typeof n.default;"object"!==l&&"function"!==l||(i=n,s=n.default);var d="function"==typeof s?s.options:s;t&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0),e&&(d.functional=!0),r&&(d._scopeId=r);var c;if(o?(c=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),a&&a.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(o)},d._ssrRegister=c):a&&(c=a),c){var u=d.functional,f=u?d.render:d.beforeCreate;u?(d._injectStyles=c,d.render=function(n,t){return c.call(t),f(n,t)}):d.beforeCreate=f?[].concat(f,c):[c]}return{esModule:i,exports:s,options:d}}},function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{today:function(){return this.dateOnly(new Date)},weeksOfMonth:function(n,t){var e=this,a=this.beginningOfCalendar(n,t),r=this.endOfCalendar(n,t),o=Math.floor((this.dayDiff(a,r)+1)/7);return Array(o).fill().map(function(n,t){return e.addDays(a,7*t)})},daysOfWeek:function(n){var t=this;return Array(7).fill().map(function(e,a){return t.addDays(n,a)})},addDays:function(n,t){return new Date(n.getFullYear(),n.getMonth(),n.getDate()+t)},endOfMonth:function(n){return new Date(n.getFullYear(),n.getMonth()+1,0)},endOfPreviousMonth:function(n){return new Date(n.getFullYear(),n.getMonth(),0)},aYearBefore:function(n){return new Date(n.getFullYear()-1,n.getMonth())},aYearAfter:function(n){return new Date(n.getFullYear()+1,n.getMonth())},monthBefore:function(n){return new Date(n.getFullYear(),n.getMonth()-1)},monthAfter:function(n){return new Date(n.getFullYear(),n.getMonth()+1)},beginningOfWeek:function(n,t){return this.addDays(n,(t-n.getDay()-7)%-7)},endOfWeek:function(n,t){return this.addDays(this.beginningOfWeek(n,t),7)},beginningOfCalendar:function(n,t){return this.beginningOfWeek(this.beginningOfMonth(n),t)},endOfCalendar:function(n,t){return this.endOfWeek(this.endOfMonth(n),t)},beginningOfMonth:function(n){return new Date(n.getFullYear(),n.getMonth())},instanceOfMonth:function(n){return Math.ceil(n.getDate()/7)},paddedMonth:function(n){return("0"+String(n.getMonth()+1)).slice(-2)},paddedDay:function(n){return("0"+String(n.getDate())).slice(-2)},isoYearMonth:function(n){return n.getFullYear()+"-"+this.paddedMonth(n)},isoYearMonthDay:function(n){return this.isoYearMonth(n)+"-"+this.paddedDay(n)},isoMonthDay:function(n){return this.paddedMonth(n)+"-"+this.paddedDay(n)},dayDiff:function(n,t){var e=new Date(t),a=new Date(n);return e.setUTCHours(0,0,0,0),a.setUTCHours(0,0,0,0),(e-a)/864e5},isSameDate:function(n,t){return 0===this.dayDiff(n,t)},isSameMonth:function(n,t){return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()},isPastMonth:function(n){return this.beginningOfMonth(n)<this.beginningOfMonth(this.today())},isFutureMonth:function(n){return this.beginningOfMonth(n)>this.beginningOfMonth(this.today())},isInFuture:function(n){return this.dateOnly(n)>this.today()},isInPast:function(n){return this.dateOnly(n)<this.today()},isLastInstanceOfMonth:function(n){return n.getMonth()!==this.addDays(n,7).getMonth()},isLastDayOfMonth:function(n){return n.getMonth()!==this.addDays(n,1).getMonth()},dateOnly:function(n){var t=new Date(n);return t.setHours(0,0,0,0),t},languageCode:function(n){return n.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(n,t){if(!this.supportsIntl())return Array(12).fill("");var e=new Intl.DateTimeFormat(n,{month:t});return Array(12).fill().map(function(n,t){return e.format(new Date(2017,t,1))})},getFormattedWeekdayNames:function(n,t,e){if(!this.supportsIntl())return Array(7).fill("");var a=new Intl.DateTimeFormat(n,{weekday:t});return Array(7).fill().map(function(n,t){return a.format(new Date(2017,0,(t+1+e)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()}}}},function(n,t,e){"use strict";var a=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"calendar-month",class:["locale-"+n.languageCode(n.displayLocale),"locale-"+n.displayLocale,"y"+n.displayDate.getFullYear(),"m"+n.paddedMonth(n.displayDate),{past:n.isPastMonth(n.displayDate),future:n.isFutureMonth(n.displayDate),noIntl:!n.supportsIntl}]},[n._t("header",[e("div",{staticClass:"header"},[e("div",{staticClass:"previousYear"},[e("button",{attrs:{disabled:!n.allowLastYearClick},on:{click:n.onClickPreviousYear}})]),n._v(" "),e("div",{staticClass:"previousMonth"},[e("button",{attrs:{disabled:!n.allowLastMonthClick},on:{click:n.onClickPreviousMonth}})]),n._v(" "),e("div",{staticClass:"thisMonth"},[e("div",{staticClass:"monthLabel"},[e("span",{staticClass:"monthName"},[n._v(n._s(n.monthNames[n.displayDate.getMonth()]))]),n._v(" "),e("span",{staticClass:"yearNumber"},[n._v(n._s(n.displayDate.getFullYear()))])]),n._v(" "),n.isSameMonth(n.today(),n.displayDate)?n._e():e("div",{staticClass:"currentMonth"},[e("button",{on:{click:n.onClickCurrentMonth}})])]),n._v(" "),e("div",{staticClass:"nextMonth"},[e("button",{attrs:{disabled:!n.allowNextMonthClick},on:{click:n.onClickNextMonth}})]),n._v(" "),e("div",{staticClass:"nextYear"},[e("button",{attrs:{disabled:!n.allowNextYearClick},on:{click:n.onClickNextYear}})])])]),n._v(" "),n._t("dayList",[e("div",{staticClass:"dayList"},n._l(n.weekdayNames,function(t,a){return e("div",{key:a,staticClass:"day",class:"dow"+a},[n._v(n._s(t))])}))]),n._v(" "),e("div",{staticClass:"month"},n._l(n.weeksOfMonth(n.displayDate,n.startingDayOfWeek),function(t,a){return e("div",{key:a,staticClass:"week",class:["week"+(a+1),"ws"+n.isoYearMonthDay(t)]},[n._l(n.daysOfWeek(t),function(t,a){return e("div",{key:a,staticClass:"day",class:["dow"+t.getDay(),"d"+n.isoYearMonthDay(t),"d"+n.isoMonthDay(t),"d"+n.paddedDay(t),"instance"+n.instanceOfMonth(t),{outsideOfMonth:t.getMonth()!=n.displayDate.getMonth(),today:n.isSameDate(t,n.today()),past:n.isInPast(t),future:n.isInFuture(t),last:n.isLastDayOfMonth(t),lastInstance:n.isLastInstanceOfMonth(t)}],on:{click:function(e){n.onClickDay(t)},drop:function(e){e.preventDefault(),n.onDrop(t,e)},dragover:function(e){e.preventDefault(),n.onDragOver(t,e)},dragenter:function(e){e.preventDefault(),n.onDragEnter(t,e)},dragleave:function(e){e.preventDefault(),n.onDragLeave(t,e)}}},[e("div",{staticClass:"content"},[e("div",{staticClass:"date"},[n._v(n._s(t.getDate()))])])])}),n._v(" "),n._l(n.getWeekEvents(t),function(t){return e("div",{key:t.id,staticClass:"event",class:t.classes,attrs:{draggable:n.enableDragDrop,title:t.details.title},domProps:{innerHTML:n._s(t.details.title)},on:{dragstart:function(e){n.onDragStart(t,e)},click:function(e){e.stopPropagation(),n.onClickEvent(t)}}})})],2)}))],2)},r=[];a._withStripped=!0;var o={render:a,staticRenderFns:r};t.a=o}]);
window.CalendarView=function(n){function e(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return n[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var t={};return e.m=n,e.c=t,e.d=function(n,t,a){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:a})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=1)}([function(n,e,t){"use strict";function a(n){if(Array.isArray(n)){for(var e=0,t=Array(n.length);e<n.length;e++)t[e]=n[e];return t}return Array.from(n)}Object.defineProperty(e,"__esModule",{value:!0});var r=t(9),i=function(n){return n&&n.__esModule?n:{default:n}}(r);e.default={name:"CalendarView",mixins:[i.default],props:{showDate:{type:Date,default:function(){}},displayPeriodUom:{type:String,default:function(){return"month"}},displayPeriodCount:{type:Number,default:function(){return 1}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},showEventTimes:{type:Boolean,default:function(){return!1}},timeFormatOptions:{type:Object,default:function(){return{}}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}}},data:function(){return{currentDragEvent:null}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},periodStart:function(){return this.beginningOfPeriod(this.showDate||this.today(),this.displayPeriodUom,this.startingDayOfWeek)},periodEnd:function(){return this.addDays(this.incrementPeriod(this.periodStart,this.displayPeriodUom,this.displayPeriodCount),-1)},displayFirstDate:function(){return this.beginningOfWeek(this.periodStart,this.startingDayOfWeek)},displayLastDate:function(){return this.endOfWeek(this.periodEnd,this.startingDayOfWeek)},weeksOfPeriod:function(){var n=this,e=Math.floor((this.dayDiff(this.displayFirstDate,this.displayLastDate)+1)/7);return Array(e).fill().map(function(e,t){return n.addDays(n.displayFirstDate,7*t)})},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},fixedEvents:function(){var n=this;return this.events.map(function(e){var t=[];return e.classes&&(t=Array.isArray(e.classes)?[].concat(a(e.classes)):[e.classes]),{originalEvent:e,startDate:n.toLocalDate(e.startDate),endDate:n.toLocalDate(e.endDate||e.startDate),classes:t,title:e.title||"Untitled",id:e.id||"e"+Math.random().toString(36).substr(2,10)}})}},methods:{onClickDay:function(n){this.disablePast&&this.isInPast(n)||this.$emit("clickDay",n)},onClickEvent:function(n,e){this.$emit("clickEvent",n.originalEvent,e)},onClickCurrentPeriod:function(){this.$emit("setShowDate",this.beginningOfPeriod(this.today(),this.displayPeriodUom,this.startingDayOfWeek))},getIncrementedPeriod:function(n){var e=this.incrementPeriod(this.periodStart,this.displayPeriodUom,n),t=this.incrementPeriod(e,this.displayPeriodUom,this.displayPeriodCount);return this.disablePast&&t<=this.today()?null:this.disableFuture&&e>this.today()?null:e},isPeriodIncrementAllowed:function(n){return null!==this.getIncrementedPeriod(n)},onIncrementPeriod:function(n){var e=this.getIncrementedPeriod(n);null!=e&&this.$emit("setShowDate",e)},onDragStart:function(n){return!!this.enableDragDrop&&(this.currentDragEvent=n,this.$emit("dragEventStart",n.originalEvent,n),!0)},handleEvent:function(n,e){return!!this.enableDragDrop&&(!!this.currentDragEvent&&(this.$emit(n,this.currentDragEvent.originalEvent,e),!0))},onDragOver:function(n){this.handleEvent("dragEventOverDate",n)},onDragEnter:function(n,e){this.handleEvent("dragEventEnterDate",n)&&e.target.classList.add("draghover")},onDragLeave:function(n,e){this.handleEvent("dragEventLeaveDate",n)&&e.target.classList.remove("draghover")},onDrop:function(n,e){this.handleEvent("dropEventOnDate",n)&&e.target.classList.remove("draghover")},findAndSortEventsInWeek:function(n){var e=this;return this.fixedEvents.filter(function(t){return t.startDate<e.addDays(n,7)&&t.endDate>=n},this).sort(function(n,e){return n.startDate<e.startDate?-1:e.startDate<n.startDate?1:n.endDate>e.endDate?-1:e.endDate>n.endDate?1:n.id<e.id?-1:1})},getWeekEvents:function(n){for(var e=this.findAndSortEventsInWeek(n),t=[],r=[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],i=0;i<e.length;i++){var o=Object.assign({},e[i],{classes:[].concat(a(e[i].classes)),eventRow:0}),s=o.startDate<n,l=s?0:this.dayDiff(n,o.startDate),d=Math.min(7-l,this.dayDiff(this.addDays(n,l),o.endDate)+1);s&&o.classes.push("continued"),this.dayDiff(n,o.endDate)>6&&o.classes.push("toBeContinued"),o.originalEvent.url&&o.classes.push("hasUrl");for(var c=0;c<7;c++)if(c===l){for(var u=0;u<20;u++)if(!r[c][u]){o.eventRow=u,r[c][u]=!0;break}}else c<l+d&&(r[c][o.eventRow]=!0);o.classes.push("offset"+l),o.classes.push("span"+d),o.classes.push("eventRow"+(o.eventRow+1)),t.push(o)}return t},getFormattedTimeRange:function(n){var e=this.formattedTime(n.startDate,this.displayLocale,this.timeFormatOptions),t=this.isSameDateTime(n.startDate,n.endDate)?"":this.formattedTime(n.endDate,this.displayLocale,this.timeFormatOptions),a=""!==e,r=""!==t;return(a?'<span class="startTime'+(r?" hasEndTime":"")+'">'+e+"</span>":"")+(r?'<span class="endTime'+(a?" hasStartTime":"")+'">'+t+"</span>":"")},getEventTitle:function(n){return this.showEventTimes?this.getFormattedTimeRange(n)+n.title:n.title}}}},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=t(2),r=function(n){return n&&n.__esModule?n:{default:n}}(a);e.default={install:function(n){n.component("calendar-view",r.default)}}},function(n,e,t){"use strict";function a(n){l||t(3)}Object.defineProperty(e,"__esModule",{value:!0});var r=t(0),i=t.n(r);for(var o in r)"default"!==o&&function(n){t.d(e,n,function(){return r[n]})}(o);var s=t(10),l=!1,d=t(8),c=a,u=d(i.a,s.a,!1,c,null,null);u.options.__file="src/CalendarView.vue",e.default=u.exports},function(n,e,t){var a=t(4);"string"==typeof a&&(a=[[n.i,a,""]]),a.locals&&(n.exports=a.locals);t(6)("02c012a0",a,!1)},function(n,e,t){e=n.exports=t(5)(void 0),e.push([n.i,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Position/Flex */\n\n/* Make the calendar flex vertically */\n.calendar-view {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n}\n.calendar-view .header {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 0;\n\t -ms-flex: 0 1 auto;\n\t flex: 0 1 auto;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\t-webkit-box-align: center;\n\t -ms-flex-align: center;\n\t align-items: center;\n\tmin-height: 2.5em;\n}\n.calendar-view .header .periodLabel {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 auto;\n\t flex: 1 1 auto;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\tmin-height: 1.2em;\n}\n.calendar-view .dayList {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 0;\n\t -ms-flex: 0 0 auto;\n\t flex: 0 0 auto;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n}\n.calendar-view .dayList .day {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\t-webkit-box-align: center;\n\t -ms-flex-align: center;\n\t align-items: center;\n\t-webkit-box-pack: center;\n\t -ms-flex-pack: center;\n\t justify-content: center;\n}\n\n/* The calendar grid should take up the remaining vertical space */\n.calendar-view .weeks {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 auto;\n\t flex: 1 1 auto;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: column nowrap;\n\t flex-flow: column nowrap;\n\t/* Allow grid to scroll if there are too may weeks to fit in the view */\n\toverflow-y: scroll;\n\t-ms-overflow-style: none;\n}\n\n/* Use flex basis of 0 on week row so all weeks will be same height regardless of content */\n.calendar-view .week {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\tmin-height: 3em;\n\t/* Allow week events to scroll if they are too tall */\n\tposition: relative;\n\twidth: 100%;\n\toverflow-y: scroll;\n\t-ms-overflow-style: none;\n}\n.calendar-view .weeks::-webkit-scrollbar,\n.calendar-view .week::-webkit-scrollbar {\n\twidth: 0px; /* remove scrollbar space */\n\tbackground: transparent; /* optional: just make scrollbar invisible */\n}\n.calendar-view .week .day {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\t/* When week\'s events are scrolled, keep the day content fixed */\n\tposition: -webkit-sticky;\n\tposition: sticky;\n\ttop: 0;\n}\n.calendar-view .week .day .content {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbottom: 0;\n\tright: 0;\n}\n.calendar-view .week .day .date {\n\tfloat: right;\n\tclear: both;\n}\n.calendar-view .week .event {\n\tposition: absolute;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n/* Header */\n.calendar-view .periodLabel .startDay::before,\n.calendar-view .periodLabel .endDay::before,\n.calendar-view.period-month .periodLabel .startYear::before,\n.calendar-view.period-month .periodLabel .endYear::before,\n.calendar-view.period-year .periodLabel .endYear::before {\n\tcontent: "\\A0";\n}\n.calendar-view .periodLabel .endMonth::before,\n.calendar-view.period-year:not(.periodCount-1) .periodLabel .endYear::before,\n.calendar-view.period-week .periodLabel.singleMonth .endDay::before {\n\tcontent: "\\A0\\2013\\A0";\n}\n.calendar-view.period-week .periodLabel .startYear::before,\n.calendar-view.period-week .periodLabel .endYear::before {\n\tcontent: ",\\A0";\n}\n.calendar-view .periodLabel.singleYear .startYear,\n.calendar-view .periodLabel.singleMonth .endMonth,\n.calendar-view.period-month .periodLabel .startDay,\n.calendar-view.period-month .periodLabel .endDay,\n.calendar-view.period-year .periodLabel .startDay,\n.calendar-view.period-year .periodLabel .endDay,\n.calendar-view.period-year .periodLabel .startMonth,\n.calendar-view.period-year .periodLabel .endMonth,\n.calendar-view.period-month.periodCount-1 .periodLabel .endMonth,\n.calendar-view.period-month.periodCount-1 .periodLabel .startYear,\n.calendar-view.period-year.periodCount-1 .periodLabel .startYear {\n\tdisplay: none;\n}\n\n/* Header navigation buttons */\n.calendar-view .header .nav .previousPeriod::after {\n\tcontent: "<";\n}\n.calendar-view .header .nav .nextPeriod::after {\n\tcontent: ">";\n}\n.calendar-view .header .nav .previousYear::after {\n\tcontent: "<<";\n}\n.calendar-view .header .nav .nextYear::after {\n\tcontent: ">>";\n}\n.calendar-view .header .nav .currentPeriod {\n\tdisplay: none;\n}\n.calendar-view.past .header .nav .currentPeriod,\n.calendar-view.future .header .nav .currentPeriod {\n\tdisplay: inline-block;\n}\n.calendar-view.past .header .nav .currentPeriod::after {\n\tcontent: "\\21BB";\n}\n.calendar-view.future .header .nav .currentPeriod::after {\n\tcontent: "\\21BA";\n}\n\n/* Colors */\n.calendar-view .period .day,\n.calendar-view .header button {\n\tbackground-color: #fff;\n}\n.calendar-view .header,\n.calendar-view .dayList .day {\n\tbackground-color: #f0f0f0;\n}\n.calendar-view .event {\n\tbackground-color: #f7f7f7;\n}\n.calendar-view .header,\n.calendar-view .header button,\n.calendar-view .dayList,\n.calendar-view .weeks,\n.calendar-view .week,\n.calendar-view .day,\n.calendar-view .event {\n\tborder-color: #ddd;\n}\n\n/* Event Times */\n.calendar-view .event .startTime,\n.calendar-view .event .endTime {\n\tfont-weight: bold;\n\tcolor: #666;\n}\n.calendar-view .event .startTime:not(.hasEndTime),\n.calendar-view .event .endTime {\n\tmargin-right: 0.4em;\n}\n.calendar-view .event .endTime::before {\n\tcontent: "-";\n}\n\n/* Internal Metrics */\n.calendar-view,\n.calendar-view div,\n.calendar-view button {\n\t-webkit-box-sizing: border-box;\n\t box-sizing: border-box;\n\tline-height: 1em;\n\tfont-size: 1em;\n}\n.calendar-view .dayList div,\n.calendar-view .date,\n.calendar-view .event {\n\tpadding: 0.2em;\n}\n.calendar-view .header .nav,\n.calendar-view .header .periodLabel {\n\tmargin: 0.4em 0.6em;\n}\n.calendar-view .header .nav button,\n.calendar-view .header .periodLabel {\n\tpadding: 0.4em 0.6em;\n}\n\n/* Allows emoji icons or labels (such as holidays) to be added more easily to specific dates by having the margin set already. */\n.calendar-view .day .date::before {\n\tmargin-right: 0.5em;\n}\n\n/* Borders */\n.calendar-view .weeks {\n\tborder-style: solid;\n\tborder-width: 0 0 1px 1px;\n}\n.calendar-view .header {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0.05em;\n}\n.calendar-view .dayList {\n\tborder-style: solid;\n\tborder-width: 0 0 0 1px;\n}\n.calendar-view .day {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0;\n}\n.calendar-view .header button,\n.calendar-view .event {\n\tborder-style: solid;\n\tborder-width: 0.05em;\n}\n\n/* Positioning for event eventRows */\n.calendar-view .event.eventRow1 {\n\ttop: 1.4em;\n}\n.calendar-view .event.eventRow2 {\n\ttop: calc(2 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow3 {\n\ttop: calc(3 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow4 {\n\ttop: calc(4 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow5 {\n\ttop: calc(5 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow6 {\n\ttop: calc(6 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow7 {\n\ttop: calc(7 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow8 {\n\ttop: calc(8 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow9 {\n\ttop: calc(9 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow10 {\n\ttop: calc(10 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow11 {\n\ttop: calc(11 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow12 {\n\ttop: calc(12 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow13 {\n\ttop: calc(13 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow14 {\n\ttop: calc(14 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow15 {\n\ttop: calc(15 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow16 {\n\ttop: calc(16 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow17 {\n\ttop: calc(17 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow18 {\n\ttop: calc(18 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow19 {\n\ttop: calc(19 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow20 {\n\ttop: calc(20 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow0 {\n\tdisplay: none;\n} /* More than 10 eventRows not currently supported */\n.calendar-view .event.offset0 {\n\tleft: calc(0.05em);\n}\n.calendar-view .event.offset1 {\n\tleft: calc((100% / 7) + 0.05em);\n}\n.calendar-view .event.offset2 {\n\tleft: calc((200% / 7) + 0.05em);\n}\n.calendar-view .event.offset3 {\n\tleft: calc((300% / 7) + 0.05em);\n}\n.calendar-view .event.offset4 {\n\tleft: calc((400% / 7) + 0.05em);\n}\n.calendar-view .event.offset5 {\n\tleft: calc((500% / 7) + 0.05em);\n}\n.calendar-view .event.offset6 {\n\tleft: calc((600% / 7) + 0.05em);\n}\n\n/* Metrics for events spanning dates */\n.calendar-view .event.span1 {\n\twidth: calc((100% / 7) - 0.05em);\n}\n.calendar-view .event.span2 {\n\twidth: calc((200% / 7) - 0.05em);\n}\n.calendar-view .event.span3 {\n\twidth: calc((300% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span4 {\n\twidth: calc((400% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span5 {\n\twidth: calc((500% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span6 {\n\twidth: calc((600% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span7 {\n\twidth: calc((700% / 7) - 0.05em);\n\ttext-align: center;\n}\n\n/* Misc */\n.calendar-view .dayList .day {\n\ttext-align: center;\n}\n.calendar-view .event.hasUrl:hover {\n\ttext-decoration: underline;\n}\n.calendar-view .event.continued {\n\tborder-left-style: none;\n\tborder-top-left-radius: 0;\n\tborder-bottom-left-radius: 0;\n}\n',""])},function(n,e){function t(n,e){var t=n[1]||"",r=n[3];if(!r)return t;if(e&&"function"==typeof btoa){var i=a(r);return[t].concat(r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"})).concat([i]).join("\n")}return[t].join("\n")}function a(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var a=t(e,n);return e[2]?"@media "+e[2]+"{"+a+"}":a}).join("")},e.i=function(n,t){"string"==typeof n&&(n=[[null,n,""]]);for(var a={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(a[i]=!0)}for(r=0;r<n.length;r++){var o=n[r];"number"==typeof o[0]&&a[o[0]]||(t&&!o[2]?o[2]=t:t&&(o[2]="("+o[2]+") and ("+t+")"),e.push(o))}},e}},function(n,e,t){function a(n){for(var e=0;e<n.length;e++){var t=n[e],a=c[t.id];if(a){a.refs++;for(var r=0;r<a.parts.length;r++)a.parts[r](t.parts[r]);for(;r<t.parts.length;r++)a.parts.push(i(t.parts[r]));a.parts.length>t.parts.length&&(a.parts.length=t.parts.length)}else{for(var o=[],r=0;r<t.parts.length;r++)o.push(i(t.parts[r]));c[t.id]={id:t.id,refs:1,parts:o}}}}function r(){var n=document.createElement("style");return n.type="text/css",u.appendChild(n),n}function i(n){var e,t,a=document.querySelector('style[data-vue-ssr-id~="'+n.id+'"]');if(a){if(p)return h;a.parentNode.removeChild(a)}if(w){var i=v++;a=f||(f=r()),e=o.bind(null,a,i,!1),t=o.bind(null,a,i,!0)}else a=r(),e=s.bind(null,a),t=function(){a.parentNode.removeChild(a)};return e(n),function(a){if(a){if(a.css===n.css&&a.media===n.media&&a.sourceMap===n.sourceMap)return;e(n=a)}else t()}}function o(n,e,t,a){var r=t?"":a.css;if(n.styleSheet)n.styleSheet.cssText=m(e,r);else{var i=document.createTextNode(r),o=n.childNodes;o[e]&&n.removeChild(o[e]),o.length?n.insertBefore(i,o[e]):n.appendChild(i)}}function s(n,e){var t=e.css,a=e.media,r=e.sourceMap;if(a&&n.setAttribute("media",a),r&&(t+="\n/*# sourceURL="+r.sources[0]+" */",t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),n.styleSheet)n.styleSheet.cssText=t;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(t))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var d=t(7),c={},u=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,v=0,p=!1,h=function(){},w="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,e,t){p=t;var r=d(n,e);return a(r),function(e){for(var t=[],i=0;i<r.length;i++){var o=r[i],s=c[o.id];s.refs--,t.push(s)}e?(r=d(n,e),a(r)):r=[];for(var i=0;i<t.length;i++){var s=t[i];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var m=function(){var n=[];return function(e,t){return n[e]=t,n.filter(Boolean).join("\n")}}()},function(n,e){n.exports=function(n,e){for(var t=[],a={},r=0;r<e.length;r++){var i=e[r],o=i[0],s=i[1],l=i[2],d=i[3],c={id:n+":"+r,css:s,media:l,sourceMap:d};a[o]?a[o].parts.push(c):t.push(a[o]={id:o,parts:[c]})}return t}},function(n,e){n.exports=function(n,e,t,a,r,i){var o,s=n=n||{},l=typeof n.default;"object"!==l&&"function"!==l||(o=n,s=n.default);var d="function"==typeof s?s.options:s;e&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),t&&(d.functional=!0),r&&(d._scopeId=r);var c;if(i?(c=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),a&&a.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(i)},d._ssrRegister=c):a&&(c=a),c){var u=d.functional,f=u?d.render:d.beforeCreate;u?(d._injectStyles=c,d.render=function(n,e){return c.call(e),f(n,e)}):d.beforeCreate=f?[].concat(f,c):[c]}return{esModule:o,exports:s,options:d}}},function(n,e,t){"use strict";function a(n){if(Array.isArray(n)){for(var e=0,t=Array(n.length);e<n.length;e++)t[e]=n[e];return t}return Array.from(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(n,e,t){switch(e){case"year":return new Date(n.getFullYear(),0);case"month":return new Date(n.getFullYear(),n.getMonth());case"week":return this.beginningOfWeek(n,t);default:return null}},daysOfWeek:function(n){var e=this;return Array(7).fill().map(function(t,a){return e.addDays(n,a)})},addDays:function(n,e){return new Date(n.getFullYear(),n.getMonth(),n.getDate()+e,n.getHours(),n.getMinutes(),n.getSeconds())},beginningOfWeek:function(n,e){return this.addDays(n,(e-n.getDay()-7)%-7)},endOfWeek:function(n,e){return this.addDays(this.beginningOfWeek(n,e),7)},beginningOfMonth:function(n){return new Date(n.getFullYear(),n.getMonth())},instanceOfMonth:function(n){return Math.ceil(n.getDate()/7)},incrementPeriod:function(n,e,t){return new Date(n.getFullYear()+("year"==e?t:0),n.getMonth()+("month"==e?t:0),n.getDate()+("week"==e?7*t:0))},paddedMonth:function(n){return("0"+String(n.getMonth()+1)).slice(-2)},paddedDay:function(n){return("0"+String(n.getDate())).slice(-2)},isoYearMonth:function(n){return n.getFullYear()+"-"+this.paddedMonth(n)},isoYearMonthDay:function(n){return this.isoYearMonth(n)+"-"+this.paddedDay(n)},isoMonthDay:function(n){return this.paddedMonth(n)+"-"+this.paddedDay(n)},formattedTime:function(n,e,t){if(0===n.getHours()&&0===n.getMinutes()&&0===n.getSeconds())return"";if(!this.supportsIntl()){var a=6e4*(new Date).getTimezoneOffset();return new Date(n-a).toISOString().slice(11,16)}return n.toLocaleTimeString(e,t)},dayDiff:function(n,e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(n.getFullYear(),n.getMonth(),n.getDate());return t.setUTCHours(0,0,0,0),a.setUTCHours(0,0,0,0),(t-a)/864e5},isSameDate:function(n,e){return 0===this.dayDiff(n,e)},isSameDateTime:function(n,e){return n.getTime()===e.getTime()},isSameMonth:function(n,e){return n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()},isPastMonth:function(n){return this.beginningOfMonth(n)<this.beginningOfMonth(this.today())},isFutureMonth:function(n){return this.beginningOfMonth(n)>this.beginningOfMonth(this.today())},isInFuture:function(n){return this.dateOnly(n)>this.today()},isInPast:function(n){return this.dateOnly(n)<this.today()},isLastInstanceOfMonth:function(n){return n.getMonth()!==this.addDays(n,7).getMonth()},isLastDayOfMonth:function(n){return n.getMonth()!==this.addDays(n,1).getMonth()},fromIsoStringToLocalDate:function(n){var e=n.split(/\D/).map(function(n){return Number(n)});return e[1]--,new(Function.prototype.bind.apply(Date,[null].concat(a(e))))},toLocalDate:function(n){return"string"==typeof n?this.fromIsoStringToLocalDate(n):new Date(n)},dateOnly:function(n){var e=new Date(n);return e.setHours(0,0,0,0),e},languageCode:function(n){return n.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(n,e){if(!this.supportsIntl())return Array(12).fill("");var t=new Intl.DateTimeFormat(n,{month:e});return Array(12).fill().map(function(n,e){return t.format(new Date(2017,e,1))})},getFormattedWeekdayNames:function(n,e,t){if(!this.supportsIntl())return Array(7).fill("");var a=new Intl.DateTimeFormat(n,{weekday:e});return Array(7).fill().map(function(n,e){return a.format(new Date(2017,0,(e+1+t)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()}}}},function(n,e,t){"use strict";var a=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"calendar-view",class:["locale-"+n.languageCode(n.displayLocale),"locale-"+n.displayLocale,"y"+n.periodStart.getFullYear(),"m"+n.paddedMonth(n.periodStart),"period-"+n.displayPeriodUom,"periodCount-"+n.displayPeriodCount,{past:n.isPastMonth(n.periodStart),future:n.isFutureMonth(n.periodStart),noIntl:!n.supportsIntl}]},[n._t("header",[t("div",{staticClass:"header"},[t("div",{staticClass:"nav"},[t("button",{staticClass:"previousYear",attrs:{disabled:!n.isPeriodIncrementAllowed(-12)},on:{click:function(e){n.onIncrementPeriod(-12)}}}),n._v(" "),t("button",{staticClass:"previousPeriod",attrs:{disabled:!n.isPeriodIncrementAllowed(-n.displayPeriodCount)},on:{click:function(e){n.onIncrementPeriod(-n.displayPeriodCount)}}}),n._v(" "),t("button",{staticClass:"nextPeriod",attrs:{disabled:!n.isPeriodIncrementAllowed(n.displayPeriodCount)},on:{click:function(e){n.onIncrementPeriod(n.displayPeriodCount)}}}),n._v(" "),t("button",{staticClass:"nextYear",attrs:{disabled:!n.isPeriodIncrementAllowed(12)},on:{click:function(e){n.onIncrementPeriod(12)}}}),n._v(" "),t("button",{staticClass:"currentPeriod",on:{click:n.onClickCurrentPeriod}})]),n._v(" "),t("div",{staticClass:"periodLabel",class:{singleYear:n.periodStart.getFullYear()===n.periodEnd.getFullYear(),singleMonth:n.isSameMonth(n.periodStart,n.periodEnd)}},[t("div",{staticClass:"startMonth"},[n._v(n._s(n.monthNames[n.periodStart.getMonth()]))]),n._v(" "),t("div",{staticClass:"startDay"},[n._v(n._s(n.periodStart.getDate()))]),n._v(" "),t("div",{staticClass:"startYear"},[n._v(n._s(n.periodStart.getFullYear()))]),n._v(" "),t("div",{staticClass:"endMonth"},[n._v(n._s(n.monthNames[n.periodEnd.getMonth()]))]),n._v(" "),t("div",{staticClass:"endDay"},[n._v(n._s(n.periodEnd.getDate()))]),n._v(" "),t("div",{staticClass:"endYear"},[n._v(n._s(n.periodEnd.getFullYear()))])])])]),n._v(" "),t("div",{staticClass:"dayList"},[n._l(n.weekdayNames,function(e,a){return[n._t("dayHeader",[t("div",{key:a,staticClass:"day",class:"dow"+a},[n._v(n._s(e))])],{index:a,label:e})]})],2),n._v(" "),t("div",{staticClass:"weeks"},n._l(n.weeksOfPeriod,function(e,a){return t("div",{key:a,staticClass:"week",class:["week"+(a+1),"ws"+n.isoYearMonthDay(e)],style:"z-index:"+2*(a+1)},[n._l(n.daysOfWeek(e),function(e,a){return t("div",{key:a,staticClass:"day",class:["dow"+e.getDay(),"d"+n.isoYearMonthDay(e),"d"+n.isoMonthDay(e),"d"+n.paddedDay(e),"instance"+n.instanceOfMonth(e),{outsideOfMonth:!n.isSameMonth(e,n.today()),today:n.isSameDate(e,n.today()),past:n.isInPast(e),future:n.isInFuture(e),last:n.isLastDayOfMonth(e),lastInstance:n.isLastInstanceOfMonth(e)}],on:{click:function(t){n.onClickDay(e)},drop:function(t){t.preventDefault(),n.onDrop(e,t)},dragover:function(t){t.preventDefault(),n.onDragOver(e)},dragenter:function(t){t.preventDefault(),n.onDragEnter(e,t)},dragleave:function(t){t.preventDefault(),n.onDragLeave(e,t)}}},[t("div",{staticClass:"content"},[n._t("dayContent",[t("div",{staticClass:"date"},[n._v(n._s(e.getDate()))])],{day:e})],2)])}),n._v(" "),n._l(n.getWeekEvents(e),function(r){return[n._t("event",[t("div",{key:r.id,staticClass:"event",class:r.classes,style:"z-index:"+(2*(a+1)+1),attrs:{draggable:n.enableDragDrop,title:r.title},domProps:{innerHTML:n._s(n.getEventTitle(r))},on:{dragstart:function(e){n.onDragStart(r)},click:function(e){e.stopPropagation(),n.onClickEvent(r)}}})],{event:r.originalEvent,weekStartDate:e})]})],2)}))],2)},r=[];a._withStripped=!0;var i={render:a,staticRenderFns:r};e.a=i}]);

@@ -1,1 +0,1 @@

!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("CalendarMonth",[],t):"object"==typeof exports?exports.CalendarMonth=t():n.CalendarMonth=t()}("undefined"!=typeof self?self:this,function(){return function(n){function t(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return n[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,a){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:a})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=1)}([function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=e(8),r=function(n){return n&&n.__esModule?n:{default:n}}(a);t.default={name:"CalendarMonth",mixins:[r.default],props:{showDate:{type:Date,default:function(){}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},displayDate:function(){return this.showDate||this.today()},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},allowLastYearClick:function(){return!this.disablePast||this.aYearBefore(this.displayDate)>=this.today()},allowNextYearClick:function(){return!this.disableFuture||this.aYearAfter(this.displayDate)<=this.today()},allowLastMonthClick:function(){return!this.disablePast||this.beginningOfMonth(this.displayDate)>this.today()},allowNextMonthClick:function(){return!this.disableFuture||this.displayDate<this.beginningOfMonth(this.today())}},methods:{onClickDay:function(n){this.disablePast&&this.isInPast(n)||this.$emit("clickDay",n)},onClickEvent:function(n,t){this.$emit("clickEvent",n.details,t)},onClickPreviousYear:function(){this.$emit("setShowDate",this.aYearBefore(this.displayDate))},onClickPreviousMonth:function(){this.$emit("setShowDate",this.monthBefore(this.displayDate))},onClickNextMonth:function(){this.$emit("setShowDate",this.monthAfter(this.displayDate))},onClickNextYear:function(){this.$emit("setShowDate",this.aYearAfter(this.displayDate))},onClickCurrentMonth:function(){this.$emit("setShowDate",this.beginningOfMonth(this.today()))},onDragStart:function(n,t){return!!this.enableDragDrop&&(t.dataTransfer.setData("Text",n.details.id),this.$emit("dragEventStart",n.details.id,n),!0)},handleEvent:function(n,t,e){if(!this.enableDragDrop)return!1;var a=n.dataTransfer.getData("Text");return this.$emit(t,a,e),!0},onDragOver:function(n,t){this.handleEvent(t,"dragEventDragOverDate",n)},onDragEnter:function(n,t){this.handleEvent(t,"dragEventEnterDate",n)&&t.target.classList.add("draghover")},onDragLeave:function(n,t){this.handleEvent(t,"dragEventLeaveDate",n)&&t.target.classList.remove("draghover")},onDrop:function(n,t){this.handleEvent(t,"dropEventOnDate",n)&&t.target.classList.remove("draghover")},findAndSortEventsInWeek:function(n){var t=this;return this.events.filter(function(e){return t.dateOnly(e.startDate)<t.addDays(n,7)&&t.dateOnly(e.endDate||e.startDate)>=n},this).sort(function(n,t){return n.startDate<t.startDate?-1:t.startDate<n.startDate?1:n.endDate>t.endDate?-1:t.endDate>n.endDate?1:n.id<t.id?-1:1})},getWeekEvents:function(n){for(var t=this.findAndSortEventsInWeek(n),e=[],a=[[],[],[],[],[],[],[],[],[],[]],r=0;r<t.length;r++){for(var o={startDate:t[r].startDate,endDate:t[r].endDate||t[r].startDate,title:t[r].title||"Untitled",id:t[r].id||"e"+Math.random().toString(36).substr(2,10),url:t[r].url,classes:t[r].classes},i={details:o,slot:0},s=o.startDate<n,l=s?0:this.dayDiff(n,o.startDate),d=this.dayDiff(n,o.endDate)>6,c=Math.min(7-l,this.dayDiff(this.addDays(n,l),o.endDate)+1),u=0;u<7;u++)if(u===l){for(var f=0;f<10;f++)if(!a[u][f]){i.slot=f,a[u][f]=!0;break}}else u<l+c&&(a[u][i.slot]=!0);i.classes=["offset"+l,"span"+c,"slot"+(i.slot+1),{continued:s,toBeContinued:d,hasUrl:i.details.url}],o.classes&&(i.classes=i.classes.concat(o.classes)),e.push(i)}return e}}}},function(n,t,e){"use strict";function a(n){l||e(2)}Object.defineProperty(t,"__esModule",{value:!0});var r=e(0),o=e.n(r);for(var i in r)"default"!==i&&function(n){e.d(t,n,function(){return r[n]})}(i);var s=e(9),l=!1,d=e(7),c=a,u=d(o.a,s.a,!1,c,null,null);u.options.__file="src/CalendarMonth.vue",t.default=u.exports},function(n,t,e){var a=e(3);"string"==typeof a&&(a=[[n.i,a,""]]),a.locals&&(n.exports=a.locals);e(5)("0e16e79a",a,!1)},function(n,t,e){t=n.exports=e(4)(void 0),t.push([n.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Position/Flex */\n\n/* Make the calendar flex vertically */\n.calendar-month {\n\theight: 100%;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n}\n/* Set flex-grow and flex-shrink to 0 for header and dayList so they remain static */\n.calendar-month .header,\n.calendar-month .dayList {\n\t-webkit-box-flex: 0;\n\t -ms-flex: 0 0 auto;\n\t flex: 0 0 auto;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\twidth: 100%;\n\t-ms-flex-wrap: wrap;\n\t flex-wrap: wrap;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: row;\n\t flex-direction: row;\n\t-webkit-box-pack: start;\n\t -ms-flex-pack: start;\n\t justify-content: flex-start;\n\t-webkit-box-align: stretch;\n\t -ms-flex-align: stretch;\n\t align-items: stretch;\n\t-ms-flex-line-pack: start;\n\t align-content: flex-start;\n}\n/* The calendar grid should take up the remaining vertical space */\n.calendar-month .month {\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 auto;\n\t flex: 1 1 auto;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n}\n/* Use flex basis of 0 on week row so all weeks will be same height regardless of content */\n.calendar-month .week {\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: row;\n\t flex-direction: row;\n\tmin-height: 2em;\n}\n.calendar-month .week .day,\n.calendar-month .dayList .day {\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n}\n.calendar-month .header {\n\t-webkit-box-pack: justify;\n\t -ms-flex-pack: justify;\n\t justify-content: space-between;\n}\n.calendar-month .header .thisMonth {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: row;\n\t flex-direction: row;\n}\n.calendar-month .month {\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n\toverflow: hidden;\n}\n.calendar-month .week {\n\tposition: relative;\n\twidth: 100%;\n}\n.calendar-month .day {\n\tposition: relative;\n\tbackground-color: #fff;\n}\n.calendar-month .day .content {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbottom: 0;\n\tright: 0;\n}\n.calendar-month .date {\n\tfloat: right;\n\tclear: both;\n}\n.calendar-month .event {\n\tposition: absolute;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n/* Internal Metrics */\n.calendar-month,\n.calendar-month div,\n.calendar-month button {\n\t-webkit-box-sizing: border-box;\n\t box-sizing: border-box;\n\tline-height: 1em;\n\tfont-size: 1em;\n}\n.calendar-month .header > div,\n.calendar-month .dayList div,\n.calendar-month .header .monthLabel,\n.calendar-month .date,\n.calendar-month .event {\n\tpadding: 0.2em;\n}\n.calendar-month .header button,\n.calendar-month .header .monthLabel {\n\tpadding: 0.4em 0.6em;\n}\n\n/* Borders */\n.calendar-month .month {\n\tborder-style: solid;\n\tborder-width: 0 0 1px 1px;\n}\n.calendar-month .header {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0.05em;\n}\n.calendar-month .dayList {\n\tborder-style: solid;\n\tborder-width: 0 0 0 1px;\n}\n.calendar-month .day {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0;\n}\n.calendar-month .header button,\n.calendar-month .event {\n\tborder-style: solid;\n\tborder-width: 0.05em;\n}\n\n/* Use z-index to ensure events too tall for the view are clipped vertically */\n.calendar-month .week1 {\n\tz-index: 2;\n}\n.calendar-month .week2 {\n\tz-index: 4;\n}\n.calendar-month .week3 {\n\tz-index: 6;\n}\n.calendar-month .week4 {\n\tz-index: 8;\n}\n.calendar-month .week5 {\n\tz-index: 10;\n}\n.calendar-month .week6 {\n\tz-index: 12;\n}\n.calendar-month .week1 .event {\n\tz-index: 3;\n}\n.calendar-month .week2 .event {\n\tz-index: 5;\n}\n.calendar-month .week2 .event {\n\tz-index: 5;\n}\n.calendar-month .week3 .event {\n\tz-index: 7;\n}\n.calendar-month .week4 .event {\n\tz-index: 9;\n}\n.calendar-month .week5 .event {\n\tz-index: 11;\n}\n.calendar-month .week6 .event {\n\tz-index: 13;\n}\n\n/* Positioning for event slots */\n.calendar-month .event.slot1 {\n\ttop: 1.4em;\n}\n.calendar-month .event.slot2 {\n\ttop: calc(2 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot3 {\n\ttop: calc(3 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot4 {\n\ttop: calc(4 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot5 {\n\ttop: calc(5 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot6 {\n\ttop: calc(6 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot7 {\n\ttop: calc(7 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot8 {\n\ttop: calc(8 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot9 {\n\ttop: calc(9 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot10 {\n\ttop: calc(10 * 1.4em + 0.1em);\n}\n.calendar-month .event.slot0 {\n\tdisplay: none;\n} /* More than 10 slots not currently supported */\n.calendar-month .event.offset0 {\n\tleft: calc(0.05em);\n}\n.calendar-month .event.offset1 {\n\tleft: calc((100% / 7) + 0.05em);\n}\n.calendar-month .event.offset2 {\n\tleft: calc((200% / 7) + 0.05em);\n}\n.calendar-month .event.offset3 {\n\tleft: calc((300% / 7) + 0.05em);\n}\n.calendar-month .event.offset4 {\n\tleft: calc((400% / 7) + 0.05em);\n}\n.calendar-month .event.offset5 {\n\tleft: calc((500% / 7) + 0.05em);\n}\n.calendar-month .event.offset6 {\n\tleft: calc((600% / 7) + 0.05em);\n}\n\n/* Metrics for events spanning dates */\n.calendar-month .event.span1 {\n\twidth: calc((100% / 7) - 0.05em);\n}\n.calendar-month .event.span2 {\n\twidth: calc((200% / 7) - 0.05em);\n}\n.calendar-month .event.span3 {\n\twidth: calc((300% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span4 {\n\twidth: calc((400% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span5 {\n\twidth: calc((500% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span6 {\n\twidth: calc((600% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-month .event.span7 {\n\twidth: calc((700% / 7) - 0.05em);\n\ttext-align: center;\n}\n\n/* Misc */\n.calendar-month .dayList .day {\n\ttext-align: center;\n}\n.calendar-month .event.hasUrl:hover {\n\ttext-decoration: underline;\n}\n.calendar-month .event.continued {\n\tborder-left-style: none;\n\tborder-top-left-radius: 0;\n\tborder-bottom-left-radius: 0;\n}\n",""])},function(n,t){function e(n,t){var e=n[1]||"",r=n[3];if(!r)return e;if(t&&"function"==typeof btoa){var o=a(r);return[e].concat(r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"})).concat([o]).join("\n")}return[e].join("\n")}function a(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var t=[];return t.toString=function(){return this.map(function(t){var a=e(t,n);return t[2]?"@media "+t[2]+"{"+a+"}":a}).join("")},t.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var a={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(a[o]=!0)}for(r=0;r<n.length;r++){var i=n[r];"number"==typeof i[0]&&a[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),t.push(i))}},t}},function(n,t,e){function a(n){for(var t=0;t<n.length;t++){var e=n[t],a=c[e.id];if(a){a.refs++;for(var r=0;r<a.parts.length;r++)a.parts[r](e.parts[r]);for(;r<e.parts.length;r++)a.parts.push(o(e.parts[r]));a.parts.length>e.parts.length&&(a.parts.length=e.parts.length)}else{for(var i=[],r=0;r<e.parts.length;r++)i.push(o(e.parts[r]));c[e.id]={id:e.id,refs:1,parts:i}}}}function r(){var n=document.createElement("style");return n.type="text/css",u.appendChild(n),n}function o(n){var t,e,a=document.querySelector('style[data-vue-ssr-id~="'+n.id+'"]');if(a){if(m)return p;a.parentNode.removeChild(a)}if(v){var o=h++;a=f||(f=r()),t=i.bind(null,a,o,!1),e=i.bind(null,a,o,!0)}else a=r(),t=s.bind(null,a),e=function(){a.parentNode.removeChild(a)};return t(n),function(a){if(a){if(a.css===n.css&&a.media===n.media&&a.sourceMap===n.sourceMap)return;t(n=a)}else e()}}function i(n,t,e,a){var r=e?"":a.css;if(n.styleSheet)n.styleSheet.cssText=g(t,r);else{var o=document.createTextNode(r),i=n.childNodes;i[t]&&n.removeChild(i[t]),i.length?n.insertBefore(o,i[t]):n.appendChild(o)}}function s(n,t){var e=t.css,a=t.media,r=t.sourceMap;if(a&&n.setAttribute("media",a),r&&(e+="\n/*# sourceURL="+r.sources[0]+" */",e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var d=e(6),c={},u=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,h=0,m=!1,p=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,t,e){m=e;var r=d(n,t);return a(r),function(t){for(var e=[],o=0;o<r.length;o++){var i=r[o],s=c[i.id];s.refs--,e.push(s)}t?(r=d(n,t),a(r)):r=[];for(var o=0;o<e.length;o++){var s=e[o];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var g=function(){var n=[];return function(t,e){return n[t]=e,n.filter(Boolean).join("\n")}}()},function(n,t){n.exports=function(n,t){for(var e=[],a={},r=0;r<t.length;r++){var o=t[r],i=o[0],s=o[1],l=o[2],d=o[3],c={id:n+":"+r,css:s,media:l,sourceMap:d};a[i]?a[i].parts.push(c):e.push(a[i]={id:i,parts:[c]})}return e}},function(n,t){n.exports=function(n,t,e,a,r,o){var i,s=n=n||{},l=typeof n.default;"object"!==l&&"function"!==l||(i=n,s=n.default);var d="function"==typeof s?s.options:s;t&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0),e&&(d.functional=!0),r&&(d._scopeId=r);var c;if(o?(c=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),a&&a.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(o)},d._ssrRegister=c):a&&(c=a),c){var u=d.functional,f=u?d.render:d.beforeCreate;u?(d._injectStyles=c,d.render=function(n,t){return c.call(t),f(n,t)}):d.beforeCreate=f?[].concat(f,c):[c]}return{esModule:i,exports:s,options:d}}},function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={methods:{today:function(){return this.dateOnly(new Date)},weeksOfMonth:function(n,t){var e=this,a=this.beginningOfCalendar(n,t),r=this.endOfCalendar(n,t),o=Math.floor((this.dayDiff(a,r)+1)/7);return Array(o).fill().map(function(n,t){return e.addDays(a,7*t)})},daysOfWeek:function(n){var t=this;return Array(7).fill().map(function(e,a){return t.addDays(n,a)})},addDays:function(n,t){return new Date(n.getFullYear(),n.getMonth(),n.getDate()+t)},endOfMonth:function(n){return new Date(n.getFullYear(),n.getMonth()+1,0)},endOfPreviousMonth:function(n){return new Date(n.getFullYear(),n.getMonth(),0)},aYearBefore:function(n){return new Date(n.getFullYear()-1,n.getMonth())},aYearAfter:function(n){return new Date(n.getFullYear()+1,n.getMonth())},monthBefore:function(n){return new Date(n.getFullYear(),n.getMonth()-1)},monthAfter:function(n){return new Date(n.getFullYear(),n.getMonth()+1)},beginningOfWeek:function(n,t){return this.addDays(n,(t-n.getDay()-7)%-7)},endOfWeek:function(n,t){return this.addDays(this.beginningOfWeek(n,t),7)},beginningOfCalendar:function(n,t){return this.beginningOfWeek(this.beginningOfMonth(n),t)},endOfCalendar:function(n,t){return this.endOfWeek(this.endOfMonth(n),t)},beginningOfMonth:function(n){return new Date(n.getFullYear(),n.getMonth())},instanceOfMonth:function(n){return Math.ceil(n.getDate()/7)},paddedMonth:function(n){return("0"+String(n.getMonth()+1)).slice(-2)},paddedDay:function(n){return("0"+String(n.getDate())).slice(-2)},isoYearMonth:function(n){return n.getFullYear()+"-"+this.paddedMonth(n)},isoYearMonthDay:function(n){return this.isoYearMonth(n)+"-"+this.paddedDay(n)},isoMonthDay:function(n){return this.paddedMonth(n)+"-"+this.paddedDay(n)},dayDiff:function(n,t){var e=new Date(t),a=new Date(n);return e.setUTCHours(0,0,0,0),a.setUTCHours(0,0,0,0),(e-a)/864e5},isSameDate:function(n,t){return 0===this.dayDiff(n,t)},isSameMonth:function(n,t){return n.getFullYear()===t.getFullYear()&&n.getMonth()===t.getMonth()},isPastMonth:function(n){return this.beginningOfMonth(n)<this.beginningOfMonth(this.today())},isFutureMonth:function(n){return this.beginningOfMonth(n)>this.beginningOfMonth(this.today())},isInFuture:function(n){return this.dateOnly(n)>this.today()},isInPast:function(n){return this.dateOnly(n)<this.today()},isLastInstanceOfMonth:function(n){return n.getMonth()!==this.addDays(n,7).getMonth()},isLastDayOfMonth:function(n){return n.getMonth()!==this.addDays(n,1).getMonth()},dateOnly:function(n){var t=new Date(n);return t.setHours(0,0,0,0),t},languageCode:function(n){return n.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(n,t){if(!this.supportsIntl())return Array(12).fill("");var e=new Intl.DateTimeFormat(n,{month:t});return Array(12).fill().map(function(n,t){return e.format(new Date(2017,t,1))})},getFormattedWeekdayNames:function(n,t,e){if(!this.supportsIntl())return Array(7).fill("");var a=new Intl.DateTimeFormat(n,{weekday:t});return Array(7).fill().map(function(n,t){return a.format(new Date(2017,0,(t+1+e)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()}}}},function(n,t,e){"use strict";var a=function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"calendar-month",class:["locale-"+n.languageCode(n.displayLocale),"locale-"+n.displayLocale,"y"+n.displayDate.getFullYear(),"m"+n.paddedMonth(n.displayDate),{past:n.isPastMonth(n.displayDate),future:n.isFutureMonth(n.displayDate),noIntl:!n.supportsIntl}]},[n._t("header",[e("div",{staticClass:"header"},[e("div",{staticClass:"previousYear"},[e("button",{attrs:{disabled:!n.allowLastYearClick},on:{click:n.onClickPreviousYear}})]),n._v(" "),e("div",{staticClass:"previousMonth"},[e("button",{attrs:{disabled:!n.allowLastMonthClick},on:{click:n.onClickPreviousMonth}})]),n._v(" "),e("div",{staticClass:"thisMonth"},[e("div",{staticClass:"monthLabel"},[e("span",{staticClass:"monthName"},[n._v(n._s(n.monthNames[n.displayDate.getMonth()]))]),n._v(" "),e("span",{staticClass:"yearNumber"},[n._v(n._s(n.displayDate.getFullYear()))])]),n._v(" "),n.isSameMonth(n.today(),n.displayDate)?n._e():e("div",{staticClass:"currentMonth"},[e("button",{on:{click:n.onClickCurrentMonth}})])]),n._v(" "),e("div",{staticClass:"nextMonth"},[e("button",{attrs:{disabled:!n.allowNextMonthClick},on:{click:n.onClickNextMonth}})]),n._v(" "),e("div",{staticClass:"nextYear"},[e("button",{attrs:{disabled:!n.allowNextYearClick},on:{click:n.onClickNextYear}})])])]),n._v(" "),n._t("dayList",[e("div",{staticClass:"dayList"},n._l(n.weekdayNames,function(t,a){return e("div",{key:a,staticClass:"day",class:"dow"+a},[n._v(n._s(t))])}))]),n._v(" "),e("div",{staticClass:"month"},n._l(n.weeksOfMonth(n.displayDate,n.startingDayOfWeek),function(t,a){return e("div",{key:a,staticClass:"week",class:["week"+(a+1),"ws"+n.isoYearMonthDay(t)]},[n._l(n.daysOfWeek(t),function(t,a){return e("div",{key:a,staticClass:"day",class:["dow"+t.getDay(),"d"+n.isoYearMonthDay(t),"d"+n.isoMonthDay(t),"d"+n.paddedDay(t),"instance"+n.instanceOfMonth(t),{outsideOfMonth:t.getMonth()!=n.displayDate.getMonth(),today:n.isSameDate(t,n.today()),past:n.isInPast(t),future:n.isInFuture(t),last:n.isLastDayOfMonth(t),lastInstance:n.isLastInstanceOfMonth(t)}],on:{click:function(e){n.onClickDay(t)},drop:function(e){e.preventDefault(),n.onDrop(t,e)},dragover:function(e){e.preventDefault(),n.onDragOver(t,e)},dragenter:function(e){e.preventDefault(),n.onDragEnter(t,e)},dragleave:function(e){e.preventDefault(),n.onDragLeave(t,e)}}},[e("div",{staticClass:"content"},[e("div",{staticClass:"date"},[n._v(n._s(t.getDate()))])])])}),n._v(" "),n._l(n.getWeekEvents(t),function(t){return e("div",{key:t.id,staticClass:"event",class:t.classes,attrs:{draggable:n.enableDragDrop,title:t.details.title},domProps:{innerHTML:n._s(t.details.title)},on:{dragstart:function(e){n.onDragStart(t,e)},click:function(e){e.stopPropagation(),n.onClickEvent(t)}}})})],2)}))],2)},r=[];a._withStripped=!0;var o={render:a,staticRenderFns:r};t.a=o}])});
!function(n,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("CalendarView",[],e):"object"==typeof exports?exports.CalendarView=e():n.CalendarView=e()}("undefined"!=typeof self?self:this,function(){return function(n){function e(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return n[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var t={};return e.m=n,e.c=t,e.d=function(n,t,a){e.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:a})},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},e.p="",e(e.s=1)}([function(n,e,t){"use strict";function a(n){if(Array.isArray(n)){for(var e=0,t=Array(n.length);e<n.length;e++)t[e]=n[e];return t}return Array.from(n)}Object.defineProperty(e,"__esModule",{value:!0});var r=t(8),i=function(n){return n&&n.__esModule?n:{default:n}}(r);e.default={name:"CalendarView",mixins:[i.default],props:{showDate:{type:Date,default:function(){}},displayPeriodUom:{type:String,default:function(){return"month"}},displayPeriodCount:{type:Number,default:function(){return 1}},locale:{type:String,default:function(){}},monthNameFormat:{type:String,default:function(){return"long"}},weekdayNameFormat:{type:String,default:function(){return"short"}},showEventTimes:{type:Boolean,default:function(){return!1}},timeFormatOptions:{type:Object,default:function(){return{}}},disablePast:{type:Boolean,default:function(){return!1}},disableFuture:{type:Boolean,default:function(){return!1}},enableDragDrop:{type:Boolean,default:function(){return!1}},startingDayOfWeek:{type:Number,default:function(){return 0}},events:{type:Array,default:function(){return[]}}},data:function(){return{currentDragEvent:null}},computed:{displayLocale:function(){return this.locale||this.getDefaultBrowserLocale()},periodStart:function(){return this.beginningOfPeriod(this.showDate||this.today(),this.displayPeriodUom,this.startingDayOfWeek)},periodEnd:function(){return this.addDays(this.incrementPeriod(this.periodStart,this.displayPeriodUom,this.displayPeriodCount),-1)},displayFirstDate:function(){return this.beginningOfWeek(this.periodStart,this.startingDayOfWeek)},displayLastDate:function(){return this.endOfWeek(this.periodEnd,this.startingDayOfWeek)},weeksOfPeriod:function(){var n=this,e=Math.floor((this.dayDiff(this.displayFirstDate,this.displayLastDate)+1)/7);return Array(e).fill().map(function(e,t){return n.addDays(n.displayFirstDate,7*t)})},monthNames:function(){return this.getFormattedMonthNames(this.displayLocale,this.monthNameFormat)},weekdayNames:function(){return this.getFormattedWeekdayNames(this.displayLocale,this.weekdayNameFormat,this.startingDayOfWeek)},fixedEvents:function(){var n=this;return this.events.map(function(e){var t=[];return e.classes&&(t=Array.isArray(e.classes)?[].concat(a(e.classes)):[e.classes]),{originalEvent:e,startDate:n.toLocalDate(e.startDate),endDate:n.toLocalDate(e.endDate||e.startDate),classes:t,title:e.title||"Untitled",id:e.id||"e"+Math.random().toString(36).substr(2,10)}})}},methods:{onClickDay:function(n){this.disablePast&&this.isInPast(n)||this.$emit("clickDay",n)},onClickEvent:function(n,e){this.$emit("clickEvent",n.originalEvent,e)},onClickCurrentPeriod:function(){this.$emit("setShowDate",this.beginningOfPeriod(this.today(),this.displayPeriodUom,this.startingDayOfWeek))},getIncrementedPeriod:function(n){var e=this.incrementPeriod(this.periodStart,this.displayPeriodUom,n),t=this.incrementPeriod(e,this.displayPeriodUom,this.displayPeriodCount);return this.disablePast&&t<=this.today()?null:this.disableFuture&&e>this.today()?null:e},isPeriodIncrementAllowed:function(n){return null!==this.getIncrementedPeriod(n)},onIncrementPeriod:function(n){var e=this.getIncrementedPeriod(n);null!=e&&this.$emit("setShowDate",e)},onDragStart:function(n){return!!this.enableDragDrop&&(this.currentDragEvent=n,this.$emit("dragEventStart",n.originalEvent,n),!0)},handleEvent:function(n,e){return!!this.enableDragDrop&&(!!this.currentDragEvent&&(this.$emit(n,this.currentDragEvent.originalEvent,e),!0))},onDragOver:function(n){this.handleEvent("dragEventOverDate",n)},onDragEnter:function(n,e){this.handleEvent("dragEventEnterDate",n)&&e.target.classList.add("draghover")},onDragLeave:function(n,e){this.handleEvent("dragEventLeaveDate",n)&&e.target.classList.remove("draghover")},onDrop:function(n,e){this.handleEvent("dropEventOnDate",n)&&e.target.classList.remove("draghover")},findAndSortEventsInWeek:function(n){var e=this;return this.fixedEvents.filter(function(t){return t.startDate<e.addDays(n,7)&&t.endDate>=n},this).sort(function(n,e){return n.startDate<e.startDate?-1:e.startDate<n.startDate?1:n.endDate>e.endDate?-1:e.endDate>n.endDate?1:n.id<e.id?-1:1})},getWeekEvents:function(n){for(var e=this.findAndSortEventsInWeek(n),t=[],r=[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],i=0;i<e.length;i++){var o=Object.assign({},e[i],{classes:[].concat(a(e[i].classes)),eventRow:0}),s=o.startDate<n,l=s?0:this.dayDiff(n,o.startDate),d=Math.min(7-l,this.dayDiff(this.addDays(n,l),o.endDate)+1);s&&o.classes.push("continued"),this.dayDiff(n,o.endDate)>6&&o.classes.push("toBeContinued"),o.originalEvent.url&&o.classes.push("hasUrl");for(var c=0;c<7;c++)if(c===l){for(var u=0;u<20;u++)if(!r[c][u]){o.eventRow=u,r[c][u]=!0;break}}else c<l+d&&(r[c][o.eventRow]=!0);o.classes.push("offset"+l),o.classes.push("span"+d),o.classes.push("eventRow"+(o.eventRow+1)),t.push(o)}return t},getFormattedTimeRange:function(n){var e=this.formattedTime(n.startDate,this.displayLocale,this.timeFormatOptions),t=this.isSameDateTime(n.startDate,n.endDate)?"":this.formattedTime(n.endDate,this.displayLocale,this.timeFormatOptions),a=""!==e,r=""!==t;return(a?'<span class="startTime'+(r?" hasEndTime":"")+'">'+e+"</span>":"")+(r?'<span class="endTime'+(a?" hasStartTime":"")+'">'+t+"</span>":"")},getEventTitle:function(n){return this.showEventTimes?this.getFormattedTimeRange(n)+n.title:n.title}}}},function(n,e,t){"use strict";function a(n){l||t(2)}Object.defineProperty(e,"__esModule",{value:!0});var r=t(0),i=t.n(r);for(var o in r)"default"!==o&&function(n){t.d(e,n,function(){return r[n]})}(o);var s=t(9),l=!1,d=t(7),c=a,u=d(i.a,s.a,!1,c,null,null);u.options.__file="src/CalendarView.vue",e.default=u.exports},function(n,e,t){var a=t(3);"string"==typeof a&&(a=[[n.i,a,""]]),a.locals&&(n.exports=a.locals);t(5)("02c012a0",a,!1)},function(n,e,t){e=n.exports=t(4)(void 0),e.push([n.i,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Position/Flex */\n\n/* Make the calendar flex vertically */\n.calendar-view {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-direction: column;\n\t flex-direction: column;\n}\n.calendar-view .header {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 0;\n\t -ms-flex: 0 1 auto;\n\t flex: 0 1 auto;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\t-webkit-box-align: center;\n\t -ms-flex-align: center;\n\t align-items: center;\n\tmin-height: 2.5em;\n}\n.calendar-view .header .periodLabel {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 auto;\n\t flex: 1 1 auto;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\tmin-height: 1.2em;\n}\n.calendar-view .dayList {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 0;\n\t -ms-flex: 0 0 auto;\n\t flex: 0 0 auto;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n}\n.calendar-view .dayList .day {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\t-webkit-box-align: center;\n\t -ms-flex-align: center;\n\t align-items: center;\n\t-webkit-box-pack: center;\n\t -ms-flex-pack: center;\n\t justify-content: center;\n}\n\n/* The calendar grid should take up the remaining vertical space */\n.calendar-view .weeks {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 auto;\n\t flex: 1 1 auto;\n\t-webkit-box-orient: vertical;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: column nowrap;\n\t flex-flow: column nowrap;\n\t/* Allow grid to scroll if there are too may weeks to fit in the view */\n\toverflow-y: scroll;\n\t-ms-overflow-style: none;\n}\n\n/* Use flex basis of 0 on week row so all weeks will be same height regardless of content */\n.calendar-view .week {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\t-webkit-box-orient: horizontal;\n\t-webkit-box-direction: normal;\n\t -ms-flex-flow: row nowrap;\n\t flex-flow: row nowrap;\n\tmin-height: 3em;\n\t/* Allow week events to scroll if they are too tall */\n\tposition: relative;\n\twidth: 100%;\n\toverflow-y: scroll;\n\t-ms-overflow-style: none;\n}\n.calendar-view .weeks::-webkit-scrollbar,\n.calendar-view .week::-webkit-scrollbar {\n\twidth: 0px; /* remove scrollbar space */\n\tbackground: transparent; /* optional: just make scrollbar invisible */\n}\n.calendar-view .week .day {\n\tdisplay: -webkit-box;\n\tdisplay: -ms-flexbox;\n\tdisplay: flex;\n\t-webkit-box-flex: 1;\n\t -ms-flex: 1 1 0px;\n\t flex: 1 1 0;\n\t/* When week\'s events are scrolled, keep the day content fixed */\n\tposition: -webkit-sticky;\n\tposition: sticky;\n\ttop: 0;\n}\n.calendar-view .week .day .content {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbottom: 0;\n\tright: 0;\n}\n.calendar-view .week .day .date {\n\tfloat: right;\n\tclear: both;\n}\n.calendar-view .week .event {\n\tposition: absolute;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n/* Header */\n.calendar-view .periodLabel .startDay::before,\n.calendar-view .periodLabel .endDay::before,\n.calendar-view.period-month .periodLabel .startYear::before,\n.calendar-view.period-month .periodLabel .endYear::before,\n.calendar-view.period-year .periodLabel .endYear::before {\n\tcontent: "\\A0";\n}\n.calendar-view .periodLabel .endMonth::before,\n.calendar-view.period-year:not(.periodCount-1) .periodLabel .endYear::before,\n.calendar-view.period-week .periodLabel.singleMonth .endDay::before {\n\tcontent: "\\A0\\2013\\A0";\n}\n.calendar-view.period-week .periodLabel .startYear::before,\n.calendar-view.period-week .periodLabel .endYear::before {\n\tcontent: ",\\A0";\n}\n.calendar-view .periodLabel.singleYear .startYear,\n.calendar-view .periodLabel.singleMonth .endMonth,\n.calendar-view.period-month .periodLabel .startDay,\n.calendar-view.period-month .periodLabel .endDay,\n.calendar-view.period-year .periodLabel .startDay,\n.calendar-view.period-year .periodLabel .endDay,\n.calendar-view.period-year .periodLabel .startMonth,\n.calendar-view.period-year .periodLabel .endMonth,\n.calendar-view.period-month.periodCount-1 .periodLabel .endMonth,\n.calendar-view.period-month.periodCount-1 .periodLabel .startYear,\n.calendar-view.period-year.periodCount-1 .periodLabel .startYear {\n\tdisplay: none;\n}\n\n/* Header navigation buttons */\n.calendar-view .header .nav .previousPeriod::after {\n\tcontent: "<";\n}\n.calendar-view .header .nav .nextPeriod::after {\n\tcontent: ">";\n}\n.calendar-view .header .nav .previousYear::after {\n\tcontent: "<<";\n}\n.calendar-view .header .nav .nextYear::after {\n\tcontent: ">>";\n}\n.calendar-view .header .nav .currentPeriod {\n\tdisplay: none;\n}\n.calendar-view.past .header .nav .currentPeriod,\n.calendar-view.future .header .nav .currentPeriod {\n\tdisplay: inline-block;\n}\n.calendar-view.past .header .nav .currentPeriod::after {\n\tcontent: "\\21BB";\n}\n.calendar-view.future .header .nav .currentPeriod::after {\n\tcontent: "\\21BA";\n}\n\n/* Colors */\n.calendar-view .period .day,\n.calendar-view .header button {\n\tbackground-color: #fff;\n}\n.calendar-view .header,\n.calendar-view .dayList .day {\n\tbackground-color: #f0f0f0;\n}\n.calendar-view .event {\n\tbackground-color: #f7f7f7;\n}\n.calendar-view .header,\n.calendar-view .header button,\n.calendar-view .dayList,\n.calendar-view .weeks,\n.calendar-view .week,\n.calendar-view .day,\n.calendar-view .event {\n\tborder-color: #ddd;\n}\n\n/* Event Times */\n.calendar-view .event .startTime,\n.calendar-view .event .endTime {\n\tfont-weight: bold;\n\tcolor: #666;\n}\n.calendar-view .event .startTime:not(.hasEndTime),\n.calendar-view .event .endTime {\n\tmargin-right: 0.4em;\n}\n.calendar-view .event .endTime::before {\n\tcontent: "-";\n}\n\n/* Internal Metrics */\n.calendar-view,\n.calendar-view div,\n.calendar-view button {\n\t-webkit-box-sizing: border-box;\n\t box-sizing: border-box;\n\tline-height: 1em;\n\tfont-size: 1em;\n}\n.calendar-view .dayList div,\n.calendar-view .date,\n.calendar-view .event {\n\tpadding: 0.2em;\n}\n.calendar-view .header .nav,\n.calendar-view .header .periodLabel {\n\tmargin: 0.4em 0.6em;\n}\n.calendar-view .header .nav button,\n.calendar-view .header .periodLabel {\n\tpadding: 0.4em 0.6em;\n}\n\n/* Allows emoji icons or labels (such as holidays) to be added more easily to specific dates by having the margin set already. */\n.calendar-view .day .date::before {\n\tmargin-right: 0.5em;\n}\n\n/* Borders */\n.calendar-view .weeks {\n\tborder-style: solid;\n\tborder-width: 0 0 1px 1px;\n}\n.calendar-view .header {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0.05em;\n}\n.calendar-view .dayList {\n\tborder-style: solid;\n\tborder-width: 0 0 0 1px;\n}\n.calendar-view .day {\n\tborder-style: solid;\n\tborder-width: 0.05em 0.05em 0 0;\n}\n.calendar-view .header button,\n.calendar-view .event {\n\tborder-style: solid;\n\tborder-width: 0.05em;\n}\n\n/* Positioning for event eventRows */\n.calendar-view .event.eventRow1 {\n\ttop: 1.4em;\n}\n.calendar-view .event.eventRow2 {\n\ttop: calc(2 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow3 {\n\ttop: calc(3 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow4 {\n\ttop: calc(4 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow5 {\n\ttop: calc(5 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow6 {\n\ttop: calc(6 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow7 {\n\ttop: calc(7 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow8 {\n\ttop: calc(8 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow9 {\n\ttop: calc(9 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow10 {\n\ttop: calc(10 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow11 {\n\ttop: calc(11 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow12 {\n\ttop: calc(12 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow13 {\n\ttop: calc(13 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow14 {\n\ttop: calc(14 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow15 {\n\ttop: calc(15 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow16 {\n\ttop: calc(16 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow17 {\n\ttop: calc(17 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow18 {\n\ttop: calc(18 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow19 {\n\ttop: calc(19 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow20 {\n\ttop: calc(20 * 1.4em + 0.1em);\n}\n.calendar-view .event.eventRow0 {\n\tdisplay: none;\n} /* More than 10 eventRows not currently supported */\n.calendar-view .event.offset0 {\n\tleft: calc(0.05em);\n}\n.calendar-view .event.offset1 {\n\tleft: calc((100% / 7) + 0.05em);\n}\n.calendar-view .event.offset2 {\n\tleft: calc((200% / 7) + 0.05em);\n}\n.calendar-view .event.offset3 {\n\tleft: calc((300% / 7) + 0.05em);\n}\n.calendar-view .event.offset4 {\n\tleft: calc((400% / 7) + 0.05em);\n}\n.calendar-view .event.offset5 {\n\tleft: calc((500% / 7) + 0.05em);\n}\n.calendar-view .event.offset6 {\n\tleft: calc((600% / 7) + 0.05em);\n}\n\n/* Metrics for events spanning dates */\n.calendar-view .event.span1 {\n\twidth: calc((100% / 7) - 0.05em);\n}\n.calendar-view .event.span2 {\n\twidth: calc((200% / 7) - 0.05em);\n}\n.calendar-view .event.span3 {\n\twidth: calc((300% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span4 {\n\twidth: calc((400% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span5 {\n\twidth: calc((500% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span6 {\n\twidth: calc((600% / 7) - 0.05em);\n\ttext-align: center;\n}\n.calendar-view .event.span7 {\n\twidth: calc((700% / 7) - 0.05em);\n\ttext-align: center;\n}\n\n/* Misc */\n.calendar-view .dayList .day {\n\ttext-align: center;\n}\n.calendar-view .event.hasUrl:hover {\n\ttext-decoration: underline;\n}\n.calendar-view .event.continued {\n\tborder-left-style: none;\n\tborder-top-left-radius: 0;\n\tborder-bottom-left-radius: 0;\n}\n',""])},function(n,e){function t(n,e){var t=n[1]||"",r=n[3];if(!r)return t;if(e&&"function"==typeof btoa){var i=a(r);return[t].concat(r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"})).concat([i]).join("\n")}return[t].join("\n")}function a(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var e=[];return e.toString=function(){return this.map(function(e){var a=t(e,n);return e[2]?"@media "+e[2]+"{"+a+"}":a}).join("")},e.i=function(n,t){"string"==typeof n&&(n=[[null,n,""]]);for(var a={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(a[i]=!0)}for(r=0;r<n.length;r++){var o=n[r];"number"==typeof o[0]&&a[o[0]]||(t&&!o[2]?o[2]=t:t&&(o[2]="("+o[2]+") and ("+t+")"),e.push(o))}},e}},function(n,e,t){function a(n){for(var e=0;e<n.length;e++){var t=n[e],a=c[t.id];if(a){a.refs++;for(var r=0;r<a.parts.length;r++)a.parts[r](t.parts[r]);for(;r<t.parts.length;r++)a.parts.push(i(t.parts[r]));a.parts.length>t.parts.length&&(a.parts.length=t.parts.length)}else{for(var o=[],r=0;r<t.parts.length;r++)o.push(i(t.parts[r]));c[t.id]={id:t.id,refs:1,parts:o}}}}function r(){var n=document.createElement("style");return n.type="text/css",u.appendChild(n),n}function i(n){var e,t,a=document.querySelector('style[data-vue-ssr-id~="'+n.id+'"]');if(a){if(p)return h;a.parentNode.removeChild(a)}if(w){var i=v++;a=f||(f=r()),e=o.bind(null,a,i,!1),t=o.bind(null,a,i,!0)}else a=r(),e=s.bind(null,a),t=function(){a.parentNode.removeChild(a)};return e(n),function(a){if(a){if(a.css===n.css&&a.media===n.media&&a.sourceMap===n.sourceMap)return;e(n=a)}else t()}}function o(n,e,t,a){var r=t?"":a.css;if(n.styleSheet)n.styleSheet.cssText=m(e,r);else{var i=document.createTextNode(r),o=n.childNodes;o[e]&&n.removeChild(o[e]),o.length?n.insertBefore(i,o[e]):n.appendChild(i)}}function s(n,e){var t=e.css,a=e.media,r=e.sourceMap;if(a&&n.setAttribute("media",a),r&&(t+="\n/*# sourceURL="+r.sources[0]+" */",t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),n.styleSheet)n.styleSheet.cssText=t;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(t))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var d=t(6),c={},u=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,v=0,p=!1,h=function(){},w="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());n.exports=function(n,e,t){p=t;var r=d(n,e);return a(r),function(e){for(var t=[],i=0;i<r.length;i++){var o=r[i],s=c[o.id];s.refs--,t.push(s)}e?(r=d(n,e),a(r)):r=[];for(var i=0;i<t.length;i++){var s=t[i];if(0===s.refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete c[s.id]}}}};var m=function(){var n=[];return function(e,t){return n[e]=t,n.filter(Boolean).join("\n")}}()},function(n,e){n.exports=function(n,e){for(var t=[],a={},r=0;r<e.length;r++){var i=e[r],o=i[0],s=i[1],l=i[2],d=i[3],c={id:n+":"+r,css:s,media:l,sourceMap:d};a[o]?a[o].parts.push(c):t.push(a[o]={id:o,parts:[c]})}return t}},function(n,e){n.exports=function(n,e,t,a,r,i){var o,s=n=n||{},l=typeof n.default;"object"!==l&&"function"!==l||(o=n,s=n.default);var d="function"==typeof s?s.options:s;e&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),t&&(d.functional=!0),r&&(d._scopeId=r);var c;if(i?(c=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,n||"undefined"==typeof __VUE_SSR_CONTEXT__||(n=__VUE_SSR_CONTEXT__),a&&a.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(i)},d._ssrRegister=c):a&&(c=a),c){var u=d.functional,f=u?d.render:d.beforeCreate;u?(d._injectStyles=c,d.render=function(n,e){return c.call(e),f(n,e)}):d.beforeCreate=f?[].concat(f,c):[c]}return{esModule:o,exports:s,options:d}}},function(n,e,t){"use strict";function a(n){if(Array.isArray(n)){for(var e=0,t=Array(n.length);e<n.length;e++)t[e]=n[e];return t}return Array.from(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{today:function(){return this.dateOnly(new Date)},beginningOfPeriod:function(n,e,t){switch(e){case"year":return new Date(n.getFullYear(),0);case"month":return new Date(n.getFullYear(),n.getMonth());case"week":return this.beginningOfWeek(n,t);default:return null}},daysOfWeek:function(n){var e=this;return Array(7).fill().map(function(t,a){return e.addDays(n,a)})},addDays:function(n,e){return new Date(n.getFullYear(),n.getMonth(),n.getDate()+e,n.getHours(),n.getMinutes(),n.getSeconds())},beginningOfWeek:function(n,e){return this.addDays(n,(e-n.getDay()-7)%-7)},endOfWeek:function(n,e){return this.addDays(this.beginningOfWeek(n,e),7)},beginningOfMonth:function(n){return new Date(n.getFullYear(),n.getMonth())},instanceOfMonth:function(n){return Math.ceil(n.getDate()/7)},incrementPeriod:function(n,e,t){return new Date(n.getFullYear()+("year"==e?t:0),n.getMonth()+("month"==e?t:0),n.getDate()+("week"==e?7*t:0))},paddedMonth:function(n){return("0"+String(n.getMonth()+1)).slice(-2)},paddedDay:function(n){return("0"+String(n.getDate())).slice(-2)},isoYearMonth:function(n){return n.getFullYear()+"-"+this.paddedMonth(n)},isoYearMonthDay:function(n){return this.isoYearMonth(n)+"-"+this.paddedDay(n)},isoMonthDay:function(n){return this.paddedMonth(n)+"-"+this.paddedDay(n)},formattedTime:function(n,e,t){if(0===n.getHours()&&0===n.getMinutes()&&0===n.getSeconds())return"";if(!this.supportsIntl()){var a=6e4*(new Date).getTimezoneOffset();return new Date(n-a).toISOString().slice(11,16)}return n.toLocaleTimeString(e,t)},dayDiff:function(n,e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(n.getFullYear(),n.getMonth(),n.getDate());return t.setUTCHours(0,0,0,0),a.setUTCHours(0,0,0,0),(t-a)/864e5},isSameDate:function(n,e){return 0===this.dayDiff(n,e)},isSameDateTime:function(n,e){return n.getTime()===e.getTime()},isSameMonth:function(n,e){return n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()},isPastMonth:function(n){return this.beginningOfMonth(n)<this.beginningOfMonth(this.today())},isFutureMonth:function(n){return this.beginningOfMonth(n)>this.beginningOfMonth(this.today())},isInFuture:function(n){return this.dateOnly(n)>this.today()},isInPast:function(n){return this.dateOnly(n)<this.today()},isLastInstanceOfMonth:function(n){return n.getMonth()!==this.addDays(n,7).getMonth()},isLastDayOfMonth:function(n){return n.getMonth()!==this.addDays(n,1).getMonth()},fromIsoStringToLocalDate:function(n){var e=n.split(/\D/).map(function(n){return Number(n)});return e[1]--,new(Function.prototype.bind.apply(Date,[null].concat(a(e))))},toLocalDate:function(n){return"string"==typeof n?this.fromIsoStringToLocalDate(n):new Date(n)},dateOnly:function(n){var e=new Date(n);return e.setHours(0,0,0,0),e},languageCode:function(n){return n.substring(0,2)},supportsIntl:function(){return"undefined"!=typeof Intl},getFormattedMonthNames:function(n,e){if(!this.supportsIntl())return Array(12).fill("");var t=new Intl.DateTimeFormat(n,{month:e});return Array(12).fill().map(function(n,e){return t.format(new Date(2017,e,1))})},getFormattedWeekdayNames:function(n,e,t){if(!this.supportsIntl())return Array(7).fill("");var a=new Intl.DateTimeFormat(n,{weekday:e});return Array(7).fill().map(function(n,e){return a.format(new Date(2017,0,(e+1+t)%7))})},getDefaultBrowserLocale:function(){return"undefined"==typeof navigator?"unk":(navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.browserLanguage).toLowerCase()}}}},function(n,e,t){"use strict";var a=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"calendar-view",class:["locale-"+n.languageCode(n.displayLocale),"locale-"+n.displayLocale,"y"+n.periodStart.getFullYear(),"m"+n.paddedMonth(n.periodStart),"period-"+n.displayPeriodUom,"periodCount-"+n.displayPeriodCount,{past:n.isPastMonth(n.periodStart),future:n.isFutureMonth(n.periodStart),noIntl:!n.supportsIntl}]},[n._t("header",[t("div",{staticClass:"header"},[t("div",{staticClass:"nav"},[t("button",{staticClass:"previousYear",attrs:{disabled:!n.isPeriodIncrementAllowed(-12)},on:{click:function(e){n.onIncrementPeriod(-12)}}}),n._v(" "),t("button",{staticClass:"previousPeriod",attrs:{disabled:!n.isPeriodIncrementAllowed(-n.displayPeriodCount)},on:{click:function(e){n.onIncrementPeriod(-n.displayPeriodCount)}}}),n._v(" "),t("button",{staticClass:"nextPeriod",attrs:{disabled:!n.isPeriodIncrementAllowed(n.displayPeriodCount)},on:{click:function(e){n.onIncrementPeriod(n.displayPeriodCount)}}}),n._v(" "),t("button",{staticClass:"nextYear",attrs:{disabled:!n.isPeriodIncrementAllowed(12)},on:{click:function(e){n.onIncrementPeriod(12)}}}),n._v(" "),t("button",{staticClass:"currentPeriod",on:{click:n.onClickCurrentPeriod}})]),n._v(" "),t("div",{staticClass:"periodLabel",class:{singleYear:n.periodStart.getFullYear()===n.periodEnd.getFullYear(),singleMonth:n.isSameMonth(n.periodStart,n.periodEnd)}},[t("div",{staticClass:"startMonth"},[n._v(n._s(n.monthNames[n.periodStart.getMonth()]))]),n._v(" "),t("div",{staticClass:"startDay"},[n._v(n._s(n.periodStart.getDate()))]),n._v(" "),t("div",{staticClass:"startYear"},[n._v(n._s(n.periodStart.getFullYear()))]),n._v(" "),t("div",{staticClass:"endMonth"},[n._v(n._s(n.monthNames[n.periodEnd.getMonth()]))]),n._v(" "),t("div",{staticClass:"endDay"},[n._v(n._s(n.periodEnd.getDate()))]),n._v(" "),t("div",{staticClass:"endYear"},[n._v(n._s(n.periodEnd.getFullYear()))])])])]),n._v(" "),t("div",{staticClass:"dayList"},[n._l(n.weekdayNames,function(e,a){return[n._t("dayHeader",[t("div",{key:a,staticClass:"day",class:"dow"+a},[n._v(n._s(e))])],{index:a,label:e})]})],2),n._v(" "),t("div",{staticClass:"weeks"},n._l(n.weeksOfPeriod,function(e,a){return t("div",{key:a,staticClass:"week",class:["week"+(a+1),"ws"+n.isoYearMonthDay(e)],style:"z-index:"+2*(a+1)},[n._l(n.daysOfWeek(e),function(e,a){return t("div",{key:a,staticClass:"day",class:["dow"+e.getDay(),"d"+n.isoYearMonthDay(e),"d"+n.isoMonthDay(e),"d"+n.paddedDay(e),"instance"+n.instanceOfMonth(e),{outsideOfMonth:!n.isSameMonth(e,n.today()),today:n.isSameDate(e,n.today()),past:n.isInPast(e),future:n.isInFuture(e),last:n.isLastDayOfMonth(e),lastInstance:n.isLastInstanceOfMonth(e)}],on:{click:function(t){n.onClickDay(e)},drop:function(t){t.preventDefault(),n.onDrop(e,t)},dragover:function(t){t.preventDefault(),n.onDragOver(e)},dragenter:function(t){t.preventDefault(),n.onDragEnter(e,t)},dragleave:function(t){t.preventDefault(),n.onDragLeave(e,t)}}},[t("div",{staticClass:"content"},[n._t("dayContent",[t("div",{staticClass:"date"},[n._v(n._s(e.getDate()))])],{day:e})],2)])}),n._v(" "),n._l(n.getWeekEvents(e),function(r){return[n._t("event",[t("div",{key:r.id,staticClass:"event",class:r.classes,style:"z-index:"+(2*(a+1)+1),attrs:{draggable:n.enableDragDrop,title:r.title},domProps:{innerHTML:n._s(n.getEventTitle(r))},on:{dragstart:function(e){n.onDragStart(r)},click:function(e){e.stopPropagation(),n.onClickEvent(r)}}})],{event:r.originalEvent,weekStartDate:e})]})],2)}))],2)},r=[];a._withStripped=!0;var i={render:a,staticRenderFns:r};e.a=i}])});
{
"name": "vue-simple-calendar",
"version": "1.8.2",
"version": "2.0.0",
"description": "Simple calendar event control",

@@ -31,3 +31,3 @@ "author": "richardtallent <richard@tallent.us>",

"eslint-plugin-import": "^2.8.0",
"eslint-plugin-vue": "^4.0.0-beta.0",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.2",

@@ -43,3 +43,3 @@ "file-loader": "^1.1.6",

"vue": "^2.5.13",
"vue-loader": "^13.6.1",
"vue-loader": "^13.6.2",
"vue-style-loader": "^3.0.3",

@@ -46,0 +46,0 @@ "vue-template-compiler": "^2.5.13",

@@ -7,3 +7,3 @@ # vue-simple-calendar

My use case is far simpler--I just wanted a traditional month-grid calendar, with events listed (including multi-day events), that would raise events when the calendar month is changed or the user clicks/taps a date or event.
My use case is far simpler--I just wanted a traditional month-grid calendar, with events listed (including multi-day events), that would raise events when the calendar month is changed or the user clicks/taps a date or event. (This has evolved, and now the component supports week, year, multi-week, multi-month, and multi-year grids.)

@@ -14,11 +14,47 @@ PRs, ideas, and issues are welcome.

A demo page is included, with hot reload, etc. Here's a live demo:
Here's a live demo page:
https://www.tallent.us/vue-simple-calendar/
The repository for the demo page is here, you can pull and run it on your own to learn the ropes and test ideas:
https://github.com/richardtallent/vue-simple-calendar-sample
## Version 2.0 New Features and Breaking Changes
Version 2.0 includes some major upgrades! Here are the new features:
- Dates passed as strings are interpreted using *browser local* time, not UTC, which prevents the event from showing up on an unexpected date.
- Optional display of start and/or end times of events, with options for formatting
- Ability to view more than one month at a time
- Week view (including multi-week)
- Year view (including, but not necessarily sanely, multi-year support)
- New named slot for `event`
- All slots now pass back useful properties the caller can bring into their scope
- The main grid is scrollable if it is too tall for the component
- Each week is scrollable if its events are too tall for the week's row in the component
This means there are some breaking changes:
- The component is now called **calendar-view** rather than **calendar-month**, to better reflect the flexibility of the period shown. (The package is still `vue-simple-calendar`.)
- Because of the above, the CSS class of the root element has also changed to **calendar-view**.
- The CSS class of the element containing the body of the view has changed from **month** to **weeks**, since periods other than a single month can be shown.
- If you pass dates as strings, they MUST be in ISO form ("yyyy-mm-dd hh:mm:ss"). The time portion is optional, and within time, the minutes and seconds are also optional.
- The header has been refactored to take better advantage of flexbox, increase the header text size, and group the buttons. This should make it easier to customize, but if you have a custom theme, it may need some updates.
- If the calendar is too short to view the entire period, the calendar body is scrollable (scroll bars are hidden, use touch or scroll wheel).
- If an individual week is too short to view all events in the week, the week's events are scrollable (scroll bars are hidden, use touch or scroll wheel).
- The minimum cell height is now 3em, to ensure that at least one event shows vertically, and if there are others to scroll to, a small part of the next one is visible.
- Emitted drag and drop events pass the original calendar event, not just its id.
- The `dragEventDragOverDate` event (undocumented) has been renmaed as `dragEventOverDate`.
- The `dayList` slot has been replaced with `dayHeader`, and slot `day` has been renamed as `dayContent`.
- The word `slot` in the sense of an event display row has been renamed as `eventRow` in the code and CSS to avoid confusion with Vue slots.
- Up to 20 events per day are now supported (up from 10).
- Some basic colors, borders, etc. have been moved from the default theme into the component's core CSS, allowing the component to have a more appealing look with no theme in place and a better starting point for custom themes.
- Reversed the circle-arrow labels to return to the current period. These are now clockwise to "go forward" to return to the current period, counter-clockwise to "go back" to return to the current period.
## Features
* Shows a traditional month-grid calendar.
* Can show "events," including multi-day events.
* Optional event drag/drop support.
* Shows a traditional month-grid calendar--or week, or year, or multiples of those.
* Can show "events," including multi-day events, with optional times.
* If there are too many events to see in a week, you can scroll to see the others.
* If there are too many weeks to see in the calendar component, you can scroll to see the others.
* Optional support for dragging and dropping events between dates.
* Localized automatically (overridable).

@@ -28,5 +64,5 @@ * Lightweight!

* No external dependencies (Moment, JQuery, etc.).
* Emphasizes customization via plain ol' CSS.
* User events (clicks, drags, etc.) are exposed as Vue events.
* Can start on any day of the week (defaults to Sunday)
* Emphasizes customization via CSS or scoped/named slots.
* User events (clicks, drags, etc.) are emitted to the parent component.
* Weeks can start on any day of the week (defaults to Sunday).

@@ -47,3 +83,3 @@ ## Installation and Usage

* import the default theme and any additional themes you want to apply
* create the `calendar-month` custom element
* create the `calendar-view` custom element
* wire up the element's properties and events

@@ -54,3 +90,3 @@

* The component will fill its parent's height and width, so be sure the parent has a minimum height that looks good.
* This is a pure component, it doesn't change its own state, so clicking the previous/next month or year buttons doesn't do anything unless you provide a `show-date` attribute and update that attribute when the component fires the `setShowDate` event.
* This is a pure component, it doesn't change its own state, so clicking the previous/next buttons don't do anything unless you provide a `show-date` attribute and update that attribute when the component fires the `setShowDate` event.

@@ -63,3 +99,3 @@ Here's a minimal application example for a calendar with no events, but styled with the default theme and the US holidays theme:

<h1>My Calendar</h1>
<calendar-month
<calendar-view
:show-date="showDate"

@@ -72,3 +108,3 @@ @setShowDate="setShowDate"

<script>
import CalendarMonth from "vue-simple-calendar"
import CalendarView from "vue-simple-calendar"
require("vue-simple-calendar/dist/static/css/default.css")

@@ -83,3 +119,3 @@ require("vue-simple-calendar/dist/static/css/holidays-us.css")

components: {
CalendarMonth
CalendarView
},

@@ -107,10 +143,10 @@ methods: {

The following properties are supported. Remember to use _kebab-case_ when specifying these properties using attributes on the `calendar-month` element (_e.g._, `<calendar-month month-name-format="long">`:
The following properties are supported. Remember to use _kebab-case_ when specifying these properties using attributes on the `calendar-view` element (_e.g._, `<calendar-view month-name-format="long">`:
* `events` - An array of events to show on the calendar. See _Calendar Event Properties_ below for more details.
* `disablePast` - If true, prevents the user from navigating to previous months. Default is `false`. (Note: since this is a Boolean value, you should use `v-bind` on the attribute.)
* `disableFuture` - If true, prevents the user from navigating to future months. Default is `false`. (Note: since this is a Boolean value, you should use `v-bind` on the attribute.)
* `disablePast` - If true, prevents the user from navigating to previous periods. Default is `false`. (Note: since this is a Boolean value, you should use `v-bind` on the attribute.)
* `disableFuture` - If true, prevents the user from navigating to future periods. Default is `false`. (Note: since this is a Boolean value, you should use `v-bind` on the attribute.)
* `enableDragDrop` - If true, events are draggable, and dragging and dropping them emits events you can catch and respond to. Default is `false`. (Note: since this is a Boolean value, you should use `v-bind` on the attribute.)
* `locale` - The BCP 47 language tag used to determine the month and day names. Defaults to the user's browser language setting.
* `showDate` - The month to show by default. The day of month is ignored. Defaults to the current month (user local time).
* `showDate` - The period to show by default. Defaults to today's date (user local time).
* `startingDayOfWeek` - The day of the week that starts each week. Defaults to `0` (Sunday), valid range is 0-6. Common non-default values would be

@@ -121,2 +157,9 @@ `1` (Monday) for Europe or `6` (Saturday) for much of the Middle East.

**New in 2.0**
* `showEventTimes` - If true, shows the start and/or end time of an event beside the event title. Midnight is not shown, a midnight time is assumed to indicate an all-day or indeterminate time. (If you want to show midnight, use `00:00:01` and don't choose to show seconds.) The default is `false`.
* `timeFormatOptions` - This takes an object containing `Intl.DateTimeFormat` options to be used to format the event times. The `locale` setting is automatically used. This option is ignored for browsers that don't support `Intl` (they will see the 24-hour, zero-padded time).
* `displayPeriodUom` - The period type to show. By default this is `month`, *i.e.*, it shows a calendar in month-sized chunks. Other allowed values are `year` and `week`.
* `displayPeriodCount` - The *number* of periods to show within the view. For example, if `displayPeriodUom` is `week` and `displayPeriodCount` is 2, the view will show a two-week period.
## Calendar Event Properties

@@ -126,4 +169,4 @@

* `startDate` - The date the event starts on the calendar. Time of day is currently ignored.
* `endDate` - The date the event ends on the calendar. Time of day is currently ignored. Defaults to the same date as `startDate`.
* `startDate` - The date the event starts on the calendar. This must be either passed as a JavaScript date object, or as a string following an ISO-like form of "yyyy-mm-dd HH:MM:SS" (time is optional, and within time, minutes and seconds are both optional).
* `endDate` - The date the event ends on the calendar. Defaults to the same date as `startDate`. This must be either passed as a JavaScript date object, or as a string following an ISO-like form of "yyyy-mm-dd HH:MM:SS" (time is optional, and within time, minutes and seconds are both optional).
* `title` - The name of the event shown on the calendar. Defaults to "Untitled".

@@ -140,7 +183,12 @@ * `id` - A unique identifier for the event. Defaults to a randomly-generated string.

* `clickEvent(event)`: fired when user clicks on an event
* `setShowDate(date)`: fired when user goes to a different month. The date passed is the first of the month in view (days before and after the month may also be visible).
* `dragEventEnterDate(event)`: fires when an event is dragged over a date
* `dragEventLeaveDate(event)`: fires when an event is dragged out of a date without dropping it there
* `setShowDate(date)`: fired when user goes to a different period. The date passed is the first of the period in view (days before and after the period may also be visible).
* `dragEventEnterDate(event, date)`: fires when an event is dragged over a date
* `dragEventLeaveDate(event, date)`: fires when an event is dragged out of a date without dropping it there
* `dragEventOverDate(event, date)`: fires multiple times as an event is hovered over a date
* `dropEventOnDate(event, date)`: fired when an event is dropped on a date
*Note in the above, `event` refers to the calendar "event" involved in the activity, not the DOM "event". The word "event" here is a bit overloaded.*
**Breaking change in 2.0**: Prior to 2.0, `dragEventOverDate` was undocumented and called `dragEventDragOverDate`, and all dragging-related user events emitted the calendar event's *id* as the first argument rather than the calendar event itself. Since not all calendar events will have an ID and the parent will probably want access to the actual calendar event, I changed these Vue events to emit the original calendar event, not just its id.
## Slots

@@ -150,42 +198,69 @@

This optional named slot **replaces** the default `div.header` (which contains the navigation buttons and calendar's current period). For example, this would effectively result in an empty span in place of the header (you could also just use `.calendar-month .header {display: none}` in your CSS to hide the default header):
This optional named slot **replaces** the default `div.header` (which contains the navigation buttons and calendar's current period). For example, this would effectively result in an empty span in place of the header (you could also just use `.calendar-view .header {display: none}` in your CSS to hide the default header):
```HTML
<calendar-month>
<calendar-view>
<span slot="header"/>
</calendar-month>
</calendar-view>
```
### dayList
**New to 2.0**
This optional named slot **replaces** the default `div.dayList`, which appears between the header and grid and shows the names of the days of the week. If all you need to do is change the names of the days, there are better ways to handle the localization than having to replicate the rendering of this slot.
### dayHeader
This optional named slot **replaces** the default `div.day` elements that appear in the column headers for each day of the week. If all you need to do is change how the names are shown, it's probably better to override the `locale` and/or `weekdayNameFormat` property. This slot is intended for situations where you need to override the markup within each header cell. For example, if you want each day of the week to be clickable.
This slot passes two scoped variables: `index`, 0-7, and `label`, the text it would have used in the header based on the current `locale` and `weekdayNameFormat`.
*In 1.8.2, a `dayList` slot was introduced. That slot was removed in 2.0 and replaced with this one.*
### dayContent
This optional named slot **replaces** the *contents* of the `div.content` within each day's cell. By default, this just contains a `div.date` containing the day of the month, but you can use this to override the cell and show anything you like. Events are drawn *on top* of the cells, no within them, so this content appears underneath the events if there are any on that day.
This slot passes one scoped variable: `day`, the date associated with the cell.
*In 1.8.2, this was introduced with the name `day`, and was renamed in 2.0 to be more precise.*
### event
This optional named slot **replaces** the `div.event` for each event (not just the contents of the event element, the entire element). Use this if you want to override entirely how events are rendered. For example, on a small mobile device, you may want to show just a thin stripe, dots, or icons to indicate events, without titles or times.
This slot passes two scoped variables: `event`, the calendar event, and `weekStartDate`, the date of the first day of the week being rendered. Note that `event` is a version of the calendar event **customized** to be shown on that week's row, it's not the bare event pulled from the `events` prop. This customized version parses and defaults the `startDate` and `endDate`, defaults missing `id` to a random number, defaults a blank title to "Untitled", and adds a number of `classes` values based on the position and role of the event as shown for that week (whether it continues from the previous week, etc.). The original event is passed back as `event.originalEvent`.
## Customizing the Look and Feel
In addition to slots, this component is designed to allow for significant customization of the look and feel solely through CSS. Here's the structure of the markup generated by the component. Each line represents a `div`. Indentation represents the markup hierarchy, and each word on the line represents a class assigned. Classes in (parenthesis) are conditional. Repetition is shown in [brackets].
In addition to slots, this component is designed to allow for significant customization of the look and feel solely through CSS. Here's the structure of the markup generated by the component. Each line represents a Vue SLOT (all caps) or an HTML element (first word on the line). Indentation represents the hierarchy. Each word *after* the first word is a class applied to the element. Classes in (parenthesis) are conditional. Loops (*i.e.*, `v-for`) are shown in [brackets].
Note that the events are _not_ child nodes of the days, they are children of the week and positioned above the days. This allows events to span multiple days without impacting the ability to change the background color of the days.
Note that the events are _not_ child nodes of the days, they are children of the week and positioned above the days. This allows events to span multiple days.
The only markup not listed here are the `button` elements that are rendered in the header's `previousYear`, `previousMonth`, `currentMonth`, `nextMonth`, and `nextYear` elements.
```
calendar-month locale-X yYYYY mMM (past|future)
header
previousYear
previousMonth
thisMonth
monthLabel
monthName
yearNumber
currentMonth
nextMonth
nextYear
dayList
day dowX [x7]
month
week weekX wsYYYY-MM-DD [x # weeks in month]
day dowX dYYYY-MM-DD dMM-DD dDD wmX (past|today|future|last|outsideOfMonth|lastInstance) [x 7]
content
date
event offsetX spanX slotX (continued|toBeContinued|hasUrl) [x # of events]
div calendar-view locale-X yYYYY mMM (past|future) period-X periodCount-X
HEADER
div header
div nav
button previousYear
button previousPeriod
button nextPeriod
button nextYear
button currentPeriod
div periodLabel
div startMonth
div startDay
div startYear
div endMonth
div endDay
div endYear
div dayList
div day dowX [x7]
div weeks
div week weekX wsYYYY-MM-DD [x # weeks in visible period]
div day dowX dYYYY-MM-DD dMM-DD dDD wmX (past|today|future|last|outsideOfMonth|lastInstance) [x 7]
DAY
div content
div date
EVENT
div event offsetX spanX eventRowX (continued|toBeContinued|hasUrl) [x # of events]
span startTime (hasEndTime)
span endTime (hasStartTime)
```

@@ -207,12 +282,20 @@

The full year of the current view.
The full year of the starting period of the current view.
#### m<i>MM</i>
The month (01-12) of the current view.
The month (01-12) of the starting period of the current view.
#### (future|past)
When the calendar shown is not the current month (local time), one of these classes is added. By default, this shows and hides and determines the label for the button that returns the view to the current month.
When the period shown does not include today's date (local time), one of these classes is added. By default, this shows and hides and determines the label for the button that returns the view to the current period.
#### period-X
The current `displayPeriodUom` value (`year`, `month`, or `week`).
#### periodCount-X
The current `displayPeriodCount` value (a number, usually `1`).
### Week classes

@@ -222,9 +305,7 @@

Each week is numbered from 1-6, starting with the first week of the month. This controls the z-index that ensures that
the events from one week don't overlap the following week, but could be used for other purposes as well.
Each week is numbered, starting with the first week of the visible period.
#### ws<i>YYYY-MM-DD</i>
Each week also has a class representing the date of the Sunday starting that week. This could be used to style entire
weeks that have some special importance.
Each week also has a class representing the date of the Sunday starting that week. This could be used to style entire weeks that have some special importance.

@@ -273,5 +354,5 @@ ### Day classes

This class is added to the last day of the month. Note that if a portion of the previous month is also showing, _its last day will also have this class_. If you want to style _only_ the last day of the main month in view, use the rule `.calendar-month .last:not(.outsideOfMonth)`.
This class is added to the last day of the its month.
### Event classes
### Classes for Events

@@ -286,5 +367,5 @@ #### offset<i>X</i>

#### slot<i>X</i>
#### eventRow<i>X</i>
This class on an event represents the "row" where the event is drawn that week, starting at `1`. With the default height, only 5-6 slots are visible.
This class on an event represents the "row" where the event is drawn that week, starting at `1`. Up to 20 rows are available for display, content is scrollable if thre are too many to see within the week's row. *Prior to 2.0, this was called `slotX`.*

@@ -305,2 +386,6 @@ #### continued

#### startTime / endTime
These classes are applied to the start and end time of an event, respectively.
## Future plans

@@ -312,8 +397,11 @@

* [x] Add a "starts-on-Monday" mode.
* [ ] Add support for showing event times
* [ ] Possibly add a "week" view (no time of day scaling, just 7 taller boxes).
* [ ] Possibly add modes for a set number of weeks, multiple months, or even a full year.
* [x] Add support for showing event times (New in 2.0!)
* [x] Possibly add a "week" view (no time of day scaling, just 7 taller boxes).
* [x] Possibly add modes for a set number of weeks, multiple months, or even a full year.
* [x] Extract date manipulation methods to a separate plugin.
* [ ] Material theme
* [ ] Apple Calendar theme
* [ ] I'm not 100% happy with the Intl time format options, especially to show time ranges compactly. Considering a custom formatter or the ability to pass a formatter function as a property.
PRs and issues are welcome! Please use the same code style -- there are linter configs included for styles, plain JavaScript, and Vue components.
PRs and issues are welcome! For pull requests, please use the same code style -- there are linter configs included for styles, plain JavaScript, and Vue components. Use of Prettier is recommended.

@@ -351,2 +439,3 @@ ## Inspiration

* If you change the event's `font-size` (defaults to `1em`), padding, or border size, the events you'll have to change the `slotX` classes as well to position the events vertically in the right place. (You _can_ change the overall font size, the entire calendar uses the same `1em` font size and will scale everything accordingly.)
* The `z-index` of the weeks and events are managed using `style` declarations, they ensure that events for one week don't overlap the next week.

@@ -374,2 +463,3 @@ ## Release History

2017.12.30 | 1.8.2 | Add header slot (#32), fix display issue (#33)
2018.01.01 | 2.0.0 | Added week/year and multi-period view options, time of day support, scrolling events overflow, day and event slots, better date string parsing. NOTE: the default component name is now `calendar-view`,

@@ -376,0 +466,0 @@ ## Build Setup

/*
***********************************************************
This mix-in includes a computed properties and methods that
are useful in displaying a calendar. It has no state, other
than the caching of the computed properties.
are useful in displaying a calendar. It has no state.
***********************************************************
*/
export default {
methods: {
// ******************************

@@ -17,42 +14,68 @@ // Series

today() {
return this.dateOnly(new Date());
return this.dateOnly(new Date())
},
weeksOfMonth(d, startDow) {
// Returns an array of object representing the date of the beginning of each week
// included in the view (which, by default, consists of an entire month).
const firstDate = this.beginningOfCalendar(d, startDow);
const lastDate = this.endOfCalendar(d, startDow);
const numWeeks = Math.floor((this.dayDiff(firstDate, lastDate) + 1) / 7);
return Array(numWeeks).fill().map((_, i) => this.addDays(firstDate, i * 7));
beginningOfPeriod(d, periodUom, startDow) {
switch (periodUom) {
case "year":
return new Date(d.getFullYear(), 0)
case "month":
return new Date(d.getFullYear(), d.getMonth())
case "week":
return this.beginningOfWeek(d, startDow)
default:
return null
}
},
daysOfWeek(weekStart) {
return Array(7).fill().map((_, i) => this.addDays(weekStart, i));
return Array(7)
.fill()
.map((_, i) => this.addDays(weekStart, i))
},
// ******************************
// Date transforms (all ignore/wipe time of day)
// ******************************
// ********************************************
// Date transforms that retain time of day
// ********************************************
addDays(d, days) { return new Date(d.getFullYear(), d.getMonth(), d.getDate() + days); },
addDays(d, days) {
return new Date(
d.getFullYear(),
d.getMonth(),
d.getDate() + days,
d.getHours(),
d.getMinutes(),
d.getSeconds()
)
},
endOfMonth(d) { return new Date(d.getFullYear(), d.getMonth() + 1, 0); },
endOfPreviousMonth(d) { return new Date(d.getFullYear(), d.getMonth(), 0); },
beginningOfWeek(d, startDow) {
return this.addDays(d, (startDow - d.getDay() - 7) % -7)
},
endOfWeek(d, startDow) {
return this.addDays(this.beginningOfWeek(d, startDow), 7)
},
aYearBefore(d) { return new Date(d.getFullYear() - 1, d.getMonth()); },
aYearAfter(d) { return new Date(d.getFullYear() + 1, d.getMonth()); },
// ********************************************
// Date transforms that ignore/wipe time of day
// ********************************************
beginningOfMonth(d) {
return new Date(d.getFullYear(), d.getMonth())
},
monthBefore(d) { return new Date(d.getFullYear(), d.getMonth() - 1); },
monthAfter(d) { return new Date(d.getFullYear(), d.getMonth() + 1); },
instanceOfMonth(d) {
return Math.ceil(d.getDate() / 7)
},
beginningOfWeek(d, startDow) { return this.addDays(d, (startDow - d.getDay() - 7) % -7); },
endOfWeek(d, startDow) { return this.addDays(this.beginningOfWeek(d, startDow), 7); },
// This function increments a date by a given number of date units. Accepted units are: year, month, week. For year and month,
// the day of the month is unchanged. This could cause an unexpected result if the units are "month" and the starting day is
// higher than the number of days in the destination month. The count can be positive or negative.
incrementPeriod(d, uom, count) {
return new Date(
d.getFullYear() + (uom == "year" ? count : 0),
d.getMonth() + (uom == "month" ? count : 0),
d.getDate() + (uom == "week" ? count * 7 : 0)
)
},
beginningOfCalendar(d, startDow) { return this.beginningOfWeek(this.beginningOfMonth(d), startDow); },
endOfCalendar(d, startDow) { return this.endOfWeek(this.endOfMonth(d), startDow); },
beginningOfMonth(d) { return new Date(d.getFullYear(), d.getMonth()); },
instanceOfMonth(d) { return Math.ceil(d.getDate() / 7); },
// ******************************

@@ -62,8 +85,30 @@ // Date formatting

paddedMonth(d) { return ('0' + String(d.getMonth() + 1)).slice(-2); },
paddedDay(d) { return ('0' + String(d.getDate())).slice(-2); },
paddedMonth(d) {
return ("0" + String(d.getMonth() + 1)).slice(-2)
},
paddedDay(d) {
return ("0" + String(d.getDate())).slice(-2)
},
isoYearMonth(d) { return d.getFullYear() + '-' + this.paddedMonth(d); },
isoYearMonthDay(d) { return this.isoYearMonth(d) + '-' + this.paddedDay(d); },
isoMonthDay(d) { return this.paddedMonth(d) + '-' + this.paddedDay(d); },
isoYearMonth(d) {
return d.getFullYear() + "-" + this.paddedMonth(d)
},
isoYearMonthDay(d) {
return this.isoYearMonth(d) + "-" + this.paddedDay(d)
},
isoMonthDay(d) {
return this.paddedMonth(d) + "-" + this.paddedDay(d)
},
formattedTime(d, locale, options) {
// Assume midnight = "all day" or indeterminate time
if (d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0)
return ""
// If Intl is not supported, send back the 24-hour, zero-padded
// hours and minutes, expressed as local time.
if (!this.supportsIntl()) {
var ms = new Date().getTimezoneOffset() * 60000 // TZ offset in milliseconds
return new Date(d - ms).toISOString().slice(11, 16)
}
return d.toLocaleTimeString(locale, options)
},

@@ -75,30 +120,65 @@ // ******************************

// Number of whole days between two dates. If present, time of day is ignored.
// Cannot use setHours / dateOnly(), as this would not properly ranges including a DST changeover.
// setHours mutates, so must create a copy.
dayDiff(d1, d2) {
const endDate = new Date(d2), startDate = new Date(d1);
endDate.setUTCHours(0,0,0,0);
startDate.setUTCHours(0,0,0,0);
return (endDate - startDate) / 86400000;
// Have to use setUTCHours to ensure that DST changes between these dates don't
// result in a fractional answer.
dayDiff(d1, d2) {
const endDate = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate()),
startDate = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate())
endDate.setUTCHours(0, 0, 0, 0)
startDate.setUTCHours(0, 0, 0, 0)
return (endDate - startDate) / 86400000
},
// http://stackoverflow.com/questions/492994/compare-two-dates-with-javascript
isSameDate(d1, d2) { return this.dayDiff(d1, d2) === 0; },
isSameMonth(d1, d2) { return d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth(); },
isSameDate(d1, d2) {
// http://stackoverflow.com/questions/492994/compare-two-dates-with-javascript
return this.dayDiff(d1, d2) === 0
},
isSameDateTime(d1, d2) {
return d1.getTime() === d2.getTime()
},
isSameMonth(d1, d2) {
return (
d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth()
)
},
isPastMonth(d) { return this.beginningOfMonth(d) < this.beginningOfMonth(this.today()); },
isFutureMonth(d) { return this.beginningOfMonth(d) > this.beginningOfMonth(this.today()); },
isPastMonth(d) {
return this.beginningOfMonth(d) < this.beginningOfMonth(this.today())
},
isFutureMonth(d) {
return this.beginningOfMonth(d) > this.beginningOfMonth(this.today())
},
isInFuture(d) { return this.dateOnly(d) > this.today(); },
isInPast(d) { return this.dateOnly(d) < this.today(); },
isLastInstanceOfMonth(d) { return d.getMonth() !== this.addDays(d, 7).getMonth(); },
isLastDayOfMonth(d) { return d.getMonth() !== this.addDays(d, 1).getMonth(); },
isInFuture(d) {
return this.dateOnly(d) > this.today()
},
isInPast(d) {
return this.dateOnly(d) < this.today()
},
isLastInstanceOfMonth(d) {
return d.getMonth() !== this.addDays(d, 7).getMonth()
},
isLastDayOfMonth(d) {
return d.getMonth() !== this.addDays(d, 1).getMonth()
},
dateOnly(d) {
// setHours mutates argument, work on a copy.
const d2 = new Date(d);
d2.setHours(0,0,0,0);
return d2;
// Courtesy https://stackoverflow.com/questions/33908299/javascript-parse-a-string-to-date-as-local-time-zone/42626876#42626876
fromIsoStringToLocalDate(s) {
let ds = s.split(/\D/).map(s => Number(s))
ds[1]-- // adjust month
return new Date(...ds)
},
toLocalDate(d) {
return typeof d === "string"
? this.fromIsoStringToLocalDate(d)
: new Date(d)
},
dateOnly(d) {
// Always use a copy, setHours mutates argument
const d2 = new Date(d)
d2.setHours(0, 0, 0, 0)
return d2
},
// ******************************

@@ -109,7 +189,7 @@ // Localization

languageCode(l) {
return l.substring(0, 2);
return l.substring(0, 2)
},
supportsIntl() {
return typeof Intl !== 'undefined';
return typeof Intl !== "undefined"
},

@@ -119,6 +199,8 @@

// Use the provided locale and format if possible to obtain the name of the month
if (!this.supportsIntl()) return Array(12).fill('');
const formatter = new Intl.DateTimeFormat(locale, { month: format });
if (!this.supportsIntl()) return Array(12).fill("")
const formatter = new Intl.DateTimeFormat(locale, { month: format })
// The year doesn't matter, using 2017 for convenience
return Array(12).fill().map((_, i) => formatter.format(new Date(2017, i, 1)));
return Array(12)
.fill()
.map((_, i) => formatter.format(new Date(2017, i, 1)))
},

@@ -128,6 +210,10 @@

// Use the provided locale and format if possible to obtain the name of the days of the week
if (!this.supportsIntl()) return Array(7).fill('');
const formatter = new Intl.DateTimeFormat(locale, { weekday: format });
if (!this.supportsIntl()) return Array(7).fill("")
const formatter = new Intl.DateTimeFormat(locale, { weekday: format })
// 2017 starts on Sunday, so use it as the baseline date
return Array(7).fill().map((_, i) => formatter.format(new Date(2017, 0, (i + 1 + startingDayOfWeek) % 7)));
return Array(7)
.fill()
.map((_, i) =>
formatter.format(new Date(2017, 0, (i + 1 + startingDayOfWeek) % 7))
)
},

@@ -137,13 +223,10 @@

// If not running in the browser, cannot determine a default, return the code for unknown (blank is invalid)
if (typeof navigator === 'undefined') return 'unk';
if (typeof navigator === "undefined") return "unk"
// Return the browser's language setting, implementation is browser-specific
return (
(navigator.languages && navigator.languages.length) ?
navigator.languages[0]
: navigator.language || navigator.browserLanguage
).toLowerCase();
return (navigator.languages && navigator.languages.length
? navigator.languages[0]
: navigator.language || navigator.browserLanguage
).toLowerCase()
},
},
};
}

@@ -1,7 +0,7 @@

import CalendarMonth from "./CalendarMonth.vue"
import CalendarView from "./CalendarView.vue"
export default {
install: function(Vue) {
Vue.component("calendar-month", CalendarMonth)
Vue.component("calendar-view", CalendarView)
},
}

@@ -53,3 +53,3 @@ const webpack = require("webpack")

libraryTarget: "window",
library: "CalendarMonth",
library: "CalendarView",
},

@@ -60,7 +60,7 @@ }),

merge(commonConfig, {
entry: path.resolve(__dirname + "/src/CalendarMonth.vue"),
entry: path.resolve(__dirname + "/src/CalendarView.vue"),
output: {
filename: "vue-simple-calendar.js",
libraryTarget: "umd",
library: "CalendarMonth",
library: "CalendarView",
umdNamedDefine: true,

@@ -67,0 +67,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc